@progress/kendo-react-editor 11.1.0-develop.1 → 11.1.0
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/config/defaultStyles.js +4 -1
- package/config/defaultStyles.mjs +4 -1
- package/config/toolsSettings.js +1 -1
- package/config/toolsSettings.mjs +7 -6
- package/dialogs/FindReplace.js +1 -1
- package/dialogs/FindReplace.mjs +152 -98
- package/dist/cdn/js/kendo-react-editor.js +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +174 -172
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-form"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-pdf")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-editor-common","@progress/kendo-svg-icons","@progress/kendo-react-dialogs","@progress/kendo-react-inputs","@progress/kendo-react-form","@progress/kendo-react-intl","@progress/kendo-react-layout","@progress/kendo-react-popup","@progress/kendo-react-dropdowns","@progress/kendo-react-pdf"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactEditor={},e.React,e.PropTypes,e.KendoReactButtons,e.KendoReactCommon,e.KendoEditorCommon,e.KendoSvgIcons,e.KendoReactDialogs,e.KendoReactInputs,e.KendoReactForm,e.KendoReactIntl,e.KendoReactLayout,e.KendoReactPopup,e.KendoReactDropdowns,e.KendoReactPdf)}(this,(function(e,t,l,o,n,r,i,a,s,c,d,p,m,u,g){"use strict";function h(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(l){if("default"!==l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}})),t.default=e,Object.freeze(t)}var f=h(t);const b='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\nhtml {\n min-height: 100%;\n}\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n.k-content > p {\n margin: 0 0 1em;\n}\n.k-content table {\n white-space: pre-wrap;\n}\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\n.ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\n.k-editor-resize-wrap-element table td p,\n.k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n}\n',v='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n',k="editor.bold",y="editor.italic",C="editor.underline",w="editor.strikethrough",S="editor.subscript",E="editor.superscript",x="editor.hyperlink",T="editor.insertFile",P="editor.print",I="editor.selectAll",N="editor.cleanFormatting",R="editor.pdf",L="editor.foregroundColor",A="editor.backgroundColor",B="editor.createTable",D="editor.insertTableHint",M="editor.addRowBefore",F="editor.addRowAfter",z="editor.addColumnBefore",H="editor.addColumnAfter",W="editor.deleteRow",K="editor.deleteColumn",U="editor.deleteTable",O="editor.mergeCells",V="editor.splitCell",_="editor.hyperlink-dialog-title",j="editor.hyperlink-dialog-content-address",q="editor.hyperlink-dialog-content-title",$="editor.hyperlink-dialog-content-newwindow",G="editor.hyperlink-dialog-cancel",J="editor.hyperlink-dialog-insert",Q="editor.insertfile-dialog-title",X="editor.insertfile-dialog-content-address",Y="editor.insertfile-dialog-content-title",Z="editor.insertfile-dialog-cancel",ee="editor.insertfile-dialog-insert",te="editor.image",le="editor.image-dialog-title",oe="editor.image-address",ne="editor.image-title",re="editor.image-altText",ie="editor.image-width",ae="editor.image-height",se="editor.image-cancel",ce="editor.image-insert",de="editor.viewHtml",pe="editor.viewHtml-dialog-title",me="editor.viewHtml-cancel",ue="editor.viewHtml-update",ge="editor.unlink",he="editor.undo",fe="editor.redo",be="editor.fontSize",ve="editor.fontName",ke="editor.format",ye="editor.alignLeft",Ce="editor.alignRight",we="editor.alignCenter",Se="editor.alignJustify",Ee="editor.indent",xe="editor.outdent",Te="editor.orderedList",Pe="editor.bulletList",Ie="editor.findReplace-tool-title",Ne="editor.findReplace-dialog-title",Re="editor.findReplace-tab-find",Le="editor.findReplace-tab-replace",Ae="editor.findReplace-findWhat",Be="editor.findReplace-replaceWith",De="editor.findReplace-replace",Me="editor.findReplace-replaceAll",Fe="editor.findReplace-matchCase",ze="editor.findReplace-matchWord",He="editor.findReplace-matchCyclic",We="editor.findReplace-useRegExp",Ke="editor.findReplace-prevMatch",Ue="editor.findReplace-nextMatch",Oe="editor.findReplace-matches",Ve="editor.iframeTitle",_e="editorTools.foreColorLabel",je="editorTools.backColorLabel",qe="editor.cellProperties",$e="editor.cellPropertiesLeftTop",Ge="editor.cellPropertiesCenterTop",Je="editor.cellPropertiesRightTop",Qe="editor.cellPropertiesLeftMiddle",Xe="editor.cellPropertiesCenterMiddle",Ye="editor.cellPropertiesRightMiddle",Ze="editor.cellPropertiesLeftBottom",et="editor.cellPropertiesCenterBottom",tt="editor.cellPropertiesRightBottom",lt="editor.cellPropertiesNoAlignment",ot="editor.cellPropertiesWrap",nt="editor.cellPropertiesFitToCell",rt="editor.cellPropertiesApplyToAllCells",it="editor.cellPropertiesWidth",at="editor.cellPropertiesApplyToColumn",st="editor.cellPropertiesHeight",ct="editor.cellPropertiesApplyToRow",dt="editor.cellPropertiesAlignment",pt="editor.cellPropertiesTextControl",mt="editor.cellPropertiesCellPadding",ut="editor.cellPropertiesBackground",gt="editor.cellPropertiesBorderWidth",ht="editor.cellPropertiesBorderColor",ft="editor.cellPropertiesBorderStyle",bt="editor.cellPropertiesId",vt="editor.cellPropertiesCssClass",kt="editor.cellPropertiesSave",yt="editor.cellPropertiesCancel",Ct="editor.tableProperties",wt="editor.tablePropertiesAlignLeft",St="editor.tablePropertiesAlignCenter",Et="editor.tablePropertiesAlignRight",xt="editor.tablePropertiesNoAlignment",Tt="editor.tablePropertiesLeft",Pt="editor.tablePropertiesCenter",It="editor.tablePropertiesRight",Nt="editor.tablePropertiesTop",Rt="editor.tablePropertiesBottom",Lt="editor.tablePropertiesNone",At="editor.tablePropertiesUsingScopeAttribute",Bt="editor.tablePropertiesUsingIdAttributes",Dt="editor.tablePropertiesRows",Mt="editor.tablePropertiesColumns",Ft="editor.tablePropertiesWidth",zt="editor.tablePropertiesHeight",Ht="editor.tablePropertiesPosition",Wt="editor.tablePropertiesAlignment",Kt="editor.tablePropertiesCellSpacing",Ut="editor.tablePropertiesCellPadding",Ot="editor.tablePropertiesTableBackground",Vt="editor.tablePropertiesBorderWidth",_t="editor.tablePropertiesBorderColor",jt="editor.tablePropertiesBorderStyle",qt="editor.tablePropertiesCollapseBorders",$t="editor.tablePropertiesID",Gt="editor.tablePropertiesCssClass",Jt="editor.tablePropertiesAccessibility",Qt="editor.tablePropertiesCaption",Xt="editor.tablePropertiesCaptionPosition",Yt="editor.tablePropertiesCaptionAlignment",Zt="editor.tablePropertiesHeaderRows",el="editor.tablePropertiesHeaderCols",tl="editor.tablePropertiesAssociateHeaders",ll="editor.tablePropertiesGeneral",ol="editor.tablePropertiesAdvanced",nl="editor.tablePropertiesSave",rl="editor.tablePropertiesCancel",il="editor.borderStyleNone",al="editor.borderStyleSolid",sl="editor.borderStyleDotted",cl="editor.borderStyleDashed",dl="editor.borderStyleDouble",pl="editor.borderStyleGroove",ml="editor.borderStyleRidge",ul="editor.borderStyleInset",gl="editor.borderStyleOutset",hl="editor.borderStyleInitial",fl="editor.borderStyleInherit",bl="editor.borderStyleHidden",vl="editor.sizeAuto",kl={[k]:"Bold",[y]:"Italic",[C]:"Underline",[w]:"Strikethrough",[S]:"Subscript",[E]:"Superscript",[ge]:"Remove hyperlink",[he]:"Undo",[fe]:"Redo",[be]:"Font Size",[ve]:"Font Name",[ke]:"Format",[ye]:"Align text left",[Ce]:"Align text right",[we]:"Center text",[Se]:"Justify",[Ee]:"Indent",[xe]:"Outdent",[Te]:"Insert ordered list",[Pe]:"Insert unordered list",[P]:"Print",[I]:"Select All",[N]:"Clean formatting",[R]:"Export as PDF",[L]:"Color",[A]:"Background color",[B]:"Create a table",[D]:"Create a {0} x {1} table",[M]:"Add row above",[F]:"Add row below",[z]:"Add column on the left",[H]:"Add column on the right",[W]:"Delete row",[K]:"Delete column",[U]:"Delete table",[O]:"Merge cells",[V]:"Split cell",[x]:"Insert hyperlink",[_]:"Insert hyperlink",[j]:"Web address",[q]:"Title",[$]:"Open link in new window",[G]:"Cancel",[J]:"Insert",[T]:"Insert file",[Q]:"Insert file",[X]:"Web address",[Y]:"Title",[Z]:"Cancel",[ee]:"Insert",[te]:"Insert image",[le]:"Insert image",[oe]:"Web address",[ne]:"Title",[re]:"Alternate text",[ie]:"Width (px)",[ae]:"Height (px)",[se]:"Cancel",[ce]:"Insert",[de]:"View HTML",[pe]:"View HTML",[me]:"Cancel",[ue]:"Update",[Ie]:"Find and Replace",[Ne]:"Find and Replace",[Re]:"Find",[Le]:"Replace",[Ae]:"Find What:",[Be]:"Replace With",[De]:"Replace",[Me]:"Replace All",[Fe]:"Match Case",[ze]:"Match whole word only",[He]:"Match cyclic (Wrap around)",[We]:"Regular Expression",[Ke]:"Prev",[Ue]:"Next",[Oe]:"{0} of {1} matches",[Ve]:"Editable area. Press Alt + F10 for toolbar.",[_e]:"Fore Color",[je]:"Back Color",[qe]:"Cell properties",[$e]:"Left Top",[Ge]:"Center Top",[Je]:"Right Top",[Qe]:"Left Middle",[Xe]:"Center Middle",[Ye]:"Right Middle",[Ze]:"Left Bottom",[et]:"Center Bottom",[tt]:"Right Bottom",[lt]:"No Alignment",[ot]:"Wrap",[nt]:"Fit to cell",[rt]:"Apply to all cells",[it]:"Width",[at]:"apply to column",[st]:"Height",[ct]:"apply to row",[dt]:"Alignment",[pt]:"Text control",[mt]:"Cell padding",[ut]:"Background",[gt]:"Border width",[ht]:"Border color",[ft]:"Border style",[bt]:"ID",[vt]:"CSS class",[kt]:"Save",[yt]:"Cancel",[Ct]:"Table properties",[wt]:"Align Left",[St]:"Align Center",[Et]:"Align Right",[xt]:"No Alignment",[Tt]:"Left",[Pt]:"Center",[It]:"Right",[Nt]:"Top",[Rt]:"Bottom",[Lt]:"None",[At]:"Using 'scope' attribute",[Bt]:"Using 'id' attributes",[Dt]:"Rows",[Mt]:"Columns",[Ft]:"Width",[zt]:"Height",[Ht]:"Position",[Wt]:"Alignment",[Kt]:"Cell spacing",[Ut]:"Cell padding",[Ot]:"Table background",[Vt]:"Border width",[_t]:"Border color",[jt]:"Border style",[qt]:"Collapse borders",[$t]:"ID",[Gt]:"CSS class",[Jt]:"Accessibility",[Qt]:"Caption",[Xt]:"Position",[Yt]:"Alignment",[Zt]:"Header rows",[el]:"Header cols",[tl]:"Associate headers",[ll]:"General",[ol]:"Advanced",[nl]:"Save",[rl]:"Cancel",[il]:"None",[al]:"Solid",[sl]:"Dotted",[cl]:"Dashed",[dl]:"Double",[pl]:"Groove",[ml]:"Ridge",[ul]:"Inset",[gl]:"Outset",[hl]:"Initial",[fl]:"Inherit",[bl]:"Hidden",[vl]:"Auto"},yl={bold:k,italic:y,underline:C,strikethrough:w,subscript:S,superscript:E,unlink:ge,undo:he,redo:fe,fontSize:be,fontName:ve,format:ke,alignLeft:ye,alignRight:Ce,alignCenter:we,alignJustify:Se,indent:Ee,outdent:xe,orderedList:Te,bulletList:Pe,print:P,selectAll:I,cleanFormatting:N,pdf:R,foregroundColor:L,backgroundColor:A,createTable:B,createTableHint:D,addRowBefore:M,addRowAfter:F,addColumnBefore:z,addColumnAfter:H,deleteRow:W,deleteColumn:K,deleteTable:U,mergeCells:O,splitCell:V,insertHyperlink:x,insertHyperlinkDialogTitle:_,insertHyperlinkAddress:j,insertHyperlinkTitle:q,insertHyperlinkNewWindow:$,insertHyperlinkCancel:G,insertHyperlinkInsert:J,insertFile:T,insertFileDialogTitle:Q,insertFileAddress:X,insertFileTitle:Y,insertFileCancel:Z,insertFileInsert:ee,insertImage:te,insertImageDialogTitle:le,insertImageAddress:oe,insertImageTitle:ne,insertImageAltText:re,insertImageWidth:ie,insertImageHeight:ae,insertImageCancel:se,insertImageInsert:ce,viewHtml:de,viewHtmlDialogTitle:pe,viewHtmlCancel:me,viewHtmlUpdate:ue,findReplaceToolTitle:Ie,findReplaceDialogTitle:Ne,findReplaceTabFind:Re,findReplaceTabReplace:Le,findReplaceFindWhat:Ae,findReplaceReplaceWith:Be,findReplaceReplace:De,findReplaceReplaceAll:Me,findReplaceMatchCase:Fe,findReplaceMatchWord:ze,findReplaceMatchCyclic:He,findReplaceUseRegExp:We,findReplacePrevMatch:Ke,findReplaceNextMatch:Ue,findReplaceMatches:Oe,iframeTitle:Ve,foreColorLabel:_e,backColorLabel:je,cellProperties:qe,cellPropertiesLeftTop:$e,cellPropertiesCenterTop:Ge,cellPropertiesRightTop:Je,cellPropertiesLeftMiddle:Qe,cellPropertiesCenterMiddle:Xe,cellPropertiesRightMiddle:Ye,cellPropertiesLeftBottom:Ze,cellPropertiesCenterBottom:et,cellPropertiesRightBottom:tt,cellPropertiesNoAlignment:lt,cellPropertiesWrap:ot,cellPropertiesFitToCell:nt,cellPropertiesApplyToAllCells:rt,cellPropertiesWidth:it,cellPropertiesApplyToColumn:at,cellPropertiesHeight:st,cellPropertiesApplyToRow:ct,cellPropertiesAlignment:dt,cellPropertiesTextControl:pt,cellPropertiesCellPadding:mt,cellPropertiesBackground:ut,cellPropertiesBorderWidth:gt,cellPropertiesBorderColor:ht,cellPropertiesBorderStyle:ft,cellPropertiesId:bt,cellPropertiesCssClass:vt,cellPropertiesSave:kt,cellPropertiesCancel:yt,tableProperties:Ct,tablePropertiesAlignLeft:wt,tablePropertiesAlignCenter:St,tablePropertiesAlignRight:Et,tablePropertiesNoAlignment:xt,tablePropertiesLeft:Tt,tablePropertiesCenter:Pt,tablePropertiesRight:It,tablePropertiesTop:Nt,tablePropertiesBottom:Rt,tablePropertiesNone:Lt,tablePropertiesUsingScopeAttribute:At,tablePropertiesUsingIdAttributes:Bt,tablePropertiesRows:Dt,tablePropertiesColumns:Mt,tablePropertiesWidth:Ft,tablePropertiesHeight:zt,tablePropertiesPosition:Ht,tablePropertiesAlignment:Wt,tablePropertiesCellSpacing:Kt,tablePropertiesCellPadding:Ut,tablePropertiesTableBackground:Ot,tablePropertiesBorderWidth:Vt,tablePropertiesBorderColor:_t,tablePropertiesBorderStyle:jt,tablePropertiesCollapseBorders:qt,tablePropertiesId:$t,tablePropertiesCssClass:Gt,tablePropertiesAccessibility:Jt,tablePropertiesCaption:Qt,tablePropertiesCaptionPosition:Xt,tablePropertiesCaptionAlignment:Yt,tablePropertiesHeaderRows:Zt,tablePropertiesHeaderCols:el,tablePropertiesAssociateHeaders:tl,tablePropertiesGeneral:ll,tablePropertiesAdvanced:ol,tablePropertiesSave:nl,tablePropertiesCancel:rl,borderStyleNone:il,borderStyleSolid:al,borderStyleDotted:sl,borderStyleDashed:cl,borderStyleDouble:dl,borderStyleGroove:pl,borderStyleRidge:ml,borderStyleInset:ul,borderStyleOutset:gl,borderStyleInitial:hl,borderStyleInherit:fl,borderStyleHidden:bl,sizeAuto:vl},Cl={...r.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...r.bold,props:{icon:"bold",svgIcon:i.boldIcon,...t},messages:{title:yl.bold},commandName:"Bold"},e.italic={...r.italic,props:{icon:"italic",svgIcon:i.italicIcon,...t},messages:{title:yl.italic},commandName:"Italic"},e.underline={...r.underline,props:{icon:"underline",svgIcon:i.underlineIcon,...t},messages:{title:yl.underline},commandName:"Underline"},e.strikethrough={...r.strikethrough,props:{icon:"strikethrough",svgIcon:i.strikethroughIcon,...t},messages:{title:yl.strikethrough},commandName:"Strikethrough"},e.subscript={...r.subscript,props:{icon:"subscript",svgIcon:i.subscriptIcon,...t},messages:{title:yl.subscript},commandName:"Subscript"},e.superscript={...r.superscript,props:{icon:"supscript",svgIcon:i.supscriptIcon,...t},messages:{title:yl.superscript},commandName:"Superscript"},e.link={...r.link,props:{icon:"link",svgIcon:i.linkIcon,...t},messages:{insertHyperlink:yl.insertHyperlink,insertHyperlinkDialogTitle:yl.insertHyperlinkDialogTitle,insertHyperlinkAddress:yl.insertHyperlinkAddress,insertHyperlinkTitle:yl.insertHyperlinkTitle,insertHyperlinkNewWindow:yl.insertHyperlinkNewWindow,insertHyperlinkCancel:yl.insertHyperlinkCancel,insertHyperlinkInsert:yl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...r.link,props:{icon:"file-add",svgIcon:i.fileAddIcon,...t},messages:{insertHyperlink:yl.insertFile,insertHyperlinkDialogTitle:yl.insertFileDialogTitle,insertHyperlinkAddress:yl.insertFileAddress,insertHyperlinkTitle:yl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:yl.insertFileCancel,insertHyperlinkInsert:yl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:i.tableAddIcon,...t},messages:{createTable:yl.createTable,createTableHint:yl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:i.tableRowInsertAboveIcon,...t},messages:{title:yl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:i.tableRowInsertBelowIcon,...t},messages:{title:yl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:i.tableColumnInsertLeftIcon,...t},messages:{title:yl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:i.tableColumnInsertRightIcon,...t},messages:{title:yl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:i.tableRowDeleteIcon,...t},messages:{title:yl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:i.tableColumnDeleteIcon,...t},messages:{title:yl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:i.tableDeleteIcon,...t},messages:{title:yl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:i.cellsMergeIcon,...t},messages:{title:yl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:i.cellSplitHorizontallyIcon,...t},messages:{title:yl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:i.printIcon,...t},messages:{title:yl.print}},e.selectAll={props:{icon:"select-all",svgIcon:i.selectAllIcon,...t},messages:{title:yl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:i.filePdfIcon,...t},messages:{title:yl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:i.clearCssIcon,...t},messages:{title:yl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:i.imageIcon,...t},messages:{insertImage:yl.insertImage,insertImageDialogTitle:yl.insertImageDialogTitle,insertImageAddress:yl.insertImageAddress,insertImageTitle:yl.insertImageTitle,insertImageAltText:yl.insertImageAltText,insertImageWidth:yl.insertImageWidth,insertImageHeight:yl.insertImageHeight,insertImageCancel:yl.insertImageCancel,insertImageInsert:yl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:i.codeIcon,...t},messages:{viewHtml:yl.viewHtml,viewHtmlDialogTitle:yl.viewHtmlDialogTitle,viewHtmlCancel:yl.viewHtmlCancel,viewHtmlUpdate:yl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:i.binocularsIcon,...t},messages:{findReplaceToolTitle:yl.findReplaceToolTitle,findReplaceDialogTitle:yl.findReplaceDialogTitle,findReplaceTabFind:yl.findReplaceTabFind,findReplaceTabReplace:yl.findReplaceTabReplace,findReplaceFindWhat:yl.findReplaceFindWhat,findReplaceReplaceWith:yl.findReplaceReplaceWith,findReplaceReplace:yl.findReplaceReplace,findReplaceReplaceAll:yl.findReplaceReplaceAll,findReplaceMatchCase:yl.findReplaceMatchCase,findReplaceMatchWord:yl.findReplaceMatchWord,findReplaceMatchCyclic:yl.findReplaceMatchCyclic,findReplaceUseRegExp:yl.findReplaceUseRegExp,findReplacePrevMatch:yl.findReplacePrevMatch,findReplaceNextMatch:yl.findReplaceNextMatch,findReplaceMatches:yl.findReplaceMatches}},e.unlink={...r.link,props:{icon:"unlink",svgIcon:i.unlinkIcon,...t},messages:{title:yl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:i.undoIcon,...t},messages:{title:yl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:i.redoIcon,...t},messages:{title:yl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:kl[yl.fontSize],value:"",localizationKey:yl.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},e.fontName={style:"font-family",defaultItem:{text:kl[yl.fontName],value:"",localizationKey:yl.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},e.formatBlock={defaultItem:{text:kl[yl.format],value:"",localizationKey:yl.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},e.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:i.foregroundColorIcon,view:"palette",title:yl.foregroundColor,ariaLabel:yl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:i.dropletIcon,view:"palette",title:yl.backgroundColor,ariaLabel:yl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...r.alignLeftRules],props:{icon:"align-left",svgIcon:i.alignLeftIcon,...t},messages:{title:yl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...r.alignRightRules],props:{icon:"align-right",svgIcon:i.alignRightIcon,...t},messages:{title:yl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...r.alignCenterRules],props:{icon:"align-center",svgIcon:i.alignCenterIcon,...t},messages:{title:yl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...r.alignJustifyRules],props:{icon:"align-justify",svgIcon:i.alignJustifyIcon,...t},messages:{title:yl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...r.alignRemoveRules],props:{icon:"align-remove",svgIcon:i.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:r.indentRules.nodes,listsTypes:Cl,props:{icon:"indent",svgIcon:i.indentIcon,...t},messages:{title:yl.indent},commandName:"Indent"},e.outdent={actions:r.outdentRules.nodes,listsTypes:Cl,props:{icon:"outdent",svgIcon:i.outdentIcon,...t},messages:{title:yl.outdent},commandName:"Outdent"},e.orderedList={listType:Cl.orderedList,props:{icon:"list-ordered",svgIcon:i.listOrderedIcon,...t},messages:{title:yl.orderedList},commandName:"OrderedList",types:{...Cl}},e.bulletList={listType:Cl.bulletList,props:{icon:"list-unordered",svgIcon:i.listUnorderedIcon,...t},messages:{title:yl.bulletList},commandName:"UnorderedList",types:{...Cl}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let wl=class extends f.Component{constructor(){super(...arguments),this.href=null,this.title=null,this.target=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const e=this.props.view,t=this.props.settings.mark,l={href:this.href?this.href.value:void 0,title:this.title?this.title.value:void 0,target:this.target&&this.target.element&&this.target.element.checked?"_blank":void 0};r.applyLink({mark:t,attrs:l},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:n}=this.props,i=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:m,insertHyperlinkTitle:u,insertHyperlinkNewWindow:g,insertHyperlinkCancel:h,insertHyperlinkInsert:b}=t.messages,v=!!e&&r.getMark(e.state,e.state.schema.marks[t.mark]),k=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},i.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-link-url",ref:e=>{this.href=e&&e.element},defaultValue:v&&v.attrs.href||void 0,autoFocus:!0}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},i.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-link-text",ref:e=>{this.title=e&&e.element},defaultValue:v&&v.attrs.title||void 0}))),!1!==t.linkTarget&&f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},f.createElement(s.Checkbox,{id:"k-editor-link-target",ref:e=>{this.target=e},defaultChecked:v&&!!v.attrs.target||void 0}),i.toLanguageString(g,kl[g]))))}),y=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(h,kl[h])),f.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},i.toLanguageString(b,kl[b]))],C=f.createElement(a.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:i.toLanguageString(p,kl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,f.createElement(a.WindowActionsBar,null,...y));return n?n(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(wl);let Sl=class extends f.Component{constructor(){super(...arguments),this.src=null,this.altText=null,this.title=null,this.width=null,this.height=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const{view:e,settings:t}=this.props,l=e.state.schema.nodes[t.node],o={src:this.src?this.src.value:null,title:this.title?this.title.value:null,alt:this.altText?this.altText.value:null,width:this.width?this.width.value:null,height:this.height?this.height.value:null},n=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),i=l.createAndFill(n);i&&r.insertNode(i,!0)(e.state,(l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",n)))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:n}=this.props,{insertImageDialogTitle:i,insertImageAddress:p,insertImageTitle:m,insertImageAltText:u,insertImageWidth:g,insertImageHeight:h,insertImageCancel:b,insertImageInsert:v}=t.messages,k=d.provideLocalizationService(this),y=e&&e.state;let C={};y&&y.selection instanceof r.NodeSelection&&y.selection.node.type===y.schema.nodes[t.node]&&(C=y.selection.node.attrs);const w=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(p,kl[p])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-url",defaultValue:C.src,ref:e=>{this.src=e&&e.element},autoFocus:!0}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-alt",defaultValue:C.alt,ref:e=>{this.altText=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},k.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-title",defaultValue:C.title,ref:e=>{this.title=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},k.toLanguageString(g,kl[g])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-width",defaultValue:C.width,ref:e=>{this.width=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},k.toLanguageString(h,kl[h])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"k-editor-image-height",defaultValue:C.height,ref:e=>{this.height=e&&e.element}}))))}),S=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(b,kl[b])),f.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,kl[v]))],E=f.createElement(a.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(i,kl[i]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,f.createElement(a.WindowActionsBar,null,...S));return n?n(E,{content:w,actionButtons:S}):E}};d.registerForLocalization(Sl);const El=new r.PluginKey("editor-props");let xl=class extends f.Component{constructor(){super(...arguments),this.htmlArea=null,this.textAreaRef=e=>{this.htmlArea=e;const t=e&&e.element.current;t&&(t.style.resize="none")},this.onUpdate=()=>{const{view:e,settings:t}=this.props,l=r.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:o}=El.getState(e.state);r.setHtml(l,t.commandName,{preserveWhitespace:o})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:t,dir:l,render:n}=this.props,i=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:m}=t.messages,u=f.createElement(s.TextArea,{className:"k-editor-textarea",defaultValue:r.indentHtml(r.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),g=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(p,kl[p])),f.createElement(o.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},i.toLanguageString(m,kl[m]))],h=f.createElement(a.Window,{className:"k-editor-window",title:i.toLanguageString(c,kl[c]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!0,initialHeight:400,initialWidth:500},u,f.createElement(a.WindowActionsBar,null,...g));return n?n(h,{content:u,actionButtons:g}):h}};d.registerForLocalization(xl);const Tl={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},Pl={userSelect:"none"},Il=function(e,...t){return t.forEach(((t,l)=>{e=e.replace("{"+l+"}",String(t))})),e},Nl=(e,t)=>t.dataItem.style?f.cloneElement(e,e.props,f.createElement("span",{style:t.dataItem.style},e.props.children)):e,Rl=["px","em","%"],Ll={animate:{openDuration:150,closeDuration:150}},Al=[{textKey:yl.borderStyleNone,text:kl[yl.borderStyleNone],value:"none"},{textKey:yl.borderStyleSolid,text:kl[yl.borderStyleSolid],value:"solid"},{textKey:yl.borderStyleDotted,text:kl[yl.borderStyleDotted],value:"dotted"},{textKey:yl.borderStyleDashed,text:kl[yl.borderStyleDashed],value:"dashed"},{textKey:yl.borderStyleDouble,text:kl[yl.borderStyleDouble],value:"double"},{textKey:yl.borderStyleGroove,text:kl[yl.borderStyleGroove],value:"groove"},{textKey:yl.borderStyleRidge,text:kl[yl.borderStyleRidge],value:"ridge"},{textKey:yl.borderStyleInset,text:kl[yl.borderStyleInset],value:"inset"},{textKey:yl.borderStyleOutset,text:kl[yl.borderStyleOutset],value:"outset"},{textKey:yl.borderStyleInitial,text:kl[yl.borderStyleInitial],value:"initial"},{textKey:yl.borderStyleInherit,text:kl[yl.borderStyleInherit],value:"inherit"},{textKey:yl.borderStyleHidden,text:kl[yl.borderStyleHidden],value:"hidden"}];function Bl(e,t){for(let l=e.depth;l>0;l--){const o=e.node(l);if(t(o))return{node:o,depth:l}}return null}const Dl=e.EditorToolsSettings.findAndReplace;let Ml=class extends f.Component{constructor(e){super(e),this.onTabSelect=e=>{this.setState({selectedTab:e.selected})},this.onClose=()=>{const e=this.props.view,t=e.state,l=t.tr.setSelection(r.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(l)),e.focus(),this.props.onClose.call(void 0)},this.matchesMessage=e=>{const t=this.state.matches,l=this.state.nextMatch;let o=0,n=0;if(t&&l){const e=t.findIndex((e=>e.eq(l)));o=-1===e?t.length:e+1,n=t.length}return Il(e,o,n)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:o,matchCyclic:n,matchWord:i,useRegExp:a}=this.state,s={text:l,matchWord:i,matchCase:o,useRegExp:a,backward:e,matchCyclic:n},c=r.find(t.state,s);if(c){const e=t.state.tr.setSelection(c);e.scrollIntoView(),t.updateState(t.state.apply(e)),this.setState({nextMatch:c})}},this.onReplace=()=>{const e=this.props.view,t=e.state.selection,{replaceText:l}=this.state;if(!t.empty){const o=t.from,n=o+l.length,i=r.replace(t,l,e.state.tr);i.setSelection(r.TextSelection.create(i.doc,o,n)),i.scrollIntoView(),e.dispatch(i),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:o,matchWord:n,useRegExp:i}=this.state,a={text:t,matchWord:n,matchCase:o,useRegExp:i},s=r.replaceAll(e.state,l,a);s&&e.dispatch(s),this.setNextState({})},this.onKeyDown=e=>{13===e.keyCode?this.onFindNext():27===e.keyCode&&this.onClose()},this.onMatchCaseChecked=e=>this.setNextState({matchCase:e.value}),this.onMatchWordChecked=e=>this.setNextState({matchWord:e.value}),this.onMatchCyclicChecked=e=>this.setNextState({matchCyclic:e.value}),this.onUseRegExpChecked=e=>this.setNextState({useRegExp:e.value}),this.onSearchChange=e=>this.setNextState({searchText:e.target.value}),this.onReplaceChange=e=>this.setNextState({replaceText:e.target.value}),this.setNextState=e=>{const t={...this.state,...e,matches:void 0,nextMatch:void 0},l=this.props.view;if(t.searchText){const{searchText:e,matchWord:o,matchCase:n,useRegExp:i,matchCyclic:a}=t,s={text:e,matchWord:o,matchCase:n,useRegExp:i},c=l.state.selection,d=r.findAll(l.state.doc,s),p=e=>!e&&d[0]||d.find((e=>e.from>=c.from))||a&&d[0]||void 0;this.setState((e=>({...t,matches:d,nextMatch:p(e.searchText)})))}else this.setState(t)},this.state={selectedTab:0,searchText:r.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||Dl}componentDidUpdate(e,t){const l=this.props.view,{matches:o=[],nextMatch:n}=this.state;if(t.nextMatch!==n){const e=l.state,t=e.tr,i=[];o.forEach((e=>{i.push({from:e.from,to:e.to,attrs:{class:n&&e.eq(n)?"k-text-selected":"k-text-highlighted"}})})),t.setMeta(r.textHighlightKey,i),t.setSelection(n||r.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:r,findReplaceFindWhat:m,findReplaceReplaceWith:u,findReplaceReplace:g,findReplaceReplaceAll:h,findReplaceMatchCase:b,findReplaceMatchWord:v,findReplaceMatchCyclic:k,findReplaceUseRegExp:y,findReplacePrevMatch:C,findReplaceNextMatch:w,findReplaceMatches:S}=this.settings.messages,{matchCase:E,matchWord:x,matchCyclic:T,useRegExp:P,searchText:I,replaceText:N,nextMatch:R}=this.state,L=f.createElement("div",{className:"k-search-options"},f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-case",checked:E,onChange:this.onMatchCaseChecked}),f.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(b,kl[b]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-whole",checked:x,onChange:this.onMatchWordChecked}),f.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(v,kl[v]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-cyclic",checked:T,onChange:this.onMatchCyclicChecked}),f.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(k,kl[k]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"regular-expression",checked:P,onChange:this.onUseRegExpChecked}),f.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(y,kl[y])))),A=f.createElement("div",{className:"k-matches-container"},f.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},f.createElement(n.IconWrap,{name:"chevron-left",icon:i.chevronLeftIcon}),e.toLanguageString(C,kl[C])),f.createElement("span",null,this.matchesMessage(e.toLanguageString(S,kl[S]))),f.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(w,kl[w]),f.createElement(n.IconWrap,{name:"chevron-right",icon:i.chevronRightIcon}))),B=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"findWhat",type:"text",value:I,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))))}),D=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"replaceWith",type:"text",value:N,onChange:this.onReplaceChange}))))});return f.createElement(a.Window,{title:e.toLanguageString(t,kl[t]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},f.createElement(p.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},f.createElement(p.TabStripTab,{title:e.toLanguageString(l,kl[l])},B,L,A),f.createElement(p.TabStripTab,{title:e.toLanguageString(r,kl[r])},B,D,f.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},f.createElement(o.Button,{disabled:!R,onClick:this.onReplace},e.toLanguageString(g,kl[g])),f.createElement(o.Button,{disabled:!R,onClick:this.onReplaceAll},e.toLanguageString(h,kl[h]))),L,A)))}};d.registerForLocalization(Ml),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends wl{};e.InsertImageDialog=class extends Sl{};e.ViewHtmlDialog=class extends xl{};e.FindAndReplaceDialog=class extends Ml{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:Fl,underline:zl,italic:Hl}=e.EditorToolsSettings,Wl="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,l){return!!r.alignBlocks(t,l)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,l){return r.applyInlineStyle(t,l)(e.state,e.dispatch)},e.applyLink=function(e,t,l){return r.applyLink(t,l)(e.state,e.dispatch)},e.canIndentList=function(e,t){return r.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return r.canInsert(e,t)},e.canOutdentList=function(e,t){return r.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return r.convertMsLists(e)},e.createDocument=function(e,t,l){return r.parseContent(r.trimWhitespace(t),e,void 0!==l?l:{preserveWhitespace:"full"})},e.createTable=function(e,t,l){return r.createTable(e,t,l)},e.formatBlockElements=function(e,t,l){return r.formatBlockElements(t,l)(e.state,e.dispatch)},e.getBlockFormats=function(e){return r.getBlockFormats(e)},e.getHtml=function(e){return r.getHtml(e)},e.getInlineStyles=function(e,t){return r.getInlineStyles(e,t)},e.getMark=function(e,t){return r.getMark(e,t)},e.hasMark=function(e,t){return r.hasMark(e,t)},e.hasNode=function(e,t){return r.hasNode(e,t)},e.indentBlocks=function(e,t,l,o){return!!r.indentBlocks(t,l,o)(e.state,e.dispatch)},e.indentHtml=function(e){return r.indentHtml(e)},e.insertNode=function(e,t,l){r.insertNode(t,l)(e.state,e.dispatch)},e.isAligned=function(e,t){return r.isAligned(e,t)},e.isIndented=function(e,t,l){return r.isIndented(e,t,l)},e.removeComments=function(e){return r.removeComments(e)},e.removeTag=function(e,t){return r.removeTag(e,t)},e.pasteCleanup=function(e,t){return r.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){r.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){r.sanitizeStyleAttr(e)},e.removeAttribute=function(e){r.removeAttribute(e)},e.sanitize=function(e){return r.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return r.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return r.textHighlight(e)},e.imageResizing=function(e){return r.imageResizing(e)},e.tableResizing=function(){return r.tableResizing()},e.setHtml=function(e,t,l,o){const n=r.trimWhitespace(t);r.setHtml(n,l,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,l,o){return r.toggleInlineFormat(t,l,o)(e.state,e.dispatch)},e.toggleList=function(e,t,l){return r.toggleList(e.state,e.dispatch,e,t,l)},e.getShortcuts=function(e){return(e=>{const t=r.chainCommands(r.exitCode,((t,l)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",n=t.schema.nodes[o];return l&&l(t.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0})),l=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>r.toggleInlineFormat(o.bold||Fl)(e,t),"Mod-i":(e,t)=>r.toggleInlineFormat(o.italic||Hl)(e,t),"Mod-u":(e,t)=>r.toggleInlineFormat(o.underline||zl)(e,t),"Mod-z":r.undo,"Shift-Mod-z":r.redo,...Wl?{}:{"Mod-y":r.redo},Backspace:r.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...Wl?{"Ctrl-Enter":t}:{},Enter:(e,t)=>r.splitListItem(e.schema.nodes[l])(e,t),Tab:r.goToNextCell(1),"Shift-Tab":r.goToNextCell(-1)}})(e)},e.propsKey=El,e.imageResizeKey=r.imageResizeKey,e.marks={...r.marks},e.nodes={...r.nodes}})(e.EditorUtils||(e.EditorUtils={}));const Kl=(t,l)=>{const o=l.tr||t.state.tr.setSelection(new r.AllSelection(t.state.doc)).replaceSelectionWith(l.doc||e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Ul="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),Ol={name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"11.1.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},{link:Vl,bold:_l,italic:jl,underline:ql}=e.EditorToolsSettings,$l=class extends f.Component{constructor(t){super(t),this.state={view:void 0,linkDialog:!1},this._element=null,this._contentElement=null,this.iframe=null,this.trOnChange=null,this.htmlOnChange=null,this.showLicenseWatermark=!1,this.focus=()=>{this.view&&this.view.focus()},this.renderDialog=(e,t,l)=>this.state[l]&&f.createElement(e,{view:this.view,settings:t,dir:this.props.dir,onClose:()=>this.setState({[l]:!1})}),this.renderTool=(e,t,l=!1)=>{const n=f.createElement(e,{view:this.view,dir:this.props.dir,key:t,className:l?"k-toolbar-button":void 0});return n.type===o.ToolbarSeparator?f.createElement(e,{key:t}):n},this.updateTools=(e,t)=>{this.setState({view:e})},this.filterTransaction=(e,t)=>{const l={target:this,transaction:e,state:t};return!1!==(this.props.onExecute&&this.props.onExecute.call(void 0,l))},this.onPasteHtml=e=>{if(this.props.onPasteHtml&&this.pasteEvent){const t={target:this,pastedHtml:e,nativeEvent:this.pasteEvent},l=this.props.onPasteHtml.call(void 0,t);if(this.pasteEvent=void 0,"string"==typeof l)return l}return e},this.dispatchTransaction=t=>{const l=t.docChanged;if(this.props.onChange&&l){this.trOnChange=t;const l=t.doc,o=t.doc.type.schema,n={target:this,value:l,html:"",transaction:t,schema:o};Object.defineProperty(n,"html",{get:()=>(this.htmlOnChange=e.EditorUtils.getHtml({doc:l,schema:o}),this.htmlOnChange)}),this.props.onChange.call(void 0,n)}this.view&&(void 0===this.props.value||!l)&&this.view.updateState(this.view.state.apply(t))},this.onFocus=(e,t)=>{if(this.props.onFocus){const e={target:this,nativeEvent:t};this.props.onFocus.call(void 0,e)}return!1},this.onBlur=(e,t)=>{if(this.props.onBlur){const e={target:this,nativeEvent:t};this.props.onBlur.call(void 0,e)}return!1},this.onPaste=(e,t)=>(this.props.onPasteHtml&&(this.pasteEvent=t),!1),this.onIFrameInit=e=>{if(this.props.onIFrameInit){const t={target:this,iframe:e};this.props.onIFrameInit.call(void 0,t)}return!1},this.showLicenseWatermark=!n.validatePackage(Ol,{component:"Editor"})}get value(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!Ul)&&this.initialize()}componentDidUpdate(e){const{value:t}=this.props,l=this.view;void 0===t||!l||(((e,t,l,o,n)=>{"string"==typeof t?o&&t===n?Kl(e,{tr:o}):t!==l&&Kl(e,{html:t}):o&&t.eq(o.doc)?Kl(e,{tr:o}):e.state.doc.eq(t)||Kl(e,{doc:t})})(l,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){var e;this.view&&this.view.destroy(),this._view=void 0;const t=null==(e=this.iframe)?void 0:e.contentWindow;if(t){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const e=t.document.head;for(;e&&e.firstChild;)e.removeChild(e.firstChild)}}render(){const{tools:t=[],defaultEditMode:l="iframe",preserveWhitespace:r="full",style:i,className:a}=this.props,s=d.provideLocalizationService(this);if(this.view){El.getState(this.view.state).preserveWhitespace=r}let c=this.props.contentStyle;void 0===c&&void 0===(i||{}).height&&(c={height:"300px"});const p=t.map(((e,t)=>Array.isArray(e)?f.createElement(o.ButtonGroup,{key:t,className:"k-toolbar-button-group k-button-group-solid"},e.map(((e,t)=>this.renderTool(e,t)))):this.renderTool(e,t,!0)));return f.createElement("div",{ref:e=>{this._element=e},className:n.classNames("k-editor",a,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:i},p.length>0&&f.createElement(o.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},p),"iframe"===l?f.createElement("div",{className:"k-editor-content"},f.createElement("iframe",{onLoad:Ul?()=>{this.initialize()}:void 0,ref:e=>{this.iframe=e},frameBorder:"0",title:s.toLanguageString(yl.iframeTitle,kl[yl.iframeTitle]),style:c,className:"k-iframe"})):f.createElement("div",{style:c,className:"k-editor-content"},f.createElement("div",{ref:e=>{this._contentElement=e},suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(e.EditorDialogs.InsertLinkDialog,Vl,"linkDialog"),this.showLicenseWatermark&&f.createElement(n.WatermarkOverlay,null))}initialize(){const t=this.iframe&&this.iframe.contentWindow;if(t){const e=t.document,l=e.createElement("meta");l.setAttribute("charset","utf-8"),e.head.appendChild(l),this._contentElement=e.createElement("div"),e.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content"),this.iframe&&this.props.onIFrameInit?this.onIFrameInit(this.iframe):[b,v,"rtl"===this.props.dir?"body { direction: rtl }":void 0].forEach((t=>{if(t){const l=e.createElement("style");l.appendChild(e.createTextNode(t)),e.head.appendChild(l)}}))}const l=this._contentElement;if(!l)return;const{preserveWhitespace:n="full"}=this.props,i=[new r.Plugin({view:()=>({update:this.updateTools}),key:new r.PluginKey("toolbar-tools-update-plugin")}),new r.Plugin({filterTransaction:this.filterTransaction,key:new r.PluginKey("onExecute-event-plugin")}),new r.Plugin({key:El,state:{init:()=>({preserveWhitespace:n}),apply:(e,t)=>t}}),r.spacesFix(),r.caretColor(),r.history(),r.dropCursor(),r.gapCursor(),r.tableEditing(),r.cspFix()],a={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:_l,italic:jl,underline:ql}}),"Mod-k":()=>{const{linkDialog:e}=this.state,t=this.view;if(t){const l=t.state,o=l.selection.empty,n=r.getMark(l,l.schema.marks[Vl.mark]);!e&&(!o||n)&&this.setState({linkDialog:!0})}return!e},"Alt-F10":()=>{var e;const t=null==(e=this.element)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(o.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:s="",value:c,onMount:d}=this.props,p=c&&"string"!=typeof c?c:e.EditorUtils.createDocument(new r.Schema({nodes:r.nodes,marks:r.marks}),c||s,{preserveWhitespace:n}),m={state:r.EditorState.create({plugins:[...i,r.keymap(a),r.keymap(r.baseKeymap)],doc:p}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(e,t,l,o)=>{let n=!1;return l.content.nodesBetween(0,l.content.size,(e=>{n=n||"table_caption_external"===e.type.name})),n}},u={plugins:i,shortcuts:a,target:this,viewProps:m,dom:l},g=this._view=d&&d.call(void 0,u)||new r.EditorView({mount:l},m);this.setState({view:g})}};$l.propTypes={defaultContent:l.string,value:l.oneOfType([l.object,l.string]),defaultEditMode:l.oneOf(["iframe","div"]),contentStyle:l.object,dir:l.string,className:l.string,ariaDescribedBy:l.string,ariaLabelledBy:l.string,ariaLabel:l.string,style:l.object,tools:l.arrayOf(l.any),keyboardNavigation:l.bool,resizable:l.bool,preserveWhitespace:l.oneOf([!0,!1,"full"]),onMount:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onPasteHtml:l.func,onExecute:l.func,onIFrameInit:l.func};let Gl=$l;d.registerForLocalization(Gl);let Jl=class extends f.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const o=Math.floor(e/this.props.columns),n=e%this.props.columns,r=n<=l&&o<=t;return f.createElement("span",{className:"k-ct-cell k-disabled"+(r?" k-selected":""),onMouseEnter:()=>this.setState({row:o,col:n}),onClick:()=>this.props.onCellClick.call(void 0,o,n),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:o}=this.state,{onDown:n}=this.props;let r=this.props.createTableMessage;o>-1&&(r=Il(this.props.createTableHintMessage,l+1,o+1));for(let n=0;n<t;n++)e.push(this.renderCell(n,l,o));return[f.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:n,onMouseDown:n},e),f.createElement("div",{className:"k-status",key:"status",onPointerDown:n,onMouseDown:n},r)]}};var Ql,Xl;(e=>{const t=class e extends f.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=e=>{const{anchor:t}=this.props;t&&(t===e.target||t.firstElementChild===e.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(e){e.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:t,anchor:l,dir:o,rows:n=e.defaultProps.rows,columns:r=e.defaultProps.columns}=this.props,i="rtl"===o?"right":"left";return f.createElement(m.Popup,{anchor:l,anchorAlign:{horizontal:i,vertical:"bottom"},popupAlign:{horizontal:i,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===o?{direction:"rtl"}:void 0},f.createElement(Jl,{rows:n,columns:r,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};t.propTypes={show:l.bool.isRequired,createTableMessage:l.string.isRequired,createTableHintMessage:l.string.isRequired,onClose:l.func.isRequired,onTableInsert:l.func.isRequired,anchor:l.any,rows:l.number,columns:l.number,dir:l.string},t.defaultProps={rows:6,columns:8};let o=t;e.InsertTablePopup=o})(Ql||(Ql={})),(e=>{e.createInsertTableTool=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(e,t)=>{const{view:l}=this.props;if(!l)return;const{table:o,table_row:n,table_cell:i}=l.state.schema.nodes,a=r.createTable({table:o,table_row:n,table_cell:i},e,t);a&&r.insertNode(a,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,m=s.toLanguageString(c,kl[c]),u=s.toLanguageString(p,kl[p]),g=!(a&&r.canInsert(a,a.schema.nodes.table)&&!Bl(a.selection.$from,(e=>"table_caption_external"===e.type.name))),h=[f.createElement(o.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",...Tl,title:m,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":g})}),t&&!g&&f.createElement(Ql.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:u,dir:i.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(Xl||(Xl={}));const{alignRemove:Yl}=e.EditorToolsSettings,Zl=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props,i=t&&t.state,a=!!i&&r.isAligned(i,e.actions),s=a?Yl.actions:e.actions,c=a?Yl.commandName:e.commandName,p=d.provideLocalizationService(this),m=e.messages.title,u=f.createElement(o.Button,{onClick:()=>t&&r.alignBlocks(s,c)(t.state,t.dispatch),selected:a,togglable:!0,...Tl,title:p.toLanguageString(m,kl[m]),...e.props,...n});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t};var eo;(e=>{e.createStyleDropDownList=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props,{style:n}=e;if(o){r.applyInlineStyle({style:n,value:l.value},e.commandName)(o.state,o.dispatch);const{syntheticEvent:i}=t;i&&"click"===i.type&&o.focus()}}}render(){const{style:t}=e,{view:l,render:o,data:n,defaultItem:i,...a}=this.props,s=n||e.items;let c=i||e.defaultItem;const p=l?r.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],m=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?m.toLanguageString(c.localizationKey,kl[c.localizationKey]):c.text);let g=1===new Set(p).size?p[0]:null;null===g&&a.defaultValue&&(g=a.defaultValue);const h=f.createElement(u.DropDownList,{value:g&&s.find((e=>e.value===g)),data:s,defaultItem:c,itemRender:Nl,textField:"text",dataItemKey:"value",onChange:this.onChange,style:Pl,leftRightKeysNavigation:!1,title:c&&c.text,...a});return o?o.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(eo||(eo={}));const to=e=>{const{view:t,style:l,colorPickerProps:o,commandName:n}=e,i=o.title,a=o.ariaLabel,{view:c="palette"}=o,p=d.useLocalization(),m=f.useCallback((e=>{t&&(r.applyInlineStyle({style:l,value:e.value},n)(t.state,t.dispatch),"palette"===c&&t.focus())}),[t,l,c,n]);return f.createElement(s.ColorPicker,{onChange:m,onActiveColorClick:m,...o,title:i&&p.toLanguageString(i,kl[i]),ariaLabel:a&&p.toLanguageString(a,kl[a])})};var lo;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props;if(o&&r.formatBlockElements(l.value,e.commandName)(o.state,o.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&o.focus()}}}render(){const{view:t,render:l,data:o,defaultItem:n,...i}=this.props,a=o||e.items;let s=n||e.defaultItem;const c=t&&t.state,p=c?r.getBlockFormats(c):[],m=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?m.toLanguageString(s.localizationKey,kl[s.localizationKey]):s.text);const g=1===new Set(p).size?p[0]:null,h=f.createElement(u.DropDownList,{value:g&&a.find((e=>e.value===g)),onChange:this.onChange,itemRender:Nl,data:a,defaultItem:s,textField:"text",dataItemKey:"value",style:Pl,leftRightKeysNavigation:!1,title:s.text,...i});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(lo||(lo={}));const oo=(e,t)=>{const l=class extends f.Component{render(){const{view:l,render:r,...i}=this.props,a=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),m=f.createElement(o.Button,{onClick:p?void 0:()=>l&&t(l.state,(t=>l.dispatch(t.setMeta("commandName",e.commandName)))),"aria-disabled":!!p||void 0,...Tl,title:a.toLanguageString(s,kl[s]),...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":p})});return r?r.call(void 0,m,{view:l}):m}};return d.registerForLocalization(l),l};var no,ro,io;(e=>{e.createUndoTool=e=>oo(e,r.undo),e.createRedoTool=e=>oo(e,r.redo)})(no||(no={})),(e=>{e.createIndentTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a=i.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],m=e.actions,u=!!s&&!!p&&(r.isIndented(s,m,a)||m.some((e=>c&&c[e.node]&&r.hasNode(s,c[e.node]))))&&!r.hasNode(s,p),g=!!s&&r.canIndentAsListItem(s,p),h=u||g,b=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=f.createElement(o.Button,{onClick:k?void 0:()=>{t&&g&&p?r.sinkListItem(p)(t.state,t.dispatch):t&&u&&r.indentBlocks(m,e.commandName,a)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:b.toLanguageString(v,kl[v]),...Tl,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(ro||(ro={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props,i=t&&t.state,{mark:a,altMarks:s,altStyle:c}=e,p={mark:a,altMarks:s,altStyle:c},m=d.provideLocalizationService(this),u=e.messages.title,g=f.createElement(o.Button,{onClick:()=>t&&r.toggleInlineFormat(p,i&&i.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!i&&r.hasMark(i,p),togglable:!0,...Tl,title:m.toLanguageString(u,kl[u]),...e.props,...n});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(io||(io={}));const ao=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:m}=t.messages,u=!c||!s||!r.canInsert(s,c),g=[f.createElement(o.Button,{onClick:u?void 0:this.toggleDialog,"aria-disabled":!!u||void 0,key:"insertImage",...Tl,title:p.toLanguageString(m,kl[m]),...t.props,...a,className:n.classNames(a.className,t.props.className,{"k-disabled":u})}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:a.dir,onClose:this.toggleDialog})||null];return i?i.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var so,co,po;(t=>{t.createLinkTool=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&r.getMark(s,s.schema.marks[t.mark]),m=d.provideLocalizationService(this),{insertHyperlink:u}=t.messages,g=c&&!p,h=[f.createElement(o.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",...Tl,title:m.toLanguageString(u,kl[u]),...t.props,...a,className:n.classNames(a.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:a.dir,view:l,onClose:this.toggleDialog})||null];return i?i.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(so||(so={})),(e=>{e.createListTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props;let i=!1;const a=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,o=r.hasNode(e,l[c.orderedList]),n=r.hasNode(e,l[c.bulletList]);i=p===c.orderedList?o&&!n:!o&&n}const m=f.createElement(o.Button,{onClick:()=>t&&r.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:i,title:a.toLanguageString(s,kl[s]),...Tl,...e.props,...n});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(co||(co={})),(e=>{e.createOutdentTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=i.dir,c=!!a&&r.isIndented(a,e.actions,s),p=a&&a.schema.nodes[e.listsTypes.listItem],m=!!a&&r.canOutdentAsListItem(a,{nodes:e.actions,listsTypes:e.listsTypes}),u=c||m,g=d.provideLocalizationService(this),h=e.messages.title,b=!u,v=f.createElement(o.Button,{onClick:b?void 0:()=>{t&&m&&p?r.liftListItem(p)(t.state,t.dispatch):t&&c&&r.indentBlocks(e.actions,e.commandName,s)(t.state,t.dispatch)},"aria-disabled":!!b||void 0,title:g.toLanguageString(h,kl[h]),...Tl,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":b})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(po||(po={}));const mo=(e,t)=>{const l=r.deleteColumn(e,t);if(l&&!t){const t=r.selectionCell(e),l=t&&t.node(t.depth);if(l&&1===l.content.childCount)return!1}return l},uo=(e,t)=>{const l=r.deleteRow(e,t);if(l&&!t){const t=r.selectionCell(e),l=t&&t.node(t.depth-1);if(l&&1===l.content.childCount)return!1}return l};var go,ho,fo;(e=>{e.createAddRowBeforeTool=e=>oo(e,r.addRowBefore),e.createAddRowAfterTool=e=>oo(e,r.addRowAfter),e.createAddColumnBeforeTool=e=>oo(e,r.addColumnBefore),e.createAddColumnAfterTool=e=>oo(e,r.addColumnAfter),e.createDeleteRowTool=e=>oo(e,uo),e.createDeleteColumnTool=e=>oo(e,mo),e.createDeleteTableTool=e=>oo(e,r.deleteTable),e.createMergeCellsTool=e=>oo(e,r.mergeCells),e.createSplitCellTool=e=>oo(e,r.splitCell)})(go||(go={})),(e=>{e.createUnlinkTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a={mark:e.mark},s=!!t&&r.hasMark(t.state,a),c=d.provideLocalizationService(this),p=e.messages.title,m=!s,u=f.createElement(o.Button,{onClick:m?void 0:()=>t&&r.removeLink(a,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!m||void 0,...Tl,title:c.toLanguageString(p,kl[p]),...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":m})});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(ho||(ho={})),(t=>{t.createViewHtmlTool=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:n,...r}=this.props,i=d.provideLocalizationService(this),a=t.messages.viewHtml,s=[f.createElement(o.Button,{onClick:this.toggleDialog,key:"viewHtml",...Tl,title:i.toLanguageString(a,kl[a]),...t.props,...r}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:l,settings:t,dir:r.dir,onClose:this.toggleDialog})||null];return n?n.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(fo||(fo={}));const{print:bo}=e.EditorToolsSettings,vo=e=>{const{view:t,render:l,settings:r=bo,...i}=e,a=t&&t.dom,s=a&&a.ownerDocument,c=s&&s.defaultView,p=r.messages.title,m=!c||c===window,u=f.useCallback((()=>{c&&c.print()}),[c]),g=f.createElement(o.Button,{onClick:m?void 0:u,"aria-disabled":!!m||void 0,title:d.useLocalization().toLanguageString(p,kl[p]),...Tl,...r.props,...i,className:n.classNames(i.className,r.props.className,{"k-disabled":m})});return l?l.call(void 0,g,{view:t}):g},{pdf:ko,savePdfOptions:yo}=e.EditorToolsSettings,Co=e=>{const{view:t,render:l,settings:n=ko,savePdfOptions:r,savePdfCallback:i,...a}=e,s=n.messages.title,c=f.useCallback((()=>{t&&g.savePDF(t.dom,{...yo,...r||{}},i)}),[t,r,i]),p=f.createElement(o.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,kl[s]),...Tl,...n.props,...a});return l?l.call(void 0,p,{view:t}):p},{selectAll:wo}=e.EditorToolsSettings,So=e=>{const{view:t,render:l,settings:n=wo,...i}=e,a=n.messages.title,s=f.useCallback((()=>{t&&(r.selectAll(t.state,t.dispatch),t.focus())}),[t]),c=f.createElement(o.Button,{onClick:s,title:d.useLocalization().toLanguageString(a,kl[a]),...Tl,...n.props,...i});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:Eo}=e.EditorToolsSettings,xo=r.cleanFormatting(),To=e=>{const{view:t,render:l,settings:r=Eo,...i}=e,a=r.messages.title,s=!t||!xo(t.state),c=f.useCallback((()=>{t&&xo(t.state,(e=>{e.setMeta("commandName",r.commandName),t.dispatch(e)}))}),[t]),p=f.createElement(o.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(a,kl[a]),...Tl,...r.props,...i,className:n.classNames(e.className,r.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},Po=e.EditorToolsSettings.findAndReplace;let Io=class extends f.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...t}=this.props,{props:l}=Po,r=d.provideLocalizationService(this),i=Po.messages.findReplaceToolTitle,a=!e;return[f.createElement(o.Button,{onClick:a?void 0:this.onOpen,"aria-disabled":!!a||void 0,...Tl,title:r.toLanguageString(i,kl[i]),key:"tool",...l,...t,className:n.classNames(t.className,l.className,{"k-disabled":a})}),this.state.showDialog&&e&&f.createElement(Ml,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(Io);const No=(e,t)=>{const{from:l,to:o}=e.selection;let n=null;return e.doc.nodesBetween(l,o,(e=>(n=n||(e.type===t?e:null),!n))),n},Ro=e=>{let t=!1;const l=e.view,n=Cl,i=e.listType,a=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,o=e&&e.schema.nodes;s=o&&No(e,o[n.orderedList]),c=o&&No(e,o[n.bulletList]),t=!!(i===n.orderedList?s&&!c:!s&&c)}if(t&&(s||c)){const e=r.listStyle((s||c).attrs);p=p.map(((t,l)=>({...t,selected:e?t.style===e:0===l})))}return f.createElement("span",{onMouseDown:e=>{e.preventDefault()}},f.createElement(o.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(r.toggleList(l.state,l.dispatch,l,{listType:i,...n,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},o=s||c;if(o&&r.listStyle(o.attrs)!==e.item.style){const e=l.state.selection.$head.posAtIndex(0,-2)-1;l.dispatch(l.state.tr.setNodeMarkup(e,l.state.schema.nodes[i],t))}else r.toggleList(l.state,l.dispatch,l,{listType:i,...n,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:a.toLanguageString(e.titleKey,kl[e.titleKey])}))},Lo=/[\D]+$/,Ao=e=>{const t=e.match(Lo);return t?t[0]:""},Bo=(e,t)=>{var l;const o=Do((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(o)||null,[t+"Unit"]:Ao(o)}},Do=e=>(e||"").split(/\s*;\s*/).filter(Boolean).map((e=>{const t=e.split(/\s*:\s*/);return{[t[0]]:t[1]}})).reduce(((e,t)=>({...e,...t})),{}),Mo=/^.+$/;function Fo(e,t,l){let o;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:n}=((e,t)=>{const l=t.style,o=t.value,n=t.newValue;if(!e)return{changed:!1,style:null};const r=e.split(/\s*;\s*/).filter((e=>!!e)),i=r.filter((e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&o.test(t[1]))}));return n&&i.push(`${l}: ${n}`),{style:i.join("; ")+(i.length?";":""),changed:!!n||i.length!==r.length}})(e.style||"",{style:t,value:Mo,newValue:l});o={...e,style:n}}else if(e.style){const n=Do(e.style);n[t]=l,o={...e,style:Object.keys(n).filter((e=>!!n[e])).reduce(((e,t)=>e+t+": "+n[t]+"; "),"").trim()}}else o=l?{...e,style:t+": "+l+";"}:{...e};return o}const zo=e=>{const t=Bl(e.selection.$from,(e=>"table"===e.type.name)),l=Bl(e.selection.$to,(e=>"table"===e.type.name));return t&&l&&t.depth===l.depth&&t.node.eq(l.node)?(e=>{const{doc:t,selection:l}=e,o=[];return l.ranges.forEach((e=>{const l=e.$from.pos,n=e.$to.pos;t.nodesBetween(l,n,((e,t,l,n)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&o.push({node:e,pos:t})}))})),o})(e).filter((({pos:l})=>{const o=Bl(e.doc.resolve(l),(e=>"table"===e.type.name));return o&&o.depth===t.depth&&t.node.eq(o.node)})):[]},Ho=e=>{const t=[];if(zo(e).length){const l=e.selection.$from,o=Bl(l,(e=>"table"===e.type.spec.tableRole));if(null===o)return t;const n=l.start(o.depth),i=o.node,a=r.TableMap.get(i),s=e.doc;a.map.forEach((e=>{const l=e+n;t.push({pos:l,node:s.nodeAt(l)})}))}return t},Wo="k-colgroup-data",Ko=(e,t,l)=>{const o={cellWidth:null,widthUnit:""},n=t.node,i=l.start(t.depth);if(!n.attrs[Wo])return o;const a=new Set;let s="";const c=r.htmlToFragment(n.attrs[Wo]).firstChild;return e.forEach((e=>{const t=n.resolve(e.pos-i),l=t.parent,o=t.index();let r=0;for(let e=0;e<=o;e++)r+=l.child(e).attrs.colspan;const d=c.children[r-1];d&&(s=d.style.width,a.add(s))})),1===a.size&&s&&(o.cellWidth=parseFloat(s)||null,o.widthUnit=Ao(s)),o},Uo=(e,t,l)=>{const o={cellHeight:null,heightUnit:""},n=t.node,r=l.start(t.depth),i=new Set;let a="";return e.forEach((e=>{var t;const l=n.resolve(e.pos-r).parent;a=Do((null==(t=l.attrs)?void 0:t.style)||"").height||"",i.add(a)})),1===i.size&&a&&(o.cellHeight=parseFloat(a)||null,o.heightUnit=Ao(a)),o},Oo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{var n;o=Do((null==(n=e.node.attrs)?void 0:n.style)||"")[t]||"",l.add(o)})),1===l.size&&o?o:""},Vo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{o=(e.node.attrs||{})[t]||"",l.add(o)})),1===l.size&&o?o:""},_o={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},jo=e=>{const t=zo(e),l=e.selection.$from,o=t.length?Bl(l,(e=>"table"===e.type.spec.tableRole)):null;return o?{..._o,...Ko(t,o,l),...Uo(t,o,l),alignment:{x:Oo(t,"text-align"),y:Oo(t,"vertical-align")},textControl:Oo(t,"white-space"),backgroundColor:Oo(t,"background-color")||void 0,cellPadding:parseFloat(Oo(t,"padding"))||null,borderWidth:parseFloat(Oo(t,"border-width"))||null,borderColor:Oo(t,"border-color")||void 0,borderStyle:Oo(t,"border-style")||null,id:Vo(t,"id"),className:Vo(t,"class")}:_o},qo=(e,t,l)=>{l.forEach((({node:l,pos:o})=>{let n={...l.attrs};n=Fo(n,"border-color",t.borderColor||""),n=Fo(n,"border-style",t.borderStyle||""),n=Fo(n,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),n=Fo(n,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),n=Fo(n,"background-color",t.backgroundColor||""),n=Fo(n,"text-align",t.alignment.x||""),n=Fo(n,"vertical-align",t.alignment.y||""),n=Fo(n,"white-space",t.textControl||""),n.id=t.id||null,n.class=t.className||null,e.setNodeMarkup(o,null,n),"number"==typeof t.cellWidth&&((e,t,l)=>{const o=e.doc.resolve(t),n=o.parent,i=o.index();let a=0;for(let e=0;e<=i;e++)a+=n.child(e).attrs.colspan;const s=o.node(o.depth-1),c=o.posAtIndex(0,o.depth-1)-1;let d,p=s.attrs;if(p&&p[Wo]){const t=r.htmlToFragment(p[Wo]).firstChild;d=t.children[a-1],d.style.width=l,p={...p,[Wo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<n.childCount;e++)t+=n.child(e).attrs.colspan;const o=document.createElement("colgroup"),r=new Array(t);for(let e=0;e<t;e++)r[e]=document.createElement("col"),o.appendChild(r[e]);d=r[i],d.style.width=l,p={...p,[Wo]:"<colgroup>"+r.reduce(((e,t)=>e+t.outerHTML),"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,o,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const o=e.doc.resolve(t),n=o.parent,r=o.posAtIndex(0)-1;e.setNodeMarkup(r,null,Fo(n.attrs,"height",l))})(e,o,t.cellHeight+(t.heightUnit||"px"))}))},$o=(e,t)=>{const l=e.tr,o=t.applyToAll?Ho(e):zo(e);return qo(l,t,o),l},Go=e=>{const{view:t,...l}=e,[n,r]=f.useState(!1),a=d.useLocalization(),s=!(!t||!Bl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=f.useCallback((()=>{r(!0)}),[]),p=f.useCallback((()=>{r(!1),null==t||t.focus()}),[t]),m=f.useCallback((e=>{if(t&&e){const l=$o(t.state,e);l.docChanged&&t.dispatch(l)}p()}),[t,p]);return f.createElement(f.Fragment,null,f.createElement(o.Button,{type:"button",title:a.toLanguageString(yl.cellProperties,kl[yl.cellProperties]),icon:"table-cell-properties",svgIcon:i.tableCellPropertiesIcon,onClick:c,disabled:!s,...Tl,...l}),n&&t&&f.createElement(Zo,{view:t,onCancel:p,onSave:m}))},Jo=[{textKey:yl.cellPropertiesLeftTop,text:kl[yl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:i.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:yl.cellPropertiesCenterTop,text:kl[yl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:i.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:yl.cellPropertiesRightTop,text:kl[yl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:i.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:yl.cellPropertiesLeftMiddle,text:kl[yl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:yl.cellPropertiesCenterMiddle,text:kl[yl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:yl.cellPropertiesRightMiddle,text:kl[yl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:yl.cellPropertiesLeftBottom,text:kl[yl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:i.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:yl.cellPropertiesCenterBottom,text:kl[yl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:i.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:yl.cellPropertiesRightBottom,text:kl[yl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:i.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:yl.cellPropertiesNoAlignment,text:kl[yl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:i.tableAlignRemoveIcon,value:{x:"",y:""}}],Qo=[{textKey:yl.cellPropertiesWrap,text:kl[yl.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:i.textWrapIcon},{textKey:yl.cellPropertiesFitToCell,text:kl[yl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:i.parameterStringIcon}],Xo=(e,t)=>t?f.createElement(f.Fragment,null,f.createElement(s.InputPrefix,null,f.createElement(n.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,Yo=(e,t)=>{const l=f.createElement(f.Fragment,null,f.createElement(s.InputPrefix,null,f.createElement(n.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return f.cloneElement(e,e.props,l)},Zo=e=>{const t=f.useMemo((()=>jo(e.view.state)),[e.view]),l=d.useLocalization(),n=f.useRef(null),r=t.applyToAll,i=f.useRef(null),c=t.cellWidth,p=f.useRef(null);t.widthUnit&&!Rl.includes(t.widthUnit)&&Rl.push(t.widthUnit);const m=t.widthUnit||"",g=f.useRef(null),h=t.cellHeight,b=f.useRef(null);t.heightUnit&&!Rl.includes(t.heightUnit)&&Rl.push(t.heightUnit);const v=t.heightUnit||"",k=f.useRef(null),y=Jo.find((e=>void 0!==e.value.x&&t.alignment&&e.value.x===t.alignment.x&&e.value.y===t.alignment.y))||null,C=f.useRef(null),w=Qo.find((e=>e.value===t.textControl)),S=f.useRef(null),E=t.backgroundColor,x=f.useRef(null),T=t.cellPadding,P=f.useRef(null),I=t.borderWidth,N=f.useRef(null),R=t.borderColor,L=f.useRef(null),A=Al.find((e=>e.value===t.borderStyle)),B=f.useRef(null),D=t.id,M=f.useRef(null),F=t.className,z=f.useCallback((()=>{var t,l,o,r,a,s,c,d,m,u,h,f,v,y,w,E,T,I,R,A;const D={applyToAll:!(null==(l=null==(t=n.current)?void 0:t.element)||!l.checked),cellWidth:(null==(o=i.current)?void 0:o.value)||null,widthUnit:(null==(r=p.current)?void 0:r.value)||"",cellHeight:(null==(a=g.current)?void 0:a.value)||null,heightUnit:(null==(s=b.current)?void 0:s.value)||"",alignment:null==(d=null==(c=k.current)?void 0:c.value)?void 0:d.value,textControl:null==(u=null==(m=C.current)?void 0:m.value)?void 0:u.value,backgroundColor:null==(h=S.current)?void 0:h.value,cellPadding:"number"==typeof(null==(f=x.current)?void 0:f.value)?null==(v=x.current)?void 0:v.value:null,borderWidth:"number"==typeof(null==(y=P.current)?void 0:y.value)?null==(w=P.current)?void 0:w.value:null,borderColor:null==(E=N.current)?void 0:E.value,borderStyle:(null==(I=null==(T=L.current)?void 0:T.value)?void 0:I.value)||null,id:String((null==(R=B.current)?void 0:R.value)||""),className:String((null==(A=M.current)?void 0:A.value)||"")};e.onSave.call(void 0,D)}),[e.onSave]),H=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("div",{className:"k-form-field-wrap"},f.createElement("span",{className:"k-checkbox-wrap"},f.createElement(s.Checkbox,{ref:n,defaultChecked:r})),f.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(yl.cellPropertiesApplyToAllCells,kl[yl.cellPropertiesApplyToAllCells])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesWidth,kl[yl.cellPropertiesWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:i,defaultValue:c,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}),f.createElement("div",{className:"k-form-hint"},l.toLanguageString(yl.cellPropertiesApplyToColumn,kl[yl.cellPropertiesApplyToColumn])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:p,defaultValue:m,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesHeight,kl[yl.cellPropertiesHeight])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:g,defaultValue:h,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}),f.createElement("div",{className:"k-form-hint"},l.toLanguageString(yl.cellPropertiesApplyToRow,kl[yl.cellPropertiesApplyToRow])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:b,defaultValue:v,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesAlignment,kl[yl.cellPropertiesAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:k,defaultValue:y,data:Jo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"text",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesTextControl,kl[yl.cellPropertiesTextControl])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:C,defaultValue:w,data:Qo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesCellPadding,kl[yl.cellPropertiesCellPadding])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:x,defaultValue:T,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBackground,kl[yl.cellPropertiesBackground])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:S,defaultValue:E}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderWidth,kl[yl.cellPropertiesBorderWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:P,defaultValue:I,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderColor,kl[yl.cellPropertiesBorderColor])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:N,defaultValue:R}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderStyle,kl[yl.cellPropertiesBorderStyle])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:L,defaultValue:A,popupSettings:Ll,data:Al,textField:"text",dataItemKey:"value"}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesId,kl[yl.cellPropertiesId])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:B,defaultValue:D}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesCssClass,kl[yl.cellPropertiesCssClass])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:M,defaultValue:F})))))),W=[f.createElement(o.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(yl.cellPropertiesSave,kl[yl.cellPropertiesSave])),f.createElement(o.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(yl.cellPropertiesCancel,kl[yl.cellPropertiesCancel]))];return f.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(yl.cellProperties,kl[yl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,f.createElement(a.WindowActionsBar,{layout:"start"},...W))},en={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},tn={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},ln=e=>{const t=[];for(let l=0;l<e.height;l++){const o=l*e.width,n=o+e.width;t.push(e.map.slice(o,n))}return t},on=e=>{let t=!0,l=!0;return e.content.forEach((e=>{e.content.forEach((e=>{const o="table_header"===e.type.name,n="table_cell"===e.type.name;o&&!e.attrs.scope&&(t=!1),(o&&!e.attrs.id||n&&!e.attrs.headers)&&(l=!1)}))})),t?"scope":l?"id":"none"},nn=e=>{var t,l,o;const n=zo(e),i=e.selection.$from,a=n.length?Bl(i,(e=>"table"===e.type.spec.tableRole)):null;if(!a)return en;const s=Bl(i,(e=>"table_wrapper"===e.type.name));let c="",d={},p={};s&&(p=Do(s.node.attrs.style),s.node.content.forEach((e=>{if("table_caption_external"===e.type.name){const t=r.pmDocToFragment(e);c=r.fragmentToHtml(t),c="<img>"===c?"":c,d=Do(e.attrs.style)}})));const m=Do((null==(t=a.node.attrs)?void 0:t.style)||""),u=r.TableMap.get(a.node),g="auto"===p["margin-left"]&&"auto"===p["margin-right"]?"center":"auto"===p["margin-right"]?"left":"auto"===p["margin-left"]?"right":null,h=((e,t)=>{let l=0,o=0;const n=ln(t);n.forEach((t=>{let o=!0;t.forEach((t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(o=!1)})),o&&l++}));for(let l=0;l<t.width;l++){let r=!0;for(let o=0;o<t.height;o++){const t=n[o]&&n[o][l],i="number"==typeof t&&e.nodeAt(t);i&&"table_header"!==i.type.name&&(r=!1)}r&&o++}return{rows:l,columns:o}})(a.node,u),f=(e=>{const t=new Set;return e.content.forEach((e=>{e.content.forEach((e=>{t.add(Do(e.attrs.style).padding||"")}))})),1===t.size?Array.from(t)[0]:""})(a.node);return{...en,columns:u.width,rows:u.height,...Bo(a.node,"width"),...s&&/%/.test(p.width||"")?Bo(s.node,"width"):{},...Bo(a.node,"height"),textAlign:m["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:m["border-spacing"]?parseFloat(m["border-spacing"]):null,backgroundColor:m["background-color"],borderWidth:m["border-width"]?parseFloat(m["border-width"]):null,borderColor:m["border-color"],borderStyle:m["border-style"]||null,collapseBorders:"collapse"===m["border-collapse"],caption:c||void 0,captionAlignment:d["text-align"]||"",captionPosition:d["caption-side"]||null,headerRows:h.rows,headerColumns:h.columns,associateHeaders:h.rows||h.columns?on(a.node):"none",id:(null==(l=a.node.attrs)?void 0:l.id)||"",className:(null==(o=a.node.attrs)?void 0:o.class)||""}},rn=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},an=(e,t,l,o,n)=>{const i=t+rn(l).pos;if(!e.doc.nodeAt(i))return e;const a=e.doc.resolve(i),s=new r.CellSelection(a,a),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<o;e++)n(d,(e=>{d=d.apply(e)}));return d},sn=(e,t,l,o)=>{let n=e;for(let e=0;e<l;e++){const e=n.doc.nodeAt(t);if(e){const l=t+rn(e).pos,i=n.doc.resolve(l),a=new r.CellSelection(i,i),s=n.tr.setSelection(a);n=n.apply(s),o(n,(e=>{n=n.apply(e)}))}}return n},cn=(e,t,l,o,n)=>{if(t.type.name!==o.name||Object.keys(n).length>0){const r=e.tr.setNodeMarkup(l,o,{...t.attrs,...n});return e.apply(r)}return e},dn=(e,t,l)=>{const o=e.doc.nodeAt(l),n=o&&r.TableMap.get(o);if(!o||!n)return e;const i=ln(n);let a=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],m=(e,t,l,o)=>{const n=[];if(o)for(let l=0;l<e;l++)p[l]&&p[l][t]&&n.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&n.push(p[e][l]);return n.join(" ")};return i.forEach(((e,n)=>{e.forEach(((e,r)=>{const i=o.nodeAt(e);if(i){const o=r<t.headerColumns,u=n<t.headerRows,g={...i.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(i,g),g.headers=null,g.scope=null,u||o?("scope"===t.associateHeaders&&(g.scope=u?"col":"row"),"id"===t.associateHeaders&&(g.id=((e,t)=>{const l=`cell-${e}${t}-${d}`;return p[e]||p.push([]),p[e][t]||p[e].push([]),p[e][t]=l,l})(n,r),(r>0||n>0)&&(g.headers=m(n,r,o,u)||null)),a=cn(a,i,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=m(n,r,t.headerColumns>0,t.headerRows>0)||null),a=cn(a,i,l+e+1,c,g))}}))})),a},pn=(e,t)=>r.parseContent("<p>"+e+"</p>",t).content.firstChild.content,mn=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=Fo(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=Fo(l,"caption-side",e.captionPosition));const o=pn(e.caption,t);return o&&t.nodes.table_caption_external.createAndFill(l,o)||void 0},un=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,gn=(e,t,l,o,n)=>{let r={state:e,pos:l};if(o||!t.position&&!t.caption)o&&(t.position||t.caption||!t.caption&&un(o.node))?(e=((e,t,l,o)=>{let n={...t.attrs};return n=Fo(n,"margin-left",""),n=Fo(n,"margin-right",""),Object.keys(o||{}).forEach((e=>{n=Fo(n,e,(o||{})[e]||"")})),e.apply(e.tr.setNodeMarkup(l,null,n))})(e,o.node,n,t.position&&tn[t.position]),e=((e,t,l,o)=>{let n,r=e;const i=l+2,a=l+1,s=r.schema;if(un(t))if(n=t.firstChild,o.caption){const e=pn(o.caption,s);if(r=r.apply(r.tr.replaceWith(i,i+n.content.size,e)),n=r.doc.nodeAt(a),n){let e={...n.attrs};e=Fo(e,"text-align",o.captionAlignment||""),e=Fo(e,"caption-side",o.captionPosition||""),r=r.apply(r.tr.setNodeAttribute(a,"style",e.style))}}else r=r.apply(r.tr.deleteRange(i,i+n.content.size));else n=mn(o,s),n&&(r=r.apply(r.tr.replaceWith(a,a,n)));return r})(e,o.node,n,t),r={state:e,pos:n}):r=!o||t.position||t.caption?{state:e,pos:l}:{state:e,node:o.node,pos:e.selection.$from.start(o.depth)-1};else{let o={table:"",style:"display: table"};const n=[],i=t.position,a=i&&tn[i];a&&Object.keys(a).forEach((e=>{o=Fo(o,e,a[e]||"")})),"number"==typeof t.width&&"%"===t.widthUnit&&(o=Fo(o,"width",t.width+t.widthUnit));const s=mn(t,e.schema);s&&n.push(s);const c=e.doc.nodeAt(l);n.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(o,n);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);r={state:e=e.apply(t),pos:l}}}const i=o&&r.state.doc.nodeAt(n);if(i){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=Fo(i.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(Do(i.attrs.style||"").width||"")&&(e=Fo(i.attrs,"width","")),e&&(r.state=r.state.apply(r.state.tr.setNodeMarkup(n,null,e)))}return r},hn=(e,t)=>{const l=e.selection.$from,o=Bl(l,(e=>"table"===e.type.spec.tableRole));if(!o)return;const n=l.start(o.depth)-1;let i=((e,t,l,o)=>{let n=e,i=n.doc.nodeAt(t);if(!i)return n;let a=r.TableMap.get(i);return a.width===o&&a.height===l||(o>a.width?n=an(n,t,i,o-a.width,r.addColumnAfter):o<a.width&&(n=sn(n,t,a.width-o,mo)),i=n.doc.nodeAt(t),!i)||(a=r.TableMap.get(i),l>a.height?n=an(n,t,i,l-a.height,r.addRowAfter):l<a.height&&(n=sn(n,t,a.height-l,uo))),n})(e,n,t.rows,t.columns);if(!i)return;const a=i.tr;Ho(i).forEach((e=>{let l={...e.node.attrs};l=Fo(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),a.setNodeMarkup(e.pos,null,l)})),i=i.apply(a),i=((e,t,l)=>{const o=e.doc.nodeAt(l);if(!o)return e;let n={...o.attrs};const r=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);n=Fo(n,"width",r?t.width+t.widthUnit:""),n=Fo(n,"height",null!==t.height?t.height+t.heightUnit:""),n=Fo(n,"text-align",t.textAlign||""),n=Fo(n,"background-color",t.backgroundColor||""),n=Fo(n,"border-width",t.borderWidth?t.borderWidth+"px":""),n=Fo(n,"border-style",t.borderStyle||""),n=Fo(n,"border-color",t.borderColor||""),n=Fo(n,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),n=null!==t.cellSpacing?Fo(n,"border-collapse","unset"):Fo(n,"border-collapse",t.collapseBorders?"collapse":"");const i=tn[t.position||""]||{};Object.keys(i).forEach((e=>{n=Fo(n,e,i[e])})),n.id=t.id||null,n.class=t.className||null;const a=e.tr.setNodeMarkup(l,null,n);return e.apply(a)})(i,t,n),i=dn(i,t,n);const s=Bl(l,(e=>"table_wrapper"===e.type.name)),c=l.start((null==s?void 0:s.depth)||0)-1,d=gn(i,t,n,s,c);i=d.state;const p=d.pos,m=i.doc.nodeAt(d.pos);if(!m)return;const u=p+(s||o).node.content.size,g=e.tr.replaceWith(p,u,m),h=r.Selection.atEnd(m),f=r.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},fn=e=>{const{view:t,...l}=e,n=d.useLocalization(),[r,a]=f.useState(!1),s=!(!t||!Bl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=f.useCallback((()=>{a(!0)}),[]),p=f.useCallback((()=>{a(!1),null==t||t.focus()}),[t]),m=f.useCallback((e=>{if(t&&e){const l=hn(t.state,e);l&&t.dispatch(l)}p()}),[t,p]);return f.createElement(f.Fragment,null,f.createElement(o.Button,{type:"button",title:n.toLanguageString(yl.tableProperties,kl[yl.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:c,disabled:!s,...Tl,...l}),r&&f.createElement(Cn,{onClose:p,onSave:m,view:t}))},bn=[{textKey:yl.tablePropertiesAlignLeft,text:kl[yl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:yl.tablePropertiesAlignCenter,text:kl[yl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:yl.tablePropertiesAlignRight,text:kl[yl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:yl.tablePropertiesNoAlignment,text:kl[yl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],vn=[{textKey:yl.tablePropertiesLeft,text:kl[yl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:yl.tablePropertiesCenter,text:kl[yl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:yl.tablePropertiesRight,text:kl[yl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map((e=>({...e,style:tn[e.value]}))),kn=[{textKey:yl.tablePropertiesTop,text:kl[yl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:yl.tablePropertiesBottom,text:kl[yl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],yn=[{textKey:yl.tablePropertiesNone,text:kl[yl.tablePropertiesNone],value:"none"},{textKey:yl.tablePropertiesUsingScopeAttribute,text:kl[yl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:yl.tablePropertiesUsingIdAttributes,text:kl[yl.tablePropertiesUsingIdAttributes],value:"id"}],Cn=e=>{const t=f.useMemo((()=>{const t=e.view&&e.view.state;return t?nn(t):en}),[e.view]),l=d.useLocalization(),[n,r]=f.useState(0),i=f.useCallback((e=>{r(e.selected)}),[]),c=f.useRef(null),m=f.useRef(null),g=f.useRef(null),h=f.useRef(null),b=f.useRef(null),v=f.useRef(null),k=f.useRef(null),y=f.useRef(null),C=f.useRef(null),w=f.useRef(null),S=f.useRef(null),E=f.useRef(null),x=f.useRef(null),T=f.useRef(null),P=f.useRef(null),I=f.useRef(null),N=f.useRef(null),R=f.useRef(null),L=f.useRef(null),A=f.useRef(null),B=f.useRef(null),D=f.useRef(null),M=f.useRef(null),F=f.useCallback((()=>{var t,l,o,n,r,i,a,s,d,p,u,f,F,z,H,W,K,U,O,V;const _={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=m.current)?void 0:l.value)||0,width:g.current?g.current.value:null,height:h.current?h.current.value:null,cellSpacing:b.current?b.current.value:null,cellPadding:v.current?v.current.value:null,borderWidth:k.current?k.current.value:null,widthUnit:(null==(o=y.current)?void 0:o.value)||"",heightUnit:(null==(n=C.current)?void 0:n.value)||"",position:(null==(i=null==(r=w.current)?void 0:r.value)?void 0:i.value)||null,textAlign:null!=(a=S.current)&&a.value?S.current.value.value:null,borderStyle:null!=(s=E.current)&&s.value?E.current.value.value:null,backgroundColor:null==(d=x.current)?void 0:d.value,borderColor:null==(p=T.current)?void 0:p.value,collapseBorders:!(null==(f=null==(u=P.current)?void 0:u.element)||!f.checked),id:String((null==(F=I.current)?void 0:F.value)||""),className:String((null==(z=N.current)?void 0:z.value)||""),caption:String((null==(H=R.current)?void 0:H.value)||""),headerRows:(null==(W=L.current)?void 0:W.value)||0,headerColumns:(null==(K=A.current)?void 0:K.value)||0,captionAlignment:null!=(U=B.current)&&U.value?B.current.value.value:null,captionPosition:null!=(O=D.current)&&O.value?D.current.value.value:null,associateHeaders:null!=(V=M.current)&&V.value?M.current.value.value:"none"};e.onSave.call(void 0,_)}),[e.onSave]),z=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesRows,kl[yl.tablePropertiesRows])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:c,defaultValue:t.rows,min:1}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesColumns,kl[yl.tablePropertiesColumns])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:m,defaultValue:t.columns,min:1}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesWidth,kl[yl.tablePropertiesWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:g,defaultValue:t.width,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:y,defaultValue:t.widthUnit,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeight,kl[yl.tablePropertiesHeight])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:C,defaultValue:t.heightUnit,data:Rl.filter((e=>"%"!==e)),popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesPosition,kl[yl.tablePropertiesPosition])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:w,defaultValue:vn.find((e=>e.value===t.position)),popupSettings:Ll,data:vn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesAlignment,kl[yl.tablePropertiesAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:S,defaultValue:bn.find((e=>e.value===t.textAlign)),data:bn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCellSpacing,kl[yl.tablePropertiesCellSpacing])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:b,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto]),min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCellPadding,kl[yl.tablePropertiesCellPadding])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto]),min:0}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesTableBackground,kl[yl.tablePropertiesTableBackground])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:x,defaultValue:t.backgroundColor}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderWidth,kl[yl.tablePropertiesBorderWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:k,defaultValue:t.borderWidth,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderColor,kl[yl.tablePropertiesBorderColor])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:T,defaultValue:t.borderColor}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderStyle,kl[yl.tablePropertiesBorderStyle])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:E,defaultValue:Al.find((e=>e.value===t.borderStyle)),popupSettings:Ll,data:Al.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value"}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Checkbox,{ref:P,className:"k-checkbox-wrap",label:l.toLanguageString(yl.tablePropertiesCollapseBorders,kl[yl.tablePropertiesCollapseBorders]),defaultChecked:t.collapseBorders})))))),H=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid"},f.createElement("div",{className:"k-form-field"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesId,kl[yl.tablePropertiesId])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:I,defaultValue:t.id}))),f.createElement("div",{className:"k-form-field"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCssClass,kl[yl.tablePropertiesCssClass])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:N,defaultValue:t.className}))),f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("legend",{className:"k-form-legend"},l.toLanguageString(yl.tablePropertiesAccessibility,kl[yl.tablePropertiesAccessibility])),f.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaption,kl[yl.tablePropertiesCaption])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:R,defaultValue:t.caption}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaptionPosition,kl[yl.tablePropertiesCaptionPosition])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:D,defaultValue:kn.find((e=>e.value===t.captionPosition)),data:kn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaptionAlignment,kl[yl.tablePropertiesCaptionAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:B,defaultValue:bn.find((e=>e.value===t.captionAlignment)),data:bn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeaderRows,kl[yl.tablePropertiesHeaderRows])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:L,defaultValue:t.headerRows,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeaderCols,kl[yl.tablePropertiesHeaderCols])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:A,defaultValue:t.headerColumns,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesAssociateHeaders,kl[yl.tablePropertiesAssociateHeaders])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:M,defaultValue:yn.find((e=>e.value===t.associateHeaders)),data:yn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value"})))))))),W=f.createElement(p.TabStrip,{selected:n,onSelect:i,animation:!1,keepTabsMounted:!0},f.createElement(p.TabStripTab,{title:l.toLanguageString(yl.tablePropertiesGeneral,kl[yl.tablePropertiesGeneral])},z),f.createElement(p.TabStripTab,{title:l.toLanguageString(yl.tablePropertiesAdvanced,kl[yl.tablePropertiesAdvanced])},H)),K=[f.createElement(o.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(yl.tablePropertiesSave,kl[yl.tablePropertiesSave])),f.createElement(o.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(yl.tablePropertiesCancel,kl[yl.tablePropertiesCancel]))];return f.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(yl.tableProperties,kl[yl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,f.createElement(a.WindowActionsBar,{layout:"start"},...K))};e.EditorTools=void 0,(t=>{function l(e){return Zl(e)}t.createAlignTool=l;class o extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=o;class n extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=n;class r extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=r;class a extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return Xl.createInsertTableTool(e)}t.AlignJustify=a,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends Ql.InsertTablePopup{}function p(e){return eo.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class m extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=m;class u extends(p(e.EditorToolsSettings.fontName)){}function g(e){return lo.createFormatBlockDropDownList(e)}t.FontName=u,t.ForeColor=t=>f.createElement(to,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>f.createElement(to,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function b(e){return no.createUndoTool(e)}function v(e){return no.createRedoTool(e)}t.FormatBlock=h,t.createUndoTool=b,t.createRedoTool=v;class k extends(b(e.EditorToolsSettings.undo)){}t.Undo=k;class y extends(v(e.EditorToolsSettings.redo)){}function C(e){return ro.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return io.createInlineFormatTool(e)}t.Indent=w,t.createInlineFormatTool=S;class E extends(S(e.EditorToolsSettings.bold)){}t.Bold=E;class x extends(S(e.EditorToolsSettings.italic)){}t.Italic=x;class T extends(S(e.EditorToolsSettings.underline)){}t.Underline=T;class P extends(S(e.EditorToolsSettings.strikethrough)){}t.Strikethrough=P;class I extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=I;class N extends(S(e.EditorToolsSettings.superscript)){}function R(e){return ao(e)}t.Superscript=N,t.createInsertImageTool=R;class L extends(R(e.EditorToolsSettings.image)){}function A(e){return so.createLinkTool(e)}t.InsertImage=L,t.createLinkTool=A;class B extends(A(e.EditorToolsSettings.link)){}t.Link=B;class D extends(A(e.EditorToolsSettings.insertFile)){}function M(e){return co.createListTool(e)}t.InsertFile=D,t.createListTool=M;class F extends(M(e.EditorToolsSettings.orderedList)){}t.OrderedList=F;class z extends(M(e.EditorToolsSettings.bulletList)){}function H(e){return po.createOutdentTool(e)}t.UnorderedList=z,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:i.listUnorderedIcon,text:"Disc",style:"disc"},{icon:"list-unordered-outline",svgIcon:i.listUnorderedOutlineIcon,text:"Circle",style:"circle"},{icon:"list-unordered-square",svgIcon:i.listUnorderedSquareIcon,text:"Square",style:"square"}];return f.createElement(Ro,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:i.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:i.listOrderedIcon,text:"Decimal"},{icon:"list-roman-upper",svgIcon:i.listRomanUpperIcon,text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",svgIcon:i.listRomanLowerIcon,text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",svgIcon:i.listLatinBigIcon,text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",svgIcon:i.listLatinSmallIcon,text:"Lower latin",style:"lower-latin"}];return f.createElement(Ro,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:i.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=Go,t.TableProperties=fn,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return go.createAddRowBeforeTool(e)}function U(e){return go.createAddRowAfterTool(e)}function O(e){return go.createAddColumnBeforeTool(e)}function V(e){return go.createAddColumnAfterTool(e)}function _(e){return go.createDeleteRowTool(e)}function j(e){return go.createDeleteColumnTool(e)}function q(e){return go.createDeleteTableTool(e)}function $(e){return go.createMergeCellsTool(e)}function G(e){return go.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>f.createElement(vo,{...e}),t.Pdf=e=>f.createElement(Co,{...e}),t.SelectAll=e=>f.createElement(So,{...e}),t.CleanFormatting=e=>f.createElement(To,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=O,t.createAddColumnAfterTool=V,t.createDeleteRowTool=_,t.createDeleteColumnTool=j,t.createDeleteTableTool=q,t.createMergeCellsTool=$,t.createSplitCellTool=G;class J extends(K(e.EditorToolsSettings.addRowBefore)){}t.AddRowBefore=J;class Q extends(U(e.EditorToolsSettings.addRowAfter)){}t.AddRowAfter=Q;class X extends(O(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(V(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(_(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(q(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class oe extends(G(e.EditorToolsSettings.splitCell)){}function ne(e){return ho.createUnlinkTool(e)}t.SplitCell=oe,t.createUnlinkTool=ne;class re extends(ne(e.EditorToolsSettings.unlink)){}function ie(e){return fo.createViewHtmlTool(e)}t.Unlink=re,t.createViewHtmlTool=ie;class ae extends(ie(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ae;t.FindAndReplace=class extends Io{}})(e.EditorTools||(e.EditorTools={}));const wn={Selection:r.Selection,SelectionRange:r.SelectionRange,TextSelection:r.TextSelection,NodeSelection:r.NodeSelection,AllSelection:r.AllSelection,EditorState:r.EditorState,Plugin:r.Plugin,PluginKey:r.PluginKey,Transaction:r.Transaction,Decoration:r.Decoration,DecorationSet:r.DecorationSet,EditorView:r.EditorView,Node:r.Node,ResolvedPos:r.ResolvedPos,NodeRange:r.NodeRange,Fragment:r.Fragment,Slice:r.Slice,ReplaceError:r.ReplaceError,Mark:r.Mark,Schema:r.Schema,NodeType:r.NodeType,MarkType:r.MarkType,ContentMatch:r.ContentMatch,DOMParser:r.DOMParser,DOMSerializer:r.DOMSerializer,Transform:r.Transform,Step:r.Step,StepResult:r.StepResult,joinPoint:r.joinPoint,canJoin:r.canJoin,canSplit:r.canSplit,insertPoint:r.insertPoint,dropPoint:r.dropPoint,liftTarget:r.liftTarget,findWrapping:r.findWrapping,StepMap:r.StepMap,MapResult:r.MapResult,Mapping:r.Mapping,AddMarkStep:r.AddMarkStep,RemoveMarkStep:r.RemoveMarkStep,ReplaceStep:r.ReplaceStep,ReplaceAroundStep:r.ReplaceAroundStep,replaceStep:r.replaceStep,deleteSelection:r.deleteSelection,joinBackward:r.joinBackward,selectNodeBackward:r.selectNodeBackward,joinForward:r.joinForward,selectNodeForward:r.selectNodeForward,joinUp:r.joinUp,joinDown:r.joinDown,lift:r.lift,newlineInCode:r.newlineInCode,exitCode:r.exitCode,createParagraphNear:r.createParagraphNear,liftEmptyBlock:r.liftEmptyBlock,splitBlock:r.splitBlock,splitBlockKeepMarks:r.splitBlockKeepMarks,selectParentNode:r.selectParentNode,selectAll:r.selectAll,wrapIn:r.wrapIn,setBlockType:r.setBlockType,toggleMark:r.toggleMark,autoJoin:r.autoJoin,chainCommands:r.chainCommands,pcBaseKeymap:r.pcBaseKeymap,macBaseKeymap:r.macBaseKeymap,baseKeymap:r.baseKeymap,history:r.history,undo:r.undo,redo:r.redo,undoDepth:r.undoDepth,redoDepth:r.redoDepth,InputRule:r.InputRule,inputRules:r.inputRules,undoInputRule:r.undoInputRule,emDash:r.emDash,ellipsis:r.ellipsis,openDoubleQuote:r.openDoubleQuote,closeDoubleQuote:r.closeDoubleQuote,openSingleQuote:r.openSingleQuote,closeSingleQuote:r.closeSingleQuote,smartQuotes:r.smartQuotes,wrappingInputRule:r.wrappingInputRule,textblockTypeInputRule:r.textblockTypeInputRule,keymap:r.keymap,keydownHandler:r.keydownHandler,orderedList:r.orderedList,bulletList:r.bulletList,listItem:r.listItem,addListNodes:r.addListNodes,wrapInList:r.wrapInList,splitListItem:r.splitListItem,liftListItem:r.liftListItem,sinkListItem:r.sinkListItem,dropCursor:r.dropCursor,gapCursor:r.gapCursor,tableEditing:r.tableEditing,fixTables:r.fixTables,fixTablesKey:r.fixTablesKey,cellAround:r.cellAround,isInTable:r.isInTable,selectionCell:r.selectionCell,moveCellForward:r.moveCellForward,inSameTable:r.inSameTable,findCell:r.findCell,colCount:r.colCount,nextCell:r.nextCell,removeColSpan:r.removeColSpan,addColSpan:r.addColSpan,columnIsHeader:r.columnIsHeader,tableNodes:r.tableNodes,tableNodeTypes:r.tableNodeTypes,CellSelection:r.CellSelection,TableMap:r.TableMap,tableEditingKey:r.tableEditingKey,columnResizing:r.columnResizing,columnResizingPluginKey:r.columnResizingPluginKey,updateColumnsOnResize:r.updateColumnsOnResize,selectedRect:r.selectedRect,addColumn:r.addColumn,addColumnBefore:r.addColumnBefore,addColumnAfter:r.addColumnAfter,deleteColumn:r.deleteColumn,rowIsHeader:r.rowIsHeader,addRow:r.addRow,addRowBefore:r.addRowBefore,addRowAfter:r.addRowAfter,deleteRow:r.deleteRow,mergeCells:r.mergeCells,splitCell:r.splitCell,splitCellWithType:r.splitCellWithType,setCellAttr:r.setCellAttr,toggleHeader:r.toggleHeader,toggleHeaderRow:r.toggleHeaderRow,toggleHeaderColumn:r.toggleHeaderColumn,toggleHeaderCell:r.toggleHeaderCell,goToNextCell:r.goToNextCell,deleteTable:r.deleteTable};Object.defineProperty(e,"getHtml",{enumerable:!0,get:function(){return r.getHtml}}),Object.defineProperty(e,"marks",{enumerable:!0,get:function(){return r.marks}}),Object.defineProperty(e,"nodes",{enumerable:!0,get:function(){return r.nodes}}),Object.defineProperty(e,"parseContent",{enumerable:!0,get:function(){return r.parseContent}}),e.Editor=Gl,e.ProseMirror=wn,e.editorPropsKey=El}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-form"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-pdf")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-editor-common","@progress/kendo-svg-icons","@progress/kendo-react-dialogs","@progress/kendo-react-inputs","@progress/kendo-react-form","@progress/kendo-react-intl","@progress/kendo-react-layout","@progress/kendo-react-labels","@progress/kendo-react-popup","@progress/kendo-react-dropdowns","@progress/kendo-react-pdf"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactEditor={},e.React,e.PropTypes,e.KendoReactButtons,e.KendoReactCommon,e.KendoEditorCommon,e.KendoSvgIcons,e.KendoReactDialogs,e.KendoReactInputs,e.KendoReactForm,e.KendoReactIntl,e.KendoReactLayout,e.KendoReactLabels,e.KendoReactPopup,e.KendoReactDropdowns,e.KendoReactPdf)}(this,(function(e,t,l,o,r,n,i,a,s,c,d,p,m,u,g,h){"use strict";function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(l){if("default"!==l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}})),t.default=e,Object.freeze(t)}var b=f(t);const v='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\nhtml {\n min-height: 100%;\n}\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n.k-content > p {\n margin: 0 0 1em;\n}\n.k-content table {\n white-space: pre-wrap;\n}\n.k-content .k-text-selected {\n color: HighlightText;\n background-color: Highlight;\n}\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\n.ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\n.k-editor-resize-wrap-element table td p,\n.k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n}\n',k='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n .ProseMirror .selectedCell ::selection {\n background-color: transparent;\n }\n',y="editor.bold",C="editor.italic",w="editor.underline",S="editor.strikethrough",E="editor.subscript",x="editor.superscript",T="editor.hyperlink",P="editor.insertFile",I="editor.print",N="editor.selectAll",R="editor.cleanFormatting",L="editor.pdf",A="editor.foregroundColor",B="editor.backgroundColor",D="editor.createTable",M="editor.insertTableHint",z="editor.addRowBefore",F="editor.addRowAfter",H="editor.addColumnBefore",W="editor.addColumnAfter",K="editor.deleteRow",U="editor.deleteColumn",O="editor.deleteTable",V="editor.mergeCells",_="editor.splitCell",j="editor.hyperlink-dialog-title",q="editor.hyperlink-dialog-content-address",$="editor.hyperlink-dialog-content-title",G="editor.hyperlink-dialog-content-newwindow",J="editor.hyperlink-dialog-cancel",Q="editor.hyperlink-dialog-insert",X="editor.insertfile-dialog-title",Y="editor.insertfile-dialog-content-address",Z="editor.insertfile-dialog-content-title",ee="editor.insertfile-dialog-cancel",te="editor.insertfile-dialog-insert",le="editor.image",oe="editor.image-dialog-title",re="editor.image-address",ne="editor.image-title",ie="editor.image-altText",ae="editor.image-width",se="editor.image-height",ce="editor.image-cancel",de="editor.image-insert",pe="editor.viewHtml",me="editor.viewHtml-dialog-title",ue="editor.viewHtml-cancel",ge="editor.viewHtml-update",he="editor.unlink",fe="editor.undo",be="editor.redo",ve="editor.fontSize",ke="editor.fontName",ye="editor.format",Ce="editor.alignLeft",we="editor.alignRight",Se="editor.alignCenter",Ee="editor.alignJustify",xe="editor.indent",Te="editor.outdent",Pe="editor.orderedList",Ie="editor.bulletList",Ne="editor.findReplace-tool-title",Re="editor.findReplace-dialog-title",Le="editor.findReplace-tab-find",Ae="editor.findReplace-tab-replace",Be="editor.findReplace-findWhat",De="editor.findReplace-replaceWith",Me="editor.findReplace-replace",ze="editor.findReplace-replaceAll",Fe="editor.findReplace-matchCase",He="editor.findReplace-matchWord",We="editor.findReplace-matchCyclic",Ke="editor.findReplace-useRegExp",Ue="editor.findReplace-prevMatch",Oe="editor.findReplace-nextMatch",Ve="editor.findReplace-matches",_e="editor.findReplace-invalidRegExp",je="editor.iframeTitle",qe="editorTools.foreColorLabel",$e="editorTools.backColorLabel",Ge="editor.cellProperties",Je="editor.cellPropertiesLeftTop",Qe="editor.cellPropertiesCenterTop",Xe="editor.cellPropertiesRightTop",Ye="editor.cellPropertiesLeftMiddle",Ze="editor.cellPropertiesCenterMiddle",et="editor.cellPropertiesRightMiddle",tt="editor.cellPropertiesLeftBottom",lt="editor.cellPropertiesCenterBottom",ot="editor.cellPropertiesRightBottom",rt="editor.cellPropertiesNoAlignment",nt="editor.cellPropertiesWrap",it="editor.cellPropertiesFitToCell",at="editor.cellPropertiesApplyToAllCells",st="editor.cellPropertiesWidth",ct="editor.cellPropertiesApplyToColumn",dt="editor.cellPropertiesHeight",pt="editor.cellPropertiesApplyToRow",mt="editor.cellPropertiesAlignment",ut="editor.cellPropertiesTextControl",gt="editor.cellPropertiesCellPadding",ht="editor.cellPropertiesBackground",ft="editor.cellPropertiesBorderWidth",bt="editor.cellPropertiesBorderColor",vt="editor.cellPropertiesBorderStyle",kt="editor.cellPropertiesId",yt="editor.cellPropertiesCssClass",Ct="editor.cellPropertiesSave",wt="editor.cellPropertiesCancel",St="editor.tableProperties",Et="editor.tablePropertiesAlignLeft",xt="editor.tablePropertiesAlignCenter",Tt="editor.tablePropertiesAlignRight",Pt="editor.tablePropertiesNoAlignment",It="editor.tablePropertiesLeft",Nt="editor.tablePropertiesCenter",Rt="editor.tablePropertiesRight",Lt="editor.tablePropertiesTop",At="editor.tablePropertiesBottom",Bt="editor.tablePropertiesNone",Dt="editor.tablePropertiesUsingScopeAttribute",Mt="editor.tablePropertiesUsingIdAttributes",zt="editor.tablePropertiesRows",Ft="editor.tablePropertiesColumns",Ht="editor.tablePropertiesWidth",Wt="editor.tablePropertiesHeight",Kt="editor.tablePropertiesPosition",Ut="editor.tablePropertiesAlignment",Ot="editor.tablePropertiesCellSpacing",Vt="editor.tablePropertiesCellPadding",_t="editor.tablePropertiesTableBackground",jt="editor.tablePropertiesBorderWidth",qt="editor.tablePropertiesBorderColor",$t="editor.tablePropertiesBorderStyle",Gt="editor.tablePropertiesCollapseBorders",Jt="editor.tablePropertiesID",Qt="editor.tablePropertiesCssClass",Xt="editor.tablePropertiesAccessibility",Yt="editor.tablePropertiesCaption",Zt="editor.tablePropertiesCaptionPosition",el="editor.tablePropertiesCaptionAlignment",tl="editor.tablePropertiesHeaderRows",ll="editor.tablePropertiesHeaderCols",ol="editor.tablePropertiesAssociateHeaders",rl="editor.tablePropertiesGeneral",nl="editor.tablePropertiesAdvanced",il="editor.tablePropertiesSave",al="editor.tablePropertiesCancel",sl="editor.borderStyleNone",cl="editor.borderStyleSolid",dl="editor.borderStyleDotted",pl="editor.borderStyleDashed",ml="editor.borderStyleDouble",ul="editor.borderStyleGroove",gl="editor.borderStyleRidge",hl="editor.borderStyleInset",fl="editor.borderStyleOutset",bl="editor.borderStyleInitial",vl="editor.borderStyleInherit",kl="editor.borderStyleHidden",yl="editor.sizeAuto",Cl={[y]:"Bold",[C]:"Italic",[w]:"Underline",[S]:"Strikethrough",[E]:"Subscript",[x]:"Superscript",[he]:"Remove hyperlink",[fe]:"Undo",[be]:"Redo",[ve]:"Font Size",[ke]:"Font Name",[ye]:"Format",[Ce]:"Align text left",[we]:"Align text right",[Se]:"Center text",[Ee]:"Justify",[xe]:"Indent",[Te]:"Outdent",[Pe]:"Insert ordered list",[Ie]:"Insert unordered list",[I]:"Print",[N]:"Select All",[R]:"Clean formatting",[L]:"Export as PDF",[A]:"Color",[B]:"Background color",[D]:"Create a table",[M]:"Create a {0} x {1} table",[z]:"Add row above",[F]:"Add row below",[H]:"Add column on the left",[W]:"Add column on the right",[K]:"Delete row",[U]:"Delete column",[O]:"Delete table",[V]:"Merge cells",[_]:"Split cell",[T]:"Insert hyperlink",[j]:"Insert hyperlink",[q]:"Web address",[$]:"Title",[G]:"Open link in new window",[J]:"Cancel",[Q]:"Insert",[P]:"Insert file",[X]:"Insert file",[Y]:"Web address",[Z]:"Title",[ee]:"Cancel",[te]:"Insert",[le]:"Insert image",[oe]:"Insert image",[re]:"Web address",[ne]:"Title",[ie]:"Alternate text",[ae]:"Width (px)",[se]:"Height (px)",[ce]:"Cancel",[de]:"Insert",[pe]:"View HTML",[me]:"View HTML",[ue]:"Cancel",[ge]:"Update",[Ne]:"Find and Replace",[Re]:"Find and Replace",[Le]:"Find",[Ae]:"Replace",[Be]:"Find What:",[De]:"Replace With",[Me]:"Replace",[ze]:"Replace All",[Fe]:"Match Case",[He]:"Match whole word only",[We]:"Match cyclic (Wrap around)",[Ke]:"Regular Expression",[Ue]:"Prev",[Oe]:"Next",[Ve]:"{0} of {1} matches",[_e]:"Invalid regular expression.",[je]:"Editable area. Press Alt + F10 for toolbar.",[qe]:"Fore Color",[$e]:"Back Color",[Ge]:"Cell properties",[Je]:"Left Top",[Qe]:"Center Top",[Xe]:"Right Top",[Ye]:"Left Middle",[Ze]:"Center Middle",[et]:"Right Middle",[tt]:"Left Bottom",[lt]:"Center Bottom",[ot]:"Right Bottom",[rt]:"No Alignment",[nt]:"Wrap",[it]:"Fit to cell",[at]:"Apply to all cells",[st]:"Width",[ct]:"apply to column",[dt]:"Height",[pt]:"apply to row",[mt]:"Alignment",[ut]:"Text control",[gt]:"Cell padding",[ht]:"Background",[ft]:"Border width",[bt]:"Border color",[vt]:"Border style",[kt]:"ID",[yt]:"CSS class",[Ct]:"Save",[wt]:"Cancel",[St]:"Table properties",[Et]:"Align Left",[xt]:"Align Center",[Tt]:"Align Right",[Pt]:"No Alignment",[It]:"Left",[Nt]:"Center",[Rt]:"Right",[Lt]:"Top",[At]:"Bottom",[Bt]:"None",[Dt]:"Using 'scope' attribute",[Mt]:"Using 'id' attributes",[zt]:"Rows",[Ft]:"Columns",[Ht]:"Width",[Wt]:"Height",[Kt]:"Position",[Ut]:"Alignment",[Ot]:"Cell spacing",[Vt]:"Cell padding",[_t]:"Table background",[jt]:"Border width",[qt]:"Border color",[$t]:"Border style",[Gt]:"Collapse borders",[Jt]:"ID",[Qt]:"CSS class",[Xt]:"Accessibility",[Yt]:"Caption",[Zt]:"Position",[el]:"Alignment",[tl]:"Header rows",[ll]:"Header cols",[ol]:"Associate headers",[rl]:"General",[nl]:"Advanced",[il]:"Save",[al]:"Cancel",[sl]:"None",[cl]:"Solid",[dl]:"Dotted",[pl]:"Dashed",[ml]:"Double",[ul]:"Groove",[gl]:"Ridge",[hl]:"Inset",[fl]:"Outset",[bl]:"Initial",[vl]:"Inherit",[kl]:"Hidden",[yl]:"Auto"},wl={bold:y,italic:C,underline:w,strikethrough:S,subscript:E,superscript:x,unlink:he,undo:fe,redo:be,fontSize:ve,fontName:ke,format:ye,alignLeft:Ce,alignRight:we,alignCenter:Se,alignJustify:Ee,indent:xe,outdent:Te,orderedList:Pe,bulletList:Ie,print:I,selectAll:N,cleanFormatting:R,pdf:L,foregroundColor:A,backgroundColor:B,createTable:D,createTableHint:M,addRowBefore:z,addRowAfter:F,addColumnBefore:H,addColumnAfter:W,deleteRow:K,deleteColumn:U,deleteTable:O,mergeCells:V,splitCell:_,insertHyperlink:T,insertHyperlinkDialogTitle:j,insertHyperlinkAddress:q,insertHyperlinkTitle:$,insertHyperlinkNewWindow:G,insertHyperlinkCancel:J,insertHyperlinkInsert:Q,insertFile:P,insertFileDialogTitle:X,insertFileAddress:Y,insertFileTitle:Z,insertFileCancel:ee,insertFileInsert:te,insertImage:le,insertImageDialogTitle:oe,insertImageAddress:re,insertImageTitle:ne,insertImageAltText:ie,insertImageWidth:ae,insertImageHeight:se,insertImageCancel:ce,insertImageInsert:de,viewHtml:pe,viewHtmlDialogTitle:me,viewHtmlCancel:ue,viewHtmlUpdate:ge,findReplaceToolTitle:Ne,findReplaceDialogTitle:Re,findReplaceTabFind:Le,findReplaceTabReplace:Ae,findReplaceFindWhat:Be,findReplaceReplaceWith:De,findReplaceReplace:Me,findReplaceReplaceAll:ze,findReplaceMatchCase:Fe,findReplaceMatchWord:He,findReplaceMatchCyclic:We,findReplaceUseRegExp:Ke,findReplacePrevMatch:Ue,findReplaceNextMatch:Oe,findReplaceMatches:Ve,findReplaceInvalidRegExp:_e,iframeTitle:je,foreColorLabel:qe,backColorLabel:$e,cellProperties:Ge,cellPropertiesLeftTop:Je,cellPropertiesCenterTop:Qe,cellPropertiesRightTop:Xe,cellPropertiesLeftMiddle:Ye,cellPropertiesCenterMiddle:Ze,cellPropertiesRightMiddle:et,cellPropertiesLeftBottom:tt,cellPropertiesCenterBottom:lt,cellPropertiesRightBottom:ot,cellPropertiesNoAlignment:rt,cellPropertiesWrap:nt,cellPropertiesFitToCell:it,cellPropertiesApplyToAllCells:at,cellPropertiesWidth:st,cellPropertiesApplyToColumn:ct,cellPropertiesHeight:dt,cellPropertiesApplyToRow:pt,cellPropertiesAlignment:mt,cellPropertiesTextControl:ut,cellPropertiesCellPadding:gt,cellPropertiesBackground:ht,cellPropertiesBorderWidth:ft,cellPropertiesBorderColor:bt,cellPropertiesBorderStyle:vt,cellPropertiesId:kt,cellPropertiesCssClass:yt,cellPropertiesSave:Ct,cellPropertiesCancel:wt,tableProperties:St,tablePropertiesAlignLeft:Et,tablePropertiesAlignCenter:xt,tablePropertiesAlignRight:Tt,tablePropertiesNoAlignment:Pt,tablePropertiesLeft:It,tablePropertiesCenter:Nt,tablePropertiesRight:Rt,tablePropertiesTop:Lt,tablePropertiesBottom:At,tablePropertiesNone:Bt,tablePropertiesUsingScopeAttribute:Dt,tablePropertiesUsingIdAttributes:Mt,tablePropertiesRows:zt,tablePropertiesColumns:Ft,tablePropertiesWidth:Ht,tablePropertiesHeight:Wt,tablePropertiesPosition:Kt,tablePropertiesAlignment:Ut,tablePropertiesCellSpacing:Ot,tablePropertiesCellPadding:Vt,tablePropertiesTableBackground:_t,tablePropertiesBorderWidth:jt,tablePropertiesBorderColor:qt,tablePropertiesBorderStyle:$t,tablePropertiesCollapseBorders:Gt,tablePropertiesId:Jt,tablePropertiesCssClass:Qt,tablePropertiesAccessibility:Xt,tablePropertiesCaption:Yt,tablePropertiesCaptionPosition:Zt,tablePropertiesCaptionAlignment:el,tablePropertiesHeaderRows:tl,tablePropertiesHeaderCols:ll,tablePropertiesAssociateHeaders:ol,tablePropertiesGeneral:rl,tablePropertiesAdvanced:nl,tablePropertiesSave:il,tablePropertiesCancel:al,borderStyleNone:sl,borderStyleSolid:cl,borderStyleDotted:dl,borderStyleDashed:pl,borderStyleDouble:ml,borderStyleGroove:ul,borderStyleRidge:gl,borderStyleInset:hl,borderStyleOutset:fl,borderStyleInitial:bl,borderStyleInherit:vl,borderStyleHidden:kl,sizeAuto:yl},Sl={...n.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...n.bold,props:{icon:"bold",svgIcon:i.boldIcon,...t},messages:{title:wl.bold},commandName:"Bold"},e.italic={...n.italic,props:{icon:"italic",svgIcon:i.italicIcon,...t},messages:{title:wl.italic},commandName:"Italic"},e.underline={...n.underline,props:{icon:"underline",svgIcon:i.underlineIcon,...t},messages:{title:wl.underline},commandName:"Underline"},e.strikethrough={...n.strikethrough,props:{icon:"strikethrough",svgIcon:i.strikethroughIcon,...t},messages:{title:wl.strikethrough},commandName:"Strikethrough"},e.subscript={...n.subscript,props:{icon:"subscript",svgIcon:i.subscriptIcon,...t},messages:{title:wl.subscript},commandName:"Subscript"},e.superscript={...n.superscript,props:{icon:"supscript",svgIcon:i.supscriptIcon,...t},messages:{title:wl.superscript},commandName:"Superscript"},e.link={...n.link,props:{icon:"link",svgIcon:i.linkIcon,...t},messages:{insertHyperlink:wl.insertHyperlink,insertHyperlinkDialogTitle:wl.insertHyperlinkDialogTitle,insertHyperlinkAddress:wl.insertHyperlinkAddress,insertHyperlinkTitle:wl.insertHyperlinkTitle,insertHyperlinkNewWindow:wl.insertHyperlinkNewWindow,insertHyperlinkCancel:wl.insertHyperlinkCancel,insertHyperlinkInsert:wl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...n.link,props:{icon:"file-add",svgIcon:i.fileAddIcon,...t},messages:{insertHyperlink:wl.insertFile,insertHyperlinkDialogTitle:wl.insertFileDialogTitle,insertHyperlinkAddress:wl.insertFileAddress,insertHyperlinkTitle:wl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:wl.insertFileCancel,insertHyperlinkInsert:wl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:i.tableAddIcon,...t},messages:{createTable:wl.createTable,createTableHint:wl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:i.tableRowInsertAboveIcon,...t},messages:{title:wl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:i.tableRowInsertBelowIcon,...t},messages:{title:wl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:i.tableColumnInsertLeftIcon,...t},messages:{title:wl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:i.tableColumnInsertRightIcon,...t},messages:{title:wl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:i.tableRowDeleteIcon,...t},messages:{title:wl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:i.tableColumnDeleteIcon,...t},messages:{title:wl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:i.tableDeleteIcon,...t},messages:{title:wl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:i.cellsMergeIcon,...t},messages:{title:wl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:i.cellSplitHorizontallyIcon,...t},messages:{title:wl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:i.printIcon,...t},messages:{title:wl.print}},e.selectAll={props:{icon:"select-all",svgIcon:i.selectAllIcon,...t},messages:{title:wl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:i.filePdfIcon,...t},messages:{title:wl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:i.clearCssIcon,...t},messages:{title:wl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:i.imageIcon,...t},messages:{insertImage:wl.insertImage,insertImageDialogTitle:wl.insertImageDialogTitle,insertImageAddress:wl.insertImageAddress,insertImageTitle:wl.insertImageTitle,insertImageAltText:wl.insertImageAltText,insertImageWidth:wl.insertImageWidth,insertImageHeight:wl.insertImageHeight,insertImageCancel:wl.insertImageCancel,insertImageInsert:wl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:i.codeIcon,...t},messages:{viewHtml:wl.viewHtml,viewHtmlDialogTitle:wl.viewHtmlDialogTitle,viewHtmlCancel:wl.viewHtmlCancel,viewHtmlUpdate:wl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:i.binocularsIcon,...t},messages:{findReplaceToolTitle:wl.findReplaceToolTitle,findReplaceDialogTitle:wl.findReplaceDialogTitle,findReplaceTabFind:wl.findReplaceTabFind,findReplaceTabReplace:wl.findReplaceTabReplace,findReplaceFindWhat:wl.findReplaceFindWhat,findReplaceReplaceWith:wl.findReplaceReplaceWith,findReplaceReplace:wl.findReplaceReplace,findReplaceReplaceAll:wl.findReplaceReplaceAll,findReplaceMatchCase:wl.findReplaceMatchCase,findReplaceMatchWord:wl.findReplaceMatchWord,findReplaceMatchCyclic:wl.findReplaceMatchCyclic,findReplaceUseRegExp:wl.findReplaceUseRegExp,findReplacePrevMatch:wl.findReplacePrevMatch,findReplaceNextMatch:wl.findReplaceNextMatch,findReplaceMatches:wl.findReplaceMatches,findReplaceInvalidRegExp:wl.findReplaceInvalidRegExp}},e.unlink={...n.link,props:{icon:"unlink",svgIcon:i.unlinkIcon,...t},messages:{title:wl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:i.undoIcon,...t},messages:{title:wl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:i.redoIcon,...t},messages:{title:wl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:Cl[wl.fontSize],value:"",localizationKey:wl.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},e.fontName={style:"font-family",defaultItem:{text:Cl[wl.fontName],value:"",localizationKey:wl.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},e.formatBlock={defaultItem:{text:Cl[wl.format],value:"",localizationKey:wl.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},e.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:i.foregroundColorIcon,view:"palette",title:wl.foregroundColor,ariaLabel:wl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:i.dropletIcon,view:"palette",title:wl.backgroundColor,ariaLabel:wl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...n.alignLeftRules],props:{icon:"align-left",svgIcon:i.alignLeftIcon,...t},messages:{title:wl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...n.alignRightRules],props:{icon:"align-right",svgIcon:i.alignRightIcon,...t},messages:{title:wl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...n.alignCenterRules],props:{icon:"align-center",svgIcon:i.alignCenterIcon,...t},messages:{title:wl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...n.alignJustifyRules],props:{icon:"align-justify",svgIcon:i.alignJustifyIcon,...t},messages:{title:wl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...n.alignRemoveRules],props:{icon:"align-remove",svgIcon:i.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:n.indentRules.nodes,listsTypes:Sl,props:{icon:"indent",svgIcon:i.indentIcon,...t},messages:{title:wl.indent},commandName:"Indent"},e.outdent={actions:n.outdentRules.nodes,listsTypes:Sl,props:{icon:"outdent",svgIcon:i.outdentIcon,...t},messages:{title:wl.outdent},commandName:"Outdent"},e.orderedList={listType:Sl.orderedList,props:{icon:"list-ordered",svgIcon:i.listOrderedIcon,...t},messages:{title:wl.orderedList},commandName:"OrderedList",types:{...Sl}},e.bulletList={listType:Sl.bulletList,props:{icon:"list-unordered",svgIcon:i.listUnorderedIcon,...t},messages:{title:wl.bulletList},commandName:"UnorderedList",types:{...Sl}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let El=class extends b.Component{constructor(){super(...arguments),this.href=null,this.title=null,this.target=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const e=this.props.view,t=this.props.settings.mark,l={href:this.href?this.href.value:void 0,title:this.title?this.title.value:void 0,target:this.target&&this.target.element&&this.target.element.checked?"_blank":void 0};n.applyLink({mark:t,attrs:l},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:m,insertHyperlinkTitle:u,insertHyperlinkNewWindow:g,insertHyperlinkCancel:h,insertHyperlinkInsert:f}=t.messages,v=!!e&&n.getMark(e.state,e.state.schema.marks[t.mark]),k=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},i.toLanguageString(m,Cl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-url",ref:e=>{this.href=e&&e.element},defaultValue:v&&v.attrs.href||void 0,autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},i.toLanguageString(u,Cl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-text",ref:e=>{this.title=e&&e.element},defaultValue:v&&v.attrs.title||void 0}))),!1!==t.linkTarget&&b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},b.createElement(s.Checkbox,{id:"k-editor-link-target",ref:e=>{this.target=e},defaultChecked:v&&!!v.attrs.target||void 0}),i.toLanguageString(g,Cl[g]))))}),y=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(h,Cl[h])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},i.toLanguageString(f,Cl[f]))],C=b.createElement(a.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:i.toLanguageString(p,Cl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,b.createElement(a.WindowActionsBar,null,...y));return r?r(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(El);let xl=class extends b.Component{constructor(){super(...arguments),this.src=null,this.altText=null,this.title=null,this.width=null,this.height=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const{view:e,settings:t}=this.props,l=e.state.schema.nodes[t.node],o={src:this.src?this.src.value:null,title:this.title?this.title.value:null,alt:this.altText?this.altText.value:null,width:this.width?this.width.value:null,height:this.height?this.height.value:null},r=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),i=l.createAndFill(r);i&&n.insertNode(i,!0)(e.state,(l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",r)))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,{insertImageDialogTitle:i,insertImageAddress:p,insertImageTitle:m,insertImageAltText:u,insertImageWidth:g,insertImageHeight:h,insertImageCancel:f,insertImageInsert:v}=t.messages,k=d.provideLocalizationService(this),y=e&&e.state;let C={};y&&y.selection instanceof n.NodeSelection&&y.selection.node.type===y.schema.nodes[t.node]&&(C=y.selection.node.attrs);const w=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(p,Cl[p])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-url",defaultValue:C.src,ref:e=>{this.src=e&&e.element},autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(u,Cl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-alt",defaultValue:C.alt,ref:e=>{this.altText=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},k.toLanguageString(m,Cl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-title",defaultValue:C.title,ref:e=>{this.title=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},k.toLanguageString(g,Cl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-width",defaultValue:C.width,ref:e=>{this.width=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},k.toLanguageString(h,Cl[h])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"k-editor-image-height",defaultValue:C.height,ref:e=>{this.height=e&&e.element}}))))}),S=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(f,Cl[f])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,Cl[v]))],E=b.createElement(a.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(i,Cl[i]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,b.createElement(a.WindowActionsBar,null,...S));return r?r(E,{content:w,actionButtons:S}):E}};d.registerForLocalization(xl);const Tl=new n.PluginKey("editor-props");let Pl=class extends b.Component{constructor(){super(...arguments),this.htmlArea=null,this.textAreaRef=e=>{this.htmlArea=e;const t=e&&e.element.current;t&&(t.style.resize="none")},this.onUpdate=()=>{const{view:e,settings:t}=this.props,l=n.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:o}=Tl.getState(e.state);n.setHtml(l,t.commandName,{preserveWhitespace:o})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:m}=t.messages,u=b.createElement(s.TextArea,{className:"k-editor-textarea",defaultValue:n.indentHtml(n.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),g=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(p,Cl[p])),b.createElement(o.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},i.toLanguageString(m,Cl[m]))],h=b.createElement(a.Window,{className:"k-editor-window",title:i.toLanguageString(c,Cl[c]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!0,initialHeight:400,initialWidth:500},u,b.createElement(a.WindowActionsBar,null,...g));return r?r(h,{content:u,actionButtons:g}):h}};d.registerForLocalization(Pl);const Il={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},Nl={userSelect:"none"},Rl=function(e,...t){return t.forEach(((t,l)=>{e=e.replace("{"+l+"}",String(t))})),e},Ll=(e,t)=>t.dataItem.style?b.cloneElement(e,e.props,b.createElement("span",{style:t.dataItem.style},e.props.children)):e,Al=["px","em","%"],Bl={animate:{openDuration:150,closeDuration:150}},Dl=[{textKey:wl.borderStyleNone,text:Cl[wl.borderStyleNone],value:"none"},{textKey:wl.borderStyleSolid,text:Cl[wl.borderStyleSolid],value:"solid"},{textKey:wl.borderStyleDotted,text:Cl[wl.borderStyleDotted],value:"dotted"},{textKey:wl.borderStyleDashed,text:Cl[wl.borderStyleDashed],value:"dashed"},{textKey:wl.borderStyleDouble,text:Cl[wl.borderStyleDouble],value:"double"},{textKey:wl.borderStyleGroove,text:Cl[wl.borderStyleGroove],value:"groove"},{textKey:wl.borderStyleRidge,text:Cl[wl.borderStyleRidge],value:"ridge"},{textKey:wl.borderStyleInset,text:Cl[wl.borderStyleInset],value:"inset"},{textKey:wl.borderStyleOutset,text:Cl[wl.borderStyleOutset],value:"outset"},{textKey:wl.borderStyleInitial,text:Cl[wl.borderStyleInitial],value:"initial"},{textKey:wl.borderStyleInherit,text:Cl[wl.borderStyleInherit],value:"inherit"},{textKey:wl.borderStyleHidden,text:Cl[wl.borderStyleHidden],value:"hidden"}];function Ml(e,t){for(let l=e.depth;l>0;l--){const o=e.node(l);if(t(o))return{node:o,depth:l}}return null}const zl=e.EditorToolsSettings.findAndReplace;let Fl=class extends b.Component{constructor(e){super(e),this.onTabSelect=e=>{this.setState({selectedTab:e.selected})},this.onClose=()=>{const e=this.props.view,t=e.state,l=t.tr.setSelection(n.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(l)),e.focus(),this.props.onClose.call(void 0)},this.matchesMessage=e=>{const t=this.state.matches,l=this.state.nextMatch;let o=0,r=0;if(t&&l){const e=t.findIndex((e=>e.eq(l)));o=-1===e?t.length:e+1,r=t.length}return Rl(e,o,r)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:o,matchCyclic:r,matchWord:i,useRegExp:a}=this.state,s={text:l,matchWord:i,matchCase:o,useRegExp:a,backward:e,matchCyclic:r},c=n.find(t.state,s);if(c){const e=t.state.tr.setSelection(c);e.scrollIntoView(),t.updateState(t.state.apply(e)),this.setState({nextMatch:c})}},this.onReplace=()=>{const e=this.props.view,t=e.state.selection,{replaceText:l}=this.state;if(!t.empty){const o=t.from,r=o+l.length,i=n.replace(t,l,e.state.tr);i.setSelection(n.TextSelection.create(i.doc,o,r)),i.scrollIntoView(),e.dispatch(i),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:o,matchWord:r,useRegExp:i}=this.state,a={text:t,matchWord:r,matchCase:o,useRegExp:i},s=n.replaceAll(e.state,l,a);s&&e.dispatch(s),this.setNextState({})},this.onKeyDown=e=>{13===e.keyCode?this.onFindNext():27===e.keyCode&&this.onClose()},this.onMatchCaseChecked=e=>this.setNextState({matchCase:e.value}),this.onMatchWordChecked=e=>this.setNextState({matchWord:e.value}),this.onMatchCyclicChecked=e=>this.setNextState({matchCyclic:e.value}),this.onUseRegExpChecked=e=>this.setNextState({useRegExp:e.value}),this.onSearchChange=e=>this.setNextState({searchText:e.target.value}),this.onReplaceChange=e=>this.setNextState({replaceText:e.target.value}),this.setNextState=e=>{const t={...this.state,...e,matches:void 0,nextMatch:void 0,error:void 0},l=this.props.view;if(t.searchText){const{searchText:e,matchWord:o,matchCase:r,useRegExp:i,matchCyclic:a}=t,s={text:e,matchWord:o,matchCase:r,useRegExp:i},c=l.state.selection;let d=[];try{d=n.findAll(l.state.doc,s)}catch(e){return e instanceof SyntaxError&&(t.error=this.settings.messages.findReplaceInvalidRegExp),void this.setState(t)}const p=e=>!e&&d[0]||d.find((e=>e.from>=c.from))||a&&d[0]||void 0;this.setState((e=>({...t,matches:d,nextMatch:p(e.searchText)})))}else this.setState(t)},this.state={selectedTab:0,searchText:n.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||zl}componentDidUpdate(e,t){const l=this.props.view,{matches:o=[],nextMatch:r}=this.state;if(t.nextMatch!==r){const e=l.state,t=e.tr,i=[];o.forEach((e=>{i.push({from:e.from,to:e.to,attrs:{class:r&&e.eq(r)?"k-text-selected":"k-text-highlighted"}})})),t.setMeta(n.textHighlightKey,i),t.setSelection(r||n.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:n,findReplaceFindWhat:u,findReplaceReplaceWith:g,findReplaceReplace:h,findReplaceReplaceAll:f,findReplaceMatchCase:v,findReplaceMatchWord:k,findReplaceMatchCyclic:y,findReplaceUseRegExp:C,findReplacePrevMatch:w,findReplaceNextMatch:S,findReplaceMatches:E}=this.settings.messages,{matchCase:x,matchWord:T,matchCyclic:P,useRegExp:I,searchText:N,replaceText:R,nextMatch:L}=this.state,A=b.createElement("div",{className:"k-search-options"},b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-case",checked:x,onChange:this.onMatchCaseChecked,label:e.toLanguageString(v,Cl[v])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-whole",checked:T,onChange:this.onMatchWordChecked,label:e.toLanguageString(k,Cl[k])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-cyclic",checked:P,onChange:this.onMatchCyclicChecked,label:e.toLanguageString(y,Cl[y])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked,label:e.toLanguageString(C,Cl[C])}))),B=b.createElement("div",{className:"k-matches-container"},b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},b.createElement(r.IconWrap,{name:"chevron-left",icon:i.chevronLeftIcon}),e.toLanguageString(w,Cl[w])),b.createElement("span",null,this.matchesMessage(e.toLanguageString(E,Cl[E]))),b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(S,Cl[S]),b.createElement(r.IconWrap,{name:"chevron-right",icon:i.chevronRightIcon}))),D=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(u,Cl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"findWhat",type:"text",value:N,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}),this.state.error&&b.createElement(m.Error,null,e.toLanguageString(this.state.error,Cl[this.state.error])))))}),M=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(g,Cl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"replaceWith",type:"text",value:R,onChange:this.onReplaceChange}))))});return b.createElement(a.Window,{title:e.toLanguageString(t,Cl[t]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},b.createElement(p.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},b.createElement(p.TabStripTab,{title:e.toLanguageString(l,Cl[l])},D,A,B),b.createElement(p.TabStripTab,{title:e.toLanguageString(n,Cl[n])},D,M,b.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},b.createElement(o.Button,{disabled:!L,onClick:this.onReplace},e.toLanguageString(h,Cl[h])),b.createElement(o.Button,{disabled:!L,onClick:this.onReplaceAll},e.toLanguageString(f,Cl[f]))),A,B)))}};d.registerForLocalization(Fl),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends El{};e.InsertImageDialog=class extends xl{};e.ViewHtmlDialog=class extends Pl{};e.FindAndReplaceDialog=class extends Fl{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:Hl,underline:Wl,italic:Kl}=e.EditorToolsSettings,Ul="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,l){return!!n.alignBlocks(t,l)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,l){return n.applyInlineStyle(t,l)(e.state,e.dispatch)},e.applyLink=function(e,t,l){return n.applyLink(t,l)(e.state,e.dispatch)},e.canIndentList=function(e,t){return n.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return n.canInsert(e,t)},e.canOutdentList=function(e,t){return n.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return n.convertMsLists(e)},e.createDocument=function(e,t,l){return n.parseContent(n.trimWhitespace(t),e,void 0!==l?l:{preserveWhitespace:"full"})},e.createTable=function(e,t,l){return n.createTable(e,t,l)},e.formatBlockElements=function(e,t,l){return n.formatBlockElements(t,l)(e.state,e.dispatch)},e.getBlockFormats=function(e){return n.getBlockFormats(e)},e.getHtml=function(e){return n.getHtml(e)},e.getInlineStyles=function(e,t){return n.getInlineStyles(e,t)},e.getMark=function(e,t){return n.getMark(e,t)},e.hasMark=function(e,t){return n.hasMark(e,t)},e.hasNode=function(e,t){return n.hasNode(e,t)},e.indentBlocks=function(e,t,l,o){return!!n.indentBlocks(t,l,o)(e.state,e.dispatch)},e.indentHtml=function(e){return n.indentHtml(e)},e.insertNode=function(e,t,l){n.insertNode(t,l)(e.state,e.dispatch)},e.isAligned=function(e,t){return n.isAligned(e,t)},e.isIndented=function(e,t,l){return n.isIndented(e,t,l)},e.removeComments=function(e){return n.removeComments(e)},e.removeTag=function(e,t){return n.removeTag(e,t)},e.pasteCleanup=function(e,t){return n.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){n.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){n.sanitizeStyleAttr(e)},e.removeAttribute=function(e){n.removeAttribute(e)},e.sanitize=function(e){return n.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return n.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return n.textHighlight(e)},e.imageResizing=function(e){return n.imageResizing(e)},e.tableResizing=function(){return n.tableResizing()},e.setHtml=function(e,t,l,o){const r=n.trimWhitespace(t);n.setHtml(r,l,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,l,o){return n.toggleInlineFormat(t,l,o)(e.state,e.dispatch)},e.toggleList=function(e,t,l){return n.toggleList(e.state,e.dispatch,e,t,l)},e.getShortcuts=function(e){return(e=>{const t=n.chainCommands(n.exitCode,((t,l)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",r=t.schema.nodes[o];return l&&l(t.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0})),l=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>n.toggleInlineFormat(o.bold||Hl)(e,t),"Mod-i":(e,t)=>n.toggleInlineFormat(o.italic||Kl)(e,t),"Mod-u":(e,t)=>n.toggleInlineFormat(o.underline||Wl)(e,t),"Mod-z":n.undo,"Shift-Mod-z":n.redo,...Ul?{}:{"Mod-y":n.redo},Backspace:n.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...Ul?{"Ctrl-Enter":t}:{},Enter:(e,t)=>n.splitListItem(e.schema.nodes[l])(e,t),Tab:n.goToNextCell(1),"Shift-Tab":n.goToNextCell(-1)}})(e)},e.propsKey=Tl,e.imageResizeKey=n.imageResizeKey,e.marks={...n.marks},e.nodes={...n.nodes}})(e.EditorUtils||(e.EditorUtils={}));const Ol=(t,l)=>{const o=l.tr||t.state.tr.setSelection(new n.AllSelection(t.state.doc)).replaceSelectionWith(l.doc||e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Vl="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),_l={name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"11.1.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},{link:jl,bold:ql,italic:$l,underline:Gl}=e.EditorToolsSettings,Jl=class extends b.Component{constructor(t){super(t),this.state={view:void 0,linkDialog:!1},this._element=null,this._contentElement=null,this.iframe=null,this.trOnChange=null,this.htmlOnChange=null,this.showLicenseWatermark=!1,this.focus=()=>{this.view&&this.view.focus()},this.renderDialog=(e,t,l)=>this.state[l]&&b.createElement(e,{view:this.view,settings:t,dir:this.props.dir,onClose:()=>this.setState({[l]:!1})}),this.renderTool=(e,t,l=!1)=>{const r=b.createElement(e,{view:this.view,dir:this.props.dir,key:t,className:l?"k-toolbar-button":void 0});return r.type===o.ToolbarSeparator?b.createElement(e,{key:t}):r},this.updateTools=(e,t)=>{this.setState({view:e})},this.filterTransaction=(e,t)=>{const l={target:this,transaction:e,state:t};return!1!==(this.props.onExecute&&this.props.onExecute.call(void 0,l))},this.onPasteHtml=e=>{if(this.props.onPasteHtml&&this.pasteEvent){const t={target:this,pastedHtml:e,nativeEvent:this.pasteEvent},l=this.props.onPasteHtml.call(void 0,t);if(this.pasteEvent=void 0,"string"==typeof l)return l}return e},this.dispatchTransaction=t=>{const l=t.docChanged;if(this.props.onChange&&l){this.trOnChange=t;const l=t.doc,o=t.doc.type.schema,r={target:this,value:l,html:"",transaction:t,schema:o};Object.defineProperty(r,"html",{get:()=>(this.htmlOnChange=e.EditorUtils.getHtml({doc:l,schema:o}),this.htmlOnChange)}),this.props.onChange.call(void 0,r)}this.view&&(void 0===this.props.value||!l)&&this.view.updateState(this.view.state.apply(t))},this.onFocus=(e,t)=>{if(this.props.onFocus){const e={target:this,nativeEvent:t};this.props.onFocus.call(void 0,e)}return!1},this.onBlur=(e,t)=>{if(this.props.onBlur){const e={target:this,nativeEvent:t};this.props.onBlur.call(void 0,e)}return!1},this.onPaste=(e,t)=>(this.props.onPasteHtml&&(this.pasteEvent=t),!1),this.onIFrameInit=e=>{if(this.props.onIFrameInit){const t={target:this,iframe:e};this.props.onIFrameInit.call(void 0,t)}return!1},this.showLicenseWatermark=!r.validatePackage(_l,{component:"Editor"})}get value(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!Vl)&&this.initialize()}componentDidUpdate(e){const{value:t}=this.props,l=this.view;void 0===t||!l||(((e,t,l,o,r)=>{"string"==typeof t?o&&t===r?Ol(e,{tr:o}):t!==l&&Ol(e,{html:t}):o&&t.eq(o.doc)?Ol(e,{tr:o}):e.state.doc.eq(t)||Ol(e,{doc:t})})(l,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){var e;this.view&&this.view.destroy(),this._view=void 0;const t=null==(e=this.iframe)?void 0:e.contentWindow;if(t){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const e=t.document.head;for(;e&&e.firstChild;)e.removeChild(e.firstChild)}}render(){const{tools:t=[],defaultEditMode:l="iframe",preserveWhitespace:n="full",style:i,className:a}=this.props,s=d.provideLocalizationService(this);if(this.view){Tl.getState(this.view.state).preserveWhitespace=n}let c=this.props.contentStyle;void 0===c&&void 0===(i||{}).height&&(c={height:"300px"});const p=t.map(((e,t)=>Array.isArray(e)?b.createElement(o.ButtonGroup,{key:t,className:"k-toolbar-button-group k-button-group-solid"},e.map(((e,t)=>this.renderTool(e,t)))):this.renderTool(e,t,!0)));return b.createElement("div",{ref:e=>{this._element=e},className:r.classNames("k-editor",a,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:i},p.length>0&&b.createElement(o.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},p),"iframe"===l?b.createElement("div",{className:"k-editor-content"},b.createElement("iframe",{onLoad:Vl?()=>{this.initialize()}:void 0,ref:e=>{this.iframe=e},frameBorder:"0",title:s.toLanguageString(wl.iframeTitle,Cl[wl.iframeTitle]),style:c,className:"k-iframe"})):b.createElement("div",{style:c,className:"k-editor-content"},b.createElement("div",{ref:e=>{this._contentElement=e},suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(e.EditorDialogs.InsertLinkDialog,jl,"linkDialog"),this.showLicenseWatermark&&b.createElement(r.WatermarkOverlay,null))}initialize(){const t=this.iframe&&this.iframe.contentWindow;if(t){const e=t.document,l=e.createElement("meta");l.setAttribute("charset","utf-8"),e.head.appendChild(l),this._contentElement=e.createElement("div"),e.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content"),this.iframe&&this.props.onIFrameInit?this.onIFrameInit(this.iframe):[v,k,"rtl"===this.props.dir?"body { direction: rtl }":void 0].forEach((t=>{if(t){const l=e.createElement("style");l.appendChild(e.createTextNode(t)),e.head.appendChild(l)}}))}const l=this._contentElement;if(!l)return;const{preserveWhitespace:r="full"}=this.props,i=[new n.Plugin({view:()=>({update:this.updateTools}),key:new n.PluginKey("toolbar-tools-update-plugin")}),new n.Plugin({filterTransaction:this.filterTransaction,key:new n.PluginKey("onExecute-event-plugin")}),new n.Plugin({key:Tl,state:{init:()=>({preserveWhitespace:r}),apply:(e,t)=>t}}),n.spacesFix(),n.caretColor(),n.history(),n.dropCursor(),n.gapCursor(),n.tableEditing(),n.cspFix()],a={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:ql,italic:$l,underline:Gl}}),"Mod-k":()=>{const{linkDialog:e}=this.state,t=this.view;if(t){const l=t.state,o=l.selection.empty,r=n.getMark(l,l.schema.marks[jl.mark]);!e&&(!o||r)&&this.setState({linkDialog:!0})}return!e},"Alt-F10":()=>{var e;const t=null==(e=this.element)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(o.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:s="",value:c,onMount:d}=this.props,p=c&&"string"!=typeof c?c:e.EditorUtils.createDocument(new n.Schema({nodes:n.nodes,marks:n.marks}),c||s,{preserveWhitespace:r}),m={state:n.EditorState.create({plugins:[...i,n.keymap(a),n.keymap(n.baseKeymap)],doc:p}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(e,t,l,o)=>{let r=!1;return l.content.nodesBetween(0,l.content.size,(e=>{r=r||"table_caption_external"===e.type.name})),r}},u={plugins:i,shortcuts:a,target:this,viewProps:m,dom:l},g=this._view=d&&d.call(void 0,u)||new n.EditorView({mount:l},m);this.setState({view:g})}};Jl.propTypes={defaultContent:l.string,value:l.oneOfType([l.object,l.string]),defaultEditMode:l.oneOf(["iframe","div"]),contentStyle:l.object,dir:l.string,className:l.string,ariaDescribedBy:l.string,ariaLabelledBy:l.string,ariaLabel:l.string,style:l.object,tools:l.arrayOf(l.any),keyboardNavigation:l.bool,resizable:l.bool,preserveWhitespace:l.oneOf([!0,!1,"full"]),onMount:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onPasteHtml:l.func,onExecute:l.func,onIFrameInit:l.func};let Ql=Jl;d.registerForLocalization(Ql);let Xl=class extends b.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const o=Math.floor(e/this.props.columns),r=e%this.props.columns,n=r<=l&&o<=t;return b.createElement("span",{className:"k-ct-cell k-disabled"+(n?" k-selected":""),onMouseEnter:()=>this.setState({row:o,col:r}),onClick:()=>this.props.onCellClick.call(void 0,o,r),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:o}=this.state,{onDown:r}=this.props;let n=this.props.createTableMessage;o>-1&&(n=Rl(this.props.createTableHintMessage,l+1,o+1));for(let r=0;r<t;r++)e.push(this.renderCell(r,l,o));return[b.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:r,onMouseDown:r},e),b.createElement("div",{className:"k-status",key:"status",onPointerDown:r,onMouseDown:r},n)]}};var Yl,Zl;(e=>{const t=class e extends b.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=e=>{const{anchor:t}=this.props;t&&(t===e.target||t.firstElementChild===e.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(e){e.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:t,anchor:l,dir:o,rows:r=e.defaultProps.rows,columns:n=e.defaultProps.columns}=this.props,i="rtl"===o?"right":"left";return b.createElement(u.Popup,{anchor:l,anchorAlign:{horizontal:i,vertical:"bottom"},popupAlign:{horizontal:i,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===o?{direction:"rtl"}:void 0},b.createElement(Xl,{rows:r,columns:n,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};t.propTypes={show:l.bool.isRequired,createTableMessage:l.string.isRequired,createTableHintMessage:l.string.isRequired,onClose:l.func.isRequired,onTableInsert:l.func.isRequired,anchor:l.any,rows:l.number,columns:l.number,dir:l.string},t.defaultProps={rows:6,columns:8};let o=t;e.InsertTablePopup=o})(Yl||(Yl={})),(e=>{e.createInsertTableTool=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(e,t)=>{const{view:l}=this.props;if(!l)return;const{table:o,table_row:r,table_cell:i}=l.state.schema.nodes,a=n.createTable({table:o,table_row:r,table_cell:i},e,t);a&&n.insertNode(a,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,m=s.toLanguageString(c,Cl[c]),u=s.toLanguageString(p,Cl[p]),g=!(a&&n.canInsert(a,a.schema.nodes.table)&&!Ml(a.selection.$from,(e=>"table_caption_external"===e.type.name))),h=[b.createElement(o.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",...Il,title:m,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":g})}),t&&!g&&b.createElement(Yl.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:u,dir:i.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(Zl||(Zl={}));const{alignRemove:eo}=e.EditorToolsSettings,to=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props,i=t&&t.state,a=!!i&&n.isAligned(i,e.actions),s=a?eo.actions:e.actions,c=a?eo.commandName:e.commandName,p=d.provideLocalizationService(this),m=e.messages.title,u=b.createElement(o.Button,{onClick:()=>t&&n.alignBlocks(s,c)(t.state,t.dispatch),selected:a,togglable:!0,...Il,title:p.toLanguageString(m,Cl[m]),...e.props,...r});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t};var lo;(e=>{e.createStyleDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props,{style:r}=e;if(o){n.applyInlineStyle({style:r,value:l.value},e.commandName)(o.state,o.dispatch);const{syntheticEvent:i}=t;i&&"click"===i.type&&o.focus()}}}render(){const{style:t}=e,{view:l,render:o,data:r,defaultItem:i,...a}=this.props,s=r||e.items;let c=i||e.defaultItem;const p=l?n.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],m=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?m.toLanguageString(c.localizationKey,Cl[c.localizationKey]):c.text);let u=1===new Set(p).size?p[0]:null;null===u&&a.defaultValue&&(u=a.defaultValue);const h=b.createElement(g.DropDownList,{value:u&&s.find((e=>e.value===u)),data:s,defaultItem:c,itemRender:Ll,textField:"text",dataItemKey:"value",onChange:this.onChange,style:Nl,leftRightKeysNavigation:!1,title:c&&c.text,...a});return o?o.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(lo||(lo={}));const oo=e=>{const{view:t,style:l,colorPickerProps:o,commandName:r}=e,i=o.title,a=o.ariaLabel,{view:c="palette"}=o,p=d.useLocalization(),m=b.useCallback((e=>{t&&(n.applyInlineStyle({style:l,value:e.value},r)(t.state,t.dispatch),"palette"===c&&t.focus())}),[t,l,c,r]);return b.createElement(s.ColorPicker,{onChange:m,onActiveColorClick:m,...o,title:i&&p.toLanguageString(i,Cl[i]),ariaLabel:a&&p.toLanguageString(a,Cl[a])})};var ro;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends b.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props;if(o&&n.formatBlockElements(l.value,e.commandName)(o.state,o.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&o.focus()}}}render(){const{view:t,render:l,data:o,defaultItem:r,...i}=this.props,a=o||e.items;let s=r||e.defaultItem;const c=t&&t.state,p=c?n.getBlockFormats(c):[],m=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?m.toLanguageString(s.localizationKey,Cl[s.localizationKey]):s.text);const u=1===new Set(p).size?p[0]:null,h=b.createElement(g.DropDownList,{value:u&&a.find((e=>e.value===u)),onChange:this.onChange,itemRender:Ll,data:a,defaultItem:s,textField:"text",dataItemKey:"value",style:Nl,leftRightKeysNavigation:!1,title:s.text,...i});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(ro||(ro={}));const no=(e,t)=>{const l=class extends b.Component{render(){const{view:l,render:n,...i}=this.props,a=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),m=b.createElement(o.Button,{onClick:p?void 0:()=>l&&t(l.state,(t=>l.dispatch(t.setMeta("commandName",e.commandName)))),"aria-disabled":!!p||void 0,...Il,title:a.toLanguageString(s,Cl[s]),...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":p})});return n?n.call(void 0,m,{view:l}):m}};return d.registerForLocalization(l),l};var io,ao,so;(e=>{e.createUndoTool=e=>no(e,n.undo),e.createRedoTool=e=>no(e,n.redo)})(io||(io={})),(e=>{e.createIndentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a=i.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],m=e.actions,u=!!s&&!!p&&(n.isIndented(s,m,a)||m.some((e=>c&&c[e.node]&&n.hasNode(s,c[e.node]))))&&!n.hasNode(s,p),g=!!s&&n.canIndentAsListItem(s,p),h=u||g,f=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=b.createElement(o.Button,{onClick:k?void 0:()=>{t&&g&&p?n.sinkListItem(p)(t.state,t.dispatch):t&&u&&n.indentBlocks(m,e.commandName,a)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:f.toLanguageString(v,Cl[v]),...Il,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(ao||(ao={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props,i=t&&t.state,{mark:a,altMarks:s,altStyle:c}=e,p={mark:a,altMarks:s,altStyle:c},m=d.provideLocalizationService(this),u=e.messages.title,g=b.createElement(o.Button,{onClick:()=>t&&n.toggleInlineFormat(p,i&&i.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!i&&n.hasMark(i,p),togglable:!0,...Il,title:m.toLanguageString(u,Cl[u]),...e.props,...r});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(so||(so={}));const co=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:m}=t.messages,u=!c||!s||!n.canInsert(s,c),g=[b.createElement(o.Button,{onClick:u?void 0:this.toggleDialog,"aria-disabled":!!u||void 0,key:"insertImage",...Il,title:p.toLanguageString(m,Cl[m]),...t.props,...a,className:r.classNames(a.className,t.props.className,{"k-disabled":u})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:a.dir,onClose:this.toggleDialog})||null];return i?i.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var po,mo,uo;(t=>{t.createLinkTool=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&n.getMark(s,s.schema.marks[t.mark]),m=d.provideLocalizationService(this),{insertHyperlink:u}=t.messages,g=c&&!p,h=[b.createElement(o.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",...Il,title:m.toLanguageString(u,Cl[u]),...t.props,...a,className:r.classNames(a.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:a.dir,view:l,onClose:this.toggleDialog})||null];return i?i.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(po||(po={})),(e=>{e.createListTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...r}=this.props;let i=!1;const a=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,o=n.hasNode(e,l[c.orderedList]),r=n.hasNode(e,l[c.bulletList]);i=p===c.orderedList?o&&!r:!o&&r}const m=b.createElement(o.Button,{onClick:()=>t&&n.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:i,title:a.toLanguageString(s,Cl[s]),...Il,...e.props,...r});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(mo||(mo={})),(e=>{e.createOutdentTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=i.dir,c=!!a&&n.isIndented(a,e.actions,s),p=a&&a.schema.nodes[e.listsTypes.listItem],m=!!a&&n.canOutdentAsListItem(a,{nodes:e.actions,listsTypes:e.listsTypes}),u=c||m,g=d.provideLocalizationService(this),h=e.messages.title,f=!u,v=b.createElement(o.Button,{onClick:f?void 0:()=>{t&&m&&p?n.liftListItem(p)(t.state,t.dispatch):t&&c&&n.indentBlocks(e.actions,e.commandName,s)(t.state,t.dispatch)},"aria-disabled":!!f||void 0,title:g.toLanguageString(h,Cl[h]),...Il,...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":f})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(uo||(uo={}));const go=(e,t)=>{const l=n.deleteColumn(e,t);if(l&&!t){const t=n.selectionCell(e),l=t&&t.node(t.depth);if(l&&1===l.content.childCount)return!1}return l},ho=(e,t)=>{const l=n.deleteRow(e,t);if(l&&!t){const t=n.selectionCell(e),l=t&&t.node(t.depth-1);if(l&&1===l.content.childCount)return!1}return l};var fo,bo,vo;(e=>{e.createAddRowBeforeTool=e=>no(e,n.addRowBefore),e.createAddRowAfterTool=e=>no(e,n.addRowAfter),e.createAddColumnBeforeTool=e=>no(e,n.addColumnBefore),e.createAddColumnAfterTool=e=>no(e,n.addColumnAfter),e.createDeleteRowTool=e=>no(e,ho),e.createDeleteColumnTool=e=>no(e,go),e.createDeleteTableTool=e=>no(e,n.deleteTable),e.createMergeCellsTool=e=>no(e,n.mergeCells),e.createSplitCellTool=e=>no(e,n.splitCell)})(fo||(fo={})),(e=>{e.createUnlinkTool=e=>{const t=class extends b.Component{render(){const{view:t,render:l,...i}=this.props,a={mark:e.mark},s=!!t&&n.hasMark(t.state,a),c=d.provideLocalizationService(this),p=e.messages.title,m=!s,u=b.createElement(o.Button,{onClick:m?void 0:()=>t&&n.removeLink(a,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!m||void 0,...Il,title:c.toLanguageString(p,Cl[p]),...e.props,...i,className:r.classNames(i.className,e.props.className,{"k-disabled":m})});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(bo||(bo={})),(t=>{t.createViewHtmlTool=t=>{const l=class extends b.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:r,...n}=this.props,i=d.provideLocalizationService(this),a=t.messages.viewHtml,s=[b.createElement(o.Button,{onClick:this.toggleDialog,key:"viewHtml",...Il,title:i.toLanguageString(a,Cl[a]),...t.props,...n}),this.state.openedDialog&&l&&b.createElement(e.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:l,settings:t,dir:n.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(vo||(vo={}));const{print:ko}=e.EditorToolsSettings,yo=e=>{const{view:t,render:l,settings:n=ko,...i}=e,a=t&&t.dom,s=a&&a.ownerDocument,c=s&&s.defaultView,p=n.messages.title,m=!c||c===window,u=b.useCallback((()=>{c&&c.print()}),[c]),g=b.createElement(o.Button,{onClick:m?void 0:u,"aria-disabled":!!m||void 0,title:d.useLocalization().toLanguageString(p,Cl[p]),...Il,...n.props,...i,className:r.classNames(i.className,n.props.className,{"k-disabled":m})});return l?l.call(void 0,g,{view:t}):g},{pdf:Co,savePdfOptions:wo}=e.EditorToolsSettings,So=e=>{const{view:t,render:l,settings:r=Co,savePdfOptions:n,savePdfCallback:i,...a}=e,s=r.messages.title,c=b.useCallback((()=>{t&&h.savePDF(t.dom,{...wo,...n||{}},i)}),[t,n,i]),p=b.createElement(o.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,Cl[s]),...Il,...r.props,...a});return l?l.call(void 0,p,{view:t}):p},{selectAll:Eo}=e.EditorToolsSettings,xo=e=>{const{view:t,render:l,settings:r=Eo,...i}=e,a=r.messages.title,s=b.useCallback((()=>{t&&(n.selectAll(t.state,t.dispatch),t.focus())}),[t]),c=b.createElement(o.Button,{onClick:s,title:d.useLocalization().toLanguageString(a,Cl[a]),...Il,...r.props,...i});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:To}=e.EditorToolsSettings,Po=n.cleanFormatting(),Io=e=>{const{view:t,render:l,settings:n=To,...i}=e,a=n.messages.title,s=!t||!Po(t.state),c=b.useCallback((()=>{t&&Po(t.state,(e=>{e.setMeta("commandName",n.commandName),t.dispatch(e)}))}),[t]),p=b.createElement(o.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(a,Cl[a]),...Il,...n.props,...i,className:r.classNames(e.className,n.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},No=e.EditorToolsSettings.findAndReplace;let Ro=class extends b.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...t}=this.props,{props:l}=No,n=d.provideLocalizationService(this),i=No.messages.findReplaceToolTitle,a=!e;return[b.createElement(o.Button,{onClick:a?void 0:this.onOpen,"aria-disabled":!!a||void 0,...Il,title:n.toLanguageString(i,Cl[i]),key:"tool",...l,...t,className:r.classNames(t.className,l.className,{"k-disabled":a})}),this.state.showDialog&&e&&b.createElement(Fl,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(Ro);const Lo=(e,t)=>{const{from:l,to:o}=e.selection;let r=null;return e.doc.nodesBetween(l,o,(e=>(r=r||(e.type===t?e:null),!r))),r},Ao=e=>{let t=!1;const l=e.view,r=Sl,i=e.listType,a=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,o=e&&e.schema.nodes;s=o&&Lo(e,o[r.orderedList]),c=o&&Lo(e,o[r.bulletList]),t=!!(i===r.orderedList?s&&!c:!s&&c)}if(t&&(s||c)){const e=n.listStyle((s||c).attrs);p=p.map(((t,l)=>({...t,selected:e?t.style===e:0===l})))}return b.createElement("span",{onMouseDown:e=>{e.preventDefault()}},b.createElement(o.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(n.toggleList(l.state,l.dispatch,l,{listType:i,...r,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},o=s||c;if(o&&n.listStyle(o.attrs)!==e.item.style){const e=l.state.selection.$head.posAtIndex(0,-2)-1;l.dispatch(l.state.tr.setNodeMarkup(e,l.state.schema.nodes[i],t))}else n.toggleList(l.state,l.dispatch,l,{listType:i,...r,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:a.toLanguageString(e.titleKey,Cl[e.titleKey])}))},Bo=/[\D]+$/,Do=e=>{const t=e.match(Bo);return t?t[0]:""},Mo=(e,t)=>{var l;const o=zo((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(o)||null,[t+"Unit"]:Do(o)}},zo=e=>(e||"").split(/\s*;\s*/).filter(Boolean).map((e=>{const t=e.split(/\s*:\s*/);return{[t[0]]:t[1]}})).reduce(((e,t)=>({...e,...t})),{}),Fo=/^.+$/;function Ho(e,t,l){let o;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:r}=((e,t)=>{const l=t.style,o=t.value,r=t.newValue;if(!e)return{changed:!1,style:null};const n=e.split(/\s*;\s*/).filter((e=>!!e)),i=n.filter((e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&o.test(t[1]))}));return r&&i.push(`${l}: ${r}`),{style:i.join("; ")+(i.length?";":""),changed:!!r||i.length!==n.length}})(e.style||"",{style:t,value:Fo,newValue:l});o={...e,style:r}}else if(e.style){const r=zo(e.style);r[t]=l,o={...e,style:Object.keys(r).filter((e=>!!r[e])).reduce(((e,t)=>e+t+": "+r[t]+"; "),"").trim()}}else o=l?{...e,style:t+": "+l+";"}:{...e};return o}const Wo=e=>{const t=Ml(e.selection.$from,(e=>"table"===e.type.name)),l=Ml(e.selection.$to,(e=>"table"===e.type.name));return t&&l&&t.depth===l.depth&&t.node.eq(l.node)?(e=>{const{doc:t,selection:l}=e,o=[];return l.ranges.forEach((e=>{const l=e.$from.pos,r=e.$to.pos;t.nodesBetween(l,r,((e,t,l,r)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&o.push({node:e,pos:t})}))})),o})(e).filter((({pos:l})=>{const o=Ml(e.doc.resolve(l),(e=>"table"===e.type.name));return o&&o.depth===t.depth&&t.node.eq(o.node)})):[]},Ko=e=>{const t=[];if(Wo(e).length){const l=e.selection.$from,o=Ml(l,(e=>"table"===e.type.spec.tableRole));if(null===o)return t;const r=l.start(o.depth),i=o.node,a=n.TableMap.get(i),s=e.doc;a.map.forEach((e=>{const l=e+r;t.push({pos:l,node:s.nodeAt(l)})}))}return t},Uo="k-colgroup-data",Oo=(e,t,l)=>{const o={cellWidth:null,widthUnit:""},r=t.node,i=l.start(t.depth);if(!r.attrs[Uo])return o;const a=new Set;let s="";const c=n.htmlToFragment(r.attrs[Uo]).firstChild;return e.forEach((e=>{const t=r.resolve(e.pos-i),l=t.parent,o=t.index();let n=0;for(let e=0;e<=o;e++)n+=l.child(e).attrs.colspan;const d=c.children[n-1];d&&(s=d.style.width,a.add(s))})),1===a.size&&s&&(o.cellWidth=parseFloat(s)||null,o.widthUnit=Do(s)),o},Vo=(e,t,l)=>{const o={cellHeight:null,heightUnit:""},r=t.node,n=l.start(t.depth),i=new Set;let a="";return e.forEach((e=>{var t;const l=r.resolve(e.pos-n).parent;a=zo((null==(t=l.attrs)?void 0:t.style)||"").height||"",i.add(a)})),1===i.size&&a&&(o.cellHeight=parseFloat(a)||null,o.heightUnit=Do(a)),o},_o=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{var r;o=zo((null==(r=e.node.attrs)?void 0:r.style)||"")[t]||"",l.add(o)})),1===l.size&&o?o:""},jo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{o=(e.node.attrs||{})[t]||"",l.add(o)})),1===l.size&&o?o:""},qo={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},$o=e=>{const t=Wo(e),l=e.selection.$from,o=t.length?Ml(l,(e=>"table"===e.type.spec.tableRole)):null;return o?{...qo,...Oo(t,o,l),...Vo(t,o,l),alignment:{x:_o(t,"text-align"),y:_o(t,"vertical-align")},textControl:_o(t,"white-space"),backgroundColor:_o(t,"background-color")||void 0,cellPadding:parseFloat(_o(t,"padding"))||null,borderWidth:parseFloat(_o(t,"border-width"))||null,borderColor:_o(t,"border-color")||void 0,borderStyle:_o(t,"border-style")||null,id:jo(t,"id"),className:jo(t,"class")}:qo},Go=(e,t,l)=>{l.forEach((({node:l,pos:o})=>{let r={...l.attrs};r=Ho(r,"border-color",t.borderColor||""),r=Ho(r,"border-style",t.borderStyle||""),r=Ho(r,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),r=Ho(r,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),r=Ho(r,"background-color",t.backgroundColor||""),r=Ho(r,"text-align",t.alignment.x||""),r=Ho(r,"vertical-align",t.alignment.y||""),r=Ho(r,"white-space",t.textControl||""),r.id=t.id||null,r.class=t.className||null,e.setNodeMarkup(o,null,r),"number"==typeof t.cellWidth&&((e,t,l)=>{const o=e.doc.resolve(t),r=o.parent,i=o.index();let a=0;for(let e=0;e<=i;e++)a+=r.child(e).attrs.colspan;const s=o.node(o.depth-1),c=o.posAtIndex(0,o.depth-1)-1;let d,p=s.attrs;if(p&&p[Uo]){const t=n.htmlToFragment(p[Uo]).firstChild;d=t.children[a-1],d.style.width=l,p={...p,[Uo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<r.childCount;e++)t+=r.child(e).attrs.colspan;const o=document.createElement("colgroup"),n=new Array(t);for(let e=0;e<t;e++)n[e]=document.createElement("col"),o.appendChild(n[e]);d=n[i],d.style.width=l,p={...p,[Uo]:"<colgroup>"+n.reduce(((e,t)=>e+t.outerHTML),"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,o,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const o=e.doc.resolve(t),r=o.parent,n=o.posAtIndex(0)-1;e.setNodeMarkup(n,null,Ho(r.attrs,"height",l))})(e,o,t.cellHeight+(t.heightUnit||"px"))}))},Jo=(e,t)=>{const l=e.tr,o=t.applyToAll?Ko(e):Wo(e);return Go(l,t,o),l},Qo=e=>{const{view:t,...l}=e,[r,n]=b.useState(!1),a=d.useLocalization(),s=!(!t||!Ml(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=b.useCallback((()=>{n(!0)}),[]),p=b.useCallback((()=>{n(!1),null==t||t.focus()}),[t]),m=b.useCallback((e=>{if(t&&e){const l=Jo(t.state,e);l.docChanged&&t.dispatch(l)}p()}),[t,p]);return b.createElement(b.Fragment,null,b.createElement(o.Button,{type:"button",title:a.toLanguageString(wl.cellProperties,Cl[wl.cellProperties]),icon:"table-cell-properties",svgIcon:i.tableCellPropertiesIcon,onClick:c,disabled:!s,...Il,...l}),r&&t&&b.createElement(tr,{view:t,onCancel:p,onSave:m}))},Xo=[{textKey:wl.cellPropertiesLeftTop,text:Cl[wl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:i.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:wl.cellPropertiesCenterTop,text:Cl[wl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:i.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:wl.cellPropertiesRightTop,text:Cl[wl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:i.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:wl.cellPropertiesLeftMiddle,text:Cl[wl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:wl.cellPropertiesCenterMiddle,text:Cl[wl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:wl.cellPropertiesRightMiddle,text:Cl[wl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:wl.cellPropertiesLeftBottom,text:Cl[wl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:i.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:wl.cellPropertiesCenterBottom,text:Cl[wl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:i.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:wl.cellPropertiesRightBottom,text:Cl[wl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:i.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:wl.cellPropertiesNoAlignment,text:Cl[wl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:i.tableAlignRemoveIcon,value:{x:"",y:""}}],Yo=[{textKey:wl.cellPropertiesWrap,text:Cl[wl.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:i.textWrapIcon},{textKey:wl.cellPropertiesFitToCell,text:Cl[wl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:i.parameterStringIcon}],Zo=(e,t)=>t?b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(r.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,er=(e,t)=>{const l=b.createElement(b.Fragment,null,b.createElement(s.InputPrefix,null,b.createElement(r.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return b.cloneElement(e,e.props,l)},tr=e=>{const t=b.useMemo((()=>$o(e.view.state)),[e.view]),l=d.useLocalization(),r=b.useRef(null),n=t.applyToAll,i=b.useRef(null),c=t.cellWidth,p=b.useRef(null);t.widthUnit&&!Al.includes(t.widthUnit)&&Al.push(t.widthUnit);const m=t.widthUnit||"",u=b.useRef(null),h=t.cellHeight,f=b.useRef(null);t.heightUnit&&!Al.includes(t.heightUnit)&&Al.push(t.heightUnit);const v=t.heightUnit||"",k=b.useRef(null),y=Xo.find((e=>void 0!==e.value.x&&t.alignment&&e.value.x===t.alignment.x&&e.value.y===t.alignment.y))||null,C=b.useRef(null),w=Yo.find((e=>e.value===t.textControl)),S=b.useRef(null),E=t.backgroundColor,x=b.useRef(null),T=t.cellPadding,P=b.useRef(null),I=t.borderWidth,N=b.useRef(null),R=t.borderColor,L=b.useRef(null),A=Dl.find((e=>e.value===t.borderStyle)),B=b.useRef(null),D=t.id,M=b.useRef(null),z=t.className,F=b.useCallback((()=>{var t,l,o,n,a,s,c,d,m,g,h,b,v,y,w,E,T,I,R,A;const D={applyToAll:!(null==(l=null==(t=r.current)?void 0:t.element)||!l.checked),cellWidth:(null==(o=i.current)?void 0:o.value)||null,widthUnit:(null==(n=p.current)?void 0:n.value)||"",cellHeight:(null==(a=u.current)?void 0:a.value)||null,heightUnit:(null==(s=f.current)?void 0:s.value)||"",alignment:null==(d=null==(c=k.current)?void 0:c.value)?void 0:d.value,textControl:null==(g=null==(m=C.current)?void 0:m.value)?void 0:g.value,backgroundColor:null==(h=S.current)?void 0:h.value,cellPadding:"number"==typeof(null==(b=x.current)?void 0:b.value)?null==(v=x.current)?void 0:v.value:null,borderWidth:"number"==typeof(null==(y=P.current)?void 0:y.value)?null==(w=P.current)?void 0:w.value:null,borderColor:null==(E=N.current)?void 0:E.value,borderStyle:(null==(I=null==(T=L.current)?void 0:T.value)?void 0:I.value)||null,id:String((null==(R=B.current)?void 0:R.value)||""),className:String((null==(A=M.current)?void 0:A.value)||"")};e.onSave.call(void 0,D)}),[e.onSave]),H=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("div",{className:"k-form-field-wrap"},b.createElement("span",{className:"k-checkbox-wrap"},b.createElement(s.Checkbox,{ref:r,defaultChecked:n})),b.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(wl.cellPropertiesApplyToAllCells,Cl[wl.cellPropertiesApplyToAllCells])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesWidth,Cl[wl.cellPropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:i,defaultValue:c,min:0,placeholder:l.toLanguageString(wl.sizeAuto,Cl[wl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(wl.cellPropertiesApplyToColumn,Cl[wl.cellPropertiesApplyToColumn])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:p,defaultValue:m,data:Al,popupSettings:Bl}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesHeight,Cl[wl.cellPropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,defaultValue:h,min:0,placeholder:l.toLanguageString(wl.sizeAuto,Cl[wl.sizeAuto])}),b.createElement("div",{className:"k-form-hint"},l.toLanguageString(wl.cellPropertiesApplyToRow,Cl[wl.cellPropertiesApplyToRow])))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:f,defaultValue:v,data:Al,popupSettings:Bl}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesAlignment,Cl[wl.cellPropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:k,defaultValue:y,data:Xo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"text",popupSettings:Bl,valueRender:Zo,itemRender:er}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesTextControl,Cl[wl.cellPropertiesTextControl])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:C,defaultValue:w,data:Yo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Bl,valueRender:Zo,itemRender:er}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesCellPadding,Cl[wl.cellPropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:x,defaultValue:T,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesBackground,Cl[wl.cellPropertiesBackground])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:S,defaultValue:E}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesBorderWidth,Cl[wl.cellPropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:P,defaultValue:I,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesBorderColor,Cl[wl.cellPropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:N,defaultValue:R}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesBorderStyle,Cl[wl.cellPropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:L,defaultValue:A,popupSettings:Bl,data:Dl,textField:"text",dataItemKey:"value"}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesId,Cl[wl.cellPropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:B,defaultValue:D}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.cellPropertiesCssClass,Cl[wl.cellPropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:M,defaultValue:z})))))),W=[b.createElement(o.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(wl.cellPropertiesSave,Cl[wl.cellPropertiesSave])),b.createElement(o.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(wl.cellPropertiesCancel,Cl[wl.cellPropertiesCancel]))];return b.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(wl.cellProperties,Cl[wl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,b.createElement(a.WindowActionsBar,{layout:"start"},...W))},lr={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},or={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},rr=e=>{const t=[];for(let l=0;l<e.height;l++){const o=l*e.width,r=o+e.width;t.push(e.map.slice(o,r))}return t},nr=e=>{let t=!0,l=!0;return e.content.forEach((e=>{e.content.forEach((e=>{const o="table_header"===e.type.name,r="table_cell"===e.type.name;o&&!e.attrs.scope&&(t=!1),(o&&!e.attrs.id||r&&!e.attrs.headers)&&(l=!1)}))})),t?"scope":l?"id":"none"},ir=e=>{var t,l,o;const r=Wo(e),i=e.selection.$from,a=r.length?Ml(i,(e=>"table"===e.type.spec.tableRole)):null;if(!a)return lr;const s=Ml(i,(e=>"table_wrapper"===e.type.name));let c="",d={},p={};s&&(p=zo(s.node.attrs.style),s.node.content.forEach((e=>{if("table_caption_external"===e.type.name){const t=n.pmDocToFragment(e);c=n.fragmentToHtml(t),c="<img>"===c?"":c,d=zo(e.attrs.style)}})));const m=zo((null==(t=a.node.attrs)?void 0:t.style)||""),u=n.TableMap.get(a.node),g="auto"===p["margin-left"]&&"auto"===p["margin-right"]?"center":"auto"===p["margin-right"]?"left":"auto"===p["margin-left"]?"right":null,h=((e,t)=>{let l=0,o=0;const r=rr(t);r.forEach((t=>{let o=!0;t.forEach((t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(o=!1)})),o&&l++}));for(let l=0;l<t.width;l++){let n=!0;for(let o=0;o<t.height;o++){const t=r[o]&&r[o][l],i="number"==typeof t&&e.nodeAt(t);i&&"table_header"!==i.type.name&&(n=!1)}n&&o++}return{rows:l,columns:o}})(a.node,u),f=(e=>{const t=new Set;return e.content.forEach((e=>{e.content.forEach((e=>{t.add(zo(e.attrs.style).padding||"")}))})),1===t.size?Array.from(t)[0]:""})(a.node);return{...lr,columns:u.width,rows:u.height,...Mo(a.node,"width"),...s&&/%/.test(p.width||"")?Mo(s.node,"width"):{},...Mo(a.node,"height"),textAlign:m["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:m["border-spacing"]?parseFloat(m["border-spacing"]):null,backgroundColor:m["background-color"],borderWidth:m["border-width"]?parseFloat(m["border-width"]):null,borderColor:m["border-color"],borderStyle:m["border-style"]||null,collapseBorders:"collapse"===m["border-collapse"],caption:c||void 0,captionAlignment:d["text-align"]||"",captionPosition:d["caption-side"]||null,headerRows:h.rows,headerColumns:h.columns,associateHeaders:h.rows||h.columns?nr(a.node):"none",id:(null==(l=a.node.attrs)?void 0:l.id)||"",className:(null==(o=a.node.attrs)?void 0:o.class)||""}},ar=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},sr=(e,t,l,o,r)=>{const i=t+ar(l).pos;if(!e.doc.nodeAt(i))return e;const a=e.doc.resolve(i),s=new n.CellSelection(a,a),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<o;e++)r(d,(e=>{d=d.apply(e)}));return d},cr=(e,t,l,o)=>{let r=e;for(let e=0;e<l;e++){const e=r.doc.nodeAt(t);if(e){const l=t+ar(e).pos,i=r.doc.resolve(l),a=new n.CellSelection(i,i),s=r.tr.setSelection(a);r=r.apply(s),o(r,(e=>{r=r.apply(e)}))}}return r},dr=(e,t,l,o,r)=>{if(t.type.name!==o.name||Object.keys(r).length>0){const n=e.tr.setNodeMarkup(l,o,{...t.attrs,...r});return e.apply(n)}return e},pr=(e,t,l)=>{const o=e.doc.nodeAt(l),r=o&&n.TableMap.get(o);if(!o||!r)return e;const i=rr(r);let a=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],m=(e,t,l,o)=>{const r=[];if(o)for(let l=0;l<e;l++)p[l]&&p[l][t]&&r.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&r.push(p[e][l]);return r.join(" ")};return i.forEach(((e,r)=>{e.forEach(((e,n)=>{const i=o.nodeAt(e);if(i){const o=n<t.headerColumns,u=r<t.headerRows,g={...i.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(i,g),g.headers=null,g.scope=null,u||o?("scope"===t.associateHeaders&&(g.scope=u?"col":"row"),"id"===t.associateHeaders&&(g.id=((e,t)=>{const l=`cell-${e}${t}-${d}`;return p[e]||p.push([]),p[e][t]||p[e].push([]),p[e][t]=l,l})(r,n),(n>0||r>0)&&(g.headers=m(r,n,o,u)||null)),a=dr(a,i,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=m(r,n,t.headerColumns>0,t.headerRows>0)||null),a=dr(a,i,l+e+1,c,g))}}))})),a},mr=(e,t)=>n.parseContent("<p>"+e+"</p>",t).content.firstChild.content,ur=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=Ho(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=Ho(l,"caption-side",e.captionPosition));const o=mr(e.caption,t);return o&&t.nodes.table_caption_external.createAndFill(l,o)||void 0},gr=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,hr=(e,t,l,o,r)=>{let n={state:e,pos:l};if(o||!t.position&&!t.caption)o&&(t.position||t.caption||!t.caption&&gr(o.node))?(e=((e,t,l,o)=>{let r={...t.attrs};return r=Ho(r,"margin-left",""),r=Ho(r,"margin-right",""),Object.keys(o||{}).forEach((e=>{r=Ho(r,e,(o||{})[e]||"")})),e.apply(e.tr.setNodeMarkup(l,null,r))})(e,o.node,r,t.position&&or[t.position]),e=((e,t,l,o)=>{let r,n=e;const i=l+2,a=l+1,s=n.schema;if(gr(t))if(r=t.firstChild,o.caption){const e=mr(o.caption,s);if(n=n.apply(n.tr.replaceWith(i,i+r.content.size,e)),r=n.doc.nodeAt(a),r){let e={...r.attrs};e=Ho(e,"text-align",o.captionAlignment||""),e=Ho(e,"caption-side",o.captionPosition||""),n=n.apply(n.tr.setNodeAttribute(a,"style",e.style))}}else n=n.apply(n.tr.deleteRange(i,i+r.content.size));else r=ur(o,s),r&&(n=n.apply(n.tr.replaceWith(a,a,r)));return n})(e,o.node,r,t),n={state:e,pos:r}):n=!o||t.position||t.caption?{state:e,pos:l}:{state:e,node:o.node,pos:e.selection.$from.start(o.depth)-1};else{let o={table:"",style:"display: table"};const r=[],i=t.position,a=i&&or[i];a&&Object.keys(a).forEach((e=>{o=Ho(o,e,a[e]||"")})),"number"==typeof t.width&&"%"===t.widthUnit&&(o=Ho(o,"width",t.width+t.widthUnit));const s=ur(t,e.schema);s&&r.push(s);const c=e.doc.nodeAt(l);r.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(o,r);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);n={state:e=e.apply(t),pos:l}}}const i=o&&n.state.doc.nodeAt(r);if(i){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=Ho(i.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(zo(i.attrs.style||"").width||"")&&(e=Ho(i.attrs,"width","")),e&&(n.state=n.state.apply(n.state.tr.setNodeMarkup(r,null,e)))}return n},fr=(e,t)=>{const l=e.selection.$from,o=Ml(l,(e=>"table"===e.type.spec.tableRole));if(!o)return;const r=l.start(o.depth)-1;let i=((e,t,l,o)=>{let r=e,i=r.doc.nodeAt(t);if(!i)return r;let a=n.TableMap.get(i);return a.width===o&&a.height===l||(o>a.width?r=sr(r,t,i,o-a.width,n.addColumnAfter):o<a.width&&(r=cr(r,t,a.width-o,go)),i=r.doc.nodeAt(t),!i)||(a=n.TableMap.get(i),l>a.height?r=sr(r,t,i,l-a.height,n.addRowAfter):l<a.height&&(r=cr(r,t,a.height-l,ho))),r})(e,r,t.rows,t.columns);if(!i)return;const a=i.tr;Ko(i).forEach((e=>{let l={...e.node.attrs};l=Ho(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),a.setNodeMarkup(e.pos,null,l)})),i=i.apply(a),i=((e,t,l)=>{const o=e.doc.nodeAt(l);if(!o)return e;let r={...o.attrs};const n=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);r=Ho(r,"width",n?t.width+t.widthUnit:""),r=Ho(r,"height",null!==t.height?t.height+t.heightUnit:""),r=Ho(r,"text-align",t.textAlign||""),r=Ho(r,"background-color",t.backgroundColor||""),r=Ho(r,"border-width",t.borderWidth?t.borderWidth+"px":""),r=Ho(r,"border-style",t.borderStyle||""),r=Ho(r,"border-color",t.borderColor||""),r=Ho(r,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),r=null!==t.cellSpacing?Ho(r,"border-collapse","unset"):Ho(r,"border-collapse",t.collapseBorders?"collapse":"");const i=or[t.position||""]||{};Object.keys(i).forEach((e=>{r=Ho(r,e,i[e])})),r.id=t.id||null,r.class=t.className||null;const a=e.tr.setNodeMarkup(l,null,r);return e.apply(a)})(i,t,r),i=pr(i,t,r);const s=Ml(l,(e=>"table_wrapper"===e.type.name)),c=l.start((null==s?void 0:s.depth)||0)-1,d=hr(i,t,r,s,c);i=d.state;const p=d.pos,m=i.doc.nodeAt(d.pos);if(!m)return;const u=p+(s||o).node.content.size,g=e.tr.replaceWith(p,u,m),h=n.Selection.atEnd(m),f=n.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},br=e=>{const{view:t,...l}=e,r=d.useLocalization(),[n,a]=b.useState(!1),s=!(!t||!Ml(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=b.useCallback((()=>{a(!0)}),[]),p=b.useCallback((()=>{a(!1),null==t||t.focus()}),[t]),m=b.useCallback((e=>{if(t&&e){const l=fr(t.state,e);l&&t.dispatch(l)}p()}),[t,p]);return b.createElement(b.Fragment,null,b.createElement(o.Button,{type:"button",title:r.toLanguageString(wl.tableProperties,Cl[wl.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:c,disabled:!s,...Il,...l}),n&&b.createElement(wr,{onClose:p,onSave:m,view:t}))},vr=[{textKey:wl.tablePropertiesAlignLeft,text:Cl[wl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:wl.tablePropertiesAlignCenter,text:Cl[wl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:wl.tablePropertiesAlignRight,text:Cl[wl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:wl.tablePropertiesNoAlignment,text:Cl[wl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],kr=[{textKey:wl.tablePropertiesLeft,text:Cl[wl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:wl.tablePropertiesCenter,text:Cl[wl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:wl.tablePropertiesRight,text:Cl[wl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map((e=>({...e,style:or[e.value]}))),yr=[{textKey:wl.tablePropertiesTop,text:Cl[wl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:wl.tablePropertiesBottom,text:Cl[wl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],Cr=[{textKey:wl.tablePropertiesNone,text:Cl[wl.tablePropertiesNone],value:"none"},{textKey:wl.tablePropertiesUsingScopeAttribute,text:Cl[wl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:wl.tablePropertiesUsingIdAttributes,text:Cl[wl.tablePropertiesUsingIdAttributes],value:"id"}],wr=e=>{const t=b.useMemo((()=>{const t=e.view&&e.view.state;return t?ir(t):lr}),[e.view]),l=d.useLocalization(),[r,n]=b.useState(0),i=b.useCallback((e=>{n(e.selected)}),[]),c=b.useRef(null),m=b.useRef(null),u=b.useRef(null),h=b.useRef(null),f=b.useRef(null),v=b.useRef(null),k=b.useRef(null),y=b.useRef(null),C=b.useRef(null),w=b.useRef(null),S=b.useRef(null),E=b.useRef(null),x=b.useRef(null),T=b.useRef(null),P=b.useRef(null),I=b.useRef(null),N=b.useRef(null),R=b.useRef(null),L=b.useRef(null),A=b.useRef(null),B=b.useRef(null),D=b.useRef(null),M=b.useRef(null),z=b.useCallback((()=>{var t,l,o,r,n,i,a,s,d,p,g,b,z,F,H,W,K,U,O,V;const _={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=m.current)?void 0:l.value)||0,width:u.current?u.current.value:null,height:h.current?h.current.value:null,cellSpacing:f.current?f.current.value:null,cellPadding:v.current?v.current.value:null,borderWidth:k.current?k.current.value:null,widthUnit:(null==(o=y.current)?void 0:o.value)||"",heightUnit:(null==(r=C.current)?void 0:r.value)||"",position:(null==(i=null==(n=w.current)?void 0:n.value)?void 0:i.value)||null,textAlign:null!=(a=S.current)&&a.value?S.current.value.value:null,borderStyle:null!=(s=E.current)&&s.value?E.current.value.value:null,backgroundColor:null==(d=x.current)?void 0:d.value,borderColor:null==(p=T.current)?void 0:p.value,collapseBorders:!(null==(b=null==(g=P.current)?void 0:g.element)||!b.checked),id:String((null==(z=I.current)?void 0:z.value)||""),className:String((null==(F=N.current)?void 0:F.value)||""),caption:String((null==(H=R.current)?void 0:H.value)||""),headerRows:(null==(W=L.current)?void 0:W.value)||0,headerColumns:(null==(K=A.current)?void 0:K.value)||0,captionAlignment:null!=(U=B.current)&&U.value?B.current.value.value:null,captionPosition:null!=(O=D.current)&&O.value?D.current.value.value:null,associateHeaders:null!=(V=M.current)&&V.value?M.current.value.value:"none"};e.onSave.call(void 0,_)}),[e.onSave]),F=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesRows,Cl[wl.tablePropertiesRows])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:c,defaultValue:t.rows,min:1}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesColumns,Cl[wl.tablePropertiesColumns])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:m,defaultValue:t.columns,min:1}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesWidth,Cl[wl.tablePropertiesWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:u,defaultValue:t.width,min:0,placeholder:l.toLanguageString(wl.sizeAuto,Cl[wl.sizeAuto])}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:y,defaultValue:t.widthUnit,data:Al,popupSettings:Bl}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesHeight,Cl[wl.tablePropertiesHeight])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(wl.sizeAuto,Cl[wl.sizeAuto])}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"}," "),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.AutoComplete,{ref:C,defaultValue:t.heightUnit,data:Al.filter((e=>"%"!==e)),popupSettings:Bl}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesPosition,Cl[wl.tablePropertiesPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:w,defaultValue:kr.find((e=>e.value===t.position)),popupSettings:Bl,data:kr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",valueRender:Zo,itemRender:er}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesAlignment,Cl[wl.tablePropertiesAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:S,defaultValue:vr.find((e=>e.value===t.textAlign)),data:vr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Bl,valueRender:Zo,itemRender:er}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesCellSpacing,Cl[wl.tablePropertiesCellSpacing])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:f,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(wl.sizeAuto,Cl[wl.sizeAuto]),min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesCellPadding,Cl[wl.tablePropertiesCellPadding])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(wl.sizeAuto,Cl[wl.sizeAuto]),min:0}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesTableBackground,Cl[wl.tablePropertiesTableBackground])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:x,defaultValue:t.backgroundColor}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesBorderWidth,Cl[wl.tablePropertiesBorderWidth])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:k,defaultValue:t.borderWidth,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesBorderColor,Cl[wl.tablePropertiesBorderColor])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.ColorPicker,{ref:T,defaultValue:t.borderColor}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesBorderStyle,Cl[wl.tablePropertiesBorderStyle])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:E,defaultValue:Dl.find((e=>e.value===t.borderStyle)),popupSettings:Bl,data:Dl.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value"}))),b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Checkbox,{ref:P,className:"k-checkbox-wrap",label:l.toLanguageString(wl.tablePropertiesCollapseBorders,Cl[wl.tablePropertiesCollapseBorders]),defaultChecked:t.collapseBorders})))))),H=b.createElement("div",{className:"k-form k-form-md"},b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("div",{className:"k-form-layout k-d-grid"},b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesId,Cl[wl.tablePropertiesId])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:I,defaultValue:t.id}))),b.createElement("div",{className:"k-form-field"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesCssClass,Cl[wl.tablePropertiesCssClass])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:N,defaultValue:t.className}))),b.createElement("fieldset",{className:"k-form-fieldset"},b.createElement("legend",{className:"k-form-legend"},l.toLanguageString(wl.tablePropertiesAccessibility,Cl[wl.tablePropertiesAccessibility])),b.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},b.createElement("div",{className:"k-form-field k-col-span-full"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesCaption,Cl[wl.tablePropertiesCaption])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.TextBox,{ref:R,defaultValue:t.caption}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesCaptionPosition,Cl[wl.tablePropertiesCaptionPosition])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:D,defaultValue:yr.find((e=>e.value===t.captionPosition)),data:yr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Bl,textField:"text",dataItemKey:"value",valueRender:Zo,itemRender:er}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesCaptionAlignment,Cl[wl.tablePropertiesCaptionAlignment])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:B,defaultValue:vr.find((e=>e.value===t.captionAlignment)),data:vr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Bl,textField:"text",dataItemKey:"value",valueRender:Zo,itemRender:er}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesHeaderRows,Cl[wl.tablePropertiesHeaderRows])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:L,defaultValue:t.headerRows,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-1"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesHeaderCols,Cl[wl.tablePropertiesHeaderCols])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.NumericTextBox,{ref:A,defaultValue:t.headerColumns,min:0}))),b.createElement("div",{className:"k-form-field k-col-span-2"},b.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(wl.tablePropertiesAssociateHeaders,Cl[wl.tablePropertiesAssociateHeaders])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(g.DropDownList,{ref:M,defaultValue:Cr.find((e=>e.value===t.associateHeaders)),data:Cr.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Bl,textField:"text",dataItemKey:"value"})))))))),W=b.createElement(p.TabStrip,{selected:r,onSelect:i,animation:!1,keepTabsMounted:!0},b.createElement(p.TabStripTab,{title:l.toLanguageString(wl.tablePropertiesGeneral,Cl[wl.tablePropertiesGeneral])},F),b.createElement(p.TabStripTab,{title:l.toLanguageString(wl.tablePropertiesAdvanced,Cl[wl.tablePropertiesAdvanced])},H)),K=[b.createElement(o.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(wl.tablePropertiesSave,Cl[wl.tablePropertiesSave])),b.createElement(o.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(wl.tablePropertiesCancel,Cl[wl.tablePropertiesCancel]))];return b.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(wl.tableProperties,Cl[wl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,b.createElement(a.WindowActionsBar,{layout:"start"},...K))};e.EditorTools=void 0,(t=>{function l(e){return to(e)}t.createAlignTool=l;class o extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=o;class r extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=r;class n extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=n;class a extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return Zl.createInsertTableTool(e)}t.AlignJustify=a,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends Yl.InsertTablePopup{}function p(e){return lo.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class m extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=m;class u extends(p(e.EditorToolsSettings.fontName)){}function g(e){return ro.createFormatBlockDropDownList(e)}t.FontName=u,t.ForeColor=t=>b.createElement(oo,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>b.createElement(oo,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function f(e){return io.createUndoTool(e)}function v(e){return io.createRedoTool(e)}t.FormatBlock=h,t.createUndoTool=f,t.createRedoTool=v;class k extends(f(e.EditorToolsSettings.undo)){}t.Undo=k;class y extends(v(e.EditorToolsSettings.redo)){}function C(e){return ao.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return so.createInlineFormatTool(e)}t.Indent=w,t.createInlineFormatTool=S;class E extends(S(e.EditorToolsSettings.bold)){}t.Bold=E;class x extends(S(e.EditorToolsSettings.italic)){}t.Italic=x;class T extends(S(e.EditorToolsSettings.underline)){}t.Underline=T;class P extends(S(e.EditorToolsSettings.strikethrough)){}t.Strikethrough=P;class I extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=I;class N extends(S(e.EditorToolsSettings.superscript)){}function R(e){return co(e)}t.Superscript=N,t.createInsertImageTool=R;class L extends(R(e.EditorToolsSettings.image)){}function A(e){return po.createLinkTool(e)}t.InsertImage=L,t.createLinkTool=A;class B extends(A(e.EditorToolsSettings.link)){}t.Link=B;class D extends(A(e.EditorToolsSettings.insertFile)){}function M(e){return mo.createListTool(e)}t.InsertFile=D,t.createListTool=M;class z extends(M(e.EditorToolsSettings.orderedList)){}t.OrderedList=z;class F extends(M(e.EditorToolsSettings.bulletList)){}function H(e){return uo.createOutdentTool(e)}t.UnorderedList=F,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:i.listUnorderedIcon,text:"Disc",style:"disc"},{icon:"list-unordered-outline",svgIcon:i.listUnorderedOutlineIcon,text:"Circle",style:"circle"},{icon:"list-unordered-square",svgIcon:i.listUnorderedSquareIcon,text:"Square",style:"square"}];return b.createElement(Ao,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:i.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:i.listOrderedIcon,text:"Decimal"},{icon:"list-roman-upper",svgIcon:i.listRomanUpperIcon,text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",svgIcon:i.listRomanLowerIcon,text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",svgIcon:i.listLatinBigIcon,text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",svgIcon:i.listLatinSmallIcon,text:"Lower latin",style:"lower-latin"}];return b.createElement(Ao,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:i.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=Qo,t.TableProperties=br,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return fo.createAddRowBeforeTool(e)}function U(e){return fo.createAddRowAfterTool(e)}function O(e){return fo.createAddColumnBeforeTool(e)}function V(e){return fo.createAddColumnAfterTool(e)}function _(e){return fo.createDeleteRowTool(e)}function j(e){return fo.createDeleteColumnTool(e)}function q(e){return fo.createDeleteTableTool(e)}function $(e){return fo.createMergeCellsTool(e)}function G(e){return fo.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>b.createElement(yo,{...e}),t.Pdf=e=>b.createElement(So,{...e}),t.SelectAll=e=>b.createElement(xo,{...e}),t.CleanFormatting=e=>b.createElement(Io,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=O,t.createAddColumnAfterTool=V,t.createDeleteRowTool=_,t.createDeleteColumnTool=j,t.createDeleteTableTool=q,t.createMergeCellsTool=$,t.createSplitCellTool=G;class J extends(K(e.EditorToolsSettings.addRowBefore)){}t.AddRowBefore=J;class Q extends(U(e.EditorToolsSettings.addRowAfter)){}t.AddRowAfter=Q;class X extends(O(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(V(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(_(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(q(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class oe extends(G(e.EditorToolsSettings.splitCell)){}function re(e){return bo.createUnlinkTool(e)}t.SplitCell=oe,t.createUnlinkTool=re;class ne extends(re(e.EditorToolsSettings.unlink)){}function ie(e){return vo.createViewHtmlTool(e)}t.Unlink=ne,t.createViewHtmlTool=ie;class ae extends(ie(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ae;t.FindAndReplace=class extends Ro{}})(e.EditorTools||(e.EditorTools={}));const Sr={Selection:n.Selection,SelectionRange:n.SelectionRange,TextSelection:n.TextSelection,NodeSelection:n.NodeSelection,AllSelection:n.AllSelection,EditorState:n.EditorState,Plugin:n.Plugin,PluginKey:n.PluginKey,Transaction:n.Transaction,Decoration:n.Decoration,DecorationSet:n.DecorationSet,EditorView:n.EditorView,Node:n.Node,ResolvedPos:n.ResolvedPos,NodeRange:n.NodeRange,Fragment:n.Fragment,Slice:n.Slice,ReplaceError:n.ReplaceError,Mark:n.Mark,Schema:n.Schema,NodeType:n.NodeType,MarkType:n.MarkType,ContentMatch:n.ContentMatch,DOMParser:n.DOMParser,DOMSerializer:n.DOMSerializer,Transform:n.Transform,Step:n.Step,StepResult:n.StepResult,joinPoint:n.joinPoint,canJoin:n.canJoin,canSplit:n.canSplit,insertPoint:n.insertPoint,dropPoint:n.dropPoint,liftTarget:n.liftTarget,findWrapping:n.findWrapping,StepMap:n.StepMap,MapResult:n.MapResult,Mapping:n.Mapping,AddMarkStep:n.AddMarkStep,RemoveMarkStep:n.RemoveMarkStep,ReplaceStep:n.ReplaceStep,ReplaceAroundStep:n.ReplaceAroundStep,replaceStep:n.replaceStep,deleteSelection:n.deleteSelection,joinBackward:n.joinBackward,selectNodeBackward:n.selectNodeBackward,joinForward:n.joinForward,selectNodeForward:n.selectNodeForward,joinUp:n.joinUp,joinDown:n.joinDown,lift:n.lift,newlineInCode:n.newlineInCode,exitCode:n.exitCode,createParagraphNear:n.createParagraphNear,liftEmptyBlock:n.liftEmptyBlock,splitBlock:n.splitBlock,splitBlockKeepMarks:n.splitBlockKeepMarks,selectParentNode:n.selectParentNode,selectAll:n.selectAll,wrapIn:n.wrapIn,setBlockType:n.setBlockType,toggleMark:n.toggleMark,autoJoin:n.autoJoin,chainCommands:n.chainCommands,pcBaseKeymap:n.pcBaseKeymap,macBaseKeymap:n.macBaseKeymap,baseKeymap:n.baseKeymap,history:n.history,undo:n.undo,redo:n.redo,undoDepth:n.undoDepth,redoDepth:n.redoDepth,InputRule:n.InputRule,inputRules:n.inputRules,undoInputRule:n.undoInputRule,emDash:n.emDash,ellipsis:n.ellipsis,openDoubleQuote:n.openDoubleQuote,closeDoubleQuote:n.closeDoubleQuote,openSingleQuote:n.openSingleQuote,closeSingleQuote:n.closeSingleQuote,smartQuotes:n.smartQuotes,wrappingInputRule:n.wrappingInputRule,textblockTypeInputRule:n.textblockTypeInputRule,keymap:n.keymap,keydownHandler:n.keydownHandler,orderedList:n.orderedList,bulletList:n.bulletList,listItem:n.listItem,addListNodes:n.addListNodes,wrapInList:n.wrapInList,splitListItem:n.splitListItem,liftListItem:n.liftListItem,sinkListItem:n.sinkListItem,dropCursor:n.dropCursor,gapCursor:n.gapCursor,tableEditing:n.tableEditing,fixTables:n.fixTables,fixTablesKey:n.fixTablesKey,cellAround:n.cellAround,isInTable:n.isInTable,selectionCell:n.selectionCell,moveCellForward:n.moveCellForward,inSameTable:n.inSameTable,findCell:n.findCell,colCount:n.colCount,nextCell:n.nextCell,removeColSpan:n.removeColSpan,addColSpan:n.addColSpan,columnIsHeader:n.columnIsHeader,tableNodes:n.tableNodes,tableNodeTypes:n.tableNodeTypes,CellSelection:n.CellSelection,TableMap:n.TableMap,tableEditingKey:n.tableEditingKey,columnResizing:n.columnResizing,columnResizingPluginKey:n.columnResizingPluginKey,updateColumnsOnResize:n.updateColumnsOnResize,selectedRect:n.selectedRect,addColumn:n.addColumn,addColumnBefore:n.addColumnBefore,addColumnAfter:n.addColumnAfter,deleteColumn:n.deleteColumn,rowIsHeader:n.rowIsHeader,addRow:n.addRow,addRowBefore:n.addRowBefore,addRowAfter:n.addRowAfter,deleteRow:n.deleteRow,mergeCells:n.mergeCells,splitCell:n.splitCell,splitCellWithType:n.splitCellWithType,setCellAttr:n.setCellAttr,toggleHeader:n.toggleHeader,toggleHeaderRow:n.toggleHeaderRow,toggleHeaderColumn:n.toggleHeaderColumn,toggleHeaderCell:n.toggleHeaderCell,goToNextCell:n.goToNextCell,deleteTable:n.deleteTable};Object.defineProperty(e,"getHtml",{enumerable:!0,get:function(){return n.getHtml}}),Object.defineProperty(e,"marks",{enumerable:!0,get:function(){return n.marks}}),Object.defineProperty(e,"nodes",{enumerable:!0,get:function(){return n.nodes}}),Object.defineProperty(e,"parseContent",{enumerable:!0,get:function(){return n.parseContent}}),e.Editor=Ql,e.ProseMirror=Sr,e.editorPropsKey=Tl}));
|