jodit 3.8.4 → 3.8.8
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/.idea/workspace.xml +165 -1308
- package/{.stylelintrc.json → .stylelintrc} +2 -1
- package/CHANGELOG.MD +54 -14
- package/build/jodit.css +280 -258
- package/build/jodit.es2018.css +231 -213
- package/build/jodit.es2018.en.css +231 -213
- package/build/jodit.es2018.en.js +9453 -9409
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -10
- package/build/jodit.es2018.js +13482 -13438
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -10
- package/build/jodit.js +9064 -9013
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -10
- package/build-system/index.js +78 -0
- package/{src/utils → build-system/loaders}/css-variables-prefixes.js +0 -0
- package/{src/utils → build-system/loaders}/lang-loader.js +0 -0
- package/build-system/loaders/style.js +31 -0
- package/{src/utils → build-system/loaders}/svg-loader.js +1 -0
- package/build-system/minimizer/css.js +20 -0
- package/build-system/minimizer/index.js +7 -0
- package/build-system/minimizer/js.js +41 -0
- package/{src/utils/plugin-loader.js → build-system/plugins/banner.js} +7 -6
- package/build-system/plugins/define.js +22 -0
- package/build-system/plugins/extract-css.js +14 -0
- package/build-system/plugins/index.js +31 -0
- package/build-system/plugins/post-build.js +52 -0
- package/build-system/rules/css.js +12 -0
- package/build-system/rules/extra-typescript.js +22 -0
- package/build-system/rules/index.js +17 -0
- package/build-system/rules/internal-typescript.js +23 -0
- package/build-system/rules/langs.js +20 -0
- package/build-system/rules/svg.js +19 -0
- package/build-system/utils/filename.js +17 -0
- package/{src → build-system}/utils/post-build.js +0 -0
- package/build-system/variables.js +53 -0
- package/package.json +34 -33
- package/src/config.ts +8 -14
- package/src/core/ajax.ts +16 -46
- package/src/core/async.ts +6 -17
- package/src/core/component/view-component.ts +0 -1
- package/src/core/constants.ts +5 -5
- package/src/core/create.ts +8 -27
- package/src/core/decorators/debounce.ts +0 -8
- package/src/core/decorators/hook.ts +0 -1
- package/src/core/decorators/nonenumerable.ts +1 -2
- package/src/core/decorators/persistent.ts +0 -3
- package/src/core/decorators/spy.ts +0 -1
- package/src/core/decorators/wait.ts +0 -1
- package/src/core/dom.ts +56 -114
- package/src/core/events/events-native.ts +52 -26
- package/src/core/events/observe-object.ts +0 -2
- package/src/core/global.ts +10 -6
- package/src/core/helpers/append-script.ts +0 -8
- package/src/core/helpers/array/as-array.ts +2 -5
- package/src/core/helpers/array/split-array.ts +0 -1
- package/src/core/helpers/async/set-timeout.ts +0 -7
- package/src/core/helpers/browser.ts +0 -1
- package/src/core/helpers/checker/has-browser-color-picker.ts +0 -3
- package/src/core/helpers/checker/is-array.ts +0 -1
- package/src/core/helpers/checker/is-equal.ts +0 -3
- package/src/core/helpers/checker/is-function.ts +0 -2
- package/src/core/helpers/checker/is-html-from-word.ts +0 -3
- package/src/core/helpers/checker/is-html.ts +0 -1
- package/src/core/helpers/checker/is-number.ts +0 -1
- package/src/core/helpers/checker/is-numeric.ts +0 -2
- package/src/core/helpers/checker/is-plain-object.ts +0 -1
- package/src/core/helpers/checker/is-string.ts +0 -1
- package/src/core/helpers/checker/is-url.ts +0 -4
- package/src/core/helpers/color/color-to-hex.ts +2 -2
- package/src/core/helpers/config-proto.ts +0 -3
- package/src/core/helpers/convert-media-url-to-video-embed.ts +1 -6
- package/src/core/helpers/ctrl-key.ts +1 -3
- package/src/core/helpers/data-bind.ts +0 -6
- package/src/core/helpers/default-language.ts +0 -3
- package/src/core/helpers/each.ts +12 -0
- package/src/core/helpers/html/htmlspecialchars.ts +0 -4
- package/src/core/helpers/html/nl2br.ts +0 -1
- package/src/core/helpers/human-size-to-bytes.ts +1 -4
- package/src/core/helpers/normalize/normalize-color.ts +2 -3
- package/src/core/helpers/normalize/normalize-key-aliases.ts +0 -2
- package/src/core/helpers/normalize/normalize-path.ts +0 -2
- package/src/core/helpers/normalize/normalize-size.ts +0 -3
- package/src/core/helpers/selector.ts +0 -8
- package/src/core/helpers/size/get-content-width.ts +0 -2
- package/src/core/helpers/size/offset.ts +1 -7
- package/src/core/helpers/size/position.ts +0 -4
- package/src/core/helpers/string/camel-case.ts +1 -2
- package/src/core/helpers/string/i18n.ts +0 -7
- package/src/core/helpers/string/kebab-case.ts +7 -5
- package/src/core/helpers/string/stringify.ts +0 -3
- package/src/core/helpers/string/trim.ts +0 -2
- package/src/core/helpers/string/ucfirst.ts +2 -5
- package/src/core/helpers/type.ts +0 -1
- package/src/core/helpers/utils/get.ts +0 -2
- package/src/core/helpers/utils/mark-deprecated.ts +0 -4
- package/src/core/helpers/utils/set.ts +0 -2
- package/src/core/helpers/utils/utils.ts +35 -14
- package/src/core/plugin-system.ts +0 -31
- package/src/core/selection/select.ts +15 -13
- package/src/core/selection/style/api/is-normal-node.ts +1 -2
- package/src/core/selection/style/api/toggle-styles.ts +0 -2
- package/src/core/selection/style/apply-style.ts +6 -2
- package/src/core/traits/mods.ts +1 -3
- package/src/core/ui/button/button/button.less +7 -3
- package/src/core/ui/button/button/button.ts +1 -1
- package/src/core/ui/button/group/group.less +5 -5
- package/src/core/ui/element.ts +0 -4
- package/src/core/ui/form/inputs/file/file.less +4 -4
- package/src/core/ui/form/validators/input.ts +0 -2
- package/src/core/ui/form/validators/select.ts +0 -1
- package/src/core/ui/helpers/get-control-type.ts +0 -2
- package/src/core/ui/icon.ts +0 -10
- package/src/core/ui/list/group.less +1 -1
- package/src/core/ui/list/group.ts +1 -6
- package/src/core/ui/list/list.ts +0 -3
- package/src/core/ui/popup/popup.ts +0 -11
- package/src/core/ui/progress-bar/progress-bar.less +8 -8
- package/src/core/view/view-with-toolbar.ts +0 -5
- package/src/core/view/view.ts +2 -18
- package/src/index.ts +1 -1
- package/src/jodit.ts +14 -70
- package/src/modules/context-menu/context-menu.ts +3 -6
- package/src/modules/dialog/alert.ts +0 -6
- package/src/modules/dialog/confirm.ts +1 -1
- package/src/modules/dialog/dialog.ts +22 -55
- package/src/modules/dialog/prompt.ts +3 -5
- package/src/modules/image-editor/image-editor.less +51 -46
- package/src/modules/status-bar/status-bar.less +12 -12
- package/src/modules/status-bar/status-bar.ts +0 -3
- package/src/modules/table.ts +17 -6
- package/src/modules/toolbar/button/button.less +5 -6
- package/src/modules/toolbar/button/button.ts +1 -1
- package/src/modules/toolbar/button/content.less +2 -2
- package/src/modules/widget/color-picker/color-picker.less +7 -6
- package/src/modules/widget/tabs/tabs.less +3 -3
- package/src/plugins/about/about.less +1 -1
- package/src/plugins/add-new-line/add-new-line.less +14 -15
- package/src/plugins/add-new-line/add-new-line.ts +1 -1
- package/src/plugins/clipboard/paste-storage/paste-storage.less +10 -11
- package/src/plugins/fix/clean-html.ts +2 -2
- package/src/plugins/fix/wrap-text-nodes.ts +1 -2
- package/src/plugins/fullsize/fullsize.less +5 -5
- package/src/plugins/image/image-properties/image-properties.less +11 -7
- package/src/plugins/image/image-properties/image-properties.ts +11 -8
- package/src/plugins/placeholder/placeholder.less +4 -4
- package/src/plugins/resizer/resizer.less +28 -23
- package/src/plugins/search/search.less +25 -25
- package/src/plugins/source/source.less +15 -15
- package/src/plugins/xpath/xpath.less +3 -3
- package/src/styles/form.less +19 -14
- package/src/styles/modules/button-group.less +2 -2
- package/src/styles/modules/icon.less +9 -8
- package/src/types/ajax.d.ts +28 -0
- package/src/types/async.d.ts +4 -3
- package/src/types/events.d.ts +15 -0
- package/tsconfig.json +1 -1
- package/types/config.d.ts +8 -14
- package/types/core/ajax.d.ts +6 -29
- package/types/core/async.d.ts +2 -15
- package/types/core/component/view-component.d.ts +0 -1
- package/types/core/constants.d.ts +5 -5
- package/types/core/create.d.ts +0 -4
- package/types/core/decorators/debounce.d.ts +0 -8
- package/types/core/decorators/hook.d.ts +0 -1
- package/types/core/decorators/nonenumerable.d.ts +1 -2
- package/types/core/decorators/persistent.d.ts +0 -3
- package/types/core/decorators/wait.d.ts +0 -1
- package/types/core/dom.d.ts +25 -112
- package/types/core/events/events-native.d.ts +18 -17
- package/types/core/events/observe-object.d.ts +0 -2
- package/types/core/global.d.ts +0 -4
- package/types/core/helpers/append-script.d.ts +0 -8
- package/types/core/helpers/array/as-array.d.ts +3 -0
- package/types/core/helpers/array/split-array.d.ts +0 -1
- package/types/core/helpers/async/set-timeout.d.ts +0 -7
- package/types/core/helpers/browser.d.ts +0 -1
- package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
- package/types/core/helpers/checker/is-array.d.ts +0 -1
- package/types/core/helpers/checker/is-equal.d.ts +0 -3
- package/types/core/helpers/checker/is-function.d.ts +0 -2
- package/types/core/helpers/checker/is-html-from-word.d.ts +0 -3
- package/types/core/helpers/checker/is-html.d.ts +0 -1
- package/types/core/helpers/checker/is-number.d.ts +0 -1
- package/types/core/helpers/checker/is-numeric.d.ts +0 -2
- package/types/core/helpers/checker/is-plain-object.d.ts +0 -1
- package/types/core/helpers/checker/is-string.d.ts +0 -1
- package/types/core/helpers/checker/is-url.d.ts +0 -4
- package/types/core/helpers/color/color-to-hex.d.ts +2 -2
- package/types/core/helpers/config-proto.d.ts +0 -3
- package/types/core/helpers/convert-media-url-to-video-embed.d.ts +1 -6
- package/types/core/helpers/ctrl-key.d.ts +1 -3
- package/types/core/helpers/data-bind.d.ts +0 -6
- package/types/core/helpers/default-language.d.ts +0 -3
- package/types/core/helpers/each.d.ts +9 -0
- package/types/core/helpers/html/htmlspecialchars.d.ts +0 -4
- package/types/core/helpers/html/nl2br.d.ts +0 -1
- package/types/core/helpers/human-size-to-bytes.d.ts +1 -4
- package/types/core/helpers/normalize/normalize-color.d.ts +2 -3
- package/types/core/helpers/normalize/normalize-key-aliases.d.ts +0 -2
- package/types/core/helpers/normalize/normalize-path.d.ts +0 -2
- package/types/core/helpers/normalize/normalize-size.d.ts +0 -3
- package/types/core/helpers/selector.d.ts +0 -8
- package/types/core/helpers/size/get-content-width.d.ts +0 -2
- package/types/core/helpers/size/offset.d.ts +1 -7
- package/types/core/helpers/string/camel-case.d.ts +1 -2
- package/types/core/helpers/string/i18n.d.ts +0 -7
- package/types/core/helpers/string/kebab-case.d.ts +1 -5
- package/types/core/helpers/string/stringify.d.ts +0 -3
- package/types/core/helpers/string/trim.d.ts +0 -2
- package/types/core/helpers/string/ucfirst.d.ts +1 -4
- package/types/core/helpers/type.d.ts +0 -1
- package/types/core/helpers/utils/get.d.ts +0 -2
- package/types/core/helpers/utils/mark-deprecated.d.ts +0 -4
- package/types/core/helpers/utils/set.d.ts +0 -2
- package/types/core/helpers/utils/utils.d.ts +4 -15
- package/types/core/plugin-system.d.ts +0 -31
- package/types/core/selection/select.d.ts +8 -9
- package/types/core/selection/style/api/toggle-styles.d.ts +0 -2
- package/types/core/traits/mods.d.ts +1 -3
- package/types/core/ui/element.d.ts +0 -4
- package/types/core/ui/form/validators/input.d.ts +0 -2
- package/types/core/ui/form/validators/select.d.ts +0 -1
- package/types/core/ui/helpers/get-control-type.d.ts +0 -2
- package/types/core/ui/icon.d.ts +0 -10
- package/types/core/ui/list/group.d.ts +1 -6
- package/types/core/ui/list/list.d.ts +0 -3
- package/types/core/ui/popup/popup.d.ts +0 -11
- package/types/core/view/view-with-toolbar.d.ts +0 -5
- package/types/core/view/view.d.ts +2 -18
- package/types/index.d.ts +1 -1
- package/types/jodit.d.ts +2 -46
- package/types/modules/context-menu/context-menu.d.ts +3 -6
- package/types/modules/dialog/alert.d.ts +0 -6
- package/types/modules/dialog/confirm.d.ts +1 -1
- package/types/modules/dialog/dialog.d.ts +9 -29
- package/types/modules/dialog/prompt.d.ts +3 -5
- package/types/modules/status-bar/status-bar.d.ts +0 -3
- package/types/modules/table.d.ts +1 -1
- package/types/types/ajax.d.ts +28 -0
- package/types/types/async.d.ts +4 -3
- package/types/types/events.d.ts +15 -0
- package/src/utils/create-entries.js +0 -57
- package/src/utils/lang-translater.js +0 -142
|
@@ -1,10 +1 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
|
-
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
|
|
4
|
-
* Version: v3.8.4
|
|
5
|
-
* Url: https://xdsoft.net/jodit/
|
|
6
|
-
* License(s): MIT
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
((t,e)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}})(self,(function(){return(()=>{var t=[,(t,e,s)=>{"use strict";s.d(e,{D:()=>o});var i=s(2);class o{constructor(){this.namespace="",this.iframe=!1,this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument="undefined"!=typeof document?document:null,this.ownerWindow="undefined"!=typeof window?window:null,this.shadowRoot=null,this.styleValues={},this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.spellcheck=!0,this.editorCssClass=!1,this.style=!1,this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=1e3,this.useNativeTooltip=!1,this.enter=i.PARAGRAPH,this.enterBlock="br"!==this.enter?this.enter:i.PARAGRAPH,this.defaultMode=i.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:"font-style",buttons:[]},{group:"script",buttons:[]},{group:"list",buttons:["ul","ol"]},{group:"indent",buttons:[]},{group:"font",buttons:[]},{group:"color",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"form",buttons:[]},{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.buttonsMD=["source","|","bold","italic","|","ul","ol","eraser","|","font","fontsize","brush","paragraph","|","image","table","link","|","align","\n","undo","redo","|","hr","copyformat","fullsize","dots"],this.buttonsSM=["source","|","bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","|","image","table","\n","link","|","align","|","undo","redo","|","copyformat","fullsize","dots"],this.buttonsXS=["bold","image","|","brush","paragraph","eraser","\n","align","|","undo","redo","|","dots"],this.events={},this.textIcons=!1,this.showBrowserColorPicker=!0}static get defaultOptions(){return o.__defaultOptions||(o.__defaultOptions=new o),o.__defaultOptions}}o.prototype.controls={}},(t,e,s)=>{"use strict";s.r(e),s.d(e,{INVISIBLE_SPACE:()=>i,NBSP_SPACE:()=>o,INVISIBLE_SPACE_REG_EXP:()=>n,INVISIBLE_SPACE_REG_EXP_END:()=>r,INVISIBLE_SPACE_REG_EXP_START:()=>a,SPACE_REG_EXP:()=>l,SPACE_REG_EXP_START:()=>c,SPACE_REG_EXP_END:()=>h,IS_BLOCK:()=>d,IS_INLINE:()=>u,INSEPARABLE_TAGS:()=>p,MAY_BE_REMOVED_WITH_KEY:()=>f,KEY_BACKSPACE:()=>m,KEY_TAB:()=>g,KEY_ENTER:()=>v,KEY_ESC:()=>b,KEY_LEFT:()=>w,KEY_UP:()=>y,KEY_RIGHT:()=>C,KEY_DOWN:()=>j,KEY_SPACE:()=>x,KEY_DELETE:()=>E,KEY_F3:()=>S,NEARBY:()=>_,ACCURACY:()=>k,COMMAND_KEYS:()=>T,BR:()=>I,PARAGRAPH:()=>q,MODE_WYSIWYG:()=>L,MODE_SOURCE:()=>z,MODE_SPLIT:()=>M,IS_IE:()=>P,TEXT_PLAIN:()=>D,TEXT_HTML:()=>N,MARKER_CLASS:()=>R,EMULATE_DBLCLICK_TIMEOUT:()=>A,INSERT_AS_HTML:()=>B,INSERT_CLEAR_HTML:()=>O,INSERT_AS_TEXT:()=>H,INSERT_ONLY_TEXT:()=>F,SAFE_COUNT_CHANGE_CALL:()=>$,IS_MAC:()=>W,KEY_ALIASES:()=>V,BASE_PATH:()=>Y});const i="\ufeff",o=" ",n=()=>/[\uFEFF]/g,r=()=>/[\uFEFF]+$/g,a=()=>/^[\uFEFF]+/g,l=()=>/[\s\n\t\r\uFEFF\u200b]+/g,c=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,h=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,d=/^(ARTICLE|SCRIPT|STYLE|OBJECT|FOOTER|HEADER|NAV|SECTION|IFRAME|JODIT|JODIT-MEDIA|PRE|DIV|P|LI|UL|OL|H[1-6]|BLOCKQUOTE|TR|TD|TH|TBODY|THEAD|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD|DL|DFN)$/i,u=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,p=["img","br","video","iframe","script","input","textarea","hr","link","jodit","jodit-media"],f=RegExp(`^${p.join("|")}$`,"i"),m="Backspace",g="Tab",v="Enter",b="Escape",w="ArrowLeft",y="ArrowUp",C="ArrowRight",j="ArrowDown",x="Space",E="Delete",S="F3",_=5,k=10,T=[m,E,y,j,C,w,v,b,S,g],I="br",q="p",L=1,z=2,M=3,P="undefined"!=typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),D=P?"text":"text/plain",N=P?"html":"text/html",R="jodit-selection_marker",A=300,B="insert_as_html",O="insert_clear_html",H="insert_as_text",F="insert_only_text",$=10,W="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),V={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:W?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Y=(()=>{if("undefined"==typeof document)return"";const t=document.currentScript,e=t=>t.replace(/\/[^/]+.js$/,"/");if(t)return e(t.src);const s=document.querySelectorAll("script[src]");return s&&s.length?e(s[s.length-1].src):window.location.href})()},(t,e,s)=>{"use strict";s.d(e,{DG:()=>o,ng:()=>c,P5:()=>p,rO:()=>i});const i="JoditEventDefaultNamespace";class o{constructor(){this.__store={}}get(t,e){if(void 0!==this.__store[e])return this.__store[e][t]}indexOf(t,e,s){const i=this.get(t,e);if(i)for(let t=0;i.length>t;t+=1)if(i[t].originalCallback===s)return t;return!1}namespaces(t=!1){const e=Object.keys(this.__store);return t?e.filter((t=>t!==i)):e}events(t){return this.__store[t]?Object.keys(this.__store[t]):[]}set(t,e,s,i=!1){void 0===this.__store[e]&&(this.__store[e]={}),void 0===this.__store[e][t]&&(this.__store[e][t]=[]),i?this.__store[e][t].unshift(s):this.__store[e][t].push(s)}clear(){this.__store={}}}var n=s(5),r=s(6),a=s(7),l=s(4);class c{constructor(t){this.__key="__JoditEventsNativeNamespaces",this.doc=document,this.prepareEvent=t=>{t.cancelBubble||(t.type.match(/^touch/)&&t.changedTouches&&t.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach((e=>{Object.defineProperty(t,e,{value:t.changedTouches[0][e],configurable:!0,enumerable:!0})})),t.originalEvent||(t.originalEvent=t),"paste"===t.type&&void 0===t.clipboardData&&this.doc.defaultView.clipboardData&&Object.defineProperty(t,"clipboardData",{get:()=>this.doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.isDestructed=!1,t&&(this.doc=t),this.__key+=(new Date).getTime()}eachEvent(t,e){t.split(/[\s,]+/).forEach((t=>{const s=t.split(".");e.call(this,s[0],s[1]||i)}))}getStore(t){if(!t)throw(0,l.v)("Need subject");if(void 0===t[this.__key]){const e=new o;Object.defineProperty(t,this.__key,{enumerable:!1,configurable:!0,value:e})}return t[this.__key]}clearStore(t){void 0!==t[this.__key]&&delete t[this.__key]}triggerNativeEvent(t,e){const s=this.doc.createEvent("HTMLEvents");"string"==typeof e?s.initEvent(e,!0,!0):(s.initEvent(e.type,e.bubbles,e.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach((t=>{Object.defineProperty(s,t,{value:e[t],enumerable:!0})})),Object.defineProperty(s,"originalEvent",{value:e,enumerable:!0})),t.dispatchEvent(s)}get current(){return this.currents[this.currents.length-1]}on(t,e,s,i=!1){const o=(0,n.H)(t)?this:t,c=(0,n.H)(e)?e:t;let h=s;void 0===h&&(0,r.m)(e)&&(h=e);const d=this.getStore(o);if(!(0,n.H)(c)||""===c)throw(0,l.v)("Need events names");if(!(0,r.m)(h))throw(0,l.v)("Need event handler");if((0,a.k)(o))return o.forEach((t=>{this.on(t,c,h,i)})),this;const u=(0,r.m)(o.addEventListener),p=this;let f=function(t,...e){return h&&h.call(this,t,...e)};return u&&(f=function(t){if(p.prepareEvent(t),h&&!1===h.call(this,t))return t.preventDefault(),t.stopImmediatePropagation(),!1}),this.eachEvent(c,((t,e)=>{if(""===t)throw(0,l.v)("Need event name");if(!1===d.indexOf(t,e,h)&&(d.set(t,e,{event:t,originalCallback:h,syntheticCallback:f},i),u)){const e=!!["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"].includes(t)&&{passive:!0};o.addEventListener(t,f,e)}})),this}one(t,e,s,i=!1){const o=(0,n.H)(t)?this:t,a=(0,n.H)(e)?e:t;let l=s;void 0===l&&(0,r.m)(e)&&(l=e);const c=(...t)=>{this.off(o,a,c),l(...t)};return this.on(o,a,c,i),this}off(t,e,s){const o=(0,n.H)(t)?this:t,a=(0,n.H)(e)?e:t,l=this.getStore(o);let c=s;if(!(0,n.H)(a)||!a)return l.namespaces().forEach((t=>{this.off(o,"."+t)})),this.clearStore(o),this;void 0===c&&(0,r.m)(e)&&(c=e);const h=(0,r.m)(o.removeEventListener),d=t=>{h&&o.removeEventListener(t.event,t.syntheticCallback,!1)},u=(t,e)=>{if(""!==t){const s=l.get(t,e);if(s&&s.length)if((0,r.m)(c)){const i=l.indexOf(t,e,c);!1!==i&&(d(s[i]),s.splice(i,1))}else s.forEach(d),s.length=0}else l.events(e).forEach((t=>{""!==t&&u(t,e)}))};return this.eachEvent(a,((t,e)=>{e===i?l.namespaces().forEach((e=>{u(t,e)})):u(t,e)})),this}stopPropagation(t,e){const s=(0,n.H)(t)?this:t,o=(0,n.H)(t)?t:e;if("string"!=typeof o)throw(0,l.v)("Need event names");const r=this.getStore(s);this.eachEvent(o,((t,e)=>{const o=r.get(t,e);o&&this.__stopped.push(o),e===i&&r.namespaces(!0).forEach((e=>this.stopPropagation(s,t+"."+e)))}))}removeStop(t){if(t){const e=this.__stopped.indexOf(t);-1!==e&&this.__stopped.splice(0,e+1)}}isStopped(t){return void 0!==t&&-1!==this.__stopped.indexOf(t)}fire(t,e,...s){let o,a;const c=(0,n.H)(t)?this:t,h=(0,n.H)(t)?t:e,d=(0,n.H)(t)?[e,...s]:s,u=(0,r.m)(c.dispatchEvent);if(!u&&!(0,n.H)(h))throw(0,l.v)("Need events names");const p=this.getStore(c);return!(0,n.H)(h)&&u?this.triggerNativeEvent(c,e):this.eachEvent(h,((t,e)=>{if(u)this.triggerNativeEvent(c,t);else{const s=p.get(t,e);if(s)try{[...s].every((e=>!this.isStopped(s)&&(this.currents.push(t),a=e.syntheticCallback.apply(c,d),this.currents.pop(),void 0!==a&&(o=a),!0)))}finally{this.removeStop(s)}e!==i||u||p.namespaces().filter((t=>t!==e)).forEach((e=>{const s=this.fire.call(this,c,t+"."+e,...d);void 0!==s&&(o=s)}))}})),o}destruct(){this.isDestructed&&(this.isDestructed=!0,this.off(this),this.getStore(this).clear(),delete this[this.__key])}}var h=s(39),d=s(8),u=s(36);class p{constructor(t,e=[],s={}){this.__lockEvent={},this.__data=t,this.__prefix=e,this.__onEvents=s,Object.keys(t).forEach((e=>{const s=this.__prefix.concat(e).filter((t=>t.length));Object.defineProperty(this,e,{set:i=>{var o;const n=t[e];if(!(0,d.isFastEqual)(n,i)){this.fire(["beforeChange","beforeChange."+s.join(".")],e,i),(0,d.isPlainObject)(i)&&(i=new p(i,s,this.__onEvents)),t[e]=i;const r=[];this.fire(["change",...s.reduce(((t,e)=>(r.push(e),t.push("change."+r.join(".")),t)),[])],s.join("."),n,(null===(o=i)||void 0===o?void 0:o.valueOf)?i.valueOf():i)}},get:()=>t[e],enumerable:!0,configurable:!0}),(0,d.isPlainObject)(t[e])&&(t[e]=new p(t[e],s,this.__onEvents))}))}valueOf(){return this.__data}toString(){return JSON.stringify(this.valueOf())}on(t,e){return(0,d.isArray)(t)?(t.map((t=>this.on(t,e))),this):(this.__onEvents[t]||(this.__onEvents[t]=[]),this.__onEvents[t].push(e),this)}fire(t,...e){if((0,d.isArray)(t))t.map((t=>this.fire(t,...e)));else try{!this.__lockEvent[t]&&this.__onEvents[t]&&(this.__lockEvent[t]=!0,this.__onEvents[t].forEach((t=>t.call(this,...e))))}finally{this.__lockEvent[t]=!1}}static create(t,e=[]){return t instanceof p?t:new p(t,e)}}(0,h.gn)([u.nonenumerable],p.prototype,"__data",void 0),(0,h.gn)([u.nonenumerable],p.prototype,"__prefix",void 0),(0,h.gn)([u.nonenumerable],p.prototype,"__onEvents",void 0),(0,h.gn)([u.nonenumerable],p.prototype,"__lockEvent",void 0)},(t,e,s)=>{"use strict";function i(t){return new TypeError(t)}s.d(e,{v:()=>i})},(t,e,s)=>{"use strict";function i(t){return"string"==typeof t}s.d(e,{H:()=>i})},(t,e,s)=>{"use strict";function i(t){return"function"==typeof t}s.d(e,{m:()=>i})},(t,e,s)=>{"use strict";function i(t){return Array.isArray(t)}s.d(e,{k:()=>i})},(t,e,s)=>{"use strict";s.r(e),s.d(e,{$$:()=>E,ConfigFlatten:()=>w,ConfigProto:()=>b,LimitedStack:()=>i.lI,appendScript:()=>Y,appendScriptAsync:()=>U,appendStyleAsync:()=>G,applyStyles:()=>q,asArray:()=>n,attr:()=>i.Lj,browser:()=>X,buildQuery:()=>ot,call:()=>i.RE,callPromise:()=>i.C6,camelCase:()=>j.eV,cleanFromWord:()=>L,clearCenterAlign:()=>A.b,clearTimeout:()=>h,cns:()=>i.H5,colorToHex:()=>g.h,completeUrl:()=>$,convertMediaUrlToVideoEmbed:()=>Z,css:()=>A.i,cssPath:()=>k,ctrlKey:()=>Q,dataBind:()=>tt.q,defaultLanguage:()=>et.X,each:()=>st,error:()=>C.v,fastClone:()=>f,get:()=>i.U2,getClassName:()=>i.gj,getContentWidth:()=>R,getScrollParent:()=>B,getXPathByElement:()=>S,hasBrowserColorPicker:()=>m.EO,hasContainer:()=>m.Zt,htmlspecialchars:()=>z,humanSizeToBytes:()=>it,i18n:()=>j.ag,inView:()=>nt,innerWidth:()=>O,isArray:()=>m.kJ,isAtom:()=>u,isBoolean:()=>m.jn,isDestructable:()=>m.Z$,isEqual:()=>m.Xy,isFastEqual:()=>m.LP,isFunction:()=>m.mf,isHTML:()=>m.FP,isHtmlFromWord:()=>m.I4,isInitable:()=>m.Gu,isInt:()=>m.GN,isJoditObject:()=>m.Zu,isLicense:()=>m.A1,isNativeFunction:()=>m.QC,isNumber:()=>m.hj,isNumeric:()=>m.kE,isPlainObject:()=>m.PO,isPromise:()=>m.tI,isString:()=>m.HD,isURL:()=>m.PX,isValidName:()=>m.r1,isViewObject:()=>m.f2,isVoid:()=>m.nj,isWindow:()=>m.FJ,kebabCase:()=>j.GL,keepNames:()=>i.kc,keys:()=>i.XP,loadImage:()=>i.po,loadNext:()=>K,markAsAtomic:()=>p,markDeprecated:()=>i.Q8,markOwner:()=>i.MN,memorizeExec:()=>i.u3,nl2br:()=>D,normalizeColor:()=>N.ut,normalizeCssValue:()=>N.Zh,normalizeKeyAliases:()=>N.T2,normalizeLicense:()=>N.Pd,normalizeNode:()=>N.Tz,normalizePath:()=>N.AH,normalizeRelativePath:()=>N.Jf,normalizeSize:()=>N.aC,normalizeUrl:()=>N.D5,offset:()=>H,parseQuery:()=>J,position:()=>F,refs:()=>_,reset:()=>i.mc,resolveElement:()=>T,safeHTML:()=>P,scrollIntoViewIfNeeded:()=>rt,set:()=>i.t8,setTimeout:()=>c,splitArray:()=>a,sprintf:()=>j.gB,stringify:()=>j.Pz,stripTags:()=>M,toArray:()=>l.q,trim:()=>j.fy,trimInv:()=>j.as,ucfirst:()=>j.Ps,val:()=>at});var i=s(9),o=s(7);const n=t=>(0,o.k)(t)?t:[t];var r=s(5);function a(t){return(0,r.H)(t)?t.split(/[,\s]+/):t}var l=s(23);function c(t,e,...s){return e?window.setTimeout(t,e,...s):(t.call(null,...s),0)}function h(t){window.clearTimeout(t)}var d=s(17);function u(t){return t&&t.isAtom}function p(t){return Object.defineProperty(t,"isAtom",{enumerable:!1,value:!0,configurable:!1}),t}function f(t){return JSON.parse((0,d.P)(t))}var m=s(16),g=s(24),v=s(1);function b(t,e,s=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;const i=v.D.defaultOptions;if((0,m.HD)(t.preset)){if(void 0!==i.presets[t.preset]){const e=i.presets[t.preset];Object.keys(e).forEach((s=>{(0,m.nj)(t[s])&&(t[s]=e[s])}))}delete t.preset}const o={};return Object.keys(t).forEach((i=>{const n=t[i],r=e?e[i]:null;o[i]=(0,m.PO)(n)&&(0,m.PO)(r)&&!u(n)?b(n,r,s+1):0!==s&&(0,m.kJ)(n)&&!u(n)&&(0,m.kJ)(r)?[...n,...r.slice(n.length)]:n})),Object.setPrototypeOf(o,e),o}function w(t){return(0,i.XP)(t,!1).reduce(((e,s)=>(e[s]=t[s],e)),{})}var y=s(15),C=(s(2),s(4)),j=s(25),x=s(27);function E(t,e){let s;return s=e.querySelectorAll(t),[].slice.call(s)}const S=(t,e)=>{if(!t||t.nodeType!==Node.ELEMENT_NODE)return"";if(!t.parentNode||e===t)return"";if(t.id)return"//*[@id='"+t.id+"']";const s=[].filter.call(t.parentNode.childNodes,(e=>e.nodeName===t.nodeName));return S(t.parentNode,e)+"/"+t.nodeName.toLowerCase()+(s.length>1?"["+((0,l.q)(s).indexOf(t)+1)+"]":"")},_=t=>(t instanceof x.u1&&(t=t.container),E("[ref],[data-ref]",t).reduce(((t,e)=>{const s=(0,i.Lj)(e,"-ref");return s&&(0,m.HD)(s)&&(t[(0,j.eV)(s)]=e,t[s]=e),t}),{})),k=t=>{if(!y.i.isElement(t))return null;const e=[];let s=t;for(;s&&s.nodeType===Node.ELEMENT_NODE;){let t=s.nodeName.toLowerCase();if(s.id){t+="#"+s.id,e.unshift(t);break}{let e=s,i=1;do{e=e.previousElementSibling,e&&e.nodeName.toLowerCase()===t&&i++}while(e);t+=":nth-of-type("+i+")"}e.unshift(t),s=s.parentNode}return e.join(" > ")};function T(t,e){let s=t;if((0,m.HD)(t))try{s=e.querySelector(t)}catch(e){throw(0,C.v)('String "'+t+'" should be valid HTML selector')}if(!s||"object"!=typeof s||!y.i.isElement(s)||!s.cloneNode)throw(0,C.v)('Element "'+t+'" should be string or HTMLElement instance');return s}function I(t){return t.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";]+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,((t,e,s)=>{switch(s.toLowerCase()){case"pt":return(1.328*parseFloat(e)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(e)).toFixed(0)+"px"}return t}))}function q(t){if(-1===t.indexOf("<html "))return t;t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7);const e=document.createElement("iframe");e.style.display="none",document.body.appendChild(e);let s="",i=[],o=[];try{const n=e.contentDocument||(e.contentWindow?e.contentWindow.document:null);if(n){n.open(),n.write(t),n.close(),n.styleSheets.length&&(o=n.styleSheets[n.styleSheets.length-1].cssRules);for(let t=0;o.length>t;t+=1)""!==o[t].selectorText&&(i=E(o[t].selectorText,n.body),i.forEach((e=>{e.style.cssText=I(o[t].style.cssText+";"+e.style.cssText)})));y.i.each(n.body,(t=>{if(y.i.isElement(t)){const e=t,s=e.style.cssText;s&&(e.style.cssText=I(s)),e.hasAttribute("lang")&&e.removeAttribute("lang")}})),s=n.firstChild?(0,j.fy)(n.body.innerHTML):""}}catch(t){}finally{y.i.safeRemove(e)}return s&&(t=s),(0,j.fy)(t.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}function L(t){-1!==t.indexOf("<html ")&&(t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7));let e="";try{const s=document.createElement("div");s.innerHTML=t;const i=[];s.firstChild&&y.i.all(s,(t=>{if(t)switch(t.nodeType){case Node.ELEMENT_NODE:switch(t.nodeName){case"STYLE":case"LINK":case"META":i.push(t);break;case"W:SDT":case"W:SDTPR":case"FONT":y.i.unwrap(t);break;default:(0,l.q)(t.attributes).forEach((e=>{-1===["src","href","rel","content"].indexOf(e.name.toLowerCase())&&t.removeAttribute(e.name)}))}break;case Node.TEXT_NODE:break;default:i.push(t)}})),i.forEach(y.i.safeRemove),e=s.innerHTML}catch(t){}return e&&(t=e),(t=t.split(/(\n)/).filter(j.fy).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}function z(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function M(t,e=document){const s=e.createElement("div");return(0,m.HD)(t)?s.innerHTML=t:s.appendChild(t),E("DIV, P, BR, H1, H2, H3, H4, H5, H6, HR",s).forEach((t=>{const s=t.parentNode;if(!s)return;const i=t.nextSibling;y.i.isText(i)&&/^\s/.test(i.nodeValue||"")||i&&s.insertBefore(e.createTextNode(" "),i)})),(0,j.fy)(s.innerText)||""}function P(t,e){if(!y.i.isElement(t))return;const s=t=>(0,i.Lj)(t,"onerror",null),o=t=>{const e=t.getAttribute("href");e&&0===e.trim().indexOf("javascript")&&(0,i.Lj)(t,"href",location.protocol+"//"+e)};e.removeOnError&&(s(t),E("[onerror]",t).forEach(s)),e.safeJavaScriptLink&&(o(t),E('a[href^="javascript"]',t).forEach(o))}function D(t){return t.replace(/([^>])([\n\r]+)/g,"$1<br/>$2")}var N=s(32);const R=(t,e)=>{const s=t=>parseInt(t,10),i=e.getComputedStyle(t);return t.offsetWidth-s(i.getPropertyValue("padding-left")||"0")-s(i.getPropertyValue("padding-right")||"0")};var A=s(31);function B(t){const e=y.i.isHTMLElement(t),s=e&&(0,A.i)(t,"overflowY");return t?e&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:B(t.parentNode)||document.scrollingElement||document.body:null}const O=(t,e)=>{const s=e.getComputedStyle(t);let i=t.clientWidth;return i-=parseFloat(s.paddingLeft||"0")+parseFloat(s.paddingRight||"0"),i},H=(t,e,s,i=!1)=>{let o;try{o=t.getBoundingClientRect()}catch(t){o={top:0,bottom:0,left:0,right:0,width:0,height:0}}const n=s.body,r=s.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},a=s.defaultView||s.parentWindow,l=a.pageYOffset||r.scrollTop||n.scrollTop,c=a.pageXOffset||r.scrollLeft||n.scrollLeft,h=r.clientTop||n.clientTop||0,d=r.clientLeft||n.clientLeft||0;let u,p;const f=e.iframe;if(!i&&e&&e.options&&e.o.iframe&&f){const{top:t,left:s}=H(f,e,e.od,!0);u=o.top+t,p=o.left+s}else u=o.top+l-h,p=o.left+c-d;return{top:Math.round(u),left:Math.round(p),width:o.width,height:o.height}};function F(t,e,s=!1){const i=t.getBoundingClientRect();let o=i.left,n=i.top;if((0,m.Zu)(e)&&e.iframe&&!s){const{left:t,top:s}=F(e.iframe,e,!0);o+=t,n+=s}return{left:Math.round(o),top:Math.round(n),width:Math.round(t.offsetWidth),height:Math.round(t.offsetHeight)}}const $=t=>("file:"===window.location.protocol&&/^\/\//.test(t)&&(t="https:"+t),t),W=new Map,V=t=>async(e,s)=>{if(W.has(s))return W.get(s);const i=t(e,s);return W.set(s,i),i},Y=(t,e,s)=>{const i=t.c.element("script");return i.type="text/javascript",i.async=!0,(0,m.mf)(s)&&!t.isInDestruct&&t.e.on(i,"load",s),i.src||(i.src=$(e)),t.od.body.appendChild(i),{callback:s,element:i}},U=V(((t,e)=>new Promise(((s,i)=>{const{element:o}=Y(t,e,s);!t.isInDestruct&&t.e.on(o,"error",i)})))),G=V(((t,e)=>new Promise(((s,i)=>{const o=t.c.element("link");o.rel="stylesheet",o.media="all",o.crossOrigin="anonymous",!t.isInDestruct&&t.e.on(o,"load",(()=>s(o))).on(o,"error",i),o.href=$(e),t.o.shadowRoot?t.o.shadowRoot.appendChild(o):t.od.body.appendChild(o)})))),K=(t,e,s=0)=>(0,m.HD)(e[s])?U(t,e[s]).then((()=>K(t,e,s+1))):Promise.resolve(),X=t=>{const e=navigator.userAgent.toLowerCase(),s=/(firefox)[\s/]([\w.]+)/.exec(e)||/(chrome)[\s/]([\w.]+)/.exec(e)||/(webkit)[\s/]([\w.]+)/.exec(e)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(e)||/(msie)[\s]([\w.]+)/.exec(e)||/(trident)\/([\w.]+)/.exec(e)||0>e.indexOf("compatible")||[];return"version"===t?s[2]:"webkit"===t?"chrome"===s[1]||"webkit"===s[1]:"ff"===t?"firefox"===s[1]:"msie"===t?"trident"===s[1]||"msie"===s[1]:s[1]===t},J=t=>{const e={},s=t.substr(1).split("&");for(let t=0;s.length>t;t+=1){const i=s[t].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return e},Z=(t,e=400,s=345)=>{if(!(0,m.PX)(t))return t;const i=document.createElement("a"),o=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;i.href=t,e||(e=400),s||(s=345);const n=i.protocol||"";switch(i.hostname){case"www.vimeo.com":case"vimeo.com":return o.test(t)?t.replace(o,'<iframe width="'+e+'" height="'+s+'" src="'+n+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):t;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":{const o=i.search?J(i.search):{v:i.pathname.substr(1)};return o.v?'<iframe width="'+e+'" height="'+s+'" src="'+n+"//www.youtube.com/embed/"+o.v+'" frameborder="0" allowfullscreen></iframe>':t}}return t},Q=t=>{if("undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(t.metaKey&&!t.altKey)return!0}else if(t.ctrlKey&&!t.altKey)return!0;return!1};var tt=s(11),et=s(26);function st(t,e){let s,i,o;if((0,m.kJ)(t)){for(s=t.length,o=0;s>o;o+=1)if(!1===e.call(t[o],o,t[o]))return!1}else for(i=Object.keys(t),o=0;i.length>o;o+=1)if(!1===e.call(t[i[o]],i[o],t[i[o]]))return!1;return!0}const it=t=>{if(/^[0-9.]+$/.test(""+t))return parseFloat(t);const e=t.substr(-2,2).toUpperCase(),s=["KB","MB","GB","TB"],i=parseFloat(t.substr(0,t.length-2));return-1!==s.indexOf(e)?i*Math.pow(1024,s.indexOf(e)+1):parseInt(t,10)},ot=(t,e)=>{const s=[],i=encodeURIComponent;for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const n=e?e+"["+o+"]":o,r=t[o];s.push((0,m.PO)(r)?ot(r,n):i(n)+"="+i(r))}return s.join("&")},nt=(t,e,s)=>{let i=t.getBoundingClientRect(),o=t;const n=i.top,r=i.height;do{if(o&&o.parentNode){if(o=o.parentNode,i=o.getBoundingClientRect(),n>i.bottom)return!1;if(i.top>=n+r)return!1}}while(o&&o!==e&&o.parentNode);return(s.documentElement&&s.documentElement.clientHeight||0)>=n},rt=(t,e,s)=>{nt(t,e,s)||(e.clientHeight!==e.scrollHeight&&(e.scrollTop=t.offsetTop),nt(t,e,s)||t.scrollIntoView())},at=(t,e,s)=>{const i=t.querySelector(e);return i?(s&&(i.value=s),i.value):""}},(t,e,s)=>{"use strict";s.d(e,{lI:()=>m,Lj:()=>n.Lj,RE:()=>n.RE,C6:()=>n.C6,H5:()=>i,U2:()=>r.U,gj:()=>f,kc:()=>p,XP:()=>n.XP,po:()=>n.po,Q8:()=>o,MN:()=>n.MN,u3:()=>n.u3,mc:()=>n.mc,t8:()=>d});const i=console;function o(t,e=[""],s=null){return(...o)=>(i.warn(`Method "${e[0]}" deprecated.`+(e[1]?` Use "${e[1]}" instead`:"")),t.call(s,...o))}var n=s(10),r=s(22),a=s(5),l=s(19),c=s(7),h=s(16);function d(t,e,s){if(!(0,a.H)(t)||!t.length)return;const i=t.split(".");let o=s,n=i[0];for(let t=0;i.length-1>t;t+=1)n=i[t],(0,c.k)(o[n])||(0,h.PO)(o[n])||(o[n]=(0,l.k)(i[t+1])?[]:{}),o=o[n];o&&(o[i[i.length-1]]=e)}var u=s(6);const p=new Map,f=t=>{var e;if((0,u.m)(t.className))return t.className();const s=(null===(e=t.constructor)||void 0===e?void 0:e.originalConstructor)||t.constructor;if(p.has(s))return p.get(s);if(s.name)return s.name;const i=(""+s).match(/^\s*function\s*(\S*)\s*\(/);return i?i[1]:""};class m{constructor(t){this.limit=t,this.stack=[]}push(t){return this.stack.push(t),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(t){return this.stack.find(t)}}},(t,e,s)=>{"use strict";s.d(e,{RE:()=>l,Lj:()=>c,MN:()=>h,C6:()=>d,mc:()=>p,po:()=>f,XP:()=>m,u3:()=>g});var i=s(6),o=s(21),n=s(22),r=s(11),a=s(18);function l(t,...e){return t(...e)}function c(t,e,s){if(!t||!(0,i.m)(t.getAttribute))return null;if(/^-/.test(e)){const s=c(t,"data"+e);if(s)return s;e=e.substr(1)}if(void 0!==s){if(null!=s)return t.setAttribute(e,""+s),""+s;t.hasAttribute(e)&&t.removeAttribute(e)}return t.getAttribute(e)}function h(t,e){c(e,"data-editor_id",t.id),!e.component&&Object.defineProperty(e,"jodit",{value:t})}function d(t,e){return(0,o.t)(t)?t.finally(e):e()}const u={},p=t=>{var e,s;if(!(t in u)){const s=document.createElement("iframe");try{if(s.src="about:blank",document.body.appendChild(s),!s.contentWindow)return null;const o=(0,n.U)(t,s.contentWindow),r=(0,n.U)(t.split(".").slice(0,-1).join("."),s.contentWindow);(0,i.m)(o)&&(u[t]=o.bind(r))}catch(t){}finally{null===(e=s.parentNode)||void 0===e||e.removeChild(s)}}return null!==(s=u[t])&&void 0!==s?s:null},f=(t,e)=>e.async.promise(((s,i)=>{const o=new Image,n=()=>{e.e.off(o),null==i||i()},r=()=>{e.e.off(o),s(o)};e.e.one(o,"load",r).one(o,"error",n).one(o,"abort",n),o.src=t,o.complete&&r()})),m=(t,e=!0)=>{if(e)return Object.keys(t);const s=[];for(const e in t)s.push(e);return s},g=(t,e,{control:s},i)=>{const o="button"+s.command;let n=s.args&&s.args[0]||(0,r.q)(t,o);if((0,a.n)(n))return!1;(0,r.q)(t,o,n),i&&(n=i(n)),t.execCommand(s.command,!1,n||void 0)}},(t,e,s)=>{"use strict";s.d(e,{q:()=>r});var i=s(12),o=s(16);const n=new WeakMap,r=(t,e,s)=>{let r=n.get(t);if(!r){r={},n.set(t,r);let e=null;t instanceof i.Hr&&(e=t.j.e),(0,o.f2)(t)&&(e=t.e),e&&e.on("beforeDestruct",(()=>{n.delete(t)}))}return void 0===s?r[e]:(r[e]=s,s)}},(t,e,s)=>{"use strict";var i;s.d(e,{wA:()=>a,n$:()=>i,Hr:()=>l}),(t=>{t.beforeInit="beforeInit",t.ready="ready",t.beforeDestruct="beforeDestruct",t.destructed="destructed"})(i||(i={}));var o=s(8),n=s(13);const r=new Map;class a{constructor(){this.ownerWindow=window,this.__componentStatus=i.beforeInit,this.componentName="jodit-"+(0,o.kebabCase)(this.className()||(0,o.getClassName)(this)),this.uid="jodit-uid-"+(0,n.fe)()}getFullElName(t,e,s){const i=[this.componentName];return t&&(t=t.replace(/[^a-z0-9-]/gi,"-"),i.push("__"+t)),e&&(i.push("_",e),i.push("_",(0,o.isVoid)(s)?"true":""+s)),i.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(t,e){return(0,o.get)(t,e||this)}get isReady(){return this.componentStatus===i.ready}get isDestructed(){return this.componentStatus===i.destructed}get isInDestruct(){return i.beforeDestruct===this.componentStatus||i.destructed===this.componentStatus}bindDestruct(t){const e=()=>{!this.isInDestruct&&this.destruct()};return t.e&&t.e.on(i.beforeDestruct,e),this.hookStatus(i.beforeDestruct,(()=>{t.e&&t.e.off(i.beforeDestruct,e)})),this}destruct(){this.setStatus(i.destructed),r.get(this)&&r.delete(this)}get componentStatus(){return this.__componentStatus}set componentStatus(t){this.setStatus(t)}setStatus(t){return this.setStatusComponent(t,this)}setStatusComponent(t,e){if(t===this.__componentStatus)return;const s=Object.getPrototypeOf(this);s&&(0,o.isFunction)(s.setStatusComponent)&&s.setStatusComponent(t,e);const i=r.get(this),n=null==i?void 0:i[t];n&&n.length&&n.forEach((t=>t(e))),e===this&&(this.__componentStatus=t)}hookStatus(t,e){let s=r.get(this);s||(s={},r.set(this,s)),s[t]||(s[t]=[]),s[t].push(e)}}a.STATUSES=i;class l extends a{constructor(t){super(),this.setParentView(t)}get defaultTimeout(){return this.j.defaultTimeout}get j(){return this.jodit}i18n(t,...e){return this.j.i18n(t,...e)}setParentView(t){return this.jodit=t,t.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}}},(t,e,s)=>{"use strict";s.d(e,{as:()=>a,fe:()=>c,pw:()=>h,qz:()=>d,KQ:()=>u,ZO:()=>f,TB:()=>m});var i=s(14),o=s(15),n=s(8),r=s(3);const a={};let l=1;function c(){return l+=10*(Math.random()+1),Math.round(l).toString(16)}const h=new i.h,d={},u={},p=new WeakMap;function f(t,e,s="div",i=!1){const r=(0,n.getClassName)(e.prototype),a=p.get(t)||{},l=r+s,c=(0,n.isViewObject)(t)?t:t.j;if(!a[l]){let e=c.c,h=t.od.body;i&&(0,n.isJoditObject)(t)&&t.od!==t.ed&&(e=t.createInside,h="style"===s?t.ed.head:t.ed.body);const d=e.element(s,{className:`jodit jodit-${(0,n.kebabCase)(r)}-container jodit-box`});d.classList.add("jodit_theme_"+(c.o.theme||"default")),h.appendChild(d),a[l]=d,t.hookStatus("beforeDestruct",(()=>{o.i.safeRemove(d),delete a[l],Object.keys(a).length&&p.delete(t)})),p.set(t,a)}return a[l].classList.remove("jodit_theme_default","jodit_theme_dark"),a[l].classList.add("jodit_theme_"+(c.o.theme||"default")),a[l]}const m=new r.ng},(t,e,s)=>{"use strict";s.d(e,{h:()=>o});var i=s(8);class o{constructor(){this.items=new Map}normalizeName(t){return(0,i.kebabCase)(t).toLowerCase()}add(t,e){this.items.set(this.normalizeName(t),e)}get(t){return this.items.get(this.normalizeName(t))}remove(t){this.items.delete(this.normalizeName(t))}init(t){const e=t.o.extraPlugins.map((t=>(0,i.isString)(t)?{name:t}:t)),s=(0,i.splitArray)(t.o.disablePlugins).map((t=>this.normalizeName(t))),n=[],r={},a=[],l={},c=(e,c)=>{var h;if(s.includes(c)||n.includes(c)||r[c])return;const d=null===(h=e)||void 0===h?void 0:h.requires;if(d&&(0,i.isArray)(d)&&this.hasDisabledRequires(s,d))return;const u=o.makePluginInstance(t,e);this.initOrWait(t,c,u,n,r),a.push(u),l[c]=u},h=this.loadExtras(t,e);return(0,i.callPromise)(h,(()=>{t.isInDestruct||(this.items.forEach(c),this.addListenerOnBeforeDestruct(t,a),t.__plugins=l)}))}hasDisabledRequires(t,e){return!(!(null==e?void 0:e.length)||!t.some((t=>e.includes(t))))}static makePluginInstance(t,e){return(0,i.isFunction)(e)?new e(t):e}initOrWait(t,e,s,n,r){const a=(e,s)=>{if((0,i.isInitable)(s)){const i=s.requires;if((null==i?void 0:i.length)&&!i.every((t=>n.includes(t))))return r[e]=s,!1;s.init(t),n.push(e)}else n.push(e);return s.hasStyle&&o.loadStyle(t,e),!0};a(e,s),Object.keys(r).forEach((t=>{const e=r[t];e&&a(t,e)&&(r[t]=void 0,delete r[t])}))}addListenerOnBeforeDestruct(t,e){t.e.on("beforeDestruct",(()=>{e.forEach((e=>{(0,i.isDestructable)(e)&&e.destruct(t)})),e.length=0,delete t.__plugins}))}load(t,e){return Promise.all(e.map((e=>{const s=e.url||o.getFullUrl(t,e.name,!0);return(0,i.appendScriptAsync)(t,s).then((t=>({v:t,status:"fulfilled"})),(t=>({e:t,status:"rejected"})))})))}static async loadStyle(t,e){const s=o.getFullUrl(t,e,!1);if(!this.styles.has(s))return this.styles.add(s),(0,i.appendStyleAsync)(t,s)}static getFullUrl(t,e,s){return e=(0,i.kebabCase)(e),t.basePath+"plugins/"+e+"/"+e+"."+(s?"js":"css")}loadExtras(t,e){if(e&&e.length)try{const s=e.filter((t=>!this.items.has(this.normalizeName(t.name))));if(s.length)return this.load(t,s)}catch(t){}}}o.styles=new Set},(t,e,s)=>{"use strict";s.d(e,{i:()=>n});var i=s(2),o=s(8);class n{static detach(t){for(;t.firstChild;)t.removeChild(t.firstChild)}static wrapInline(t,e,s){let i,r=t,a=t;s.s.save();let l=!1;do{l=!1,i=r.previousSibling,i&&!n.isBlock(i)&&(l=!0,r=i)}while(l);do{l=!1,i=a.nextSibling,i&&!n.isBlock(i)&&(l=!0,a=i)}while(l);const c=(0,o.isString)(e)?s.createInside.element(e):e;r.parentNode&&r.parentNode.insertBefore(c,r);let h=r;for(;h&&(h=r.nextSibling,c.appendChild(r),r!==a&&h);)r=h;return s.s.restore(),c}static wrap(t,e,s){const i=(0,o.isString)(e)?s.element(e):e;if(!t.parentNode)throw(0,o.error)("Element should be in DOM");return t.parentNode.insertBefore(i,t),i.appendChild(t),i}static unwrap(t){const e=t.parentNode;if(e){for(;t.firstChild;)e.insertBefore(t.firstChild,t);n.safeRemove(t)}}static each(t,e){let s=t.firstChild;if(s)for(;s;){const i=n.next(s,Boolean,t);if(!1===e(s))return!1;if(s.parentNode&&!n.each(s,e))return!1;s=i}return!0}static between(t,e,s){let i=t;for(;i&&i!==e&&(t===i||!s(i));){let t=i.firstChild||i.nextSibling;if(!t){for(;i&&!i.nextSibling;)i=i.parentNode;t=null==i?void 0:i.nextSibling}i=t}}static replace(t,e,s,i=!1,n=!1){const r=(0,o.isString)(e)?s.element(e):e;if(!n)for(;t.firstChild;)r.appendChild(t.firstChild);return i&&(0,o.toArray)(t.attributes).forEach((t=>{r.setAttribute(t.name,t.value)})),t.parentNode&&t.parentNode.replaceChild(r,t),r}static isEmptyTextNode(t){return n.isText(t)&&(!t.nodeValue||0===t.nodeValue.replace(i.INVISIBLE_SPACE_REG_EXP(),"").length)}static isEmpty(t,e=/^(img|svg|canvas|input|textarea|form)$/){return!t||(n.isText(t)?null==t.nodeValue||0===(0,o.trim)(t.nodeValue).length:!e.test(t.nodeName.toLowerCase())&&n.each(t,(t=>{if(n.isText(t)&&null!=t.nodeValue&&0!==(0,o.trim)(t.nodeValue).length||n.isElement(t)&&e.test(t.nodeName.toLowerCase()))return!1})))}static isNode(t){if(!t)return!1;const e=(0,o.get)("ownerDocument.defaultView",t);return!("object"!=typeof e||!e||"function"!=typeof e.Node&&"object"!=typeof e.Node)&&t instanceof e.Node}static isCell(t){return n.isNode(t)&&/^(td|th)$/i.test(t.nodeName)}static isImage(t){return n.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)}static isBlock(t){return!(0,o.isVoid)(t)&&"object"==typeof t&&n.isNode(t)&&i.IS_BLOCK.test(t.nodeName)}static isText(t){return!(!t||t.nodeType!==Node.TEXT_NODE)}static isElement(t){var e;return!!n.isNode(t)&&!(!(null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||t.nodeType!==Node.ELEMENT_NODE)}static isHTMLElement(t){var e;if(!n.isNode(t))return!1;const s=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(s&&t instanceof s.HTMLElement)}static isInlineBlock(t){return n.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&-1!==["inline","inline-block"].indexOf(""+(0,o.css)(t,"display"))}static canSplitBlock(t){return!(0,o.isVoid)(t)&&n.isHTMLElement(t)&&n.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)}static last(t,e){let s=null==t?void 0:t.lastChild;if(!s)return null;do{if(e(s))return s;let i=s.lastChild;if(i||(i=s.previousSibling),!i&&s.parentNode!==t){do{s=s.parentNode}while(s&&!(null==s?void 0:s.previousSibling)&&s.parentNode!==t);i=null==s?void 0:s.previousSibling}s=i}while(s);return null}static prev(t,e,s,i=!0){return n.find(t,e,s,!1,"previousSibling",!!i&&"lastChild")}static next(t,e,s,i=!0){return n.find(t,e,s,void 0,void 0,!!i&&"firstChild")}static prevWithClass(t,e){return n.prev(t,(t=>n.isElement(t)&&t.classList.contains(e)),t.parentNode)}static nextWithClass(t,e){return n.next(t,(t=>n.isElement(t)&&t.classList.contains(e)),t.parentNode)}static find(t,e,s,i=!1,o="nextSibling",r="firstChild"){if(i&&e(t))return t;let a,l=t;do{if(a=l[o],e(a))return a||null;if(r&&a&&a[r]){const t=n.find(a[r],e,a,!0,o,r);if(t)return t}a||(a=l.parentNode),l=a}while(l&&l!==s);return null}static findWithCurrent(t,e,s,i="nextSibling",o="firstChild"){let r=t;do{if(e(r))return r||null;if(o&&r&&r[o]){const t=n.findWithCurrent(r[o],e,r,i,o);if(t)return t}for(;r&&!r[i]&&r!==s;)r=r.parentNode;r&&r[i]&&r!==s&&(r=r[i])}while(r&&r!==s);return null}static findSibling(t,e=!0,s=(t=>!n.isEmptyTextNode(t))){const i=t=>e?t.previousSibling:t.nextSibling;let o=i(t);for(;o&&!s(o);)o=i(o);return o&&s(o)?o:null}static up(t,e,s,i=!1){let o=t;if(!o)return null;do{if(e(o))return o;if(o===s||!o.parentNode)break;o=o.parentNode}while(o&&o!==s);return o===s&&i&&e(o)?o:null}static closest(t,e,s){let i;return i=(0,o.isFunction)(e)?e:(0,o.isArray)(e)?t=>t&&e.includes(t.nodeName.toLowerCase()):t=>t&&e===t.nodeName.toLowerCase(),n.up(t,i,s)}static furthest(t,e,s){let i=null,o=null==t?void 0:t.parentElement;for(;o&&o!==s&&e(o);)i=o,o=null==o?void 0:o.parentElement;return i}static appendChildFirst(t,e){const s=t.firstChild;s?s!==e&&t.insertBefore(e,s):t.appendChild(e)}static after(t,e){const{parentNode:s}=t;s&&(s.lastChild===t?s.appendChild(e):s.insertBefore(e,t.nextSibling))}static before(t,e){const{parentNode:s}=t;s&&s.insertBefore(e,t)}static prepend(t,e){t.insertBefore(e,t.firstChild)}static append(t,e){(0,o.isArray)(e)?e.forEach((e=>{this.append(t,e)})):t.appendChild(e)}static moveContent(t,e,s=!1){const i=(t.ownerDocument||document).createDocumentFragment();(0,o.toArray)(t.childNodes).forEach((t=>{i.appendChild(t)})),s&&e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}static all(t,e,s=!1){let i=t.childNodes?(0,o.toArray)(t.childNodes):[];return e(t)?t:(s&&(i=i.reverse()),i.forEach((t=>{n.all(t,e,s)})),null)}static isOrContains(t,e,s=!1){return t===e?!s:!!(e&&t&&this.up(e,(e=>e===t),t,!0))}static safeRemove(t){t&&t.parentNode&&t.parentNode.removeChild(t)}static hide(t){t&&((0,o.dataBind)(t,"__old_display",t.style.display),t.style.display="none")}static show(t){if(!t)return;const e=(0,o.dataBind)(t,"__old_display");"none"===t.style.display&&(t.style.display=e||"")}static isTag(t,e){const s=(0,o.asArray)(e).map(String);for(let e=0;s.length>e;e+=1)if(this.isElement(t)&&t.tagName.toLowerCase()===s[e].toLowerCase())return!0;return!1}}},(t,e,s)=>{"use strict";function i(){let t=!0;try{const e=document.createElement("input");e.type="color",t="color"===e.type&&"number"!=typeof e.selectionStart}catch(e){t=!1}return t}s.d(e,{EO:()=>i,Zt:()=>v,kJ:()=>o.k,jn:()=>n,Z$:()=>g,Xy:()=>a,LP:()=>l,mf:()=>c.m,FP:()=>d,I4:()=>u,Gu:()=>m,GN:()=>w,Zu:()=>C,A1:()=>x,QC:()=>E.Q,hj:()=>S,kE:()=>b.k,PO:()=>k,tI:()=>T.t,HD:()=>h.H,PX:()=>I,r1:()=>q,f2:()=>j,nj:()=>f.n,FJ:()=>_});var o=s(7);function n(t){return"boolean"==typeof t}var r=s(17);function a(t,e){return t===e||(0,r.P)(t)===(0,r.P)(e)}function l(t,e){return t===e}var c=s(6),h=s(5);const d=t=>(0,h.H)(t)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(t.replace(/[\r\n]/g,""));function u(t){return-1!==t.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==t.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==t.search(/style="[^"]*mso-/)&&-1!==t.search(/<font/)}var p=s(15),f=s(18);function m(t){return!(0,f.n)(t)&&(0,c.m)(t.init)}function g(t){return!(0,f.n)(t)&&(0,c.m)(t.destruct)}function v(t){return!(0,f.n)(t)&&p.i.isElement(t.container)}var b=s(19);function w(t){return(0,h.H)(t)&&(0,b.k)(t)&&(t=parseFloat(t)),"number"==typeof t&&Number.isFinite(t)&&!(t%1)}var y=s(13);function C(t){return!!(t&&t instanceof Object&&(0,c.m)(t.constructor)&&("undefined"!=typeof Jodit&&t instanceof Jodit||t.isJodit))}function j(t){return!!(t&&t instanceof Object&&(0,c.m)(t.constructor)&&(t instanceof y.qz.View||t.isView))}const x=t=>(0,h.H)(t)&&23===t.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(t);var E=s(20);function S(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function _(t){return null!=t&&t===t.window}function k(t){return!(!t||"object"!=typeof t||t.nodeType||_(t)||t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))}var T=s(21);function I(t){if(t.includes(" "))return!1;if("undefined"!=typeof URL)try{const e=new URL(t);return["https:","http:","ftp:","file:","rtmp:"].includes(e.protocol)}catch(t){return!1}const e=document.createElement("a");return e.href=t,!!e.hostname}function q(t){return!!t.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_.]/.test(t)}},(t,e,s)=>{"use strict";function i(t,e={}){if("object"!=typeof t)return t+"";const s=new Set(e.excludeKeys),i=new WeakMap;return JSON.stringify(t,((t,e)=>{if(!s.has(t)){if("object"==typeof e&&null!=e){if(i.get(e))return"[refObject]";i.set(e,!0)}return e}}),e.prettify)}s.d(e,{P:()=>i})},(t,e,s)=>{"use strict";function i(t){return null==t}s.d(e,{n:()=>i})},(t,e,s)=>{"use strict";s.d(e,{k:()=>o});var i=s(5);function o(t){if((0,i.H)(t)){if(!t.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;t=parseFloat(t)}return"number"==typeof t&&!isNaN(t)&&isFinite(t)}},(t,e,s)=>{"use strict";function i(t){return!!t&&"function"===(typeof t).toLowerCase()&&(t===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(t+""))}s.d(e,{Q:()=>i})},(t,e,s)=>{"use strict";function i(t){return t&&"function"==typeof t.then}s.d(e,{t:()=>i})},(t,e,s)=>{"use strict";s.d(e,{U:()=>n});var i=s(5),o=s(18);function n(t,e){if(!(0,i.H)(t)||!t.length)return null;const s=t.split(".");let n=e;for(const t of s){if((0,o.n)(n[t]))return null;n=n[t]}return(0,o.n)(n)?null:n}},(t,e,s)=>{"use strict";s.d(e,{q:()=>n});var i=s(10),o=s(20);const n=(...t)=>{var e;return((0,o.Q)(Array.from)?Array.from:null!==(e=(0,i.mc)("Array.from"))&&void 0!==e?e:Array.from).apply(Array,t)}},(t,e,s)=>{"use strict";s.d(e,{h:()=>i});const i=t=>{if("rgba(0, 0, 0, 0)"===t||""===t)return!1;if(!t)return"#000000";if("#"===t.substr(0,1))return t;const e=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(t);if(!e)return"#000000";const s=parseInt(e[2],10),i=parseInt(e[3],10);let o=(parseInt(e[4],10)|i<<8|s<<16).toString(16).toUpperCase();for(;6>o.length;)o="0"+o;return e[1]+"#"+o}},(t,e,s)=>{"use strict";s.d(e,{eV:()=>i,ag:()=>m,GL:()=>n,gB:()=>f,Pz:()=>o.P,fy:()=>a,as:()=>l,Ps:()=>c});const i=t=>t.replace(/([-_])(.)/g,((t,e,s)=>s.toUpperCase()));var o=s(17);const n=t=>t.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase();var r=s(2);function a(t){return t.replace((0,r.SPACE_REG_EXP_END)(),"").replace((0,r.SPACE_REG_EXP_START)(),"")}function l(t){return t.replace((0,r.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,r.INVISIBLE_SPACE_REG_EXP_START)(),"")}const c=t=>t.length?t[0].toUpperCase()+t.substr(1):"";var h=s(1),d=s(26),u=s(8),p=s(13);const f=(t,e)=>{if(!e||!e.length)return t;const s=/%([sd])/g;let i=s.exec(t),o=t,n=0;for(;i&&void 0!==e[n];)o=o.replace(i[0],""+e[n]),n+=1,i=s.exec(t);return o},m=(t,e,s)=>{if(!(0,u.isString)(t))throw(0,u.error)("i18n: Need string in first argument");if(!t.length)return t;const i=!(void 0===s||!s.debugLanguage);let o;const n=t=>e&&e.length?f(t,e):t,r=(0,d.X)(h.D.defaultOptions.language,h.D.defaultOptions.language),a=(0,d.X)(null==s?void 0:s.language,r),l=e=>{if(!e)return;if((0,u.isString)(e[t]))return n(e[t]);const s=t.toLowerCase();if((0,u.isString)(e[s]))return n(e[s]);const i=(0,u.ucfirst)(t);return(0,u.isString)(e[i])?n(e[i]):void 0};o=void 0!==p.KQ[a]?p.KQ[a]:void 0!==p.KQ[r]?p.KQ[r]:p.KQ.en;const c=null==s?void 0:s.i18n;if(c&&c[a]){const t=l(c[a]);if(t)return t}return l(o)||(p.KQ.en&&(0,u.isString)(p.KQ.en[t])&&p.KQ.en[t]?n(p.KQ.en[t]):i?"{"+t+"}":n(t))}},(t,e,s)=>{"use strict";s.d(e,{X:()=>o});var i=s(16);const o=(t,e="en")=>"auto"!==t&&(0,i.HD)(t)?t:document.documentElement&&document.documentElement.lang?document.documentElement.lang:navigator.language?navigator.language.substr(0,2):e},(t,e,s)=>{"use strict";s.d(e,{zx:()=>o.zx,JO:()=>h.J,GI:()=>n.G,ko:()=>u,eC:()=>c.eC,y3:()=>o.y3,mA:()=>c.mA,u1:()=>i.u,Z:()=>c.Z,x4:()=>c.x4,qe:()=>a.q,u3:()=>c.u3,bz:()=>l.b,lU:()=>r.l,GJ:()=>c.GJ});var i=s(28),o=s(33),n=s(42),r=s(40),a=s(38),l=s(34),c=s(43),h=s(30),d=s(15);class u extends i.u{className(){return"ProgressBar"}render(){return"<div><div></div></div>"}show(){return(this.j.workplace||this.j.container).appendChild(this.container),this}hide(){return d.i.safeRemove(this.container),this}progress(t){return this.container.style.width=t.toFixed(2)+"%",this}destruct(){return this.hide(),super.destruct()}}},(t,e,s)=>{"use strict";s.d(e,{u:()=>l});var i=s(12),o=s(15),n=s(29),r=s(8),a=s(30);class l extends i.Hr{constructor(t,e){super(t),this.name="",this.__parentElement=null,this.mods={},this.container=this.createContainer(e),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}get parentElement(){return this.__parentElement}set parentElement(t){this.__parentElement=t,t&&t.hookStatus("beforeDestruct",(()=>this.destruct())),this.updateParentElement(this)}bubble(t){let e=this.parentElement;for(;e;)t(e),e=e.parentElement;return this}updateParentElement(t){var e;return null===(e=this.__parentElement)||void 0===e||e.updateParentElement(t),this}get(t,e){return super.get(t,e)||this.getElm(t)}closest(t){const e="object"==typeof t?e=>e===t:e=>e instanceof t;let s=this.__parentElement;for(;s;){if(e(s))return s;s=!s.parentElement&&s.container.parentElement?l.closestElement(s.container.parentElement,l):s.parentElement}return null}static closestElement(t,e){const s=o.i.up(t,(t=>{if(t){const{component:s}=t;return s&&s instanceof e}return!1}));return s?null==s?void 0:s.component:null}setMod(t,e,s=this.container){return n.$.setMod.call(this,t,e,s),this}getMod(t){return n.$.getMod.call(this,t)}getElm(t){return n.F.getElm.call(this,t)}getElms(t){return n.F.getElms.call(this,t)}update(){}appendTo(t){return t.appendChild(this.container),this}clearName(t){return t.replace(/[^a-zA-Z0-9]/g,"_")}render(t){return this.j.c.div(this.componentName)}createContainer(t){const e=this.render(t);if((0,r.isString)(e)){const t=this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,((t,e)=>a.J.get(e)||"")).replace(/&__/g,this.componentName+"__").replace(/~([^~]+?)~/g,((t,e)=>this.i18n(e))));return t.classList.add(this.componentName),t}return e}destruct(){return o.i.safeRemove(this.container),this.parentElement=null,super.destruct()}}},(t,e,s)=>{"use strict";s.d(e,{F:()=>o,$:()=>n});var i=s(23);class o{static getElm(t){return this.container.querySelector("."+this.getFullElName(t))}static getElms(t){return(0,i.q)(this.container.querySelectorAll("."+this.getFullElName(t)))}}class n{static setMod(t,e,s){if(t=t.toLowerCase(),this.mods[t]===e)return;const o=`${this.componentName}_${t}`,n=(s||this.container).classList;(0,i.q)(n).forEach((t=>{0===t.indexOf(o)&&n.remove(t)})),null!=e&&""!==e&&n.add(`${o}_${(""+e).toLowerCase()}`),this.mods[t]=e}static getMod(t){var e;return null!==(e=this.mods[t])&&void 0!==e?e:null}}},(t,e,s)=>{"use strict";s.d(e,{J:()=>o});var i=s(31);class o{static getIcon(t){return/<svg/i.test(t)?t:o.icons[t]||o.icons[t.replace(/-/g,"_")]||o.icons[t.toLowerCase()]}static exists(t){return void 0!==this.getIcon(t)}static get(t,e="<span></span>"){return this.getIcon(t)||e}static set(t,e){this.icons[t.replace("_","-")]=e}static makeIcon(t,e){var s;let n;if(e){const r=e.name.replace(/[^a-zA-Z0-9]/g,"_");if(e.iconURL)n=t.c.span(),(0,i.i)(n,"backgroundImage","url("+e.iconURL.replace("{basePath}",(null==t?void 0:t.basePath)||"")+")");else{const i=t.e.fire("getIcon",e.name,e,r)||o.get(e.name,"")||(null===(s=t.o.extraIcons)||void 0===s?void 0:s[e.name]);i&&(n=t.c.fromHTML(i.trim()),/^<svg/i.test(e.name)||n.classList.add("jodit-icon_"+r))}}return n&&(n.classList.add("jodit-icon"),n.style.fill=e.fill),n}}o.icons={}},(t,e,s)=>{"use strict";s.d(e,{i:()=>r,b:()=>a});var i=s(16),o=s(32),n=s(25);function r(t,e,s,a=!1){const l=/^left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size/i;if((0,i.jn)(s)&&(a=s,s=void 0),(0,i.PO)(e)||void 0!==s){const a=(t,e,s)=>{!(0,i.nj)(s)&&l.test(e)&&(0,i.kE)(""+s)&&(s=parseInt(""+s,10)+"px"),void 0===s||null!=s&&r(t,e,!0)===(0,o.Zh)(e,s)||(t.style[e]=s)};if((0,i.PO)(e)){const s=Object.keys(e);for(let i=0;s.length>i;i+=1)a(t,(0,n.eV)(s[i]),e[s[i]])}else a(t,(0,n.eV)(e),s);return""}const c=(0,n.GL)(e),h=t.ownerDocument||document,d=!!h&&(h.defaultView||h.parentWindow),u=t.style[e];let p="";return void 0!==u&&""!==u?p=u:d&&!a&&(p=d.getComputedStyle(t).getPropertyValue(c)),l.test(e)&&/^[-+]?[0-9.]+px$/.test(""+p)&&(p=parseInt(""+p,10)),(0,o.Zh)(e,p)}const a=t=>{"block"===r(t,"display")&&r(t,"display","");const{style:e}=t;"auto"===e.marginLeft&&"auto"===e.marginRight&&(e.marginLeft="",e.marginRight="")}},(t,e,s)=>{"use strict";s.d(e,{ut:()=>g,Zh:()=>m,T2:()=>n,Pd:()=>r,Tz:()=>l,AH:()=>c,Jf:()=>h,aC:()=>d,D5:()=>u});var i=s(25),o=s(2);function n(t){const e={};return t.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map((t=>(0,i.fy)(t.toLowerCase()))).map((t=>o.KEY_ALIASES[t]||t)).sort().filter((t=>!e[t]&&""!==t&&(e[t]=!0))).join("+")}const r=(t,e=8)=>{const s=[];for(;t.length;)s.push(t.substr(0,e)),t=t.substr(e);return s[1]=s[1].replace(/./g,"*"),s[2]=s[2].replace(/./g,"*"),s.join("-")};var a=s(15);const l=t=>{if(t){if(a.i.isText(t)&&null!=t.nodeValue&&t.parentNode)for(;a.i.isText(t.nextSibling);)null!=t.nextSibling.nodeValue&&(t.nodeValue+=t.nextSibling.nodeValue),t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),a.i.safeRemove(t.nextSibling);else l(t.firstChild);l(t.nextSibling)}},c=(...t)=>t.filter((t=>(0,i.fy)(t).length)).map(((e,s)=>(e=e.replace(/([^:])[\\/]+/g,"$1/"),s&&(e=e.replace(/^\//,"")),s!==t.length-1&&(e=e.replace(/\/$/,"")),e))).join("/"),h=t=>t.split("/").reduce(((t,e)=>{switch(e){case"":case".":break;case"..":t.pop();break;default:t.push(e)}return t}),[]).join("/")+(t.endsWith("/")?"/":""),d=t=>/^[0-9]+$/.test(""+t)?t+"px":""+t,u=(...t)=>t.filter((t=>t.length)).map((t=>t.replace(/\/$/,""))).join("/").replace(/([^:])[\\/]+/g,"$1/");var p=s(16),f=s(24);function m(t,e){if("font-weight"===(0,i.GL)(t)){switch((""+e).toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,p.kE)(e)?Number(e):e}return/color/i.test(t)&&/^rgb/i.test(""+e)&&(0,f.h)(""+e)||e}const g=t=>{const e=["#"];let s=(0,f.h)(t);if(!s)return!1;if(s=(0,i.fy)(s.toUpperCase()),s=s.substr(1),3===s.length){for(let t=0;3>t;t+=1)e.push(s[t]),e.push(s[t]);return e.join("")}return s.length>6&&(s=s.substr(0,6)),"#"+s}},(t,e,s)=>{"use strict";s.d(e,{zx:()=>p,y3:()=>u,Yc:()=>d});var i=s(39),o=s(28),n=s(15),r=s(8),a=s(30),l=s(34),c=s(36),h=s(12);const d=()=>({size:"middle",type:"button",name:"",value:"",status:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:""},tooltip:"",text:"",tabIndex:void 0});let u=class extends o.u{constructor(t,e){super(t),this.isButton=!0,this.state=d(),this.actionHandlers=[],this.updateSize(),this.onChangeSize(),this.onChangeStatus(),e&&this.hookStatus(h.n$.ready,(()=>{this.setState(e)}))}className(){return"UIButton"}setState(t){return Object.assign(this.state,t),this}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,r.attr)(this.container,"type",this.state.type)}updateSize(){const t=this.closest(l.b);t&&(this.state.size=t.buttonSize)}onChangeStatus(){this.setMod("status",this.state.status)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text)}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,r.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,r.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,r.attr)(this.container,"data-ref",this.state.name),(0,r.attr)(this.container,"ref",this.state.name)}onChangeTooltip(){this.get("j.o.useNativeTooltip")&&(0,r.attr)(this.container,"title",this.state.tooltip),(0,r.attr)(this.container,"aria-label",this.state.tooltip)}onChangeTabIndex(){(0,r.attr)(this.container,"tabIndex",this.state.tabIndex)}onChangeIcon(){const t=this.get("j.o.textIcons");if(!0===t||(0,r.isFunction)(t)&&t(this.state.name))return;n.i.detach(this.icon);const e=a.J.makeIcon(this.j,this.state.icon);e&&this.icon.appendChild(e)}focus(){this.container.focus()}isFocused(){const{activeElement:t}=this.od;return!(!t||!n.i.isOrContains(this.container,t))}createContainer(){const t=this.componentName,e=this.j.c.element("button",{class:t,type:"button",role:"button",ariaPressed:!1});return this.icon=this.j.c.span(t+"__icon"),this.text=this.j.c.span(t+"__text"),e.appendChild(this.icon),e.appendChild(this.text),this.j.e.on(e,"click",this.onActionFire),e}destruct(){return this.j.e.off(this.container),super.destruct()}onAction(t){return this.actionHandlers.push(t),this}onActionFire(t){t.buffer={actionTrigger:this},this.actionHandlers.forEach((e=>e.call(this,t)))}};function p(t,e,s,i){const o=new u(t);return o.state.tabIndex=t.o.allowTabNavigation?0:-1,(0,r.isString)(e)?(o.state.icon.name=e,o.state.name=e,i&&(o.state.status=i),s&&(o.state.text=s)):o.setState(e),o}(0,i.gn)([(0,c.watch)("state.size")],u.prototype,"onChangeSize",null),(0,i.gn)([(0,c.watch)("state.type")],u.prototype,"onChangeType",null),(0,i.gn)([(0,c.watch)("parentElement")],u.prototype,"updateSize",null),(0,i.gn)([(0,c.watch)("state.status")],u.prototype,"onChangeStatus",null),(0,i.gn)([(0,c.watch)("state.text")],u.prototype,"onChangeText",null),(0,i.gn)([(0,c.watch)("state.text")],u.prototype,"onChangeTextSetMode",null),(0,i.gn)([(0,c.watch)("state.disabled")],u.prototype,"onChangeDisabled",null),(0,i.gn)([(0,c.watch)("state.activated")],u.prototype,"onChangeActivated",null),(0,i.gn)([(0,c.watch)("state.name")],u.prototype,"onChangeName",null),(0,i.gn)([(0,c.watch)("state.tooltip")],u.prototype,"onChangeTooltip",null),(0,i.gn)([(0,c.watch)("state.tabIndex")],u.prototype,"onChangeTabIndex",null),(0,i.gn)([(0,c.watch)("state.icon")],u.prototype,"onChangeIcon",null),(0,i.gn)([c.autobind],u.prototype,"onActionFire",null),u=(0,i.gn)([c.component],u);var f=s(38);let m=class extends f.q{constructor(t,e={radio:!0}){var s,i;super(t,null===(s=e.options)||void 0===s?void 0:s.map((e=>{const s=new u(t,{text:e.text,value:e.value,status:"primary"});return s.onAction((()=>{this.select(e.value)})),s})),e),this.options=e,this.select(null!==(i=e.value)&&void 0!==i?i:0)}className(){return"UIButtonGroup"}render(t){return`<div>\n\t\t\t<div class="&__label">~${t.label}~</div>\n\t\t\t<div class="&__options"></div>\n\t\t</div>`}appendChildToContainer(t){this.getElm("options").appendChild(t)}select(t){var e,s;this.elements.forEach(((e,s)=>{s===t||e.state.value===t?e.state.activated=!0:this.options.radio&&(e.state.activated=!1)}));const i=this.elements.filter((t=>t.state.activated)).map((t=>({text:t.state.text,value:t.state.value})));this.jodit.e.fire(this,"select",i),null===(s=(e=this.options).onChange)||void 0===s||s.call(e,i)}};m=(0,i.gn)([c.component],m)},(t,e,s)=>{"use strict";s.d(e,{b:()=>p});var i=s(39),o=s(33),n=s(35),r=s(1),a=s(16),l=s(8),c=s(36),h=s(38),d=s(40),u=s(41);let p=class extends h.q{constructor(t){super(t),this.mode="horizontal",this.removeButtons=[],this.onChangeMode()}className(){return"UIList"}onChangeMode(){this.setMod("mode",this.mode)}makeGroup(){return new h.q(this.jodit)}get buttons(){return this.allChildren.filter((t=>t instanceof o.y3))}getButtonsNames(){return this.buttons.map((t=>t instanceof o.y3&&t.state.name||"")).filter((t=>""!==t))}setRemoveButtons(t){return this.removeButtons=t||[],this}build(t,e=null){t=(0,l.splitArray)(t),this.clear();let s,i=!1,o=this.makeGroup();this.append(o);const c=t=>{let n=null;switch(t.name){case"\n":o=this.makeGroup(),s=this.makeGroup(),o.append(s),this.append(o);break;case"|":i||(i=!0,n=new d.l(this.j));break;default:i=!1,n=this.makeButton(t,e)}n&&(s||(s=this.makeGroup(),o.append(s)),s.append(n))},h=t=>!this.removeButtons.includes(t.name);return t.forEach((t=>{if((0,u.A)(t)){const e=t.buttons.filter((t=>t));e.length&&(s=this.makeGroup(),o.append(s),s.setMod("separated",!0).setMod("group",t.group),((t,e)=>((0,a.kJ)(t)?t:(0,l.keys)(t,!1).map((e=>(0,l.ConfigProto)({name:e},t[e]||{})))).map((t=>(0,n.Y)(t,e||r.D.defaultOptions.controls))))(e,this.j.o.controls).filter(h).forEach(c))}else{const e=(0,n.Y)(t,this.j.o.controls);h(e)&&c(e)}})),this.update(),this}makeButton(t,e){return new o.y3(this.j)}};(0,i.gn)([(0,c.watch)("mode")],p.prototype,"onChangeMode",null),p=(0,i.gn)([c.component],p)},(t,e,s)=>{"use strict";s.d(e,{Y:()=>n,z:()=>r});var i=s(8),o=s(1);function n(t,e){let s;return e||(e=o.D.defaultOptions.controls),(0,i.isString)(t)?s=r(t,e)||{name:t,command:t,tooltip:t}:(s={name:"empty",...(0,i.ConfigFlatten)(t)},void 0!==e[s.name]&&(s={...(0,i.ConfigFlatten)(e[s.name]),...(0,i.ConfigFlatten)(s)})),s}function r(t,e){let[s,o]=t.split(/\./),n=e;return null!=o?void 0!==e[s]&&(n=e[s]):o=s,n[o]?{name:o,...(0,i.ConfigFlatten)(n[o])}:void 0}},(t,e,s)=>{"use strict";s.r(e),s.d(e,{autobind:()=>b.ZP,cache:()=>o,component:()=>r,debounce:()=>l,getPropertyDescriptor:()=>g,hook:()=>d,idle:()=>h,nonenumerable:()=>u,persistent:()=>p,throttle:()=>c,wait:()=>f,watch:()=>v});var i=s(8);function o(t,e,s){const o=s.get;if(!o)throw(0,i.error)("Getter property descriptor expected");s.get=function(){const t=o.call(this);return t&&!0===t.noCache||Object.defineProperty(this,e,{configurable:s.configurable,enumerable:s.enumerable,writable:!1,value:t}),t}}const n=t=>(0,i.isFunction)(t.className)?t.className():NaN;function r(t){class e extends t{constructor(...t){super(...t);const s=Object.getPrototypeOf(this)===e.prototype,i=n(this)===n(e.prototype);(s||i)&&this.setStatus("ready")}}return e.prototype.constructor=t,e}var a=s(12);function l(t,e=!1,s="debounce"){return(o,n)=>{if(!(0,i.isFunction)(o[n]))throw(0,i.error)("Handler must be a Function");o.hookStatus(a.n$.ready,(o=>{const r=(0,i.isViewObject)(o)?o:o.jodit,a=(0,i.isFunction)(t)?t(o):t;o[n]=r.async[s](o[n].bind(o),(0,i.isNumber)(a)||(0,i.isPlainObject)(a)?a:r.defaultTimeout,e)}))}}function c(t,e=!1){return l(t,e,"throttle")}function h(){return(t,e)=>{if(!(0,i.isFunction)(t[e]))throw(0,i.error)("Handler must be a Function");t.hookStatus(a.n$.ready,(t=>{const s=(0,i.isViewObject)(t)?t:t.jodit,o=t[e];t[e]=(...e)=>s.async.requestIdleCallback(o.bind(t,...e))}))}}function d(t){return(e,s)=>{if(!(0,i.isFunction)(e[s]))throw(0,i.error)("Handler must be a Function");e.hookStatus(t,(t=>{e[s].call(t)}))}}const u=(t,e)=>{!1!==(Object.getOwnPropertyDescriptor(t,e)||{}).enumerable&&Object.defineProperty(t,e,{enumerable:!1,set(t){Object.defineProperty(this,e,{enumerable:!1,writable:!0,value:t})}})};function p(t,e){t.hookStatus(a.n$.ready,(t=>{const s=(0,i.isViewObject)(t)?t:t.jodit,o=`${s.options.namespace}${t.componentName}_prop_${e}`,n=t[e];Object.defineProperty(t,e,{get(){var t;return null!==(t=s.storage.get(o))&&void 0!==t?t:n},set(t){s.storage.set(o,t)}})}))}function f(t){return(e,s)=>{if(!(0,i.isFunction)(e[s]))throw(0,i.error)("Handler must be a Function");e.hookStatus(a.n$.ready,(e=>{const o=(0,i.isViewObject)(e)?e.async:e.j.async,n=e[s];let r=0;e[s]=function s(...i){o.clearTimeout(r),t(e)?n.apply(e,i):r=o.setTimeout((()=>s(...i)),10)}}))}}var m=s(3);function g(t,e){let s;do{s=Object.getOwnPropertyDescriptor(t,e),t=Object.getPrototypeOf(t)}while(!s&&t);return s}function v(t,e){return(s,o)=>{if(!(0,i.isFunction)(s[o]))throw(0,i.error)("Handler must be a Function");const n=n=>{const r=(t,...e)=>{if(!n.isInDestruct)return n[o](t,...e)};(0,i.splitArray)(t).forEach((t=>{if(/:/.test(t)){const[s,o]=t.split(":"),a=(0,i.isViewObject)(n)?n:n.jodit;return s.length&&(e=n.get(s)),(0,i.isFunction)(e)&&(e=e(n)),a.events.on(e||n,o,r),e||a.events.on(o,r),void a.hookStatus("beforeDestruct",(()=>{a.events.off(e||n,o,r).off(o,r)}))}const o=t.split("."),[a]=o;let l=n[a];if(l instanceof m.P5)l.on("change."+t,r);else if((0,i.isPlainObject)(l)&&o.length>1){const e=m.P5.create(l,[a]);e.on("change."+t,r),n[a]=e}else{const e=g(s,a);Object.defineProperty(n,a,{configurable:!0,set(s){const o=l;o!==s&&(l=s,e&&e.set&&e.set.call(n,s),(0,i.isPlainObject)(l)&&(l=m.P5.create(l,[a]),l.on("change."+t,r)),r(a,o,l))},get(){return e&&e.get?e.get.call(n):l}})}}))};(0,i.isFunction)(s.hookStatus)?s.hookStatus(a.n$.ready,n):n(s)}}var b=s(37)},(t,e)=>{"use strict";function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t=>typeof t:t=>t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t,s(t)}function i(t,e,i){var o=i.value;if("function"!=typeof o)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(s(o)));var n=!1;return{configurable:!0,get(){if(n||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof o)return o;var s=o.bind(this);return n=!0,Object.defineProperty(this,e,{configurable:!0,get:()=>s,set(t){o=t,delete this[e]}}),n=!1,s},set(t){o=t}}}function o(t){var e;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype)))),e.forEach((e=>{if("constructor"!==e){var s=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof s.value&&Object.defineProperty(t.prototype,e,i(t,e,s))}})),t}e.ZP=function(){return 1===arguments.length?o.apply(void 0,arguments):i.apply(void 0,arguments)}},(t,e,s)=>{"use strict";s.d(e,{q:()=>c});var i,o=s(39),n=s(28),r=s(36),a=s(8),l=s(15);let c=i=class extends n.u{constructor(t,e,s){super(t,s),this.syncMod=!1,this.elements=[],this.buttonSize="middle",null==e||e.forEach((t=>t&&this.append(t))),(null==s?void 0:s.name)&&(this.name=s.name)}className(){return"UIGroup"}get allChildren(){const t=[],e=[...this.elements];for(;e.length;){const s=e.shift();(0,a.isArray)(s)?e.push(...s):s instanceof i?e.push(...s.elements):s&&t.push(s)}return t}update(){this.elements.forEach((t=>t.update())),this.setMod("size",this.buttonSize)}append(t,e){return(0,a.isArray)(t)?(t.forEach((t=>this.append(t))),this):(this.elements.push(t),t.name&&t.container.classList.add(this.getFullElName(t.name)),e?this.getElm(e).appendChild(t.container):this.appendChildToContainer(t.container),t.parentElement=this,t.update(),this)}setMod(t,e){return this.syncMod&&this.elements.forEach((s=>s.setMod(t,e))),super.setMod(t,e)}appendChildToContainer(t){this.container.appendChild(t)}remove(t){const e=this.elements.indexOf(t);return-1!==e&&(this.elements.splice(e,1),l.i.safeRemove(t.container),t.parentElement=null),this}clear(){return this.elements.forEach((t=>t.destruct())),this.elements.length=0,this}destruct(){return this.clear(),super.destruct()}};(0,o.gn)([(0,r.watch)("buttonSize")],c.prototype,"update",null),c=i=(0,o.gn)([r.component],c)},(t,e)=>{"use strict";e.cu=e.gn=e.pi=void 0,e.pi=function(){return e.pi=Object.assign||function(t){for(var e,s=1,i=arguments.length;i>s;s++)for(var o in e=arguments[s])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.pi.apply(this,arguments)},e.gn=function(t,e,s,i){var o,n=arguments.length,r=3>n?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(3>n?o(r):n>3?o(e,s,r):o(e,s))||r);return n>3&&r&&Object.defineProperty(e,s,r),r},e.cu=Object.create?(t,e,s,i)=>{void 0===i&&(i=s),Object.defineProperty(t,i,{enumerable:!0,get:()=>e[s]})}:(t,e,s,i)=>{void 0===i&&(i=s),t[i]=e[s]}},(t,e,s)=>{"use strict";s.d(e,{l:()=>r});var i=s(39),o=s(28),n=s(36);let r=class extends o.u{className(){return"UISeparator"}};r=(0,i.gn)([n.component],r)},(t,e,s)=>{"use strict";s.d(e,{A:()=>o,q:()=>n});var i=s(16);const o=t=>(0,i.kJ)(t.buttons),n=t=>new Set(t.reduce(((t,e)=>(o(e)?t.push(...e.buttons):t.push(e),t)),[]))},(t,e,s)=>{"use strict";s.d(e,{G:()=>c});var i=s(39),o=s(15),n=s(8),r=s(13),a=s(28),l=s(36);class c extends a.u{constructor(t,e=!0){super(t),this.smart=e,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,n.attr)(this.container,"role","popup")}className(){return"Popup"}updateParentElement(t){return t!==this&&t instanceof c&&(this.childrenPopups.forEach((e=>{!t.closest(e)&&e.isOpened&&e.close()})),this.childrenPopups.has(t)||this.j.e.on(t,"beforeClose",(()=>{this.childrenPopups.delete(t)})),this.childrenPopups.add(t)),super.updateParentElement(t)}setContent(t){o.i.detach(this.container);const e=this.j.c.div(this.componentName+"__content");let s;return t instanceof a.u?(s=t.container,t.parentElement=this):s=(0,n.isString)(t)?this.j.c.fromHTML(t):t,e.appendChild(s),this.container.appendChild(e),this.updatePosition(),this}open(t,e=!1){(0,n.markOwner)(this.jodit,this.container),this.isOpened=!0,this.addGlobalListeners(),this.targetBound=e?this.getKeepBound(t):t;const s=(0,r.ZO)(this.jodit,c);return s!==this.container.parentElement&&s.appendChild(this.container),this.updatePosition(),this.j.e.fire(this,"afterOpen"),this}getKeepBound(t){const e=t(),s=this.od.elementFromPoint(e.left,e.top);if(!s)return t;const i=o.i.isHTMLElement(s)?s:s.parentElement,r=(0,n.position)(i,this.j);return()=>{const e=t(),s=(0,n.position)(i,this.j);return{...e,top:e.top+(s.top-r.top),left:e.left+(s.left-r.left)}}}updatePosition(){if(!this.isOpened)return this;const[t,e]=this.calculatePosition(this.targetBound(),this.viewBound(),(0,n.position)(this.container,this.j));return this.setMod("strategy",e),(0,n.css)(this.container,{left:t.left,top:t.top}),this.childrenPopups.forEach((t=>t.updatePosition())),this}throttleUpdatePosition(){this.updatePosition()}calculatePosition(t,e,s,i=this.strategy){const o={left:t.left,right:t.left-(s.width-t.width)},r={bottom:t.top+t.height,top:t.top-s.height},a=Object.keys(o).reduce(((t,e)=>t.concat(Object.keys(r).map((t=>`${e}${(0,n.ucfirst)(t)}`)))),[]),l=t=>{const[e,i]=(0,n.kebabCase)(t).split("-");return{left:o[e],top:r[i],width:s.width,height:s.height}},h=t=>{let e=null;return e=c.boxInView(l(i),t)?i:a.find((e=>{if(c.boxInView(l(e),t))return e}))||null,e};let d=h((0,n.position)(this.j.container,this.j));return d&&c.boxInView(l(d),e)||(d=h(e)||d||i),[l(d),d]}static boxInView(t,e){return!(-2>t.top-e.top||-2>t.left-e.left||-2>e.top+e.height-(t.top+t.height)||-2>e.left+e.width-(t.left+t.width))}close(){return this.isOpened?(this.isOpened=!1,this.childrenPopups.forEach((t=>t.close())),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.removeGlobalListeners(),o.i.safeRemove(this.container),this):this}closeOnOutsideClick(t){if(!this.isOpened)return;if(!t.target)return void this.close();const e=a.u.closestElement(t.target,c);e&&(this===e||e.closest(this))||this.close()}addGlobalListeners(){const t=this.throttleUpdatePosition,e=this.ow;r.TB.on("closeAllPopups",this.close),this.smart&&this.j.e.on("escape",this.close).on("mousedown touchstart",this.closeOnOutsideClick).on(e,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.on("closeAllPopups",this.close).on("resize",t).on(this.container,"scroll mousewheel",t).on(e,"scroll",t).on(e,"resize",t),o.i.up(this.j.container,(e=>{e&&this.j.e.on(e,"scroll mousewheel",t)}))}removeGlobalListeners(){const t=this.throttleUpdatePosition,e=this.ow;r.TB.off("closeAllPopups",this.close),this.smart&&this.j.e.off("escape",this.close).off("mousedown touchstart",this.closeOnOutsideClick).off(e,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.off("closeAllPopups",this.close).off("resize",t).off(this.container,"scroll mousewheel",t).off(e,"scroll",t).off(e,"resize",t),o.i.up(this.j.container,(e=>{e&&this.j.e.off(e,"scroll mousewheel",t)}))}setZIndex(t){this.container.style.zIndex=""+t}destruct(){return this.close(),super.destruct()}}(0,i.gn)([l.autobind],c.prototype,"updatePosition",null),(0,i.gn)([(0,l.throttle)(10),l.autobind],c.prototype,"throttleUpdatePosition",null),(0,i.gn)([l.autobind],c.prototype,"close",null),(0,i.gn)([l.autobind],c.prototype,"closeOnOutsideClick",null)},(t,e,s)=>{"use strict";s.d(e,{eC:()=>E,mA:()=>v,Z:()=>C,x4:()=>x,u3:()=>m,Cj:()=>w,GJ:()=>g});var i={};s.r(i),s.d(i,{required:()=>d,url:()=>u});var o=s(39),n=s(38),r=s(28),a=s(8),l=s(15),c=s(36),h=s(30);const d=t=>!!(0,a.trim)(t.value).length||(t.error="Please fill out this field",!1),u=t=>!!(0,a.isURL)((0,a.trim)(t.value))||(t.error="Please enter a web address",!1),p=t=>!!(0,a.trim)(t.value).length||(t.error="Please fill out this field",!1);var f;let m=f=class extends r.u{constructor(t,e){super(t,e),this.label=this.j.c.span(this.getFullElName("label")),this.icon=this.j.c.span(this.getFullElName("icon")),this.clearButton=this.j.c.span(this.getFullElName("clear"),h.J.get("cancel")),this.state={...f.defaultState},this.__errorBox=this.j.c.span(this.getFullElName("error")),this.validators=new Set([]),Object.assign(this.state,e),void 0!==this.state.clearButton&&(this.j.e.on(this.clearButton,"click",(t=>{t.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()}className(){return"UIInput"}onChangeClear(){this.state.clearButton?l.i.after(this.nativeInput,this.clearButton):l.i.safeRemove(this.clearButton)}onChangeClassName(t,e){e&&this.container.classList.remove(e),this.state.className&&this.container.classList.add(this.state.className)}onChangeState(){this.name=this.state.name;const t=this.nativeInput,{name:e,icon:s,type:i,ref:o,required:n,placeholder:r,autocomplete:c,label:d}=this.state;(0,a.attr)(t,"name",e),(0,a.attr)(t,"type",i),(0,a.attr)(t,"data-ref",o||e),(0,a.attr)(t,"ref",o||e),(0,a.attr)(t,"required",n||null),(0,a.attr)(t,"autocomplete",c?null:"off"),(0,a.attr)(t,"placeholder",r?this.j.i18n(r):""),s&&h.J.exists(s)?(l.i.before(t,this.icon),this.icon.innerHTML=h.J.get(s)):l.i.safeRemove(this.icon),d?(l.i.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(d)):l.i.safeRemove(this.label),this.updateValidators()}updateValidators(){var t;this.validators.clear(),this.state.required&&this.validators.add(d),null===(t=this.state.validators)||void 0===t||t.forEach((t=>{const e=i[t];e&&this.validators.add(e)}))}set error(t){this.setMod("has-error",!!t),t?(this.__errorBox.innerText=this.j.i18n(t,this.j.i18n(this.state.label||"")),this.container.appendChild(this.__errorBox)):l.i.safeRemove(this.__errorBox)}get value(){return this.nativeInput.value}set value(t){this.value!==t&&(this.nativeInput.value=t,this.onChangeValue())}onChangeStateValue(){this.value=this.state.value}onChangeValue(){var t,e;const{value:s}=this;this.state.value=s,this.j.e.fire(this,"change",s),null===(e=(t=this.state).onChange)||void 0===e||e.call(t,s)}validate(){return this.error="",(0,a.toArray)(this.validators).every((t=>t(this)))}createContainer(t){const e=super.createContainer();this.wrapper=this.j.c.div(this.getFullElName("wrapper")),this.nativeInput||(this.nativeInput=this.createNativeInput());const{nativeInput:s}=this;return s.classList.add(this.getFullElName("input")),this.wrapper.appendChild(s),e.appendChild(this.wrapper),(0,a.attr)(s,"dir",this.j.o.direction||"auto"),e}createNativeInput(t){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)}};m.defaultState={className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]},(0,o.gn)([(0,c.watch)("state.clearButton")],m.prototype,"onChangeClear",null),(0,o.gn)([(0,c.watch)("state.className")],m.prototype,"onChangeClassName",null),(0,o.gn)([(0,c.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"]),(0,c.debounce)()],m.prototype,"onChangeState",null),(0,o.gn)([(0,c.watch)("state.value")],m.prototype,"onChangeStateValue",null),(0,o.gn)([c.autobind],m.prototype,"onChangeValue",null),m=f=(0,o.gn)([c.component],m);let g=class extends m{className(){return"UITextArea"}createContainer(t){return this.nativeInput=this.j.create.element("textarea"),super.createContainer(t)}};g=(0,o.gn)([c.component],g);let v=class extends m{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}constructor(t,e){super(t,{...e,type:"checkbox"})}};var b;v=(0,o.gn)([c.component],v);let w=b=class extends m{constructor(t,e){super(t,e),this.state={...b.defaultState},Object.assign(this.state,e)}className(){return"UISelect"}createContainer(t){var e;const s=super.createContainer(t),{j:i}=this,{nativeInput:o}=this,n=()=>i.create.element("option");if(void 0!==t.placeholder){const e=n();e.value="",e.text=i.i18n(t.placeholder),o.add(e)}return null===(e=t.options)||void 0===e||e.forEach((t=>{const e=n();e.value=""+t.value,e.text=i.i18n(t.text),o.add(e)})),t.size&&t.size>0&&(0,a.attr)(o,"size",t.size),t.multiple&&(0,a.attr)(o,"multiple",""),s}createNativeInput(){return this.j.create.element("select")}updateValidators(){super.updateValidators(),this.state.required&&(this.validators.delete(d),this.validators.add(p))}};w.defaultState={...m.defaultState,options:[],size:1,multiple:!1},w=b=(0,o.gn)([c.component],w);var y=s(33);let C=class extends m{constructor(t,e){super(t,{type:"file",...e}),this.state={...m.defaultState,type:"file",onlyImages:!0}}className(){return"UIFileInput"}createContainer(t){this.button=new y.y3(this.j,{icon:{name:"plus"}});const{container:e}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(t));const{nativeInput:s}=this;return s.classList.add(this.getFullElName("input")),e.classList.add(this.componentName),e.appendChild(s),e}createNativeInput(t){return this.j.create.fromHTML(`<input\n\t\t\ttype="file"\n\t\t\taccept="${t.onlyImages?"image/*":"*"}"\n\t\t\ttabindex="-1"\n\t\t\tdir="auto"\n\t\t\tmultiple=""\n\t\t/>`)}};C=(0,o.gn)([c.component],C);var j=s(9);let x=class extends n.q{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){const t=this.allChildren.filter((t=>t instanceof m));for(const e of t)if(!e.validate())return!1;const e=this.allChildren.filter((t=>t instanceof w));for(const t of e)if(!t.validate())return!1;return!0}onSubmit(t){this.j.e.on(this.container,"submit",(()=>{const e=this.allChildren.filter((t=>t instanceof m));return!!this.validate()&&(t(e.reduce(((t,e)=>(t[e.state.name]=e.value,t)),{})),!1)}))}createContainer(){const t=this.j.c.element("form");return t.classList.add(this.componentName),(0,j.Lj)(t,"dir",this.j.o.direction||"auto"),t}};x=(0,o.gn)([c.component],x);let E=class extends n.q{constructor(t,e,s={align:"left"}){super(t,e),this.options=s,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),(0,j.Lj)(this.container,"data-ref",s.ref),(0,j.Lj)(this.container,"ref",s.ref)}className(){return"UIBlock"}};E=(0,o.gn)([c.component],E)},t=>{t.exports={"Type something":"Start writing...",pencil:"Edit",Quadrate:"Square"}},t=>{t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M36 4h-24c-2.21 0-4 1.79-4 4v32c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4v-32c0-2.21-1.79-4-4-4zm-24 4h10v16l-5-3-5 3v-16z"/> </svg>'},(t,e,s)=>{"use strict";s.d(e,{YW:()=>r,ov:()=>l,IL:()=>a});var i=s(8),o=s(27),n=s(15);const r=(t,e,s)=>{const r="jodit-color-picker",a=(0,i.normalizeColor)(s),l=t.c.div(r),c=t.o.textIcons?`<span>${t.i18n("palette")}</span>`:o.JO.get("palette"),h=t=>{const e=[];return(0,i.isPlainObject)(t)?Object.keys(t).forEach((s=>{e.push(`<div class="${r}__group ${r}__group-${s}">`),e.push(h(t[s])),e.push("</div>")})):(0,i.isArray)(t)&&t.forEach((t=>{e.push(`<span class='${r}__color-item ${a===t?r+"__color-item_active_true":""}' title="${t}" style="background-color:${t}" data-color="${t}"></span>`)})),e.join("")};l.appendChild(t.c.fromHTML(`<div class="${r}__groups">${h(t.o.colors)}</div>`)),l.appendChild(t.c.fromHTML(`<div data-ref="extra" class="${r}__extra"></div>`));const{extra:d}=(0,i.refs)(l);return t.o.showBrowserColorPicker&&(0,i.hasBrowserColorPicker)()&&(d.appendChild(t.c.fromHTML(`<div class="${r}__native">${c}<input type="color" value="#ffffff"/></div>`)),t.e.on(l,"change",(t=>{t.stopPropagation();const s=t.target;if(!s||!s.tagName||!n.i.isTag(s,"input"))return;const o=s.value||"";(0,i.isFunction)(e)&&e(o),t.preventDefault()}))),t.e.on(l,"mousedown touchend",(s=>{s.stopPropagation();let o=s.target;if(o&&o.tagName&&!n.i.isTag(o,"svg")&&!n.i.isTag(o,"path")||!o.parentNode||(o=n.i.closest(o.parentNode,"span",t.editor)),!n.i.isTag(o,"span")||!o.classList.contains(r+"__color-item"))return;const a=(0,i.attr)(o,"-color")||"";e&&(0,i.isFunction)(e)&&e(a),s.preventDefault()})),t.e.fire("afterGenerateColorPicker",l,d,e,a),l},a=(t,e,s)=>{const n=t.c.div("jodit-tabs"),r=t.c.div("jodit-tabs__wrapper"),a=t.c.div("jodit-tabs__buttons"),l={},c=[];let h="",d=0;if(n.appendChild(a),n.appendChild(r),e.forEach((({icon:n,name:u,content:p})=>{const f=t.c.div("jodit-tab"),m=(0,o.zx)(t,n||u,u);h||(h=u),a.appendChild(m.container),c.push(m),m.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+e.length),(0,i.isFunction)(p)?f.appendChild(t.c.div("jodit-tab_empty")):f.appendChild(p),r.appendChild(f),m.onAction((()=>(c.forEach((t=>{t.state.activated=!1})),(0,i.$$)(".jodit-tab",r).forEach((t=>{t.classList.remove("jodit-tab_active")})),m.state.activated=!0,f.classList.add("jodit-tab_active"),(0,i.isFunction)(p)&&p.call(t),s&&(s.__activeTab=u),!1))),l[u]={button:m,tab:f},d+=1})),!d)return n;(0,i.$$)("a",a).forEach((t=>{t.style.width=(100/d).toFixed(10)+"%"}));const u=s&&s.__activeTab&&l[s.__activeTab]?s.__activeTab:h;return l[u].button.state.activated=!0,l[u].tab.classList.add("jodit-tab_active"),n},l=(t,e,s,r,l=!0)=>{let c;const h=[];if(e.upload&&t.o.uploader&&(t.o.uploader.url||t.o.uploader.insertImageAsBase64URI)){const s=t.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${t.i18n(l?"Drop image":"Drop file")}</strong><span><br>${t.i18n("or click")}</span><input type="file" accept="${l?"image/*":"*"}" tabindex="-1" dir="auto" multiple=""/></div>`);t.uploader.bind(s,(s=>{const o=(0,i.isFunction)(e.upload)?e.upload:t.o.uploader.defaultHandlerSuccess;(0,i.isFunction)(o)&&o.call(t,s),t.e.fire("closeAllPopups")}),(e=>{t.e.fire("errorMessage",e.message),t.e.fire("closeAllPopups")})),h.push({icon:"upload",name:"Upload",content:s})}if(e.filebrowser&&(t.o.filebrowser.ajax.url||t.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){r&&r(),e.filebrowser&&t.filebrowser.open(e.filebrowser,l)}}),e.url){const r=new o.y3(t,{type:"submit",status:"primary",text:"Insert"}),a=new o.x4(t,[new o.u3(t,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new o.u3(t,{name:"text",label:"Alternative text"}),new o.eC(t,[r])]);c=null,s&&!n.i.isText(s)&&(n.i.isTag(s,"img")||(0,i.$$)("img",s).length)&&(c="IMG"===s.tagName?s:(0,i.$$)("img",s)[0],(0,i.val)(a.container,"input[name=url]",(0,i.attr)(c,"src")),(0,i.val)(a.container,"input[name=text]",(0,i.attr)(c,"alt")),r.state.text="Update"),s&&n.i.isTag(s,"a")&&((0,i.val)(a.container,"input[name=url]",(0,i.attr)(s,"href")),(0,i.val)(a.container,"input[name=text]",(0,i.attr)(s,"title")),r.state.text="Update"),a.onSubmit((s=>{(0,i.isFunction)(e.url)&&e.url.call(t,s.url,s.text)})),h.push({icon:"link",name:"URL",content:a.container})}return a(t,h)}},(t,e,s)=>{"use strict";s.d(e,{z:()=>o});var i=s(8);const o=(t,e)=>{e&&"normal"!==e?"center"!==e?((0,i.css)(t,"float",e),(0,i.clearCenterAlign)(t)):(0,i.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,i.css)(t,"float")&&-1!==["right","left"].indexOf((""+(0,i.css)(t,"float")).toLowerCase())&&(0,i.css)(t,"float",""),(0,i.clearCenterAlign)(t))}},(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});var i=s(9);const o=[{name:"eye",tooltip:"Open link",exec(t,e){const s=(0,i.Lj)(e,"href");e&&s&&t.ow.open(s)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"]},(t,e,s)=>{"use strict";s.d(e,{A:()=>a,Z:()=>l});var i=s(15),o=s(16),n=s(8),r=s(47);const a={name:"left",childTemplate:(t,e,s)=>s,list:["Left","Right","Center","Normal"],exec(t,e,{control:s}){if(!i.i.isTag(e,["img","jodit","jodit-media"]))return;const n=s.args&&(0,o.HD)(s.args[0])?s.args[0].toLowerCase():"";if(!n)return!1;(0,r.z)(e,n),i.i.isTag(e,["jodit","jodit-media"])&&e.firstElementChild&&(0,r.z)(e.firstElementChild,n),t.setEditorValue(),t.e.fire("recalcPositionPopup")},tooltip:"Horizontal align"},l=[{name:"delete",icon:"bin",tooltip:"Delete",exec(t,e){e&&t.s.removeNode(e)}},{name:"pencil",exec(t,e){"img"===e.tagName.toLowerCase()&&t.e.fire("openImageProperties",e)},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom","Normal"],tooltip:"Vertical align",exec(t,e,{control:s}){if(!i.i.isTag(e,"img"))return;const r=s.args&&(0,o.HD)(s.args[0])?s.args[0].toLowerCase():"";if(!r)return!1;(0,n.css)(e,"vertical-align","normal"===r?"":r),t.e.fire("recalcPositionPopup")}},a]},(t,e,s)=>{"use strict";s.d(e,{Z:()=>a});var i=s(16),o=s(8),n=s(46);const r=t=>t.args&&(0,i.HD)(t.args[0])?t.args[0].toLowerCase():"",a=[{name:"brush",popup(t,e,s,r){if(!(0,i.Zu)(t))return;const a=t.getInstance("Table",t.o).getAllSelectedCells();if(!a.length)return!1;const l=e=>(0,n.YW)(t,(s=>{a.forEach((t=>{(0,o.css)(t,e,s)})),t.lock(),t.setEditorValue(),r(),t.unlock()}),(0,o.css)(a[0],e));return(0,n.IL)(t,[{name:"Background",content:l("background-color")},{name:"Text",content:l("color")},{name:"Border",content:l("border-color")}])},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom","Normal"],childTemplate:(t,e,s)=>s,exec(t,e,{control:s}){const i=r(s);t.getInstance("Table",t.o).getAllSelectedCells().forEach((t=>{(0,o.css)(t,"vertical-align","normal"===i?"":i)}))},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec(t,e,{control:s}){if(!(0,i.Zu)(t))return;const o=r(s);t.execCommand(o,!1,e)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec(t,e,{control:s}){if(!(0,i.Zu)(t))return;const o=r(s);t.execCommand(o,!1,e)},tooltip:"Add row"},{name:"delete",icon:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec(t,e,{control:s}){if(!(0,i.Zu)(t))return;const o=r(s);t.execCommand(o,!1,e),t.e.fire("hidePopup")},tooltip:"Delete"}]},(t,e,s)=>{"use strict";s.d(e,{Z:()=>i});const i=[{name:"bin",tooltip:"Delete",exec(t,e){e&&t.s.removeNode(e)}},s(49).A]},t=>{t.exports='<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <path d="M1088 1256v240q0 16-12 28t-28 12h-240q-16 0-28-12t-12-28v-240q0-16 12-28t28-12h240q16 0 28 12t12 28zm316-600q0 54-15.5 101t-35 76.5-55 59.5-57.5 43.5-61 35.5q-41 23-68.5 65t-27.5 67q0 17-12 32.5t-28 15.5h-240q-15 0-25.5-18.5t-10.5-37.5v-45q0-83 65-156.5t143-108.5q59-27 84-56t25-76q0-42-46.5-74t-107.5-32q-65 0-108 29-35 25-107 115-13 16-31 16-12 0-25-8l-164-125q-13-10-15.5-25t5.5-28q160-266 464-266 80 0 161 31t146 83 106 127.5 41 158.5z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 18.151 18.151" xmlns="http://www.w3.org/2000/svg"> <g> <path stroke-width="0" d="M6.237,16.546H3.649V1.604h5.916v5.728c0.474-0.122,0.968-0.194,1.479-0.194 c0.042,0,0.083,0.006,0.125,0.006V0H2.044v18.15h5.934C7.295,17.736,6.704,17.19,6.237,16.546z"/> <path stroke-width="0" d="M11.169,8.275c-2.723,0-4.938,2.215-4.938,4.938s2.215,4.938,4.938,4.938s4.938-2.215,4.938-4.938 S13.892,8.275,11.169,8.275z M11.169,16.81c-1.983,0-3.598-1.612-3.598-3.598c0-1.983,1.614-3.597,3.598-3.597 s3.597,1.613,3.597,3.597C14.766,15.198,13.153,16.81,11.169,16.81z"/> <polygon stroke-width="0" points="11.792,11.073 10.502,11.073 10.502,12.578 9.03,12.578 9.03,13.868 10.502,13.868 10.502,15.352 11.792,15.352 11.792,13.868 13.309,13.868 13.309,12.578 11.792,12.578 "/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 432 432"> <g> <polygon points="203.688,96 0,96 0,144 155.688,144 "/> <polygon points="155.719,288 0,288 0,336 203.719,336 "/> <path d="M97.844,230.125c-3.701-3.703-5.856-8.906-5.856-14.141s2.154-10.438,5.856-14.141l9.844-9.844H0v48h107.719 L97.844,230.125z"/> <polygon points="232,176 232,96 112,216 232,336 232,256 432,256 432,176"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1203 544q0 13-10 23l-393 393 393 393q10 10 10 23t-10 23l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1171 960q0 13-10 23l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1395 1184q0 13-10 23l-50 50q-10 10-23 10t-23-10l-393-393-393 393q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1411 541l-355 355 355 355 144-144q29-31 70-14 39 17 39 59v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l144-144-355-355-355 355 144 144q31 30 14 69-17 40-59 40h-448q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l144 144 355-355-355-355-144 144q-19 19-45 19-12 0-24-5-40-17-40-59v-448q0-26 19-45t45-19h448q42 0 59 40 17 39-14 69l-144 144 355 355 355-355-144-144q-31-30-14-69 17-40 59-40h448q26 0 45 19t19 45v448q0 42-39 59-13 5-25 5-26 0-45-19z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 896q0 26-19 45l-256 256q-19 19-45 19t-45-19-19-45v-128h-1024v128q0 26-19 45t-45 19-45-19l-256-256q-19-19-19-45t19-45l256-256q19-19 45-19t45 19 19 45v128h1024v-128q0-26 19-45t45-19 45 19l256 256q19 19 19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1596 1385q0 117-79 196t-196 79q-135 0-235-100l-777-776q-113-115-113-271 0-159 110-270t269-111q158 0 273 113l605 606q10 10 10 22 0 16-30.5 46.5t-46.5 30.5q-13 0-23-10l-606-607q-79-77-181-77-106 0-179 75t-73 181q0 105 76 181l776 777q63 63 145 63 64 0 106-42t42-106q0-82-63-145l-581-581q-26-24-60-24-29 0-48 19t-19 48q0 32 25 59l410 410q10 10 10 22 0 16-31 47t-47 31q-12 0-22-10l-410-410q-63-61-63-149 0-82 57-139t139-57q88 0 149 63l581 581q100 98 100 235z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M747 1521q74 32 140 32 376 0 376-335 0-114-41-180-27-44-61.5-74t-67.5-46.5-80.5-25-84-10.5-94.5-2q-73 0-101 10 0 53-.5 159t-.5 158q0 8-1 67.5t-.5 96.5 4.5 83.5 12 66.5zm-14-746q42 7 109 7 82 0 143-13t110-44.5 74.5-89.5 25.5-142q0-70-29-122.5t-79-82-108-43.5-124-14q-50 0-130 13 0 50 4 151t4 152q0 27-.5 80t-.5 79q0 46 1 69zm-541 889l2-94q15-4 85-16t106-27q7-12 12.5-27t8.5-33.5 5.5-32.5 3-37.5.5-34v-65.5q0-982-22-1025-4-8-22-14.5t-44.5-11-49.5-7-48.5-4.5-30.5-3l-4-83q98-2 340-11.5t373-9.5q23 0 68.5.5t67.5.5q70 0 136.5 13t128.5 42 108 71 74 104.5 28 137.5q0 52-16.5 95.5t-39 72-64.5 57.5-73 45-84 40q154 35 256.5 134t102.5 248q0 100-35 179.5t-93.5 130.5-138 85.5-163.5 48.5-176 14q-44 0-132-3t-132-3q-106 0-307 11t-231 12z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M896 1152q0-36-20-69-1-1-15.5-22.5t-25.5-38-25-44-21-50.5q-4-16-21-16t-21 16q-7 23-21 50.5t-25 44-25.5 38-15.5 22.5q-20 33-20 69 0 53 37.5 90.5t90.5 37.5 90.5-37.5 37.5-90.5zm512-128q0 212-150 362t-362 150-362-150-150-362q0-145 81-275 6-9 62.5-90.5t101-151 99.5-178 83-201.5q9-30 34-47t51-17 51.5 17 33.5 47q28 93 83 201.5t99.5 178 101 151 62.5 90.5q81 127 81 275z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"> <g stroke="none" stroke-width="1"> <path d="M14,1.4 L12.6,0 L7,5.6 L1.4,0 L0,1.4 L5.6,7 L0,12.6 L1.4,14 L7,8.4 L12.6,14 L14,12.6 L8.4,7 L14,1.4 Z"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h896q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-640q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h640q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M503 1271l-256 256q-10 9-23 9-12 0-23-9-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23zm169 41v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm-224-224q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm1264 128q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-334-335q-21-21-42-56l239-18 273 274q27 27 68 27.5t68-26.5l147-146q28-28 28-67 0-40-28-68l-274-275 18-239q35 21 56 42l336 336q84 86 84 204zm-617-724l-239 18-273-274q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l274 274-18 240q-35-21-56-42l-336-336q-84-86-84-204 0-120 85-203l147-146q83-83 203-83 121 0 204 85l334 335q21 21 42 56zm633 84q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm-544-544v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm407 151l-256 256q-11 9-23 9t-23-9q-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1472 930v318q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-10 10-23 10-3 0-9-2-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-254q0-13 9-22l64-64q10-10 23-10 6 0 12 3 20 8 20 29zm231-489l-814 814q-24 24-57 24t-57-24l-430-430q-24-24-24-57t24-57l110-110q24-24 57-24t57 24l263 263 647-647q24-24 57-24t57 24l110 110q24 24 24 57t-24 57z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M813 1299l614-614q19-19 19-45t-19-45l-102-102q-19-19-45-19t-45 19l-467 467-211-211q-19-19-45-19t-45 19l-102 102q-19 19-19 45t19 45l358 358q19 19 45 19t45-19zm851-883v960q0 119-84.5 203.5t-203.5 84.5h-960q-119 0-203.5-84.5t-84.5-203.5v-960q0-119 84.5-203.5t203.5-84.5h960q119 0 203.5 84.5t84.5 203.5z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 10 10"> <path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 16 16"> <path stroke-width="0" d="M16 9v-6h-3v-1c0-0.55-0.45-1-1-1h-11c-0.55 0-1 0.45-1 1v3c0 0.55 0.45 1 1 1h11c0.55 0 1-0.45 1-1v-1h2v4h-9v2h-0.5c-0.276 0-0.5 0.224-0.5 0.5v5c0 0.276 0.224 0.5 0.5 0.5h2c0.276 0 0.5-0.224 0.5-0.5v-5c0-0.276-0.224-0.5-0.5-0.5h-0.5v-1h9zM12 3h-11v-1h11v1z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M621 1280h595v-595zm-45-45l595-595h-595v595zm1152 77v192q0 14-9 23t-23 9h-224v224q0 14-9 23t-23 9h-192q-14 0-23-9t-9-23v-224h-864q-14 0-23-9t-9-23v-864h-224q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h224v-224q0-14 9-23t23-9h192q14 0 23 9t9 23v224h851l246-247q10-9 23-9t23 9q9 10 9 23t-9 23l-247 246v851h224q14 0 23 9t9 23z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M24.89,6.61H22.31V4.47A2.47,2.47,0,0,0,19.84,2H6.78A2.47,2.47,0,0,0,4.31,4.47V22.92a2.47,2.47,0,0,0,2.47,2.47H9.69V27.2a2.8,2.8,0,0,0,2.8,2.8h12.4a2.8,2.8,0,0,0,2.8-2.8V9.41A2.8,2.8,0,0,0,24.89,6.61ZM6.78,23.52a.61.61,0,0,1-.61-.6V4.47a.61.61,0,0,1,.61-.6H19.84a.61.61,0,0,1,.61.6V6.61h-8a2.8,2.8,0,0,0-2.8,2.8V23.52Zm19,3.68a.94.94,0,0,1-.94.93H12.49a.94.94,0,0,1-.94-.93V9.41a.94.94,0,0,1,.94-.93h12.4a.94.94,0,0,1,.94.93Z"/> <path d="M23.49,13.53h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,17.37h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,21.22h-9.6a.93.93,0,1,0,0,1.86h9.6a.93.93,0,1,0,0-1.86Z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M960 896q26 0 45 19t19 45-19 45-45 19-45-19-19-45 19-45 45-19zm300 64l507 398q28 20 25 56-5 35-35 51l-128 64q-13 7-29 7-17 0-31-8l-690-387-110 66q-8 4-12 5 14 49 10 97-7 77-56 147.5t-132 123.5q-132 84-277 84-136 0-222-78-90-84-79-207 7-76 56-147t131-124q132-84 278-84 83 0 151 31 9-13 22-22l122-73-122-73q-13-9-22-22-68 31-151 31-146 0-278-84-82-53-131-124t-56-147q-5-59 15.5-113t63.5-93q85-79 222-79 145 0 277 84 83 52 132 123t56 148q4 48-10 97 4 1 12 5l110 66 690-387q14-8 31-8 16 0 29 7l128 64q30 16 35 51 3 36-25 56zm-681-260q46-42 21-108t-106-117q-92-59-192-59-74 0-113 36-46 42-21 108t106 117q92 59 192 59 74 0 113-36zm-85 745q81-51 106-117t-21-108q-39-36-113-36-100 0-192 59-81 51-106 117t21 108q39 36 113 36 100 0 192-59zm178-613l96 58v-11q0-36 33-56l14-8-79-47-26 26q-3 3-10 11t-12 12q-2 2-4 3.5t-3 2.5zm224 224l96 32 736-576-128-64-768 431v113l-160 96 9 8q2 2 7 6 4 4 11 12t11 12l26 26zm704 416l128-64-520-408-177 138q-2 3-13 7z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M384 544v576q0 13-9.5 22.5t-22.5 9.5q-14 0-23-9l-288-288q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5t9.5 22.5zm1408 768v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24" > <circle cx="12" cy="12" r="2.2"/> <circle cx="12" cy="5" r="2.2"/> <circle cx="12" cy="19" r="2.2"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 128 128" xml:space="preserve"> <polygon points="112.4560547,23.3203125 112.4560547,75.8154297 31.4853516,75.8154297 31.4853516,61.953125 16.0131836,72.6357422 0.5410156,83.3164063 16.0131836,93.9990234 31.4853516,104.6796875 31.4853516,90.8183594 112.4560547,90.8183594 112.4560547,90.8339844 127.4589844,90.8339844 127.4589844,23.3203125"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M832 1408l336-384h-768l-336 384h768zm1013-1077q15 34 9.5 71.5t-30.5 65.5l-896 1024q-38 44-96 44h-768q-38 0-69.5-20.5t-47.5-54.5q-15-34-9.5-71.5t30.5-65.5l896-1024q38-44 96-44h768q38 0 69.5 20.5t47.5 54.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1152 512v-472q22 14 36 28l408 408q14 14 28 36h-472zm-128 32q0 40 28 68t68 28h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1728 608v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M789 559l-170 450q33 0 136.5 2t160.5 2q19 0 57-2-87-253-184-452zm-725 1105l2-79q23-7 56-12.5t57-10.5 49.5-14.5 44.5-29 31-50.5l237-616 280-724h128q8 14 11 21l205 480q33 78 106 257.5t114 274.5q15 34 58 144.5t72 168.5q20 45 35 57 19 15 88 29.5t84 20.5q6 38 6 57 0 4-.5 13t-.5 13q-63 0-190-8t-191-8q-76 0-215 7t-178 8q0-43 4-78l131-28q1 0 12.5-2.5t15.5-3.5 14.5-4.5 15-6.5 11-8 9-11 2.5-14q0-16-31-96.5t-72-177.5-42-100l-450-2q-26 58-76.5 195.5t-50.5 162.5q0 22 14 37.5t43.5 24.5 48.5 13.5 57 8.5 41 4q1 19 1 58 0 9-2 27-58 0-174.5-10t-174.5-10q-8 0-26.5 4t-21.5 4q-80 14-188 14z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1744 1408q33 0 42 18.5t-11 44.5l-126 162q-20 26-49 26t-49-26l-126-162q-20-26-11-44.5t42-18.5h80v-1024h-80q-33 0-42-18.5t11-44.5l126-162q20-26 49-26t49 26l126 162q20 26 11 44.5t-42 18.5h-80v1024h80zm-1663-1279l54 27q12 5 211 5 44 0 132-2t132-2q36 0 107.5.5t107.5.5h293q6 0 21 .5t20.5 0 16-3 17.5-9 15-17.5l42-1q4 0 14 .5t14 .5q2 112 2 336 0 80-5 109-39 14-68 18-25-44-54-128-3-9-11-48t-14.5-73.5-7.5-35.5q-6-8-12-12.5t-15.5-6-13-2.5-18-.5-16.5.5q-17 0-66.5-.5t-74.5-.5-64 2-71 6q-9 81-8 136 0 94 2 388t2 455q0 16-2.5 71.5t0 91.5 12.5 69q40 21 124 42.5t120 37.5q5 40 5 50 0 14-3 29l-34 1q-76 2-218-8t-207-10q-50 0-151 9t-152 9q-3-51-3-52v-9q17-27 61.5-43t98.5-29 78-27q19-42 19-383 0-101-3-303t-3-303v-117q0-2 .5-15.5t.5-25-1-25.5-3-24-5-14q-11-12-162-12-33 0-93 12t-80 26q-19 13-34 72.5t-31.5 111-42.5 53.5q-42-26-56-44v-383z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24"> <path stroke-width="0" d="M22,20.6L3.4,2H8V0H0v8h2V3.4L20.6,22H16v2h8v-8h-2V20.6z M16,0v2h4.7l-6.3,6.3l1.4,1.4L22,3.5V8h2V0H16z M8.3,14.3L2,20.6V16H0v8h8v-2H3.5l6.3-6.3L8.3,14.3z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1600 736v192q0 40-28 68t-68 28h-1216q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h1216q40 0 68 28t28 68z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M576 576q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1024 384v448h-1408v-192l320-320 160 160 512-512zm96-704h-1600q-13 0-22.5 9.5t-9.5 22.5v1216q0 13 9.5 22.5t22.5 9.5h1600q13 0 22.5-9.5t9.5-22.5v-1216q0-13-9.5-22.5t-22.5-9.5zm160 32v1216q0 66-47 113t-113 47h-1600q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1600q66 0 113 47t47 113z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M352 832q0 14-9 23l-288 288q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-576q0-13 9.5-22.5t22.5-9.5q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M384 1662l17-85q6-2 81.5-21.5t111.5-37.5q28-35 41-101 1-7 62-289t114-543.5 52-296.5v-25q-24-13-54.5-18.5t-69.5-8-58-5.5l19-103q33 2 120 6.5t149.5 7 120.5 2.5q48 0 98.5-2.5t121-7 98.5-6.5q-5 39-19 89-30 10-101.5 28.5t-108.5 33.5q-8 19-14 42.5t-9 40-7.5 45.5-6.5 42q-27 148-87.5 419.5t-77.5 355.5q-2 9-13 58t-20 90-16 83.5-6 57.5l1 18q17 4 185 31-3 44-16 99-11 0-32.5 1.5t-32.5 1.5q-29 0-87-10t-86-10q-138-2-206-2-51 0-143 9t-121 11z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M1664 1344v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 312 312"> <g transform="translate(0.000000,312.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M50 3109 c0 -7 -11 -22 -25 -35 l-25 -23 0 -961 0 -961 32 -29 32 -30 501 -2 500 -3 3 -502 2 -502 31 -30 31 -31 958 0 958 0 23 25 c13 13 30 25 37 25 9 0 12 199 12 960 0 686 -3 960 -11 960 -6 0 -24 12 -40 28 l-29 27 -503 5 -502 5 -5 502 -5 503 -28 29 c-15 16 -27 34 -27 40 0 8 -274 11 -960 11 -710 0 -960 -3 -960 -11z m1738 -698 l2 -453 -40 -40 c-22 -22 -40 -43 -40 -47 0 -4 36 -42 79 -85 88 -87 82 -87 141 -23 l26 27 455 -2 454 -3 0 -775 0 -775 -775 0 -775 0 -3 450 -2 449 47 48 47 48 -82 80 c-44 44 -84 80 -87 80 -3 0 -25 -18 -48 -40 l-41 -40 -456 2 -455 3 -3 765 c-1 421 0 771 3 778 3 10 164 12 777 10 l773 -3 3 -454z"/> <path d="M607 2492 c-42 -42 -77 -82 -77 -87 0 -6 86 -96 190 -200 105 -104 190 -197 190 -205 0 -8 -41 -56 -92 -107 -65 -65 -87 -94 -77 -98 8 -3 138 -4 289 -3 l275 3 3 275 c1 151 0 281 -3 289 -4 10 -35 -14 -103 -82 -54 -53 -103 -97 -109 -97 -7 0 -99 88 -206 195 -107 107 -196 195 -198 195 -3 0 -39 -35 -82 -78z"/> <path d="M1470 1639 c-47 -49 -87 -91 -89 -94 -5 -6 149 -165 160 -165 9 0 189 179 189 188 0 12 -154 162 -165 161 -6 0 -48 -41 -95 -90z"/> <path d="M1797 1303 c-9 -8 -9 -568 0 -576 4 -4 50 36 103 88 54 52 101 95 106 95 5 0 95 -85 199 -190 104 -104 194 -190 200 -190 6 0 46 36 90 80 l79 79 -197 196 c-108 108 -197 199 -197 203 0 4 45 52 99 106 55 55 98 103 95 108 -6 10 -568 11 -577 1z"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 32 32"> <path d="M27 4l-15 15-7-7-5 5 12 12 20-20z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M381 1620q0 80-54.5 126t-135.5 46q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5t21.5-42.5q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53h-106v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159h-362q-6-36-6-54 0-51 23.5-93t56.5-68 66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5t-39.5-13.5q-46 0-81 58l-85-59q24-51 71.5-79.5t105.5-28.5q73 0 123 41.5t50 112.5q0 50-34 91.5t-75 64.5-75.5 50.5-35.5 52.5h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm-1408-899v99h-335v-99h107q0-41 .5-122t.5-121v-12h-2q-8 17-50 54l-71-76 136-127h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 270 270"> <path d="m240.443652,220.45085l-47.410809,0l0,-10.342138c13.89973,-8.43655 25.752896,-19.844464 34.686646,-33.469923c11.445525,-17.455846 17.496072,-37.709239 17.496072,-58.570077c0,-59.589197 -49.208516,-108.068714 -109.693558,-108.068714s-109.69263,48.479517 -109.69263,108.069628c0,20.860839 6.050547,41.113316 17.497001,58.570077c8.93375,13.625459 20.787845,25.032458 34.686646,33.469008l0,10.342138l-47.412666,0c-10.256959,0 -18.571354,8.191376 -18.571354,18.296574c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.98402,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574l0,-39.496814c0,-7.073455 -4.137698,-13.51202 -10.626529,-16.537358c-25.24497,-11.772016 -41.557118,-37.145704 -41.557118,-64.643625c0,-39.411735 32.545369,-71.476481 72.549922,-71.476481c40.004553,0 72.550851,32.064746 72.550851,71.476481c0,27.497006 -16.312149,52.87161 -41.557118,64.643625c-6.487902,3.026253 -10.6256,9.464818 -10.6256,16.537358l0,39.496814c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.982163,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574c0,-10.105198 -8.314395,-18.296574 -18.571354,-18.296574z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M384 544v576q0 13-9.5 22.5t-22.5 9.5q-14 0-23-9l-288-288q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5t9.5 22.5zm1408 768v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' x="0px" y="0px" viewBox="0 0 459 459"> <g> <path d="M229.5,0C102,0,0,102,0,229.5S102,459,229.5,459c20.4,0,38.25-17.85,38.25-38.25c0-10.2-2.55-17.85-10.2-25.5 c-5.1-7.65-10.2-15.3-10.2-25.5c0-20.4,17.851-38.25,38.25-38.25h45.9c71.4,0,127.5-56.1,127.5-127.5C459,91.8,357,0,229.5,0z M89.25,229.5c-20.4,0-38.25-17.85-38.25-38.25S68.85,153,89.25,153s38.25,17.85,38.25,38.25S109.65,229.5,89.25,229.5z M165.75,127.5c-20.4,0-38.25-17.85-38.25-38.25S145.35,51,165.75,51S204,68.85,204,89.25S186.15,127.5,165.75,127.5z M293.25,127.5c-20.4,0-38.25-17.85-38.25-38.25S272.85,51,293.25,51s38.25,17.85,38.25,38.25S313.65,127.5,293.25,127.5z M369.75,229.5c-20.4,0-38.25-17.85-38.25-38.25S349.35,153,369.75,153S408,170.85,408,191.25S390.15,229.5,369.75,229.5z" /> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M1534 189v73q0 29-18.5 61t-42.5 32q-50 0-54 1-26 6-32 31-3 11-3 64v1152q0 25-18 43t-43 18h-108q-25 0-43-18t-18-43v-1218h-143v1218q0 25-17.5 43t-43.5 18h-108q-26 0-43.5-18t-17.5-43v-496q-147-12-245-59-126-58-192-179-64-117-64-259 0-166 88-286 88-118 209-159 111-37 417-37h479q25 0 43 18t18 43z"/></svg>'},t=>{t.exports='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path stroke-width="0" d="M10.5 20H2a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h1V3l2.03-.4a3 3 0 0 1 5.94 0L13 3v1h1a2 2 0 0 1 2 2v1h-2V6h-1v1H3V6H2v12h5v2h3.5zM8 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm2 4h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2zm0 2v8h8v-8h-8z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M1600 736v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M448 1536h896v-256h-896v256zm0-640h896v-384h-160q-40 0-68-28t-28-68v-160h-640v640zm1152 64q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128 0v416q0 13-9.5 22.5t-22.5 9.5h-224v160q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-160h-224q-13 0-22.5-9.5t-9.5-22.5v-416q0-79 56.5-135.5t135.5-56.5h64v-544q0-40 28-68t68-28h672q40 0 88 20t76 48l152 152q28 28 48 76t20 88v256h64q79 0 135.5 56.5t56.5 135.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1664 256v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l138-138q-148-137-349-137-104 0-198.5 40.5t-163.5 109.5-109.5 163.5-40.5 198.5 40.5 198.5 109.5 163.5 163.5 109.5 198.5 40.5q119 0 225-52t179-147q7-10 23-12 14 0 25 9l137 138q9 8 9.5 20.5t-7.5 22.5q-109 132-264 204.5t-327 72.5q-156 0-298-61t-245-164-164-245-61-298 61-298 164-245 245-164 298-61q147 0 284.5 55.5t244.5 156.5l130-129q29-31 70-14 39 17 39 59z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24"> <g transform="translate(-251.000000, -443.000000)"> <g transform="translate(215.000000, 119.000000)"/> <path d="M252,448 L256,448 L256,444 L252,444 L252,448 Z M257,448 L269,448 L269,446 L257,446 L257,448 Z M257,464 L269,464 L269,462 L257,462 L257,464 Z M270,444 L270,448 L274,448 L274,444 L270,444 Z M252,462 L252,466 L256,466 L256,462 L252,462 Z M270,462 L270,466 L274,466 L274,462 L270,462 Z M254,461 L256,461 L256,449 L254,449 L254,461 Z M270,461 L272,461 L272,449 L270,449 L270,461 Z"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M844 472q0 60-19 113.5t-63 92.5-105 39q-76 0-138-57.5t-92-135.5-30-151q0-60 19-113.5t63-92.5 105-39q77 0 138.5 57.5t91.5 135 30 151.5zm-342 483q0 80-42 139t-119 59q-76 0-141.5-55.5t-100.5-133.5-35-152q0-80 42-139.5t119-59.5q76 0 141.5 55.5t100.5 134 35 152.5zm394-27q118 0 255 97.5t229 237 92 254.5q0 46-17 76.5t-48.5 45-64.5 20-76 5.5q-68 0-187.5-45t-182.5-45q-66 0-192.5 44.5t-200.5 44.5q-183 0-183-146 0-86 56-191.5t139.5-192.5 187.5-146 193-59zm239-211q-61 0-105-39t-63-92.5-19-113.5q0-74 30-151.5t91.5-135 138.5-57.5q61 0 105 39t63 92.5 19 113.5q0 73-30 151t-92 135.5-138 57.5zm432-104q77 0 119 59.5t42 139.5q0 74-35 152t-100.5 133.5-141.5 55.5q-77 0-119-59t-42-139q0-74 35-152.5t100.5-134 141.5-55.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M512 1536h768v-384h-768v384zm896 0h128v-896q0-14-10-38.5t-20-34.5l-281-281q-10-10-34-20t-39-10v416q0 40-28 68t-68 28h-576q-40 0-68-28t-28-68v-416h-128v1280h128v-416q0-40 28-68t68-28h832q40 0 68 28t28 68v416zm-384-928v-320q0-13-9.5-22.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 22.5v320q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5-9.5t9.5-22.5zm640 32v928q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1344q0-40 28-68t68-28h928q40 0 88 20t76 48l280 280q28 28 48 76t20 88z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M306.39,154.09c19.628,4.543,35.244,21.259,39.787,39.523 c1.551,8.54,8.998,14.989,17.904,14.989c9.991,0,18.168-8.175,18.168-18.17c0-13.083-10.991-32.98-25.985-47.881 c-14.719-14.537-32.252-24.802-46.695-24.802c-9.991,0-18.172,8.45-18.172,18.446C291.396,145.094,297.847,152.546,306.39,154.09z M56.629,392.312c-14.09,14.08-14.09,36.979,0,51.059c14.08,14.092,36.981,14.092,50.965,0l104.392-104.303 c24.347,15.181,53.062,23.991,83.953,23.991c87.857,0,158.995-71.142,158.995-158.999c0-87.854-71.138-158.995-158.995-158.995 c-87.856,0-158.995,71.141-158.995,158.995c0,30.802,8.819,59.606,23.992,83.953L56.629,392.312z M182.371,204.06 c0-62.687,50.875-113.568,113.568-113.568s113.569,50.881,113.569,113.568c0,62.694-50.876,113.569-113.569,113.569 S182.371,266.754,182.371,204.06z" fill-rule="evenodd"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path stroke="null" d="m42.276011,26.302547c0.098397,-0.76605 0.172194,-1.54407 0.172194,-2.33406s-0.073797,-1.56801 -0.172194,-2.33406l5.202718,-3.961917c0.467384,-0.359086 0.602679,-1.005441 0.29519,-1.532101l-4.919828,-8.29489c-0.307489,-0.51469 -0.947067,-0.730142 -1.500548,-0.51469l-6.125186,2.405877c-1.266856,-0.945594 -2.656707,-1.747553 -4.157255,-2.357999l-0.922468,-6.343855c-0.110696,-0.562568 -0.614979,-1.005441 -1.229957,-1.005441l-9.839656,0c-0.614979,0 -1.119261,0.442873 -1.217657,1.005441l-0.922468,6.343855c-1.500548,0.610446 -2.890399,1.400436 -4.157255,2.357999l-6.125186,-2.405877c-0.553481,-0.203482 -1.193058,0 -1.500548,0.51469l-4.919828,8.29489c-0.307489,0.51469 -0.172194,1.161045 0.29519,1.532101l5.190419,3.961917c-0.098397,0.76605 -0.172194,1.54407 -0.172194,2.33406s0.073797,1.56801 0.172194,2.33406l-5.190419,3.961917c-0.467384,0.359086 -0.602679,1.005441 -0.29519,1.532101l4.919828,8.29489c0.307489,0.51469 0.947067,0.730142 1.500548,0.51469l6.125186,-2.405877c1.266856,0.945594 2.656707,1.747553 4.157255,2.357999l0.922468,6.343855c0.098397,0.562568 0.602679,1.005441 1.217657,1.005441l9.839656,0c0.614979,0 1.119261,-0.442873 1.217657,-1.005441l0.922468,-6.343855c1.500548,-0.610446 2.890399,-1.400436 4.157255,-2.357999l6.125186,2.405877c0.553481,0.203482 1.193058,0 1.500548,-0.51469l4.919828,-8.29489c0.307489,-0.51469 0.172194,-1.161045 -0.29519,-1.532101l-5.190419,-3.961917zm-18.277162,6.044617c-4.759934,0 -8.609699,-3.746465 -8.609699,-8.378677s3.849766,-8.378677 8.609699,-8.378677s8.609699,3.746465 8.609699,8.378677s-3.849766,8.378677 -8.609699,8.378677z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 18 18"> <g fill-rule="evenodd" stroke="none" stroke-width="1"> <g transform="translate(-381.000000, -381.000000)"> <g transform="translate(381.000000, 381.000000)"> <path d="M0,2 L2,2 L2,0 C0.9,0 0,0.9 0,2 L0,2 Z M0,10 L2,10 L2,8 L0,8 L0,10 L0,10 Z M4,18 L6,18 L6,16 L4,16 L4,18 L4,18 Z M0,6 L2,6 L2,4 L0,4 L0,6 L0,6 Z M10,0 L8,0 L8,2 L10,2 L10,0 L10,0 Z M16,0 L16,2 L18,2 C18,0.9 17.1,0 16,0 L16,0 Z M2,18 L2,16 L0,16 C0,17.1 0.9,18 2,18 L2,18 Z M0,14 L2,14 L2,12 L0,12 L0,14 L0,14 Z M6,0 L4,0 L4,2 L6,2 L6,0 L6,0 Z M8,18 L10,18 L10,16 L8,16 L8,18 L8,18 Z M16,10 L18,10 L18,8 L16,8 L16,10 L16,10 Z M16,18 C17.1,18 18,17.1 18,16 L16,16 L16,18 L16,18 Z M16,6 L18,6 L18,4 L16,4 L16,6 L16,6 Z M16,14 L18,14 L18,12 L16,12 L16,14 L16,14 Z M12,18 L14,18 L14,16 L12,16 L12,18 L12,18 Z M12,2 L14,2 L14,0 L12,0 L12,2 L12,2 Z M4,14 L14,14 L14,4 L4,4 L4,14 L4,14 Z M6,6 L12,6 L12,12 L6,12 L6,6 L6,6 Z"/> </g> </g> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M896 960v448q0 26-19 45t-45 19-45-19l-144-144-332 332q-10 10-23 10t-23-10l-114-114q-10-10-10-23t10-23l332-332-144-144q-19-19-19-45t19-45 45-19h448q26 0 45 19t19 45zm755-672q0 13-10 23l-332 332 144 144q19 19 19 45t-19 45-45 19h-448q-26 0-45-19t-19-45v-448q0-26 19-45t45-19 45 19l144 144 332-332q10-10 23-10t23 10l114 114q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M553 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 48 48"> <path d="M6 42h4v-4h-4v4zm4-28h-4v4h4v-4zm-4 20h4v-4h-4v4zm8 8h4v-4h-4v4zm-4-36h-4v4h4v-4zm8 0h-4v4h4v-4zm16 0h-4v4h4v-4zm-8 8h-4v4h4v-4zm0-8h-4v4h4v-4zm12 28h4v-4h-4v4zm-16 8h4v-4h-4v4zm-16-16h36v-4h-36v4zm32-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-16 16h4v-4h-4v4zm8 8h4v-4h-4v4zm8 0h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 48 48"> <path d="M6 18h4v-4h-4v4zm0-8h4v-4h-4v4zm8 32h4v-4h-4v4zm0-16h4v-4h-4v4zm-8 0h4v-4h-4v4zm0 16h4v-4h-4v4zm0-8h4v-4h-4v4zm8-24h4v-4h-4v4zm24 24h4v-4h-4v4zm-16 8h4v-36h-4v36zm16 0h4v-4h-4v4zm0-16h4v-4h-4v4zm0-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-8-8h4v-4h-4v4zm0 32h4v-4h-4v4zm0-16h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1760 896q14 0 23 9t9 23v64q0 14-9 23t-23 9h-1728q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h1728zm-1277-64q-28-35-51-80-48-97-48-188 0-181 134-309 133-127 393-127 50 0 167 19 66 12 177 48 10 38 21 118 14 123 14 183 0 18-5 45l-12 3-84-6-14-2q-50-149-103-205-88-91-210-91-114 0-182 59-67 58-67 146 0 73 66 140t279 129q69 20 173 66 58 28 95 52h-743zm507 256h411q7 39 7 92 0 111-41 212-23 55-71 104-37 35-109 81-80 48-153 66-80 21-203 21-114 0-195-23l-140-40q-57-16-72-28-8-8-8-22v-13q0-108-2-156-1-30 0-68l2-37v-44l102-2q15 34 30 71t22.5 56 12.5 27q35 57 80 94 43 36 105 57 59 22 132 22 64 0 139-27 77-26 122-86 47-61 47-129 0-84-81-157-34-29-137-71z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm639 217v206h-514l-4-27q-3-45-3-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 80-65 188-65 110 0 178 59.5t68 158.5q0 66-34.5 118.5t-84 86-99.5 62.5-87 63-41 73h232v-80h126z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm637-679v206h-514l-3-27q-4-28-4-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 83-65 188-65 110 0 178 59.5t68 158.5q0 56-24.5 103t-62 76.5-81.5 58.5-82 50.5-65.5 51.5-30.5 63h232v-80h126z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm-1280-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M384 1408q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm0-512q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm-1408-928q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M176 223q-37-2-45-4l-3-88q13-1 40-1 60 0 112 4 132 7 166 7 86 0 168-3 116-4 146-5 56 0 86-2l-1 14 2 64v9q-60 9-124 9-60 0-79 25-13 14-13 132 0 13 .5 32.5t.5 25.5l1 229 14 280q6 124 51 202 35 59 96 92 88 47 177 47 104 0 191-28 56-18 99-51 48-36 65-64 36-56 53-114 21-73 21-229 0-79-3.5-128t-11-122.5-13.5-159.5l-4-59q-5-67-24-88-34-35-77-34l-100 2-14-3 2-86h84l205 10q76 3 196-10l18 2q6 38 6 51 0 7-4 31-45 12-84 13-73 11-79 17-15 15-15 41 0 7 1.5 27t1.5 31q8 19 22 396 6 195-15 304-15 76-41 122-38 65-112 123-75 57-182 89-109 33-255 33-167 0-284-46-119-47-179-122-61-76-83-195-16-80-16-237v-333q0-188-17-213-25-36-147-39zm1488 1409v-64q0-14-9-23t-23-9h-1472q-14 0-23 9t-9 23v64q0 14 9 23t23 9h1472q14 0 23-9t9-23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5t-264-204.5q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5t163.5-109.5 109.5-163.5 40.5-198.5-40.5-198.5-109.5-163.5-163.5-109.5-198.5-40.5q-98 0-188 35.5t-160 101.5l137 138q31 30 14 69-17 40-59 40h-448q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5t284.5-55.5q156 0 298 61t245 164 164 245 61 298z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M503 1271l-256 256q-10 9-23 9-12 0-23-9-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23zm169 41v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm-224-224q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm1264 128q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-334-335q-21-21-42-56l239-18 273 274q27 27 68 27.5t68-26.5l147-146q28-28 28-67 0-40-28-68l-274-275 18-239q35 21 56 42l336 336q84 86 84 204zm-617-724l-239 18-273-274q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l274 274-18 240q-35-21-56-42l-336-336q-84-86-84-204 0-120 85-203l147-146q83-83 203-83 121 0 204 85l334 335q21 21 42 56zm633 84q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm-544-544v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm407 151l-256 256q-11 9-23 9t-23-9q-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1639 1056q0 5-1 7-64 268-268 434.5t-478 166.5q-146 0-282.5-55t-243.5-157l-129 129q-19 19-45 19t-45-19-19-45v-448q0-26 19-45t45-19h448q26 0 45 19t19 45-19 45l-137 137q71 66 161 102t187 36q134 0 250-65t186-179q11-17 53-117 8-23 30-23h192q13 0 22.5 9.5t9.5 22.5zm25-800v448q0 26-19 45t-45 19h-448q-26 0-45-19t-19-45 19-45l138-138q-148-137-349-137-134 0-250 65t-186 179q-11 17-53 117-8 23-30 23h-199q-13 0-22.5-9.5t-9.5-22.5v-7q65-268 270-434.5t480-166.5q146 0 284 55.5t245 156.5l130-129q19-19 45-19t45 19 19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1344 1472q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28h-1472q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h427q21 56 70.5 92t110.5 36h256q61 0 110.5-36t70.5-92h427q40 0 68 28t28 68zm-325-648q-17 40-59 40h-256v448q0 26-19 45t-45 19h-256q-26 0-45-19t-19-45v-448h-256q-42 0-59-40-17-39 14-69l448-448q18-19 45-19t45 19l448 448q31 30 14 69z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1216 320q0 26-19 45t-45 19h-128v1024h128q26 0 45 19t19 45-19 45l-256 256q-19 19-45 19t-45-19l-256-256q-19-19-19-45t19-45 45-19h128v-1024h-128q-26 0-45-19t-19-45 19-45l256-256q19-19 45-19t45 19l256 256q19 19 19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 352v1088q0 42-39 59-13 5-25 5-27 0-45-19l-403-403v166q0 119-84.5 203.5t-203.5 84.5h-704q-119 0-203.5-84.5t-84.5-203.5v-704q0-119 84.5-203.5t203.5-84.5h704q119 0 203.5 84.5t84.5 203.5v165l403-402q18-19 45-19 12 0 25 5 39 17 39 59z"/> </svg>'}],e={};function s(i){var o=e[i];if(void 0!==o)return o.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";s.r(i),s.d(i,{Jodit:()=>Wi});var t={};s.r(t),s.d(t,{Ajax:()=>d,Alert:()=>A,Async:()=>h,CommitStyle:()=>xt,Component:()=>u.wA,Confirm:()=>O,ContextMenu:()=>g,Create:()=>F,Dialog:()=>R,Dom:()=>_.i,EventHandlersStore:()=>l.DG,EventsNative:()=>l.ng,FileBrowser:()=>ut,Helpers:()=>c,Icon:()=>k.JO,ImageEditor:()=>ot,ObserveObject:()=>l.P5,Observer:()=>gt,Plugin:()=>H,PluginSystem:()=>Tt.h,Popup:()=>k.GI,ProgressBar:()=>k.ko,Prompt:()=>B,STATUSES:()=>u.n$,Select:()=>vt,Snapshot:()=>pt,StatusBar:()=>Et,Table:()=>St,ToolbarButton:()=>L,ToolbarCollection:()=>T,ToolbarContent:()=>z,ToolbarEditorCollection:()=>I,UIBlock:()=>k.eC,UIButton:()=>k.y3,UICheckbox:()=>k.mA,UIElement:()=>k.u1,UIForm:()=>k.x4,UIGroup:()=>k.qe,UIInput:()=>k.u3,UIList:()=>k.bz,UISeparator:()=>k.lU,UITextArea:()=>k.GJ,Uploader:()=>kt,View:()=>S,ViewComponent:()=>u.Hr,ViewWithToolbar:()=>N,defaultNameSpace:()=>l.rO});var e={};s.r(e),s.d(e,{Delete:()=>Vt,DragAndDrop:()=>le,DragAndDropElement:()=>ce,KeyArrowOutside:()=>ue,WrapTextNodes:()=>Gt,about:()=>Nt,addNewLine:()=>Dt,bold:()=>Yt,classSpan:()=>At,cleanHtml:()=>Ut,clipboard:()=>Zt,color:()=>ae,copyFormat:()=>ne,enter:()=>de,errorMessages:()=>fe,file:()=>Be,focus:()=>Rt,font:()=>me,formatBlock:()=>ge,fullsize:()=>ve,hotkeys:()=>be,hr:()=>qe,iframe:()=>we,image:()=>ke,imageProcessor:()=>_e,imageProperties:()=>Se,indent:()=>Ie,inlinePopup:()=>Le,justify:()=>Me,limit:()=>Pe,link:()=>Ne,media:()=>Re,mobile:()=>Oe,orderedList:()=>Fe,paste:()=>te,pasteStorage:()=>ee,placeholder:()=>$e,preview:()=>ps,print:()=>fs,redoUndo:()=>We,resizeCells:()=>rs,resizeHandler:()=>Ke,resizer:()=>Ye,search:()=>Ue,select:()=>Ge,selectCells:()=>cs,size:()=>Xe,source:()=>es,stat:()=>ss,sticky:()=>is,symbols:()=>os,table:()=>ds,tableKeyboardNavigation:()=>hs,tooltip:()=>us,video:()=>Ae,xpath:()=>ms});var o={};s.r(o),s.d(o,{about:()=>gs,addcolumn:()=>vs,addrow:()=>bs,angle_down:()=>ws,angle_left:()=>ys,angle_right:()=>Cs,angle_up:()=>js,arrows_alt:()=>xs,arrows_h:()=>Es,attachment:()=>Ss,bin:()=>_s,bold:()=>ks,brush:()=>Ts,cancel:()=>Is,center:()=>qs,chain_broken:()=>Ls,check:()=>zs,check_square:()=>Ms,chevron:()=>Ps,copy:()=>Rs,copyformat:()=>Ds,crop:()=>Ns,cut:()=>As,dedent:()=>Bs,dots:()=>Os,enter:()=>Hs,eraser:()=>Fs,eye:()=>$s,file:()=>Ws,folder:()=>Vs,font:()=>Ys,fontsize:()=>Us,fullsize:()=>Gs,hr:()=>Ks,image:()=>Xs,indent:()=>Js,info_circle:()=>Zs,italic:()=>Qs,justify:()=>ti,left:()=>ei,link:()=>si,lock:()=>ii,menu:()=>oi,merge:()=>ni,ok:()=>ri,ol:()=>ai,omega:()=>li,outdent:()=>ci,palette:()=>hi,paragraph:()=>di,paste:()=>ui,pencil:()=>pi,plus:()=>fi,print:()=>mi,redo:()=>gi,resize:()=>vi,resizer:()=>bi,right:()=>wi,save:()=>yi,search:()=>Ci,select_all:()=>xi,settings:()=>ji,shrink:()=>Ei,source:()=>Si,splitg:()=>_i,splitv:()=>ki,strikethrough:()=>Ti,subscript:()=>Ii,superscript:()=>qi,table:()=>Li,th:()=>zi,th_list:()=>Mi,ul:()=>Pi,underline:()=>Di,undo:()=>Ni,unlink:()=>Ri,unlock:()=>Ai,update:()=>Bi,upload:()=>Oi,valign:()=>Hi,video:()=>Fi});var n=s(39),r=s(1),a=s(2),l=s(3),c=s(8);class h{constructor(){var t,e,s,i;this.timers=new Map,this.promisesRejections=new Set,this.requestsIdle=new Set,this.requestIdleCallbackNative=null!==(e=null===(t=window.requestIdleCallback)||void 0===t?void 0:t.bind(window))&&void 0!==e?e:t=>{const e=Date.now();return this.setTimeout((()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))})}),1)},this.cancelIdleCallbackNative=null!==(i=null===(s=window.cancelIdleCallback)||void 0===s?void 0:s.bind(window))&&void 0!==i?i:t=>{this.clearTimeout(t)},this.isDestructed=!1}setTimeout(t,e,...s){if(this.isDestructed)return 0;let i={};(0,c.isNumber)(e)||(i=e,e=i.timeout||0),i.label&&this.clearLabel(i.label);const o=(0,c.setTimeout)(t,e,...s);return this.timers.set(i.label||o,o),o}clearLabel(t){t&&this.timers.has(t)&&((0,c.clearTimeout)(this.timers.get(t)),this.timers.delete(t))}clearTimeout(t){if((0,c.isString)(t))return this.clearLabel(t);(0,c.clearTimeout)(t),this.timers.delete(t)}debounce(t,e,s=!1){let i=0,o=!1;const n=[],r=(...e)=>{if(!o){i=0;const s=t(...e);if(o=!0,n.length){const t=()=>{n.forEach((t=>t())),n.length=0};(0,c.isPromise)(s)?s.finally(t):t()}}},a=(...n)=>{o=!1,e?(!i&&s&&r(...n),(0,c.clearTimeout)(i),i=this.setTimeout((()=>r(...n)),(0,c.isFunction)(e)?e():e),this.timers.set(t,i)):r(...n)};return(0,c.isPlainObject)(e)&&e.promisify?(...t)=>{const e=this.promise((t=>{n.push(t)}));return a(...t),e}:a}throttle(t,e,s=!1){let i,o,n,r=null;return(...s)=>{i=!0,n=s,e?r||(o=()=>{i?(t(...n),i=!1,r=this.setTimeout(o,(0,c.isFunction)(e)?e():e),this.timers.set(o,r)):r=null},o()):t(...n)}}promise(t){let e=()=>{};const s=new Promise(((s,i)=>(this.promisesRejections.add(i),e=i,t(s,i))));return s.finally((()=>{this.promisesRejections.delete(e)})),s.rejectCallback=e,s}promiseState(t){if(t.status)return t.status;if(!Promise.race)return new Promise((e=>{t.then((t=>(e("fulfilled"),t)),(t=>{throw e("rejected"),t})),this.setTimeout((()=>{e("pending")}),100)}));const e={};return Promise.race([t,e]).then((t=>t===e?"pending":"fulfilled"),(()=>"rejected"))}requestIdleCallback(t){const e=this.requestIdleCallbackNative(t);return this.requestsIdle.add(e),e}requestIdlePromise(){return new Promise((t=>{const e=this.requestIdleCallback((()=>t(e)))}))}cancelIdleCallback(t){return this.requestsIdle.delete(t),this.cancelIdleCallbackNative(t)}clear(){this.requestsIdle.forEach((t=>{this.cancelIdleCallback(t)})),this.timers.forEach((t=>{(0,c.clearTimeout)(this.timers.get(t))})),this.timers.clear(),this.promisesRejections.forEach((t=>{t()})),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}}r.D.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr(){return new XMLHttpRequest}};class d{constructor(t,e){this.jodit=t,this.success_response_codes=[200,201,202],this.resolved=!1,this.activated=!1,this.options=(0,c.ConfigProto)(e||{},r.D.prototype.defaultAjaxOptions),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest,t&&t.events&&t.e.on("beforeDestruct",(()=>{this.abort()}))}__buildParams(t,e){return(0,c.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,t,e):(0,c.isString)(t)||this.j.ow.FormData&&t instanceof this.j.ow.FormData?t:(0,c.buildQuery)(t)}get o(){return this.options}get j(){return this.jodit}abort(){try{this.xhr.abort()}catch(t){}return this}send(){return this.activated=!0,new Promise(((t,e)=>{const s=t=>{let e=null;if("json"===this.o.dataType&&(e=JSON.parse(t)),!e)throw(0,c.error)("No JSON format");return e};this.xhr.onabort=()=>{e((0,c.error)(this.xhr.statusText))},this.xhr.onerror=()=>{e((0,c.error)(this.xhr.statusText))},this.xhr.ontimeout=()=>{e((0,c.error)(this.xhr.statusText))},this.xhr.onload=()=>{this.response=this.xhr.responseText,this.status=this.xhr.status,this.resolved=!0,t.call(this.xhr,s(this.response)||{})},this.xhr.onprogress=t=>{var e,s;let i=0;t.lengthComputable&&(i=t.loaded/t.total*100),null===(s=(e=this.options).onProgress)||void 0===s||s.call(e,i)},this.xhr.onreadystatechange=()=>{var i,o;if(null===(o=(i=this.options).onProgress)||void 0===o||o.call(i,10),this.xhr.readyState===XMLHttpRequest.DONE){const i=this.xhr.responseText;this.response=i,this.status=this.xhr.status,this.resolved=!0,this.success_response_codes.indexOf(this.xhr.status)>-1?t.call(this.xhr,s(i)):e.call(this.xhr,(0,c.error)(this.xhr.statusText||this.j.i18n("Connection error!")))}},this.xhr.withCredentials=this.o.withCredentials||!1;const{url:i,data:o,method:n}=this.prepareRequest();this.xhr.open(n,i,!0),this.o.contentType&&this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-type",this.o.contentType),this.o.headers&&this.xhr.setRequestHeader&&(0,c.each)(this.o.headers,((t,e)=>{this.xhr.setRequestHeader(t,e)})),setTimeout((()=>{this.xhr.send(o?this.__buildParams(o):void 0)}),0)}))}prepareRequest(){if(!this.o.url)throw(0,c.error)("Need URL for AJAX request");let t=this.o.url;const e=this.o.data,s=(this.o.method||"get").toLowerCase();if("get"===s&&e&&(0,c.isPlainObject)(e)){const s=t.indexOf("?");if(-1!==s){const i=(0,c.parseQuery)(t);t=t.substr(0,s)+"?"+(0,c.buildQuery)({...i,...e})}else t+="?"+(0,c.buildQuery)(this.o.data)}const i={url:t,method:s,data:e};return d.log.splice(100),d.log.push(i),i}destruct(){this.activated&&!this.resolved&&(this.abort(),this.resolved=!0)}}d.log=[];var u=s(12),p=s(42),f=s(33),m=s(16);class g extends p.G{className(){return"ContextMenu"}show(t,e,s){const i=this,o=this.j.c.div("jodit-context-menu__actions");(0,m.kJ)(s)&&(s.forEach((t=>{if(!t)return;const e=(0,f.zx)(this.jodit,t.icon||"empty",t.title);this.jodit&&e.setParentView(this.jodit),e.setMod("context","menu"),e.onAction((e=>{var s;return null===(s=t.exec)||void 0===s||s.call(i,e),i.close(),!1})),o.appendChild(e.container)})),super.setContent(o).open((()=>({left:t,top:e,width:0,height:0})),!0))}}const v=(()=>{let t;return()=>(void 0===t&&(t=(()=>{const t="___Jodit___"+Math.random();try{localStorage.setItem(t,"1");const e="1"===localStorage.getItem(t);return localStorage.removeItem(t),e}catch(t){}return!1})()),t)})();class b{constructor(t){this.rootKey=t}set(t,e){try{const s=localStorage.getItem(this.rootKey),i=s?JSON.parse(s):{};i[t]=e,localStorage.setItem(this.rootKey,JSON.stringify(i))}catch(t){}}delete(t){try{localStorage.removeItem(this.rootKey)}catch(t){}}get(t){try{const e=localStorage.getItem(this.rootKey),s=e?JSON.parse(e):{};return void 0!==s[t]?s[t]:null}catch(t){}}exists(t){return null!=this.get(t)}clear(){try{localStorage.removeItem(this.rootKey)}catch(t){}}}class w{constructor(){this.data=new Map}set(t,e){this.data.set(t,e)}delete(t){this.data.delete(t)}get(t){return this.data.get(t)}exists(t){return this.data.has(t)}clear(){this.data.clear()}}const y="Jodit_";class C{constructor(t,e){this.provider=t,this.prefix=y,e&&(this.prefix+=e)}set(t,e){this.provider.set((0,c.camelCase)(this.prefix+t),e)}delete(t){this.provider.delete((0,c.camelCase)(this.prefix+t))}get(t){return this.provider.get((0,c.camelCase)(this.prefix+t))}exists(t){return this.provider.exists((0,c.camelCase)(this.prefix+t))}clear(){return this.provider.clear()}static makeStorage(t=!1,e){let s;return t&&v()&&(s=new b(y+e)),s||(s=new w),new C(s,e)}}var j=s(13),x=s(36),E=s(29);class S extends u.wA{constructor(t,e=!1){super(),this.isJodit=e,this.isView=!0,this.mods={},this.components=new Set,this.version="3.8.4",this.async=new h,this.buffer=C.makeStorage(),this.storage=C.makeStorage(!0,this.componentName),this.OPTIONS=S.defaultOptions,this.__isFullSize=!1,this.__whoLocked="",this.isLockedNotBy=t=>this.isLocked&&this.__whoLocked!==t,this.__modulesInstances=new Map,this.id=""+(new Date).getTime(),this.buffer=C.makeStorage(),this.initOptions(t),this.initOwners(),this.events=new l.ng(this.od),this.create=new F(this.od),this.container=this.c.div(),this.container.classList.add("jodit"),this.progressbar=new k.ko(this)}setMod(t,e){return E.$.setMod.call(this,t,e),this}getMod(t){return E.$.getMod.call(this,t)}getElm(t){return E.F.getElm.call(this,t)}getElms(t){return E.F.getElms.call(this,t)}get basePath(){return this.o.basePath?this.o.basePath:a.BASE_PATH}get defaultTimeout(){return(0,c.isVoid)(this.o.defaultTimeout)?100:this.o.defaultTimeout}get c(){return this.create}get container(){return this.__container}set container(t){this.__container=t}get e(){return this.events}get options(){return this.__options}set options(t){this.__options=t}get o(){return this.options}i18n(t,...e){return(0,c.i18n)(t,e,this.options)}toggleFullSize(t){void 0===t&&(t=!this.__isFullSize),t!==this.__isFullSize&&(this.__isFullSize=t,this.events&&this.e.fire("toggleFullSize",t))}get isLocked(){return""!==this.__whoLocked}lock(t="any"){return!this.isLocked&&(this.__whoLocked=t,!0)}unlock(){return!!this.isLocked&&(this.__whoLocked="",!0)}get isFullSize(){return this.__isFullSize}getVersion(){return"3.8.4"}static getVersion(){return"3.8.4"}initOptions(t){this.options=(0,c.ConfigProto)(t||{},(0,c.ConfigProto)(this.options||{},S.defaultOptions))}initOwners(){var t;this.ownerWindow=null!==(t=this.o.ownerWindow)&&void 0!==t?t:window}attachEvents(t){if(!t)return;const e=null==t?void 0:t.events;e&&Object.keys(e).forEach((t=>this.e.on(t,e[t])))}getInstance(t,e){const s=this.e.fire((0,c.camelCase)("getInstance_"+t),e);if(s)return s;const i=j.qz[t],o=this.__modulesInstances;if(!(0,c.isFunction)(i))throw(0,c.error)("Need real module name");if(!o.has(t)){const s=i.prototype instanceof u.Hr?new i(this,e):new i(e);this.components.add(s),o.set(t,s)}return o.get(t)}addDisclaimer(t){this.container.appendChild(t)}beforeDestruct(){this.e.fire(u.n$.beforeDestruct,this),this.components.forEach((t=>{(0,c.isDestructable)(t)&&!t.isInDestruct&&t.destruct()})),this.components.clear()}destruct(){this.isDestructed||(this.async&&this.async.destruct(),this.events&&this.e.destruct(),this.buffer&&this.buffer.clear(),_.i.safeRemove(this.container),super.destruct())}}(0,n.gn)([(0,x.hook)(u.n$.beforeDestruct)],S.prototype,"beforeDestruct",null),S.defaultOptions={extraButtons:[],textIcons:!1,namespace:"",removeButtons:[],zIndex:100002,defaultTimeout:100,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullSize:!0};var _=s(15),k=s(27);let T=class extends k.bz{constructor(t){super(t),this.listenEvents="updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur",this.update=this.j.async.debounce(this.immediateUpdate,(()=>this.j.defaultTimeout)),this.initEvents()}className(){return"ToolbarCollection"}get firstButton(){const[t]=this.buttons;return t||null}makeButton(t,e=null){return P(this.j,t,e)}shouldBeActive(t){return!((0,c.isJoditObject)(this.j)&&!this.j.editorIsActive)&&((0,c.isFunction)(t.control.isActive)?t.control.isActive(this.j,t.control,t):void 0)}shouldBeDisabled(t){if(this.j.o.disabled)return!0;if(this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(t.control.name)))return!0;let e;return(0,c.isFunction)(t.control.isDisabled)&&(e=t.control.isDisabled(this.j,t.control,t)),e}getTarget(t){return t.target||null}immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar"))}setDirection(t){this.container.style.direction=t,this.container.setAttribute("dir",t)}initEvents(){this.j.e.on(this.listenEvents,this.update).on("afterSetMode focus",this.immediateUpdate)}build(t,e=null){const s=this.j.e.fire("beforeToolbarBuild",t);return s&&(t=s),super.build(t,e),this}destruct(){this.isDestructed||(this.j.e.off(this.listenEvents,this.update).off("afterSetMode focus",this.immediateUpdate),super.destruct())}};(0,n.gn)([x.autobind],T.prototype,"immediateUpdate",null),T=(0,n.gn)([x.component],T);let I=class extends T{constructor(t){super(t),this.checkActiveStatus=(t,e)=>{let s=0,i=0;return Object.keys(t).forEach((o=>{const n=t[o];(0,c.isFunction)(n)?n(this.j,""+(0,c.css)(e,o))&&(s+=1):-1!==n.indexOf(""+(0,c.css)(e,o))&&(s+=1),i+=1})),i===s},this.prependInvisibleInput(this.container)}className(){return"ToolbarEditorCollection"}shouldBeDisabled(t){const e=super.shouldBeDisabled(t);if(void 0!==e)return e;const s=void 0===t.control.mode?a.MODE_WYSIWYG:t.control.mode;return!(s===a.MODE_SPLIT||s===this.j.getRealMode())}shouldBeActive(t){const e=super.shouldBeActive(t);if(void 0!==e)return e;const s=this.j.selection?this.j.s.current():null;if(!s)return!1;let i;if(t.control.tags){const e=t.control.tags;if(i=s,_.i.up(i,(t=>{if(t&&-1!==e.indexOf(t.nodeName.toLowerCase()))return!0}),this.j.editor))return!0}if(t.control.css){const e=t.control.css;if(i=s,_.i.up(i,(t=>{if(t&&!_.i.isText(t))return this.checkActiveStatus(e,t)}),this.j.editor))return!0}return!1}getTarget(t){return t.target||this.j.s.current()||null}prependInvisibleInput(t){const e=this.j.create.element("input",{tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});_.i.appendChildFirst(t,e)}};I=(0,n.gn)([x.component],I);var q=s(35);let L=class extends f.y3{constructor(t,e,s=null){super(t),this.control=e,this.target=s,this.state={...(0,f.Yc)(),theme:"toolbar",currentValue:"",hasTrigger:!1},t.e.on([this.button,this.trigger],"mousedown",(t=>t.preventDefault())),this.onAction(this.onClick),this.hookStatus(u.n$.ready,(()=>{this.initFromControl(),this.initTooltip(),this.update()}))}className(){return"ToolbarButton"}get toolbar(){return this.closest(T)}get button(){return this.container.querySelector(`button.${this.componentName}__button`)}update(){const{control:t,state:e}=this,s=this.closest(T);s&&(e.disabled=!!s.shouldBeDisabled(this),e.activated=!!s.shouldBeActive(this)),(0,c.isFunction)(t.update)&&t.update(this),super.update()}onChangeActivated(){(0,c.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,c.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,c.attr)(this.button,"tabIndex",this.state.tabIndex)}onChangeTooltip(){(0,c.attr)(this.button,"aria-label",this.state.tooltip),super.onChangeTooltip()}createContainer(){const t=this.componentName,e=this.j.c.span(t),s=super.createContainer();return(0,c.attr)(e,"role","listitem"),s.classList.remove(t),s.classList.add(t+"__button"),Object.defineProperty(s,"component",{value:this}),e.appendChild(s),this.trigger=this.j.c.fromHTML(`<span role="trigger" class="${t}__trigger">${k.JO.get("chevron")}</span>`),this.j.e.on(this.trigger,"click",this.onTriggerClick.bind(this)),e}focus(){var t;null===(t=this.container.querySelector("button"))||void 0===t||t.focus()}onChangeHasTrigger(){this.state.hasTrigger?this.container.appendChild(this.trigger):_.i.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){const t=this.state.disabled?"disabled":null;(0,c.attr)(this.trigger,"disabled",t),(0,c.attr)(this.button,"disabled",t),(0,c.attr)(this.container,"disabled",t)}initTooltip(){this.j.o.textIcons||!this.j.o.showTooltip||this.j.o.useNativeTooltip||this.j.e.off(this.container,"mouseenter mouseleave").on(this.container,"mousemove",(t=>{this.state.tooltip&&!this.state.disabled&&this.j.e.fire("delayShowTooltip",(()=>({x:t.clientX+10,y:t.clientY+10})),this.state.tooltip)})).on(this.container,"mouseleave",(()=>{this.j.e.fire("hideTooltip")}))}initFromControl(){var t;const{control:e,state:s}=this;this.updateSize(),s.name=e.name;const{textIcons:i}=this.j.o;if(!0===i||(0,c.isFunction)(i)&&i(e.name)||e.template)s.icon=(0,f.Yc)().icon,s.text=e.text||e.name;else{if(e.iconURL)s.icon.iconURL=e.iconURL;else{const i=e.icon||e.name;s.icon.name=k.JO.exists(i)||(null===(t=this.j.o.extraIcons)||void 0===t?void 0:t[i])?i:""}e.iconURL||s.icon.name||(s.text=e.text||e.name)}e.tooltip&&(s.tooltip=this.j.i18n((0,c.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip)),s.hasTrigger=!!(e.list||e.popup&&e.exec)}onTriggerClick(t){var e,s,i;const{control:o}=this;if(t.buffer={actionTrigger:this},o.list)return this.openControlList(o);if((0,c.isFunction)(o.popup)){const t=new p.G(this.j);if(t.parentElement=this,!1!==this.j.e.fire((0,c.camelCase)(`before-${o.name}-open-popup`),this.target,o,t)){const n=null!==(i=null!==(s=null===(e=this.toolbar)||void 0===e?void 0:e.getTarget(this))&&void 0!==s?s:this.target)&&void 0!==i?i:null,r=o.popup(this.j,n,o,t.close,this);r&&t.setContent((0,c.isString)(r)?this.j.c.fromHTML(r):r).open((()=>(0,c.position)(this.container)))}this.j.e.fire((0,c.camelCase)(`after-${o.name}-open-popup`),t.container)}}openControlList(t){var e;const s=null!==(e=this.jodit.options.controls)&&void 0!==e?e:{},i=t=>(0,q.z)(t,s),o=t.list,n=new p.G(this.j),r=M(this.j);n.parentElement=this,r.parentElement=n,r.mode="vertical";const a=(e,s)=>{if((0,c.isString)(s)&&i(s))return{name:""+s,...i(s)};if((0,c.isString)(e)&&i(e))return{name:""+e,...i(e),..."object"==typeof s?s:{}};const o={name:""+e,template:t.childTemplate,exec:t.exec,data:t.data,command:t.command,isActive:t.isChildActive,isDisabled:t.isChildDisabled,mode:t.mode,args:[...t.args?t.args:[],e,s]};return(0,c.isString)(s)&&(o.text=s),o};r.build((0,c.isArray)(o)?o.map(a):(0,c.keys)(o,!1).map((t=>a(t,o[t]))),this.target),n.setContent(r.container).open((()=>(0,c.position)(this.container))),this.state.activated=!0,this.j.e.on(n,"afterClose",(()=>{this.state.activated=!1}))}onClick(t){var e,s,i,o,n,r,a;const{control:l}=this;if((0,c.isFunction)(l.exec)){const c=null!==(i=null!==(s=null===(e=this.toolbar)||void 0===e?void 0:e.getTarget(this))&&void 0!==s?s:this.target)&&void 0!==i?i:null,h=l.exec(this.j,c,{control:l,originalEvent:t,button:this});if(!1!==h&&!0!==h&&(null===(n=null===(o=this.j)||void 0===o?void 0:o.e)||void 0===n||n.fire("synchro"),this.parentElement&&this.parentElement.update(),null===(a=null===(r=this.j)||void 0===r?void 0:r.e)||void 0===a||a.fire("closeAllPopups afterExec")),!1!==h)return}return l.list?this.openControlList(l):(0,c.isFunction)(l.popup)?this.onTriggerClick(t):void((l.command||l.name)&&((0,c.call)((0,c.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),l.command||l.name,!1,l.args&&l.args[0]),this.j.e.fire("closeAllPopups")))}};(0,n.gn)([(0,x.watch)("state.tooltip")],L.prototype,"onChangeTooltip",null),(0,n.gn)([(0,x.watch)("state.hasTrigger")],L.prototype,"onChangeHasTrigger",null),L=(0,n.gn)([x.component],L);let z=class extends f.y3{constructor(t,e,s=null){super(t),this.control=e,this.target=s,this.container.classList.add(`${this.componentName}_${this.clearName(e.name)}`),(0,c.attr)(this.container,"role","content")}className(){return"ToolbarContent"}update(){const t=this.control.getContent(this.j,this.control,this);((0,c.isString)(t)||t.parentNode!==this.container)&&(_.i.detach(this.container),this.container.appendChild((0,c.isString)(t)?this.j.create.fromHTML(t):t)),super.update()}createContainer(){return this.j.c.span(this.componentName)}};function M(t,e){const s=(0,c.isJoditObject)(t)?new I(t):new T(t);return t.o.textIcons&&s.container.classList.add("jodit_text_icons"),e&&(s.parentElement=e),t.o.toolbarButtonSize&&(s.buttonSize=t.o.toolbarButtonSize),s}function P(t,e,s=null){if((0,c.isFunction)(e.getContent))return new z(t,e,s);const i=new L(t,e,s);return i.state.tabIndex=t.o.allowTabNavigation?0:-1,i}z=(0,n.gn)([x.component],z);var D=s(41);class N extends S{constructor(t,e=!1){super(t,e),this.toolbar=M(this),this.defaultToolbarContainer=this.c.div("jodit-toolbar__box"),this.registeredButtons=new Set,this.groupToButtons={},this.isJodit=!1,this.isJodit=e,this.e.on("beforeToolbarBuild",this.beforeToolbarBuild)}get toolbarContainer(){return this.o.fullsize||!(0,c.isString)(this.o.toolbar)&&!_.i.isHTMLElement(this.o.toolbar)?(this.o.toolbar&&_.i.appendChildFirst(this.container,this.defaultToolbarContainer),this.defaultToolbarContainer):(0,c.resolveElement)(this.o.toolbar,this.o.shadowRoot||this.od)}setPanel(t){this.o.toolbar=t,this.buildToolbar()}buildToolbar(){if(!this.o.toolbar)return;const t=this.o.buttons?(0,c.splitArray)(this.o.buttons):[];this.toolbar.setRemoveButtons(this.o.removeButtons).build(t.concat(this.o.extraButtons||[])).appendTo(this.toolbarContainer)}registerButton(t){var e;this.registeredButtons.add(t);const s=null!==(e=t.group)&&void 0!==e?e:"other";return this.groupToButtons[s]||(this.groupToButtons[s]=[]),null!=t.position?this.groupToButtons[s][t.position]=t.name:this.groupToButtons[s].push(t.name),this}unregisterButton(t){var e;this.registeredButtons.delete(t);const s=null!==(e=t.group)&&void 0!==e?e:"other",i=this.groupToButtons[s];if(i){const e=i.indexOf(t.name);-1!==e&&i.splice(e,1),0===i.length&&delete this.groupToButtons[s]}return this}beforeToolbarBuild(t){if(Object.keys(this.groupToButtons).length)return t.map((t=>(0,D.A)(t)&&t.group&&this.groupToButtons[t.group]?{group:t.group,buttons:[...t.buttons,...this.groupToButtons[t.group]]}:t))}destruct(){this.isDestructed||(this.setStatus(u.n$.beforeDestruct),this.e.off("beforeToolbarBuild",this.beforeToolbarBuild),this.toolbar.destruct(),super.destruct())}}(0,n.gn)([x.autobind],N.prototype,"beforeToolbarBuild",null),r.D.prototype.dialog={namespace:"",extraButtons:[],resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[]},r.D.prototype.controls.dialog={close:{icon:"cancel",exec(t){t.close(),t.toggleFullSizeBox(!1)}}};let R=class extends N{constructor(t){super(t),this.destroyAfterClose=!1,this.moved=!1,this.iSetMaximization=!1,this.resizable=!1,this.draggable=!1,this.startX=0,this.startY=0,this.startPoint={x:0,y:0,w:0,h:0},this.lockSelect=()=>{this.setMod("moved",!0)},this.unlockSelect=()=>{this.setMod("moved",!1)},this.onResize=()=>{this.options&&this.o.resizable&&!this.moved&&this.isOpened&&!this.offsetX&&!this.offsetY&&this.setPosition()},this.isModal=!1,this.isOpened=!1;const e=this;e.options=(0,c.ConfigProto)(null!=t?t:{},(0,c.ConfigProto)({toolbarButtonSize:"middle"},(0,c.ConfigProto)(r.D.prototype.dialog,S.defaultOptions))),_.i.safeRemove(e.container);const s=this.getFullElName.bind(this);e.container=this.c.fromHTML(`<div style="z-index:${e.o.zIndex}" class="jodit jodit-dialog ${this.componentName}">\n\t\t\t\t<div class="${s("overlay")}"></div>\n\t\t\t\t<div class="${this.getFullElName("panel")}">\n\t\t\t\t\t<div class="${s("header")}">\n\t\t\t\t\t\t<div class="${s("header-title")}"></div>\n\t\t\t\t\t\t<div class="${s("header-toolbar")}"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="${s("content")}"></div>\n\t\t\t\t\t<div class="${s("footer")}"></div>\n\t\t\t\t\t${e.o.resizable?`<div class="${s("resizer")}"></div>`:""}\n\t\t\t\t</div>\n\t\t\t</div>`),(0,c.attr)(e.container,"role","dialog"),Object.defineProperty(e.container,"component",{value:this}),e.setMod("theme",e.o.theme||"default"),e.dialog=e.getElm("panel"),(0,c.css)(e.dialog,{maxWidth:e.options.maxWidth,minHeight:e.options.minHeight,minWidth:e.options.minWidth}),e.resizer=e.getElm("resizer"),e.dialogbox_header=e.getElm("header-title"),e.dialogbox_content=e.getElm("content"),e.dialogbox_footer=e.getElm("footer"),e.dialogbox_toolbar=e.getElm("header-toolbar");const i=e.getElm("header");i&&e.e.on(i,"mousedown",e.onHeaderMouseDown),e.o.resizable&&e.e.on(e.resizer,"mousedown",e.onResizerMouseDown);const o=j.pw.get("fullsize");(0,c.isFunction)(o)&&o(e),this.e.on(e.container,"close_dialog",e.close).on(this.ow,"keydown",this.onEsc).on(this.ow,"resize",this.onResize)}className(){return"Dialog"}get destination(){return this.od.body}setElements(t,e){const s=[];(0,c.asArray)(e).forEach((e=>{if((0,c.isArray)(e)){const i=this.c.div(this.getFullElName("column"));return s.push(i),t.appendChild(i),this.setElements(i,e)}let i;i=(0,c.isString)(e)?this.c.fromHTML(e):(0,c.hasContainer)(e)?e.container:e,s.push(i),i.parentNode!==t&&t.appendChild(i)})),(0,c.toArray)(t.childNodes).forEach((e=>{-1===s.indexOf(e)&&t.removeChild(e)}))}onMouseUp(){(this.draggable||this.resizable)&&(this.e.off(this.ow,"mousemove",this.onMouseMove),this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.e&&(this.removeGlobalResizeListeners(),this.e.fire(this,"endResize endMove")))}onHeaderMouseDown(t){const e=t.target;!this.o.draggable||e&&e.nodeName.match(/^(INPUT|SELECT)$/)||(this.draggable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.x=(0,c.css)(this.dialog,"left"),this.startPoint.y=(0,c.css)(this.dialog,"top"),this.setMaxZIndex(),t.preventDefault(),this.lockSelect(),this.addGlobalResizeListeners(),this.e&&this.e.fire(this,"startMove"))}onMouseMove(t){this.draggable&&this.o.draggable&&(this.setPosition(this.startPoint.x+t.clientX-this.startX,this.startPoint.y+t.clientY-this.startY),this.e&&this.e.fire(this,"move",t.clientX-this.startX,t.clientY-this.startY),t.stopImmediatePropagation()),this.resizable&&this.o.resizable&&(this.setSize(this.startPoint.w+t.clientX-this.startX,this.startPoint.h+t.clientY-this.startY),this.e&&this.e.fire(this,"resizeDialog",t.clientX-this.startX,t.clientY-this.startY))}onEsc(t){if(this.isOpened&&t.key===a.KEY_ESC&&!0!==this.getMod("static")){const e=this.getMaxZIndexDialog();e?e.close():this.close(),t.stopImmediatePropagation()}}onResizerMouseDown(t){this.resizable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.addGlobalResizeListeners(),this.e&&this.e.fire(this,"startResize")}addGlobalResizeListeners(){const t=this;t.e.on(t.ow,"mousemove",t.onMouseMove).on(t.ow,"mouseup",t.onMouseUp)}removeGlobalResizeListeners(){const t=this;t.e.off(t.ow,"mousemove",t.onMouseMove).off(t.ow,"mouseup",t.onMouseUp)}setSize(t,e){return null==t&&(t=this.dialog.offsetWidth),null==e&&(e=this.dialog.offsetHeight),(0,c.css)(this.dialog,{width:t,height:e}),this}calcAutoSize(){return this.setSize("auto","auto"),this.setSize(),this}setPosition(t,e){let s=this.ow.innerWidth/2-this.dialog.offsetWidth/2,i=this.ow.innerHeight/2-this.dialog.offsetHeight/2;return 0>s&&(s=0),0>i&&(i=0),void 0!==t&&void 0!==e&&(this.offsetX=t,this.offsetY=e,this.moved=Math.abs(t-s)>100||Math.abs(e-i)>100),this.dialog.style.left=(t||s)+"px",this.dialog.style.top=(e||i)+"px",this}setHeader(t){return this.setElements(this.dialogbox_header,t),this}setContent(t){return this.setElements(this.dialogbox_content,t),this}setFooter(t){return this.setElements(this.dialogbox_footer,t),this.setMod("footer",!!t),this}getZIndex(){return parseInt((0,c.css)(this.container,"zIndex"),10)||0}getMaxZIndexDialog(){let t,e,s=0,i=this;return(0,c.$$)(".jodit-dialog",this.destination).forEach((o=>{t=o.component,e=parseInt((0,c.css)(o,"zIndex"),10),t.isOpened&&!isNaN(e)&&e>s&&(i=t,s=e)})),i}setMaxZIndex(){let t=20000004,e=0;(0,c.$$)(".jodit-dialog",this.destination).forEach((s=>{e=parseInt((0,c.css)(s,"zIndex"),10),t=Math.max(isNaN(e)?0:e,t)})),this.container.style.zIndex=""+(t+1)}maximization(t){return(0,c.isVoid)(t)&&(t=!this.getMod("fullsize")),this.setMod("fullsize",t),this.toggleFullSizeBox(t),this.iSetMaximization=t,t}toggleFullSizeBox(t){[this.destination,this.destination.parentNode].forEach((e=>{e&&e.classList&&e.classList.toggle("jodit_fullsize-box_true",t)}))}open(t,e,s,i){if(j.TB.fire("closeAllPopups hideHelpers"),!1===this.e.fire(this,"beforeOpen"))return this;(0,c.isBoolean)(t)&&(s=t),(0,c.isBoolean)(e)&&(i=e),this.destroyAfterClose=!0===s;const o=(0,c.isBoolean)(t)?void 0:t,n=(0,c.isBoolean)(e)?void 0:e;return void 0!==n&&this.setHeader(n),o&&this.setContent(o),this.setMod("active",!0),this.isOpened=!0,this.setModal(i),this.destination.appendChild(this.container),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.o.fullsize&&this.maximization(!0),this.e.fire("afterOpen",this),this}setModal(t){return this.isModal=!!t,this.setMod("modal",this.isModal),this}close(t){var e,s;return this.isDestructed||!this.isOpened||!0===this.getMod("static")||(t&&(t.stopImmediatePropagation(),t.preventDefault()),this.e&&this.e.fire("beforeClose",this),this.setMod("active",!1),this.isOpened=!1,this.e.fire("toggleFullSize",!1),this.iSetMaximization&&this.maximization(!1),_.i.safeRemove(this.container),this.removeGlobalResizeListeners(),this.destroyAfterClose&&this.destruct(),null===(e=this.e)||void 0===e||e.fire(this,"afterClose"),null===(s=this.e)||void 0===s||s.fire(this.ow,"joditCloseDialog")),this}buildToolbar(){this.o.buttons&&this.toolbar.build((0,c.splitArray)(this.o.buttons)).setMod("mode","header").appendTo(this.dialogbox_toolbar)}destruct(){this.isInDestruct||(this.setStatus(u.n$.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())}};(0,n.gn)([x.autobind],R.prototype,"onMouseUp",null),(0,n.gn)([x.autobind],R.prototype,"onHeaderMouseDown",null),(0,n.gn)([x.autobind],R.prototype,"onMouseMove",null),(0,n.gn)([x.autobind],R.prototype,"onEsc",null),(0,n.gn)([x.autobind],R.prototype,"onResizerMouseDown",null),(0,n.gn)([x.autobind],R.prototype,"close",null),(0,n.gn)([(0,x.hook)("ready")],R.prototype,"buildToolbar",null),R=(0,n.gn)([x.component],R);const A=(t,e,s,i="jodit-dialog_alert")=>{(0,c.isFunction)(e)&&(s=e,e=void 0);const o=new R,n=o.c.div(i),r=(0,k.zx)(o,"ok","Ok");return(0,c.asArray)(t).forEach((t=>{n.appendChild(_.i.isNode(t)?t:o.c.fromHTML(t))})),r.onAction((()=>{s&&(0,c.isFunction)(s)&&!1===s(o)||o.close()})),o.setFooter([r]),o.open(n,e||" ",!0,!0),r.focus(),o},B=(t,e,s,i,o)=>{const n=new R,r=(0,k.zx)(n,"cancel","Cancel"),a=(0,k.zx)(n,"ok","Ok"),l=n.c.element("form",{class:"jodit-dialog_prompt"}),h=n.c.element("input",{autofocus:!0,class:"jodit-input"}),d=n.c.element("label");(0,c.isFunction)(e)&&(s=e,e=void 0),i&&(0,c.attr)(h,"placeholder",i),d.appendChild(n.c.text(t)),l.appendChild(d),l.appendChild(h),r.onAction(n.close);const u=()=>{s&&(0,c.isFunction)(s)&&!1===s(h.value)||n.close()};return a.onAction(u),n.e.on(l,"submit",(()=>(u(),!1))),n.setFooter([a,r]),n.open(l,e||" ",!0,!0),h.focus(),void 0!==o&&o.length&&(h.value=o,h.select()),n},O=(t,e,s)=>{const i=new R,o=i.c.fromHTML('<form class="jodit-dialog_prompt"></form>'),n=i.c.element("label");(0,c.isFunction)(e)&&(s=e,e=void 0),n.appendChild(i.c.fromHTML(t)),o.appendChild(n);const r=t=>()=>{s&&!1===s(t)||i.close()},a=(0,k.zx)(i,"cancel","Cancel"),l=(0,k.zx)(i,"ok","Yes");return a.onAction(r(!1)),l.onAction(r(!0)),i.e.on(o,"submit",(()=>(r(!0)(),!1))),i.setFooter([l,a]),i.open(o,e||" ",!0,!0),l.focus(),i};class H extends u.Hr{constructor(t){super(t),this.requires=[],this.buttons=[],this.hasStyle=!1,t.e.on("afterPluginSystemInit",(()=>{var e;(0,c.isJoditObject)(t)&&(null===(e=this.buttons)||void 0===e||e.forEach((e=>{t.registerButton(e)})))})).on("afterInit",(()=>{this.setStatus(u.n$.ready),this.afterInit(t)})).on("beforeDestruct",this.destruct)}className(){return""}init(t){}destruct(){var t,e,s;if(!this.isInDestruct){this.setStatus(u.n$.beforeDestruct);const{j:i}=this;(0,c.isJoditObject)(i)&&(null===(t=this.buttons)||void 0===t||t.forEach((t=>{null==i||i.unregisterButton(t)}))),null===(s=null===(e=this.j)||void 0===e?void 0:e.events)||void 0===s||s.off("beforeDestruct",this.destruct),this.beforeDestruct(this.j),super.destruct()}}}(0,n.gn)([x.autobind],H.prototype,"destruct",null);class F{constructor(t,e){this.document=t,this.createAttributes=e,this.applyAttributes=(t,e)=>{(0,c.each)(e,((e,s)=>{(0,c.isPlainObject)(s)&&"style"===e?(0,c.css)(t,s):("className"===e&&(e="class"),t.setAttribute((0,c.kebabCase)(e),""+s))}))}}get doc(){return(0,c.isFunction)(this.document)?this.document():this.document}element(t,e,s){const i=this.doc.createElement(t.toLowerCase());return this.applyCreateAttributes(i),e&&((0,c.isPlainObject)(e)?this.applyAttributes(i,e):s=e),s&&(0,c.asArray)(s).forEach((t=>i.appendChild((0,c.isString)(t)?this.fromHTML(t):t))),i}div(t,e,s){const i=this.element("div",e,s);return t&&(i.className=t),i}span(t,e,s){const i=this.element("span",e,s);return t&&(i.className=t),i}a(t,e,s){const i=this.element("a",e,s);return t&&(i.className=t),i}text(t){return this.doc.createTextNode(t)}fake(){return this.text(a.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(t,e){const s=this.div();s.innerHTML=""+t;const i=s.firstChild===s.lastChild&&s.firstChild?s.firstChild:s;if(_.i.safeRemove(i),e){const t=(0,c.refs)(i);Object.keys(e).forEach((s=>{const i=t[s];i&&!1===e[s]&&_.i.hide(i)}))}return i}applyCreateAttributes(t){if(this.createAttributes){const e=this.createAttributes;if(e&&e[t.tagName.toLowerCase()]){const s=e[t.tagName.toLowerCase()];(0,c.isFunction)(s)?s(t):(0,c.isPlainObject)(s)&&this.applyAttributes(t,s)}}}}const $="jodit-filebrowser",W=$+"__files-item",V='<i class="jodit-icon_loader"></i>';r.D.prototype.filebrowser={namespace:"",extraButtons:[],filter(t,e){return e=e.toLowerCase(),(0,c.isString)(t)?-1!==t.toLowerCase().indexOf(e):(0,c.isString)(t.name)?-1!==t.name.toLowerCase().indexOf(e):!(0,c.isString)(t.file)||-1!==t.file.toLowerCase().indexOf(e)},sortBy:"changed-desc",sort(t,e,s){const[i,o]=s.toLowerCase().split("-"),n="asc"===o,r=(t,e)=>e>t?n?-1:1:t>e?n?1:-1:0;if((0,c.isString)(t))return r(t.toLowerCase(),e.toLowerCase());if(void 0===t[i]||"name"===i)return(0,c.isString)(t.name)?r(t.name.toLowerCase(),e.name.toLowerCase()):(0,c.isString)(t.file)?r(t.file.toLowerCase(),e.file.toLowerCase()):0;switch(i){case"changed":{const s=new Date(t.changed).getTime(),i=new Date(e.changed).getTime();return n?s-i:i-s}case"size":{const s=(0,c.humanSizeToBytes)(t.size),i=(0,c.humanSizeToBytes)(e.size);return n?s-i:i-s}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,width:859,height:400,buttons:["filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.tiles","filebrowser.list","|","filebrowser.filter","|","filebrowser.sort"],removeButtons:[],fullsize:!1,showTooltip:!0,view:null,isSuccess(t){return t.success},getMessage(t){return void 0!==t.data.messages&&(0,c.isArray)(t.data.messages)?t.data.messages.join(" "):""},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:!0,pixelOffsetLoadNewChunk:200,getThumbTemplate(t,e,s){const i=this.options,o=i.showFileName,n=i.showFileSize&&t.size,r=i.showFileChangeTime&&t.time;let a="";return void 0!==t.file&&(a=t.file),`<a\n\t\t\tdata-jodit-filebrowser-item="true"\n\t\t\tdata-is-file="${t.isImage?0:1}"\n\t\t\tdraggable="true"\n\t\t\tclass="${W}"\n\t\t\thref="${t.fileURL}"\n\t\t\tdata-source="${s}"\n\t\t\tdata-path="${t.path}"\n\t\t\tdata-name="${a}"\n\t\t\ttitle="${a}"\n\t\t\tdata-url="${t.fileURL}">\n\t\t\t\t<img\n\t\t\t\t\tdata-is-file="${t.isImage?0:1}"\n\t\t\t\t\tdata-src="${t.fileURL}"\n\t\t\t\t\tsrc="${t.imageURL}"\n\t\t\t\t\talt="${a}"\n\t\t\t\t\tloading="lazy"\n\t\t\t\t/>\n\t\t\t\t${o||n||r?`<div class="${W}-info">${o?`<span class="${W}-info-filename">${a}</span>`:""}${n?`<span class="${W}-info-filesize">${t.size}</span>`:""}${r?`<span class="${W}-info-filechanged">${r}</span>`:""}</div>`:""}\n\t\t\t</a>`},ajax:{...r.D.prototype.defaultAjaxOptions,url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData(t){return t},process(t){return t}},create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}}},r.D.prototype.controls.filebrowser={upload:{icon:"plus",isInput:!0,isDisabled:t=>!t.dataProvider.canI("FileUpload"),getContent(t){const e=new k.Z(t,{onlyImages:t.state.onlyImages});return t.e.fire("bindUploader.filebrowser",e.container),e.container}},remove:{icon:"bin",isDisabled:t=>!t.state.activeElements.length||!t.dataProvider.canI("FileRemove"),exec(t){t.e.fire("fileRemove.filebrowser")}},update:{exec(t){t.e.fire("update.filebrowser")}},select:{icon:"check",isDisabled:t=>!t.state.activeElements.length,exec(t){t.e.fire("select.filebrowser")}},edit:{icon:"pencil",isDisabled(t){const e=t.state.activeElements;return 1!==e.length||!e[0].isImage||!(t.dataProvider.canI("ImageCrop")||t.dataProvider.canI("ImageResize"))},exec(t){t.e.fire("edit.filebrowser")}},tiles:{icon:"th",isActive:t=>"tiles"===t.state.view,exec(t){t.e.fire("view.filebrowser","tiles")}},list:{icon:"th-list",isActive:t=>"list"===t.state.view,exec(t){t.e.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent(t,e,s){const i=s.container.querySelector(".jodit-input");if(i)return i;const o=t.c.element("input",{class:"jodit-input",placeholder:t.i18n("Filter")});return o.value=t.state.filterWord,t.e.on(o,"keydown mousedown",t.async.debounce((()=>{t.e.fire("filter.filebrowser",o.value)}),t.defaultTimeout)),o}},sort:{isInput:!0,getContent(t){const e=t.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${t.i18n("Sort by changed")} (⬆)</option><option value="changed-desc">${t.i18n("Sort by changed")} (⬇)</option><option value="name-asc">${t.i18n("Sort by name")} (⬆)</option><option value="name-desc">${t.i18n("Sort by name")} (⬇)</option><option value="size-asc">${t.i18n("Sort by size")} (⬆)</option><option value="size-desc">${t.i18n("Sort by size")} (⬇)</option></select>`);return e.value=t.state.sortBy,t.e.on("sort.filebrowser",(t=>{e.value!==t&&(e.value=t)})).on(e,"change",(()=>{t.e.fire("sort.filebrowser",e.value)})),e}}};class Y{constructor(t){this.data=t,Object.keys(t).forEach((e=>{this[e]=t[e]}))}static create(t){return t instanceof Y?t:new Y(t)}get path(){return(0,c.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){const t=""+(new Date).getTime(),{thumbIsAbsolute:e,source:s,thumb:i,file:o}=this.data,n=i||o;return e&&n?n:(0,c.normalizeUrl)(s.baseurl,s.path,n||"")+"?_tmst="+t}get fileURL(){let{name:t}=this.data;const{file:e,fileIsAbsolute:s,source:i}=this.data;return void 0!==e&&(t=e),s&&t?t:(0,c.normalizeUrl)(i.baseurl,i.path,t||"")}get time(){const{changed:t}=this.data;return t&&("number"==typeof t?new Date(t).toLocaleString():t)||""}get uniqueHashKey(){const t=this.data;let e=[t.sourceName,t.name,t.file,this.time,t.thumb].join("_");return e=e.toLowerCase().replace(/[^0-9a-z\-.]/g,"-"),e}toJSON(){return this.data}}const U="default";class G{constructor(t,e){this.parent=t,this.options=e,this.__currentPermissions=null,this.ajaxInstances=new Map,this.progressHandler=t=>{}}get o(){return this.options}get(t,e,s){const i=this.ajaxInstances;if(i.has(t)){const e=i.get(t);null==e||e.abort(),i.delete(t)}const o=(0,c.ConfigProto)(void 0!==this.options[t]?this.options[t]:{},(0,c.ConfigProto)({onProgress:this.progressHandler},this.o.ajax));o.prepareData&&(o.data=o.prepareData.call(this,o.data));const n=new d(this.parent,o);let r=n.send();return i.set(t,n),r=r.then((t=>{if(!this.isSuccess(t))throw Error(this.getMessage(t));return t})),e&&(r=r.then(e)),s&&(r=r.catch(s)),r.finally((()=>{n.destruct(),i.delete(t),this.progressHandler(100)}))}onProgress(t){this.progressHandler=t}async permissions(t,e){return this.o.permissions?(this.o.permissions.data.path=t,this.o.permissions.data.source=e,this.o.permissions.url?this.get("permissions").then((t=>{let e=this.o.permissions.process;if(e||(e=this.o.ajax.process),e){const s=e.call(self,t);s.data.permissions&&(this.__currentPermissions=s.data.permissions)}return this.__currentPermissions})):null):null}canI(t){const e="allow"+t;return null==this.__currentPermissions||void 0===this.__currentPermissions[e]||this.__currentPermissions[e]}async items(t,e,s={}){const i=this.options;return i.items?(i.items.data.path=t,i.items.data.source=e,i.items.data.mods=s,this.get("items").then((t=>{let e=this.o.items.process;return e||(e=this.o.ajax.process),e&&(t=e.call(self,t)),this.generateItemsList(t.data.sources,s)}))):Promise.reject("Set Items api options")}generateItemsList(t,e={}){const s=[],i=t=>{var s;return!(null===(s=e.filterWord)||void 0===s?void 0:s.length)||void 0===this.o.filter||this.o.filter(t,e.filterWord)};return t.forEach((t=>{if(t.files&&t.files.length){const{sort:o}=this.o;(0,c.isFunction)(o)&&e.sortBy&&t.files.sort(((t,s)=>o(t,s,e.sortBy))),t.files.forEach((o=>{i(o)&&(t=>!e.onlyImages||void 0===t.isImage||t.isImage)(o)&&s.push(Y.create({...o,sourceName:t.name,source:t}))}))}})),s}async tree(t,e){return t=(0,c.normalizeRelativePath)(t),await this.permissions(t,e),this.o.folder?(this.o.folder.data.path=t,this.o.folder.data.source=e,this.get("folder").then((t=>{let e=this.o.folder.process;return e||(e=this.o.ajax.process),e&&(t=e.call(self,t)),t.data.sources}))):Promise.reject("Set Folder Api options")}getPathByUrl(t){return(0,c.set)("options.getLocalFileByUrl.data.url",t,this),this.get("getLocalFileByUrl",(t=>{if(this.isSuccess(t))return t.data;throw(0,c.error)(this.getMessage(t))}))}createFolder(t,e,s){const{create:i}=this.o;if(!i)throw(0,c.error)("Set Create api options");return i.data.source=s,i.data.path=e,i.data.name=t,this.get("create").then((t=>{if(this.isSuccess(t))return!0;throw(0,c.error)(this.getMessage(t))}))}move(t,e,s,i){const o=i?"fileMove":"folderMove",n=this.options[o];if(!n)throw(0,c.error)("Set Move api options");return n.data.from=t,n.data.path=e,n.data.source=s,this.get(o).then((t=>{if(this.isSuccess(t))return!0;throw(0,c.error)(this.getMessage(t))}))}remove(t,e,s,i){const o=this.o[t];if(!o)throw(0,c.error)(`Set "${t}" api options`);return o.data.path=e,o.data.name=s,o.data.source=i,this.get(t).then((t=>{if(o.process&&(t=o.process.call(this,t)),!this.isSuccess(t))throw(0,c.error)(this.getMessage(t));return this.getMessage(t)}))}fileRemove(t,e,s){return this.remove("fileRemove",t,e,s)}folderRemove(t,e,s){return this.remove("folderRemove",t,e,s)}rename(t,e,s,i,o){const n=this.o[t];if(!n)throw(0,c.error)(`Set "${t}" api options`);return n.data.path=e,n.data.name=s,n.data.newname=i,n.data.source=o,this.get(t).then((t=>{if(n.process&&(t=n.process.call(self,t)),!this.isSuccess(t))throw(0,c.error)(this.getMessage(t));return this.getMessage(t)}))}folderRename(t,e,s,i){return this.rename("folderRename",t,e,s,i)}fileRename(t,e,s,i){return this.rename("fileRename",t,e,s,i)}changeImage(t,e,s,i,o,n){this.o[t]||(this.o[t]={data:{}});const r=this.o[t];return void 0===r.data&&(r.data={action:t}),r.data.newname=o||i,n&&(r.data.box=n),r.data.path=e,r.data.name=i,r.data.source=s,this.get(t).then((t=>{if(this.isSuccess(t))return!0;throw(0,c.error)(this.getMessage(t))}))}crop(t,e,s,i,o){return this.changeImage("crop",t,e,s,i,o)}resize(t,e,s,i,o){return this.changeImage("resize",t,e,s,i,o)}getMessage(t){return this.options.getMessage(t)}isSuccess(t){return this.options.isSuccess(t)}destruct(){this.ajaxInstances.forEach((t=>t.destruct())),this.ajaxInstances.clear()}}(0,n.gn)([x.autobind],G.prototype,"isSuccess",null);var K=s(32);const X=W+"_active_true";function J(){const{state:t,files:e,create:s,options:i,elementsMap:o}=this,n=t=>{const e=t.uniqueHashKey;if(o[e])return o[e].elm;const n=s.fromHTML(i.getThumbTemplate.call(this,t,t.source,""+t.sourceName));return n.dataset.key=e,o[e]={item:t,elm:n},o[e].elm};t.on(["change.currentPath","change.currentSource"],this.async.debounce((()=>{this.loadTree()}),this.defaultTimeout)).on("beforeChange.activeElements",(()=>{t.activeElements.forEach((t=>{const e=t.uniqueHashKey,{elm:s}=o[e];s&&s.classList.remove(X)}))})).on("change.activeElements",(()=>{this.e.fire("changeSelection"),t.activeElements.forEach((t=>{const e=t.uniqueHashKey,{elm:s}=o[e];s&&s.classList.add(X)}))})).on("change.view",(()=>{e.classList.remove($+"__files_view_tiles"),e.classList.remove($+"__files_view_list"),e.classList.add($+"__files_view_"+t.view),this.storage.set($+"_view",t.view)})).on("change.sortBy",(()=>{this.storage.set($+"_sortby",t.sortBy)})).on("change.elements",this.async.debounce((()=>{_.i.detach(e),t.elements.length?t.elements.forEach((t=>{this.files.appendChild(n(t))})):e.appendChild(s.div($+"_no_files",this.i18n("There are no files")))}),this.defaultTimeout)).on("change.sources",this.async.debounce((()=>{_.i.detach(this.tree),t.sources.forEach((t=>{const e=t.name;if(e&&"default"!==e&&this.tree.appendChild(s.div($+"__source-title",e)),t.folders.forEach((o=>{const n=s.a($+"__tree-item",{draggable:"draggable",href:"#","data-path":(0,K.AH)(t.path,o+"/"),"data-name":o,"data-source":e,"data-source-path":t.path},s.span($+"__tree-item-title",o)),r=s=>i=>{this.e.fire(s+".filebrowser",{name:o,path:(0,K.AH)(t.path+"/"),source:e}),i.stopPropagation(),i.preventDefault()};if(this.e.on(n,"click",r("openFolder")),this.tree.appendChild(n),".."!==o&&"."!==o){if(i.renameFolder&&this.dataProvider.canI("FolderRename")){const t=(0,k.zx)(this,{icon:{name:"pencil"},name:"rename",tooltip:"Rename",size:"tiny"});t.onAction(r("renameFolder")),n.appendChild(t.container)}if(i.deleteFolder&&this.dataProvider.canI("FolderRemove")){const t=(0,k.zx)(this,{icon:{name:"cancel"},name:"remove",tooltip:"Delete",size:"tiny"});t.onAction(r("removeFolder")),n.appendChild(t.container)}}})),i.createNewFolder&&this.dataProvider.canI("FolderCreate")){const s=(0,k.zx)(this,"plus","Add folder","secondary");s.onAction((()=>{this.e.fire("addFolder",{path:(0,K.AH)(t.path+"/"),source:e})})),this.tree.appendChild(s.container)}}))}),this.defaultTimeout))}const Z="jodit-image-editor",Q=k.JO.get.bind(k.JO),tt=(t,e="jodti-image-editor_active")=>t?e:"";var et;r.D.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"};const st="resize",it="crop";let ot=et=class extends u.Hr{constructor(t){super(t),this.resizeUseRatio=!0,this.cropUseRatio=!0,this.clicked=!1,this.start_x=0,this.start_y=0,this.top_x=0,this.top_y=0,this.width=0,this.height=0,this.activeTab=st,this.naturalWidth=0,this.naturalHeight=0,this.ratio=0,this.new_h=0,this.new_w=0,this.diff_x=0,this.diff_y=0,this.cropBox={x:0,y:0,w:0,h:0},this.resizeBox={w:0,h:0},this.calcCropBox=()=>{const t=this.crop_box.parentNode,e=.8*t.offsetWidth,s=.8*t.offsetHeight;let i=e,o=s;const{naturalWidth:n,naturalHeight:r}=this;e>n&&s>r?(i=n,o=r):this.ratio>e/s?(i=e,o=r*(e/n)):(i=n*(s/r),o=s),(0,c.css)(this.crop_box,{width:i,height:o})},this.showCrop=()=>{if(!this.cropImage)return;this.calcCropBox();const t=this.cropImage.offsetWidth||this.image.offsetWidth||this.image.naturalWidth;this.new_w=et.calcValueByPercent(t,this.o.cropDefaultWidth);const e=this.cropImage.offsetHeight||this.image.offsetHeight||this.image.naturalHeight;this.new_h=this.cropUseRatio?this.new_w/this.ratio:et.calcValueByPercent(e,this.o.cropDefaultHeight),(0,c.css)(this.cropHandler,{backgroundImage:"url("+(0,c.attr)(this.cropImage,"src")+")",width:this.new_w,height:this.new_h,left:t/2-this.new_w/2,top:e/2-this.new_h/2}),this.j.e.fire(this.cropHandler,"updatesize")},this.updateCropBox=()=>{if(!this.cropImage)return;const t=this.cropImage.offsetWidth/this.naturalWidth,e=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=(0,c.css)(this.cropHandler,"left")/t,this.cropBox.y=(0,c.css)(this.cropHandler,"top")/e,this.cropBox.w=this.cropHandler.offsetWidth/t,this.cropBox.h=this.cropHandler.offsetHeight/e,this.sizes.textContent=this.cropBox.w.toFixed(0)+"x"+this.cropBox.h.toFixed(0)},this.updateResizeBox=()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight},this.setHandlers=()=>{const t=this,{widthInput:e,heightInput:s}=(0,c.refs)(this.editor);t.j.e.on([t.editor.querySelector(".jodit_bottomright"),t.cropHandler],"mousedown.jodit-image-editor",this.onResizeHandleMouseDown).on(this.j.ow,"resize.jodit-image-editor",(()=>{this.j.e.fire(t.resizeHandler,"updatesize"),t.showCrop(),this.j.e.fire(t.cropHandler,"updatesize")})),t.j.e.on((0,c.toArray)(this.editor.querySelectorAll(".jodit-image-editor__slider-title")),"click",this.onTitleModeClick).on([e,s],"input",this.onChangeSizeInput);const{keepAspectRatioResize:i,keepAspectRatioCrop:o}=(0,c.refs)(this.editor);i&&i.addEventListener("change",(()=>{this.resizeUseRatio=i.checked})),o&&o.addEventListener("change",(()=>{this.cropUseRatio=o.checked})),t.j.e.on(t.resizeHandler,"updatesize",(()=>{(0,c.css)(t.resizeHandler,{top:0,left:0,width:t.image.offsetWidth||t.naturalWidth,height:t.image.offsetHeight||t.naturalHeight}),this.updateResizeBox()})).on(t.cropHandler,"updatesize",(()=>{if(!t.cropImage)return;let e=(0,c.css)(t.cropHandler,"left"),s=(0,c.css)(t.cropHandler,"top"),i=t.cropHandler.offsetWidth,o=t.cropHandler.offsetHeight;0>e&&(e=0),0>s&&(s=0),e+i>t.cropImage.offsetWidth&&(i=t.cropImage.offsetWidth-e,t.cropUseRatio&&(o=i/t.ratio)),s+o>t.cropImage.offsetHeight&&(o=t.cropImage.offsetHeight-s,t.cropUseRatio&&(i=o*t.ratio)),(0,c.css)(t.cropHandler,{width:i,height:o,left:e,top:s,backgroundPosition:-e-1+"px "+(-s-1)+"px",backgroundSize:t.cropImage.offsetWidth+"px "+t.cropImage.offsetHeight+"px"}),t.updateCropBox()})),Object.values(t.buttons).forEach((i=>{i.onAction((()=>{const o={action:t.activeTab,box:t.activeTab===st?t.resizeBox:t.cropBox};switch(i){case t.buttons.saveas:B(t.j.i18n("Enter new name"),t.j.i18n("Save in new file"),(e=>{if(!(0,c.trim)(e))return A(t.j.i18n("The name should not be empty")).bindDestruct(this.j),!1;t.onSave(e,o,t.hide,(e=>{A(e.message).bindDestruct(t.j)}))})).bindDestruct(this.j);break;case t.buttons.save:t.onSave(void 0,o,t.hide,(e=>{A(e.message).bindDestruct(t.j)}));break;case t.buttons.reset:t.activeTab===st?((0,c.css)(t.image,{width:null,height:null}),e.value=""+t.naturalWidth,s.value=""+t.naturalHeight,t.j.e.fire(t.resizeHandler,"updatesize")):t.showCrop()}}))}))},this.options=t&&t.o&&t.o.imageeditor?t.o.imageeditor:r.D.defaultOptions.imageeditor;const e=this.options;this.resizeUseRatio=e.resizeUseRatio,this.cropUseRatio=e.cropUseRatio,this.buttons={reset:(0,f.zx)(this.j,"update","Reset"),save:(0,f.zx)(this.j,"save","Save"),saveas:(0,f.zx)(this.j,"save","Save as ...")},this.activeTab=e.resize?st:it,this.editor=((t,e)=>{const s=t.i18n.bind(t),i=(t,e,i=!0)=>`<div class="jodit-form__group">\n\t\t\t<label>${s(t)}</label>\n\n\t\t\t<label class='jodi-switcher'>\n\t\t\t\t<input ${tt(i,"checked")} data-ref="${e}" type="checkbox"/>\n\t\t\t\t<span class="jodi-switcher__slider"></span>\n\t\t\t</label>\n\t</div>`;return t.create.fromHTML(`<form class="${Z} jodit-properties">\n\t\t<div class="jodit-grid jodit-grid_xs-column">\n\t\t\t<div class="jodit_col-lg-3-4 jodit_col-sm-5-5">\n\t\t\t${e.resize?`<div class="${Z}__area ${Z}__area_resize ${Z}_active">\n\t\t\t\t\t\t\t<div data-ref="resizeBox" class="${Z}__box"></div>\n\t\t\t\t\t\t\t<div class="${Z}__resizer">\n\t\t\t\t\t\t\t\t<i class="jodit_bottomright"></i>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t${e.crop?`<div class="${Z}__area ${Z}__area_crop ${tt(!e.resize)}">\n\t\t\t\t\t\t\t<div data-ref="cropBox" class="${Z}__box">\n\t\t\t\t\t\t\t\t<div class="${Z}__croper">\n\t\t\t\t\t\t\t\t\t<i class="jodit_bottomright"></i>\n\t\t\t\t\t\t\t\t\t<i class="${Z}__sizes"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t</div>\n\t\t\t<div class="jodit_col-lg-1-4 jodit_col-sm-5-5">\n\t\t\t${e.resize?`<div data-area="resize" class="${Z}__slider ${Z}_active">\n\t\t\t\t\t\t\t<div class="${Z}__slider-title">\n\t\t\t\t\t\t\t\t${Q("resize")}\n\t\t\t\t\t\t\t\t${s("Resize")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="${Z}__slider-content">\n\t\t\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t${s("Width")}\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<input type="number" data-ref="widthInput" class="jodit-input"/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t${s("Height")}\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<input type="number" data-ref="heightInput" class="jodit-input"/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t${i("Keep Aspect Ratio","keepAspectRatioResize")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t${e.crop?`<div data-area="crop" class="${Z}__slider ${tt(!e.resize)}'">\n\t\t\t\t\t\t\t<div class="${Z}__slider-title">\n\t\t\t\t\t\t\t\t${Q("crop")}\n\t\t\t\t\t\t\t\t${s("Crop")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="${Z}__slider-content">\n\t\t\t\t\t\t\t\t${i("Keep Aspect Ratio","keepAspectRatioCrop")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t</div>\n\t\t</div>\n\t</form>`)})(this.j,this.options);const{resizeBox:s,cropBox:i}=(0,c.refs)(this.editor);this.resize_box=s,this.crop_box=i,this.sizes=this.editor.querySelector(".jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__sizes"),this.resizeHandler=this.editor.querySelector(".jodit-image-editor__resizer"),this.cropHandler=this.editor.querySelector(".jodit-image-editor__croper"),this.dialog=new R({fullsize:this.j.o.fullsize,globalFullSize:this.j.o.globalFullSize,language:this.j.o.language,buttons:["fullsize","dialog.close"]}),this.dialog.setContent(this.editor),this.dialog.setSize(this.o.width,this.o.height),this.dialog.setHeader([this.buttons.reset,this.buttons.save,this.buttons.saveas]),this.setHandlers()}className(){return"ImageEditor"}onTitleModeClick(t){const e=this,s=t.target,i=null==s?void 0:s.parentElement;if(!i)return;(0,c.$$)(".jodit-image-editor__slider,.jodit-image-editor__area",e.editor).forEach((t=>t.classList.remove("jodit-image-editor_active"))),i.classList.add("jodit-image-editor_active"),e.activeTab=(0,c.attr)(i,"-area")||st;const o=e.editor.querySelector(".jodit-image-editor__area.jodit-image-editor__area_"+e.activeTab);o&&o.classList.add("jodit-image-editor_active"),e.activeTab===it&&e.showCrop()}onChangeSizeInput(t){const e=this,s=t.target,{widthInput:i,heightInput:o}=(0,c.refs)(this.editor),n="widthInput"===(0,c.attr)(s,"data-ref"),r=parseInt(s.value,10),a=n?e.o.min_height:e.o.min_width;let l;r>(n?e.o.min_width:e.o.min_height)&&((0,c.css)(e.image,n?"width":"height",r),e.resizeUseRatio&&(l=Math.round(n?r/e.ratio:r*e.ratio),l>a&&((0,c.css)(e.image,n?"height":"width",l),n?o.value=""+l:i.value=""+l))),this.j.e.fire(e.resizeHandler,"updatesize")}onResizeHandleMouseDown(t){const e=this;e.target=t.target,t.preventDefault(),t.stopImmediatePropagation(),e.clicked=!0,e.start_x=t.clientX,e.start_y=t.clientY,e.activeTab===it?(e.top_x=(0,c.css)(e.cropHandler,"left"),e.top_y=(0,c.css)(e.cropHandler,"top"),e.width=e.cropHandler.offsetWidth,e.height=e.cropHandler.offsetHeight):(e.width=e.image.offsetWidth,e.height=e.image.offsetHeight),e.j.e.on(this.j.ow,"mousemove",this.onGlobalMouseMove).one(this.j.ow,"mouseup",this.onGlobalMouseUp)}onGlobalMouseUp(t){this.clicked&&(this.clicked=!1,t.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove))}onGlobalMouseMove(t){const e=this;if(!e.clicked)return;const{widthInput:s,heightInput:i}=(0,c.refs)(this.editor);e.diff_x=t.clientX-e.start_x,e.diff_y=t.clientY-e.start_y,e.activeTab===st&&e.resizeUseRatio||e.activeTab===it&&e.cropUseRatio?e.diff_x?(e.new_w=e.width+e.diff_x,e.new_h=Math.round(e.new_w/e.ratio)):(e.new_h=e.height+e.diff_y,e.new_w=Math.round(e.new_h*e.ratio)):(e.new_w=e.width+e.diff_x,e.new_h=e.height+e.diff_y),e.activeTab===st?(e.new_w>e.o.resizeMinWidth&&((0,c.css)(e.image,"width",e.new_w+"px"),s.value=""+e.new_w),e.new_h>e.o.resizeMinHeight&&((0,c.css)(e.image,"height",e.new_h+"px"),i.value=""+e.new_h),this.j.e.fire(e.resizeHandler,"updatesize")):(e.target!==e.cropHandler?(e.top_x+e.new_w>e.cropImage.offsetWidth&&(e.new_w=e.cropImage.offsetWidth-e.top_x),e.top_y+e.new_h>e.cropImage.offsetHeight&&(e.new_h=e.cropImage.offsetHeight-e.top_y),(0,c.css)(e.cropHandler,{width:e.new_w,height:e.new_h})):(e.top_x+e.diff_x+e.cropHandler.offsetWidth>e.cropImage.offsetWidth&&(e.diff_x=e.cropImage.offsetWidth-e.top_x-e.cropHandler.offsetWidth),(0,c.css)(e.cropHandler,"left",e.top_x+e.diff_x),e.top_y+e.diff_y+e.cropHandler.offsetHeight>e.cropImage.offsetHeight&&(e.diff_y=e.cropImage.offsetHeight-e.top_y-e.cropHandler.offsetHeight),(0,c.css)(e.cropHandler,"top",e.top_y+e.diff_y)),this.j.e.fire(e.cropHandler,"updatesize"))}get o(){return this.options}hide(){this.dialog.close()}open(t,e){return this.j.async.promise((s=>{const i=(new Date).getTime();this.image=this.j.c.element("img"),(0,c.$$)("img,.jodit-icon_loader",this.resize_box).forEach(_.i.safeRemove),(0,c.$$)("img,.jodit-icon_loader",this.crop_box).forEach(_.i.safeRemove),(0,c.css)(this.cropHandler,"background","transparent"),this.onSave=e,this.resize_box.appendChild(this.j.c.element("i",{class:"jodit-icon_loader"})),this.crop_box.appendChild(this.j.c.element("i",{class:"jodit-icon_loader"})),this.image.setAttribute("src",t+=/\?/.test(t)?"&_tst="+i:"?_tst="+i),this.dialog.open();const{widthInput:o,heightInput:n}=(0,c.refs)(this.editor),r=()=>{this.isDestructed||(this.image.removeEventListener("load",r),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,o.value=""+this.naturalWidth,n.value=""+this.naturalHeight,this.ratio=this.naturalWidth/this.naturalHeight,this.resize_box.appendChild(this.image),this.cropImage=this.image.cloneNode(!0),this.crop_box.appendChild(this.cropImage),(0,c.$$)(".jodit-icon_loader",this.editor).forEach(_.i.safeRemove),this.activeTab===it&&this.showCrop(),this.j.e.fire(this.resizeHandler,"updatesize"),this.j.e.fire(this.cropHandler,"updatesize"),this.dialog.setPosition(),this.j.e.fire("afterImageEditor"),s(this.dialog))};this.image.addEventListener("load",r),this.image.complete&&r()}))}destruct(){this.isDestructed||(this.dialog&&!this.dialog.isInDestruct&&this.dialog.destruct(),_.i.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove).off(this.j.ow,"mouseup",this.onGlobalMouseUp).off(this.ow,".jodit-image-editor").off(".jodit-image-editor"),super.destruct())}};function nt(t,e,s,i,o,n){return this.getInstance("ImageEditor",this.o).open(t,((t,r,a,l)=>{let c;c="resize"===r.action?this.dataProvider.resize(s,i,e,t,r.box):this.dataProvider.crop(s,i,e,t,r.box),c.then((t=>{t&&(a(),o&&o())})).catch((t=>{l(t),n&&n(t)}))}))}ot.calcValueByPercent=(t,e)=>{const s=""+e,i=parseFloat(""+t);let o;return o=/^[-+]?[0-9]+(px)?$/.exec(s),o?parseInt(s,10):(o=/^([-+]?[0-9.]+)%$/.exec(s),o?Math.round(i*(parseFloat(o[1])/100)):i||0)},(0,n.gn)([x.autobind],ot.prototype,"onTitleModeClick",null),(0,n.gn)([(0,x.debounce)(),x.autobind],ot.prototype,"onChangeSizeInput",null),(0,n.gn)([x.autobind],ot.prototype,"onResizeHandleMouseDown",null),(0,n.gn)([x.autobind],ot.prototype,"onGlobalMouseUp",null),(0,n.gn)([(0,x.throttle)(10)],ot.prototype,"onGlobalMouseMove",null),(0,n.gn)([x.autobind],ot.prototype,"hide",null),(0,n.gn)([x.autobind],ot.prototype,"open",null),ot=et=(0,n.gn)([x.component],ot);const rt=$+"_preview_",at=(t="next",e="right")=>`<div class="${rt}navigation ${rt}navigation-${t}">`+k.JO.get("angle-"+e)+"</a>",lt=t=>{if(!t.o.contextMenu)return()=>{};const e=new g(t);return s=>{const i=ct(s.target,t.dialog.container);if(!i)return;let o=i;const n=t.options,r=t=>(0,c.attr)(o,t)||"";return t.async.setTimeout((()=>{e.show(s.clientX,s.clientY,[!("1"===r("data-is-file")||!n.editImage||!t.dataProvider.canI("ImageResize")&&!t.dataProvider.canI("ImageCrop"))&&{icon:"pencil",title:"Edit",exec:()=>nt.call(t,r("href"),r("data-name"),r("data-path"),r("data-source"))},!!t.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",async exec(){t.e.fire("fileRename.filebrowser",r("data-name"),r("data-path"),r("data-source"))}},!!t.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",exec:async()=>(await t.deleteFile(r("data-name"),r("data-source")),t.state.activeElements=[],t.loadTree())},!!n.preview&&{icon:"eye",title:"Preview",exec(){const e=new R({fullsize:t.o.fullsize,language:t.o.language,buttons:["fullsize","dialog.close"]}),s=t.c.div($+"_preview",V),i=t.c.div($+"_preview_box"),a=t.c.fromHTML(at()),l=t.c.fromHTML(at("prev","left")),h=r=>{const c=t.c.element("img");c.setAttribute("src",r);const h=()=>{var r;t.isInDestruct||(t.e.off(c,"load"),_.i.detach(s),n.showPreviewNavigation&&(_.i.prevWithClass(o,W)&&s.appendChild(l),_.i.nextWithClass(o,W)&&s.appendChild(a)),s.appendChild(i),i.appendChild(c),e.setPosition(),null===(r=null==t?void 0:t.events)||void 0===r||r.fire("previewOpenedAndLoaded"))};t.e.on(c,"load",h),c.complete&&h()};t.e.on([a,l],"click",(function(){if(o=this.classList.contains(rt+"navigation-next")?_.i.nextWithClass(o,W):_.i.prevWithClass(o,W),!o)throw(0,c.error)("Need element");_.i.detach(s),_.i.detach(i),s.innerHTML=V,h(r("href"))})),t.e.on("beforeDestruct",(()=>{e.destruct()})),e.container.classList.add($+"_preview_dialog"),e.setContent(s),e.setPosition(),e.open(),h(r("href")),t.events.on("beforeDestruct",(()=>{e.destruct()})).fire("previewOpened")}},{icon:"upload",title:"Download",exec(){const e=r("href");e&&t.ow.open(e)}}])}),t.defaultTimeout),null==t||t.e.on("beforeDestruct",(()=>{e.destruct()})),s.stopPropagation(),s.preventDefault(),!1}},ct=(t,e,s="a")=>_.i.closest(t,(t=>_.i.isTag(t,s)),e);function ht(){let t=!1;const e=this;e.e.on(e.tree,"dragstart",(s=>{const i=ct(s.target,e.dialog.container);i&&e.o.moveFolder&&(t=i)})).on(e.tree,"drop",(s=>{if((e.o.moveFile||e.o.moveFolder)&&t){let i=(0,c.attr)(t,"-path")||"";if(!e.o.moveFolder&&t.classList.contains($+"__tree-item"))return!1;if(t.classList.contains(W)&&(i+=(0,c.attr)(t,"-name"),!e.o.moveFile))return!1;const o=ct(s.target,e.dialog.container);if(!o)return;e.dataProvider.move(i,(0,c.attr)(o,"-path")||"",(0,c.attr)(o,"-source")||"",t.classList.contains(W)).then((()=>{e.loadTree()}),e.status),t=!1}})).on(e.files,"contextmenu",lt(e)).on(e.files,"click",(t=>{(0,c.ctrlKey)(t)||(this.state.activeElements=[])})).on(e.files,"click",(t=>{const s=ct(t.target,e.dialog.container);if(!s)return;const i=(t=>{const{key:s}=t.dataset,{item:i}=e.elementsMap[s||""];return i})(s);return i?(e.state.activeElements=(0,c.ctrlKey)(t)?[...e.state.activeElements,i]:[i],t.stopPropagation(),!1):void 0})).on(e.files,"dragstart",(s=>{if(e.o.moveFile){const i=ct(s.target,e.dialog.container);if(!i)return;t=i}})).on(e.dialog.container,"drop",(t=>t.preventDefault()))}function dt(){const t=this.state,e=this.dataProvider,s=this;s.e.on("view.filebrowser",(e=>{e!==t.view&&(t.view=e)})).on("sort.filebrowser",(e=>{e!==t.sortBy&&(t.sortBy=e,s.loadItems())})).on("filter.filebrowser",(e=>{e!==t.filterWord&&(t.filterWord=e,s.loadItems())})).on("openFolder.filebrowser",(t=>{let e;e=".."===t.name?t.path.split("/").filter((t=>t.length)).slice(0,-1).join("/"):(0,c.normalizePath)(t.path,t.name),s.state.currentPath=e,s.state.currentSource="."===t.name?U:t.source})).on("removeFolder.filebrowser",(t=>{O(s.i18n("Are you sure?"),s.i18n("Delete"),(i=>{i&&e.folderRemove(t.path,t.name,t.source).then((t=>{s.status(t,!0),s.loadTree()})).catch(s.status)})).bindDestruct(s)})).on("renameFolder.filebrowser",(t=>{B(s.i18n("Enter new name"),s.i18n("Rename"),(i=>{if(!(0,m.r1)(i))return s.status(s.i18n("Enter new name")),!1;e.folderRename(t.path,t.name,i,t.source).then((t=>{s.state.activeElements=[],s.status(t,!0),s.loadTree()})).catch(s.status)}),s.i18n("type name"),t.name).bindDestruct(s)})).on("addFolder.filebrowser",(t=>{B(s.i18n("Enter Directory name"),s.i18n("Create directory"),(i=>{e.createFolder(i,t.path,t.source).then((()=>{s.loadTree()}),s.status)}),s.i18n("type name")).bindDestruct(s)})).on("fileRemove.filebrowser",(()=>{s.state.activeElements.length&&O(s.i18n("Are you sure?"),"",(t=>{if(t){const t=[];s.state.activeElements.forEach((e=>{t.push(s.deleteFile(e.file||e.name||"",e.sourceName))})),s.state.activeElements=[],Promise.all(t).then((()=>s.loadTree()))}})).bindDestruct(s)})).on("edit.filebrowser",(()=>{if(1===s.state.activeElements.length){const[t]=this.state.activeElements;nt.call(s,t.fileURL,t.file||"",t.path,t.sourceName)}})).on("fileRename.filebrowser",((t,i,o)=>{1===s.state.activeElements.length&&B(s.i18n("Enter new name"),s.i18n("Rename"),(n=>{if(!(0,m.r1)(n))return s.status(s.i18n("Enter new name")),!1;e.fileRename(i,t,n,o).then((t=>{s.state.activeElements=[],s.status(t,!0),s.loadItems()})).catch(s.status)}),s.i18n("type name"),t).bindDestruct(this)})).on("update.filebrowser",(()=>{s.loadTree()}))}class ut extends N{constructor(t){var e;super(t),this.loader=this.c.div($+"__loader",V),this.browser=this.c.div($+" non-selected"),this.status_line=this.c.div($+"__status"),this.tree=this.c.div($+"__tree"),this.files=this.c.div($+"__files"),this.state=l.P5.create({currentPath:"",currentSource:U,currentBaseUrl:"",activeElements:[],elements:[],messages:[],sources:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1}),this.errorHandler=t=>{this.status(t instanceof Error?this.i18n(t.message):this.dataProvider.getMessage(t))},this.close=()=>{this.dialog.close()},this.elementsMap={},this.attachEvents(t);const s=this;s.options=(0,c.ConfigProto)(t||{},r.D.defaultOptions.filebrowser),s.storage=C.makeStorage(this.o.saveStateInStorage),s.dataProvider=((t,e)=>new G(t,e))(s,s.options),s.dialog=new R({fullsize:s.o.fullsize,ownerWindow:s.ownerWindow,theme:s.o.theme,globalFullSize:s.o.globalFullSize,language:this.o.language,minWidth:Math.min(700,screen.width),minHeight:300,buttons:null!==(e=this.o.headerButtons)&&void 0!==e?e:["fullsize","dialog.close"]}),["afterClose","beforeOpen"].forEach((t=>{s.dialog.events.on(s.dialog,t,(()=>{this.e.fire(t)}))})),s.o.showFoldersPanel&&s.browser.appendChild(s.tree),s.browser.appendChild(s.files),s.browser.appendChild(s.status_line),dt.call(s),ht.call(s),J.call(s),s.dialog.setSize(s.o.width,s.o.height),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((t=>{null!=this.options[t]&&(this.options[t]=(0,c.ConfigProto)(this.options[t],this.o.ajax))}));const i=this.storage.get($+"_view");s.state.view=i&&null==this.o.view?"list"===i?"list":"tiles":"list"===s.o.view?"list":"tiles",this.state.fire("change.view");const o=s.storage.get($+"_sortby");if(o){const t=o.split("-");s.state.sortBy=["changed","name","size"].includes(t[0])?o:"changed-desc"}else s.state.sortBy=s.o.sortBy||"changed-desc";s.initUploader(s)}className(){return"FileBrowser"}async loadItems(){return this.files.classList.add("jodit-filebrowser_active"),this.files.appendChild(this.loader.cloneNode(!0)),this.dataProvider.items(this.state.currentPath,this.state.currentSource,{sortBy:this.state.sortBy,onlyImages:this.state.onlyImages,filterWord:this.state.filterWord}).then((t=>{this.state.elements=t,this.state.activeElements=[]})).catch(this.status)}async loadTree(){const t=t=>{throw t instanceof Error?t:(0,c.error)(t)};this.uploader&&(this.uploader.setPath(this.state.currentPath),this.uploader.setSource(this.state.currentSource)),this.tree.classList.add("jodit-filebrowser_active"),_.i.detach(this.tree),this.tree.appendChild(this.loader.cloneNode(!0));const e=this.loadItems();if(this.o.showFoldersPanel){const s=this.dataProvider.tree(this.state.currentPath,this.state.currentSource).then((t=>{this.state.sources=t})).catch((e=>{this.errorHandler(t(this.i18n("Error on load folders"))),t(e)}));return Promise.all([s,e]).catch(c.error)}return this.tree.classList.remove("jodit-filebrowser_active"),e.catch(c.error)}deleteFile(t,e){return this.dataProvider.fileRemove(this.state.currentPath,t,e).then((e=>{this.status(e||this.i18n('File "%s" was deleted',t),!0)})).catch(this.status)}onSelect(t){return()=>{if(this.state.activeElements.length){const e=[],s=[];this.state.activeElements.forEach((t=>{const i=t.fileURL;i&&(e.push(i),s.push(t.isImage||!1))})),this.close();const i={baseurl:"",files:e,isImages:s};(0,c.isFunction)(t)&&t(i),this.close()}return!1}}get isOpened(){return this.dialog.isOpened&&"none"!==this.browser.style.display}status(t,e){(0,c.isString)(t)||(t=t.message),this.status_line.classList.remove("jodit-filebrowser_success"),this.status_line.classList.add("jodit-filebrowser_active");const s=this.c.div();s.textContent=t,this.status_line.appendChild(s),e&&this.status_line.classList.add("jodit-filebrowser_success"),this.async.setTimeout((()=>{this.status_line.classList.remove("jodit-filebrowser_active"),_.i.detach(this.status_line)}),{timeout:this.o.howLongShowMsg,label:"fileBrowser.status"})}open(t=this.o.defaultCallback,e=!1){return this.state.onlyImages=e,this.async.promise(((e,s)=>{var i;if(!this.o.items||!this.o.items.url)throw(0,c.error)("Need set options.filebrowser.ajax.url");let o=0;this.e.off(this.files,"dblclick").on(this.files,"dblclick",this.onSelect(t)).on(this.files,"touchstart",(()=>{const e=(new Date).getTime();a.EMULATE_DBLCLICK_TIMEOUT>e-o&&this.onSelect(t)(),o=e})).off("select.filebrowser").on("select.filebrowser",this.onSelect(t));const n=this.c.div();this.toolbar.build(null!==(i=this.o.buttons)&&void 0!==i?i:[]).appendTo(n),this.dialog.open(this.browser,n),this.e.fire("sort.filebrowser",this.state.sortBy),this.loadTree().then(e,s)}))}initUploader(t){var e;const s=this,i=null===(e=null==t?void 0:t.options)||void 0===e?void 0:e.uploader,o=(0,c.ConfigProto)(i||{},r.D.defaultOptions.uploader),n=()=>this.loadItems();s.uploader=s.getInstance("Uploader",o),s.uploader.setPath(s.state.currentPath),s.uploader.setSource(s.state.currentSource),s.uploader.bind(s.browser,n,s.errorHandler),s.e.on("bindUploader.filebrowser",(t=>{s.uploader.bind(t,n,s.errorHandler)}))}destruct(){this.isInDestruct||(this.dialog.destruct(),this.events&&this.e.off(".filebrowser"),this.uploader&&this.uploader.destruct(),super.destruct())}}(0,n.gn)([x.autobind],ut.prototype,"status",null),(0,n.gn)([x.autobind],ut.prototype,"open",null);class pt extends u.Hr{constructor(){super(...arguments),this.isBlocked=!1}className(){return"Snapshot"}static equal(t,e){return t.html===e.html&&JSON.stringify(t.range)===JSON.stringify(e.range)}static countNodesBeforeInParent(t){if(!t.parentNode)return 0;const e=t.parentNode.childNodes;let s,i=0,o=null;for(s=0;e.length>s;s+=1){if(!o||_.i.isText(e[s])&&""===e[s].textContent||_.i.isText(o)&&_.i.isText(e[s])||(i+=1),e[s]===t)return i;o=e[s]}return 0}static strokeOffset(t,e){for(;_.i.isText(t);)_.i.isText(t=t.previousSibling)&&null!=t.textContent&&(e+=t.textContent.length);return e}calcHierarchyLadder(t){const e=[];if(!t||!t.parentNode||!_.i.isOrContains(this.j.editor,t))return[];for(;t&&t!==this.j.editor;)t&&e.push(pt.countNodesBeforeInParent(t)),t=t.parentNode;return e.reverse()}getElementByLadder(t){let e,s=this.j.editor;for(e=0;s&&t.length>e;e+=1)s=s.childNodes[t[e]];return s}make(){const t={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};t.html=this.j.getNativeEditorValue();const e=this.j.s.sel;if(e&&e.rangeCount){const s=e.getRangeAt(0),i=this.calcHierarchyLadder(s.startContainer),o=this.calcHierarchyLadder(s.endContainer);let n=pt.strokeOffset(s.startContainer,s.startOffset),r=pt.strokeOffset(s.endContainer,s.endOffset);i.length||s.startContainer===this.j.editor||(n=0),o.length||s.endContainer===this.j.editor||(r=0),t.range={startContainer:i,startOffset:n,endContainer:o,endOffset:r}}return t}restore(t){this.isBlocked=!0;const e=this.storeScrollState();this.j.getNativeEditorValue()!==t.html&&this.j.setEditorValue(t.html),this.restoreOnlySelection(t),this.restoreScrollState(e),this.isBlocked=!1}storeScrollState(){return[this.j.ow.scrollY,this.j.editor.scrollTop]}restoreScrollState(t){const{j:e}=this,{ow:s}=e;s.scrollTo(s.scrollX,t[0]),e.editor.scrollTop=t[1]}restoreOnlySelection(t){try{if(t.range){const e=this.j.ed.createRange();e.setStart(this.getElementByLadder(t.range.startContainer),t.range.startOffset),e.setEnd(this.getElementByLadder(t.range.endContainer),t.range.endOffset),this.j.s.selectRange(e)}}catch(t){this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild)}}destruct(){this.isBlocked=!1,super.destruct()}}class ft{constructor(t){this.size=t,this.commands=[],this.stackPosition=-1}get length(){return this.commands.length}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(t){this.clearRedo(),this.commands.push(t),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),this.stackPosition-=1)}replace(t){this.commands[this.stackPosition]=t}current(){return this.commands[this.stackPosition]}undo(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)}redo(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)}canUndo(){return this.stackPosition>=0}canRedo(){return this.commands.length-1>this.stackPosition}}class mt{constructor(t,e,s,i){this.oldValue=t,this.newValue=e,this.observer=s,this.tick=i}undo(){this.observer.snapshot.restore(this.oldValue)}redo(){this.observer.snapshot.restore(this.newValue)}}r.D.prototype.observer={maxHistoryLength:1/0,timeout:100};class gt extends u.Hr{constructor(t){super(t),this.stack=new ft(this.j.o.observer.maxHistoryLength),this.snapshot=new pt(this.j),this.updateTick=0,t.e.on("afterAddPlace.observer",(()=>{this.isInDestruct||(this.startValue=this.snapshot.make(),t.events.on("internalChange",(()=>{this.startValue=this.snapshot.make()})).on(t.editor,["changeSelection","selectionstart","selectionchange","mousedown","mouseup","keydown","keyup"].map((t=>t+".observer")).join(" "),(()=>{this.startValue.html===this.j.getNativeEditorValue()&&(this.startValue=this.snapshot.make())})).on(this,"change.observer",this.onChange))}))}className(){return"Observer"}get startValue(){return this.__startValue}set startValue(t){this.__startValue=t}upTick(){this.updateTick+=1}onChange(){this.snapshot.isBlocked||this.updateStack()}updateStack(t=!1){const e=this.snapshot.make();if(!pt.equal(e,this.startValue)){const s=new mt(this.startValue,e,this,this.updateTick);if(t){const t=this.stack.current();t&&this.updateTick===t.tick&&this.stack.replace(s)}else this.stack.push(s);this.startValue=e,this.fireChangeStack()}}redo(){this.stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}undo(){this.stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}clear(){this.startValue=this.snapshot.make(),this.stack.clear(),this.fireChangeStack()}replaceSnapshot(){this.updateStack(!0)}fireChangeStack(){var t;this.j&&!this.j.isInDestruct&&(null===(t=this.j.events)||void 0===t||t.fire("changeStack"))}destruct(){this.j.events&&this.j.e.off(".observer"),this.snapshot.destruct(),super.destruct()}}(0,n.gn)([(0,x.debounce)()],gt.prototype,"onChange",null);class vt{constructor(t){this.jodit=t,t.e.on("removeMarkers",(()=>{this.removeMarkers()}))}get j(){return this.jodit}errorNode(t){if(!_.i.isNode(t))throw(0,c.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?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){const t=this.sel;return t&&t.rangeCount?t.getRangeAt(0):this.createRange()}createRange(t=!1){const e=this.doc.createRange();return t&&this.selectRange(e),e}remove(){const t=this.sel,e=this.current();if(t&&e)for(let e=0;t.rangeCount>e;e+=1)t.getRangeAt(e).deleteContents(),t.getRangeAt(e).collapse(!0)}clear(){var t,e;(null===(t=this.sel)||void 0===t?void 0:t.rangeCount)&&(null===(e=this.sel)||void 0===e||e.removeAllRanges())}removeNode(t){if(!_.i.isOrContains(this.j.editor,t,!0))throw(0,c.error)("Selection.removeNode can remove only editor's children");_.i.safeRemove(t),this.j.e.fire("afterRemoveNode",t)}insertCursorAtPoint(t,e){this.removeMarkers();try{const s=this.createRange();return(()=>{if(this.doc.caretPositionFromPoint){const i=this.doc.caretPositionFromPoint(t,e);if(i)return void s.setStart(i.offsetNode,i.offset)}if(this.doc.caretRangeFromPoint){const i=this.doc.caretRangeFromPoint(t,e);s.setStart(i.startContainer,i.startOffset)}})(),s.collapse(!0),this.selectRange(s),!0}catch(t){}return!1}static isMarker(t){return _.i.isNode(t)&&_.i.isTag(t,"span")&&t.hasAttribute("data-"+a.MARKER_CLASS)}get hasMarkers(){return!!this.markers.length}get markers(){return(0,c.$$)("span[data-"+a.MARKER_CLASS+"]",this.area)}removeMarkers(){this.markers.forEach(_.i.safeRemove)}marker(t=!1,e){let s=null;e&&(s=e.cloneRange(),s.collapse(t));const i=this.j.createInside.span();return i.id=a.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),i.style.lineHeight="0",i.style.display="none",i.setAttribute("data-"+a.MARKER_CLASS,t?"start":"end"),i.appendChild(this.j.createInside.text(a.INVISIBLE_SPACE)),s&&_.i.isOrContains(this.area,t?s.startContainer:s.endContainer)&&s.insertNode(i),i}restore(){let t=!1;const e=t=>`span[data-${a.MARKER_CLASS}=${t?"start":"end"}]`,s=this.area.querySelector(e(!0)),i=this.area.querySelector(e(!1));if(s){if(t=this.createRange(),i)t.setStartAfter(s),_.i.safeRemove(s),t.setEndBefore(i),_.i.safeRemove(i);else{const e=s.previousSibling;_.i.isText(e)?t.setStart(e,e.nodeValue?e.nodeValue.length:0):t.setStartBefore(s),_.i.safeRemove(s),t.collapse(!0)}t&&this.selectRange(t)}}save(t=!1){if(this.hasMarkers)return[];const e=this.sel;if(!e||!e.rangeCount)return[];const s=[],i=e.rangeCount,o=[];for(let t=0;i>t;t+=1)if(o[t]=e.getRangeAt(t),o[t].collapsed){const e=this.marker(!0,o[t]);s[t]={startId:e.id,collapsed:!0,startMarker:e.outerHTML}}else{const e=this.marker(!0,o[t]),i=this.marker(!1,o[t]);s[t]={startId:e.id,endId:i.id,collapsed:!1,startMarker:e.outerHTML,endMarker:i.outerHTML}}if(!t){e.removeAllRanges();for(let t=i-1;t>=0;--t){const i=this.doc.getElementById(s[t].startId);if(i)if(s[t].collapsed)o[t].setStartAfter(i),o[t].collapse(!0);else if(o[t].setStartBefore(i),s[t].endId){const e=this.doc.getElementById(s[t].endId);e&&o[t].setEndAfter(e)}try{e.addRange(o[t].cloneRange())}catch(t){}}}return s}focus(t={preventScroll:!0}){var e,s;if(!this.isFocused()){const i=(0,c.getScrollParent)(this.j.container),o=null==i?void 0:i.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(),this.win.focus(),this.area.focus(t),o&&(null==i||i.scrollTo(0,o));const n=this.sel,r=(null==n?void 0:n.rangeCount)?null==n?void 0:n.getRangeAt(0):null;if(!r||!_.i.isOrContains(this.area,r.startContainer)){const t=this.createRange();t.setStart(this.area,0),t.collapse(!0),this.selectRange(t,!1)}return this.j.editorIsActive||null===(s=null===(e=this.j)||void 0===e?void 0:e.events)||void 0===s||s.fire("focus"),!0}return!1}isCollapsed(){const t=this.sel;for(let e=0;t&&t.rangeCount>e;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(t=!0){if(this.j.getRealMode()===a.MODE_WYSIWYG){const e=this.sel;if(!e||0===e.rangeCount)return null;const s=e.getRangeAt(0);let i=s.startContainer,o=!1;const n=t=>o?t.lastChild:t.firstChild;if(_.i.isTag(i,"br")&&e.isCollapsed)return i;if(!_.i.isText(i)){if(i=s.startContainer.childNodes[s.startOffset],i||(i=s.startContainer.childNodes[s.startOffset-1],o=!0),i&&e.isCollapsed&&!_.i.isText(i))if(!o&&_.i.isText(i.previousSibling))i=i.previousSibling;else if(t){let t=n(i);for(;t;){if(t&&_.i.isText(t)){i=t;break}t=n(t)}}if(i&&!e.isCollapsed&&!_.i.isText(i)){let t=i,e=i;do{t=t.firstChild,e=e.lastChild}while(t&&e&&!_.i.isText(t));t===e&&t&&_.i.isText(t)&&(i=t)}}if(i&&_.i.isOrContains(this.area,i))return i}return null}insertNode(t,e=!0,s=!0){var i;this.errorNode(t),this.j.e.fire("safeHTML",t),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());const o=this.sel;if(this.isCollapsed()||this.j.execCommand("Delete"),o&&o.rangeCount){const e=o.getRangeAt(0);_.i.isOrContains(this.area,e.commonAncestorContainer)?_.i.isTag(e.startContainer,a.INSEPARABLE_TAGS)&&e.collapsed?null===(i=e.startContainer.parentNode)||void 0===i||i.insertBefore(t,e.startContainer):(e.deleteContents(),e.insertNode(t)):this.area.appendChild(t)}else this.area.appendChild(t);e&&(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t.lastChild&&this.setCursorAfter(t.lastChild):this.setCursorAfter(t)),s&&this.j.events&&this.j.e.fire("synchro"),this.j.events&&this.j.e.fire("afterInsertNode",t)}insertHTML(t){if(""===t)return;const e=this.j.createInside.div(),s=this.j.createInside.fragment();let i;if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),_.i.isNode(t)?e.appendChild(t):e.innerHTML=""+t,(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",e.innerHTML))&&(i=e.lastChild,i)){for(;e.firstChild;)i=e.firstChild,s.appendChild(e.firstChild);this.insertNode(s,!1,!1),i?this.setCursorAfter(i):this.setCursorIn(s),this.j.e&&this.j.e.fire("synchro")}}insertImage(t,e=null,s=null){const i=(0,c.isString)(t)?this.j.createInside.element("img"):t;if((0,c.isString)(t)&&i.setAttribute("src",t),null!=s){let t=""+s;t&&"auto"!==t&&0>(t+"").indexOf("px")&&0>(t+"").indexOf("%")&&(t+="px"),(0,c.call)(this.j.o.resizer.forImageChangeAttributes?c.attr:c.css,i,"width",t)}e&&"object"==typeof e&&(0,c.css)(i,e);const o=()=>{(i.offsetHeight>i.naturalHeight||i.offsetWidth>i.naturalWidth)&&(i.style.width="",i.style.height=""),i.removeEventListener("load",o)};this.j.e.on(i,"load",o),i.complete&&o(),this.insertNode(i),this.j.e.fire("afterInsertImage",i)}eachSelection(t){const e=this.sel;if(e&&e.rangeCount){const s=e.getRangeAt(0),i=[],o=s.startOffset,n=this.area.childNodes.length,r=n>o?o:n-1,l=s.startContainer===this.area?this.area.childNodes[r]:s.startContainer,h=s.endContainer===this.area?this.area.childNodes[s.endOffset-1]:s.endContainer;_.i.find(l,(t=>(!t||t===this.area||_.i.isEmptyTextNode(t)||vt.isMarker(t)||i.push(t),t===h||t&&t.contains&&t.contains(h))),this.area,!0,"nextSibling",!1);const d=e=>{if(_.i.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,c.toArray)(e.childNodes).forEach(d);if(_.i.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{const t=this.j.createInside.text(a.INVISIBLE_SPACE);e.appendChild(t),e=t}t(e)}};0===i.length&&_.i.isEmptyTextNode(l)&&i.push(l),i.forEach(d)}}cursorInTheEdge(t,e){var s,i;const o=!t,n=null===(s=this.sel)||void 0===s?void 0:s.getRangeAt(0),r=this.current(!1);if(!n||!r||!_.i.isOrContains(e,r,!0))return null;const l=t?n.startContainer:n.endContainer,h=t?n.startOffset:n.endOffset,d=t=>t&&!_.i.isTag(t,"br")&&!_.i.isEmptyTextNode(t);if(_.i.isText(l)){const e=(null===(i=l.nodeValue)||void 0===i?void 0:i.length)?l.nodeValue:"";if(o&&e.replace((0,a.INVISIBLE_SPACE_REG_EXP_END)(),"").length>h)return!1;const s=(0,a.INVISIBLE_SPACE_REG_EXP_START)().exec(e);if(t&&(s&&h>s[0].length||!s&&h>0))return!1}else{const t=(0,c.toArray)(l.childNodes);if(o){if(t.slice(h).some(d))return!1}else if(t.slice(0,h).some(d))return!1}return!(0,c.call)(t?_.i.prev:_.i.next,r,d,e)}cursorOnTheLeft(t){return this.cursorInTheEdge(!0,t)}cursorOnTheRight(t){return this.cursorInTheEdge(!1,t)}setCursorAfter(t){return this.setCursorNearWith(t,!1)}setCursorBefore(t){return this.setCursorNearWith(t,!0)}setCursorNearWith(t,e){var s,i;if(this.errorNode(t),!_.i.up(t,(t=>t===this.area||t&&t.parentNode===this.area),this.area))throw(0,c.error)("Node element must be in editor");const o=this.createRange();let n=null;return _.i.isText(t)?e?o.setStart(t,0):o.setEnd(t,null!==(i=null===(s=t.nodeValue)||void 0===s?void 0:s.length)&&void 0!==i?i:0):(n=this.j.createInside.text(a.INVISIBLE_SPACE),e?o.setStartBefore(t):o.setEndAfter(t),o.collapse(e),o.insertNode(n),o.selectNode(n)),o.collapse(e),this.selectRange(o),n}setCursorIn(t,e=!1){if(this.errorNode(t),!_.i.up(t,(t=>t===this.area||t&&t.parentNode===this.area),this.area))throw(0,c.error)("Node element must be in editor");const s=this.createRange();let i=t,o=t;do{if(_.i.isText(i))break;o=i,i=e?i.firstChild:i.lastChild}while(i);if(!i){const t=this.j.createInside.text(a.INVISIBLE_SPACE);/^(img|br|input)$/i.test(o.nodeName)?i=o:(o.appendChild(t),o=t)}return s.selectNodeContents(i||o),s.collapse(e),this.selectRange(s),o}selectRange(t,e=!0){const s=this.sel;e&&!this.isFocused()&&this.focus(),s&&(s.removeAllRanges(),s.addRange(t)),this.j.e.fire("changeSelection")}select(t,e=!1){if(this.errorNode(t),!_.i.up(t,(t=>t===this.area||t&&t.parentNode===this.area),this.area))throw(0,c.error)("Node element must be in editor");const s=this.createRange();s[e?"selectNodeContents":"selectNode"](t),this.selectRange(s)}get html(){const t=this.sel;if(t&&t.rangeCount>0){const e=t.getRangeAt(0).cloneContents(),s=this.j.createInside.div();return s.appendChild(e),s.innerHTML}return""}*wrapInTagGen(){if(this.isCollapsed()){const t=this.jodit.createInside.element("font",a.INVISIBLE_SPACE);this.insertNode(t,!1,!1);const[e]=this.markers;return e?t.appendChild(e):(this.setCursorIn(t),this.save()),yield t,void _.i.unwrap(t)}if((0,c.$$)("*[style*=font-size]",this.area).forEach((t=>(0,c.attr)(t,"data-font-size",""+t.style.fontSize))),this.isCollapsed()){const t=this.j.createInside.element("font");(0,c.attr)(t,"size",7),this.insertNode(t,!1,!1)}else this.j.nativeExecCommand("fontsize",!1,"7");(0,c.$$)("*[data-font-size]",this.area).forEach((t=>{const e=(0,c.attr)(t,"data-font-size");e&&(t.style.fontSize=e,(0,c.attr)(t,"data-font-size",null))}));const t=(0,c.$$)('font[size="7"]',this.area);for(const e of t){const{firstChild:t,lastChild:s}=e;t&&t===s&&vt.isMarker(t)||(t&&vt.isMarker(t)&&_.i.before(e,t),s&&vt.isMarker(s)&&_.i.after(e,s),yield e),_.i.unwrap(e)}}wrapInTag(t){const e=[];for(const s of this.wrapInTagGen())try{if(s.firstChild&&s.firstChild===s.lastChild&&vt.isMarker(s.firstChild))continue;(0,c.isFunction)(t)?t(s):e.push(_.i.replace(s,t,this.j.createInside))}finally{const t=s.parentNode;t&&(_.i.unwrap(s),_.i.isEmpty(t)&&_.i.unwrap(t))}return e}applyStyle(t,e={}){new xt({style:t,element:e.element,className:e.className,defaultTag:e.defaultTag}).apply(this.j)}splitSelection(t){if(!this.isCollapsed())return null;const e=this.createRange(),s=this.range;e.setStartBefore(t);const i=this.cursorOnTheRight(t),o=this.cursorOnTheLeft(t),n=this.j.createInside.element("br"),r=this.j.createInside.text(a.INVISIBLE_SPACE),l=r.cloneNode();try{if(i||o){s.insertNode(n);const t=(t,e)=>{let s=e(t);for(;s;){const t=e(s);if(!s||!_.i.isTag(s,"br")&&!_.i.isEmptyTextNode(s))break;_.i.safeRemove(s),s=t}};t(n,(t=>t.nextSibling)),t(n,(t=>t.previousSibling)),_.i.after(n,l),_.i.before(n,r),i?(e.setEndBefore(n),s.setEndBefore(n)):(e.setEndAfter(n),s.setEndAfter(n))}else e.setEnd(s.startContainer,s.startOffset);const a=e.extractContents();if(t.parentNode)try{if(t.parentNode.insertBefore(a,t),i&&(null==n?void 0:n.parentNode)){const t=this.createRange();t.setStartBefore(n),this.selectRange(t)}}catch(t){}const c=t=>{var e,s,i;(null===(e=null==t?void 0:t.parentNode)||void 0===e?void 0:e.firstChild)===(null===(s=null==t?void 0:t.parentNode)||void 0===s?void 0:s.lastChild)&&(null===(i=null==t?void 0:t.parentNode)||void 0===i||i.appendChild(n.cloneNode()))};c(r),c(l)}finally{_.i.safeRemove(r),_.i.safeRemove(l)}return t.previousElementSibling}}function bt(t){return!(!t||_.i.isEmptyTextNode(t)||vt.isMarker(t))}function wt(t,e,s){if(!e)return!1;const{element:i,elementIsDefault:o,options:n}=t,r=!(!n.style||!((t,e)=>!(_.i.isTag(t,"font")||!_.i.isHTMLElement(t)||!Object.keys(e).every((s=>{const i=(0,c.css)(t,s,!0);return!(0,c.isVoid)(i)&&""!==i&&!(0,c.isVoid)(e[s])&&(""+(0,c.normalizeCssValue)(s,e[s])).toLowerCase()===(""+i).toLowerCase()}))))(e,n.style)),a=e.nodeName.toLowerCase()===i;return!!((!o||!s)&&a||r&&bt(e))||!(a||s||!o||!_.i.isInlineBlock(e))}function yt(t,e,s){const i=e.extractContents();i.textContent&&(0,c.trim)(i.textContent).length||!i.firstChild||_.i.unwrap(i.firstChild),t.parentNode&&(0,c.call)(s?_.i.before:_.i.after,t,i)}function Ct(t,e,s){if(/^(OL|UL)$/i.test(t.element)&&!_.i.isTag(e.firstElementChild,"li")){const i=_.i.replace(e,"li",s),o=_.i.wrap(i,t.element,s);if(o)return o}return e}function jt(t,e,s,i,o,n){if(((t,e)=>!!_.i.closest(t,["style","script"],e))(e,s))return n;const r=((t,e,s)=>{const{parentNode:i}=e;return!i||_.i.next(e,bt,i)||_.i.prev(e,bt,i)||!wt(t,i,!1)||i===s||_.i.isBlock(i)&&!t.elementIsBlock?null:i})(t,e,s)||((t,e)=>{let{firstChild:s}=e;for(;s&&!bt(s);)if(s=s.nextSibling,!s)return null;return s&&!_.i.next(s,bt,e)&&wt(t,s,!1)?s:null})(t,e)||((t,e,s,i)=>{const o=_.i.closest(e,(e=>wt(t,e,!0)),s);if(o){if(t.elementIsBlock)return o;const s=i(),n=vt.isMarker(e.previousSibling)?e.previousSibling:e;s.setStartBefore(o),s.setEndBefore(n),yt(o,s,!0);const r=vt.isMarker(e.nextSibling)?e.nextSibling:e;return s.setStartAfter(r),s.setEndAfter(o),yt(o,s,!1),o}return null})(t,e,s,i);if(r)return((t,e,s)=>{const{options:{style:i},defaultTag:o,element:n}=t,r=e.nodeName.toLowerCase(),a=t.elementIsDefault&&_.i.isInlineBlock(e);i&&(r===o||a)&&Object.keys(i).forEach((t=>{!1===s||(0,c.css)(e,t)===(0,c.normalizeCssValue)(t,i[t])?((0,c.css)(e,t,""),null==s&&(s=!1)):((0,c.css)(e,t,i[t]),null==s&&(s=!0))}));const l=_.i.isBlock(e),h=!l&&(!(0,c.attr)(e,"style")||r!==o&&r===n);return(h||!h&&l&&r===n)&&(_.i.unwrap(e),null==s&&(s=!1)),s})(t,r,n);if(((t,e)=>{const s=[];let i;return e.firstChild&&_.i.find(e.firstChild,(e=>(e&&wt(t,e,!0)?(void 0===i&&(i=!0),s.push(e)):void 0===i&&(i=!1),!1)),e,!0),s.forEach(_.i.unwrap),!!i})(t,e))return n;if(null==n&&(n=!0),!n)return n;let a=e;if(t.elementIsBlock){const n=/^(ul|ol|li|td|th|tr|tbody|table)$/i;a=_.i.up(e,(e=>!(!_.i.isBlock(e)||!n.test(t.element)&&n.test(e.nodeName))),s)||((t,e,s,i,o)=>{const n=(t,e="previousSibling")=>{let i=t,o=t;for(;o&&(i=o,o=o[e]?o[e]:o.parentNode&&!_.i.isBlock(o.parentNode)&&o.parentNode!==s?o.parentNode:null,!_.i.isBlock(o)););return i},r=n(e),a=n(e,"nextSibling"),l=o();l.setStartBefore(r),l.setEndAfter(a);const c=l.extractContents();let h=i.element(t.element);return h.appendChild(c),l.insertNode(h),t.elementIsBlock&&(h=Ct(t,h,i),_.i.isEmpty(h)&&!_.i.isTag(h.firstElementChild,"br")&&h.appendChild(i.element("br"))),h})(t,e,s,o,i)}const l=_.i.replace(a,t.element,o,!0);return(0,c.attr)(l,"size",null),t.elementIsBlock&&Ct(t,l,o),t.options.style&&t.elementIsDefault&&(0,c.css)(l,t.options.style),t.options.className&&l.classList.toggle(t.options.className),n}(0,n.gn)([x.autobind],vt.prototype,"focus",null),(0,n.gn)([x.autobind],vt.prototype,"setCursorAfter",null),(0,n.gn)([x.autobind],vt.prototype,"setCursorBefore",null),(0,n.gn)([x.autobind],vt.prototype,"setCursorIn",null);class xt{constructor(t){this.options=t}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!(!this.options.element||!a.IS_BLOCK.test(this.options.element))}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(t){((t,e)=>{const{s,editor:i,createInside:o}=t,n=()=>s.createRange();let r=null;s.save(),(0,c.normalizeNode)(s.area.firstChild);for(const s of t.s.wrapInTagGen())r=jt(e,s,i,n,o,r);s.restore()})(t,this)}}class Et extends u.Hr{constructor(t,e){super(t),this.target=e,this.container=t.c.div("jodit-status-bar"),e.appendChild(this.container),this.hide()}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(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.offsetHeight)&&void 0!==e?e:0}findEmpty(t=!1){var e;const s=null===(e=this.container)||void 0===e?void 0:e.querySelectorAll(".jodit-status-bar__item"+(t?".jodit-status-bar__item-right":""));if(s)for(let t=0;s.length>t;t+=1)if(!s[t].innerHTML.trim().length)return s[t]}append(t,e=!1){var s;const i=this.findEmpty(e)||this.j.c.div("jodit-status-bar__item");e&&i.classList.add("jodit-status-bar__item-right"),i.appendChild(t),null===(s=this.container)||void 0===s||s.appendChild(i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.setStatus(u.n$.beforeDestruct),_.i.safeRemove(this.container),super.destruct()}}class St extends u.Hr{constructor(){super(...arguments),this.selected=new Set}className(){return"Table"}recalculateStyles(){const t=(0,j.ZO)(this.j,St,"style",!0),e=[];this.selected.forEach((t=>{const s=(0,c.cssPath)(t);s&&e.push(s)})),t.innerHTML=e.length?e.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(t){this.selected.add(t),this.recalculateStyles();const e=_.i.closest(t,"table",this.j.editor);if(e){const s=St.selectedByTable.get(e)||new Set;s.add(t),St.selectedByTable.set(e,s)}}removeSelection(t){this.selected.delete(t),this.recalculateStyles();const e=_.i.closest(t,"table",this.j.editor);if(e){const s=St.selectedByTable.get(e);s&&(s.delete(t),s.size||St.selectedByTable.delete(e))}}getAllSelectedCells(){return(0,c.toArray)(this.selected)}static getSelectedCellsByTable(t){const e=St.selectedByTable.get(t);return e?(0,c.toArray)(e):[]}destruct(){return this.selected.clear(),super.destruct()}static getRowsCount(t){return t.rows.length}static getColumnsCount(t){return St.formalMatrix(t).reduce(((t,e)=>Math.max(t,e.length)),0)}static formalMatrix(t,e){const s=[[]],i=(0,c.toArray)(t.rows),o=(t,i)=>{void 0===s[i]&&(s[i]=[]);const o=t.colSpan,n=t.rowSpan;let r,a,l=0;for(;s[i][l];)l+=1;for(a=0;n>a;a+=1)for(r=0;o>r;r+=1){if(void 0===s[i+a]&&(s[i+a]=[]),e&&!1===e(t,i+a,l+r,o,n))return!1;s[i+a][l+r]=t}};for(let t=0;i.length>t;t+=1){const e=(0,c.toArray)(i[t].cells);for(let i=0;e.length>i;i+=1)if(!1===o(e[i],t))return s}return s}static formalCoordinate(t,e,s=!1){let i=0,o=0,n=1,r=1;return St.formalMatrix(t,((t,a,l,c,h)=>{if(e===t)return i=a,o=l,n=c||1,r=h||1,s&&(o+=(c||1)-1,i+=(h||1)-1),!1})),[i,o,n,r]}static appendRow(t,e,s,i){let o;if(e)o=e.cloneNode(!0),(0,c.$$)("td,th",e).forEach((t=>{const e=(0,c.attr)(t,"rowspan");if(e&&parseInt(e,10)>1){const s=parseInt(e,10)-1;(0,c.attr)(t,"rowspan",s>1?s:null)}})),(0,c.$$)("td,th",o).forEach((t=>{t.innerHTML=""}));else{const e=St.getColumnsCount(t);o=i.element("tr");for(let t=0;e>t;t+=1)o.appendChild(i.element("td"))}s&&e&&e.nextSibling?e.parentNode&&e.parentNode.insertBefore(o,e.nextSibling):!s&&e?e.parentNode&&e.parentNode.insertBefore(o,e):((0,c.$$)(":scope>tbody",t)[0]||t).appendChild(o)}static removeRow(t,e){const s=St.formalMatrix(t);let i;const o=t.rows[e];(0,c.each)(s[e],((n,r)=>{if(i=!1,0>e-1||s[e-1][n]!==r)if(s[e+1]&&s[e+1][n]===r){if(r.parentNode===o&&r.parentNode.nextSibling){i=!0;let o=n+1;for(;s[e+1][o]===r;)o+=1;const a=_.i.next(r.parentNode,(t=>_.i.isTag(t,"tr")),t);s[e+1][o]?a.insertBefore(r,s[e+1][o]):a.appendChild(r)}}else _.i.safeRemove(r);else i=!0;if(i&&(r.parentNode===o||r!==s[e][n-1])){const t=r.rowSpan;(0,c.attr)(r,"rowspan",t-1>1?""+(t-1):null)}})),_.i.safeRemove(o)}static appendColumn(t,e,s,i){const o=St.formalMatrix(t);let n;for((void 0===e||0>e)&&(e=St.getColumnsCount(t)-1),n=0;o.length>n;n+=1){const t=i.element("td"),r=o[n][e];let a=!1;s?(o[n]&&r&&e+1>=o[n].length||r!==o[n][e+1])&&(r.nextSibling?r.parentNode&&r.parentNode.insertBefore(t,r.nextSibling):r.parentNode&&r.parentNode.appendChild(t),a=!0):(0>e-1||o[n][e]!==o[n][e-1]&&o[n][e].parentNode)&&(r.parentNode&&r.parentNode.insertBefore(t,o[n][e]),a=!0),a||o[n][e].setAttribute("colspan",""+(parseInt((0,c.attr)(o[n][e],"colspan")||"1",10)+1))}}static removeColumn(t,e){const s=St.formalMatrix(t);let i;(0,c.each)(s,((t,o)=>{const n=o[e];if(i=!1,0>e-1||s[t][e-1]!==n?o.length>e+1&&s[t][e+1]===n?i=!0:_.i.safeRemove(n):i=!0,i&&(0>t-1||n!==s[t-1][e])){const t=n.colSpan;(0,c.attr)(n,"colspan",t-1>1?""+(t-1):null)}}))}static getSelectedBound(t,e){const s=[[1/0,1/0],[0,0]],i=St.formalMatrix(t);let o,n,r;for(o=0;i.length>o;o+=1)for(n=0;i[o]&&i[o].length>n;n+=1)e.includes(i[o][n])&&(s[0][0]=Math.min(o,s[0][0]),s[0][1]=Math.min(n,s[0][1]),s[1][0]=Math.max(o,s[1][0]),s[1][1]=Math.max(n,s[1][1]));for(o=s[0][0];s[1][0]>=o;o+=1)for(r=1,n=s[0][1];s[1][1]>=n;n+=1){for(;i[o]&&i[o][n-r]&&i[o][n]===i[o][n-r];)s[0][1]=Math.min(n-r,s[0][1]),s[1][1]=Math.max(n-r,s[1][1]),r+=1;for(r=1;i[o]&&i[o][n+r]&&i[o][n]===i[o][n+r];)s[0][1]=Math.min(n+r,s[0][1]),s[1][1]=Math.max(n+r,s[1][1]),r+=1;for(r=1;i[o-r]&&i[o][n]===i[o-r][n];)s[0][0]=Math.min(o-r,s[0][0]),s[1][0]=Math.max(o-r,s[1][0]),r+=1;for(r=1;i[o+r]&&i[o][n]===i[o+r][n];)s[0][0]=Math.min(o+r,s[0][0]),s[1][0]=Math.max(o+r,s[1][0]),r+=1}return s}static normalizeTable(t){let e,s,i,o;const n=[],r=St.formalMatrix(t);for(s=0;r[0].length>s;s+=1){for(i=1e6,o=!1,e=0;r.length>e;e+=1)if(void 0!==r[e][s]){if(2>r[e][s].colSpan){o=!0;break}i=Math.min(i,r[e][s].colSpan)}if(!o)for(e=0;r.length>e;e+=1)void 0!==r[e][s]&&St.__mark(r[e][s],"colspan",r[e][s].colSpan-i+1,n)}for(e=0;r.length>e;e+=1){for(i=1e6,o=!1,s=0;r[e].length>s;s+=1)if(void 0!==r[e][s]){if(2>r[e][s].rowSpan){o=!0;break}i=Math.min(i,r[e][s].rowSpan)}if(!o)for(s=0;r[e].length>s;s+=1)void 0!==r[e][s]&&St.__mark(r[e][s],"rowspan",r[e][s].rowSpan-i+1,n)}for(e=0;r.length>e;e+=1)for(s=0;r[e].length>s;s+=1)void 0!==r[e][s]&&(r[e][s].hasAttribute("rowspan")&&1===r[e][s].rowSpan&&r[e][s].removeAttribute("rowspan"),r[e][s].hasAttribute("colspan")&&1===r[e][s].colSpan&&r[e][s].removeAttribute("colspan"),r[e][s].hasAttribute("class")&&!(0,c.attr)(r[e][s],"class")&&r[e][s].removeAttribute("class"));St.__unmark(n)}static mergeSelected(t,e){const s=[],i=St.getSelectedBound(t,St.getSelectedCellsByTable(t));let o,n=0,r=null,l=0,h=0,d=0;const u=[];i&&(i[0][0]-i[1][0]||i[0][1]-i[1][1])&&(St.formalMatrix(t,((t,a,p,f,m)=>{if(!(i[0][0]>a||a>i[1][0]||i[0][1]>p||p>i[1][1])){if(o=t,o.__i_am_already_was)return;o.__i_am_already_was=!0,a===i[0][0]&&o.style.width&&(n+=o.offsetWidth),""!==(0,c.trim)(t.innerHTML.replace(/<br(\/)?>/g,""))&&s.push(t.innerHTML),f>1&&(h+=f-1),m>1&&(d+=m-1),r?(St.__mark(o,"remove",1,u),_t(e).removeSelection(o)):(r=t,l=p)}})),h=i[1][1]-i[0][1]+1,d=i[1][0]-i[0][0]+1,r&&(h>1&&St.__mark(r,"colspan",h,u),d>1&&St.__mark(r,"rowspan",d,u),n&&(St.__mark(r,"width",(n/t.offsetWidth*100).toFixed(a.ACCURACY)+"%",u),l&&St.setColumnWidthByDelta(t,l,0,!0,u)),r.innerHTML=s.join("<br/>"),_t(e).addSelection(r),delete r.__i_am_already_was,St.__unmark(u),St.normalizeTable(t),(0,c.each)((0,c.toArray)(t.rows),((t,e)=>{e.cells.length||_.i.safeRemove(e)}))))}static splitHorizontal(t,e){let s,i,o,n,r;const a=[];St.getSelectedCellsByTable(t).forEach((l=>{i=e.createInside.element("td"),i.appendChild(e.createInside.element("br")),o=e.createInside.element("tr"),s=St.formalCoordinate(t,l),2>l.rowSpan?(St.formalMatrix(t,((t,e,i)=>{s[0]===e&&s[1]!==i&&t!==l&&St.__mark(t,"rowspan",t.rowSpan+1,a)})),_.i.after(_.i.closest(l,"tr",t),o),o.appendChild(i)):(St.__mark(l,"rowspan",l.rowSpan-1,a),St.formalMatrix(t,((e,i,o)=>{i>s[0]&&s[0]+l.rowSpan>i&&s[1]>o&&e.parentNode.rowIndex===i&&(r=e),i>s[0]&&e===l&&(n=t.rows[i])})),r?_.i.after(r,i):n.insertBefore(i,n.firstChild)),l.colSpan>1&&St.__mark(i,"colspan",l.colSpan,a),St.__unmark(a),_t(e).removeSelection(l)})),this.normalizeTable(t)}static splitVertical(t,e){let s,i,o;const n=[];St.getSelectedCellsByTable(t).forEach((r=>{s=St.formalCoordinate(t,r),2>r.colSpan?St.formalMatrix(t,((t,e,i)=>{s[1]===i&&s[0]!==e&&t!==r&&St.__mark(t,"colspan",t.colSpan+1,n)})):St.__mark(r,"colspan",r.colSpan-1,n),i=e.createInside.element("td"),i.appendChild(e.createInside.element("br")),r.rowSpan>1&&St.__mark(i,"rowspan",r.rowSpan,n);const l=r.offsetWidth;_.i.after(r,i),o=l/t.offsetWidth/2,St.__mark(r,"width",(100*o).toFixed(a.ACCURACY)+"%",n),St.__mark(i,"width",(100*o).toFixed(a.ACCURACY)+"%",n),St.__unmark(n),_t(e).removeSelection(r)})),St.normalizeTable(t)}static setColumnWidthByDelta(t,e,s,i,o){const n=St.formalMatrix(t);let r,l,c;for(r=0;n.length>r;r+=1)l=n[r][e].offsetWidth,c=(l+s)/t.offsetWidth*100,St.__mark(n[r][e],"width",c.toFixed(a.ACCURACY)+"%",o);i||St.__unmark(o)}static __mark(t,e,s,i){i.push(t),t.__marked_value||(t.__marked_value={}),t.__marked_value[e]=void 0===s?1:s}static __unmark(t){t.forEach((t=>{t.__marked_value&&((0,c.each)(t.__marked_value,((e,s)=>{switch(e){case"remove":_.i.safeRemove(t);break;case"rowspan":s>1?t.setAttribute("rowspan",""+s):t.removeAttribute("rowspan");break;case"colspan":s>1?t.setAttribute("colspan",""+s):t.removeAttribute("colspan");break;case"width":t.style.width=""+s}delete t.__marked_value[e]})),delete t.__marked_value)}))}}St.selectedByTable=new WeakMap,(0,n.gn)([(0,x.debounce)()],St.prototype,"recalculateStyles",null);const _t=t=>t.getInstance("Table",t.o);r.D.prototype.enableDragAndDropFileToEditor=!0,r.D.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName(t){return`files[${t}]`},withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData(t){return t},isSuccess(t){return t.success},getMessage(t){return void 0!==t.data.messages&&(0,c.isArray)(t.data.messages)?t.data.messages.join(" "):""},process(t){return t.data},error(t){this.j.e.fire("errorMessage",t.message,"error",4e3)},defaultHandlerSuccess(t){const e=this.j||this;(0,c.isJoditObject)(e)&&t.files&&t.files.length&&t.files.forEach(((s,i)=>{const[o,n]=t.isImages&&t.isImages[i]?["img","src"]:["a","href"],r=e.createInside.element(o);r.setAttribute(n,t.baseurl+s),"a"===o&&(r.textContent=t.baseurl+s),"img"===o?e.s.insertImage(r,null,e.o.imageDefaultWidth):e.s.insertNode(r)}))},defaultHandlerError(t){this.j.e.fire("errorMessage",t.message)},contentType(t){return(void 0===this.j.ow.FormData||"string"==typeof t)&&"application/x-www-form-urlencoded; charset=UTF-8"}};class kt extends u.Hr{constructor(t,e){super(t),this.path="",this.source="default",this.ajaxInstances=[],this.options=(0,c.ConfigProto)(e||{},(0,c.ConfigProto)(r.D.defaultOptions.uploader,(0,c.isJoditObject)(t)?t.o.uploader:{}))}className(){return"Uploader"}static dataURItoBlob(t){const e=atob(t.split(",")[1]),s=t.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(e.length),o=new Uint8Array(i);for(let t=0;e.length>t;t+=1)o[t]=e.charCodeAt(t);return new Blob([o],{type:s})}get o(){return this.options}buildData(t){if(this.o.buildData&&"function"==typeof this.o.buildData)return this.o.buildData.call(this,t);const e=this.j.ow.FormData;if(void 0!==e){if(t instanceof e)return t;if((0,c.isString)(t))return t;const s=new e;return Object.keys(t).forEach((e=>{s.append(e,t[e])})),s}return t}send(t,e){const s=this.buildData(t),i=t=>{const s=new d(this.j,{xhr:()=>{const t=new XMLHttpRequest;return void 0!==this.j.ow.FormData&&t.upload?(this.j.progressbar.show().progress(10),t.upload.addEventListener("progress",(t=>{if(t.lengthComputable){let e=t.loaded/t.total;e*=100,this.j.progressbar.show().progress(e),100>e||this.j.progressbar.hide()}}),!1)):this.j.progressbar.hide(),t},method:this.o.method||"POST",data:t,url:(0,c.isFunction)(this.o.url)?this.o.url(t):this.o.url,headers:this.o.headers,queryBuild:this.o.queryBuild,contentType:this.o.contentType.call(this,t),dataType:this.o.format||"json",withCredentials:this.o.withCredentials||!1});this.ajaxInstances.push(s);const i=()=>{const t=this.ajaxInstances.indexOf(s);-1!==t&&this.ajaxInstances.splice(t,1)};return s.send().then((t=>{i(),e.call(this,t)})).catch((t=>{i(),this.o.error.call(this,t)}))};return s instanceof Promise?s.then(i).catch((t=>{this.o.error.call(this,t)})):i(s)}sendFiles(t,e,s,i){if(!t)return Promise.reject((0,c.error)("Need files"));const o=this;let n=(0,c.toArray)(t);if(!n.length)return Promise.reject((0,c.error)("Need files"));const r=[];if(this.o.insertImageAsBase64URI){let t,s;for(s=0;n.length>s;s+=1)if(t=n[s],t&&t.type){const i=t.type.match(/\/([a-z0-9]+)/i),a=i[1]?i[1].toLowerCase():"";if(this.o.imagesExtensions.includes(a)){const i=new FileReader;r.push(new Promise(((s,n)=>{i.onerror=n,i.onloadend=()=>{const t={baseurl:"",files:[i.result],isImages:[!0]};"function"==typeof(e||o.options.defaultHandlerSuccess)&&(e||o.options.defaultHandlerSuccess).call(o,t),s(t)},i.readAsDataURL(t)}))),n[s]=null}}}if(n=n.filter((t=>t)),n.length){const t=new FormData;let a;t.append(this.o.pathVariableName,o.path),t.append("source",o.source);for(let e=0;n.length>e;e+=1)if(a=n[e],a){const s=a.type.match(/\/([a-z0-9]+)/i),i=s&&s[1]?s[1].toLowerCase():"";let o=n[e].name||(""+Math.random()).replace(".","");if(i){let t=i;["jpeg","jpg"].includes(t)&&(t="jpeg|jpg"),RegExp(".("+t+")$","i").test(o)||(o+="."+i)}t.append(this.o.filesVariableName(e),n[e],o)}i&&i(t),o.o.data&&(0,c.isPlainObject)(o.o.data)&&Object.keys(o.o.data).forEach((e=>{t.append(e,o.o.data[e])})),o.o.prepareData.call(this,t),r.push(o.send(t,(t=>{if(this.o.isSuccess.call(o,t))"function"==typeof(e||o.o.defaultHandlerSuccess)&&(e||o.options.defaultHandlerSuccess).call(o,o.o.process.call(o,t));else if((0,c.isFunction)(s||o.o.defaultHandlerError))return void(s||o.options.defaultHandlerError).call(o,(0,c.error)(o.o.getMessage.call(o,t)))})).then((()=>{this.j.events&&this.j.e.fire("filesWereUploaded")})))}return Promise.all(r)}setPath(t){this.path=t}setSource(t){this.source=t}bind(t,e,s){const i=this,o=t=>{let i,o,r;const l=t.clipboardData,c=t=>{o&&(t.append("extension",r),t.append("mimetype",o.type))};if(!a.IS_IE&&n(l))return this.sendFiles(l.files,e,s),!1;if(l&&l.items&&l.items.length){const n=l.items;for(i=0;n.length>i;i+=1)if("file"===n[i].kind&&"image/png"===n[i].type){if(o=n[i].getAsFile(),o){const t=o.type.match(/\/([a-z0-9]+)/i);r=t[1]?t[1].toLowerCase():"",this.sendFiles([o],e,s,c)}t.preventDefault();break}}};this.j&&this.j.editor!==t?i.j.e.on(t,"paste",o):i.j.e.on("beforePaste",o);const n=t=>!(!t||!t.files||0===t.files.length);i.j.e.on(t,"dragend dragover dragenter dragleave drop",(t=>{t.preventDefault()})).on(t,"dragover",(e=>{n(e.dataTransfer)&&(t.classList.contains("jodit_draghover")||t.classList.add("jodit_draghover"),e.preventDefault())})).on(t,"dragend",(e=>{n(e.dataTransfer)&&(t.classList.contains("jodit_draghover")&&t.classList.remove("jodit_draghover"),e.preventDefault())})).on(t,"drop",(i=>{t.classList.remove("jodit_draghover"),n(i.dataTransfer)&&(i.preventDefault(),i.stopImmediatePropagation(),this.sendFiles(i.dataTransfer.files,e,s))}));const r=t.querySelector("input[type=file]");r&&i.j.e.on(r,"change",(function(){i.sendFiles(this.files,e,s).then((()=>{r.value="",/safari/i.test(navigator.userAgent)||(r.type="",r.type="file")}))}))}uploadRemoteImage(t,e,s){const i=this;i.send({action:"fileUploadRemote",url:t},(t=>{if(i.o.isSuccess.call(i,t))"function"==typeof e?e.call(i,this.o.process.call(this,t)):this.o.defaultHandlerSuccess.call(i,this.o.process.call(this,t));else if("function"==typeof(s||i.o.defaultHandlerError))return void(s||this.o.defaultHandlerError).call(i,(0,c.error)(i.o.getMessage.call(this,t)))}))}destruct(){this.setStatus(u.n$.beforeDestruct),this.ajaxInstances.forEach((t=>{try{t.destruct()}catch(t){}})),super.destruct()}}var Tt=s(14);class Jodit extends N{constructor(t,e){super(e,!0),this.isJodit=!0,this.__defaultStyleDisplayKey="data-jodit-default-style-display",this.__defaultClassesKey="data-jodit-default-classes",this.commands={},this.__selectionLocked=null,this.__wasReadOnly=!1,this.createInside=new F((()=>this.ed),this.o.createAttributes),this.editorIsActive=!1,this.__mode=a.MODE_WYSIWYG,this.__callChangeCount=0,this.isSilentChange=!1,this.elementToPlace=new Map;try{(0,c.resolveElement)(t,this.o.shadowRoot||this.od)}catch(t){throw this.destruct(),t}this.setStatus(u.n$.beforeInit),this.id=(0,c.attr)((0,c.resolveElement)(t,this.o.shadowRoot||this.od),"id")||""+(new Date).getTime(),j.as[this.id]=this,this.storage=C.makeStorage(!0,this.id),this.attachEvents(e),this.e.on(this.ow,"resize",(()=>{this.e&&this.e.fire("resize")})),this.e.on("prepareWYSIWYGEditor",this.prepareWYSIWYGEditor),this.selection=new vt(this);const s=this.beforeInitHook();(0,c.callPromise)(s,(()=>{this.e.fire("beforeInit",this);const s=j.pw.init(this);(0,c.callPromise)(s,(()=>{this.e.fire("afterPluginSystemInit",this),this.e.on("changePlace",(()=>{this.setReadOnly(this.o.readonly),this.setDisabled(this.o.disabled)})),this.places.length=0;const s=this.addPlace(t,e);j.as[this.id]=this,(0,c.callPromise)(s,(()=>{this.e&&this.e.fire("afterInit",this),this.afterInitHook(),this.setStatus(u.n$.ready),this.e.fire("afterConstructor",this)}))}))}))}className(){return"Jodit"}waitForReady(){return this.isReady?Promise.resolve(this):this.async.promise((t=>{this.hookStatus("ready",(()=>t(this)))}))}get text(){if(this.editor)return this.editor.innerText||"";const t=this.createInside.div();return t.innerHTML=this.getElementValue(),t.innerText||""}get value(){return this.getEditorValue()}set value(t){this.setEditorValue(t)}get defaultTimeout(){return this.options&&this.o.observer?this.o.observer.timeout:r.D.defaultOptions.observer.timeout}static atom(t){return(0,c.markAsAtomic)(t)}static make(t,e){return new Jodit(t,e)}static get defaultOptions(){return r.D.defaultOptions}setPlaceField(t,e){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[t]=e}get element(){return this.currentPlace.element}get editor(){return this.currentPlace.editor}set editor(t){this.setPlaceField("editor",t)}get container(){return this.currentPlace.container}set container(t){this.setPlaceField("container",t)}get workplace(){return this.currentPlace.workplace}get statusbar(){return this.currentPlace.statusbar}get iframe(){return this.currentPlace.iframe}set iframe(t){this.setPlaceField("iframe",t)}get observer(){return this.currentPlace.observer}get editorWindow(){return this.currentPlace.editorWindow}set editorWindow(t){this.setPlaceField("editorWindow",t)}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(t){this.setPlaceField("options",t)}get s(){return this.selection}get uploader(){return this.getInstance("Uploader",this.o.uploader)}get filebrowser(){const t=this,e=(0,c.ConfigProto)({defaultTimeout:t.defaultTimeout,uploader:t.o.uploader,language:t.o.language,license:t.o.license,theme:t.o.theme,defaultCallback(e){e.files&&e.files.length&&e.files.forEach(((s,i)=>{const o=e.baseurl+s;e.isImages&&e.isImages[i]?t.s.insertImage(o,null,t.o.imageDefaultWidth):t.s.insertNode(t.createInside.fromHTML(`<a href='${o}' title='${o}'>${o}</a>`))}))}},this.o.filebrowser);return t.getInstance("FileBrowser",e)}get mode(){return this.__mode}set mode(t){this.setMode(t)}getNativeEditorValue(){const t=this.e.fire("beforeGetNativeEditorValue");return(0,c.isString)(t)?t:this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(t){const e={value:t};this.e.fire("beforeSetNativeEditorValue",e)||this.editor&&(this.editor.innerHTML=e.value)}getEditorValue(t=!0){let e;if(e=this.e.fire("beforeGetValueFromEditor"),void 0!==e)return e;e=this.getNativeEditorValue().replace(a.INVISIBLE_SPACE_REG_EXP(),""),t&&(e=e.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===e&&(e="");const s={value:e};return this.e.fire("afterGetValueFromEditor",s),s.value}setEditorValue(t){const e=this.e.fire("beforeSetValueToEditor",t);if(!1===e)return;if((0,c.isString)(e)&&(t=e),!this.editor)return void(void 0!==t&&this.setElementValue(t));if(!(0,c.isString)(t)&&!(0,c.isVoid)(t))throw(0,c.error)("value must be string");void 0!==t&&this.getNativeEditorValue()!==t&&this.setNativeEditorValue(t),this.e.fire("postProcessSetEditorValue");const s=this.getElementValue(),i=this.getEditorValue();if(!this.isSilentChange&&s!==i&&a.SAFE_COUNT_CHANGE_CALL>this.__callChangeCount){this.setElementValue(i),this.__callChangeCount+=1;try{this.observer.upTick(),this.e.fire("change",i,s),this.e.fire(this.observer,"change",i,s)}finally{this.__callChangeCount=0}}}getElementValue(){return void 0!==this.element.value?this.element.value:this.element.innerHTML}setElementValue(t){if(!(0,c.isString)(t)&&void 0!==t)throw(0,c.error)("value must be string");void 0!==t?this.element!==this.container&&(void 0!==this.element.value?this.element.value=t:this.element.innerHTML=t):t=this.getElementValue(),t!==this.getEditorValue()&&this.setEditorValue(t)}registerCommand(t,e,s){const i=t.toLowerCase();if(void 0===this.commands[i]&&(this.commands[i]=[]),this.commands[i].push(e),!(0,c.isFunction)(e)){const o=this.o.commandToHotkeys[i]||this.o.commandToHotkeys[t]||e.hotkeys;o&&this.registerHotkeyToCommand(o,i,null==s?void 0:s.stopPropagation)}return this}registerHotkeyToCommand(t,e,s=!0){const i=(0,c.asArray)(t).map(c.normalizeKeyAliases).map((t=>t+".hotkey")).join(" ");this.e.off(i).on(i,((t,i)=>(i.shouldStop=null==s||s,this.execCommand(e))))}execCommand(t,e=!1,s=null){if(this.o.readonly&&"selectall"!==t)return;let i;if(t=t.toLowerCase(),i=this.e.fire("beforeCommand",t,e,s),!1!==i&&(i=this.execCustomCommands(t,e,s)),!1!==i)if(this.s.focus(),"selectall"===t)this.s.select(this.editor,!0);else try{i=this.nativeExecCommand(t,e,s)}catch(t){}return this.e.fire("afterCommand",t,e,s),this.setEditorValue(),i}nativeExecCommand(t,e=!1,s=null){this.isSilentChange=!0;try{return this.ed.execCommand(t,e,s)}finally{this.isSilentChange=!1}}execCustomCommands(t,e=!1,s=null){if(t=t.toLowerCase(),void 0!==this.commands[t]){let i;const o=o=>{let n;n=(0,c.isFunction)(o)?o:o.exec;const r=n.call(this,t,e,s);void 0!==r&&(i=r)};for(let e=0;this.commands[t].length>e;e+=1)o(this.commands[t][e]);return i}}lock(t="any"){return!!super.lock(t)&&(this.__selectionLocked=this.s.save(),this.s.clear(),this.editor.classList.add("jodit_disabled"),this.e.fire("lock",!0),!0)}unlock(){return!!super.unlock()&&(this.editor.classList.remove("jodit_disabled"),this.__selectionLocked&&this.s.restore(),this.e.fire("lock",!1),!0)}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===a.MODE_WYSIWYG}getRealMode(){if(this.getMode()!==a.MODE_SPLIT)return this.getMode();const t=this.od.activeElement;return t&&(t===this.iframe||_.i.isOrContains(this.editor,t)||_.i.isOrContains(this.toolbar.container,t))?a.MODE_WYSIWYG:a.MODE_SOURCE}setMode(t){const e=this.getMode(),s={mode:parseInt(""+t,10)},i=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",s)&&(this.__mode=[a.MODE_SOURCE,a.MODE_WYSIWYG,a.MODE_SPLIT].includes(s.mode)?s.mode:a.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),i.forEach((t=>{this.container.classList.remove(t)})),this.container.classList.add(i[this.mode-1]),e!==this.getMode()&&this.e.fire("afterSetMode"))}toggleMode(){let t=this.getMode();[a.MODE_SOURCE,a.MODE_WYSIWYG,this.o.useSplitMode?a.MODE_SPLIT:9].includes(t+1)?t+=1:t=a.MODE_WYSIWYG,this.setMode(t)}setDisabled(t){this.o.disabled=t;const e=this.__wasReadOnly;this.setReadOnly(t||e),this.__wasReadOnly=e,this.editor&&(this.editor.setAttribute("aria-disabled",""+t),this.container.classList.toggle("jodit_disabled",t),this.e.fire("disabled",t))}getDisabled(){return this.o.disabled}setReadOnly(t){this.__wasReadOnly!==t&&(this.__wasReadOnly=t,this.o.readonly=t,t?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.e&&this.e.fire("readonly",t))}getReadOnly(){return this.o.readonly}beforeInitHook(){}afterInitHook(){}initOptions(t){this.options=(0,c.ConfigProto)(t||{},r.D.defaultOptions)}initOwners(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}addPlace(t,e){const s=(0,c.resolveElement)(t,this.o.shadowRoot||this.od);this.attachEvents(e),s.attributes&&(0,c.toArray)(s.attributes).forEach((t=>{const s=t.name;let i=t.value;void 0===r.D.defaultOptions[s]||e&&void 0!==e[s]||(-1!==["readonly","disabled"].indexOf(s)&&(i=""===i||"true"===i),/^[0-9]+(\.)?([0-9]+)?$/.test(""+i)&&(i=Number(i)),this.options[s]=i)}));let i=this.c.div("jodit-container");i.classList.add("jodit"),i.classList.add("jodit-container"),i.classList.add("jodit_theme_"+(this.o.theme||"default"));const{styleValues:o}=this.o;Object.keys(o).forEach((t=>{const e=(0,c.kebabCase)(t);i.style.setProperty("--jd-"+e,o[t])})),i.setAttribute("contenteditable","false");let n=null;this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(s.nodeName)&&(i=s,s.setAttribute(this.__defaultClassesKey,""+s.className),n=i.innerHTML,i.innerHTML=""),i.classList.add("jodit_inline"),i.classList.add("jodit-container")),s!==i&&(s.style.display&&s.setAttribute(this.__defaultStyleDisplayKey,s.style.display),s.style.display="none");const a=this.c.div("jodit-workplace",{contenteditable:!1});i.appendChild(a);const l=new Et(this,i);s.parentNode&&s!==i&&s.parentNode.insertBefore(i,s),Object.defineProperty(s,"component",{enumerable:!1,configurable:!0,value:this});const h=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});a.appendChild(h);const d={editor:h,element:s,container:i,workplace:a,statusbar:l,options:this.isReady?(0,c.ConfigProto)(e||{},r.D.defaultOptions):this.options,observer:new gt(this),editorWindow:this.ow};this.elementToPlace.set(h,d),this.setCurrentPlace(d),this.places.push(d),this.setNativeEditorValue(this.getElementValue());const u=this.initEditor(n),p=this.options;return(0,c.callPromise)(u,(()=>{p.enableDragAndDropFileToEditor&&p.uploader&&(p.uploader.url||p.uploader.insertImageAsBase64URI)&&this.uploader.bind(this.editor),this.elementToPlace.get(this.editor)||this.elementToPlace.set(this.editor,d),this.e.fire("afterAddPlace",d)}))}addDisclaimer(t){this.workplace.appendChild(t)}setCurrentPlace(t){this.currentPlace!==t&&(this.isEditorMode()||this.setMode(a.MODE_WYSIWYG),this.currentPlace=t,this.buildToolbar(),this.isReady&&this.e.fire("changePlace",t))}initEditor(t){const e=this.createEditor();return(0,c.callPromise)(e,(()=>{if(this.isInDestruct)return;this.element!==this.container?this.setElementValue():null!=t&&this.setEditorValue(t);let e=this.o.defaultMode;if(this.o.saveModeInStorage){const t=this.storage.get("jodit_default_mode");"string"==typeof t&&(e=parseInt(t,10))}this.setMode(e),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(t){}try{this.ed.execCommand("enableObjectResizing",!1,"false")}catch(t){}try{this.ed.execCommand("enableInlineTableEditing",!1,"false")}catch(t){}}))}createEditor(){const t=this.editor,e=this.e.fire("createEditor",this);return(0,c.callPromise)(e,(()=>{if(!this.isInDestruct){if((!1===e||(0,c.isPromise)(e))&&_.i.safeRemove(t),this.o.editorCssClass&&this.editor.classList.add(this.o.editorCssClass),this.o.style&&(0,c.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.direction){const t="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";this.container.style.direction=t,this.container.setAttribute("dir",t),this.toolbar.setDirection(t)}this.o.triggerChangeEvent&&this.e.on("change",this.async.debounce((()=>{this.e&&this.e.fire(this.element,"change")}),this.defaultTimeout))}}))}prepareWYSIWYGEditor(){const{editor:t}=this;if(this.editor.setAttribute("spellcheck",this.o.spellcheck?"true":"false"),this.o.direction){const t="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";this.editor.style.direction=t,this.editor.setAttribute("dir",t)}this.e.on(t,"mousedown touchstart focus",(()=>{const e=this.elementToPlace.get(t);e&&this.setCurrentPlace(e)})).on(t,"compositionend",(()=>{this.setEditorValue()})).on(t,"selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",(t=>{if(!this.o.readonly&&!this.isSilentChange&&!(t instanceof this.ew.KeyboardEvent&&t.isComposing)&&this.e&&this.e.fire){if(!1===this.e.fire(t.type,t))return!1;this.setEditorValue()}}))}destruct(){if(this.isInDestruct)return;if(this.setStatus(u.n$.beforeDestruct),this.elementToPlace.clear(),!this.editor)return;const t=this.getEditorValue();this.storage.clear(),this.buffer.clear(),this.commands={},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),this.places.forEach((({container:e,workplace:s,statusbar:i,element:o,iframe:n,editor:r,observer:a})=>{if(o!==e)if(o.hasAttribute(this.__defaultStyleDisplayKey)){const t=(0,c.attr)(o,this.__defaultStyleDisplayKey);t&&(o.style.display=t,o.removeAttribute(this.__defaultStyleDisplayKey))}else o.style.display="";else o.hasAttribute(this.__defaultClassesKey)&&(o.className=(0,c.attr)(o,this.__defaultClassesKey)||"",o.removeAttribute(this.__defaultClassesKey));o.hasAttribute("style")&&!(0,c.attr)(o,"style")&&o.removeAttribute("style"),!i.isInDestruct&&i.destruct(),this.e.off(e),this.e.off(o),this.e.off(r),_.i.safeRemove(s),_.i.safeRemove(r),e!==o&&_.i.safeRemove(e),Object.defineProperty(o,"component",{enumerable:!1,configurable:!0,value:null}),_.i.safeRemove(n),e===o&&(o.innerHTML=t),!a.isInDestruct&&a.destruct()})),this.places.length=0,this.currentPlace={},delete j.as[this.id],super.destruct()}}Jodit.fatMode=!1,Jodit.plugins=j.pw,Jodit.modules=j.qz,Jodit.ns=j.qz,Jodit.decorators={},Jodit.instances=j.as,Jodit.lang=j.KQ,Jodit.core={Plugin:H},(0,n.gn)([x.cache],Jodit.prototype,"uploader",null),(0,n.gn)([x.cache],Jodit.prototype,"filebrowser",null),(0,n.gn)([x.autobind],Jodit.prototype,"prepareWYSIWYGEditor",null);const It=s(44);let qt={en:It};const Lt=t=>t.default||t,zt={};(0,m.kJ)(Lt(It))&&Lt(It).forEach(((t,e)=>{zt[e]=t})),Object.keys(qt).forEach((t=>{const e=Lt(qt[t]);(0,m.kJ)(e)&&(qt[t]={},e.forEach(((e,s)=>{qt[t][zt[s]]=e})))}));const Mt=qt;r.D.prototype.addNewLine=!0,r.D.prototype.addNewLineOnDBLClick=!0,r.D.prototype.addNewLineTagsTriggers=["table","iframe","img","hr","jodit"],r.D.prototype.addNewLineDeltaShow=20;const Pt="addnewline";class Dt extends H{constructor(){super(...arguments),this.line=this.j.c.fromHTML(`<div role="button" tabIndex="-1" title="${this.j.i18n("Break")}" class="jodit-add-new-line"><span>${k.JO.get("enter")}</span></div>`),this.isMatchedTag=t=>!(!t||!this.j.o.addNewLineTagsTriggers.includes(t.nodeName.toLowerCase())),this.preview=!1,this.lineInFocus=!1,this.isShown=!1,this.hideForce=()=>{this.isShown&&(this.isShown=!1,this.j.async.clearTimeout(this.timeout),this.lineInFocus=!1,_.i.safeRemove(this.line))},this.hide=()=>{this.isShown&&!this.lineInFocus&&(this.timeout=this.j.async.setTimeout(this.hideForce,{timeout:500,label:"add-new-line-hide"}))},this.canGetFocus=t=>null!=t&&_.i.isBlock(t)&&!/^(img|table|iframe|hr)$/i.test(t.nodeName),this.onClickLine=t=>{const e=this.j,s=e.createInside.element(e.o.enter);this.preview&&this.current&&this.current.parentNode?this.current.parentNode.insertBefore(s,this.current):e.editor.appendChild(s),e.s.setCursorIn(s),(0,c.scrollIntoViewIfNeeded)(s,e.editor,e.ed),e.e.fire("synchro"),this.hideForce(),t.preventDefault()},this.onDblClickEditor=t=>{const e=this.j;if(!e.o.readonly&&e.o.addNewLineOnDBLClick&&t.target===e.editor&&e.s.isCollapsed()){const s=(0,c.offset)(e.editor,e,e.ed),i=t.pageY-e.ew.pageYOffset,o=e.createInside.element(e.o.enter);Math.abs(i-(s.height+s.top))>Math.abs(i-s.top)&&e.editor.firstChild?e.editor.insertBefore(o,e.editor.firstChild):e.editor.appendChild(o),e.s.setCursorIn(o),e.setEditorValue(),this.hideForce(),t.preventDefault()}},this.onMouseMove=t=>{const e=this.j;let s=e.ed.elementFromPoint(t.clientX,t.clientY);if(!_.i.isHTMLElement(s)||_.i.isOrContains(this.line,s))return;if(!_.i.isOrContains(e.editor,s))return;if(this.isMatchedTag(s)||(s=_.i.closest(s,this.isMatchedTag,e.editor)),!s)return void this.hide();if(this.isMatchedTag(s)){const t=_.i.up(s,_.i.isBlock,e.editor);t&&t!==e.editor&&(s=t)}const i=(0,c.position)(s,this.j);let o=!1,{clientY:n}=t;if(this.j.iframe){const{top:t}=(0,c.position)(this.j.iframe,this.j,!0);n+=t}const r=this.j.o.addNewLineDeltaShow;Math.abs(n-i.top)>r||(o=i.top,this.preview=!0),Math.abs(n-(i.top+i.height))>r||(o=i.top+i.height,this.preview=!1),!1===o||(0,c.call)(this.preview?_.i.prev:_.i.next,s,this.canGetFocus,e.editor)?(this.current=!1,this.hide()):(this.line.style.top=o+"px",this.current=s,this.show())}}show(){this.isShown||this.j.o.readonly||this.j.isLocked||(this.isShown=!0,this.j.async.clearTimeout(this.timeout),this.line.classList.toggle("jodit-add-new-line_after",!this.preview),this.j.container.appendChild(this.line),this.line.style.width=this.j.editor.clientWidth+"px")}afterInit(t){t.o.addNewLine&&(t.e.on(this.line,"mousemove",(t=>{t.stopPropagation()})).on(this.line,"mousedown touchstart",this.onClickLine).on("change",this.hideForce).on(this.line,"mouseenter",(()=>{this.j.async.clearTimeout(this.timeout),this.lineInFocus=!0})).on(this.line,"mouseleave",(()=>{this.lineInFocus=!1})).on("changePlace",this.addEventListeners.bind(this)),this.addEventListeners())}addEventListeners(){const t=this.j;t.e.off(t.editor,"."+Pt).off(t.container,"."+Pt).on([t.ow,t.ew,t.editor],"scroll."+Pt,this.hideForce).on(t.editor,"dblclick."+Pt,this.onDblClickEditor).on(t.editor,"click."+Pt,this.hide).on(t.container,"mouseleave."+Pt,this.hide).on(t.editor,"mousemove."+Pt,t.async.debounce(this.onMouseMove,3*t.defaultTimeout))}beforeDestruct(){this.j.async.clearTimeout(this.timeout),this.j.e.off(this.line).off("changePlace",this.addEventListeners),_.i.safeRemove(this.line),this.j.e.off([this.j.ow,this.j.ew,this.j.editor],"."+Pt).off(this.j.container,"."+Pt)}}function Nt(t){t.registerButton({name:"about",group:"info"})}function Rt(t){t.o.saveSelectionOnBlur&&t.e.on("blur",(()=>{t.isEditorMode()&&t.s.save(!0)})).on("focus",(()=>{t.s.restore()}));const e=()=>{if(t.s.focus(),"end"===t.o.cursorAfterAutofocus){const e=_.i.last(t.editor,(t=>_.i.isText(t)));e&&t.s.setCursorIn(e,!1)}};t.e.on("afterInit",(()=>{t.o.autofocus&&(t.defaultTimeout?t.async.setTimeout(e,300):e())})),t.e.on("afterInit afterAddPlace",(()=>{t.e.off(t.editor,"mousedown.autofocus").on(t.editor,"mousedown.autofocus",(e=>{t.isEditorMode()&&e.target&&_.i.isBlock(e.target)&&!e.target.childNodes.length&&(t.editor===e.target?t.s.focus():t.s.setCursorIn(e.target))}))}))}r.D.prototype.controls.about={exec(t){const e=new R({language:t.o.language}),s=t.i18n.bind(t);e.setMod("theme",t.o.theme).setHeader(s("About Jodit")).setContent(`<div class="jodit-about">\n\t\t\t\t\t<div>${s("Jodit Editor")} v.${t.getVersion()}</div>\n\t\t\t\t\t<div>${s("License: %s",(0,c.isLicense)(t.o.license)?(0,c.normalizeLicense)(t.o.license):"MIT")}</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<a href="https://xdsoft.net/jodit/" target="_blank">https://xdsoft.net/jodit/</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<a href="https://xdsoft.net/jodit/doc/" target="_blank">${s("Jodit User's Guide")}</a>\n\t\t\t\t\t\t${s("contains detailed help for using")}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>${s("Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.")}</div>\n\t\t\t\t</div>`),(0,c.css)(e.dialog,{minHeight:200,minWidth:420}),e.open(!0).bindDestruct(t)},tooltip:"About Jodit",mode:a.MODE_SOURCE+a.MODE_WYSIWYG},r.D.prototype.autofocus=!1,r.D.prototype.cursorAfterAutofocus="end",r.D.prototype.saveSelectionOnBlur=!0,r.D.prototype.controls.classSpan={command:"applyClassName",icon:s(45),exec:c.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isElement,t.editor)||t.editor;return!(!e.args||!i.classList.contains(""+e.args[0]))}return!1},isActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isElement,t.editor)||t.editor;let o=!1;return e.list&&Object.keys(e.list).forEach((t=>{i.classList.contains(t)&&(o=!0)})),!(!i||i===t.editor||void 0===e.list||!o)}return!1},childTemplate:(t,e,s)=>`<span class="${e}">${t.i18n(s)}</span>`,tooltip:"Insert className"};class At extends H{constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"font"}]}afterInit(t){t.registerCommand("applyClassName",((e,s,i)=>(t.s.applyStyle(void 0,{className:i}),!1)))}beforeDestruct(){}}var Bt=s(9),Ot=s(25);function Ht(t,e){return e?t.previousSibling:t.nextSibling}function Ft(t,e,s){return(0,Bt.RE)(e?_.i.prev:_.i.next,t,(t=>!(!t||_.i.isText(t)&&!(0,Ot.fy)((null==t?void 0:t.nodeValue)||"").length)),s)}function $t(t,e){return _.i.findSibling(t,e,(t=>{var e;return!_.i.isEmptyTextNode(t)&&!!(!_.i.isText(t)||(null===(e=t.nodeValue)||void 0===e?void 0:e.length)&&(0,Ot.fy)(t.nodeValue))}))}function Wt(t,e,s,i=!1){const o=t=>e?t.firstChild:t.lastChild;let n=Ft(t,!e,s);if(i&&_.i.isElement(n)&&!_.i.isInlineBlock(n))return null;if(n)do{if(!o(n))return n;n=o(n)}while(n);return null}r.D.prototype.delete={hotkeys:{delete:["delete","cmd+backspace"],deleteWord:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],backspace:["backspace"],backspaceWord:["ctrl+backspace"]}};class Vt extends H{constructor(){super(...arguments),this.requires=["hotkeys"]}get root(){return this.j.editor}afterInit(t){t.e.on("afterCommand.delete",(t=>{"delete"===t&&this.afterDeleteCommand()})),t.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:t.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:t.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,!0),hotkeys:t.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,!0),hotkeys:t.o.delete.hotkeys.backspaceWord})}beforeDestruct(t){t.e.off("afterCommand.delete")}afterDeleteCommand(){const t=this.j,e=t.s.current();if(e&&_.i.isTag(e.firstChild,"br")&&t.s.removeNode(e.firstChild),!((0,c.trim)(t.editor.textContent||"")||t.editor.querySelector("img")||e&&_.i.closest(e,"table",t.editor))){t.editor.innerHTML="";const e=t.s.setCursorIn(t.editor);t.s.removeNode(e)}}onDelete(t,e=!1){var s;const i=this.j.selection;if(i.isFocused()||i.focus(),!(null===(s=i.sel)||void 0===s?void 0:s.rangeCount)||this.checkNotCollapsed())return!1;const o=this.j,n=i.range,r=o.createInside.text(a.INVISIBLE_SPACE);try{if(n.insertNode(r),!_.i.isOrContains(o.editor,r))return;if(((t,e)=>{let s=_.i.findSibling(t,e),i=_.i.findSibling(t,!e);for(;_.i.isElement(s)&&!_.i.isTag(s,a.INSEPARABLE_TAGS)&&!i;)e||!s.firstChild?s.appendChild(t):_.i.before(s.firstChild,t),s=Ht(t,e),i=Ht(t,!e)})(r,t),this.checkRemoveInseparableElement(r,t)||this.checkRemoveChar(r,t,e)||this.checkTableCell(r)||this.checkRemoveEmptyParent(r,t)||this.checkRemoveEmptyNeighbor(r,t)||this.checkJoinTwoLists(r,t)||this.checkJoinNeighbors(r,t)||this.checkRewrapListItem(r,t))return!1}catch(t){throw t}finally{this.safeRemoveEmptyNode(r)}return!1}checkNotCollapsed(){const t=this.j;if(!t.s.isCollapsed())return t.execCommand("Delete"),!0}checkRemoveChar(t,e,s){var i,o,n;const r=e?-1:1,l=Ht(t,!e);let h,d=Ht(t,e),u=null,p=!1;for(;d&&(_.i.isText(d)||_.i.isInlineBlock(d));){for(;_.i.isInlineBlock(d);)d=e?null==d?void 0:d.lastChild:null==d?void 0:d.firstChild;if(!d)break;if(null===(i=d.nodeValue)||void 0===i?void 0:i.length){let t=(0,c.toArray)(d.nodeValue);const s=t.length;let i=e?s-1:0;if(t[i]===a.INVISIBLE_SPACE)for(;t[i]===a.INVISIBLE_SPACE;)i+=r;if(h=t[i],t[i+r]===a.INVISIBLE_SPACE){for(i+=r;t[i]===a.INVISIBLE_SPACE;)i+=r;i+=e?1:-1}if(t=e&&0>i?[]:t.slice(e?0:i+1,e?i:s),!l||!_.i.isText(l)||(e?/^ /:/ $/).test(null!==(o=l.nodeValue)&&void 0!==o?o:"")||!(0,c.trimInv)(l.nodeValue||"").length)for(let s=e?t.length-1:0;(e?s>=0:t.length>s)&&" "===t[s];s+=e?-1:1)t[s]=a.NBSP_SPACE;d.nodeValue=t.join("")}if((null===(n=d.nodeValue)||void 0===n?void 0:n.length)||(u=d),!(0,c.isVoid)(h)&&h!==a.INVISIBLE_SPACE){if(p=!0,(0,c.call)(e?_.i.after:_.i.before,d,t),s)for(;this.checkRemoveChar(t,e,!1););break}let f=Ht(d,e);!f&&d.parentNode&&d.parentNode!==this.root&&(f=Wt(d,!e,this.root,!0)),u&&(_.i.safeRemove(u),u=null),d=f}return p&&(this.removeEmptyInlineParent(t),this.addBRInsideEmptyBlock(t),this.j.s.setCursorBefore(t)),p||void 0}removeEmptyInlineParent(t){let e=t.parentElement;for(;e&&_.i.isInlineBlock(e);){const s=e.parentElement;_.i.isEmpty(e)&&(_.i.after(e,t),_.i.safeRemove(e)),e=s}}addBRInsideEmptyBlock(t){t.parentElement!==this.root&&_.i.isBlock(t.parentElement)&&_.i.each(t.parentElement,_.i.isEmptyTextNode)&&_.i.after(t,this.j.createInside.element("br"))}checkRemoveInseparableElement(t,e){const s=_.i.findSibling(t,e);if(_.i.isElement(s)&&(_.i.isTag(s,a.INSEPARABLE_TAGS)||_.i.isEmpty(s)||"false"===(0,c.attr)(s,"contenteditable")))return _.i.safeRemove(s),this.j.s.setCursorBefore(t),_.i.isTag(s,"br")&&this.checkRemoveEmptyParent(t,e),!0}checkTableCell(t){if(_.i.isCell(t.parentElement))return!0}checkRemoveEmptyParent(t,e){let s=!1;const{setCursorBefore:i,setCursorIn:o}=this.j.s;let n=_.i.closest(t,_.i.isElement,this.root);if(!n||!_.i.isEmpty(n))return;const r=Ft(t,e,this.root);do{if(!n||!_.i.isEmpty(n)||_.i.isCell(n))break;{_.i.after(n,t);const e=_.i.closest(n,(t=>_.i.isElement(t)&&t!==n),this.root);_.i.safeRemove(n),s=!0,n=e}}while(n);return!(!s||!this.checkJoinTwoLists(t,e))||(!r||_.i.isText(r)||_.i.isTag(r,a.INSEPARABLE_TAGS)?i(t):o(r,!e),s||void 0)}checkJoinTwoLists(t,e){const s=_.i.findSibling(t,e),i=_.i.findSibling(t,!e);if(!_.i.closest(t,_.i.isElement,this.root)&&_.i.isTag(s,["ul","ol"])&&_.i.isTag(i,["ul","ol"])&&_.i.isTag(s.lastElementChild,"li")&&_.i.isTag(i.firstElementChild,"li")){const{setCursorBefore:o,setCursorAfter:n}=this.j.s,r=s.lastElementChild;return(0,c.call)(e?_.i.prepend:_.i.append,i.firstElementChild,t),_.i.moveContent(i,s,!e),_.i.safeRemove(i),(0,c.call)(e?_.i.append:_.i.prepend,r,t),(0,c.call)(e?o:n,t),!0}}checkRemoveEmptyNeighbor(t,e){const s=_.i.closest(t,_.i.isElement,this.root);if(!s)return;const i=$t(s,e);return i&&_.i.isEmpty(i)?(_.i.safeRemove(i),this.j.s.setCursorBefore(t),!0):void 0}checkJoinNeighbors(t,e){const{jodit:s}=this;let i=t,o=i;for(;i&&!$t(i,e)&&i.parentElement!==this.root;)i=i.parentElement,o=i;if(_.i.isElement(o)){const i=$t(o,e);if(i&&(this.checkMoveListContent(o,i,e)||this.moveContentAndRemoveEmpty(o,i,e)))return s.s.setCursorBefore(t),!0}}checkMoveListContent(t,e,s){const{jodit:i}=this,o=_.i.isTag(e,["ol","ul"]),n=_.i.isTag(t,["ol","ul"]),r=(t,e)=>e?t.firstElementChild:t.lastElementChild;return n?(e=i.createInside.element(i.o.enterBlock),_.i.before(t,e),this.moveContentAndRemoveEmpty(r(t,s),e,s)):!(!e||!o||n)&&this.moveContentAndRemoveEmpty(t,r(e,!s),s)}moveContentAndRemoveEmpty(t,e,s){if(t&&_.i.isElement(e)){_.i.moveContent(t,e,!s);let i=t;for(;i&&i!==this.root&&_.i.isEmpty(i);){const t=i.parentElement;_.i.safeRemove(i),i=t}return!0}return!1}checkRewrapListItem(t,e){var s;if(e){const e=_.i.closest(t,_.i.isElement,this.root);if(_.i.isTag(e,"li")&&(null===(s=null==e?void 0:e.parentElement)||void 0===s?void 0:s.firstElementChild)===e&&this.j.s.cursorInTheEdge(!0,e)){const s=e.parentElement,i=this.j.createInside.element(this.j.o.enterBlock);return _.i.before(s,i),_.i.moveContent(e,i),_.i.safeRemove(e),_.i.isEmpty(s)&&_.i.safeRemove(s),this.j.s.setCursorBefore(t),!0}}}safeRemoveEmptyNode(t){var e,s;const{range:i}=this.j.s;i.startContainer===t&&(t.previousSibling?_.i.isText(t.previousSibling)?i.setStart(t.previousSibling,null!==(s=null===(e=t.previousSibling.nodeValue)||void 0===e?void 0:e.length)&&void 0!==s?s:0):i.setStartAfter(t.previousSibling):t.nextSibling&&(_.i.isText(t.nextSibling)?i.setStart(t.nextSibling,0):i.setStartBefore(t.nextSibling)),i.collapse(!0),this.j.s.selectRange(i)),_.i.safeRemove(t)}}function Yt(t){const e=e=>{const s=r.D.defaultOptions.controls[e],i={...s.css},o={};return Object.keys(i).forEach((t=>{o[t]=(0,c.isArray)(i[t])?i[t][0]:i[t]})),t.s.applyStyle(o,{element:s.tags?s.tags[0]:void 0}),t.e.fire("synchro"),!1};["bold","italic","underline","strikethrough"].forEach((e=>{t.registerButton({name:e,group:"font-style"})})),["superscript","subscript"].forEach((e=>{t.registerButton({name:e,group:"script"})})),t.registerCommand("bold",{exec:e,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:e,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:e,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:e})}r.D.prototype.controls.subscript={tags:["sub"],tooltip:"subscript"},r.D.prototype.controls.superscript={tags:["sup"],tooltip:"superscript"},r.D.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},r.D.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},r.D.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration":"underline"},tooltip:"Underline"},r.D.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration":"line-through"},tooltip:"Strike through"},r.D.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:!1,removeOnError:!0,safeJavaScriptLink:!0},r.D.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"};class Ut extends H{constructor(){super(...arguments),this.buttons=[{name:"eraser",group:"font-style"}],this.visitNode=(t,e,s)=>{let i=!1;if(!t)return i;if(this.isRemovableNode(t,e))return s.push(t),this.visitNode(t.nextSibling,e,s);if(this.j.o.cleanHTML.fillEmptyParagraph&&_.i.isBlock(t)&&_.i.isEmpty(t,/^(img|svg|canvas|input|textarea|form|br)$/)){const e=this.j.createInside.element("br");t.appendChild(e),i=!0}const o=this.allowTagsHash;if(o&&!0!==o[t.nodeName]){const e=t.attributes;if(e&&e.length){const s=[];for(let i=0;e.length>i;i+=1){const n=o[t.nodeName][e[i].name];(!n||!0!==n&&n!==e[i].value)&&s.push(e[i].name)}s.length&&(i=!0),s.forEach((e=>{t.removeAttribute(e)}))}}return i=this.visitNode(t.firstChild,e,s)||i,i=this.visitNode(t.nextSibling,e,s)||i,i},this.allowTagsHash=Ut.getHash(this.j.o.cleanHTML.allowTags),this.denyTagsHash=Ut.getHash(this.j.o.cleanHTML.denyTags),this.onKeyUpCleanUp=()=>{const t=this.j;if(!this.allowEdit())return;const e=t.s.current();if(e){const s=_.i.up(e,_.i.isBlock,t.editor);s&&_.i.all(s,(s=>{s&&_.i.isText(s)&&null!=s.nodeValue&&(0,a.INVISIBLE_SPACE_REG_EXP)().test(s.nodeValue)&&0!==s.nodeValue.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),"").length&&(s.nodeValue=s.nodeValue.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),""),s===e&&t.s.isCollapsed()&&t.s.setCursorAfter(s))}))}},this.beforeCommand=t=>{if("removeformat"===t.toLowerCase())return this.onRemoveFormat(),!1}}afterInit(t){t.e.off(".cleanHtml").on("change.cleanHtml afterSetMode.cleanHtml afterInit.cleanHtml mousedown.cleanHtml keydown.cleanHtml",this.onChangeCleanHTML).on("keyup.cleanHtml",this.onKeyUpCleanUp).on("beforeCommand.cleanHtml",this.beforeCommand)}onChangeCleanHTML(){if(!this.allowEdit())return;const t=this.j;this.onSafeHTML(t.editor);const e=t.s.current(),s=t.o.cleanHTML.replaceOldTags;if(s&&e){const i=(0,c.keys)(s,!1);if(t.s.isCollapsed()){const o=_.i.closest(e,i,t.editor);if(o){t.s.save();const e=s[o.nodeName.toLowerCase()]||s[o.nodeName];_.i.replace(o,e,t.createInside,!0,!1),t.s.restore()}}}let i=null;t.editor.firstChild&&(i=t.editor.firstChild);const o=[],n=this.visitNode(i,e,o);o.forEach(_.i.safeRemove),(o.length||n)&&t.events&&t.e.fire("synchro")}allowEdit(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}static getHash(t){const e=/([^[]*)\[([^\]]+)]/,s=/[\s]*,[\s]*/,i=/^(.*)[\s]*=[\s]*(.*)$/,o={};return(0,c.isString)(t)?(t.split(s).map((t=>{t=(0,c.trim)(t);const n=e.exec(t),r={},a=t=>{t=(0,c.trim)(t);const e=i.exec(t);e?r[e[1]]=e[2]:r[t]=!0};if(n){const t=n[2].split(s);n[1]&&(t.forEach(a),o[n[1].toUpperCase()]=r)}else o[t.toUpperCase()]=!0})),o):!!t&&(Object.keys(t).forEach((e=>{o[e.toUpperCase()]=t[e]})),o)}onRemoveFormat(){this.j.s.isCollapsed()?this.removeFormatForCollapsedSelection():this.removeFormatForSelection()}removeFormatForCollapsedSelection(t){const{s:e}=this.j;let s=t;s||(s=this.j.createInside.fake(),e.range.insertNode(s),e.range.collapse());const i=_.i.furthest(s,this.isInlineBlock,this.j.editor);if(i)if(e.cursorOnTheLeft(i))_.i.before(i,s);else if(e.cursorOnTheRight(i))_.i.after(i,s);else{const t=e.splitSelection(i);t&&_.i.after(t,s)}t||(e.setCursorBefore(s),_.i.safeRemove(s))}isInlineBlock(t){return _.i.isInlineBlock(t)&&!_.i.isTag(t,a.INSEPARABLE_TAGS)}removeFormatForSelection(){const{s:t}=this.j,{range:e}=t,s=e.cloneRange(),i=e.cloneRange(),o=this.j.createInside.fake(),n=this.j.createInside.fake();s.collapse(!0),i.collapse(!1),s.insertNode(o),i.insertNode(n),e.setStartBefore(o),e.collapse(!0),t.selectRange(e),this.removeFormatForCollapsedSelection(o),e.setEndAfter(n),e.collapse(!1),t.selectRange(e),this.removeFormatForCollapsedSelection(n);const r=[];_.i.between(o,n,(t=>{this.isInlineBlock(t)&&r.push(t)})),r.forEach((t=>_.i.unwrap(t)));const a=(e,s)=>{if(!$t(e,s)){const i=e.parentNode;if(i&&i!==t.area&&i.getAttribute("style"))return i.removeAttribute("style"),a(i,s),!0}};a(o,!0)&&a(n,!1),e.setStartAfter(o),e.setEndBefore(n),t.selectRange(e),_.i.safeRemove(o),_.i.safeRemove(n)}isRemovableNode(t,e){const s=this.allowTagsHash;return!(_.i.isText(t)||!(s&&!s[t.nodeName]||this.denyTagsHash&&this.denyTagsHash[t.nodeName]))||!(!(e&&_.i.isTag(t,"br")&&Ut.hasNotEmptyTextSibling(t))||Ut.hasNotEmptyTextSibling(t,!0)||_.i.up(t,_.i.isBlock,this.j.editor)===_.i.up(e,_.i.isBlock,this.j.editor))||this.j.o.cleanHTML.removeEmptyElements&&null!=e&&_.i.isElement(t)&&null!=t.nodeName.match(a.IS_INLINE)&&!vt.isMarker(t)&&0===(0,c.trim)(t.innerHTML).length&&!_.i.isOrContains(t,e)}static hasNotEmptyTextSibling(t,e=!1){let s=e?t.nextSibling:t.previousSibling;for(;s;){if(_.i.isElement(s)||!_.i.isEmptyTextNode(s))return!0;s=e?s.nextSibling:s.previousSibling}return!1}onBeforeSetNativeEditorValue(t){const e=this.j.createInside.div();return e.innerHTML=t.value,this.onSafeHTML(e),t.value=e.innerHTML,!1}onSafeHTML(t){(0,c.safeHTML)(t,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off(".cleanHtml")}}(0,n.gn)([(0,x.debounce)((t=>t.jodit.o.cleanHTML.timeout))],Ut.prototype,"onChangeCleanHTML",null),(0,n.gn)([x.autobind],Ut.prototype,"isInlineBlock",null),(0,n.gn)([(0,x.watch)(":beforeSetNativeEditorValue")],Ut.prototype,"onBeforeSetNativeEditorValue",null),(0,n.gn)([(0,x.watch)(":safeHTML")],Ut.prototype,"onSafeHTML",null);class Gt extends H{constructor(){super(...arguments),this.isSuitableStart=t=>_.i.isText(t)&&(0,m.HD)(t.nodeValue)&&/[^\s]/.test(t.nodeValue)||this.isNotClosed(t)&&!vt.isMarker(t),this.isSuitable=t=>_.i.isText(t)||this.isNotClosed(t),this.isNotClosed=t=>_.i.isElement(t)&&!(_.i.isBlock(t)||_.i.isTag(t,["hr","style"]))}afterInit(t){"br"!==t.o.enter.toLowerCase()&&t.e.on("afterInit.wtn postProcessSetEditorValue.wtn",this.postProcessSetEditorValue)}beforeDestruct(t){t.e.off(".wtn")}postProcessSetEditorValue(){const{jodit:t}=this;if(!t.isEditorMode())return;let e=t.editor.firstChild,s=!1;for(;e;){if(this.isSuitableStart(e)){s||t.s.save(),s=!0;const i=t.createInside.element(t.o.enter);for(_.i.before(e,i);e&&this.isSuitable(e);){const t=e.nextSibling;i.appendChild(e),e=t}i.normalize()}e=e&&e.nextSibling}s&&(t.s.restore(),"afterInit"===t.e.current&&t.e.fire("internalChange"))}}(0,n.gn)([x.autobind],Gt.prototype,"postProcessSetEditorValue",null);const Kt=t=>{if(t.clipboardData)return t.clipboardData;try{return t.dataTransfer||new DataTransfer}catch(t){return null}};function Xt(t,e,s){if(e.isInDestruct)return;"drop"===(null==t?void 0:t.type)&&e.s.insertCursorAtPoint(t.clientX,t.clientY);const i=e.e.fire("beforePasteInsert",s);!(0,c.isVoid)(i)&&((0,c.isString)(i)||(0,c.isNumber)(i)||_.i.isNode(i))&&(s=i),(0,c.isString)(s)&&(s=(t=>{const e=(t=t.replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i);-1!==e&&(t=t.substr(e+20));const s=t.search(/<!--EndFragment-->/i);return-1!==s&&(t=t.substr(0,s)),t})(s)),e.s.insertHTML(s)}const Jt="clipboard";class Zt{constructor(){this.buttons=[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}]}init(t){var e;null===(e=this.buttons)||void 0===e||e.forEach((e=>t.registerButton(e))),t.e.off("copy.clipboard cut.clipboard").on("copy.clipboard cut.clipboard",(e=>{var s;const i=t.s.html,o=Kt(e)||Kt(t.ew)||Kt(e.originalEvent);o&&(o.setData(a.TEXT_PLAIN,(0,c.stripTags)(i)),o.setData(a.TEXT_HTML,i)),t.buffer.set(Jt,i),t.e.fire("pasteStack",{html:i,action:t.o.defaultActionOnPaste}),"cut"===e.type&&(t.s.remove(),t.s.focus()),e.preventDefault(),null===(s=null==t?void 0:t.events)||void 0===s||s.fire("afterCopy",i)}))}destruct(t){var e,s;null===(e=null==t?void 0:t.buffer)||void 0===e||e.set(Jt,""),null===(s=null==t?void 0:t.events)||void 0===s||s.off(".clipboard")}}r.D.prototype.askBeforePasteHTML=!0,r.D.prototype.processPasteHTML=!0,r.D.prototype.askBeforePasteFromWord=!0,r.D.prototype.processPasteFromWord=!0,r.D.prototype.nl2brInPlainText=!0,r.D.prototype.defaultActionOnPaste=a.INSERT_AS_HTML,r.D.prototype.defaultActionOnPasteFromWord=null,r.D.prototype.draggableTags=["img","a","jodit-media","jodit"],r.D.prototype.controls.cut={command:"cut",isDisabled:t=>t.s.isCollapsed(),tooltip:"Cut selection"},r.D.prototype.controls.copy={command:"copy",isDisabled:t=>t.s.isCollapsed(),tooltip:"Copy selection"};const Qt="pasteStorage";r.D.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(t,e,{control:s}){if(s.name===Qt)return void t.execCommand("showPasteStorage");t.s.focus();let i="",o=!0;if(navigator.clipboard){try{const t=await navigator.clipboard.read();if(t&&t.length){const e=await t[0].getType(a.TEXT_PLAIN);i=await new Response(e).text()}o=!1}catch(t){}if(o)try{i=await navigator.clipboard.readText(),o=!1}catch(t){}}o&&(i=t.buffer.get(Jt)||"",o=0===i.length);const n=t.value;o?(t.ed.execCommand("paste"),o=n===t.value,!o&&t.e.fire("afterPaste")):i.length?(Xt(null,t,i),t.e.fire("afterPaste")):o&&A(t.i18n("Your browser doesn't support direct access to the clipboard."),(()=>{t.s.focus()})).bindDestruct(t)},list:{[Qt]:"Paste Storage"},isChildDisabled(t){return 2>t.e.fire("pasteStorageList")}},r.D.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"};class te extends H{constructor(){super(...arguments),this.pasteStack=new c.LimitedStack(20)}afterInit(t){t.e.on("paste.paste",this.onPaste).on("pasteStack.paste",(t=>this.pasteStack.push(t))),t.o.nl2brInPlainText&&this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}onPaste(t){try{if(!1===this.customPasteProcess(t)||!1===this.j.e.fire("beforePaste",t))return t.preventDefault(),!1;this.defaultPasteProcess(t)}finally{this.j.e.fire("afterPaste",t)}}customPasteProcess(t){if(!this.j.o.processPasteHTML)return;const e=Kt(t),s=[null==e?void 0:e.getData(a.TEXT_HTML),null==e?void 0:e.getData(a.TEXT_PLAIN)];for(const e of s)if((0,c.isHTML)(e)&&(this.processWordHTML(t,e)||this.processHTML(t,e)))return!1}defaultPasteProcess(t){const e=Kt(t);let s=(null==e?void 0:e.getData(a.TEXT_HTML))||(null==e?void 0:e.getData(a.TEXT_PLAIN));if(e&&s&&""!==(0,c.trim)(s)){const i=this.j.e.fire("processPaste",t,s,(t=>{const e=t.types;let s="";if((0,c.isArray)(e)||"[object DOMStringList]"==={}.toString.call(e))for(let t=0;e.length>t;t+=1)s+=e[t]+";";else s=(e||a.TEXT_PLAIN)+";";return s})(e));void 0!==i&&(s=i),((0,c.isString)(s)||_.i.isNode(s))&&this.insertByType(t,s,this.j.o.defaultActionOnPaste),t.preventDefault(),t.stopPropagation()}}processWordHTML(t,e){return!(!this.j.o.processPasteFromWord||!(0,c.isHtmlFromWord)(e)||(this.j.o.askBeforePasteFromWord?this.askInsertTypeDialog("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",(s=>{this.insertFromWordByType(t,e,s)})):this.insertFromWordByType(t,e,this.j.o.defaultActionOnPasteFromWord||this.j.o.defaultActionOnPaste),0))}processHTML(t,e){if(this.j.o.askBeforePasteHTML){const s=this.pasteStack.find((t=>t.html===e));return s?(this.insertByType(t,e,s.action||this.j.o.defaultActionOnPaste),!0):(this.askInsertTypeDialog("Your code is similar to HTML. Keep as HTML?","Paste as HTML",(s=>{this.insertByType(t,e,s)}),"Insert as Text"),!0)}return!1}insertFromWordByType(t,e,s){var i;switch(s){case a.INSERT_AS_HTML:if(e=(0,c.applyStyles)(e),this.j.o.beautifyHTML){const t=null===(i=this.j.events)||void 0===i?void 0:i.fire("beautifyHTML",e);(0,c.isString)(t)&&(e=t)}break;case a.INSERT_AS_TEXT:e=(0,c.cleanFromWord)(e);break;case a.INSERT_ONLY_TEXT:e=(0,c.stripTags)((0,c.cleanFromWord)(e))}Xt(t,this.j,e)}insertByType(t,e,s){if(this.pasteStack.push({html:e,action:s}),(0,c.isString)(e))switch(this.j.buffer.set(Jt,e),s){case a.INSERT_CLEAR_HTML:e=(0,c.cleanFromWord)(e);break;case a.INSERT_ONLY_TEXT:e=(0,c.stripTags)(e);break;case a.INSERT_AS_TEXT:e=(0,c.htmlspecialchars)(e)}Xt(t,this.j,e)}askInsertTypeDialog(t,e,s,i="Clean",o="Insert only Text"){var n,r,l,h;if(!1===(null===(r=null===(n=this.j)||void 0===n?void 0:n.e)||void 0===r?void 0:r.fire("beforeOpenPasteDialog",t,e,s,i,o)))return;const d=O(`<div style="word-break: normal; white-space: normal">${this.j.i18n(t)}</div>`,this.j.i18n(e));d.bindDestruct(this.j),(0,c.markOwner)(this.j,d.container);const u=(0,f.zx)(this.j,{text:"Keep",name:"keep",status:"primary",tabIndex:0}),p=(0,f.zx)(this.j,{text:i,tabIndex:0}),m=(0,f.zx)(this.j,{text:o,tabIndex:0}),g=(0,f.zx)(this.j,{text:"Cancel",tabIndex:0});return u.onAction((()=>{d.close(),s&&s(a.INSERT_AS_HTML)})),p.onAction((()=>{d.close(),s&&s(a.INSERT_AS_TEXT)})),m.onAction((()=>{d.close(),s&&s(a.INSERT_ONLY_TEXT)})),g.onAction((()=>{d.close()})),d.setFooter([u,p,o?m:"",g]),u.focus(),null===(h=null===(l=this.j)||void 0===l?void 0:l.e)||void 0===h||h.fire("afterOpenPasteDialog",d,t,e,s,i,o),d}onProcessPasteReplaceNl2Br(t,e,s){if(s===a.TEXT_PLAIN+";"&&!(0,c.isHTML)(e))return(0,c.nl2br)(e)}beforeDestruct(t){t.e.off("paste.paste",this.onPaste)}}(0,n.gn)([x.autobind],te.prototype,"onPaste",null),(0,n.gn)([x.autobind],te.prototype,"onProcessPasteReplaceNl2Br",null);class ee extends H{constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){const t=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=t}this.dialog&&this.dialog.close(),this.j.setEditorValue(),this.j.e.fire("afterPaste")},this.onKeyDown=t=>{let e=this.currentIndex;-1!==[a.KEY_UP,a.KEY_DOWN,a.KEY_ENTER].indexOf(t.key)&&(t.key===a.KEY_UP&&(0===e?e=this.list.length-1:e-=1),t.key===a.KEY_DOWN&&(e===this.list.length-1?e=0:e+=1),t.key!==a.KEY_ENTER?(e!==this.currentIndex&&this.selectIndex(e),t.stopImmediatePropagation(),t.preventDefault()):this.paste())},this.selectIndex=t=>{this.listBox&&(0,c.toArray)(this.listBox.childNodes).forEach(((e,s)=>{e.classList.remove("jodit_active"),t===s&&this.previewBox&&(e.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[t],e.focus())})),this.currentIndex=t},this.showDialog=()=>{2>this.list.length||(this.dialog||this.createDialog(),this.listBox&&(this.listBox.innerHTML=""),this.previewBox&&(this.previewBox.innerHTML=""),this.list.forEach(((t,e)=>{const s=this.j.c.element("a");s.textContent=e+1+". "+t.replace((0,a.SPACE_REG_EXP)(),""),this.j.e.on(s,"keydown",this.onKeyDown),(0,c.attr)(s,"href","#"),(0,c.attr)(s,"data-index",""+e),(0,c.attr)(s,"tab-index","-1"),this.listBox&&this.listBox.appendChild(s)})),this.dialog&&this.dialog.open(),this.j.async.setTimeout((()=>{this.selectIndex(0)}),100))}}createDialog(){this.dialog=new R({language:this.j.o.language});const t=(0,k.zx)(this.j,"paste","Paste","primary");t.onAction(this.paste);const e=(0,k.zx)(this.j,"","Cancel");e.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),this.container.appendChild(this.listBox),this.container.appendChild(this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([t,e]),this.j.e.on(this.listBox,"click dblclick",(t=>{const e=t.target;return _.i.isTag(e,"a")&&e.hasAttribute("data-index")&&this.selectIndex(parseInt((0,c.attr)(e,"-index")||"0",10)),"dblclick"===t.type&&this.paste(),!1}))}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",(()=>this.list.length)).on("afterCopy.paste-storage",(t=>{-1!==this.list.indexOf(t)&&this.list.splice(this.list.indexOf(t),1),this.list.unshift(t),this.list.length>5&&(this.list.length=5)})),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),_.i.safeRemove(this.previewBox),_.i.safeRemove(this.listBox),_.i.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}}const se="copyformat",ie=["fontWeight","fontStyle","fontSize","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine","fontFamily"],oe=(t,e,s,i)=>{let o=(0,c.css)(s,e);return o===i[e]&&(o=s.parentNode&&s!==t.editor&&s.parentNode!==t.editor?oe(t,e,s.parentNode,i):void 0),o};function ne(t){t.registerButton({name:"copyformat",group:"clipboard"})}r.D.prototype.controls.copyformat={exec(t,e,{button:s}){if(e){if(t.buffer.exists(se))t.buffer.delete(se),t.e.off(t.editor,"mouseup.copyformat");else{const s={},i=_.i.up(e,(t=>t&&!_.i.isText(t)),t.editor)||t.editor,o=t.createInside.span();t.editor.appendChild(o),ie.forEach((t=>{s[t]=(0,c.css)(o,t)})),o!==t.editor&&_.i.safeRemove(o);const n=((t,e,s)=>{const i={};return e&&ie.forEach((o=>{i[o]=oe(t,o,e,s),o.match(/border(Style|Color)/)&&!i.borderWidth&&(i[o]=void 0)})),i})(t,i,s),r=()=>{t.buffer.delete(se);const e=t.s.current();e&&(_.i.isTag(e,"img")?(0,c.css)(e,n):t.s.applyStyle(n)),t.e.off(t.editor,"mouseup.copyformat")};t.e.on(t.editor,"mouseup.copyformat",r),t.buffer.set(se,!0)}s.update()}},isActive:t=>t.buffer.exists(se),tooltip:"Paint format"};var re=s(46);function ae(t){t.registerButton({name:"brush",group:"color"});const e=(e,s,i)=>{const o=(0,c.normalizeColor)(i);switch(e){case"background":t.s.applyStyle({backgroundColor:o||""});break;case"forecolor":t.s.applyStyle({color:o||""})}return t.setEditorValue(),!1};t.registerCommand("forecolor",e).registerCommand("background",e)}r.D.prototype.controls.brush={update(t){const e=(0,c.dataBind)(t,"color"),s=t.j,i=(e,i)=>{i&&i!==""+(0,c.css)(s.editor,e)&&(t.state.icon.fill=i)};if(e){const s=(0,c.dataBind)(t,"color");return void i("color"===s?s:"background-color",e)}const o=s.s.current();if(o&&!t.state.disabled){const t=_.i.closest(o,_.i.isElement,s.editor)||s.editor;i("color",""+(0,c.css)(t,"color")),i("background-color",""+(0,c.css)(t,"background-color"))}t.state.icon.fill="",t.state.activated=!1},popup(t,e,s,i,o){let n="",r="",a=[],l=null;return e&&e!==t.editor&&_.i.isNode(e)&&(_.i.isElement(e)&&t.s.isCollapsed()&&!_.i.isTag(e,["br","hr"])&&(l=e),_.i.up(e,(t=>{if(_.i.isHTMLElement(t)){const e=(0,c.css)(t,"color",!0),s=(0,c.css)(t,"background-color",!0);if(e)return n=""+e,!0;if(s)return r=""+s,!0}}),t.editor)),a=[{name:"Background",content:(0,re.YW)(t,(e=>{l?l.style.backgroundColor=e:t.execCommand("background",!1,e),(0,c.dataBind)(o,"color",e),(0,c.dataBind)(o,"color-mode","background"),i()}),r)},{name:"Text",content:(0,re.YW)(t,(e=>{l?l.style.color=e:t.execCommand("forecolor",!1,e),(0,c.dataBind)(o,"color",e),(0,c.dataBind)(o,"color-mode","color"),i()}),n)}],"background"!==t.o.colorPickerDefaultTab&&(a=a.reverse()),(0,re.IL)(t,a,l)},exec(t,e,{button:s}){const i=(0,c.dataBind)(s,"color-mode"),o=(0,c.dataBind)(s,"color");if(!i)return!1;if(e&&e!==t.editor&&_.i.isNode(e)&&_.i.isElement(e))switch(i){case"color":e.style.color=o;break;case"background":e.style.backgroundColor=o}else t.execCommand("background"===i?i:"forecolor",!1,o)},tooltip:"Fill color or set the text color"};class le extends H{constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.getText=t=>{const e=Kt(t);return e?e.getData(a.TEXT_HTML)||e.getData(a.TEXT_PLAIN):null}}afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}onDragStart(t){let e=t.target;if(this.onDragEnd(),this.isFragmentFromEditor=_.i.isOrContains(this.j.editor,e,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,c.ctrlKey)(t),this.isFragmentFromEditor){const t=this.j.s.sel,e=t&&t.rangeCount?t.getRangeAt(0):null;e&&(this.bufferRange=e.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=t.clientX,this.startDragPoint.y=t.clientY,_.i.isElement(e)&&e.classList.contains("jodit-filebrowser__files-item")&&(e=e.querySelector("img")),_.i.isTag(e,"img")&&(this.draggable=e.cloneNode(!0),(0,c.dataBind)(this.draggable,"target",e)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on("drop.DragAndDrop",this.onDrop).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off("drop.DragAndDrop",this.onDrop).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(t){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(t.clientX,t.clientY),t.preventDefault(),t.stopPropagation())}onDragEnd(){this.draggable&&(_.i.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(t){if(!t.dataTransfer||!t.dataTransfer.files||!t.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",t),t.preventDefault(),t.stopPropagation(),!1;const e=this.j.s.sel,s=this.bufferRange||(e&&e.rangeCount?e.getRangeAt(0):null);let i=null;if(!this.draggable&&s)i=this.isCopyMode?s.cloneContents():s.extractContents();else if(this.draggable)if(this.isCopyMode){const[t,e]="1"===(0,c.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(t),i.setAttribute(e,(0,c.attr)(this.draggable,"data-src")||(0,c.attr)(this.draggable,"src")||""),"a"===t&&(i.textContent=(0,c.attr)(i,e)||"")}else i=(0,c.dataBind)(this.draggable,"target");else this.getText(t)&&(i=this.j.createInside.fromHTML(this.getText(t)));e&&e.removeAllRanges(),this.j.s.insertCursorAtPoint(t.clientX,t.clientY),i&&(this.j.s.insertNode(i,!1,!1),s&&i.firstChild&&i.lastChild&&(s.setStartBefore(i.firstChild),s.setEndAfter(i.lastChild),this.j.s.selectRange(s),this.j.e.fire("synchro")),_.i.isTag(i,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",i)),t.preventDefault(),t.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}}(0,n.gn)([x.autobind],le.prototype,"onDragStart",null),(0,n.gn)([(0,x.throttle)((t=>t.j.defaultTimeout/10))],le.prototype,"onDrag",null),(0,n.gn)([x.autobind],le.prototype,"onDragEnd",null),(0,n.gn)([x.autobind],le.prototype,"onDrop",null);class ce extends H{constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.wasMoved=!1,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0}afterInit(){this.dragList=this.j.o.draggableTags?(0,c.splitArray)(this.j.o.draggableTags).filter(Boolean).map((t=>t.toLowerCase())):[],this.dragList.length&&this.j.e.on("mousedown touchstart dragstart",this.onDragStart)}onDragStart(t){if("dragstart"===t.type&&this.draggable)return!1;const e=t.target;if(!this.dragList.length||!e)return;const s=t=>t&&this.dragList.includes(t.nodeName.toLowerCase()),i=_.i.furthest(e,s,this.j.editor)||(s(e)?e:null);i&&(this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,c.ctrlKey)(t),this.onDragEnd(),this.draggable=i.cloneNode(!0),(0,c.dataBind)(this.draggable,"target",i),this.addDragListeners())}onDrag(t){var e,s;if(!this.draggable)return;const i=t.clientY;if(Math.sqrt(Math.pow(t.clientX-this.startX,2)+Math.pow(i-this.startY,2))>=this.diffStep){if(this.wasMoved=!0,this.j.e.fire("hidePopup hideResizer"),!this.draggable.parentNode){const i=(0,c.dataBind)(this.draggable,"target");(0,c.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:t.clientX,top:t.clientY,width:null!==(e=null==i?void 0:i.offsetWidth)&&void 0!==e?e:100,height:null!==(s=null==i?void 0:i.offsetHeight)&&void 0!==s?s:100}),(0,j.ZO)(this.j,ce).appendChild(this.draggable)}(0,c.css)(this.draggable,{left:t.clientX,top:t.clientY}),this.j.s.insertCursorAtPoint(t.clientX,t.clientY)}}onDragEnd(){this.isInDestruct||this.draggable&&(_.i.safeRemove(this.draggable),this.draggable=null,this.wasMoved=!1,this.removeDragListeners())}onDrop(){if(!this.draggable||!this.wasMoved)return void this.onDragEnd();let t=(0,c.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(t=t.cloneNode(!0));const{parentElement:e}=t;this.j.s.insertNode(t,!0,!1),e&&_.i.isEmpty(e)&&_.i.safeRemove(e),_.i.isTag(t,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",t),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove touchmove",this.onDrag).on("mouseup touchend",this.onDrop).on([this.j.ew,this.ow],"mouseup touchend",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove touchmove",this.onDrag).off("mouseup touchend",this.onDrop).off([this.j.ew,this.ow],"mouseup touchend",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown touchstart dragstart",this.onDragStart),this.removeDragListeners()}}(0,n.gn)([x.autobind],ce.prototype,"onDragStart",null),(0,n.gn)([(0,x.throttle)((t=>t.j.defaultTimeout/10))],ce.prototype,"onDrag",null),(0,n.gn)([x.autobind],ce.prototype,"onDragEnd",null),(0,n.gn)([x.autobind],ce.prototype,"onDrop",null);const he=(t,e,s,i)=>{var o;const n=t.createInside.element(s),r=t.createInside.element("br");n.appendChild(r),i&&i.cssText&&n.setAttribute("style",i.cssText),t.s.insertNode(n,!1,!1),t.s.setCursorBefore(r);const a=t.s.createRange();return a.setStartBefore("br"!==s.toLowerCase()?r:n),a.collapse(!0),t.s.selectRange(a),_.i.safeRemove(e),(0,c.scrollIntoViewIfNeeded)(n,t.editor,t.ed),null===(o=t.events)||void 0===o||o.fire("synchro"),n};class de extends H{constructor(){super(...arguments),this.brMode=!1,this.defaultTag=a.PARAGRAPH}afterInit(t){this.defaultTag=t.o.enter.toLowerCase(),this.brMode=this.defaultTag===a.BR.toLowerCase(),t.o.enterBlock||(t.o.enterBlock=this.brMode?a.PARAGRAPH:this.defaultTag),t.e.off(".enter").on("keydown.enter",(e=>{if(e.key===a.KEY_ENTER){const s=t.e.fire("beforeEnter",e);return void 0!==s?s:(t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),!1)}}))}onEnter(t){const e=this.j,s=e.selection,i=this.defaultTag;let o=s.current(!1);o&&o!==e.editor||(o=e.createInside.text(a.INVISIBLE_SPACE),s.insertNode(o),s.select(o));let n=this.getBlockWrapper(o);const r=_.i.isTag(n,"li");if((!r||t.shiftKey)&&!this.checkBR(o,t.shiftKey))return!1;if(n||this.hasPreviousBlock(o)||(n=this.wrapText(o)),!n||n===o)return he(e,null,r?"li":i),!1;if(!this.checkUnsplittableBox(n))return!1;if(r&&_.i.isEmpty(n))return this.enterInsideEmptyLIelement(n),!1;const l=n.tagName.toLowerCase()===this.defaultTag||r,c=s.cursorOnTheRight(n),h=s.cursorOnTheLeft(n);if(!l&&(c||h)){let t=null;return t=c?s.setCursorAfter(n):s.setCursorBefore(n),he(e,t,this.defaultTag),void(h&&!c&&s.setCursorIn(n,!0))}s.splitSelection(n)}getBlockWrapper(t,e=a.IS_BLOCK){let s=t;const i=this.j.editor;do{if(!s||s===i)break;if(e.test(s.nodeName))return _.i.isTag(s,"li")?s:this.getBlockWrapper(s.parentNode,/^li$/i)||s;s=s.parentNode}while(s&&s!==i);return null}checkBR(t,e){const s=_.i.closest(t,["pre","blockquote"],this.j.editor);if(this.brMode||e&&!s||!e&&s){const t=this.j.createInside.element("br");return this.j.s.insertNode(t,!0),(0,c.scrollIntoViewIfNeeded)(t,this.j.editor,this.j.ed),!1}return!0}wrapText(t){let e=t;_.i.up(e,(t=>{t&&t.hasChildNodes()&&t!==this.j.editor&&(e=t)}),this.j.editor);const s=_.i.wrapInline(e,this.j.o.enter,this.j);if(_.i.isEmpty(s)){const t=this.j.createInside.element("br");s.appendChild(t),this.j.s.setCursorBefore(t)}return s}hasPreviousBlock(t){return!!_.i.prev(t,(t=>_.i.isBlock(t)||_.i.isImage(t)),this.j.editor)}checkUnsplittableBox(t){const e=this.j,s=e.selection;if(!_.i.canSplitBlock(t)){const t=e.createInside.element("br");return s.insertNode(t,!1),s.setCursorAfter(t),!1}return!0}enterInsideEmptyLIelement(t){let e=null;const s=_.i.closest(t,["ol","ul"],this.j.editor);if(s){if(_.i.prev(t,(t=>_.i.isTag(t,"li")),s))if(_.i.next(t,(t=>_.i.isTag(t,"li")),s)){const i=this.j.s.createRange();i.setStartBefore(s),i.setEndAfter(t);const o=i.extractContents();s.parentNode&&s.parentNode.insertBefore(o,s),e=this.j.s.setCursorBefore(s)}else e=this.j.s.setCursorAfter(s);else e=this.j.s.setCursorBefore(s);_.i.safeRemove(t),he(this.j,e,this.defaultTag),(0,c.$$)("li",s).length||_.i.safeRemove(s)}}beforeDestruct(t){t.e.off("keydown.enter")}}class ue extends H{afterInit(t){}beforeDestruct(t){}onKeyDownArrow(t){var e;if(t.key!==a.KEY_RIGHT||!this.j.selection.isCollapsed())return;const{endContainer:s,endOffset:i}=this.j.selection.range;if(_.i.isText(s)&&(null===(e=s.nodeValue)||void 0===e?void 0:e.length)===i){const{parentNode:t}=s;_.i.isInlineBlock(t)&&!Ft(t,!1,this.j.editor)&&_.i.after(t,this.j.createInside.text(a.NBSP_SPACE))}}}(0,n.gn)([(0,x.watch)(":keydown")],ue.prototype,"onKeyDownArrow",null),r.D.prototype.showMessageErrors=!0,r.D.prototype.showMessageErrorTime=3e3,r.D.prototype.showMessageErrorOffsetPx=3;const pe="error-box-for-messages";function fe(t){if(t.o.showMessageErrors){const e=t.getFullElName(pe,"active",!0),s=t.c.div(t.getFullElName(pe)),i=()=>{let e=5;(0,c.toArray)(s.childNodes).forEach((s=>{(0,c.css)(s,"bottom",e+"px"),e+=s.offsetHeight+t.o.showMessageErrorOffsetPx}))};t.e.on("beforeDestruct",(()=>{_.i.safeRemove(s)})).on("errorMessage",((o,n,r)=>{t.workplace.appendChild(s);const a=t.c.div(e,o);a.classList.add(t.getFullElName(pe,"type",n)),s.appendChild(a),i(),t.async.setTimeout((()=>{a.classList.remove(e),t.async.setTimeout((()=>{_.i.safeRemove(a),i()}),300)}),r||t.o.showMessageErrorTime)}))}}function me(t){t.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"});const e=(e,s,i)=>{switch(e){case"fontsize":t.s.applyStyle({fontSize:(0,c.normalizeSize)(i)});break;case"fontname":t.s.applyStyle({fontFamily:i})}return t.e.fire("synchro"),!1};t.registerCommand("fontsize",e).registerCommand("fontname",e)}function ge(t){t.registerButton({name:"paragraph",group:"font"}),t.registerCommand("formatblock",((e,s,i)=>(t.s.applyStyle(void 0,{element:i}),t.setEditorValue(),!1)))}function ve(t){t.registerButton({name:"fullsize"});let e=!1,s=0,i=0,o=!1;const n=()=>{const{container:n,events:r}=t;r&&(e?(s=(0,c.css)(n,"height",!0),i=(0,c.css)(n,"width",!0),(0,c.css)(n,{height:t.ow.innerHeight,width:t.ow.innerWidth}),o=!0):o&&(0,c.css)(n,{height:s||"auto",width:i||"auto"}))},r=s=>{const{container:i,events:o}=t;if(i){if(void 0===s&&(s=!i.classList.contains("jodit_fullsize")),t.setMod("fullsize",s),t.o.fullsize=s,e=s,i.classList.toggle("jodit_fullsize",s),t.toolbar&&((0,c.isJoditObject)(t)&&t.toolbarContainer.appendChild(t.toolbar.container),(0,c.css)(t.toolbar.container,"width","auto")),t.o.globalFullSize){let t=i.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",s),t=t.parentNode;n()}o.fire("afterResize")}};t.o.globalFullSize&&t.e.on(t.ow,"resize",n),t.e.on("afterInit afterOpen",(()=>{var e;t.toggleFullSize(null===(e=null==t?void 0:t.options)||void 0===e?void 0:e.fullsize)})).on("toggleFullSize",r).on("beforeDestruct",(()=>{e&&r(!1)})).on("beforeDestruct",(()=>{t.events&&t.e.off(t.ow,"resize",n)}))}r.D.prototype.defaultFontSizePoints="px",r.D.prototype.controls.fontsize={command:"fontSize",data:{cssRule:"font-size"},list:["8","9","10","11","12","14","16","18","24","30","36","48","60","72","96"],exec:(t,e,{control:s})=>(0,c.memorizeExec)(t,e,{control:s},(e=>{var i;return"fontsize"===(null===(i=s.command)||void 0===i?void 0:i.toLowerCase())?`${e}${t.o.defaultFontSizePoints}`:e})),childTemplate:(t,e,s)=>`${s}${t.o.defaultFontSizePoints}`,tooltip:"Font size",isChildActive(t,e){var s,i;const o=t.s.current(),n=(null===(s=e.data)||void 0===s?void 0:s.cssRule)||"font-size",r=(null===(i=e.data)||void 0===i?void 0:i.normalize)||(e=>/pt$/i.test(e)&&"pt"===t.o.defaultFontSizePoints?e.replace(/pt$/i,""):e);if(o){const s=_.i.closest(o,_.i.isElement,t.editor)||t.editor,i=(0,c.css)(s,n);return!(!i||!e.args||r(""+e.args[0])!==r(""+i))}return!1}},r.D.prototype.controls.font={...r.D.prototype.controls.fontsize,command:"fontname",list:{"":"Default","Helvetica,sans-serif":"Helvetica","Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","'Times New Roman',Times,serif":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},childTemplate:(t,e,s)=>`<span style="font-family: ${e}!important;">${s}</span>`,data:{cssRule:"font-family",normalize:t=>t.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9]+/g,",")},tooltip:"Font family"},r.D.prototype.controls.paragraph={command:"formatBlock",update(t){const e=t.j,s=t.control,i=e.s.current();if(i&&e.o.textIcons){const o=(_.i.closest(i,_.i.isBlock,e.editor)||e.editor).nodeName.toLowerCase(),n=s.list;t&&s.data&&s.data.currentValue!==o&&n&&n[o]&&(e.o.textIcons?t.state.text=o:t.state.icon.name=o,s.data.currentValue=o)}return!1},exec:c.memorizeExec,data:{currentValue:"left"},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote"},isChildActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isBlock,t.editor);return!(!i||i===t.editor||void 0===e.args||i.nodeName.toLowerCase()!==e.args[0])}return!1},isActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isBlock,t.editor);return!(!i||i===t.editor||void 0===e.list||_.i.isTag(i,"p")||void 0===e.list[i.nodeName.toLowerCase()])}return!1},childTemplate:(t,e,s)=>`<${e} style="margin:0;padding:0"><span>${t.i18n(s)}</span></${e}>`,tooltip:"Insert format block"},r.D.prototype.fullsize=!1,r.D.prototype.globalFullSize=!0,r.D.prototype.controls.fullsize={exec(t){t.toggleFullSize()},update(t){const e=t.j,s=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=s:t.state.icon.name=s},tooltip:"Open editor in fullsize",mode:a.MODE_SOURCE+a.MODE_WYSIWYG},r.D.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8, cmd+shift+8"],selectall:["ctrl+a","cmd+a"]};class be extends H{constructor(){super(...arguments),this.onKeyPress=t=>{const e=this.specialKeys[t.which],s=(t.key||String.fromCharCode(t.which)).toLowerCase(),i=[e||s];return["alt","ctrl","shift","meta"].forEach((s=>{t[s+"Key"]&&e!==s&&i.push(s)})),(0,c.normalizeKeyAliases)(i.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}afterInit(t){(0,c.keys)(t.o.commandToHotkeys,!1).forEach((e=>{const s=t.o.commandToHotkeys[e];s&&((0,c.isArray)(s)||(0,c.isString)(s))&&t.registerHotkeyToCommand(s,e)}));let e=!1;t.e.off(".hotkeys").on([t.ow,t.ew],"keydown.hotkeys",(t=>{if(t.key===a.KEY_ESC)return this.j.e.fire("escape",t)})).on("keydown.hotkeys",(s=>{const i=this.onKeyPress(s),o={shouldStop:!0};if(!1===this.j.e.fire(i+".hotkey",s.type,o)){if(o.shouldStop)return e=!0,t.e.stopPropagation("keydown"),!1;s.preventDefault()}}),void 0,!0).on("keyup.hotkeys",(()=>{if(e)return e=!1,t.e.stopPropagation("keyup"),!1}),void 0,!0)}beforeDestruct(t){t.events&&t.e.off(".hotkeys")}}function we(t){const e=t.options;t.e.on("afterSetMode",(()=>{t.isEditorMode()&&t.s.focus()})).on("generateDocumentStructure.iframe",((t,s)=>{const i=t||s.iframe.contentWindow.document;if(i.open(),i.write(e.iframeDoctype+`<html dir="${e.direction}" class="jodit" lang="${(0,c.defaultLanguage)(e.language)}"><head>`+`<title>${e.iframeTitle}</title>`+(e.iframeBaseUrl?`<base href="${e.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),i.close(),e.iframeCSSLinks&&e.iframeCSSLinks.forEach((t=>{const e=i.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),i.head&&i.head.appendChild(e)})),e.iframeStyle){const t=i.createElement("style");t.innerHTML=e.iframeStyle,i.head&&i.head.appendChild(t)}})).on("createEditor",(()=>{if(!e.iframe)return;const s=t.c.element("iframe");s.style.display="block",s.src="about:blank",s.className="jodit-wysiwyg_iframe",s.setAttribute("allowtransparency","true"),s.setAttribute("tabindex",""+e.tabIndex),s.setAttribute("frameborder","0"),t.workplace.appendChild(s),t.iframe=s;const i=t.e.fire("generateDocumentStructure.iframe",null,t);return(0,c.callPromise)(i,(()=>{if(!t.iframe)return;const s=t.iframe.contentWindow.document;t.editorWindow=t.iframe.contentWindow;const i=()=>{(0,c.attr)(s.body,"contenteditable",t.getMode()!==a.MODE_SOURCE&&!t.getReadOnly()||null)},o=t=>{const e=/<body.*<\/body>/im,s="{%%BODY%%}",i=e.exec(t);return i&&(t=t.replace(e,s).replace(/<span([^>]*?)>(.*?)<\/span>/gim,"").replace(/<span([^&]*?)>(.*?)<\/span>/gim,"").replace(s,i[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im,"$1").replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im,"$1").replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g,"")).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")),t};if(e.editHTMLDocumentMode){const e=t.element.tagName;if("TEXTAREA"!==e&&"INPUT"!==e)throw(0,c.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");t.e.on("beforeGetNativeEditorValue",(()=>o(t.o.iframeDoctype+s.documentElement.outerHTML))).on("beforeSetNativeEditorValue",(({value:e})=>!t.isLocked&&(/<(html|body)/i.test(e)?o(s.documentElement.outerHTML)!==o(e)&&(s.open(),s.write(t.o.iframeDoctype+o(e)),s.close(),t.editor=s.body,t.e.fire("safeHTML",t.editor),i(),t.e.fire("prepareWYSIWYGEditor"),t.e.stopPropagation("beforeSetNativeEditorValue")):s.body.innerHTML=e,!0)),void 0,!0)}if(t.editor=s.body,t.e.on("afterSetMode afterInit afterAddPlace",i),"auto"===e.height){s.documentElement&&(s.documentElement.style.overflowY="hidden");const i=t.async.throttle((()=>{t.editor&&t.iframe&&"auto"===e.height&&(0,c.css)(t.iframe,"height",t.editor.offsetHeight)}),t.defaultTimeout/2);t.e.on("change afterInit afterSetMode resize",i).on([t.iframe,t.ew,s.documentElement],"load",i).on(s,"readystatechange DOMContentLoaded",i)}return s.documentElement&&t.e.on(s.documentElement,"mousedown touchend",(()=>{t.s.isFocused()||(t.s.focus(),t.editor===s.body&&t.s.setCursorIn(s.body))})).on(t.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",(e=>{var s;null===(s=t.events)||void 0===s||s.fire(t.ow,e)})),!1}))}))}function ye(t){const e=t.o,s=t.i18n.bind(t),i=k.JO.get.bind(k.JO),o=e.filebrowser.ajax.url||e.uploader.url,n=e.image.useImageEditor;return t.c.fromHTML(`<div style="${e.image.editSrc?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Src")}</label>\n\t\t\t<div class="jodit-input_group">\n\t\t\t\t<input data-ref="imageSrc" class="jodit-input" type="text"/>\n\t\t\t\t<div\n\t\t\t\t\tclass="jodit-input_group-buttons"\n\t\t\t\t\tstyle="${o?"":"display: none"}"\n\t\t\t\t>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tdata-ref="changeImage"\n\t\t\t\t\t\t\tclass="jodit-button"\n\t\t\t\t\t\t>${i("image")}</a>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tdata-ref="editImage"\n\t\t\t\t\t\t\tclass="jodit-button"\n\t\t\t\t\t\t\tstyle="${n?"":"display: none"}"\n\t\t\t\t\t\t>${i("crop")}</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div style="${e.image.editTitle?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Title")}</label>\n\t\t\t<input data-ref="imageTitle" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editAlt?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Alternative")}</label>\n\t\t\t<input data-ref="imageAlt" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editLink?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Link")}</label>\n\t\t\t<input data-ref="imageLink" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editLink?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label class="jodit_vertical_middle">\n\t\t\t\t<input data-ref="imageLinkOpenInNewTab" type="checkbox" class="jodit-checkbox"/>\n\t\t\t\t<span>${s("Open link in new tab")}</span>\n\t\t\t</label>\n\t\t</div>`)}function Ce(t){const e=t.o,s=t.i18n.bind(t),i=k.JO.get.bind(k.JO);return t.c.fromHTML(`<div style="${e.image.editMargins?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Margins")}</label>\n\t\t\t<div class="jodit-grid jodit_vertical_middle">\n\t\t\t\t<input class="jodit_col-lg-1-5 jodit-input" data-ref="marginTop" type="text" placeholder="${s("top")}"/>\n\t\t\t\t<a style="text-align: center;" data-ref="lockMargin" class="jodit-properties__lock jodit_col-lg-1-5">${i("lock")}</a>\n\t\t\t\t<input disabled="true" class="jodit_col-lg-1-5 jodit-input" data-ref="marginRight" type="text" placeholder="${s("right")}"/>\n\t\t\t\t<input disabled="true" class="jodit_col-lg-1-5 jodit-input" data-ref="marginBottom" type="text" placeholder="${s("bottom")}"/>\n\t\t\t\t<input disabled="true" class="jodit_col-lg-1-5 jodit-input" data-ref="marginLeft" type="text" placeholder="${s("left")}"/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div style="${e.image.editStyle?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Styles")}</label>\n\t\t\t<input data-ref="style" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editClass?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Classes")}</label>\n\t\t\t<input data-ref="classes" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editId?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>Id</label>\n\t\t\t<input data-ref="id" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div\n\t\t\tstyle="${e.image.editBorderRadius?"":"display:none"}"\n\t\t\tclass="jodit-form__group"\n\t\t>\n\t\t\t<label>${s("Border radius")}</label>\n\t\t\t\t<input data-ref="borderRadius" type="number" class="jodit-input"/>\n\t\t</div>\n\t\t<div\n\t\t\tstyle="${e.image.editAlign?"":"display:none"}"\n\t\t\tclass="jodit-form__group"\n\t\t>\n\t\t\t<label>${s("Align")}</label>\n\t\t\t<select data-ref="align" class="jodit-select">\n\t\t\t\t<option value="">${s("--Not Set--")}</option>\n\t\t\t\t<option value="left">${s("Left")}</option>\n\t\t\t\t<option value="center">${s("Center")}</option>\n\t\t\t\t<option value="right">${s("Right")}</option>\n\t\t\t</select>\n\t\t</div>`)}r.D.prototype.iframeBaseUrl="",r.D.prototype.iframeTitle="Jodit Editor",r.D.prototype.iframeDoctype="<!DOCTYPE html>",r.D.prototype.iframeDefaultSrc="about:blank",r.D.prototype.iframeStyle='html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',r.D.prototype.iframeCSSLinks=[],r.D.prototype.editHTMLDocumentMode=!1;var je=s(47);r.D.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0};const xe=t=>(t=(0,c.trim)(t),/^[0-9]+$/.test(t)?t+"px":t),Ee=t=>/^[-+]?[0-9.]+px$/.test(""+t)?parseFloat(""+t):t;class Se extends H{constructor(){super(...arguments),this.state={image:new Image,get ratio(){return this.image.naturalWidth/this.image.naturalHeight||1},sizeIsLocked:!0,marginIsLocked:!0}}onChangeMarginIsLocked(){if(!this.form)return;const{marginRight:t,marginBottom:e,marginLeft:s,lockMargin:i}=(0,c.refs)(this.form);[t,e,s].forEach((t=>{(0,c.attr)(t,"disabled",this.state.marginIsLocked||null)})),i.innerHTML=k.JO.get(this.state.marginIsLocked?"lock":"unlock")}onChangeSizeIsLocked(){if(!this.form)return;const{lockSize:t,imageWidth:e}=(0,c.refs)(this.form);t.innerHTML=k.JO.get(this.state.sizeIsLocked?"lock":"unlock"),t.classList.remove("jodit-properties__lock"),t.classList.remove("jodit-properties__unlock"),t.classList.add(this.state.sizeIsLocked?"jodit-properties__lock":"jodit-properties__unlock"),this.j.e.fire(e,"change")}open(){return this.makeForm(),this.j.e.fire("hidePopup"),(0,c.markOwner)(this.j,this.dialog.container),this.state.marginIsLocked=!0,this.state.sizeIsLocked=!0,this.updateValues(),this.dialog.open().setModal(!0).setPosition(),!1}makeForm(){if(this.dialog)return;this.dialog=new R({fullsize:this.j.o.fullsize,globalFullSize:this.j.o.globalFullSize,theme:this.j.o.theme,language:this.j.o.language,minWidth:Math.min(400,screen.width),minHeight:400,buttons:["fullsize","dialog.close"]});const t=this.j,e=t.o,s=t.i18n.bind(t),i={check:(0,f.zx)(t,"ok","Apply"),remove:(0,f.zx)(t,"bin","Delete")};t.e.on(this.dialog,"afterClose",(()=>{this.state.image.parentNode&&e.image.selectImageAfterClose&&t.s.select(this.state.image)})),i.remove.onAction((()=>{t.s.removeNode(this.state.image),this.dialog.close()}));const{dialog:o}=this;o.setHeader(s("Image properties"));const n=(t=>{const{showPreview:e,editSize:s}=t.o.image,i=k.JO.get.bind(k.JO);return t.c.fromHTML(`<form class="jodit-properties">\n\t\t<div class="jodit-grid jodit-grid_xs-column">\n\t\t\t<div class="jodit_col-lg-2-5 jodit_col-xs-5-5">\n\t\t\t\t<div class="jodit-properties_view_box">\n\t\t\t\t\t<div style="${e?"":"display:none"}" class="jodit-properties_image_view">\n\t\t\t\t\t\t<img data-ref="imageViewSrc" src="" alt=""/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="${s?"":"display:none"}" class="jodit-form__group jodit-properties_image_sizes">\n\t\t\t\t\t\t<input data-ref="imageWidth" type="text" class="jodit-input"/>\n\t\t\t\t\t\t<a data-ref="lockSize" class="jodit-properties__lock">${i("lock")}</a>\n\t\t\t\t\t\t<input data-ref="imageHeight" type="text" class="imageHeight jodit-input"/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div data-ref="tabsBox" class="jodit_col-lg-3-5 jodit_col-xs-5-5"></div>\n\t\t</div>\n\t</form>`)})(t);this.form=n,o.setContent(n);const{tabsBox:r}=(0,c.refs)(this.form);r&&r.appendChild((0,re.IL)(t,[{name:"Image",content:ye(t)},{name:"Advanced",content:Ce(t)}])),i.check.onAction(this.onApply);const{changeImage:a,editImage:l}=(0,c.refs)(this.form);t.e.on(a,"click",this.openImagePopup),e.image.useImageEditor&&t.e.on(l,"click",this.openImageEditor);const{lockSize:h,lockMargin:d,imageWidth:u,imageHeight:p}=(0,c.refs)(n);h&&t.e.on(h,"click",(()=>{this.state.sizeIsLocked=!this.state.sizeIsLocked})),t.e.on(d,"click",(t=>{this.state.marginIsLocked=!this.state.marginIsLocked,t.preventDefault()}));const m=t=>{if(!(0,c.isNumeric)(u.value)||!(0,c.isNumeric)(p.value))return;const e=parseFloat(u.value),s=parseFloat(p.value);t.target===u?p.value=""+Math.round(e/this.state.ratio):u.value=""+Math.round(s*this.state.ratio)};t.e.on([u,p],"change keydown mousedown paste",(e=>{this.state.sizeIsLocked&&t.async.setTimeout(m.bind(this,e),{timeout:t.defaultTimeout,label:"image-properties-changeSize"})})),o.setFooter([i.remove,i.check]),o.setSize(this.j.o.image.dialogWidth)}updateValues(){const t=this.j.o,{image:e}=this.state,{marginTop:s,marginRight:i,marginBottom:o,marginLeft:n,lockMargin:r,imageSrc:a,id:l,classes:h,align:d,style:u,imageTitle:p,imageAlt:f,borderRadius:m,imageLink:g,imageWidth:v,imageHeight:b,imageLinkOpenInNewTab:w,imageViewSrc:y,lockSize:C}=(0,c.refs)(this.form);(()=>{r.checked=this.state.marginIsLocked,C.checked=this.state.sizeIsLocked})(),a.value=(0,c.attr)(e,"src")||"",y&&(0,c.attr)(y,"src",(0,c.attr)(e,"src")||""),(()=>{p.value=(0,c.attr)(e,"title")||"",f.value=(0,c.attr)(e,"alt")||"";const t=_.i.closest(e,"a",this.j.editor);t?(g.value=(0,c.attr)(t,"href")||"",w.checked="_blank"===(0,c.attr)(t,"target")):(g.value="",w.checked=!1)})(),(()=>{const t=(0,c.attr)(e,"width")||(0,c.css)(e,"width",!0)||!1,s=(0,c.attr)(e,"height")||(0,c.css)(e,"height",!0)||!1;v.value=!1!==t?""+Ee(t):""+e.offsetWidth,b.value=!1!==s?""+Ee(s):""+e.offsetHeight,this.state.sizeIsLocked=(()=>!(!(0,c.isNumeric)(v.value)||!(0,c.isNumeric)(b.value))&&1>Math.abs(parseFloat(v.value)-parseFloat(b.value)*this.state.ratio))()})(),(()=>{if(!t.image.editMargins)return;let r=!0,a=!1;[s,i,o,n].forEach((t=>{const i=(0,c.attr)(t,"data-ref")||"";let o=e.style.getPropertyValue((0,c.kebabCase)(i));if(!o)return a=!0,void(t.value="");/^[0-9]+(px)?$/.test(o)&&(o=parseInt(o,10)),t.value=""+o||"",(a&&t.value||r&&"marginTop"!==i&&t.value!==s.value)&&(r=!1)})),this.state.marginIsLocked=r})(),h.value=((0,c.attr)(e,"class")||"").replace(/jodit_focused_image[\s]*/,""),l.value=(0,c.attr)(e,"id")||"",m.value=""+(parseInt(e.style.borderRadius||"0",10)||"0"),e.style.cssFloat&&-1!==["left","right"].indexOf(e.style.cssFloat.toLowerCase())?d.value=(0,c.css)(e,"float"):"block"===(0,c.css)(e,"display")&&"auto"===e.style.marginLeft&&"auto"===e.style.marginRight&&(d.value="center"),u.value=(0,c.attr)(e,"style")||""}onApply(){const{style:t,imageSrc:e,borderRadius:s,imageTitle:i,imageAlt:o,imageLink:n,imageWidth:r,imageHeight:a,marginTop:l,marginRight:h,marginBottom:d,marginLeft:u,imageLinkOpenInNewTab:p,align:f,classes:m,id:g}=(0,c.refs)(this.form),v=this.j.o,{image:b}=this.state;if(v.image.editStyle&&(0,c.attr)(b,"style",t.value||null),!e.value)return _.i.safeRemove(b),void this.dialog.close();(0,c.attr)(b,"src",e.value),b.style.borderRadius="0"!==s.value&&/^[0-9]+$/.test(s.value)?s.value+"px":"",(0,c.attr)(b,"title",i.value||null),(0,c.attr)(b,"alt",o.value||null);let w=_.i.closest(b,"a",this.j.editor);n.value?(w||(w=_.i.wrap(b,"a",this.j.createInside)),(0,c.attr)(w,"href",n.value),(0,c.attr)(w,"target",p.checked?"_blank":null)):w&&w.parentNode&&w.parentNode.replaceChild(b,w),r.value===""+b.offsetWidth&&a.value===""+b.offsetHeight||((0,c.css)(b,{width:(0,c.trim)(r.value)?xe(r.value):null,height:(0,c.trim)(a.value)?xe(a.value):null}),(0,c.attr)(b,"width",null),(0,c.attr)(b,"height",null));const y=[l,h,d,u];v.image.editMargins&&(this.state.marginIsLocked?(0,c.css)(b,"margin",xe(l.value)):y.forEach((t=>{const e=(0,c.attr)(t,"data-ref")||"";(0,c.css)(b,e,xe(t.value))}))),v.image.editClass&&(0,c.attr)(b,"class",m.value||null),v.image.editId&&(0,c.attr)(b,"id",g.value||null),v.image.editAlign&&(0,je.z)(b,f.value),this.j.setEditorValue(),this.dialog.close()}openImageEditor(){const t=(0,c.attr)(this.state.image,"src")||"",e=this.j.c.element("a"),s=()=>{e.host===location.host||O(this.j.i18n("You can only edit your own images. Download this image on the host?"),(t=>{t&&this.j.uploader&&this.j.uploader.uploadRemoteImage(""+e.href,(t=>{A(this.j.i18n("The image has been successfully uploaded to the host!"),(()=>{(0,c.isString)(t.newfilename)&&((0,c.attr)(this.state.image,"src",t.baseurl+t.newfilename),this.updateValues())})).bindDestruct(this.j)}),(t=>{A(this.j.i18n("There was an error loading %s",t.message)).bindDestruct(this.j)}))})).bindDestruct(this.j)};e.href=t,this.j.filebrowser.dataProvider.getPathByUrl(""+e.href).then((s=>{nt.call(this.j.filebrowser,e.href,s.name,s.path,s.source,(()=>{const e=(new Date).getTime();(0,c.attr)(this.state.image,"src",t+(-1!==t.indexOf("?")?"":"?")+"&_tmp="+e),this.updateValues()}),(t=>{A(t.message).bindDestruct(this.j)}))})).catch((t=>{A(t.message,s).bindDestruct(this.j)}))}openImagePopup(t){const e=new k.GI(this.j),{changeImage:s}=(0,c.refs)(this.form);e.setZIndex(this.dialog.getZIndex()+1),e.setContent((0,re.ov)(this.j,{upload:t=>{t.files&&t.files.length&&(0,c.attr)(this.state.image,"src",t.baseurl+t.files[0]),this.updateValues(),e.close()},filebrowser:t=>{t&&(0,c.isArray)(t.files)&&t.files.length&&((0,c.attr)(this.state.image,"src",t.files[0]),e.close(),this.updateValues())}},this.state.image,e.close)).open((()=>(0,c.position)(s))),t.stopPropagation()}afterInit(t){const e=this;t.e.on("afterConstructor changePlace",(()=>{t.e.off(t.editor,".imageproperties").on(t.editor,"dblclick.imageproperties",(s=>{const i=s.target;_.i.isTag(i,"img")&&(t.o.image.openOnDblClick?(e.state.image=i,t.o.readonly||(s.stopImmediatePropagation(),s.preventDefault(),e.open())):(s.stopImmediatePropagation(),t.s.select(i)))}))})).on("openImageProperties.imageproperties",(t=>{this.state.image=t,this.open()}))}beforeDestruct(t){this.dialog&&this.dialog.destruct(),t.e.off(t.editor,".imageproperties").off(".imageproperties")}}function _e(t){t.e.on("change afterInit changePlace",t.async.debounce((()=>{t.editor&&(0,c.$$)("img",t.editor).forEach((e=>{e.__jodit_imageprocessor_binded||(e.__jodit_imageprocessor_binded=!0,e.complete||e.addEventListener("load",(function s(){var i;!t.isInDestruct&&(null===(i=t.e)||void 0===i||i.fire("resize")),e.removeEventListener("load",s)})),t.e.on(e,"mousedown touchstart",(()=>{t.s.select(e)})))}))}),t.defaultTimeout))}function ke(t){t.registerButton({name:"image",group:"media"})}(0,n.gn)([(0,x.watch)("state.marginIsLocked")],Se.prototype,"onChangeMarginIsLocked",null),(0,n.gn)([(0,x.watch)("state.sizeIsLocked")],Se.prototype,"onChangeSizeIsLocked",null),(0,n.gn)([x.autobind],Se.prototype,"onApply",null),(0,n.gn)([x.autobind],Se.prototype,"openImageEditor",null),(0,n.gn)([x.autobind],Se.prototype,"openImagePopup",null),r.D.prototype.controls.image={popup(t,e,s,i){let o=null;return e&&!_.i.isText(e)&&_.i.isHTMLElement(e)&&(_.i.isTag(e,"img")||(0,c.$$)("img",e).length)&&(o=_.i.isTag(e,"img")?e:(0,c.$$)("img",e)[0]),t.s.save(),(0,re.ov)(t,{filebrowser(e){t.s.restore(),e.files&&e.files.forEach((s=>t.s.insertImage(e.baseurl+s,null,t.o.imageDefaultWidth))),i()},upload:!0,async url(e,s){t.s.restore();const n=o||t.createInside.element("img");n.setAttribute("src",e),n.setAttribute("alt",s),o||await t.s.insertImage(n,null,t.o.imageDefaultWidth),i()}},o,i)},tags:["img"],tooltip:"Insert Image"},r.D.prototype.controls.indent={tooltip:"Increase Indent"};const Te=t=>"rtl"===t?"marginRight":"marginLeft";function Ie(t){const e=Te(t.o.direction);t.registerButton({name:"indent",group:"indent"}).registerButton({name:"outdent",group:"indent"});const s=s=>{const i=[];return t.s.eachSelection((o=>{t.s.save();let n=!!o&&_.i.up(o,_.i.isBlock,t.editor);const r=t.o.enter;if(!n&&o&&(n=_.i.wrapInline(o,r!==a.BR?r:a.PARAGRAPH,t)),!n)return t.s.restore(),!1;const l=-1!==i.indexOf(n);if(n&&n.style&&!l){i.push(n);let o=n.style[e]?parseInt(n.style[e],10):0;o+=t.o.indentMargin*("outdent"===s?-1:1),n.style[e]=o>0?o+"px":"",(0,c.attr)(n,"style")||n.removeAttribute("style")}t.s.restore()})),t.setEditorValue(),!1};t.registerCommand("indent",{exec:s,hotkeys:["ctrl+]","cmd+]"]}),t.registerCommand("outdent",{exec:s,hotkeys:["ctrl+[","cmd+["]})}function qe(t){t.registerButton({name:"hr",group:"insert"}),t.registerCommand("insertHorizontalRule",(()=>{const e=t.createInside.element("hr");t.s.insertNode(e,!1,!1);const s=_.i.closest(e.parentElement,_.i.isBlock,t.editor);s&&_.i.isEmpty(s)&&s!==t.editor&&(_.i.after(s,e),_.i.safeRemove(s));let i=_.i.next(e,_.i.isBlock,t.editor,!1);return i||(i=t.createInside.element(t.o.enter),_.i.after(e,i)),t.s.setCursorIn(i),!1}))}r.D.prototype.controls.outdent={isDisabled(t){const e=t.s.current();if(e){const s=_.i.closest(e,_.i.isBlock,t.editor),i=Te(t.o.direction);if(s&&s.style&&s.style[i])return 0>=parseInt(s.style[i],10)}return!0},tooltip:"Decrease Indent"},r.D.prototype.indentMargin=10,r.D.prototype.controls.hr={command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},r.D.prototype.toolbarInline=!0,r.D.prototype.toolbarInlineForSelection=!1,r.D.prototype.toolbarInlineDisableFor=[],r.D.prototype.toolbarInlineDisabledButtons=["source"],r.D.prototype.popup={a:s(48).Z,img:s(49).Z,cells:s(50).Z,jodit:s(51).Z,"jodit-media":s(51).Z,selection:["bold","underline","italic","ul","ol","\n","outdent","indent","fontsize","brush","cut","\n","paragraph","link","align","dots"]};class Le extends H{constructor(){super(...arguments),this.requires=["select"],this.type=null,this.popup=new p.G(this.jodit,!1),this.toolbar=M(this.jodit,this.popup),this.snapRange=null,this.elmsList=(0,c.keys)(this.j.o.popup,!1).filter((t=>!this.isExcludedTarget(t)))}onClick(t){const e=this.elmsList,s=_.i.isTag(t,"img")?t:_.i.closest(t,e,this.j.editor);if(s&&this.canShowPopupForType(s.nodeName.toLowerCase()))return this.showPopup((()=>(0,c.position)(s,this.j)),s.nodeName.toLowerCase(),s),!1}showPopup(t,e,s){if(e=e.toLowerCase(),!this.canShowPopupForType(e))return!1;if(this.type!==e||s!==this.previousTarget){this.previousTarget=s;const t=this.j.o.popup[e];let i;i=(0,c.isFunction)(t)?t(this.j,s,this.popup.close):t,(0,c.isArray)(i)&&(this.toolbar.build(i,s),this.toolbar.buttonSize=this.j.o.toolbarButtonSize,i=this.toolbar.container),this.popup.setContent(i),this.type=e}return this.popup.open(t),!0}hidePopup(t){(0,c.isString)(t)&&t!==this.type||this.popup.close()}onOutsideClick(){this.popup.close()}canShowPopupForType(t){const e=this.j.o.popup[t.toLowerCase()];return!(this.j.o.readonly||!this.j.o.toolbarInline||!e||this.isExcludedTarget(t))}isExcludedTarget(t){return(0,c.splitArray)(this.j.o.toolbarInlineDisableFor).map((t=>t.toLowerCase())).includes(t.toLowerCase())}afterInit(t){this.j.e.on("getDiffButtons.mobile",(e=>{if(this.toolbar===e){const e=this.toolbar.getButtonsNames();return(0,c.toArray)(t.registeredButtons).filter((t=>!this.j.o.toolbarInlineDisabledButtons.includes(t.name))).filter((t=>{const s=(0,c.isString)(t)?t:t.name;return s&&"|"!==s&&"\n"!==s&&!e.includes(s)}))}})).on("hidePopup",this.hidePopup).on("showPopup",((t,e,s)=>{this.showPopup(e,s||((0,c.isString)(t)?t:t.nodeName),(0,c.isString)(t)?void 0:t)})).on("mousedown keydown",this.onSelectionStart).on("change",(()=>{this.popup.isOpened&&this.previousTarget&&!this.previousTarget.parentNode&&(this.hidePopup(),this.previousTarget=void 0)})).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.addListenersForElements()}onSelectionStart(){this.snapRange=this.j.s.range.cloneRange()}onSelectionEnd(t){if(t&&t.target&&k.u1.closestElement(t.target,p.G))return;const{snapRange:e}=this,{range:s}=this.j.s;e&&!s.collapsed&&s.startContainer===e.startContainer&&s.startOffset===e.startOffset&&s.endContainer===e.endContainer&&s.endOffset===e.endOffset||this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;const t="selection",e=this.j.s.sel,s=this.j.s.range;(null==e?void 0:e.isCollapsed)||this.isSelectedTarget(s)||this.tableModule.getAllSelectedCells().length?this.type===t&&this.popup.isOpened&&this.hidePopup():this.j.s.current()&&this.showPopup((()=>s.getBoundingClientRect()),t)}isSelectedTarget(t){const e=t.startContainer;return _.i.isElement(e)&&e===t.endContainer&&_.i.isTag(e.childNodes[t.startOffset],(0,c.keys)(this.j.o.popup,!1))&&t.startOffset===t.endOffset-1}get tableModule(){return this.j.getInstance("Table",this.j.o)}beforeDestruct(t){t.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.removeListenersForElements()}addListenersForElements(){this.j.e.on(this.elmsList.map((t=>(0,c.camelCase)("click_"+t))).join(" "),this.onClick)}removeListenersForElements(){this.j.e.off(this.elmsList.map((t=>(0,c.camelCase)("click_"+t))).join(" "),this.onClick)}}(0,n.gn)([x.autobind],Le.prototype,"onClick",null),(0,n.gn)([(0,x.wait)((t=>!t.j.isLocked))],Le.prototype,"showPopup",null),(0,n.gn)([(0,x.watch)(":clickEditor"),x.autobind],Le.prototype,"hidePopup",null),(0,n.gn)([(0,x.watch)(":outsideClick")],Le.prototype,"onOutsideClick",null),(0,n.gn)([x.autobind],Le.prototype,"onSelectionStart",null),(0,n.gn)([x.autobind],Le.prototype,"onSelectionEnd",null),(0,n.gn)([(0,x.debounce)((t=>t.defaultTimeout))],Le.prototype,"onSelectionChange",null),r.D.prototype.controls.align={name:"left",tooltip:"Align",update(t){const e=t.j,s=t.control,i=e.s.current();if(i){const o=_.i.closest(i,_.i.isBlock,e.editor)||e.editor;let n=""+(0,c.css)(o,"text-align");s.defaultValue&&-1!==s.defaultValue.indexOf(n)&&(n="left"),s.data&&s.data.currentValue!==n&&s.list&&-1!==s.list.indexOf(n)&&(e.o.textIcons?t.state.text=n:t.state.icon.name=n,s.data.currentValue=n)}},isActive(t,e){const s=t.s.current();if(s&&e.defaultValue){const i=_.i.closest(s,_.i.isBlock,t.editor)||t.editor;return-1===e.defaultValue.indexOf(""+(0,c.css)(i,"text-align"))}return!1},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},r.D.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},r.D.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},r.D.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},r.D.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"};const ze=(t,e)=>{if(_.i.isNode(e)&&_.i.isElement(e))switch(_.i.each(e,(t=>{_.i.isHTMLElement(t)&&t.style.textAlign&&(t.style.textAlign="",t.style.cssText.trim().length||t.removeAttribute("style"))})),t.toLowerCase()){case"justifyfull":e.style.textAlign="justify";break;case"justifyright":e.style.textAlign="right";break;case"justifyleft":e.style.textAlign="left";break;case"justifycenter":e.style.textAlign="center"}};function Me(t){t.registerButton({name:"align",group:"indent"});const e=e=>(t.s.focus(),t.s.eachSelection((s=>{if(!s)return;let i=_.i.up(s,_.i.isBlock,t.editor);i||(i=_.i.wrapInline(s,t.o.enterBlock,t)),ze(e,i)})),!1);t.registerCommand("justifyfull",e),t.registerCommand("justifyright",e),t.registerCommand("justifyleft",e),t.registerCommand("justifycenter",e)}r.D.prototype.limitWords=!1,r.D.prototype.limitChars=!1,r.D.prototype.limitHTML=!1;class Pe extends H{afterInit(t){const{limitWords:e,limitChars:s}=t.o;if(t&&(e||s)){let e=null;t.e.off(".limit").on("beforePaste.limit",(()=>{e=t.observer.snapshot.make()})).on("keydown.limit keyup.limit beforeEnter.limit beforePaste.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",(()=>{if(this.shouldPreventInsertHTML()&&e)return t.observer.snapshot.restore(e),!1}))}}shouldPreventInsertHTML(t=null,e=""){if(t&&a.COMMAND_KEYS.includes(t.key))return!1;const{jodit:s}=this,{limitWords:i,limitChars:o}=s.o,n=this.splitWords(e||(s.o.limitHTML?s.value:s.text));return!(!i||i>n.length)||!!o&&n.join("").length>=o}checkPreventKeyPressOrPaste(t){if(this.shouldPreventInsertHTML(t))return!1}checkPreventChanging(t,e){const{jodit:s}=this,{limitWords:i,limitChars:o}=s.o,n=s.o.limitHTML?t:(0,c.stripTags)(t),r=this.splitWords(n);(i&&r.length>i||o&&r.join("").length>o)&&(s.value=e)}splitWords(t){return t.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),"").split((0,a.SPACE_REG_EXP)()).filter((t=>t.length))}beforeDestruct(t){t.e.off(".limit")}}(0,n.gn)([x.autobind],Pe.prototype,"checkPreventKeyPressOrPaste",null),(0,n.gn)([x.autobind],Pe.prototype,"checkPreventChanging",null);var De=s(43);r.D.prototype.link={formTemplate(t){const{openInNewTabCheckbox:e,noFollowCheckbox:s,modeClassName:i,selectSizeClassName:o,selectMultipleClassName:n,selectOptionsClassName:r}=t.o.link;return new De.x4(t,[new De.eC(t,[new De.u3(t,{name:"url",type:"text",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),new De.eC(t,[new De.u3(t,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),i?new De.eC(t,["input"===i?new De.u3(t,{name:"className",ref:"className_input",label:"Class name"}):"select"===i?new De.Cj(t,{name:"className",ref:"className_select",label:"Class name",size:o,multiple:n,options:r}):null]):null,e?new De.mA(t,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,s?new De.mA(t,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new De.eC(t,[new f.y3(t,{name:"unlink",status:"default",text:"Unlink"}),new f.y3(t,{name:"insert",type:"submit",status:"primary",text:"Insert"})],{align:"full"})])},followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,noFollowCheckbox:!0,openInNewTabCheckbox:!0,modeClassName:"input",selectMultipleClassName:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},r.D.prototype.controls.unlink={exec(t,e){const s=_.i.closest(e,"a",t.editor);s&&_.i.unwrap(s),t.setEditorValue(),t.e.fire("hidePopup")},tooltip:"Unlink"},r.D.prototype.controls.link={isActive(t){const e=t.s.current();return!(!e||!_.i.closest(e,"a",t.editor))},popup:(t,e,s,i)=>t.e.fire("generateLinkForm.link",e,i),tags:["a"],tooltip:"Insert link"};class Ne extends H{constructor(){super(...arguments),this.buttons=[{name:"link",group:"insert"}]}afterInit(t){t.o.link.followOnDblClick&&t.e.on("dblclick.link",this.onDblClickOnLink),t.o.link.processPastedLink&&t.e.on("processPaste.link",this.onProcessPasteLink),t.e.on("generateLinkForm.link",this.generateForm),t.registerCommand("openLinkDialog",{exec:()=>{const e=new R({resizable:!1}),s=this.generateForm(t.s.current(),(()=>{e.close()}));s.container.classList.add("jodit-dialog_alert"),e.setContent(s),e.open(),t.async.requestIdleCallback((()=>{const{url_input:t}=(0,c.refs)(s.container);null==t||t.focus()}))},hotkeys:t.o.link.hotkeys})}onDblClickOnLink(t){if(!_.i.isTag(t.target,"a"))return;const e=(0,c.attr)(t.target,"href");e&&(location.href=e,t.preventDefault())}onProcessPasteLink(t,e){const{jodit:s}=this;if((0,c.isURL)(e)){if(s.o.link.processVideoLink){const t=(0,c.convertMediaUrlToVideoEmbed)(e);if(t!==e)return s.e.stopPropagation("processPaste"),s.createInside.fromHTML(t)}const t=s.createInside.element("a");return t.setAttribute("href",e),t.textContent=e,s.e.stopPropagation("processPaste"),t}}generateForm(t,e){const{jodit:s}=this,i=s.i18n.bind(s),{openInNewTabCheckbox:o,noFollowCheckbox:n,formTemplate:r,formClassName:a,modeClassName:l}=s.o.link,h=r(s),d=(0,c.isString)(h)?s.c.fromHTML(h,{target_checkbox_box:o,nofollow_checkbox_box:n}):h,u=_.i.isElement(d)?d:d.container,p=(0,c.refs)(u),{insert:f,unlink:m,content_input_box:g}=p,{target_checkbox:v,nofollow_checkbox:b,url_input:w}=p,y=_.i.isImage(t);let{content_input:C}=p;const{className_input:j}=p,{className_select:x}=p;let E;C||(C=s.c.element("input",{type:"hidden",ref:"content_input"})),a&&u.classList.add(a),y&&_.i.hide(g);const S=()=>E?E.innerText:(0,c.stripTags)(s.s.range.cloneContents(),s.ed);if(E=!(!t||!_.i.closest(t,"a",s.editor))&&_.i.closest(t,"a",s.editor),!y&&t&&(C.value=S()),E){if(w.value=(0,c.attr)(E,"href")||"",l)switch(l){case"input":j&&(j.value=(0,c.attr)(E,"class")||"");break;case"select":if(x){for(let t=0;x.selectedOptions.length>t;t++){const e=x.options.item(t);e&&(e.selected=!1)}((0,c.attr)(E,"class")||"").split(" ").forEach((t=>{if(t)for(let e=0;x.options.length>e;e++){const s=x.options.item(e);(null==s?void 0:s.value)&&s.value===t&&(s.selected=!0)}}))}}o&&v&&(v.checked="_blank"===(0,c.attr)(E,"target")),n&&b&&(b.checked="nofollow"===(0,c.attr)(E,"rel")),f.textContent=i("Update")}else _.i.hide(m);s.editor.normalize();const k=s.observer.snapshot.make();m&&s.e.on(m,"click",(t=>{s.s.restore(),s.observer.snapshot.restore(k),E&&_.i.unwrap(E),s.setEditorValue(),e(),t.preventDefault()}));const T=()=>{if(!w.value.trim().length)return w.focus(),w.classList.add("jodit_error"),!1;let t;s.s.restore(),s.s.removeMarkers(),s.editor.normalize(),s.observer.snapshot.restore(k);const i=S()!==C.value.trim(),r=s.createInside;if(E)t=[E];else{if(s.s.isCollapsed()){const e=r.element("a");s.s.insertNode(e,!1,!1),t=[e]}else{const e=s.s.current();t=_.i.isTag(e,["img"])?[_.i.wrap(e,"a",r)]:s.s.wrapInTag("a")}t.forEach((t=>s.s.select(t)))}return t.forEach((t=>{var e;if((0,c.attr)(t,"href",w.value),l&&(null!=j?j:x))if("input"===l)""===j.value&&t.hasAttribute("class")&&(0,c.attr)(t,"class",null),""!==j.value&&(0,c.attr)(t,"class",j.value);else if("select"===l){t.hasAttribute("class")&&(0,c.attr)(t,"class",null);for(let s=0;x.selectedOptions.length>s;s++){const i=null===(e=x.selectedOptions.item(s))||void 0===e?void 0:e.value;i&&t.classList.add(i)}}if(!y){let e=t.textContent;C.value.trim().length?i&&(e=C.value):e=w.value,e!==t.textContent&&(t.textContent=e)}o&&v&&(0,c.attr)(t,"target",v.checked?"_blank":null),n&&b&&(0,c.attr)(t,"rel",b.checked?"nofollow":null)})),s.setEditorValue(),e(),!1};return _.i.isElement(d)?s.e.on(d,"submit",(t=>(t.preventDefault(),t.stopImmediatePropagation(),T(),!1))):d.onSubmit(T),d}beforeDestruct(t){t.e.off("generateLinkForm.link",this.generateForm).off("dblclick.link",this.onDblClickOnLink).off("processPaste.link",this.onProcessPasteLink)}}function Re(t){const e="jodit_fake_wrapper",{mediaFakeTag:s,mediaBlocks:i,mediaInFakeBlock:o}=t.options;o&&t.e.on("afterGetValueFromEditor",(t=>{const i=RegExp(`<${s}[^>]+data-${e}[^>]+>(.+?)</${s}>`,"ig");i.test(t.value)&&(t.value=t.value.replace(i,"$1"))})).on("change afterInit afterSetMode changePlace",t.async.debounce((()=>{t.isDestructed||t.getMode()===a.MODE_SOURCE||(0,c.$$)(i.join(","),t.editor).forEach((i=>{(0,c.dataBind)(i,e)||((0,c.dataBind)(i,e,!0),(i=>{if(i.parentNode&&(0,c.attr)(i.parentNode,"data-jodit_iframe_wrapper"))i=i.parentNode;else{const o=t.createInside.fromHTML(`<${s} data-jodit-temp="1" contenteditable="false" draggable="true" data-${e}="1"></${s}>`);(0,c.attr)(o,"style",(0,c.attr)(i,"style")),o.style.display="inline-block"===i.style.display?"inline-block":"block",o.style.width=i.offsetWidth+"px",o.style.height=i.offsetHeight+"px",i.parentNode&&i.parentNode.insertBefore(o,i),o.appendChild(i),i=o}t.e.off(i,"mousedown.select touchstart.select").on(i,"mousedown.select touchstart.select",(()=>{t.s.setCursorAfter(i)}))})(i))}))}),t.defaultTimeout))}function Ae(t){t.registerButton({name:"video",group:"media"})}function Be(t){t.registerButton({name:"file",group:"media"})}function Oe(t){let e=0,s=(0,c.splitArray)(t.o.buttons);t.o.mobileTapTimeout&&t.e.on("touchend",(s=>{if(s.changedTouches&&s.changedTouches.length){const i=(new Date).getTime(),o=i-e;o>t.o.mobileTapTimeout&&(e=i,1.5*t.o.mobileTapTimeout>o&&t.s.insertCursorAtPoint(s.changedTouches[0].clientX,s.changedTouches[0].clientY))}})),t.e.on("getDiffButtons.mobile",(e=>{if(e===t.toolbar){const e=(0,c.splitArray)(t.o.buttons),i=(0,D.q)(s);return e.reduce(((t,e)=>((0,D.A)(e)?t.push({...e,buttons:e.buttons.filter((t=>!i.has(t)))}):i.has(e)||t.push(e),t)),[])}})),t.o.toolbarAdaptive&&t.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",(()=>{if(!t.o.toolbar)return;const e=t.container.offsetWidth,i=(0,c.splitArray)(t.o.sizeLG>e?t.o.sizeMD>e?t.o.sizeSM>e?t.o.buttonsXS:t.o.buttonsSM:t.o.buttonsMD:t.o.buttons);""+i!=""+s&&(s=i,t.e.fire("closeAllPopups"),t.toolbar.setRemoveButtons(t.o.removeButtons).build(s.concat(t.o.extraButtons)))})).on(t.ow,"load",(()=>t.e.fire("recalcAdaptive")))}(0,n.gn)([x.autobind],Ne.prototype,"onDblClickOnLink",null),(0,n.gn)([x.autobind],Ne.prototype,"onProcessPasteLink",null),(0,n.gn)([x.autobind],Ne.prototype,"generateForm",null),r.D.prototype.mediaFakeTag="jodit-media",r.D.prototype.mediaInFakeBlock=!0,r.D.prototype.mediaBlocks=["video","audio"],r.D.prototype.controls.video={popup(t,e,s,i){const o=new De.x4(t,[new De.eC(t,[new De.u3(t,{name:"url",required:!0,label:"URL",placeholder:"https://",validators:["url"]})]),new De.eC(t,[(0,f.zx)(t,"","Insert","primary").onAction((()=>o.submit()))])]),n=new De.x4(t,[new De.eC(t,[new De.GJ(t,{name:"code",required:!0,label:"Embed code"})]),new De.eC(t,[(0,f.zx)(t,"","Insert","primary").onAction((()=>n.submit()))])]),r=[],a=e=>{t.s.restore(),t.s.insertHTML(e),i()};return t.s.save(),r.push({icon:"link",name:"Link",content:o.container},{icon:"source",name:"Code",content:n.container}),o.onSubmit((t=>{a((0,c.convertMediaUrlToVideoEmbed)(t.url))})),n.onSubmit((t=>{a(t.code)})),(0,re.IL)(t,r)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"},r.D.prototype.controls.file={popup(t,e,s,i){const o=(e,s="")=>{t.s.insertNode(t.createInside.fromHTML(`<a href="${e}" title="${s}">${s||e}</a>`))};let n=null;return e&&(_.i.isTag(e,"a")||_.i.closest(e,"a",t.editor))&&(n=_.i.isTag(e,"a")?e:_.i.closest(e,"a",t.editor)),(0,re.ov)(t,{filebrowser(t){t.files&&t.files.forEach((e=>o(t.baseurl+e))),i()},upload:!0,url(t,e){n?(n.setAttribute("href",t),n.setAttribute("title",e)):o(t,e),i()}},n,i,!1)},tags:["a"],tooltip:"Insert file"},r.D.prototype.mobileTapTimeout=300,r.D.prototype.toolbarAdaptive=!0,r.D.prototype.controls.dots={mode:a.MODE_SOURCE+a.MODE_WYSIWYG,popup(t,e,s,i,o){let n=s.data;return void 0===n&&(n={toolbar:M(t),rebuild(){var e;if(o){const s=t.e.fire("getDiffButtons.mobile",o.closest(k.bz));if(s&&n){n.toolbar.build((0,c.splitArray)(s));const i=(null===(e=t.toolbar.firstButton)||void 0===e?void 0:e.container.offsetWidth)||36;n.toolbar.container.style.width=3*(i+4)+"px"}}}},s.data=n),n.rebuild(),n.toolbar},tooltip:"Show all"};const He=(t,e,{control:s})=>{const i="button"+s.command,o=s.args&&s.args[0]||(0,c.dataBind)(t,i);(0,c.dataBind)(t,i,o),t.execCommand(s.command,!1,o)};function Fe(t){const e=t=>/insert(un)?orderedlist/i.test(t),s=()=>_.i.up(t.s.current(),(t=>t&&/^UL|OL$/i.test(t.nodeName)),t.editor),i=(t,e)=>{"default"!==e&&e?t.style.setProperty("list-style-type",e):t.style.removeProperty("list-style-type")};t.e.on("beforeCommand",((t,o,n)=>{if(e(t)&&n){const e=s();if(e&&!((t,e)=>{const s=t.style.listStyleType;return s===e||!s&&"default"===e})(e,n)&&(_.i.isTag(e,"ul")&&/unordered/i.test(t)||_.i.isTag(e,"ol")&&!/unordered/i.test(t)))return i(e,n),!1}})).on("afterCommand",((o,n,r)=>{if(e(o)){const e=s();e&&(i(e,r),t.createInside.applyCreateAttributes(e),e.querySelectorAll("li").forEach((e=>{t.createInside.applyCreateAttributes(e)})));const o=[],n=t=>{_.i.isTag(t,["p","h1","h2","h3","h4","h5","h6"])&&o.push(t)};e&&(n(e.parentNode),e.querySelectorAll("li").forEach((t=>n(t.firstChild))),o.length&&(t.s.save(),(0,c.toArray)(e.childNodes).forEach((t=>{_.i.isTag(t.lastChild,"br")&&_.i.safeRemove(t.lastChild)})),o.forEach((t=>_.i.unwrap(t))),t.s.restore())),t.setEditorValue()}}))}r.D.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:He},r.D.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},exec:He},r.D.prototype.showPlaceholder=!0,r.D.prototype.useInputsPlaceholder=!0,r.D.prototype.placeholder="Type something";class $e extends H{constructor(){super(...arguments),this.addNativeListeners=()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)},this.addEvents=()=>{const t=this.j;t.o.useInputsPlaceholder&&t.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,c.attr)(t.element,"placeholder")||""),t.e.fire("placeholder",this.placeholderElm.innerHTML),t.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()}}afterInit(t){t.o.showPlaceholder&&(this.placeholderElm=t.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${t.i18n(t.o.placeholder)}</span>`),"rtl"===t.o.direction&&(this.placeholderElm.style.right="0px",this.placeholderElm.style.direction="rtl"),t.e.on("readonly",(t=>{t?this.hide():this.toggle()})).on("changePlace",this.addEvents),this.addEvents())}show(){const t=this.j;if(t.o.readonly)return;let e=0,s=0;const i=t.s.current(),o=i&&_.i.closest(i,_.i.isBlock,t.editor)||t.editor,n=t.ew.getComputedStyle(o);if(t.workplace.appendChild(this.placeholderElm),_.i.isElement(t.editor.firstChild)){const i=t.ew.getComputedStyle(t.editor.firstChild);e=parseInt(i.getPropertyValue("margin-top"),10),s=parseInt(i.getPropertyValue("margin-left"),10),this.placeholderElm.style.fontSize=parseInt(i.getPropertyValue("font-size"),10)+"px",this.placeholderElm.style.lineHeight=i.getPropertyValue("line-height")}else this.placeholderElm.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",this.placeholderElm.style.lineHeight=n.getPropertyValue("line-height");(0,c.css)(this.placeholderElm,{display:"block",textAlign:n.getPropertyValue("text-align"),marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),e),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),s)})}hide(){_.i.safeRemove(this.placeholderElm)}toggle(){const t=this.j;t.editor&&!t.isInDestruct&&(t.getRealMode()===a.MODE_WYSIWYG&&(t=>{if(!t.firstChild)return!0;const e=t.firstChild;if(a.MAY_BE_REMOVED_WITH_KEY.test(e.nodeName)||/^(TABLE)$/i.test(e.nodeName))return!1;const s=_.i.next(e,(t=>t&&!_.i.isEmptyTextNode(t)),t);return _.i.isText(e)&&!s?_.i.isEmptyTextNode(e):!s&&_.i.each(e,(t=>!_.i.isTag(t,["ul","li","ol"])&&(_.i.isEmpty(t)||_.i.isTag(t,"br"))))})(t.editor)?this.show():this.hide())}beforeDestruct(t){this.hide(),t.e.off(".placeholder").off(window,"load",this.toggle)}}(0,n.gn)([(0,x.debounce)((t=>t.defaultTimeout/10),!0)],$e.prototype,"toggle",null),r.D.prototype.controls.redo={mode:a.MODE_SPLIT,isDisabled:t=>!t.observer.stack.canRedo(),tooltip:"Redo"},r.D.prototype.controls.undo={mode:a.MODE_SPLIT,isDisabled:t=>!t.observer.stack.canUndo(),tooltip:"Undo"};class We extends H{constructor(){super(...arguments),this.buttons=[{name:"undo",group:"history"},{name:"redo",group:"history"}]}beforeDestruct(){}afterInit(t){const e=e=>(t.observer[e](),!1);t.registerCommand("redo",{exec:e,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),t.registerCommand("undo",{exec:e,hotkeys:["ctrl+z","cmd+z"]})}}r.D.prototype.allowResizeTags=["img","iframe","table","jodit"],r.D.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10};const Ve="__jodit-resizer_binded";class Ye extends H{constructor(){super(...arguments),this.LOCK_KEY="resizer",this.element=null,this.isResized=!1,this.isShown=!1,this.start_x=0,this.start_y=0,this.width=0,this.height=0,this.ratio=0,this.rect=this.j.c.fromHTML('<div class="jodit-resizer">\n\t\t\t\t<i class="jodit-resizer-topleft"></i>\n\t\t\t\t<i class="jodit-resizer-topright"></i>\n\t\t\t\t<i class="jodit-resizer-bottomright"></i>\n\t\t\t\t<i class="jodit-resizer-bottomleft"></i>\n\t\t\t\t<span>100x100</span>\n\t\t\t</div>'),this.sizeViewer=this.rect.getElementsByTagName("span")[0],this.onResize=t=>{if(this.isResized){if(!this.element)return;let e,s;if(this.j.options.iframe){const i=this.getWorkplacePosition();e=t.clientX+i.left-this.start_x,s=t.clientY+i.top-this.start_y}else e=t.clientX-this.start_x,s=t.clientY-this.start_y;const i=this.handle.className;let o=0,n=0;_.i.isTag(this.element,"img")?(e?(o=this.width+(i.match(/left/)?-1:1)*e,n=Math.round(o/this.ratio)):(n=this.height+(i.match(/top/)?-1:1)*s,o=Math.round(n*this.ratio)),o>(0,c.innerWidth)(this.j.editor,this.j.ow)&&(o=(0,c.innerWidth)(this.j.editor,this.j.ow),n=Math.round(o/this.ratio))):(o=this.width+(i.match(/left/)?-1:1)*e,n=this.height+(i.match(/top/)?-1:1)*s),o>this.j.o.resizer.min_width&&this.applySize(this.element,"width",this.rect.parentNode.offsetWidth>o?o:"100%"),n>this.j.o.resizer.min_height&&this.applySize(this.element,"height",n),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),t.stopImmediatePropagation()}},this.onClickOutside=t=>{this.isShown&&(this.isResized?(this.j.unlock(),this.isResized=!1,this.j.setEditorValue(),t.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove.resizer touchmove.resizer",this.onResize)):this.hide())},this.onClickElement=t=>{this.isResized||this.element===t&&this.isShown||(this.element=t,this.show(),_.i.isTag(this.element,"img")&&!this.element.complete&&this.j.e.on(this.element,"load",this.updateSize))},this.updateSize=()=>{if(!this.isInDestruct&&this.isShown&&this.element&&this.rect){const t=this.getWorkplacePosition(),e=(0,c.offset)(this.element,this.j,this.j.ed),s=parseInt(this.rect.style.left||"0",10),i=this.rect.offsetWidth,o=this.rect.offsetHeight,n=e.top-1-t.top,r=e.left-1-t.left;parseInt(this.rect.style.top||"0",10)===n&&s===r&&i===this.element.offsetWidth&&o===this.element.offsetHeight||((0,c.css)(this.rect,{top:n,left:r,width:this.element.offsetWidth,height:this.element.offsetHeight}),this.j.events&&(this.j.e.fire(this.element,"changesize"),isNaN(s)||this.j.e.fire("resize")))}},this.hideSizeViewer=()=>{this.sizeViewer.style.opacity="0"}}afterInit(t){(0,c.$$)("i",this.rect).forEach((e=>{t.e.on(e,"mousedown.resizer touchstart.resizer",this.onClickHandle.bind(this,e))})),j.TB.on("hideHelpers",this.hide),t.e.on("readonly",(t=>{t&&this.hide()})).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",(t=>{const e=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;e.test(t.value)&&(t.value=t.value.replace(e,"$1"))})).on("hideResizer",this.hide).on("change afterInit afterSetMode",this.onChangeEditor),this.addEventListeners(),this.onChangeEditor()}onEditorClick(t){let e=t.target;const{editor:s,options:{allowResizeTags:i}}=this.j;for(;e&&e!==s;){if(_.i.isTag(e,i))return this.bind(e),void this.onClickElement(e);e=e.parentNode}}addEventListeners(){const t=this.j;t.e.off(t.editor,".resizer").off(t.ow,".resizer").on(t.editor,"keydown.resizer",(t=>{this.isShown&&t.key===a.KEY_DELETE&&this.element&&!_.i.isTag(this.element,"table")&&this.onDelete(t)})).on(t.ow,"resize.resizer",this.updateSize).on(t.ow,"mouseup.resizer keydown.resizer touchend.resizer",this.onClickOutside).on([t.ow,t.editor],"scroll.resizer",(()=>{this.isShown&&!this.isResized&&this.hide()}))}onClickHandle(t,e){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=t,e.preventDefault(),e.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResized=!0,this.start_x=e.clientX,this.start_y=e.clientY,this.j.e.fire("hidePopup"),this.j.lock(this.LOCK_KEY),this.j.e.on(this.j.ow,"mousemove.resizer touchmove.resizer",this.onResize)}getWorkplacePosition(){return(0,c.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(t,e,s){_.i.isImage(t)&&this.j.o.resizer.forImageChangeAttributes?(0,c.attr)(t,e,s):(0,c.css)(t,e,s)}onDelete(t){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(_.i.safeRemove(this.element),this.hide(),t.preventDefault()))}onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,c.$$)("iframe",this.j.editor).forEach(this.bind)}bind(t){if(t[Ve])return;let e;if(t[Ve]=!0,_.i.isTag(t,"iframe")){const s=t;(0,c.attr)(t.parentNode,"-jodit_iframe_wrapper")?t=t.parentNode:(e=this.j.createInside.fromHTML('<jodit data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_iframe_wrapper="1"></jodit>'),(0,c.attr)(e,"style",(0,c.attr)(t,"style")),(0,c.css)(e,{display:"inline-block"===t.style.display?"inline-block":"block",width:t.offsetWidth,height:t.offsetHeight}),t.parentNode&&t.parentNode.insertBefore(e,t),e.appendChild(t),t=e),this.j.e.off(t,"mousedown.select touchstart.select").on(t,"mousedown.select touchstart.select",(()=>{this.j.s.select(t)})).off(t,"changesize").on(t,"changesize",(()=>{s.setAttribute("width",t.offsetWidth+"px"),s.setAttribute("height",t.offsetHeight+"px")}))}this.j.e.on(t,"dragstart",this.hide)}showSizeViewer(t,e){this.j.o.resizer.showSize&&(this.sizeViewer.offsetWidth>t||this.sizeViewer.offsetHeight>e?this.hideSizeViewer():(this.sizeViewer.style.opacity="1",this.sizeViewer.textContent=`${t} x ${e}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})))}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,c.markOwner)(this.j,this.rect),this.j.workplace.appendChild(this.rect)),this.j.isFullSize&&(this.rect.style.zIndex=""+(0,c.css)(this.j.container,"zIndex")),this.updateSize())}hide(){this.isResized||(this.isResized=!1,this.isShown=!1,this.element=null,_.i.safeRemove(this.rect))}beforeDestruct(t){this.hide(),j.TB.off("hideHelpers",this.hide),t.e.off(this.j.ow,".resizer").off(".resizer")}}(0,n.gn)([(0,x.watch)(":click")],Ye.prototype,"onEditorClick",null),(0,n.gn)([(0,x.debounce)()],Ye.prototype,"onChangeEditor",null),(0,n.gn)([x.autobind],Ye.prototype,"bind",null),(0,n.gn)([x.autobind],Ye.prototype,"hide",null),r.D.prototype.useSearch=!0,r.D.prototype.controls.find={tooltip:"Find",icon:"search",exec(t,e,{control:s}){switch(s.args&&s.args[0]){case"findPrevious":t.e.fire("searchPrevious");break;case"findNext":t.e.fire("searchNext");break;case"replace":t.execCommand("openReplaceDialog");break;default:t.execCommand("openSearchDialog")}},list:{search:"Find",findNext:"Find Next",findPrevious:"Find Previous",replace:"Replace"},childTemplate:(t,e,s)=>s};class Ue extends H{constructor(){super(...arguments),this.buttons=[{name:"find",group:"search"}],this.template=`<div class="jodit-search">\n\t\t\t<div class="jodit-search__box">\n\t\t\t\t<div class="jodit-search__inputs">\n\t\t\t\t\t<input data-ref="query" tabindex="0" placeholder="${this.j.i18n("Search for")}" type="text"/>\n\t\t\t\t\t<input data-ref="replace" tabindex="0" placeholder="${this.j.i18n("Replace with")}" type="text"/>\n\t\t\t\t</div>\n\t\t\t\t<div class="jodit-search__counts">\n\t\t\t\t\t<span data-ref="counter-box">0/0</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="jodit-search__buttons">\n\t\t\t\t\t<button data-ref="next" tabindex="0" type="button">${k.JO.get("angle-down")}</button>\n\t\t\t\t\t<button data-ref="prev" tabindex="0" type="button">${k.JO.get("angle-up")}</button>\n\t\t\t\t\t<button data-ref="cancel" tabindex="0" type="button">${k.JO.get("cancel")}</button>\n\t\t\t\t\t<button data-ref="replace-btn" tabindex="0" type="button" class="jodit-ui-button">${this.j.i18n("Replace")}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`,this.isOpened=!1,this.selInfo=null,this.current=null,this.eachMap=(t,e,s)=>{_.i.findWithCurrent(t,(t=>!(!t||!e(t))),this.j.editor,s?"nextSibling":"previousSibling",s?"firstChild":"lastChild")},this.updateCounters=()=>{if(!this.isOpened)return;this.counterBox.style.display=this.queryInput.value.length?"inline-block":"none";const t=this.calcCounts(this.queryInput.value,this.j.s.range);this.counterBox.textContent=t.join("/")},this.calcCounts=(t,e=!1)=>{const s=[];let i=0,o=0,n=!1,r=this.j.editor.firstChild;for(;r&&t.length;)if(n=this.find(r,t,!0,0,n||this.j.ed.createRange()),n){if(this.boundAlreadyWas(n,s))break;s.push(n),r=n.startContainer,o+=1,e&&this.boundAlreadyWas(e,[n])&&(i=o)}else r=null;return[i,o]},this.findAndReplace=(t,e)=>{const s=this.find(t,e,!0,0,this.j.s.range);if(s&&s.startContainer&&s.endContainer){const t=this.j.ed.createRange();try{if(s&&s.startContainer&&s.endContainer){t.setStart(s.startContainer,s.startOffset),t.setEnd(s.endContainer,s.endOffset),t.deleteContents();const e=this.j.createInside.text(this.replaceInput.value);t.insertNode(e),this.j.s.select(e),this.tryScrollToElement(e)}}catch(t){}return!0}return!1},this.findAndSelect=(t,e,s)=>{const i=this.find(t,e,s,0,this.j.s.range);if(i&&i.startContainer&&i.endContainer){const t=this.j.ed.createRange();try{t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),this.j.s.selectRange(t)}catch(t){}return this.tryScrollToElement(i.startContainer),this.current=i.startContainer,this.updateCounters(),!0}return!1},this.find=(t,e,s,i,o)=>{if(t&&e.length){let n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null};if(this.eachMap(t,(t=>{if(_.i.isText(t)&&null!=t.nodeValue&&t.nodeValue.length){let a=t.nodeValue;s||t!==o.startContainer?s&&t===o.endContainer&&(a=i?a.substr(0,o.startOffset):a.substr(o.endOffset)):a=i?a.substr(o.endOffset):a.substr(0,o.startOffset);const l=s?n+a:a+n,h=Ue.findSomePartOfString(e,l,s);if(!1!==h){let o=Ue.findSomePartOfString(e,a,s);!0===o?o=(0,c.trim)(e):!1===o&&(o=Ue.findSomePartOfString(a,e,s),!0===o&&(o=(0,c.trim)(a)));let d=Ue.getSomePartOfStringIndex(e,a,s)||0;if((s&&!i||!s&&i)&&t.nodeValue.length-a.length>0&&(d+=t.nodeValue.length-a.length),null==r.startContainer&&(r.startContainer=t,r.startOffset=d),!0===h)return r.endContainer=t,r.endOffset=d,r.endOffset+=o.length,!0;n=l}else n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null}}else _.i.isBlock(t)&&""!==n&&(n=s?n+" ":" "+n);return!1}),s),r.startContainer&&r.endContainer)return r;if(!i)return this.current=s?this.j.editor.firstChild:this.j.editor.lastChild,this.find(this.current,e,s,i+1,o)}return!1},this.open=(t=!1)=>{this.isOpened||(this.searchBox.classList.add("jodit-search_active"),this.isOpened=!0),this.calcSticky(this.j.e.fire("getStickyState.sticky")||!1),this.j.e.fire("hidePopup"),this.searchBox.classList.toggle("jodit-search_replace",t),this.current=this.j.s.current();const e=""+(this.j.s.sel||"");e&&(this.queryInput.value=e),this.updateCounters(),e?this.queryInput.select():this.queryInput.focus()},this.close=()=>{this.isOpened&&(this.j.s.restore(),this.searchBox.classList.remove("jodit-search_active"),this.isOpened=!1)}}static getSomePartOfStringIndex(t,e,s=!0){return this.findSomePartOfString(t,e,s,!0)}static findSomePartOfString(t,e,s=!0,i=!1){t=(0,c.trim)(t.toLowerCase().replace(a.SPACE_REG_EXP()," ")),e=e.toLowerCase();let o=s?0:e.length-1,n=s?0:t.length-1,r=0,l=null;const h=s?1:-1,d=[];for(;void 0!==e[o];o+=h){const c=t[n]===e[o];if(c||null!=l&&a.SPACE_REG_EXP().test(e[o])?(null!=l&&s||(l=o),d.push(e[o]),c&&(r+=1,n+=h)):(l=null,d.length=0,r=0,n=s?0:t.length-1),r===t.length)return!i||l}return i?null!=l&&l:!!d.length&&(s?d.join(""):d.reverse().join(""))}boundAlreadyWas(t,e){return e.some((e=>e.startContainer===t.startContainer&&e.endContainer===t.endContainer&&e.startOffset===t.startOffset&&e.endOffset===t.endOffset),!1)}tryScrollToElement(t){let e=_.i.closest(t,_.i.isElement,this.j.editor);e||(e=_.i.prev(t,_.i.isElement,this.j.editor)),e&&e!==this.j.editor&&e.scrollIntoView()}afterInit(t){if(t.o.useSearch){const e=this;e.searchBox=t.c.fromHTML(e.template);const{query:s,replace:i,cancel:o,next:n,prev:r,replaceBtn:l,counterBox:h}=(0,c.refs)(e.searchBox);e.queryInput=s,e.replaceInput=i,e.closeButton=o,e.nextButton=n,e.prevButton=r,e.replaceButton=l,e.counterBox=h;const d=()=>{t.workplace.appendChild(this.searchBox),t.e.off(this.j.container,"keydown.search").on(this.j.container,"keydown.search",(s=>{if(t.getRealMode()===a.MODE_WYSIWYG)switch(s.key){case a.KEY_ESC:this.close();break;case a.KEY_F3:e.queryInput.value&&(t.e.fire(s.shiftKey?"searchPrevious":"searchNext"),s.preventDefault())}}))};d(),t.e.on("changePlace",d).on(e.closeButton,"click",this.close).on(e.queryInput,"mousedown",(()=>{t.s.isFocused()&&(t.s.removeMarkers(),e.selInfo=t.s.save())})).on(e.replaceButton,"click",(s=>{e.findAndReplace(t.s.current()||t.editor.firstChild,e.queryInput.value),this.updateCounters(),s.preventDefault(),s.stopImmediatePropagation()})).on([e.nextButton,e.prevButton],"click",(function(s){t.e.fire(e.nextButton===this?"searchNext":"searchPrevious"),s.preventDefault(),s.stopImmediatePropagation()})).on(this.queryInput,"keydown",this.j.async.debounce((e=>{e.key===a.KEY_ENTER?(e.preventDefault(),e.stopImmediatePropagation(),t.e.fire("searchNext")&&this.close()):this.updateCounters()}),this.j.defaultTimeout)).on("beforeSetMode.search",(()=>{this.close()})).on("keydown.search mousedown.search",(()=>{this.selInfo&&(t.s.removeMarkers(),this.selInfo=null),this.isOpened&&(this.current=this.j.s.current(),this.updateCounters())})).on("searchNext.search searchPrevious.search",(()=>e.isOpened?e.findAndSelect(t.s.current()||t.editor.firstChild,e.queryInput.value,"searchNext"===t.e.current):e.open())).on("search.search",((e,s=!0)=>{t.execCommand("search",e,s)})).on("toggleSticky.search",this.calcSticky),t.registerCommand("search",{exec:(s,i,o=!0)=>(e.findAndSelect(t.s.current()||t.editor.firstChild,i||"",o),!1)}).registerCommand("openSearchDialog",{exec:()=>(e.open(),!1),hotkeys:["ctrl+f","cmd+f"]}).registerCommand("openReplaceDialog",{exec:()=>(t.o.readonly||e.open(!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(t){var e;_.i.safeRemove(this.searchBox),null===(e=t.events)||void 0===e||e.off(".search")}calcSticky(t){if(this.isOpened)if(this.searchBox.classList.toggle("jodit-search_sticky",t),t){const t=(0,c.position)(this.j.toolbarContainer);(0,c.css)(this.searchBox,{top:t.top+t.height,left:t.left+t.width})}else(0,c.css)(this.searchBox,{top:null,left:null})}}(0,n.gn)([x.autobind],Ue.prototype,"calcSticky",null);class Ge extends H{constructor(){super(...arguments),this.proxyEventsList=["click","mousedown","touchstart","mouseup","touchend"]}afterInit(t){this.proxyEventsList.forEach((e=>{t.e.on(e+".select",this.onStartSelection)}))}beforeDestruct(t){this.proxyEventsList.forEach((e=>{t.e.on(e+".select",this.onStartSelection)}))}onStartSelection(t){const{j:e}=this;let s,i=t.target;for(;void 0===s&&i&&i!==e.editor;)s=e.e.fire((0,c.camelCase)(t.type+"_"+i.nodeName.toLowerCase()),i,t),i=i.parentElement;"click"===t.type&&void 0===s&&i===e.editor&&e.e.fire(t.type+"Editor",i,t)}onOutsideClick(t){const e=t.target;_.i.up(e,(t=>t===this.j.editor))||k.u1.closestElement(e,k.GI)||this.j.e.fire("outsideClick",t)}}(0,n.gn)([x.autobind],Ge.prototype,"onStartSelection",null),(0,n.gn)([(0,x.watch)("ow:click")],Ge.prototype,"onOutsideClick",null),r.D.prototype.width="auto",r.D.prototype.minWidth=200,r.D.prototype.maxWidth="100%",r.D.prototype.allowResizeX=!1,r.D.prototype.allowResizeY=!0,r.D.prototype.height="auto",r.D.prototype.minHeight=200,r.D.prototype.maxHeight="auto",r.D.prototype.saveHeightInStorage=!1;let Ke=class extends H{constructor(){super(...arguments),this.isResized=!1,this.start={x:0,y:0,w:0,h:0},this.handle=this.j.c.div("jodit-editor__resize",'<span tabindex="-1"></span>')}afterInit(t){const{height:e,width:s,allowResizeX:i}=t.o;let{allowResizeY:o}=t.o;"auto"===e&&"auto"!==s&&(o=!1),"auto"===e&&"auto"===s||!i&&!o||(t.e.on("toggleFullSize.resizeHandler",(()=>{this.handle.style.display=t.isFullSize?"none":"block"})).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(t.ow,"mouseup touchend",this.onHandleResizeEnd),t.container.appendChild(this.handle))}onHandleResizeStart(t){this.isResized=!0,this.start.x=t.clientX,this.start.y=t.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),t.preventDefault()}onHandleResize(t){this.isResized&&(this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+t.clientY-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t.clientX-this.start.x),this.j.e.fire("resize"))}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(t){_.i.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}};Ke.requires=["size"],Ke=(0,n.gn)([x.autobind],Ke);let Xe=class extends H{constructor(){super(...arguments),this.resizeWorkspaces=this.j.async.debounce(this.resizeWorkspaceImd,this.j.defaultTimeout,!0)}afterInit(t){t.e.on("setHeight.size",this.setHeight).on("setWidth.size",this.setWidth).on("afterInit.size changePlace.size",this.initialize,void 0,!0).on(t.ow,"load.size",this.resizeWorkspaces).on("afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size toggleFullSize.size",this.resizeWorkspaces),this.initialize()}initialize(){const{j:t}=this;if(t.o.inline)return;let{height:e}=t.o;if(t.o.saveHeightInStorage&&"auto"!==e){const s=t.storage.get("height");s&&(e=s)}(0,c.css)(t.editor,{minHeight:"100%"}),(0,c.css)(t.container,{minHeight:t.o.minHeight,maxHeight:t.o.maxHeight,minWidth:t.o.minWidth,maxWidth:t.o.maxWidth}),this.setHeight(e),this.setWidth(t.o.width)}setHeight(t){if((0,c.isNumber)(t)){const{minHeight:e,maxHeight:s}=this.j.o;(0,c.isNumber)(e)&&e>t&&(t=e),(0,c.isNumber)(s)&&t>s&&(t=s)}(0,c.css)(this.j.container,"height",t),this.j.o.saveHeightInStorage&&this.j.storage.set("height",t),this.resizeWorkspaceImd()}setWidth(t){if((0,c.isNumber)(t)){const{minWidth:e,maxWidth:s}=this.j.o;(0,c.isNumber)(e)&&e>t&&(t=e),(0,c.isNumber)(s)&&t>s&&(t=s)}(0,c.css)(this.j.container,"width",t),this.resizeWorkspaceImd()}getNotWorkHeight(){var t,e;return((null===(t=this.j.toolbarContainer)||void 0===t?void 0:t.offsetHeight)||0)+((null===(e=this.j.statusbar)||void 0===e?void 0:e.getHeight())||0)+2}resizeWorkspaceImd(){if(!this.j||this.j.isDestructed||!this.j.o||this.j.o.inline)return;if(!this.j.container||!this.j.container.parentNode)return;const t=((0,c.css)(this.j.container,"minHeight")||0)-this.getNotWorkHeight();if((0,c.isNumber)(t)&&t>0&&([this.j.workplace,this.j.iframe,this.j.editor].map((e=>{e&&(0,c.css)(e,"minHeight",t)})),this.j.e.fire("setMinHeight",t)),(0,c.isNumber)(this.j.o.maxHeight)){const t=this.j.o.maxHeight-this.getNotWorkHeight();[this.j.workplace,this.j.iframe,this.j.editor].map((e=>{e&&(0,c.css)(e,"maxHeight",t)})),this.j.e.fire("setMaxHeight",t)}this.j.container&&(0,c.css)(this.j.workplace,"height","auto"!==this.j.o.height||this.j.isFullSize?this.j.container.offsetHeight-this.getNotWorkHeight():"auto")}beforeDestruct(t){this.j.e.off(this.j.ow,"load.size",this.resizeWorkspaces).off(".size")}};Xe=(0,n.gn)([x.autobind],Xe),r.D.prototype.beautifyHTML=!a.IS_IE,r.D.prototype.sourceEditor="ace",r.D.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},r.D.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js"],r.D.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.0/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.0/beautify-html.min.js"],r.D.prototype.controls.source={mode:a.MODE_SPLIT,exec(t){t.toggleMode()},isActive:t=>t.getRealMode()===a.MODE_SOURCE,tooltip:"Change mode"};class Je{constructor(t,e,s,i){this.jodit=t,this.container=e,this.toWYSIWYG=s,this.fromWYSIWYG=i,this.className="",this.isReady=!1}get j(){return this.jodit}onReady(){this.replaceUndoManager(),this.isReady=!0,this.j.e.fire(this,"ready")}onReadyAlways(t){var e;this.isReady?t():null===(e=this.j.events)||void 0===e||e.on(this,"ready",t)}}class Ze extends Je{constructor(){super(...arguments),this.autosize=this.j.async.debounce((()=>{this.instance.style.height="auto",this.instance.style.height=this.instance.scrollHeight+"px"}),this.j.defaultTimeout)}init(t){this.instance=t.c.element("textarea",{class:"jodit-source__mirror"}),this.container.appendChild(this.instance),t.e.on(this.instance,"mousedown keydown touchstart input",t.async.debounce(this.toWYSIWYG,t.defaultTimeout)).on("setMinHeight.source",(t=>{(0,c.css)(this.instance,"minHeight",t)})).on(this.instance,"change keydown mousedown touchstart input",this.autosize).on("afterSetMode.source",this.autosize).on(this.instance,"mousedown focus",(e=>{t.e.fire(e.type,e)})),this.autosize(),this.onReady()}destruct(){_.i.safeRemove(this.instance)}getValue(){return this.instance.value}setValue(t){this.instance.value=t}insertRaw(t){const e=this.getValue();if(0>this.getSelectionStart())this.setValue(e+t);else{const s=this.getSelectionStart(),i=this.getSelectionEnd();this.setValue(e.substring(0,s)+t+e.substring(i,e.length))}}getSelectionStart(){return this.instance.selectionStart}getSelectionEnd(){return this.instance.selectionEnd}setSelectionRange(t,e=t){this.instance.setSelectionRange(t,e)}focus(){this.instance.focus()}setPlaceHolder(t){this.instance.setAttribute("placeholder",t)}setReadOnly(t){t?this.instance.setAttribute("readonly","true"):this.instance.removeAttribute("readonly")}selectAll(){this.instance.select()}replaceUndoManager(){const{observer:t}=this.jodit;this.j.e.on(this.instance,"keydown",(e=>{if((e.ctrlKey||e.metaKey)&&"z"===e.key)return e.shiftKey?t.redo():t.undo(),this.setSelectionRange(this.getValue().length),!1}))}}class Qe extends Je{constructor(){super(...arguments),this.className="jodit_ace_editor",this.proxyOnFocus=t=>{this.j.e.fire("focus",t)},this.proxyOnMouseDown=t=>{this.j.e.fire("mousedown",t)}}aceExists(){return void 0!==this.j.ow.ace}getLastColumnIndex(t){return this.instance.session.getLine(t).length}getLastColumnIndices(){const t=this.instance.session.getLength(),e=[];let s=0;for(let i=0;t>i;i++)s+=this.getLastColumnIndex(i),i>0&&(s+=1),e[i]=s;return e}getRowColumnIndices(t){const e=this.getLastColumnIndices();if(e[0]>=t)return{row:0,column:t};let s=1;for(let i=1;e.length>i;i++)t>e[i]&&(s=i+1);return{row:s,column:t-e[s-1]-1}}setSelectionRangeIndices(t,e){const s=this.getRowColumnIndices(t),i=this.getRowColumnIndices(e);this.instance.getSelection().setSelectionRange({start:s,end:i})}getIndexByRowColumn(t,e){return this.getLastColumnIndices()[t]-this.getLastColumnIndex(t)+e}init(t){const e=()=>{if(void 0!==this.instance||!this.aceExists())return;const e=this.j.c.div("jodit-source__mirror-fake");this.container.appendChild(e),this.instance=t.ow.ace.edit(e),this.instance.setTheme(t.o.sourceEditorNativeOptions.theme),this.instance.renderer.setShowGutter(t.o.sourceEditorNativeOptions.showGutter),this.instance.getSession().setMode(t.o.sourceEditorNativeOptions.mode),this.instance.setHighlightActiveLine(t.o.sourceEditorNativeOptions.highlightActiveLine),this.instance.getSession().setUseWrapMode(!0),this.instance.setOption("indentedSoftWrap",!1),this.instance.setOption("wrap",t.o.sourceEditorNativeOptions.wrap),this.instance.getSession().setUseWorker(!1),this.instance.$blockScrolling=1/0,this.instance.on("change",this.toWYSIWYG),this.instance.on("focus",this.proxyOnFocus),this.instance.on("mousedown",this.proxyOnMouseDown),t.getRealMode()!==a.MODE_WYSIWYG&&this.setValue(this.getValue());const s=this.j.async.debounce((()=>{t.isInDestruct||(this.instance.setOption("maxLines","auto"!==t.o.height?t.workplace.offsetHeight/this.instance.renderer.lineHeight:1/0),this.instance.resize())}),2*this.j.defaultTimeout);t.e.on("afterResize afterSetMode",s),s(),this.onReady()};t.e.on("afterSetMode",(()=>{t.getRealMode()!==a.MODE_SOURCE&&t.getMode()!==a.MODE_SPLIT||(this.fromWYSIWYG(),e())})),e(),this.aceExists()||(0,c.loadNext)(t,t.o.sourceEditorCDNUrlsJS).then((()=>{t.isInDestruct||e()}))}destruct(){var t,e;this.instance.off("change",this.toWYSIWYG),this.instance.off("focus",this.proxyOnFocus),this.instance.off("mousedown",this.proxyOnMouseDown),this.instance.destroy(),null===(e=null===(t=this.j)||void 0===t?void 0:t.events)||void 0===e||e.off("aceInited.source")}setValue(t){if(!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){const e=this.j.e.fire("beautifyHTML",t);(0,c.isString)(e)&&(t=e)}this.instance.setValue(t),this.instance.clearSelection()}getValue(){return this.instance.getValue()}setReadOnly(t){this.instance.setReadOnly(t)}focus(){this.instance.focus()}getSelectionStart(){const t=this.instance.selection.getRange();return this.getIndexByRowColumn(t.start.row,t.start.column)}getSelectionEnd(){const t=this.instance.selection.getRange();return this.getIndexByRowColumn(t.end.row,t.end.column)}selectAll(){this.instance.selection.selectAll()}insertRaw(t){const e=this.instance.selection.getCursor(),s=this.instance.session.insert(e,t);this.instance.selection.setRange({start:e,end:s},!1)}setSelectionRange(t,e){this.setSelectionRangeIndices(t,e)}setPlaceHolder(t){}replaceUndoManager(){const{observer:t}=this.jodit;this.instance.commands.addCommand({name:"Undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec(){t.undo()}}),this.instance.commands.addCommand({name:"Redo",bindKey:{win:"Ctrl-Shift-Z",mac:"Command-Shift-Z"},exec(){t.redo()}})}}function ts(t,e,s,i,o){let n;switch(t){case"ace":if(!e.o.shadowRoot){n=new Qe(e,s,i,o);break}default:n=new Ze(e,s,i,o)}return n.init(e),n.onReadyAlways((()=>{n.setReadOnly(e.o.readonly)})),n}class es extends H{constructor(){super(...arguments),this.buttons=[{name:"source",group:"source"}],this.__lock=!1,this.__oldMirrorValue="",this.tempMarkerStart="{start-jodit-selection}",this.tempMarkerStartReg=/{start-jodit-selection}/g,this.tempMarkerEnd="{end-jodit-selection}",this.tempMarkerEndReg=/{end-jodit-selection}/g,this.getSelectionStart=()=>{var t,e;return null!==(e=null===(t=this.sourceEditor)||void 0===t?void 0:t.getSelectionStart())&&void 0!==e?e:0},this.getSelectionEnd=()=>{var t,e;return null!==(e=null===(t=this.sourceEditor)||void 0===t?void 0:t.getSelectionEnd())&&void 0!==e?e:0}}onInsertHTML(t){var e;if(!this.j.o.readonly&&!this.j.isEditorMode())return null===(e=this.sourceEditor)||void 0===e||e.insertRaw(t),this.toWYSIWYG(),!1}fromWYSIWYG(t=!1){if(!this.__lock||!0===t){this.__lock=!0;const t=this.j.getEditorValue(!1);t!==this.getMirrorValue()&&this.setMirrorValue(t),this.__lock=!1}}toWYSIWYG(){if(this.__lock)return;const t=this.getMirrorValue();t!==this.__oldMirrorValue&&(this.__lock=!0,this.j.setEditorValue(t),this.__lock=!1,this.__oldMirrorValue=t)}getNormalPosition(t,e){let s=t;for(;s>0;){if(s--,"<"===e[s]&&void 0!==e[s+1]&&e[s+1].match(/[\w/]+/i))return s;if(">"===e[s])return t}return t}clnInv(t){return t.replace(a.INVISIBLE_SPACE_REG_EXP(),"")}onSelectAll(t){var e;if("selectall"===t.toLowerCase()&&this.j.getRealMode()===a.MODE_SOURCE)return null===(e=this.sourceEditor)||void 0===e||e.selectAll(),!1}getMirrorValue(){var t;return(null===(t=this.sourceEditor)||void 0===t?void 0:t.getValue())||""}setMirrorValue(t){var e;null===(e=this.sourceEditor)||void 0===e||e.setValue(t)}setFocusToMirror(){var t;null===(t=this.sourceEditor)||void 0===t||t.focus()}saveSelection(){if(this.j.getRealMode()===a.MODE_WYSIWYG)this.j.s.save(),this.j.setEditorValue(),this.fromWYSIWYG(!0);else{if(this.j.o.editHTMLDocumentMode)return;const t=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){const e=this.j.s.marker(!0),s=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(t.substr(0,s)+this.clnInv(e.outerHTML)+t.substr(s))}else{const e=this.j.s.marker(!0),s=this.j.s.marker(!1),i=this.getNormalPosition(this.getSelectionStart(),t),o=this.getNormalPosition(this.getSelectionEnd(),t);this.setMirrorValue(t.substr(0,i)+this.clnInv(e.outerHTML)+t.substr(i,o-i)+this.clnInv(s.outerHTML)+t.substr(o))}this.toWYSIWYG()}}removeSelection(){if(this.j.getRealMode()===a.MODE_WYSIWYG)return this.__lock=!0,this.j.s.restore(),void(this.__lock=!1);let t=this.getMirrorValue(),e=0,s=0;try{if(t=t.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd),!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){const e=this.j.e.fire("beautifyHTML",t);(0,c.isString)(e)&&(t=e)}if(e=t.indexOf(this.tempMarkerStart),s=e,t=t.replace(this.tempMarkerStartReg,""),-1!==e){const e=t.indexOf(this.tempMarkerEnd);-1!==e&&(s=e)}t=t.replace(this.tempMarkerEndReg,"")}finally{t=t.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(t),this.setMirrorSelectionRange(e,s),this.toWYSIWYG(),this.setFocusToMirror()}setMirrorSelectionRange(t,e){var s;null===(s=this.sourceEditor)||void 0===s||s.setSelectionRange(t,e)}onReadonlyReact(){var t;null===(t=this.sourceEditor)||void 0===t||t.setReadOnly(this.j.o.readonly)}afterInit(t){if(this.mirrorContainer=t.c.div("jodit-source"),t.workplace.appendChild(this.mirrorContainer),t.e.on("afterAddPlace changePlace afterInit",(()=>{t.workplace.appendChild(this.mirrorContainer)})),this.sourceEditor=ts("area",t,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG),this.onReadonlyReact(),t.e.on("placeholder.source",(t=>{var e;null===(e=this.sourceEditor)||void 0===e||e.setPlaceHolder(t)})).on("change.source",this.fromWYSIWYG).on("beautifyHTML",(t=>t)),t.o.beautifyHTML){const e=()=>{var e;const s=t.ow.html_beautify;return!(!s||t.isInDestruct||(null===(e=t.events)||void 0===e||e.off("beautifyHTML").on("beautifyHTML",(t=>s(t))),0))};e()||(0,c.loadNext)(t,t.o.beautifyHTMLCDNUrlsJS).then(e)}this.fromWYSIWYG(),this.initSourceEditor(t)}initSourceEditor(t){var e;if("area"!==t.o.sourceEditor){const e=ts(t.o.sourceEditor,t,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG);e.onReadyAlways((()=>{var s,i;null===(s=this.sourceEditor)||void 0===s||s.destruct(),this.sourceEditor=e,this.fromWYSIWYG(!0),null===(i=t.events)||void 0===i||i.fire("sourceEditorReady",t)}))}else null===(e=this.sourceEditor)||void 0===e||e.onReadyAlways((()=>{var e;this.fromWYSIWYG(!0),null===(e=t.events)||void 0===e||e.fire("sourceEditorReady",t)}))}beforeDestruct(t){this.sourceEditor&&(this.sourceEditor.destruct(),delete this.sourceEditor),_.i.safeRemove(this.mirrorContainer)}}(0,n.gn)([(0,x.watch)(":insertHTML.source")],es.prototype,"onInsertHTML",null),(0,n.gn)([x.autobind],es.prototype,"fromWYSIWYG",null),(0,n.gn)([x.autobind],es.prototype,"toWYSIWYG",null),(0,n.gn)([x.autobind],es.prototype,"getNormalPosition",null),(0,n.gn)([(0,x.watch)(":beforeCommand.source")],es.prototype,"onSelectAll",null),(0,n.gn)([(0,x.watch)(":beforeSetMode.source")],es.prototype,"saveSelection",null),(0,n.gn)([(0,x.watch)(":afterSetMode.source")],es.prototype,"removeSelection",null),(0,n.gn)([x.autobind],es.prototype,"setMirrorSelectionRange",null),(0,n.gn)([(0,x.watch)(":readonly.source")],es.prototype,"onReadonlyReact",null),r.D.prototype.showCharsCounter=!0,r.D.prototype.countHTMLChars=!1,r.D.prototype.showWordsCounter=!0;class ss extends H{constructor(){super(...arguments),this.charCounter=null,this.wordCounter=null,this.reInit=()=>{this.j.o.showCharsCounter&&this.charCounter&&this.j.statusbar.append(this.charCounter,!0),this.j.o.showWordsCounter&&this.wordCounter&&this.j.statusbar.append(this.wordCounter,!0),this.j.e.off("change keyup",this.calc).on("change keyup",this.calc),this.calc()},this.calc=this.j.async.throttle((()=>{const t=this.j.text;if(this.j.o.showCharsCounter&&this.charCounter){const e=this.j.o.countHTMLChars?this.j.value:t.replace((0,a.SPACE_REG_EXP)(),"");this.charCounter.textContent=this.j.i18n("Chars: %d",e.length)}this.j.o.showWordsCounter&&this.wordCounter&&(this.wordCounter.textContent=this.j.i18n("Words: %d",t.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),"").split((0,a.SPACE_REG_EXP)()).filter((t=>t.length)).length))}),this.j.defaultTimeout)}afterInit(){this.charCounter=this.j.c.span(),this.wordCounter=this.j.c.span(),this.j.e.on("afterInit changePlace afterAddPlace",this.reInit),this.reInit()}beforeDestruct(){_.i.safeRemove(this.charCounter),_.i.safeRemove(this.wordCounter),this.j.e.off("afterInit changePlace afterAddPlace",this.reInit),this.charCounter=null,this.wordCounter=null}}r.D.prototype.toolbarSticky=!0,r.D.prototype.toolbarDisableStickyForMobile=!0,r.D.prototype.toolbarStickyOffset=0;class is extends H{constructor(){super(...arguments),this.isToolbarSticked=!1,this.createDummy=t=>{},this.addSticky=t=>{this.isToolbarSticked||(this.createDummy(t),this.j.container.classList.add("jodit_sticky"),this.isToolbarSticked=!0),(0,c.css)(t,{top:this.j.o.toolbarStickyOffset||null,width:this.j.container.offsetWidth-2})},this.removeSticky=t=>{this.isToolbarSticked&&((0,c.css)(t,{width:"",top:""}),this.j.container.classList.remove("jodit_sticky"),this.isToolbarSticked=!1)}}afterInit(t){t.e.on(t.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.onScroll).on("getStickyState.sticky",(()=>this.isToolbarSticked))}onScroll(){const{jodit:t}=this,e=t.ow.pageYOffset||t.od.documentElement&&t.od.documentElement.scrollTop||0,s=(0,c.offset)(t.container,t,t.od,!0),i=t.getMode()===a.MODE_WYSIWYG&&e+t.o.toolbarStickyOffset>s.top&&s.top+s.height>e+t.o.toolbarStickyOffset&&!(t.o.toolbarDisableStickyForMobile&&this.isMobile());if(t.o.toolbarSticky&&!0===t.o.toolbar&&this.isToolbarSticked!==i){const e=t.toolbarContainer;e&&(i?this.addSticky(e):this.removeSticky(e)),t.e.fire("toggleSticky",i)}}isMobile(){return this.j&&this.j.options&&this.j.container&&this.j.o.sizeSM>=this.j.container.offsetWidth}beforeDestruct(t){this.dummyBox&&_.i.safeRemove(this.dummyBox),t.e.off(t.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.onScroll).off(".sticky")}}(0,n.gn)([(0,x.throttle)()],is.prototype,"onScroll",null),r.D.prototype.usePopupForSpecialCharacters=!1,r.D.prototype.specialCharacters=["!",""","#","$","%","&","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","»","¬","®","¯","°","²","³","´","µ","¶","·","¸","¹","º","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"],r.D.prototype.controls.symbol={icon:"omega",hotkeys:["ctrl+shift+i","cmd+shift+i"],tooltip:"Insert Special Character",popup(t,e,s,i){const o=t.e.fire("generateSpecialCharactersTable.symbols");if(o){if(t.o.usePopupForSpecialCharacters){const e=t.c.div();return e.classList.add("jodit-symbols"),e.appendChild(o),t.e.on(o,"close_dialog",i),e}{A(o,t.i18n("Select Special Character"),void 0,"jodit-symbols").bindDestruct(t);const e=o.querySelector("a");e&&e.focus()}}}};class os extends H{constructor(){super(...arguments),this.buttons=[{name:"symbol",group:"insert"}],this.countInRow=17}afterInit(t){t.e.on("generateSpecialCharactersTable.symbols",(()=>{const e=t.c.fromHTML('<div class="jodit-symbols__container">\n\t\t\t\t\t\t<div class="jodit-symbols__container_table">\n\t\t\t\t\t\t\t<table><tbody></tbody></table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="jodit-symbols__container_preview">\n\t\t\t\t\t\t\t<div class="jodit-symbols__preview"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>'),s=e.querySelector(".jodit-symbols__preview"),i=e.querySelector("table").tBodies[0],o=[];for(let e=0;t.o.specialCharacters.length>e;){const s=t.c.element("tr");for(let i=0;this.countInRow>i&&t.o.specialCharacters.length>e;i+=1,e+=1){const n=t.c.element("td"),r=t.c.fromHTML(`<a\n\t\t\t\t\t\t\t\t\tdata-index="${e}"\n\t\t\t\t\t\t\t\t\tdata-index-j="${i}"\n\t\t\t\t\t\t\t\t\trole="option"\n\t\t\t\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\t\t>${t.o.specialCharacters[e]}</a>`);o.push(r),n.appendChild(r),s.appendChild(n)}i.appendChild(s)}const n=this;return t.e.on(o,"focus",(function(){s.innerHTML=this.innerHTML})).on(o,"mousedown",(function(e){_.i.isTag(this,"a")&&(t.s.focus(),t.s.insertHTML(this.innerHTML),t.e.fire(this,"close_dialog"),e&&e.preventDefault(),e&&e.stopImmediatePropagation())})).on(o,"mouseenter",(function(){_.i.isTag(this,"a")&&this.focus()})).on(o,"keydown",(e=>{const s=e.target;if(_.i.isTag(s,"a")){const i=parseInt((0,Bt.Lj)(s,"-index")||"0",10),r=parseInt((0,Bt.Lj)(s,"data-index-j")||"0",10);let l;switch(e.key){case a.KEY_UP:case a.KEY_DOWN:l=e.key===a.KEY_UP?i-n.countInRow:i+n.countInRow,void 0===o[l]&&(l=e.key===a.KEY_UP?Math.floor(o.length/n.countInRow)*n.countInRow+r:r,l>o.length-1&&(l-=n.countInRow)),o[l]&&o[l].focus();break;case a.KEY_RIGHT:case a.KEY_LEFT:l=e.key===a.KEY_LEFT?i-1:i+1,void 0===o[l]&&(l=e.key===a.KEY_LEFT?o.length-1:0),o[l]&&o[l].focus();break;case a.KEY_ENTER:t.e.fire(s,"mousedown"),e.stopImmediatePropagation(),e.preventDefault()}}})),e}))}beforeDestruct(t){t.e.off("generateSpecialCharactersTable.symbols")}}r.D.prototype.table={allowCellSelection:!0,selectionCellStyle:"border: 1px double #1e88e5 !important;",allowCellResize:!0,useExtraClassesOptions:!1},r.D.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":"Bootstrap Bordered","table table-striped":"Bootstrap Striped","table table-dark":"Bootstrap Dark"}},popup(t,e,s,i,o){const n=s.data&&s.data.rows?s.data.rows:10,r=s.data&&s.data.cols?s.data.cols:10,a=t.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">'+(()=>{if(!t.o.table.useExtraClassesOptions)return"";const e=[];if(s.data){const t=s.data.classList;Object.keys(t).forEach((s=>{e.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${s}" type="checkbox"/>${t[s]}</label>`)}))}return e.join("")})()+'</div></div><label class="jodit-form__center"><span>1</span> × <span>1</span></label></form>'),l=a.querySelectorAll("span")[0],h=a.querySelectorAll("span")[1],d=a.querySelector(".jodit-form__container"),u=a.querySelector(".jodit-form__options"),p=[],f=n*r;for(let e=0;f>e;e+=1)p[e]||p.push(t.c.element("span",{dataIndex:e}));if(t.e.on(d,"mousemove",((t,e)=>{const s=t.target;if(!_.i.isTag(s,"span"))return;const i=void 0===e||isNaN(e)?parseInt((0,Bt.Lj)(s,"-index")||"0",10):e||0,o=Math.ceil((i+1)/r),n=i%r+1;for(let t=0;p.length>t;t+=1)p[t].className=t%r+1>n||Math.ceil((t+1)/r)>o?"":"jodit_hovered";h.textContent=""+n,l.textContent=""+o})).on(d,"touchstart mousedown",(e=>{const s=e.target;if(e.preventDefault(),e.stopImmediatePropagation(),!_.i.isTag(s,"span"))return;const o=parseInt((0,Bt.Lj)(s,"-index")||"0",10),n=Math.ceil((o+1)/r),a=o%r+1,l=t.createInside,h=l.element("tbody"),d=l.element("table");d.appendChild(h),d.style.width="100%";let p,f,m=null;for(let t=1;n>=t;t+=1){p=l.element("tr");for(let t=1;a>=t;t+=1)f=l.element("td"),m||(m=f),f.appendChild(l.element("br")),p.appendChild(l.text("\n")),p.appendChild(l.text("\t")),p.appendChild(f);h.appendChild(l.text("\n")),h.appendChild(p)}const g=t.s.current();if(g&&t.s.isCollapsed()){const e=_.i.closest(g,_.i.isBlock,t.editor);e&&e!==t.editor&&!e.nodeName.match(/^TD|TH|TBODY|TABLE|THEADER|TFOOTER$/)&&t.s.setCursorAfter(e)}(0,c.$$)("input[type=checkbox]:checked",u).forEach((t=>{t.value.split(/[\s]+/).forEach((t=>{d.classList.add(t)}))})),t.s.insertNode(l.text("\n")),t.s.insertNode(d,!1),m&&(t.s.setCursorIn(m),(0,c.scrollIntoViewIfNeeded)(m,t.editor,t.ed)),i()})),o&&o.parentElement){for(let e=0;n>e;e+=1){const s=t.c.div();for(let t=0;r>t;t+=1)s.appendChild(p[e*r+t]);d.appendChild(s)}p[0]&&(p[0].className="hovered")}return a},tooltip:"Insert table"};const ns="table_processor_observer-resize";class rs extends H{constructor(){super(...arguments),this.selectMode=!1,this.resizeDelta=0,this.createResizeHandle=()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",(()=>{this.j.async.clearTimeout(this.hideTimeout)})))},this.hideTimeout=0,this.drag=!1,this.minX=0,this.maxX=0,this.startX=0}get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),this.j.workplace.appendChild(this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout((()=>{_.i.safeRemove(this.resizeHandler)}),{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(t){if(this.j.isLocked)return;this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=t.clientX,this.j.lock(ns),this.resizeHandler.classList.add("jodit-table-resizer_moved");let e,s=this.workTable.getBoundingClientRect();if(this.minX=0,this.maxX=1e6,null!=this.wholeTable)s=this.workTable.parentNode.getBoundingClientRect(),this.minX=s.left,this.maxX=this.minX+s.width;else{const t=St.formalCoordinate(this.workTable,this.workCell,!0);St.formalMatrix(this.workTable,((s,i,o)=>{t[1]===o&&(e=s.getBoundingClientRect(),this.minX=Math.max(e.left+a.NEARBY/2,this.minX)),t[1]+(this.isRTL?-1:1)===o&&(e=s.getBoundingClientRect(),this.maxX=Math.min(e.left+e.width-a.NEARBY/2,this.maxX))}))}return!1}onMouseMove(t){if(!this.drag)return;this.j.e.fire("closeAllPopups");let e=t.clientX;const s=(0,c.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);this.minX>e&&(e=this.minX),e>this.maxX&&(e=this.maxX),this.resizeDelta=e-this.startX+(this.j.o.iframe?s.left:0),this.resizeHandler.style.left=e-(this.j.o.iframe?0:s.left)+"px";const i=this.j.s.sel;i&&i.removeAllRanges()}onMouseUp(t){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==t.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.setEditorValue(),this.j.s.focus())}resizeColumns(){const t=this.resizeDelta,e=[];St.setColumnWidthByDelta(this.workTable,St.formalCoordinate(this.workTable,this.workCell,!0)[1],t,!0,e);const s=(0,c.call)(this.isRTL?_.i.prev:_.i.next,this.workCell,_.i.isCell,this.workCell.parentNode);St.setColumnWidthByDelta(this.workTable,St.formalCoordinate(this.workTable,s)[1],-t,!1,e)}resizeTable(){const t=this.resizeDelta*(this.isRTL?-1:1),e=this.workTable.offsetWidth,s=(0,c.getContentWidth)(this.workTable.parentNode,this.j.ew),i=!this.wholeTable;if(this.isRTL?!i:i)this.workTable.style.width=(e+t)/s*100+"%";else{const i=this.isRTL?"marginRight":"marginLeft",o=parseInt(this.j.ew.getComputedStyle(this.workTable)[i]||"0",10);this.workTable.style.width=(e-t)/s*100+"%",this.workTable.style[i]=(o+t)/s*100+"%"}}setWorkCell(t,e=null){this.wholeTable=e,this.workCell=t,this.workTable=_.i.up(t,(t=>_.i.isTag(t,"table")),this.j.editor)}calcHandlePosition(t,e,s=0,i=0){const o=(0,c.offset)(e,this.j,this.j.ed);if(s>a.NEARBY&&o.width-a.NEARBY>s)return void this.hideResizeHandle();const n=(0,c.offset)(this.j.workplace,this.j,this.j.od,!0),r=(0,c.offset)(t,this.j,this.j.ed);if(this.resizeHandler.style.left=(s>a.NEARBY?o.left+o.width:o.left)-n.left+i+"px",Object.assign(this.resizeHandler.style,{height:r.height+"px",top:r.top-n.top+"px"}),this.showResizeHandle(),s>a.NEARBY){const t=(0,c.call)(this.isRTL?_.i.prev:_.i.next,e,_.i.isCell,e.parentNode);this.setWorkCell(e,!!t&&null)}else{const t=(0,c.call)(this.isRTL?_.i.next:_.i.prev,e,_.i.isCell,e.parentNode);this.setWorkCell(t||e,!t||null)}}afterInit(t){t.o.table.allowCellResize&&t.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",(()=>{(0,c.$$)("table",t.editor).forEach(this.observe)})).on(this.j.ow,"scroll.resize-cells",(()=>{if(!this.drag)return;const e=_.i.up(this.workCell,(t=>_.i.isTag(t,"table")),t.editor);if(e){const t=e.getBoundingClientRect();this.resizeHandler.style.top=t.top+"px"}})).on("beforeSetMode.resize-cells",(()=>{this.module.getAllSelectedCells().forEach((e=>{this.module.removeSelection(e),St.normalizeTable(_.i.closest(e,"table",t.editor))}))}))}observe(t){(0,c.dataBind)(t,ns)||((0,c.dataBind)(t,ns,!0),this.j.e.on(t,"mouseleave.resize-cells",(t=>{this.resizeHandler&&this.resizeHandler!==t.relatedTarget&&this.hideResizeHandle()})).on(t,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle((e=>{if(this.j.isLocked)return;const s=_.i.up(e.target,_.i.isCell,t);s&&this.calcHandlePosition(t,s,e.offsetX)}),{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(t){t.events&&(t.e.off(this.j.ow,".resize-cells"),t.e.off(".resize-cells"))}}(0,n.gn)([x.autobind],rs.prototype,"onHandleMouseDown",null),(0,n.gn)([x.autobind],rs.prototype,"onMouseMove",null),(0,n.gn)([x.autobind],rs.prototype,"onMouseUp",null),(0,n.gn)([x.autobind],rs.prototype,"observe",null);const as="table_processor_observer",ls="onMoveTableSelectCell";class cs extends H{constructor(){super(...arguments),this.requires=["select"],this.selectedCell=null,this.isSelectionMode=!1}get module(){return this.j.getInstance("Table",this.j.o)}afterInit(t){t.o.table.allowCellSelection&&t.e.on("keydown.select-cells",(t=>{t.key===a.KEY_TAB&&this.unselectCells()})).on("beforeCommand.select-cells",this.onExecCommand).on("afterCommand.select-cells",this.onAfterCommand).on(["clickEditor","mousedownTd","mousedownTh","touchstartTd","touchstartTh"].map((t=>t+".select-cells")).join(" "),this.onStartSelection).on("clickTr clickTbody",(()=>{var t;const e=this.module.getAllSelectedCells().length;if(e)return e>1&&(null===(t=this.j.s.sel)||void 0===t||t.removeAllRanges()),!1}))}onStartSelection(t){if(this.j.o.readonly)return;if(this.unselectCells(),t===this.j.editor)return;const e=_.i.closest(t,"table",this.j.editor);return t&&e?(t.firstChild||t.appendChild(this.j.createInside.element("br")),this.isSelectionMode=!0,this.selectedCell=t,this.module.addSelection(t),this.j.e.on(e,"mousemove.select-cells touchmove.select-cells",this.j.async.throttle(this.onMove.bind(this,e),{label:ls,timeout:this.j.defaultTimeout/2})).on(e,"mouseup.select-cells touchend.select-cells",this.onStopSelection.bind(this,e)),!1):void 0}onOutsideClick(){this.selectedCell=null,this.onRemoveSelection()}onChange(){this.j.isLocked||this.isSelectionMode||this.onRemoveSelection()}onMove(t,e){var s;if(this.j.o.readonly)return;if(this.j.isLockedNotBy(as))return;const i=this.j.ed.elementFromPoint(e.clientX,e.clientY);if(!i)return;const o=_.i.closest(i,["td","th"],t);if(!o||!this.selectedCell)return;o!==this.selectedCell&&this.j.lock(as),this.unselectCells();const n=St.getSelectedBound(t,[o,this.selectedCell]),r=St.formalMatrix(t);for(let t=n[0][0];n[1][0]>=t;t+=1)for(let e=n[0][1];n[1][1]>=e;e+=1)this.module.addSelection(r[t][e]);this.module.getAllSelectedCells().length>1&&(null===(s=this.j.s.sel)||void 0===s||s.removeAllRanges()),this.j.e.fire("hidePopup"),e.stopPropagation(),(()=>{const t=this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');o.appendChild(t),this.j.async.setTimeout((()=>{var e;null===(e=t.parentNode)||void 0===e||e.removeChild(t)}),this.j.defaultTimeout/5)})()}onRemoveSelection(t){var e;if(!(null===(e=null==t?void 0:t.buffer)||void 0===e?void 0:e.actionTrigger)&&!this.selectedCell&&this.module.getAllSelectedCells().length)return this.j.unlock(),this.unselectCells(),void this.j.e.fire("hidePopup","cells");this.isSelectionMode=!1,this.selectedCell=null}onStopSelection(t,e){if(!this.selectedCell)return;this.isSelectionMode=!1,this.j.unlock();const s=this.j.ed.elementFromPoint(e.clientX,e.clientY);if(!s)return;const i=_.i.closest(s,["td","th"],t);if(!i)return;const o=_.i.closest(i,"table",t);if(o&&o!==t)return;const n=St.getSelectedBound(t,[i,this.selectedCell]),r=St.formalMatrix(t),a=r[n[1][0]][n[1][1]],l=r[n[0][0]][n[0][1]];this.j.e.fire("showPopup",t,(()=>{const t=(0,c.position)(l,this.j),e=(0,c.position)(a,this.j);return{left:t.left,top:t.top,width:e.left-t.left+e.width,height:e.top-t.top+e.height}}),"cells"),(0,c.$$)("table",this.j.editor).forEach((t=>{this.j.e.off(t,"mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells")})),this.j.async.clearTimeout(ls)}unselectCells(t){const e=this.module,s=e.getAllSelectedCells();s.length&&s.forEach((s=>{t&&t===s||e.removeSelection(s)}))}onExecCommand(t){if(/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(t)){t=t.replace("table","");const e=this.module.getAllSelectedCells();if(e.length){const[s]=e;if(!s)return;const i=_.i.closest(s,"table",this.j.editor);if(!i)return;switch(t){case"splitv":St.splitVertical(i,this.j);break;case"splitg":St.splitHorizontal(i,this.j);break;case"merge":St.mergeSelected(i,this.j);break;case"empty":e.forEach((t=>_.i.detach(t)));break;case"bin":_.i.safeRemove(i);break;case"binrow":St.removeRow(i,s.parentNode.rowIndex);break;case"bincolumn":St.removeColumn(i,s.cellIndex);break;case"addcolumnafter":case"addcolumnbefore":St.appendColumn(i,s.cellIndex,"addcolumnafter"===t,this.j.createInside);break;case"addrowafter":case"addrowbefore":St.appendRow(i,s.parentNode,"addrowafter"===t,this.j.createInside)}}return!1}}onAfterCommand(t){/^justify/.test(t)&&this.module.getAllSelectedCells().forEach((e=>ze(t,e)))}beforeDestruct(t){this.onRemoveSelection(),t.e.off(".select-cells")}}function hs(t){t.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation",(e=>{let s,i;if(e.key!==a.KEY_TAB&&e.key!==a.KEY_LEFT&&e.key!==a.KEY_RIGHT&&e.key!==a.KEY_UP&&e.key!==a.KEY_DOWN)return;{if(s=t.s.current(),i=_.i.up(s,(t=>t&&t.nodeName&&/^td|th$/i.test(t.nodeName)),t.editor),!i)return;const o=t.s.range;if(e.key!==a.KEY_TAB&&s!==i&&((e.key===a.KEY_LEFT||e.key===a.KEY_UP)&&(_.i.prev(s,(t=>e.key===a.KEY_UP?_.i.isTag(t,"br"):!!t),i)||e.key!==a.KEY_UP&&_.i.isText(s)&&0!==o.startOffset)||(e.key===a.KEY_RIGHT||e.key===a.KEY_DOWN)&&(_.i.next(s,(t=>e.key===a.KEY_DOWN?_.i.isTag(t,"br"):!!t),i)||e.key!==a.KEY_DOWN&&_.i.isText(s)&&s.nodeValue&&o.startOffset!==s.nodeValue.length)))return}const o=_.i.up(i,(t=>t&&/^table$/i.test(t.nodeName)),t.editor);let n=null;switch(e.key){case a.KEY_TAB:case a.KEY_LEFT:{const s=e.key===a.KEY_LEFT||e.shiftKey?"prev":"next";n=_.i[s](i,(t=>t&&/^td|th$/i.test(t.tagName)),o),n||(St.appendRow(o,"next"!==s&&o.querySelector("tr"),"next"===s,t.createInside),n=_.i[s](i,_.i.isCell,o));break}case a.KEY_UP:case a.KEY_DOWN:{let t=0,s=0;const r=St.formalMatrix(o,((e,o,n)=>{e===i&&(t=o,s=n)}));e.key===a.KEY_UP?void 0!==r[t-1]&&(n=r[t-1][s]):void 0!==r[t+1]&&(n=r[t+1][s])}}if(n){if(n.firstChild)e.key===a.KEY_TAB?t.s.select(n,!0):t.s.setCursorIn(n,e.key===a.KEY_RIGHT||e.key===a.KEY_DOWN);else{const e=t.createInside.element("br");n.appendChild(e),t.s.setCursorBefore(e)}return!1}}))}function ds(t){t.registerButton({name:"table",group:"insert"})}(0,n.gn)([x.autobind],cs.prototype,"onStartSelection",null),(0,n.gn)([(0,x.watch)(":outsideClick")],cs.prototype,"onOutsideClick",null),(0,n.gn)([(0,x.watch)(":change")],cs.prototype,"onChange",null),(0,n.gn)([x.autobind],cs.prototype,"onRemoveSelection",null),(0,n.gn)([x.autobind],cs.prototype,"onStopSelection",null),(0,n.gn)([x.autobind],cs.prototype,"onExecCommand",null),(0,n.gn)([x.autobind],cs.prototype,"onAfterCommand",null);class us extends H{constructor(){super(...arguments),this.isOpened=!1,this.delayShowTimeout=0}afterInit(t){this.container=t.c.div("jodit-tooltip"),(0,j.ZO)(this.j,us).appendChild(this.container);let e=0;t.e.off(".tooltip").on("showTooltip.tooltip",((s,i)=>{t.async.clearTimeout(e),this.open(s,i)})).on("delayShowTooltip.tooltip",this.delayOpen).on("escape.tooltip",this.close).on("hideTooltip.tooltip change.tooltip scroll.tooltip changePlace.tooltip hidePopup.tooltip closeAllPopups.tooltip",(()=>{this.j.async.clearTimeout(this.delayShowTimeout),e=t.async.setTimeout(this.close,this.j.defaultTimeout)}))}delayOpen(t,e){const s=this.j.o.showTooltipDelay||this.j.defaultTimeout;this.j.async.clearTimeout(this.delayShowTimeout),this.delayShowTimeout=this.j.async.setTimeout((()=>this.open(t,e)),{timeout:s,label:"tooltip"})}open(t,e){this.container.classList.add("jodit-tooltip_visible"),this.container.innerHTML=e,this.isOpened=!0,this.setPosition(t)}setPosition(t){const e=t();(0,c.css)(this.container,{left:e.x,top:e.y})}close(){this.j.async.clearTimeout(this.delayShowTimeout),this.isOpened&&(this.isOpened=!1,this.container.classList.remove("jodit-tooltip_visible"),(0,c.css)(this.container,{left:-5e3}))}beforeDestruct(t){null==t||t.e.off(".tooltip"),this.close(),_.i.safeRemove(this.container)}}function ps(t){t.registerButton({name:"preview"})}function fs(t){t.registerButton({name:"print"})}(0,n.gn)([x.autobind],us.prototype,"delayOpen",null),(0,n.gn)([x.autobind],us.prototype,"close",null),r.D.prototype.controls.preview={icon:"eye",exec(t){const e=t.getInstance("Dialog",{language:t.o.language,theme:t.o.theme}),s=t.c.div();if((0,c.css)(s,{padding:16}),t.iframe){const i=t.create.element("iframe");(0,c.css)(i,{minWidth:800,minHeight:600,border:0}),s.appendChild(i),e.open(s,t.i18n("Preview"));const o=i.contentWindow;o&&(t.e.fire("generateDocumentStructure.iframe",o.document,t),o.document.body.innerHTML=t.value)}else(0,c.css)(s,{minWidth:1024,minHeight:600,border:0}),s.innerHTML=t.value,e.open(s,t.i18n("Preview"));e.setModal(!0)},mode:a.MODE_SOURCE+a.MODE_WYSIWYG,tooltip:"Preview"},r.D.prototype.controls.print={exec(t){const e=t.create.element("iframe");Object.assign(e.style,{position:"fixed",right:0,bottom:0,width:0,height:0,border:0}),(0,j.ZO)(t,r.D).appendChild(e);const s=()=>{t.e.off(t.ow,"mousemove",s),_.i.safeRemove(e)},i=e.contentWindow;i&&(t.e.on(i,"onbeforeunload onafterprint",s).on(t.ow,"mousemove",s),t.o.iframe?(t.e.fire("generateDocumentStructure.iframe",i.document,t),i.document.body.innerHTML=t.value):(i.document.write('<!doctype html><html lang="'+(0,c.defaultLanguage)(t.o.language)+'"><head><title></title></head><body>'+t.value+"</body></html>"),i.document.close()),i.focus(),i.print())},mode:a.MODE_SOURCE+a.MODE_WYSIWYG,tooltip:"Print"},r.D.prototype.showXPathInStatusbar=!0;class ms extends H{constructor(){super(...arguments),this.onContext=(t,e)=>(this.menu||(this.menu=new g(this.j)),this.menu.show(e.clientX,e.clientY,[{icon:"bin",title:t===this.j.editor?"Clear":"Remove",exec:()=>{t!==this.j.editor?_.i.safeRemove(t):this.j.value="",this.j.setEditorValue()}},{icon:"select-all",title:"Select",exec:()=>{this.j.s.select(t)}}]),!1),this.onSelectPath=(t,e)=>{this.j.s.focus();const s=(0,c.attr)(e.target,"-path")||"/";if("/"===s)return this.j.execCommand("selectall"),!1;try{const t=this.j.ed.evaluate(s,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(t)return this.j.s.select(t),!1}catch(t){}return this.j.s.select(t),!1},this.tpl=(t,e,s,i)=>{const o=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${e}" title="${i}" tabindex="-1"'>${(0,c.trim)(s)}</a></span>`),n=o.firstChild;return this.j.e.on(n,"click",this.onSelectPath.bind(this,t)).on(n,"contextmenu",this.onContext.bind(this,t)),o},this.removeSelectAll=()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)},this.appendSelectAll=()=>{this.removeSelectAll(),this.selectAllButton=P(this.j,{name:"selectall",...this.j.o.controls.selectall}),this.selectAllButton.state.size="tiny",this.container&&this.container.insertBefore(this.selectAllButton.container,this.container.firstChild)},this.calcPathImd=()=>{if(this.isDestructed)return;const t=this.j.s.current();if(this.container&&(this.container.innerHTML=a.INVISIBLE_SPACE),t){let e,s,i;_.i.up(t,(t=>{t&&this.j.editor!==t&&!_.i.isText(t)&&(e=t.nodeName.toLowerCase(),s=(0,c.getXPathByElement)(t,this.j.editor).replace(/^\//,""),i=this.tpl(t,s,e,this.j.i18n("Select %s",e)),this.container&&this.container.insertBefore(i,this.container.firstChild))}),this.j.editor)}this.appendSelectAll()},this.calcPath=this.j.async.debounce(this.calcPathImd,2*this.j.defaultTimeout)}afterInit(){this.j.o.showXPathInStatusbar&&(this.container=this.j.c.div("jodit-xpath"),this.j.e.off(".xpath").on("mouseup.xpath change.xpath keydown.xpath changeSelection.xpath",this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath",(()=>{this.j.o.showXPathInStatusbar&&this.container&&(this.j.statusbar.append(this.container),this.j.getRealMode()===a.MODE_WYSIWYG?this.calcPath():(this.container&&(this.container.innerHTML=a.INVISIBLE_SPACE),this.appendSelectAll()))})),this.calcPath())}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(".xpath"),this.removeSelectAll(),this.menu&&this.menu.destruct(),_.i.safeRemove(this.container),delete this.menu,delete this.container}}var gs=s(52),vs=s(53),bs=s(54),ws=s(55),ys=s(56),Cs=s(57),js=s(58),xs=s(59),Es=s(60),Ss=s(61),_s=s(62),ks=s(63),Ts=s(64),Is=s(65),qs=s(66),Ls=s(67),zs=s(68),Ms=s(69),Ps=s(70),Ds=s(71),Ns=s(72),Rs=s(73),As=s(74),Bs=s(75),Os=s(76),Hs=s(77),Fs=s(78),$s=s(79),Ws=s(80),Vs=s(81),Ys=s(82),Us=s(83),Gs=s(84),Ks=s(85),Xs=s(86),Js=s(87),Zs=s(88),Qs=s(89),ti=s(90),ei=s(91),si=s(92),ii=s(93),oi=s(94),ni=s(95),ri=s(96),ai=s(97),li=s(98),ci=s(99),hi=s(100),di=s(101),ui=s(102),pi=s(103),fi=s(104),mi=s(105),gi=s(106),vi=s(107),bi=s(108),wi=s(109),yi=s(110),Ci=s(111),ji=s(112),xi=s(113),Ei=s(114),Si=s(115),_i=s(116),ki=s(117),Ti=s(118),Ii=s(119),qi=s(120),Li=s(121),zi=s(122),Mi=s(123),Pi=s(124),Di=s(125),Ni=s(126),Ri=s(127),Ai=s(128),Bi=s(129),Oi=s(130),Hi=s(131),Fi=s(132);Object.keys(a).forEach((t=>{Jodit[t]=a[t]}));const $i=t=>"__esModule"!==t;Object.keys(o).filter($i).forEach((t=>{k.JO.set(t.replace("_","-"),o[t])})),Object.keys(t).filter($i).forEach((e=>{Jodit.modules[e]=t[e]})),Object.keys(x).filter($i).forEach((t=>{Jodit.decorators[t]=x[t]})),["Confirm","Alert","Prompt"].forEach((e=>{Jodit[e]=t[e]})),Object.keys(e).filter($i).forEach((t=>{Jodit.plugins.add(t,e[t])})),Object.keys(Mt).filter($i).forEach((t=>{Jodit.lang[t]=Mt[t]}));const Wi=Jodit})(),i})()}));
|
|
1
|
+
((t,e)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}})(self,(function(){return function(){var t=[,function(t,e,s){"use strict";s.d(e,{D:()=>o});var i=s(2);class o{constructor(){this.namespace="",this.iframe=!1,this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument="undefined"!=typeof document?document:null,this.ownerWindow="undefined"!=typeof window?window:null,this.shadowRoot=null,this.styleValues={},this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.spellcheck=!0,this.editorCssClass=!1,this.style=!1,this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=1e3,this.useNativeTooltip=!1,this.enter=i.PARAGRAPH,this.enterBlock="br"!==this.enter?this.enter:i.PARAGRAPH,this.defaultMode=i.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:"font-style",buttons:[]},{group:"script",buttons:[]},{group:"list",buttons:["ul","ol"]},{group:"indent",buttons:[]},{group:"font",buttons:[]},{group:"color",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"form",buttons:[]},{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.buttonsMD=["source","|","bold","italic","|","ul","ol","eraser","|","font","fontsize","brush","paragraph","|","image","table","link","|","align","\n","undo","redo","|","hr","copyformat","fullsize","dots"],this.buttonsSM=["source","|","bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","|","image","table","\n","link","|","align","|","undo","redo","|","copyformat","fullsize","dots"],this.buttonsXS=["bold","image","|","brush","paragraph","eraser","\n","align","|","undo","redo","|","dots"],this.events={},this.textIcons=!1,this.showBrowserColorPicker=!0}static get defaultOptions(){return o.__defaultOptions||(o.__defaultOptions=new o),o.__defaultOptions}}o.prototype.controls={}},(t,e,s)=>{"use strict";s.r(e),s.d(e,{INVISIBLE_SPACE:()=>i,NBSP_SPACE:()=>o,INVISIBLE_SPACE_REG_EXP:()=>n,INVISIBLE_SPACE_REG_EXP_END:()=>r,INVISIBLE_SPACE_REG_EXP_START:()=>a,SPACE_REG_EXP:()=>l,SPACE_REG_EXP_START:()=>c,SPACE_REG_EXP_END:()=>h,IS_BLOCK:()=>d,IS_INLINE:()=>u,INSEPARABLE_TAGS:()=>p,MAY_BE_REMOVED_WITH_KEY:()=>f,KEY_BACKSPACE:()=>m,KEY_TAB:()=>g,KEY_ENTER:()=>v,KEY_ESC:()=>b,KEY_LEFT:()=>w,KEY_UP:()=>y,KEY_RIGHT:()=>C,KEY_DOWN:()=>j,KEY_SPACE:()=>x,KEY_DELETE:()=>E,KEY_F3:()=>S,NEARBY:()=>_,ACCURACY:()=>k,COMMAND_KEYS:()=>T,BR:()=>I,PARAGRAPH:()=>q,MODE_WYSIWYG:()=>L,MODE_SOURCE:()=>z,MODE_SPLIT:()=>M,IS_IE:()=>P,TEXT_PLAIN:()=>D,TEXT_HTML:()=>N,MARKER_CLASS:()=>R,EMULATE_DBLCLICK_TIMEOUT:()=>A,INSERT_AS_HTML:()=>B,INSERT_CLEAR_HTML:()=>O,INSERT_AS_TEXT:()=>H,INSERT_ONLY_TEXT:()=>F,SAFE_COUNT_CHANGE_CALL:()=>$,IS_MAC:()=>W,KEY_ALIASES:()=>V,BASE_PATH:()=>Y});const i="\ufeff",o=" ",n=()=>/[\uFEFF]/g,r=()=>/[\uFEFF]+$/g,a=()=>/^[\uFEFF]+/g,l=()=>/[\s\n\t\r\uFEFF\u200b]+/g,c=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,h=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,d=/^(ARTICLE|SCRIPT|STYLE|OBJECT|FOOTER|HEADER|NAV|SECTION|IFRAME|JODIT|JODIT-MEDIA|PRE|DIV|P|LI|UL|OL|H[1-6]|BLOCKQUOTE|TR|TD|TH|TBODY|THEAD|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD|DL|DFN)$/i,u=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,p=["img","br","video","iframe","script","input","textarea","hr","link","jodit","jodit-media"],f=RegExp(`^${p.join("|")}$`,"i"),m="Backspace",g="Tab",v="Enter",b="Escape",w="ArrowLeft",y="ArrowUp",C="ArrowRight",j="ArrowDown",x="Space",E="Delete",S="F3",_=5,k=10,T=[m,E,y,j,C,w,v,b,S,g],I="br",q="p",L=1,z=2,M=3,P="undefined"!=typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),D=P?"text":"text/plain",N=P?"html":"text/html",R="jodit-selection_marker",A=300,B="insert_as_html",O="insert_clear_html",H="insert_as_text",F="insert_only_text",$=10,W="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),V={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:W?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Y=(()=>{if("undefined"==typeof document)return"";const t=document.currentScript,e=t=>t.replace(/\/[^/]+.js$/,"/");if(t)return e(t.src);const s=document.querySelectorAll("script[src]");return s&&s.length?e(s[s.length-1].src):window.location.href})()},function(t,e,s){"use strict";s.d(e,{DG:()=>o,ng:()=>c,P5:()=>p,rO:()=>i});const i="JoditEventDefaultNamespace";class o{constructor(){this.__store={}}get(t,e){if(void 0!==this.__store[e])return this.__store[e][t]}indexOf(t,e,s){const i=this.get(t,e);if(i)for(let t=0;i.length>t;t+=1)if(i[t].originalCallback===s)return t;return!1}namespaces(t=!1){const e=Object.keys(this.__store);return t?e.filter((t=>t!==i)):e}events(t){return this.__store[t]?Object.keys(this.__store[t]):[]}set(t,e,s,i=!1){void 0===this.__store[e]&&(this.__store[e]={}),void 0===this.__store[e][t]&&(this.__store[e][t]=[]),i?this.__store[e][t].unshift(s):this.__store[e][t].push(s)}clear(){this.__store={}}}var n=s(5),r=s(6),a=s(7),l=s(4);class c{constructor(t){this.mutedEvents=new Set,this.__key="__JoditEventsNativeNamespaces",this.doc=document,this.prepareEvent=t=>{t.cancelBubble||(t.type.match(/^touch/)&&t.changedTouches&&t.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach((e=>{Object.defineProperty(t,e,{value:t.changedTouches[0][e],configurable:!0,enumerable:!0})})),t.originalEvent||(t.originalEvent=t),"paste"===t.type&&void 0===t.clipboardData&&this.doc.defaultView.clipboardData&&Object.defineProperty(t,"clipboardData",{get:()=>this.doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.isDestructed=!1,t&&(this.doc=t),this.__key+=(new Date).getTime()}mute(t){return this.mutedEvents.add(null!=t?t:"*"),this}isMuted(t){return!(!t||!this.mutedEvents.has(t))||this.mutedEvents.has("*")}unmute(t){return this.mutedEvents.delete(null!=t?t:"*"),this}eachEvent(t,e){t.split(/[\s,]+/).forEach((t=>{const s=t.split(".");e.call(this,s[0],s[1]||i)}))}getStore(t){if(!t)throw(0,l.v)("Need subject");if(void 0===t[this.__key]){const e=new o;Object.defineProperty(t,this.__key,{enumerable:!1,configurable:!0,value:e})}return t[this.__key]}clearStore(t){void 0!==t[this.__key]&&delete t[this.__key]}triggerNativeEvent(t,e){const s=this.doc.createEvent("HTMLEvents");"string"==typeof e?s.initEvent(e,!0,!0):(s.initEvent(e.type,e.bubbles,e.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach((t=>{Object.defineProperty(s,t,{value:e[t],enumerable:!0})})),Object.defineProperty(s,"originalEvent",{value:e,enumerable:!0})),t.dispatchEvent(s)}get current(){return this.currents[this.currents.length-1]}on(t,e,s,i=!1){const o=(0,n.H)(t)?this:t,c=(0,n.H)(e)?e:t;let h=s;void 0===h&&(0,r.m)(e)&&(h=e);const d=this.getStore(o);if(!(0,n.H)(c)||""===c)throw(0,l.v)("Need events names");if(!(0,r.m)(h))throw(0,l.v)("Need event handler");if((0,a.k)(o))return o.forEach((t=>{this.on(t,c,h,i)})),this;const u=(0,r.m)(o.addEventListener),p=this;let f=function(t,...e){if(!p.isMuted(t))return h&&h.call(this,...e)};return u&&(f=function(t){if(!p.isMuted(t.type))return p.prepareEvent(t),h&&!1===h.call(this,t)?(t.preventDefault(),t.stopImmediatePropagation(),!1):void 0}),this.eachEvent(c,((t,e)=>{if(""===t)throw(0,l.v)("Need event name");if(!1===d.indexOf(t,e,h)&&(d.set(t,e,{event:t,originalCallback:h,syntheticCallback:f},i),u)){const e=!!["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"].includes(t)&&{passive:!0};o.addEventListener(t,f,e)}})),this}one(t,e,s,i=!1){const o=(0,n.H)(t)?this:t,a=(0,n.H)(e)?e:t;let l=s;void 0===l&&(0,r.m)(e)&&(l=e);const c=(...t)=>{this.off(o,a,c),l(...t)};return this.on(o,a,c,i),this}off(t,e,s){const o=(0,n.H)(t)?this:t,a=(0,n.H)(e)?e:t,l=this.getStore(o);let c=s;if(!(0,n.H)(a)||!a)return l.namespaces().forEach((t=>{this.off(o,"."+t)})),this.clearStore(o),this;void 0===c&&(0,r.m)(e)&&(c=e);const h=(0,r.m)(o.removeEventListener),d=t=>{h&&o.removeEventListener(t.event,t.syntheticCallback,!1)},u=(t,e)=>{if(""!==t){const s=l.get(t,e);if(s&&s.length)if((0,r.m)(c)){const i=l.indexOf(t,e,c);!1!==i&&(d(s[i]),s.splice(i,1))}else s.forEach(d),s.length=0}else l.events(e).forEach((t=>{""!==t&&u(t,e)}))};return this.eachEvent(a,((t,e)=>{e===i?l.namespaces().forEach((e=>{u(t,e)})):u(t,e)})),this}stopPropagation(t,e){const s=(0,n.H)(t)?this:t,o=(0,n.H)(t)?t:e;if("string"!=typeof o)throw(0,l.v)("Need event names");const r=this.getStore(s);this.eachEvent(o,((t,e)=>{const o=r.get(t,e);o&&this.__stopped.push(o),e===i&&r.namespaces(!0).forEach((e=>this.stopPropagation(s,t+"."+e)))}))}removeStop(t){if(t){const e=this.__stopped.indexOf(t);-1!==e&&this.__stopped.splice(0,e+1)}}isStopped(t){return void 0!==t&&-1!==this.__stopped.indexOf(t)}fire(t,e,...s){let o,a;const c=(0,n.H)(t)?this:t,h=(0,n.H)(t)?t:e,d=(0,n.H)(t)?[e,...s]:s,u=(0,r.m)(c.dispatchEvent);if(!u&&!(0,n.H)(h))throw(0,l.v)("Need events names");const p=this.getStore(c);return!(0,n.H)(h)&&u?this.triggerNativeEvent(c,e):this.eachEvent(h,((t,e)=>{if(u)this.triggerNativeEvent(c,t);else{const s=p.get(t,e);if(s)try{[...s].every((e=>!this.isStopped(s)&&(this.currents.push(t),a=e.syntheticCallback.call(c,t,...d),this.currents.pop(),void 0!==a&&(o=a),!0)))}finally{this.removeStop(s)}e!==i||u||p.namespaces().filter((t=>t!==e)).forEach((e=>{const s=this.fire.call(this,c,t+"."+e,...d);void 0!==s&&(o=s)}))}})),o}destruct(){this.isDestructed&&(this.isDestructed=!0,this.off(this),this.getStore(this).clear(),delete this[this.__key])}}var h=s(18),d=s(8),u=s(17);class p{constructor(t,e=[],s={}){this.__lockEvent={},this.__data=t,this.__prefix=e,this.__onEvents=s,Object.keys(t).forEach((e=>{const s=this.__prefix.concat(e).filter((t=>t.length));Object.defineProperty(this,e,{set:i=>{var o;const n=t[e];if(!(0,d.isFastEqual)(n,i)){this.fire(["beforeChange","beforeChange."+s.join(".")],e,i),(0,d.isPlainObject)(i)&&(i=new p(i,s,this.__onEvents)),t[e]=i;const r=[];this.fire(["change",...s.reduce(((t,e)=>(r.push(e),t.push("change."+r.join(".")),t)),[])],s.join("."),n,(null===(o=i)||void 0===o?void 0:o.valueOf)?i.valueOf():i)}},get:()=>t[e],enumerable:!0,configurable:!0}),(0,d.isPlainObject)(t[e])&&(t[e]=new p(t[e],s,this.__onEvents))}))}valueOf(){return this.__data}toString(){return JSON.stringify(this.valueOf())}on(t,e){return(0,d.isArray)(t)?(t.map((t=>this.on(t,e))),this):(this.__onEvents[t]||(this.__onEvents[t]=[]),this.__onEvents[t].push(e),this)}fire(t,...e){if((0,d.isArray)(t))t.map((t=>this.fire(t,...e)));else try{!this.__lockEvent[t]&&this.__onEvents[t]&&(this.__lockEvent[t]=!0,this.__onEvents[t].forEach((t=>t.call(this,...e))))}finally{this.__lockEvent[t]=!1}}static create(t,e=[]){return t instanceof p?t:new p(t,e)}}(0,h.gn)([u.nonenumerable],p.prototype,"__data",void 0),(0,h.gn)([u.nonenumerable],p.prototype,"__prefix",void 0),(0,h.gn)([u.nonenumerable],p.prototype,"__onEvents",void 0),(0,h.gn)([u.nonenumerable],p.prototype,"__lockEvent",void 0)},(t,e,s)=>{"use strict";function i(t){return new TypeError(t)}s.d(e,{v:()=>i})},(t,e,s)=>{"use strict";function i(t){return"string"==typeof t}s.d(e,{H:()=>i})},(t,e,s)=>{"use strict";function i(t){return"function"==typeof t}s.d(e,{m:()=>i})},(t,e,s)=>{"use strict";function i(t){return Array.isArray(t)}s.d(e,{k:()=>i})},(t,e,s)=>{"use strict";s.r(e),s.d(e,{$$:()=>E,CamelCaseToKebabCase:()=>j.gP,ConfigFlatten:()=>w,ConfigProto:()=>b,LimitedStack:()=>i.lI,appendScript:()=>Y,appendScriptAsync:()=>U,appendStyleAsync:()=>G,applyStyles:()=>q,asArray:()=>n,attr:()=>i.Lj,browser:()=>X,buildQuery:()=>ot,call:()=>i.RE,callPromise:()=>i.C6,camelCase:()=>j.eV,cleanFromWord:()=>L,clearCenterAlign:()=>A.b,clearTimeout:()=>h,cns:()=>i.H5,colorToHex:()=>g.h,completeUrl:()=>$,convertMediaUrlToVideoEmbed:()=>Z,css:()=>A.i,cssPath:()=>k,ctrlKey:()=>Q,dataBind:()=>tt.q,defaultLanguage:()=>et.X,each:()=>st,error:()=>C.v,fastClone:()=>f,get:()=>i.U2,getClassName:()=>i.gj,getContentWidth:()=>R,getScrollParent:()=>B,getXPathByElement:()=>S,hasBrowserColorPicker:()=>m.EO,hasContainer:()=>m.Zt,htmlspecialchars:()=>z,humanSizeToBytes:()=>it,i18n:()=>j.ag,inView:()=>nt,innerWidth:()=>O,isArray:()=>m.kJ,isAtom:()=>u,isBoolean:()=>m.jn,isDestructable:()=>m.Z$,isEqual:()=>m.Xy,isFastEqual:()=>m.LP,isFunction:()=>m.mf,isHTML:()=>m.FP,isHtmlFromWord:()=>m.I4,isInitable:()=>m.Gu,isInt:()=>m.GN,isJoditObject:()=>m.Zu,isLicense:()=>m.A1,isNativeFunction:()=>m.QC,isNumber:()=>m.hj,isNumeric:()=>m.kE,isPlainObject:()=>m.PO,isPromise:()=>m.tI,isString:()=>m.HD,isURL:()=>m.PX,isValidName:()=>m.r1,isViewObject:()=>m.f2,isVoid:()=>m.nj,isWindow:()=>m.FJ,kebabCase:()=>j.GL,keepNames:()=>i.kc,keys:()=>i.XP,loadImage:()=>i.po,loadNext:()=>K,markAsAtomic:()=>p,markDeprecated:()=>i.Q8,markOwner:()=>i.MN,memorizeExec:()=>i.u3,nl2br:()=>D,normalizeColor:()=>N.ut,normalizeCssValue:()=>N.Zh,normalizeKeyAliases:()=>N.T2,normalizeLicense:()=>N.Pd,normalizeNode:()=>N.Tz,normalizePath:()=>N.AH,normalizeRelativePath:()=>N.Jf,normalizeSize:()=>N.aC,normalizeUrl:()=>N.D5,offset:()=>H,parseQuery:()=>J,position:()=>F,refs:()=>_,reset:()=>i.mc,resolveElement:()=>T,safeHTML:()=>P,scrollIntoViewIfNeeded:()=>rt,set:()=>i.t8,setTimeout:()=>c,splitArray:()=>a,sprintf:()=>j.gB,stringify:()=>j.Pz,stripTags:()=>M,toArray:()=>l.q,trim:()=>j.fy,trimInv:()=>j.as,ucfirst:()=>j.Ps,val:()=>at});var i=s(9),o=s(7);const n=t=>(0,o.k)(t)?t:[t];var r=s(5);function a(t){return(0,r.H)(t)?t.split(/[,\s]+/):t}var l=s(31);function c(t,e,...s){return e?window.setTimeout(t,e,...s):(t.call(null,...s),0)}function h(t){window.clearTimeout(t)}var d=s(20);function u(t){return t&&t.isAtom}function p(t){return Object.defineProperty(t,"isAtom",{enumerable:!1,value:!0,configurable:!1}),t}function f(t){return JSON.parse((0,d.P)(t))}var m=s(19),g=s(29),v=s(1);function b(t,e,s=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;const i=v.D.defaultOptions;if((0,m.HD)(t.preset)){if(void 0!==i.presets[t.preset]){const e=i.presets[t.preset];Object.keys(e).forEach((s=>{(0,m.nj)(t[s])&&(t[s]=e[s])}))}delete t.preset}const o={};return Object.keys(t).forEach((i=>{const n=t[i],r=e?e[i]:null;o[i]=(0,m.PO)(n)&&(0,m.PO)(r)&&!u(n)?b(n,r,s+1):0!==s&&(0,m.kJ)(n)&&!u(n)&&(0,m.kJ)(r)?[...n,...r.slice(n.length)]:n})),Object.setPrototypeOf(o,e),o}function w(t){return(0,i.XP)(t,!1).reduce(((e,s)=>(e[s]=t[s],e)),{})}var y=s(15),C=(s(2),s(4)),j=s(27),x=s(32);function E(t,e){let s;return s=e.querySelectorAll(t),[].slice.call(s)}const S=(t,e)=>{if(!t||t.nodeType!==Node.ELEMENT_NODE)return"";if(!t.parentNode||e===t)return"";if(t.id)return"//*[@id='"+t.id+"']";const s=[].filter.call(t.parentNode.childNodes,(e=>e.nodeName===t.nodeName));return S(t.parentNode,e)+"/"+t.nodeName.toLowerCase()+(s.length>1?"["+((0,l.q)(s).indexOf(t)+1)+"]":"")},_=t=>(t instanceof x.u1&&(t=t.container),E("[ref],[data-ref]",t).reduce(((t,e)=>{const s=(0,i.Lj)(e,"-ref");return s&&(0,m.HD)(s)&&(t[(0,j.eV)(s)]=e,t[s]=e),t}),{})),k=t=>{if(!y.i.isElement(t))return null;const e=[];let s=t;for(;s&&s.nodeType===Node.ELEMENT_NODE;){let t=s.nodeName.toLowerCase();if(s.id){t+="#"+s.id,e.unshift(t);break}{let e=s,i=1;do{e=e.previousElementSibling,e&&e.nodeName.toLowerCase()===t&&i++}while(e);t+=":nth-of-type("+i+")"}e.unshift(t),s=s.parentNode}return e.join(" > ")};function T(t,e){let s=t;if((0,m.HD)(t))try{s=e.querySelector(t)}catch(e){throw(0,C.v)('String "'+t+'" should be valid HTML selector')}if(!s||"object"!=typeof s||!y.i.isElement(s)||!s.cloneNode)throw(0,C.v)('Element "'+t+'" should be string or HTMLElement instance');return s}function I(t){return t.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";]+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,((t,e,s)=>{switch(s.toLowerCase()){case"pt":return(1.328*parseFloat(e)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(e)).toFixed(0)+"px"}return t}))}function q(t){if(-1===t.indexOf("<html "))return t;t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7);const e=document.createElement("iframe");e.style.display="none",document.body.appendChild(e);let s="",i=[],o=[];try{const n=e.contentDocument||(e.contentWindow?e.contentWindow.document:null);if(n){n.open(),n.write(t),n.close(),n.styleSheets.length&&(o=n.styleSheets[n.styleSheets.length-1].cssRules);for(let t=0;o.length>t;t+=1)""!==o[t].selectorText&&(i=E(o[t].selectorText,n.body),i.forEach((e=>{e.style.cssText=I(o[t].style.cssText+";"+e.style.cssText)})));y.i.each(n.body,(t=>{if(y.i.isElement(t)){const e=t,s=e.style.cssText;s&&(e.style.cssText=I(s)),e.hasAttribute("lang")&&e.removeAttribute("lang")}})),s=n.firstChild?(0,j.fy)(n.body.innerHTML):""}}catch(t){}finally{y.i.safeRemove(e)}return s&&(t=s),(0,j.fy)(t.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}function L(t){-1!==t.indexOf("<html ")&&(t=(t=t.substring(t.indexOf("<html "),t.length)).substring(0,t.lastIndexOf("</html>")+7));let e="";try{const s=document.createElement("div");s.innerHTML=t;const i=[];s.firstChild&&y.i.all(s,(t=>{if(t)switch(t.nodeType){case Node.ELEMENT_NODE:switch(t.nodeName){case"STYLE":case"LINK":case"META":i.push(t);break;case"W:SDT":case"W:SDTPR":case"FONT":y.i.unwrap(t);break;default:(0,l.q)(t.attributes).forEach((e=>{-1===["src","href","rel","content"].indexOf(e.name.toLowerCase())&&t.removeAttribute(e.name)}))}break;case Node.TEXT_NODE:break;default:i.push(t)}})),i.forEach(y.i.safeRemove),e=s.innerHTML}catch(t){}return e&&(t=e),(t=t.split(/(\n)/).filter(j.fy).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}function z(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function M(t,e=document){const s=e.createElement("div");return(0,m.HD)(t)?s.innerHTML=t:s.appendChild(t),E("DIV, P, BR, H1, H2, H3, H4, H5, H6, HR",s).forEach((t=>{const s=t.parentNode;if(!s)return;const i=t.nextSibling;y.i.isText(i)&&/^\s/.test(i.nodeValue||"")||i&&s.insertBefore(e.createTextNode(" "),i)})),(0,j.fy)(s.innerText)||""}function P(t,e){if(!y.i.isElement(t))return;const s=t=>(0,i.Lj)(t,"onerror",null),o=t=>{const e=t.getAttribute("href");e&&0===e.trim().indexOf("javascript")&&(0,i.Lj)(t,"href",location.protocol+"//"+e)};e.removeOnError&&(s(t),E("[onerror]",t).forEach(s)),e.safeJavaScriptLink&&(o(t),E('a[href^="javascript"]',t).forEach(o))}function D(t){return t.replace(/([^>])([\n\r]+)/g,"$1<br/>$2")}var N=s(26);const R=(t,e)=>{const s=t=>parseInt(t,10),i=e.getComputedStyle(t);return t.offsetWidth-s(i.getPropertyValue("padding-left")||"0")-s(i.getPropertyValue("padding-right")||"0")};var A=s(25);function B(t){const e=y.i.isHTMLElement(t),s=e&&(0,A.i)(t,"overflowY");return t?e&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:B(t.parentNode)||document.scrollingElement||document.body:null}const O=(t,e)=>{const s=e.getComputedStyle(t);let i=t.clientWidth;return i-=parseFloat(s.paddingLeft||"0")+parseFloat(s.paddingRight||"0"),i},H=(t,e,s,i=!1)=>{let o;try{o=t.getBoundingClientRect()}catch(t){o={top:0,bottom:0,left:0,right:0,width:0,height:0}}const n=s.body,r=s.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},a=s.defaultView||s.parentWindow,l=a.pageYOffset||r.scrollTop||n.scrollTop,c=a.pageXOffset||r.scrollLeft||n.scrollLeft,h=r.clientTop||n.clientTop||0,d=r.clientLeft||n.clientLeft||0;let u,p;const f=e.iframe;if(!i&&e&&e.options&&e.o.iframe&&f){const{top:t,left:s}=H(f,e,e.od,!0);u=o.top+t,p=o.left+s}else u=o.top+l-h,p=o.left+c-d;return{top:Math.round(u),left:Math.round(p),width:o.width,height:o.height}};function F(t,e,s=!1){const i=t.getBoundingClientRect();let o=i.left,n=i.top;if((0,m.Zu)(e)&&e.iframe&&!s){const{left:t,top:s}=F(e.iframe,e,!0);o+=t,n+=s}return{left:Math.round(o),top:Math.round(n),width:Math.round(t.offsetWidth),height:Math.round(t.offsetHeight)}}const $=t=>("file:"===window.location.protocol&&/^\/\//.test(t)&&(t="https:"+t),t),W=new Map,V=t=>async(e,s)=>{if(W.has(s))return W.get(s);const i=t(e,s);return W.set(s,i),i},Y=(t,e,s)=>{const i=t.c.element("script");return i.type="text/javascript",i.async=!0,(0,m.mf)(s)&&!t.isInDestruct&&t.e.on(i,"load",s),i.src||(i.src=$(e)),t.od.body.appendChild(i),{callback:s,element:i}},U=V(((t,e)=>new Promise(((s,i)=>{const{element:o}=Y(t,e,s);!t.isInDestruct&&t.e.on(o,"error",i)})))),G=V(((t,e)=>new Promise(((s,i)=>{const o=t.c.element("link");o.rel="stylesheet",o.media="all",o.crossOrigin="anonymous",!t.isInDestruct&&t.e.on(o,"load",(()=>s(o))).on(o,"error",i),o.href=$(e),t.o.shadowRoot?t.o.shadowRoot.appendChild(o):t.od.body.appendChild(o)})))),K=(t,e,s=0)=>(0,m.HD)(e[s])?U(t,e[s]).then((()=>K(t,e,s+1))):Promise.resolve(),X=t=>{const e=navigator.userAgent.toLowerCase(),s=/(firefox)[\s/]([\w.]+)/.exec(e)||/(chrome)[\s/]([\w.]+)/.exec(e)||/(webkit)[\s/]([\w.]+)/.exec(e)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(e)||/(msie)[\s]([\w.]+)/.exec(e)||/(trident)\/([\w.]+)/.exec(e)||0>e.indexOf("compatible")||[];return"version"===t?s[2]:"webkit"===t?"chrome"===s[1]||"webkit"===s[1]:"ff"===t?"firefox"===s[1]:"msie"===t?"trident"===s[1]||"msie"===s[1]:s[1]===t},J=t=>{const e={},s=t.substr(1).split("&");for(let t=0;s.length>t;t+=1){const i=s[t].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return e},Z=(t,e=400,s=345)=>{if(!(0,m.PX)(t))return t;const i=document.createElement("a"),o=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;i.href=t,e||(e=400),s||(s=345);const n=i.protocol||"";switch(i.hostname){case"www.vimeo.com":case"vimeo.com":return o.test(t)?t.replace(o,'<iframe width="'+e+'" height="'+s+'" src="'+n+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):t;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":{const o=i.search?J(i.search):{v:i.pathname.substr(1)};return o.v?'<iframe width="'+e+'" height="'+s+'" src="'+n+"//www.youtube.com/embed/"+o.v+'" frameborder="0" allowfullscreen></iframe>':t}}return t},Q=t=>{if("undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(t.metaKey&&!t.altKey)return!0}else if(t.ctrlKey&&!t.altKey)return!0;return!1};var tt=s(11),et=s(28);function st(t,e){let s,i,o;if((0,m.kJ)(t)){for(s=t.length,o=0;s>o;o+=1)if(!1===e.call(t[o],o,t[o]))return!1}else for(i=Object.keys(t),o=0;i.length>o;o+=1)if(!1===e.call(t[i[o]],i[o],t[i[o]]))return!1;return!0}const it=t=>{if(/^[0-9.]+$/.test(""+t))return parseFloat(t);const e=t.substr(-2,2).toUpperCase(),s=["KB","MB","GB","TB"],i=parseFloat(t.substr(0,t.length-2));return-1!==s.indexOf(e)?i*Math.pow(1024,s.indexOf(e)+1):parseInt(t,10)},ot=(t,e)=>{const s=[],i=encodeURIComponent;for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const n=e?e+"["+o+"]":o,r=t[o];s.push((0,m.PO)(r)?ot(r,n):i(n)+"="+i(r))}return s.join("&")},nt=(t,e,s)=>{let i=t.getBoundingClientRect(),o=t;const n=i.top,r=i.height;do{if(o&&o.parentNode){if(o=o.parentNode,i=o.getBoundingClientRect(),n>i.bottom)return!1;if(i.top>=n+r)return!1}}while(o&&o!==e&&o.parentNode);return(s.documentElement&&s.documentElement.clientHeight||0)>=n},rt=(t,e,s)=>{nt(t,e,s)||(e.clientHeight!==e.scrollHeight&&(e.scrollTop=t.offsetTop),nt(t,e,s)||t.scrollIntoView())},at=(t,e,s)=>{const i=t.querySelector(e);return i?(s&&(i.value=s),i.value):""}},function(t,e,s){"use strict";s.d(e,{lI:()=>m,Lj:()=>n.Lj,RE:()=>n.RE,C6:()=>n.C6,H5:()=>i,U2:()=>r.U,gj:()=>f,kc:()=>p,XP:()=>n.XP,po:()=>n.po,Q8:()=>o,MN:()=>n.MN,u3:()=>n.u3,mc:()=>n.mc,t8:()=>d});const i=console;function o(t,e=[""],s=null){return(...o)=>(i.warn(`Method "${e[0]}" deprecated.`+(e[1]?` Use "${e[1]}" instead`:"")),t.call(s,...o))}var n=s(10),r=s(30),a=s(5),l=s(22),c=s(7),h=s(19);function d(t,e,s){if(!(0,a.H)(t)||!t.length)return;const i=t.split(".");let o=s,n=i[0];for(let t=0;i.length-1>t;t+=1)n=i[t],(0,c.k)(o[n])||(0,h.PO)(o[n])||(o[n]=(0,l.k)(i[t+1])?[]:{}),o=o[n];o&&(o[i[i.length-1]]=e)}var u=s(6);const p=new Map,f=t=>{var e;if((0,u.m)(t.className))return t.className();const s=(null===(e=t.constructor)||void 0===e?void 0:e.originalConstructor)||t.constructor;if(p.has(s))return p.get(s);if(s.name)return s.name;const i=(""+s).match(/^\s*function\s*(\S*)\s*\(/);return i?i[1]:""};class m{constructor(t){this.limit=t,this.stack=[]}push(t){return this.stack.push(t),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(t){return this.stack.find(t)}}},(t,e,s)=>{"use strict";s.d(e,{RE:()=>d,Lj:()=>u,MN:()=>p,C6:()=>f,mc:()=>g,po:()=>v,XP:()=>b,u3:()=>w});var i=s(6),o=s(24),n=s(30),r=s(11),a=s(21),l=s(19),c=s(25),h=s(27);function d(t,...e){return t(...e)}function u(t,e,s){if(!t||!(0,i.m)(t.getAttribute))return null;if(!(0,l.HD)(e))return Object.keys(e).forEach((s=>{const i=e[s];(0,l.PO)(i)&&"style"===s?(0,c.i)(t,i):("className"===s&&(s="class"),u(t,s,i))})),null;let o=(0,h.gP)(e);if(/^-/.test(o)){const e=u(t,"data"+o);if(e)return e;o=o.substr(1)}if(void 0!==s){if(null!=s)return t.setAttribute(o,""+s),""+s;t.hasAttribute(o)&&t.removeAttribute(o)}return t.getAttribute(o)}function p(t,e){u(e,"data-editor_id",t.id),!e.component&&Object.defineProperty(e,"jodit",{value:t})}function f(t,e){return(0,o.t)(t)?t.finally(e):e()}const m={},g=t=>{var e,s;if(!(t in m)){const s=document.createElement("iframe");try{if(s.src="about:blank",document.body.appendChild(s),!s.contentWindow)return null;const o=(0,n.U)(t,s.contentWindow),r=(0,n.U)(t.split(".").slice(0,-1).join("."),s.contentWindow);(0,i.m)(o)&&(m[t]=o.bind(r))}catch(t){}finally{null===(e=s.parentNode)||void 0===e||e.removeChild(s)}}return null!==(s=m[t])&&void 0!==s?s:null},v=(t,e)=>e.async.promise(((s,i)=>{const o=new Image,n=()=>{e.e.off(o),null==i||i()},r=()=>{e.e.off(o),s(o)};e.e.one(o,"load",r).one(o,"error",n).one(o,"abort",n),o.src=t,o.complete&&r()})),b=(t,e=!0)=>{if(e)return Object.keys(t);const s=[];for(const e in t)s.push(e);return s},w=(t,e,{control:s},i)=>{const o="button"+s.command;let n=s.args&&s.args[0]||(0,r.q)(t,o);if((0,a.n)(n))return!1;(0,r.q)(t,o,n),i&&(n=i(n)),t.execCommand(s.command,!1,n||void 0)}},(t,e,s)=>{"use strict";s.d(e,{q:()=>r});var i=s(12),o=s(19);const n=new WeakMap,r=(t,e,s)=>{let r=n.get(t);if(!r){r={},n.set(t,r);let e=null;t instanceof i.Hr&&(e=t.j.e),(0,o.f2)(t)&&(e=t.e),e&&e.on("beforeDestruct",(()=>{n.delete(t)}))}return void 0===s?r[e]:(r[e]=s,s)}},function(t,e,s){"use strict";var i;s.d(e,{wA:()=>a,n$:()=>i,Hr:()=>l}),(t=>{t.beforeInit="beforeInit",t.ready="ready",t.beforeDestruct="beforeDestruct",t.destructed="destructed"})(i||(i={}));var o=s(8),n=s(13);const r=new Map;class a{constructor(){this.ownerWindow=window,this.__componentStatus=i.beforeInit,this.componentName="jodit-"+(0,o.kebabCase)(this.className()||(0,o.getClassName)(this)),this.uid="jodit-uid-"+(0,n.fe)()}getFullElName(t,e,s){const i=[this.componentName];return t&&(t=t.replace(/[^a-z0-9-]/gi,"-"),i.push("__"+t)),e&&(i.push("_",e),i.push("_",(0,o.isVoid)(s)?"true":""+s)),i.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(t,e){return(0,o.get)(t,e||this)}get isReady(){return this.componentStatus===i.ready}get isDestructed(){return this.componentStatus===i.destructed}get isInDestruct(){return i.beforeDestruct===this.componentStatus||i.destructed===this.componentStatus}bindDestruct(t){const e=()=>{!this.isInDestruct&&this.destruct()};return t.e&&t.e.on(i.beforeDestruct,e),this.hookStatus(i.beforeDestruct,(()=>{t.e&&t.e.off(i.beforeDestruct,e)})),this}destruct(){this.setStatus(i.destructed),r.get(this)&&r.delete(this)}get componentStatus(){return this.__componentStatus}set componentStatus(t){this.setStatus(t)}setStatus(t){return this.setStatusComponent(t,this)}setStatusComponent(t,e){if(t===this.__componentStatus)return;const s=Object.getPrototypeOf(this);s&&(0,o.isFunction)(s.setStatusComponent)&&s.setStatusComponent(t,e);const i=r.get(this),n=null==i?void 0:i[t];n&&n.length&&n.forEach((t=>t(e))),e===this&&(this.__componentStatus=t)}hookStatus(t,e){let s=r.get(this);s||(s={},r.set(this,s)),s[t]||(s[t]=[]),s[t].push(e)}}a.STATUSES=i;class l extends a{constructor(t){super(),this.setParentView(t)}get defaultTimeout(){return this.j.defaultTimeout}get j(){return this.jodit}i18n(t,...e){return this.j.i18n(t,...e)}setParentView(t){return this.jodit=t,t.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}}},(t,e,s)=>{"use strict";s.d(e,{as:()=>a,fe:()=>c,pw:()=>h,qz:()=>d,KQ:()=>u,ZO:()=>f,TB:()=>m});var i=s(14),o=s(15),n=s(8),r=s(3);const a={};let l=1;function c(){return l+=10*(Math.random()+1),Math.round(l).toString(16)}const h=new i.h,d={},u={},p=new WeakMap;function f(t,e,s="div",i=!1){const r=(0,n.getClassName)(e.prototype),a=p.get(t)||{},l=r+s,c=(0,n.isViewObject)(t)?t:t.j;if(!a[l]){let e=c.c,h=(0,n.isJoditObject)(t)&&t.o.shadowRoot?t.o.shadowRoot:t.od.body;if(i&&(0,n.isJoditObject)(t)&&t.od!==t.ed){e=t.createInside;const i="style"===s?t.ed.head:t.ed.body;h=(0,n.isJoditObject)(t)&&t.o.shadowRoot?t.o.shadowRoot:i}const d=e.element(s,{className:`jodit jodit-${(0,n.kebabCase)(r)}-container jodit-box`});d.classList.add("jodit_theme_"+(c.o.theme||"default")),h.appendChild(d),a[l]=d,t.hookStatus("beforeDestruct",(()=>{o.i.safeRemove(d),delete a[l],Object.keys(a).length&&p.delete(t)})),p.set(t,a)}return a[l].classList.remove("jodit_theme_default","jodit_theme_dark"),a[l].classList.add("jodit_theme_"+(c.o.theme||"default")),a[l]}const m=new r.ng},function(t,e,s){"use strict";s.d(e,{h:()=>o});var i=s(8);class o{constructor(){this.items=new Map}normalizeName(t){return(0,i.kebabCase)(t).toLowerCase()}add(t,e){this.items.set(this.normalizeName(t),e)}get(t){return this.items.get(this.normalizeName(t))}remove(t){this.items.delete(this.normalizeName(t))}init(t){const e=t.o.extraPlugins.map((t=>(0,i.isString)(t)?{name:t}:t)),s=(0,i.splitArray)(t.o.disablePlugins).map((t=>this.normalizeName(t))),n=[],r={},a=[],l={},c=(e,c)=>{var h;if(s.includes(c)||n.includes(c)||r[c])return;const d=null===(h=e)||void 0===h?void 0:h.requires;if(d&&(0,i.isArray)(d)&&this.hasDisabledRequires(s,d))return;const u=o.makePluginInstance(t,e);this.initOrWait(t,c,u,n,r),a.push(u),l[c]=u},h=this.loadExtras(t,e);return(0,i.callPromise)(h,(()=>{t.isInDestruct||(this.items.forEach(c),this.addListenerOnBeforeDestruct(t,a),t.__plugins=l)}))}hasDisabledRequires(t,e){return!(!(null==e?void 0:e.length)||!t.some((t=>e.includes(t))))}static makePluginInstance(t,e){return(0,i.isFunction)(e)?new e(t):e}initOrWait(t,e,s,n,r){const a=(e,s)=>{if((0,i.isInitable)(s)){const i=s.requires;if((null==i?void 0:i.length)&&!i.every((t=>n.includes(t))))return r[e]=s,!1;s.init(t),n.push(e)}else n.push(e);return s.hasStyle&&o.loadStyle(t,e),!0};a(e,s),Object.keys(r).forEach((t=>{const e=r[t];e&&a(t,e)&&(r[t]=void 0,delete r[t])}))}addListenerOnBeforeDestruct(t,e){t.e.on("beforeDestruct",(()=>{e.forEach((e=>{(0,i.isDestructable)(e)&&e.destruct(t)})),e.length=0,delete t.__plugins}))}load(t,e){return Promise.all(e.map((e=>{const s=e.url||o.getFullUrl(t,e.name,!0);return(0,i.appendScriptAsync)(t,s).then((t=>({v:t,status:"fulfilled"})),(t=>({e:t,status:"rejected"})))})))}static async loadStyle(t,e){const s=o.getFullUrl(t,e,!1);if(!this.styles.has(s))return this.styles.add(s),(0,i.appendStyleAsync)(t,s)}static getFullUrl(t,e,s){return e=(0,i.kebabCase)(e),t.basePath+"plugins/"+e+"/"+e+"."+(s?"js":"css")}loadExtras(t,e){if(e&&e.length)try{const s=e.filter((t=>!this.items.has(this.normalizeName(t.name))));if(s.length)return this.load(t,s)}catch(t){}}}o.styles=new Set},function(t,e,s){"use strict";s.d(e,{i:()=>r});var i=s(2),o=s(8),n=s(16);class r{static detach(t){for(;t.firstChild;)t.removeChild(t.firstChild)}static wrapInline(t,e,s){let i,n=t,a=t;s.s.save();let l=!1;do{l=!1,i=n.previousSibling,i&&!r.isBlock(i)&&(l=!0,n=i)}while(l);do{l=!1,i=a.nextSibling,i&&!r.isBlock(i)&&(l=!0,a=i)}while(l);const c=(0,o.isString)(e)?s.createInside.element(e):e;n.parentNode&&n.parentNode.insertBefore(c,n);let h=n;for(;h&&(h=n.nextSibling,c.appendChild(n),n!==a&&h);)n=h;return s.s.restore(),c}static wrap(t,e,s){const i=(0,o.isString)(e)?s.element(e):e;if(!t.parentNode)throw(0,o.error)("Element should be in DOM");return t.parentNode.insertBefore(i,t),i.appendChild(t),i}static unwrap(t){const e=t.parentNode;if(e){for(;t.firstChild;)e.insertBefore(t.firstChild,t);r.safeRemove(t)}}static each(t,e){let s=t.firstChild;if(s)for(;s;){const i=r.next(s,Boolean,t);if(!1===e(s))return!1;if(s.parentNode&&!r.each(s,e))return!1;s=i}return!0}static between(t,e,s){let i=t;for(;i&&i!==e&&(t===i||!s(i));){let t=i.firstChild||i.nextSibling;if(!t){for(;i&&!i.nextSibling;)i=i.parentNode;t=null==i?void 0:i.nextSibling}i=t}}static replace(t,e,s,i=!1,n=!1){const r=(0,o.isString)(e)?s.element(e):e;if(!n)for(;t.firstChild;)r.appendChild(t.firstChild);return i&&(0,o.toArray)(t.attributes).forEach((t=>{r.setAttribute(t.name,t.value)})),t.parentNode&&t.parentNode.replaceChild(r,t),r}static isEmptyTextNode(t){return r.isText(t)&&(!t.nodeValue||0===t.nodeValue.replace(i.INVISIBLE_SPACE_REG_EXP(),"").length)}static isEmpty(t,e=/^(img|svg|canvas|input|textarea|form)$/){return!t||(r.isText(t)?null==t.nodeValue||0===(0,o.trim)(t.nodeValue).length:!e.test(t.nodeName.toLowerCase())&&r.each(t,(t=>{if(r.isText(t)&&null!=t.nodeValue&&0!==(0,o.trim)(t.nodeValue).length||r.isElement(t)&&e.test(t.nodeName.toLowerCase()))return!1})))}static isNode(t){if(!t)return!1;const e=(0,o.get)("ownerDocument.defaultView",t);return!("object"!=typeof e||!e||"function"!=typeof e.Node&&"object"!=typeof e.Node)&&t instanceof e.Node}static isCell(t){return r.isNode(t)&&/^(td|th)$/i.test(t.nodeName)}static isImage(t){return r.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)}static isBlock(t){return!(0,o.isVoid)(t)&&"object"==typeof t&&r.isNode(t)&&i.IS_BLOCK.test(t.nodeName)}static isText(t){return!(!t||t.nodeType!==Node.TEXT_NODE)}static isElement(t){var e;return!!r.isNode(t)&&!(!(null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||t.nodeType!==Node.ELEMENT_NODE)}static isHTMLElement(t){var e;if(!r.isNode(t))return!1;const s=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(s&&t instanceof s.HTMLElement)}static isInlineBlock(t){return r.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&-1!==["inline","inline-block"].indexOf(""+(0,o.css)(t,"display"))}static canSplitBlock(t){return!(0,o.isVoid)(t)&&r.isHTMLElement(t)&&r.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)}static last(t,e){let s=null==t?void 0:t.lastChild;if(!s)return null;do{if(e(s))return s;let i=s.lastChild;if(i||(i=s.previousSibling),!i&&s.parentNode!==t){do{s=s.parentNode}while(s&&!(null==s?void 0:s.previousSibling)&&s.parentNode!==t);i=null==s?void 0:s.previousSibling}s=i}while(s);return null}static prev(t,e,s,i=!0){return r.find(t,e,s,!1,"previousSibling",!!i&&"lastChild")}static next(t,e,s,i=!0){return r.find(t,e,s,void 0,void 0,!!i&&"firstChild")}static prevWithClass(t,e){return r.prev(t,(t=>r.isElement(t)&&t.classList.contains(e)),t.parentNode)}static nextWithClass(t,e){return r.next(t,(t=>r.isElement(t)&&t.classList.contains(e)),t.parentNode)}static find(t,e,s,i=!1,o="nextSibling",n="firstChild"){if(i&&e(t))return t;let a,l=t;do{if(a=l[o],e(a))return a||null;if(n&&a&&a[n]){const t=r.find(a[n],e,a,!0,o,n);if(t)return t}a||(a=l.parentNode),l=a}while(l&&l!==s);return null}static findWithCurrent(t,e,s,i="nextSibling",o="firstChild"){let n=t;do{if(e(n))return n||null;if(o&&n&&n[o]){const t=r.findWithCurrent(n[o],e,n,i,o);if(t)return t}for(;n&&!n[i]&&n!==s;)n=n.parentNode;n&&n[i]&&n!==s&&(n=n[i])}while(n&&n!==s);return null}static findSibling(t,e=!0,s=(t=>!r.isEmptyTextNode(t))){const i=t=>e?t.previousSibling:t.nextSibling;let o=i(t);for(;o&&!s(o);)o=i(o);return o&&s(o)?o:null}static up(t,e,s,i=!1){let o=t;if(!o)return null;do{if(e(o))return o;if(o===s||!o.parentNode)break;o=o.parentNode}while(o&&o!==s);return o===s&&i&&e(o)?o:null}static closest(t,e,s){let i;return i=(0,o.isFunction)(e)?e:(0,o.isArray)(e)?t=>t&&e.includes(t.nodeName.toLowerCase()):t=>t&&e===t.nodeName.toLowerCase(),r.up(t,i,s)}static furthest(t,e,s){let i=null,o=null==t?void 0:t.parentElement;for(;o&&o!==s&&e(o);)i=o,o=null==o?void 0:o.parentElement;return i}static appendChildFirst(t,e){const s=t.firstChild;s?s!==e&&t.insertBefore(e,s):t.appendChild(e)}static after(t,e){const{parentNode:s}=t;s&&(s.lastChild===t?s.appendChild(e):s.insertBefore(e,t.nextSibling))}static before(t,e){const{parentNode:s}=t;s&&s.insertBefore(e,t)}static prepend(t,e){t.insertBefore(e,t.firstChild)}static append(t,e){(0,o.isArray)(e)?e.forEach((e=>{this.append(t,e)})):t.appendChild(e)}static moveContent(t,e,s=!1){const i=(t.ownerDocument||document).createDocumentFragment();(0,o.toArray)(t.childNodes).forEach((t=>{i.appendChild(t)})),s&&e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}static all(t,e,s=!1){let i=t.childNodes?(0,o.toArray)(t.childNodes):[];return e(t)?t:(s&&(i=i.reverse()),i.forEach((t=>{r.all(t,e,s)})),null)}static isOrContains(t,e,s=!1){return t===e?!s:!!(e&&t&&this.up(e,(e=>e===t),t,!0))}static safeRemove(t){t&&t.parentNode&&t.parentNode.removeChild(t)}static hide(t){t&&((0,o.dataBind)(t,"__old_display",t.style.display),t.style.display="none")}static show(t){if(!t)return;const e=(0,o.dataBind)(t,"__old_display");"none"===t.style.display&&(t.style.display=e||"")}static isTag(t,e){const s=(0,o.asArray)(e).map(String);for(let e=0;s.length>e;e+=1)if(this.isElement(t)&&t.tagName.toLowerCase()===s[e].toLowerCase())return!0;return!1}static markTemporary(t,e){return e&&(0,o.attr)(t,e),(0,o.attr)(t,"data-jodit-temp",!0),t}static isTemporary(t){return!!r.isElement(t)&&(n.P.isMarker(t)||"true"===(0,o.attr)(t,"data-jodit-temp"))}static replaceTemporaryFromString(t){return t.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")}static temporaryList(t){return(0,o.$$)("[data-jodit-temp]",t)}}},function(t,e,s){"use strict";s.d(e,{R:()=>f,P:()=>h});var i=s(2),o=s(15),n=s(8);function r(t){return!(!t||o.i.isEmptyTextNode(t)||o.i.isTemporary(t))}function a(t,e,s){if(!e)return!1;const{element:i,elementIsDefault:a,options:l}=t,c=!(!l.style||!((t,e)=>!(o.i.isTag(t,"font")||!o.i.isHTMLElement(t)||!Object.keys(e).every((s=>{const i=(0,n.css)(t,s,!0);return!(0,n.isVoid)(i)&&""!==i&&!(0,n.isVoid)(e[s])&&(""+(0,n.normalizeCssValue)(s,e[s])).toLowerCase()===(""+i).toLowerCase()}))))(e,l.style)),h=e.nodeName.toLowerCase()===i;return!!((!a||!s)&&h||c&&r(e))||!(h||s||!a||!o.i.isInlineBlock(e))}var l=s(18),c=s(17);class h{constructor(t){this.jodit=t,t.e.on("removeMarkers",(()=>{this.removeMarkers()}))}get j(){return this.jodit}errorNode(t){if(!o.i.isNode(t))throw(0,n.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,n.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){const t=this.sel;return t&&t.rangeCount?t.getRangeAt(0):this.createRange()}createRange(t=!1){const e=this.doc.createRange();return t&&this.selectRange(e),e}remove(){const t=this.sel,e=this.current();if(t&&e)for(let e=0;t.rangeCount>e;e+=1)t.getRangeAt(e).deleteContents(),t.getRangeAt(e).collapse(!0)}clear(){var t,e;(null===(t=this.sel)||void 0===t?void 0:t.rangeCount)&&(null===(e=this.sel)||void 0===e||e.removeAllRanges())}removeNode(t){if(!o.i.isOrContains(this.j.editor,t,!0))throw(0,n.error)("Selection.removeNode can remove only editor's children");o.i.safeRemove(t),this.j.e.fire("afterRemoveNode",t)}insertCursorAtPoint(t,e){this.removeMarkers();try{const s=this.createRange();return(()=>{if(this.doc.caretPositionFromPoint){const i=this.doc.caretPositionFromPoint(t,e);if(i)return void s.setStart(i.offsetNode,i.offset)}if(this.doc.caretRangeFromPoint){const i=this.doc.caretRangeFromPoint(t,e);s.setStart(i.startContainer,i.startOffset)}})(),s.collapse(!0),this.selectRange(s),!0}catch(t){}return!1}static isMarker(t){return o.i.isNode(t)&&o.i.isTag(t,"span")&&t.hasAttribute("data-"+i.MARKER_CLASS)}get hasMarkers(){return!!this.markers.length}get markers(){return(0,n.$$)("span[data-"+i.MARKER_CLASS+"]",this.area)}removeMarkers(){this.markers.forEach(o.i.safeRemove)}marker(t=!1,e){let s=null;e&&(s=e.cloneRange(),s.collapse(t));const n=this.j.createInside.span();return n.id=i.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),n.style.lineHeight="0",n.style.display="none",n.setAttribute("data-"+i.MARKER_CLASS,t?"start":"end"),n.appendChild(this.j.createInside.text(i.INVISIBLE_SPACE)),s&&o.i.isOrContains(this.area,t?s.startContainer:s.endContainer)&&s.insertNode(n),n}restore(){let t=!1;const e=t=>`span[data-${i.MARKER_CLASS}=${t?"start":"end"}]`,s=this.area.querySelector(e(!0)),n=this.area.querySelector(e(!1));if(s){if(t=this.createRange(),n)t.setStartAfter(s),o.i.safeRemove(s),t.setEndBefore(n),o.i.safeRemove(n);else{const e=s.previousSibling;o.i.isText(e)?t.setStart(e,e.nodeValue?e.nodeValue.length:0):t.setStartBefore(s),o.i.safeRemove(s),t.collapse(!0)}t&&this.selectRange(t)}}save(t=!1){if(this.hasMarkers)return[];const e=this.sel;if(!e||!e.rangeCount)return[];const s=[],i=e.rangeCount,o=[];for(let t=0;i>t;t+=1)if(o[t]=e.getRangeAt(t),o[t].collapsed){const e=this.marker(!0,o[t]);s[t]={startId:e.id,collapsed:!0,startMarker:e.outerHTML}}else{const e=this.marker(!0,o[t]),i=this.marker(!1,o[t]);s[t]={startId:e.id,endId:i.id,collapsed:!1,startMarker:e.outerHTML,endMarker:i.outerHTML}}if(!t){e.removeAllRanges();for(let t=i-1;t>=0;--t){const i=this.doc.getElementById(s[t].startId);if(i)if(s[t].collapsed)o[t].setStartAfter(i),o[t].collapse(!0);else if(o[t].setStartBefore(i),s[t].endId){const e=this.doc.getElementById(s[t].endId);e&&o[t].setEndAfter(e)}try{e.addRange(o[t].cloneRange())}catch(t){}}}return s}focus(t={preventScroll:!0}){var e,s;if(!this.isFocused()){const i=(0,n.getScrollParent)(this.j.container),r=null==i?void 0:i.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(),this.win.focus(),this.area.focus(t),r&&(null==i?void 0:i.scrollTo)&&i.scrollTo(0,r);const a=this.sel,l=(null==a?void 0:a.rangeCount)?null==a?void 0:a.getRangeAt(0):null;if(!l||!o.i.isOrContains(this.area,l.startContainer)){const t=this.createRange();t.setStart(this.area,0),t.collapse(!0),this.selectRange(t,!1)}return this.j.editorIsActive||null===(s=null===(e=this.j)||void 0===e?void 0:e.events)||void 0===s||s.fire("focus"),!0}return!1}isCollapsed(){const t=this.sel;for(let e=0;t&&t.rangeCount>e;e+=1)if(!t.getRangeAt(e).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(t=!0){if(this.j.getRealMode()===i.MODE_WYSIWYG){const e=this.sel;if(!e||0===e.rangeCount)return null;const s=e.getRangeAt(0);let i=s.startContainer,n=!1;const r=t=>n?t.lastChild:t.firstChild;if(o.i.isTag(i,"br")&&e.isCollapsed)return i;if(!o.i.isText(i)){if(i=s.startContainer.childNodes[s.startOffset],i||(i=s.startContainer.childNodes[s.startOffset-1],n=!0),i&&e.isCollapsed&&!o.i.isText(i))if(!n&&o.i.isText(i.previousSibling))i=i.previousSibling;else if(t){let t=r(i);for(;t;){if(t&&o.i.isText(t)){i=t;break}t=r(t)}}if(i&&!e.isCollapsed&&!o.i.isText(i)){let t=i,e=i;do{t=t.firstChild,e=e.lastChild}while(t&&e&&!o.i.isText(t));t===e&&t&&o.i.isText(t)&&(i=t)}}if(i&&o.i.isOrContains(this.area,i))return i}return null}insertNode(t,e=!0,s=!0){var n;this.errorNode(t),this.j.e.fire("safeHTML",t),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());const r=this.sel;if(this.isCollapsed()||this.j.execCommand("Delete"),r&&r.rangeCount){const e=r.getRangeAt(0);o.i.isOrContains(this.area,e.commonAncestorContainer)?o.i.isTag(e.startContainer,i.INSEPARABLE_TAGS)&&e.collapsed?null===(n=e.startContainer.parentNode)||void 0===n||n.insertBefore(t,e.startContainer):(e.deleteContents(),e.insertNode(t)):this.area.appendChild(t)}else this.area.appendChild(t);e&&(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t.lastChild&&this.setCursorAfter(t.lastChild):this.setCursorAfter(t)),s&&this.j.events&&this.j.e.fire("synchro"),this.j.events&&this.j.e.fire("afterInsertNode",t)}insertHTML(t){if(""===t)return;const e=this.j.createInside.div(),s=this.j.createInside.fragment();let i;if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),o.i.isNode(t)?e.appendChild(t):e.innerHTML=""+t,(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",e.innerHTML))&&(i=e.lastChild,i)){for(;e.firstChild;)i=e.firstChild,s.appendChild(e.firstChild);this.insertNode(s,!1,!1),i?this.setCursorAfter(i):this.setCursorIn(s),this.j.e&&this.j.e.fire("synchro")}}insertImage(t,e=null,s=null){const i=(0,n.isString)(t)?this.j.createInside.element("img"):t;if((0,n.isString)(t)&&i.setAttribute("src",t),null!=s){let t=""+s;t&&"auto"!==t&&0>(t+"").indexOf("px")&&0>(t+"").indexOf("%")&&(t+="px"),(0,n.call)(this.j.o.resizer.forImageChangeAttributes?n.attr:n.css,i,"width",t)}e&&"object"==typeof e&&(0,n.css)(i,e);const o=()=>{(i.offsetHeight>i.naturalHeight||i.offsetWidth>i.naturalWidth)&&(i.style.width="",i.style.height=""),i.removeEventListener("load",o)};this.j.e.on(i,"load",o),i.complete&&o(),this.insertNode(i),this.j.e.fire("afterInsertImage",i)}eachSelection(t){const e=this.sel;if(e&&e.rangeCount){const s=e.getRangeAt(0),r=[],a=s.startOffset,l=this.area.childNodes.length,c=l>a?a:l-1,d=s.startContainer===this.area?this.area.childNodes[c]:s.startContainer,u=s.endContainer===this.area?this.area.childNodes[s.endOffset-1]:s.endContainer;o.i.find(d,(t=>(!t||t===this.area||o.i.isEmptyTextNode(t)||h.isMarker(t)||r.push(t),t===u||t&&t.contains&&t.contains(u))),this.area,!0,"nextSibling",!1);const p=e=>{if(o.i.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,n.toArray)(e.childNodes).forEach(p);if(o.i.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{const t=this.j.createInside.text(i.INVISIBLE_SPACE);e.appendChild(t),e=t}t(e)}};0===r.length&&o.i.isEmptyTextNode(d)&&r.push(d),r.forEach(p)}}cursorInTheEdge(t,e){var s,r;const a=!t,l=null===(s=this.sel)||void 0===s?void 0:s.getRangeAt(0),c=this.current(!1);if(!l||!c||!o.i.isOrContains(e,c,!0))return null;const h=t?l.startContainer:l.endContainer,d=t?l.startOffset:l.endOffset,u=t=>t&&!o.i.isTag(t,"br")&&!o.i.isEmptyTextNode(t);if(o.i.isText(h)){const e=(null===(r=h.nodeValue)||void 0===r?void 0:r.length)?h.nodeValue:"";if(a&&e.replace((0,i.INVISIBLE_SPACE_REG_EXP_END)(),"").length>d)return!1;const s=(0,i.INVISIBLE_SPACE_REG_EXP_START)().exec(e);if(t&&(s&&d>s[0].length||!s&&d>0))return!1}else{const t=(0,n.toArray)(h.childNodes);if(a){if(t.slice(d).some(u))return!1}else if(t.slice(0,d).some(u))return!1}return!(0,n.call)(t?o.i.prev:o.i.next,c,u,e)}cursorOnTheLeft(t){return this.cursorInTheEdge(!0,t)}cursorOnTheRight(t){return this.cursorInTheEdge(!1,t)}setCursorAfter(t){return this.setCursorNearWith(t,!1)}setCursorBefore(t){return this.setCursorNearWith(t,!0)}setCursorNearWith(t,e){var s,r;if(this.errorNode(t),!o.i.up(t,(t=>t===this.area||t&&t.parentNode===this.area),this.area))throw(0,n.error)("Node element must be in editor");const a=this.createRange();let l=null;return o.i.isText(t)?e?a.setStart(t,0):a.setEnd(t,null!==(r=null===(s=t.nodeValue)||void 0===s?void 0:s.length)&&void 0!==r?r:0):(l=this.j.createInside.text(i.INVISIBLE_SPACE),e?a.setStartBefore(t):a.setEndAfter(t),a.collapse(e),a.insertNode(l),a.selectNode(l)),a.collapse(e),this.selectRange(a),l}setCursorIn(t,e=!1){if(this.errorNode(t),!o.i.up(t,(t=>t===this.area||t&&t.parentNode===this.area),this.area))throw(0,n.error)("Node element must be in editor");const s=this.createRange();let r=t,a=t;do{if(o.i.isText(r))break;a=r,r=e?r.firstChild:r.lastChild}while(r);if(!r){const t=this.j.createInside.text(i.INVISIBLE_SPACE);/^(img|br|input)$/i.test(a.nodeName)?r=a:(a.appendChild(t),a=t)}return s.selectNodeContents(r||a),s.collapse(e),this.selectRange(s),a}selectRange(t,e=!0){const s=this.sel;e&&!this.isFocused()&&this.focus(),s&&(s.removeAllRanges(),s.addRange(t)),this.j.e.fire("changeSelection")}select(t,e=!1){if(this.errorNode(t),!o.i.up(t,(t=>t===this.area||t&&t.parentNode===this.area),this.area))throw(0,n.error)("Node element must be in editor");const s=this.createRange();s[e?"selectNodeContents":"selectNode"](t),this.selectRange(s)}get html(){const t=this.sel;if(t&&t.rangeCount>0){const e=t.getRangeAt(0).cloneContents(),s=this.j.createInside.div();return s.appendChild(e),s.innerHTML}return""}*wrapInTagGen(){if(this.isCollapsed()){const t=this.jodit.createInside.element("font",i.INVISIBLE_SPACE);this.insertNode(t,!1,!1);const[e]=this.markers;return e?t.appendChild(e):(this.setCursorIn(t),this.save()),yield t,void o.i.unwrap(t)}if((0,n.$$)("*[style*=font-size]",this.area).forEach((t=>(0,n.attr)(t,"data-font-size",""+t.style.fontSize))),this.isCollapsed()){const t=this.j.createInside.element("font");(0,n.attr)(t,"size",7),this.insertNode(t,!1,!1)}else this.j.nativeExecCommand("fontsize",!1,"7");(0,n.$$)("*[data-font-size]",this.area).forEach((t=>{const e=(0,n.attr)(t,"data-font-size");e&&(t.style.fontSize=e,(0,n.attr)(t,"data-font-size",null))}));const t=(0,n.$$)('font[size="7"]',this.area);for(const e of t){const{firstChild:t,lastChild:s}=e;t&&t===s&&h.isMarker(t)||(t&&h.isMarker(t)&&o.i.before(e,t),s&&h.isMarker(s)&&o.i.after(e,s),yield e),o.i.unwrap(e)}}wrapInTag(t){const e=[];for(const s of this.wrapInTagGen())try{if(s.firstChild&&s.firstChild===s.lastChild&&h.isMarker(s.firstChild))continue;(0,n.isFunction)(t)?t(s):e.push(o.i.replace(s,t,this.j.createInside))}finally{const t=s.parentNode;t&&(o.i.unwrap(s),o.i.isEmpty(t)&&o.i.unwrap(t))}return e}applyStyle(t,e={}){new f({style:t,element:e.element,className:e.className,defaultTag:e.defaultTag}).apply(this.j)}splitSelection(t){if(!this.isCollapsed())return null;const e=this.createRange(),s=this.range;e.setStartBefore(t);const n=this.cursorOnTheRight(t),r=this.cursorOnTheLeft(t),a=this.j.createInside.element("br"),l=this.j.createInside.text(i.INVISIBLE_SPACE),c=l.cloneNode();try{if(n||r){s.insertNode(a);const t=(t,e)=>{let s=e(t);for(;s;){const t=e(s);if(!s||!o.i.isTag(s,"br")&&!o.i.isEmptyTextNode(s))break;o.i.safeRemove(s),s=t}};t(a,(t=>t.nextSibling)),t(a,(t=>t.previousSibling)),o.i.after(a,c),o.i.before(a,l),n?(e.setEndBefore(a),s.setEndBefore(a)):(e.setEndAfter(a),s.setEndAfter(a))}else e.setEnd(s.startContainer,s.startOffset);const i=e.extractContents();if(t.parentNode)try{if(t.parentNode.insertBefore(i,t),n&&(null==a?void 0:a.parentNode)){const t=this.createRange();t.setStartBefore(a),this.selectRange(t)}}catch(t){}const h=t=>{var e,s,i;(null===(e=null==t?void 0:t.parentNode)||void 0===e?void 0:e.firstChild)===(null===(s=null==t?void 0:t.parentNode)||void 0===s?void 0:s.lastChild)&&(null===(i=null==t?void 0:t.parentNode)||void 0===i||i.appendChild(a.cloneNode()))};h(l),h(c)}finally{o.i.safeRemove(l),o.i.safeRemove(c)}return t.previousElementSibling}}function d(t,e,s){const i=e.extractContents();i.textContent&&(0,n.trim)(i.textContent).length||!i.firstChild||o.i.unwrap(i.firstChild),t.parentNode&&(0,n.call)(s?o.i.before:o.i.after,t,i)}function u(t,e,s){if(/^(OL|UL)$/i.test(t.element)&&!o.i.isTag(e.firstElementChild,"li")){const i=o.i.replace(e,"li",s),n=o.i.wrap(i,t.element,s);if(n)return n}return e}function p(t,e,s,i,l,c){if(((t,e)=>!!o.i.closest(t,["style","script"],e))(e,s))return c;const p=((t,e,s)=>{const{parentNode:i}=e;return!i||o.i.next(e,r,i)||o.i.prev(e,r,i)||!a(t,i,!1)||i===s||o.i.isBlock(i)&&!t.elementIsBlock?null:i})(t,e,s)||((t,e)=>{let{firstChild:s}=e;for(;s&&!r(s);)if(s=s.nextSibling,!s)return null;return s&&!o.i.next(s,r,e)&&a(t,s,!1)?s:null})(t,e)||((t,e,s,i)=>{const n=o.i.closest(e,(e=>a(t,e,!0)),s);if(n){if(t.elementIsBlock)return n;const s=i(),o=h.isMarker(e.previousSibling)?e.previousSibling:e;s.setStartBefore(n),s.setEndBefore(o),d(n,s,!0);const r=h.isMarker(e.nextSibling)?e.nextSibling:e;return s.setStartAfter(r),s.setEndAfter(n),d(n,s,!1),n}return null})(t,e,s,i);if(p)return((t,e,s)=>{const{options:{style:i},defaultTag:r,element:a}=t,l=e.nodeName.toLowerCase(),c=t.elementIsDefault&&o.i.isInlineBlock(e);i&&(l===r||c)&&Object.keys(i).forEach((t=>{!1===s||(0,n.css)(e,t)===(0,n.normalizeCssValue)(t,i[t])?((0,n.css)(e,t,""),null==s&&(s=!1)):((0,n.css)(e,t,i[t]),null==s&&(s=!0))}));const h=o.i.isBlock(e),d=!h&&(!(0,n.attr)(e,"style")||l!==r&&l===a);return(d||!d&&h&&l===a)&&(o.i.unwrap(e),null==s&&(s=!1)),s})(t,p,c);if(((t,e)=>{const s=[];let i;return e.firstChild&&o.i.find(e.firstChild,(e=>(e&&a(t,e,!0)?(void 0===i&&(i=!0),s.push(e)):void 0===i&&(i=!1),!1)),e,!0),s.forEach(o.i.unwrap),!!i})(t,e))return c;if(null==c&&(c=!0),!c)return c;let f=e;if(t.elementIsBlock){const n=/^(ul|ol|li|td|th|tr|tbody|table)$/i;f=o.i.up(e,(e=>!(!o.i.isBlock(e)||!n.test(t.element)&&n.test(e.nodeName))),s)||((t,e,s,i,n)=>{const r=(t,e="previousSibling")=>{let i=t,n=t;for(;n&&(i=n,n=n[e]?n[e]:n.parentNode&&!o.i.isBlock(n.parentNode)&&n.parentNode!==s?n.parentNode:null,!o.i.isBlock(n)););return i},a=r(e),l=r(e,"nextSibling"),c=n();c.setStartBefore(a),c.setEndAfter(l);const h=c.extractContents();let d=i.element(t.element);return d.appendChild(h),c.insertNode(d),t.elementIsBlock&&(d=u(t,d,i),o.i.isEmpty(d)&&!o.i.isTag(d.firstElementChild,"br")&&d.appendChild(i.element("br"))),d})(t,e,s,l,i)}const m=o.i.replace(f,t.element,l,!0);return(0,n.attr)(m,"size",null),t.elementIsBlock&&u(t,m,l),t.options.style&&t.elementIsDefault&&(0,n.css)(m,t.options.style),t.options.className&&m.classList.toggle(t.options.className),c}(0,l.gn)([c.autobind],h.prototype,"focus",null),(0,l.gn)([c.autobind],h.prototype,"setCursorAfter",null),(0,l.gn)([c.autobind],h.prototype,"setCursorBefore",null),(0,l.gn)([c.autobind],h.prototype,"setCursorIn",null);class f{constructor(t){this.options=t}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!(!this.options.element||!i.IS_BLOCK.test(this.options.element))}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(t){((t,e)=>{const{s,editor:i,createInside:o}=t,r=()=>s.createRange();let a=null;s.save(),(0,n.normalizeNode)(s.area.firstChild);const l=t.s.wrapInTagGen();let c=l.next();for(;!c.done;)a=p(e,c.value,i,r,o,a),c=l.next();s.restore()})(t,this)}}},function(t,e,s){"use strict";s.r(e),s.d(e,{autobind:()=>C,cache:()=>o,component:()=>r,debounce:()=>l,getPropertyDescriptor:()=>g,hook:()=>d,idle:()=>h,nonenumerable:()=>u,persistent:()=>p,throttle:()=>c,wait:()=>f,watch:()=>v});var i=s(8);function o(t,e,s){const o=s.get;if(!o)throw(0,i.error)("Getter property descriptor expected");s.get=function(){const t=o.call(this);return t&&!0===t.noCache||Object.defineProperty(this,e,{configurable:s.configurable,enumerable:s.enumerable,writable:!1,value:t}),t}}const n=t=>(0,i.isFunction)(t.className)?t.className():NaN;function r(t){class e extends t{constructor(...t){super(...t);const s=Object.getPrototypeOf(this)===e.prototype,i=n(this)===n(e.prototype);(s||i)&&this.setStatus("ready")}}return e.prototype.constructor=t,e}var a=s(12);function l(t,e=!1,s="debounce"){return(o,n)=>{if(!(0,i.isFunction)(o[n]))throw(0,i.error)("Handler must be a Function");o.hookStatus(a.n$.ready,(o=>{const r=(0,i.isViewObject)(o)?o:o.jodit,a=(0,i.isFunction)(t)?t(o):t;o[n]=r.async[s](o[n].bind(o),(0,i.isNumber)(a)||(0,i.isPlainObject)(a)?a:r.defaultTimeout,e)}))}}function c(t,e=!1){return l(t,e,"throttle")}function h(){return(t,e)=>{if(!(0,i.isFunction)(t[e]))throw(0,i.error)("Handler must be a Function");t.hookStatus(a.n$.ready,(t=>{const s=(0,i.isViewObject)(t)?t:t.jodit,o=t[e];t[e]=(...e)=>s.async.requestIdleCallback(o.bind(t,...e))}))}}function d(t){return(e,s)=>{if(!(0,i.isFunction)(e[s]))throw(0,i.error)("Handler must be a Function");e.hookStatus(t,(t=>{e[s].call(t)}))}}const u=(t,e)=>{!1!==(Object.getOwnPropertyDescriptor(t,e)||{}).enumerable&&Object.defineProperty(t,e,{enumerable:!1,set(t){Object.defineProperty(this,e,{enumerable:!1,writable:!0,value:t})}})};function p(t,e){t.hookStatus(a.n$.ready,(t=>{const s=(0,i.isViewObject)(t)?t:t.jodit,o=`${s.options.namespace}${t.componentName}_prop_${e}`,n=t[e];Object.defineProperty(t,e,{get(){var t;return null!==(t=s.storage.get(o))&&void 0!==t?t:n},set(t){s.storage.set(o,t)}})}))}function f(t){return(e,s)=>{if(!(0,i.isFunction)(e[s]))throw(0,i.error)("Handler must be a Function");e.hookStatus(a.n$.ready,(e=>{const o=(0,i.isViewObject)(e)?e.async:e.j.async,n=e[s];let r=0;e[s]=function s(...i){o.clearTimeout(r),t(e)?n.apply(e,i):r=o.setTimeout((()=>s(...i)),10)}}))}}var m=s(3);function g(t,e){let s;do{s=Object.getOwnPropertyDescriptor(t,e),t=Object.getPrototypeOf(t)}while(!s&&t);return s}function v(t,e){return(s,o)=>{if(!(0,i.isFunction)(s[o]))throw(0,i.error)("Handler must be a Function");const n=n=>{const r=(t,...e)=>{if(!n.isInDestruct)return n[o](t,...e)};(0,i.splitArray)(t).forEach((t=>{if(/:/.test(t)){const[s,o]=t.split(":"),a=(0,i.isViewObject)(n)?n:n.jodit;return s.length&&(e=n.get(s)),(0,i.isFunction)(e)&&(e=e(n)),a.events.on(e||n,o,r),e||a.events.on(o,r),void a.hookStatus("beforeDestruct",(()=>{a.events.off(e||n,o,r).off(o,r)}))}const o=t.split("."),[a]=o;let l=n[a];if(l instanceof m.P5)l.on("change."+t,r);else if((0,i.isPlainObject)(l)&&o.length>1){const e=m.P5.create(l,[a]);e.on("change."+t,r),n[a]=e}else{const e=g(s,a);Object.defineProperty(n,a,{configurable:!0,set(s){const o=l;o!==s&&(l=s,e&&e.set&&e.set.call(n,s),(0,i.isPlainObject)(l)&&(l=m.P5.create(l,[a]),l.on("change."+t,r)),r(a,o,l))},get(){return e&&e.get?e.get.call(n):l}})}}))};(0,i.isFunction)(s.hookStatus)?s.hookStatus(a.n$.ready,n):n(s)}}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t=>typeof t:t=>t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t,b(t)}function w(t,e,s){var i=s.value;if("function"!=typeof i)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(b(i)));var o=!1;return{configurable:!0,get(){if(o||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof i)return i;var s=i.bind(this);return o=!0,Object.defineProperty(this,e,{configurable:!0,get:()=>s,set(t){i=t,delete this[e]}}),o=!1,s},set(t){i=t}}}function y(t){var e;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype)))),e.forEach((e=>{if("constructor"!==e){var s=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof s.value&&Object.defineProperty(t.prototype,e,w(t,e,s))}})),t}function C(){return 1===arguments.length?y.apply(void 0,arguments):w.apply(void 0,arguments)}},(t,e,s)=>{"use strict";function i(t,e,s,i){var o,n=arguments.length,r=3>n?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(3>n?o(r):n>3?o(e,s,r):o(e,s))||r);return n>3&&r&&Object.defineProperty(e,s,r),r}s.d(e,{gn:()=>i})},(t,e,s)=>{"use strict";function i(){let t=!0;try{const e=document.createElement("input");e.type="color",t="color"===e.type&&"number"!=typeof e.selectionStart}catch(e){t=!1}return t}s.d(e,{EO:()=>i,Zt:()=>v,kJ:()=>o.k,jn:()=>n,Z$:()=>g,Xy:()=>a,LP:()=>l,mf:()=>c.m,FP:()=>d,I4:()=>u,Gu:()=>m,GN:()=>w,Zu:()=>C,A1:()=>x,QC:()=>E.Q,hj:()=>S,kE:()=>b.k,PO:()=>k,tI:()=>T.t,HD:()=>h.H,PX:()=>I,r1:()=>q,f2:()=>j,nj:()=>f.n,FJ:()=>_});var o=s(7);function n(t){return"boolean"==typeof t}var r=s(20);function a(t,e){return t===e||(0,r.P)(t)===(0,r.P)(e)}function l(t,e){return t===e}var c=s(6),h=s(5);const d=t=>(0,h.H)(t)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(t.replace(/[\r\n]/g,""));function u(t){return-1!==t.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==t.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==t.search(/style="[^"]*mso-/)&&-1!==t.search(/<font/)}var p=s(15),f=s(21);function m(t){return!(0,f.n)(t)&&(0,c.m)(t.init)}function g(t){return!(0,f.n)(t)&&(0,c.m)(t.destruct)}function v(t){return!(0,f.n)(t)&&p.i.isElement(t.container)}var b=s(22);function w(t){return(0,h.H)(t)&&(0,b.k)(t)&&(t=parseFloat(t)),"number"==typeof t&&Number.isFinite(t)&&!(t%1)}var y=s(13);function C(t){return!!(t&&t instanceof Object&&(0,c.m)(t.constructor)&&("undefined"!=typeof Jodit&&t instanceof Jodit||t.isJodit))}function j(t){return!!(t&&t instanceof Object&&(0,c.m)(t.constructor)&&(t instanceof y.qz.View||t.isView))}const x=t=>(0,h.H)(t)&&23===t.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(t);var E=s(23);function S(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function _(t){return null!=t&&t===t.window}function k(t){return!(!t||"object"!=typeof t||t.nodeType||_(t)||t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))}var T=s(24);function I(t){if(t.includes(" "))return!1;if("undefined"!=typeof URL)try{const e=new URL(t);return["https:","http:","ftp:","file:","rtmp:"].includes(e.protocol)}catch(t){return!1}const e=document.createElement("a");return e.href=t,!!e.hostname}function q(t){return!!t.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_.]/.test(t)}},(t,e,s)=>{"use strict";function i(t,e={}){if("object"!=typeof t)return t+"";const s=new Set(e.excludeKeys),i=new WeakMap;return JSON.stringify(t,((t,e)=>{if(!s.has(t)){if("object"==typeof e&&null!=e){if(i.get(e))return"[refObject]";i.set(e,!0)}return e}}),e.prettify)}s.d(e,{P:()=>i})},(t,e,s)=>{"use strict";function i(t){return null==t}s.d(e,{n:()=>i})},(t,e,s)=>{"use strict";s.d(e,{k:()=>o});var i=s(5);function o(t){if((0,i.H)(t)){if(!t.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;t=parseFloat(t)}return"number"==typeof t&&!isNaN(t)&&isFinite(t)}},(t,e,s)=>{"use strict";function i(t){return!!t&&"function"===(typeof t).toLowerCase()&&(t===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(t+""))}s.d(e,{Q:()=>i})},(t,e,s)=>{"use strict";function i(t){return t&&"function"==typeof t.then}s.d(e,{t:()=>i})},(t,e,s)=>{"use strict";s.d(e,{i:()=>r,b:()=>a});var i=s(19),o=s(26),n=s(27);function r(t,e,s,a=!1){const l=/^left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size/i;if((0,i.jn)(s)&&(a=s,s=void 0),(0,i.PO)(e)||void 0!==s){const a=(t,e,s)=>{!(0,i.nj)(s)&&l.test(e)&&(0,i.kE)(""+s)&&(s=parseInt(""+s,10)+"px"),void 0===s||null!=s&&r(t,e,!0)===(0,o.Zh)(e,s)||(t.style[e]=s)};if((0,i.PO)(e)){const s=Object.keys(e);for(let i=0;s.length>i;i+=1)a(t,(0,n.eV)(s[i]),e[s[i]])}else a(t,(0,n.eV)(e),s);return""}const c=(0,n.GL)(e),h=t.ownerDocument||document,d=!!h&&(h.defaultView||h.parentWindow),u=t.style[e];let p="";return void 0!==u&&""!==u?p=u:d&&!a&&(p=d.getComputedStyle(t).getPropertyValue(c)),l.test(e)&&/^[-+]?[0-9.]+px$/.test(""+p)&&(p=parseInt(""+p,10)),(0,o.Zh)(e,p)}const a=t=>{"block"===r(t,"display")&&r(t,"display","");const{style:e}=t;"auto"===e.marginLeft&&"auto"===e.marginRight&&(e.marginLeft="",e.marginRight="")}},(t,e,s)=>{"use strict";s.d(e,{ut:()=>g,Zh:()=>m,T2:()=>n,Pd:()=>r,Tz:()=>l,AH:()=>c,Jf:()=>h,aC:()=>d,D5:()=>u});var i=s(27),o=s(2);function n(t){const e={};return t.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map((t=>(0,i.fy)(t.toLowerCase()))).map((t=>o.KEY_ALIASES[t]||t)).sort().filter((t=>!e[t]&&""!==t&&(e[t]=!0))).join("+")}const r=(t,e=8)=>{const s=[];for(;t.length;)s.push(t.substr(0,e)),t=t.substr(e);return s[1]=s[1].replace(/./g,"*"),s[2]=s[2].replace(/./g,"*"),s.join("-")};var a=s(15);const l=t=>{if(t){if(a.i.isText(t)&&null!=t.nodeValue&&t.parentNode)for(;a.i.isText(t.nextSibling);)null!=t.nextSibling.nodeValue&&(t.nodeValue+=t.nextSibling.nodeValue),t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),a.i.safeRemove(t.nextSibling);else l(t.firstChild);l(t.nextSibling)}},c=(...t)=>t.filter((t=>(0,i.fy)(t).length)).map(((e,s)=>(e=e.replace(/([^:])[\\/]+/g,"$1/"),s&&(e=e.replace(/^\//,"")),s!==t.length-1&&(e=e.replace(/\/$/,"")),e))).join("/"),h=t=>t.split("/").reduce(((t,e)=>{switch(e){case"":case".":break;case"..":t.pop();break;default:t.push(e)}return t}),[]).join("/")+(t.endsWith("/")?"/":""),d=t=>/^[0-9]+$/.test(""+t)?t+"px":""+t,u=(...t)=>t.filter((t=>t.length)).map((t=>t.replace(/\/$/,""))).join("/").replace(/([^:])[\\/]+/g,"$1/");var p=s(19),f=s(29);function m(t,e){if("font-weight"===(0,i.GL)(t)){switch((""+e).toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,p.kE)(e)?Number(e):e}return/color/i.test(t)&&/^rgb/i.test(""+e)&&(0,f.h)(""+e)||e}const g=t=>{const e=["#"];let s=(0,f.h)(t);if(!s)return!1;if(s=(0,i.fy)(s.toUpperCase()),s=s.substr(1),3===s.length){for(let t=0;3>t;t+=1)e.push(s[t]),e.push(s[t]);return e.join("")}return s.length>6&&(s=s.substr(0,6)),"#"+s}},(t,e,s)=>{"use strict";s.d(e,{gP:()=>r,eV:()=>i,ag:()=>g,GL:()=>n,gB:()=>m,Pz:()=>o.P,fy:()=>l,as:()=>c,Ps:()=>h});const i=t=>t.replace(/([-_])(.)/g,((t,e,s)=>s.toUpperCase()));var o=s(20);const n=t=>t.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),r=t=>t.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();var a=s(2);function l(t){return t.replace((0,a.SPACE_REG_EXP_END)(),"").replace((0,a.SPACE_REG_EXP_START)(),"")}function c(t){return t.replace((0,a.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,a.INVISIBLE_SPACE_REG_EXP_START)(),"")}function h(t){return t.length?t[0].toUpperCase()+t.substr(1):""}var d=s(1),u=s(28),p=s(8),f=s(13);const m=(t,e)=>{if(!e||!e.length)return t;const s=/%([sd])/g;let i=s.exec(t),o=t,n=0;for(;i&&void 0!==e[n];)o=o.replace(i[0],""+e[n]),n+=1,i=s.exec(t);return o},g=(t,e,s)=>{if(!(0,p.isString)(t))throw(0,p.error)("i18n: Need string in first argument");if(!t.length)return t;const i=!(void 0===s||!s.debugLanguage);let o;const n=t=>e&&e.length?m(t,e):t,r=(0,u.X)(d.D.defaultOptions.language,d.D.defaultOptions.language),a=(0,u.X)(null==s?void 0:s.language,r),l=e=>{if(!e)return;if((0,p.isString)(e[t]))return n(e[t]);const s=t.toLowerCase();if((0,p.isString)(e[s]))return n(e[s]);const i=(0,p.ucfirst)(t);return(0,p.isString)(e[i])?n(e[i]):void 0};o=void 0!==f.KQ[a]?f.KQ[a]:void 0!==f.KQ[r]?f.KQ[r]:f.KQ.en;const c=null==s?void 0:s.i18n;if(c&&c[a]){const t=l(c[a]);if(t)return t}return l(o)||(f.KQ.en&&(0,p.isString)(f.KQ.en[t])&&f.KQ.en[t]?n(f.KQ.en[t]):i?"{"+t+"}":n(t))}},(t,e,s)=>{"use strict";s.d(e,{X:()=>o});var i=s(19);const o=(t,e="en")=>"auto"!==t&&(0,i.HD)(t)?t:document.documentElement&&document.documentElement.lang?document.documentElement.lang:navigator.language?navigator.language.substr(0,2):e},(t,e,s)=>{"use strict";s.d(e,{h:()=>i});const i=t=>{if("rgba(0, 0, 0, 0)"===t||""===t)return!1;if(!t)return"#000000";if("#"===t.substr(0,1))return t;const e=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(t);if(!e)return"#000000";const s=parseInt(e[2],10),i=parseInt(e[3],10);let o=(parseInt(e[4],10)|i<<8|s<<16).toString(16).toUpperCase();for(;6>o.length;)o="0"+o;return e[1]+"#"+o}},(t,e,s)=>{"use strict";s.d(e,{U:()=>n});var i=s(5),o=s(21);function n(t,e){if(!(0,i.H)(t)||!t.length)return null;const s=t.split(".");let n=e;for(const t of s){if((0,o.n)(n[t]))return null;n=n[t]}return(0,o.n)(n)?null:n}},(t,e,s)=>{"use strict";s.d(e,{q:()=>n});var i=s(10),o=s(23);const n=(...t)=>{var e;return((0,o.Q)(Array.from)?Array.from:null!==(e=(0,i.mc)("Array.from"))&&void 0!==e?e:Array.from).apply(Array,t)}},function(t,e,s){"use strict";s.d(e,{zx:()=>o.zx,JO:()=>h.J,GI:()=>n.G,ko:()=>u,eC:()=>c.eC,y3:()=>o.y3,mA:()=>c.mA,u1:()=>i.u,Z:()=>c.Z,x4:()=>c.x4,qe:()=>a.q,u3:()=>c.u3,bz:()=>l.b,lU:()=>r.l,GJ:()=>c.GJ});var i=s(33),o=s(36),n=s(42),r=s(40),a=s(39),l=s(37),c=s(43),h=s(35),d=s(15);class u extends i.u{className(){return"ProgressBar"}render(){return"<div><div></div></div>"}show(){return(this.j.workplace||this.j.container).appendChild(this.container),this}hide(){return d.i.safeRemove(this.container),this}progress(t){return this.container.style.width=t.toFixed(2)+"%",this}destruct(){return this.hide(),super.destruct()}}},function(t,e,s){"use strict";s.d(e,{u:()=>l});var i=s(12),o=s(15),n=s(34),r=s(8),a=s(35);class l extends i.Hr{constructor(t,e){super(t),this.name="",this.__parentElement=null,this.mods={},this.container=this.createContainer(e),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}get parentElement(){return this.__parentElement}set parentElement(t){this.__parentElement=t,t&&t.hookStatus("beforeDestruct",(()=>this.destruct())),this.updateParentElement(this)}bubble(t){let e=this.parentElement;for(;e;)t(e),e=e.parentElement;return this}updateParentElement(t){var e;return null===(e=this.__parentElement)||void 0===e||e.updateParentElement(t),this}get(t,e){return super.get(t,e)||this.getElm(t)}closest(t){const e="object"==typeof t?e=>e===t:e=>e instanceof t;let s=this.__parentElement;for(;s;){if(e(s))return s;s=!s.parentElement&&s.container.parentElement?l.closestElement(s.container.parentElement,l):s.parentElement}return null}static closestElement(t,e){const s=o.i.up(t,(t=>{if(t){const{component:s}=t;return s&&s instanceof e}return!1}));return s?null==s?void 0:s.component:null}setMod(t,e,s=this.container){return n.$.setMod.call(this,t,e,s),this}getMod(t){return n.$.getMod.call(this,t)}getElm(t){return n.F.getElm.call(this,t)}getElms(t){return n.F.getElms.call(this,t)}update(){}appendTo(t){return t.appendChild(this.container),this}clearName(t){return t.replace(/[^a-zA-Z0-9]/g,"_")}render(t){return this.j.c.div(this.componentName)}createContainer(t){const e=this.render(t);if((0,r.isString)(e)){const t=this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,((t,e)=>a.J.get(e)||"")).replace(/&__/g,this.componentName+"__").replace(/~([^~]+?)~/g,((t,e)=>this.i18n(e))));return t.classList.add(this.componentName),t}return e}destruct(){return o.i.safeRemove(this.container),this.parentElement=null,super.destruct()}}},function(t,e,s){"use strict";s.d(e,{F:()=>o,$:()=>n});var i=s(31);class o{static getElm(t){return this.container.querySelector("."+this.getFullElName(t))}static getElms(t){return(0,i.q)(this.container.querySelectorAll("."+this.getFullElName(t)))}}class n{static setMod(t,e,s){if(t=t.toLowerCase(),this.mods[t]===e)return;const o=`${this.componentName}_${t}`,n=(s||this.container).classList;(0,i.q)(n).forEach((t=>{0===t.indexOf(o)&&n.remove(t)})),null!=e&&""!==e&&n.add(`${o}_${(""+e).toLowerCase()}`),this.mods[t]=e}static getMod(t){var e;return null!==(e=this.mods[t])&&void 0!==e?e:null}}},function(t,e,s){"use strict";s.d(e,{J:()=>o});var i=s(25);class o{static getIcon(t){return/<svg/i.test(t)?t:o.icons[t]||o.icons[t.replace(/-/g,"_")]||o.icons[t.toLowerCase()]}static exists(t){return void 0!==this.getIcon(t)}static get(t,e="<span></span>"){return this.getIcon(t)||e}static set(t,e){this.icons[t.replace("_","-")]=e}static makeIcon(t,e){var s;let n;if(e){const r=e.name.replace(/[^a-zA-Z0-9]/g,"_");if(e.iconURL)n=t.c.span(),(0,i.i)(n,"backgroundImage","url("+e.iconURL.replace("{basePath}",(null==t?void 0:t.basePath)||"")+")");else{const i=t.e.fire("getIcon",e.name,e,r)||o.get(e.name,"")||(null===(s=t.o.extraIcons)||void 0===s?void 0:s[e.name]);i&&(n=t.c.fromHTML(i.trim()),/^<svg/i.test(e.name)||n.classList.add("jodit-icon_"+r))}}return n&&(n.classList.add("jodit-icon"),n.style.fill=e.fill),n}}o.icons={}},function(t,e,s){"use strict";s.d(e,{zx:()=>p,y3:()=>u,Yc:()=>d});var i=s(18),o=s(33),n=s(15),r=s(8),a=s(35),l=s(37),c=s(17),h=s(12);const d=()=>({size:"middle",type:"button",name:"",value:"",status:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:""},tooltip:"",text:"",tabIndex:void 0});let u=class extends o.u{constructor(t,e){super(t),this.isButton=!0,this.state=d(),this.actionHandlers=[],this.updateSize(),this.onChangeSize(),this.onChangeStatus(),e&&this.hookStatus(h.n$.ready,(()=>{this.setState(e)}))}className(){return"UIButton"}setState(t){return Object.assign(this.state,t),this}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,r.attr)(this.container,"type",this.state.type)}updateSize(){const t=this.closest(l.b);t&&(this.state.size=t.buttonSize)}onChangeStatus(){this.setMod("status",this.state.status)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text)}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,r.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,r.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,r.attr)(this.container,"data-ref",this.state.name),(0,r.attr)(this.container,"ref",this.state.name)}onChangeTooltip(){this.get("j.o.useNativeTooltip")&&(0,r.attr)(this.container,"title",this.state.tooltip),(0,r.attr)(this.container,"aria-label",this.state.tooltip)}onChangeTabIndex(){(0,r.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){const t=this.get("j.o.textIcons");if(!0===t||(0,r.isFunction)(t)&&t(this.state.name))return;n.i.detach(this.icon);const e=a.J.makeIcon(this.j,this.state.icon);e&&this.icon.appendChild(e)}focus(){this.container.focus()}isFocused(){const{activeElement:t}=this.od;return!(!t||!n.i.isOrContains(this.container,t))}createContainer(){const t=this.componentName,e=this.j.c.element("button",{class:t,type:"button",role:"button",ariaPressed:!1});return this.icon=this.j.c.span(t+"__icon"),this.text=this.j.c.span(t+"__text"),e.appendChild(this.icon),e.appendChild(this.text),this.j.e.on(e,"click",this.onActionFire),e}destruct(){return this.j.e.off(this.container),super.destruct()}onAction(t){return this.actionHandlers.push(t),this}onActionFire(t){t.buffer={actionTrigger:this},this.actionHandlers.forEach((e=>e.call(this,t)))}};function p(t,e,s,i){const o=new u(t);return o.state.tabIndex=t.o.allowTabNavigation?0:-1,(0,r.isString)(e)?(o.state.icon.name=e,o.state.name=e,i&&(o.state.status=i),s&&(o.state.text=s)):o.setState(e),o}(0,i.gn)([(0,c.watch)("state.size")],u.prototype,"onChangeSize",null),(0,i.gn)([(0,c.watch)("state.type")],u.prototype,"onChangeType",null),(0,i.gn)([(0,c.watch)("parentElement")],u.prototype,"updateSize",null),(0,i.gn)([(0,c.watch)("state.status")],u.prototype,"onChangeStatus",null),(0,i.gn)([(0,c.watch)("state.text")],u.prototype,"onChangeText",null),(0,i.gn)([(0,c.watch)("state.text")],u.prototype,"onChangeTextSetMode",null),(0,i.gn)([(0,c.watch)("state.disabled")],u.prototype,"onChangeDisabled",null),(0,i.gn)([(0,c.watch)("state.activated")],u.prototype,"onChangeActivated",null),(0,i.gn)([(0,c.watch)("state.name")],u.prototype,"onChangeName",null),(0,i.gn)([(0,c.watch)("state.tooltip")],u.prototype,"onChangeTooltip",null),(0,i.gn)([(0,c.watch)("state.tabIndex")],u.prototype,"onChangeTabIndex",null),(0,i.gn)([(0,c.watch)("state.icon")],u.prototype,"onChangeIcon",null),(0,i.gn)([c.autobind],u.prototype,"onActionFire",null),u=(0,i.gn)([c.component],u);var f=s(39);let m=class extends f.q{constructor(t,e={radio:!0}){var s,i;super(t,null===(s=e.options)||void 0===s?void 0:s.map((e=>{const s=new u(t,{text:e.text,value:e.value,status:"primary"});return s.onAction((()=>{this.select(e.value)})),s})),e),this.options=e,this.select(null!==(i=e.value)&&void 0!==i?i:0)}className(){return"UIButtonGroup"}render(t){return`<div>\n\t\t\t<div class="&__label">~${t.label}~</div>\n\t\t\t<div class="&__options"></div>\n\t\t</div>`}appendChildToContainer(t){this.getElm("options").appendChild(t)}select(t){var e,s;this.elements.forEach(((e,s)=>{s===t||e.state.value===t?e.state.activated=!0:this.options.radio&&(e.state.activated=!1)}));const i=this.elements.filter((t=>t.state.activated)).map((t=>({text:t.state.text,value:t.state.value})));this.jodit.e.fire(this,"select",i),null===(s=(e=this.options).onChange)||void 0===s||s.call(e,i)}};m=(0,i.gn)([c.component],m)},function(t,e,s){"use strict";s.d(e,{b:()=>p});var i=s(18),o=s(36),n=s(38),r=s(1),a=s(19),l=s(8),c=s(17),h=s(39),d=s(40),u=s(41);let p=class extends h.q{constructor(t){super(t),this.mode="horizontal",this.removeButtons=[],this.onChangeMode()}className(){return"UIList"}onChangeMode(){this.setMod("mode",this.mode)}makeGroup(){return new h.q(this.jodit)}get buttons(){return this.allChildren.filter((t=>t instanceof o.y3))}getButtonsNames(){return this.buttons.map((t=>t instanceof o.y3&&t.state.name||"")).filter((t=>""!==t))}setRemoveButtons(t){return this.removeButtons=t||[],this}build(t,e=null){t=(0,l.splitArray)(t),this.clear();let s,i=!1,o=this.makeGroup();this.append(o);const c=t=>{let n=null;switch(t.name){case"\n":o=this.makeGroup(),s=this.makeGroup(),o.append(s),this.append(o);break;case"|":i||(i=!0,n=new d.l(this.j));break;default:i=!1,n=this.makeButton(t,e)}n&&(s||(s=this.makeGroup(),o.append(s)),s.append(n))},h=t=>!this.removeButtons.includes(t.name);return t.forEach((t=>{if((0,u.A)(t)){const e=t.buttons.filter((t=>t));e.length&&(s=this.makeGroup(),o.append(s),s.setMod("separated",!0).setMod("group",t.group),((t,e)=>((0,a.kJ)(t)?t:(0,l.keys)(t,!1).map((e=>(0,l.ConfigProto)({name:e},t[e]||{})))).map((t=>(0,n.Y)(t,e||r.D.defaultOptions.controls))))(e,this.j.o.controls).filter(h).forEach(c))}else{const e=(0,n.Y)(t,this.j.o.controls);h(e)&&c(e)}})),this.update(),this}makeButton(t,e){return new o.y3(this.j)}};(0,i.gn)([(0,c.watch)("mode")],p.prototype,"onChangeMode",null),p=(0,i.gn)([c.component],p)},(t,e,s)=>{"use strict";s.d(e,{Y:()=>n,z:()=>r});var i=s(8),o=s(1);function n(t,e){let s;return e||(e=o.D.defaultOptions.controls),(0,i.isString)(t)?s=r(t,e)||{name:t,command:t,tooltip:t}:(s={name:"empty",...(0,i.ConfigFlatten)(t)},void 0!==e[s.name]&&(s={...(0,i.ConfigFlatten)(e[s.name]),...(0,i.ConfigFlatten)(s)})),s}function r(t,e){let[s,o]=t.split(/\./),n=e;return null!=o?void 0!==e[s]&&(n=e[s]):o=s,n[o]?{name:o,...(0,i.ConfigFlatten)(n[o])}:void 0}},function(t,e,s){"use strict";s.d(e,{q:()=>c});var i,o=s(18),n=s(33),r=s(17),a=s(8),l=s(15);let c=i=class extends n.u{constructor(t,e,s){super(t,s),this.syncMod=!1,this.elements=[],this.buttonSize="middle",null==e||e.forEach((t=>t&&this.append(t))),(null==s?void 0:s.name)&&(this.name=s.name)}className(){return"UIGroup"}get allChildren(){const t=[],e=[...this.elements];for(;e.length;){const s=e.shift();(0,a.isArray)(s)?e.push(...s):s instanceof i?e.push(...s.elements):s&&t.push(s)}return t}update(){this.elements.forEach((t=>t.update())),this.setMod("size",this.buttonSize)}append(t,e){return(0,a.isArray)(t)?(t.forEach((t=>this.append(t))),this):(this.elements.push(t),t.name&&t.container.classList.add(this.getFullElName(t.name)),e?this.getElm(e).appendChild(t.container):this.appendChildToContainer(t.container),t.parentElement=this,t.update(),this)}setMod(t,e){return this.syncMod&&this.elements.forEach((s=>s.setMod(t,e))),super.setMod(t,e)}appendChildToContainer(t){this.container.appendChild(t)}remove(t){const e=this.elements.indexOf(t);return-1!==e&&(this.elements.splice(e,1),l.i.safeRemove(t.container),t.parentElement=null),this}clear(){return this.elements.forEach((t=>t.destruct())),this.elements.length=0,this}destruct(){return this.clear(),super.destruct()}};(0,o.gn)([(0,r.watch)("buttonSize")],c.prototype,"update",null),c=i=(0,o.gn)([r.component],c)},(t,e,s)=>{"use strict";s.d(e,{l:()=>r});var i=s(18),o=s(33),n=s(17);let r=class extends o.u{className(){return"UISeparator"}};r=(0,i.gn)([n.component],r)},(t,e,s)=>{"use strict";s.d(e,{A:()=>o,q:()=>n});var i=s(19);const o=t=>(0,i.kJ)(t.buttons),n=t=>new Set(t.reduce(((t,e)=>(o(e)?t.push(...e.buttons):t.push(e),t)),[]))},function(t,e,s){"use strict";s.d(e,{G:()=>c});var i=s(18),o=s(15),n=s(8),r=s(13),a=s(33),l=s(17);class c extends a.u{constructor(t,e=!0){super(t),this.smart=e,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,n.attr)(this.container,"role","popup")}className(){return"Popup"}updateParentElement(t){return t!==this&&t instanceof c&&(this.childrenPopups.forEach((e=>{!t.closest(e)&&e.isOpened&&e.close()})),this.childrenPopups.has(t)||this.j.e.on(t,"beforeClose",(()=>{this.childrenPopups.delete(t)})),this.childrenPopups.add(t)),super.updateParentElement(t)}setContent(t){o.i.detach(this.container);const e=this.j.c.div(this.componentName+"__content");let s;return t instanceof a.u?(s=t.container,t.parentElement=this):s=(0,n.isString)(t)?this.j.c.fromHTML(t):t,e.appendChild(s),this.container.appendChild(e),this.updatePosition(),this}open(t,e=!1){(0,n.markOwner)(this.jodit,this.container),this.isOpened=!0,this.addGlobalListeners(),this.targetBound=e?this.getKeepBound(t):t;const s=(0,r.ZO)(this.jodit,c);return s!==this.container.parentElement&&s.appendChild(this.container),this.updatePosition(),this.j.e.fire(this,"afterOpen"),this}getKeepBound(t){const e=t(),s=this.od.elementFromPoint(e.left,e.top);if(!s)return t;const i=o.i.isHTMLElement(s)?s:s.parentElement,r=(0,n.position)(i,this.j);return()=>{const e=t(),s=(0,n.position)(i,this.j);return{...e,top:e.top+(s.top-r.top),left:e.left+(s.left-r.left)}}}updatePosition(){if(!this.isOpened)return this;const[t,e]=this.calculatePosition(this.targetBound(),this.viewBound(),(0,n.position)(this.container,this.j));return this.setMod("strategy",e),(0,n.css)(this.container,{left:t.left,top:t.top}),this.childrenPopups.forEach((t=>t.updatePosition())),this}throttleUpdatePosition(){this.updatePosition()}calculatePosition(t,e,s,i=this.strategy){const o={left:t.left,right:t.left-(s.width-t.width)},r={bottom:t.top+t.height,top:t.top-s.height},a=Object.keys(o).reduce(((t,e)=>t.concat(Object.keys(r).map((t=>`${e}${(0,n.ucfirst)(t)}`)))),[]),l=t=>{const[e,i]=(0,n.kebabCase)(t).split("-");return{left:o[e],top:r[i],width:s.width,height:s.height}},h=t=>{let e=null;return e=c.boxInView(l(i),t)?i:a.find((e=>{if(c.boxInView(l(e),t))return e}))||null,e};let d=h((0,n.position)(this.j.container,this.j));return d&&c.boxInView(l(d),e)||(d=h(e)||d||i),[l(d),d]}static boxInView(t,e){return!(-2>t.top-e.top||-2>t.left-e.left||-2>e.top+e.height-(t.top+t.height)||-2>e.left+e.width-(t.left+t.width))}close(){return this.isOpened?(this.isOpened=!1,this.childrenPopups.forEach((t=>t.close())),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.removeGlobalListeners(),o.i.safeRemove(this.container),this):this}closeOnOutsideClick(t){if(!this.isOpened)return;if(!t.target)return void this.close();const e=a.u.closestElement(t.target,c);e&&(this===e||e.closest(this))||this.close()}addGlobalListeners(){const t=this.throttleUpdatePosition,e=this.ow;r.TB.on("closeAllPopups",this.close),this.smart&&this.j.e.on("escape",this.close).on("mousedown touchstart",this.closeOnOutsideClick).on(e,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.on("closeAllPopups",this.close).on("resize",t).on(this.container,"scroll mousewheel",t).on(e,"scroll",t).on(e,"resize",t),o.i.up(this.j.container,(e=>{e&&this.j.e.on(e,"scroll mousewheel",t)}))}removeGlobalListeners(){const t=this.throttleUpdatePosition,e=this.ow;r.TB.off("closeAllPopups",this.close),this.smart&&this.j.e.off("escape",this.close).off("mousedown touchstart",this.closeOnOutsideClick).off(e,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.off("closeAllPopups",this.close).off("resize",t).off(this.container,"scroll mousewheel",t).off(e,"scroll",t).off(e,"resize",t),o.i.up(this.j.container,(e=>{e&&this.j.e.off(e,"scroll mousewheel",t)}))}setZIndex(t){this.container.style.zIndex=""+t}destruct(){return this.close(),super.destruct()}}(0,i.gn)([l.autobind],c.prototype,"updatePosition",null),(0,i.gn)([(0,l.throttle)(10),l.autobind],c.prototype,"throttleUpdatePosition",null),(0,i.gn)([l.autobind],c.prototype,"close",null),(0,i.gn)([l.autobind],c.prototype,"closeOnOutsideClick",null)},function(t,e,s){"use strict";s.d(e,{eC:()=>E,mA:()=>v,Z:()=>C,x4:()=>x,u3:()=>m,Cj:()=>w,GJ:()=>g});var i={};s.r(i),s.d(i,{required:()=>d,url:()=>u});var o=s(18),n=s(39),r=s(33),a=s(8),l=s(15),c=s(17),h=s(35);const d=t=>!!(0,a.trim)(t.value).length||(t.error="Please fill out this field",!1),u=t=>!!(0,a.isURL)((0,a.trim)(t.value))||(t.error="Please enter a web address",!1),p=t=>!!(0,a.trim)(t.value).length||(t.error="Please fill out this field",!1);var f;let m=f=class extends r.u{constructor(t,e){super(t,e),this.label=this.j.c.span(this.getFullElName("label")),this.icon=this.j.c.span(this.getFullElName("icon")),this.clearButton=this.j.c.span(this.getFullElName("clear"),h.J.get("cancel")),this.state={...f.defaultState},this.__errorBox=this.j.c.span(this.getFullElName("error")),this.validators=new Set([]),Object.assign(this.state,e),void 0!==this.state.clearButton&&(this.j.e.on(this.clearButton,"click",(t=>{t.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()}className(){return"UIInput"}onChangeClear(){this.state.clearButton?l.i.after(this.nativeInput,this.clearButton):l.i.safeRemove(this.clearButton)}onChangeClassName(t,e){e&&this.container.classList.remove(e),this.state.className&&this.container.classList.add(this.state.className)}onChangeState(){this.name=this.state.name;const t=this.nativeInput,{name:e,icon:s,type:i,ref:o,required:n,placeholder:r,autocomplete:c,label:d}=this.state;(0,a.attr)(t,"name",e),(0,a.attr)(t,"type",i),(0,a.attr)(t,"data-ref",o||e),(0,a.attr)(t,"ref",o||e),(0,a.attr)(t,"required",n||null),(0,a.attr)(t,"autocomplete",c?null:"off"),(0,a.attr)(t,"placeholder",r?this.j.i18n(r):""),s&&h.J.exists(s)?(l.i.before(t,this.icon),this.icon.innerHTML=h.J.get(s)):l.i.safeRemove(this.icon),d?(l.i.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(d)):l.i.safeRemove(this.label),this.updateValidators()}updateValidators(){var t;this.validators.clear(),this.state.required&&this.validators.add(d),null===(t=this.state.validators)||void 0===t||t.forEach((t=>{const e=i[t];e&&this.validators.add(e)}))}set error(t){this.setMod("has-error",!!t),t?(this.__errorBox.innerText=this.j.i18n(t,this.j.i18n(this.state.label||"")),this.container.appendChild(this.__errorBox)):l.i.safeRemove(this.__errorBox)}get value(){return this.nativeInput.value}set value(t){this.value!==t&&(this.nativeInput.value=t,this.onChangeValue())}onChangeStateValue(){this.value=this.state.value}onChangeValue(){var t,e;const{value:s}=this;this.state.value=s,this.j.e.fire(this,"change",s),null===(e=(t=this.state).onChange)||void 0===e||e.call(t,s)}validate(){return this.error="",(0,a.toArray)(this.validators).every((t=>t(this)))}createContainer(t){const e=super.createContainer();this.wrapper=this.j.c.div(this.getFullElName("wrapper")),this.nativeInput||(this.nativeInput=this.createNativeInput());const{nativeInput:s}=this;return s.classList.add(this.getFullElName("input")),this.wrapper.appendChild(s),e.appendChild(this.wrapper),(0,a.attr)(s,"dir",this.j.o.direction||"auto"),e}createNativeInput(t){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)}};m.defaultState={className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]},(0,o.gn)([(0,c.watch)("state.clearButton")],m.prototype,"onChangeClear",null),(0,o.gn)([(0,c.watch)("state.className")],m.prototype,"onChangeClassName",null),(0,o.gn)([(0,c.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"]),(0,c.debounce)()],m.prototype,"onChangeState",null),(0,o.gn)([(0,c.watch)("state.value")],m.prototype,"onChangeStateValue",null),(0,o.gn)([c.autobind],m.prototype,"onChangeValue",null),m=f=(0,o.gn)([c.component],m);let g=class extends m{className(){return"UITextArea"}createContainer(t){return this.nativeInput=this.j.create.element("textarea"),super.createContainer(t)}};g=(0,o.gn)([c.component],g);let v=class extends m{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}constructor(t,e){super(t,{...e,type:"checkbox"})}};var b;v=(0,o.gn)([c.component],v);let w=b=class extends m{constructor(t,e){super(t,e),this.state={...b.defaultState},Object.assign(this.state,e)}className(){return"UISelect"}createContainer(t){var e;const s=super.createContainer(t),{j:i}=this,{nativeInput:o}=this,n=()=>i.create.element("option");if(void 0!==t.placeholder){const e=n();e.value="",e.text=i.i18n(t.placeholder),o.add(e)}return null===(e=t.options)||void 0===e||e.forEach((t=>{const e=n();e.value=""+t.value,e.text=i.i18n(t.text),o.add(e)})),t.size&&t.size>0&&(0,a.attr)(o,"size",t.size),t.multiple&&(0,a.attr)(o,"multiple",""),s}createNativeInput(){return this.j.create.element("select")}updateValidators(){super.updateValidators(),this.state.required&&(this.validators.delete(d),this.validators.add(p))}};w.defaultState={...m.defaultState,options:[],size:1,multiple:!1},w=b=(0,o.gn)([c.component],w);var y=s(36);let C=class extends m{constructor(t,e){super(t,{type:"file",...e}),this.state={...m.defaultState,type:"file",onlyImages:!0}}className(){return"UIFileInput"}createContainer(t){this.button=new y.y3(this.j,{icon:{name:"plus"}});const{container:e}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(t));const{nativeInput:s}=this;return s.classList.add(this.getFullElName("input")),e.classList.add(this.componentName),e.appendChild(s),e}createNativeInput(t){return this.j.create.fromHTML(`<input\n\t\t\ttype="file"\n\t\t\taccept="${t.onlyImages?"image/*":"*"}"\n\t\t\ttabindex="-1"\n\t\t\tdir="auto"\n\t\t\tmultiple=""\n\t\t/>`)}};C=(0,o.gn)([c.component],C);var j=s(9);let x=class extends n.q{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){const t=this.allChildren.filter((t=>t instanceof m));for(const e of t)if(!e.validate())return!1;const e=this.allChildren.filter((t=>t instanceof w));for(const t of e)if(!t.validate())return!1;return!0}onSubmit(t){this.j.e.on(this.container,"submit",(()=>{const e=this.allChildren.filter((t=>t instanceof m));return!!this.validate()&&(t(e.reduce(((t,e)=>(t[e.state.name]=e.value,t)),{})),!1)}))}createContainer(){const t=this.j.c.element("form");return t.classList.add(this.componentName),(0,j.Lj)(t,"dir",this.j.o.direction||"auto"),t}};x=(0,o.gn)([c.component],x);let E=class extends n.q{constructor(t,e,s={align:"left"}){super(t,e),this.options=s,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),(0,j.Lj)(this.container,"data-ref",s.ref),(0,j.Lj)(this.container,"ref",s.ref)}className(){return"UIBlock"}};E=(0,o.gn)([c.component],E)},t=>{t.exports={"Type something":"Start writing...",pencil:"Edit",Quadrate:"Square"}},t=>{t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M36 4h-24c-2.21 0-4 1.79-4 4v32c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4v-32c0-2.21-1.79-4-4-4zm-24 4h10v16l-5-3-5 3v-16z"/> </svg>'},(t,e,s)=>{"use strict";s.d(e,{YW:()=>r,ov:()=>l,IL:()=>a});var i=s(8),o=s(32),n=s(15);const r=(t,e,s)=>{const r="jodit-color-picker",a=(0,i.normalizeColor)(s),l=t.c.div(r),c=t.o.textIcons?`<span>${t.i18n("palette")}</span>`:o.JO.get("palette"),h=t=>{const e=[];return(0,i.isPlainObject)(t)?Object.keys(t).forEach((s=>{e.push(`<div class="${r}__group ${r}__group-${s}">`),e.push(h(t[s])),e.push("</div>")})):(0,i.isArray)(t)&&t.forEach((t=>{e.push(`<span class='${r}__color-item ${a===t?r+"__color-item_active_true":""}' title="${t}" style="background-color:${t}" data-color="${t}"></span>`)})),e.join("")};l.appendChild(t.c.fromHTML(`<div class="${r}__groups">${h(t.o.colors)}</div>`)),l.appendChild(t.c.fromHTML(`<div data-ref="extra" class="${r}__extra"></div>`));const{extra:d}=(0,i.refs)(l);return t.o.showBrowserColorPicker&&(0,i.hasBrowserColorPicker)()&&(d.appendChild(t.c.fromHTML(`<div class="${r}__native">${c}<input type="color" value="#ffffff"/></div>`)),t.e.on(l,"change",(t=>{t.stopPropagation();const s=t.target;if(!s||!s.tagName||!n.i.isTag(s,"input"))return;const o=s.value||"";(0,i.isFunction)(e)&&e(o),t.preventDefault()}))),t.e.on(l,"mousedown touchend",(s=>{s.stopPropagation();let o=s.target;if(o&&o.tagName&&!n.i.isTag(o,"svg")&&!n.i.isTag(o,"path")||!o.parentNode||(o=n.i.closest(o.parentNode,"span",t.editor)),!n.i.isTag(o,"span")||!o.classList.contains(r+"__color-item"))return;const a=(0,i.attr)(o,"-color")||"";e&&(0,i.isFunction)(e)&&e(a),s.preventDefault()})),t.e.fire("afterGenerateColorPicker",l,d,e,a),l},a=(t,e,s)=>{const n=t.c.div("jodit-tabs"),r=t.c.div("jodit-tabs__wrapper"),a=t.c.div("jodit-tabs__buttons"),l={},c=[];let h="",d=0;if(n.appendChild(a),n.appendChild(r),e.forEach((({icon:n,name:u,content:p})=>{const f=t.c.div("jodit-tab"),m=(0,o.zx)(t,n||u,u);h||(h=u),a.appendChild(m.container),c.push(m),m.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+e.length),(0,i.isFunction)(p)?f.appendChild(t.c.div("jodit-tab_empty")):f.appendChild(p),r.appendChild(f),m.onAction((()=>(c.forEach((t=>{t.state.activated=!1})),(0,i.$$)(".jodit-tab",r).forEach((t=>{t.classList.remove("jodit-tab_active")})),m.state.activated=!0,f.classList.add("jodit-tab_active"),(0,i.isFunction)(p)&&p.call(t),s&&(s.__activeTab=u),!1))),l[u]={button:m,tab:f},d+=1})),!d)return n;(0,i.$$)("a",a).forEach((t=>{t.style.width=(100/d).toFixed(10)+"%"}));const u=s&&s.__activeTab&&l[s.__activeTab]?s.__activeTab:h;return l[u].button.state.activated=!0,l[u].tab.classList.add("jodit-tab_active"),n},l=(t,e,s,r,l=!0)=>{let c;const h=[];if(e.upload&&t.o.uploader&&(t.o.uploader.url||t.o.uploader.insertImageAsBase64URI)){const s=t.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${t.i18n(l?"Drop image":"Drop file")}</strong><span><br>${t.i18n("or click")}</span><input type="file" accept="${l?"image/*":"*"}" tabindex="-1" dir="auto" multiple=""/></div>`);t.uploader.bind(s,(s=>{const o=(0,i.isFunction)(e.upload)?e.upload:t.o.uploader.defaultHandlerSuccess;(0,i.isFunction)(o)&&o.call(t,s),t.e.fire("closeAllPopups")}),(e=>{t.e.fire("errorMessage",e.message),t.e.fire("closeAllPopups")})),h.push({icon:"upload",name:"Upload",content:s})}if(e.filebrowser&&(t.o.filebrowser.ajax.url||t.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){r&&r(),e.filebrowser&&t.filebrowser.open(e.filebrowser,l)}}),e.url){const r=new o.y3(t,{type:"submit",status:"primary",text:"Insert"}),a=new o.x4(t,[new o.u3(t,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new o.u3(t,{name:"text",label:"Alternative text"}),new o.eC(t,[r])]);c=null,s&&!n.i.isText(s)&&(n.i.isTag(s,"img")||(0,i.$$)("img",s).length)&&(c="IMG"===s.tagName?s:(0,i.$$)("img",s)[0],(0,i.val)(a.container,"input[name=url]",(0,i.attr)(c,"src")),(0,i.val)(a.container,"input[name=text]",(0,i.attr)(c,"alt")),r.state.text="Update"),s&&n.i.isTag(s,"a")&&((0,i.val)(a.container,"input[name=url]",(0,i.attr)(s,"href")),(0,i.val)(a.container,"input[name=text]",(0,i.attr)(s,"title")),r.state.text="Update"),a.onSubmit((s=>{(0,i.isFunction)(e.url)&&e.url.call(t,s.url,s.text)})),h.push({icon:"link",name:"URL",content:a.container})}return a(t,h)}},(t,e,s)=>{"use strict";s.d(e,{z:()=>o});var i=s(8);const o=(t,e)=>{e&&"normal"!==e?"center"!==e?((0,i.css)(t,"float",e),(0,i.clearCenterAlign)(t)):(0,i.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,i.css)(t,"float")&&-1!==["right","left"].indexOf((""+(0,i.css)(t,"float")).toLowerCase())&&(0,i.css)(t,"float",""),(0,i.clearCenterAlign)(t))}},(t,e,s)=>{"use strict";var i=s(9);e.Z=[{name:"eye",tooltip:"Open link",exec(t,e){const s=(0,i.Lj)(e,"href");e&&s&&t.ow.open(s)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"]},(t,e,s)=>{"use strict";s.d(e,{A:()=>a});var i=s(15),o=s(19),n=s(8),r=s(47);const a={name:"left",childTemplate:(t,e,s)=>s,list:["Left","Right","Center","Normal"],exec(t,e,{control:s}){if(!i.i.isTag(e,["img","jodit","jodit-media"]))return;const n=s.args&&(0,o.HD)(s.args[0])?s.args[0].toLowerCase():"";if(!n)return!1;(0,r.z)(e,n),i.i.isTag(e,["jodit","jodit-media"])&&e.firstElementChild&&(0,r.z)(e.firstElementChild,n),t.setEditorValue(),t.e.fire("recalcPositionPopup")},tooltip:"Horizontal align"};e.Z=[{name:"delete",icon:"bin",tooltip:"Delete",exec(t,e){e&&t.s.removeNode(e)}},{name:"pencil",exec(t,e){"img"===e.tagName.toLowerCase()&&t.e.fire("openImageProperties",e)},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom","Normal"],tooltip:"Vertical align",exec(t,e,{control:s}){if(!i.i.isTag(e,"img"))return;const r=s.args&&(0,o.HD)(s.args[0])?s.args[0].toLowerCase():"";if(!r)return!1;(0,n.css)(e,"vertical-align","normal"===r?"":r),t.e.fire("recalcPositionPopup")}},a]},(t,e,s)=>{"use strict";var i=s(19),o=s(8),n=s(46);const r=t=>t.args&&(0,i.HD)(t.args[0])?t.args[0].toLowerCase():"";e.Z=[{name:"brush",popup(t,e,s,r){if(!(0,i.Zu)(t))return;const a=t.getInstance("Table",t.o).getAllSelectedCells();if(!a.length)return!1;const l=e=>(0,n.YW)(t,(s=>{a.forEach((t=>{(0,o.css)(t,e,s)})),t.lock(),t.setEditorValue(),r(),t.unlock()}),(0,o.css)(a[0],e));return(0,n.IL)(t,[{name:"Background",content:l("background-color")},{name:"Text",content:l("color")},{name:"Border",content:l("border-color")}])},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom","Normal"],childTemplate:(t,e,s)=>s,exec(t,e,{control:s}){const i=r(s);t.getInstance("Table",t.o).getAllSelectedCells().forEach((t=>{(0,o.css)(t,"vertical-align","normal"===i?"":i)}))},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec(t,e,{control:s}){if(!(0,i.Zu)(t))return;const o=r(s);t.execCommand(o,!1,e)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec(t,e,{control:s}){if(!(0,i.Zu)(t))return;const o=r(s);t.execCommand(o,!1,e)},tooltip:"Add row"},{name:"delete",icon:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec(t,e,{control:s}){if(!(0,i.Zu)(t))return;const o=r(s);t.execCommand(o,!1,e),t.e.fire("hidePopup")},tooltip:"Delete"}]},(t,e,s)=>{"use strict";var i=s(49);e.Z=[{name:"bin",tooltip:"Delete",exec(t,e){e&&t.s.removeNode(e)}},i.A]},t=>{t.exports='<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <path d="M1088 1256v240q0 16-12 28t-28 12h-240q-16 0-28-12t-12-28v-240q0-16 12-28t28-12h240q16 0 28 12t12 28zm316-600q0 54-15.5 101t-35 76.5-55 59.5-57.5 43.5-61 35.5q-41 23-68.5 65t-27.5 67q0 17-12 32.5t-28 15.5h-240q-15 0-25.5-18.5t-10.5-37.5v-45q0-83 65-156.5t143-108.5q59-27 84-56t25-76q0-42-46.5-74t-107.5-32q-65 0-108 29-35 25-107 115-13 16-31 16-12 0-25-8l-164-125q-13-10-15.5-25t5.5-28q160-266 464-266 80 0 161 31t146 83 106 127.5 41 158.5z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 18.151 18.151" xmlns="http://www.w3.org/2000/svg"> <g> <path stroke-width="0" d="M6.237,16.546H3.649V1.604h5.916v5.728c0.474-0.122,0.968-0.194,1.479-0.194 c0.042,0,0.083,0.006,0.125,0.006V0H2.044v18.15h5.934C7.295,17.736,6.704,17.19,6.237,16.546z"/> <path stroke-width="0" d="M11.169,8.275c-2.723,0-4.938,2.215-4.938,4.938s2.215,4.938,4.938,4.938s4.938-2.215,4.938-4.938 S13.892,8.275,11.169,8.275z M11.169,16.81c-1.983,0-3.598-1.612-3.598-3.598c0-1.983,1.614-3.597,3.598-3.597 s3.597,1.613,3.597,3.597C14.766,15.198,13.153,16.81,11.169,16.81z"/> <polygon stroke-width="0" points="11.792,11.073 10.502,11.073 10.502,12.578 9.03,12.578 9.03,13.868 10.502,13.868 10.502,15.352 11.792,15.352 11.792,13.868 13.309,13.868 13.309,12.578 11.792,12.578 "/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 432 432"> <g> <polygon points="203.688,96 0,96 0,144 155.688,144 "/> <polygon points="155.719,288 0,288 0,336 203.719,336 "/> <path d="M97.844,230.125c-3.701-3.703-5.856-8.906-5.856-14.141s2.154-10.438,5.856-14.141l9.844-9.844H0v48h107.719 L97.844,230.125z"/> <polygon points="232,176 232,96 112,216 232,336 232,256 432,256 432,176"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1203 544q0 13-10 23l-393 393 393 393q10 10 10 23t-10 23l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1171 960q0 13-10 23l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1395 1184q0 13-10 23l-50 50q-10 10-23 10t-23-10l-393-393-393 393q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1411 541l-355 355 355 355 144-144q29-31 70-14 39 17 39 59v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l144-144-355-355-355 355 144 144q31 30 14 69-17 40-59 40h-448q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l144 144 355-355-355-355-144 144q-19 19-45 19-12 0-24-5-40-17-40-59v-448q0-26 19-45t45-19h448q42 0 59 40 17 39-14 69l-144 144 355 355 355-355-144-144q-31-30-14-69 17-40 59-40h448q26 0 45 19t19 45v448q0 42-39 59-13 5-25 5-26 0-45-19z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 896q0 26-19 45l-256 256q-19 19-45 19t-45-19-19-45v-128h-1024v128q0 26-19 45t-45 19-45-19l-256-256q-19-19-19-45t19-45l256-256q19-19 45-19t45 19 19 45v128h1024v-128q0-26 19-45t45-19 45 19l256 256q19 19 19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1596 1385q0 117-79 196t-196 79q-135 0-235-100l-777-776q-113-115-113-271 0-159 110-270t269-111q158 0 273 113l605 606q10 10 10 22 0 16-30.5 46.5t-46.5 30.5q-13 0-23-10l-606-607q-79-77-181-77-106 0-179 75t-73 181q0 105 76 181l776 777q63 63 145 63 64 0 106-42t42-106q0-82-63-145l-581-581q-26-24-60-24-29 0-48 19t-19 48q0 32 25 59l410 410q10 10 10 22 0 16-31 47t-47 31q-12 0-22-10l-410-410q-63-61-63-149 0-82 57-139t139-57q88 0 149 63l581 581q100 98 100 235z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M747 1521q74 32 140 32 376 0 376-335 0-114-41-180-27-44-61.5-74t-67.5-46.5-80.5-25-84-10.5-94.5-2q-73 0-101 10 0 53-.5 159t-.5 158q0 8-1 67.5t-.5 96.5 4.5 83.5 12 66.5zm-14-746q42 7 109 7 82 0 143-13t110-44.5 74.5-89.5 25.5-142q0-70-29-122.5t-79-82-108-43.5-124-14q-50 0-130 13 0 50 4 151t4 152q0 27-.5 80t-.5 79q0 46 1 69zm-541 889l2-94q15-4 85-16t106-27q7-12 12.5-27t8.5-33.5 5.5-32.5 3-37.5.5-34v-65.5q0-982-22-1025-4-8-22-14.5t-44.5-11-49.5-7-48.5-4.5-30.5-3l-4-83q98-2 340-11.5t373-9.5q23 0 68.5.5t67.5.5q70 0 136.5 13t128.5 42 108 71 74 104.5 28 137.5q0 52-16.5 95.5t-39 72-64.5 57.5-73 45-84 40q154 35 256.5 134t102.5 248q0 100-35 179.5t-93.5 130.5-138 85.5-163.5 48.5-176 14q-44 0-132-3t-132-3q-106 0-307 11t-231 12z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M896 1152q0-36-20-69-1-1-15.5-22.5t-25.5-38-25-44-21-50.5q-4-16-21-16t-21 16q-7 23-21 50.5t-25 44-25.5 38-15.5 22.5q-20 33-20 69 0 53 37.5 90.5t90.5 37.5 90.5-37.5 37.5-90.5zm512-128q0 212-150 362t-362 150-362-150-150-362q0-145 81-275 6-9 62.5-90.5t101-151 99.5-178 83-201.5q9-30 34-47t51-17 51.5 17 33.5 47q28 93 83 201.5t99.5 178 101 151 62.5 90.5q81 127 81 275z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"> <g stroke="none" stroke-width="1"> <path d="M14,1.4 L12.6,0 L7,5.6 L1.4,0 L0,1.4 L5.6,7 L0,12.6 L1.4,14 L7,8.4 L12.6,14 L14,12.6 L8.4,7 L14,1.4 Z"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h896q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-640q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h640q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M503 1271l-256 256q-10 9-23 9-12 0-23-9-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23zm169 41v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm-224-224q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm1264 128q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-334-335q-21-21-42-56l239-18 273 274q27 27 68 27.5t68-26.5l147-146q28-28 28-67 0-40-28-68l-274-275 18-239q35 21 56 42l336 336q84 86 84 204zm-617-724l-239 18-273-274q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l274 274-18 240q-35-21-56-42l-336-336q-84-86-84-204 0-120 85-203l147-146q83-83 203-83 121 0 204 85l334 335q21 21 42 56zm633 84q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm-544-544v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm407 151l-256 256q-11 9-23 9t-23-9q-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1472 930v318q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-10 10-23 10-3 0-9-2-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-254q0-13 9-22l64-64q10-10 23-10 6 0 12 3 20 8 20 29zm231-489l-814 814q-24 24-57 24t-57-24l-430-430q-24-24-24-57t24-57l110-110q24-24 57-24t57 24l263 263 647-647q24-24 57-24t57 24l110 110q24 24 24 57t-24 57z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M813 1299l614-614q19-19 19-45t-19-45l-102-102q-19-19-45-19t-45 19l-467 467-211-211q-19-19-45-19t-45 19l-102 102q-19 19-19 45t19 45l358 358q19 19 45 19t45-19zm851-883v960q0 119-84.5 203.5t-203.5 84.5h-960q-119 0-203.5-84.5t-84.5-203.5v-960q0-119 84.5-203.5t203.5-84.5h960q119 0 203.5 84.5t84.5 203.5z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 10 10"> <path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 16 16"> <path stroke-width="0" d="M16 9v-6h-3v-1c0-0.55-0.45-1-1-1h-11c-0.55 0-1 0.45-1 1v3c0 0.55 0.45 1 1 1h11c0.55 0 1-0.45 1-1v-1h2v4h-9v2h-0.5c-0.276 0-0.5 0.224-0.5 0.5v5c0 0.276 0.224 0.5 0.5 0.5h2c0.276 0 0.5-0.224 0.5-0.5v-5c0-0.276-0.224-0.5-0.5-0.5h-0.5v-1h9zM12 3h-11v-1h11v1z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M621 1280h595v-595zm-45-45l595-595h-595v595zm1152 77v192q0 14-9 23t-23 9h-224v224q0 14-9 23t-23 9h-192q-14 0-23-9t-9-23v-224h-864q-14 0-23-9t-9-23v-864h-224q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h224v-224q0-14 9-23t23-9h192q14 0 23 9t9 23v224h851l246-247q10-9 23-9t23 9q9 10 9 23t-9 23l-247 246v851h224q14 0 23 9t9 23z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M24.89,6.61H22.31V4.47A2.47,2.47,0,0,0,19.84,2H6.78A2.47,2.47,0,0,0,4.31,4.47V22.92a2.47,2.47,0,0,0,2.47,2.47H9.69V27.2a2.8,2.8,0,0,0,2.8,2.8h12.4a2.8,2.8,0,0,0,2.8-2.8V9.41A2.8,2.8,0,0,0,24.89,6.61ZM6.78,23.52a.61.61,0,0,1-.61-.6V4.47a.61.61,0,0,1,.61-.6H19.84a.61.61,0,0,1,.61.6V6.61h-8a2.8,2.8,0,0,0-2.8,2.8V23.52Zm19,3.68a.94.94,0,0,1-.94.93H12.49a.94.94,0,0,1-.94-.93V9.41a.94.94,0,0,1,.94-.93h12.4a.94.94,0,0,1,.94.93Z"/> <path d="M23.49,13.53h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,17.37h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,21.22h-9.6a.93.93,0,1,0,0,1.86h9.6a.93.93,0,1,0,0-1.86Z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M960 896q26 0 45 19t19 45-19 45-45 19-45-19-19-45 19-45 45-19zm300 64l507 398q28 20 25 56-5 35-35 51l-128 64q-13 7-29 7-17 0-31-8l-690-387-110 66q-8 4-12 5 14 49 10 97-7 77-56 147.5t-132 123.5q-132 84-277 84-136 0-222-78-90-84-79-207 7-76 56-147t131-124q132-84 278-84 83 0 151 31 9-13 22-22l122-73-122-73q-13-9-22-22-68 31-151 31-146 0-278-84-82-53-131-124t-56-147q-5-59 15.5-113t63.5-93q85-79 222-79 145 0 277 84 83 52 132 123t56 148q4 48-10 97 4 1 12 5l110 66 690-387q14-8 31-8 16 0 29 7l128 64q30 16 35 51 3 36-25 56zm-681-260q46-42 21-108t-106-117q-92-59-192-59-74 0-113 36-46 42-21 108t106 117q92 59 192 59 74 0 113-36zm-85 745q81-51 106-117t-21-108q-39-36-113-36-100 0-192 59-81 51-106 117t21 108q39 36 113 36 100 0 192-59zm178-613l96 58v-11q0-36 33-56l14-8-79-47-26 26q-3 3-10 11t-12 12q-2 2-4 3.5t-3 2.5zm224 224l96 32 736-576-128-64-768 431v113l-160 96 9 8q2 2 7 6 4 4 11 12t11 12l26 26zm704 416l128-64-520-408-177 138q-2 3-13 7z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M384 544v576q0 13-9.5 22.5t-22.5 9.5q-14 0-23-9l-288-288q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5t9.5 22.5zm1408 768v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24" > <circle cx="12" cy="12" r="2.2"/> <circle cx="12" cy="5" r="2.2"/> <circle cx="12" cy="19" r="2.2"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 128 128" xml:space="preserve"> <polygon points="112.4560547,23.3203125 112.4560547,75.8154297 31.4853516,75.8154297 31.4853516,61.953125 16.0131836,72.6357422 0.5410156,83.3164063 16.0131836,93.9990234 31.4853516,104.6796875 31.4853516,90.8183594 112.4560547,90.8183594 112.4560547,90.8339844 127.4589844,90.8339844 127.4589844,23.3203125"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M832 1408l336-384h-768l-336 384h768zm1013-1077q15 34 9.5 71.5t-30.5 65.5l-896 1024q-38 44-96 44h-768q-38 0-69.5-20.5t-47.5-54.5q-15-34-9.5-71.5t30.5-65.5l896-1024q38-44 96-44h768q38 0 69.5 20.5t47.5 54.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1152 512v-472q22 14 36 28l408 408q14 14 28 36h-472zm-128 32q0 40 28 68t68 28h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1728 608v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M789 559l-170 450q33 0 136.5 2t160.5 2q19 0 57-2-87-253-184-452zm-725 1105l2-79q23-7 56-12.5t57-10.5 49.5-14.5 44.5-29 31-50.5l237-616 280-724h128q8 14 11 21l205 480q33 78 106 257.5t114 274.5q15 34 58 144.5t72 168.5q20 45 35 57 19 15 88 29.5t84 20.5q6 38 6 57 0 4-.5 13t-.5 13q-63 0-190-8t-191-8q-76 0-215 7t-178 8q0-43 4-78l131-28q1 0 12.5-2.5t15.5-3.5 14.5-4.5 15-6.5 11-8 9-11 2.5-14q0-16-31-96.5t-72-177.5-42-100l-450-2q-26 58-76.5 195.5t-50.5 162.5q0 22 14 37.5t43.5 24.5 48.5 13.5 57 8.5 41 4q1 19 1 58 0 9-2 27-58 0-174.5-10t-174.5-10q-8 0-26.5 4t-21.5 4q-80 14-188 14z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1744 1408q33 0 42 18.5t-11 44.5l-126 162q-20 26-49 26t-49-26l-126-162q-20-26-11-44.5t42-18.5h80v-1024h-80q-33 0-42-18.5t11-44.5l126-162q20-26 49-26t49 26l126 162q20 26 11 44.5t-42 18.5h-80v1024h80zm-1663-1279l54 27q12 5 211 5 44 0 132-2t132-2q36 0 107.5.5t107.5.5h293q6 0 21 .5t20.5 0 16-3 17.5-9 15-17.5l42-1q4 0 14 .5t14 .5q2 112 2 336 0 80-5 109-39 14-68 18-25-44-54-128-3-9-11-48t-14.5-73.5-7.5-35.5q-6-8-12-12.5t-15.5-6-13-2.5-18-.5-16.5.5q-17 0-66.5-.5t-74.5-.5-64 2-71 6q-9 81-8 136 0 94 2 388t2 455q0 16-2.5 71.5t0 91.5 12.5 69q40 21 124 42.5t120 37.5q5 40 5 50 0 14-3 29l-34 1q-76 2-218-8t-207-10q-50 0-151 9t-152 9q-3-51-3-52v-9q17-27 61.5-43t98.5-29 78-27q19-42 19-383 0-101-3-303t-3-303v-117q0-2 .5-15.5t.5-25-1-25.5-3-24-5-14q-11-12-162-12-33 0-93 12t-80 26q-19 13-34 72.5t-31.5 111-42.5 53.5q-42-26-56-44v-383z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24"> <path stroke-width="0" d="M22,20.6L3.4,2H8V0H0v8h2V3.4L20.6,22H16v2h8v-8h-2V20.6z M16,0v2h4.7l-6.3,6.3l1.4,1.4L22,3.5V8h2V0H16z M8.3,14.3L2,20.6V16H0v8h8v-2H3.5l6.3-6.3L8.3,14.3z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1600 736v192q0 40-28 68t-68 28h-1216q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h1216q40 0 68 28t28 68z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M576 576q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1024 384v448h-1408v-192l320-320 160 160 512-512zm96-704h-1600q-13 0-22.5 9.5t-9.5 22.5v1216q0 13 9.5 22.5t22.5 9.5h1600q13 0 22.5-9.5t9.5-22.5v-1216q0-13-9.5-22.5t-22.5-9.5zm160 32v1216q0 66-47 113t-113 47h-1600q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1600q66 0 113 47t47 113z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M352 832q0 14-9 23l-288 288q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-576q0-13 9.5-22.5t22.5-9.5q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M384 1662l17-85q6-2 81.5-21.5t111.5-37.5q28-35 41-101 1-7 62-289t114-543.5 52-296.5v-25q-24-13-54.5-18.5t-69.5-8-58-5.5l19-103q33 2 120 6.5t149.5 7 120.5 2.5q48 0 98.5-2.5t121-7 98.5-6.5q-5 39-19 89-30 10-101.5 28.5t-108.5 33.5q-8 19-14 42.5t-9 40-7.5 45.5-6.5 42q-27 148-87.5 419.5t-77.5 355.5q-2 9-13 58t-20 90-16 83.5-6 57.5l1 18q17 4 185 31-3 44-16 99-11 0-32.5 1.5t-32.5 1.5q-29 0-87-10t-86-10q-138-2-206-2-51 0-143 9t-121 11z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M1664 1344v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 312 312"> <g transform="translate(0.000000,312.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M50 3109 c0 -7 -11 -22 -25 -35 l-25 -23 0 -961 0 -961 32 -29 32 -30 501 -2 500 -3 3 -502 2 -502 31 -30 31 -31 958 0 958 0 23 25 c13 13 30 25 37 25 9 0 12 199 12 960 0 686 -3 960 -11 960 -6 0 -24 12 -40 28 l-29 27 -503 5 -502 5 -5 502 -5 503 -28 29 c-15 16 -27 34 -27 40 0 8 -274 11 -960 11 -710 0 -960 -3 -960 -11z m1738 -698 l2 -453 -40 -40 c-22 -22 -40 -43 -40 -47 0 -4 36 -42 79 -85 88 -87 82 -87 141 -23 l26 27 455 -2 454 -3 0 -775 0 -775 -775 0 -775 0 -3 450 -2 449 47 48 47 48 -82 80 c-44 44 -84 80 -87 80 -3 0 -25 -18 -48 -40 l-41 -40 -456 2 -455 3 -3 765 c-1 421 0 771 3 778 3 10 164 12 777 10 l773 -3 3 -454z"/> <path d="M607 2492 c-42 -42 -77 -82 -77 -87 0 -6 86 -96 190 -200 105 -104 190 -197 190 -205 0 -8 -41 -56 -92 -107 -65 -65 -87 -94 -77 -98 8 -3 138 -4 289 -3 l275 3 3 275 c1 151 0 281 -3 289 -4 10 -35 -14 -103 -82 -54 -53 -103 -97 -109 -97 -7 0 -99 88 -206 195 -107 107 -196 195 -198 195 -3 0 -39 -35 -82 -78z"/> <path d="M1470 1639 c-47 -49 -87 -91 -89 -94 -5 -6 149 -165 160 -165 9 0 189 179 189 188 0 12 -154 162 -165 161 -6 0 -48 -41 -95 -90z"/> <path d="M1797 1303 c-9 -8 -9 -568 0 -576 4 -4 50 36 103 88 54 52 101 95 106 95 5 0 95 -85 199 -190 104 -104 194 -190 200 -190 6 0 46 36 90 80 l79 79 -197 196 c-108 108 -197 199 -197 203 0 4 45 52 99 106 55 55 98 103 95 108 -6 10 -568 11 -577 1z"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 32 32"> <path d="M27 4l-15 15-7-7-5 5 12 12 20-20z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M381 1620q0 80-54.5 126t-135.5 46q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5t21.5-42.5q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53h-106v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159h-362q-6-36-6-54 0-51 23.5-93t56.5-68 66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5t-39.5-13.5q-46 0-81 58l-85-59q24-51 71.5-79.5t105.5-28.5q73 0 123 41.5t50 112.5q0 50-34 91.5t-75 64.5-75.5 50.5-35.5 52.5h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm-1408-899v99h-335v-99h107q0-41 .5-122t.5-121v-12h-2q-8 17-50 54l-71-76 136-127h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 270 270"> <path d="m240.443652,220.45085l-47.410809,0l0,-10.342138c13.89973,-8.43655 25.752896,-19.844464 34.686646,-33.469923c11.445525,-17.455846 17.496072,-37.709239 17.496072,-58.570077c0,-59.589197 -49.208516,-108.068714 -109.693558,-108.068714s-109.69263,48.479517 -109.69263,108.069628c0,20.860839 6.050547,41.113316 17.497001,58.570077c8.93375,13.625459 20.787845,25.032458 34.686646,33.469008l0,10.342138l-47.412666,0c-10.256959,0 -18.571354,8.191376 -18.571354,18.296574c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.98402,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574l0,-39.496814c0,-7.073455 -4.137698,-13.51202 -10.626529,-16.537358c-25.24497,-11.772016 -41.557118,-37.145704 -41.557118,-64.643625c0,-39.411735 32.545369,-71.476481 72.549922,-71.476481c40.004553,0 72.550851,32.064746 72.550851,71.476481c0,27.497006 -16.312149,52.87161 -41.557118,64.643625c-6.487902,3.026253 -10.6256,9.464818 -10.6256,16.537358l0,39.496814c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.982163,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574c0,-10.105198 -8.314395,-18.296574 -18.571354,-18.296574z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M384 544v576q0 13-9.5 22.5t-22.5 9.5q-14 0-23-9l-288-288q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5t9.5 22.5zm1408 768v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' x="0px" y="0px" viewBox="0 0 459 459"> <g> <path d="M229.5,0C102,0,0,102,0,229.5S102,459,229.5,459c20.4,0,38.25-17.85,38.25-38.25c0-10.2-2.55-17.85-10.2-25.5 c-5.1-7.65-10.2-15.3-10.2-25.5c0-20.4,17.851-38.25,38.25-38.25h45.9c71.4,0,127.5-56.1,127.5-127.5C459,91.8,357,0,229.5,0z M89.25,229.5c-20.4,0-38.25-17.85-38.25-38.25S68.85,153,89.25,153s38.25,17.85,38.25,38.25S109.65,229.5,89.25,229.5z M165.75,127.5c-20.4,0-38.25-17.85-38.25-38.25S145.35,51,165.75,51S204,68.85,204,89.25S186.15,127.5,165.75,127.5z M293.25,127.5c-20.4,0-38.25-17.85-38.25-38.25S272.85,51,293.25,51s38.25,17.85,38.25,38.25S313.65,127.5,293.25,127.5z M369.75,229.5c-20.4,0-38.25-17.85-38.25-38.25S349.35,153,369.75,153S408,170.85,408,191.25S390.15,229.5,369.75,229.5z" /> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M1534 189v73q0 29-18.5 61t-42.5 32q-50 0-54 1-26 6-32 31-3 11-3 64v1152q0 25-18 43t-43 18h-108q-25 0-43-18t-18-43v-1218h-143v1218q0 25-17.5 43t-43.5 18h-108q-26 0-43.5-18t-17.5-43v-496q-147-12-245-59-126-58-192-179-64-117-64-259 0-166 88-286 88-118 209-159 111-37 417-37h479q25 0 43 18t18 43z"/></svg>'},t=>{t.exports='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path stroke-width="0" d="M10.5 20H2a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h1V3l2.03-.4a3 3 0 0 1 5.94 0L13 3v1h1a2 2 0 0 1 2 2v1h-2V6h-1v1H3V6H2v12h5v2h3.5zM8 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm2 4h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2zm0 2v8h8v-8h-8z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"><path d="M1600 736v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"/></svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M448 1536h896v-256h-896v256zm0-640h896v-384h-160q-40 0-68-28t-28-68v-160h-640v640zm1152 64q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128 0v416q0 13-9.5 22.5t-22.5 9.5h-224v160q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-160h-224q-13 0-22.5-9.5t-9.5-22.5v-416q0-79 56.5-135.5t135.5-56.5h64v-544q0-40 28-68t68-28h672q40 0 88 20t76 48l152 152q28 28 48 76t20 88v256h64q79 0 135.5 56.5t56.5 135.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1664 256v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l138-138q-148-137-349-137-104 0-198.5 40.5t-163.5 109.5-109.5 163.5-40.5 198.5 40.5 198.5 109.5 163.5 163.5 109.5 198.5 40.5q119 0 225-52t179-147q7-10 23-12 14 0 25 9l137 138q9 8 9.5 20.5t-7.5 22.5q-109 132-264 204.5t-327 72.5q-156 0-298-61t-245-164-164-245-61-298 61-298 164-245 245-164 298-61q147 0 284.5 55.5t244.5 156.5l130-129q29-31 70-14 39 17 39 59z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 24 24"> <g transform="translate(-251.000000, -443.000000)"> <g transform="translate(215.000000, 119.000000)"/> <path d="M252,448 L256,448 L256,444 L252,444 L252,448 Z M257,448 L269,448 L269,446 L257,446 L257,448 Z M257,464 L269,464 L269,462 L257,462 L257,464 Z M270,444 L270,448 L274,448 L274,444 L270,444 Z M252,462 L252,466 L256,466 L256,462 L252,462 Z M270,462 L270,466 L274,466 L274,462 L270,462 Z M254,461 L256,461 L256,449 L254,449 L254,461 Z M270,461 L272,461 L272,449 L270,449 L270,461 Z"/> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M844 472q0 60-19 113.5t-63 92.5-105 39q-76 0-138-57.5t-92-135.5-30-151q0-60 19-113.5t63-92.5 105-39q77 0 138.5 57.5t91.5 135 30 151.5zm-342 483q0 80-42 139t-119 59q-76 0-141.5-55.5t-100.5-133.5-35-152q0-80 42-139.5t119-59.5q76 0 141.5 55.5t100.5 134 35 152.5zm394-27q118 0 255 97.5t229 237 92 254.5q0 46-17 76.5t-48.5 45-64.5 20-76 5.5q-68 0-187.5-45t-182.5-45q-66 0-192.5 44.5t-200.5 44.5q-183 0-183-146 0-86 56-191.5t139.5-192.5 187.5-146 193-59zm239-211q-61 0-105-39t-63-92.5-19-113.5q0-74 30-151.5t91.5-135 138.5-57.5q61 0 105 39t63 92.5 19 113.5q0 73-30 151t-92 135.5-138 57.5zm432-104q77 0 119 59.5t42 139.5q0 74-35 152t-100.5 133.5-141.5 55.5q-77 0-119-59t-42-139q0-74 35-152.5t100.5-134 141.5-55.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M512 1536h768v-384h-768v384zm896 0h128v-896q0-14-10-38.5t-20-34.5l-281-281q-10-10-34-20t-39-10v416q0 40-28 68t-68 28h-576q-40 0-68-28t-28-68v-416h-128v1280h128v-416q0-40 28-68t68-28h832q40 0 68 28t28 68v416zm-384-928v-320q0-13-9.5-22.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 22.5v320q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5-9.5t9.5-22.5zm640 32v928q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1344q0-40 28-68t68-28h928q40 0 88 20t76 48l280 280q28 28 48 76t20 88z"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M306.39,154.09c19.628,4.543,35.244,21.259,39.787,39.523 c1.551,8.54,8.998,14.989,17.904,14.989c9.991,0,18.168-8.175,18.168-18.17c0-13.083-10.991-32.98-25.985-47.881 c-14.719-14.537-32.252-24.802-46.695-24.802c-9.991,0-18.172,8.45-18.172,18.446C291.396,145.094,297.847,152.546,306.39,154.09z M56.629,392.312c-14.09,14.08-14.09,36.979,0,51.059c14.08,14.092,36.981,14.092,50.965,0l104.392-104.303 c24.347,15.181,53.062,23.991,83.953,23.991c87.857,0,158.995-71.142,158.995-158.999c0-87.854-71.138-158.995-158.995-158.995 c-87.856,0-158.995,71.141-158.995,158.995c0,30.802,8.819,59.606,23.992,83.953L56.629,392.312z M182.371,204.06 c0-62.687,50.875-113.568,113.568-113.568s113.569,50.881,113.569,113.568c0,62.694-50.876,113.569-113.569,113.569 S182.371,266.754,182.371,204.06z" fill-rule="evenodd"/> </svg>'},t=>{t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path stroke="null" d="m42.276011,26.302547c0.098397,-0.76605 0.172194,-1.54407 0.172194,-2.33406s-0.073797,-1.56801 -0.172194,-2.33406l5.202718,-3.961917c0.467384,-0.359086 0.602679,-1.005441 0.29519,-1.532101l-4.919828,-8.29489c-0.307489,-0.51469 -0.947067,-0.730142 -1.500548,-0.51469l-6.125186,2.405877c-1.266856,-0.945594 -2.656707,-1.747553 -4.157255,-2.357999l-0.922468,-6.343855c-0.110696,-0.562568 -0.614979,-1.005441 -1.229957,-1.005441l-9.839656,0c-0.614979,0 -1.119261,0.442873 -1.217657,1.005441l-0.922468,6.343855c-1.500548,0.610446 -2.890399,1.400436 -4.157255,2.357999l-6.125186,-2.405877c-0.553481,-0.203482 -1.193058,0 -1.500548,0.51469l-4.919828,8.29489c-0.307489,0.51469 -0.172194,1.161045 0.29519,1.532101l5.190419,3.961917c-0.098397,0.76605 -0.172194,1.54407 -0.172194,2.33406s0.073797,1.56801 0.172194,2.33406l-5.190419,3.961917c-0.467384,0.359086 -0.602679,1.005441 -0.29519,1.532101l4.919828,8.29489c0.307489,0.51469 0.947067,0.730142 1.500548,0.51469l6.125186,-2.405877c1.266856,0.945594 2.656707,1.747553 4.157255,2.357999l0.922468,6.343855c0.098397,0.562568 0.602679,1.005441 1.217657,1.005441l9.839656,0c0.614979,0 1.119261,-0.442873 1.217657,-1.005441l0.922468,-6.343855c1.500548,-0.610446 2.890399,-1.400436 4.157255,-2.357999l6.125186,2.405877c0.553481,0.203482 1.193058,0 1.500548,-0.51469l4.919828,-8.29489c0.307489,-0.51469 0.172194,-1.161045 -0.29519,-1.532101l-5.190419,-3.961917zm-18.277162,6.044617c-4.759934,0 -8.609699,-3.746465 -8.609699,-8.378677s3.849766,-8.378677 8.609699,-8.378677s8.609699,3.746465 8.609699,8.378677s-3.849766,8.378677 -8.609699,8.378677z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 18 18"> <g fill-rule="evenodd" stroke="none" stroke-width="1"> <g transform="translate(-381.000000, -381.000000)"> <g transform="translate(381.000000, 381.000000)"> <path d="M0,2 L2,2 L2,0 C0.9,0 0,0.9 0,2 L0,2 Z M0,10 L2,10 L2,8 L0,8 L0,10 L0,10 Z M4,18 L6,18 L6,16 L4,16 L4,18 L4,18 Z M0,6 L2,6 L2,4 L0,4 L0,6 L0,6 Z M10,0 L8,0 L8,2 L10,2 L10,0 L10,0 Z M16,0 L16,2 L18,2 C18,0.9 17.1,0 16,0 L16,0 Z M2,18 L2,16 L0,16 C0,17.1 0.9,18 2,18 L2,18 Z M0,14 L2,14 L2,12 L0,12 L0,14 L0,14 Z M6,0 L4,0 L4,2 L6,2 L6,0 L6,0 Z M8,18 L10,18 L10,16 L8,16 L8,18 L8,18 Z M16,10 L18,10 L18,8 L16,8 L16,10 L16,10 Z M16,18 C17.1,18 18,17.1 18,16 L16,16 L16,18 L16,18 Z M16,6 L18,6 L18,4 L16,4 L16,6 L16,6 Z M16,14 L18,14 L18,12 L16,12 L16,14 L16,14 Z M12,18 L14,18 L14,16 L12,16 L12,18 L12,18 Z M12,2 L14,2 L14,0 L12,0 L12,2 L12,2 Z M4,14 L14,14 L14,4 L4,4 L4,14 L4,14 Z M6,6 L12,6 L12,12 L6,12 L6,6 L6,6 Z"/> </g> </g> </g> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M896 960v448q0 26-19 45t-45 19-45-19l-144-144-332 332q-10 10-23 10t-23-10l-114-114q-10-10-10-23t10-23l332-332-144-144q-19-19-19-45t19-45 45-19h448q26 0 45 19t19 45zm755-672q0 13-10 23l-332 332 144 144q19 19 19 45t-19 45-45 19h-448q-26 0-45-19t-19-45v-448q0-26 19-45t45-19 45 19l144 144 332-332q10-10 23-10t23 10l114 114q10 10 10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M553 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 48 48"> <path d="M6 42h4v-4h-4v4zm4-28h-4v4h4v-4zm-4 20h4v-4h-4v4zm8 8h4v-4h-4v4zm-4-36h-4v4h4v-4zm8 0h-4v4h4v-4zm16 0h-4v4h4v-4zm-8 8h-4v4h4v-4zm0-8h-4v4h4v-4zm12 28h4v-4h-4v4zm-16 8h4v-4h-4v4zm-16-16h36v-4h-36v4zm32-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-16 16h4v-4h-4v4zm8 8h4v-4h-4v4zm8 0h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 48 48"> <path d="M6 18h4v-4h-4v4zm0-8h4v-4h-4v4zm8 32h4v-4h-4v4zm0-16h4v-4h-4v4zm-8 0h4v-4h-4v4zm0 16h4v-4h-4v4zm0-8h4v-4h-4v4zm8-24h4v-4h-4v4zm24 24h4v-4h-4v4zm-16 8h4v-36h-4v36zm16 0h4v-4h-4v4zm0-16h4v-4h-4v4zm0-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-8-8h4v-4h-4v4zm0 32h4v-4h-4v4zm0-16h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1760 896q14 0 23 9t9 23v64q0 14-9 23t-23 9h-1728q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h1728zm-1277-64q-28-35-51-80-48-97-48-188 0-181 134-309 133-127 393-127 50 0 167 19 66 12 177 48 10 38 21 118 14 123 14 183 0 18-5 45l-12 3-84-6-14-2q-50-149-103-205-88-91-210-91-114 0-182 59-67 58-67 146 0 73 66 140t279 129q69 20 173 66 58 28 95 52h-743zm507 256h411q7 39 7 92 0 111-41 212-23 55-71 104-37 35-109 81-80 48-153 66-80 21-203 21-114 0-195-23l-140-40q-57-16-72-28-8-8-8-22v-13q0-108-2-156-1-30 0-68l2-37v-44l102-2q15 34 30 71t22.5 56 12.5 27q35 57 80 94 43 36 105 57 59 22 132 22 64 0 139-27 77-26 122-86 47-61 47-129 0-84-81-157-34-29-137-71z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm639 217v206h-514l-4-27q-3-45-3-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 80-65 188-65 110 0 178 59.5t68 158.5q0 66-34.5 118.5t-84 86-99.5 62.5-87 63-41 73h232v-80h126z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm637-679v206h-514l-3-27q-4-28-4-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 83-65 188-65 110 0 178 59.5t68 158.5q0 56-24.5 103t-62 76.5-81.5 58.5-82 50.5-65.5 51.5-30.5 63h232v-80h126z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm-1280-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M384 1408q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm0-512q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm-1408-928q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M176 223q-37-2-45-4l-3-88q13-1 40-1 60 0 112 4 132 7 166 7 86 0 168-3 116-4 146-5 56 0 86-2l-1 14 2 64v9q-60 9-124 9-60 0-79 25-13 14-13 132 0 13 .5 32.5t.5 25.5l1 229 14 280q6 124 51 202 35 59 96 92 88 47 177 47 104 0 191-28 56-18 99-51 48-36 65-64 36-56 53-114 21-73 21-229 0-79-3.5-128t-11-122.5-13.5-159.5l-4-59q-5-67-24-88-34-35-77-34l-100 2-14-3 2-86h84l205 10q76 3 196-10l18 2q6 38 6 51 0 7-4 31-45 12-84 13-73 11-79 17-15 15-15 41 0 7 1.5 27t1.5 31q8 19 22 396 6 195-15 304-15 76-41 122-38 65-112 123-75 57-182 89-109 33-255 33-167 0-284-46-119-47-179-122-61-76-83-195-16-80-16-237v-333q0-188-17-213-25-36-147-39zm1488 1409v-64q0-14-9-23t-23-9h-1472q-14 0-23 9t-9 23v64q0 14 9 23t23 9h1472q14 0 23-9t9-23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5t-264-204.5q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5t163.5-109.5 109.5-163.5 40.5-198.5-40.5-198.5-109.5-163.5-163.5-109.5-198.5-40.5q-98 0-188 35.5t-160 101.5l137 138q31 30 14 69-17 40-59 40h-448q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5t284.5-55.5q156 0 298 61t245 164 164 245 61 298z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M503 1271l-256 256q-10 9-23 9-12 0-23-9-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23zm169 41v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm-224-224q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm1264 128q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-334-335q-21-21-42-56l239-18 273 274q27 27 68 27.5t68-26.5l147-146q28-28 28-67 0-40-28-68l-274-275 18-239q35 21 56 42l336 336q84 86 84 204zm-617-724l-239 18-273-274q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l274 274-18 240q-35-21-56-42l-336-336q-84-86-84-204 0-120 85-203l147-146q83-83 203-83 121 0 204 85l334 335q21 21 42 56zm633 84q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm-544-544v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm407 151l-256 256q-11 9-23 9t-23-9q-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1639 1056q0 5-1 7-64 268-268 434.5t-478 166.5q-146 0-282.5-55t-243.5-157l-129 129q-19 19-45 19t-45-19-19-45v-448q0-26 19-45t45-19h448q26 0 45 19t19 45-19 45l-137 137q71 66 161 102t187 36q134 0 250-65t186-179q11-17 53-117 8-23 30-23h192q13 0 22.5 9.5t9.5 22.5zm25-800v448q0 26-19 45t-45 19h-448q-26 0-45-19t-19-45 19-45l138-138q-148-137-349-137-134 0-250 65t-186 179q-11 17-53 117-8 23-30 23h-199q-13 0-22.5-9.5t-9.5-22.5v-7q65-268 270-434.5t480-166.5q146 0 284 55.5t245 156.5l130-129q19-19 45-19t45 19 19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1344 1472q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28h-1472q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h427q21 56 70.5 92t110.5 36h256q61 0 110.5-36t70.5-92h427q40 0 68 28t28 68zm-325-648q-17 40-59 40h-256v448q0 26-19 45t-45 19h-256q-26 0-45-19t-19-45v-448h-256q-42 0-59-40-17-39 14-69l448-448q18-19 45-19t45 19l448 448q31 30 14 69z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1216 320q0 26-19 45t-45 19h-128v1024h128q26 0 45 19t19 45-19 45l-256 256q-19 19-45 19t-45-19l-256-256q-19-19-19-45t19-45 45-19h128v-1024h-128q-26 0-45-19t-19-45 19-45l256-256q19-19 45-19t45 19l256 256q19 19 19 45z"/> </svg>'},t=>{t.exports='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 352v1088q0 42-39 59-13 5-25 5-27 0-45-19l-403-403v166q0 119-84.5 203.5t-203.5 84.5h-704q-119 0-203.5-84.5t-84.5-203.5v-704q0-119 84.5-203.5t203.5-84.5h704q119 0 203.5 84.5t84.5 203.5v165l403-402q18-19 45-19 12 0 25 5 39 17 39 59z"/> </svg>'}],e={};function s(i){var o=e[i];if(void 0!==o)return o.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){"use strict";s.r(i),s.d(i,{Jodit:()=>Jodit});var t={};s.r(t),s.d(t,{Ajax:()=>d,Alert:()=>A,Async:()=>h,CommitStyle:()=>vt.R,Component:()=>u.wA,Confirm:()=>O,ContextMenu:()=>g,Create:()=>F,Dialog:()=>R,Dom:()=>_.i,EventHandlersStore:()=>l.DG,EventsNative:()=>l.ng,FileBrowser:()=>ut,Helpers:()=>c,Icon:()=>k.JO,ImageEditor:()=>ot,ObserveObject:()=>l.P5,Observer:()=>gt,Plugin:()=>H,PluginSystem:()=>jt.h,Popup:()=>k.GI,ProgressBar:()=>k.ko,Prompt:()=>B,STATUSES:()=>u.n$,Select:()=>vt.P,Snapshot:()=>pt,StatusBar:()=>bt,Table:()=>wt,ToolbarButton:()=>L,ToolbarCollection:()=>T,ToolbarContent:()=>z,ToolbarEditorCollection:()=>I,UIBlock:()=>k.eC,UIButton:()=>k.y3,UICheckbox:()=>k.mA,UIElement:()=>k.u1,UIForm:()=>k.x4,UIGroup:()=>k.qe,UIInput:()=>k.u3,UIList:()=>k.bz,UISeparator:()=>k.lU,UITextArea:()=>k.GJ,Uploader:()=>Ct,View:()=>S,ViewComponent:()=>u.Hr,ViewWithToolbar:()=>N,defaultNameSpace:()=>l.rO});var e={};s.r(e),s.d(e,{Delete:()=>Bt,DragAndDrop:()=>se,DragAndDropElement:()=>ie,KeyArrowOutside:()=>re,WrapTextNodes:()=>Ft,about:()=>qt,addNewLine:()=>It,bold:()=>Ot,classSpan:()=>zt,cleanHtml:()=>Ht,clipboard:()=>Yt,color:()=>ee,copyFormat:()=>Qt,enter:()=>ne,errorMessages:()=>le,file:()=>Me,focus:()=>Lt,font:()=>ce,formatBlock:()=>he,fullsize:()=>de,hotkeys:()=>ue,hr:()=>Ee,iframe:()=>pe,image:()=>Ce,imageProcessor:()=>ye,imageProperties:()=>we,indent:()=>xe,inlinePopup:()=>Se,justify:()=>ke,limit:()=>Te,link:()=>qe,media:()=>Le,mobile:()=>Pe,orderedList:()=>Ne,paste:()=>Gt,pasteStorage:()=>Kt,placeholder:()=>Re,preview:()=>as,print:()=>ls,redoUndo:()=>Ae,resizeCells:()=>ts,resizeHandler:()=>$e,resizer:()=>Oe,search:()=>He,select:()=>Fe,selectCells:()=>is,size:()=>We,source:()=>Ke,stat:()=>Xe,sticky:()=>Je,symbols:()=>Ze,table:()=>ns,tableKeyboardNavigation:()=>os,tooltip:()=>rs,video:()=>ze,xpath:()=>cs});var o={};s.r(o),s.d(o,{about:()=>hs,addcolumn:()=>ds,addrow:()=>us,angle_down:()=>ps,angle_left:()=>fs,angle_right:()=>ms,angle_up:()=>gs,arrows_alt:()=>vs,arrows_h:()=>bs,attachment:()=>ws,bin:()=>ys,bold:()=>Cs,brush:()=>js,cancel:()=>xs,center:()=>Es,chain_broken:()=>Ss,check:()=>_s,check_square:()=>ks,chevron:()=>Ts,copy:()=>Ls,copyformat:()=>Is,crop:()=>qs,cut:()=>zs,dedent:()=>Ms,dots:()=>Ps,enter:()=>Ds,eraser:()=>Ns,eye:()=>Rs,file:()=>As,folder:()=>Bs,font:()=>Os,fontsize:()=>Hs,fullsize:()=>Fs,hr:()=>$s,image:()=>Ws,indent:()=>Vs,info_circle:()=>Ys,italic:()=>Us,justify:()=>Gs,left:()=>Ks,link:()=>Xs,lock:()=>Js,menu:()=>Zs,merge:()=>Qs,ok:()=>ti,ol:()=>ei,omega:()=>si,outdent:()=>ii,palette:()=>oi,paragraph:()=>ni,paste:()=>ri,pencil:()=>ai,plus:()=>li,print:()=>ci,redo:()=>hi,resize:()=>di,resizer:()=>ui,right:()=>pi,save:()=>fi,search:()=>mi,select_all:()=>vi,settings:()=>gi,shrink:()=>bi,source:()=>wi,splitg:()=>yi,splitv:()=>Ci,strikethrough:()=>ji,subscript:()=>xi,superscript:()=>Ei,table:()=>Si,th:()=>_i,th_list:()=>ki,ul:()=>Ti,underline:()=>Ii,undo:()=>qi,unlink:()=>Li,unlock:()=>zi,update:()=>Mi,upload:()=>Pi,valign:()=>Di,video:()=>Ni});var n=s(18),r=s(1),a=s(2),l=s(3),c=s(8);class h{constructor(){var t,e,s,i;this.timers=new Map,this.promisesRejections=new Set,this.requestsIdle=new Set,this.requestIdleCallbackNative=null!==(e=null===(t=window.requestIdleCallback)||void 0===t?void 0:t.bind(window))&&void 0!==e?e:t=>{const e=Date.now();return this.setTimeout((()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))})}),1)},this.cancelIdleCallbackNative=null!==(i=null===(s=window.cancelIdleCallback)||void 0===s?void 0:s.bind(window))&&void 0!==i?i:t=>{this.clearTimeout(t)},this.isDestructed=!1}setTimeout(t,e,...s){if(this.isDestructed)return 0;let i={};(0,c.isNumber)(e)||(i=e,e=i.timeout||0),i.label&&this.clearLabel(i.label);const o=(0,c.setTimeout)(t,e,...s);return this.timers.set(i.label||o,o),o}clearLabel(t){t&&this.timers.has(t)&&((0,c.clearTimeout)(this.timers.get(t)),this.timers.delete(t))}clearTimeout(t){if((0,c.isString)(t))return this.clearLabel(t);(0,c.clearTimeout)(t),this.timers.delete(t)}debounce(t,e,s=!1){let i=0,o=!1;const n=[],r=(...e)=>{if(!o){i=0;const s=t(...e);if(o=!0,n.length){const t=()=>{n.forEach((t=>t())),n.length=0};(0,c.isPromise)(s)?s.finally(t):t()}}},a=(...n)=>{o=!1,e?(!i&&s&&r(...n),(0,c.clearTimeout)(i),i=this.setTimeout((()=>r(...n)),(0,c.isFunction)(e)?e():e),this.timers.set(t,i)):r(...n)};return(0,c.isPlainObject)(e)&&e.promisify?(...t)=>{const e=this.promise((t=>{n.push(t)}));return a(...t),e}:a}throttle(t,e,s=!1){let i,o,n,r=null;return(...s)=>{i=!0,n=s,e?r||(o=()=>{i?(t(...n),i=!1,r=this.setTimeout(o,(0,c.isFunction)(e)?e():e),this.timers.set(o,r)):r=null},o()):t(...n)}}promise(t){let e=()=>{};const s=new Promise(((s,i)=>(this.promisesRejections.add(i),e=i,t(s,i))));return s.finally((()=>{this.promisesRejections.delete(e)})),s.rejectCallback=e,s}promiseState(t){if(t.status)return t.status;if(!Promise.race)return new Promise((e=>{t.then((t=>(e("fulfilled"),t)),(t=>{throw e("rejected"),t})),this.setTimeout((()=>{e("pending")}),100)}));const e={};return Promise.race([t,e]).then((t=>t===e?"pending":"fulfilled"),(()=>"rejected"))}requestIdleCallback(t){const e=this.requestIdleCallbackNative(t);return this.requestsIdle.add(e),e}requestIdlePromise(){return this.promise((t=>{const e=this.requestIdleCallback((()=>t(e)))}))}cancelIdleCallback(t){return this.requestsIdle.delete(t),this.cancelIdleCallbackNative(t)}clear(){this.requestsIdle.forEach((t=>{this.cancelIdleCallback(t)})),this.timers.forEach((t=>{(0,c.clearTimeout)(this.timers.get(t))})),this.timers.clear(),this.promisesRejections.forEach((t=>{t()})),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}}r.D.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr(){return new XMLHttpRequest}};class d{constructor(t,e){this.jodit=t,this.successResponseCodes=[200,201,202],this.resolved=!1,this.activated=!1,this.options=(0,c.ConfigProto)(e||{},r.D.prototype.defaultAjaxOptions),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest,t&&t.e&&t.e.on("beforeDestruct",(()=>this.abort()))}__buildParams(t,e){return(0,c.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,t,e):(0,c.isString)(t)||this.j.ow.FormData&&t instanceof this.j.ow.FormData?t:(0,c.buildQuery)(t)}get o(){return this.options}get j(){return this.jodit}abort(){try{this.xhr.abort()}catch(t){}return this}send(){return this.activated=!0,new Promise(((t,e)=>{const s=t=>{let e=null;if("json"===this.o.dataType&&(e=JSON.parse(t)),!e)throw(0,c.error)("No JSON format");return e};this.xhr.onabort=()=>{e((0,c.error)(this.xhr.statusText))},this.xhr.onerror=()=>{e((0,c.error)(this.xhr.statusText))},this.xhr.ontimeout=()=>{e((0,c.error)(this.xhr.statusText))},this.xhr.onload=()=>{this.response=this.xhr.responseText,this.status=this.xhr.status,this.resolved=!0,t.call(this.xhr,s(this.response)||{})},this.xhr.onprogress=t=>{var e,s;let i=0;t.lengthComputable&&(i=t.loaded/t.total*100),null===(s=(e=this.options).onProgress)||void 0===s||s.call(e,i)},this.xhr.onreadystatechange=()=>{var i,o;if(null===(o=(i=this.options).onProgress)||void 0===o||o.call(i,10),this.xhr.readyState===XMLHttpRequest.DONE){const i=this.xhr.responseText;this.response=i,this.status=this.xhr.status,this.resolved=!0,this.successResponseCodes.indexOf(this.xhr.status)>-1?t.call(this.xhr,s(i)):e.call(this.xhr,(0,c.error)(this.xhr.statusText||this.j.i18n("Connection error!")))}},this.xhr.withCredentials=this.o.withCredentials||!1;const{url:i,data:o,method:n}=this.prepareRequest();this.xhr.open(n,i,!0),this.o.contentType&&this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-type",this.o.contentType),this.o.headers&&this.xhr.setRequestHeader&&(0,c.each)(this.o.headers,((t,e)=>{this.xhr.setRequestHeader(t,e)})),this.j.async.setTimeout((()=>{this.xhr.send(o?this.__buildParams(o):void 0)}),0)}))}prepareRequest(){if(!this.o.url)throw(0,c.error)("Need URL for AJAX request");let t=this.o.url;const e=this.o.data,s=(this.o.method||"get").toLowerCase();if("get"===s&&e&&(0,c.isPlainObject)(e)){const s=t.indexOf("?");if(-1!==s){const i=(0,c.parseQuery)(t);t=t.substr(0,s)+"?"+(0,c.buildQuery)({...i,...e})}else t+="?"+(0,c.buildQuery)(this.o.data)}const i={url:t,method:s,data:e};return d.log.splice(100),d.log.push(i),i}destruct(){this.activated&&!this.resolved&&(this.abort(),this.resolved=!0)}}d.log=[];var u=s(12),p=s(42),f=s(36),m=s(19);class g extends p.G{className(){return"ContextMenu"}show(t,e,s){const i=this,o=this.j.c.div("jodit-context-menu__actions");(0,m.kJ)(s)&&(s.forEach((t=>{if(!t)return;const e=(0,f.zx)(this.jodit,t.icon||"empty",t.title);this.jodit&&e.setParentView(this.jodit),e.setMod("context","menu"),e.onAction((e=>{var s;return null===(s=t.exec)||void 0===s||s.call(i,e),i.close(),!1})),o.appendChild(e.container)})),super.setContent(o).open((()=>({left:t,top:e,width:0,height:0})),!0))}}const v=(()=>{let t;return()=>(void 0===t&&(t=(()=>{const t="___Jodit___"+Math.random();try{localStorage.setItem(t,"1");const e="1"===localStorage.getItem(t);return localStorage.removeItem(t),e}catch(t){}return!1})()),t)})();class b{constructor(t){this.rootKey=t}set(t,e){try{const s=localStorage.getItem(this.rootKey),i=s?JSON.parse(s):{};i[t]=e,localStorage.setItem(this.rootKey,JSON.stringify(i))}catch(t){}}delete(t){try{localStorage.removeItem(this.rootKey)}catch(t){}}get(t){try{const e=localStorage.getItem(this.rootKey),s=e?JSON.parse(e):{};return void 0!==s[t]?s[t]:null}catch(t){}}exists(t){return null!=this.get(t)}clear(){try{localStorage.removeItem(this.rootKey)}catch(t){}}}class w{constructor(){this.data=new Map}set(t,e){this.data.set(t,e)}delete(t){this.data.delete(t)}get(t){return this.data.get(t)}exists(t){return this.data.has(t)}clear(){this.data.clear()}}const y="Jodit_";class C{constructor(t,e){this.provider=t,this.prefix=y,e&&(this.prefix+=e)}set(t,e){this.provider.set((0,c.camelCase)(this.prefix+t),e)}delete(t){this.provider.delete((0,c.camelCase)(this.prefix+t))}get(t){return this.provider.get((0,c.camelCase)(this.prefix+t))}exists(t){return this.provider.exists((0,c.camelCase)(this.prefix+t))}clear(){return this.provider.clear()}static makeStorage(t=!1,e){let s;return t&&v()&&(s=new b(y+e)),s||(s=new w),new C(s,e)}}var j=s(13),x=s(17),E=s(34);class S extends u.wA{constructor(t,e=!1){super(),this.isJodit=e,this.isView=!0,this.mods={},this.components=new Set,this.version="3.8.8",this.async=new h,this.buffer=C.makeStorage(),this.storage=C.makeStorage(!0,this.componentName),this.OPTIONS=S.defaultOptions,this.__isFullSize=!1,this.__whoLocked="",this.isLockedNotBy=t=>this.isLocked&&this.__whoLocked!==t,this.__modulesInstances=new Map,this.id=""+(new Date).getTime(),this.buffer=C.makeStorage(),this.initOptions(t),this.initOwners(),this.events=new l.ng(this.od),this.create=new F(this.od),this.container=this.c.div(),this.container.classList.add("jodit"),this.progressbar=new k.ko(this)}setMod(t,e){return E.$.setMod.call(this,t,e),this}getMod(t){return E.$.getMod.call(this,t)}getElm(t){return E.F.getElm.call(this,t)}getElms(t){return E.F.getElms.call(this,t)}get basePath(){return this.o.basePath?this.o.basePath:a.BASE_PATH}get defaultTimeout(){return(0,c.isVoid)(this.o.defaultTimeout)?100:this.o.defaultTimeout}get c(){return this.create}get container(){return this.__container}set container(t){this.__container=t}get e(){return this.events}get options(){return this.__options}set options(t){this.__options=t}get o(){return this.options}i18n(t,...e){return(0,c.i18n)(t,e,this.options)}toggleFullSize(t){void 0===t&&(t=!this.__isFullSize),t!==this.__isFullSize&&(this.__isFullSize=t,this.events&&this.e.fire("toggleFullSize",t))}get isLocked(){return""!==this.__whoLocked}lock(t="any"){return!this.isLocked&&(this.__whoLocked=t,!0)}unlock(){return!!this.isLocked&&(this.__whoLocked="",!0)}get isFullSize(){return this.__isFullSize}getVersion(){return"3.8.8"}static getVersion(){return"3.8.8"}initOptions(t){this.options=(0,c.ConfigProto)(t||{},(0,c.ConfigProto)(this.options||{},S.defaultOptions))}initOwners(){var t;this.ownerWindow=null!==(t=this.o.ownerWindow)&&void 0!==t?t:window}attachEvents(t){if(!t)return;const e=null==t?void 0:t.events;e&&Object.keys(e).forEach((t=>this.e.on(t,e[t])))}getInstance(t,e){const s=this.e.fire((0,c.camelCase)("getInstance_"+t),e);if(s)return s;const i=j.qz[t],o=this.__modulesInstances;if(!(0,c.isFunction)(i))throw(0,c.error)("Need real module name");if(!o.has(t)){const s=i.prototype instanceof u.Hr?new i(this,e):new i(e);this.components.add(s),o.set(t,s)}return o.get(t)}addDisclaimer(t){this.container.appendChild(t)}beforeDestruct(){this.e.fire(u.n$.beforeDestruct,this),this.components.forEach((t=>{(0,c.isDestructable)(t)&&!t.isInDestruct&&t.destruct()})),this.components.clear()}destruct(){this.isDestructed||(this.async&&this.async.destruct(),this.events&&this.e.destruct(),this.buffer&&this.buffer.clear(),_.i.safeRemove(this.container),super.destruct())}}(0,n.gn)([(0,x.hook)(u.n$.beforeDestruct)],S.prototype,"beforeDestruct",null),S.defaultOptions={extraButtons:[],textIcons:!1,namespace:"",removeButtons:[],zIndex:100002,defaultTimeout:100,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullSize:!0};var _=s(15),k=s(32);let T=class extends k.bz{constructor(t){super(t),this.listenEvents="updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur",this.update=this.j.async.debounce(this.immediateUpdate,(()=>this.j.defaultTimeout)),this.initEvents()}className(){return"ToolbarCollection"}get firstButton(){const[t]=this.buttons;return t||null}makeButton(t,e=null){return P(this.j,t,e)}shouldBeActive(t){return!((0,c.isJoditObject)(this.j)&&!this.j.editorIsActive)&&((0,c.isFunction)(t.control.isActive)?t.control.isActive(this.j,t.control,t):void 0)}shouldBeDisabled(t){if(this.j.o.disabled)return!0;if(this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(t.control.name)))return!0;let e;return(0,c.isFunction)(t.control.isDisabled)&&(e=t.control.isDisabled(this.j,t.control,t)),e}getTarget(t){return t.target||null}immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar"))}setDirection(t){this.container.style.direction=t,this.container.setAttribute("dir",t)}initEvents(){this.j.e.on(this.listenEvents,this.update).on("afterSetMode focus",this.immediateUpdate)}build(t,e=null){const s=this.j.e.fire("beforeToolbarBuild",t);return s&&(t=s),super.build(t,e),this}destruct(){this.isDestructed||(this.j.e.off(this.listenEvents,this.update).off("afterSetMode focus",this.immediateUpdate),super.destruct())}};(0,n.gn)([x.autobind],T.prototype,"immediateUpdate",null),T=(0,n.gn)([x.component],T);let I=class extends T{constructor(t){super(t),this.checkActiveStatus=(t,e)=>{let s=0,i=0;return Object.keys(t).forEach((o=>{const n=t[o];(0,c.isFunction)(n)?n(this.j,""+(0,c.css)(e,o))&&(s+=1):-1!==n.indexOf(""+(0,c.css)(e,o))&&(s+=1),i+=1})),i===s},this.prependInvisibleInput(this.container)}className(){return"ToolbarEditorCollection"}shouldBeDisabled(t){const e=super.shouldBeDisabled(t);if(void 0!==e)return e;const s=void 0===t.control.mode?a.MODE_WYSIWYG:t.control.mode;return!(s===a.MODE_SPLIT||s===this.j.getRealMode())}shouldBeActive(t){const e=super.shouldBeActive(t);if(void 0!==e)return e;const s=this.j.selection?this.j.s.current():null;if(!s)return!1;let i;if(t.control.tags){const e=t.control.tags;if(i=s,_.i.up(i,(t=>{if(t&&-1!==e.indexOf(t.nodeName.toLowerCase()))return!0}),this.j.editor))return!0}if(t.control.css){const e=t.control.css;if(i=s,_.i.up(i,(t=>{if(t&&!_.i.isText(t))return this.checkActiveStatus(e,t)}),this.j.editor))return!0}return!1}getTarget(t){return t.target||this.j.s.current()||null}prependInvisibleInput(t){const e=this.j.create.element("input",{tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});_.i.appendChildFirst(t,e)}};I=(0,n.gn)([x.component],I);var q=s(38);let L=class extends f.y3{constructor(t,e,s=null){super(t),this.control=e,this.target=s,this.state={...(0,f.Yc)(),theme:"toolbar",currentValue:"",hasTrigger:!1},t.e.on([this.button,this.trigger],"mousedown",(t=>t.preventDefault())),this.onAction(this.onClick),this.hookStatus(u.n$.ready,(()=>{this.initFromControl(),this.initTooltip(),this.update()}))}className(){return"ToolbarButton"}get toolbar(){return this.closest(T)}get button(){return this.container.querySelector(`button.${this.componentName}__button`)}update(){const{control:t,state:e}=this,s=this.closest(T);s&&(e.disabled=!!s.shouldBeDisabled(this),e.activated=!!s.shouldBeActive(this)),(0,c.isFunction)(t.update)&&t.update(this),super.update()}onChangeActivated(){(0,c.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,c.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,c.attr)(this.button,"tabindex",this.state.tabIndex)}onChangeTooltip(){(0,c.attr)(this.button,"aria-label",this.state.tooltip),super.onChangeTooltip()}createContainer(){const t=this.componentName,e=this.j.c.span(t),s=super.createContainer();return(0,c.attr)(e,"role","listitem"),s.classList.remove(t),s.classList.add(t+"__button"),Object.defineProperty(s,"component",{value:this}),e.appendChild(s),this.trigger=this.j.c.fromHTML(`<span role="trigger" class="${t}__trigger">${k.JO.get("chevron")}</span>`),this.j.e.on(this.trigger,"click",this.onTriggerClick.bind(this)),e}focus(){var t;null===(t=this.container.querySelector("button"))||void 0===t||t.focus()}onChangeHasTrigger(){this.state.hasTrigger?this.container.appendChild(this.trigger):_.i.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){const t=this.state.disabled?"disabled":null;(0,c.attr)(this.trigger,"disabled",t),(0,c.attr)(this.button,"disabled",t),(0,c.attr)(this.container,"disabled",t)}initTooltip(){this.j.o.textIcons||!this.j.o.showTooltip||this.j.o.useNativeTooltip||this.j.e.off(this.container,"mouseenter mouseleave").on(this.container,"mousemove",(t=>{this.state.tooltip&&!this.state.disabled&&this.j.e.fire("delayShowTooltip",(()=>({x:t.clientX+10,y:t.clientY+10})),this.state.tooltip)})).on(this.container,"mouseleave",(()=>{this.j.e.fire("hideTooltip")}))}initFromControl(){var t;const{control:e,state:s}=this;this.updateSize(),s.name=e.name;const{textIcons:i}=this.j.o;if(!0===i||(0,c.isFunction)(i)&&i(e.name)||e.template)s.icon=(0,f.Yc)().icon,s.text=e.text||e.name;else{if(e.iconURL)s.icon.iconURL=e.iconURL;else{const i=e.icon||e.name;s.icon.name=k.JO.exists(i)||(null===(t=this.j.o.extraIcons)||void 0===t?void 0:t[i])?i:""}e.iconURL||s.icon.name||(s.text=e.text||e.name)}e.tooltip&&(s.tooltip=this.j.i18n((0,c.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip)),s.hasTrigger=!!(e.list||e.popup&&e.exec)}onTriggerClick(t){var e,s,i;const{control:o}=this;if(t.buffer={actionTrigger:this},o.list)return this.openControlList(o);if((0,c.isFunction)(o.popup)){const t=new p.G(this.j);if(t.parentElement=this,!1!==this.j.e.fire((0,c.camelCase)(`before-${o.name}-open-popup`),this.target,o,t)){const n=null!==(i=null!==(s=null===(e=this.toolbar)||void 0===e?void 0:e.getTarget(this))&&void 0!==s?s:this.target)&&void 0!==i?i:null,r=o.popup(this.j,n,o,t.close,this);r&&t.setContent((0,c.isString)(r)?this.j.c.fromHTML(r):r).open((()=>(0,c.position)(this.container)))}this.j.e.fire((0,c.camelCase)(`after-${o.name}-open-popup`),t.container)}}openControlList(t){var e;const s=null!==(e=this.jodit.options.controls)&&void 0!==e?e:{},i=t=>(0,q.z)(t,s),o=t.list,n=new p.G(this.j),r=M(this.j);n.parentElement=this,r.parentElement=n,r.mode="vertical";const a=(e,s)=>{if((0,c.isString)(s)&&i(s))return{name:""+s,...i(s)};if((0,c.isString)(e)&&i(e))return{name:""+e,...i(e),..."object"==typeof s?s:{}};const o={name:""+e,template:t.childTemplate,exec:t.exec,data:t.data,command:t.command,isActive:t.isChildActive,isDisabled:t.isChildDisabled,mode:t.mode,args:[...t.args?t.args:[],e,s]};return(0,c.isString)(s)&&(o.text=s),o};r.build((0,c.isArray)(o)?o.map(a):(0,c.keys)(o,!1).map((t=>a(t,o[t]))),this.target),n.setContent(r.container).open((()=>(0,c.position)(this.container))),this.state.activated=!0,this.j.e.on(n,"afterClose",(()=>{this.state.activated=!1}))}onClick(t){var e,s,i,o,n,r,a;const{control:l}=this;if((0,c.isFunction)(l.exec)){const c=null!==(i=null!==(s=null===(e=this.toolbar)||void 0===e?void 0:e.getTarget(this))&&void 0!==s?s:this.target)&&void 0!==i?i:null,h=l.exec(this.j,c,{control:l,originalEvent:t,button:this});if(!1!==h&&!0!==h&&(null===(n=null===(o=this.j)||void 0===o?void 0:o.e)||void 0===n||n.fire("synchro"),this.parentElement&&this.parentElement.update(),null===(a=null===(r=this.j)||void 0===r?void 0:r.e)||void 0===a||a.fire("closeAllPopups afterExec")),!1!==h)return}return l.list?this.openControlList(l):(0,c.isFunction)(l.popup)?this.onTriggerClick(t):void((l.command||l.name)&&((0,c.call)((0,c.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),l.command||l.name,!1,l.args&&l.args[0]),this.j.e.fire("closeAllPopups")))}};(0,n.gn)([(0,x.watch)("state.tooltip")],L.prototype,"onChangeTooltip",null),(0,n.gn)([(0,x.watch)("state.hasTrigger")],L.prototype,"onChangeHasTrigger",null),L=(0,n.gn)([x.component],L);let z=class extends f.y3{constructor(t,e,s=null){super(t),this.control=e,this.target=s,this.container.classList.add(`${this.componentName}_${this.clearName(e.name)}`),(0,c.attr)(this.container,"role","content")}className(){return"ToolbarContent"}update(){const t=this.control.getContent(this.j,this.control,this);((0,c.isString)(t)||t.parentNode!==this.container)&&(_.i.detach(this.container),this.container.appendChild((0,c.isString)(t)?this.j.create.fromHTML(t):t)),super.update()}createContainer(){return this.j.c.span(this.componentName)}};function M(t,e){const s=(0,c.isJoditObject)(t)?new I(t):new T(t);return t.o.textIcons&&s.container.classList.add("jodit_text_icons"),e&&(s.parentElement=e),t.o.toolbarButtonSize&&(s.buttonSize=t.o.toolbarButtonSize),s}function P(t,e,s=null){if((0,c.isFunction)(e.getContent))return new z(t,e,s);const i=new L(t,e,s);return i.state.tabIndex=t.o.allowTabNavigation?0:-1,i}z=(0,n.gn)([x.component],z);var D=s(41);class N extends S{constructor(t,e=!1){super(t,e),this.toolbar=M(this),this.defaultToolbarContainer=this.c.div("jodit-toolbar__box"),this.registeredButtons=new Set,this.groupToButtons={},this.isJodit=!1,this.isJodit=e,this.e.on("beforeToolbarBuild",this.beforeToolbarBuild)}get toolbarContainer(){return this.o.fullsize||!(0,c.isString)(this.o.toolbar)&&!_.i.isHTMLElement(this.o.toolbar)?(this.o.toolbar&&_.i.appendChildFirst(this.container,this.defaultToolbarContainer),this.defaultToolbarContainer):(0,c.resolveElement)(this.o.toolbar,this.o.shadowRoot||this.od)}setPanel(t){this.o.toolbar=t,this.buildToolbar()}buildToolbar(){if(!this.o.toolbar)return;const t=this.o.buttons?(0,c.splitArray)(this.o.buttons):[];this.toolbar.setRemoveButtons(this.o.removeButtons).build(t.concat(this.o.extraButtons||[])).appendTo(this.toolbarContainer)}registerButton(t){var e;this.registeredButtons.add(t);const s=null!==(e=t.group)&&void 0!==e?e:"other";return this.groupToButtons[s]||(this.groupToButtons[s]=[]),null!=t.position?this.groupToButtons[s][t.position]=t.name:this.groupToButtons[s].push(t.name),this}unregisterButton(t){var e;this.registeredButtons.delete(t);const s=null!==(e=t.group)&&void 0!==e?e:"other",i=this.groupToButtons[s];if(i){const e=i.indexOf(t.name);-1!==e&&i.splice(e,1),0===i.length&&delete this.groupToButtons[s]}return this}beforeToolbarBuild(t){if(Object.keys(this.groupToButtons).length)return t.map((t=>(0,D.A)(t)&&t.group&&this.groupToButtons[t.group]?{group:t.group,buttons:[...t.buttons,...this.groupToButtons[t.group]]}:t))}destruct(){this.isDestructed||(this.setStatus(u.n$.beforeDestruct),this.e.off("beforeToolbarBuild",this.beforeToolbarBuild),this.toolbar.destruct(),super.destruct())}}(0,n.gn)([x.autobind],N.prototype,"beforeToolbarBuild",null),r.D.prototype.dialog={namespace:"",extraButtons:[],resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[]},r.D.prototype.controls.dialog={close:{icon:"cancel",exec(t){t.close(),t.toggleFullSizeBox(!1)}}};let R=class extends N{constructor(t){super(t),this.destroyAfterClose=!1,this.moved=!1,this.iSetMaximization=!1,this.resizable=!1,this.draggable=!1,this.startX=0,this.startY=0,this.startPoint={x:0,y:0,w:0,h:0},this.lockSelect=()=>{this.setMod("moved",!0)},this.unlockSelect=()=>{this.setMod("moved",!1)},this.onResize=()=>{this.options&&this.o.resizable&&!this.moved&&this.isOpened&&!this.offsetX&&!this.offsetY&&this.setPosition()},this.isModal=!1,this.isOpened=!1;const e=this;e.options=(0,c.ConfigProto)(null!=t?t:{},(0,c.ConfigProto)({toolbarButtonSize:"middle"},(0,c.ConfigProto)(r.D.prototype.dialog,S.defaultOptions))),_.i.safeRemove(e.container);const s=this.getFullElName.bind(this);e.container=this.c.fromHTML(`<div style="z-index:${e.o.zIndex}" class="jodit jodit-dialog ${this.componentName}">\n\t\t\t\t<div class="${s("overlay")}"></div>\n\t\t\t\t<div class="${this.getFullElName("panel")}">\n\t\t\t\t\t<div class="${s("header")}">\n\t\t\t\t\t\t<div class="${s("header-title")}"></div>\n\t\t\t\t\t\t<div class="${s("header-toolbar")}"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="${s("content")}"></div>\n\t\t\t\t\t<div class="${s("footer")}"></div>\n\t\t\t\t\t${e.o.resizable?`<div class="${s("resizer")}"></div>`:""}\n\t\t\t\t</div>\n\t\t\t</div>`),(0,c.attr)(e.container,"role","dialog"),Object.defineProperty(e.container,"component",{value:this}),e.setMod("theme",e.o.theme||"default"),e.dialog=e.getElm("panel"),(0,c.css)(e.dialog,{maxWidth:e.options.maxWidth,minHeight:e.options.minHeight,minWidth:e.options.minWidth}),e.resizer=e.getElm("resizer"),e.dialogbox_header=e.getElm("header-title"),e.dialogbox_content=e.getElm("content"),e.dialogbox_footer=e.getElm("footer"),e.dialogbox_toolbar=e.getElm("header-toolbar");const i=e.getElm("header");i&&e.e.on(i,"mousedown",e.onHeaderMouseDown),e.o.resizable&&e.e.on(e.resizer,"mousedown",e.onResizerMouseDown);const o=j.pw.get("fullsize");(0,c.isFunction)(o)&&o(e),this.e.on(e.container,"close_dialog",e.close).on(this.ow,"keydown",this.onEsc).on(this.ow,"resize",this.onResize)}className(){return"Dialog"}get destination(){return this.od.body}setElements(t,e){const s=[];(0,c.asArray)(e).forEach((e=>{if((0,c.isArray)(e)){const i=this.c.div(this.getFullElName("column"));return s.push(i),t.appendChild(i),this.setElements(i,e)}let i;i=(0,c.isString)(e)?this.c.fromHTML(e):(0,c.hasContainer)(e)?e.container:e,s.push(i),i.parentNode!==t&&t.appendChild(i)})),(0,c.toArray)(t.childNodes).forEach((e=>{-1===s.indexOf(e)&&t.removeChild(e)}))}onMouseUp(){(this.draggable||this.resizable)&&(this.e.off(this.ow,"mousemove",this.onMouseMove),this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.e&&(this.removeGlobalResizeListeners(),this.e.fire(this,"endResize endMove")))}onHeaderMouseDown(t){const e=t.target;!this.o.draggable||e&&e.nodeName.match(/^(INPUT|SELECT)$/)||(this.draggable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.x=(0,c.css)(this.dialog,"left"),this.startPoint.y=(0,c.css)(this.dialog,"top"),this.setMaxZIndex(),t.preventDefault(),this.lockSelect(),this.addGlobalResizeListeners(),this.e&&this.e.fire(this,"startMove"))}onMouseMove(t){this.draggable&&this.o.draggable&&(this.setPosition(this.startPoint.x+t.clientX-this.startX,this.startPoint.y+t.clientY-this.startY),this.e&&this.e.fire(this,"move",t.clientX-this.startX,t.clientY-this.startY),t.stopImmediatePropagation()),this.resizable&&this.o.resizable&&(this.setSize(this.startPoint.w+t.clientX-this.startX,this.startPoint.h+t.clientY-this.startY),this.e&&this.e.fire(this,"resizeDialog",t.clientX-this.startX,t.clientY-this.startY))}onEsc(t){if(this.isOpened&&t.key===a.KEY_ESC&&!0!==this.getMod("static")){const e=this.getMaxZIndexDialog();e?e.close():this.close(),t.stopImmediatePropagation()}}onResizerMouseDown(t){this.resizable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.addGlobalResizeListeners(),this.e&&this.e.fire(this,"startResize")}addGlobalResizeListeners(){const t=this;t.e.on(t.ow,"mousemove",t.onMouseMove).on(t.ow,"mouseup",t.onMouseUp)}removeGlobalResizeListeners(){const t=this;t.e.off(t.ow,"mousemove",t.onMouseMove).off(t.ow,"mouseup",t.onMouseUp)}setSize(t,e){return null==t&&(t=this.dialog.offsetWidth),null==e&&(e=this.dialog.offsetHeight),(0,c.css)(this.dialog,{width:t,height:e}),this}calcAutoSize(){return this.setSize("auto","auto"),this.setSize(),this}setPosition(t,e){let s=this.ow.innerWidth/2-this.dialog.offsetWidth/2,i=this.ow.innerHeight/2-this.dialog.offsetHeight/2;return 0>s&&(s=0),0>i&&(i=0),void 0!==t&&void 0!==e&&(this.offsetX=t,this.offsetY=e,this.moved=Math.abs(t-s)>100||Math.abs(e-i)>100),this.dialog.style.left=(t||s)+"px",this.dialog.style.top=(e||i)+"px",this}setHeader(t){return this.setElements(this.dialogbox_header,t),this}setContent(t){return this.setElements(this.dialogbox_content,t),this}setFooter(t){return this.setElements(this.dialogbox_footer,t),this.setMod("footer",!!t),this}getZIndex(){return parseInt((0,c.css)(this.container,"zIndex"),10)||0}getMaxZIndexDialog(){let t,e,s=0,i=this;return(0,c.$$)(".jodit-dialog",this.destination).forEach((o=>{t=o.component,e=parseInt((0,c.css)(o,"zIndex"),10),t.isOpened&&!isNaN(e)&&e>s&&(i=t,s=e)})),i}setMaxZIndex(){let t=20000004,e=0;(0,c.$$)(".jodit-dialog",this.destination).forEach((s=>{e=parseInt((0,c.css)(s,"zIndex"),10),t=Math.max(isNaN(e)?0:e,t)})),this.container.style.zIndex=""+(t+1)}maximization(t){return(0,c.isVoid)(t)&&(t=!this.getMod("fullsize")),this.setMod("fullsize",t),this.toggleFullSizeBox(t),this.iSetMaximization=t,t}toggleFullSizeBox(t){[this.destination,this.destination.parentNode].forEach((e=>{e&&e.classList&&e.classList.toggle("jodit_fullsize-box_true",t)}))}open(t,e,s,i){if(j.TB.fire("closeAllPopups hideHelpers"),!1===this.e.fire(this,"beforeOpen"))return this;(0,c.isBoolean)(t)&&(s=t),(0,c.isBoolean)(e)&&(i=e),this.destroyAfterClose=!0===s;const o=(0,c.isBoolean)(t)?void 0:t,n=(0,c.isBoolean)(e)?void 0:e;return void 0!==n&&this.setHeader(n),o&&this.setContent(o),this.setMod("active",!0),this.isOpened=!0,this.setModal(i),this.destination.appendChild(this.container),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.o.fullsize&&this.maximization(!0),this.e.fire("afterOpen",this),this}setModal(t){return this.isModal=!!t,this.setMod("modal",this.isModal),this}close(t){var e,s;return this.isDestructed||!this.isOpened||!0===this.getMod("static")||(t&&(t.stopImmediatePropagation(),t.preventDefault()),this.e&&this.e.fire("beforeClose",this),this.setMod("active",!1),this.isOpened=!1,this.e.fire("toggleFullSize",!1),this.iSetMaximization&&this.maximization(!1),_.i.safeRemove(this.container),this.removeGlobalResizeListeners(),this.destroyAfterClose&&this.destruct(),null===(e=this.e)||void 0===e||e.fire(this,"afterClose"),null===(s=this.e)||void 0===s||s.fire(this.ow,"joditCloseDialog")),this}buildToolbar(){this.o.buttons&&this.toolbar.build((0,c.splitArray)(this.o.buttons)).setMod("mode","header").appendTo(this.dialogbox_toolbar)}destruct(){this.isInDestruct||(this.setStatus(u.n$.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())}};(0,n.gn)([x.autobind],R.prototype,"onMouseUp",null),(0,n.gn)([x.autobind],R.prototype,"onHeaderMouseDown",null),(0,n.gn)([x.autobind],R.prototype,"onMouseMove",null),(0,n.gn)([x.autobind],R.prototype,"onEsc",null),(0,n.gn)([x.autobind],R.prototype,"onResizerMouseDown",null),(0,n.gn)([x.autobind],R.prototype,"close",null),(0,n.gn)([(0,x.hook)("ready")],R.prototype,"buildToolbar",null),R=(0,n.gn)([x.component],R);const A=(t,e,s,i="jodit-dialog_alert")=>{(0,c.isFunction)(e)&&(s=e,e=void 0);const o=new R,n=o.c.div(i),r=(0,k.zx)(o,"ok","Ok");return(0,c.asArray)(t).forEach((t=>{n.appendChild(_.i.isNode(t)?t:o.c.fromHTML(t))})),r.onAction((()=>{s&&(0,c.isFunction)(s)&&!1===s(o)||o.close()})),o.setFooter([r]),o.open(n,e||" ",!0,!0),r.focus(),o},B=(t,e,s,i,o)=>{const n=new R,r=(0,k.zx)(n,"cancel","Cancel"),a=(0,k.zx)(n,"ok","Ok"),l=n.c.element("form",{class:"jodit-dialog_prompt"}),h=n.c.element("input",{autofocus:!0,class:"jodit-input"}),d=n.c.element("label");(0,c.isFunction)(e)&&(s=e,e=void 0),i&&(0,c.attr)(h,"placeholder",i),d.appendChild(n.c.text(t)),l.appendChild(d),l.appendChild(h),r.onAction(n.close);const u=()=>{s&&(0,c.isFunction)(s)&&!1===s(h.value)||n.close()};return a.onAction(u),n.e.on(l,"submit",(()=>(u(),!1))),n.setFooter([a,r]),n.open(l,e||" ",!0,!0),h.focus(),void 0!==o&&o.length&&(h.value=o,h.select()),n},O=(t,e,s)=>{const i=new R,o=i.c.fromHTML('<form class="jodit-dialog_prompt"></form>'),n=i.c.element("label");(0,c.isFunction)(e)&&(s=e,e=void 0),n.appendChild(i.c.fromHTML(t)),o.appendChild(n);const r=t=>()=>{s&&!1===s(t)||i.close()},a=(0,k.zx)(i,"cancel","Cancel"),l=(0,k.zx)(i,"ok","Yes");return a.onAction(r(!1)),l.onAction(r(!0)),i.e.on(o,"submit",(()=>(r(!0)(),!1))),i.setFooter([l,a]),i.open(o,e||" ",!0,!0),l.focus(),i};class H extends u.Hr{constructor(t){super(t),this.requires=[],this.buttons=[],this.hasStyle=!1,t.e.on("afterPluginSystemInit",(()=>{var e;(0,c.isJoditObject)(t)&&(null===(e=this.buttons)||void 0===e||e.forEach((e=>{t.registerButton(e)})))})).on("afterInit",(()=>{this.setStatus(u.n$.ready),this.afterInit(t)})).on("beforeDestruct",this.destruct)}className(){return""}init(t){}destruct(){var t,e,s;if(!this.isInDestruct){this.setStatus(u.n$.beforeDestruct);const{j:i}=this;(0,c.isJoditObject)(i)&&(null===(t=this.buttons)||void 0===t||t.forEach((t=>{null==i||i.unregisterButton(t)}))),null===(s=null===(e=this.j)||void 0===e?void 0:e.events)||void 0===s||s.off("beforeDestruct",this.destruct),this.beforeDestruct(this.j),super.destruct()}}}(0,n.gn)([x.autobind],H.prototype,"destruct",null);class F{constructor(t,e){this.document=t,this.createAttributes=e}get doc(){return(0,c.isFunction)(this.document)?this.document():this.document}element(t,e,s){const i=this.doc.createElement(t.toLowerCase());return this.applyCreateAttributes(i),e&&((0,c.isPlainObject)(e)?(0,c.attr)(i,e):s=e),s&&(0,c.asArray)(s).forEach((t=>i.appendChild((0,c.isString)(t)?this.fromHTML(t):t))),i}div(t,e,s){const i=this.element("div",e,s);return t&&(i.className=t),i}span(t,e,s){const i=this.element("span",e,s);return t&&(i.className=t),i}a(t,e,s){const i=this.element("a",e,s);return t&&(i.className=t),i}text(t){return this.doc.createTextNode(t)}fake(){return this.text(a.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(t,e){const s=this.div();s.innerHTML=""+t;const i=s.firstChild===s.lastChild&&s.firstChild?s.firstChild:s;if(_.i.safeRemove(i),e){const t=(0,c.refs)(i);Object.keys(e).forEach((s=>{const i=t[s];i&&!1===e[s]&&_.i.hide(i)}))}return i}applyCreateAttributes(t){if(this.createAttributes){const e=this.createAttributes;if(e&&e[t.tagName.toLowerCase()]){const s=e[t.tagName.toLowerCase()];(0,c.isFunction)(s)?s(t):(0,c.isPlainObject)(s)&&(0,c.attr)(t,s)}}}}const $="jodit-filebrowser",W=$+"__files-item",V='<i class="jodit-icon_loader"></i>';r.D.prototype.filebrowser={namespace:"",extraButtons:[],filter(t,e){return e=e.toLowerCase(),(0,c.isString)(t)?-1!==t.toLowerCase().indexOf(e):(0,c.isString)(t.name)?-1!==t.name.toLowerCase().indexOf(e):!(0,c.isString)(t.file)||-1!==t.file.toLowerCase().indexOf(e)},sortBy:"changed-desc",sort(t,e,s){const[i,o]=s.toLowerCase().split("-"),n="asc"===o,r=(t,e)=>e>t?n?-1:1:t>e?n?1:-1:0;if((0,c.isString)(t))return r(t.toLowerCase(),e.toLowerCase());if(void 0===t[i]||"name"===i)return(0,c.isString)(t.name)?r(t.name.toLowerCase(),e.name.toLowerCase()):(0,c.isString)(t.file)?r(t.file.toLowerCase(),e.file.toLowerCase()):0;switch(i){case"changed":{const s=new Date(t.changed).getTime(),i=new Date(e.changed).getTime();return n?s-i:i-s}case"size":{const s=(0,c.humanSizeToBytes)(t.size),i=(0,c.humanSizeToBytes)(e.size);return n?s-i:i-s}}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,width:859,height:400,buttons:["filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.tiles","filebrowser.list","|","filebrowser.filter","|","filebrowser.sort"],removeButtons:[],fullsize:!1,showTooltip:!0,view:null,isSuccess(t){return t.success},getMessage(t){return void 0!==t.data.messages&&(0,c.isArray)(t.data.messages)?t.data.messages.join(" "):""},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:!0,pixelOffsetLoadNewChunk:200,getThumbTemplate(t,e,s){const i=this.options,o=i.showFileName,n=i.showFileSize&&t.size,r=i.showFileChangeTime&&t.time;let a="";return void 0!==t.file&&(a=t.file),`<a\n\t\t\tdata-jodit-filebrowser-item="true"\n\t\t\tdata-is-file="${t.isImage?0:1}"\n\t\t\tdraggable="true"\n\t\t\tclass="${W}"\n\t\t\thref="${t.fileURL}"\n\t\t\tdata-source="${s}"\n\t\t\tdata-path="${t.path}"\n\t\t\tdata-name="${a}"\n\t\t\ttitle="${a}"\n\t\t\tdata-url="${t.fileURL}">\n\t\t\t\t<img\n\t\t\t\t\tdata-is-file="${t.isImage?0:1}"\n\t\t\t\t\tdata-src="${t.fileURL}"\n\t\t\t\t\tsrc="${t.imageURL}"\n\t\t\t\t\talt="${a}"\n\t\t\t\t\tloading="lazy"\n\t\t\t\t/>\n\t\t\t\t${o||n||r?`<div class="${W}-info">${o?`<span class="${W}-info-filename">${a}</span>`:""}${n?`<span class="${W}-info-filesize">${t.size}</span>`:""}${r?`<span class="${W}-info-filechanged">${r}</span>`:""}</div>`:""}\n\t\t\t</a>`},ajax:{...r.D.prototype.defaultAjaxOptions,url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData(t){return t},process(t){return t}},create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}}},r.D.prototype.controls.filebrowser={upload:{icon:"plus",isInput:!0,isDisabled:t=>!t.dataProvider.canI("FileUpload"),getContent(t){const e=new k.Z(t,{onlyImages:t.state.onlyImages});return t.e.fire("bindUploader.filebrowser",e.container),e.container}},remove:{icon:"bin",isDisabled:t=>!t.state.activeElements.length||!t.dataProvider.canI("FileRemove"),exec(t){t.e.fire("fileRemove.filebrowser")}},update:{exec(t){t.e.fire("update.filebrowser")}},select:{icon:"check",isDisabled:t=>!t.state.activeElements.length,exec(t){t.e.fire("select.filebrowser")}},edit:{icon:"pencil",isDisabled(t){const e=t.state.activeElements;return 1!==e.length||!e[0].isImage||!(t.dataProvider.canI("ImageCrop")||t.dataProvider.canI("ImageResize"))},exec(t){t.e.fire("edit.filebrowser")}},tiles:{icon:"th",isActive:t=>"tiles"===t.state.view,exec(t){t.e.fire("view.filebrowser","tiles")}},list:{icon:"th-list",isActive:t=>"list"===t.state.view,exec(t){t.e.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent(t,e,s){const i=s.container.querySelector(".jodit-input");if(i)return i;const o=t.c.element("input",{class:"jodit-input",placeholder:t.i18n("Filter")});return o.value=t.state.filterWord,t.e.on(o,"keydown mousedown",t.async.debounce((()=>{t.e.fire("filter.filebrowser",o.value)}),t.defaultTimeout)),o}},sort:{isInput:!0,getContent(t){const e=t.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${t.i18n("Sort by changed")} (⬆)</option><option value="changed-desc">${t.i18n("Sort by changed")} (⬇)</option><option value="name-asc">${t.i18n("Sort by name")} (⬆)</option><option value="name-desc">${t.i18n("Sort by name")} (⬇)</option><option value="size-asc">${t.i18n("Sort by size")} (⬆)</option><option value="size-desc">${t.i18n("Sort by size")} (⬇)</option></select>`);return e.value=t.state.sortBy,t.e.on("sort.filebrowser",(t=>{e.value!==t&&(e.value=t)})).on(e,"change",(()=>{t.e.fire("sort.filebrowser",e.value)})),e}}};class Y{constructor(t){this.data=t,Object.keys(t).forEach((e=>{this[e]=t[e]}))}static create(t){return t instanceof Y?t:new Y(t)}get path(){return(0,c.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}get imageURL(){const t=""+(new Date).getTime(),{thumbIsAbsolute:e,source:s,thumb:i,file:o}=this.data,n=i||o;return e&&n?n:(0,c.normalizeUrl)(s.baseurl,s.path,n||"")+"?_tmst="+t}get fileURL(){let{name:t}=this.data;const{file:e,fileIsAbsolute:s,source:i}=this.data;return void 0!==e&&(t=e),s&&t?t:(0,c.normalizeUrl)(i.baseurl,i.path,t||"")}get time(){const{changed:t}=this.data;return t&&("number"==typeof t?new Date(t).toLocaleString():t)||""}get uniqueHashKey(){const t=this.data;let e=[t.sourceName,t.name,t.file,this.time,t.thumb].join("_");return e=e.toLowerCase().replace(/[^0-9a-z\-.]/g,"-"),e}toJSON(){return this.data}}const U="default";class G{constructor(t,e){this.parent=t,this.options=e,this.__currentPermissions=null,this.ajaxInstances=new Map,this.progressHandler=t=>{}}get o(){return this.options}get(t,e,s){const i=this.ajaxInstances;if(i.has(t)){const e=i.get(t);null==e||e.abort(),i.delete(t)}const o=(0,c.ConfigProto)(void 0!==this.options[t]?this.options[t]:{},(0,c.ConfigProto)({onProgress:this.progressHandler},this.o.ajax));o.prepareData&&(o.data=o.prepareData.call(this,o.data));const n=new d(this.parent,o);let r=n.send();return i.set(t,n),r=r.then((t=>{if(!this.isSuccess(t))throw Error(this.getMessage(t));return t})),e&&(r=r.then(e)),s&&(r=r.catch(s)),r.finally((()=>{n.destruct(),i.delete(t),this.progressHandler(100)}))}onProgress(t){this.progressHandler=t}async permissions(t,e){return this.o.permissions?(this.o.permissions.data.path=t,this.o.permissions.data.source=e,this.o.permissions.url?this.get("permissions").then((t=>{let e=this.o.permissions.process;if(e||(e=this.o.ajax.process),e){const s=e.call(self,t);s.data.permissions&&(this.__currentPermissions=s.data.permissions)}return this.__currentPermissions})):null):null}canI(t){const e="allow"+t;return null==this.__currentPermissions||void 0===this.__currentPermissions[e]||this.__currentPermissions[e]}async items(t,e,s={}){const i=this.options;return i.items?(i.items.data.path=t,i.items.data.source=e,i.items.data.mods=s,this.get("items").then((t=>{let e=this.o.items.process;return e||(e=this.o.ajax.process),e&&(t=e.call(self,t)),this.generateItemsList(t.data.sources,s)}))):Promise.reject("Set Items api options")}generateItemsList(t,e={}){const s=[],i=t=>{var s;return!(null===(s=e.filterWord)||void 0===s?void 0:s.length)||void 0===this.o.filter||this.o.filter(t,e.filterWord)};return t.forEach((t=>{if(t.files&&t.files.length){const{sort:o}=this.o;(0,c.isFunction)(o)&&e.sortBy&&t.files.sort(((t,s)=>o(t,s,e.sortBy))),t.files.forEach((o=>{i(o)&&(t=>!e.onlyImages||void 0===t.isImage||t.isImage)(o)&&s.push(Y.create({...o,sourceName:t.name,source:t}))}))}})),s}async tree(t,e){return t=(0,c.normalizeRelativePath)(t),await this.permissions(t,e),this.o.folder?(this.o.folder.data.path=t,this.o.folder.data.source=e,this.get("folder").then((t=>{let e=this.o.folder.process;return e||(e=this.o.ajax.process),e&&(t=e.call(self,t)),t.data.sources}))):Promise.reject("Set Folder Api options")}getPathByUrl(t){return(0,c.set)("options.getLocalFileByUrl.data.url",t,this),this.get("getLocalFileByUrl",(t=>{if(this.isSuccess(t))return t.data;throw(0,c.error)(this.getMessage(t))}))}createFolder(t,e,s){const{create:i}=this.o;if(!i)throw(0,c.error)("Set Create api options");return i.data.source=s,i.data.path=e,i.data.name=t,this.get("create").then((t=>{if(this.isSuccess(t))return!0;throw(0,c.error)(this.getMessage(t))}))}move(t,e,s,i){const o=i?"fileMove":"folderMove",n=this.options[o];if(!n)throw(0,c.error)("Set Move api options");return n.data.from=t,n.data.path=e,n.data.source=s,this.get(o).then((t=>{if(this.isSuccess(t))return!0;throw(0,c.error)(this.getMessage(t))}))}remove(t,e,s,i){const o=this.o[t];if(!o)throw(0,c.error)(`Set "${t}" api options`);return o.data.path=e,o.data.name=s,o.data.source=i,this.get(t).then((t=>{if(o.process&&(t=o.process.call(this,t)),!this.isSuccess(t))throw(0,c.error)(this.getMessage(t));return this.getMessage(t)}))}fileRemove(t,e,s){return this.remove("fileRemove",t,e,s)}folderRemove(t,e,s){return this.remove("folderRemove",t,e,s)}rename(t,e,s,i,o){const n=this.o[t];if(!n)throw(0,c.error)(`Set "${t}" api options`);return n.data.path=e,n.data.name=s,n.data.newname=i,n.data.source=o,this.get(t).then((t=>{if(n.process&&(t=n.process.call(self,t)),!this.isSuccess(t))throw(0,c.error)(this.getMessage(t));return this.getMessage(t)}))}folderRename(t,e,s,i){return this.rename("folderRename",t,e,s,i)}fileRename(t,e,s,i){return this.rename("fileRename",t,e,s,i)}changeImage(t,e,s,i,o,n){this.o[t]||(this.o[t]={data:{}});const r=this.o[t];return void 0===r.data&&(r.data={action:t}),r.data.newname=o||i,n&&(r.data.box=n),r.data.path=e,r.data.name=i,r.data.source=s,this.get(t).then((t=>{if(this.isSuccess(t))return!0;throw(0,c.error)(this.getMessage(t))}))}crop(t,e,s,i,o){return this.changeImage("crop",t,e,s,i,o)}resize(t,e,s,i,o){return this.changeImage("resize",t,e,s,i,o)}getMessage(t){return this.options.getMessage(t)}isSuccess(t){return this.options.isSuccess(t)}destruct(){this.ajaxInstances.forEach((t=>t.destruct())),this.ajaxInstances.clear()}}(0,n.gn)([x.autobind],G.prototype,"isSuccess",null);var K=s(26);const X=W+"_active_true";function J(){const{state:t,files:e,create:s,options:i,elementsMap:o}=this,n=t=>{const e=t.uniqueHashKey;if(o[e])return o[e].elm;const n=s.fromHTML(i.getThumbTemplate.call(this,t,t.source,""+t.sourceName));return n.dataset.key=e,o[e]={item:t,elm:n},o[e].elm};t.on(["change.currentPath","change.currentSource"],this.async.debounce((()=>{this.loadTree()}),this.defaultTimeout)).on("beforeChange.activeElements",(()=>{t.activeElements.forEach((t=>{const e=t.uniqueHashKey,{elm:s}=o[e];s&&s.classList.remove(X)}))})).on("change.activeElements",(()=>{this.e.fire("changeSelection"),t.activeElements.forEach((t=>{const e=t.uniqueHashKey,{elm:s}=o[e];s&&s.classList.add(X)}))})).on("change.view",(()=>{e.classList.remove($+"__files_view_tiles"),e.classList.remove($+"__files_view_list"),e.classList.add($+"__files_view_"+t.view),this.storage.set($+"_view",t.view)})).on("change.sortBy",(()=>{this.storage.set($+"_sortby",t.sortBy)})).on("change.elements",this.async.debounce((()=>{_.i.detach(e),t.elements.length?t.elements.forEach((t=>{this.files.appendChild(n(t))})):e.appendChild(s.div($+"_no_files",this.i18n("There are no files")))}),this.defaultTimeout)).on("change.sources",this.async.debounce((()=>{_.i.detach(this.tree),t.sources.forEach((t=>{const e=t.name;if(e&&"default"!==e&&this.tree.appendChild(s.div($+"__source-title",e)),t.folders.forEach((o=>{const n=s.a($+"__tree-item",{draggable:"draggable",href:"#","data-path":(0,K.AH)(t.path,o+"/"),"data-name":o,"data-source":e,"data-source-path":t.path},s.span($+"__tree-item-title",o)),r=s=>i=>{this.e.fire(s+".filebrowser",{name:o,path:(0,K.AH)(t.path+"/"),source:e}),i.stopPropagation(),i.preventDefault()};if(this.e.on(n,"click",r("openFolder")),this.tree.appendChild(n),".."!==o&&"."!==o){if(i.renameFolder&&this.dataProvider.canI("FolderRename")){const t=(0,k.zx)(this,{icon:{name:"pencil"},name:"rename",tooltip:"Rename",size:"tiny"});t.onAction(r("renameFolder")),n.appendChild(t.container)}if(i.deleteFolder&&this.dataProvider.canI("FolderRemove")){const t=(0,k.zx)(this,{icon:{name:"cancel"},name:"remove",tooltip:"Delete",size:"tiny"});t.onAction(r("removeFolder")),n.appendChild(t.container)}}})),i.createNewFolder&&this.dataProvider.canI("FolderCreate")){const s=(0,k.zx)(this,"plus","Add folder","secondary");s.onAction((()=>{this.e.fire("addFolder",{path:(0,K.AH)(t.path+"/"),source:e})})),this.tree.appendChild(s.container)}}))}),this.defaultTimeout))}const Z="jodit-image-editor",Q=k.JO.get.bind(k.JO),tt=(t,e="jodti-image-editor_active")=>t?e:"";var et;r.D.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"};const st="resize",it="crop";let ot=et=class extends u.Hr{constructor(t){super(t),this.resizeUseRatio=!0,this.cropUseRatio=!0,this.clicked=!1,this.start_x=0,this.start_y=0,this.top_x=0,this.top_y=0,this.width=0,this.height=0,this.activeTab=st,this.naturalWidth=0,this.naturalHeight=0,this.ratio=0,this.new_h=0,this.new_w=0,this.diff_x=0,this.diff_y=0,this.cropBox={x:0,y:0,w:0,h:0},this.resizeBox={w:0,h:0},this.calcCropBox=()=>{const t=this.crop_box.parentNode,e=.8*t.offsetWidth,s=.8*t.offsetHeight;let i=e,o=s;const{naturalWidth:n,naturalHeight:r}=this;e>n&&s>r?(i=n,o=r):this.ratio>e/s?(i=e,o=r*(e/n)):(i=n*(s/r),o=s),(0,c.css)(this.crop_box,{width:i,height:o})},this.showCrop=()=>{if(!this.cropImage)return;this.calcCropBox();const t=this.cropImage.offsetWidth||this.image.offsetWidth||this.image.naturalWidth;this.new_w=et.calcValueByPercent(t,this.o.cropDefaultWidth);const e=this.cropImage.offsetHeight||this.image.offsetHeight||this.image.naturalHeight;this.new_h=this.cropUseRatio?this.new_w/this.ratio:et.calcValueByPercent(e,this.o.cropDefaultHeight),(0,c.css)(this.cropHandler,{backgroundImage:"url("+(0,c.attr)(this.cropImage,"src")+")",width:this.new_w,height:this.new_h,left:t/2-this.new_w/2,top:e/2-this.new_h/2}),this.j.e.fire(this.cropHandler,"updatesize")},this.updateCropBox=()=>{if(!this.cropImage)return;const t=this.cropImage.offsetWidth/this.naturalWidth,e=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=(0,c.css)(this.cropHandler,"left")/t,this.cropBox.y=(0,c.css)(this.cropHandler,"top")/e,this.cropBox.w=this.cropHandler.offsetWidth/t,this.cropBox.h=this.cropHandler.offsetHeight/e,this.sizes.textContent=this.cropBox.w.toFixed(0)+"x"+this.cropBox.h.toFixed(0)},this.updateResizeBox=()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight},this.setHandlers=()=>{const t=this,{widthInput:e,heightInput:s}=(0,c.refs)(this.editor);t.j.e.on([t.editor.querySelector(".jodit_bottomright"),t.cropHandler],"mousedown.jodit-image-editor",this.onResizeHandleMouseDown).on(this.j.ow,"resize.jodit-image-editor",(()=>{this.j.e.fire(t.resizeHandler,"updatesize"),t.showCrop(),this.j.e.fire(t.cropHandler,"updatesize")})),t.j.e.on((0,c.toArray)(this.editor.querySelectorAll(".jodit-image-editor__slider-title")),"click",this.onTitleModeClick).on([e,s],"input",this.onChangeSizeInput);const{keepAspectRatioResize:i,keepAspectRatioCrop:o}=(0,c.refs)(this.editor);i&&i.addEventListener("change",(()=>{this.resizeUseRatio=i.checked})),o&&o.addEventListener("change",(()=>{this.cropUseRatio=o.checked})),t.j.e.on(t.resizeHandler,"updatesize",(()=>{(0,c.css)(t.resizeHandler,{top:0,left:0,width:t.image.offsetWidth||t.naturalWidth,height:t.image.offsetHeight||t.naturalHeight}),this.updateResizeBox()})).on(t.cropHandler,"updatesize",(()=>{if(!t.cropImage)return;let e=(0,c.css)(t.cropHandler,"left"),s=(0,c.css)(t.cropHandler,"top"),i=t.cropHandler.offsetWidth,o=t.cropHandler.offsetHeight;0>e&&(e=0),0>s&&(s=0),e+i>t.cropImage.offsetWidth&&(i=t.cropImage.offsetWidth-e,t.cropUseRatio&&(o=i/t.ratio)),s+o>t.cropImage.offsetHeight&&(o=t.cropImage.offsetHeight-s,t.cropUseRatio&&(i=o*t.ratio)),(0,c.css)(t.cropHandler,{width:i,height:o,left:e,top:s,backgroundPosition:-e-1+"px "+(-s-1)+"px",backgroundSize:t.cropImage.offsetWidth+"px "+t.cropImage.offsetHeight+"px"}),t.updateCropBox()})),Object.values(t.buttons).forEach((i=>{i.onAction((()=>{const o={action:t.activeTab,box:t.activeTab===st?t.resizeBox:t.cropBox};switch(i){case t.buttons.saveas:B(t.j.i18n("Enter new name"),t.j.i18n("Save in new file"),(e=>{if(!(0,c.trim)(e))return A(t.j.i18n("The name should not be empty")).bindDestruct(this.j),!1;t.onSave(e,o,t.hide,(e=>{A(e.message).bindDestruct(t.j)}))})).bindDestruct(this.j);break;case t.buttons.save:t.onSave(void 0,o,t.hide,(e=>{A(e.message).bindDestruct(t.j)}));break;case t.buttons.reset:t.activeTab===st?((0,c.css)(t.image,{width:null,height:null}),e.value=""+t.naturalWidth,s.value=""+t.naturalHeight,t.j.e.fire(t.resizeHandler,"updatesize")):t.showCrop()}}))}))},this.options=t&&t.o&&t.o.imageeditor?t.o.imageeditor:r.D.defaultOptions.imageeditor;const e=this.options;this.resizeUseRatio=e.resizeUseRatio,this.cropUseRatio=e.cropUseRatio,this.buttons={reset:(0,f.zx)(this.j,"update","Reset"),save:(0,f.zx)(this.j,"save","Save"),saveas:(0,f.zx)(this.j,"save","Save as ...")},this.activeTab=e.resize?st:it,this.editor=((t,e)=>{const s=t.i18n.bind(t),i=(t,e,i=!0)=>`<div class="jodit-form__group">\n\t\t\t<label>${s(t)}</label>\n\n\t\t\t<label class='jodi-switcher'>\n\t\t\t\t<input ${tt(i,"checked")} data-ref="${e}" type="checkbox"/>\n\t\t\t\t<span class="jodi-switcher__slider"></span>\n\t\t\t</label>\n\t</div>`;return t.create.fromHTML(`<form class="${Z} jodit-properties">\n\t\t<div class="jodit-grid jodit-grid_xs-column">\n\t\t\t<div class="jodit_col-lg-3-4 jodit_col-sm-5-5">\n\t\t\t${e.resize?`<div class="${Z}__area ${Z}__area_resize ${Z}_active">\n\t\t\t\t\t\t\t<div data-ref="resizeBox" class="${Z}__box"></div>\n\t\t\t\t\t\t\t<div class="${Z}__resizer">\n\t\t\t\t\t\t\t\t<i class="jodit_bottomright"></i>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t${e.crop?`<div class="${Z}__area ${Z}__area_crop ${tt(!e.resize)}">\n\t\t\t\t\t\t\t<div data-ref="cropBox" class="${Z}__box">\n\t\t\t\t\t\t\t\t<div class="${Z}__croper">\n\t\t\t\t\t\t\t\t\t<i class="jodit_bottomright"></i>\n\t\t\t\t\t\t\t\t\t<i class="${Z}__sizes"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t</div>\n\t\t\t<div class="jodit_col-lg-1-4 jodit_col-sm-5-5">\n\t\t\t${e.resize?`<div data-area="resize" class="${Z}__slider ${Z}_active">\n\t\t\t\t\t\t\t<div class="${Z}__slider-title">\n\t\t\t\t\t\t\t\t${Q("resize")}\n\t\t\t\t\t\t\t\t${s("Resize")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="${Z}__slider-content">\n\t\t\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t${s("Width")}\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<input type="number" data-ref="widthInput" class="jodit-input"/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t${s("Height")}\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<input type="number" data-ref="heightInput" class="jodit-input"/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t${i("Keep Aspect Ratio","keepAspectRatioResize")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t${e.crop?`<div data-area="crop" class="${Z}__slider ${tt(!e.resize)}'">\n\t\t\t\t\t\t\t<div class="${Z}__slider-title">\n\t\t\t\t\t\t\t\t${Q("crop")}\n\t\t\t\t\t\t\t\t${s("Crop")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="${Z}__slider-content">\n\t\t\t\t\t\t\t\t${i("Keep Aspect Ratio","keepAspectRatioCrop")}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>`:""}\n\t\t\t</div>\n\t\t</div>\n\t</form>`)})(this.j,this.options);const{resizeBox:s,cropBox:i}=(0,c.refs)(this.editor);this.resize_box=s,this.crop_box=i,this.sizes=this.editor.querySelector(".jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__sizes"),this.resizeHandler=this.editor.querySelector(".jodit-image-editor__resizer"),this.cropHandler=this.editor.querySelector(".jodit-image-editor__croper"),this.dialog=new R({fullsize:this.j.o.fullsize,globalFullSize:this.j.o.globalFullSize,language:this.j.o.language,buttons:["fullsize","dialog.close"]}),this.dialog.setContent(this.editor),this.dialog.setSize(this.o.width,this.o.height),this.dialog.setHeader([this.buttons.reset,this.buttons.save,this.buttons.saveas]),this.setHandlers()}className(){return"ImageEditor"}onTitleModeClick(t){const e=this,s=t.target,i=null==s?void 0:s.parentElement;if(!i)return;(0,c.$$)(".jodit-image-editor__slider,.jodit-image-editor__area",e.editor).forEach((t=>t.classList.remove("jodit-image-editor_active"))),i.classList.add("jodit-image-editor_active"),e.activeTab=(0,c.attr)(i,"-area")||st;const o=e.editor.querySelector(".jodit-image-editor__area.jodit-image-editor__area_"+e.activeTab);o&&o.classList.add("jodit-image-editor_active"),e.activeTab===it&&e.showCrop()}onChangeSizeInput(t){const e=this,s=t.target,{widthInput:i,heightInput:o}=(0,c.refs)(this.editor),n="widthInput"===(0,c.attr)(s,"data-ref"),r=parseInt(s.value,10),a=n?e.o.min_height:e.o.min_width;let l;r>(n?e.o.min_width:e.o.min_height)&&((0,c.css)(e.image,n?"width":"height",r),e.resizeUseRatio&&(l=Math.round(n?r/e.ratio:r*e.ratio),l>a&&((0,c.css)(e.image,n?"height":"width",l),n?o.value=""+l:i.value=""+l))),this.j.e.fire(e.resizeHandler,"updatesize")}onResizeHandleMouseDown(t){const e=this;e.target=t.target,t.preventDefault(),t.stopImmediatePropagation(),e.clicked=!0,e.start_x=t.clientX,e.start_y=t.clientY,e.activeTab===it?(e.top_x=(0,c.css)(e.cropHandler,"left"),e.top_y=(0,c.css)(e.cropHandler,"top"),e.width=e.cropHandler.offsetWidth,e.height=e.cropHandler.offsetHeight):(e.width=e.image.offsetWidth,e.height=e.image.offsetHeight),e.j.e.on(this.j.ow,"mousemove",this.onGlobalMouseMove).one(this.j.ow,"mouseup",this.onGlobalMouseUp)}onGlobalMouseUp(t){this.clicked&&(this.clicked=!1,t.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove))}onGlobalMouseMove(t){const e=this;if(!e.clicked)return;const{widthInput:s,heightInput:i}=(0,c.refs)(this.editor);e.diff_x=t.clientX-e.start_x,e.diff_y=t.clientY-e.start_y,e.activeTab===st&&e.resizeUseRatio||e.activeTab===it&&e.cropUseRatio?e.diff_x?(e.new_w=e.width+e.diff_x,e.new_h=Math.round(e.new_w/e.ratio)):(e.new_h=e.height+e.diff_y,e.new_w=Math.round(e.new_h*e.ratio)):(e.new_w=e.width+e.diff_x,e.new_h=e.height+e.diff_y),e.activeTab===st?(e.new_w>e.o.resizeMinWidth&&((0,c.css)(e.image,"width",e.new_w+"px"),s.value=""+e.new_w),e.new_h>e.o.resizeMinHeight&&((0,c.css)(e.image,"height",e.new_h+"px"),i.value=""+e.new_h),this.j.e.fire(e.resizeHandler,"updatesize")):(e.target!==e.cropHandler?(e.top_x+e.new_w>e.cropImage.offsetWidth&&(e.new_w=e.cropImage.offsetWidth-e.top_x),e.top_y+e.new_h>e.cropImage.offsetHeight&&(e.new_h=e.cropImage.offsetHeight-e.top_y),(0,c.css)(e.cropHandler,{width:e.new_w,height:e.new_h})):(e.top_x+e.diff_x+e.cropHandler.offsetWidth>e.cropImage.offsetWidth&&(e.diff_x=e.cropImage.offsetWidth-e.top_x-e.cropHandler.offsetWidth),(0,c.css)(e.cropHandler,"left",e.top_x+e.diff_x),e.top_y+e.diff_y+e.cropHandler.offsetHeight>e.cropImage.offsetHeight&&(e.diff_y=e.cropImage.offsetHeight-e.top_y-e.cropHandler.offsetHeight),(0,c.css)(e.cropHandler,"top",e.top_y+e.diff_y)),this.j.e.fire(e.cropHandler,"updatesize"))}get o(){return this.options}hide(){this.dialog.close()}open(t,e){return this.j.async.promise((s=>{const i=(new Date).getTime();this.image=this.j.c.element("img"),(0,c.$$)("img,.jodit-icon_loader",this.resize_box).forEach(_.i.safeRemove),(0,c.$$)("img,.jodit-icon_loader",this.crop_box).forEach(_.i.safeRemove),(0,c.css)(this.cropHandler,"background","transparent"),this.onSave=e,this.resize_box.appendChild(this.j.c.element("i",{class:"jodit-icon_loader"})),this.crop_box.appendChild(this.j.c.element("i",{class:"jodit-icon_loader"})),this.image.setAttribute("src",t+=/\?/.test(t)?"&_tst="+i:"?_tst="+i),this.dialog.open();const{widthInput:o,heightInput:n}=(0,c.refs)(this.editor),r=()=>{this.isDestructed||(this.image.removeEventListener("load",r),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,o.value=""+this.naturalWidth,n.value=""+this.naturalHeight,this.ratio=this.naturalWidth/this.naturalHeight,this.resize_box.appendChild(this.image),this.cropImage=this.image.cloneNode(!0),this.crop_box.appendChild(this.cropImage),(0,c.$$)(".jodit-icon_loader",this.editor).forEach(_.i.safeRemove),this.activeTab===it&&this.showCrop(),this.j.e.fire(this.resizeHandler,"updatesize"),this.j.e.fire(this.cropHandler,"updatesize"),this.dialog.setPosition(),this.j.e.fire("afterImageEditor"),s(this.dialog))};this.image.addEventListener("load",r),this.image.complete&&r()}))}destruct(){this.isDestructed||(this.dialog&&!this.dialog.isInDestruct&&this.dialog.destruct(),_.i.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove).off(this.j.ow,"mouseup",this.onGlobalMouseUp).off(this.ow,".jodit-image-editor").off(".jodit-image-editor"),super.destruct())}};function nt(t,e,s,i,o,n){return this.getInstance("ImageEditor",this.o).open(t,((t,r,a,l)=>{let c;c="resize"===r.action?this.dataProvider.resize(s,i,e,t,r.box):this.dataProvider.crop(s,i,e,t,r.box),c.then((t=>{t&&(a(),o&&o())})).catch((t=>{l(t),n&&n(t)}))}))}ot.calcValueByPercent=(t,e)=>{const s=""+e,i=parseFloat(""+t);let o;return o=/^[-+]?[0-9]+(px)?$/.exec(s),o?parseInt(s,10):(o=/^([-+]?[0-9.]+)%$/.exec(s),o?Math.round(i*(parseFloat(o[1])/100)):i||0)},(0,n.gn)([x.autobind],ot.prototype,"onTitleModeClick",null),(0,n.gn)([(0,x.debounce)(),x.autobind],ot.prototype,"onChangeSizeInput",null),(0,n.gn)([x.autobind],ot.prototype,"onResizeHandleMouseDown",null),(0,n.gn)([x.autobind],ot.prototype,"onGlobalMouseUp",null),(0,n.gn)([(0,x.throttle)(10)],ot.prototype,"onGlobalMouseMove",null),(0,n.gn)([x.autobind],ot.prototype,"hide",null),(0,n.gn)([x.autobind],ot.prototype,"open",null),ot=et=(0,n.gn)([x.component],ot);const rt=$+"_preview_",at=(t="next",e="right")=>`<div class="${rt}navigation ${rt}navigation-${t}">`+k.JO.get("angle-"+e)+"</a>";var lt=t=>{if(!t.o.contextMenu)return()=>{};const e=new g(t);return s=>{const i=ct(s.target,t.dialog.container);if(!i)return;let o=i;const n=t.options,r=t=>(0,c.attr)(o,t)||"";return t.async.setTimeout((()=>{e.show(s.clientX,s.clientY,[!("1"===r("data-is-file")||!n.editImage||!t.dataProvider.canI("ImageResize")&&!t.dataProvider.canI("ImageCrop"))&&{icon:"pencil",title:"Edit",exec:()=>nt.call(t,r("href"),r("data-name"),r("data-path"),r("data-source"))},!!t.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",async exec(){t.e.fire("fileRename.filebrowser",r("data-name"),r("data-path"),r("data-source"))}},!!t.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",exec:async()=>(await t.deleteFile(r("data-name"),r("data-source")),t.state.activeElements=[],t.loadTree())},!!n.preview&&{icon:"eye",title:"Preview",exec(){const e=new R({fullsize:t.o.fullsize,language:t.o.language,buttons:["fullsize","dialog.close"]}),s=t.c.div($+"_preview",V),i=t.c.div($+"_preview_box"),a=t.c.fromHTML(at()),l=t.c.fromHTML(at("prev","left")),h=r=>{const c=t.c.element("img");c.setAttribute("src",r);const h=()=>{var r;t.isInDestruct||(t.e.off(c,"load"),_.i.detach(s),n.showPreviewNavigation&&(_.i.prevWithClass(o,W)&&s.appendChild(l),_.i.nextWithClass(o,W)&&s.appendChild(a)),s.appendChild(i),i.appendChild(c),e.setPosition(),null===(r=null==t?void 0:t.events)||void 0===r||r.fire("previewOpenedAndLoaded"))};t.e.on(c,"load",h),c.complete&&h()};t.e.on([a,l],"click",(function(){if(o=this.classList.contains(rt+"navigation-next")?_.i.nextWithClass(o,W):_.i.prevWithClass(o,W),!o)throw(0,c.error)("Need element");_.i.detach(s),_.i.detach(i),s.innerHTML=V,h(r("href"))})),t.e.on("beforeDestruct",(()=>{e.destruct()})),e.container.classList.add($+"_preview_dialog"),e.setContent(s),e.setPosition(),e.open(),h(r("href")),t.events.on("beforeDestruct",(()=>{e.destruct()})).fire("previewOpened")}},{icon:"upload",title:"Download",exec(){const e=r("href");e&&t.ow.open(e)}}])}),t.defaultTimeout),null==t||t.e.on("beforeDestruct",(()=>{e.destruct()})),s.stopPropagation(),s.preventDefault(),!1}};const ct=(t,e,s="a")=>_.i.closest(t,(t=>_.i.isTag(t,s)),e);function ht(){let t=!1;const e=this;e.e.on(e.tree,"dragstart",(s=>{const i=ct(s.target,e.dialog.container);i&&e.o.moveFolder&&(t=i)})).on(e.tree,"drop",(s=>{if((e.o.moveFile||e.o.moveFolder)&&t){let i=(0,c.attr)(t,"-path")||"";if(!e.o.moveFolder&&t.classList.contains($+"__tree-item"))return!1;if(t.classList.contains(W)&&(i+=(0,c.attr)(t,"-name"),!e.o.moveFile))return!1;const o=ct(s.target,e.dialog.container);if(!o)return;e.dataProvider.move(i,(0,c.attr)(o,"-path")||"",(0,c.attr)(o,"-source")||"",t.classList.contains(W)).then((()=>{e.loadTree()}),e.status),t=!1}})).on(e.files,"contextmenu",lt(e)).on(e.files,"click",(t=>{(0,c.ctrlKey)(t)||(this.state.activeElements=[])})).on(e.files,"click",(t=>{const s=ct(t.target,e.dialog.container);if(!s)return;const i=(t=>{const{key:s}=t.dataset,{item:i}=e.elementsMap[s||""];return i})(s);return i?(e.state.activeElements=(0,c.ctrlKey)(t)?[...e.state.activeElements,i]:[i],t.stopPropagation(),!1):void 0})).on(e.files,"dragstart",(s=>{if(e.o.moveFile){const i=ct(s.target,e.dialog.container);if(!i)return;t=i}})).on(e.dialog.container,"drop",(t=>t.preventDefault()))}function dt(){const t=this.state,e=this.dataProvider,s=this;s.e.on("view.filebrowser",(e=>{e!==t.view&&(t.view=e)})).on("sort.filebrowser",(e=>{e!==t.sortBy&&(t.sortBy=e,s.loadItems())})).on("filter.filebrowser",(e=>{e!==t.filterWord&&(t.filterWord=e,s.loadItems())})).on("openFolder.filebrowser",(t=>{let e;e=".."===t.name?t.path.split("/").filter((t=>t.length)).slice(0,-1).join("/"):(0,c.normalizePath)(t.path,t.name),s.state.currentPath=e,s.state.currentSource="."===t.name?U:t.source})).on("removeFolder.filebrowser",(t=>{O(s.i18n("Are you sure?"),s.i18n("Delete"),(i=>{i&&e.folderRemove(t.path,t.name,t.source).then((t=>{s.status(t,!0),s.loadTree()})).catch(s.status)})).bindDestruct(s)})).on("renameFolder.filebrowser",(t=>{B(s.i18n("Enter new name"),s.i18n("Rename"),(i=>{if(!(0,m.r1)(i))return s.status(s.i18n("Enter new name")),!1;e.folderRename(t.path,t.name,i,t.source).then((t=>{s.state.activeElements=[],s.status(t,!0),s.loadTree()})).catch(s.status)}),s.i18n("type name"),t.name).bindDestruct(s)})).on("addFolder.filebrowser",(t=>{B(s.i18n("Enter Directory name"),s.i18n("Create directory"),(i=>{e.createFolder(i,t.path,t.source).then((()=>{s.loadTree()}),s.status)}),s.i18n("type name")).bindDestruct(s)})).on("fileRemove.filebrowser",(()=>{s.state.activeElements.length&&O(s.i18n("Are you sure?"),"",(t=>{if(t){const t=[];s.state.activeElements.forEach((e=>{t.push(s.deleteFile(e.file||e.name||"",e.sourceName))})),s.state.activeElements=[],Promise.all(t).then((()=>s.loadTree()))}})).bindDestruct(s)})).on("edit.filebrowser",(()=>{if(1===s.state.activeElements.length){const[t]=this.state.activeElements;nt.call(s,t.fileURL,t.file||"",t.path,t.sourceName)}})).on("fileRename.filebrowser",((t,i,o)=>{1===s.state.activeElements.length&&B(s.i18n("Enter new name"),s.i18n("Rename"),(n=>{if(!(0,m.r1)(n))return s.status(s.i18n("Enter new name")),!1;e.fileRename(i,t,n,o).then((t=>{s.state.activeElements=[],s.status(t,!0),s.loadItems()})).catch(s.status)}),s.i18n("type name"),t).bindDestruct(this)})).on("update.filebrowser",(()=>{s.loadTree()}))}class ut extends N{constructor(t){var e;super(t),this.loader=this.c.div($+"__loader",V),this.browser=this.c.div($+" non-selected"),this.status_line=this.c.div($+"__status"),this.tree=this.c.div($+"__tree"),this.files=this.c.div($+"__files"),this.state=l.P5.create({currentPath:"",currentSource:U,currentBaseUrl:"",activeElements:[],elements:[],messages:[],sources:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1}),this.errorHandler=t=>{this.status(t instanceof Error?this.i18n(t.message):this.dataProvider.getMessage(t))},this.close=()=>{this.dialog.close()},this.elementsMap={},this.attachEvents(t);const s=this;s.options=(0,c.ConfigProto)(t||{},r.D.defaultOptions.filebrowser),s.storage=C.makeStorage(this.o.saveStateInStorage),s.dataProvider=((t,e)=>new G(t,e))(s,s.options),s.dialog=new R({fullsize:s.o.fullsize,ownerWindow:s.ownerWindow,theme:s.o.theme,globalFullSize:s.o.globalFullSize,language:this.o.language,minWidth:Math.min(700,screen.width),minHeight:300,buttons:null!==(e=this.o.headerButtons)&&void 0!==e?e:["fullsize","dialog.close"]}),["afterClose","beforeOpen"].forEach((t=>{s.dialog.events.on(s.dialog,t,(()=>{this.e.fire(t)}))})),s.o.showFoldersPanel&&s.browser.appendChild(s.tree),s.browser.appendChild(s.files),s.browser.appendChild(s.status_line),dt.call(s),ht.call(s),J.call(s),s.dialog.setSize(s.o.width,s.o.height),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((t=>{null!=this.options[t]&&(this.options[t]=(0,c.ConfigProto)(this.options[t],this.o.ajax))}));const i=this.storage.get($+"_view");s.state.view=i&&null==this.o.view?"list"===i?"list":"tiles":"list"===s.o.view?"list":"tiles",this.state.fire("change.view");const o=s.storage.get($+"_sortby");if(o){const t=o.split("-");s.state.sortBy=["changed","name","size"].includes(t[0])?o:"changed-desc"}else s.state.sortBy=s.o.sortBy||"changed-desc";s.initUploader(s)}className(){return"FileBrowser"}async loadItems(){return this.files.classList.add("jodit-filebrowser_active"),this.files.appendChild(this.loader.cloneNode(!0)),this.dataProvider.items(this.state.currentPath,this.state.currentSource,{sortBy:this.state.sortBy,onlyImages:this.state.onlyImages,filterWord:this.state.filterWord}).then((t=>{this.state.elements=t,this.state.activeElements=[]})).catch(this.status)}async loadTree(){const t=t=>{throw t instanceof Error?t:(0,c.error)(t)};this.uploader&&(this.uploader.setPath(this.state.currentPath),this.uploader.setSource(this.state.currentSource)),this.tree.classList.add("jodit-filebrowser_active"),_.i.detach(this.tree),this.tree.appendChild(this.loader.cloneNode(!0));const e=this.loadItems();if(this.o.showFoldersPanel){const s=this.dataProvider.tree(this.state.currentPath,this.state.currentSource).then((t=>{this.state.sources=t})).catch((e=>{this.errorHandler(t(this.i18n("Error on load folders"))),t(e)}));return Promise.all([s,e]).catch(c.error)}return this.tree.classList.remove("jodit-filebrowser_active"),e.catch(c.error)}deleteFile(t,e){return this.dataProvider.fileRemove(this.state.currentPath,t,e).then((e=>{this.status(e||this.i18n('File "%s" was deleted',t),!0)})).catch(this.status)}onSelect(t){return()=>{if(this.state.activeElements.length){const e=[],s=[];this.state.activeElements.forEach((t=>{const i=t.fileURL;i&&(e.push(i),s.push(t.isImage||!1))})),this.close();const i={baseurl:"",files:e,isImages:s};(0,c.isFunction)(t)&&t(i),this.close()}return!1}}get isOpened(){return this.dialog.isOpened&&"none"!==this.browser.style.display}status(t,e){(0,c.isString)(t)||(t=t.message),this.status_line.classList.remove("jodit-filebrowser_success"),this.status_line.classList.add("jodit-filebrowser_active");const s=this.c.div();s.textContent=t,this.status_line.appendChild(s),e&&this.status_line.classList.add("jodit-filebrowser_success"),this.async.setTimeout((()=>{this.status_line.classList.remove("jodit-filebrowser_active"),_.i.detach(this.status_line)}),{timeout:this.o.howLongShowMsg,label:"fileBrowser.status"})}open(t=this.o.defaultCallback,e=!1){return this.state.onlyImages=e,this.async.promise(((e,s)=>{var i;if(!this.o.items||!this.o.items.url)throw(0,c.error)("Need set options.filebrowser.ajax.url");let o=0;this.e.off(this.files,"dblclick").on(this.files,"dblclick",this.onSelect(t)).on(this.files,"touchstart",(()=>{const e=(new Date).getTime();a.EMULATE_DBLCLICK_TIMEOUT>e-o&&this.onSelect(t)(),o=e})).off("select.filebrowser").on("select.filebrowser",this.onSelect(t));const n=this.c.div();this.toolbar.build(null!==(i=this.o.buttons)&&void 0!==i?i:[]).appendTo(n),this.dialog.open(this.browser,n),this.e.fire("sort.filebrowser",this.state.sortBy),this.loadTree().then(e,s)}))}initUploader(t){var e;const s=this,i=null===(e=null==t?void 0:t.options)||void 0===e?void 0:e.uploader,o=(0,c.ConfigProto)(i||{},r.D.defaultOptions.uploader),n=()=>this.loadItems();s.uploader=s.getInstance("Uploader",o),s.uploader.setPath(s.state.currentPath),s.uploader.setSource(s.state.currentSource),s.uploader.bind(s.browser,n,s.errorHandler),s.e.on("bindUploader.filebrowser",(t=>{s.uploader.bind(t,n,s.errorHandler)}))}destruct(){this.isInDestruct||(this.dialog.destruct(),this.events&&this.e.off(".filebrowser"),this.uploader&&this.uploader.destruct(),super.destruct())}}(0,n.gn)([x.autobind],ut.prototype,"status",null),(0,n.gn)([x.autobind],ut.prototype,"open",null);class pt extends u.Hr{constructor(){super(...arguments),this.isBlocked=!1}className(){return"Snapshot"}static equal(t,e){return t.html===e.html&&JSON.stringify(t.range)===JSON.stringify(e.range)}static countNodesBeforeInParent(t){if(!t.parentNode)return 0;const e=t.parentNode.childNodes;let s,i=0,o=null;for(s=0;e.length>s;s+=1){if(!o||_.i.isText(e[s])&&""===e[s].textContent||_.i.isText(o)&&_.i.isText(e[s])||(i+=1),e[s]===t)return i;o=e[s]}return 0}static strokeOffset(t,e){for(;_.i.isText(t);)_.i.isText(t=t.previousSibling)&&null!=t.textContent&&(e+=t.textContent.length);return e}calcHierarchyLadder(t){const e=[];if(!t||!t.parentNode||!_.i.isOrContains(this.j.editor,t))return[];for(;t&&t!==this.j.editor;)t&&e.push(pt.countNodesBeforeInParent(t)),t=t.parentNode;return e.reverse()}getElementByLadder(t){let e,s=this.j.editor;for(e=0;s&&t.length>e;e+=1)s=s.childNodes[t[e]];return s}make(){const t={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};t.html=this.j.getNativeEditorValue();const e=this.j.s.sel;if(e&&e.rangeCount){const s=e.getRangeAt(0),i=this.calcHierarchyLadder(s.startContainer),o=this.calcHierarchyLadder(s.endContainer);let n=pt.strokeOffset(s.startContainer,s.startOffset),r=pt.strokeOffset(s.endContainer,s.endOffset);i.length||s.startContainer===this.j.editor||(n=0),o.length||s.endContainer===this.j.editor||(r=0),t.range={startContainer:i,startOffset:n,endContainer:o,endOffset:r}}return t}restore(t){this.isBlocked=!0;const e=this.storeScrollState();this.j.getNativeEditorValue()!==t.html&&this.j.setEditorValue(t.html),this.restoreOnlySelection(t),this.restoreScrollState(e),this.isBlocked=!1}storeScrollState(){return[this.j.ow.scrollY,this.j.editor.scrollTop]}restoreScrollState(t){const{j:e}=this,{ow:s}=e;s.scrollTo(s.scrollX,t[0]),e.editor.scrollTop=t[1]}restoreOnlySelection(t){try{if(t.range){const e=this.j.ed.createRange();e.setStart(this.getElementByLadder(t.range.startContainer),t.range.startOffset),e.setEnd(this.getElementByLadder(t.range.endContainer),t.range.endOffset),this.j.s.selectRange(e)}}catch(t){this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild)}}destruct(){this.isBlocked=!1,super.destruct()}}class ft{constructor(t){this.size=t,this.commands=[],this.stackPosition=-1}get length(){return this.commands.length}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(t){this.clearRedo(),this.commands.push(t),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),this.stackPosition-=1)}replace(t){this.commands[this.stackPosition]=t}current(){return this.commands[this.stackPosition]}undo(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)}redo(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)}canUndo(){return this.stackPosition>=0}canRedo(){return this.commands.length-1>this.stackPosition}}class mt{constructor(t,e,s,i){this.oldValue=t,this.newValue=e,this.observer=s,this.tick=i}undo(){this.observer.snapshot.restore(this.oldValue)}redo(){this.observer.snapshot.restore(this.newValue)}}r.D.prototype.observer={maxHistoryLength:1/0,timeout:100};class gt extends u.Hr{constructor(t){super(t),this.stack=new ft(this.j.o.observer.maxHistoryLength),this.snapshot=new pt(this.j),this.updateTick=0,t.e.on("afterAddPlace.observer",(()=>{this.isInDestruct||(this.startValue=this.snapshot.make(),t.events.on("internalChange",(()=>{this.startValue=this.snapshot.make()})).on(t.editor,["changeSelection","selectionstart","selectionchange","mousedown","mouseup","keydown","keyup"].map((t=>t+".observer")).join(" "),(()=>{this.startValue.html===this.j.getNativeEditorValue()&&(this.startValue=this.snapshot.make())})).on(this,"change.observer",this.onChange))}))}className(){return"Observer"}get startValue(){return this.__startValue}set startValue(t){this.__startValue=t}upTick(){this.updateTick+=1}onChange(){this.snapshot.isBlocked||this.updateStack()}updateStack(t=!1){const e=this.snapshot.make();if(!pt.equal(e,this.startValue)){const s=new mt(this.startValue,e,this,this.updateTick);if(t){const t=this.stack.current();t&&this.updateTick===t.tick&&this.stack.replace(s)}else this.stack.push(s);this.startValue=e,this.fireChangeStack()}}redo(){this.stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}undo(){this.stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}clear(){this.startValue=this.snapshot.make(),this.stack.clear(),this.fireChangeStack()}replaceSnapshot(){this.updateStack(!0)}fireChangeStack(){var t;this.j&&!this.j.isInDestruct&&(null===(t=this.j.events)||void 0===t||t.fire("changeStack"))}destruct(){this.j.events&&this.j.e.off(".observer"),this.snapshot.destruct(),super.destruct()}}(0,n.gn)([(0,x.debounce)()],gt.prototype,"onChange",null);var vt=s(16);class bt extends u.Hr{constructor(t,e){super(t),this.target=e,this.container=t.c.div("jodit-status-bar"),e.appendChild(this.container),this.hide()}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(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.offsetHeight)&&void 0!==e?e:0}findEmpty(t=!1){var e;const s=null===(e=this.container)||void 0===e?void 0:e.querySelectorAll(".jodit-status-bar__item"+(t?".jodit-status-bar__item-right":""));if(s)for(let t=0;s.length>t;t+=1)if(!s[t].innerHTML.trim().length)return s[t]}append(t,e=!1){var s;const i=this.findEmpty(e)||this.j.c.div("jodit-status-bar__item");e&&i.classList.add("jodit-status-bar__item-right"),i.appendChild(t),null===(s=this.container)||void 0===s||s.appendChild(i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.setStatus(u.n$.beforeDestruct),_.i.safeRemove(this.container),super.destruct()}}class wt extends u.Hr{constructor(){super(...arguments),this.selected=new Set}className(){return"Table"}recalculateStyles(){const t=(0,j.ZO)(this.j,wt,"style",!0),e=[];this.selected.forEach((t=>{const s=(0,c.cssPath)(t);s&&e.push(s)})),t.innerHTML=e.length?e.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(t){this.selected.add(t),this.recalculateStyles();const e=_.i.closest(t,"table",this.j.editor);if(e){const s=wt.selectedByTable.get(e)||new Set;s.add(t),wt.selectedByTable.set(e,s)}}removeSelection(t){this.selected.delete(t),this.recalculateStyles();const e=_.i.closest(t,"table",this.j.editor);if(e){const s=wt.selectedByTable.get(e);s&&(s.delete(t),s.size||wt.selectedByTable.delete(e))}}getAllSelectedCells(){return(0,c.toArray)(this.selected)}static getSelectedCellsByTable(t){const e=wt.selectedByTable.get(t);return e?(0,c.toArray)(e):[]}destruct(){return this.selected.clear(),super.destruct()}static getRowsCount(t){return t.rows.length}static getColumnsCount(t){return wt.formalMatrix(t).reduce(((t,e)=>Math.max(t,e.length)),0)}static formalMatrix(t,e){const s=[[]],i=(0,c.toArray)(t.rows),o=(t,i)=>{void 0===s[i]&&(s[i]=[]);const o=t.colSpan,n=t.rowSpan;let r,a,l=0;for(;s[i][l];)l+=1;for(a=0;n>a;a+=1)for(r=0;o>r;r+=1){if(void 0===s[i+a]&&(s[i+a]=[]),e&&!1===e(t,i+a,l+r,o,n))return!1;s[i+a][l+r]=t}};for(let t=0;i.length>t;t+=1){const e=(0,c.toArray)(i[t].cells);for(let i=0;e.length>i;i+=1)if(!1===o(e[i],t))return s}return s}static formalCoordinate(t,e,s=!1){let i=0,o=0,n=1,r=1;return wt.formalMatrix(t,((t,a,l,c,h)=>{if(e===t)return i=a,o=l,n=c||1,r=h||1,s&&(o+=(c||1)-1,i+=(h||1)-1),!1})),[i,o,n,r]}static appendRow(t,e,s,i){let o;if(e)o=e.cloneNode(!0),(0,c.$$)("td,th",e).forEach((t=>{const e=(0,c.attr)(t,"rowspan");if(e&&parseInt(e,10)>1){const s=parseInt(e,10)-1;(0,c.attr)(t,"rowspan",s>1?s:null)}})),(0,c.$$)("td,th",o).forEach((t=>{t.innerHTML=""}));else{const e=wt.getColumnsCount(t);o=i.element("tr");for(let t=0;e>t;t+=1)o.appendChild(i.element("td"))}s&&e&&e.nextSibling?e.parentNode&&e.parentNode.insertBefore(o,e.nextSibling):!s&&e?e.parentNode&&e.parentNode.insertBefore(o,e):((0,c.$$)(":scope>tbody",t)[0]||t).appendChild(o)}static removeRow(t,e){const s=wt.formalMatrix(t);let i;const o=t.rows[e];(0,c.each)(s[e],((n,r)=>{if(i=!1,0>e-1||s[e-1][n]!==r)if(s[e+1]&&s[e+1][n]===r){if(r.parentNode===o&&r.parentNode.nextSibling){i=!0;let o=n+1;for(;s[e+1][o]===r;)o+=1;const a=_.i.next(r.parentNode,(t=>_.i.isTag(t,"tr")),t);s[e+1][o]?a.insertBefore(r,s[e+1][o]):a.appendChild(r)}}else _.i.safeRemove(r);else i=!0;if(i&&(r.parentNode===o||r!==s[e][n-1])){const t=r.rowSpan;(0,c.attr)(r,"rowspan",t-1>1?""+(t-1):null)}})),_.i.safeRemove(o)}static appendColumn(t,e,s,i){const o=wt.formalMatrix(t);let n;for((void 0===e||0>e)&&(e=wt.getColumnsCount(t)-1),n=0;o.length>n;n+=1){const t=i.element("td"),r=o[n][e];let a=!1;s?(o[n]&&r&&e+1>=o[n].length||r!==o[n][e+1])&&(r.nextSibling?r.parentNode&&r.parentNode.insertBefore(t,r.nextSibling):r.parentNode&&r.parentNode.appendChild(t),a=!0):(0>e-1||o[n][e]!==o[n][e-1]&&o[n][e].parentNode)&&(r.parentNode&&r.parentNode.insertBefore(t,o[n][e]),a=!0),a||o[n][e].setAttribute("colspan",""+(parseInt((0,c.attr)(o[n][e],"colspan")||"1",10)+1))}}static removeColumn(t,e){const s=wt.formalMatrix(t);let i;(0,c.each)(s,((t,o)=>{const n=o[e];if(i=!1,0>e-1||s[t][e-1]!==n?o.length>e+1&&s[t][e+1]===n?i=!0:_.i.safeRemove(n):i=!0,i&&(0>t-1||n!==s[t-1][e])){const t=n.colSpan;(0,c.attr)(n,"colspan",t-1>1?""+(t-1):null)}}))}static getSelectedBound(t,e){const s=[[1/0,1/0],[0,0]],i=wt.formalMatrix(t);let o,n,r;for(o=0;i.length>o;o+=1)for(n=0;i[o]&&i[o].length>n;n+=1)e.includes(i[o][n])&&(s[0][0]=Math.min(o,s[0][0]),s[0][1]=Math.min(n,s[0][1]),s[1][0]=Math.max(o,s[1][0]),s[1][1]=Math.max(n,s[1][1]));for(o=s[0][0];s[1][0]>=o;o+=1)for(r=1,n=s[0][1];s[1][1]>=n;n+=1){for(;i[o]&&i[o][n-r]&&i[o][n]===i[o][n-r];)s[0][1]=Math.min(n-r,s[0][1]),s[1][1]=Math.max(n-r,s[1][1]),r+=1;for(r=1;i[o]&&i[o][n+r]&&i[o][n]===i[o][n+r];)s[0][1]=Math.min(n+r,s[0][1]),s[1][1]=Math.max(n+r,s[1][1]),r+=1;for(r=1;i[o-r]&&i[o][n]===i[o-r][n];)s[0][0]=Math.min(o-r,s[0][0]),s[1][0]=Math.max(o-r,s[1][0]),r+=1;for(r=1;i[o+r]&&i[o][n]===i[o+r][n];)s[0][0]=Math.min(o+r,s[0][0]),s[1][0]=Math.max(o+r,s[1][0]),r+=1}return s}static normalizeTable(t){let e,s,i,o;const n=[],r=wt.formalMatrix(t);for(s=0;r[0].length>s;s+=1){for(i=1e6,o=!1,e=0;r.length>e;e+=1)if(void 0!==r[e][s]){if(2>r[e][s].colSpan){o=!0;break}i=Math.min(i,r[e][s].colSpan)}if(!o)for(e=0;r.length>e;e+=1)void 0!==r[e][s]&&wt.__mark(r[e][s],"colspan",r[e][s].colSpan-i+1,n)}for(e=0;r.length>e;e+=1){for(i=1e6,o=!1,s=0;r[e].length>s;s+=1)if(void 0!==r[e][s]){if(2>r[e][s].rowSpan){o=!0;break}i=Math.min(i,r[e][s].rowSpan)}if(!o)for(s=0;r[e].length>s;s+=1)void 0!==r[e][s]&&wt.__mark(r[e][s],"rowspan",r[e][s].rowSpan-i+1,n)}for(e=0;r.length>e;e+=1)for(s=0;r[e].length>s;s+=1)void 0!==r[e][s]&&(r[e][s].hasAttribute("rowspan")&&1===r[e][s].rowSpan&&r[e][s].removeAttribute("rowspan"),r[e][s].hasAttribute("colspan")&&1===r[e][s].colSpan&&r[e][s].removeAttribute("colspan"),r[e][s].hasAttribute("class")&&!(0,c.attr)(r[e][s],"class")&&r[e][s].removeAttribute("class"));wt.__unmark(n)}static mergeSelected(t,e){const s=[],i=wt.getSelectedBound(t,wt.getSelectedCellsByTable(t));let o,n=0,r=null,l=0,h=0,d=0;const u=[];i&&(i[0][0]-i[1][0]||i[0][1]-i[1][1])&&(wt.formalMatrix(t,((t,a,p,f,m)=>{if(!(i[0][0]>a||a>i[1][0]||i[0][1]>p||p>i[1][1])){if(o=t,o.__i_am_already_was)return;o.__i_am_already_was=!0,a===i[0][0]&&o.style.width&&(n+=o.offsetWidth),""!==(0,c.trim)(t.innerHTML.replace(/<br(\/)?>/g,""))&&s.push(t.innerHTML),f>1&&(h+=f-1),m>1&&(d+=m-1),r?(wt.__mark(o,"remove",1,u),yt(e).removeSelection(o)):(r=t,l=p)}})),h=i[1][1]-i[0][1]+1,d=i[1][0]-i[0][0]+1,r&&(h>1&&wt.__mark(r,"colspan",h,u),d>1&&wt.__mark(r,"rowspan",d,u),n&&(wt.__mark(r,"width",(n/t.offsetWidth*100).toFixed(a.ACCURACY)+"%",u),l&&wt.setColumnWidthByDelta(t,l,0,!0,u)),r.innerHTML=s.join("<br/>"),yt(e).addSelection(r),delete r.__i_am_already_was,wt.__unmark(u),wt.normalizeTable(t),(0,c.each)((0,c.toArray)(t.rows),((t,e)=>{e.cells.length||_.i.safeRemove(e)}))))}static splitHorizontal(t,e){let s,i,o,n,r;const a=[];wt.getSelectedCellsByTable(t).forEach((l=>{i=e.createInside.element("td"),i.appendChild(e.createInside.element("br")),o=e.createInside.element("tr"),s=wt.formalCoordinate(t,l),2>l.rowSpan?(wt.formalMatrix(t,((t,e,i)=>{s[0]===e&&s[1]!==i&&t!==l&&wt.__mark(t,"rowspan",t.rowSpan+1,a)})),_.i.after(_.i.closest(l,"tr",t),o),o.appendChild(i)):(wt.__mark(l,"rowspan",l.rowSpan-1,a),wt.formalMatrix(t,((e,i,o)=>{i>s[0]&&s[0]+l.rowSpan>i&&s[1]>o&&e.parentNode.rowIndex===i&&(r=e),i>s[0]&&e===l&&(n=t.rows[i])})),r?_.i.after(r,i):n.insertBefore(i,n.firstChild)),l.colSpan>1&&wt.__mark(i,"colspan",l.colSpan,a),wt.__unmark(a),yt(e).removeSelection(l)})),this.normalizeTable(t)}static splitVertical(t,e){let s,i,o;const n=[];wt.getSelectedCellsByTable(t).forEach((r=>{s=wt.formalCoordinate(t,r),2>r.colSpan?wt.formalMatrix(t,((t,e,i)=>{s[1]===i&&s[0]!==e&&t!==r&&wt.__mark(t,"colspan",t.colSpan+1,n)})):wt.__mark(r,"colspan",r.colSpan-1,n),i=e.createInside.element("td"),i.appendChild(e.createInside.element("br")),r.rowSpan>1&&wt.__mark(i,"rowspan",r.rowSpan,n);const l=r.offsetWidth;_.i.after(r,i),o=l/t.offsetWidth/2,wt.__mark(r,"width",(100*o).toFixed(a.ACCURACY)+"%",n),wt.__mark(i,"width",(100*o).toFixed(a.ACCURACY)+"%",n),wt.__unmark(n),yt(e).removeSelection(r)})),wt.normalizeTable(t)}static setColumnWidthByDelta(t,e,s,i,o){const n=wt.formalMatrix(t);for(let i=0;n.length>i;i+=1){const r=n[i][e];r.colSpan>1||wt.__mark(r,"width",((r.offsetWidth+s)/t.offsetWidth*100).toFixed(a.ACCURACY)+"%",o)}i||wt.__unmark(o)}static __mark(t,e,s,i){i.push(t),t.__marked_value||(t.__marked_value={}),t.__marked_value[e]=void 0===s?1:s}static __unmark(t){t.forEach((t=>{t.__marked_value&&((0,c.each)(t.__marked_value,((e,s)=>{switch(e){case"remove":_.i.safeRemove(t);break;case"rowspan":s>1?t.setAttribute("rowspan",""+s):t.removeAttribute("rowspan");break;case"colspan":s>1?t.setAttribute("colspan",""+s):t.removeAttribute("colspan");break;case"width":t.style.width=""+s}delete t.__marked_value[e]})),delete t.__marked_value)}))}}wt.selectedByTable=new WeakMap,(0,n.gn)([(0,x.debounce)()],wt.prototype,"recalculateStyles",null);const yt=t=>t.getInstance("Table",t.o);r.D.prototype.enableDragAndDropFileToEditor=!0,r.D.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName(t){return`files[${t}]`},withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData(t){return t},isSuccess(t){return t.success},getMessage(t){return void 0!==t.data.messages&&(0,c.isArray)(t.data.messages)?t.data.messages.join(" "):""},process(t){return t.data},error(t){this.j.e.fire("errorMessage",t.message,"error",4e3)},defaultHandlerSuccess(t){const e=this.j||this;(0,c.isJoditObject)(e)&&t.files&&t.files.length&&t.files.forEach(((s,i)=>{const[o,n]=t.isImages&&t.isImages[i]?["img","src"]:["a","href"],r=e.createInside.element(o);r.setAttribute(n,t.baseurl+s),"a"===o&&(r.textContent=t.baseurl+s),"img"===o?e.s.insertImage(r,null,e.o.imageDefaultWidth):e.s.insertNode(r)}))},defaultHandlerError(t){this.j.e.fire("errorMessage",t.message)},contentType(t){return(void 0===this.j.ow.FormData||"string"==typeof t)&&"application/x-www-form-urlencoded; charset=UTF-8"}};class Ct extends u.Hr{constructor(t,e){super(t),this.path="",this.source="default",this.ajaxInstances=[],this.options=(0,c.ConfigProto)(e||{},(0,c.ConfigProto)(r.D.defaultOptions.uploader,(0,c.isJoditObject)(t)?t.o.uploader:{}))}className(){return"Uploader"}static dataURItoBlob(t){const e=atob(t.split(",")[1]),s=t.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(e.length),o=new Uint8Array(i);for(let t=0;e.length>t;t+=1)o[t]=e.charCodeAt(t);return new Blob([o],{type:s})}get o(){return this.options}buildData(t){if(this.o.buildData&&"function"==typeof this.o.buildData)return this.o.buildData.call(this,t);const e=this.j.ow.FormData;if(void 0!==e){if(t instanceof e)return t;if((0,c.isString)(t))return t;const s=new e;return Object.keys(t).forEach((e=>{s.append(e,t[e])})),s}return t}send(t,e){const s=this.buildData(t),i=t=>{const s=new d(this.j,{xhr:()=>{const t=new XMLHttpRequest;return void 0!==this.j.ow.FormData&&t.upload?(this.j.progressbar.show().progress(10),t.upload.addEventListener("progress",(t=>{if(t.lengthComputable){let e=t.loaded/t.total;e*=100,this.j.progressbar.show().progress(e),100>e||this.j.progressbar.hide()}}),!1)):this.j.progressbar.hide(),t},method:this.o.method||"POST",data:t,url:(0,c.isFunction)(this.o.url)?this.o.url(t):this.o.url,headers:this.o.headers,queryBuild:this.o.queryBuild,contentType:this.o.contentType.call(this,t),dataType:this.o.format||"json",withCredentials:this.o.withCredentials||!1});this.ajaxInstances.push(s);const i=()=>{const t=this.ajaxInstances.indexOf(s);-1!==t&&this.ajaxInstances.splice(t,1)};return s.send().then((t=>{i(),e.call(this,t)})).catch((t=>{i(),this.o.error.call(this,t)}))};return s instanceof Promise?s.then(i).catch((t=>{this.o.error.call(this,t)})):i(s)}sendFiles(t,e,s,i){if(!t)return Promise.reject((0,c.error)("Need files"));const o=this;let n=(0,c.toArray)(t);if(!n.length)return Promise.reject((0,c.error)("Need files"));const r=[];if(this.o.insertImageAsBase64URI){let t,s;for(s=0;n.length>s;s+=1)if(t=n[s],t&&t.type){const i=t.type.match(/\/([a-z0-9]+)/i),a=i[1]?i[1].toLowerCase():"";if(this.o.imagesExtensions.includes(a)){const i=new FileReader;r.push(new Promise(((s,n)=>{i.onerror=n,i.onloadend=()=>{const t={baseurl:"",files:[i.result],isImages:[!0]};"function"==typeof(e||o.options.defaultHandlerSuccess)&&(e||o.options.defaultHandlerSuccess).call(o,t),s(t)},i.readAsDataURL(t)}))),n[s]=null}}}if(n=n.filter((t=>t)),n.length){const t=new FormData;let a;t.append(this.o.pathVariableName,o.path),t.append("source",o.source);for(let e=0;n.length>e;e+=1)if(a=n[e],a){const s=a.type.match(/\/([a-z0-9]+)/i),i=s&&s[1]?s[1].toLowerCase():"";let o=n[e].name||(""+Math.random()).replace(".","");if(i){let t=i;["jpeg","jpg"].includes(t)&&(t="jpeg|jpg"),RegExp(".("+t+")$","i").test(o)||(o+="."+i)}t.append(this.o.filesVariableName(e),n[e],o)}i&&i(t),o.o.data&&(0,c.isPlainObject)(o.o.data)&&Object.keys(o.o.data).forEach((e=>{t.append(e,o.o.data[e])})),o.o.prepareData.call(this,t),r.push(o.send(t,(t=>{if(this.o.isSuccess.call(o,t))"function"==typeof(e||o.o.defaultHandlerSuccess)&&(e||o.options.defaultHandlerSuccess).call(o,o.o.process.call(o,t));else if((0,c.isFunction)(s||o.o.defaultHandlerError))return void(s||o.options.defaultHandlerError).call(o,(0,c.error)(o.o.getMessage.call(o,t)))})).then((()=>{this.j.events&&this.j.e.fire("filesWereUploaded")})))}return Promise.all(r)}setPath(t){this.path=t}setSource(t){this.source=t}bind(t,e,s){const i=this,o=t=>{let i,o,r;const l=t.clipboardData,c=t=>{o&&(t.append("extension",r),t.append("mimetype",o.type))};if(!a.IS_IE&&n(l))return this.sendFiles(l.files,e,s),!1;if(l&&l.items&&l.items.length){const n=l.items;for(i=0;n.length>i;i+=1)if("file"===n[i].kind&&"image/png"===n[i].type){if(o=n[i].getAsFile(),o){const t=o.type.match(/\/([a-z0-9]+)/i);r=t[1]?t[1].toLowerCase():"",this.sendFiles([o],e,s,c)}t.preventDefault();break}}};this.j&&this.j.editor!==t?i.j.e.on(t,"paste",o):i.j.e.on("beforePaste",o);const n=t=>!(!t||!t.files||0===t.files.length);i.j.e.on(t,"dragend dragover dragenter dragleave drop",(t=>{t.preventDefault()})).on(t,"dragover",(e=>{n(e.dataTransfer)&&(t.classList.contains("jodit_draghover")||t.classList.add("jodit_draghover"),e.preventDefault())})).on(t,"dragend",(e=>{n(e.dataTransfer)&&(t.classList.contains("jodit_draghover")&&t.classList.remove("jodit_draghover"),e.preventDefault())})).on(t,"drop",(i=>{t.classList.remove("jodit_draghover"),n(i.dataTransfer)&&(i.preventDefault(),i.stopImmediatePropagation(),this.sendFiles(i.dataTransfer.files,e,s))}));const r=t.querySelector("input[type=file]");r&&i.j.e.on(r,"change",(function(){i.sendFiles(this.files,e,s).then((()=>{r.value="",/safari/i.test(navigator.userAgent)||(r.type="",r.type="file")}))}))}uploadRemoteImage(t,e,s){const i=this;i.send({action:"fileUploadRemote",url:t},(t=>{if(i.o.isSuccess.call(i,t))"function"==typeof e?e.call(i,this.o.process.call(this,t)):this.o.defaultHandlerSuccess.call(i,this.o.process.call(this,t));else if("function"==typeof(s||i.o.defaultHandlerError))return void(s||this.o.defaultHandlerError).call(i,(0,c.error)(i.o.getMessage.call(this,t)))}))}destruct(){this.setStatus(u.n$.beforeDestruct),this.ajaxInstances.forEach((t=>{try{t.destruct()}catch(t){}})),super.destruct()}}var jt=s(14);class Jodit extends N{constructor(t,e){super(e,!0),this.isJodit=!0,this.__defaultStyleDisplayKey="data-jodit-default-style-display",this.__defaultClassesKey="data-jodit-default-classes",this.commands={},this.__selectionLocked=null,this.__wasReadOnly=!1,this.createInside=new F((()=>this.ed),this.o.createAttributes),this.editorIsActive=!1,this.__mode=a.MODE_WYSIWYG,this.__callChangeCount=0,this.isSilentChange=!1,this.elementToPlace=new Map;try{(0,c.resolveElement)(t,this.o.shadowRoot||this.od)}catch(t){throw this.destruct(),t}this.setStatus(u.n$.beforeInit),this.id=(0,c.attr)((0,c.resolveElement)(t,this.o.shadowRoot||this.od),"id")||""+(new Date).getTime(),j.as[this.id]=this,this.storage=C.makeStorage(!0,this.id),this.attachEvents(e),this.e.on(this.ow,"resize",(()=>{this.e&&this.e.fire("resize")})),this.e.on("prepareWYSIWYGEditor",this.prepareWYSIWYGEditor),this.selection=new vt.P(this);const s=this.beforeInitHook();(0,c.callPromise)(s,(()=>{this.e.fire("beforeInit",this);const s=j.pw.init(this);(0,c.callPromise)(s,(()=>{this.e.fire("afterPluginSystemInit",this),this.e.on("changePlace",(()=>{this.setReadOnly(this.o.readonly),this.setDisabled(this.o.disabled)})),this.places.length=0;const s=this.addPlace(t,e);j.as[this.id]=this,(0,c.callPromise)(s,(()=>{this.e&&this.e.fire("afterInit",this),this.afterInitHook(),this.setStatus(u.n$.ready),this.e.fire("afterConstructor",this)}))}))}))}className(){return"Jodit"}waitForReady(){return this.isReady?Promise.resolve(this):this.async.promise((t=>{this.hookStatus("ready",(()=>t(this)))}))}get text(){if(this.editor)return this.editor.innerText||"";const t=this.createInside.div();return t.innerHTML=this.getElementValue(),t.innerText||""}get value(){return this.getEditorValue()}set value(t){this.setEditorValue(t)}get defaultTimeout(){return this.options&&this.o.observer?this.o.observer.timeout:r.D.defaultOptions.observer.timeout}static atom(t){return(0,c.markAsAtomic)(t)}static make(t,e){return new Jodit(t,e)}static get defaultOptions(){return r.D.defaultOptions}setPlaceField(t,e){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[t]=e}get element(){return this.currentPlace.element}get editor(){return this.currentPlace.editor}set editor(t){this.setPlaceField("editor",t)}get container(){return this.currentPlace.container}set container(t){this.setPlaceField("container",t)}get workplace(){return this.currentPlace.workplace}get statusbar(){return this.currentPlace.statusbar}get iframe(){return this.currentPlace.iframe}set iframe(t){this.setPlaceField("iframe",t)}get observer(){return this.currentPlace.observer}get editorWindow(){return this.currentPlace.editorWindow}set editorWindow(t){this.setPlaceField("editorWindow",t)}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(t){this.setPlaceField("options",t)}get s(){return this.selection}get uploader(){return this.getInstance("Uploader",this.o.uploader)}get filebrowser(){const t=this,e=(0,c.ConfigProto)({defaultTimeout:t.defaultTimeout,uploader:t.o.uploader,language:t.o.language,license:t.o.license,theme:t.o.theme,defaultCallback(e){e.files&&e.files.length&&e.files.forEach(((s,i)=>{const o=e.baseurl+s;e.isImages&&e.isImages[i]?t.s.insertImage(o,null,t.o.imageDefaultWidth):t.s.insertNode(t.createInside.fromHTML(`<a href='${o}' title='${o}'>${o}</a>`))}))}},this.o.filebrowser);return t.getInstance("FileBrowser",e)}get mode(){return this.__mode}set mode(t){this.setMode(t)}getNativeEditorValue(){const t=this.e.fire("beforeGetNativeEditorValue");return(0,c.isString)(t)?t:this.editor?this.editor.innerHTML:this.getElementValue()}setNativeEditorValue(t){const e={value:t};this.e.fire("beforeSetNativeEditorValue",e)||this.editor&&(this.editor.innerHTML=e.value)}getEditorValue(t=!0){let e;if(e=this.e.fire("beforeGetValueFromEditor"),void 0!==e)return e;e=this.getNativeEditorValue().replace(a.INVISIBLE_SPACE_REG_EXP(),""),t&&(e=e.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===e&&(e="");const s={value:e};return this.e.fire("afterGetValueFromEditor",s),s.value}setEditorValue(t){const e=this.e.fire("beforeSetValueToEditor",t);if(!1===e)return;if((0,c.isString)(e)&&(t=e),!this.editor)return void(void 0!==t&&this.setElementValue(t));if(!(0,c.isString)(t)&&!(0,c.isVoid)(t))throw(0,c.error)("value must be string");void 0!==t&&this.getNativeEditorValue()!==t&&this.setNativeEditorValue(t),this.e.fire("postProcessSetEditorValue");const s=this.getElementValue(),i=this.getEditorValue();if(!this.isSilentChange&&s!==i&&a.SAFE_COUNT_CHANGE_CALL>this.__callChangeCount){this.setElementValue(i),this.__callChangeCount+=1;try{this.observer.upTick(),this.e.fire("change",i,s),this.e.fire(this.observer,"change",i,s)}finally{this.__callChangeCount=0}}}getElementValue(){return void 0!==this.element.value?this.element.value:this.element.innerHTML}setElementValue(t){if(!(0,c.isString)(t)&&void 0!==t)throw(0,c.error)("value must be string");void 0!==t?this.element!==this.container&&(void 0!==this.element.value?this.element.value=t:this.element.innerHTML=t):t=this.getElementValue(),t!==this.getEditorValue()&&this.setEditorValue(t)}registerCommand(t,e,s){const i=t.toLowerCase();if(void 0===this.commands[i]&&(this.commands[i]=[]),this.commands[i].push(e),!(0,c.isFunction)(e)){const o=this.o.commandToHotkeys[i]||this.o.commandToHotkeys[t]||e.hotkeys;o&&this.registerHotkeyToCommand(o,i,null==s?void 0:s.stopPropagation)}return this}registerHotkeyToCommand(t,e,s=!0){const i=(0,c.asArray)(t).map(c.normalizeKeyAliases).map((t=>t+".hotkey")).join(" ");this.e.off(i).on(i,((t,i)=>(i.shouldStop=null==s||s,this.execCommand(e))))}execCommand(t,e=!1,s=null){if(this.o.readonly&&"selectall"!==t)return;let i;if(t=t.toLowerCase(),i=this.e.fire("beforeCommand",t,e,s),!1!==i&&(i=this.execCustomCommands(t,e,s)),!1!==i)if(this.s.focus(),"selectall"===t)this.s.select(this.editor,!0);else try{i=this.nativeExecCommand(t,e,s)}catch(t){}return this.e.fire("afterCommand",t,e,s),this.setEditorValue(),i}nativeExecCommand(t,e=!1,s=null){this.isSilentChange=!0;try{return this.ed.execCommand(t,e,s)}finally{this.isSilentChange=!1}}execCustomCommands(t,e=!1,s=null){if(t=t.toLowerCase(),void 0!==this.commands[t]){let i;const o=o=>{let n;n=(0,c.isFunction)(o)?o:o.exec;const r=n.call(this,t,e,s);void 0!==r&&(i=r)};for(let e=0;this.commands[t].length>e;e+=1)o(this.commands[t][e]);return i}}lock(t="any"){return!!super.lock(t)&&(this.__selectionLocked=this.s.save(),this.s.clear(),this.editor.classList.add("jodit_disabled"),this.e.fire("lock",!0),!0)}unlock(){return!!super.unlock()&&(this.editor.classList.remove("jodit_disabled"),this.__selectionLocked&&this.s.restore(),this.e.fire("lock",!1),!0)}getMode(){return this.mode}isEditorMode(){return this.getRealMode()===a.MODE_WYSIWYG}getRealMode(){if(this.getMode()!==a.MODE_SPLIT)return this.getMode();const t=this.od.activeElement;return t&&(t===this.iframe||_.i.isOrContains(this.editor,t)||_.i.isOrContains(this.toolbar.container,t))?a.MODE_WYSIWYG:a.MODE_SOURCE}setMode(t){const e=this.getMode(),s={mode:parseInt(""+t,10)},i=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",s)&&(this.__mode=[a.MODE_SOURCE,a.MODE_WYSIWYG,a.MODE_SPLIT].includes(s.mode)?s.mode:a.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),i.forEach((t=>{this.container.classList.remove(t)})),this.container.classList.add(i[this.mode-1]),e!==this.getMode()&&this.e.fire("afterSetMode"))}toggleMode(){let t=this.getMode();[a.MODE_SOURCE,a.MODE_WYSIWYG,this.o.useSplitMode?a.MODE_SPLIT:9].includes(t+1)?t+=1:t=a.MODE_WYSIWYG,this.setMode(t)}setDisabled(t){this.o.disabled=t;const e=this.__wasReadOnly;this.setReadOnly(t||e),this.__wasReadOnly=e,this.editor&&(this.editor.setAttribute("aria-disabled",""+t),this.container.classList.toggle("jodit_disabled",t),this.e.fire("disabled",t))}getDisabled(){return this.o.disabled}setReadOnly(t){this.__wasReadOnly!==t&&(this.__wasReadOnly=t,this.o.readonly=t,t?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.e&&this.e.fire("readonly",t))}getReadOnly(){return this.o.readonly}beforeInitHook(){}afterInitHook(){}initOptions(t){this.options=(0,c.ConfigProto)(t||{},r.D.defaultOptions)}initOwners(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}addPlace(t,e){const s=(0,c.resolveElement)(t,this.o.shadowRoot||this.od);this.attachEvents(e),s.attributes&&(0,c.toArray)(s.attributes).forEach((t=>{const s=t.name;let i=t.value;void 0===r.D.defaultOptions[s]||e&&void 0!==e[s]||(-1!==["readonly","disabled"].indexOf(s)&&(i=""===i||"true"===i),/^[0-9]+(\.)?([0-9]+)?$/.test(""+i)&&(i=Number(i)),this.options[s]=i)}));let i=this.c.div("jodit-container");i.classList.add("jodit"),i.classList.add("jodit-container"),i.classList.add("jodit_theme_"+(this.o.theme||"default"));const{styleValues:o}=this.o;Object.keys(o).forEach((t=>{const e=(0,c.kebabCase)(t);i.style.setProperty("--jd-"+e,o[t])})),i.setAttribute("contenteditable","false");let n=null;this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(s.nodeName)&&(i=s,s.setAttribute(this.__defaultClassesKey,""+s.className),n=i.innerHTML,i.innerHTML=""),i.classList.add("jodit_inline"),i.classList.add("jodit-container")),s!==i&&(s.style.display&&s.setAttribute(this.__defaultStyleDisplayKey,s.style.display),s.style.display="none");const a=this.c.div("jodit-workplace",{contenteditable:!1});i.appendChild(a);const l=new bt(this,i);s.parentNode&&s!==i&&s.parentNode.insertBefore(i,s),Object.defineProperty(s,"component",{enumerable:!1,configurable:!0,value:this});const h=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});a.appendChild(h);const d={editor:h,element:s,container:i,workplace:a,statusbar:l,options:this.isReady?(0,c.ConfigProto)(e||{},r.D.defaultOptions):this.options,observer:new gt(this),editorWindow:this.ow};this.elementToPlace.set(h,d),this.setCurrentPlace(d),this.places.push(d),this.setNativeEditorValue(this.getElementValue());const u=this.initEditor(n),p=this.options;return(0,c.callPromise)(u,(()=>{p.enableDragAndDropFileToEditor&&p.uploader&&(p.uploader.url||p.uploader.insertImageAsBase64URI)&&this.uploader.bind(this.editor),this.elementToPlace.get(this.editor)||this.elementToPlace.set(this.editor,d),this.e.fire("afterAddPlace",d)}))}addDisclaimer(t){this.workplace.appendChild(t)}setCurrentPlace(t){this.currentPlace!==t&&(this.isEditorMode()||this.setMode(a.MODE_WYSIWYG),this.currentPlace=t,this.buildToolbar(),this.isReady&&this.e.fire("changePlace",t))}initEditor(t){const e=this.createEditor();return(0,c.callPromise)(e,(()=>{if(this.isInDestruct)return;this.element!==this.container?this.setElementValue():null!=t&&this.setEditorValue(t);let e=this.o.defaultMode;if(this.o.saveModeInStorage){const t=this.storage.get("jodit_default_mode");"string"==typeof t&&(e=parseInt(t,10))}this.setMode(e),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(t){}try{this.ed.execCommand("enableObjectResizing",!1,"false")}catch(t){}try{this.ed.execCommand("enableInlineTableEditing",!1,"false")}catch(t){}}))}createEditor(){const t=this.editor,e=this.e.fire("createEditor",this);return(0,c.callPromise)(e,(()=>{if(!this.isInDestruct){if((!1===e||(0,c.isPromise)(e))&&_.i.safeRemove(t),this.o.editorCssClass&&this.editor.classList.add(this.o.editorCssClass),this.o.style&&(0,c.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.direction){const t="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";this.container.style.direction=t,this.container.setAttribute("dir",t),this.toolbar.setDirection(t)}this.o.triggerChangeEvent&&this.e.on("change",this.async.debounce((()=>{this.e&&this.e.fire(this.element,"change")}),this.defaultTimeout))}}))}prepareWYSIWYGEditor(){const{editor:t}=this;if(this.editor.setAttribute("spellcheck",this.o.spellcheck?"true":"false"),this.o.direction){const t="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";this.editor.style.direction=t,this.editor.setAttribute("dir",t)}this.e.on(t,"mousedown touchstart focus",(()=>{const e=this.elementToPlace.get(t);e&&this.setCurrentPlace(e)})).on(t,"compositionend",(()=>{this.setEditorValue()})).on(t,"selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",(t=>{if(!this.o.readonly&&!this.isSilentChange&&!(t instanceof this.ew.KeyboardEvent&&t.isComposing)&&this.e&&this.e.fire){if(!1===this.e.fire(t.type,t))return!1;this.setEditorValue()}}))}destruct(){if(this.isInDestruct)return;if(this.setStatus(u.n$.beforeDestruct),this.elementToPlace.clear(),!this.editor)return;const t=this.getEditorValue();this.storage.clear(),this.buffer.clear(),this.commands={},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),this.places.forEach((({container:e,workplace:s,statusbar:i,element:o,iframe:n,editor:r,observer:a})=>{if(o!==e)if(o.hasAttribute(this.__defaultStyleDisplayKey)){const t=(0,c.attr)(o,this.__defaultStyleDisplayKey);t&&(o.style.display=t,o.removeAttribute(this.__defaultStyleDisplayKey))}else o.style.display="";else o.hasAttribute(this.__defaultClassesKey)&&(o.className=(0,c.attr)(o,this.__defaultClassesKey)||"",o.removeAttribute(this.__defaultClassesKey));o.hasAttribute("style")&&!(0,c.attr)(o,"style")&&o.removeAttribute("style"),!i.isInDestruct&&i.destruct(),this.e.off(e),this.e.off(o),this.e.off(r),_.i.safeRemove(s),_.i.safeRemove(r),e!==o&&_.i.safeRemove(e),Object.defineProperty(o,"component",{enumerable:!1,configurable:!0,value:null}),_.i.safeRemove(n),e===o&&(o.innerHTML=t),!a.isInDestruct&&a.destruct()})),this.places.length=0,this.currentPlace={},delete j.as[this.id],super.destruct()}}Jodit.fatMode=!1,Jodit.plugins=j.pw,Jodit.modules=j.qz,Jodit.ns=j.qz,Jodit.decorators={},Jodit.instances=j.as,Jodit.lang=j.KQ,Jodit.core={Plugin:H},(0,n.gn)([x.cache],Jodit.prototype,"uploader",null),(0,n.gn)([x.cache],Jodit.prototype,"filebrowser",null),(0,n.gn)([x.autobind],Jodit.prototype,"prepareWYSIWYGEditor",null);const xt=s(44);let Et={en:xt};const St=t=>t.default||t,_t={};(0,m.kJ)(St(xt))&&St(xt).forEach(((t,e)=>{_t[e]=t})),Object.keys(Et).forEach((t=>{const e=St(Et[t]);(0,m.kJ)(e)&&(Et[t]={},e.forEach(((e,s)=>{Et[t][_t[s]]=e})))}));var kt=Et;r.D.prototype.addNewLine=!0,r.D.prototype.addNewLineOnDBLClick=!0,r.D.prototype.addNewLineTagsTriggers=["table","iframe","img","hr","jodit"],r.D.prototype.addNewLineDeltaShow=20;const Tt="addnewline";class It extends H{constructor(){super(...arguments),this.line=this.j.c.fromHTML(`<div role="button" tabindex="-1" title="${this.j.i18n("Break")}" class="jodit-add-new-line"><span>${k.JO.get("enter")}</span></div>`),this.isMatchedTag=t=>!(!t||!this.j.o.addNewLineTagsTriggers.includes(t.nodeName.toLowerCase())),this.preview=!1,this.lineInFocus=!1,this.isShown=!1,this.hideForce=()=>{this.isShown&&(this.isShown=!1,this.j.async.clearTimeout(this.timeout),this.lineInFocus=!1,_.i.safeRemove(this.line))},this.hide=()=>{this.isShown&&!this.lineInFocus&&(this.timeout=this.j.async.setTimeout(this.hideForce,{timeout:500,label:"add-new-line-hide"}))},this.canGetFocus=t=>null!=t&&_.i.isBlock(t)&&!/^(img|table|iframe|hr)$/i.test(t.nodeName),this.onClickLine=t=>{const e=this.j,s=e.createInside.element(e.o.enter);this.preview&&this.current&&this.current.parentNode?this.current.parentNode.insertBefore(s,this.current):e.editor.appendChild(s),e.s.setCursorIn(s),(0,c.scrollIntoViewIfNeeded)(s,e.editor,e.ed),e.e.fire("synchro"),this.hideForce(),t.preventDefault()},this.onDblClickEditor=t=>{const e=this.j;if(!e.o.readonly&&e.o.addNewLineOnDBLClick&&t.target===e.editor&&e.s.isCollapsed()){const s=(0,c.offset)(e.editor,e,e.ed),i=t.pageY-e.ew.pageYOffset,o=e.createInside.element(e.o.enter);Math.abs(i-(s.height+s.top))>Math.abs(i-s.top)&&e.editor.firstChild?e.editor.insertBefore(o,e.editor.firstChild):e.editor.appendChild(o),e.s.setCursorIn(o),e.setEditorValue(),this.hideForce(),t.preventDefault()}},this.onMouseMove=t=>{const e=this.j;let s=e.ed.elementFromPoint(t.clientX,t.clientY);if(!_.i.isHTMLElement(s)||_.i.isOrContains(this.line,s))return;if(!_.i.isOrContains(e.editor,s))return;if(this.isMatchedTag(s)||(s=_.i.closest(s,this.isMatchedTag,e.editor)),!s)return void this.hide();if(this.isMatchedTag(s)){const t=_.i.up(s,_.i.isBlock,e.editor);t&&t!==e.editor&&(s=t)}const i=(0,c.position)(s,this.j);let o=!1,{clientY:n}=t;if(this.j.iframe){const{top:t}=(0,c.position)(this.j.iframe,this.j,!0);n+=t}const r=this.j.o.addNewLineDeltaShow;Math.abs(n-i.top)>r||(o=i.top,this.preview=!0),Math.abs(n-(i.top+i.height))>r||(o=i.top+i.height,this.preview=!1),!1===o||(0,c.call)(this.preview?_.i.prev:_.i.next,s,this.canGetFocus,e.editor)?(this.current=!1,this.hide()):(this.line.style.top=o+"px",this.current=s,this.show())}}show(){this.isShown||this.j.o.readonly||this.j.isLocked||(this.isShown=!0,this.j.async.clearTimeout(this.timeout),this.line.classList.toggle("jodit-add-new-line_after",!this.preview),this.j.container.appendChild(this.line),this.line.style.width=this.j.editor.clientWidth+"px")}afterInit(t){t.o.addNewLine&&(t.e.on(this.line,"mousemove",(t=>{t.stopPropagation()})).on(this.line,"mousedown touchstart",this.onClickLine).on("change",this.hideForce).on(this.line,"mouseenter",(()=>{this.j.async.clearTimeout(this.timeout),this.lineInFocus=!0})).on(this.line,"mouseleave",(()=>{this.lineInFocus=!1})).on("changePlace",this.addEventListeners.bind(this)),this.addEventListeners())}addEventListeners(){const t=this.j;t.e.off(t.editor,"."+Tt).off(t.container,"."+Tt).on([t.ow,t.ew,t.editor],"scroll."+Tt,this.hideForce).on(t.editor,"dblclick."+Tt,this.onDblClickEditor).on(t.editor,"click."+Tt,this.hide).on(t.container,"mouseleave."+Tt,this.hide).on(t.editor,"mousemove."+Tt,t.async.debounce(this.onMouseMove,3*t.defaultTimeout))}beforeDestruct(){this.j.async.clearTimeout(this.timeout),this.j.e.off(this.line).off("changePlace",this.addEventListeners),_.i.safeRemove(this.line),this.j.e.off([this.j.ow,this.j.ew,this.j.editor],"."+Tt).off(this.j.container,"."+Tt)}}function qt(t){t.registerButton({name:"about",group:"info"})}function Lt(t){t.o.saveSelectionOnBlur&&t.e.on("blur",(()=>{t.isEditorMode()&&t.s.save(!0)})).on("focus",(()=>{t.s.restore()}));const e=()=>{if(t.s.focus(),"end"===t.o.cursorAfterAutofocus){const e=_.i.last(t.editor,(t=>_.i.isText(t)));e&&t.s.setCursorIn(e,!1)}};t.e.on("afterInit",(()=>{t.o.autofocus&&(t.defaultTimeout?t.async.setTimeout(e,300):e())})),t.e.on("afterInit afterAddPlace",(()=>{t.e.off(t.editor,"mousedown.autofocus").on(t.editor,"mousedown.autofocus",(e=>{t.isEditorMode()&&e.target&&_.i.isBlock(e.target)&&!e.target.childNodes.length&&(t.editor===e.target?t.s.focus():t.s.setCursorIn(e.target))}))}))}r.D.prototype.controls.about={exec(t){const e=new R({language:t.o.language}),s=t.i18n.bind(t);e.setMod("theme",t.o.theme).setHeader(s("About Jodit")).setContent(`<div class="jodit-about">\n\t\t\t\t\t<div>${s("Jodit Editor")} v.${t.getVersion()}</div>\n\t\t\t\t\t<div>${s("License: %s",(0,c.isLicense)(t.o.license)?(0,c.normalizeLicense)(t.o.license):"MIT")}</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<a href="https://xdsoft.net/jodit/" target="_blank">https://xdsoft.net/jodit/</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<a href="https://xdsoft.net/jodit/doc/" target="_blank">${s("Jodit User's Guide")}</a>\n\t\t\t\t\t\t${s("contains detailed help for using")}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>${s("Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.")}</div>\n\t\t\t\t</div>`),(0,c.css)(e.dialog,{minHeight:200,minWidth:420}),e.open(!0).bindDestruct(t)},tooltip:"About Jodit",mode:a.MODE_SOURCE+a.MODE_WYSIWYG},r.D.prototype.autofocus=!1,r.D.prototype.cursorAfterAutofocus="end",r.D.prototype.saveSelectionOnBlur=!0,r.D.prototype.controls.classSpan={command:"applyClassName",icon:s(45),exec:c.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isElement,t.editor)||t.editor;return!(!e.args||!i.classList.contains(""+e.args[0]))}return!1},isActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isElement,t.editor)||t.editor;let o=!1;return e.list&&Object.keys(e.list).forEach((t=>{i.classList.contains(t)&&(o=!0)})),!(!i||i===t.editor||void 0===e.list||!o)}return!1},childTemplate:(t,e,s)=>`<span class="${e}">${t.i18n(s)}</span>`,tooltip:"Insert className"};class zt extends H{constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"font"}]}afterInit(t){t.registerCommand("applyClassName",((e,s,i)=>(t.s.applyStyle(void 0,{className:i}),!1)))}beforeDestruct(){}}var Mt=s(9),Pt=s(27);function Dt(t,e){return e?t.previousSibling:t.nextSibling}function Nt(t,e,s){return(0,Mt.RE)(e?_.i.prev:_.i.next,t,(t=>!(!t||_.i.isText(t)&&!(0,Pt.fy)((null==t?void 0:t.nodeValue)||"").length)),s)}function Rt(t,e){return _.i.findSibling(t,e,(t=>{var e;return!_.i.isEmptyTextNode(t)&&!!(!_.i.isText(t)||(null===(e=t.nodeValue)||void 0===e?void 0:e.length)&&(0,Pt.fy)(t.nodeValue))}))}function At(t,e,s,i=!1){const o=t=>e?t.firstChild:t.lastChild;let n=Nt(t,!e,s);if(i&&_.i.isElement(n)&&!_.i.isInlineBlock(n))return null;if(n)do{if(!o(n))return n;n=o(n)}while(n);return null}r.D.prototype.delete={hotkeys:{delete:["delete","cmd+backspace"],deleteWord:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],backspace:["backspace"],backspaceWord:["ctrl+backspace"]}};class Bt extends H{constructor(){super(...arguments),this.requires=["hotkeys"]}get root(){return this.j.editor}afterInit(t){t.e.on("afterCommand.delete",(t=>{"delete"===t&&this.afterDeleteCommand()})),t.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:t.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:t.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,!0),hotkeys:t.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,!0),hotkeys:t.o.delete.hotkeys.backspaceWord})}beforeDestruct(t){t.e.off("afterCommand.delete")}afterDeleteCommand(){const t=this.j,e=t.s.current();if(e&&_.i.isTag(e.firstChild,"br")&&t.s.removeNode(e.firstChild),!((0,c.trim)(t.editor.textContent||"")||t.editor.querySelector("img")||e&&_.i.closest(e,"table",t.editor))){t.editor.innerHTML="";const e=t.s.setCursorIn(t.editor);t.s.removeNode(e)}}onDelete(t,e=!1){var s;const i=this.j.selection;if(i.isFocused()||i.focus(),!(null===(s=i.sel)||void 0===s?void 0:s.rangeCount)||this.checkNotCollapsed())return!1;const o=this.j,n=i.range,r=o.createInside.text(a.INVISIBLE_SPACE);try{if(n.insertNode(r),!_.i.isOrContains(o.editor,r))return;if(((t,e)=>{let s=_.i.findSibling(t,e),i=_.i.findSibling(t,!e);for(;_.i.isElement(s)&&!_.i.isTag(s,a.INSEPARABLE_TAGS)&&!i;)e||!s.firstChild?s.appendChild(t):_.i.before(s.firstChild,t),s=Dt(t,e),i=Dt(t,!e)})(r,t),this.checkRemoveInseparableElement(r,t)||this.checkRemoveChar(r,t,e)||this.checkTableCell(r)||this.checkRemoveEmptyParent(r,t)||this.checkRemoveEmptyNeighbor(r,t)||this.checkJoinTwoLists(r,t)||this.checkJoinNeighbors(r,t)||this.checkRewrapListItem(r,t))return!1}catch(t){throw t}finally{this.safeRemoveEmptyNode(r)}return!1}checkNotCollapsed(){const t=this.j;if(!t.s.isCollapsed())return t.execCommand("Delete"),!0}checkRemoveChar(t,e,s){var i,o,n;const r=e?-1:1,l=Dt(t,!e);let h,d=Dt(t,e),u=null,p=!1;for(;d&&(_.i.isText(d)||_.i.isInlineBlock(d));){for(;_.i.isInlineBlock(d);)d=e?null==d?void 0:d.lastChild:null==d?void 0:d.firstChild;if(!d)break;if(null===(i=d.nodeValue)||void 0===i?void 0:i.length){let t=(0,c.toArray)(d.nodeValue);const s=t.length;let i=e?s-1:0;if(t[i]===a.INVISIBLE_SPACE)for(;t[i]===a.INVISIBLE_SPACE;)i+=r;if(h=t[i],t[i+r]===a.INVISIBLE_SPACE){for(i+=r;t[i]===a.INVISIBLE_SPACE;)i+=r;i+=e?1:-1}if(t=e&&0>i?[]:t.slice(e?0:i+1,e?i:s),!l||!_.i.isText(l)||(e?/^ /:/ $/).test(null!==(o=l.nodeValue)&&void 0!==o?o:"")||!(0,c.trimInv)(l.nodeValue||"").length)for(let s=e?t.length-1:0;(e?s>=0:t.length>s)&&" "===t[s];s+=e?-1:1)t[s]=a.NBSP_SPACE;d.nodeValue=t.join("")}if((null===(n=d.nodeValue)||void 0===n?void 0:n.length)||(u=d),!(0,c.isVoid)(h)&&h!==a.INVISIBLE_SPACE){if(p=!0,(0,c.call)(e?_.i.after:_.i.before,d,t),s)for(;this.checkRemoveChar(t,e,!1););break}let f=Dt(d,e);!f&&d.parentNode&&d.parentNode!==this.root&&(f=At(d,!e,this.root,!0)),u&&(_.i.safeRemove(u),u=null),d=f}return p&&(this.removeEmptyInlineParent(t),this.addBRInsideEmptyBlock(t),this.j.s.setCursorBefore(t)),p||void 0}removeEmptyInlineParent(t){let e=t.parentElement;for(;e&&_.i.isInlineBlock(e);){const s=e.parentElement;_.i.isEmpty(e)&&(_.i.after(e,t),_.i.safeRemove(e)),e=s}}addBRInsideEmptyBlock(t){t.parentElement!==this.root&&_.i.isBlock(t.parentElement)&&_.i.each(t.parentElement,_.i.isEmptyTextNode)&&_.i.after(t,this.j.createInside.element("br"))}checkRemoveInseparableElement(t,e){const s=_.i.findSibling(t,e);if(_.i.isElement(s)&&(_.i.isTag(s,a.INSEPARABLE_TAGS)||_.i.isEmpty(s)||"false"===(0,c.attr)(s,"contenteditable")))return _.i.safeRemove(s),this.j.s.setCursorBefore(t),_.i.isTag(s,"br")&&this.checkRemoveEmptyParent(t,e),!0}checkTableCell(t){if(_.i.isCell(t.parentElement))return!0}checkRemoveEmptyParent(t,e){let s=!1;const{setCursorBefore:i,setCursorIn:o}=this.j.s;let n=_.i.closest(t,_.i.isElement,this.root);if(!n||!_.i.isEmpty(n))return;const r=Nt(t,e,this.root);do{if(!n||!_.i.isEmpty(n)||_.i.isCell(n))break;{_.i.after(n,t);const e=_.i.closest(n,(t=>_.i.isElement(t)&&t!==n),this.root);_.i.safeRemove(n),s=!0,n=e}}while(n);return!(!s||!this.checkJoinTwoLists(t,e))||(!r||_.i.isText(r)||_.i.isTag(r,a.INSEPARABLE_TAGS)?i(t):o(r,!e),s||void 0)}checkJoinTwoLists(t,e){const s=_.i.findSibling(t,e),i=_.i.findSibling(t,!e);if(!_.i.closest(t,_.i.isElement,this.root)&&_.i.isTag(s,["ul","ol"])&&_.i.isTag(i,["ul","ol"])&&_.i.isTag(s.lastElementChild,"li")&&_.i.isTag(i.firstElementChild,"li")){const{setCursorBefore:o,setCursorAfter:n}=this.j.s,r=s.lastElementChild;return(0,c.call)(e?_.i.prepend:_.i.append,i.firstElementChild,t),_.i.moveContent(i,s,!e),_.i.safeRemove(i),(0,c.call)(e?_.i.append:_.i.prepend,r,t),(0,c.call)(e?o:n,t),!0}}checkRemoveEmptyNeighbor(t,e){const s=_.i.closest(t,_.i.isElement,this.root);if(!s)return;const i=Rt(s,e);return i&&_.i.isEmpty(i)?(_.i.safeRemove(i),this.j.s.setCursorBefore(t),!0):void 0}checkJoinNeighbors(t,e){const{jodit:s}=this;let i=t,o=i;for(;i&&!Rt(i,e)&&i.parentElement!==this.root;)i=i.parentElement,o=i;if(_.i.isElement(o)){const i=Rt(o,e);if(i&&(this.checkMoveListContent(o,i,e)||this.moveContentAndRemoveEmpty(o,i,e)))return s.s.setCursorBefore(t),!0}}checkMoveListContent(t,e,s){const{jodit:i}=this,o=_.i.isTag(e,["ol","ul"]),n=_.i.isTag(t,["ol","ul"]),r=(t,e)=>e?t.firstElementChild:t.lastElementChild;return n?(e=i.createInside.element(i.o.enterBlock),_.i.before(t,e),this.moveContentAndRemoveEmpty(r(t,s),e,s)):!(!e||!o||n)&&this.moveContentAndRemoveEmpty(t,r(e,!s),s)}moveContentAndRemoveEmpty(t,e,s){if(t&&_.i.isElement(e)){_.i.moveContent(t,e,!s);let i=t;for(;i&&i!==this.root&&_.i.isEmpty(i);){const t=i.parentElement;_.i.safeRemove(i),i=t}return!0}return!1}checkRewrapListItem(t,e){var s;if(e){const e=_.i.closest(t,_.i.isElement,this.root);if(_.i.isTag(e,"li")&&(null===(s=null==e?void 0:e.parentElement)||void 0===s?void 0:s.firstElementChild)===e&&this.j.s.cursorInTheEdge(!0,e)){const s=e.parentElement,i=this.j.createInside.element(this.j.o.enterBlock);return _.i.before(s,i),_.i.moveContent(e,i),_.i.safeRemove(e),_.i.isEmpty(s)&&_.i.safeRemove(s),this.j.s.setCursorBefore(t),!0}}}safeRemoveEmptyNode(t){var e,s;const{range:i}=this.j.s;i.startContainer===t&&(t.previousSibling?_.i.isText(t.previousSibling)?i.setStart(t.previousSibling,null!==(s=null===(e=t.previousSibling.nodeValue)||void 0===e?void 0:e.length)&&void 0!==s?s:0):i.setStartAfter(t.previousSibling):t.nextSibling&&(_.i.isText(t.nextSibling)?i.setStart(t.nextSibling,0):i.setStartBefore(t.nextSibling)),i.collapse(!0),this.j.s.selectRange(i)),_.i.safeRemove(t)}}function Ot(t){const e=e=>{const s=r.D.defaultOptions.controls[e],i={...s.css},o={};return Object.keys(i).forEach((t=>{o[t]=(0,c.isArray)(i[t])?i[t][0]:i[t]})),t.s.applyStyle(o,{element:s.tags?s.tags[0]:void 0}),t.e.fire("synchro"),!1};["bold","italic","underline","strikethrough"].forEach((e=>{t.registerButton({name:e,group:"font-style"})})),["superscript","subscript"].forEach((e=>{t.registerButton({name:e,group:"script"})})),t.registerCommand("bold",{exec:e,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:e,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:e,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:e})}r.D.prototype.controls.subscript={tags:["sub"],tooltip:"subscript"},r.D.prototype.controls.superscript={tags:["sup"],tooltip:"superscript"},r.D.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},r.D.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},r.D.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration":"underline"},tooltip:"Underline"},r.D.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration":"line-through"},tooltip:"Strike through"},r.D.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:!1,removeOnError:!0,safeJavaScriptLink:!0},r.D.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"};class Ht extends H{constructor(){super(...arguments),this.buttons=[{name:"eraser",group:"font-style"}],this.visitNode=(t,e,s)=>{let i=!1;if(!t)return i;if(this.isRemovableNode(t,e))return s.push(t),this.visitNode(t.nextSibling,e,s);if(this.j.o.cleanHTML.fillEmptyParagraph&&_.i.isBlock(t)&&_.i.isEmpty(t,/^(img|svg|canvas|input|textarea|form|br)$/)){const e=this.j.createInside.element("br");t.appendChild(e),i=!0}const o=this.allowTagsHash;if(o&&!0!==o[t.nodeName]){const e=t.attributes;if(e&&e.length){const s=[];for(let i=0;e.length>i;i+=1){const n=o[t.nodeName][e[i].name];(!n||!0!==n&&n!==e[i].value)&&s.push(e[i].name)}s.length&&(i=!0),s.forEach((e=>{t.removeAttribute(e)}))}}return i=this.visitNode(t.firstChild,e,s)||i,i=this.visitNode(t.nextSibling,e,s)||i,i},this.allowTagsHash=Ht.getHash(this.j.o.cleanHTML.allowTags),this.denyTagsHash=Ht.getHash(this.j.o.cleanHTML.denyTags),this.onKeyUpCleanUp=()=>{const t=this.j;if(!this.allowEdit())return;const e=t.s.current();if(e){const s=_.i.up(e,_.i.isBlock,t.editor);s&&_.i.all(s,(s=>{s&&_.i.isText(s)&&null!=s.nodeValue&&(0,a.INVISIBLE_SPACE_REG_EXP)().test(s.nodeValue)&&0!==s.nodeValue.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),"").length&&(s.nodeValue=s.nodeValue.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),""),s===e&&t.s.isCollapsed()&&t.s.setCursorAfter(s))}))}},this.beforeCommand=t=>{if("removeformat"===t.toLowerCase())return this.onRemoveFormat(),!1}}afterInit(t){t.e.off(".cleanHtml").on("change.cleanHtml afterSetMode.cleanHtml afterInit.cleanHtml mousedown.cleanHtml keydown.cleanHtml",this.onChangeCleanHTML).on("keyup.cleanHtml",this.onKeyUpCleanUp).on("beforeCommand.cleanHtml",this.beforeCommand)}onChangeCleanHTML(){if(!this.allowEdit())return;const t=this.j;this.onSafeHTML(t.editor);const e=t.s.current(),s=t.o.cleanHTML.replaceOldTags;if(s&&e){const i=(0,c.keys)(s,!1);if(t.s.isCollapsed()){const o=_.i.closest(e,i,t.editor);if(o){t.s.save();const e=s[o.nodeName.toLowerCase()]||s[o.nodeName];_.i.replace(o,e,t.createInside,!0,!1),t.s.restore()}}}let i=null;t.editor.firstChild&&(i=t.editor.firstChild);const o=[],n=this.visitNode(i,e,o);o.forEach(_.i.safeRemove),(o.length||n)&&t.events&&t.e.fire("synchro")}allowEdit(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}static getHash(t){const e=/([^[]*)\[([^\]]+)]/,s=/[\s]*,[\s]*/,i=/^(.*)[\s]*=[\s]*(.*)$/,o={};return(0,c.isString)(t)?(t.split(s).map((t=>{t=(0,c.trim)(t);const n=e.exec(t),r={},a=t=>{t=(0,c.trim)(t);const e=i.exec(t);e?r[e[1]]=e[2]:r[t]=!0};if(n){const t=n[2].split(s);n[1]&&(t.forEach(a),o[n[1].toUpperCase()]=r)}else o[t.toUpperCase()]=!0})),o):!!t&&(Object.keys(t).forEach((e=>{o[e.toUpperCase()]=t[e]})),o)}onRemoveFormat(){this.j.s.isCollapsed()?this.removeFormatForCollapsedSelection():this.removeFormatForSelection()}removeFormatForCollapsedSelection(t){const{s:e}=this.j;let s=t;s||(s=this.j.createInside.fake(),e.range.insertNode(s),e.range.collapse());const i=_.i.furthest(s,this.isInlineBlock,this.j.editor);if(i)if(e.cursorOnTheLeft(i))_.i.before(i,s);else if(e.cursorOnTheRight(i))_.i.after(i,s);else{const t=e.splitSelection(i);t&&_.i.after(t,s)}t||(e.setCursorBefore(s),_.i.safeRemove(s))}isInlineBlock(t){return _.i.isInlineBlock(t)&&!_.i.isTag(t,a.INSEPARABLE_TAGS)}removeFormatForSelection(){const{s:t}=this.j,{range:e}=t,s=e.cloneRange(),i=e.cloneRange(),o=this.j.createInside.fake(),n=this.j.createInside.fake();s.collapse(!0),i.collapse(!1),s.insertNode(o),i.insertNode(n),e.setStartBefore(o),e.collapse(!0),t.selectRange(e),this.removeFormatForCollapsedSelection(o),e.setEndAfter(n),e.collapse(!1),t.selectRange(e),this.removeFormatForCollapsedSelection(n);const r=[];_.i.between(o,n,(t=>{this.isInlineBlock(t)&&r.push(t)})),r.forEach((t=>_.i.unwrap(t)));const a=(e,s)=>{if(!Rt(e,s)){const i=e.parentNode;if(i&&i!==t.area&&i.getAttribute("style"))return i.removeAttribute("style"),a(i,s),!0}};a(o,!0)&&a(n,!1),e.setStartAfter(o),e.setEndBefore(n),t.selectRange(e),_.i.safeRemove(o),_.i.safeRemove(n)}isRemovableNode(t,e){const s=this.allowTagsHash;return!(_.i.isText(t)||!(s&&!s[t.nodeName]||this.denyTagsHash&&this.denyTagsHash[t.nodeName]))||!(!(e&&_.i.isTag(t,"br")&&Ht.hasNotEmptyTextSibling(t))||Ht.hasNotEmptyTextSibling(t,!0)||_.i.up(t,_.i.isBlock,this.j.editor)===_.i.up(e,_.i.isBlock,this.j.editor))||this.j.o.cleanHTML.removeEmptyElements&&null!=e&&_.i.isElement(t)&&null!=t.nodeName.match(a.IS_INLINE)&&!_.i.isTemporary(t)&&0===(0,c.trim)(t.innerHTML).length&&!_.i.isOrContains(t,e)}static hasNotEmptyTextSibling(t,e=!1){let s=e?t.nextSibling:t.previousSibling;for(;s;){if(_.i.isElement(s)||!_.i.isEmptyTextNode(s))return!0;s=e?s.nextSibling:s.previousSibling}return!1}onBeforeSetNativeEditorValue(t){const e=this.j.createInside.div();return e.innerHTML=t.value,this.onSafeHTML(e),t.value=e.innerHTML,!1}onSafeHTML(t){(0,c.safeHTML)(t,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off(".cleanHtml")}}(0,n.gn)([(0,x.debounce)((t=>t.jodit.o.cleanHTML.timeout))],Ht.prototype,"onChangeCleanHTML",null),(0,n.gn)([x.autobind],Ht.prototype,"isInlineBlock",null),(0,n.gn)([(0,x.watch)(":beforeSetNativeEditorValue")],Ht.prototype,"onBeforeSetNativeEditorValue",null),(0,n.gn)([(0,x.watch)(":safeHTML")],Ht.prototype,"onSafeHTML",null);class Ft extends H{constructor(){super(...arguments),this.isSuitableStart=t=>_.i.isText(t)&&(0,m.HD)(t.nodeValue)&&/[^\s]/.test(t.nodeValue)||this.isNotClosed(t)&&!_.i.isTemporary(t),this.isSuitable=t=>_.i.isText(t)||this.isNotClosed(t),this.isNotClosed=t=>_.i.isElement(t)&&!(_.i.isBlock(t)||_.i.isTag(t,["hr","style"]))}afterInit(t){"br"!==t.o.enter.toLowerCase()&&t.e.on("afterInit.wtn postProcessSetEditorValue.wtn",this.postProcessSetEditorValue)}beforeDestruct(t){t.e.off(".wtn")}postProcessSetEditorValue(){const{jodit:t}=this;if(!t.isEditorMode())return;let e=t.editor.firstChild,s=!1;for(;e;){if(this.isSuitableStart(e)){s||t.s.save(),s=!0;const i=t.createInside.element(t.o.enter);for(_.i.before(e,i);e&&this.isSuitable(e);){const t=e.nextSibling;i.appendChild(e),e=t}i.normalize()}e=e&&e.nextSibling}s&&(t.s.restore(),"afterInit"===t.e.current&&t.e.fire("internalChange"))}}(0,n.gn)([x.autobind],Ft.prototype,"postProcessSetEditorValue",null);const $t=t=>{if(t.clipboardData)return t.clipboardData;try{return t.dataTransfer||new DataTransfer}catch(t){return null}};function Wt(t,e,s){if(e.isInDestruct)return;"drop"===(null==t?void 0:t.type)&&e.s.insertCursorAtPoint(t.clientX,t.clientY);const i=e.e.fire("beforePasteInsert",s);!(0,c.isVoid)(i)&&((0,c.isString)(i)||(0,c.isNumber)(i)||_.i.isNode(i))&&(s=i),(0,c.isString)(s)&&(s=(t=>{const e=(t=t.replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i);-1!==e&&(t=t.substr(e+20));const s=t.search(/<!--EndFragment-->/i);return-1!==s&&(t=t.substr(0,s)),t})(s)),e.s.insertHTML(s)}const Vt="clipboard";class Yt{constructor(){this.buttons=[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}]}init(t){var e;null===(e=this.buttons)||void 0===e||e.forEach((e=>t.registerButton(e))),t.e.off("copy.clipboard cut.clipboard").on("copy.clipboard cut.clipboard",(e=>{var s;const i=t.s.html,o=$t(e)||$t(t.ew)||$t(e.originalEvent);o&&(o.setData(a.TEXT_PLAIN,(0,c.stripTags)(i)),o.setData(a.TEXT_HTML,i)),t.buffer.set(Vt,i),t.e.fire("pasteStack",{html:i,action:t.o.defaultActionOnPaste}),"cut"===e.type&&(t.s.remove(),t.s.focus()),e.preventDefault(),null===(s=null==t?void 0:t.events)||void 0===s||s.fire("afterCopy",i)}))}destruct(t){var e,s;null===(e=null==t?void 0:t.buffer)||void 0===e||e.set(Vt,""),null===(s=null==t?void 0:t.events)||void 0===s||s.off(".clipboard")}}r.D.prototype.askBeforePasteHTML=!0,r.D.prototype.processPasteHTML=!0,r.D.prototype.askBeforePasteFromWord=!0,r.D.prototype.processPasteFromWord=!0,r.D.prototype.nl2brInPlainText=!0,r.D.prototype.defaultActionOnPaste=a.INSERT_AS_HTML,r.D.prototype.defaultActionOnPasteFromWord=null,r.D.prototype.draggableTags=["img","a","jodit-media","jodit"],r.D.prototype.controls.cut={command:"cut",isDisabled:t=>t.s.isCollapsed(),tooltip:"Cut selection"},r.D.prototype.controls.copy={command:"copy",isDisabled:t=>t.s.isCollapsed(),tooltip:"Copy selection"};const Ut="pasteStorage";r.D.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(t,e,{control:s}){if(s.name===Ut)return void t.execCommand("showPasteStorage");t.s.focus();let i="",o=!0;if(navigator.clipboard){try{const t=await navigator.clipboard.read();if(t&&t.length){const e=await t[0].getType(a.TEXT_PLAIN);i=await new Response(e).text()}o=!1}catch(t){}if(o)try{i=await navigator.clipboard.readText(),o=!1}catch(t){}}o&&(i=t.buffer.get(Vt)||"",o=0===i.length);const n=t.value;o?(t.ed.execCommand("paste"),o=n===t.value,!o&&t.e.fire("afterPaste")):i.length?(Wt(null,t,i),t.e.fire("afterPaste")):o&&A(t.i18n("Your browser doesn't support direct access to the clipboard."),(()=>{t.s.focus()})).bindDestruct(t)},list:{[Ut]:"Paste Storage"},isChildDisabled(t){return 2>t.e.fire("pasteStorageList")}},r.D.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"};class Gt extends H{constructor(){super(...arguments),this.pasteStack=new c.LimitedStack(20)}afterInit(t){t.e.on("paste.paste",this.onPaste).on("pasteStack.paste",(t=>this.pasteStack.push(t))),t.o.nl2brInPlainText&&this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}onPaste(t){try{if(!1===this.customPasteProcess(t)||!1===this.j.e.fire("beforePaste",t))return t.preventDefault(),!1;this.defaultPasteProcess(t)}finally{this.j.e.fire("afterPaste",t)}}customPasteProcess(t){if(!this.j.o.processPasteHTML)return;const e=$t(t),s=[null==e?void 0:e.getData(a.TEXT_HTML),null==e?void 0:e.getData(a.TEXT_PLAIN)];for(const e of s)if((0,c.isHTML)(e)&&(this.processWordHTML(t,e)||this.processHTML(t,e)))return!1}defaultPasteProcess(t){const e=$t(t);let s=(null==e?void 0:e.getData(a.TEXT_HTML))||(null==e?void 0:e.getData(a.TEXT_PLAIN));if(e&&s&&""!==(0,c.trim)(s)){const i=this.j.e.fire("processPaste",t,s,(t=>{const e=t.types;let s="";if((0,c.isArray)(e)||"[object DOMStringList]"==={}.toString.call(e))for(let t=0;e.length>t;t+=1)s+=e[t]+";";else s=(e||a.TEXT_PLAIN)+";";return s})(e));void 0!==i&&(s=i),((0,c.isString)(s)||_.i.isNode(s))&&this.insertByType(t,s,this.j.o.defaultActionOnPaste),t.preventDefault(),t.stopPropagation()}}processWordHTML(t,e){return!(!this.j.o.processPasteFromWord||!(0,c.isHtmlFromWord)(e)||(this.j.o.askBeforePasteFromWord?this.askInsertTypeDialog("The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",(s=>{this.insertFromWordByType(t,e,s)})):this.insertFromWordByType(t,e,this.j.o.defaultActionOnPasteFromWord||this.j.o.defaultActionOnPaste),0))}processHTML(t,e){if(this.j.o.askBeforePasteHTML){const s=this.pasteStack.find((t=>t.html===e));return s?(this.insertByType(t,e,s.action||this.j.o.defaultActionOnPaste),!0):(this.askInsertTypeDialog("Your code is similar to HTML. Keep as HTML?","Paste as HTML",(s=>{this.insertByType(t,e,s)}),"Insert as Text"),!0)}return!1}insertFromWordByType(t,e,s){var i;switch(s){case a.INSERT_AS_HTML:if(e=(0,c.applyStyles)(e),this.j.o.beautifyHTML){const t=null===(i=this.j.events)||void 0===i?void 0:i.fire("beautifyHTML",e);(0,c.isString)(t)&&(e=t)}break;case a.INSERT_AS_TEXT:e=(0,c.cleanFromWord)(e);break;case a.INSERT_ONLY_TEXT:e=(0,c.stripTags)((0,c.cleanFromWord)(e))}Wt(t,this.j,e)}insertByType(t,e,s){if(this.pasteStack.push({html:e,action:s}),(0,c.isString)(e))switch(this.j.buffer.set(Vt,e),s){case a.INSERT_CLEAR_HTML:e=(0,c.cleanFromWord)(e);break;case a.INSERT_ONLY_TEXT:e=(0,c.stripTags)(e);break;case a.INSERT_AS_TEXT:e=(0,c.htmlspecialchars)(e)}Wt(t,this.j,e)}askInsertTypeDialog(t,e,s,i="Clean",o="Insert only Text"){var n,r,l,h;if(!1===(null===(r=null===(n=this.j)||void 0===n?void 0:n.e)||void 0===r?void 0:r.fire("beforeOpenPasteDialog",t,e,s,i,o)))return;const d=O(`<div style="word-break: normal; white-space: normal">${this.j.i18n(t)}</div>`,this.j.i18n(e));d.bindDestruct(this.j),(0,c.markOwner)(this.j,d.container);const u=(0,f.zx)(this.j,{text:"Keep",name:"keep",status:"primary",tabIndex:0}),p=(0,f.zx)(this.j,{text:i,tabIndex:0}),m=(0,f.zx)(this.j,{text:o,tabIndex:0}),g=(0,f.zx)(this.j,{text:"Cancel",tabIndex:0});return u.onAction((()=>{d.close(),s&&s(a.INSERT_AS_HTML)})),p.onAction((()=>{d.close(),s&&s(a.INSERT_AS_TEXT)})),m.onAction((()=>{d.close(),s&&s(a.INSERT_ONLY_TEXT)})),g.onAction((()=>{d.close()})),d.setFooter([u,p,o?m:"",g]),u.focus(),null===(h=null===(l=this.j)||void 0===l?void 0:l.e)||void 0===h||h.fire("afterOpenPasteDialog",d,t,e,s,i,o),d}onProcessPasteReplaceNl2Br(t,e,s){if(s===a.TEXT_PLAIN+";"&&!(0,c.isHTML)(e))return(0,c.nl2br)(e)}beforeDestruct(t){t.e.off("paste.paste",this.onPaste)}}(0,n.gn)([x.autobind],Gt.prototype,"onPaste",null),(0,n.gn)([x.autobind],Gt.prototype,"onProcessPasteReplaceNl2Br",null);class Kt extends H{constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){const t=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=t}this.dialog&&this.dialog.close(),this.j.setEditorValue(),this.j.e.fire("afterPaste")},this.onKeyDown=t=>{let e=this.currentIndex;-1!==[a.KEY_UP,a.KEY_DOWN,a.KEY_ENTER].indexOf(t.key)&&(t.key===a.KEY_UP&&(0===e?e=this.list.length-1:e-=1),t.key===a.KEY_DOWN&&(e===this.list.length-1?e=0:e+=1),t.key!==a.KEY_ENTER?(e!==this.currentIndex&&this.selectIndex(e),t.stopImmediatePropagation(),t.preventDefault()):this.paste())},this.selectIndex=t=>{this.listBox&&(0,c.toArray)(this.listBox.childNodes).forEach(((e,s)=>{e.classList.remove("jodit_active"),t===s&&this.previewBox&&(e.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[t],e.focus())})),this.currentIndex=t},this.showDialog=()=>{2>this.list.length||(this.dialog||this.createDialog(),this.listBox&&(this.listBox.innerHTML=""),this.previewBox&&(this.previewBox.innerHTML=""),this.list.forEach(((t,e)=>{const s=this.j.c.element("a");s.textContent=e+1+". "+t.replace((0,a.SPACE_REG_EXP)(),""),this.j.e.on(s,"keydown",this.onKeyDown),(0,c.attr)(s,"href","#"),(0,c.attr)(s,"data-index",""+e),(0,c.attr)(s,"tab-index","-1"),this.listBox&&this.listBox.appendChild(s)})),this.dialog&&this.dialog.open(),this.j.async.setTimeout((()=>{this.selectIndex(0)}),100))}}createDialog(){this.dialog=new R({language:this.j.o.language});const t=(0,k.zx)(this.j,"paste","Paste","primary");t.onAction(this.paste);const e=(0,k.zx)(this.j,"","Cancel");e.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),this.container.appendChild(this.listBox),this.container.appendChild(this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([t,e]),this.j.e.on(this.listBox,"click dblclick",(t=>{const e=t.target;return _.i.isTag(e,"a")&&e.hasAttribute("data-index")&&this.selectIndex(parseInt((0,c.attr)(e,"-index")||"0",10)),"dblclick"===t.type&&this.paste(),!1}))}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",(()=>this.list.length)).on("afterCopy.paste-storage",(t=>{-1!==this.list.indexOf(t)&&this.list.splice(this.list.indexOf(t),1),this.list.unshift(t),this.list.length>5&&(this.list.length=5)})),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),_.i.safeRemove(this.previewBox),_.i.safeRemove(this.listBox),_.i.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}}const Xt="copyformat",Jt=["fontWeight","fontStyle","fontSize","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine","fontFamily"],Zt=(t,e,s,i)=>{let o=(0,c.css)(s,e);return o===i[e]&&(o=s.parentNode&&s!==t.editor&&s.parentNode!==t.editor?Zt(t,e,s.parentNode,i):void 0),o};function Qt(t){t.registerButton({name:"copyformat",group:"clipboard"})}r.D.prototype.controls.copyformat={exec(t,e,{button:s}){if(e){if(t.buffer.exists(Xt))t.buffer.delete(Xt),t.e.off(t.editor,"mouseup.copyformat");else{const s={},i=_.i.up(e,(t=>t&&!_.i.isText(t)),t.editor)||t.editor,o=t.createInside.span();t.editor.appendChild(o),Jt.forEach((t=>{s[t]=(0,c.css)(o,t)})),o!==t.editor&&_.i.safeRemove(o);const n=((t,e,s)=>{const i={};return e&&Jt.forEach((o=>{i[o]=Zt(t,o,e,s),o.match(/border(Style|Color)/)&&!i.borderWidth&&(i[o]=void 0)})),i})(t,i,s),r=()=>{t.buffer.delete(Xt);const e=t.s.current();e&&(_.i.isTag(e,"img")?(0,c.css)(e,n):t.s.applyStyle(n)),t.e.off(t.editor,"mouseup.copyformat")};t.e.on(t.editor,"mouseup.copyformat",r),t.buffer.set(Xt,!0)}s.update()}},isActive:t=>t.buffer.exists(Xt),tooltip:"Paint format"};var te=s(46);function ee(t){t.registerButton({name:"brush",group:"color"});const e=(e,s,i)=>{const o=(0,c.normalizeColor)(i);switch(e){case"background":t.s.applyStyle({backgroundColor:o||""});break;case"forecolor":t.s.applyStyle({color:o||""})}return t.setEditorValue(),!1};t.registerCommand("forecolor",e).registerCommand("background",e)}r.D.prototype.controls.brush={update(t){const e=(0,c.dataBind)(t,"color"),s=t.j,i=(e,i)=>{i&&i!==""+(0,c.css)(s.editor,e)&&(t.state.icon.fill=i)};if(e){const s=(0,c.dataBind)(t,"color");return void i("color"===s?s:"background-color",e)}const o=s.s.current();if(o&&!t.state.disabled){const t=_.i.closest(o,_.i.isElement,s.editor)||s.editor;i("color",""+(0,c.css)(t,"color")),i("background-color",""+(0,c.css)(t,"background-color"))}t.state.icon.fill="",t.state.activated=!1},popup(t,e,s,i,o){let n="",r="",a=[],l=null;return e&&e!==t.editor&&_.i.isNode(e)&&(_.i.isElement(e)&&t.s.isCollapsed()&&!_.i.isTag(e,["br","hr"])&&(l=e),_.i.up(e,(t=>{if(_.i.isHTMLElement(t)){const e=(0,c.css)(t,"color",!0),s=(0,c.css)(t,"background-color",!0);if(e)return n=""+e,!0;if(s)return r=""+s,!0}}),t.editor)),a=[{name:"Background",content:(0,te.YW)(t,(e=>{l?l.style.backgroundColor=e:t.execCommand("background",!1,e),(0,c.dataBind)(o,"color",e),(0,c.dataBind)(o,"color-mode","background"),i()}),r)},{name:"Text",content:(0,te.YW)(t,(e=>{l?l.style.color=e:t.execCommand("forecolor",!1,e),(0,c.dataBind)(o,"color",e),(0,c.dataBind)(o,"color-mode","color"),i()}),n)}],"background"!==t.o.colorPickerDefaultTab&&(a=a.reverse()),(0,te.IL)(t,a,l)},exec(t,e,{button:s}){const i=(0,c.dataBind)(s,"color-mode"),o=(0,c.dataBind)(s,"color");if(!i)return!1;if(e&&e!==t.editor&&_.i.isNode(e)&&_.i.isElement(e))switch(i){case"color":e.style.color=o;break;case"background":e.style.backgroundColor=o}else t.execCommand("background"===i?i:"forecolor",!1,o)},tooltip:"Fill color or set the text color"};class se extends H{constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.getText=t=>{const e=$t(t);return e?e.getData(a.TEXT_HTML)||e.getData(a.TEXT_PLAIN):null}}afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}onDragStart(t){let e=t.target;if(this.onDragEnd(),this.isFragmentFromEditor=_.i.isOrContains(this.j.editor,e,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,c.ctrlKey)(t),this.isFragmentFromEditor){const t=this.j.s.sel,e=t&&t.rangeCount?t.getRangeAt(0):null;e&&(this.bufferRange=e.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=t.clientX,this.startDragPoint.y=t.clientY,_.i.isElement(e)&&e.classList.contains("jodit-filebrowser__files-item")&&(e=e.querySelector("img")),_.i.isTag(e,"img")&&(this.draggable=e.cloneNode(!0),(0,c.dataBind)(this.draggable,"target",e)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on("drop.DragAndDrop",this.onDrop).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off("drop.DragAndDrop",this.onDrop).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(t){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(t.clientX,t.clientY),t.preventDefault(),t.stopPropagation())}onDragEnd(){this.draggable&&(_.i.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(t){if(!t.dataTransfer||!t.dataTransfer.files||!t.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",t),t.preventDefault(),t.stopPropagation(),!1;const e=this.j.s.sel,s=this.bufferRange||(e&&e.rangeCount?e.getRangeAt(0):null);let i=null;if(!this.draggable&&s)i=this.isCopyMode?s.cloneContents():s.extractContents();else if(this.draggable)if(this.isCopyMode){const[t,e]="1"===(0,c.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(t),i.setAttribute(e,(0,c.attr)(this.draggable,"data-src")||(0,c.attr)(this.draggable,"src")||""),"a"===t&&(i.textContent=(0,c.attr)(i,e)||"")}else i=(0,c.dataBind)(this.draggable,"target");else this.getText(t)&&(i=this.j.createInside.fromHTML(this.getText(t)));e&&e.removeAllRanges(),this.j.s.insertCursorAtPoint(t.clientX,t.clientY),i&&(this.j.s.insertNode(i,!1,!1),s&&i.firstChild&&i.lastChild&&(s.setStartBefore(i.firstChild),s.setEndAfter(i.lastChild),this.j.s.selectRange(s),this.j.e.fire("synchro")),_.i.isTag(i,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",i)),t.preventDefault(),t.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}}(0,n.gn)([x.autobind],se.prototype,"onDragStart",null),(0,n.gn)([(0,x.throttle)((t=>t.j.defaultTimeout/10))],se.prototype,"onDrag",null),(0,n.gn)([x.autobind],se.prototype,"onDragEnd",null),(0,n.gn)([x.autobind],se.prototype,"onDrop",null);class ie extends H{constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.wasMoved=!1,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0}afterInit(){this.dragList=this.j.o.draggableTags?(0,c.splitArray)(this.j.o.draggableTags).filter(Boolean).map((t=>t.toLowerCase())):[],this.dragList.length&&this.j.e.on("mousedown touchstart dragstart",this.onDragStart)}onDragStart(t){if("dragstart"===t.type&&this.draggable)return!1;const e=t.target;if(!this.dragList.length||!e)return;const s=t=>t&&this.dragList.includes(t.nodeName.toLowerCase()),i=_.i.furthest(e,s,this.j.editor)||(s(e)?e:null);i&&(this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,c.ctrlKey)(t),this.onDragEnd(),this.draggable=i.cloneNode(!0),(0,c.dataBind)(this.draggable,"target",i),this.addDragListeners())}onDrag(t){var e,s;if(!this.draggable)return;const i=t.clientY;if(Math.sqrt(Math.pow(t.clientX-this.startX,2)+Math.pow(i-this.startY,2))>=this.diffStep){if(this.wasMoved=!0,this.j.e.fire("hidePopup hideResizer"),!this.draggable.parentNode){const i=(0,c.dataBind)(this.draggable,"target");(0,c.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:t.clientX,top:t.clientY,width:null!==(e=null==i?void 0:i.offsetWidth)&&void 0!==e?e:100,height:null!==(s=null==i?void 0:i.offsetHeight)&&void 0!==s?s:100}),(0,j.ZO)(this.j,ie).appendChild(this.draggable)}(0,c.css)(this.draggable,{left:t.clientX,top:t.clientY}),this.j.s.insertCursorAtPoint(t.clientX,t.clientY)}}onDragEnd(){this.isInDestruct||this.draggable&&(_.i.safeRemove(this.draggable),this.draggable=null,this.wasMoved=!1,this.removeDragListeners())}onDrop(){if(!this.draggable||!this.wasMoved)return void this.onDragEnd();let t=(0,c.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(t=t.cloneNode(!0));const{parentElement:e}=t;this.j.s.insertNode(t,!0,!1),e&&_.i.isEmpty(e)&&_.i.safeRemove(e),_.i.isTag(t,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",t),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove touchmove",this.onDrag).on("mouseup touchend",this.onDrop).on([this.j.ew,this.ow],"mouseup touchend",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove touchmove",this.onDrag).off("mouseup touchend",this.onDrop).off([this.j.ew,this.ow],"mouseup touchend",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown touchstart dragstart",this.onDragStart),this.removeDragListeners()}}(0,n.gn)([x.autobind],ie.prototype,"onDragStart",null),(0,n.gn)([(0,x.throttle)((t=>t.j.defaultTimeout/10))],ie.prototype,"onDrag",null),(0,n.gn)([x.autobind],ie.prototype,"onDragEnd",null),(0,n.gn)([x.autobind],ie.prototype,"onDrop",null);const oe=(t,e,s,i)=>{var o;const n=t.createInside.element(s),r=t.createInside.element("br");n.appendChild(r),i&&i.cssText&&n.setAttribute("style",i.cssText),t.s.insertNode(n,!1,!1),t.s.setCursorBefore(r);const a=t.s.createRange();return a.setStartBefore("br"!==s.toLowerCase()?r:n),a.collapse(!0),t.s.selectRange(a),_.i.safeRemove(e),(0,c.scrollIntoViewIfNeeded)(n,t.editor,t.ed),null===(o=t.events)||void 0===o||o.fire("synchro"),n};class ne extends H{constructor(){super(...arguments),this.brMode=!1,this.defaultTag=a.PARAGRAPH}afterInit(t){this.defaultTag=t.o.enter.toLowerCase(),this.brMode=this.defaultTag===a.BR.toLowerCase(),t.o.enterBlock||(t.o.enterBlock=this.brMode?a.PARAGRAPH:this.defaultTag),t.e.off(".enter").on("keydown.enter",(e=>{if(e.key===a.KEY_ENTER){const s=t.e.fire("beforeEnter",e);return void 0!==s?s:(t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),!1)}}))}onEnter(t){const e=this.j,s=e.selection,i=this.defaultTag;let o=s.current(!1);o&&o!==e.editor||(o=e.createInside.text(a.INVISIBLE_SPACE),s.insertNode(o),s.select(o));let n=this.getBlockWrapper(o);const r=_.i.isTag(n,"li");if((!r||t.shiftKey)&&!this.checkBR(o,t.shiftKey))return!1;if(n||this.hasPreviousBlock(o)||(n=this.wrapText(o)),!n||n===o)return oe(e,null,r?"li":i),!1;if(!this.checkUnsplittableBox(n))return!1;if(r&&_.i.isEmpty(n))return this.enterInsideEmptyLIelement(n),!1;const l=n.tagName.toLowerCase()===this.defaultTag||r,c=s.cursorOnTheRight(n),h=s.cursorOnTheLeft(n);if(!l&&(c||h)){let t=null;return t=c?s.setCursorAfter(n):s.setCursorBefore(n),oe(e,t,this.defaultTag),void(h&&!c&&s.setCursorIn(n,!0))}s.splitSelection(n)}getBlockWrapper(t,e=a.IS_BLOCK){let s=t;const i=this.j.editor;do{if(!s||s===i)break;if(e.test(s.nodeName))return _.i.isTag(s,"li")?s:this.getBlockWrapper(s.parentNode,/^li$/i)||s;s=s.parentNode}while(s&&s!==i);return null}checkBR(t,e){const s=_.i.closest(t,["pre","blockquote"],this.j.editor);if(this.brMode||e&&!s||!e&&s){const t=this.j.createInside.element("br");return this.j.s.insertNode(t,!0),(0,c.scrollIntoViewIfNeeded)(t,this.j.editor,this.j.ed),!1}return!0}wrapText(t){let e=t;_.i.up(e,(t=>{t&&t.hasChildNodes()&&t!==this.j.editor&&(e=t)}),this.j.editor);const s=_.i.wrapInline(e,this.j.o.enter,this.j);if(_.i.isEmpty(s)){const t=this.j.createInside.element("br");s.appendChild(t),this.j.s.setCursorBefore(t)}return s}hasPreviousBlock(t){return!!_.i.prev(t,(t=>_.i.isBlock(t)||_.i.isImage(t)),this.j.editor)}checkUnsplittableBox(t){const e=this.j,s=e.selection;if(!_.i.canSplitBlock(t)){const t=e.createInside.element("br");return s.insertNode(t,!1),s.setCursorAfter(t),!1}return!0}enterInsideEmptyLIelement(t){let e=null;const s=_.i.closest(t,["ol","ul"],this.j.editor);if(s){if(_.i.prev(t,(t=>_.i.isTag(t,"li")),s))if(_.i.next(t,(t=>_.i.isTag(t,"li")),s)){const i=this.j.s.createRange();i.setStartBefore(s),i.setEndAfter(t);const o=i.extractContents();s.parentNode&&s.parentNode.insertBefore(o,s),e=this.j.s.setCursorBefore(s)}else e=this.j.s.setCursorAfter(s);else e=this.j.s.setCursorBefore(s);_.i.safeRemove(t),oe(this.j,e,this.defaultTag),(0,c.$$)("li",s).length||_.i.safeRemove(s)}}beforeDestruct(t){t.e.off("keydown.enter")}}class re extends H{afterInit(t){}beforeDestruct(t){}onKeyDownArrow(t){var e;if(t.key!==a.KEY_RIGHT||!this.j.selection.isCollapsed())return;const{endContainer:s,endOffset:i}=this.j.selection.range;if(_.i.isText(s)&&(null===(e=s.nodeValue)||void 0===e?void 0:e.length)===i){const{parentNode:t}=s;_.i.isInlineBlock(t)&&!Nt(t,!1,this.j.editor)&&_.i.after(t,this.j.createInside.text(a.NBSP_SPACE))}}}(0,n.gn)([(0,x.watch)(":keydown")],re.prototype,"onKeyDownArrow",null),r.D.prototype.showMessageErrors=!0,r.D.prototype.showMessageErrorTime=3e3,r.D.prototype.showMessageErrorOffsetPx=3;const ae="error-box-for-messages";function le(t){if(t.o.showMessageErrors){const e=t.getFullElName(ae,"active",!0),s=t.c.div(t.getFullElName(ae)),i=()=>{let e=5;(0,c.toArray)(s.childNodes).forEach((s=>{(0,c.css)(s,"bottom",e+"px"),e+=s.offsetHeight+t.o.showMessageErrorOffsetPx}))};t.e.on("beforeDestruct",(()=>{_.i.safeRemove(s)})).on("errorMessage",((o,n,r)=>{t.workplace.appendChild(s);const a=t.c.div(e,o);a.classList.add(t.getFullElName(ae,"type",n)),s.appendChild(a),i(),t.async.setTimeout((()=>{a.classList.remove(e),t.async.setTimeout((()=>{_.i.safeRemove(a),i()}),300)}),r||t.o.showMessageErrorTime)}))}}function ce(t){t.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"});const e=(e,s,i)=>{switch(e){case"fontsize":t.s.applyStyle({fontSize:(0,c.normalizeSize)(i)});break;case"fontname":t.s.applyStyle({fontFamily:i})}return t.e.fire("synchro"),!1};t.registerCommand("fontsize",e).registerCommand("fontname",e)}function he(t){t.registerButton({name:"paragraph",group:"font"}),t.registerCommand("formatblock",((e,s,i)=>(t.s.applyStyle(void 0,{element:i}),t.setEditorValue(),!1)))}function de(t){t.registerButton({name:"fullsize"});let e=!1,s=0,i=0,o=!1;const n=()=>{const{container:n,events:r}=t;r&&(e?(s=(0,c.css)(n,"height",!0),i=(0,c.css)(n,"width",!0),(0,c.css)(n,{height:t.ow.innerHeight,width:t.ow.innerWidth}),o=!0):o&&(0,c.css)(n,{height:s||"auto",width:i||"auto"}))},r=s=>{const{container:i,events:o}=t;if(i){if(void 0===s&&(s=!i.classList.contains("jodit_fullsize")),t.setMod("fullsize",s),t.o.fullsize=s,e=s,i.classList.toggle("jodit_fullsize",s),t.toolbar&&((0,c.isJoditObject)(t)&&t.toolbarContainer.appendChild(t.toolbar.container),(0,c.css)(t.toolbar.container,"width","auto")),t.o.globalFullSize){let t=i.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",s),t=t.parentNode;n()}o.fire("afterResize")}};t.o.globalFullSize&&t.e.on(t.ow,"resize",n),t.e.on("afterInit afterOpen",(()=>{var e;t.toggleFullSize(null===(e=null==t?void 0:t.options)||void 0===e?void 0:e.fullsize)})).on("toggleFullSize",r).on("beforeDestruct",(()=>{e&&r(!1)})).on("beforeDestruct",(()=>{t.events&&t.e.off(t.ow,"resize",n)}))}r.D.prototype.defaultFontSizePoints="px",r.D.prototype.controls.fontsize={command:"fontSize",data:{cssRule:"font-size"},list:["8","9","10","11","12","14","16","18","24","30","36","48","60","72","96"],exec:(t,e,{control:s})=>(0,c.memorizeExec)(t,e,{control:s},(e=>{var i;return"fontsize"===(null===(i=s.command)||void 0===i?void 0:i.toLowerCase())?`${e}${t.o.defaultFontSizePoints}`:e})),childTemplate:(t,e,s)=>`${s}${t.o.defaultFontSizePoints}`,tooltip:"Font size",isChildActive(t,e){var s,i;const o=t.s.current(),n=(null===(s=e.data)||void 0===s?void 0:s.cssRule)||"font-size",r=(null===(i=e.data)||void 0===i?void 0:i.normalize)||(e=>/pt$/i.test(e)&&"pt"===t.o.defaultFontSizePoints?e.replace(/pt$/i,""):e);if(o){const s=_.i.closest(o,_.i.isElement,t.editor)||t.editor,i=(0,c.css)(s,n);return!(!i||!e.args||r(""+e.args[0])!==r(""+i))}return!1}},r.D.prototype.controls.font={...r.D.prototype.controls.fontsize,command:"fontname",list:{"":"Default","Helvetica,sans-serif":"Helvetica","Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","'Times New Roman',Times,serif":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},childTemplate:(t,e,s)=>`<span style="font-family: ${e}!important;">${s}</span>`,data:{cssRule:"font-family",normalize:t=>t.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9]+/g,",")},tooltip:"Font family"},r.D.prototype.controls.paragraph={command:"formatBlock",update(t){const e=t.j,s=t.control,i=e.s.current();if(i&&e.o.textIcons){const o=(_.i.closest(i,_.i.isBlock,e.editor)||e.editor).nodeName.toLowerCase(),n=s.list;t&&s.data&&s.data.currentValue!==o&&n&&n[o]&&(e.o.textIcons?t.state.text=o:t.state.icon.name=o,s.data.currentValue=o)}return!1},exec:c.memorizeExec,data:{currentValue:"left"},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote"},isChildActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isBlock,t.editor);return!(!i||i===t.editor||void 0===e.args||i.nodeName.toLowerCase()!==e.args[0])}return!1},isActive(t,e){const s=t.s.current();if(s){const i=_.i.closest(s,_.i.isBlock,t.editor);return!(!i||i===t.editor||void 0===e.list||_.i.isTag(i,"p")||void 0===e.list[i.nodeName.toLowerCase()])}return!1},childTemplate:(t,e,s)=>`<${e} style="margin:0;padding:0"><span>${t.i18n(s)}</span></${e}>`,tooltip:"Insert format block"},r.D.prototype.fullsize=!1,r.D.prototype.globalFullSize=!0,r.D.prototype.controls.fullsize={exec(t){t.toggleFullSize()},update(t){const e=t.j,s=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=s:t.state.icon.name=s},tooltip:"Open editor in fullsize",mode:a.MODE_SOURCE+a.MODE_WYSIWYG},r.D.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8, cmd+shift+8"],selectall:["ctrl+a","cmd+a"]};class ue extends H{constructor(){super(...arguments),this.onKeyPress=t=>{const e=this.specialKeys[t.which],s=(t.key||String.fromCharCode(t.which)).toLowerCase(),i=[e||s];return["alt","ctrl","shift","meta"].forEach((s=>{t[s+"Key"]&&e!==s&&i.push(s)})),(0,c.normalizeKeyAliases)(i.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}afterInit(t){(0,c.keys)(t.o.commandToHotkeys,!1).forEach((e=>{const s=t.o.commandToHotkeys[e];s&&((0,c.isArray)(s)||(0,c.isString)(s))&&t.registerHotkeyToCommand(s,e)}));let e=!1;t.e.off(".hotkeys").on([t.ow,t.ew],"keydown.hotkeys",(t=>{if(t.key===a.KEY_ESC)return this.j.e.fire("escape",t)})).on("keydown.hotkeys",(s=>{const i=this.onKeyPress(s),o={shouldStop:!0};if(!1===this.j.e.fire(i+".hotkey",s.type,o)){if(o.shouldStop)return e=!0,t.e.stopPropagation("keydown"),!1;s.preventDefault()}}),void 0,!0).on("keyup.hotkeys",(()=>{if(e)return e=!1,t.e.stopPropagation("keyup"),!1}),void 0,!0)}beforeDestruct(t){t.events&&t.e.off(".hotkeys")}}function pe(t){const e=t.options;t.e.on("afterSetMode",(()=>{t.isEditorMode()&&t.s.focus()})).on("generateDocumentStructure.iframe",((t,s)=>{const i=t||s.iframe.contentWindow.document;if(i.open(),i.write(e.iframeDoctype+`<html dir="${e.direction}" class="jodit" lang="${(0,c.defaultLanguage)(e.language)}"><head>`+`<title>${e.iframeTitle}</title>`+(e.iframeBaseUrl?`<base href="${e.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),i.close(),e.iframeCSSLinks&&e.iframeCSSLinks.forEach((t=>{const e=i.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),i.head&&i.head.appendChild(e)})),e.iframeStyle){const t=i.createElement("style");t.innerHTML=e.iframeStyle,i.head&&i.head.appendChild(t)}})).on("createEditor",(()=>{if(!e.iframe)return;const s=t.c.element("iframe");s.style.display="block",s.src="about:blank",s.className="jodit-wysiwyg_iframe",s.setAttribute("allowtransparency","true"),s.setAttribute("tabindex",""+e.tabIndex),s.setAttribute("frameborder","0"),t.workplace.appendChild(s),t.iframe=s;const i=t.e.fire("generateDocumentStructure.iframe",null,t);return(0,c.callPromise)(i,(()=>{if(!t.iframe)return;const s=t.iframe.contentWindow.document;t.editorWindow=t.iframe.contentWindow;const i=()=>{(0,c.attr)(s.body,"contenteditable",t.getMode()!==a.MODE_SOURCE&&!t.getReadOnly()||null)},o=t=>{const e=/<body.*<\/body>/im,s="{%%BODY%%}",i=e.exec(t);return i&&(t=t.replace(e,s).replace(/<span([^>]*?)>(.*?)<\/span>/gim,"").replace(/<span([^&]*?)>(.*?)<\/span>/gim,"").replace(s,i[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im,"$1").replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im,"$1").replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g,"")).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")),t};if(e.editHTMLDocumentMode){const e=t.element.tagName;if("TEXTAREA"!==e&&"INPUT"!==e)throw(0,c.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");t.e.on("beforeGetNativeEditorValue",(()=>o(t.o.iframeDoctype+s.documentElement.outerHTML))).on("beforeSetNativeEditorValue",(({value:e})=>!t.isLocked&&(/<(html|body)/i.test(e)?o(s.documentElement.outerHTML)!==o(e)&&(s.open(),s.write(t.o.iframeDoctype+o(e)),s.close(),t.editor=s.body,t.e.fire("safeHTML",t.editor),i(),t.e.fire("prepareWYSIWYGEditor"),t.e.stopPropagation("beforeSetNativeEditorValue")):s.body.innerHTML=e,!0)),void 0,!0)}if(t.editor=s.body,t.e.on("afterSetMode afterInit afterAddPlace",i),"auto"===e.height){s.documentElement&&(s.documentElement.style.overflowY="hidden");const i=t.async.throttle((()=>{t.editor&&t.iframe&&"auto"===e.height&&(0,c.css)(t.iframe,"height",t.editor.offsetHeight)}),t.defaultTimeout/2);t.e.on("change afterInit afterSetMode resize",i).on([t.iframe,t.ew,s.documentElement],"load",i).on(s,"readystatechange DOMContentLoaded",i)}return s.documentElement&&t.e.on(s.documentElement,"mousedown touchend",(()=>{t.s.isFocused()||(t.s.focus(),t.editor===s.body&&t.s.setCursorIn(s.body))})).on(t.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",(e=>{var s;null===(s=t.events)||void 0===s||s.fire(t.ow,e)})),!1}))}))}function fe(t){const e=t.o,s=t.i18n.bind(t),i=k.JO.get.bind(k.JO),o=e.filebrowser.ajax.url||e.uploader.url,n=e.image.useImageEditor;return t.c.fromHTML(`<div style="${e.image.editSrc?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Src")}</label>\n\t\t\t<div class="jodit-input_group">\n\t\t\t\t<input data-ref="imageSrc" class="jodit-input" type="text"/>\n\t\t\t\t<div\n\t\t\t\t\tclass="jodit-input_group-buttons"\n\t\t\t\t\tstyle="${o?"":"display: none"}"\n\t\t\t\t>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tdata-ref="changeImage"\n\t\t\t\t\t\t\tclass="jodit-button"\n\t\t\t\t\t\t>${i("image")}</a>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tdata-ref="editImage"\n\t\t\t\t\t\t\tclass="jodit-button"\n\t\t\t\t\t\t\tstyle="${n?"":"display: none"}"\n\t\t\t\t\t\t>${i("crop")}</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div style="${e.image.editTitle?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Title")}</label>\n\t\t\t<input data-ref="imageTitle" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editAlt?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Alternative")}</label>\n\t\t\t<input data-ref="imageAlt" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editLink?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Link")}</label>\n\t\t\t<input data-ref="imageLink" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editLink?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label class="jodit_vertical_middle">\n\t\t\t\t<input data-ref="imageLinkOpenInNewTab" type="checkbox" class="jodit-checkbox"/>\n\t\t\t\t<span>${s("Open link in new tab")}</span>\n\t\t\t</label>\n\t\t</div>`)}function me(t){const e=t.o,s=t.i18n.bind(t),i=k.JO.get.bind(k.JO);return t.c.fromHTML(`<div style="${e.image.editMargins?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Margins")}</label>\n\t\t\t<div class="jodit-grid jodit_vertical_middle">\n\t\t\t\t<input class="jodit_col-lg-1-5 jodit-input" data-ref="marginTop" type="text" placeholder="${s("top")}"/>\n\t\t\t\t<a style="text-align: center;" data-ref="lockMargin" class="jodit-properties__lock jodit_col-lg-1-5">${i("lock")}</a>\n\t\t\t\t<input disabled="true" class="jodit_col-lg-1-5 jodit-input" data-ref="marginRight" type="text" placeholder="${s("right")}"/>\n\t\t\t\t<input disabled="true" class="jodit_col-lg-1-5 jodit-input" data-ref="marginBottom" type="text" placeholder="${s("bottom")}"/>\n\t\t\t\t<input disabled="true" class="jodit_col-lg-1-5 jodit-input" data-ref="marginLeft" type="text" placeholder="${s("left")}"/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div style="${e.image.editStyle?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Styles")}</label>\n\t\t\t<input data-ref="style" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editClass?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>${s("Classes")}</label>\n\t\t\t<input data-ref="classes" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div style="${e.image.editId?"":"display:none"}" class="jodit-form__group">\n\t\t\t<label>Id</label>\n\t\t\t<input data-ref="id" type="text" class="jodit-input"/>\n\t\t</div>\n\t\t<div\n\t\t\tstyle="${e.image.editBorderRadius?"":"display:none"}"\n\t\t\tclass="jodit-form__group"\n\t\t>\n\t\t\t<label>${s("Border radius")}</label>\n\t\t\t\t<input data-ref="borderRadius" type="number" class="jodit-input"/>\n\t\t</div>\n\t\t<div\n\t\t\tstyle="${e.image.editAlign?"":"display:none"}"\n\t\t\tclass="jodit-form__group"\n\t\t>\n\t\t\t<label>${s("Align")}</label>\n\t\t\t<select data-ref="align" class="jodit-select">\n\t\t\t\t<option value="">${s("--Not Set--")}</option>\n\t\t\t\t<option value="left">${s("Left")}</option>\n\t\t\t\t<option value="center">${s("Center")}</option>\n\t\t\t\t<option value="right">${s("Right")}</option>\n\t\t\t</select>\n\t\t</div>`)}r.D.prototype.iframeBaseUrl="",r.D.prototype.iframeTitle="Jodit Editor",r.D.prototype.iframeDoctype="<!DOCTYPE html>",r.D.prototype.iframeDefaultSrc="about:blank",r.D.prototype.iframeStyle='html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',r.D.prototype.iframeCSSLinks=[],r.D.prototype.editHTMLDocumentMode=!1;var ge=s(47);r.D.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0};const ve=t=>(t=(0,c.trim)(t),/^[0-9]+$/.test(t)?t+"px":t),be=t=>/^[-+]?[0-9.]+px$/.test(""+t)?parseFloat(""+t):t;class we extends H{constructor(){super(...arguments),this.state={image:new Image,get ratio(){return this.image.naturalWidth/this.image.naturalHeight||1},sizeIsLocked:!0,marginIsLocked:!0}}onChangeMarginIsLocked(){if(!this.form)return;const{marginRight:t,marginBottom:e,marginLeft:s,lockMargin:i}=(0,c.refs)(this.form);[t,e,s].forEach((t=>{(0,c.attr)(t,"disabled",this.state.marginIsLocked||null)})),i.innerHTML=k.JO.get(this.state.marginIsLocked?"lock":"unlock")}onChangeSizeIsLocked(){if(!this.form)return;const{lockSize:t,imageWidth:e}=(0,c.refs)(this.form);t.innerHTML=k.JO.get(this.state.sizeIsLocked?"lock":"unlock"),t.classList.remove("jodit-properties__lock"),t.classList.remove("jodit-properties__unlock"),t.classList.add(this.state.sizeIsLocked?"jodit-properties__lock":"jodit-properties__unlock"),this.j.e.fire(e,"change")}open(){return this.makeForm(),this.j.e.fire("hidePopup"),(0,c.markOwner)(this.j,this.dialog.container),this.state.marginIsLocked=!0,this.state.sizeIsLocked=!0,this.updateValues(),this.dialog.open().setModal(!0).setPosition(),!1}makeForm(){if(this.dialog)return;this.dialog=new R({fullsize:this.j.o.fullsize,globalFullSize:this.j.o.globalFullSize,theme:this.j.o.theme,language:this.j.o.language,minWidth:Math.min(400,screen.width),minHeight:400,buttons:["fullsize","dialog.close"]});const t=this.j,e=t.o,s=t.i18n.bind(t),i={check:(0,f.zx)(t,"ok","Apply"),remove:(0,f.zx)(t,"bin","Delete")};t.e.on(this.dialog,"afterClose",(()=>{this.state.image.parentNode&&e.image.selectImageAfterClose&&t.s.select(this.state.image)})),i.remove.onAction((()=>{t.s.removeNode(this.state.image),this.dialog.close()}));const{dialog:o}=this;o.setHeader(s("Image properties"));const n=(t=>{const{showPreview:e,editSize:s}=t.o.image,i=k.JO.get.bind(k.JO);return t.c.fromHTML(`<form class="jodit-properties">\n\t\t<div class="jodit-grid jodit-grid_xs-column">\n\t\t\t<div class="jodit_col-lg-2-5 jodit_col-xs-5-5">\n\t\t\t\t<div class="jodit-properties_view_box">\n\t\t\t\t\t<div style="${e?"":"display:none"}" class="jodit-properties_image_view">\n\t\t\t\t\t\t<img data-ref="imageViewSrc" src="" alt=""/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="${s?"":"display:none"}" class="jodit-form__group jodit-properties_image_sizes">\n\t\t\t\t\t\t<input data-ref="imageWidth" type="text" class="jodit-input"/>\n\t\t\t\t\t\t<a data-ref="lockSize" class="jodit-properties__lock">${i("lock")}</a>\n\t\t\t\t\t\t<input data-ref="imageHeight" type="text" class="imageHeight jodit-input"/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div data-ref="tabsBox" class="jodit_col-lg-3-5 jodit_col-xs-5-5"></div>\n\t\t</div>\n\t</form>`)})(t);this.form=n,o.setContent(n);const{tabsBox:r}=(0,c.refs)(this.form);r&&r.appendChild((0,te.IL)(t,[{name:"Image",content:fe(t)},{name:"Advanced",content:me(t)}])),i.check.onAction(this.onApply);const{changeImage:a,editImage:l}=(0,c.refs)(this.form);t.e.on(a,"click",this.openImagePopup),e.image.useImageEditor&&t.e.on(l,"click",this.openImageEditor);const{lockSize:h,lockMargin:d,imageWidth:u,imageHeight:p}=(0,c.refs)(n);h&&t.e.on(h,"click",(()=>{this.state.sizeIsLocked=!this.state.sizeIsLocked})),t.e.on(d,"click",(t=>{this.state.marginIsLocked=!this.state.marginIsLocked,t.preventDefault()}));const m=t=>{if(!(0,c.isNumeric)(u.value)||!(0,c.isNumeric)(p.value))return;const e=parseFloat(u.value),s=parseFloat(p.value);t.target===u?p.value=""+Math.round(e/this.state.ratio):u.value=""+Math.round(s*this.state.ratio)};t.e.on([u,p],"change keydown mousedown paste",(e=>{this.state.sizeIsLocked&&t.async.setTimeout(m.bind(this,e),{timeout:t.defaultTimeout,label:"image-properties-changeSize"})})),o.setFooter([i.remove,i.check]),o.setSize(this.j.o.image.dialogWidth)}updateValues(){const t=this.j.o,{image:e}=this.state,{marginTop:s,marginRight:i,marginBottom:o,marginLeft:n,lockMargin:r,imageSrc:a,id:l,classes:h,align:d,style:u,imageTitle:p,imageAlt:f,borderRadius:m,imageLink:g,imageWidth:v,imageHeight:b,imageLinkOpenInNewTab:w,imageViewSrc:y,lockSize:C}=(0,c.refs)(this.form);(()=>{r.checked=this.state.marginIsLocked,C.checked=this.state.sizeIsLocked})(),a.value=(0,c.attr)(e,"src")||"",y&&(0,c.attr)(y,"src",(0,c.attr)(e,"src")||""),(()=>{p.value=(0,c.attr)(e,"title")||"",f.value=(0,c.attr)(e,"alt")||"";const t=_.i.closest(e,"a",this.j.editor);t?(g.value=(0,c.attr)(t,"href")||"",w.checked="_blank"===(0,c.attr)(t,"target")):(g.value="",w.checked=!1)})(),(()=>{const t=(0,c.attr)(e,"width")||(0,c.css)(e,"width",!0)||!1,s=(0,c.attr)(e,"height")||(0,c.css)(e,"height",!0)||!1;v.value=!1!==t?""+be(t):""+e.offsetWidth,b.value=!1!==s?""+be(s):""+e.offsetHeight,this.state.sizeIsLocked=(()=>!(!(0,c.isNumeric)(v.value)||!(0,c.isNumeric)(b.value))&&1>Math.abs(parseFloat(v.value)-parseFloat(b.value)*this.state.ratio))()})(),(()=>{if(!t.image.editMargins)return;let r=!0,a=!1;[s,i,o,n].forEach((t=>{const i=(0,c.attr)(t,"data-ref")||"";let o=e.style.getPropertyValue((0,c.kebabCase)(i));if(!o)return a=!0,void(t.value="");/^[0-9]+(px)?$/.test(o)&&(o=parseInt(o,10)),t.value=""+o||"",(a&&t.value||r&&"marginTop"!==i&&t.value!==s.value)&&(r=!1)})),this.state.marginIsLocked=r})(),h.value=((0,c.attr)(e,"class")||"").replace(/jodit_focused_image[\s]*/,""),l.value=(0,c.attr)(e,"id")||"",m.value=""+(parseInt(e.style.borderRadius||"0",10)||"0"),e.style.cssFloat&&-1!==["left","right"].indexOf(e.style.cssFloat.toLowerCase())?d.value=(0,c.css)(e,"float"):"block"===(0,c.css)(e,"display")&&"auto"===e.style.marginLeft&&"auto"===e.style.marginRight&&(d.value="center"),u.value=(0,c.attr)(e,"style")||""}onApply(){const{style:t,imageSrc:e,borderRadius:s,imageTitle:i,imageAlt:o,imageLink:n,imageWidth:r,imageHeight:a,marginTop:l,marginRight:h,marginBottom:d,marginLeft:u,imageLinkOpenInNewTab:p,align:f,classes:m,id:g}=(0,c.refs)(this.form),v=this.j.o,{image:b}=this.state;if(v.image.editStyle&&(0,c.attr)(b,"style",t.value||null),!e.value)return _.i.safeRemove(b),void this.dialog.close();(0,c.attr)(b,"src",e.value),b.style.borderRadius="0"!==s.value&&/^[0-9]+$/.test(s.value)?s.value+"px":"",(0,c.attr)(b,"title",i.value||null),(0,c.attr)(b,"alt",o.value||null);let w=_.i.closest(b,"a",this.j.editor);if(n.value?(w||(w=_.i.wrap(b,"a",this.j.createInside)),(0,c.attr)(w,"href",n.value),(0,c.attr)(w,"target",p.checked?"_blank":null)):w&&w.parentNode&&w.parentNode.replaceChild(b,w),r.value!==""+b.offsetWidth||a.value!==""+b.offsetHeight){const t=(0,c.trim)(r.value)?ve(r.value):null,e=(0,c.trim)(a.value)?ve(a.value):null;(0,c.css)(b,{width:t,height:e}),(0,c.attr)(b,"width",(0,c.attr)(b,"width")?t:null),(0,c.attr)(b,"height",(0,c.attr)(b,"height")?e:null)}const y=[l,h,d,u];v.image.editMargins&&(this.state.marginIsLocked?(0,c.css)(b,"margin",ve(l.value)):y.forEach((t=>{const e=(0,c.attr)(t,"data-ref")||"";(0,c.css)(b,e,ve(t.value))}))),v.image.editClass&&(0,c.attr)(b,"class",m.value||null),v.image.editId&&(0,c.attr)(b,"id",g.value||null),v.image.editAlign&&(0,ge.z)(b,f.value),this.j.setEditorValue(),this.dialog.close()}openImageEditor(){const t=(0,c.attr)(this.state.image,"src")||"",e=this.j.c.element("a"),s=()=>{e.host===location.host||O(this.j.i18n("You can only edit your own images. Download this image on the host?"),(t=>{t&&this.j.uploader&&this.j.uploader.uploadRemoteImage(""+e.href,(t=>{A(this.j.i18n("The image has been successfully uploaded to the host!"),(()=>{(0,c.isString)(t.newfilename)&&((0,c.attr)(this.state.image,"src",t.baseurl+t.newfilename),this.updateValues())})).bindDestruct(this.j)}),(t=>{A(this.j.i18n("There was an error loading %s",t.message)).bindDestruct(this.j)}))})).bindDestruct(this.j)};e.href=t,this.j.filebrowser.dataProvider.getPathByUrl(""+e.href).then((s=>{nt.call(this.j.filebrowser,e.href,s.name,s.path,s.source,(()=>{const e=(new Date).getTime();(0,c.attr)(this.state.image,"src",t+(-1!==t.indexOf("?")?"":"?")+"&_tmp="+e),this.updateValues()}),(t=>{A(t.message).bindDestruct(this.j)}))})).catch((t=>{A(t.message,s).bindDestruct(this.j)}))}openImagePopup(t){const e=new k.GI(this.j),{changeImage:s}=(0,c.refs)(this.form);e.setZIndex(this.dialog.getZIndex()+1),e.setContent((0,te.ov)(this.j,{upload:t=>{t.files&&t.files.length&&(0,c.attr)(this.state.image,"src",t.baseurl+t.files[0]),this.updateValues(),e.close()},filebrowser:t=>{t&&(0,c.isArray)(t.files)&&t.files.length&&((0,c.attr)(this.state.image,"src",t.files[0]),e.close(),this.updateValues())}},this.state.image,e.close)).open((()=>(0,c.position)(s))),t.stopPropagation()}afterInit(t){const e=this;t.e.on("afterConstructor changePlace",(()=>{t.e.off(t.editor,".imageproperties").on(t.editor,"dblclick.imageproperties",(s=>{const i=s.target;_.i.isTag(i,"img")&&(t.o.image.openOnDblClick?(e.state.image=i,t.o.readonly||(s.stopImmediatePropagation(),s.preventDefault(),e.open())):(s.stopImmediatePropagation(),t.s.select(i)))}))})).on("openImageProperties.imageproperties",(t=>{this.state.image=t,this.open()}))}beforeDestruct(t){this.dialog&&this.dialog.destruct(),t.e.off(t.editor,".imageproperties").off(".imageproperties")}}function ye(t){t.e.on("change afterInit changePlace",t.async.debounce((()=>{t.editor&&(0,c.$$)("img",t.editor).forEach((e=>{e.__jodit_imageprocessor_binded||(e.__jodit_imageprocessor_binded=!0,e.complete||e.addEventListener("load",(function s(){var i;!t.isInDestruct&&(null===(i=t.e)||void 0===i||i.fire("resize")),e.removeEventListener("load",s)})),t.e.on(e,"mousedown touchstart",(()=>{t.s.select(e)})))}))}),t.defaultTimeout))}function Ce(t){t.registerButton({name:"image",group:"media"})}(0,n.gn)([(0,x.watch)("state.marginIsLocked")],we.prototype,"onChangeMarginIsLocked",null),(0,n.gn)([(0,x.watch)("state.sizeIsLocked")],we.prototype,"onChangeSizeIsLocked",null),(0,n.gn)([x.autobind],we.prototype,"onApply",null),(0,n.gn)([x.autobind],we.prototype,"openImageEditor",null),(0,n.gn)([x.autobind],we.prototype,"openImagePopup",null),r.D.prototype.controls.image={popup(t,e,s,i){let o=null;return e&&!_.i.isText(e)&&_.i.isHTMLElement(e)&&(_.i.isTag(e,"img")||(0,c.$$)("img",e).length)&&(o=_.i.isTag(e,"img")?e:(0,c.$$)("img",e)[0]),t.s.save(),(0,te.ov)(t,{filebrowser(e){t.s.restore(),e.files&&e.files.forEach((s=>t.s.insertImage(e.baseurl+s,null,t.o.imageDefaultWidth))),i()},upload:!0,async url(e,s){t.s.restore();const n=o||t.createInside.element("img");n.setAttribute("src",e),n.setAttribute("alt",s),o||await t.s.insertImage(n,null,t.o.imageDefaultWidth),i()}},o,i)},tags:["img"],tooltip:"Insert Image"},r.D.prototype.controls.indent={tooltip:"Increase Indent"};const je=t=>"rtl"===t?"marginRight":"marginLeft";function xe(t){const e=je(t.o.direction);t.registerButton({name:"indent",group:"indent"}).registerButton({name:"outdent",group:"indent"});const s=s=>{const i=[];return t.s.eachSelection((o=>{t.s.save();let n=!!o&&_.i.up(o,_.i.isBlock,t.editor);const r=t.o.enter;if(!n&&o&&(n=_.i.wrapInline(o,r!==a.BR?r:a.PARAGRAPH,t)),!n)return t.s.restore(),!1;const l=-1!==i.indexOf(n);if(n&&n.style&&!l){i.push(n);let o=n.style[e]?parseInt(n.style[e],10):0;o+=t.o.indentMargin*("outdent"===s?-1:1),n.style[e]=o>0?o+"px":"",(0,c.attr)(n,"style")||n.removeAttribute("style")}t.s.restore()})),t.setEditorValue(),!1};t.registerCommand("indent",{exec:s,hotkeys:["ctrl+]","cmd+]"]}),t.registerCommand("outdent",{exec:s,hotkeys:["ctrl+[","cmd+["]})}function Ee(t){t.registerButton({name:"hr",group:"insert"}),t.registerCommand("insertHorizontalRule",(()=>{const e=t.createInside.element("hr");t.s.insertNode(e,!1,!1);const s=_.i.closest(e.parentElement,_.i.isBlock,t.editor);s&&_.i.isEmpty(s)&&s!==t.editor&&(_.i.after(s,e),_.i.safeRemove(s));let i=_.i.next(e,_.i.isBlock,t.editor,!1);return i||(i=t.createInside.element(t.o.enter),_.i.after(e,i)),t.s.setCursorIn(i),!1}))}r.D.prototype.controls.outdent={isDisabled(t){const e=t.s.current();if(e){const s=_.i.closest(e,_.i.isBlock,t.editor),i=je(t.o.direction);if(s&&s.style&&s.style[i])return 0>=parseInt(s.style[i],10)}return!0},tooltip:"Decrease Indent"},r.D.prototype.indentMargin=10,r.D.prototype.controls.hr={command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},r.D.prototype.toolbarInline=!0,r.D.prototype.toolbarInlineForSelection=!1,r.D.prototype.toolbarInlineDisableFor=[],r.D.prototype.toolbarInlineDisabledButtons=["source"],r.D.prototype.popup={a:s(48).Z,img:s(49).Z,cells:s(50).Z,jodit:s(51).Z,"jodit-media":s(51).Z,selection:["bold","underline","italic","ul","ol","\n","outdent","indent","fontsize","brush","cut","\n","paragraph","link","align","dots"]};class Se extends H{constructor(){super(...arguments),this.requires=["select"],this.type=null,this.popup=new p.G(this.jodit,!1),this.toolbar=M(this.jodit,this.popup),this.snapRange=null,this.elmsList=(0,c.keys)(this.j.o.popup,!1).filter((t=>!this.isExcludedTarget(t)))}onClick(t){const e=this.elmsList,s=_.i.isTag(t,"img")?t:_.i.closest(t,e,this.j.editor);if(s&&this.canShowPopupForType(s.nodeName.toLowerCase()))return this.showPopup((()=>(0,c.position)(s,this.j)),s.nodeName.toLowerCase(),s),!1}showPopup(t,e,s){if(e=e.toLowerCase(),!this.canShowPopupForType(e))return!1;if(this.type!==e||s!==this.previousTarget){this.previousTarget=s;const t=this.j.o.popup[e];let i;i=(0,c.isFunction)(t)?t(this.j,s,this.popup.close):t,(0,c.isArray)(i)&&(this.toolbar.build(i,s),this.toolbar.buttonSize=this.j.o.toolbarButtonSize,i=this.toolbar.container),this.popup.setContent(i),this.type=e}return this.popup.open(t),!0}hidePopup(t){(0,c.isString)(t)&&t!==this.type||this.popup.close()}onOutsideClick(){this.popup.close()}canShowPopupForType(t){const e=this.j.o.popup[t.toLowerCase()];return!(this.j.o.readonly||!this.j.o.toolbarInline||!e||this.isExcludedTarget(t))}isExcludedTarget(t){return(0,c.splitArray)(this.j.o.toolbarInlineDisableFor).map((t=>t.toLowerCase())).includes(t.toLowerCase())}afterInit(t){this.j.e.on("getDiffButtons.mobile",(e=>{if(this.toolbar===e){const e=this.toolbar.getButtonsNames();return(0,c.toArray)(t.registeredButtons).filter((t=>!this.j.o.toolbarInlineDisabledButtons.includes(t.name))).filter((t=>{const s=(0,c.isString)(t)?t:t.name;return s&&"|"!==s&&"\n"!==s&&!e.includes(s)}))}})).on("hidePopup",this.hidePopup).on("showPopup",((t,e,s)=>{this.showPopup(e,s||((0,c.isString)(t)?t:t.nodeName),(0,c.isString)(t)?void 0:t)})).on("mousedown keydown",this.onSelectionStart).on("change",(()=>{this.popup.isOpened&&this.previousTarget&&!this.previousTarget.parentNode&&(this.hidePopup(),this.previousTarget=void 0)})).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.addListenersForElements()}onSelectionStart(){this.snapRange=this.j.s.range.cloneRange()}onSelectionEnd(t){if(t&&t.target&&k.u1.closestElement(t.target,p.G))return;const{snapRange:e}=this,{range:s}=this.j.s;e&&!s.collapsed&&s.startContainer===e.startContainer&&s.startOffset===e.startOffset&&s.endContainer===e.endContainer&&s.endOffset===e.endOffset||this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;const t="selection",e=this.j.s.sel,s=this.j.s.range;(null==e?void 0:e.isCollapsed)||this.isSelectedTarget(s)||this.tableModule.getAllSelectedCells().length?this.type===t&&this.popup.isOpened&&this.hidePopup():this.j.s.current()&&this.showPopup((()=>s.getBoundingClientRect()),t)}isSelectedTarget(t){const e=t.startContainer;return _.i.isElement(e)&&e===t.endContainer&&_.i.isTag(e.childNodes[t.startOffset],(0,c.keys)(this.j.o.popup,!1))&&t.startOffset===t.endOffset-1}get tableModule(){return this.j.getInstance("Table",this.j.o)}beforeDestruct(t){t.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd),this.removeListenersForElements()}addListenersForElements(){this.j.e.on(this.elmsList.map((t=>(0,c.camelCase)("click_"+t))).join(" "),this.onClick)}removeListenersForElements(){this.j.e.off(this.elmsList.map((t=>(0,c.camelCase)("click_"+t))).join(" "),this.onClick)}}(0,n.gn)([x.autobind],Se.prototype,"onClick",null),(0,n.gn)([(0,x.wait)((t=>!t.j.isLocked))],Se.prototype,"showPopup",null),(0,n.gn)([(0,x.watch)(":clickEditor"),x.autobind],Se.prototype,"hidePopup",null),(0,n.gn)([(0,x.watch)(":outsideClick")],Se.prototype,"onOutsideClick",null),(0,n.gn)([x.autobind],Se.prototype,"onSelectionStart",null),(0,n.gn)([x.autobind],Se.prototype,"onSelectionEnd",null),(0,n.gn)([(0,x.debounce)((t=>t.defaultTimeout))],Se.prototype,"onSelectionChange",null),r.D.prototype.controls.align={name:"left",tooltip:"Align",update(t){const e=t.j,s=t.control,i=e.s.current();if(i){const o=_.i.closest(i,_.i.isBlock,e.editor)||e.editor;let n=""+(0,c.css)(o,"text-align");s.defaultValue&&-1!==s.defaultValue.indexOf(n)&&(n="left"),s.data&&s.data.currentValue!==n&&s.list&&-1!==s.list.indexOf(n)&&(e.o.textIcons?t.state.text=n:t.state.icon.name=n,s.data.currentValue=n)}},isActive(t,e){const s=t.s.current();if(s&&e.defaultValue){const i=_.i.closest(s,_.i.isBlock,t.editor)||t.editor;return-1===e.defaultValue.indexOf(""+(0,c.css)(i,"text-align"))}return!1},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},r.D.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},r.D.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},r.D.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},r.D.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"};const _e=(t,e)=>{if(_.i.isNode(e)&&_.i.isElement(e))switch(_.i.each(e,(t=>{_.i.isHTMLElement(t)&&t.style.textAlign&&(t.style.textAlign="",t.style.cssText.trim().length||t.removeAttribute("style"))})),t.toLowerCase()){case"justifyfull":e.style.textAlign="justify";break;case"justifyright":e.style.textAlign="right";break;case"justifyleft":e.style.textAlign="left";break;case"justifycenter":e.style.textAlign="center"}};function ke(t){t.registerButton({name:"align",group:"indent"});const e=e=>(t.s.focus(),t.s.eachSelection((s=>{if(!s)return;let i=_.i.up(s,_.i.isBlock,t.editor);i||(i=_.i.wrapInline(s,t.o.enterBlock,t)),_e(e,i)})),!1);t.registerCommand("justifyfull",e),t.registerCommand("justifyright",e),t.registerCommand("justifyleft",e),t.registerCommand("justifycenter",e)}r.D.prototype.limitWords=!1,r.D.prototype.limitChars=!1,r.D.prototype.limitHTML=!1;class Te extends H{afterInit(t){const{limitWords:e,limitChars:s}=t.o;if(t&&(e||s)){let e=null;t.e.off(".limit").on("beforePaste.limit",(()=>{e=t.observer.snapshot.make()})).on("keydown.limit keyup.limit beforeEnter.limit beforePaste.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",(()=>{if(this.shouldPreventInsertHTML()&&e)return t.observer.snapshot.restore(e),!1}))}}shouldPreventInsertHTML(t=null,e=""){if(t&&a.COMMAND_KEYS.includes(t.key))return!1;const{jodit:s}=this,{limitWords:i,limitChars:o}=s.o,n=this.splitWords(e||(s.o.limitHTML?s.value:s.text));return!(!i||i>n.length)||!!o&&n.join("").length>=o}checkPreventKeyPressOrPaste(t){if(this.shouldPreventInsertHTML(t))return!1}checkPreventChanging(t,e){const{jodit:s}=this,{limitWords:i,limitChars:o}=s.o,n=s.o.limitHTML?t:(0,c.stripTags)(t),r=this.splitWords(n);(i&&r.length>i||o&&r.join("").length>o)&&(s.value=e)}splitWords(t){return t.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),"").split((0,a.SPACE_REG_EXP)()).filter((t=>t.length))}beforeDestruct(t){t.e.off(".limit")}}(0,n.gn)([x.autobind],Te.prototype,"checkPreventKeyPressOrPaste",null),(0,n.gn)([x.autobind],Te.prototype,"checkPreventChanging",null);var Ie=s(43);r.D.prototype.link={formTemplate(t){const{openInNewTabCheckbox:e,noFollowCheckbox:s,modeClassName:i,selectSizeClassName:o,selectMultipleClassName:n,selectOptionsClassName:r}=t.o.link;return new Ie.x4(t,[new Ie.eC(t,[new Ie.u3(t,{name:"url",type:"text",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),new Ie.eC(t,[new Ie.u3(t,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),i?new Ie.eC(t,["input"===i?new Ie.u3(t,{name:"className",ref:"className_input",label:"Class name"}):"select"===i?new Ie.Cj(t,{name:"className",ref:"className_select",label:"Class name",size:o,multiple:n,options:r}):null]):null,e?new Ie.mA(t,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,s?new Ie.mA(t,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new Ie.eC(t,[new f.y3(t,{name:"unlink",status:"default",text:"Unlink"}),new f.y3(t,{name:"insert",type:"submit",status:"primary",text:"Insert"})],{align:"full"})])},followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,noFollowCheckbox:!0,openInNewTabCheckbox:!0,modeClassName:"input",selectMultipleClassName:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},r.D.prototype.controls.unlink={exec(t,e){const s=_.i.closest(e,"a",t.editor);s&&_.i.unwrap(s),t.setEditorValue(),t.e.fire("hidePopup")},tooltip:"Unlink"},r.D.prototype.controls.link={isActive(t){const e=t.s.current();return!(!e||!_.i.closest(e,"a",t.editor))},popup:(t,e,s,i)=>t.e.fire("generateLinkForm.link",e,i),tags:["a"],tooltip:"Insert link"};class qe extends H{constructor(){super(...arguments),this.buttons=[{name:"link",group:"insert"}]}afterInit(t){t.o.link.followOnDblClick&&t.e.on("dblclick.link",this.onDblClickOnLink),t.o.link.processPastedLink&&t.e.on("processPaste.link",this.onProcessPasteLink),t.e.on("generateLinkForm.link",this.generateForm),t.registerCommand("openLinkDialog",{exec:()=>{const e=new R({resizable:!1}),s=this.generateForm(t.s.current(),(()=>{e.close()}));s.container.classList.add("jodit-dialog_alert"),e.setContent(s),e.open(),t.async.requestIdleCallback((()=>{const{url_input:t}=(0,c.refs)(s.container);null==t||t.focus()}))},hotkeys:t.o.link.hotkeys})}onDblClickOnLink(t){if(!_.i.isTag(t.target,"a"))return;const e=(0,c.attr)(t.target,"href");e&&(location.href=e,t.preventDefault())}onProcessPasteLink(t,e){const{jodit:s}=this;if((0,c.isURL)(e)){if(s.o.link.processVideoLink){const t=(0,c.convertMediaUrlToVideoEmbed)(e);if(t!==e)return s.e.stopPropagation("processPaste"),s.createInside.fromHTML(t)}const t=s.createInside.element("a");return t.setAttribute("href",e),t.textContent=e,s.e.stopPropagation("processPaste"),t}}generateForm(t,e){const{jodit:s}=this,i=s.i18n.bind(s),{openInNewTabCheckbox:o,noFollowCheckbox:n,formTemplate:r,formClassName:a,modeClassName:l}=s.o.link,h=r(s),d=(0,c.isString)(h)?s.c.fromHTML(h,{target_checkbox_box:o,nofollow_checkbox_box:n}):h,u=_.i.isElement(d)?d:d.container,p=(0,c.refs)(u),{insert:f,unlink:m,content_input_box:g}=p,{target_checkbox:v,nofollow_checkbox:b,url_input:w}=p,y=_.i.isImage(t);let{content_input:C}=p;const{className_input:j}=p,{className_select:x}=p;let E;C||(C=s.c.element("input",{type:"hidden",ref:"content_input"})),a&&u.classList.add(a),y&&_.i.hide(g);const S=()=>E?E.innerText:(0,c.stripTags)(s.s.range.cloneContents(),s.ed);if(E=!(!t||!_.i.closest(t,"a",s.editor))&&_.i.closest(t,"a",s.editor),!y&&t&&(C.value=S()),E){if(w.value=(0,c.attr)(E,"href")||"",l)switch(l){case"input":j&&(j.value=(0,c.attr)(E,"class")||"");break;case"select":if(x){for(let t=0;x.selectedOptions.length>t;t++){const e=x.options.item(t);e&&(e.selected=!1)}((0,c.attr)(E,"class")||"").split(" ").forEach((t=>{if(t)for(let e=0;x.options.length>e;e++){const s=x.options.item(e);(null==s?void 0:s.value)&&s.value===t&&(s.selected=!0)}}))}}o&&v&&(v.checked="_blank"===(0,c.attr)(E,"target")),n&&b&&(b.checked="nofollow"===(0,c.attr)(E,"rel")),f.textContent=i("Update")}else _.i.hide(m);s.editor.normalize();const k=s.observer.snapshot.make();m&&s.e.on(m,"click",(t=>{s.s.restore(),s.observer.snapshot.restore(k),E&&_.i.unwrap(E),s.setEditorValue(),e(),t.preventDefault()}));const T=()=>{if(!w.value.trim().length)return w.focus(),w.classList.add("jodit_error"),!1;let t;s.s.restore(),s.s.removeMarkers(),s.editor.normalize(),s.observer.snapshot.restore(k);const i=S()!==C.value.trim(),r=s.createInside;if(E)t=[E];else{if(s.s.isCollapsed()){const e=r.element("a");s.s.insertNode(e,!1,!1),t=[e]}else{const e=s.s.current();t=_.i.isTag(e,["img"])?[_.i.wrap(e,"a",r)]:s.s.wrapInTag("a")}t.forEach((t=>s.s.select(t)))}return t.forEach((t=>{var e;if((0,c.attr)(t,"href",w.value),l&&(null!=j?j:x))if("input"===l)""===j.value&&t.hasAttribute("class")&&(0,c.attr)(t,"class",null),""!==j.value&&(0,c.attr)(t,"class",j.value);else if("select"===l){t.hasAttribute("class")&&(0,c.attr)(t,"class",null);for(let s=0;x.selectedOptions.length>s;s++){const i=null===(e=x.selectedOptions.item(s))||void 0===e?void 0:e.value;i&&t.classList.add(i)}}if(!y){let e=t.textContent;C.value.trim().length?i&&(e=C.value):e=w.value,e!==t.textContent&&(t.textContent=e)}o&&v&&(0,c.attr)(t,"target",v.checked?"_blank":null),n&&b&&(0,c.attr)(t,"rel",b.checked?"nofollow":null)})),s.setEditorValue(),e(),!1};return _.i.isElement(d)?s.e.on(d,"submit",(t=>(t.preventDefault(),t.stopImmediatePropagation(),T(),!1))):d.onSubmit(T),d}beforeDestruct(t){t.e.off("generateLinkForm.link",this.generateForm).off("dblclick.link",this.onDblClickOnLink).off("processPaste.link",this.onProcessPasteLink)}}function Le(t){const e="jodit_fake_wrapper",{mediaFakeTag:s,mediaBlocks:i,mediaInFakeBlock:o}=t.options;o&&t.e.on("afterGetValueFromEditor",(t=>{const i=RegExp(`<${s}[^>]+data-${e}[^>]+>(.+?)</${s}>`,"ig");i.test(t.value)&&(t.value=t.value.replace(i,"$1"))})).on("change afterInit afterSetMode changePlace",t.async.debounce((()=>{t.isDestructed||t.getMode()===a.MODE_SOURCE||(0,c.$$)(i.join(","),t.editor).forEach((i=>{(0,c.dataBind)(i,e)||((0,c.dataBind)(i,e,!0),(i=>{if(i.parentNode&&(0,c.attr)(i.parentNode,"data-jodit_iframe_wrapper"))i=i.parentNode;else{const o=t.createInside.fromHTML(`<${s} data-jodit-temp="1" contenteditable="false" draggable="true" data-${e}="1"></${s}>`);(0,c.attr)(o,"style",(0,c.attr)(i,"style")),o.style.display="inline-block"===i.style.display?"inline-block":"block",o.style.width=i.offsetWidth+"px",o.style.height=i.offsetHeight+"px",i.parentNode&&i.parentNode.insertBefore(o,i),o.appendChild(i),i=o}t.e.off(i,"mousedown.select touchstart.select").on(i,"mousedown.select touchstart.select",(()=>{t.s.setCursorAfter(i)}))})(i))}))}),t.defaultTimeout))}function ze(t){t.registerButton({name:"video",group:"media"})}function Me(t){t.registerButton({name:"file",group:"media"})}function Pe(t){let e=0,s=(0,c.splitArray)(t.o.buttons);t.o.mobileTapTimeout&&t.e.on("touchend",(s=>{if(s.changedTouches&&s.changedTouches.length){const i=(new Date).getTime(),o=i-e;o>t.o.mobileTapTimeout&&(e=i,1.5*t.o.mobileTapTimeout>o&&t.s.insertCursorAtPoint(s.changedTouches[0].clientX,s.changedTouches[0].clientY))}})),t.e.on("getDiffButtons.mobile",(e=>{if(e===t.toolbar){const e=(0,c.splitArray)(t.o.buttons),i=(0,D.q)(s);return e.reduce(((t,e)=>((0,D.A)(e)?t.push({...e,buttons:e.buttons.filter((t=>!i.has(t)))}):i.has(e)||t.push(e),t)),[])}})),t.o.toolbarAdaptive&&t.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",(()=>{if(!t.o.toolbar)return;const e=t.container.offsetWidth,i=(0,c.splitArray)(t.o.sizeLG>e?t.o.sizeMD>e?t.o.sizeSM>e?t.o.buttonsXS:t.o.buttonsSM:t.o.buttonsMD:t.o.buttons);""+i!=""+s&&(s=i,t.e.fire("closeAllPopups"),t.toolbar.setRemoveButtons(t.o.removeButtons).build(s.concat(t.o.extraButtons)))})).on(t.ow,"load",(()=>t.e.fire("recalcAdaptive")))}(0,n.gn)([x.autobind],qe.prototype,"onDblClickOnLink",null),(0,n.gn)([x.autobind],qe.prototype,"onProcessPasteLink",null),(0,n.gn)([x.autobind],qe.prototype,"generateForm",null),r.D.prototype.mediaFakeTag="jodit-media",r.D.prototype.mediaInFakeBlock=!0,r.D.prototype.mediaBlocks=["video","audio"],r.D.prototype.controls.video={popup(t,e,s,i){const o=new Ie.x4(t,[new Ie.eC(t,[new Ie.u3(t,{name:"url",required:!0,label:"URL",placeholder:"https://",validators:["url"]})]),new Ie.eC(t,[(0,f.zx)(t,"","Insert","primary").onAction((()=>o.submit()))])]),n=new Ie.x4(t,[new Ie.eC(t,[new Ie.GJ(t,{name:"code",required:!0,label:"Embed code"})]),new Ie.eC(t,[(0,f.zx)(t,"","Insert","primary").onAction((()=>n.submit()))])]),r=[],a=e=>{t.s.restore(),t.s.insertHTML(e),i()};return t.s.save(),r.push({icon:"link",name:"Link",content:o.container},{icon:"source",name:"Code",content:n.container}),o.onSubmit((t=>{a((0,c.convertMediaUrlToVideoEmbed)(t.url))})),n.onSubmit((t=>{a(t.code)})),(0,te.IL)(t,r)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"},r.D.prototype.controls.file={popup(t,e,s,i){const o=(e,s="")=>{t.s.insertNode(t.createInside.fromHTML(`<a href="${e}" title="${s}">${s||e}</a>`))};let n=null;return e&&(_.i.isTag(e,"a")||_.i.closest(e,"a",t.editor))&&(n=_.i.isTag(e,"a")?e:_.i.closest(e,"a",t.editor)),(0,te.ov)(t,{filebrowser(t){t.files&&t.files.forEach((e=>o(t.baseurl+e))),i()},upload:!0,url(t,e){n?(n.setAttribute("href",t),n.setAttribute("title",e)):o(t,e),i()}},n,i,!1)},tags:["a"],tooltip:"Insert file"},r.D.prototype.mobileTapTimeout=300,r.D.prototype.toolbarAdaptive=!0,r.D.prototype.controls.dots={mode:a.MODE_SOURCE+a.MODE_WYSIWYG,popup(t,e,s,i,o){let n=s.data;return void 0===n&&(n={toolbar:M(t),rebuild(){var e;if(o){const s=t.e.fire("getDiffButtons.mobile",o.closest(k.bz));if(s&&n){n.toolbar.build((0,c.splitArray)(s));const i=(null===(e=t.toolbar.firstButton)||void 0===e?void 0:e.container.offsetWidth)||36;n.toolbar.container.style.width=3*(i+4)+"px"}}}},s.data=n),n.rebuild(),n.toolbar},tooltip:"Show all"};const De=(t,e,{control:s})=>{const i="button"+s.command,o=s.args&&s.args[0]||(0,c.dataBind)(t,i);(0,c.dataBind)(t,i,o),t.execCommand(s.command,!1,o)};function Ne(t){const e=t=>/insert(un)?orderedlist/i.test(t),s=()=>_.i.up(t.s.current(),(t=>t&&/^UL|OL$/i.test(t.nodeName)),t.editor),i=(t,e)=>{"default"!==e&&e?t.style.setProperty("list-style-type",e):t.style.removeProperty("list-style-type")};t.e.on("beforeCommand",((t,o,n)=>{if(e(t)&&n){const e=s();if(e&&!((t,e)=>{const s=t.style.listStyleType;return s===e||!s&&"default"===e})(e,n)&&(_.i.isTag(e,"ul")&&/unordered/i.test(t)||_.i.isTag(e,"ol")&&!/unordered/i.test(t)))return i(e,n),!1}})).on("afterCommand",((o,n,r)=>{if(e(o)){const e=s();e&&(i(e,r),t.createInside.applyCreateAttributes(e),e.querySelectorAll("li").forEach((e=>{t.createInside.applyCreateAttributes(e)})));const o=[],n=t=>{_.i.isTag(t,["p","h1","h2","h3","h4","h5","h6"])&&o.push(t)};e&&(n(e.parentNode),e.querySelectorAll("li").forEach((t=>n(t.firstChild))),o.length&&(t.s.save(),(0,c.toArray)(e.childNodes).forEach((t=>{_.i.isTag(t.lastChild,"br")&&_.i.safeRemove(t.lastChild)})),o.forEach((t=>_.i.unwrap(t))),t.s.restore())),t.setEditorValue()}}))}r.D.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:De},r.D.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},exec:De},r.D.prototype.showPlaceholder=!0,r.D.prototype.useInputsPlaceholder=!0,r.D.prototype.placeholder="Type something";class Re extends H{constructor(){super(...arguments),this.addNativeListeners=()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)},this.addEvents=()=>{const t=this.j;t.o.useInputsPlaceholder&&t.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,c.attr)(t.element,"placeholder")||""),t.e.fire("placeholder",this.placeholderElm.innerHTML),t.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()}}afterInit(t){t.o.showPlaceholder&&(this.placeholderElm=t.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${t.i18n(t.o.placeholder)}</span>`),"rtl"===t.o.direction&&(this.placeholderElm.style.right="0px",this.placeholderElm.style.direction="rtl"),t.e.on("readonly",(t=>{t?this.hide():this.toggle()})).on("changePlace",this.addEvents),this.addEvents())}show(){const t=this.j;if(t.o.readonly)return;let e=0,s=0;const i=t.s.current(),o=i&&_.i.closest(i,_.i.isBlock,t.editor)||t.editor,n=t.ew.getComputedStyle(o);if(t.workplace.appendChild(this.placeholderElm),_.i.isElement(t.editor.firstChild)){const i=t.ew.getComputedStyle(t.editor.firstChild);e=parseInt(i.getPropertyValue("margin-top"),10),s=parseInt(i.getPropertyValue("margin-left"),10),this.placeholderElm.style.fontSize=parseInt(i.getPropertyValue("font-size"),10)+"px",this.placeholderElm.style.lineHeight=i.getPropertyValue("line-height")}else this.placeholderElm.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",this.placeholderElm.style.lineHeight=n.getPropertyValue("line-height");(0,c.css)(this.placeholderElm,{display:"block",textAlign:n.getPropertyValue("text-align"),marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),e),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),s)})}hide(){_.i.safeRemove(this.placeholderElm)}toggle(){const t=this.j;t.editor&&!t.isInDestruct&&(t.getRealMode()===a.MODE_WYSIWYG&&(t=>{if(!t.firstChild)return!0;const e=t.firstChild;if(a.MAY_BE_REMOVED_WITH_KEY.test(e.nodeName)||/^(TABLE)$/i.test(e.nodeName))return!1;const s=_.i.next(e,(t=>t&&!_.i.isEmptyTextNode(t)),t);return _.i.isText(e)&&!s?_.i.isEmptyTextNode(e):!s&&_.i.each(e,(t=>!_.i.isTag(t,["ul","li","ol"])&&(_.i.isEmpty(t)||_.i.isTag(t,"br"))))})(t.editor)?this.show():this.hide())}beforeDestruct(t){this.hide(),t.e.off(".placeholder").off(window,"load",this.toggle)}}(0,n.gn)([(0,x.debounce)((t=>t.defaultTimeout/10),!0)],Re.prototype,"toggle",null),r.D.prototype.controls.redo={mode:a.MODE_SPLIT,isDisabled:t=>!t.observer.stack.canRedo(),tooltip:"Redo"},r.D.prototype.controls.undo={mode:a.MODE_SPLIT,isDisabled:t=>!t.observer.stack.canUndo(),tooltip:"Undo"};class Ae extends H{constructor(){super(...arguments),this.buttons=[{name:"undo",group:"history"},{name:"redo",group:"history"}]}beforeDestruct(){}afterInit(t){const e=e=>(t.observer[e](),!1);t.registerCommand("redo",{exec:e,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),t.registerCommand("undo",{exec:e,hotkeys:["ctrl+z","cmd+z"]})}}r.D.prototype.allowResizeTags=["img","iframe","table","jodit"],r.D.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10};const Be="__jodit-resizer_binded";class Oe extends H{constructor(){super(...arguments),this.LOCK_KEY="resizer",this.element=null,this.isResized=!1,this.isShown=!1,this.start_x=0,this.start_y=0,this.width=0,this.height=0,this.ratio=0,this.rect=this.j.c.fromHTML('<div class="jodit-resizer">\n\t\t\t\t<i class="jodit-resizer-topleft"></i>\n\t\t\t\t<i class="jodit-resizer-topright"></i>\n\t\t\t\t<i class="jodit-resizer-bottomright"></i>\n\t\t\t\t<i class="jodit-resizer-bottomleft"></i>\n\t\t\t\t<span>100x100</span>\n\t\t\t</div>'),this.sizeViewer=this.rect.getElementsByTagName("span")[0],this.onResize=t=>{if(this.isResized){if(!this.element)return;let e,s;if(this.j.options.iframe){const i=this.getWorkplacePosition();e=t.clientX+i.left-this.start_x,s=t.clientY+i.top-this.start_y}else e=t.clientX-this.start_x,s=t.clientY-this.start_y;const i=this.handle.className;let o=0,n=0;_.i.isTag(this.element,"img")?(e?(o=this.width+(i.match(/left/)?-1:1)*e,n=Math.round(o/this.ratio)):(n=this.height+(i.match(/top/)?-1:1)*s,o=Math.round(n*this.ratio)),o>(0,c.innerWidth)(this.j.editor,this.j.ow)&&(o=(0,c.innerWidth)(this.j.editor,this.j.ow),n=Math.round(o/this.ratio))):(o=this.width+(i.match(/left/)?-1:1)*e,n=this.height+(i.match(/top/)?-1:1)*s),o>this.j.o.resizer.min_width&&this.applySize(this.element,"width",this.rect.parentNode.offsetWidth>o?o:"100%"),n>this.j.o.resizer.min_height&&this.applySize(this.element,"height",n),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),t.stopImmediatePropagation()}},this.onClickOutside=t=>{this.isShown&&(this.isResized?(this.j.unlock(),this.isResized=!1,this.j.setEditorValue(),t.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove.resizer touchmove.resizer",this.onResize)):this.hide())},this.onClickElement=t=>{this.isResized||this.element===t&&this.isShown||(this.element=t,this.show(),_.i.isTag(this.element,"img")&&!this.element.complete&&this.j.e.on(this.element,"load",this.updateSize))},this.updateSize=()=>{if(!this.isInDestruct&&this.isShown&&this.element&&this.rect){const t=this.getWorkplacePosition(),e=(0,c.offset)(this.element,this.j,this.j.ed),s=parseInt(this.rect.style.left||"0",10),i=this.rect.offsetWidth,o=this.rect.offsetHeight,n=e.top-1-t.top,r=e.left-1-t.left;parseInt(this.rect.style.top||"0",10)===n&&s===r&&i===this.element.offsetWidth&&o===this.element.offsetHeight||((0,c.css)(this.rect,{top:n,left:r,width:this.element.offsetWidth,height:this.element.offsetHeight}),this.j.events&&(this.j.e.fire(this.element,"changesize"),isNaN(s)||this.j.e.fire("resize")))}},this.hideSizeViewer=()=>{this.sizeViewer.style.opacity="0"}}afterInit(t){(0,c.$$)("i",this.rect).forEach((e=>{t.e.on(e,"mousedown.resizer touchstart.resizer",this.onClickHandle.bind(this,e))})),j.TB.on("hideHelpers",this.hide),t.e.on("readonly",(t=>{t&&this.hide()})).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",(t=>{const e=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;e.test(t.value)&&(t.value=t.value.replace(e,"$1"))})).on("hideResizer",this.hide).on("change afterInit afterSetMode",this.onChangeEditor),this.addEventListeners(),this.onChangeEditor()}onEditorClick(t){let e=t.target;const{editor:s,options:{allowResizeTags:i}}=this.j;for(;e&&e!==s;){if(_.i.isTag(e,i))return this.bind(e),void this.onClickElement(e);e=e.parentNode}}addEventListeners(){const t=this.j;t.e.off(t.editor,".resizer").off(t.ow,".resizer").on(t.editor,"keydown.resizer",(t=>{this.isShown&&t.key===a.KEY_DELETE&&this.element&&!_.i.isTag(this.element,"table")&&this.onDelete(t)})).on(t.ow,"resize.resizer",this.updateSize).on(t.ow,"mouseup.resizer keydown.resizer touchend.resizer",this.onClickOutside).on([t.ow,t.editor],"scroll.resizer",(()=>{this.isShown&&!this.isResized&&this.hide()}))}onClickHandle(t,e){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=t,e.preventDefault(),e.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResized=!0,this.start_x=e.clientX,this.start_y=e.clientY,this.j.e.fire("hidePopup"),this.j.lock(this.LOCK_KEY),this.j.e.on(this.j.ow,"mousemove.resizer touchmove.resizer",this.onResize)}getWorkplacePosition(){return(0,c.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(t,e,s){_.i.isImage(t)&&this.j.o.resizer.forImageChangeAttributes?(0,c.attr)(t,e,s):(0,c.css)(t,e,s)}onDelete(t){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(_.i.safeRemove(this.element),this.hide(),t.preventDefault()))}onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,c.$$)("iframe",this.j.editor).forEach(this.bind)}bind(t){if(t[Be])return;let e;if(t[Be]=!0,_.i.isTag(t,"iframe")){const s=t;(0,c.attr)(t.parentNode,"-jodit_iframe_wrapper")?t=t.parentNode:(e=this.j.createInside.fromHTML('<jodit data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_iframe_wrapper="1"></jodit>'),(0,c.attr)(e,"style",(0,c.attr)(t,"style")),(0,c.css)(e,{display:"inline-block"===t.style.display?"inline-block":"block",width:t.offsetWidth,height:t.offsetHeight}),t.parentNode&&t.parentNode.insertBefore(e,t),e.appendChild(t),t=e),this.j.e.off(t,"mousedown.select touchstart.select").on(t,"mousedown.select touchstart.select",(()=>{this.j.s.select(t)})).off(t,"changesize").on(t,"changesize",(()=>{s.setAttribute("width",t.offsetWidth+"px"),s.setAttribute("height",t.offsetHeight+"px")}))}this.j.e.on(t,"dragstart",this.hide)}showSizeViewer(t,e){this.j.o.resizer.showSize&&(this.sizeViewer.offsetWidth>t||this.sizeViewer.offsetHeight>e?this.hideSizeViewer():(this.sizeViewer.style.opacity="1",this.sizeViewer.textContent=`${t} x ${e}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})))}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,c.markOwner)(this.j,this.rect),this.j.workplace.appendChild(this.rect)),this.j.isFullSize&&(this.rect.style.zIndex=""+(0,c.css)(this.j.container,"zIndex")),this.updateSize())}hide(){this.isResized||(this.isResized=!1,this.isShown=!1,this.element=null,_.i.safeRemove(this.rect))}beforeDestruct(t){this.hide(),j.TB.off("hideHelpers",this.hide),t.e.off(this.j.ow,".resizer").off(".resizer")}}(0,n.gn)([(0,x.watch)(":click")],Oe.prototype,"onEditorClick",null),(0,n.gn)([(0,x.debounce)()],Oe.prototype,"onChangeEditor",null),(0,n.gn)([x.autobind],Oe.prototype,"bind",null),(0,n.gn)([x.autobind],Oe.prototype,"hide",null),r.D.prototype.useSearch=!0,r.D.prototype.controls.find={tooltip:"Find",icon:"search",exec(t,e,{control:s}){switch(s.args&&s.args[0]){case"findPrevious":t.e.fire("searchPrevious");break;case"findNext":t.e.fire("searchNext");break;case"replace":t.execCommand("openReplaceDialog");break;default:t.execCommand("openSearchDialog")}},list:{search:"Find",findNext:"Find Next",findPrevious:"Find Previous",replace:"Replace"},childTemplate:(t,e,s)=>s};class He extends H{constructor(){super(...arguments),this.buttons=[{name:"find",group:"search"}],this.template=`<div class="jodit-search">\n\t\t\t<div class="jodit-search__box">\n\t\t\t\t<div class="jodit-search__inputs">\n\t\t\t\t\t<input data-ref="query" tabindex="0" placeholder="${this.j.i18n("Search for")}" type="text"/>\n\t\t\t\t\t<input data-ref="replace" tabindex="0" placeholder="${this.j.i18n("Replace with")}" type="text"/>\n\t\t\t\t</div>\n\t\t\t\t<div class="jodit-search__counts">\n\t\t\t\t\t<span data-ref="counter-box">0/0</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="jodit-search__buttons">\n\t\t\t\t\t<button data-ref="next" tabindex="0" type="button">${k.JO.get("angle-down")}</button>\n\t\t\t\t\t<button data-ref="prev" tabindex="0" type="button">${k.JO.get("angle-up")}</button>\n\t\t\t\t\t<button data-ref="cancel" tabindex="0" type="button">${k.JO.get("cancel")}</button>\n\t\t\t\t\t<button data-ref="replace-btn" tabindex="0" type="button" class="jodit-ui-button">${this.j.i18n("Replace")}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`,this.isOpened=!1,this.selInfo=null,this.current=null,this.eachMap=(t,e,s)=>{_.i.findWithCurrent(t,(t=>!(!t||!e(t))),this.j.editor,s?"nextSibling":"previousSibling",s?"firstChild":"lastChild")},this.updateCounters=()=>{if(!this.isOpened)return;this.counterBox.style.display=this.queryInput.value.length?"inline-block":"none";const t=this.calcCounts(this.queryInput.value,this.j.s.range);this.counterBox.textContent=t.join("/")},this.calcCounts=(t,e=!1)=>{const s=[];let i=0,o=0,n=!1,r=this.j.editor.firstChild;for(;r&&t.length;)if(n=this.find(r,t,!0,0,n||this.j.ed.createRange()),n){if(this.boundAlreadyWas(n,s))break;s.push(n),r=n.startContainer,o+=1,e&&this.boundAlreadyWas(e,[n])&&(i=o)}else r=null;return[i,o]},this.findAndReplace=(t,e)=>{const s=this.find(t,e,!0,0,this.j.s.range);if(s&&s.startContainer&&s.endContainer){const t=this.j.ed.createRange();try{if(s&&s.startContainer&&s.endContainer){t.setStart(s.startContainer,s.startOffset),t.setEnd(s.endContainer,s.endOffset),t.deleteContents();const e=this.j.createInside.text(this.replaceInput.value);t.insertNode(e),this.j.s.select(e),this.tryScrollToElement(e)}}catch(t){}return!0}return!1},this.findAndSelect=(t,e,s)=>{const i=this.find(t,e,s,0,this.j.s.range);if(i&&i.startContainer&&i.endContainer){const t=this.j.ed.createRange();try{t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),this.j.s.selectRange(t)}catch(t){}return this.tryScrollToElement(i.startContainer),this.current=i.startContainer,this.updateCounters(),!0}return!1},this.find=(t,e,s,i,o)=>{if(t&&e.length){let n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null};if(this.eachMap(t,(t=>{if(_.i.isText(t)&&null!=t.nodeValue&&t.nodeValue.length){let a=t.nodeValue;s||t!==o.startContainer?s&&t===o.endContainer&&(a=i?a.substr(0,o.startOffset):a.substr(o.endOffset)):a=i?a.substr(o.endOffset):a.substr(0,o.startOffset);const l=s?n+a:a+n,h=He.findSomePartOfString(e,l,s);if(!1!==h){let o=He.findSomePartOfString(e,a,s);!0===o?o=(0,c.trim)(e):!1===o&&(o=He.findSomePartOfString(a,e,s),!0===o&&(o=(0,c.trim)(a)));let d=He.getSomePartOfStringIndex(e,a,s)||0;if((s&&!i||!s&&i)&&t.nodeValue.length-a.length>0&&(d+=t.nodeValue.length-a.length),null==r.startContainer&&(r.startContainer=t,r.startOffset=d),!0===h)return r.endContainer=t,r.endOffset=d,r.endOffset+=o.length,!0;n=l}else n="",r={startContainer:null,startOffset:null,endContainer:null,endOffset:null}}else _.i.isBlock(t)&&""!==n&&(n=s?n+" ":" "+n);return!1}),s),r.startContainer&&r.endContainer)return r;if(!i)return this.current=s?this.j.editor.firstChild:this.j.editor.lastChild,this.find(this.current,e,s,i+1,o)}return!1},this.open=(t=!1)=>{this.isOpened||(this.searchBox.classList.add("jodit-search_active"),this.isOpened=!0),this.calcSticky(this.j.e.fire("getStickyState.sticky")||!1),this.j.e.fire("hidePopup"),this.searchBox.classList.toggle("jodit-search_replace",t),this.current=this.j.s.current();const e=""+(this.j.s.sel||"");e&&(this.queryInput.value=e),this.updateCounters(),e?this.queryInput.select():this.queryInput.focus()},this.close=()=>{this.isOpened&&(this.j.s.restore(),this.searchBox.classList.remove("jodit-search_active"),this.isOpened=!1)}}static getSomePartOfStringIndex(t,e,s=!0){return this.findSomePartOfString(t,e,s,!0)}static findSomePartOfString(t,e,s=!0,i=!1){t=(0,c.trim)(t.toLowerCase().replace(a.SPACE_REG_EXP()," ")),e=e.toLowerCase();let o=s?0:e.length-1,n=s?0:t.length-1,r=0,l=null;const h=s?1:-1,d=[];for(;void 0!==e[o];o+=h){const c=t[n]===e[o];if(c||null!=l&&a.SPACE_REG_EXP().test(e[o])?(null!=l&&s||(l=o),d.push(e[o]),c&&(r+=1,n+=h)):(l=null,d.length=0,r=0,n=s?0:t.length-1),r===t.length)return!i||l}return i?null!=l&&l:!!d.length&&(s?d.join(""):d.reverse().join(""))}boundAlreadyWas(t,e){return e.some((e=>e.startContainer===t.startContainer&&e.endContainer===t.endContainer&&e.startOffset===t.startOffset&&e.endOffset===t.endOffset),!1)}tryScrollToElement(t){let e=_.i.closest(t,_.i.isElement,this.j.editor);e||(e=_.i.prev(t,_.i.isElement,this.j.editor)),e&&e!==this.j.editor&&e.scrollIntoView()}afterInit(t){if(t.o.useSearch){const e=this;e.searchBox=t.c.fromHTML(e.template);const{query:s,replace:i,cancel:o,next:n,prev:r,replaceBtn:l,counterBox:h}=(0,c.refs)(e.searchBox);e.queryInput=s,e.replaceInput=i,e.closeButton=o,e.nextButton=n,e.prevButton=r,e.replaceButton=l,e.counterBox=h;const d=()=>{t.workplace.appendChild(this.searchBox),t.e.off(this.j.container,"keydown.search").on(this.j.container,"keydown.search",(s=>{if(t.getRealMode()===a.MODE_WYSIWYG)switch(s.key){case a.KEY_ESC:this.close();break;case a.KEY_F3:e.queryInput.value&&(t.e.fire(s.shiftKey?"searchPrevious":"searchNext"),s.preventDefault())}}))};d(),t.e.on("changePlace",d).on(e.closeButton,"click",this.close).on(e.queryInput,"mousedown",(()=>{t.s.isFocused()&&(t.s.removeMarkers(),e.selInfo=t.s.save())})).on(e.replaceButton,"click",(s=>{e.findAndReplace(t.s.current()||t.editor.firstChild,e.queryInput.value),this.updateCounters(),s.preventDefault(),s.stopImmediatePropagation()})).on([e.nextButton,e.prevButton],"click",(function(s){t.e.fire(e.nextButton===this?"searchNext":"searchPrevious"),s.preventDefault(),s.stopImmediatePropagation()})).on(this.queryInput,"keydown",this.j.async.debounce((e=>{e.key===a.KEY_ENTER?(e.preventDefault(),e.stopImmediatePropagation(),t.e.fire("searchNext")&&this.close()):this.updateCounters()}),this.j.defaultTimeout)).on("beforeSetMode.search",(()=>{this.close()})).on("keydown.search mousedown.search",(()=>{this.selInfo&&(t.s.removeMarkers(),this.selInfo=null),this.isOpened&&(this.current=this.j.s.current(),this.updateCounters())})).on("searchNext.search searchPrevious.search",(()=>e.isOpened?e.findAndSelect(t.s.current()||t.editor.firstChild,e.queryInput.value,"searchNext"===t.e.current):e.open())).on("search.search",((e,s=!0)=>{t.execCommand("search",e,s)})).on("toggleSticky.search",this.calcSticky),t.registerCommand("search",{exec:(s,i,o=!0)=>(e.findAndSelect(t.s.current()||t.editor.firstChild,i||"",o),!1)}).registerCommand("openSearchDialog",{exec:()=>(e.open(),!1),hotkeys:["ctrl+f","cmd+f"]}).registerCommand("openReplaceDialog",{exec:()=>(t.o.readonly||e.open(!0),!1),hotkeys:["ctrl+h","cmd+h"]})}}beforeDestruct(t){var e;_.i.safeRemove(this.searchBox),null===(e=t.events)||void 0===e||e.off(".search")}calcSticky(t){if(this.isOpened)if(this.searchBox.classList.toggle("jodit-search_sticky",t),t){const t=(0,c.position)(this.j.toolbarContainer);(0,c.css)(this.searchBox,{top:t.top+t.height,left:t.left+t.width})}else(0,c.css)(this.searchBox,{top:null,left:null})}}(0,n.gn)([x.autobind],He.prototype,"calcSticky",null);class Fe extends H{constructor(){super(...arguments),this.proxyEventsList=["click","mousedown","touchstart","mouseup","touchend"]}afterInit(t){this.proxyEventsList.forEach((e=>{t.e.on(e+".select",this.onStartSelection)}))}beforeDestruct(t){this.proxyEventsList.forEach((e=>{t.e.on(e+".select",this.onStartSelection)}))}onStartSelection(t){const{j:e}=this;let s,i=t.target;for(;void 0===s&&i&&i!==e.editor;)s=e.e.fire((0,c.camelCase)(t.type+"_"+i.nodeName.toLowerCase()),i,t),i=i.parentElement;"click"===t.type&&void 0===s&&i===e.editor&&e.e.fire(t.type+"Editor",i,t)}onOutsideClick(t){const e=t.target;_.i.up(e,(t=>t===this.j.editor))||k.u1.closestElement(e,k.GI)||this.j.e.fire("outsideClick",t)}}(0,n.gn)([x.autobind],Fe.prototype,"onStartSelection",null),(0,n.gn)([(0,x.watch)("ow:click")],Fe.prototype,"onOutsideClick",null),r.D.prototype.width="auto",r.D.prototype.minWidth=200,r.D.prototype.maxWidth="100%",r.D.prototype.allowResizeX=!1,r.D.prototype.allowResizeY=!0,r.D.prototype.height="auto",r.D.prototype.minHeight=200,r.D.prototype.maxHeight="auto",r.D.prototype.saveHeightInStorage=!1;let $e=class extends H{constructor(){super(...arguments),this.isResized=!1,this.start={x:0,y:0,w:0,h:0},this.handle=this.j.c.div("jodit-editor__resize",'<span tabindex="-1"></span>')}afterInit(t){const{height:e,width:s,allowResizeX:i}=t.o;let{allowResizeY:o}=t.o;"auto"===e&&"auto"!==s&&(o=!1),"auto"===e&&"auto"===s||!i&&!o||(t.e.on("toggleFullSize.resizeHandler",(()=>{this.handle.style.display=t.isFullSize?"none":"block"})).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(t.ow,"mouseup touchend",this.onHandleResizeEnd),t.container.appendChild(this.handle))}onHandleResizeStart(t){this.isResized=!0,this.start.x=t.clientX,this.start.y=t.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),t.preventDefault()}onHandleResize(t){this.isResized&&(this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+t.clientY-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t.clientX-this.start.x),this.j.e.fire("resize"))}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(t){_.i.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}};$e.requires=["size"],$e=(0,n.gn)([x.autobind],$e);let We=class extends H{constructor(){super(...arguments),this.resizeWorkspaces=this.j.async.debounce(this.resizeWorkspaceImd,this.j.defaultTimeout,!0)}afterInit(t){t.e.on("setHeight.size",this.setHeight).on("setWidth.size",this.setWidth).on("afterInit.size changePlace.size",this.initialize,void 0,!0).on(t.ow,"load.size",this.resizeWorkspaces).on("afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size toggleFullSize.size",this.resizeWorkspaces),this.initialize()}initialize(){const{j:t}=this;if(t.o.inline)return;let{height:e}=t.o;if(t.o.saveHeightInStorage&&"auto"!==e){const s=t.storage.get("height");s&&(e=s)}(0,c.css)(t.editor,{minHeight:"100%"}),(0,c.css)(t.container,{minHeight:t.o.minHeight,maxHeight:t.o.maxHeight,minWidth:t.o.minWidth,maxWidth:t.o.maxWidth}),this.setHeight(e),this.setWidth(t.o.width)}setHeight(t){if((0,c.isNumber)(t)){const{minHeight:e,maxHeight:s}=this.j.o;(0,c.isNumber)(e)&&e>t&&(t=e),(0,c.isNumber)(s)&&t>s&&(t=s)}(0,c.css)(this.j.container,"height",t),this.j.o.saveHeightInStorage&&this.j.storage.set("height",t),this.resizeWorkspaceImd()}setWidth(t){if((0,c.isNumber)(t)){const{minWidth:e,maxWidth:s}=this.j.o;(0,c.isNumber)(e)&&e>t&&(t=e),(0,c.isNumber)(s)&&t>s&&(t=s)}(0,c.css)(this.j.container,"width",t),this.resizeWorkspaceImd()}getNotWorkHeight(){var t,e;return((null===(t=this.j.toolbarContainer)||void 0===t?void 0:t.offsetHeight)||0)+((null===(e=this.j.statusbar)||void 0===e?void 0:e.getHeight())||0)+2}resizeWorkspaceImd(){if(!this.j||this.j.isDestructed||!this.j.o||this.j.o.inline)return;if(!this.j.container||!this.j.container.parentNode)return;const t=((0,c.css)(this.j.container,"minHeight")||0)-this.getNotWorkHeight();if((0,c.isNumber)(t)&&t>0&&([this.j.workplace,this.j.iframe,this.j.editor].map((e=>{e&&(0,c.css)(e,"minHeight",t)})),this.j.e.fire("setMinHeight",t)),(0,c.isNumber)(this.j.o.maxHeight)){const t=this.j.o.maxHeight-this.getNotWorkHeight();[this.j.workplace,this.j.iframe,this.j.editor].map((e=>{e&&(0,c.css)(e,"maxHeight",t)})),this.j.e.fire("setMaxHeight",t)}this.j.container&&(0,c.css)(this.j.workplace,"height","auto"!==this.j.o.height||this.j.isFullSize?this.j.container.offsetHeight-this.getNotWorkHeight():"auto")}beforeDestruct(t){this.j.e.off(this.j.ow,"load.size",this.resizeWorkspaces).off(".size")}};We=(0,n.gn)([x.autobind],We),r.D.prototype.beautifyHTML=!a.IS_IE,r.D.prototype.sourceEditor="ace",r.D.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},r.D.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js"],r.D.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.0/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.13.0/beautify-html.min.js"],r.D.prototype.controls.source={mode:a.MODE_SPLIT,exec(t){t.toggleMode()},isActive:t=>t.getRealMode()===a.MODE_SOURCE,tooltip:"Change mode"};class Ve{constructor(t,e,s,i){this.jodit=t,this.container=e,this.toWYSIWYG=s,this.fromWYSIWYG=i,this.className="",this.isReady=!1}get j(){return this.jodit}onReady(){this.replaceUndoManager(),this.isReady=!0,this.j.e.fire(this,"ready")}onReadyAlways(t){var e;this.isReady?t():null===(e=this.j.events)||void 0===e||e.on(this,"ready",t)}}class Ye extends Ve{constructor(){super(...arguments),this.autosize=this.j.async.debounce((()=>{this.instance.style.height="auto",this.instance.style.height=this.instance.scrollHeight+"px"}),this.j.defaultTimeout)}init(t){this.instance=t.c.element("textarea",{class:"jodit-source__mirror"}),this.container.appendChild(this.instance),t.e.on(this.instance,"mousedown keydown touchstart input",t.async.debounce(this.toWYSIWYG,t.defaultTimeout)).on("setMinHeight.source",(t=>{(0,c.css)(this.instance,"minHeight",t)})).on(this.instance,"change keydown mousedown touchstart input",this.autosize).on("afterSetMode.source",this.autosize).on(this.instance,"mousedown focus",(e=>{t.e.fire(e.type,e)})),this.autosize(),this.onReady()}destruct(){_.i.safeRemove(this.instance)}getValue(){return this.instance.value}setValue(t){this.instance.value=t}insertRaw(t){const e=this.getValue();if(0>this.getSelectionStart())this.setValue(e+t);else{const s=this.getSelectionStart(),i=this.getSelectionEnd();this.setValue(e.substring(0,s)+t+e.substring(i,e.length))}}getSelectionStart(){return this.instance.selectionStart}getSelectionEnd(){return this.instance.selectionEnd}setSelectionRange(t,e=t){this.instance.setSelectionRange(t,e)}focus(){this.instance.focus()}setPlaceHolder(t){this.instance.setAttribute("placeholder",t)}setReadOnly(t){t?this.instance.setAttribute("readonly","true"):this.instance.removeAttribute("readonly")}selectAll(){this.instance.select()}replaceUndoManager(){const{observer:t}=this.jodit;this.j.e.on(this.instance,"keydown",(e=>{if((e.ctrlKey||e.metaKey)&&"z"===e.key)return e.shiftKey?t.redo():t.undo(),this.setSelectionRange(this.getValue().length),!1}))}}class Ue extends Ve{constructor(){super(...arguments),this.className="jodit_ace_editor",this.proxyOnFocus=t=>{this.j.e.fire("focus",t)},this.proxyOnMouseDown=t=>{this.j.e.fire("mousedown",t)}}aceExists(){return void 0!==this.j.ow.ace}getLastColumnIndex(t){return this.instance.session.getLine(t).length}getLastColumnIndices(){const t=this.instance.session.getLength(),e=[];let s=0;for(let i=0;t>i;i++)s+=this.getLastColumnIndex(i),i>0&&(s+=1),e[i]=s;return e}getRowColumnIndices(t){const e=this.getLastColumnIndices();if(e[0]>=t)return{row:0,column:t};let s=1;for(let i=1;e.length>i;i++)t>e[i]&&(s=i+1);return{row:s,column:t-e[s-1]-1}}setSelectionRangeIndices(t,e){const s=this.getRowColumnIndices(t),i=this.getRowColumnIndices(e);this.instance.getSelection().setSelectionRange({start:s,end:i})}getIndexByRowColumn(t,e){return this.getLastColumnIndices()[t]-this.getLastColumnIndex(t)+e}init(t){const e=()=>{if(void 0!==this.instance||!this.aceExists())return;const e=this.j.c.div("jodit-source__mirror-fake");this.container.appendChild(e),this.instance=t.ow.ace.edit(e),this.instance.setTheme(t.o.sourceEditorNativeOptions.theme),this.instance.renderer.setShowGutter(t.o.sourceEditorNativeOptions.showGutter),this.instance.getSession().setMode(t.o.sourceEditorNativeOptions.mode),this.instance.setHighlightActiveLine(t.o.sourceEditorNativeOptions.highlightActiveLine),this.instance.getSession().setUseWrapMode(!0),this.instance.setOption("indentedSoftWrap",!1),this.instance.setOption("wrap",t.o.sourceEditorNativeOptions.wrap),this.instance.getSession().setUseWorker(!1),this.instance.$blockScrolling=1/0,this.instance.on("change",this.toWYSIWYG),this.instance.on("focus",this.proxyOnFocus),this.instance.on("mousedown",this.proxyOnMouseDown),t.getRealMode()!==a.MODE_WYSIWYG&&this.setValue(this.getValue());const s=this.j.async.debounce((()=>{t.isInDestruct||(this.instance.setOption("maxLines","auto"!==t.o.height?t.workplace.offsetHeight/this.instance.renderer.lineHeight:1/0),this.instance.resize())}),2*this.j.defaultTimeout);t.e.on("afterResize afterSetMode",s),s(),this.onReady()};t.e.on("afterSetMode",(()=>{t.getRealMode()!==a.MODE_SOURCE&&t.getMode()!==a.MODE_SPLIT||(this.fromWYSIWYG(),e())})),e(),this.aceExists()||(0,c.loadNext)(t,t.o.sourceEditorCDNUrlsJS).then((()=>{t.isInDestruct||e()}))}destruct(){var t,e;this.instance.off("change",this.toWYSIWYG),this.instance.off("focus",this.proxyOnFocus),this.instance.off("mousedown",this.proxyOnMouseDown),this.instance.destroy(),null===(e=null===(t=this.j)||void 0===t?void 0:t.events)||void 0===e||e.off("aceInited.source")}setValue(t){if(!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){const e=this.j.e.fire("beautifyHTML",t);(0,c.isString)(e)&&(t=e)}this.instance.setValue(t),this.instance.clearSelection()}getValue(){return this.instance.getValue()}setReadOnly(t){this.instance.setReadOnly(t)}focus(){this.instance.focus()}getSelectionStart(){const t=this.instance.selection.getRange();return this.getIndexByRowColumn(t.start.row,t.start.column)}getSelectionEnd(){const t=this.instance.selection.getRange();return this.getIndexByRowColumn(t.end.row,t.end.column)}selectAll(){this.instance.selection.selectAll()}insertRaw(t){const e=this.instance.selection.getCursor(),s=this.instance.session.insert(e,t);this.instance.selection.setRange({start:e,end:s},!1)}setSelectionRange(t,e){this.setSelectionRangeIndices(t,e)}setPlaceHolder(t){}replaceUndoManager(){const{observer:t}=this.jodit;this.instance.commands.addCommand({name:"Undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec(){t.undo()}}),this.instance.commands.addCommand({name:"Redo",bindKey:{win:"Ctrl-Shift-Z",mac:"Command-Shift-Z"},exec(){t.redo()}})}}function Ge(t,e,s,i,o){let n;switch(t){case"ace":if(!e.o.shadowRoot){n=new Ue(e,s,i,o);break}default:n=new Ye(e,s,i,o)}return n.init(e),n.onReadyAlways((()=>{n.setReadOnly(e.o.readonly)})),n}class Ke extends H{constructor(){super(...arguments),this.buttons=[{name:"source",group:"source"}],this.__lock=!1,this.__oldMirrorValue="",this.tempMarkerStart="{start-jodit-selection}",this.tempMarkerStartReg=/{start-jodit-selection}/g,this.tempMarkerEnd="{end-jodit-selection}",this.tempMarkerEndReg=/{end-jodit-selection}/g,this.getSelectionStart=()=>{var t,e;return null!==(e=null===(t=this.sourceEditor)||void 0===t?void 0:t.getSelectionStart())&&void 0!==e?e:0},this.getSelectionEnd=()=>{var t,e;return null!==(e=null===(t=this.sourceEditor)||void 0===t?void 0:t.getSelectionEnd())&&void 0!==e?e:0}}onInsertHTML(t){var e;if(!this.j.o.readonly&&!this.j.isEditorMode())return null===(e=this.sourceEditor)||void 0===e||e.insertRaw(t),this.toWYSIWYG(),!1}fromWYSIWYG(t=!1){if(!this.__lock||!0===t){this.__lock=!0;const t=this.j.getEditorValue(!1);t!==this.getMirrorValue()&&this.setMirrorValue(t),this.__lock=!1}}toWYSIWYG(){if(this.__lock)return;const t=this.getMirrorValue();t!==this.__oldMirrorValue&&(this.__lock=!0,this.j.setEditorValue(t),this.__lock=!1,this.__oldMirrorValue=t)}getNormalPosition(t,e){let s=t;for(;s>0;){if(s--,"<"===e[s]&&void 0!==e[s+1]&&e[s+1].match(/[\w/]+/i))return s;if(">"===e[s])return t}return t}clnInv(t){return t.replace(a.INVISIBLE_SPACE_REG_EXP(),"")}onSelectAll(t){var e;if("selectall"===t.toLowerCase()&&this.j.getRealMode()===a.MODE_SOURCE)return null===(e=this.sourceEditor)||void 0===e||e.selectAll(),!1}getMirrorValue(){var t;return(null===(t=this.sourceEditor)||void 0===t?void 0:t.getValue())||""}setMirrorValue(t){var e;null===(e=this.sourceEditor)||void 0===e||e.setValue(t)}setFocusToMirror(){var t;null===(t=this.sourceEditor)||void 0===t||t.focus()}saveSelection(){if(this.j.getRealMode()===a.MODE_WYSIWYG)this.j.s.save(),this.j.setEditorValue(),this.fromWYSIWYG(!0);else{if(this.j.o.editHTMLDocumentMode)return;const t=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){const e=this.j.s.marker(!0),s=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(t.substr(0,s)+this.clnInv(e.outerHTML)+t.substr(s))}else{const e=this.j.s.marker(!0),s=this.j.s.marker(!1),i=this.getNormalPosition(this.getSelectionStart(),t),o=this.getNormalPosition(this.getSelectionEnd(),t);this.setMirrorValue(t.substr(0,i)+this.clnInv(e.outerHTML)+t.substr(i,o-i)+this.clnInv(s.outerHTML)+t.substr(o))}this.toWYSIWYG()}}removeSelection(){if(this.j.getRealMode()===a.MODE_WYSIWYG)return this.__lock=!0,this.j.s.restore(),void(this.__lock=!1);let t=this.getMirrorValue(),e=0,s=0;try{if(t=t.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd),!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){const e=this.j.e.fire("beautifyHTML",t);(0,c.isString)(e)&&(t=e)}if(e=t.indexOf(this.tempMarkerStart),s=e,t=t.replace(this.tempMarkerStartReg,""),-1!==e){const e=t.indexOf(this.tempMarkerEnd);-1!==e&&(s=e)}t=t.replace(this.tempMarkerEndReg,"")}finally{t=t.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(t),this.setMirrorSelectionRange(e,s),this.toWYSIWYG(),this.setFocusToMirror()}setMirrorSelectionRange(t,e){var s;null===(s=this.sourceEditor)||void 0===s||s.setSelectionRange(t,e)}onReadonlyReact(){var t;null===(t=this.sourceEditor)||void 0===t||t.setReadOnly(this.j.o.readonly)}afterInit(t){if(this.mirrorContainer=t.c.div("jodit-source"),t.workplace.appendChild(this.mirrorContainer),t.e.on("afterAddPlace changePlace afterInit",(()=>{t.workplace.appendChild(this.mirrorContainer)})),this.sourceEditor=Ge("area",t,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG),this.onReadonlyReact(),t.e.on("placeholder.source",(t=>{var e;null===(e=this.sourceEditor)||void 0===e||e.setPlaceHolder(t)})).on("change.source",this.fromWYSIWYG).on("beautifyHTML",(t=>t)),t.o.beautifyHTML){const e=()=>{var e;const s=t.ow.html_beautify;return!(!s||t.isInDestruct||(null===(e=t.events)||void 0===e||e.off("beautifyHTML").on("beautifyHTML",(t=>s(t))),0))};e()||(0,c.loadNext)(t,t.o.beautifyHTMLCDNUrlsJS).then(e)}this.fromWYSIWYG(),this.initSourceEditor(t)}initSourceEditor(t){var e;if("area"!==t.o.sourceEditor){const e=Ge(t.o.sourceEditor,t,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG);e.onReadyAlways((()=>{var s,i;null===(s=this.sourceEditor)||void 0===s||s.destruct(),this.sourceEditor=e,this.fromWYSIWYG(!0),null===(i=t.events)||void 0===i||i.fire("sourceEditorReady",t)}))}else null===(e=this.sourceEditor)||void 0===e||e.onReadyAlways((()=>{var e;this.fromWYSIWYG(!0),null===(e=t.events)||void 0===e||e.fire("sourceEditorReady",t)}))}beforeDestruct(t){this.sourceEditor&&(this.sourceEditor.destruct(),delete this.sourceEditor),_.i.safeRemove(this.mirrorContainer)}}(0,n.gn)([(0,x.watch)(":insertHTML.source")],Ke.prototype,"onInsertHTML",null),(0,n.gn)([x.autobind],Ke.prototype,"fromWYSIWYG",null),(0,n.gn)([x.autobind],Ke.prototype,"toWYSIWYG",null),(0,n.gn)([x.autobind],Ke.prototype,"getNormalPosition",null),(0,n.gn)([(0,x.watch)(":beforeCommand.source")],Ke.prototype,"onSelectAll",null),(0,n.gn)([(0,x.watch)(":beforeSetMode.source")],Ke.prototype,"saveSelection",null),(0,n.gn)([(0,x.watch)(":afterSetMode.source")],Ke.prototype,"removeSelection",null),(0,n.gn)([x.autobind],Ke.prototype,"setMirrorSelectionRange",null),(0,n.gn)([(0,x.watch)(":readonly.source")],Ke.prototype,"onReadonlyReact",null),r.D.prototype.showCharsCounter=!0,r.D.prototype.countHTMLChars=!1,r.D.prototype.showWordsCounter=!0;class Xe extends H{constructor(){super(...arguments),this.charCounter=null,this.wordCounter=null,this.reInit=()=>{this.j.o.showCharsCounter&&this.charCounter&&this.j.statusbar.append(this.charCounter,!0),this.j.o.showWordsCounter&&this.wordCounter&&this.j.statusbar.append(this.wordCounter,!0),this.j.e.off("change keyup",this.calc).on("change keyup",this.calc),this.calc()},this.calc=this.j.async.throttle((()=>{const t=this.j.text;if(this.j.o.showCharsCounter&&this.charCounter){const e=this.j.o.countHTMLChars?this.j.value:t.replace((0,a.SPACE_REG_EXP)(),"");this.charCounter.textContent=this.j.i18n("Chars: %d",e.length)}this.j.o.showWordsCounter&&this.wordCounter&&(this.wordCounter.textContent=this.j.i18n("Words: %d",t.replace((0,a.INVISIBLE_SPACE_REG_EXP)(),"").split((0,a.SPACE_REG_EXP)()).filter((t=>t.length)).length))}),this.j.defaultTimeout)}afterInit(){this.charCounter=this.j.c.span(),this.wordCounter=this.j.c.span(),this.j.e.on("afterInit changePlace afterAddPlace",this.reInit),this.reInit()}beforeDestruct(){_.i.safeRemove(this.charCounter),_.i.safeRemove(this.wordCounter),this.j.e.off("afterInit changePlace afterAddPlace",this.reInit),this.charCounter=null,this.wordCounter=null}}r.D.prototype.toolbarSticky=!0,r.D.prototype.toolbarDisableStickyForMobile=!0,r.D.prototype.toolbarStickyOffset=0;class Je extends H{constructor(){super(...arguments),this.isToolbarSticked=!1,this.createDummy=t=>{},this.addSticky=t=>{this.isToolbarSticked||(this.createDummy(t),this.j.container.classList.add("jodit_sticky"),this.isToolbarSticked=!0),(0,c.css)(t,{top:this.j.o.toolbarStickyOffset||null,width:this.j.container.offsetWidth-2})},this.removeSticky=t=>{this.isToolbarSticked&&((0,c.css)(t,{width:"",top:""}),this.j.container.classList.remove("jodit_sticky"),this.isToolbarSticked=!1)}}afterInit(t){t.e.on(t.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.onScroll).on("getStickyState.sticky",(()=>this.isToolbarSticked))}onScroll(){const{jodit:t}=this,e=t.ow.pageYOffset||t.od.documentElement&&t.od.documentElement.scrollTop||0,s=(0,c.offset)(t.container,t,t.od,!0),i=t.getMode()===a.MODE_WYSIWYG&&e+t.o.toolbarStickyOffset>s.top&&s.top+s.height>e+t.o.toolbarStickyOffset&&!(t.o.toolbarDisableStickyForMobile&&this.isMobile());if(t.o.toolbarSticky&&!0===t.o.toolbar&&this.isToolbarSticked!==i){const e=t.toolbarContainer;e&&(i?this.addSticky(e):this.removeSticky(e)),t.e.fire("toggleSticky",i)}}isMobile(){return this.j&&this.j.options&&this.j.container&&this.j.o.sizeSM>=this.j.container.offsetWidth}beforeDestruct(t){this.dummyBox&&_.i.safeRemove(this.dummyBox),t.e.off(t.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.onScroll).off(".sticky")}}(0,n.gn)([(0,x.throttle)()],Je.prototype,"onScroll",null),r.D.prototype.usePopupForSpecialCharacters=!1,r.D.prototype.specialCharacters=["!",""","#","$","%","&","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","»","¬","®","¯","°","²","³","´","µ","¶","·","¸","¹","º","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"],r.D.prototype.controls.symbol={icon:"omega",hotkeys:["ctrl+shift+i","cmd+shift+i"],tooltip:"Insert Special Character",popup(t,e,s,i){const o=t.e.fire("generateSpecialCharactersTable.symbols");if(o){if(t.o.usePopupForSpecialCharacters){const e=t.c.div();return e.classList.add("jodit-symbols"),e.appendChild(o),t.e.on(o,"close_dialog",i),e}{A(o,t.i18n("Select Special Character"),void 0,"jodit-symbols").bindDestruct(t);const e=o.querySelector("a");e&&e.focus()}}}};class Ze extends H{constructor(){super(...arguments),this.buttons=[{name:"symbol",group:"insert"}],this.countInRow=17}afterInit(t){t.e.on("generateSpecialCharactersTable.symbols",(()=>{const e=t.c.fromHTML('<div class="jodit-symbols__container">\n\t\t\t\t\t\t<div class="jodit-symbols__container_table">\n\t\t\t\t\t\t\t<table><tbody></tbody></table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="jodit-symbols__container_preview">\n\t\t\t\t\t\t\t<div class="jodit-symbols__preview"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>'),s=e.querySelector(".jodit-symbols__preview"),i=e.querySelector("table").tBodies[0],o=[];for(let e=0;t.o.specialCharacters.length>e;){const s=t.c.element("tr");for(let i=0;this.countInRow>i&&t.o.specialCharacters.length>e;i+=1,e+=1){const n=t.c.element("td"),r=t.c.fromHTML(`<a\n\t\t\t\t\t\t\t\t\tdata-index="${e}"\n\t\t\t\t\t\t\t\t\tdata-index-j="${i}"\n\t\t\t\t\t\t\t\t\trole="option"\n\t\t\t\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\t\t>${t.o.specialCharacters[e]}</a>`);o.push(r),n.appendChild(r),s.appendChild(n)}i.appendChild(s)}const n=this;return t.e.on(o,"focus",(function(){s.innerHTML=this.innerHTML})).on(o,"mousedown",(function(e){_.i.isTag(this,"a")&&(t.s.focus(),t.s.insertHTML(this.innerHTML),t.e.fire(this,"close_dialog"),e&&e.preventDefault(),e&&e.stopImmediatePropagation())})).on(o,"mouseenter",(function(){_.i.isTag(this,"a")&&this.focus()})).on(o,"keydown",(e=>{const s=e.target;if(_.i.isTag(s,"a")){const i=parseInt((0,Mt.Lj)(s,"-index")||"0",10),r=parseInt((0,Mt.Lj)(s,"data-index-j")||"0",10);let l;switch(e.key){case a.KEY_UP:case a.KEY_DOWN:l=e.key===a.KEY_UP?i-n.countInRow:i+n.countInRow,void 0===o[l]&&(l=e.key===a.KEY_UP?Math.floor(o.length/n.countInRow)*n.countInRow+r:r,l>o.length-1&&(l-=n.countInRow)),o[l]&&o[l].focus();break;case a.KEY_RIGHT:case a.KEY_LEFT:l=e.key===a.KEY_LEFT?i-1:i+1,void 0===o[l]&&(l=e.key===a.KEY_LEFT?o.length-1:0),o[l]&&o[l].focus();break;case a.KEY_ENTER:t.e.fire(s,"mousedown"),e.stopImmediatePropagation(),e.preventDefault()}}})),e}))}beforeDestruct(t){t.e.off("generateSpecialCharactersTable.symbols")}}r.D.prototype.table={allowCellSelection:!0,selectionCellStyle:"border: 1px double #1e88e5 !important;",allowCellResize:!0,useExtraClassesOptions:!1},r.D.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":"Bootstrap Bordered","table table-striped":"Bootstrap Striped","table table-dark":"Bootstrap Dark"}},popup(t,e,s,i,o){const n=s.data&&s.data.rows?s.data.rows:10,r=s.data&&s.data.cols?s.data.cols:10,a=t.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">'+(()=>{if(!t.o.table.useExtraClassesOptions)return"";const e=[];if(s.data){const t=s.data.classList;Object.keys(t).forEach((s=>{e.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${s}" type="checkbox"/>${t[s]}</label>`)}))}return e.join("")})()+'</div></div><label class="jodit-form__center"><span>1</span> × <span>1</span></label></form>'),l=a.querySelectorAll("span")[0],h=a.querySelectorAll("span")[1],d=a.querySelector(".jodit-form__container"),u=a.querySelector(".jodit-form__options"),p=[],f=n*r;for(let e=0;f>e;e+=1)p[e]||p.push(t.c.element("span",{dataIndex:e}));if(t.e.on(d,"mousemove",((t,e)=>{const s=t.target;if(!_.i.isTag(s,"span"))return;const i=void 0===e||isNaN(e)?parseInt((0,Mt.Lj)(s,"-index")||"0",10):e||0,o=Math.ceil((i+1)/r),n=i%r+1;for(let t=0;p.length>t;t+=1)p[t].className=t%r+1>n||Math.ceil((t+1)/r)>o?"":"jodit_hovered";h.textContent=""+n,l.textContent=""+o})).on(d,"touchstart mousedown",(e=>{const s=e.target;if(e.preventDefault(),e.stopImmediatePropagation(),!_.i.isTag(s,"span"))return;const o=parseInt((0,Mt.Lj)(s,"-index")||"0",10),n=Math.ceil((o+1)/r),a=o%r+1,l=t.createInside,h=l.element("tbody"),d=l.element("table");d.appendChild(h),d.style.width="100%";let p,f,m=null;for(let t=1;n>=t;t+=1){p=l.element("tr");for(let t=1;a>=t;t+=1)f=l.element("td"),m||(m=f),f.appendChild(l.element("br")),p.appendChild(l.text("\n")),p.appendChild(l.text("\t")),p.appendChild(f);h.appendChild(l.text("\n")),h.appendChild(p)}const g=t.s.current();if(g&&t.s.isCollapsed()){const e=_.i.closest(g,_.i.isBlock,t.editor);e&&e!==t.editor&&!e.nodeName.match(/^TD|TH|TBODY|TABLE|THEADER|TFOOTER$/)&&t.s.setCursorAfter(e)}(0,c.$$)("input[type=checkbox]:checked",u).forEach((t=>{t.value.split(/[\s]+/).forEach((t=>{d.classList.add(t)}))})),t.s.insertNode(l.text("\n")),t.s.insertNode(d,!1),m&&(t.s.setCursorIn(m),(0,c.scrollIntoViewIfNeeded)(m,t.editor,t.ed)),i()})),o&&o.parentElement){for(let e=0;n>e;e+=1){const s=t.c.div();for(let t=0;r>t;t+=1)s.appendChild(p[e*r+t]);d.appendChild(s)}p[0]&&(p[0].className="hovered")}return a},tooltip:"Insert table"};const Qe="table_processor_observer-resize";class ts extends H{constructor(){super(...arguments),this.selectMode=!1,this.resizeDelta=0,this.createResizeHandle=()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",(()=>{this.j.async.clearTimeout(this.hideTimeout)})))},this.hideTimeout=0,this.drag=!1,this.minX=0,this.maxX=0,this.startX=0}get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),this.j.workplace.appendChild(this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout((()=>{_.i.safeRemove(this.resizeHandler)}),{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(t){if(this.j.isLocked)return;this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=t.clientX,this.j.lock(Qe),this.resizeHandler.classList.add("jodit-table-resizer_moved");let e,s=this.workTable.getBoundingClientRect();if(this.minX=0,this.maxX=1e6,null!=this.wholeTable)s=this.workTable.parentNode.getBoundingClientRect(),this.minX=s.left,this.maxX=this.minX+s.width;else{const t=wt.formalCoordinate(this.workTable,this.workCell,!0);wt.formalMatrix(this.workTable,((s,i,o)=>{t[1]===o&&(e=s.getBoundingClientRect(),this.minX=Math.max(e.left+a.NEARBY/2,this.minX)),t[1]+(this.isRTL?-1:1)===o&&(e=s.getBoundingClientRect(),this.maxX=Math.min(e.left+e.width-a.NEARBY/2,this.maxX))}))}return!1}onMouseMove(t){if(!this.drag)return;this.j.e.fire("closeAllPopups");let e=t.clientX;const s=(0,c.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);this.minX>e&&(e=this.minX),e>this.maxX&&(e=this.maxX),this.resizeDelta=e-this.startX+(this.j.o.iframe?s.left:0),this.resizeHandler.style.left=e-(this.j.o.iframe?0:s.left)+"px";const i=this.j.s.sel;i&&i.removeAllRanges()}onMouseUp(t){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==t.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.setEditorValue(),this.j.s.focus())}resizeColumns(){const t=this.resizeDelta,e=[];wt.setColumnWidthByDelta(this.workTable,wt.formalCoordinate(this.workTable,this.workCell,!0)[1],t,!0,e);const s=(0,c.call)(this.isRTL?_.i.prev:_.i.next,this.workCell,_.i.isCell,this.workCell.parentNode);wt.setColumnWidthByDelta(this.workTable,wt.formalCoordinate(this.workTable,s)[1],-t,!1,e)}resizeTable(){const t=this.resizeDelta*(this.isRTL?-1:1),e=this.workTable.offsetWidth,s=(0,c.getContentWidth)(this.workTable.parentNode,this.j.ew),i=!this.wholeTable;if(this.isRTL?!i:i)this.workTable.style.width=(e+t)/s*100+"%";else{const i=this.isRTL?"marginRight":"marginLeft",o=parseInt(this.j.ew.getComputedStyle(this.workTable)[i]||"0",10);this.workTable.style.width=(e-t)/s*100+"%",this.workTable.style[i]=(o+t)/s*100+"%"}}setWorkCell(t,e=null){this.wholeTable=e,this.workCell=t,this.workTable=_.i.up(t,(t=>_.i.isTag(t,"table")),this.j.editor)}calcHandlePosition(t,e,s=0,i=0){const o=(0,c.offset)(e,this.j,this.j.ed);if(s>a.NEARBY&&o.width-a.NEARBY>s)return void this.hideResizeHandle();const n=(0,c.offset)(this.j.workplace,this.j,this.j.od,!0),r=(0,c.offset)(t,this.j,this.j.ed);if(this.resizeHandler.style.left=(s>a.NEARBY?o.left+o.width:o.left)-n.left+i+"px",Object.assign(this.resizeHandler.style,{height:r.height+"px",top:r.top-n.top+"px"}),this.showResizeHandle(),s>a.NEARBY){const t=(0,c.call)(this.isRTL?_.i.prev:_.i.next,e,_.i.isCell,e.parentNode);this.setWorkCell(e,!!t&&null)}else{const t=(0,c.call)(this.isRTL?_.i.next:_.i.prev,e,_.i.isCell,e.parentNode);this.setWorkCell(t||e,!t||null)}}afterInit(t){t.o.table.allowCellResize&&t.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",(()=>{(0,c.$$)("table",t.editor).forEach(this.observe)})).on(this.j.ow,"scroll.resize-cells",(()=>{if(!this.drag)return;const e=_.i.up(this.workCell,(t=>_.i.isTag(t,"table")),t.editor);if(e){const t=e.getBoundingClientRect();this.resizeHandler.style.top=t.top+"px"}})).on("beforeSetMode.resize-cells",(()=>{this.module.getAllSelectedCells().forEach((e=>{this.module.removeSelection(e),wt.normalizeTable(_.i.closest(e,"table",t.editor))}))}))}observe(t){(0,c.dataBind)(t,Qe)||((0,c.dataBind)(t,Qe,!0),this.j.e.on(t,"mouseleave.resize-cells",(t=>{this.resizeHandler&&this.resizeHandler!==t.relatedTarget&&this.hideResizeHandle()})).on(t,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle((e=>{if(this.j.isLocked)return;const s=_.i.up(e.target,_.i.isCell,t);s&&this.calcHandlePosition(t,s,e.offsetX)}),{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(t){t.events&&(t.e.off(this.j.ow,".resize-cells"),t.e.off(".resize-cells"))}}(0,n.gn)([x.autobind],ts.prototype,"onHandleMouseDown",null),(0,n.gn)([x.autobind],ts.prototype,"onMouseMove",null),(0,n.gn)([x.autobind],ts.prototype,"onMouseUp",null),(0,n.gn)([x.autobind],ts.prototype,"observe",null);const es="table_processor_observer",ss="onMoveTableSelectCell";class is extends H{constructor(){super(...arguments),this.requires=["select"],this.selectedCell=null,this.isSelectionMode=!1}get module(){return this.j.getInstance("Table",this.j.o)}afterInit(t){t.o.table.allowCellSelection&&t.e.on("keydown.select-cells",(t=>{t.key===a.KEY_TAB&&this.unselectCells()})).on("beforeCommand.select-cells",this.onExecCommand).on("afterCommand.select-cells",this.onAfterCommand).on(["clickEditor","mousedownTd","mousedownTh","touchstartTd","touchstartTh"].map((t=>t+".select-cells")).join(" "),this.onStartSelection).on("clickTr clickTbody",(()=>{var t;const e=this.module.getAllSelectedCells().length;if(e)return e>1&&(null===(t=this.j.s.sel)||void 0===t||t.removeAllRanges()),!1}))}onStartSelection(t){if(this.j.o.readonly)return;if(this.unselectCells(),t===this.j.editor)return;const e=_.i.closest(t,"table",this.j.editor);return t&&e?(t.firstChild||t.appendChild(this.j.createInside.element("br")),this.isSelectionMode=!0,this.selectedCell=t,this.module.addSelection(t),this.j.e.on(e,"mousemove.select-cells touchmove.select-cells",this.j.async.throttle(this.onMove.bind(this,e),{label:ss,timeout:this.j.defaultTimeout/2})).on(e,"mouseup.select-cells touchend.select-cells",this.onStopSelection.bind(this,e)),!1):void 0}onOutsideClick(){this.selectedCell=null,this.onRemoveSelection()}onChange(){this.j.isLocked||this.isSelectionMode||this.onRemoveSelection()}onMove(t,e){var s;if(this.j.o.readonly)return;if(this.j.isLockedNotBy(es))return;const i=this.j.ed.elementFromPoint(e.clientX,e.clientY);if(!i)return;const o=_.i.closest(i,["td","th"],t);if(!o||!this.selectedCell)return;o!==this.selectedCell&&this.j.lock(es),this.unselectCells();const n=wt.getSelectedBound(t,[o,this.selectedCell]),r=wt.formalMatrix(t);for(let t=n[0][0];n[1][0]>=t;t+=1)for(let e=n[0][1];n[1][1]>=e;e+=1)this.module.addSelection(r[t][e]);this.module.getAllSelectedCells().length>1&&(null===(s=this.j.s.sel)||void 0===s||s.removeAllRanges()),this.j.e.fire("hidePopup"),e.stopPropagation(),(()=>{const t=this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');o.appendChild(t),this.j.async.setTimeout((()=>{var e;null===(e=t.parentNode)||void 0===e||e.removeChild(t)}),this.j.defaultTimeout/5)})()}onRemoveSelection(t){var e;if(!(null===(e=null==t?void 0:t.buffer)||void 0===e?void 0:e.actionTrigger)&&!this.selectedCell&&this.module.getAllSelectedCells().length)return this.j.unlock(),this.unselectCells(),void this.j.e.fire("hidePopup","cells");this.isSelectionMode=!1,this.selectedCell=null}onStopSelection(t,e){if(!this.selectedCell)return;this.isSelectionMode=!1,this.j.unlock();const s=this.j.ed.elementFromPoint(e.clientX,e.clientY);if(!s)return;const i=_.i.closest(s,["td","th"],t);if(!i)return;const o=_.i.closest(i,"table",t);if(o&&o!==t)return;const n=wt.getSelectedBound(t,[i,this.selectedCell]),r=wt.formalMatrix(t),a=r[n[1][0]][n[1][1]],l=r[n[0][0]][n[0][1]];this.j.e.fire("showPopup",t,(()=>{const t=(0,c.position)(l,this.j),e=(0,c.position)(a,this.j);return{left:t.left,top:t.top,width:e.left-t.left+e.width,height:e.top-t.top+e.height}}),"cells"),(0,c.$$)("table",this.j.editor).forEach((t=>{this.j.e.off(t,"mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells")})),this.j.async.clearTimeout(ss)}unselectCells(t){const e=this.module,s=e.getAllSelectedCells();s.length&&s.forEach((s=>{t&&t===s||e.removeSelection(s)}))}onExecCommand(t){if(/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(t)){t=t.replace("table","");const e=this.module.getAllSelectedCells();if(e.length){const[s]=e;if(!s)return;const i=_.i.closest(s,"table",this.j.editor);if(!i)return;switch(t){case"splitv":wt.splitVertical(i,this.j);break;case"splitg":wt.splitHorizontal(i,this.j);break;case"merge":wt.mergeSelected(i,this.j);break;case"empty":e.forEach((t=>_.i.detach(t)));break;case"bin":_.i.safeRemove(i);break;case"binrow":wt.removeRow(i,s.parentNode.rowIndex);break;case"bincolumn":wt.removeColumn(i,s.cellIndex);break;case"addcolumnafter":case"addcolumnbefore":wt.appendColumn(i,s.cellIndex,"addcolumnafter"===t,this.j.createInside);break;case"addrowafter":case"addrowbefore":wt.appendRow(i,s.parentNode,"addrowafter"===t,this.j.createInside)}}return!1}}onAfterCommand(t){/^justify/.test(t)&&this.module.getAllSelectedCells().forEach((e=>_e(t,e)))}beforeDestruct(t){this.onRemoveSelection(),t.e.off(".select-cells")}}function os(t){t.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation",(e=>{let s,i;if(e.key!==a.KEY_TAB&&e.key!==a.KEY_LEFT&&e.key!==a.KEY_RIGHT&&e.key!==a.KEY_UP&&e.key!==a.KEY_DOWN)return;{if(s=t.s.current(),i=_.i.up(s,(t=>t&&t.nodeName&&/^td|th$/i.test(t.nodeName)),t.editor),!i)return;const o=t.s.range;if(e.key!==a.KEY_TAB&&s!==i&&((e.key===a.KEY_LEFT||e.key===a.KEY_UP)&&(_.i.prev(s,(t=>e.key===a.KEY_UP?_.i.isTag(t,"br"):!!t),i)||e.key!==a.KEY_UP&&_.i.isText(s)&&0!==o.startOffset)||(e.key===a.KEY_RIGHT||e.key===a.KEY_DOWN)&&(_.i.next(s,(t=>e.key===a.KEY_DOWN?_.i.isTag(t,"br"):!!t),i)||e.key!==a.KEY_DOWN&&_.i.isText(s)&&s.nodeValue&&o.startOffset!==s.nodeValue.length)))return}const o=_.i.up(i,(t=>t&&/^table$/i.test(t.nodeName)),t.editor);let n=null;switch(e.key){case a.KEY_TAB:case a.KEY_LEFT:{const s=e.key===a.KEY_LEFT||e.shiftKey?"prev":"next";n=_.i[s](i,(t=>t&&/^td|th$/i.test(t.tagName)),o),n||(wt.appendRow(o,"next"!==s&&o.querySelector("tr"),"next"===s,t.createInside),n=_.i[s](i,_.i.isCell,o));break}case a.KEY_UP:case a.KEY_DOWN:{let t=0,s=0;const r=wt.formalMatrix(o,((e,o,n)=>{e===i&&(t=o,s=n)}));e.key===a.KEY_UP?void 0!==r[t-1]&&(n=r[t-1][s]):void 0!==r[t+1]&&(n=r[t+1][s])}}if(n){if(n.firstChild)e.key===a.KEY_TAB?t.s.select(n,!0):t.s.setCursorIn(n,e.key===a.KEY_RIGHT||e.key===a.KEY_DOWN);else{const e=t.createInside.element("br");n.appendChild(e),t.s.setCursorBefore(e)}return!1}}))}function ns(t){t.registerButton({name:"table",group:"insert"})}(0,n.gn)([x.autobind],is.prototype,"onStartSelection",null),(0,n.gn)([(0,x.watch)(":outsideClick")],is.prototype,"onOutsideClick",null),(0,n.gn)([(0,x.watch)(":change")],is.prototype,"onChange",null),(0,n.gn)([x.autobind],is.prototype,"onRemoveSelection",null),(0,n.gn)([x.autobind],is.prototype,"onStopSelection",null),(0,n.gn)([x.autobind],is.prototype,"onExecCommand",null),(0,n.gn)([x.autobind],is.prototype,"onAfterCommand",null);class rs extends H{constructor(){super(...arguments),this.isOpened=!1,this.delayShowTimeout=0}afterInit(t){this.container=t.c.div("jodit-tooltip"),(0,j.ZO)(this.j,rs).appendChild(this.container);let e=0;t.e.off(".tooltip").on("showTooltip.tooltip",((s,i)=>{t.async.clearTimeout(e),this.open(s,i)})).on("delayShowTooltip.tooltip",this.delayOpen).on("escape.tooltip",this.close).on("hideTooltip.tooltip change.tooltip scroll.tooltip changePlace.tooltip hidePopup.tooltip closeAllPopups.tooltip",(()=>{this.j.async.clearTimeout(this.delayShowTimeout),e=t.async.setTimeout(this.close,this.j.defaultTimeout)}))}delayOpen(t,e){const s=this.j.o.showTooltipDelay||this.j.defaultTimeout;this.j.async.clearTimeout(this.delayShowTimeout),this.delayShowTimeout=this.j.async.setTimeout((()=>this.open(t,e)),{timeout:s,label:"tooltip"})}open(t,e){this.container.classList.add("jodit-tooltip_visible"),this.container.innerHTML=e,this.isOpened=!0,this.setPosition(t)}setPosition(t){const e=t();(0,c.css)(this.container,{left:e.x,top:e.y})}close(){this.j.async.clearTimeout(this.delayShowTimeout),this.isOpened&&(this.isOpened=!1,this.container.classList.remove("jodit-tooltip_visible"),(0,c.css)(this.container,{left:-5e3}))}beforeDestruct(t){null==t||t.e.off(".tooltip"),this.close(),_.i.safeRemove(this.container)}}function as(t){t.registerButton({name:"preview"})}function ls(t){t.registerButton({name:"print"})}(0,n.gn)([x.autobind],rs.prototype,"delayOpen",null),(0,n.gn)([x.autobind],rs.prototype,"close",null),r.D.prototype.controls.preview={icon:"eye",exec(t){const e=t.getInstance("Dialog",{language:t.o.language,theme:t.o.theme}),s=t.c.div();if((0,c.css)(s,{padding:16}),t.iframe){const i=t.create.element("iframe");(0,c.css)(i,{minWidth:800,minHeight:600,border:0}),s.appendChild(i),e.open(s,t.i18n("Preview"));const o=i.contentWindow;o&&(t.e.fire("generateDocumentStructure.iframe",o.document,t),o.document.body.innerHTML=t.value)}else(0,c.css)(s,{minWidth:1024,minHeight:600,border:0}),s.innerHTML=t.value,e.open(s,t.i18n("Preview"));e.setModal(!0)},mode:a.MODE_SOURCE+a.MODE_WYSIWYG,tooltip:"Preview"},r.D.prototype.controls.print={exec(t){const e=t.create.element("iframe");Object.assign(e.style,{position:"fixed",right:0,bottom:0,width:0,height:0,border:0}),(0,j.ZO)(t,r.D).appendChild(e);const s=()=>{t.e.off(t.ow,"mousemove",s),_.i.safeRemove(e)},i=e.contentWindow;i&&(t.e.on(i,"onbeforeunload onafterprint",s).on(t.ow,"mousemove",s),t.o.iframe?(t.e.fire("generateDocumentStructure.iframe",i.document,t),i.document.body.innerHTML=t.value):(i.document.write('<!doctype html><html lang="'+(0,c.defaultLanguage)(t.o.language)+'"><head><title></title></head><body>'+t.value+"</body></html>"),i.document.close()),i.focus(),i.print())},mode:a.MODE_SOURCE+a.MODE_WYSIWYG,tooltip:"Print"},r.D.prototype.showXPathInStatusbar=!0;class cs extends H{constructor(){super(...arguments),this.onContext=(t,e)=>(this.menu||(this.menu=new g(this.j)),this.menu.show(e.clientX,e.clientY,[{icon:"bin",title:t===this.j.editor?"Clear":"Remove",exec:()=>{t!==this.j.editor?_.i.safeRemove(t):this.j.value="",this.j.setEditorValue()}},{icon:"select-all",title:"Select",exec:()=>{this.j.s.select(t)}}]),!1),this.onSelectPath=(t,e)=>{this.j.s.focus();const s=(0,c.attr)(e.target,"-path")||"/";if("/"===s)return this.j.execCommand("selectall"),!1;try{const t=this.j.ed.evaluate(s,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(t)return this.j.s.select(t),!1}catch(t){}return this.j.s.select(t),!1},this.tpl=(t,e,s,i)=>{const o=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${e}" title="${i}" tabindex="-1"'>${(0,c.trim)(s)}</a></span>`),n=o.firstChild;return this.j.e.on(n,"click",this.onSelectPath.bind(this,t)).on(n,"contextmenu",this.onContext.bind(this,t)),o},this.removeSelectAll=()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)},this.appendSelectAll=()=>{this.removeSelectAll(),this.selectAllButton=P(this.j,{name:"selectall",...this.j.o.controls.selectall}),this.selectAllButton.state.size="tiny",this.container&&this.container.insertBefore(this.selectAllButton.container,this.container.firstChild)},this.calcPathImd=()=>{if(this.isDestructed)return;const t=this.j.s.current();if(this.container&&(this.container.innerHTML=a.INVISIBLE_SPACE),t){let e,s,i;_.i.up(t,(t=>{t&&this.j.editor!==t&&!_.i.isText(t)&&(e=t.nodeName.toLowerCase(),s=(0,c.getXPathByElement)(t,this.j.editor).replace(/^\//,""),i=this.tpl(t,s,e,this.j.i18n("Select %s",e)),this.container&&this.container.insertBefore(i,this.container.firstChild))}),this.j.editor)}this.appendSelectAll()},this.calcPath=this.j.async.debounce(this.calcPathImd,2*this.j.defaultTimeout)}afterInit(){this.j.o.showXPathInStatusbar&&(this.container=this.j.c.div("jodit-xpath"),this.j.e.off(".xpath").on("mouseup.xpath change.xpath keydown.xpath changeSelection.xpath",this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath",(()=>{this.j.o.showXPathInStatusbar&&this.container&&(this.j.statusbar.append(this.container),this.j.getRealMode()===a.MODE_WYSIWYG?this.calcPath():(this.container&&(this.container.innerHTML=a.INVISIBLE_SPACE),this.appendSelectAll()))})),this.calcPath())}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(".xpath"),this.removeSelectAll(),this.menu&&this.menu.destruct(),_.i.safeRemove(this.container),delete this.menu,delete this.container}}var hs=s(52),ds=s(53),us=s(54),ps=s(55),fs=s(56),ms=s(57),gs=s(58),vs=s(59),bs=s(60),ws=s(61),ys=s(62),Cs=s(63),js=s(64),xs=s(65),Es=s(66),Ss=s(67),_s=s(68),ks=s(69),Ts=s(70),Is=s(71),qs=s(72),Ls=s(73),zs=s(74),Ms=s(75),Ps=s(76),Ds=s(77),Ns=s(78),Rs=s(79),As=s(80),Bs=s(81),Os=s(82),Hs=s(83),Fs=s(84),$s=s(85),Ws=s(86),Vs=s(87),Ys=s(88),Us=s(89),Gs=s(90),Ks=s(91),Xs=s(92),Js=s(93),Zs=s(94),Qs=s(95),ti=s(96),ei=s(97),si=s(98),ii=s(99),oi=s(100),ni=s(101),ri=s(102),ai=s(103),li=s(104),ci=s(105),hi=s(106),di=s(107),ui=s(108),pi=s(109),fi=s(110),mi=s(111),gi=s(112),vi=s(113),bi=s(114),wi=s(115),yi=s(116),Ci=s(117),ji=s(118),xi=s(119),Ei=s(120),Si=s(121),_i=s(122),ki=s(123),Ti=s(124),Ii=s(125),qi=s(126),Li=s(127),zi=s(128),Mi=s(129),Pi=s(130),Di=s(131),Ni=s(132);Object.keys(a).forEach((t=>{Jodit[t]=a[t]}));const Ri=t=>"__esModule"!==t;Object.keys(o).filter(Ri).forEach((t=>{k.JO.set(t.replace("_","-"),o[t])})),Object.keys(t).filter(Ri).forEach((e=>{Jodit.modules[e]=t[e]})),Object.keys(x).filter(Ri).forEach((t=>{Jodit.decorators[t]=x[t]})),["Confirm","Alert","Prompt"].forEach((e=>{Jodit[e]=t[e]})),Object.keys(e).filter(Ri).forEach((t=>{Jodit.plugins.add(t,e[t])})),Object.keys(kt).filter(Ri).forEach((t=>{Jodit.lang[t]=kt[t]}))}(),i}()}));
|