From 81b11e13980c5abb2e44e55a8878233e8ce1f193 Mon Sep 17 00:00:00 2001 From: BryanValverdeU Date: Fri, 14 Jul 2023 16:49:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20d7bae?= =?UTF-8?q?b5776e5ddc70500afa4ac5755139c9e8ed4=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coverage/index.html | 286 +- coverage/lcov.info | 15818 ++++++++-------- .../context/createDomToModelContext.ts.html | 12 +- .../context/defaultProcessors.ts.html | 2 +- .../lib/domToModel/context/index.html | 2 +- .../lib/domToModel/domToContentModel.ts.html | 12 +- .../lib/domToModel/index.html | 2 +- .../processors/blockProcessor.ts.html | 24 +- .../domToModel/processors/brProcessor.ts.html | 8 +- .../processors/childProcessor.ts.html | 36 +- .../processors/codeProcessor.ts.html | 2 +- .../processors/delimiterProcessor.ts.html | 2 +- .../processors/elementProcessor.ts.html | 12 +- .../processors/entityProcessor.ts.html | 26 +- .../processors/fontProcessor.ts.html | 2 +- .../formatContainerProcessor.ts.html | 42 +- .../processors/generalProcessor.ts.html | 2 +- .../processors/headingProcessor.ts.html | 2 +- .../domToModel/processors/hrProcessor.ts.html | 2 +- .../processors/imageProcessor.ts.html | 32 +- .../lib/domToModel/processors/index.html | 2 +- .../processors/knownElementProcessor.ts.html | 56 +- .../processors/linkProcessor.ts.html | 2 +- .../processors/listItemProcessor.ts.html | 2 +- .../processors/listProcessor.ts.html | 2 +- .../domToModel/processors/pProcessor.ts.html | 2 +- .../processors/tableProcessor.ts.html | 152 +- .../processors/textProcessor.ts.html | 32 +- .../utils/addSelectionMarker.ts.html | 8 +- .../domToModel/utils/areSameFormats.ts.html | 2 +- .../utils/getBoundingClientRect.ts.html | 4 +- .../domToModel/utils/getDefaultStyle.ts.html | 6 +- .../utils/getRegularSelectionOffsets.ts.html | 10 +- .../lib/domToModel/utils/index.html | 2 +- .../domToModel/utils/isBlockElement.ts.html | 6 +- .../lib/domToModel/utils/parseFormat.ts.html | 8 +- .../lib/domToModel/utils/stackFormat.ts.html | 56 +- .../lib/domUtils/index.html | 2 +- .../lib/domUtils/isNodeOfType.ts.html | 4 +- .../lib/domUtils/metadata/index.html | 2 +- .../metadata/updateListMetadata.ts.html | 4 +- .../domUtils/metadata/updateMetadata.ts.html | 28 +- .../lib/domUtils/stringUtil.ts.html | 4 +- .../block/directionFormatHandler.ts.html | 8 +- .../block/displayFormatHandler.ts.html | 8 +- .../block/htmlAlignFormatHandler.ts.html | 12 +- .../lib/formatHandlers/block/index.html | 2 +- .../block/lineHeightFormatHandler.ts.html | 8 +- .../block/marginFormatHandler.ts.html | 14 +- .../block/paddingFormatHandler.ts.html | 18 +- .../block/textAlignFormatHandler.ts.html | 14 +- .../block/whiteSpaceFormatHandler.ts.html | 14 +- .../backgroundColorFormatHandler.ts.html | 8 +- .../common/borderBoxFormatHandler.ts.html | 6 +- .../common/borderFormatHandler.ts.html | 24 +- .../common/boxShadowFormatHandler.ts.html | 6 +- .../common/datasetFormatHandler.ts.html | 10 +- .../common/idFormatHandler.ts.html | 6 +- .../lib/formatHandlers/common/index.html | 10 +- .../common/sizeFormatHandler.ts.html | 56 +- .../common/verticalAlignFormatHandler.ts.html | 14 +- .../common/wordBreakFormatHandler.ts.html | 8 +- .../defaultFormatHandlers.ts.html | 30 +- .../lib/formatHandlers/index.html | 2 +- .../lib/formatHandlers/list/index.html | 2 +- .../listItemMetadataFormatHandler.ts.html | 2 +- .../list/listItemThreadFormatHandler.ts.html | 2 +- .../listLevelMetadataFormatHandler.ts.html | 8 +- .../list/listLevelThreadFormatHandler.ts.html | 20 +- .../listStylePositionFormatHandler.ts.html | 4 +- .../list/listTypeFormatHandler.ts.html | 2 +- .../segment/boldFormatHandler.ts.html | 10 +- .../segment/fontFamilyFormatHandler.ts.html | 10 +- .../segment/fontSizeFormatHandler.ts.html | 14 +- .../lib/formatHandlers/segment/index.html | 2 +- .../segment/italicFormatHandler.ts.html | 12 +- .../letterSpacingFormatHandler.ts.html | 8 +- .../segment/linkFormatHandler.ts.html | 16 +- .../segment/strikeFormatHandler.ts.html | 8 +- .../superOrSubScriptFormatHandler.ts.html | 12 +- .../segment/textColorFormatHandler.ts.html | 14 +- .../segment/underlineFormatHandler.ts.html | 16 +- .../lib/formatHandlers/table/index.html | 2 +- .../table/tableLayoutFormatHandler.ts.html | 8 +- .../table/tableSpacingFormatHandler.ts.html | 14 +- .../textColorOnTableCellFormatHandler.ts.html | 6 +- .../lib/formatHandlers/utils/color.ts.html | 20 +- .../utils/defaultStyles.ts.html | 2 +- .../lib/formatHandlers/utils/dir.ts.html | 2 +- .../lib/formatHandlers/utils/index.html | 2 +- .../utils/parseValueWithUnit.ts.html | 26 +- .../lib/index.html | 2 +- .../lib/index.ts.html | 14 +- .../lib/modelApi/block/index.html | 2 +- .../block/setParagraphNotImplicit.ts.html | 6 +- .../lib/modelApi/common/addBlock.ts.html | 4 +- .../lib/modelApi/common/addDecorators.ts.html | 10 +- .../lib/modelApi/common/addSegment.ts.html | 24 +- .../lib/modelApi/common/index.html | 2 +- .../lib/modelApi/common/isEmpty.ts.html | 18 +- .../modelApi/common/isGeneralSegment.ts.html | 2 +- .../common/isWhiteSpacePreserved.ts.html | 4 +- .../common/normalizeContentModel.ts.html | 26 +- .../common/normalizeParagraph.ts.html | 30 +- .../modelApi/common/normalizeSegment.ts.html | 56 +- .../lib/modelApi/common/unwrapBlock.ts.html | 2 +- .../lib/modelApi/creators/createBr.ts.html | 4 +- .../createContentModelDocument.ts.html | 10 +- .../modelApi/creators/createDivider.ts.html | 2 +- .../modelApi/creators/createEntity.ts.html | 4 +- .../creators/createFormatContainer.ts.html | 4 +- .../creators/createGeneralBlock.ts.html | 2 +- .../creators/createGeneralSegment.ts.html | 2 +- .../lib/modelApi/creators/createImage.ts.html | 4 +- .../modelApi/creators/createListItem.ts.html | 6 +- .../modelApi/creators/createParagraph.ts.html | 16 +- .../creators/createParagraphDecorator.ts.html | 2 +- .../creators/createSelectionMarker.ts.html | 4 +- .../lib/modelApi/creators/createTable.ts.html | 10 +- .../modelApi/creators/createTableCell.ts.html | 8 +- .../lib/modelApi/creators/createText.ts.html | 4 +- .../lib/modelApi/creators/index.html | 2 +- .../lib/modelToDom/contentModelToDom.ts.html | 54 +- .../context/createModelToDomContext.ts.html | 6 +- .../defaultContentModelHandlers.ts.html | 2 +- .../lib/modelToDom/context/index.html | 2 +- .../modelToDom/handlers/handleBlock.ts.html | 16 +- .../handlers/handleBlockGroupChildren.ts.html | 28 +- .../lib/modelToDom/handlers/handleBr.ts.html | 12 +- .../modelToDom/handlers/handleDivider.ts.html | 2 +- .../modelToDom/handlers/handleEntity.ts.html | 2 +- .../handlers/handleFormatContainer.ts.html | 2 +- .../handlers/handleGeneralModel.ts.html | 2 +- .../modelToDom/handlers/handleImage.ts.html | 38 +- .../modelToDom/handlers/handleList.ts.html | 48 +- .../handlers/handleListItem.ts.html | 2 +- .../handlers/handleParagraph.ts.html | 60 +- .../modelToDom/handlers/handleSegment.ts.html | 26 +- .../handlers/handleSegmentDecorator.ts.html | 22 +- .../modelToDom/handlers/handleTable.ts.html | 98 +- .../modelToDom/handlers/handleText.ts.html | 12 +- .../lib/modelToDom/handlers/index.html | 2 +- .../lib/modelToDom/index.html | 30 +- .../lib/modelToDom/optimizers/index.html | 2 +- .../modelToDom/optimizers/mergeNode.ts.html | 10 +- .../modelToDom/optimizers/optimize.ts.html | 12 +- .../optimizers/removeUnnecessarySpan.ts.html | 22 +- .../lib/modelToDom/utils/applyFormat.ts.html | 6 +- .../utils/handleSegmentCommon.ts.html | 14 +- .../lib/modelToDom/utils/index.html | 2 +- .../utils/reuseCachedElement.ts.html | 2 +- .../lib/modelToDom/utils/stackFormat.ts.html | 18 +- .../lib/domToModel/processors/index.html | 2 +- .../reducedModelChildProcessor.ts.html | 2 +- .../processors/tablePreProcessor.ts.html | 8 +- .../lib/domUtils/borderValues.ts.html | 2 +- .../lib/domUtils/index.html | 2 +- .../lib/domUtils/metadata/index.html | 2 +- .../metadata/updateImageMetadata.ts.html | 2 +- .../metadata/updateTableCellMetadata.ts.html | 2 +- .../metadata/updateTableMetadata.ts.html | 2 +- .../lib/editor/ContentModelEditor.ts.html | 14 +- .../editor/coreApi/createContentModel.ts.html | 18 +- .../coreApi/createEditorContext.ts.html | 24 +- .../lib/editor/coreApi/index.html | 2 +- .../editor/coreApi/setContentModel.ts.html | 8 +- .../editor/coreApi/switchShadowEdit.ts.html | 2 +- .../ContentModelCopyPastePlugin.ts.html | 2 +- .../ContentModelTypeInContainerPlugin.ts.html | 2 +- .../lib/editor/corePlugins/index.html | 2 +- .../createContentModelEditorCore.ts.html | 2 +- .../lib/editor/index.html | 2 +- .../lib/editor/isContentModelEditor.ts.html | 2 +- .../plugins/ContentModelEditPlugin.ts.html | 10 +- .../plugins/ContentModelFormatPlugin.ts.html | 12 +- .../ContentModelPastePlugin.ts.html | 34 +- .../plugins/PastePlugin/Excel/index.html | 10 +- .../processPastedContentFromExcel.ts.html | 50 +- .../plugins/PastePlugin/PowerPoint/index.html | 2 +- ...processPastedContentFromPowerPoint.ts.html | 2 +- .../PastePlugin/WacComponents/index.html | 2 +- .../processPastedContentWacComponents.ts.html | 2 +- .../PastePlugin/WordDesktop/index.html | 2 +- ...rocessPastedContentFromWordDesktop.ts.html | 2 +- .../WordDesktop/processWordComments.ts.html | 2 +- .../WordDesktop/processWordLists.ts.html | 2 +- .../lib/editor/plugins/PastePlugin/index.html | 10 +- .../PastePlugin/utils/addParser.ts.html | 12 +- .../utils/deprecatedColorParser.ts.html | 8 +- .../plugins/PastePlugin/utils/index.html | 2 +- .../PastePlugin/utils/linkParser.ts.html | 2 +- .../PastePlugin/utils/setProcessor.ts.html | 2 +- .../lib/editor/plugins/index.html | 2 +- .../utils/handleKeyboardEventCommon.ts.html | 6 +- .../lib/editor/utils/index.html | 2 +- .../block/getLeafSiblingBlock.ts.html | 2 +- .../lib/modelApi/block/index.html | 2 +- .../modelApi/block/setModelAlignment.ts.html | 2 +- .../modelApi/block/setModelDirection.ts.html | 2 +- .../block/setModelIndentation.ts.html | 2 +- .../block/toggleModelBlockQuote.ts.html | 2 +- .../modelApi/common/clearModelFormat.ts.html | 2 +- .../lib/modelApi/common/cloneModel.ts.html | 2 +- .../getClosestAncestorBlockGroupIndex.ts.html | 14 +- .../lib/modelApi/common/index.html | 2 +- .../common/isBlockGroupOfType.ts.html | 2 +- .../lib/modelApi/common/mergeModel.ts.html | 74 +- .../common/retrieveModelFormatState.ts.html | 2 +- .../lib/modelApi/common/wrapBlock.ts.html | 2 +- .../lib/modelApi/edit/deleteSelection.ts.html | 16 +- .../deleteAllSegmentBefore.ts.html | 2 +- .../deleteCollapsedSelection.ts.html | 2 +- .../deleteSteps/deleteWordSelection.ts.html | 2 +- .../lib/modelApi/edit/deleteSteps/index.html | 2 +- .../lib/modelApi/edit/index.html | 2 +- .../edit/utils/createInsertPoint.ts.html | 4 +- .../modelApi/edit/utils/deleteBlock.ts.html | 2 +- .../utils/deleteExpandedSelection.ts.html | 38 +- .../modelApi/edit/utils/deleteSegment.ts.html | 2 +- .../edit/utils/deleteSingleChar.ts.html | 2 +- .../lib/modelApi/edit/utils/index.html | 2 +- .../lib/modelApi/format/index.html | 2 +- .../lib/modelApi/format/pendingFormat.ts.html | 18 +- .../image/applyImageBorderFormat.ts.html | 2 +- .../lib/modelApi/image/index.html | 2 +- .../list/findListItemsInSameThread.ts.html | 2 +- .../lib/modelApi/list/index.html | 2 +- .../lib/modelApi/list/setListType.ts.html | 2 +- .../selection/adjustSegmentSelection.ts.html | 2 +- .../selection/adjustWordSelection.ts.html | 2 +- .../selection/collapseTableSelection.ts.html | 2 +- .../selection/collectSelections.ts.html | 2 +- .../selection/getSelectionRootNode.ts.html | 4 +- .../lib/modelApi/selection/index.html | 2 +- .../selection/iterateSelections.ts.html | 56 +- .../modelApi/selection/setSelection.ts.html | 2 +- .../lib/modelApi/table/alignTable.ts.html | 2 +- .../lib/modelApi/table/alignTableCell.ts.html | 2 +- .../modelApi/table/applyTableFormat.ts.html | 2 +- .../lib/modelApi/table/canMergeCells.ts.html | 2 +- .../table/createTableStructure.ts.html | 2 +- .../lib/modelApi/table/deleteTable.ts.html | 2 +- .../modelApi/table/deleteTableColumn.ts.html | 2 +- .../lib/modelApi/table/deleteTableRow.ts.html | 2 +- .../modelApi/table/getSelectedCells.ts.html | 2 +- .../lib/modelApi/table/index.html | 2 +- .../modelApi/table/insertTableColumn.ts.html | 2 +- .../lib/modelApi/table/insertTableRow.ts.html | 2 +- .../modelApi/table/mergeTableCells.ts.html | 2 +- .../modelApi/table/mergeTableColumn.ts.html | 2 +- .../lib/modelApi/table/mergeTableRow.ts.html | 2 +- .../lib/modelApi/table/normalizeTable.ts.html | 2 +- .../table/setTableCellBackgroundColor.ts.html | 2 +- .../table/splitTableCellHorizontally.ts.html | 2 +- .../table/splitTableCellVertically.ts.html | 2 +- .../lib/publicApi/block/index.html | 2 +- .../lib/publicApi/block/setAlignment.ts.html | 2 +- .../lib/publicApi/block/setDirection.ts.html | 2 +- .../publicApi/block/setHeaderLevel.ts.html | 2 +- .../publicApi/block/setIndentation.ts.html | 2 +- .../block/setParagraphMargin.ts.html | 2 +- .../lib/publicApi/block/setSpacing.ts.html | 2 +- .../publicApi/block/toggleBlockQuote.ts.html | 2 +- .../editing/handleKeyDownEvent.ts.html | 2 +- .../lib/publicApi/editing/index.html | 2 +- .../format/applyPendingFormat.ts.html | 2 +- .../lib/publicApi/format/clearFormat.ts.html | 2 +- .../publicApi/format/getFormatState.ts.html | 2 +- .../publicApi/format/getSegmentFormat.ts.html | 2 +- .../lib/publicApi/format/index.html | 2 +- .../image/adjustImageSelection.ts.html | 2 +- .../lib/publicApi/image/changeImage.ts.html | 2 +- .../lib/publicApi/image/index.html | 2 +- .../lib/publicApi/image/insertImage.ts.html | 2 +- .../publicApi/image/setImageAltText.ts.html | 2 +- .../publicApi/image/setImageBorder.ts.html | 2 +- .../publicApi/image/setImageBoxShadow.ts.html | 2 +- .../link/adjustLinkSelection.ts.html | 2 +- .../lib/publicApi/link/index.html | 2 +- .../lib/publicApi/link/insertLink.ts.html | 2 +- .../lib/publicApi/link/removeLink.ts.html | 2 +- .../lib/publicApi/list/index.html | 2 +- .../publicApi/list/setListStartNumber.ts.html | 2 +- .../lib/publicApi/list/setListStyle.ts.html | 2 +- .../lib/publicApi/list/toggleBullet.ts.html | 2 +- .../publicApi/list/toggleNumbering.ts.html | 2 +- .../segment/applySegmentFormat.ts.html | 2 +- .../segment/changeCapitalization.ts.html | 2 +- .../publicApi/segment/changeFontSize.ts.html | 2 +- .../lib/publicApi/segment/index.html | 2 +- .../segment/setBackgroundColor.ts.html | 2 +- .../lib/publicApi/segment/setFontName.ts.html | 2 +- .../lib/publicApi/segment/setFontSize.ts.html | 2 +- .../publicApi/segment/setTextColor.ts.html | 2 +- .../lib/publicApi/segment/toggleBold.ts.html | 2 +- .../lib/publicApi/segment/toggleCode.ts.html | 2 +- .../publicApi/segment/toggleItalic.ts.html | 2 +- .../segment/toggleStrikethrough.ts.html | 2 +- .../publicApi/segment/toggleSubscript.ts.html | 2 +- .../segment/toggleSuperscript.ts.html | 2 +- .../publicApi/segment/toggleUnderline.ts.html | 2 +- .../selection/hasSelectionInBlock.ts.html | 2 +- .../hasSelectionInBlockGroup.ts.html | 2 +- .../selection/hasSelectionInSegment.ts.html | 2 +- .../lib/publicApi/selection/index.html | 2 +- .../lib/publicApi/table/index.html | 2 +- .../publicApi/table/setTableCellShade.ts.html | 2 +- .../utils/formatImageWithContentModel.ts.html | 2 +- .../formatParagraphWithContentModel.ts.html | 2 +- .../formatSegmentWithContentModel.ts.html | 2 +- .../utils/formatWithContentModel.ts.html | 40 +- .../lib/publicApi/utils/index.html | 30 +- .../lib/publicApi/utils/paste.ts.html | 78 +- .../roosterjs-color-utils/lib/index.html | 2 +- .../roosterjs-color-utils/lib/index.ts.html | 4 +- .../lib/utils/getDarkColor.ts.html | 2 +- .../lib/utils/index.html | 2 +- .../lib/format/changeCapitalization.ts.html | 104 +- .../lib/format/changeFontSize.ts.html | 2 +- .../lib/format/clearBlockFormat.ts.html | 4 +- .../lib/format/clearFormat.ts.html | 268 +- .../lib/format/createLink.ts.html | 2 +- .../lib/format/getFormatState.ts.html | 2 +- .../lib/format/index.html | 86 +- .../lib/format/insertEntity.ts.html | 2 +- .../lib/format/insertImage.ts.html | 2 +- .../lib/format/removeLink.ts.html | 2 +- .../lib/format/replaceWithNode.ts.html | 2 +- .../lib/format/rotateElement.ts.html | 2 +- .../lib/format/setAlignment.ts.html | 42 +- .../lib/format/setBackgroundColor.ts.html | 2 +- .../lib/format/setDirection.ts.html | 2 +- .../lib/format/setFontName.ts.html | 6 +- .../lib/format/setFontSize.ts.html | 16 +- .../lib/format/setImageAltText.ts.html | 2 +- .../lib/format/setIndentation.ts.html | 36 +- .../format/setOrderedListNumbering.ts.html | 2 +- .../lib/format/setTextColor.ts.html | 2 +- .../lib/format/toggleBlockQuote.ts.html | 10 +- .../lib/format/toggleBold.ts.html | 4 +- .../lib/format/toggleBullet.ts.html | 2 +- .../lib/format/toggleCodeBlock.ts.html | 2 +- .../lib/format/toggleHeader.ts.html | 2 +- .../lib/format/toggleItalic.ts.html | 4 +- .../lib/format/toggleNumbering.ts.html | 2 +- .../lib/format/toggleStrikethrough.ts.html | 2 +- .../lib/format/toggleSubscript.ts.html | 2 +- .../lib/format/toggleSuperscript.ts.html | 2 +- .../lib/format/toggleUnderline.ts.html | 4 +- .../roosterjs-editor-api/lib/index.html | 2 +- .../roosterjs-editor-api/lib/index.ts.html | 4 +- .../lib/table/applyCellShading.ts.html | 2 +- .../lib/table/editTable.ts.html | 2 +- .../lib/table/formatTable.ts.html | 2 +- .../roosterjs-editor-api/lib/table/index.html | 2 +- .../lib/table/insertTable.ts.html | 2 +- .../lib/utils/applyInlineStyle.ts.html | 40 +- .../lib/utils/applyListItemWrap.ts.html | 50 +- .../lib/utils/blockFormat.ts.html | 24 +- .../lib/utils/blockWrap.ts.html | 22 +- .../lib/utils/collapseSelectedBlocks.ts.html | 2 +- .../lib/utils/commitListChains.ts.html | 4 +- .../lib/utils/execCommand.ts.html | 56 +- .../lib/utils/formatUndoSnapshot.ts.html | 4 +- .../roosterjs-editor-api/lib/utils/index.html | 62 +- .../lib/utils/normalizeBlockquote.ts.html | 32 +- .../lib/utils/toggleListType.ts.html | 2 +- .../lib/coreApi/addUndoSnapshot.ts.html | 58 +- .../lib/coreApi/attachDomEvent.ts.html | 42 +- .../lib/coreApi/coreApiMap.ts.html | 2 +- .../lib/coreApi/createPasteFragment.ts.html | 2 +- .../lib/coreApi/ensureTypeInContainer.ts.html | 24 +- .../lib/coreApi/focus.ts.html | 18 +- .../lib/coreApi/getContent.ts.html | 40 +- .../coreApi/getPendableFormatState.ts.html | 2 +- .../lib/coreApi/getSelectionRange.ts.html | 24 +- .../lib/coreApi/getSelectionRangeEx.ts.html | 28 +- .../coreApi/getStyleBasedFormatState.ts.html | 2 +- .../lib/coreApi/hasFocus.ts.html | 6 +- .../lib/coreApi/index.html | 54 +- .../lib/coreApi/insertNode.ts.html | 136 +- .../lib/coreApi/restoreUndoSnapshot.ts.html | 2 +- .../lib/coreApi/select.ts.html | 68 +- .../lib/coreApi/selectImage.ts.html | 14 +- .../lib/coreApi/selectRange.ts.html | 20 +- .../lib/coreApi/selectTable.ts.html | 16 +- .../lib/coreApi/setContent.ts.html | 50 +- .../lib/coreApi/switchShadowEdit.ts.html | 2 +- .../lib/coreApi/transformColor.ts.html | 34 +- .../lib/coreApi/triggerEvent.ts.html | 16 +- .../lib/coreApi/utils/addUniqueId.ts.html | 2 +- .../lib/coreApi/utils/index.html | 2 +- .../lib/corePlugins/CopyPastePlugin.ts.html | 28 +- .../lib/corePlugins/DOMEventPlugin.ts.html | 94 +- .../lib/corePlugins/EditPlugin.ts.html | 26 +- .../lib/corePlugins/EntityPlugin.ts.html | 86 +- .../lib/corePlugins/ImageSelection.ts.html | 14 +- .../lib/corePlugins/LifecyclePlugin.ts.html | 126 +- .../lib/corePlugins/MouseUpPlugin.ts.html | 24 +- .../corePlugins/NormalizeTablePlugin.ts.html | 72 +- .../PendingFormatStatePlugin.ts.html | 30 +- .../corePlugins/TypeInContainerPlugin.ts.html | 12 +- .../lib/corePlugins/UndoPlugin.ts.html | 84 +- .../lib/corePlugins/createCorePlugins.ts.html | 8 +- .../lib/corePlugins/index.html | 38 +- .../utils/forEachSelectedCell.ts.html | 2 +- .../lib/corePlugins/utils/index.html | 2 +- .../utils/inlineEntityOnPluginEvent.ts.html | 2 +- .../utils/removeCellsOutsideSelection.ts.html | 2 +- .../lib/editor/DarkColorHandlerImpl.ts.html | 56 +- .../lib/editor/Editor.ts.html | 6 +- .../lib/editor/EditorBase.ts.html | 274 +- .../lib/editor/createEditorCore.ts.html | 30 +- .../lib/editor/index.html | 30 +- .../lib/editor/isFeatureEnabled.ts.html | 4 +- .../roosterjs-editor-core/lib/index.html | 2 +- .../roosterjs-editor-core/lib/index.ts.html | 4 +- .../blockElements/NodeBlockElement.ts.html | 16 +- .../StartEndBlockElement.ts.html | 22 +- .../getBlockElementAtNode.ts.html | 82 +- .../getFirstLastBlockElement.ts.html | 10 +- .../lib/blockElements/index.html | 2 +- .../createFragmentFromClipboardData.ts.html | 10 +- .../clipboard/extractClipboardEvent.ts.html | 2 +- .../clipboard/extractClipboardItems.ts.html | 2 +- .../extractClipboardItemsForIE.ts.html | 2 +- .../lib/clipboard/getPasteType.ts.html | 12 +- .../lib/clipboard/handleImagePaste.ts.html | 2 +- .../lib/clipboard/handleTextPaste.ts.html | 2 +- .../lib/clipboard/index.html | 2 +- .../retrieveMetadataFromClipboard.ts.html | 68 +- .../clipboard/sanitizePasteContent.ts.html | 10 +- .../lib/contentTraverser/BodyScoper.ts.html | 10 +- .../contentTraverser/ContentTraverser.ts.html | 90 +- .../PositionContentSearcher.ts.html | 76 +- .../SelectionBlockScoper.ts.html | 24 +- .../contentTraverser/SelectionScoper.ts.html | 62 +- .../lib/contentTraverser/index.html | 2 +- .../lib/delimiter/addDelimiters.ts.html | 2 +- .../delimiter/getDelimiterFromElement.ts.html | 8 +- .../lib/delimiter/index.html | 2 +- .../lib/edit/adjustInsertPosition.ts.html | 132 +- .../lib/edit/deleteSelectedContent.ts.html | 2 +- .../lib/edit/getTextContent.ts.html | 2 +- .../roosterjs-editor-dom/lib/edit/index.html | 38 +- .../lib/entity/commitEntity.ts.html | 2 +- .../lib/entity/entityPlaceholderUtils.ts.html | 42 +- .../lib/entity/getEntityFromElement.ts.html | 22 +- .../lib/entity/getEntitySelector.ts.html | 8 +- .../lib/entity/index.html | 2 +- .../lib/event/cacheGetEventData.ts.html | 12 +- .../lib/event/clearEventDataCache.ts.html | 2 +- .../roosterjs-editor-dom/lib/event/index.html | 2 +- .../lib/event/isCharacterValue.ts.html | 2 +- .../lib/event/isCtrlOrMetaPressed.ts.html | 6 +- .../lib/event/isModifierKey.ts.html | 2 +- .../lib/htmlSanitizer/HtmlSanitizer.ts.html | 212 +- .../chainSanitizerCallback.ts.html | 6 +- .../lib/htmlSanitizer/cloneObject.ts.html | 6 +- .../createDefaultHtmlSanitizerOptions.ts.html | 4 +- .../htmlSanitizer/getAllowedValues.ts.html | 42 +- .../getInheritableStyles.ts.html | 14 +- .../getPredefinedCssForElement.ts.html | 6 +- .../lib/htmlSanitizer/index.html | 2 +- .../htmlSanitizer/processCssVariable.ts.html | 4 +- .../roosterjs-editor-dom/lib/index.html | 10 +- .../roosterjs-editor-dom/lib/index.ts.html | 138 +- .../inlineElements/EmptyInlineElement.ts.html | 6 +- .../inlineElements/ImageInlineElement.ts.html | 4 +- .../inlineElements/LinkInlineElement.ts.html | 4 +- .../inlineElements/NodeInlineElement.ts.html | 24 +- .../PartialInlineElement.ts.html | 28 +- .../lib/inlineElements/applyTextStyle.ts.html | 64 +- .../getFirstLastInlineElement.ts.html | 6 +- .../getInlineElementAtNode.ts.html | 30 +- .../getInlineElementBeforeAfter.ts.html | 34 +- .../lib/inlineElements/index.html | 2 +- .../lib/jsUtils/arrayPush.ts.html | 4 +- .../lib/jsUtils/getObjectKeys.ts.html | 4 +- .../lib/jsUtils/index.html | 2 +- .../lib/jsUtils/toArray.ts.html | 4 +- .../lib/list/VList.ts.html | 66 +- .../lib/list/VListChain.ts.html | 74 +- .../lib/list/VListItem.ts.html | 78 +- .../lib/list/convertDecimalsToAlpha.ts.html | 2 +- .../lib/list/convertDecimalsToRomans.ts.html | 2 +- .../lib/list/createVListFromRegion.ts.html | 18 +- .../lib/list/getListTypeFromNode.ts.html | 10 +- .../lib/list/getRootListNode.ts.html | 14 +- .../roosterjs-editor-dom/lib/list/index.html | 10 +- .../lib/list/setBulletListMarkers.ts.html | 2 +- .../lib/list/setListItemStyle.ts.html | 72 +- .../lib/list/setNumberingListMarkers.ts.html | 2 +- .../lib/metadata/definitionCreators.ts.html | 2 +- .../lib/metadata/index.html | 2 +- .../lib/metadata/metadata.ts.html | 26 +- .../lib/metadata/validate.ts.html | 30 +- .../pasteSourceValidations/constants.ts.html | 2 +- .../documentContainWacElements.ts.html | 6 +- .../getPasteSource.ts.html | 16 +- .../lib/pasteSourceValidations/index.html | 2 +- .../isExcelDesktopDocument.ts.html | 6 +- .../isExcelOnlineDocument.ts.html | 6 +- .../isGoogleSheetDocument.ts.html | 6 +- .../isPowerPointDesktopDocument.ts.html | 4 +- .../isWordDesktopDocument.ts.html | 6 +- .../shouldConvertToSingleImage.ts.html | 6 +- .../lib/region/collapseNodesInRegion.ts.html | 18 +- .../lib/region/getRegionsFromRange.ts.html | 70 +- .../getSelectedBlockElementsInRegion.ts.html | 46 +- .../region/getSelectionRangeInRegion.ts.html | 34 +- .../lib/region/index.html | 2 +- .../lib/region/isNodeInRegion.ts.html | 4 +- .../lib/region/mergeBlocksInRegion.ts.html | 2 +- .../lib/selection/Position.ts.html | 90 +- .../lib/selection/addRangeToSelection.ts.html | 48 +- .../lib/selection/createRange.ts.html | 66 +- .../getHtmlWithSelectionPath.ts.html | 2 +- .../lib/selection/getPositionRect.ts.html | 2 +- .../lib/selection/getSelectionPath.ts.html | 62 +- .../lib/selection/index.html | 30 +- .../selection/isPositionAtBeginningOf.ts.html | 24 +- .../setHtmlWithSelectionPath.ts.html | 22 +- .../lib/snapshots/addSnapshot.ts.html | 38 +- .../snapshots/canMoveCurrentSnapshot.ts.html | 6 +- .../lib/snapshots/canUndoAutoComplete.ts.html | 4 +- .../clearProceedingSnapshots.ts.html | 8 +- .../lib/snapshots/createSnapshots.ts.html | 4 +- .../lib/snapshots/index.html | 2 +- .../lib/snapshots/moveCurrentSnapshot.ts.html | 2 +- .../lib/style/getStyles.ts.html | 20 +- .../roosterjs-editor-dom/lib/style/index.html | 2 +- .../lib/style/removeGlobalCssStyle.ts.html | 6 +- .../style/removeImportantStyleRule.ts.html | 2 +- .../lib/style/setGlobalCssStyles.ts.html | 2 +- .../lib/style/setStyles.ts.html | 22 +- .../lib/table/VTable.ts.html | 326 +- .../lib/table/applyTableFormat.ts.html | 2 +- .../lib/table/cloneCellStyles.ts.html | 2 +- .../roosterjs-editor-dom/lib/table/index.html | 40 +- .../lib/table/isWholeTableSelected.ts.html | 2 +- .../lib/table/pasteTable.ts.html | 2 +- .../lib/table/tableCellInfo.ts.html | 2 +- .../lib/table/tableFormatInfo.ts.html | 4 +- .../lib/utils/Browser.ts.html | 4 +- .../lib/utils/applyFormat.ts.html | 34 +- .../lib/utils/changeElementTag.ts.html | 26 +- .../lib/utils/collapseNodes.ts.html | 34 +- .../lib/utils/contains.ts.html | 32 +- .../lib/utils/createElement.ts.html | 38 +- .../utils/findClosestElementAncestor.ts.html | 14 +- .../lib/utils/fromHtml.ts.html | 2 +- .../lib/utils/getComputedStyles.ts.html | 32 +- .../lib/utils/getInnerHTML.ts.html | 2 +- .../lib/utils/getIntersectedRect.ts.html | 2 +- .../lib/utils/getLeafNode.ts.html | 16 +- .../lib/utils/getLeafSibling.ts.html | 46 +- .../lib/utils/getPendableFormatState.ts.html | 2 +- .../lib/utils/getTagOfNode.ts.html | 4 +- .../roosterjs-editor-dom/lib/utils/index.html | 2 +- .../lib/utils/isBlockElement.ts.html | 6 +- .../lib/utils/isNodeAfter.ts.html | 4 +- .../lib/utils/isNodeEmpty.ts.html | 22 +- .../lib/utils/isVoidHtmlElement.ts.html | 4 +- .../lib/utils/matchLink.ts.html | 2 +- .../lib/utils/matchesSelector.ts.html | 2 +- .../lib/utils/moveChildNodes.ts.html | 12 +- .../lib/utils/normalizeRect.ts.html | 2 +- .../lib/utils/parseColor.ts.html | 2 +- .../lib/utils/queryElements.ts.html | 46 +- .../lib/utils/readFile.ts.html | 2 +- .../lib/utils/safeInstanceOf.ts.html | 22 +- .../lib/utils/setColor.ts.html | 18 +- .../lib/utils/shouldSkipNode.ts.html | 32 +- .../lib/utils/splitParentNode.ts.html | 44 +- .../lib/utils/splitTextNode.ts.html | 2 +- .../lib/utils/unwrap.ts.html | 14 +- .../lib/utils/wrap.ts.html | 32 +- .../lib/AutoFormat.ts.html | 2 +- .../lib/ContentEdit.ts.html | 2 +- .../lib/ContextMenu.ts.html | 2 +- .../lib/CustomReplace.ts.html | 2 +- .../lib/CutPasteListChain.ts.html | 2 +- .../lib/HyperLink.ts.html | 2 +- .../lib/ImageEdit.ts.html | 2 +- .../lib/ImageResize.ts.html | 2 +- .../lib/Paste.ts.html | 2 +- .../lib/Picker.ts.html | 2 +- .../lib/TableCellSelection.ts.html | 2 +- .../lib/TableResize.ts.html | 2 +- .../lib/Watermark.ts.html | 2 +- .../roosterjs-editor-plugins/lib/index.html | 2 +- .../lib/index.ts.html | 2 +- .../lib/pluginUtils/DragAndDropHelper.ts.html | 2 +- .../lib/pluginUtils/index.html | 2 +- .../lib/plugins/AutoFormat/AutoFormat.ts.html | 2 +- .../lib/plugins/AutoFormat/index.html | 2 +- .../lib/plugins/AutoFormat/index.ts.html | 2 +- .../plugins/ContentEdit/ContentEdit.ts.html | 8 +- .../features/autoLinkFeatures.ts.html | 2 +- .../ContentEdit/features/codeFeatures.ts.html | 2 +- .../features/cursorFeatures.ts.html | 52 +- .../features/entityFeatures.ts.html | 2 +- .../plugins/ContentEdit/features/index.html | 62 +- .../ContentEdit/features/listFeatures.ts.html | 2 +- .../features/markdownFeatures.ts.html | 2 +- .../features/quoteFeatures.ts.html | 2 +- .../features/shortcutFeatures.ts.html | 2 +- .../features/structuredNodeFeatures.ts.html | 2 +- .../features/tableFeatures.ts.html | 2 +- .../ContentEdit/features/textFeatures.ts.html | 208 +- .../ContentEdit/getAllFeatures.ts.html | 2 +- .../lib/plugins/ContentEdit/index.html | 2 +- .../lib/plugins/ContentEdit/index.ts.html | 2 +- .../utils/convertAlphaToDecimals.ts.html | 2 +- .../utils/getAutoBulletListStyle.ts.html | 2 +- .../utils/getAutoNumberingListStyle.ts.html | 2 +- .../lib/plugins/ContentEdit/utils/index.html | 2 +- .../plugins/ContextMenu/ContextMenu.ts.html | 2 +- .../lib/plugins/ContextMenu/index.html | 2 +- .../lib/plugins/ContextMenu/index.ts.html | 2 +- .../CustomReplace/CustomReplace.ts.html | 2 +- .../lib/plugins/CustomReplace/index.html | 2 +- .../lib/plugins/CustomReplace/index.ts.html | 2 +- .../CutPasteListChain.ts.html | 2 +- .../lib/plugins/CutPasteListChain/index.html | 2 +- .../plugins/CutPasteListChain/index.ts.html | 2 +- .../lib/plugins/HyperLink/HyperLink.ts.html | 2 +- .../lib/plugins/HyperLink/index.html | 2 +- .../lib/plugins/HyperLink/index.ts.html | 2 +- .../lib/plugins/ImageEdit/ImageEdit.ts.html | 72 +- .../ImageEdit/api/canRegenerateImage.ts.html | 2 +- .../lib/plugins/ImageEdit/api/index.html | 2 +- .../plugins/ImageEdit/api/isResizedTo.ts.html | 2 +- .../plugins/ImageEdit/api/resetImage.ts.html | 2 +- .../ImageEdit/api/resizeByPercentage.ts.html | 2 +- .../editInfoUtils/applyChange.ts.html | 50 +- .../editInfoUtils/checkEditInfoState.ts.html | 20 +- .../ImageEdit/editInfoUtils/editInfo.ts.html | 16 +- .../editInfoUtils/generateDataURL.ts.html | 34 +- .../getGeneratedImageSize.ts.html | 18 +- .../editInfoUtils/getLastZIndex.ts.html | 2 +- .../getTargetSizeByPercentage.ts.html | 10 +- .../ImageEdit/editInfoUtils/index.html | 10 +- .../tryToConvertGifToPng.ts.html | 2 +- .../ImageEdit/imageEditors/Cropper.ts.html | 2 +- .../ImageEdit/imageEditors/Resizer.ts.html | 2 +- .../ImageEdit/imageEditors/Rotator.ts.html | 28 +- .../plugins/ImageEdit/imageEditors/index.html | 30 +- .../lib/plugins/ImageEdit/index.html | 28 +- .../lib/plugins/ImageEdit/index.ts.html | 2 +- .../plugins/ImageResize/ImageResize.ts.html | 2 +- .../lib/plugins/ImageResize/index.html | 2 +- .../lib/plugins/ImageResize/index.ts.html | 2 +- .../lib/plugins/Paste/Paste.ts.html | 20 +- .../convertPastedContentForLI.ts.html | 2 +- .../plugins/Paste/commonConverter/index.html | 2 +- .../convertPastedContentFromExcel.ts.html | 2 +- .../plugins/Paste/excelConverter/index.html | 2 +- .../convertPasteContentForSingleImage.ts.html | 2 +- .../plugins/Paste/imageConverter/index.html | 2 +- .../lib/plugins/Paste/index.html | 2 +- .../lib/plugins/Paste/index.ts.html | 2 +- .../Paste/lineMerge/handleLineMerge.ts.html | 2 +- .../lib/plugins/Paste/lineMerge/index.html | 2 +- .../ListItemBlock.ts.html | 2 +- ...nvertPastedContentFromOfficeOnline.ts.html | 2 +- ...convertPastedContentFromWordOnline.ts.html | 2 +- .../Paste/officeOnlineConverter/index.html | 2 +- ...convertPastedContentFromPowerPoint.ts.html | 2 +- .../lib/plugins/Paste/pptConverter/index.html | 2 +- .../deprecatedColorList.ts.html | 2 +- .../index.html | 2 +- ...anitizeHtmlColorsFromPastedContent.ts.html | 6 +- .../plugins/Paste/sanitizeLinks/index.html | 2 +- .../Paste/sanitizeLinks/sanitizeLinks.ts.html | 4 +- .../Paste/wordConverter/LevelLists.ts.html | 4 +- .../WordConverterArguments.ts.html | 4 +- .../wordConverter/WordCustomData.ts.html | 4 +- .../wordConverter/commentsRemoval.ts.html | 12 +- .../convertPastedContentFromWord.ts.html | 54 +- .../wordConverter/converterUtils.ts.html | 32 +- .../plugins/Paste/wordConverter/index.html | 30 +- .../Paste/wordConverter/wordConverter.ts.html | 4 +- .../lib/plugins/Picker/PickerPlugin.ts.html | 2 +- .../lib/plugins/Picker/index.html | 2 +- .../lib/plugins/Picker/index.ts.html | 2 +- .../TableCellSelection.ts.html | 2 +- .../TableCellSelection/constants.ts.html | 2 +- .../features/DeleteTableContents.ts.html | 2 +- .../TableCellSelection/features/index.html | 2 +- .../lib/plugins/TableCellSelection/index.html | 2 +- .../plugins/TableCellSelection/index.ts.html | 2 +- .../keyUtils/handleKeyDownEvent.ts.html | 2 +- .../keyUtils/handleKeyUpEvent.ts.html | 2 +- .../TableCellSelection/keyUtils/index.html | 2 +- .../mouseUtils/handleMouseDownEvent.ts.html | 2 +- .../mouseUtils/handleScrollEvent.ts.html | 2 +- .../TableCellSelection/mouseUtils/index.html | 2 +- .../utils/clearState.ts.html | 2 +- .../utils/getCellAtCursor.ts.html | 2 +- .../utils/getCellCoordinates.ts.html | 2 +- .../utils/getTableAtCursor.ts.html | 2 +- .../TableCellSelection/utils/index.html | 2 +- .../TableCellSelection/utils/isAfter.ts.html | 2 +- .../utils/normalizeTableSelection.ts.html | 2 +- .../utils/prepareSelection.ts.html | 2 +- .../utils/restoreSelection.ts.html | 2 +- .../utils/selectTable.ts.html | 2 +- .../TableCellSelection/utils/setData.ts.html | 2 +- .../utils/updateSelection.ts.html | 2 +- .../plugins/TableResize/TableResize.ts.html | 2 +- .../TableResize/editors/CellResizer.ts.html | 2 +- .../TableResize/editors/TableEditor.ts.html | 2 +- .../editors/TableEditorFeature.ts.html | 2 +- .../TableResize/editors/TableInserter.ts.html | 2 +- .../TableResize/editors/TableResizer.ts.html | 2 +- .../TableResize/editors/TableSelector.ts.html | 2 +- .../plugins/TableResize/editors/index.html | 2 +- .../lib/plugins/TableResize/index.html | 2 +- .../lib/plugins/TableResize/index.ts.html | 2 +- .../lib/plugins/Watermark/Watermark.ts.html | 2 +- .../lib/plugins/Watermark/index.html | 2 +- .../lib/plugins/Watermark/index.ts.html | 2 +- .../lib/index.html | 2 +- .../lib/index.ts.html | 2 +- .../lib/browser/index.html | 2 +- .../lib/browser/index.ts.html | 2 +- .../lib/compatibleEnum/Alignment.ts.html | 2 +- .../lib/compatibleEnum/BulletListType.ts.html | 2 +- .../lib/compatibleEnum/Capitalization.ts.html | 2 +- .../lib/compatibleEnum/ChangeSource.ts.html | 2 +- .../compatibleEnum/ClearFormatMode.ts.html | 2 +- .../ColorTransformDirection.ts.html | 2 +- .../compatibleEnum/ContentPosition.ts.html | 2 +- .../lib/compatibleEnum/ContentType.ts.html | 2 +- .../DarkModeDatasetNames.ts.html | 2 +- .../lib/compatibleEnum/DefinitionType.ts.html | 2 +- .../compatibleEnum/DelimiterClasses.ts.html | 2 +- .../lib/compatibleEnum/Direction.ts.html | 2 +- .../compatibleEnum/DocumentCommand.ts.html | 2 +- .../compatibleEnum/DocumentPosition.ts.html | 2 +- .../lib/compatibleEnum/EntityClasses.ts.html | 2 +- .../compatibleEnum/EntityOperation.ts.html | 2 +- .../ExperimentalFeatures.ts.html | 2 +- .../lib/compatibleEnum/FontSizeChange.ts.html | 2 +- .../lib/compatibleEnum/GetContentMode.ts.html | 2 +- .../compatibleEnum/ImageEditOperation.ts.html | 2 +- .../lib/compatibleEnum/Indentation.ts.html | 2 +- .../lib/compatibleEnum/Keys.ts.html | 2 +- .../KnownCreateElementDataIndex.ts.html | 2 +- .../KnownPasteSourceType.ts.html | 2 +- .../lib/compatibleEnum/ListType.ts.html | 2 +- .../lib/compatibleEnum/NodeType.ts.html | 2 +- .../compatibleEnum/NumberingListType.ts.html | 2 +- .../lib/compatibleEnum/PasteType.ts.html | 2 +- .../compatibleEnum/PluginEventType.ts.html | 2 +- .../lib/compatibleEnum/PositionType.ts.html | 2 +- .../lib/compatibleEnum/QueryScope.ts.html | 2 +- .../lib/compatibleEnum/RegionType.ts.html | 2 +- .../SelectionRangeTypes.ts.html | 2 +- .../compatibleEnum/TableBorderFormat.ts.html | 2 +- .../lib/compatibleEnum/TableOperation.ts.html | 2 +- .../lib/compatibleEnum/index.html | 2 +- .../lib/compatibleEnum/index.ts.html | 2 +- .../lib/compatibleTypes.ts.html | 2 +- .../lib/corePluginState/index.html | 2 +- .../lib/corePluginState/index.ts.html | 2 +- .../lib/enum/Alignment.ts.html | 2 +- .../lib/enum/BulletListType.ts.html | 2 +- .../lib/enum/Capitalization.ts.html | 2 +- .../lib/enum/ChangeSource.ts.html | 2 +- .../lib/enum/ClearFormatMode.ts.html | 2 +- .../lib/enum/ColorTransformDirection.ts.html | 2 +- .../lib/enum/ContentPosition.ts.html | 2 +- .../lib/enum/ContentType.ts.html | 2 +- .../lib/enum/DarkModeDatasetNames.ts.html | 2 +- .../lib/enum/DefinitionType.ts.html | 2 +- .../lib/enum/DelimiterClasses.ts.html | 2 +- .../lib/enum/Direction.ts.html | 2 +- .../lib/enum/DocumentCommand.ts.html | 2 +- .../lib/enum/DocumentPosition.ts.html | 2 +- .../lib/enum/EntityClasses.ts.html | 2 +- .../lib/enum/EntityOperation.ts.html | 2 +- .../lib/enum/ExperimentalFeatures.ts.html | 2 +- .../lib/enum/FontSizeChange.ts.html | 2 +- .../lib/enum/GetContentMode.ts.html | 2 +- .../lib/enum/ImageEditOperation.ts.html | 2 +- .../lib/enum/Indentation.ts.html | 2 +- .../lib/enum/Keys.ts.html | 2 +- .../enum/KnownCreateElementDataIndex.ts.html | 2 +- .../lib/enum/KnownPasteSourceType.ts.html | 2 +- .../lib/enum/ListType.ts.html | 2 +- .../lib/enum/NodeType.ts.html | 2 +- .../lib/enum/NumberingListType.ts.html | 2 +- .../lib/enum/PasteType.ts.html | 2 +- .../lib/enum/PluginEventType.ts.html | 2 +- .../lib/enum/PositionType.ts.html | 2 +- .../lib/enum/QueryScope.ts.html | 2 +- .../lib/enum/RegionType.ts.html | 2 +- .../lib/enum/SelectionRangeTypes.ts.html | 2 +- .../lib/enum/TableBorderFormat.ts.html | 2 +- .../lib/enum/TableOperation.ts.html | 2 +- .../lib/enum/index.html | 2 +- .../lib/enum/index.ts.html | 2 +- .../lib/event/index.html | 2 +- .../lib/event/index.ts.html | 2 +- .../roosterjs-editor-types/lib/index.html | 2 +- .../roosterjs-editor-types/lib/index.ts.html | 2 +- .../lib/interface/index.html | 2 +- .../lib/interface/index.ts.html | 2 +- .../lib/type/index.html | 2 +- .../lib/type/index.ts.html | 2 +- .../roosterjs/lib/createEditor.ts.html | 2 +- coverage/packages/roosterjs/lib/index.html | 2 +- coverage/packages/roosterjs/lib/index.ts.html | 2 +- ...el_editor.contentmodelcopypasteplugin.html | 10 +- ...ntent_model_editor.contentmodeleditor.html | 138 +- ...t_model_editor.contentmodeleditplugin.html | 8 +- ...model_editor.contentmodelformatplugin.html | 8 +- ..._model_editor.contentmodelpasteplugin.html | 10 +- ...tor.contentmodeltypeincontainerplugin.html | 6 +- .../classes/roosterjs_editor_core.editor.html | 130 +- .../roosterjs_editor_core.editorbase.html | 130 +- ...roosterjs_editor_dom.contenttraverser.html | 18 +- .../roosterjs_editor_dom.htmlsanitizer.html | 12 +- ...osterjs_editor_dom.imageinlineelement.html | 20 +- ...oosterjs_editor_dom.linkinlineelement.html | 20 +- ...oosterjs_editor_dom.nodeinlineelement.html | 20 +- ...terjs_editor_dom.partialinlineelement.html | 26 +- .../roosterjs_editor_dom.position.html | 26 +- ...js_editor_dom.positioncontentsearcher.html | 16 +- docs/classes/roosterjs_editor_dom.vlist.html | 30 +- .../roosterjs_editor_dom.vlistchain.html | 8 +- .../roosterjs_editor_dom.vlistitem.html | 36 +- docs/classes/roosterjs_editor_dom.vtable.html | 38 +- .../roosterjs_editor_plugins.autoformat.html | 8 +- .../roosterjs_editor_plugins.contentedit.html | 8 +- .../roosterjs_editor_plugins.contextmenu.html | 10 +- ...oosterjs_editor_plugins.customreplace.html | 12 +- ...erjs_editor_plugins.cutpastelistchain.html | 8 +- .../roosterjs_editor_plugins.hyperlink.html | 14 +- .../roosterjs_editor_plugins.imageedit.html | 24 +- .../roosterjs_editor_plugins.imageresize.html | 28 +- .../roosterjs_editor_plugins.paste.html | 10 +- ...roosterjs_editor_plugins.pickerplugin.html | 12 +- ...rjs_editor_plugins.tablecellselection.html | 10 +- .../roosterjs_editor_plugins.tableresize.html | 10 +- .../roosterjs_editor_plugins.watermark.html | 10 +- .../roosterjs_editor_types.alignment.html | 6 +- ...roosterjs_editor_types.bulletlisttype.html | 22 +- ...roosterjs_editor_types.capitalization.html | 8 +- .../roosterjs_editor_types.changesource.html | 26 +- ...oosterjs_editor_types.clearformatmode.html | 6 +- ..._editor_types.colortransformdirection.html | 4 +- ...oosterjs_editor_types.contentposition.html | 12 +- .../roosterjs_editor_types.contenttype.html | 4 +- ...sterjs_editor_types.contenttypeprefix.html | 4 +- ...rjs_editor_types.darkmodedatasetnames.html | 8 +- ...roosterjs_editor_types.definitiontype.html | 12 +- ...osterjs_editor_types.delimiterclasses.html | 4 +- .../roosterjs_editor_types.direction.html | 4 +- ...oosterjs_editor_types.documentcommand.html | 94 +- ...osterjs_editor_types.documentposition.html | 12 +- .../roosterjs_editor_types.entityclasses.html | 8 +- ...oosterjs_editor_types.entityoperation.html | 24 +- ...rjs_editor_types.experimentalfeatures.html | 60 +- ...roosterjs_editor_types.fontsizechange.html | 4 +- ...roosterjs_editor_types.getcontentmode.html | 10 +- ...terjs_editor_types.imageeditoperation.html | 16 +- .../roosterjs_editor_types.indentation.html | 4 +- docs/enums/roosterjs_editor_types.keys.html | 74 +- ...tor_types.knowncreateelementdataindex.html | 26 +- ...rjs_editor_types.knownpastesourcetype.html | 16 +- .../roosterjs_editor_types.listtype.html | 6 +- .../roosterjs_editor_types.nodetype.html | 16 +- ...sterjs_editor_types.numberinglisttype.html | 44 +- .../roosterjs_editor_types.pastetype.html | 8 +- ...oosterjs_editor_types.plugineventtype.html | 48 +- .../roosterjs_editor_types.positiontype.html | 8 +- .../roosterjs_editor_types.queryscope.html | 6 +- .../roosterjs_editor_types.regiontype.html | 2 +- ...erjs_editor_types.selectionrangetypes.html | 6 +- ...sterjs_editor_types.tableborderformat.html | 18 +- ...roosterjs_editor_types.tableoperation.html | 46 +- .../roosterjs_react.knownribbonbuttonkey.html | 62 +- docs/enums/roosterjs_react.updatemode.html | 12 +- ...osterjs_content_model_dom.nodetypemap.html | 16 +- ...roosterjs_content_model_editor.border.html | 6 +- ...ompatiblecontentmodelbeforepasteevent.html | 20 +- ...l_editor.contentmodelbeforepasteevent.html | 20 +- ...itor.contentmodelbeforepasteeventdata.html | 16 +- ...t_model_editor.contentmodelcoreapimap.html | 48 +- ...t_model_editor.contentmodeleditorcore.html | 32 +- ...odel_editor.contentmodeleditoroptions.html | 44 +- ..._model_editor.contentmodelformatstate.html | 70 +- ...tent_model_editor.icontentmodeleditor.html | 160 +- ...content_model_editor.imageformatstate.html | 10 +- ...erjs_content_model_editor.insertpoint.html | 8 +- ...nt_model_editor.tableselectioncontext.html | 8 +- ...ent_model_types.contentmodelblockbase.html | 4 +- ...odel_types.contentmodelblockgroupbase.html | 4 +- ...odel_types.contentmodelblockwithcache.html | 2 +- ...js_content_model_types.contentmodelbr.html | 10 +- ..._content_model_types.contentmodelcode.html | 2 +- ...ntent_model_types.contentmodeldivider.html | 12 +- ...tent_model_types.contentmodeldocument.html | 6 +- ...ontent_model_types.contentmodelentity.html | 20 +- ...del_types.contentmodelformatcontainer.html | 14 +- ...ent_model_types.contentmodelformatmap.html | 42 +- ..._model_types.contentmodelgeneralblock.html | 12 +- ...odel_types.contentmodelgeneralsegment.html | 18 +- ...content_model_types.contentmodelimage.html | 20 +- ..._content_model_types.contentmodellink.html | 4 +- ...tent_model_types.contentmodellistitem.html | 12 +- ...ent_model_types.contentmodelparagraph.html | 14 +- ..._types.contentmodelparagraphdecorator.html | 4 +- ...t_model_types.contentmodelsegmentbase.html | 10 +- ...del_types.contentmodelselectionmarker.html | 10 +- ...content_model_types.contentmodeltable.html | 12 +- ...ent_model_types.contentmodeltablecell.html | 18 +- ...tent_model_types.contentmodeltablerow.html | 8 +- ..._content_model_types.contentmodeltext.html | 12 +- ...t_model_types.contentmodelwithdataset.html | 2 +- ...nt_model_types.contentmodelwithformat.html | 2 +- ...content_model_types.domtomodelcontext.html | 40 +- ...odel_types.domtomodeldecoratorcontext.html | 6 +- ...t_model_types.domtomodelformatcontext.html | 8 +- ...tent_model_types.domtomodellistformat.html | 6 +- ..._content_model_types.domtomodeloption.html | 10 +- ...odel_types.domtomodelselectioncontext.html | 4 +- ...ontent_model_types.domtomodelsettings.html | 10 +- ...rjs_content_model_types.editorcontext.html | 12 +- ...tent_model_types.formathandlertypemap.html | 72 +- ...l_types.modeltodomblockandsegmentnode.html | 4 +- ...content_model_types.modeltodomcontext.html | 34 +- ...t_model_types.modeltodomformatcontext.html | 4 +- ..._model_types.modeltodomimageselection.html | 2 +- ...ent_model_types.modeltodomlistcontext.html | 4 +- ...t_model_types.modeltodomliststackitem.html | 34 +- ..._content_model_types.modeltodomoption.html | 10 +- ...odel_types.modeltodomregularselection.html | 6 +- ...odel_types.modeltodomselectioncontext.html | 6 +- ...ontent_model_types.modeltodomsettings.html | 12 +- ..._model_types.modeltodomtableselection.html | 6 +- ...sterjs_content_model_types.selectable.html | 2 +- ...rjs_editor_plugins.contextmenuoptions.html | 6 +- ...rjs_editor_plugins.onshowresizehandle.html | 2 +- ...oosterjs_editor_types.arraydefinition.html | 12 +- ..._editor_types.autolinkfeaturesettings.html | 4 +- ...oosterjs_editor_types.basepluginevent.html | 4 +- ...terjs_editor_types.beforecutcopyevent.html | 12 +- ...s_editor_types.beforecutcopyeventdata.html | 8 +- ...terjs_editor_types.beforedisposeevent.html | 4 +- ...ditor_types.beforekeyboardeditingdata.html | 2 +- ...itor_types.beforekeyboardeditingevent.html | 6 +- ...osterjs_editor_types.beforepasteevent.html | 18 +- ...rjs_editor_types.beforepasteeventdata.html | 14 +- ...js_editor_types.beforesetcontentevent.html | 6 +- ...ditor_types.beforesetcontenteventdata.html | 2 +- .../roosterjs_editor_types.blockelement.html | 14 +- ...sterjs_editor_types.booleandefinition.html | 8 +- .../roosterjs_editor_types.browserinfo.html | 24 +- ...terjs_editor_types.buildineditfeature.html | 10 +- .../roosterjs_editor_types.clipboarddata.html | 22 +- ...erjs_editor_types.codefeaturesettings.html | 4 +- ...osterjs_editor_types.colorkeyandvalue.html | 6 +- ...or_types.compatiblebeforecutcopyevent.html | 12 +- ...or_types.compatiblebeforedisposeevent.html | 4 +- ....compatiblebeforekeyboardeditingevent.html | 6 +- ...itor_types.compatiblebeforepasteevent.html | 18 +- ...types.compatiblebeforesetcontentevent.html | 6 +- ...r_types.compatiblecontentchangedevent.html | 10 +- ...editor_types.compatibleeditimageevent.html | 12 +- ...itor_types.compatibleeditorreadyevent.html | 4 +- ..._types.compatibleentershadoweditevent.html | 8 +- ..._types.compatibleentityoperationevent.html | 16 +- ....compatibleextractcontentwithdomevent.html | 6 +- ..._types.compatibleleaveshadoweditevent.html | 4 +- ...patiblependingformatstatechangedevent.html | 8 +- ...ypes.compatibleplugincompositionevent.html | 6 +- ...ypes.compatibleplugincontextmenuevent.html | 8 +- ...itor_types.compatibleplugininputevent.html | 6 +- ...or_types.compatiblepluginkeydownevent.html | 6 +- ...r_types.compatiblepluginkeypressevent.html | 6 +- ...itor_types.compatiblepluginkeyupevent.html | 6 +- ..._types.compatiblepluginmousedownevent.html | 6 +- ...or_types.compatiblepluginmouseupevent.html | 8 +- ...tor_types.compatiblepluginscrollevent.html | 8 +- ...types.compatibleselectionchangedevent.html | 6 +- ...itor_types.compatiblezoomchangedevent.html | 8 +- ...terjs_editor_types.contentchangeddata.html | 4 +- ...erjs_editor_types.contentchangedevent.html | 10 +- ..._editor_types.contentchangedeventdata.html | 6 +- ...itor_types.contenteditfeaturesettings.html | 80 +- ...erjs_editor_types.contentmetadatabase.html | 4 +- ...erjs_editor_types.contextmenuprovider.html | 12 +- .../roosterjs_editor_types.coordinates.html | 4 +- ...rjs_editor_types.copypastepluginstate.html | 2 +- .../roosterjs_editor_types.coreapimap.html | 42 +- .../roosterjs_editor_types.coreplugins.html | 24 +- ...sterjs_editor_types.createelementdata.html | 14 +- ...js_editor_types.cursorfeaturesettings.html | 2 +- .../roosterjs_editor_types.customdata.html | 4 +- ...erjs_editor_types.customizedefinition.html | 8 +- ...sterjs_editor_types.customreplacement.html | 8 +- ...osterjs_editor_types.darkcolorhandler.html | 12 +- .../roosterjs_editor_types.defaultformat.html | 18 +- ...roosterjs_editor_types.definitionbase.html | 6 +- ...js_editor_types.domeventhandlerobject.html | 4 +- ...erjs_editor_types.domeventpluginstate.html | 14 +- ...oosterjs_editor_types.edgelinkpreview.html | 10 +- ...roosterjs_editor_types.editimageevent.html | 12 +- ...terjs_editor_types.editimageeventdata.html | 8 +- .../roosterjs_editor_types.editorcore.html | 20 +- .../roosterjs_editor_types.editoroptions.html | 40 +- .../roosterjs_editor_types.editorplugin.html | 10 +- ...osterjs_editor_types.editorreadyevent.html | 4 +- ...oosterjs_editor_types.editorundostate.html | 4 +- ...oosterjs_editor_types.editpluginstate.html | 2 +- ..._editor_types.elementbasedformatstate.html | 26 +- ...rjs_editor_types.entershadoweditevent.html | 8 +- ...editor_types.entershadowediteventdata.html | 4 +- .../roosterjs_editor_types.entity.html | 8 +- ...js_editor_types.entityfeaturesettings.html | 14 +- ...rjs_editor_types.entityoperationevent.html | 16 +- ...editor_types.entityoperationeventdata.html | 12 +- ...sterjs_editor_types.entitypluginstate.html | 8 +- .../roosterjs_editor_types.entitystate.html | 6 +- ...tor_types.extractclipboardeventoption.html | 8 +- ...pes.extractclipboarditemsforieoptions.html | 4 +- ...tor_types.extractclipboarditemsoption.html | 4 +- ...itor_types.extractcontentwithdomevent.html | 6 +- ..._types.extractcontentwithdomeventdata.html | 2 +- .../roosterjs_editor_types.formatstate.html | 68 +- ...ditor_types.genericcontenteditfeature.html | 8 +- ...rjs_editor_types.htmlsanitizeroptions.html | 22 +- ...sterjs_editor_types.icontenttraverser.html | 12 +- .../roosterjs_editor_types.ieditor.html | 152 +- ...rjs_editor_types.imagecontentmetadata.html | 6 +- ...osterjs_editor_types.imageeditoptions.html | 22 +- ...erjs_editor_types.imageselectionrange.html | 8 +- .../roosterjs_editor_types.inlineelement.html | 18 +- ...osterjs_editor_types.insertoptionbase.html | 8 +- ...sterjs_editor_types.insertoptionbasic.html | 10 +- ...sterjs_editor_types.insertoptionrange.html | 12 +- ...editor_types.ipositioncontentsearcher.html | 14 +- ...oosterjs_editor_types.knownentityitem.html | 6 +- ...rjs_editor_types.leaveshadoweditevent.html | 4 +- ...rjs_editor_types.lifecyclepluginstate.html | 22 +- .../roosterjs_editor_types.linkdata.html | 6 +- ...erjs_editor_types.listfeaturesettings.html | 26 +- ..._editor_types.markdownfeaturesettings.html | 8 +- ...rjs_editor_types.modeindependentcolor.html | 4 +- .../roosterjs_editor_types.nodeposition.html | 16 +- ...js_editor_types.normalcontentmetadata.html | 8 +- ...rjs_editor_types.normalselectionrange.html | 6 +- ...osterjs_editor_types.numberdefinition.html | 12 +- ...osterjs_editor_types.objectdefinition.html | 8 +- ...erjs_editor_types.pendableformatstate.html | 12 +- ..._types.pendingformatstatechangedevent.html | 8 +- ...r_types.pendingformatstatepluginstate.html | 6 +- ...terjs_editor_types.pickerdataprovider.html | 22 +- ...erjs_editor_types.pickerpluginoptions.html | 14 +- ...s_editor_types.plugincompositionevent.html | 6 +- ...s_editor_types.plugincontextmenuevent.html | 8 +- ...itor_types.plugincontextmenueventdata.html | 2 +- ...terjs_editor_types.plugindomeventbase.html | 6 +- ...osterjs_editor_types.plugininputevent.html | 6 +- ...terjs_editor_types.pluginkeydownevent.html | 6 +- ...erjs_editor_types.pluginkeypressevent.html | 6 +- ...osterjs_editor_types.pluginkeyupevent.html | 6 +- ...rjs_editor_types.pluginmousedownevent.html | 6 +- ...terjs_editor_types.pluginmouseupevent.html | 8 +- ...s_editor_types.pluginmouseupeventdata.html | 2 +- ...sterjs_editor_types.pluginscrollevent.html | 8 +- ...js_editor_types.pluginscrolleventdata.html | 2 +- ...oosterjs_editor_types.pluginwithstate.html | 12 +- ...rjs_editor_types.quotefeaturesettings.html | 4 +- .../roosterjs_editor_types.rect.html | 8 +- .../roosterjs_editor_types.region.html | 12 +- .../roosterjs_editor_types.regionbase.html | 8 +- ...erjs_editor_types.sanitizehtmloptions.html | 26 +- ...js_editor_types.selectionchangedevent.html | 6 +- ...ditor_types.selectionchangedeventdata.html | 2 +- .../roosterjs_editor_types.selectionpath.html | 4 +- ...rjs_editor_types.selectionrangeexbase.html | 6 +- ..._editor_types.shortcutfeaturesettings.html | 2 +- .../roosterjs_editor_types.snapshot.html | 8 +- .../roosterjs_editor_types.snapshots.html | 10 +- ...osterjs_editor_types.stringdefinition.html | 8 +- ...r_types.structurednodefeaturesettings.html | 2 +- ...js_editor_types.stylebasedformatstate.html | 22 +- ...rjs_editor_types.tablecontentmetadata.html | 10 +- ...rjs_editor_types.tablefeaturesettings.html | 8 +- .../roosterjs_editor_types.tableformat.html | 24 +- ...roosterjs_editor_types.tableselection.html | 4 +- ...erjs_editor_types.tableselectionrange.html | 12 +- .../roosterjs_editor_types.targetwindow.html | 186 +- ...osterjs_editor_types.targetwindowbase.html | 180 +- ...erjs_editor_types.textfeaturesettings.html | 6 +- ...oosterjs_editor_types.undopluginstate.html | 10 +- ...rjs_editor_types.undosnapshotsservice.html | 10 +- .../roosterjs_editor_types.vcell.html | 10 +- ...osterjs_editor_types.zoomchangedevent.html | 8 +- ...rjs_editor_types.zoomchangedeventdata.html | 4 +- .../roosterjs_react.contextmenuitem.html | 16 +- .../roosterjs_react.reacteditorplugin.html | 12 +- .../roosterjs_react.ribbonbutton.html | 18 +- .../roosterjs_react.ribbonbuttondropdown.html | 12 +- .../roosterjs_react.ribbonplugin.html | 20 +- .../roosterjs_react.ribbonprops.html | 6 +- .../roosterjs_react.roosterprops.html | 44 +- .../roosterjs_react.uiutilities.html | 4 +- .../roosterjs_react.updatecontentplugin.html | 12 +- docs/modules/roosterjs.html | 2 +- docs/modules/roosterjs_color_utils.html | 2 +- docs/modules/roosterjs_content_model.html | 2 +- docs/modules/roosterjs_content_model_dom.html | 90 +- .../roosterjs_content_model_editor.html | 114 +- .../roosterjs_content_model_types.html | 144 +- docs/modules/roosterjs_editor_api.html | 84 +- docs/modules/roosterjs_editor_core.html | 4 +- docs/modules/roosterjs_editor_dom.html | 274 +- docs/modules/roosterjs_editor_plugins.html | 14 +- docs/modules/roosterjs_editor_types.html | 118 +- docs/modules/roosterjs_react.html | 140 +- rooster-min.js | 2 +- rooster-min.js.map | 2 +- 1129 files changed, 16137 insertions(+), 16137 deletions(-) diff --git a/coverage/index.html b/coverage/index.html index f0c10e994c2..91a68c1b2db 100644 --- a/coverage/index.html +++ b/coverage/index.html @@ -23,30 +23,30 @@

All files

- 87.59% + 88.44% Statements - 14878/16986 + 15022/16986
- 74.99% + 75.79% Branches - 10148/13533 + 10256/13533
- 84.12% + 84.86% Functions - 2473/2940 + 2495/2940
- 87.33% + 88.19% Lines - 14028/16064 + 14167/16064
@@ -214,8 +214,8 @@

All files

100% 89/89 - 96.59% - 85/88 + 95.45% + 84/88 100% 23/23 100% @@ -329,17 +329,17 @@

All files

packages-content-model/roosterjs-content-model-dom/lib/modelToDom - -
+ +
- 86.21% - 25/29 - 69.05% - 29/42 + 82.76% + 24/29 + 66.67% + 28/42 100% 3/3 - 85.71% - 24/28 + 82.14% + 23/28 @@ -514,8 +514,8 @@

All files

83.33% 35/42 - 77.78% - 14/18 + 66.67% + 12/18 66.67% 4/6 82.93% @@ -529,8 +529,8 @@

All files

100% 35/35 - 90.91% - 30/33 + 84.85% + 28/33 100% 4/4 100% @@ -899,17 +899,17 @@

All files

packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils - -
+ +
- 94.31% - 116/123 - 85.71% - 96/112 + 93.5% + 115/123 + 83.93% + 94/112 89.47% 17/19 - 94.78% - 109/115 + 93.91% + 108/115 @@ -959,17 +959,17 @@

All files

packages/roosterjs-editor-api/lib/format - -
+ +
- 64.07% - 403/629 - 46.28% - 218/471 - 66.67% - 76/114 - 63.68% - 391/614 + 71.54% + 450/629 + 55.41% + 261/471 + 74.56% + 85/114 + 71.17% + 437/614 @@ -989,17 +989,17 @@

All files

packages/roosterjs-editor-api/lib/utils - -
+ +
- 88.51% - 154/174 - 70.47% - 105/149 - 87.1% - 27/31 - 88.89% - 152/171 + 93.68% + 163/174 + 74.5% + 111/149 + 96.77% + 30/31 + 94.15% + 161/171 @@ -1019,17 +1019,17 @@

All files

packages/roosterjs-editor-core/lib/coreApi - -
+ +
- 95.74% - 675/705 - 86.69% - 612/706 - 95.79% - 91/95 - 95.63% - 635/664 + 97.02% + 684/705 + 87.39% + 617/706 + 96.84% + 92/95 + 96.99% + 644/664 @@ -1049,17 +1049,17 @@

All files

packages/roosterjs-editor-core/lib/corePlugins - +
- 86.02% - 714/830 - 70.4% - 585/831 - 86.78% - 151/174 - 85.7% - 695/811 + 86.27% + 716/830 + 70.64% + 587/831 + 87.36% + 152/174 + 85.94% + 697/811 @@ -1079,17 +1079,17 @@

All files

packages/roosterjs-editor-core/lib/editor - +
- 85.46% - 341/399 + 85.71% + 342/399 74.84% 232/310 - 82% - 82/100 - 84.7% - 321/379 + 83% + 83/100 + 84.96% + 322/379 @@ -1101,8 +1101,8 @@

All files

242/242 100% 0/0 - 78.03% - 103/132 + 78.79% + 104/132 100% 130/130 @@ -1169,17 +1169,17 @@

All files

packages/roosterjs-editor-dom/lib/edit - -
+ +
- 72.77% - 139/191 - 54.17% - 91/168 - 84.21% - 16/19 - 72.19% - 135/187 + 73.82% + 141/191 + 60.71% + 102/168 + 89.47% + 17/19 + 73.26% + 137/187 @@ -1264,8 +1264,8 @@

All files

94.54% 554/586 - 83.9% - 344/410 + 84.39% + 346/410 91.49% 86/94 95.14% @@ -1319,17 +1319,17 @@

All files

packages/roosterjs-editor-dom/lib/selection - +
- 87.93% - 204/232 - 82.42% - 225/273 + 87.5% + 203/232 + 80.59% + 220/273 95.83% 23/24 - 87.83% - 202/230 + 87.39% + 201/230 @@ -1364,17 +1364,17 @@

All files

packages/roosterjs-editor-dom/lib/table - -
+ +
- 70.77% - 431/609 - 59.59% - 323/542 - 88.16% - 67/76 - 70.97% - 401/565 + 75.86% + 462/609 + 63.65% + 345/542 + 89.47% + 68/76 + 76.11% + 430/565 @@ -1454,17 +1454,17 @@

All files

packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features - -
+ +
- 67.37% - 545/809 - 57.38% - 490/854 - 67.48% - 110/163 - 66.92% - 526/786 + 73.55% + 595/809 + 61.01% + 521/854 + 71.78% + 117/163 + 73.03% + 574/786 @@ -1544,17 +1544,17 @@

All files

packages/roosterjs-editor-plugins/lib/plugins/ImageEdit - -
+ +
- 90.14% - 256/284 + 89.44% + 254/284 70.32% 154/219 - 81.82% - 36/44 - 89.67% - 243/271 + 77.27% + 34/44 + 88.93% + 241/271 @@ -1579,8 +1579,8 @@

All files

90.91% 110/121 - 81.08% - 60/74 + 78.38% + 58/74 89.47% 17/19 90.52% @@ -1589,17 +1589,17 @@

All files

packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors - +
- 83.33% - 165/198 - 75.41% - 92/122 + 83.84% + 166/198 + 76.23% + 93/122 83.87% 26/31 - 83.78% - 155/185 + 84.32% + 156/185 @@ -1754,17 +1754,17 @@

All files

packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter - -
+ +
- 88.28% - 256/290 + 87.24% + 253/290 66.67% 186/279 - 97.3% - 36/37 - 88.42% - 252/285 + 94.59% + 35/37 + 87.37% + 249/285 @@ -2060,7 +2060,7 @@

All files

diff --git a/coverage/lcov.info b/coverage/lcov.info index 1e6d49d2842..e3e364d8656 100644 --- a/coverage/lcov.info +++ b/coverage/lcov.info @@ -47,23 +47,23 @@ FN:50,(anonymous_43) FN:52,(anonymous_44) FNF:45 FNH:43 -FNDA:97,(anonymous_0) -FNDA:84,(anonymous_1) +FNDA:91,(anonymous_0) +FNDA:82,(anonymous_1) FNDA:0,(anonymous_2) FNDA:0,(anonymous_3) FNDA:13,(anonymous_4) -FNDA:2,(anonymous_5) -FNDA:11,(anonymous_6) +FNDA:1,(anonymous_5) +FNDA:10,(anonymous_6) FNDA:13,(anonymous_7) FNDA:76,(anonymous_8) FNDA:9,(anonymous_9) FNDA:154,(anonymous_10) -FNDA:9,(anonymous_11) +FNDA:8,(anonymous_11) FNDA:1,(anonymous_12) FNDA:36,(anonymous_13) FNDA:144,(anonymous_14) FNDA:66,(anonymous_15) -FNDA:674,(anonymous_16) +FNDA:671,(anonymous_16) FNDA:193,(anonymous_17) FNDA:180,(anonymous_18) FNDA:717,(anonymous_19) @@ -78,7 +78,7 @@ FNDA:35,(anonymous_27) FNDA:33,(anonymous_28) FNDA:7,(anonymous_29) FNDA:26,(anonymous_30) -FNDA:61,(anonymous_31) +FNDA:59,(anonymous_31) FNDA:74,(anonymous_32) FNDA:3,(anonymous_33) FNDA:116,(anonymous_34) @@ -92,14 +92,14 @@ FNDA:180,(anonymous_41) FNDA:180,(anonymous_42) FNDA:56,(anonymous_43) FNDA:22,(anonymous_44) -DA:1,98 -DA:2,85 +DA:1,92 +DA:2,83 DA:4,1 DA:5,1 DA:6,1 DA:7,14 -DA:9,3 -DA:10,12 +DA:9,2 +DA:10,11 DA:11,14 DA:12,77 DA:13,10 @@ -108,7 +108,7 @@ DA:16,2 DA:18,37 DA:19,145 DA:20,67 -DA:21,675 +DA:21,672 DA:22,194 DA:23,181 DA:24,718 @@ -123,7 +123,7 @@ DA:32,36 DA:34,34 DA:35,8 DA:36,27 -DA:37,62 +DA:37,60 DA:38,75 DA:39,4 DA:40,117 @@ -145,22 +145,22 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/domToConten FN:19,domToContentModel FNF:1 FNH:1 -FNDA:116,domToContentModel +FNDA:110,domToContentModel DA:1,1 DA:2,1 DA:3,1 DA:19,1 -DA:25,116 -DA:26,116 -DA:28,116 -DA:30,116 -DA:32,116 +DA:25,110 +DA:26,110 +DA:28,110 +DA:30,110 +DA:32,110 LF:9 LH:9 -BRDA:25,0,0,73 -BRDA:25,0,1,43 -BRDA:25,1,0,116 -BRDA:25,1,1,116 +BRDA:25,0,0,71 +BRDA:25,0,1,39 +BRDA:25,1,0,110 +BRDA:25,1,1,110 BRF:4 BRH:4 end_of_record @@ -169,51 +169,51 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/cre FN:13,createDomToModelContext FNF:1 FNH:1 -FNDA:524,createDomToModelContext +FNDA:518,createDomToModelContext DA:1,1 DA:2,1 DA:3,1 DA:13,1 -DA:18,524 -DA:61,524 +DA:18,518 +DA:61,518 DA:62,0 -DA:65,524 -DA:66,18 -DA:69,524 +DA:65,518 +DA:66,14 +DA:69,518 LF:10 LH:9 -BRDA:43,0,0,524 -BRDA:43,0,1,367 +BRDA:43,0,0,518 +BRDA:43,0,1,365 BRDA:43,1,0,320 -BRDA:43,1,1,204 -BRDA:43,2,0,524 -BRDA:43,2,1,524 -BRDA:48,3,0,524 -BRDA:48,3,1,519 +BRDA:43,1,1,198 +BRDA:43,2,0,518 +BRDA:43,2,1,518 +BRDA:48,3,0,518 +BRDA:48,3,1,513 BRDA:48,4,0,320 -BRDA:48,4,1,204 -BRDA:48,5,0,524 -BRDA:48,5,1,524 +BRDA:48,4,1,198 +BRDA:48,5,0,518 +BRDA:48,5,1,518 BRDA:52,6,0,320 -BRDA:52,6,1,204 -BRDA:52,7,0,524 -BRDA:52,7,1,524 +BRDA:52,6,1,198 +BRDA:52,7,0,518 +BRDA:52,7,1,518 BRDA:53,8,0,320 -BRDA:53,8,1,204 -BRDA:53,9,0,524 -BRDA:53,9,1,524 +BRDA:53,8,1,198 +BRDA:53,9,0,518 +BRDA:53,9,1,518 BRDA:58,10,0,320 -BRDA:58,10,1,204 -BRDA:58,11,0,524 -BRDA:58,11,1,524 +BRDA:58,10,1,198 +BRDA:58,11,0,518 +BRDA:58,11,1,518 BRDA:61,12,0,0 -BRDA:61,12,1,524 -BRDA:61,13,0,480 -BRDA:61,13,1,44 -BRDA:61,14,0,524 -BRDA:61,14,1,524 -BRDA:65,15,0,18 -BRDA:65,15,1,506 +BRDA:61,12,1,518 +BRDA:61,13,0,478 +BRDA:61,13,1,40 +BRDA:61,14,0,518 +BRDA:61,14,1,518 +BRDA:65,15,0,14 +BRDA:65,15,1,504 BRF:32 BRH:31 end_of_record @@ -252,33 +252,33 @@ FN:16,blockProcessor FN:31,(anonymous_1) FNF:2 FNH:2 -FNDA:163,blockProcessor -FNDA:652,(anonymous_1) +FNDA:160,blockProcessor +FNDA:640,(anonymous_1) DA:1,1 DA:2,1 DA:3,1 DA:4,1 DA:11,1 DA:16,1 -DA:22,163 -DA:23,163 -DA:25,163 -DA:27,163 -DA:29,163 -DA:31,163 -DA:32,652 +DA:22,160 +DA:23,160 +DA:25,160 +DA:27,160 +DA:29,160 +DA:31,160 +DA:32,640 DA:33,57 -DA:37,163 -DA:38,159 -DA:45,159 -DA:48,163 +DA:37,160 +DA:38,156 +DA:45,156 +DA:48,160 LF:18 LH:18 BRDA:22,0,0,61 -BRDA:22,0,1,102 +BRDA:22,0,1,99 BRDA:32,1,0,57 -BRDA:32,1,1,595 -BRDA:37,2,0,159 +BRDA:32,1,1,583 +BRDA:37,2,0,156 BRDA:37,2,1,4 BRF:6 BRH:6 @@ -288,18 +288,18 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/ FN:8,(anonymous_0) FNF:1 FNH:1 -FNDA:13,(anonymous_0) +FNDA:10,(anonymous_0) DA:1,1 DA:2,1 DA:8,1 -DA:9,13 -DA:11,13 +DA:9,10 +DA:11,10 DA:12,0 -DA:15,13 +DA:15,10 LF:7 LH:6 BRDA:11,0,0,0 -BRDA:11,0,1,13 +BRDA:11,0,1,10 BRF:2 BRH:1 end_of_record @@ -310,53 +310,53 @@ FN:43,processChildNode FN:63,handleRegularSelection FNF:3 FNH:3 -FNDA:797,(anonymous_0) -FNDA:992,processChildNode -FNDA:1776,handleRegularSelection +FNDA:787,(anonymous_0) +FNDA:981,processChildNode +FNDA:1755,handleRegularSelection DA:1,1 DA:2,1 DA:3,1 DA:17,1 -DA:22,797 -DA:23,797 -DA:25,797 -DA:26,979 -DA:28,979 -DA:30,979 -DA:33,797 +DA:22,787 +DA:23,787 +DA:25,787 +DA:26,968 +DA:28,968 +DA:30,968 +DA:33,787 DA:43,1 -DA:48,992 -DA:49,630 -DA:50,362 -DA:51,334 +DA:48,981 +DA:49,621 +DA:50,360 +DA:51,332 DA:63,1 -DA:70,1776 -DA:71,16 -DA:73,16 -DA:76,1776 -DA:77,15 +DA:70,1755 +DA:71,12 +DA:73,12 +DA:76,1755 +DA:77,11 DA:78,5 -DA:80,15 +DA:80,11 LF:24 LH:24 -BRDA:48,0,0,630 -BRDA:48,0,1,362 -BRDA:48,1,0,992 -BRDA:48,1,1,630 -BRDA:50,2,0,334 +BRDA:48,0,0,621 +BRDA:48,0,1,360 +BRDA:48,1,0,981 +BRDA:48,1,1,621 +BRDA:50,2,0,332 BRDA:50,2,1,28 -BRDA:70,3,0,16 -BRDA:70,3,1,1760 -BRDA:76,4,0,15 -BRDA:76,4,1,1761 -BRDA:76,5,0,1776 -BRDA:76,5,1,15 +BRDA:70,3,0,12 +BRDA:70,3,1,1743 +BRDA:76,4,0,11 +BRDA:76,4,1,1744 +BRDA:76,5,0,1755 +BRDA:76,5,1,11 BRDA:76,6,0,0 -BRDA:76,6,1,15 -BRDA:76,7,0,15 -BRDA:76,7,1,15 +BRDA:76,6,1,11 +BRDA:76,7,0,11 +BRDA:76,7,1,11 BRDA:77,8,0,5 -BRDA:77,8,1,10 +BRDA:77,8,1,6 BRF:18 BRH:17 end_of_record @@ -407,31 +407,31 @@ FN:24,tryGetProcessorForEntity FN:31,tryGetProcessorForDelimiter FNF:3 FNH:3 -FNDA:530,(anonymous_0) -FNDA:530,tryGetProcessorForEntity -FNDA:528,tryGetProcessorForDelimiter +FNDA:521,(anonymous_0) +FNDA:521,tryGetProcessorForEntity +FNDA:519,tryGetProcessorForDelimiter DA:1,1 DA:14,1 -DA:15,530 -DA:16,530 -DA:21,530 -DA:25,530 -DA:32,528 +DA:15,521 +DA:16,521 +DA:21,521 +DA:25,521 +DA:32,519 LF:7 LH:7 -BRDA:16,0,0,530 -BRDA:16,0,1,528 -BRDA:16,0,2,527 +BRDA:16,0,0,521 +BRDA:16,0,1,519 +BRDA:16,0,2,518 BRDA:16,0,3,8 BRDA:16,0,4,6 BRDA:16,0,5,2 BRDA:27,1,0,2 -BRDA:27,1,1,528 -BRDA:25,2,0,530 +BRDA:27,1,1,519 +BRDA:25,2,0,521 BRDA:25,2,1,179 -BRDA:25,2,2,529 +BRDA:25,2,2,520 BRDA:32,3,0,1 -BRDA:32,3,1,527 +BRDA:32,3,1,518 BRF:13 BRH:13 end_of_record @@ -441,8 +441,8 @@ FN:15,(anonymous_0) FN:25,(anonymous_1) FNF:2 FNH:2 -FNDA:10,(anonymous_0) -FNDA:10,(anonymous_1) +FNDA:9,(anonymous_0) +FNDA:9,(anonymous_1) DA:1,1 DA:2,1 DA:3,1 @@ -450,37 +450,37 @@ DA:5,1 DA:6,1 DA:7,1 DA:15,1 -DA:16,10 -DA:19,10 -DA:20,10 -DA:22,10 -DA:26,10 -DA:30,10 -DA:31,3 -DA:32,3 -DA:35,10 -DA:44,10 +DA:16,9 +DA:19,9 +DA:20,9 +DA:22,9 +DA:26,9 +DA:30,9 +DA:31,2 +DA:32,2 +DA:35,9 +DA:44,9 DA:45,2 -DA:48,10 -DA:49,6 +DA:48,9 +DA:49,5 DA:51,4 LF:21 LH:21 -BRDA:19,0,0,10 -BRDA:19,0,1,4 -BRDA:24,1,0,6 +BRDA:19,0,0,9 +BRDA:19,0,1,3 +BRDA:24,1,0,5 BRDA:24,1,1,4 BRDA:27,2,0,7 -BRDA:27,2,1,3 -BRDA:30,3,0,3 +BRDA:27,2,1,2 +BRDA:30,3,0,2 BRDA:30,3,1,7 -BRDA:31,4,0,3 -BRDA:31,4,1,3 -BRDA:32,5,0,3 -BRDA:32,5,1,3 +BRDA:31,4,0,2 +BRDA:31,4,1,2 +BRDA:32,5,0,2 +BRDA:32,5,1,2 BRDA:44,6,0,2 -BRDA:44,6,1,8 -BRDA:48,7,0,6 +BRDA:44,6,1,7 +BRDA:48,7,0,5 BRDA:48,7,1,4 BRF:16 BRH:16 @@ -550,10 +550,10 @@ FN:54,(anonymous_2) FN:86,shouldFallbackToParagraph FNF:4 FNH:4 -FNDA:40,(anonymous_0) -FNDA:40,(anonymous_1) -FNDA:160,(anonymous_2) -FNDA:40,shouldFallbackToParagraph +FNDA:39,(anonymous_0) +FNDA:39,(anonymous_1) +FNDA:156,(anonymous_2) +FNDA:39,shouldFallbackToParagraph DA:1,1 DA:2,1 DA:3,1 @@ -563,45 +563,45 @@ DA:6,1 DA:7,1 DA:20,1 DA:30,1 -DA:35,40 -DA:36,40 -DA:37,40 -DA:39,40 -DA:43,40 -DA:46,40 -DA:49,40 -DA:54,40 -DA:55,160 -DA:58,40 -DA:60,40 +DA:35,39 +DA:36,39 +DA:37,39 +DA:39,39 +DA:43,39 +DA:46,39 +DA:49,39 +DA:54,39 +DA:55,156 +DA:58,39 +DA:60,39 DA:61,2 -DA:64,40 -DA:67,9 -DA:69,9 +DA:64,39 +DA:67,8 +DA:69,8 DA:70,1 -DA:75,9 -DA:76,9 -DA:77,9 +DA:75,8 +DA:76,8 +DA:77,8 DA:79,31 -DA:83,40 -DA:87,40 -DA:89,40 +DA:83,39 +DA:87,39 +DA:89,39 LF:32 LH:32 -BRDA:47,0,0,38 +BRDA:47,0,0,37 BRDA:47,0,1,2 BRDA:60,1,0,2 -BRDA:60,1,1,38 -BRDA:60,2,0,40 +BRDA:60,1,1,37 +BRDA:60,2,0,39 BRDA:60,2,1,5 -BRDA:64,3,0,9 +BRDA:64,3,0,8 BRDA:64,3,1,31 BRDA:69,4,0,1 -BRDA:69,4,1,8 -BRDA:90,5,0,40 -BRDA:90,5,1,25 -BRDA:90,5,2,10 -BRDA:90,5,3,9 +BRDA:69,4,1,7 +BRDA:90,5,0,39 +BRDA:90,5,1,24 +BRDA:90,5,2,9 +BRDA:90,5,3,8 BRF:14 BRH:14 end_of_record @@ -728,50 +728,50 @@ FN:12,(anonymous_0) FN:13,(anonymous_1) FNF:2 FNH:2 -FNDA:12,(anonymous_0) -FNDA:12,(anonymous_1) +FNDA:10,(anonymous_0) +FNDA:10,(anonymous_1) DA:1,1 DA:2,1 DA:4,1 DA:5,1 DA:7,1 DA:12,1 -DA:13,12 -DA:14,12 -DA:16,12 -DA:17,12 -DA:18,12 -DA:20,12 -DA:21,12 -DA:22,12 -DA:24,12 -DA:25,12 -DA:27,12 +DA:13,10 +DA:14,10 +DA:16,10 +DA:17,10 +DA:18,10 +DA:20,10 +DA:21,10 +DA:22,10 +DA:24,10 +DA:25,10 +DA:27,10 DA:28,2 -DA:30,12 +DA:30,10 DA:31,0 -DA:33,12 +DA:33,10 DA:34,1 -DA:36,12 +DA:36,10 DA:40,2 DA:41,2 -DA:44,12 +DA:44,10 LF:26 LH:25 BRDA:27,0,0,2 -BRDA:27,0,1,10 +BRDA:27,0,1,8 BRDA:30,1,0,0 -BRDA:30,1,1,12 +BRDA:30,1,1,10 BRDA:33,2,0,1 -BRDA:33,2,1,11 +BRDA:33,2,1,9 BRDA:36,3,0,2 -BRDA:36,3,1,10 -BRDA:37,4,0,12 +BRDA:36,3,1,8 +BRDA:37,4,0,10 BRDA:37,4,1,2 -BRDA:37,5,0,9 -BRDA:37,5,1,3 -BRDA:37,6,0,12 -BRDA:37,6,1,12 +BRDA:37,5,0,8 +BRDA:37,5,1,2 +BRDA:37,6,0,10 +BRDA:37,6,1,10 BRF:14 BRH:13 end_of_record @@ -784,11 +784,11 @@ FN:97,shouldUseFormatContainer FN:117,(anonymous_4) FNF:5 FNH:5 -FNDA:241,(anonymous_0) -FNDA:96,(anonymous_1) -FNDA:120,(anonymous_2) -FNDA:123,shouldUseFormatContainer -FNDA:1650,(anonymous_4) +FNDA:239,(anonymous_0) +FNDA:93,(anonymous_1) +FNDA:122,(anonymous_2) +FNDA:119,shouldUseFormatContainer +FNDA:1591,(anonymous_4) DA:1,1 DA:2,1 DA:3,1 @@ -801,75 +801,75 @@ DA:15,1 DA:33,1 DA:34,1 DA:39,1 -DA:40,241 -DA:42,241 -DA:46,25 -DA:47,216 -DA:48,96 -DA:49,96 -DA:51,96 -DA:52,96 -DA:54,96 -DA:55,96 -DA:57,96 -DA:60,96 -DA:61,93 -DA:72,120 -DA:80,120 -DA:82,120 +DA:40,239 +DA:42,239 +DA:46,24 +DA:47,215 +DA:48,93 +DA:49,93 +DA:51,93 +DA:52,93 +DA:54,93 +DA:55,93 +DA:57,93 +DA:60,93 +DA:61,90 +DA:72,122 +DA:80,122 +DA:82,122 DA:83,1 -DA:91,120 -DA:99,123 +DA:91,122 +DA:99,119 DA:100,4 -DA:103,119 -DA:104,119 -DA:106,119 -DA:109,119 +DA:103,115 +DA:104,115 +DA:106,115 +DA:109,115 DA:110,8 -DA:115,111 -DA:117,1650 -DA:120,12 -DA:124,99 +DA:115,107 +DA:117,1591 +DA:120,11 +DA:124,96 DA:125,0 -DA:129,99 +DA:129,96 DA:130,5 -DA:133,94 +DA:133,91 LF:45 LH:44 -BRDA:42,0,0,25 -BRDA:42,0,1,216 -BRDA:43,1,0,241 -BRDA:43,1,1,121 -BRDA:43,1,2,123 -BRDA:47,2,0,96 -BRDA:47,2,1,120 +BRDA:42,0,0,24 +BRDA:42,0,1,215 +BRDA:43,1,0,239 +BRDA:43,1,1,123 +BRDA:43,1,2,119 +BRDA:47,2,0,93 +BRDA:47,2,1,122 BRDA:48,3,0,0 -BRDA:48,3,1,96 -BRDA:60,4,0,93 +BRDA:48,3,1,93 +BRDA:60,4,0,90 BRDA:60,4,1,3 -BRDA:60,5,0,96 -BRDA:60,5,1,96 +BRDA:60,5,0,93 +BRDA:60,5,1,93 BRDA:82,6,0,1 -BRDA:82,6,1,119 -BRDA:82,7,0,120 +BRDA:82,6,1,121 +BRDA:82,7,0,122 BRDA:82,7,1,13 BRDA:99,8,0,4 -BRDA:99,8,1,119 +BRDA:99,8,1,115 BRDA:109,9,0,8 -BRDA:109,9,1,111 -BRDA:109,10,0,119 +BRDA:109,9,1,107 +BRDA:109,10,0,115 BRDA:109,10,1,8 -BRDA:115,11,0,12 -BRDA:115,11,1,99 -BRDA:117,12,0,1650 -BRDA:117,12,1,1622 -BRDA:117,12,2,1620 +BRDA:115,11,0,11 +BRDA:115,11,1,96 +BRDA:117,12,0,1591 +BRDA:117,12,1,1564 +BRDA:117,12,2,1562 BRDA:124,13,0,0 -BRDA:124,13,1,99 -BRDA:124,14,0,99 -BRDA:124,14,1,99 +BRDA:124,13,1,96 +BRDA:124,14,0,96 +BRDA:124,14,1,96 BRDA:129,15,0,5 -BRDA:129,15,1,94 +BRDA:129,15,1,91 BRF:34 BRH:32 end_of_record @@ -1038,12 +1038,12 @@ FN:244,(anonymous_6) FN:253,calcSizes FNF:6 FNH:6 -FNDA:41,(anonymous_0) -FNDA:41,(anonymous_1) -FNDA:45,(anonymous_3) -FNDA:61,(anonymous_5) -FNDA:45,(anonymous_6) -FNDA:82,calcSizes +FNDA:40,(anonymous_0) +FNDA:40,(anonymous_1) +FNDA:44,(anonymous_3) +FNDA:59,(anonymous_5) +FNDA:44,(anonymous_6) +FNDA:80,calcSizes DA:1,1 DA:2,1 DA:3,1 @@ -1051,113 +1051,113 @@ DA:4,1 DA:5,1 DA:7,1 DA:31,1 -DA:36,41 -DA:40,41 -DA:42,41 -DA:44,41 -DA:47,41 -DA:48,41 -DA:50,41 -DA:54,41 +DA:36,40 +DA:40,40 +DA:42,40 +DA:44,40 +DA:47,40 +DA:48,40 +DA:50,40 +DA:54,40 DA:55,25 -DA:58,41 -DA:59,41 -DA:60,41 -DA:66,41 -DA:67,41 -DA:69,41 -DA:70,41 -DA:71,41 -DA:73,45 -DA:74,45 -DA:75,45 -DA:77,45 +DA:58,40 +DA:59,40 +DA:60,40 +DA:66,40 +DA:67,40 +DA:69,40 +DA:70,40 +DA:71,40 +DA:73,44 +DA:74,44 +DA:75,44 +DA:77,44 DA:78,27 -DA:81,45 -DA:83,45 -DA:84,45 -DA:85,45 -DA:87,45 -DA:92,31 -DA:98,31 -DA:106,45 -DA:107,45 -DA:114,45 -DA:115,122 -DA:119,61 -DA:121,61 -DA:122,61 -DA:123,61 -DA:124,61 -DA:125,61 -DA:126,61 -DA:128,61 -DA:129,59 -DA:131,59 +DA:81,44 +DA:83,44 +DA:84,44 +DA:85,44 +DA:87,44 +DA:92,30 +DA:98,30 +DA:106,44 +DA:107,44 +DA:114,44 +DA:115,118 +DA:119,59 +DA:121,59 +DA:122,59 +DA:123,59 +DA:124,59 +DA:125,59 +DA:126,59 +DA:128,59 +DA:129,57 +DA:131,57 DA:132,32 DA:133,29 DA:137,32 DA:138,27 -DA:144,61 -DA:148,61 -DA:154,61 -DA:161,61 -DA:164,61 -DA:166,61 -DA:172,61 -DA:178,61 -DA:180,61 -DA:181,61 -DA:185,64 -DA:186,66 -DA:187,66 -DA:194,66 -DA:196,66 -DA:198,66 -DA:199,66 -DA:202,66 -DA:203,61 +DA:144,59 +DA:148,59 +DA:154,59 +DA:161,59 +DA:164,59 +DA:166,59 +DA:172,59 +DA:178,59 +DA:180,59 +DA:181,59 +DA:185,62 +DA:186,64 +DA:187,64 +DA:194,64 +DA:196,64 +DA:198,64 +DA:199,64 +DA:202,64 +DA:203,59 DA:204,32 -DA:207,61 -DA:209,61 -DA:210,61 -DA:212,61 -DA:213,61 -DA:215,61 -DA:216,61 -DA:220,66 -DA:222,66 +DA:207,59 +DA:209,59 +DA:210,59 +DA:212,59 +DA:213,59 +DA:215,59 +DA:216,59 +DA:220,64 +DA:222,64 DA:230,2 -DA:240,41 -DA:242,41 -DA:244,41 -DA:245,45 +DA:240,40 +DA:242,40 +DA:244,40 +DA:245,44 DA:246,27 -DA:254,82 -DA:255,82 -DA:257,82 +DA:254,80 +DA:255,80 +DA:257,80 DA:258,59 DA:259,3 DA:261,56 DA:262,56 -DA:266,82 +DA:266,80 LF:97 LH:97 BRDA:45,0,0,1 -BRDA:45,0,1,40 -BRDA:44,1,0,38 +BRDA:45,0,1,39 +BRDA:44,1,0,37 BRDA:44,1,1,3 -BRDA:44,2,0,41 -BRDA:44,2,1,41 -BRDA:47,3,0,40 +BRDA:44,2,0,40 +BRDA:44,2,1,40 +BRDA:47,3,0,39 BRDA:47,3,1,1 -BRDA:47,4,0,41 +BRDA:47,4,0,40 BRDA:47,4,1,1 -BRDA:48,5,0,40 +BRDA:48,5,0,39 BRDA:48,5,1,1 -BRDA:48,6,0,41 +BRDA:48,6,0,40 BRDA:48,6,1,1 -BRDA:50,7,0,41 +BRDA:50,7,0,40 BRDA:50,7,1,1 BRDA:50,7,2,1 BRDA:51,8,0,0 @@ -1169,52 +1169,52 @@ BRDA:52,10,1,1 BRDA:52,11,0,1 BRDA:52,11,1,1 BRDA:54,12,0,25 -BRDA:54,12,1,16 -BRDA:71,13,0,41 -BRDA:71,13,1,39 +BRDA:54,12,1,15 +BRDA:71,13,0,40 +BRDA:71,13,1,38 BRDA:77,14,0,27 -BRDA:77,14,1,18 +BRDA:77,14,1,17 BRDA:85,15,0,5 -BRDA:85,15,1,40 -BRDA:85,16,0,45 -BRDA:85,16,1,45 -BRDA:87,17,0,31 +BRDA:85,15,1,39 +BRDA:85,16,0,44 +BRDA:85,16,1,44 +BRDA:87,17,0,30 BRDA:87,17,1,14 -BRDA:88,18,0,45 -BRDA:88,18,1,40 +BRDA:88,18,0,44 +BRDA:88,18,1,39 BRDA:88,18,2,9 BRDA:88,18,3,9 -BRDA:128,19,0,59 +BRDA:128,19,0,57 BRDA:128,19,1,2 -BRDA:128,20,0,61 +BRDA:128,20,0,59 BRDA:128,20,1,5 BRDA:131,21,0,32 -BRDA:131,21,1,27 -BRDA:131,22,0,59 -BRDA:131,22,1,27 +BRDA:131,21,1,25 +BRDA:131,22,0,57 +BRDA:131,22,1,25 BRDA:132,23,0,29 BRDA:132,23,1,3 BRDA:137,24,0,27 BRDA:137,24,1,5 -BRDA:186,25,0,66 -BRDA:186,25,1,62 -BRDA:198,26,0,66 +BRDA:186,25,0,64 +BRDA:186,25,1,60 +BRDA:198,26,0,64 BRDA:198,26,1,0 -BRDA:202,27,0,61 +BRDA:202,27,0,59 BRDA:202,27,1,5 BRDA:203,28,0,32 -BRDA:203,28,1,29 +BRDA:203,28,1,27 BRDA:222,29,0,2 -BRDA:222,29,1,64 -BRDA:223,30,0,66 +BRDA:222,29,1,62 +BRDA:223,30,0,64 BRDA:223,30,1,0 -BRDA:223,30,2,66 +BRDA:223,30,2,64 BRDA:223,30,3,4 BRDA:223,30,4,4 BRDA:223,30,5,4 BRDA:223,30,6,2 BRDA:245,31,0,27 -BRDA:245,31,1,18 +BRDA:245,31,1,17 BRDA:258,32,0,3 BRDA:258,32,1,56 BRF:74 @@ -1226,8 +1226,8 @@ FN:17,(anonymous_0) FN:52,addTextSegment FNF:2 FNH:2 -FNDA:349,(anonymous_0) -FNDA:366,addTextSegment +FNDA:347,(anonymous_0) +FNDA:364,addTextSegment DA:1,1 DA:2,1 DA:3,1 @@ -1236,69 +1236,69 @@ DA:5,1 DA:6,1 DA:7,1 DA:17,1 -DA:22,349 -DA:23,349 -DA:25,349 +DA:22,347 +DA:23,347 +DA:25,347 DA:26,8 DA:27,8 DA:29,8 DA:31,8 DA:32,8 -DA:35,349 +DA:35,347 DA:36,9 DA:38,9 DA:39,6 DA:42,9 DA:43,9 -DA:46,349 +DA:46,347 DA:50,1 -DA:53,366 -DA:54,357 -DA:55,357 -DA:56,357 -DA:58,357 +DA:53,364 +DA:54,355 +DA:55,355 +DA:56,355 +DA:58,355 DA:65,15 -DA:66,342 -DA:71,334 -DA:73,334 +DA:66,340 +DA:71,332 +DA:73,332 DA:74,15 -DA:77,334 -DA:79,334 +DA:77,332 +DA:79,332 LF:36 LH:36 -BRDA:22,0,0,349 +BRDA:22,0,0,347 BRDA:22,0,1,1 BRDA:25,1,0,8 -BRDA:25,1,1,341 +BRDA:25,1,1,339 BRDA:35,2,0,9 -BRDA:35,2,1,340 +BRDA:35,2,1,338 BRDA:38,3,0,6 BRDA:38,3,1,3 BRDA:38,4,0,9 BRDA:38,4,1,9 -BRDA:53,5,0,357 +BRDA:53,5,0,355 BRDA:53,5,1,9 BRDA:55,6,0,164 -BRDA:55,6,1,193 -BRDA:55,7,0,190 +BRDA:55,6,1,191 +BRDA:55,7,0,188 BRDA:55,7,1,167 -BRDA:55,8,0,357 -BRDA:55,8,1,357 -BRDA:56,9,0,193 +BRDA:55,8,0,355 +BRDA:55,8,1,355 +BRDA:56,9,0,191 BRDA:56,9,1,164 -BRDA:56,10,0,357 +BRDA:56,10,0,355 BRDA:56,10,1,164 BRDA:58,11,0,15 -BRDA:58,11,1,342 -BRDA:59,12,0,357 +BRDA:58,11,1,340 +BRDA:59,12,0,355 BRDA:59,12,1,31 BRDA:59,12,2,24 BRDA:59,12,3,20 BRDA:59,12,4,17 -BRDA:59,13,0,311 +BRDA:59,13,0,309 BRDA:59,13,1,46 -BRDA:59,14,0,357 -BRDA:59,14,1,357 +BRDA:59,14,0,355 +BRDA:59,14,1,355 BRDA:62,15,0,20 BRDA:62,15,1,19 BRDA:62,16,0,20 @@ -1307,9 +1307,9 @@ BRDA:63,17,0,17 BRDA:63,17,1,16 BRDA:63,18,0,17 BRDA:63,18,1,0 -BRDA:66,19,0,334 +BRDA:66,19,0,332 BRDA:66,19,1,8 -BRDA:67,20,0,342 +BRDA:67,20,0,340 BRDA:67,20,1,9 BRDA:67,20,2,9 BRDA:68,21,0,2 @@ -1323,7 +1323,7 @@ BRDA:69,24,1,7 BRDA:69,25,0,9 BRDA:69,25,1,7 BRDA:73,26,0,15 -BRDA:73,26,1,319 +BRDA:73,26,1,317 BRF:58 BRH:56 end_of_record @@ -1332,14 +1332,14 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/addSe FN:9,addSelectionMarker FNF:1 FNH:1 -FNDA:39,addSelectionMarker +FNDA:35,addSelectionMarker DA:1,1 DA:2,1 DA:4,1 DA:9,1 -DA:10,39 -DA:12,39 -DA:14,39 +DA:10,35 +DA:12,35 +DA:14,35 LF:7 LH:7 BRF:0 @@ -1352,7 +1352,7 @@ FN:16,(anonymous_1) FNF:2 FNH:2 FNDA:78,areSameFormats -FNDA:23,(anonymous_1) +FNDA:25,(anonymous_1) DA:2,1 DA:9,1 DA:10,78 @@ -1374,9 +1374,9 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getBo FN:4,getBoundingClientRect FNF:1 FNH:1 -FNDA:29,getBoundingClientRect +FNDA:27,getBoundingClientRect DA:4,1 -DA:5,29 +DA:5,27 LF:2 LH:2 BRF:0 @@ -1387,14 +1387,14 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getDe FN:10,getDefaultStyle FNF:1 FNH:1 -FNDA:2720,getDefaultStyle +FNDA:2674,getDefaultStyle DA:10,1 -DA:14,2720 -DA:16,2720 +DA:14,2674 +DA:16,2674 LF:3 LH:3 -BRDA:16,0,0,2720 -BRDA:16,0,1,539 +BRDA:16,0,0,2674 +BRDA:16,0,1,530 BRF:2 BRH:2 end_of_record @@ -1403,32 +1403,32 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getRe FN:11,getRegularSelectionOffsets FNF:1 FNH:1 -FNDA:1160,getRegularSelectionOffsets +FNDA:1148,getRegularSelectionOffsets DA:11,1 -DA:16,1160 -DA:18,1160 -DA:19,1160 -DA:21,1160 +DA:16,1148 +DA:18,1148 +DA:19,1148 +DA:21,1148 LF:5 LH:5 -BRDA:16,0,0,134 -BRDA:16,0,1,1026 -BRDA:16,1,0,1026 -BRDA:16,1,1,134 -BRDA:16,2,0,1160 -BRDA:16,2,1,1160 -BRDA:18,3,0,24 -BRDA:18,3,1,1136 -BRDA:18,4,0,1029 -BRDA:18,4,1,131 -BRDA:18,5,0,1160 -BRDA:18,5,1,134 -BRDA:19,6,0,24 -BRDA:19,6,1,1136 -BRDA:19,7,0,1029 -BRDA:19,7,1,131 -BRDA:19,8,0,1160 -BRDA:19,8,1,134 +BRDA:16,0,0,128 +BRDA:16,0,1,1020 +BRDA:16,1,0,1020 +BRDA:16,1,1,128 +BRDA:16,2,0,1148 +BRDA:16,2,1,1148 +BRDA:18,3,0,20 +BRDA:18,3,1,1128 +BRDA:18,4,0,1023 +BRDA:18,4,1,125 +BRDA:18,5,0,1148 +BRDA:18,5,1,128 +BRDA:19,6,0,20 +BRDA:19,6,1,1128 +BRDA:19,7,0,1023 +BRDA:19,7,1,125 +BRDA:19,8,0,1148 +BRDA:19,8,1,128 BRF:18 BRH:18 end_of_record @@ -1437,17 +1437,17 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/isBlo FN:12,isBlockElement FNF:1 FNH:1 -FNDA:290,isBlockElement +FNDA:287,isBlockElement DA:2,1 DA:4,1 DA:12,1 -DA:13,290 -DA:15,290 +DA:13,287 +DA:15,287 LF:5 LH:5 -BRDA:13,0,0,290 -BRDA:13,0,1,275 -BRDA:13,0,2,135 +BRDA:13,0,0,287 +BRDA:13,0,1,272 +BRDA:13,0,2,137 BRF:3 BRH:3 end_of_record @@ -1457,19 +1457,19 @@ FN:15,parseFormat FN:23,(anonymous_1) FNF:2 FNH:2 -FNDA:2283,parseFormat -FNDA:14818,(anonymous_1) +FNDA:2245,parseFormat +FNDA:14611,(anonymous_1) DA:1,1 DA:15,1 -DA:21,2283 -DA:23,2283 -DA:24,14818 +DA:21,2245 +DA:23,2245 +DA:24,14611 LF:5 LH:5 BRDA:24,0,0,29 -BRDA:24,0,1,14789 -BRDA:24,1,0,14818 -BRDA:24,1,1,14789 +BRDA:24,0,1,14582 +BRDA:24,1,0,14611 +BRDA:24,1,1,14582 BRF:4 BRH:4 end_of_record @@ -1483,68 +1483,68 @@ FN:132,stackFormatInternal FN:146,(anonymous_5) FNF:6 FNH:6 -FNDA:760,stackFormat -FNDA:760,stackLinkInternal -FNDA:760,stackCodeInternal -FNDA:760,stackDecoratorInternal -FNDA:1520,stackFormatInternal -FNDA:199,(anonymous_5) +FNDA:751,stackFormat +FNDA:751,stackLinkInternal +FNDA:751,stackCodeInternal +FNDA:751,stackDecoratorInternal +FNDA:1502,stackFormatInternal +FNDA:207,(anonymous_5) DA:1,1 DA:30,1 DA:31,1 DA:41,1 -DA:52,3800 -DA:53,3800 -DA:55,760 -DA:56,760 -DA:57,760 -DA:58,760 -DA:59,760 -DA:60,760 -DA:62,760 -DA:64,760 -DA:65,760 -DA:66,760 -DA:67,760 -DA:68,760 -DA:76,760 +DA:52,3755 +DA:53,3755 +DA:55,751 +DA:56,751 +DA:57,751 +DA:58,751 +DA:59,751 +DA:60,751 +DA:62,751 +DA:64,751 +DA:65,751 +DA:66,751 +DA:67,751 +DA:68,751 +DA:76,751 DA:78,16 DA:86,13 -DA:93,731 -DA:101,760 +DA:93,722 +DA:101,751 DA:103,5 DA:109,0 -DA:113,755 -DA:121,760 +DA:113,746 +DA:121,751 DA:123,60 -DA:128,700 -DA:136,1520 -DA:138,49 -DA:141,187 -DA:144,1284 -DA:146,1284 -DA:147,199 +DA:128,691 +DA:136,1502 +DA:138,47 +DA:141,185 +DA:144,1270 +DA:146,1270 +DA:147,207 DA:154,8 -DA:158,1284 +DA:158,1270 LF:37 LH:36 BRDA:77,0,0,16 BRDA:77,0,1,13 -BRDA:77,0,2,121 -BRDA:77,0,3,731 +BRDA:77,0,2,123 +BRDA:77,0,3,722 BRDA:102,1,0,5 BRDA:102,1,1,0 -BRDA:102,1,2,755 +BRDA:102,1,2,746 BRDA:122,2,0,60 -BRDA:122,2,1,700 -BRDA:137,3,0,49 -BRDA:137,3,1,187 -BRDA:137,3,2,1284 +BRDA:122,2,1,691 +BRDA:137,3,0,47 +BRDA:137,3,1,185 +BRDA:137,3,2,1270 BRDA:147,4,0,8 -BRDA:147,4,1,191 -BRDA:148,5,0,199 +BRDA:147,4,1,199 +BRDA:148,5,0,207 BRDA:148,5,1,37 -BRDA:148,5,2,196 +BRDA:148,5,2,204 BRDA:148,5,3,13 BRF:18 BRH:17 @@ -1554,13 +1554,13 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domUtils/isNodeOfType. FN:52,isNodeOfType FNF:1 FNH:1 -FNDA:2536,isNodeOfType +FNDA:2500,isNodeOfType DA:52,1 -DA:56,2536 +DA:56,2500 LF:2 LH:2 -BRDA:56,0,0,2536 -BRDA:56,0,1,2536 +BRDA:56,0,0,2500 +BRDA:56,0,1,2500 BRF:2 BRH:2 end_of_record @@ -1574,7 +1574,7 @@ FNF:4 FNH:4 FNDA:180,isPunctuation FNDA:180,isSpace -FNDA:712,hasSpacesOnly +FNDA:706,hasSpacesOnly FNDA:56,normalizeText DA:3,1 DA:5,1 @@ -1585,7 +1585,7 @@ DA:21,1 DA:22,180 DA:23,180 DA:31,1 -DA:32,712 +DA:32,706 DA:41,1 DA:42,56 LF:12 @@ -1611,12 +1611,12 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/upda FN:31,updateListMetadata FNF:1 FNH:1 -FNDA:240,updateListMetadata +FNDA:236,updateListMetadata DA:3,1 DA:4,1 DA:6,1 DA:31,1 -DA:35,240 +DA:35,236 LF:5 LH:5 BRF:0 @@ -1628,40 +1628,40 @@ FN:14,updateMetadata FN:47,hasMetadata FNF:2 FNH:2 -FNDA:402,updateMetadata -FNDA:15,hasMetadata +FNDA:398,updateMetadata +FNDA:14,hasMetadata DA:3,1 DA:5,1 DA:14,1 -DA:19,402 -DA:20,402 -DA:22,402 -DA:23,402 -DA:26,402 +DA:19,398 +DA:20,398 +DA:22,398 +DA:23,398 +DA:26,398 DA:27,9 -DA:30,402 -DA:31,394 -DA:33,394 -DA:34,343 -DA:35,51 -DA:36,46 -DA:40,402 +DA:30,398 +DA:31,390 +DA:33,390 +DA:34,342 +DA:35,48 +DA:36,43 +DA:40,398 DA:47,1 -DA:48,15 +DA:48,14 LF:18 LH:18 BRDA:26,0,0,9 -BRDA:26,0,1,393 -BRDA:26,1,0,402 -BRDA:26,1,1,397 -BRDA:30,2,0,394 +BRDA:26,0,1,389 +BRDA:26,1,0,398 +BRDA:26,1,1,393 +BRDA:30,2,0,390 BRDA:30,2,1,8 -BRDA:33,3,0,343 -BRDA:33,3,1,51 -BRDA:35,4,0,46 +BRDA:33,3,0,342 +BRDA:33,3,1,48 +BRDA:35,4,0,43 BRDA:35,4,1,5 -BRDA:35,5,0,51 -BRDA:35,5,1,49 +BRDA:35,5,0,48 +BRDA:35,5,1,46 BRF:12 BRH:12 end_of_record @@ -1679,12 +1679,12 @@ FNF:8 FNH:8 FNDA:36,(anonymous_0) FNDA:36,(anonymous_1) -FNDA:526,getFormatParsers -FNDA:11046,(anonymous_3) -FNDA:64698,(anonymous_4) -FNDA:412,getFormatAppliers -FNDA:8652,(anonymous_6) -FNDA:50676,(anonymous_7) +FNDA:520,getFormatParsers +FNDA:10920,(anonymous_3) +FNDA:63960,(anonymous_4) +FNDA:405,getFormatAppliers +FNDA:8505,(anonymous_6) +FNDA:49815,(anonymous_7) DA:1,1 DA:2,1 DA:3,1 @@ -1735,39 +1735,39 @@ DA:209,1 DA:211,36 DA:212,36 DA:220,1 -DA:221,1041 -DA:222,979 -DA:224,526 -DA:225,11046 -DA:228,64698 -DA:234,11046 -DA:236,11046 +DA:221,1029 +DA:222,969 +DA:224,520 +DA:225,10920 +DA:228,63960 +DA:234,10920 +DA:236,10920 DA:243,1 -DA:244,808 -DA:245,823 -DA:247,412 -DA:248,8652 -DA:251,50676 -DA:257,8652 -DA:259,8652 +DA:244,794 +DA:245,809 +DA:247,405 +DA:248,8505 +DA:251,49815 +DA:257,8505 +DA:259,8505 LF:65 LH:65 -BRDA:221,0,0,515 +BRDA:221,0,0,509 BRDA:221,0,1,11 -BRDA:222,1,0,453 -BRDA:222,1,1,73 -BRDA:229,2,0,64669 +BRDA:222,1,0,449 +BRDA:222,1,1,71 +BRDA:229,2,0,63931 BRDA:229,2,1,29 -BRDA:232,3,0,11046 -BRDA:232,3,1,10845 -BRDA:244,4,0,396 +BRDA:232,3,0,10920 +BRDA:232,3,1,10726 +BRDA:244,4,0,389 BRDA:244,4,1,16 -BRDA:245,5,0,411 +BRDA:245,5,0,404 BRDA:245,5,1,1 -BRDA:252,6,0,50622 +BRDA:252,6,0,49761 BRDA:252,6,1,54 -BRDA:255,7,0,8652 -BRDA:255,7,1,8651 +BRDA:255,7,0,8505 +BRDA:255,7,1,8504 BRF:16 BRH:16 end_of_record @@ -1777,25 +1777,25 @@ FN:8,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:1940,(anonymous_0) -FNDA:582,(anonymous_1) +FNDA:1911,(anonymous_0) +FNDA:571,(anonymous_1) DA:7,1 -DA:9,1940 -DA:11,1940 +DA:9,1911 +DA:11,1911 DA:12,23 -DA:16,582 +DA:16,571 DA:17,3 LF:6 LH:6 -BRDA:9,0,0,1940 -BRDA:9,0,1,1929 -BRDA:9,0,2,1917 +BRDA:9,0,0,1911 +BRDA:9,0,1,1900 +BRDA:9,0,2,1888 BRDA:11,1,0,23 -BRDA:11,1,1,1917 +BRDA:11,1,1,1888 BRDA:12,2,0,18 BRDA:12,2,1,5 BRDA:16,3,0,3 -BRDA:16,3,1,579 +BRDA:16,3,1,568 BRF:9 BRH:9 end_of_record @@ -1805,20 +1805,20 @@ FN:8,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:280,(anonymous_0) -FNDA:249,(anonymous_1) +FNDA:273,(anonymous_0) +FNDA:241,(anonymous_1) DA:7,1 -DA:9,280 -DA:11,280 +DA:9,273 +DA:11,273 DA:12,14 -DA:16,249 +DA:16,241 DA:17,11 LF:6 LH:6 BRDA:11,0,0,14 -BRDA:11,0,1,266 +BRDA:11,0,1,259 BRDA:16,1,0,11 -BRDA:16,1,1,238 +BRDA:16,1,1,230 BRF:4 BRH:4 end_of_record @@ -1828,28 +1828,28 @@ FN:12,(anonymous_0) FN:23,(anonymous_1) FNF:2 FNH:2 -FNDA:319,(anonymous_0) -FNDA:258,(anonymous_1) +FNDA:312,(anonymous_0) +FNDA:251,(anonymous_1) DA:1,1 DA:3,1 DA:9,1 -DA:13,319 -DA:15,319 -DA:17,319 +DA:13,312 +DA:15,312 +DA:17,312 DA:18,21 DA:19,21 DA:20,21 -DA:24,258 -DA:26,258 +DA:24,251 +DA:26,251 DA:27,8 LF:12 LH:12 BRDA:17,0,0,21 -BRDA:17,0,1,298 +BRDA:17,0,1,291 BRDA:24,1,0,1 -BRDA:24,1,1,257 +BRDA:24,1,1,250 BRDA:26,2,0,8 -BRDA:26,2,1,250 +BRDA:26,2,1,243 BRF:6 BRH:6 end_of_record @@ -1859,24 +1859,24 @@ FN:8,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:916,(anonymous_0) -FNDA:879,(anonymous_1) +FNDA:905,(anonymous_0) +FNDA:866,(anonymous_1) DA:7,1 -DA:9,916 -DA:11,916 +DA:9,905 +DA:11,905 DA:12,21 -DA:16,879 +DA:16,866 DA:17,10 LF:6 LH:6 -BRDA:9,0,0,916 -BRDA:9,0,1,895 +BRDA:9,0,0,905 +BRDA:9,0,1,884 BRDA:11,1,0,21 -BRDA:11,1,1,895 -BRDA:11,2,0,916 +BRDA:11,1,1,884 +BRDA:11,2,0,905 BRDA:11,2,1,21 BRDA:16,3,0,10 -BRDA:16,3,1,869 +BRDA:16,3,1,856 BRF:8 BRH:8 end_of_record @@ -1888,31 +1888,31 @@ FN:39,(anonymous_2) FN:40,(anonymous_3) FNF:4 FNH:4 -FNDA:546,(anonymous_0) -FNDA:2184,(anonymous_1) -FNDA:480,(anonymous_2) -FNDA:1920,(anonymous_3) +FNDA:539,(anonymous_0) +FNDA:2156,(anonymous_1) +FNDA:468,(anonymous_2) +FNDA:1872,(anonymous_3) DA:3,1 DA:5,1 DA:15,1 -DA:17,546 -DA:18,2184 -DA:20,2184 +DA:17,539 +DA:18,2156 +DA:20,2156 DA:21,401 DA:24,264 DA:25,264 DA:29,137 DA:34,137 -DA:40,480 -DA:41,1920 -DA:43,1920 +DA:40,468 +DA:41,1872 +DA:43,1872 DA:44,222 LF:15 LH:15 -BRDA:18,0,0,2184 -BRDA:18,0,1,1952 +BRDA:18,0,0,2156 +BRDA:18,0,1,1924 BRDA:20,1,0,401 -BRDA:20,1,1,1783 +BRDA:20,1,1,1755 BRDA:22,2,0,134 BRDA:22,2,1,264 BRDA:22,2,2,76 @@ -1922,7 +1922,7 @@ BRDA:30,3,1,133 BRDA:30,4,0,4 BRDA:30,4,1,0 BRDA:43,5,0,222 -BRDA:43,5,1,1698 +BRDA:43,5,1,1650 BRDA:44,6,0,222 BRDA:44,6,1,29 BRF:16 @@ -1936,26 +1936,26 @@ FN:24,(anonymous_2) FN:25,(anonymous_3) FNF:4 FNH:4 -FNDA:430,(anonymous_0) -FNDA:1720,(anonymous_1) -FNDA:375,(anonymous_2) -FNDA:1500,(anonymous_3) +FNDA:422,(anonymous_0) +FNDA:1688,(anonymous_1) +FNDA:362,(anonymous_2) +FNDA:1448,(anonymous_3) DA:4,1 DA:14,1 -DA:16,430 -DA:17,1720 -DA:19,1720 -DA:20,40 -DA:25,375 -DA:26,1500 -DA:27,1500 -DA:28,23 +DA:16,422 +DA:17,1688 +DA:19,1688 +DA:20,34 +DA:25,362 +DA:26,1448 +DA:27,1448 +DA:28,17 LF:10 LH:10 -BRDA:19,0,0,40 -BRDA:19,0,1,1680 -BRDA:27,1,0,23 -BRDA:27,1,1,1477 +BRDA:19,0,0,34 +BRDA:19,0,1,1654 +BRDA:27,1,0,17 +BRDA:27,1,1,1431 BRF:4 BRH:4 end_of_record @@ -1965,19 +1965,19 @@ FN:10,(anonymous_0) FN:29,(anonymous_1) FNF:2 FNH:2 -FNDA:824,(anonymous_0) -FNDA:624,(anonymous_1) +FNDA:813,(anonymous_0) +FNDA:612,(anonymous_1) DA:1,1 DA:3,1 DA:9,1 -DA:11,824 -DA:13,824 -DA:15,824 +DA:11,813 +DA:13,813 +DA:15,813 DA:22,0 -DA:25,824 +DA:25,813 DA:26,20 -DA:30,624 -DA:32,624 +DA:30,612 +DA:32,612 DA:33,21 DA:34,21 DA:36,21 @@ -1987,11 +1987,11 @@ DA:39,5 DA:41,16 LF:18 LH:17 -BRDA:13,0,0,824 -BRDA:13,0,1,804 +BRDA:13,0,0,813 +BRDA:13,0,1,793 BRDA:15,1,0,0 -BRDA:15,1,1,824 -BRDA:16,2,0,824 +BRDA:15,1,1,813 +BRDA:16,2,0,813 BRDA:16,2,1,236 BRDA:16,2,2,0 BRDA:16,2,3,0 @@ -2000,11 +2000,11 @@ BRDA:17,3,1,213 BRDA:17,4,0,236 BRDA:17,4,1,213 BRDA:25,5,0,20 -BRDA:25,5,1,804 +BRDA:25,5,1,793 BRDA:30,6,0,3 -BRDA:30,6,1,621 +BRDA:30,6,1,609 BRDA:32,7,0,21 -BRDA:32,7,1,603 +BRDA:32,7,1,591 BRDA:34,8,0,10 BRDA:34,8,1,11 BRDA:34,9,0,21 @@ -2024,24 +2024,24 @@ FN:8,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:528,(anonymous_0) -FNDA:348,(anonymous_1) +FNDA:517,(anonymous_0) +FNDA:341,(anonymous_1) DA:7,1 -DA:9,528 -DA:11,528 -DA:12,29 -DA:16,348 -DA:17,348 -DA:18,19 +DA:9,517 +DA:11,517 +DA:12,27 +DA:16,341 +DA:17,341 +DA:18,15 LF:7 LH:7 -BRDA:9,0,0,528 -BRDA:9,0,1,506 -BRDA:11,1,0,29 -BRDA:11,1,1,499 -BRDA:17,2,0,19 -BRDA:17,2,1,329 -BRDA:18,3,0,19 +BRDA:9,0,0,517 +BRDA:9,0,1,497 +BRDA:11,1,0,27 +BRDA:11,1,1,490 +BRDA:17,2,0,15 +BRDA:17,2,1,326 +BRDA:18,3,0,15 BRDA:18,3,1,0 BRF:8 BRH:7 @@ -2052,23 +2052,23 @@ FN:9,(anonymous_0) FN:22,(anonymous_1) FNF:2 FNH:2 -FNDA:766,(anonymous_0) -FNDA:863,(anonymous_1) +FNDA:758,(anonymous_0) +FNDA:844,(anonymous_1) DA:3,1 DA:8,1 -DA:11,766 -DA:18,766 +DA:11,758 +DA:18,758 DA:19,23 -DA:23,863 +DA:23,844 DA:24,20 LF:7 LH:7 -BRDA:11,0,0,766 -BRDA:11,0,1,743 +BRDA:11,0,0,758 +BRDA:11,0,1,735 BRDA:18,1,0,23 -BRDA:18,1,1,743 +BRDA:18,1,1,735 BRDA:23,2,0,20 -BRDA:23,2,1,843 +BRDA:23,2,1,824 BRF:6 BRH:6 end_of_record @@ -2078,23 +2078,23 @@ FN:8,(anonymous_0) FN:13,(anonymous_1) FNF:2 FNH:2 -FNDA:113,(anonymous_0) -FNDA:106,(anonymous_1) +FNDA:108,(anonymous_0) +FNDA:101,(anonymous_1) DA:7,1 -DA:9,113 +DA:9,108 DA:10,4 -DA:14,106 +DA:14,101 DA:15,3 LF:5 LH:5 BRDA:9,0,0,4 -BRDA:9,0,1,109 +BRDA:9,0,1,104 BRDA:9,1,0,0 -BRDA:9,1,1,113 -BRDA:9,2,0,113 -BRDA:9,2,1,113 +BRDA:9,1,1,108 +BRDA:9,2,0,108 +BRDA:9,2,1,108 BRDA:14,3,0,3 -BRDA:14,3,1,103 +BRDA:14,3,1,98 BRF:8 BRH:7 end_of_record @@ -2106,30 +2106,30 @@ FN:28,(anonymous_2) FN:29,(anonymous_3) FNF:4 FNH:4 -FNDA:339,(anonymous_0) -FNDA:1695,(anonymous_1) -FNDA:299,(anonymous_2) -FNDA:1495,(anonymous_3) +FNDA:330,(anonymous_0) +FNDA:1650,(anonymous_1) +FNDA:288,(anonymous_2) +FNDA:1440,(anonymous_3) DA:7,1 DA:18,1 -DA:20,339 -DA:21,1695 -DA:23,1695 -DA:24,52 -DA:29,299 -DA:30,1495 -DA:32,1495 -DA:33,29 +DA:20,330 +DA:21,1650 +DA:23,1650 +DA:24,44 +DA:29,288 +DA:30,1440 +DA:32,1440 +DA:33,24 LF:10 LH:10 -BRDA:23,0,0,52 -BRDA:23,0,1,1643 -BRDA:24,1,0,20 -BRDA:24,1,1,32 -BRDA:32,2,0,29 -BRDA:32,2,1,1466 +BRDA:23,0,0,44 +BRDA:23,0,1,1606 +BRDA:24,1,0,0 +BRDA:24,1,1,44 +BRDA:32,2,0,24 +BRDA:32,2,1,1416 BRF:6 -BRH:6 +BRH:5 end_of_record TN: SF:packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/boxShadowFormatHandler.ts @@ -2137,23 +2137,23 @@ FN:8,(anonymous_0) FN:13,(anonymous_1) FNF:2 FNH:2 -FNDA:14,(anonymous_0) -FNDA:13,(anonymous_1) +FNDA:12,(anonymous_0) +FNDA:11,(anonymous_1) DA:7,1 -DA:9,14 +DA:9,12 DA:10,1 -DA:14,13 +DA:14,11 DA:15,1 LF:5 LH:5 BRDA:9,0,0,1 -BRDA:9,0,1,13 +BRDA:9,0,1,11 BRDA:9,1,0,0 -BRDA:9,1,1,14 -BRDA:9,2,0,14 -BRDA:9,2,1,14 +BRDA:9,1,1,12 +BRDA:9,2,0,12 +BRDA:9,2,1,12 BRDA:14,3,0,1 -BRDA:14,3,1,12 +BRDA:14,3,1,10 BRF:8 BRH:7 end_of_record @@ -2165,17 +2165,17 @@ FN:17,(anonymous_2) FN:18,(anonymous_3) FNF:4 FNH:4 -FNDA:240,(anonymous_0) +FNDA:235,(anonymous_0) FNDA:13,(anonymous_1) -FNDA:242,(anonymous_2) -FNDA:17,(anonymous_3) +FNDA:232,(anonymous_2) +FNDA:14,(anonymous_3) DA:3,1 DA:8,1 -DA:10,240 -DA:12,240 +DA:10,235 +DA:12,235 DA:13,13 -DA:18,242 -DA:19,17 +DA:18,232 +DA:19,14 LF:7 LH:7 BRDA:13,0,0,13 @@ -2189,19 +2189,19 @@ FN:8,(anonymous_0) FN:13,(anonymous_1) FNF:2 FNH:2 -FNDA:54,(anonymous_0) -FNDA:49,(anonymous_1) +FNDA:51,(anonymous_0) +FNDA:46,(anonymous_1) DA:7,1 -DA:9,54 +DA:9,51 DA:10,4 -DA:14,49 +DA:14,46 DA:15,3 LF:5 LH:5 BRDA:9,0,0,4 -BRDA:9,0,1,50 +BRDA:9,0,1,47 BRDA:14,1,0,3 -BRDA:14,1,1,46 +BRDA:14,1,1,43 BRF:4 BRH:4 end_of_record @@ -2212,81 +2212,81 @@ FN:37,(anonymous_1) FN:59,tryParseSize FNF:3 FNH:3 -FNDA:340,(anonymous_0) -FNDA:301,(anonymous_1) -FNDA:658,tryParseSize +FNDA:331,(anonymous_0) +FNDA:291,(anonymous_1) +FNDA:645,tryParseSize DA:4,1 DA:9,1 -DA:11,340 -DA:12,340 -DA:13,340 -DA:14,340 -DA:15,340 -DA:16,340 -DA:18,340 -DA:19,18 -DA:21,340 -DA:22,8 -DA:24,340 -DA:25,5 -DA:27,340 +DA:11,331 +DA:12,331 +DA:13,331 +DA:14,331 +DA:15,331 +DA:16,331 +DA:18,331 +DA:19,14 +DA:21,331 +DA:22,7 +DA:24,331 +DA:25,3 +DA:27,331 DA:28,1 -DA:30,340 +DA:30,331 DA:31,1 -DA:33,340 +DA:33,331 DA:34,1 -DA:38,301 -DA:39,13 -DA:41,301 -DA:42,6 -DA:44,301 -DA:45,2 -DA:47,301 +DA:38,291 +DA:39,8 +DA:41,291 +DA:42,4 +DA:44,291 +DA:45,1 +DA:47,291 DA:48,1 -DA:50,301 +DA:50,291 DA:51,1 -DA:53,301 +DA:53,291 DA:54,1 -DA:60,658 -DA:61,658 -DA:63,658 +DA:60,645 +DA:61,645 +DA:63,645 LF:35 LH:35 -BRDA:11,0,0,340 -BRDA:11,0,1,324 -BRDA:12,1,0,340 -BRDA:12,1,1,334 -BRDA:18,2,0,18 -BRDA:18,2,1,322 -BRDA:21,3,0,8 -BRDA:21,3,1,332 -BRDA:24,4,0,5 -BRDA:24,4,1,335 +BRDA:11,0,0,331 +BRDA:11,0,1,319 +BRDA:12,1,0,331 +BRDA:12,1,1,326 +BRDA:18,2,0,14 +BRDA:18,2,1,317 +BRDA:21,3,0,7 +BRDA:21,3,1,324 +BRDA:24,4,0,3 +BRDA:24,4,1,328 BRDA:27,5,0,1 -BRDA:27,5,1,339 +BRDA:27,5,1,330 BRDA:30,6,0,1 -BRDA:30,6,1,339 +BRDA:30,6,1,330 BRDA:33,7,0,1 -BRDA:33,7,1,339 -BRDA:38,8,0,13 -BRDA:38,8,1,288 -BRDA:41,9,0,6 -BRDA:41,9,1,295 -BRDA:44,10,0,2 -BRDA:44,10,1,299 +BRDA:33,7,1,330 +BRDA:38,8,0,8 +BRDA:38,8,1,283 +BRDA:41,9,0,4 +BRDA:41,9,1,287 +BRDA:44,10,0,1 +BRDA:44,10,1,290 BRDA:47,11,0,1 -BRDA:47,11,1,300 +BRDA:47,11,1,290 BRDA:50,12,0,1 -BRDA:50,12,1,300 +BRDA:50,12,1,290 BRDA:53,13,0,1 -BRDA:53,13,1,300 -BRDA:61,14,0,658 -BRDA:61,14,1,654 +BRDA:53,13,1,290 +BRDA:61,14,0,645 +BRDA:61,14,1,641 BRDA:64,15,0,2 -BRDA:64,15,1,656 -BRDA:63,16,0,658 +BRDA:64,15,1,643 +BRDA:63,16,0,645 BRDA:63,16,1,4 -BRDA:66,17,0,654 +BRDA:66,17,0,641 BRDA:66,17,1,2 BRF:36 BRH:36 @@ -2297,20 +2297,20 @@ FN:8,(anonymous_0) FN:27,(anonymous_1) FNF:2 FNH:2 -FNDA:71,(anonymous_0) -FNDA:62,(anonymous_1) +FNDA:69,(anonymous_0) +FNDA:60,(anonymous_1) DA:7,1 -DA:9,71 -DA:11,71 +DA:9,69 +DA:11,69 DA:19,9 DA:20,9 -DA:23,7 -DA:24,7 -DA:28,62 -DA:29,7 +DA:23,5 +DA:24,5 +DA:28,60 +DA:29,5 LF:9 LH:9 -BRDA:9,0,0,71 +BRDA:9,0,0,69 BRDA:9,0,1,56 BRDA:12,1,0,1 BRDA:12,1,1,2 @@ -2319,8 +2319,8 @@ BRDA:12,1,3,4 BRDA:12,1,4,5 BRDA:12,1,5,6 BRDA:12,1,6,9 -BRDA:12,1,7,7 -BRDA:28,2,0,7 +BRDA:12,1,7,5 +BRDA:28,2,0,5 BRDA:28,2,1,55 BRF:12 BRH:12 @@ -2331,22 +2331,22 @@ FN:8,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:62,(anonymous_0) -FNDA:60,(anonymous_1) +FNDA:60,(anonymous_0) +FNDA:58,(anonymous_1) DA:7,1 -DA:9,62 -DA:11,62 +DA:9,60 +DA:11,60 DA:12,1 -DA:16,60 +DA:16,58 DA:17,2 LF:6 LH:6 -BRDA:9,0,0,62 -BRDA:9,0,1,61 +BRDA:9,0,0,60 +BRDA:9,0,1,59 BRDA:11,1,0,1 -BRDA:11,1,1,61 +BRDA:11,1,1,59 BRDA:16,2,0,2 -BRDA:16,2,1,58 +BRDA:16,2,1,56 BRF:6 BRH:6 end_of_record @@ -2510,7 +2510,7 @@ FN:95,(anonymous_3) FNF:4 FNH:4 FNDA:135,(anonymous_0) -FNDA:110,(anonymous_1) +FNDA:106,(anonymous_1) FNDA:11,getKeyFromValue FNDA:209,(anonymous_3) DA:3,1 @@ -2527,9 +2527,9 @@ DA:68,10 DA:70,2 DA:71,1 DA:72,1 -DA:78,110 -DA:80,110 -DA:84,110 +DA:78,106 +DA:80,106 +DA:84,106 DA:85,4 DA:95,209 DA:98,11 @@ -2552,12 +2552,12 @@ BRDA:70,6,0,2 BRDA:70,6,1,1 BRDA:73,7,0,0 BRDA:73,7,1,1 -BRDA:81,8,0,38 +BRDA:81,8,0,34 BRDA:81,8,1,72 BRDA:84,9,0,4 -BRDA:84,9,1,106 -BRDA:84,10,0,110 -BRDA:84,10,1,7 +BRDA:84,9,1,102 +BRDA:84,10,0,106 +BRDA:84,10,1,5 BRDA:95,11,0,0 BRDA:95,11,1,11 BRF:25 @@ -2570,7 +2570,7 @@ FN:25,(anonymous_1) FNF:2 FNH:2 FNDA:137,(anonymous_0) -FNDA:114,(anonymous_1) +FNDA:110,(anonymous_1) DA:3,1 DA:8,1 DA:10,137 @@ -2580,17 +2580,17 @@ DA:13,49 DA:15,49 DA:19,4 DA:22,49 -DA:27,114 -DA:28,114 -DA:29,114 -DA:31,114 -DA:32,39 -DA:34,39 +DA:27,110 +DA:28,110 +DA:29,110 +DA:31,110 +DA:32,35 +DA:34,35 DA:35,4 -DA:36,35 -DA:37,31 -DA:40,39 -DA:41,39 +DA:36,31 +DA:37,29 +DA:40,35 +DA:41,35 LF:20 LH:20 BRDA:10,0,0,49 @@ -2599,14 +2599,14 @@ BRDA:15,1,0,4 BRDA:15,1,1,45 BRDA:16,2,0,49 BRDA:16,2,1,7 -BRDA:31,3,0,39 +BRDA:31,3,0,35 BRDA:31,3,1,75 -BRDA:31,4,0,114 -BRDA:31,4,1,113 +BRDA:31,4,0,110 +BRDA:31,4,1,109 BRDA:34,5,0,4 -BRDA:34,5,1,35 -BRDA:36,6,0,31 -BRDA:36,6,1,4 +BRDA:34,5,1,31 +BRDA:36,6,0,29 +BRDA:36,6,1,2 BRF:14 BRH:14 end_of_record @@ -2617,19 +2617,19 @@ FN:15,(anonymous_1) FNF:2 FNH:2 FNDA:138,(anonymous_0) -FNDA:117,(anonymous_1) +FNDA:113,(anonymous_1) DA:7,1 DA:9,138 DA:11,138 DA:12,2 -DA:16,117 +DA:16,113 DA:17,1 LF:6 LH:6 BRDA:11,0,0,2 BRDA:11,0,1,136 BRDA:16,1,0,1 -BRDA:16,1,1,116 +BRDA:16,1,1,112 BRF:4 BRH:4 end_of_record @@ -2640,7 +2640,7 @@ FN:16,(anonymous_1) FNF:2 FNH:2 FNDA:132,(anonymous_0) -FNDA:108,(anonymous_1) +FNDA:104,(anonymous_1) DA:2,1 DA:8,1 DA:10,132 @@ -2661,15 +2661,15 @@ FN:9,(anonymous_0) FN:16,(anonymous_1) FNF:2 FNH:2 -FNDA:809,(anonymous_0) -FNDA:556,(anonymous_1) +FNDA:800,(anonymous_0) +FNDA:546,(anonymous_1) DA:3,1 DA:8,1 -DA:10,809 -DA:12,809 +DA:10,800 +DA:12,800 DA:13,73 -DA:17,556 -DA:18,506 +DA:17,546 +DA:18,496 DA:21,50 DA:23,50 DA:27,25 @@ -2679,11 +2679,11 @@ DA:30,21 DA:32,4 LF:14 LH:14 -BRDA:10,0,0,809 -BRDA:10,0,1,760 +BRDA:10,0,0,800 +BRDA:10,0,1,751 BRDA:12,1,0,73 -BRDA:12,1,1,736 -BRDA:17,2,0,506 +BRDA:12,1,1,727 +BRDA:17,2,0,496 BRDA:17,2,1,50 BRDA:23,3,0,25 BRDA:23,3,1,25 @@ -2705,25 +2705,25 @@ FN:8,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:768,(anonymous_0) -FNDA:561,(anonymous_1) +FNDA:759,(anonymous_0) +FNDA:551,(anonymous_1) DA:7,1 -DA:9,768 -DA:11,768 -DA:12,67 -DA:16,561 +DA:9,759 +DA:11,759 +DA:12,69 +DA:16,551 DA:17,28 LF:6 LH:6 -BRDA:9,0,0,768 -BRDA:9,0,1,707 -BRDA:11,1,0,67 -BRDA:11,1,1,701 -BRDA:11,2,0,768 -BRDA:11,2,1,68 +BRDA:9,0,0,759 +BRDA:9,0,1,696 +BRDA:11,1,0,69 +BRDA:11,1,1,690 +BRDA:11,2,0,759 +BRDA:11,2,1,70 BRDA:16,3,0,28 -BRDA:16,3,1,533 -BRDA:16,4,0,561 +BRDA:16,3,1,523 +BRDA:16,4,0,551 BRDA:16,4,1,42 BRF:10 BRH:10 @@ -2734,31 +2734,31 @@ FN:9,(anonymous_0) FN:19,(anonymous_1) FNF:2 FNH:2 -FNDA:765,(anonymous_0) -FNDA:554,(anonymous_1) +FNDA:756,(anonymous_0) +FNDA:544,(anonymous_1) DA:3,1 DA:8,1 -DA:10,765 -DA:11,765 -DA:15,765 -DA:16,59 -DA:20,554 -DA:21,35 +DA:10,756 +DA:11,756 +DA:15,756 +DA:16,57 +DA:20,544 +DA:21,33 LF:8 LH:8 -BRDA:10,0,0,765 -BRDA:10,0,1,715 -BRDA:11,1,0,765 -BRDA:11,1,1,757 -BRDA:15,2,0,59 -BRDA:15,2,1,706 -BRDA:15,3,0,765 -BRDA:15,3,1,63 -BRDA:15,3,2,59 -BRDA:20,4,0,35 -BRDA:20,4,1,519 -BRDA:20,5,0,554 -BRDA:20,5,1,46 +BRDA:10,0,0,756 +BRDA:10,0,1,708 +BRDA:11,1,0,756 +BRDA:11,1,1,750 +BRDA:15,2,0,57 +BRDA:15,2,1,699 +BRDA:15,3,0,756 +BRDA:15,3,1,61 +BRDA:15,3,2,57 +BRDA:20,4,0,33 +BRDA:20,4,1,511 +BRDA:20,5,0,544 +BRDA:20,5,1,44 BRF:13 BRH:13 end_of_record @@ -2768,17 +2768,17 @@ FN:9,(anonymous_0) FN:18,(anonymous_1) FNF:2 FNH:2 -FNDA:776,(anonymous_0) -FNDA:553,(anonymous_1) +FNDA:767,(anonymous_0) +FNDA:543,(anonymous_1) DA:3,1 DA:8,1 -DA:10,776 -DA:12,776 +DA:10,767 +DA:12,767 DA:13,10 -DA:14,766 +DA:14,757 DA:15,9 -DA:19,553 -DA:20,546 +DA:19,543 +DA:20,536 DA:23,7 DA:25,7 DA:26,4 @@ -2788,17 +2788,17 @@ DA:29,4 DA:31,0 LF:16 LH:15 -BRDA:10,0,0,776 -BRDA:10,0,1,761 +BRDA:10,0,0,767 +BRDA:10,0,1,752 BRDA:12,1,0,10 -BRDA:12,1,1,766 -BRDA:12,2,0,776 -BRDA:12,2,1,770 +BRDA:12,1,1,757 +BRDA:12,2,0,767 +BRDA:12,2,1,761 BRDA:14,3,0,9 -BRDA:14,3,1,757 -BRDA:14,4,0,766 -BRDA:14,4,1,762 -BRDA:19,5,0,546 +BRDA:14,3,1,748 +BRDA:14,4,0,757 +BRDA:14,4,1,753 +BRDA:19,5,0,536 BRDA:19,5,1,7 BRDA:25,6,0,4 BRDA:25,6,1,3 @@ -2813,22 +2813,22 @@ FN:8,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:761,(anonymous_0) -FNDA:551,(anonymous_1) +FNDA:752,(anonymous_0) +FNDA:541,(anonymous_1) DA:7,1 -DA:9,761 -DA:11,761 +DA:9,752 +DA:11,752 DA:12,2 -DA:16,551 +DA:16,541 DA:17,2 LF:6 LH:6 -BRDA:9,0,0,761 -BRDA:9,0,1,759 +BRDA:9,0,0,752 +BRDA:9,0,1,750 BRDA:11,1,0,2 -BRDA:11,1,1,759 +BRDA:11,1,1,750 BRDA:16,2,0,2 -BRDA:16,2,1,549 +BRDA:16,2,1,539 BRF:6 BRH:6 end_of_record @@ -2839,7 +2839,7 @@ FN:48,(anonymous_1) FNF:2 FNH:2 FNDA:20,(anonymous_0) -FNDA:33,(anonymous_1) +FNDA:32,(anonymous_1) DA:3,1 DA:8,1 DA:10,20 @@ -2864,19 +2864,19 @@ DA:39,19 DA:40,1 DA:43,19 DA:44,1 -DA:49,33 -DA:50,32 -DA:52,32 +DA:49,32 +DA:50,31 +DA:52,31 DA:53,1 -DA:56,32 +DA:56,31 DA:57,1 -DA:60,32 +DA:60,31 DA:61,1 -DA:64,32 +DA:64,31 DA:65,1 -DA:68,32 +DA:68,31 DA:69,2 -DA:72,32 +DA:72,31 DA:73,1 LF:38 LH:38 @@ -2896,22 +2896,22 @@ BRDA:39,6,0,1 BRDA:39,6,1,18 BRDA:43,7,0,1 BRDA:43,7,1,18 -BRDA:49,8,0,32 +BRDA:49,8,0,31 BRDA:49,8,1,1 -BRDA:49,9,0,33 -BRDA:49,9,1,32 +BRDA:49,9,0,32 +BRDA:49,9,1,31 BRDA:52,10,0,1 -BRDA:52,10,1,31 +BRDA:52,10,1,30 BRDA:56,11,0,1 -BRDA:56,11,1,31 +BRDA:56,11,1,30 BRDA:60,12,0,1 -BRDA:60,12,1,31 +BRDA:60,12,1,30 BRDA:64,13,0,1 -BRDA:64,13,1,31 +BRDA:64,13,1,30 BRDA:68,14,0,2 -BRDA:68,14,1,30 +BRDA:68,14,1,29 BRDA:72,15,0,1 -BRDA:72,15,1,31 +BRDA:72,15,1,30 BRF:32 BRH:32 end_of_record @@ -2921,29 +2921,29 @@ FN:9,(anonymous_0) FN:16,(anonymous_1) FNF:2 FNH:2 -FNDA:770,(anonymous_0) -FNDA:553,(anonymous_1) +FNDA:761,(anonymous_0) +FNDA:543,(anonymous_1) DA:2,1 DA:8,1 -DA:10,770 -DA:12,770 +DA:10,761 +DA:12,761 DA:13,8 -DA:17,553 +DA:17,543 DA:18,5 DA:19,5 DA:20,5 LF:9 LH:9 -BRDA:10,0,0,770 -BRDA:10,0,1,757 +BRDA:10,0,0,761 +BRDA:10,0,1,750 BRDA:12,1,0,8 -BRDA:12,1,1,762 -BRDA:12,2,0,752 -BRDA:12,2,1,18 -BRDA:12,3,0,770 -BRDA:12,3,1,770 +BRDA:12,1,1,753 +BRDA:12,2,0,745 +BRDA:12,2,1,16 +BRDA:12,3,0,761 +BRDA:12,3,1,761 BRDA:17,4,0,5 -BRDA:17,4,1,548 +BRDA:17,4,1,538 BRF:10 BRH:10 end_of_record @@ -2955,17 +2955,17 @@ FN:26,(anonymous_2) FN:42,isSuperOrSubScript FNF:4 FNH:4 -FNDA:768,(anonymous_0) -FNDA:553,(anonymous_1) +FNDA:759,(anonymous_0) +FNDA:543,(anonymous_1) FNDA:6,(anonymous_2) -FNDA:831,isSuperOrSubScript +FNDA:820,isSuperOrSubScript DA:2,1 DA:8,1 -DA:10,768 -DA:11,768 -DA:13,768 +DA:10,759 +DA:11,759 +DA:13,759 DA:14,10 -DA:22,553 +DA:22,543 DA:23,5 DA:27,6 DA:29,6 @@ -2973,26 +2973,26 @@ DA:30,6 DA:31,6 DA:32,6 DA:42,1 -DA:46,831 +DA:46,820 LF:15 LH:15 -BRDA:10,0,0,768 -BRDA:10,0,1,755 -BRDA:11,1,0,768 -BRDA:11,1,1,716 +BRDA:10,0,0,759 +BRDA:10,0,1,748 +BRDA:11,1,0,759 +BRDA:11,1,1,709 BRDA:13,2,0,10 -BRDA:13,2,1,758 +BRDA:13,2,1,749 BRDA:14,3,0,10 BRDA:14,3,1,8 BRDA:22,4,0,5 -BRDA:22,4,1,548 +BRDA:22,4,1,538 BRDA:27,5,0,3 BRDA:27,5,1,3 BRDA:27,6,0,3 BRDA:27,6,1,0 BRDA:29,7,0,6 BRDA:29,7,1,0 -BRDA:46,8,0,831 +BRDA:46,8,0,820 BRDA:46,8,1,14 BRDA:46,8,2,5 BRF:19 @@ -3004,28 +3004,28 @@ FN:9,(anonymous_0) FN:22,(anonymous_1) FNF:2 FNH:2 -FNDA:786,(anonymous_0) -FNDA:643,(anonymous_1) +FNDA:777,(anonymous_0) +FNDA:630,(anonymous_1) DA:2,1 DA:8,1 -DA:11,786 -DA:18,786 -DA:19,39 -DA:23,643 -DA:25,643 -DA:26,30 +DA:11,777 +DA:18,777 +DA:19,37 +DA:23,630 +DA:25,630 +DA:26,28 LF:8 LH:8 -BRDA:11,0,0,786 -BRDA:11,0,1,747 -BRDA:18,1,0,39 -BRDA:18,1,1,747 -BRDA:18,2,0,786 -BRDA:18,2,1,39 -BRDA:25,3,0,30 -BRDA:25,3,1,613 -BRDA:25,4,0,643 -BRDA:25,4,1,30 +BRDA:11,0,0,777 +BRDA:11,0,1,740 +BRDA:18,1,0,37 +BRDA:18,1,1,740 +BRDA:18,2,0,777 +BRDA:18,2,1,37 +BRDA:25,3,0,28 +BRDA:25,3,1,602 +BRDA:25,4,0,630 +BRDA:25,4,1,28 BRF:10 BRH:10 end_of_record @@ -3035,19 +3035,19 @@ FN:9,(anonymous_0) FN:18,(anonymous_1) FNF:2 FNH:2 -FNDA:788,(anonymous_0) -FNDA:586,(anonymous_1) +FNDA:779,(anonymous_0) +FNDA:575,(anonymous_1) DA:2,1 DA:8,1 -DA:10,788 -DA:12,788 +DA:10,779 +DA:12,779 DA:13,9 -DA:14,779 +DA:14,770 DA:15,0 -DA:19,586 -DA:20,550 -DA:23,36 -DA:25,36 +DA:19,575 +DA:20,540 +DA:23,35 +DA:25,35 DA:26,7 DA:27,6 DA:28,6 @@ -3055,22 +3055,22 @@ DA:29,6 DA:31,1 LF:16 LH:15 -BRDA:10,0,0,788 -BRDA:10,0,1,774 +BRDA:10,0,0,779 +BRDA:10,0,1,767 BRDA:12,1,0,9 -BRDA:12,1,1,779 -BRDA:12,2,0,769 -BRDA:12,2,1,19 -BRDA:12,3,0,788 -BRDA:12,3,1,788 +BRDA:12,1,1,770 +BRDA:12,2,0,762 +BRDA:12,2,1,17 +BRDA:12,3,0,779 +BRDA:12,3,1,779 BRDA:14,4,0,0 -BRDA:14,4,1,779 -BRDA:14,5,0,779 +BRDA:14,4,1,770 +BRDA:14,5,0,770 BRDA:14,5,1,37 -BRDA:19,6,0,550 -BRDA:19,6,1,36 +BRDA:19,6,0,540 +BRDA:19,6,1,35 BRDA:25,7,0,7 -BRDA:25,7,1,29 +BRDA:25,7,1,28 BRDA:26,8,0,6 BRDA:26,8,1,1 BRF:18 @@ -3082,22 +3082,22 @@ FN:8,(anonymous_0) FN:14,(anonymous_1) FNF:2 FNH:2 -FNDA:44,(anonymous_0) -FNDA:38,(anonymous_1) +FNDA:43,(anonymous_0) +FNDA:37,(anonymous_1) DA:7,1 -DA:9,44 -DA:10,44 +DA:9,43 +DA:10,43 DA:11,2 -DA:15,38 +DA:15,37 DA:16,1 LF:6 LH:6 BRDA:10,0,0,2 -BRDA:10,0,1,42 -BRDA:10,1,0,44 +BRDA:10,0,1,41 +BRDA:10,1,0,43 BRDA:10,1,1,3 BRDA:15,2,0,1 -BRDA:15,2,1,37 +BRDA:15,2,1,36 BRF:6 BRH:6 end_of_record @@ -3107,21 +3107,21 @@ FN:10,(anonymous_0) FN:15,(anonymous_1) FNF:2 FNH:2 -FNDA:103,(anonymous_0) -FNDA:38,(anonymous_1) +FNDA:100,(anonymous_0) +FNDA:37,(anonymous_1) DA:4,1 DA:9,1 -DA:11,103 -DA:12,5 -DA:16,38 -DA:17,4 -DA:18,4 -DA:19,4 +DA:11,100 +DA:12,4 +DA:16,37 +DA:17,3 +DA:18,3 +DA:19,3 LF:8 LH:8 -BRDA:11,0,0,5 -BRDA:11,0,1,98 -BRDA:16,1,0,4 +BRDA:11,0,0,4 +BRDA:11,0,1,96 +BRDA:16,1,0,3 BRDA:16,1,1,34 BRF:4 BRH:4 @@ -3132,14 +3132,14 @@ FN:8,(anonymous_0) FN:16,(anonymous_1) FNF:2 FNH:1 -FNDA:63,(anonymous_0) +FNDA:61,(anonymous_0) FNDA:0,(anonymous_1) DA:7,1 -DA:9,63 -DA:13,9 +DA:9,61 +DA:13,7 LF:3 LH:3 -BRDA:9,0,0,9 +BRDA:9,0,0,7 BRDA:9,0,1,54 BRF:2 BRH:2 @@ -3151,44 +3151,44 @@ FN:34,setColor FN:59,tryGetFontColor FNF:3 FNH:3 -FNDA:1559,getColor -FNDA:54,setColor -FNDA:265,tryGetFontColor +FNDA:1542,getColor +FNDA:51,setColor +FNDA:259,tryGetFontColor DA:2,1 DA:7,1 -DA:15,1559 -DA:16,1559 -DA:24,1559 -DA:25,265 -DA:28,1559 +DA:15,1542 +DA:16,1542 +DA:24,1542 +DA:25,259 +DA:28,1542 DA:34,1 -DA:41,54 -DA:45,54 +DA:41,51 +DA:45,51 DA:46,20 -DA:48,34 -DA:67,265 +DA:48,31 +DA:67,259 LF:13 LH:13 -BRDA:15,0,0,1559 +BRDA:15,0,0,1542 BRDA:15,0,1,0 -BRDA:17,1,0,1559 -BRDA:17,1,1,265 -BRDA:17,1,2,1558 -BRDA:17,1,3,1497 -BRDA:17,1,4,1492 -BRDA:19,2,0,766 -BRDA:19,2,1,792 -BRDA:20,3,0,744 -BRDA:20,3,1,753 -BRDA:24,4,0,265 -BRDA:24,4,1,1294 -BRDA:42,5,0,51 +BRDA:17,1,0,1542 +BRDA:17,1,1,259 +BRDA:17,1,2,1541 +BRDA:17,1,3,1482 +BRDA:17,1,4,1477 +BRDA:19,2,0,758 +BRDA:19,2,1,783 +BRDA:20,3,0,736 +BRDA:20,3,1,746 +BRDA:24,4,0,259 +BRDA:24,4,1,1283 +BRDA:42,5,0,48 BRDA:42,5,1,3 BRDA:45,6,0,20 -BRDA:45,6,1,34 +BRDA:45,6,1,31 BRDA:71,7,0,1 -BRDA:71,7,1,264 -BRDA:67,8,0,265 +BRDA:71,7,1,258 +BRDA:67,8,0,259 BRDA:67,8,1,1 BRDA:67,8,2,1 BRDA:67,8,3,1 @@ -3257,23 +3257,23 @@ FN:60,ptToPx FN:64,pxToPt FNF:4 FNH:4 -FNDA:97,parseValueWithUnit +FNDA:95,parseValueWithUnit FNDA:8,getFontSize FNDA:39,ptToPx FNDA:23,pxToPt DA:1,1 DA:3,1 DA:11,1 -DA:12,105 -DA:14,171 -DA:16,97 -DA:17,97 -DA:19,97 -DA:20,83 -DA:21,83 -DA:23,83 -DA:25,36 -DA:26,36 +DA:12,103 +DA:14,167 +DA:16,95 +DA:17,95 +DA:19,95 +DA:20,81 +DA:21,81 +DA:23,81 +DA:25,34 +DA:26,34 DA:28,31 DA:29,31 DA:31,4 @@ -3283,9 +3283,9 @@ DA:35,4 DA:37,4 DA:38,4 DA:41,4 -DA:45,97 +DA:45,95 DA:46,23 -DA:49,97 +DA:49,95 DA:53,8 DA:54,8 DA:55,8 @@ -3295,12 +3295,12 @@ DA:65,23 LF:31 LH:31 BRDA:12,0,0,8 -BRDA:12,0,1,89 -BRDA:14,1,0,74 +BRDA:12,0,1,87 +BRDA:14,1,0,72 BRDA:14,1,1,23 -BRDA:19,2,0,83 +BRDA:19,2,0,81 BRDA:19,2,1,14 -BRDA:24,3,0,36 +BRDA:24,3,0,34 BRDA:24,3,1,31 BRDA:24,3,2,4 BRDA:24,3,3,4 @@ -3313,9 +3313,9 @@ BRDA:34,5,1,0 BRDA:37,6,0,4 BRDA:37,6,1,0 BRDA:45,7,0,23 -BRDA:45,7,1,74 -BRDA:45,8,0,97 -BRDA:45,8,1,69 +BRDA:45,7,1,72 +BRDA:45,8,0,95 +BRDA:45,8,1,67 BRF:22 BRH:19 end_of_record @@ -3324,16 +3324,16 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/setPara FN:7,setParagraphNotImplicit FNF:1 FNH:1 -FNDA:129,setParagraphNotImplicit +FNDA:128,setParagraphNotImplicit DA:7,1 -DA:8,129 -DA:9,48 +DA:8,128 +DA:9,47 LF:3 LH:3 -BRDA:8,0,0,48 +BRDA:8,0,0,47 BRDA:8,0,1,81 -BRDA:8,1,0,129 -BRDA:8,1,1,127 +BRDA:8,1,0,128 +BRDA:8,1,1,126 BRF:4 BRH:4 end_of_record @@ -3342,9 +3342,9 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addBlo FN:8,addBlock FNF:1 FNH:1 -FNDA:822,addBlock +FNDA:808,addBlock DA:8,1 -DA:9,822 +DA:9,808 LF:2 LH:2 BRF:0 @@ -3357,24 +3357,24 @@ FN:25,addCode FN:36,addDecorators FNF:3 FNH:3 -FNDA:420,addLink -FNDA:400,addCode -FNDA:391,addDecorators +FNDA:412,addLink +FNDA:392,addCode +FNDA:383,addDecorators DA:11,1 -DA:12,420 +DA:12,412 DA:13,52 DA:25,1 -DA:26,400 +DA:26,392 DA:27,13 DA:36,1 -DA:37,391 -DA:38,391 +DA:37,383 +DA:38,383 LF:9 LH:9 BRDA:12,0,0,52 -BRDA:12,0,1,368 +BRDA:12,0,1,360 BRDA:26,1,0,13 -BRDA:26,1,1,387 +BRDA:26,1,1,379 BRF:4 BRH:4 end_of_record @@ -3383,39 +3383,39 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addSeg FN:16,addSegment FNF:1 FNH:1 -FNDA:528,addSegment +FNDA:517,addSegment DA:1,1 DA:2,1 DA:16,1 -DA:21,528 -DA:24,528 -DA:25,200 -DA:27,328 -DA:28,328 -DA:31,528 -DA:33,528 -DA:34,71 -DA:35,60 -DA:38,457 +DA:21,517 +DA:24,517 +DA:25,193 +DA:27,324 +DA:28,324 +DA:31,517 +DA:33,517 +DA:34,67 +DA:35,56 +DA:38,450 DA:39,9 -DA:42,457 +DA:42,450 LF:15 LH:15 -BRDA:24,0,0,200 -BRDA:24,0,1,328 -BRDA:24,1,0,324 -BRDA:24,1,1,204 -BRDA:24,2,0,528 -BRDA:24,2,1,528 -BRDA:33,3,0,71 -BRDA:33,3,1,457 -BRDA:34,4,0,60 +BRDA:24,0,0,193 +BRDA:24,0,1,324 +BRDA:24,1,0,320 +BRDA:24,1,1,197 +BRDA:24,2,0,517 +BRDA:24,2,1,517 +BRDA:33,3,0,67 +BRDA:33,3,1,450 +BRDA:34,4,0,56 BRDA:34,4,1,11 -BRDA:34,5,0,71 -BRDA:34,5,1,22 +BRDA:34,5,0,67 +BRDA:34,5,1,21 BRDA:38,6,0,9 -BRDA:38,6,1,448 -BRDA:38,7,0,457 +BRDA:38,6,1,441 +BRDA:38,7,0,450 BRDA:38,7,1,72 BRDA:38,8,0,49 BRDA:38,8,1,23 @@ -3436,20 +3436,20 @@ FN:90,isBlock FN:96,isBlockGroup FNF:8 FNH:8 -FNDA:936,isBlockEmpty -FNDA:68,(anonymous_1) +FNDA:916,isBlockEmpty +FNDA:65,(anonymous_1) FNDA:185,isBlockGroupEmpty -FNDA:470,isSegmentEmpty +FNDA:453,isSegmentEmpty FNDA:23,isEmpty FNDA:6,isSegment FNDA:13,isBlock FNDA:23,isBlockGroup DA:10,1 -DA:11,936 -DA:13,709 -DA:16,68 +DA:11,916 +DA:13,693 +DA:16,65 DA:19,157 -DA:22,2 +DA:22,1 DA:25,1 DA:32,1 DA:33,185 @@ -3458,10 +3458,10 @@ DA:39,134 DA:44,12 DA:47,0 DA:54,1 -DA:55,470 -DA:57,363 -DA:60,10 -DA:63,97 +DA:55,453 +DA:57,359 +DA:60,7 +DA:63,87 DA:70,1 DA:73,23 DA:74,10 @@ -3475,10 +3475,10 @@ DA:93,13 DA:99,23 LF:29 LH:27 -BRDA:12,0,0,709 -BRDA:12,0,1,67 +BRDA:12,0,0,693 +BRDA:12,0,1,64 BRDA:12,0,2,157 -BRDA:12,0,3,2 +BRDA:12,0,3,1 BRDA:12,0,4,1 BRDA:34,1,0,39 BRDA:34,1,1,134 @@ -3488,9 +3488,9 @@ BRDA:34,1,4,12 BRDA:34,1,5,0 BRDA:36,2,0,15 BRDA:36,2,1,24 -BRDA:56,3,0,363 -BRDA:56,3,1,10 -BRDA:56,3,2,97 +BRDA:56,3,0,359 +BRDA:56,3,1,7 +BRDA:56,3,2,87 BRDA:73,4,0,10 BRDA:73,4,1,13 BRDA:75,5,0,7 @@ -3520,15 +3520,15 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isWhit FN:10,isWhiteSpacePreserved FNF:1 FNH:1 -FNDA:623,isWhiteSpacePreserved +FNDA:607,isWhiteSpacePreserved DA:4,1 DA:10,1 -DA:11,623 +DA:11,607 LF:3 LH:3 -BRDA:12,0,0,623 -BRDA:12,0,1,42 -BRDA:12,0,2,600 +BRDA:12,0,0,607 +BRDA:12,0,1,38 +BRDA:12,0,2,584 BRF:3 BRH:3 end_of_record @@ -3537,41 +3537,41 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normal FN:15,normalizeContentModel FNF:1 FNH:1 -FNDA:419,normalizeContentModel +FNDA:407,normalizeContentModel DA:2,1 DA:3,1 DA:4,1 DA:15,1 -DA:16,419 -DA:17,737 -DA:19,737 +DA:16,407 +DA:17,718 +DA:19,718 DA:21,157 DA:22,2 DA:23,2 DA:25,155 DA:27,157 -DA:29,554 -DA:30,554 -DA:32,24 -DA:33,35 -DA:34,74 -DA:35,74 -DA:39,24 -DA:42,737 -DA:43,205 +DA:29,538 +DA:30,538 +DA:32,22 +DA:33,33 +DA:34,70 +DA:35,70 +DA:39,22 +DA:42,718 +DA:43,200 LF:21 LH:21 BRDA:20,0,0,157 -BRDA:20,0,1,554 -BRDA:20,0,2,24 +BRDA:20,0,1,538 +BRDA:20,0,2,22 BRDA:21,1,0,2 BRDA:21,1,1,155 BRDA:21,2,0,157 BRDA:21,2,1,132 -BRDA:34,3,0,74 +BRDA:34,3,0,70 BRDA:34,3,1,0 -BRDA:42,4,0,205 -BRDA:42,4,1,532 +BRDA:42,4,0,200 +BRDA:42,4,1,518 BRF:11 BRH:10 end_of_record @@ -3582,53 +3582,53 @@ FN:23,(anonymous_1) FN:43,removeEmptySegments FNF:3 FNH:3 -FNDA:554,normalizeParagraph -FNDA:31,(anonymous_1) -FNDA:554,removeEmptySegments +FNDA:538,normalizeParagraph +FNDA:20,(anonymous_1) +FNDA:538,removeEmptySegments DA:2,1 DA:3,1 DA:4,1 DA:5,1 DA:10,1 -DA:11,554 -DA:13,554 -DA:14,180 -DA:15,180 -DA:17,180 +DA:11,538 +DA:13,538 +DA:14,174 +DA:15,174 +DA:17,174 DA:21,11 -DA:22,169 -DA:23,31 -DA:27,14 -DA:31,4 -DA:36,554 -DA:37,537 -DA:40,554 -DA:44,554 -DA:45,464 +DA:22,163 +DA:23,20 +DA:27,9 +DA:31,3 +DA:36,538 +DA:37,521 +DA:40,538 +DA:44,538 +DA:45,447 DA:46,6 LF:21 LH:21 -BRDA:13,0,0,180 -BRDA:13,0,1,374 -BRDA:13,1,0,554 -BRDA:13,1,1,230 +BRDA:13,0,0,174 +BRDA:13,0,1,364 +BRDA:13,1,0,538 +BRDA:13,1,1,223 BRDA:17,2,0,11 -BRDA:17,2,1,169 -BRDA:18,3,0,180 -BRDA:18,3,1,29 -BRDA:18,3,2,19 -BRDA:22,4,0,14 -BRDA:22,4,1,155 -BRDA:22,5,0,169 -BRDA:22,5,1,58 -BRDA:27,6,0,4 -BRDA:27,6,1,10 -BRDA:28,7,0,14 -BRDA:28,7,1,6 -BRDA:36,8,0,537 +BRDA:17,2,1,163 +BRDA:18,3,0,174 +BRDA:18,3,1,28 +BRDA:18,3,2,18 +BRDA:22,4,0,9 +BRDA:22,4,1,154 +BRDA:22,5,0,163 +BRDA:22,5,1,52 +BRDA:27,6,0,3 +BRDA:27,6,1,6 +BRDA:28,7,0,9 +BRDA:28,7,1,5 +BRDA:36,8,0,521 BRDA:36,8,1,17 BRDA:45,9,0,6 -BRDA:45,9,1,458 +BRDA:45,9,1,441 BRF:21 BRH:21 end_of_record @@ -3645,26 +3645,26 @@ FN:131,(anonymous_7) FN:148,normalizeLastTextSegment FNF:9 FNH:9 -FNDA:537,normalizeAllSegments -FNDA:447,(anonymous_1) +FNDA:521,normalizeAllSegments +FNDA:430,(anonymous_1) FNDA:14,normalizeSingleSegment FNDA:8,createNormalizeSegmentContext -FNDA:590,resetNormalizeSegmentContext -FNDA:469,normalizeSegment -FNDA:568,normalizeTextSegments -FNDA:343,(anonymous_7) -FNDA:568,normalizeLastTextSegment +FNDA:570,resetNormalizeSegmentContext +FNDA:452,normalizeSegment +FNDA:548,normalizeTextSegments +FNDA:339,(anonymous_7) +FNDA:548,normalizeLastTextSegment DA:1,1 DA:8,1 DA:9,1 DA:10,1 DA:11,1 DA:16,1 -DA:17,537 -DA:19,537 -DA:20,447 -DA:23,537 -DA:24,537 +DA:17,521 +DA:19,521 +DA:20,430 +DA:23,521 +DA:24,521 DA:32,1 DA:34,28 DA:36,14 @@ -3672,74 +3672,74 @@ DA:38,14 DA:39,14 DA:56,1 DA:57,8 -DA:63,590 +DA:63,570 DA:75,1 -DA:76,469 -DA:78,31 -DA:79,31 -DA:82,31 -DA:83,31 -DA:91,12 -DA:92,12 -DA:93,12 -DA:96,362 -DA:97,362 -DA:98,362 -DA:100,362 -DA:101,362 -DA:103,362 -DA:104,355 +DA:76,452 +DA:78,27 +DA:79,27 +DA:82,27 +DA:83,27 +DA:91,9 +DA:92,9 +DA:93,9 +DA:96,358 +DA:97,358 +DA:98,358 +DA:100,358 +DA:101,358 +DA:103,358 +DA:104,351 DA:106,37 -DA:112,355 +DA:112,351 DA:114,44 -DA:121,362 -DA:123,362 -DA:131,568 -DA:134,343 +DA:121,358 +DA:123,358 +DA:131,548 +DA:134,339 DA:135,39 DA:137,39 DA:142,3 -DA:152,568 +DA:152,548 DA:154,30 LF:47 LH:47 BRDA:34,0,0,14 BRDA:34,0,1,0 -BRDA:63,1,0,31 -BRDA:63,1,1,559 -BRDA:63,2,0,590 -BRDA:63,2,1,590 -BRDA:77,3,0,31 +BRDA:63,1,0,27 +BRDA:63,1,1,543 +BRDA:63,2,0,570 +BRDA:63,2,1,570 +BRDA:77,3,0,27 BRDA:77,3,1,0 BRDA:77,3,2,1 -BRDA:77,3,3,12 -BRDA:77,3,4,362 -BRDA:103,4,0,355 +BRDA:77,3,3,9 +BRDA:77,3,4,358 +BRDA:103,4,0,351 BRDA:103,4,1,7 BRDA:104,5,0,37 -BRDA:104,5,1,318 +BRDA:104,5,1,314 BRDA:108,6,0,33 BRDA:108,6,1,4 BRDA:112,7,0,44 -BRDA:112,7,1,311 +BRDA:112,7,1,307 BRDA:116,8,0,38 BRDA:116,8,1,6 BRDA:134,9,0,39 -BRDA:134,9,1,304 +BRDA:134,9,1,300 BRDA:137,10,0,3 BRDA:137,10,1,36 BRDA:138,11,0,39 BRDA:138,11,1,4 BRDA:138,11,2,4 BRDA:152,12,0,30 -BRDA:152,12,1,538 -BRDA:152,13,0,568 -BRDA:152,13,1,304 -BRDA:152,13,2,304 +BRDA:152,12,1,518 +BRDA:152,13,0,548 +BRDA:152,13,1,300 +BRDA:152,13,2,300 BRDA:152,14,0,0 -BRDA:152,14,1,304 -BRDA:152,15,0,304 -BRDA:152,15,1,304 +BRDA:152,14,1,300 +BRDA:152,15,0,300 +BRDA:152,15,1,300 BRF:37 BRH:34 end_of_record @@ -3779,12 +3779,12 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:7,createBr FNF:1 FNH:1 -FNDA:72,createBr +FNDA:69,createBr DA:7,1 -DA:8,72 +DA:8,69 LF:2 LH:2 -BRDA:10,0,0,26 +BRDA:10,0,0,23 BRDA:10,0,1,46 BRF:2 BRH:2 @@ -3794,16 +3794,16 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:7,createContentModelDocument FNF:1 FNH:1 -FNDA:813,createContentModelDocument +FNDA:807,createContentModelDocument DA:7,1 -DA:10,813 -DA:15,813 -DA:16,29 -DA:19,813 +DA:10,807 +DA:15,807 +DA:16,25 +DA:19,807 LF:5 LH:5 -BRDA:15,0,0,29 -BRDA:15,0,1,784 +BRDA:15,0,0,25 +BRDA:15,0,1,782 BRF:2 BRH:2 end_of_record @@ -3827,12 +3827,12 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:11,createEntity FNF:1 FNH:1 -FNDA:26,createEntity +FNDA:25,createEntity DA:11,1 -DA:18,26 +DA:18,25 LF:2 LH:2 -BRDA:22,0,0,26 +BRDA:22,0,0,25 BRDA:22,0,1,15 BRF:2 BRH:2 @@ -3842,12 +3842,12 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:11,createFormatContainer FNF:1 FNH:1 -FNDA:117,createFormatContainer +FNDA:116,createFormatContainer DA:11,1 -DA:15,117 +DA:15,116 LF:2 LH:2 -BRDA:20,0,0,117 +BRDA:20,0,0,116 BRDA:20,0,1,46 BRF:2 BRH:2 @@ -3885,12 +3885,12 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:8,createImage FNF:1 FNH:1 -FNDA:59,createImage +FNDA:57,createImage DA:8,1 -DA:9,59 +DA:9,57 LF:2 LH:2 -BRDA:12,0,0,17 +BRDA:12,0,0,15 BRDA:12,0,1,42 BRF:2 BRH:2 @@ -3901,15 +3901,15 @@ FN:13,createListItem FN:21,(anonymous_1) FNF:2 FNH:2 -FNDA:297,createListItem -FNDA:363,(anonymous_1) +FNDA:294,createListItem +FNDA:358,(anonymous_1) DA:1,1 DA:13,1 -DA:17,297 -DA:21,363 +DA:17,294 +DA:21,358 LF:4 LH:4 -BRDA:21,0,0,297 +BRDA:21,0,0,294 BRDA:21,0,1,0 BRF:2 BRH:1 @@ -3919,28 +3919,28 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:15,createParagraph FNF:1 FNH:1 -FNDA:1411,createParagraph +FNDA:1397,createParagraph DA:15,1 -DA:21,1411 -DA:27,1411 -DA:28,41 -DA:31,1411 -DA:32,688 -DA:35,1411 +DA:21,1397 +DA:27,1397 +DA:28,39 +DA:31,1397 +DA:32,678 +DA:35,1397 DA:36,63 -DA:42,1411 +DA:42,1397 LF:9 LH:9 -BRDA:24,0,0,682 -BRDA:24,0,1,729 -BRDA:27,1,0,41 -BRDA:27,1,1,1370 -BRDA:27,2,0,1411 -BRDA:27,2,1,170 -BRDA:31,3,0,688 -BRDA:31,3,1,723 +BRDA:24,0,0,671 +BRDA:24,0,1,726 +BRDA:27,1,0,39 +BRDA:27,1,1,1358 +BRDA:27,2,0,1397 +BRDA:27,2,1,165 +BRDA:31,3,0,678 +BRDA:31,3,1,719 BRDA:35,4,0,63 -BRDA:35,4,1,1348 +BRDA:35,4,1,1334 BRF:10 BRH:10 end_of_record @@ -3964,13 +3964,13 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:10,createSelectionMarker FNF:1 FNH:1 -FNDA:549,createSelectionMarker +FNDA:542,createSelectionMarker DA:10,1 -DA:13,549 +DA:13,542 LF:2 LH:2 -BRDA:16,0,0,274 -BRDA:16,0,1,275 +BRDA:16,0,0,270 +BRDA:16,0,1,272 BRF:2 BRH:2 end_of_record @@ -3979,15 +3979,15 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:12,createTable FNF:1 FNH:1 -FNDA:236,createTable +FNDA:235,createTable DA:12,1 -DA:13,236 -DA:15,236 -DA:16,370 -DA:23,236 +DA:13,235 +DA:15,235 +DA:16,369 +DA:23,235 LF:5 LH:5 -BRDA:26,0,0,236 +BRDA:26,0,0,235 BRDA:26,0,1,190 BRF:2 BRH:2 @@ -3997,18 +3997,18 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:10,createTableCell FNF:1 FNH:1 -FNDA:857,createTableCell +FNDA:855,createTableCell DA:10,1 -DA:17,857 -DA:19,857 -DA:20,857 +DA:17,855 +DA:19,855 +DA:20,855 LF:4 LH:4 BRDA:17,0,0,138 -BRDA:17,0,1,719 +BRDA:17,0,1,717 BRDA:19,1,0,138 -BRDA:19,1,1,719 -BRDA:23,2,0,481 +BRDA:19,1,1,717 +BRDA:23,2,0,479 BRDA:23,2,1,376 BRF:6 BRH:6 @@ -4018,12 +4018,12 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/crea FN:8,createText FNF:1 FNH:1 -FNDA:931,createText +FNDA:929,createText DA:8,1 -DA:9,931 +DA:9,929 LF:2 LH:2 -BRDA:12,0,0,419 +BRDA:12,0,0,417 BRDA:12,0,1,512 BRF:2 BRH:2 @@ -4035,104 +4035,104 @@ FN:50,extractSelectionRange FN:94,calcPosition FNF:3 FNH:3 -FNDA:101,contentModelToDom -FNDA:101,extractSelectionRange -FNDA:12,calcPosition +FNDA:99,contentModelToDom +FNDA:99,extractSelectionRange +FNDA:8,calcPosition DA:1,1 DA:2,1 DA:3,1 DA:32,1 -DA:39,101 -DA:41,101 -DA:43,101 -DA:45,101 -DA:47,101 -DA:52,101 -DA:55,303 -DA:60,101 +DA:39,99 +DA:41,99 +DA:43,99 +DA:45,99 +DA:47,99 +DA:52,99 +DA:55,297 +DA:60,99 DA:61,0 -DA:67,101 -DA:71,6 -DA:73,6 +DA:67,99 +DA:71,4 +DA:73,4 DA:78,95 DA:79,0 DA:90,95 -DA:97,12 -DA:98,12 +DA:97,8 +DA:98,8 DA:99,0 -DA:100,12 -DA:101,10 -DA:103,2 -DA:112,12 +DA:100,8 +DA:101,8 +DA:103,0 +DA:112,8 DA:113,0 -DA:116,12 +DA:116,8 LF:28 -LH:24 +LH:23 BRDA:60,0,0,0 -BRDA:60,0,1,101 -BRDA:60,1,0,101 +BRDA:60,0,1,99 +BRDA:60,1,0,99 BRDA:60,1,1,0 -BRDA:60,2,0,101 -BRDA:60,2,1,101 -BRDA:67,3,0,6 +BRDA:60,2,0,99 +BRDA:60,2,1,99 +BRDA:67,3,0,4 BRDA:67,3,1,95 -BRDA:68,4,0,101 -BRDA:68,4,1,6 -BRDA:68,5,0,101 -BRDA:68,5,1,6 -BRDA:69,6,0,6 -BRDA:69,6,1,6 +BRDA:68,4,0,99 +BRDA:68,4,1,4 +BRDA:68,5,0,99 +BRDA:68,5,1,4 +BRDA:69,6,0,4 +BRDA:69,6,1,4 BRDA:78,7,0,0 BRDA:78,7,1,95 BRDA:78,8,0,95 BRDA:78,8,1,0 BRDA:78,9,0,95 BRDA:78,9,1,95 -BRDA:97,10,0,12 +BRDA:97,10,0,8 BRDA:97,10,1,0 BRDA:98,11,0,0 -BRDA:98,11,1,12 -BRDA:100,12,0,10 -BRDA:100,12,1,2 -BRDA:101,13,0,10 -BRDA:101,13,1,6 +BRDA:98,11,1,8 +BRDA:100,12,0,8 +BRDA:100,12,1,0 +BRDA:101,13,0,8 +BRDA:101,13,1,4 BRDA:101,14,0,0 -BRDA:101,14,1,10 -BRDA:101,15,0,10 -BRDA:101,15,1,10 +BRDA:101,14,1,8 +BRDA:101,15,0,8 +BRDA:101,15,1,8 BRDA:112,16,0,0 -BRDA:112,16,1,12 +BRDA:112,16,1,8 BRDA:112,17,0,0 -BRDA:112,17,1,12 -BRDA:112,18,0,12 -BRDA:112,18,1,12 +BRDA:112,17,1,8 +BRDA:112,18,0,8 +BRDA:112,18,1,8 BRDA:113,19,0,0 BRDA:113,19,1,0 BRDA:113,20,0,0 BRDA:113,20,1,0 BRF:42 -BRH:29 +BRH:28 end_of_record TN: SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/createModelToDomContext.ts FN:14,createModelToDomContext FNF:1 FNH:1 -FNDA:410,createModelToDomContext +FNDA:403,createModelToDomContext DA:1,1 DA:2,1 DA:4,1 DA:14,1 -DA:18,410 -DA:20,410 +DA:18,403 +DA:20,403 LF:6 LH:6 -BRDA:18,0,0,410 -BRDA:18,0,1,250 -BRDA:40,1,0,410 -BRDA:40,1,1,334 -BRDA:44,2,0,410 -BRDA:44,2,1,409 +BRDA:18,0,0,403 +BRDA:18,0,1,246 +BRDA:40,1,0,403 +BRDA:40,1,1,328 +BRDA:44,2,0,403 +BRDA:44,2,1,402 BRF:6 BRH:6 end_of_record @@ -4166,14 +4166,14 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/ha FN:10,(anonymous_0) FNF:1 FNH:1 -FNDA:425,(anonymous_0) +FNDA:420,(anonymous_0) DA:10,1 -DA:17,425 -DA:19,425 -DA:21,14 -DA:22,14 -DA:24,256 -DA:25,256 +DA:17,420 +DA:19,420 +DA:21,13 +DA:22,13 +DA:24,252 +DA:25,252 DA:27,3 DA:28,3 DA:30,2 @@ -4186,11 +4186,11 @@ DA:40,18 DA:43,117 DA:44,117 DA:47,150 -DA:50,425 +DA:50,420 LF:20 LH:20 -BRDA:20,0,0,14 -BRDA:20,0,1,256 +BRDA:20,0,0,13 +BRDA:20,0,1,252 BRDA:20,0,2,3 BRDA:20,0,3,2 BRDA:20,0,4,150 @@ -4206,33 +4206,33 @@ FN:10,(anonymous_0) FN:21,(anonymous_1) FNF:2 FNH:2 -FNDA:322,(anonymous_0) -FNDA:411,(anonymous_1) +FNDA:318,(anonymous_0) +FNDA:406,(anonymous_1) DA:10,1 -DA:16,322 -DA:17,322 -DA:18,322 -DA:20,322 -DA:21,322 -DA:26,411 -DA:31,330 -DA:34,411 -DA:38,322 -DA:39,8 -DA:41,8 -DA:42,8 -DA:45,322 +DA:16,318 +DA:17,318 +DA:18,318 +DA:20,318 +DA:21,318 +DA:26,406 +DA:31,325 +DA:34,406 +DA:38,318 +DA:39,6 +DA:41,6 +DA:42,6 +DA:45,318 LF:14 LH:14 -BRDA:26,0,0,330 +BRDA:26,0,0,325 BRDA:26,0,1,81 -BRDA:27,1,0,411 -BRDA:27,1,1,138 +BRDA:27,1,0,406 +BRDA:27,1,1,137 BRDA:27,1,2,93 BRDA:41,2,0,0 -BRDA:41,2,1,8 -BRDA:41,3,0,8 -BRDA:41,3,1,8 +BRDA:41,2,1,6 +BRDA:41,3,0,6 +BRDA:41,3,1,6 BRF:9 BRH:8 end_of_record @@ -4241,14 +4241,14 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/ha FN:11,(anonymous_0) FNF:1 FNH:1 -FNDA:9,(anonymous_0) +FNDA:8,(anonymous_0) DA:1,1 DA:11,1 -DA:17,9 -DA:18,9 -DA:19,9 -DA:20,9 -DA:22,9 +DA:17,8 +DA:18,8 +DA:19,8 +DA:20,8 +DA:22,8 LF:7 LH:7 BRF:0 @@ -4433,48 +4433,48 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/ha FN:13,(anonymous_0) FNF:1 FNH:1 -FNDA:11,(anonymous_0) +FNDA:9,(anonymous_0) DA:1,1 DA:2,1 DA:3,1 DA:13,1 -DA:19,11 -DA:20,11 -DA:22,11 -DA:23,11 -DA:25,11 -DA:27,11 +DA:19,9 +DA:20,9 +DA:22,9 +DA:23,9 +DA:25,9 +DA:27,9 DA:28,2 -DA:31,11 +DA:31,9 DA:32,1 -DA:35,11 -DA:36,11 -DA:38,11 -DA:39,11 -DA:40,11 -DA:42,11 -DA:43,2 -DA:46,11 -DA:47,2 -DA:50,11 +DA:35,9 +DA:36,9 +DA:38,9 +DA:39,9 +DA:40,9 +DA:42,9 +DA:43,1 +DA:46,9 +DA:47,1 +DA:50,9 DA:51,1 -DA:56,11 +DA:56,9 LF:25 LH:25 BRDA:27,0,0,2 -BRDA:27,0,1,9 +BRDA:27,0,1,7 BRDA:31,1,0,1 -BRDA:31,1,1,10 -BRDA:39,2,0,2 -BRDA:39,2,1,9 -BRDA:40,3,0,2 -BRDA:40,3,1,9 -BRDA:42,4,0,2 -BRDA:42,4,1,9 -BRDA:46,5,0,2 -BRDA:46,5,1,9 +BRDA:31,1,1,8 +BRDA:39,2,0,1 +BRDA:39,2,1,8 +BRDA:40,3,0,1 +BRDA:40,3,1,8 +BRDA:42,4,0,1 +BRDA:42,4,1,8 +BRDA:46,5,0,1 +BRDA:46,5,1,8 BRDA:50,6,0,1 -BRDA:50,6,1,10 +BRDA:50,6,1,8 BRF:14 BRH:14 end_of_record @@ -4485,61 +4485,61 @@ FN:68,handleMetadata FN:75,(anonymous_2) FNF:3 FNH:3 -FNDA:152,(anonymous_0) -FNDA:115,handleMetadata -FNDA:115,(anonymous_2) +FNDA:149,(anonymous_0) +FNDA:111,handleMetadata +FNDA:111,(anonymous_2) DA:1,1 DA:2,1 DA:14,1 -DA:21,152 -DA:22,152 -DA:24,152 +DA:21,149 +DA:22,149 +DA:24,149 DA:25,62 -DA:31,152 -DA:32,123 -DA:33,123 -DA:35,123 -DA:41,14 -DA:46,152 -DA:49,152 -DA:50,115 -DA:51,115 -DA:52,115 -DA:54,115 -DA:56,115 -DA:58,115 -DA:60,115 -DA:62,115 -DA:65,152 -DA:73,115 -DA:75,115 -DA:76,115 -DA:83,115 +DA:31,149 +DA:32,120 +DA:33,120 +DA:35,120 +DA:41,12 +DA:46,149 +DA:49,149 +DA:50,111 +DA:51,111 +DA:52,111 +DA:54,111 +DA:56,111 +DA:58,111 +DA:60,111 +DA:62,111 +DA:65,149 +DA:73,111 +DA:75,111 +DA:76,111 +DA:83,111 LF:27 LH:27 BRDA:24,0,0,62 -BRDA:24,0,1,90 -BRDA:31,1,0,261 -BRDA:31,1,1,214 -BRDA:35,2,0,14 -BRDA:35,2,1,109 -BRDA:36,3,0,123 -BRDA:36,3,1,116 -BRDA:36,3,2,114 -BRDA:36,3,3,112 -BRDA:36,3,4,30 -BRDA:51,4,0,115 +BRDA:24,0,1,87 +BRDA:31,1,0,257 +BRDA:31,1,1,210 +BRDA:35,2,0,12 +BRDA:35,2,1,108 +BRDA:36,3,0,120 +BRDA:36,3,1,113 +BRDA:36,3,2,112 +BRDA:36,3,3,111 +BRDA:36,3,4,29 +BRDA:51,4,0,111 BRDA:51,4,1,0 -BRDA:54,5,0,69 -BRDA:54,5,1,46 -BRDA:62,6,0,112 +BRDA:54,5,0,67 +BRDA:54,5,1,44 +BRDA:62,6,0,108 BRDA:62,6,1,3 -BRDA:62,7,0,115 -BRDA:62,7,1,115 -BRDA:77,8,0,9 -BRDA:77,8,1,106 -BRDA:76,9,0,115 -BRDA:76,9,1,108 +BRDA:62,7,0,111 +BRDA:62,7,1,111 +BRDA:77,8,0,6 +BRDA:77,8,1,105 +BRDA:76,9,0,111 +BRDA:76,9,1,106 BRF:23 BRH:22 end_of_record @@ -4609,11 +4609,11 @@ FN:51,(anonymous_3) FN:73,(anonymous_4) FNF:5 FNH:5 -FNDA:272,(anonymous_0) -FNDA:265,(anonymous_1) -FNDA:12,(anonymous_2) -FNDA:265,(anonymous_3) -FNDA:277,(anonymous_4) +FNDA:268,(anonymous_0) +FNDA:261,(anonymous_1) +FNDA:10,(anonymous_2) +FNDA:261,(anonymous_3) +FNDA:271,(anonymous_4) DA:1,1 DA:2,1 DA:3,1 @@ -4621,86 +4621,86 @@ DA:4,1 DA:5,1 DA:12,1 DA:17,1 -DA:24,272 -DA:26,272 +DA:24,268 +DA:26,268 DA:27,7 -DA:29,265 -DA:31,265 -DA:34,12 -DA:35,265 -DA:42,265 -DA:44,265 -DA:46,265 -DA:51,265 -DA:52,265 -DA:54,265 -DA:55,265 -DA:57,265 -DA:61,4 -DA:73,265 -DA:74,277 -DA:79,265 -DA:80,120 -DA:82,120 -DA:83,120 -DA:84,120 +DA:29,261 +DA:31,261 +DA:34,10 +DA:35,261 +DA:42,261 +DA:44,261 +DA:46,261 +DA:51,261 +DA:52,261 +DA:54,261 +DA:55,261 +DA:57,261 +DA:61,3 +DA:73,261 +DA:74,271 +DA:79,261 +DA:80,116 +DA:82,116 +DA:83,116 +DA:84,116 DA:91,145 -DA:94,265 -DA:102,265 -DA:104,265 -DA:105,120 +DA:94,261 +DA:102,261 +DA:104,261 +DA:105,116 DA:107,145 -DA:112,272 -DA:113,272 -DA:116,272 +DA:112,268 +DA:113,268 +DA:116,268 LF:39 LH:39 BRDA:26,0,0,7 -BRDA:26,0,1,265 -BRDA:29,1,0,265 -BRDA:29,1,1,208 -BRDA:29,2,0,208 +BRDA:26,0,1,261 +BRDA:29,1,0,261 +BRDA:29,1,1,204 +BRDA:29,2,0,204 BRDA:29,2,1,57 -BRDA:29,3,0,265 -BRDA:29,3,1,265 -BRDA:31,4,0,265 -BRDA:31,4,1,158 -BRDA:31,4,2,157 -BRDA:31,4,3,12 -BRDA:36,5,0,120 +BRDA:29,3,0,261 +BRDA:29,3,1,261 +BRDA:31,4,0,261 +BRDA:31,4,1,156 +BRDA:31,4,2,155 +BRDA:31,4,3,10 +BRDA:36,5,0,116 BRDA:36,5,1,145 -BRDA:37,6,0,120 -BRDA:37,6,1,63 -BRDA:37,7,0,63 +BRDA:37,6,0,116 +BRDA:37,6,1,59 +BRDA:37,7,0,59 BRDA:37,7,1,57 -BRDA:37,8,0,120 -BRDA:37,8,1,120 -BRDA:42,9,0,265 -BRDA:42,9,1,208 -BRDA:42,10,0,208 +BRDA:37,8,0,116 +BRDA:37,8,1,116 +BRDA:42,9,0,261 +BRDA:42,9,1,204 +BRDA:42,10,0,204 BRDA:42,10,1,57 -BRDA:42,11,0,265 -BRDA:42,11,1,265 -BRDA:47,12,0,120 +BRDA:42,11,0,261 +BRDA:42,11,1,261 +BRDA:47,12,0,116 BRDA:47,12,1,145 -BRDA:54,13,0,265 +BRDA:54,13,0,261 BRDA:54,13,1,0 -BRDA:57,14,0,4 -BRDA:57,14,1,261 +BRDA:57,14,0,3 +BRDA:57,14,1,258 BRDA:57,15,0,5 -BRDA:57,15,1,260 -BRDA:57,16,0,265 -BRDA:57,16,1,265 -BRDA:79,17,0,120 +BRDA:57,15,1,256 +BRDA:57,16,0,261 +BRDA:57,16,1,261 +BRDA:79,17,0,116 BRDA:79,17,1,145 -BRDA:104,18,0,120 +BRDA:104,18,0,116 BRDA:104,18,1,145 -BRDA:112,19,0,272 +BRDA:112,19,0,268 BRDA:112,19,1,0 -BRDA:113,20,0,269 +BRDA:113,20,0,265 BRDA:113,20,1,3 -BRDA:113,21,0,272 -BRDA:113,21,1,272 +BRDA:113,21,0,268 +BRDA:113,21,1,268 BRF:46 BRH:44 end_of_record @@ -4709,39 +4709,39 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/ha FN:10,(anonymous_0) FNF:1 FNH:1 -FNDA:276,(anonymous_0) +FNDA:270,(anonymous_0) DA:10,1 -DA:16,276 -DA:19,276 -DA:20,7 -DA:25,276 -DA:27,256 -DA:28,256 -DA:31,7 -DA:32,7 -DA:35,3 -DA:36,3 +DA:16,270 +DA:19,270 +DA:20,5 +DA:25,270 +DA:27,254 +DA:28,254 +DA:31,6 +DA:32,6 +DA:35,2 +DA:36,2 DA:39,1 DA:40,1 DA:43,2 DA:44,2 -DA:49,276 -DA:50,7 +DA:49,270 +DA:50,5 LF:17 LH:17 -BRDA:19,0,0,7 -BRDA:19,0,1,269 -BRDA:19,1,0,276 -BRDA:19,1,1,7 -BRDA:26,2,0,256 -BRDA:26,2,1,7 -BRDA:26,2,2,3 +BRDA:19,0,0,5 +BRDA:19,0,1,265 +BRDA:19,1,0,270 +BRDA:19,1,1,5 +BRDA:26,2,0,254 +BRDA:26,2,1,6 +BRDA:26,2,2,2 BRDA:26,2,3,1 BRDA:26,2,4,2 -BRDA:49,3,0,7 -BRDA:49,3,1,269 -BRDA:49,4,0,276 -BRDA:49,4,1,7 +BRDA:49,3,0,5 +BRDA:49,3,1,265 +BRDA:49,4,0,270 +BRDA:49,4,1,5 BRF:13 BRH:13 end_of_record @@ -4752,23 +4752,23 @@ FN:18,(anonymous_1) FN:32,(anonymous_2) FNF:3 FNH:3 -FNDA:305,(anonymous_0) -FNDA:30,(anonymous_1) +FNDA:299,(anonymous_0) +FNDA:29,(anonymous_1) FNDA:7,(anonymous_2) DA:1,1 DA:3,1 DA:4,1 DA:9,1 -DA:15,610 -DA:17,305 -DA:18,30 -DA:19,30 -DA:21,30 -DA:22,30 -DA:24,30 -DA:25,30 -DA:27,30 -DA:31,305 +DA:15,598 +DA:17,299 +DA:18,29 +DA:19,29 +DA:21,29 +DA:22,29 +DA:24,29 +DA:25,29 +DA:27,29 +DA:31,299 DA:32,7 DA:33,7 DA:35,7 @@ -4777,14 +4777,14 @@ DA:38,7 DA:40,7 LF:20 LH:20 -BRDA:17,0,0,30 -BRDA:17,0,1,275 -BRDA:27,1,0,27 +BRDA:17,0,0,29 +BRDA:17,0,1,270 +BRDA:27,1,0,26 BRDA:27,1,1,3 -BRDA:27,2,0,30 -BRDA:27,2,1,30 +BRDA:27,2,0,29 +BRDA:27,2,1,29 BRDA:31,3,0,7 -BRDA:31,3,1,298 +BRDA:31,3,1,292 BRDA:40,4,0,6 BRDA:40,4,1,1 BRDA:40,5,0,7 @@ -4797,146 +4797,146 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/ha FN:15,(anonymous_0) FNF:1 FNH:1 -FNDA:40,(anonymous_0) +FNDA:39,(anonymous_0) DA:1,1 DA:2,1 DA:3,1 DA:4,1 DA:5,1 DA:15,1 -DA:22,40 +DA:22,39 DA:24,2 -DA:27,38 -DA:29,38 +DA:27,37 +DA:29,37 DA:30,2 DA:32,2 -DA:34,36 -DA:36,36 -DA:37,36 -DA:39,36 -DA:40,36 -DA:41,36 -DA:42,36 -DA:45,38 -DA:47,38 -DA:48,38 -DA:50,38 -DA:51,50 -DA:53,50 +DA:34,35 +DA:36,35 +DA:37,35 +DA:39,35 +DA:40,35 +DA:41,35 +DA:42,35 +DA:45,37 +DA:47,37 +DA:48,37 +DA:50,37 +DA:51,49 +DA:53,49 DA:55,1 -DA:58,49 -DA:59,49 -DA:60,49 -DA:62,49 -DA:63,48 -DA:64,48 -DA:67,49 -DA:69,49 -DA:70,72 -DA:72,72 +DA:58,48 +DA:59,48 +DA:60,48 +DA:62,48 +DA:63,47 +DA:64,47 +DA:67,48 +DA:69,48 +DA:70,70 +DA:72,70 DA:73,0 DA:79,0 DA:80,0 DA:82,0 DA:83,0 -DA:87,72 -DA:88,63 -DA:90,63 -DA:92,63 -DA:93,63 -DA:94,63 -DA:95,63 -DA:97,63 +DA:87,70 +DA:88,61 +DA:90,61 +DA:92,61 +DA:93,61 +DA:94,61 +DA:95,61 +DA:97,61 DA:98,4 -DA:100,63 +DA:100,61 DA:101,4 -DA:104,63 +DA:104,61 DA:105,4 -DA:108,63 +DA:108,61 DA:109,4 -DA:112,63 -DA:113,59 +DA:112,61 +DA:113,57 DA:114,4 -DA:117,59 +DA:117,57 DA:118,4 -DA:122,63 -DA:123,58 -DA:124,58 -DA:125,58 -DA:126,58 -DA:127,58 -DA:130,63 -DA:132,63 -DA:137,38 +DA:122,61 +DA:123,56 +DA:124,56 +DA:125,56 +DA:126,56 +DA:127,56 +DA:130,61 +DA:132,61 +DA:137,37 LF:70 LH:65 BRDA:22,0,0,2 -BRDA:22,0,1,38 +BRDA:22,0,1,37 BRDA:29,1,0,2 -BRDA:29,1,1,36 -BRDA:45,2,0,37 +BRDA:29,1,1,35 +BRDA:45,2,0,36 BRDA:45,2,1,1 -BRDA:45,3,0,38 -BRDA:45,3,1,38 +BRDA:45,3,0,37 +BRDA:45,3,1,37 BRDA:53,4,0,1 -BRDA:53,4,1,49 -BRDA:58,5,0,49 -BRDA:58,5,1,48 -BRDA:62,6,0,48 +BRDA:53,4,1,48 +BRDA:58,5,0,48 +BRDA:58,5,1,47 +BRDA:62,6,0,47 BRDA:62,6,1,1 -BRDA:67,7,0,47 +BRDA:67,7,0,46 BRDA:67,7,1,2 -BRDA:67,8,0,49 -BRDA:67,8,1,49 +BRDA:67,8,0,48 +BRDA:67,8,1,48 BRDA:72,9,0,0 -BRDA:72,9,1,72 +BRDA:72,9,1,70 BRDA:73,10,0,0 BRDA:73,10,1,0 BRDA:79,11,0,0 BRDA:79,11,1,0 -BRDA:87,12,0,63 +BRDA:87,12,0,61 BRDA:87,12,1,9 -BRDA:87,13,0,72 -BRDA:87,13,1,67 -BRDA:88,14,0,63 -BRDA:88,14,1,58 +BRDA:87,13,0,70 +BRDA:87,13,1,65 +BRDA:88,14,0,61 +BRDA:88,14,1,56 BRDA:88,15,0,2 -BRDA:88,15,1,56 -BRDA:97,16,0,51 +BRDA:88,15,1,54 +BRDA:97,16,0,49 BRDA:97,16,1,16 -BRDA:97,17,0,67 -BRDA:97,17,1,67 -BRDA:97,18,0,50 +BRDA:97,17,0,65 +BRDA:97,17,1,65 +BRDA:97,18,0,48 BRDA:97,18,1,17 -BRDA:97,19,0,67 -BRDA:97,19,1,67 -BRDA:100,20,0,47 -BRDA:100,20,1,20 -BRDA:100,21,0,67 -BRDA:100,21,1,67 +BRDA:97,19,0,65 +BRDA:97,19,1,65 +BRDA:100,20,0,46 +BRDA:100,20,1,19 +BRDA:100,21,0,65 +BRDA:100,21,1,65 BRDA:104,22,0,4 -BRDA:104,22,1,59 +BRDA:104,22,1,57 BRDA:108,23,0,4 -BRDA:108,23,1,59 -BRDA:112,24,0,59 +BRDA:108,23,1,57 +BRDA:112,24,0,57 BRDA:112,24,1,4 -BRDA:112,25,0,63 +BRDA:112,25,0,61 BRDA:112,25,1,5 BRDA:112,25,2,2 BRDA:113,26,0,4 -BRDA:113,26,1,55 -BRDA:113,27,0,59 +BRDA:113,26,1,53 +BRDA:113,27,0,57 BRDA:113,27,1,4 BRDA:117,28,0,4 -BRDA:117,28,1,55 -BRDA:117,29,0,59 +BRDA:117,28,1,53 +BRDA:117,29,0,57 BRDA:117,29,1,4 -BRDA:122,30,0,58 +BRDA:122,30,0,56 BRDA:122,30,1,5 -BRDA:132,31,0,61 +BRDA:132,31,0,59 BRDA:132,31,1,2 -BRDA:132,32,0,63 -BRDA:132,32,1,63 +BRDA:132,32,0,61 +BRDA:132,32,1,61 BRF:67 BRH:62 end_of_record @@ -4945,14 +4945,14 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/ha FN:11,(anonymous_0) FNF:1 FNH:1 -FNDA:266,(anonymous_0) +FNDA:263,(anonymous_0) DA:1,1 DA:11,1 -DA:17,266 -DA:18,266 -DA:20,266 -DA:21,266 -DA:23,266 +DA:17,263 +DA:18,263 +DA:20,263 +DA:21,263 +DA:23,263 LF:7 LH:7 BRF:0 @@ -4964,18 +4964,18 @@ FN:9,mergeNode FN:32,hasSameAttributes FNF:2 FNH:2 -FNDA:623,mergeNode +FNDA:614,mergeNode FNDA:9,hasSameAttributes DA:1,1 DA:4,1 DA:9,1 -DA:10,623 -DA:11,368 -DA:13,368 +DA:10,614 +DA:11,363 +DA:13,363 DA:21,6 DA:22,5 DA:25,6 -DA:27,362 +DA:27,357 DA:33,9 DA:34,9 DA:36,9 @@ -4987,9 +4987,9 @@ DA:46,6 LF:18 LH:17 BRDA:13,0,0,6 -BRDA:13,0,1,362 -BRDA:14,1,0,368 -BRDA:14,1,1,27 +BRDA:13,0,1,357 +BRDA:14,1,0,363 +BRDA:14,1,1,26 BRDA:14,1,2,18 BRDA:14,1,3,15 BRDA:14,1,4,10 @@ -5008,23 +5008,23 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/ FN:9,optimize FNF:1 FNH:1 -FNDA:619,optimize +FNDA:610,optimize DA:2,1 DA:3,1 DA:4,1 DA:9,1 -DA:13,619 +DA:13,610 DA:17,2 -DA:20,617 -DA:21,617 -DA:23,617 -DA:24,350 +DA:20,608 +DA:21,608 +DA:23,608 +DA:24,345 LF:10 LH:10 BRDA:13,0,0,2 -BRDA:13,0,1,617 -BRDA:14,1,0,619 -BRDA:14,1,1,357 +BRDA:13,0,1,608 +BRDA:14,1,0,610 +BRDA:14,1,1,351 BRF:4 BRH:4 end_of_record @@ -5033,27 +5033,27 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/ FN:7,removeUnnecessarySpan FNF:1 FNH:1 -FNDA:620,removeUnnecessarySpan +FNDA:611,removeUnnecessarySpan DA:1,1 DA:7,1 -DA:8,620 -DA:9,358 -DA:14,235 -DA:15,235 -DA:16,235 -DA:18,235 -DA:19,234 -DA:20,234 -DA:21,234 -DA:24,235 +DA:8,611 +DA:9,353 +DA:14,230 +DA:15,230 +DA:16,230 +DA:18,230 +DA:19,229 +DA:20,229 +DA:21,229 +DA:24,230 DA:26,123 LF:13 LH:13 -BRDA:9,0,0,235 +BRDA:9,0,0,230 BRDA:9,0,1,123 -BRDA:10,1,0,358 -BRDA:10,1,1,300 -BRDA:10,1,2,275 +BRDA:10,1,0,353 +BRDA:10,1,1,295 +BRDA:10,1,2,270 BRF:5 BRH:5 end_of_record @@ -5063,17 +5063,17 @@ FN:15,applyFormat FN:21,(anonymous_1) FNF:2 FNH:2 -FNDA:2107,applyFormat -FNDA:11613,(anonymous_1) +FNDA:2056,applyFormat +FNDA:11354,(anonymous_1) DA:15,1 -DA:21,2107 -DA:22,11613 +DA:21,2056 +DA:22,11354 LF:3 LH:3 BRDA:22,0,0,40 -BRDA:22,0,1,11573 -BRDA:22,1,0,11613 -BRDA:22,1,1,11573 +BRDA:22,0,1,11314 +BRDA:22,1,0,11354 +BRDA:22,1,1,11314 BRF:4 BRH:4 end_of_record @@ -5082,23 +5082,23 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/handl FN:7,handleSegmentCommon FNF:1 FNH:1 -FNDA:294,handleSegmentCommon +FNDA:288,handleSegmentCommon DA:1,1 DA:7,1 -DA:14,294 -DA:15,293 -DA:18,294 -DA:20,294 -DA:22,294 -DA:24,294 +DA:14,288 +DA:15,287 +DA:18,288 +DA:20,288 +DA:22,288 +DA:24,288 LF:8 LH:8 -BRDA:14,0,0,293 +BRDA:14,0,0,287 BRDA:14,0,1,1 -BRDA:24,1,0,287 +BRDA:24,1,0,281 BRDA:24,1,1,7 -BRDA:24,2,0,294 -BRDA:24,2,1,294 +BRDA:24,2,0,288 +BRDA:24,2,1,288 BRF:6 BRH:6 end_of_record @@ -5159,22 +5159,22 @@ SF:packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/stack FN:10,stackFormat FNF:1 FNH:1 -FNDA:448,stackFormat +FNDA:439,stackFormat DA:10,1 -DA:16,448 -DA:20,448 -DA:21,234 -DA:23,234 -DA:24,234 -DA:29,234 -DA:31,234 -DA:34,214 +DA:16,439 +DA:20,439 +DA:21,229 +DA:23,229 +DA:24,229 +DA:29,229 +DA:31,229 +DA:34,210 LF:9 LH:9 -BRDA:17,0,0,119 -BRDA:17,0,1,329 -BRDA:20,1,0,234 -BRDA:20,1,1,214 +BRDA:17,0,0,118 +BRDA:17,0,1,321 +BRDA:20,1,0,229 +BRDA:20,1,1,210 BRF:4 BRH:4 end_of_record @@ -5251,22 +5251,22 @@ FN:9,(anonymous_0) FN:15,shouldUseTableProcessor FNF:2 FNH:2 -FNDA:9,(anonymous_0) -FNDA:9,shouldUseTableProcessor +FNDA:8,(anonymous_0) +FNDA:8,shouldUseTableProcessor DA:1,1 DA:3,1 DA:4,1 DA:9,1 -DA:10,9 -DA:12,9 -DA:21,9 +DA:10,8 +DA:12,8 +DA:21,8 LF:7 LH:7 BRDA:10,0,0,7 -BRDA:10,0,1,2 -BRDA:22,1,0,9 -BRDA:22,1,1,8 -BRDA:22,1,2,7 +BRDA:10,0,1,1 +BRDA:22,1,0,8 +BRDA:22,1,1,7 +BRDA:22,1,2,6 BRF:5 BRH:5 end_of_record @@ -5385,9 +5385,9 @@ FNF:6 FNH:6 FNDA:1,(anonymous_0) FNDA:25,ContentModelEditor -FNDA:16,(anonymous_2) -FNDA:8,(anonymous_3) -FNDA:19,(anonymous_4) +FNDA:12,(anonymous_2) +FNDA:6,(anonymous_3) +FNDA:13,(anonymous_4) FNDA:26,(anonymous_5) DA:9,1 DA:10,1 @@ -5396,14 +5396,14 @@ DA:17,1 DA:24,38 DA:25,25 DA:32,1 -DA:33,16 -DA:35,16 +DA:33,12 +DA:35,12 DA:43,1 -DA:44,8 -DA:46,8 +DA:44,6 +DA:46,6 DA:53,1 -DA:54,19 -DA:56,19 +DA:54,13 +DA:56,13 DA:57,2 DA:66,1 DA:67,26 @@ -5416,8 +5416,8 @@ BRDA:24,0,1,12 BRDA:25,1,0,25 BRDA:25,1,1,25 BRDA:56,2,0,2 -BRDA:56,2,1,17 -BRDA:56,3,0,19 +BRDA:56,2,1,11 +BRDA:56,3,0,13 BRDA:56,3,1,2 BRDA:57,4,0,2 BRDA:57,4,1,1 @@ -5548,36 +5548,36 @@ FN:15,(anonymous_0) FN:26,internalCreateContentModel FNF:2 FNH:2 -FNDA:27,(anonymous_0) -FNDA:24,internalCreateContentModel +FNDA:23,(anonymous_0) +FNDA:20,internalCreateContentModel DA:1,1 DA:2,1 DA:4,1 DA:15,1 -DA:16,27 -DA:18,27 +DA:16,23 +DA:18,23 DA:20,1 -DA:23,27 -DA:30,24 -DA:35,24 -DA:41,24 -DA:42,22 -DA:45,24 +DA:23,23 +DA:30,20 +DA:35,20 +DA:41,20 +DA:42,18 +DA:45,20 LF:13 LH:13 BRDA:16,0,0,5 -BRDA:16,0,1,22 +BRDA:16,0,1,18 BRDA:18,1,0,1 -BRDA:18,1,1,26 -BRDA:18,2,0,27 +BRDA:18,1,1,22 +BRDA:18,2,0,23 BRDA:18,2,1,3 -BRDA:23,3,0,27 -BRDA:23,3,1,24 -BRDA:38,4,0,15 -BRDA:38,4,1,9 -BRDA:38,5,0,24 -BRDA:38,5,1,24 -BRDA:41,6,0,22 +BRDA:23,3,0,23 +BRDA:23,3,1,20 +BRDA:38,4,0,13 +BRDA:38,4,1,7 +BRDA:38,5,0,20 +BRDA:38,5,1,20 +BRDA:41,6,0,18 BRDA:41,6,1,2 BRF:14 BRH:14 @@ -5589,52 +5589,52 @@ FN:24,checkZoomScale FN:33,checkRootRtl FNF:3 FNH:3 -FNDA:25,(anonymous_0) -FNDA:25,checkZoomScale -FNDA:25,checkRootRtl +FNDA:19,(anonymous_0) +FNDA:19,checkZoomScale +FNDA:19,checkRootRtl DA:8,1 -DA:9,125 -DA:11,25 -DA:18,25 -DA:19,25 -DA:21,25 -DA:25,25 -DA:26,25 -DA:28,25 -DA:29,20 -DA:34,25 -DA:36,25 +DA:9,95 +DA:11,19 +DA:18,19 +DA:19,19 +DA:21,19 +DA:25,19 +DA:26,19 +DA:28,19 +DA:29,14 +DA:34,19 +DA:36,19 DA:37,1 LF:13 LH:13 -BRDA:25,0,0,25 +BRDA:25,0,0,19 BRDA:25,0,1,5 BRDA:25,1,0,3 -BRDA:25,1,1,22 -BRDA:25,2,0,25 -BRDA:25,2,1,25 +BRDA:25,1,1,16 +BRDA:25,2,0,19 +BRDA:25,2,1,19 BRDA:25,3,0,0 -BRDA:25,3,1,25 -BRDA:25,4,0,25 -BRDA:25,4,1,25 -BRDA:28,5,0,20 +BRDA:25,3,1,19 +BRDA:25,4,0,19 +BRDA:25,4,1,19 +BRDA:28,5,0,14 BRDA:28,5,1,5 -BRDA:28,6,0,25 -BRDA:28,6,1,20 +BRDA:28,6,0,19 +BRDA:28,6,1,14 BRDA:34,7,0,0 -BRDA:34,7,1,25 -BRDA:34,8,0,25 -BRDA:34,8,1,25 +BRDA:34,7,1,19 +BRDA:34,8,0,19 +BRDA:34,8,1,19 BRDA:34,9,0,0 -BRDA:34,9,1,25 -BRDA:34,10,0,25 -BRDA:34,10,1,25 +BRDA:34,9,1,19 +BRDA:34,10,0,19 +BRDA:34,10,1,19 BRDA:36,11,0,1 -BRDA:36,11,1,24 +BRDA:36,11,1,18 BRDA:36,12,0,4 -BRDA:36,12,1,21 -BRDA:36,13,0,25 -BRDA:36,13,1,25 +BRDA:36,12,1,15 +BRDA:36,13,0,19 +BRDA:36,13,1,19 BRF:28 BRH:25 end_of_record @@ -5643,17 +5643,17 @@ SF:packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/setC FN:10,(anonymous_0) FNF:1 FNH:1 -FNDA:12,(anonymous_0) +FNDA:10,(anonymous_0) DA:1,1 DA:10,1 -DA:11,12 -DA:22,12 -DA:23,11 +DA:11,10 +DA:22,10 +DA:23,9 LF:5 LH:5 -BRDA:18,0,0,12 +BRDA:18,0,0,10 BRDA:18,0,1,5 -BRDA:22,1,0,11 +BRDA:22,1,0,9 BRDA:22,1,1,1 BRF:4 BRH:4 @@ -5982,7 +5982,7 @@ FNDA:0,(anonymous_2) FNDA:42,(anonymous_3) FNDA:181,(anonymous_4) FNDA:4,(anonymous_5) -FNDA:75,(anonymous_6) +FNDA:65,(anonymous_6) FNDA:1,(anonymous_7) FNDA:18,(anonymous_8) FNDA:5,(anonymous_9) @@ -6016,14 +6016,14 @@ DA:67,181 DA:76,1 DA:77,4 DA:86,1 -DA:87,75 -DA:88,75 +DA:87,65 +DA:88,65 DA:90,1 DA:91,1 DA:94,18 DA:95,18 -DA:99,11 -DA:100,11 +DA:99,7 +DA:100,7 DA:105,1 DA:106,1 DA:110,1 @@ -6089,12 +6089,12 @@ DA:259,3 DA:265,1 LF:95 LH:91 -BRDA:87,0,0,75 +BRDA:87,0,0,65 BRDA:87,0,1,0 BRDA:89,1,0,1 BRDA:89,1,1,18 -BRDA:89,1,2,11 -BRDA:89,1,3,11 +BRDA:89,1,2,7 +BRDA:89,1,3,7 BRDA:106,2,0,1 BRDA:106,2,1,0 BRDA:106,3,0,0 @@ -6213,7 +6213,7 @@ FNDA:46,(anonymous_0) FNDA:0,(anonymous_2) FNDA:35,(anonymous_3) FNDA:14,(anonymous_4) -FNDA:66,(anonymous_5) +FNDA:56,(anonymous_5) FNDA:4,(anonymous_6) DA:1,1 DA:2,1 @@ -6226,9 +6226,9 @@ DA:29,35 DA:37,1 DA:38,14 DA:47,1 -DA:48,66 +DA:48,56 DA:49,0 -DA:52,66 +DA:52,56 DA:55,4 DA:56,3 DA:59,4 @@ -6237,9 +6237,9 @@ DA:63,1 DA:66,2 DA:67,1 DA:70,2 -DA:74,14 -DA:75,13 -DA:77,14 +DA:74,10 +DA:75,9 +DA:77,10 DA:81,1 DA:82,4 DA:83,4 @@ -6248,12 +6248,12 @@ DA:87,1 LF:30 LH:28 BRDA:48,0,0,0 -BRDA:48,0,1,66 +BRDA:48,0,1,56 BRDA:53,1,0,4 BRDA:53,1,1,1 BRDA:53,1,2,2 BRDA:53,1,3,2 -BRDA:53,1,4,14 +BRDA:53,1,4,10 BRDA:55,2,0,3 BRDA:55,2,1,1 BRDA:55,3,0,4 @@ -6262,7 +6262,7 @@ BRDA:66,4,0,1 BRDA:66,4,1,1 BRDA:66,5,0,2 BRDA:66,5,1,1 -BRDA:74,6,0,13 +BRDA:74,6,0,9 BRDA:74,6,1,1 BRDA:82,7,0,4 BRDA:82,7,1,0 @@ -6286,7 +6286,7 @@ FNDA:8,ContentModelFormatPlugin FNDA:0,(anonymous_2) FNDA:7,(anonymous_3) FNDA:0,(anonymous_4) -FNDA:32,(anonymous_5) +FNDA:22,(anonymous_5) DA:1,1 DA:3,1 DA:5,1 @@ -6306,50 +6306,50 @@ DA:54,7 DA:62,1 DA:63,0 DA:72,1 -DA:73,32 -DA:74,25 -DA:77,7 -DA:78,7 +DA:73,22 +DA:74,17 +DA:77,5 +DA:78,5 DA:79,0 -DA:81,7 -DA:82,7 +DA:81,5 +DA:82,5 DA:84,2 DA:85,2 DA:87,1 DA:88,1 -DA:91,3 -DA:96,2 -DA:98,3 +DA:91,1 +DA:96,1 +DA:98,1 DA:100,0 DA:101,0 DA:103,0 DA:104,0 -DA:107,7 -DA:108,7 -DA:110,7 +DA:107,5 +DA:108,5 +DA:110,5 DA:112,1 LF:41 LH:34 BRDA:37,0,0,8 BRDA:37,0,1,0 -BRDA:73,1,0,25 -BRDA:73,1,1,7 -BRDA:73,2,0,32 -BRDA:73,2,1,32 +BRDA:73,1,0,17 +BRDA:73,1,1,5 +BRDA:73,2,0,22 +BRDA:73,2,1,22 BRDA:78,3,0,0 -BRDA:78,3,1,7 +BRDA:78,3,1,5 BRDA:83,4,0,2 BRDA:83,4,1,1 BRDA:83,4,2,1 -BRDA:83,4,3,3 +BRDA:83,4,3,1 BRDA:83,4,4,0 BRDA:83,4,5,0 -BRDA:91,5,0,2 -BRDA:91,5,1,1 -BRDA:92,6,0,3 -BRDA:92,6,1,1 +BRDA:91,5,0,1 +BRDA:91,5,1,0 +BRDA:92,6,0,1 +BRDA:92,6,1,0 BRF:18 -BRH:14 +BRH:12 end_of_record TN: SF:packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/processPastedContentFromExcel.ts @@ -6359,10 +6359,10 @@ FN:46,(anonymous_2) FN:61,excelHandler FNF:4 FNH:4 -FNDA:8,processPastedContentFromExcel +FNDA:7,processPastedContentFromExcel FNDA:4,(anonymous_1) -FNDA:12,(anonymous_2) -FNDA:8,excelHandler +FNDA:10,(anonymous_2) +FNDA:7,excelHandler DA:1,1 DA:3,1 DA:6,1 @@ -6371,50 +6371,50 @@ DA:8,1 DA:9,1 DA:10,1 DA:18,1 -DA:22,24 -DA:23,8 -DA:25,8 -DA:26,5 -DA:27,5 -DA:31,8 -DA:32,8 +DA:22,21 +DA:23,7 +DA:25,7 +DA:26,4 +DA:27,4 +DA:31,7 +DA:32,7 DA:33,1 DA:35,4 DA:41,1 DA:42,1 -DA:46,8 -DA:47,12 -DA:48,6 -DA:49,6 -DA:50,6 -DA:51,6 +DA:46,7 +DA:47,10 +DA:48,4 +DA:49,4 +DA:50,4 +DA:51,4 DA:61,1 -DA:62,8 -DA:63,4 -DA:64,4 -DA:65,4 -DA:67,8 -DA:68,5 -DA:69,5 -DA:70,5 -DA:73,8 +DA:62,7 +DA:63,3 +DA:64,3 +DA:65,3 +DA:67,7 +DA:68,4 +DA:69,4 +DA:70,4 +DA:73,7 LF:35 LH:35 -BRDA:23,0,0,8 +BRDA:23,0,0,7 BRDA:23,0,1,0 -BRDA:25,1,0,5 +BRDA:25,1,0,4 BRDA:25,1,1,3 -BRDA:25,2,0,8 -BRDA:25,2,1,8 +BRDA:25,2,0,7 +BRDA:25,2,1,7 BRDA:27,3,0,0 -BRDA:27,3,1,5 -BRDA:27,4,0,5 -BRDA:27,4,1,5 +BRDA:27,3,1,4 +BRDA:27,4,0,4 +BRDA:27,4,1,4 BRDA:32,5,0,1 -BRDA:32,5,1,7 -BRDA:32,6,0,8 -BRDA:32,6,1,8 -BRDA:32,6,2,8 +BRDA:32,5,1,6 +BRDA:32,6,0,7 +BRDA:32,6,1,7 +BRDA:32,6,2,7 BRDA:36,7,0,3 BRDA:36,7,1,1 BRDA:37,8,0,1 @@ -6423,18 +6423,18 @@ BRDA:41,9,0,1 BRDA:41,9,1,0 BRDA:41,10,0,1 BRDA:41,10,1,1 -BRDA:47,11,0,6 +BRDA:47,11,0,4 BRDA:47,11,1,6 -BRDA:62,12,0,4 +BRDA:62,12,0,3 BRDA:62,12,1,4 -BRDA:64,13,0,1 +BRDA:64,13,0,0 BRDA:64,13,1,3 -BRDA:67,14,0,5 +BRDA:67,14,0,4 BRDA:67,14,1,3 -BRDA:69,15,0,1 +BRDA:69,15,0,0 BRDA:69,15,1,4 BRF:33 -BRH:30 +BRH:28 end_of_record TN: SF:packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/processPastedContentFromPowerPoint.ts @@ -6901,23 +6901,23 @@ SF:packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/Past FN:11,addParser FNF:1 FNH:1 -FNDA:192,addParser +FNDA:189,addParser DA:11,1 -DA:16,192 -DA:17,69 -DA:19,192 -DA:20,192 -DA:23,192 +DA:16,189 +DA:17,67 +DA:19,189 +DA:20,189 +DA:23,189 LF:6 LH:6 -BRDA:16,0,0,69 -BRDA:16,0,1,123 -BRDA:19,1,0,192 +BRDA:16,0,0,67 +BRDA:16,0,1,122 +BRDA:19,1,0,189 BRDA:19,1,1,0 BRDA:23,2,0,0 -BRDA:23,2,1,192 -BRDA:23,3,0,192 -BRDA:23,3,1,192 +BRDA:23,2,1,189 +BRDA:23,3,0,189 +BRDA:23,3,1,189 BRF:8 BRH:6 end_of_record @@ -6928,15 +6928,15 @@ FN:34,(anonymous_1) FN:38,(anonymous_2) FNF:3 FNH:3 -FNDA:7,parseDeprecatedColor -FNDA:14,(anonymous_1) -FNDA:12,(anonymous_2) +FNDA:5,parseDeprecatedColor +FNDA:10,(anonymous_1) +FNDA:10,(anonymous_2) DA:1,1 DA:4,1 DA:33,1 -DA:34,7 -DA:35,14 -DA:38,12 +DA:34,5 +DA:35,10 +DA:38,10 LF:6 LH:6 BRF:0 @@ -6999,7 +6999,7 @@ FN:85,shouldDeleteWord FN:95,shouldDeleteAllSegmentsBefore FNF:6 FNH:5 -FNDA:26,getOnDeleteEntityCallback +FNDA:24,getOnDeleteEntityCallback FNDA:4,(anonymous_1) FNDA:0,(anonymous_2) FNDA:4,handleKeyboardEventResult @@ -7007,8 +7007,8 @@ FNDA:24,shouldDeleteWord FNDA:16,shouldDeleteAllSegmentsBefore DA:5,1 DA:10,1 -DA:13,43 -DA:15,26 +DA:13,39 +DA:15,24 DA:16,4 DA:20,2 DA:21,2 @@ -7031,7 +7031,7 @@ DA:95,1 DA:96,16 LF:24 LH:24 -BRDA:13,0,0,17 +BRDA:13,0,0,15 BRDA:13,0,1,9 BRDA:16,1,0,2 BRDA:16,1,1,2 @@ -7674,24 +7674,24 @@ SF:packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/get FN:17,getClosestAncestorBlockGroupIndex FNF:1 FNH:1 -FNDA:271,getClosestAncestorBlockGroupIndex +FNDA:270,getClosestAncestorBlockGroupIndex DA:17,1 -DA:20,282 -DA:22,271 -DA:23,287 -DA:25,287 +DA:20,281 +DA:22,270 +DA:23,286 +DA:25,286 DA:26,83 -DA:27,204 +DA:27,203 DA:32,5 -DA:36,183 +DA:36,182 LF:9 LH:9 BRDA:20,0,0,11 -BRDA:20,0,1,260 +BRDA:20,0,1,259 BRDA:25,1,0,83 -BRDA:25,1,1,204 +BRDA:25,1,1,203 BRDA:27,2,0,5 -BRDA:27,2,1,199 +BRDA:27,2,1,198 BRF:6 BRH:6 end_of_record @@ -7731,13 +7731,13 @@ FN:324,mergeSegmentFormat FN:337,getSemanticFormat FNF:14 FNH:12 -FNDA:34,mergeModel -FNDA:25,mergeParagraph +FNDA:32,mergeModel +FNDA:24,mergeParagraph FNDA:3,mergeTable FNDA:6,mergeList FNDA:2,(anonymous_4) -FNDA:17,splitParagraph -FNDA:6,insertBlock +FNDA:16,splitParagraph +FNDA:5,insertBlock FNDA:14,applyDefaultFormat FNDA:14,(anonymous_8) FNDA:0,(anonymous_9) @@ -7752,35 +7752,35 @@ DA:4,1 DA:6,1 DA:8,1 DA:59,1 -DA:66,34 -DA:68,34 -DA:69,33 +DA:66,32 +DA:68,32 +DA:69,31 DA:70,13 DA:75,13 -DA:78,33 -DA:79,40 -DA:81,40 -DA:83,25 -DA:84,25 -DA:88,1 +DA:78,31 +DA:79,38 +DA:81,38 +DA:83,24 +DA:84,24 +DA:88,1 DA:89,1 -DA:92,7 +DA:92,6 DA:93,3 -DA:95,4 -DA:97,7 +DA:95,3 +DA:97,6 DA:100,7 DA:103,1 DA:104,1 DA:106,6 DA:107,6 DA:109,7 -DA:114,34 -DA:122,50 -DA:123,25 -DA:126,25 -DA:128,25 -DA:129,25 -DA:132,25 +DA:114,32 +DA:122,48 +DA:123,24 +DA:126,24 +DA:128,24 +DA:129,24 +DA:132,24 DA:133,3 DA:142,3 DA:144,3 @@ -7815,17 +7815,17 @@ DA:208,6 DA:211,6 DA:212,2 DA:213,2 -DA:219,51 -DA:220,17 -DA:221,17 -DA:222,17 -DA:228,17 -DA:229,17 -DA:232,17 -DA:233,17 -DA:236,17 -DA:241,17 -DA:243,17 +DA:219,48 +DA:220,16 +DA:221,16 +DA:222,16 +DA:228,16 +DA:229,16 +DA:232,16 +DA:233,16 +DA:236,16 +DA:241,16 +DA:243,16 DA:244,4 DA:245,4 DA:247,4 @@ -7835,13 +7835,13 @@ DA:251,4 DA:254,4 DA:255,4 DA:258,4 -DA:262,17 -DA:264,17 -DA:268,6 -DA:269,6 -DA:270,6 -DA:272,6 -DA:273,6 +DA:262,16 +DA:264,16 +DA:268,5 +DA:269,5 +DA:270,5 +DA:272,5 +DA:273,5 DA:282,14 DA:283,14 DA:285,1 @@ -7873,51 +7873,51 @@ DA:352,5 LF:125 LH:119 BRDA:66,0,0,1 -BRDA:66,0,1,33 -BRDA:66,1,0,34 -BRDA:66,1,1,34 +BRDA:66,0,1,31 +BRDA:66,1,0,32 +BRDA:66,1,1,32 BRDA:66,2,0,11 -BRDA:66,2,1,23 -BRDA:66,3,0,34 -BRDA:66,3,1,34 -BRDA:68,4,0,33 +BRDA:66,2,1,21 +BRDA:66,3,0,32 +BRDA:66,3,1,32 +BRDA:68,4,0,31 BRDA:68,4,1,1 BRDA:69,5,0,13 -BRDA:69,5,1,20 -BRDA:69,6,0,33 -BRDA:69,6,1,18 +BRDA:69,5,1,18 +BRDA:69,6,0,31 +BRDA:69,6,1,16 BRDA:69,7,0,11 -BRDA:69,7,1,22 -BRDA:69,8,0,33 -BRDA:69,8,1,33 +BRDA:69,7,1,20 +BRDA:69,8,0,31 +BRDA:69,8,1,31 BRDA:71,9,0,13 BRDA:71,9,1,5 BRDA:75,10,0,0 BRDA:75,10,1,13 BRDA:75,11,0,13 BRDA:75,11,1,13 -BRDA:82,12,0,25 +BRDA:82,12,0,24 BRDA:82,12,1,1 BRDA:82,12,2,1 -BRDA:82,12,3,7 +BRDA:82,12,3,6 BRDA:82,12,4,7 BRDA:92,13,0,3 -BRDA:92,13,1,4 -BRDA:92,14,0,7 -BRDA:92,14,1,7 +BRDA:92,13,1,3 +BRDA:92,14,0,6 +BRDA:92,14,1,6 BRDA:92,15,0,2 -BRDA:92,15,1,5 -BRDA:92,16,0,7 -BRDA:92,16,1,7 +BRDA:92,15,1,4 +BRDA:92,16,0,6 +BRDA:92,16,1,6 BRDA:101,17,0,0 BRDA:101,17,1,1 BRDA:101,17,2,6 -BRDA:124,18,0,20 +BRDA:124,18,0,19 BRDA:124,18,1,5 -BRDA:128,19,0,25 +BRDA:128,19,0,24 BRDA:128,19,1,0 BRDA:132,20,0,3 -BRDA:132,20,1,22 +BRDA:132,20,1,21 BRDA:144,21,0,3 BRDA:144,21,1,0 BRDA:144,22,0,3 @@ -7967,12 +7967,12 @@ BRDA:212,43,0,0 BRDA:212,43,1,2 BRDA:212,44,0,2 BRDA:212,44,1,2 -BRDA:228,45,0,17 +BRDA:228,45,0,16 BRDA:228,45,1,0 -BRDA:232,46,0,17 +BRDA:232,46,0,16 BRDA:232,46,1,0 BRDA:243,47,0,4 -BRDA:243,47,1,13 +BRDA:243,47,1,12 BRDA:244,48,0,4 BRDA:244,48,1,0 BRDA:245,49,0,4 @@ -7985,7 +7985,7 @@ BRDA:250,52,0,4 BRDA:250,52,1,0 BRDA:254,53,0,4 BRDA:254,53,1,0 -BRDA:272,54,0,6 +BRDA:272,54,0,5 BRDA:272,54,1,0 BRDA:284,55,0,1 BRDA:284,55,1,0 @@ -8291,27 +8291,27 @@ FN:37,isValidDeleteSelectionContext FN:44,mergeParagraphAfterDelete FNF:4 FNH:4 -FNDA:126,deleteSelection +FNDA:124,deleteSelection FNDA:69,(anonymous_1) FNDA:69,isValidDeleteSelectionContext -FNDA:126,mergeParagraphAfterDelete +FNDA:124,mergeParagraphAfterDelete DA:2,1 DA:15,1 -DA:18,181 -DA:20,126 -DA:22,126 +DA:18,177 +DA:20,124 +DA:22,124 DA:23,69 DA:28,51 -DA:32,126 -DA:34,126 +DA:32,124 +DA:34,124 DA:40,69 -DA:45,504 -DA:47,126 +DA:45,496 +DA:47,124 DA:55,22 DA:56,22 LF:14 LH:14 -BRDA:18,0,0,55 +BRDA:18,0,0,53 BRDA:18,0,1,71 BRDA:23,1,0,51 BRDA:23,1,1,18 @@ -8319,9 +8319,9 @@ BRDA:24,2,0,69 BRDA:24,2,1,69 BRDA:24,2,2,67 BRDA:47,3,0,22 -BRDA:47,3,1,104 -BRDA:48,4,0,126 -BRDA:48,4,1,122 +BRDA:47,3,1,102 +BRDA:48,4,0,124 +BRDA:48,4,1,120 BRDA:48,4,2,100 BRDA:48,4,3,96 BRDA:48,4,4,75 @@ -8625,9 +8625,9 @@ SF:packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils FN:12,createInsertPoint FNF:1 FNH:1 -FNDA:129,createInsertPoint +FNDA:127,createInsertPoint DA:12,1 -DA:18,129 +DA:18,127 LF:2 LH:2 BRF:0 @@ -8691,9 +8691,9 @@ FN:36,(anonymous_1) FN:59,(anonymous_2) FNF:3 FNH:3 -FNDA:126,deleteExpandedSelection -FNDA:137,(anonymous_1) -FNDA:113,(anonymous_2) +FNDA:124,deleteExpandedSelection +FNDA:135,(anonymous_1) +FNDA:111,(anonymous_2) DA:2,1 DA:3,1 DA:5,1 @@ -8701,24 +8701,24 @@ DA:6,1 DA:7,1 DA:14,1 DA:25,1 -DA:29,126 -DA:34,126 -DA:39,137 -DA:44,137 -DA:45,137 -DA:47,137 -DA:49,110 -DA:52,110 -DA:53,110 -DA:54,110 -DA:56,110 -DA:57,110 -DA:59,110 -DA:60,113 -DA:67,75 +DA:29,124 +DA:34,124 +DA:39,135 +DA:44,135 +DA:45,135 +DA:47,135 +DA:49,108 +DA:52,108 +DA:53,108 +DA:54,108 +DA:56,108 +DA:57,108 +DA:59,108 +DA:60,111 +DA:67,73 DA:73,38 DA:74,38 -DA:81,110 +DA:81,108 DA:82,35 DA:85,27 DA:87,24 @@ -8734,33 +8734,33 @@ DA:100,3 DA:102,3 DA:103,3 DA:104,3 -DA:107,137 +DA:107,135 DA:109,47 DA:111,47 DA:112,47 DA:113,47 -DA:119,126 +DA:119,124 LF:46 LH:46 -BRDA:47,0,0,110 +BRDA:47,0,0,108 BRDA:47,0,1,27 -BRDA:49,1,0,110 +BRDA:49,1,0,108 BRDA:49,1,1,0 -BRDA:49,2,0,110 -BRDA:49,2,1,110 +BRDA:49,2,0,108 +BRDA:49,2,1,108 BRDA:49,3,0,0 -BRDA:49,3,1,110 -BRDA:49,4,0,110 -BRDA:49,4,1,110 -BRDA:60,5,0,75 +BRDA:49,3,1,108 +BRDA:49,4,0,108 +BRDA:49,4,1,108 +BRDA:60,5,0,73 BRDA:60,5,1,38 -BRDA:61,6,0,113 -BRDA:61,6,1,110 -BRDA:61,6,2,101 +BRDA:61,6,0,111 +BRDA:61,6,1,108 +BRDA:61,6,2,99 BRDA:73,7,0,38 BRDA:73,7,1,0 BRDA:81,8,0,35 -BRDA:81,8,1,75 +BRDA:81,8,1,73 BRDA:85,9,0,24 BRDA:85,9,1,3 BRDA:89,10,0,24 @@ -8768,7 +8768,7 @@ BRDA:89,10,1,0 BRDA:92,11,0,3 BRDA:92,11,1,0 BRDA:107,12,0,47 -BRDA:107,12,1,90 +BRDA:107,12,1,88 BRF:27 BRH:22 end_of_record @@ -8918,10 +8918,10 @@ FNF:6 FNH:6 FNDA:20,getPendingFormat FNDA:1,setPendingFormat -FNDA:12,clearPendingFormat -FNDA:15,canApplyPendingFormat -FNDA:48,getPendingFormatHolder -FNDA:9,(anonymous_5) +FNDA:8,clearPendingFormat +FNDA:11,canApplyPendingFormat +FNDA:40,getPendingFormatHolder +FNDA:7,(anonymous_5) DA:10,1 DA:11,20 DA:21,1 @@ -8929,24 +8929,24 @@ DA:26,1 DA:28,1 DA:29,1 DA:36,1 -DA:37,12 -DA:39,12 -DA:40,12 +DA:37,8 +DA:39,8 +DA:40,8 DA:48,1 -DA:49,15 -DA:50,15 -DA:52,15 +DA:49,11 +DA:50,11 +DA:52,11 DA:53,3 DA:55,3 DA:56,1 -DA:60,15 +DA:60,11 DA:67,1 -DA:70,48 +DA:70,40 LF:20 LH:20 BRDA:52,0,0,3 -BRDA:52,0,1,12 -BRDA:52,1,0,15 +BRDA:52,0,1,8 +BRDA:52,1,0,11 BRDA:52,1,1,3 BRDA:55,2,0,1 BRDA:55,2,1,2 @@ -9675,19 +9675,19 @@ SF:packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/ FN:6,getSelectionRootNode FNF:1 FNH:1 -FNDA:44,getSelectionRootNode +FNDA:43,getSelectionRootNode DA:6,1 -DA:7,44 +DA:7,43 LF:2 LH:2 BRDA:8,0,0,4 -BRDA:8,0,1,40 -BRDA:10,1,0,38 +BRDA:8,0,1,39 +BRDA:10,1,0,37 BRDA:10,1,1,2 BRDA:10,2,0,0 -BRDA:10,2,1,38 -BRDA:10,3,0,38 -BRDA:10,3,1,38 +BRDA:10,2,1,37 +BRDA:10,3,0,37 +BRDA:10,3,1,37 BRDA:12,4,0,1 BRDA:12,4,1,1 BRDA:14,5,0,1 @@ -9704,26 +9704,26 @@ FN:135,(anonymous_3) FN:136,(anonymous_4) FNF:5 FNH:5 -FNDA:614,iterateSelections -FNDA:615,(anonymous_1) -FNDA:816,internalIterateSelections +FNDA:612,iterateSelections +FNDA:613,(anonymous_1) +FNDA:814,internalIterateSelections FNDA:49,(anonymous_3) FNDA:62,(anonymous_4) DA:58,1 -DA:65,614 -DA:66,615 +DA:65,612 +DA:66,613 DA:69,2 -DA:72,615 -DA:75,614 -DA:85,816 -DA:86,816 -DA:87,816 -DA:89,816 -DA:91,816 -DA:92,816 -DA:94,816 -DA:95,869 -DA:97,869 +DA:72,613 +DA:75,612 +DA:85,814 +DA:86,814 +DA:87,814 +DA:89,814 +DA:91,814 +DA:92,814 +DA:94,814 +DA:95,867 +DA:97,867 DA:99,119 DA:101,119 DA:102,24 @@ -9755,60 +9755,60 @@ DA:169,66 DA:171,66 DA:180,1 DA:187,41 -DA:190,673 -DA:192,673 -DA:193,975 -DA:194,975 -DA:196,975 +DA:190,671 +DA:192,671 +DA:193,971 +DA:194,971 +DA:196,971 DA:198,27 DA:202,27 DA:207,27 DA:217,0 DA:220,27 DA:221,10 -DA:223,948 -DA:224,612 -DA:227,975 -DA:228,626 -DA:230,349 -DA:234,673 +DA:223,944 +DA:224,610 +DA:227,971 +DA:228,624 +DA:230,347 +DA:234,671 DA:235,40 -DA:237,633 +DA:237,631 DA:241,33 DA:242,1 DA:245,32 -DA:249,769 +DA:249,767 DA:257,0 -DA:260,769 +DA:260,767 LF:71 LH:67 BRDA:66,0,0,2 -BRDA:66,0,1,613 +BRDA:66,0,1,611 BRDA:66,1,0,28 -BRDA:66,1,1,587 -BRDA:66,2,0,615 -BRDA:66,2,1,615 -BRDA:86,3,0,816 +BRDA:66,1,1,585 +BRDA:66,2,0,613 +BRDA:66,2,1,613 +BRDA:86,3,0,814 BRDA:86,3,1,162 BRDA:86,4,0,101 -BRDA:86,4,1,715 -BRDA:86,5,0,816 -BRDA:86,5,1,816 -BRDA:87,6,0,816 +BRDA:86,4,1,713 +BRDA:86,5,0,814 +BRDA:86,5,1,814 +BRDA:87,6,0,814 BRDA:87,6,1,466 BRDA:87,7,0,101 -BRDA:87,7,1,715 -BRDA:87,8,0,816 -BRDA:87,8,1,816 -BRDA:89,9,0,816 +BRDA:87,7,1,713 +BRDA:87,8,0,814 +BRDA:87,8,1,814 +BRDA:89,9,0,814 BRDA:89,9,1,588 BRDA:89,10,0,101 -BRDA:89,10,1,715 -BRDA:89,11,0,816 -BRDA:89,11,1,816 +BRDA:89,10,1,713 +BRDA:89,11,0,814 +BRDA:89,11,1,814 BRDA:98,12,0,119 BRDA:98,12,1,44 -BRDA:98,12,2,673 +BRDA:98,12,2,671 BRDA:98,12,3,24 BRDA:98,12,4,33 BRDA:101,13,0,24 @@ -9850,10 +9850,10 @@ BRDA:169,28,0,66 BRDA:169,28,1,65 BRDA:171,29,0,1 BRDA:171,29,1,65 -BRDA:194,30,0,975 -BRDA:194,30,1,939 +BRDA:194,30,0,971 +BRDA:194,30,1,935 BRDA:196,31,0,27 -BRDA:196,31,1,948 +BRDA:196,31,1,944 BRDA:198,32,0,27 BRDA:198,32,1,14 BRDA:198,32,2,11 @@ -9867,22 +9867,22 @@ BRDA:208,35,0,27 BRDA:208,35,1,22 BRDA:220,36,0,10 BRDA:220,36,1,17 -BRDA:223,37,0,612 -BRDA:223,37,1,336 -BRDA:227,38,0,626 -BRDA:227,38,1,349 +BRDA:223,37,0,610 +BRDA:223,37,1,334 +BRDA:227,38,0,624 +BRDA:227,38,1,347 BRDA:234,39,0,40 -BRDA:234,39,1,633 -BRDA:234,40,0,673 -BRDA:234,40,1,539 +BRDA:234,39,1,631 +BRDA:234,40,0,671 +BRDA:234,40,1,537 BRDA:241,41,0,1 BRDA:241,41,1,32 BRDA:241,42,0,33 BRDA:241,42,1,33 BRDA:241,42,2,24 BRDA:249,43,0,0 -BRDA:249,43,1,769 -BRDA:250,44,0,769 +BRDA:249,43,1,767 +BRDA:250,44,0,767 BRDA:250,44,1,198 BRDA:250,44,2,9 BRDA:250,44,3,9 @@ -12747,71 +12747,71 @@ FN:51,formatWithContentModel FN:75,(anonymous_1) FNF:2 FNH:2 -FNDA:292,formatWithContentModel -FNDA:189,(anonymous_1) +FNDA:290,formatWithContentModel +FNDA:187,(anonymous_1) DA:7,1 DA:9,1 DA:51,1 -DA:58,292 -DA:59,292 -DA:60,292 -DA:61,292 -DA:62,292 -DA:63,292 -DA:64,292 -DA:65,292 -DA:72,292 -DA:74,292 -DA:75,188 -DA:76,189 -DA:77,189 -DA:78,189 -DA:81,189 +DA:58,290 +DA:59,290 +DA:60,290 +DA:61,290 +DA:62,290 +DA:63,290 +DA:64,290 +DA:65,290 +DA:72,290 +DA:74,290 +DA:75,186 +DA:76,187 +DA:77,187 +DA:78,187 +DA:81,187 DA:82,16 DA:83,16 DA:85,16 DA:86,2 -DA:90,189 -DA:93,188 +DA:90,187 +DA:93,186 DA:94,6 DA:96,6 DA:97,3 -DA:100,182 -DA:110,188 +DA:100,180 +DA:110,186 LF:29 LH:29 -BRDA:64,0,0,292 +BRDA:64,0,0,290 BRDA:64,0,1,224 BRDA:66,1,0,8 -BRDA:66,1,1,284 -BRDA:74,2,0,188 +BRDA:66,1,1,282 +BRDA:74,2,0,186 BRDA:74,2,1,104 -BRDA:77,3,0,189 +BRDA:77,3,0,187 BRDA:77,3,1,0 BRDA:81,4,0,16 -BRDA:81,4,1,173 +BRDA:81,4,1,171 BRDA:85,5,0,2 BRDA:85,5,1,14 BRDA:85,6,0,16 BRDA:85,6,1,2 BRDA:90,7,0,172 -BRDA:90,7,1,17 -BRDA:90,8,0,189 -BRDA:90,8,1,189 +BRDA:90,7,1,15 +BRDA:90,8,0,187 +BRDA:90,8,1,187 BRDA:93,9,0,6 -BRDA:93,9,1,182 +BRDA:93,9,1,180 BRDA:96,10,0,3 BRDA:96,10,1,3 BRDA:97,11,0,0 BRDA:97,11,1,3 BRDA:97,12,0,3 BRDA:97,12,1,3 -BRDA:102,13,0,182 +BRDA:102,13,0,180 BRDA:102,13,1,169 BRDA:110,14,0,173 -BRDA:110,14,1,15 -BRDA:110,15,0,188 -BRDA:110,15,1,188 +BRDA:110,14,1,13 +BRDA:110,15,0,186 +BRDA:110,15,1,186 BRF:32 BRH:30 end_of_record @@ -12826,12 +12826,12 @@ FN:123,createFragmentFromClipboardData FN:166,(anonymous_6) FNF:7 FNH:5 -FNDA:6,paste -FNDA:6,(anonymous_1) -FNDA:6,(anonymous_2) -FNDA:6,createBeforePasteEvent +FNDA:4,paste +FNDA:4,(anonymous_1) +FNDA:4,(anonymous_2) +FNDA:4,createBeforePasteEvent FNDA:0,(anonymous_4) -FNDA:6,createFragmentFromClipboardData +FNDA:4,createFragmentFromClipboardData FNDA:0,(anonymous_6) DA:4,1 DA:5,1 @@ -12839,109 +12839,109 @@ DA:6,1 DA:8,1 DA:9,1 DA:35,1 -DA:38,10 -DA:39,10 -DA:40,10 -DA:42,6 -DA:44,5 +DA:38,7 +DA:39,7 +DA:40,7 +DA:42,4 +DA:44,3 DA:46,1 -DA:49,6 -DA:50,6 -DA:51,6 -DA:57,6 -DA:66,6 -DA:82,6 -DA:83,6 -DA:87,6 -DA:90,6 -DA:94,6 -DA:105,6 -DA:108,6 -DA:110,6 -DA:131,6 -DA:132,18 -DA:133,6 -DA:135,6 -DA:140,6 -DA:143,6 -DA:145,1 -DA:146,5 -DA:147,5 +DA:49,4 +DA:50,4 +DA:51,4 +DA:57,4 +DA:66,4 +DA:82,4 +DA:83,4 +DA:87,4 +DA:90,4 +DA:94,4 +DA:105,4 +DA:108,4 +DA:110,4 +DA:131,4 +DA:132,12 +DA:133,4 +DA:135,4 +DA:140,4 +DA:143,4 +DA:145,0 +DA:146,4 +DA:147,4 DA:148,0 DA:150,0 -DA:154,6 -DA:157,6 -DA:159,6 +DA:154,4 +DA:157,4 +DA:159,4 DA:166,1 DA:170,0 DA:171,0 DA:172,0 LF:43 -LH:38 -BRDA:38,0,0,4 -BRDA:38,0,1,2 -BRDA:39,1,0,4 -BRDA:39,1,1,2 -BRDA:40,2,0,4 -BRDA:40,2,1,2 -BRDA:42,3,0,5 +LH:37 +BRDA:38,0,0,3 +BRDA:38,0,1,1 +BRDA:39,1,0,3 +BRDA:39,1,1,1 +BRDA:40,2,0,3 +BRDA:40,2,1,1 +BRDA:42,3,0,3 BRDA:42,3,1,1 -BRDA:50,4,0,6 -BRDA:50,4,1,5 -BRDA:72,5,0,6 -BRDA:72,5,1,5 +BRDA:50,4,0,4 +BRDA:50,4,1,3 +BRDA:72,5,0,4 +BRDA:72,5,1,3 BRDA:72,6,0,1 -BRDA:72,6,1,5 -BRDA:72,7,0,6 -BRDA:72,7,1,6 +BRDA:72,6,1,3 +BRDA:72,7,0,4 +BRDA:72,7,1,4 BRDA:73,8,0,0 -BRDA:73,8,1,6 -BRDA:76,9,0,6 -BRDA:76,9,1,4 +BRDA:73,8,1,4 +BRDA:76,9,0,4 +BRDA:76,9,1,2 BRDA:76,10,0,1 -BRDA:76,10,1,5 -BRDA:76,11,0,6 -BRDA:76,11,1,6 +BRDA:76,10,1,3 +BRDA:76,11,0,4 +BRDA:76,11,1,4 BRDA:77,12,0,0 -BRDA:77,12,1,6 -BRDA:82,13,0,6 +BRDA:77,12,1,4 +BRDA:82,13,0,4 BRDA:82,13,1,0 BRDA:88,14,0,0 -BRDA:88,14,1,6 -BRDA:136,15,0,6 +BRDA:88,14,1,4 +BRDA:136,15,0,4 BRDA:136,15,1,0 -BRDA:143,16,0,1 -BRDA:143,16,1,5 -BRDA:143,17,0,6 -BRDA:143,17,1,1 -BRDA:143,17,2,5 -BRDA:143,17,3,5 +BRDA:143,16,0,0 +BRDA:143,16,1,4 +BRDA:143,17,0,4 +BRDA:143,17,1,0 +BRDA:143,17,2,4 +BRDA:143,17,3,4 BRDA:143,17,4,1 -BRDA:146,18,0,5 +BRDA:146,18,0,4 BRDA:146,18,1,0 -BRDA:146,19,0,5 +BRDA:146,19,0,4 BRDA:146,19,1,0 -BRDA:146,20,0,5 -BRDA:146,20,1,5 -BRDA:146,20,2,5 +BRDA:146,20,0,4 +BRDA:146,20,1,4 +BRDA:146,20,2,4 BRDA:147,21,0,0 -BRDA:147,21,1,5 -BRDA:147,22,0,5 -BRDA:147,22,1,5 +BRDA:147,21,1,4 +BRDA:147,22,0,4 +BRDA:147,22,1,4 BRDA:148,23,0,0 BRDA:148,23,1,0 BRDA:170,24,0,0 BRDA:170,24,1,0 BRF:54 -BRH:42 +BRH:40 end_of_record TN: SF:packages/roosterjs-color-utils/lib/index.ts FN:1,(anonymous_0) FNF:1 FNH:1 -FNDA:21,(anonymous_0) -DA:1,22 +FNDA:17,(anonymous_0) +DA:1,18 LF:1 LH:1 BRF:0 @@ -13039,7 +13039,7 @@ FNDA:0,(anonymous_18) FNDA:0,(anonymous_19) FNDA:0,(anonymous_20) FNDA:0,(anonymous_21) -FNDA:6,(anonymous_22) +FNDA:16,(anonymous_22) FNDA:0,(anonymous_23) FNDA:1,(anonymous_24) FNDA:1,(anonymous_25) @@ -13078,7 +13078,7 @@ DA:17,1 DA:18,1 DA:19,1 DA:20,1 -DA:21,7 +DA:21,17 DA:22,1 DA:23,2 DA:24,2 @@ -13108,48 +13108,48 @@ FN:21,(anonymous_1) FN:39,getCapitalizedText FN:67,(anonymous_3) FNF:4 -FNH:0 -FNDA:0,changeCapitalization -FNDA:0,(anonymous_1) -FNDA:0,getCapitalizedText -FNDA:0,(anonymous_3) +FNH:4 +FNDA:20,changeCapitalization +FNDA:24,(anonymous_1) +FNDA:25,getCapitalizedText +FNDA:6,(anonymous_3) DA:1,1 DA:3,1 DA:14,1 -DA:19,0 -DA:22,0 -DA:23,0 -DA:27,0 -DA:28,0 -DA:29,0 -DA:31,0 -DA:43,0 +DA:19,20 +DA:22,24 +DA:23,24 +DA:27,24 +DA:28,24 +DA:29,24 +DA:31,1 +DA:43,25 DA:44,0 -DA:46,0 -DA:48,0 -DA:50,0 -DA:52,0 -DA:53,0 -DA:54,0 -DA:57,0 -DA:60,0 -DA:66,0 -DA:67,0 -DA:68,0 +DA:46,25 +DA:48,3 +DA:50,14 +DA:52,6 +DA:53,5 +DA:54,14 +DA:57,5 +DA:60,2 +DA:66,2 +DA:67,2 +DA:68,6 DA:71,0 LF:24 -LH:3 -BRDA:27,0,0,0 +LH:22 +BRDA:27,0,0,24 BRDA:27,0,1,0 BRDA:43,1,0,0 -BRDA:43,1,1,0 -BRDA:47,2,0,0 -BRDA:47,2,1,0 -BRDA:47,2,2,0 -BRDA:47,2,3,0 +BRDA:43,1,1,25 +BRDA:47,2,0,3 +BRDA:47,2,1,14 +BRDA:47,2,2,6 +BRDA:47,2,3,2 BRDA:47,2,4,0 BRF:9 -BRH:0 +BRH:6 end_of_record TN: SF:packages/roosterjs-editor-api/lib/format/changeFontSize.ts @@ -13231,10 +13231,10 @@ SF:packages/roosterjs-editor-api/lib/format/clearBlockFormat.ts FN:8,clearBlockFormat FNF:1 FNH:1 -FNDA:14,clearBlockFormat +FNDA:15,clearBlockFormat DA:1,1 DA:8,1 -DA:9,14 +DA:9,15 LF:3 LH:3 BRF:0 @@ -13272,36 +13272,36 @@ FN:320,removeStyles FN:322,(anonymous_28) FN:339,clearFormat FNF:29 -FNH:19 -FNDA:0,isMultiBlockSelection -FNDA:84,clearNodeFormat -FNDA:43,(anonymous_2) -FNDA:18,clearAttribute +FNH:23 +FNDA:12,isMultiBlockSelection +FNDA:228,clearNodeFormat +FNDA:143,(anonymous_2) +FNDA:44,clearAttribute FNDA:4,updateStyles FNDA:5,(anonymous_5) FNDA:4,removeNonBorderStyles FNDA:5,(anonymous_7) FNDA:0,removeNotTableDefaultStyles FNDA:0,(anonymous_9) -FNDA:0,isNodeWholeBlock -FNDA:0,(anonymous_12) -FNDA:0,clearAutoDetectFormat -FNDA:14,clearBlockFormat -FNDA:14,(anonymous_15) -FNDA:15,(anonymous_16) -FNDA:2,clearInlineFormat -FNDA:2,(anonymous_18) +FNDA:6,isNodeWholeBlock +FNDA:4,(anonymous_12) +FNDA:12,clearAutoDetectFormat +FNDA:23,clearBlockFormat +FNDA:23,(anonymous_15) +FNDA:24,(anonymous_16) +FNDA:11,clearInlineFormat +FNDA:11,(anonymous_18) FNDA:0,(anonymous_19) -FNDA:2,setDefaultFontWeight -FNDA:2,(anonymous_21) -FNDA:16,setDefaultFormat -FNDA:2,(anonymous_23) +FNDA:9,setDefaultFontWeight +FNDA:13,(anonymous_21) +FNDA:34,setDefaultFormat +FNDA:4,(anonymous_23) FNDA:0,(anonymous_24) FNDA:0,(anonymous_25) FNDA:0,(anonymous_26) -FNDA:2,removeStyles -FNDA:8,(anonymous_28) -FNDA:16,clearFormat +FNDA:4,removeStyles +FNDA:16,(anonymous_28) +FNDA:38,clearFormat DA:1,1 DA:2,1 DA:3,1 @@ -13318,32 +13318,32 @@ DA:39,1 DA:40,1 DA:43,1 DA:44,1 -DA:51,0 -DA:52,0 -DA:53,0 +DA:51,12 +DA:52,12 +DA:53,12 DA:54,0 -DA:57,0 -DA:60,0 -DA:65,84 -DA:66,84 -DA:67,84 -DA:70,84 -DA:71,84 -DA:72,47 -DA:78,29 -DA:79,6 -DA:81,29 -DA:84,18 -DA:88,84 -DA:92,18 -DA:93,18 -DA:95,18 -DA:96,5 +DA:57,12 +DA:60,12 +DA:65,228 +DA:66,228 +DA:67,228 +DA:70,228 +DA:71,228 +DA:72,144 +DA:78,100 +DA:79,30 +DA:81,100 +DA:84,44 +DA:88,228 +DA:92,44 +DA:93,44 +DA:95,44 +DA:96,7 DA:97,0 -DA:98,5 +DA:98,7 DA:99,0 -DA:100,5 -DA:104,3 +DA:100,7 +DA:104,5 DA:117,4 DA:118,4 DA:120,5 @@ -13357,218 +13357,218 @@ DA:137,0 DA:138,0 DA:139,0 DA:140,0 -DA:151,0 -DA:152,0 -DA:153,0 -DA:154,0 -DA:155,0 -DA:157,0 -DA:158,0 -DA:159,0 -DA:160,0 -DA:163,0 -DA:165,0 -DA:167,0 -DA:177,0 -DA:178,0 -DA:179,0 -DA:180,0 -DA:182,0 -DA:185,0 -DA:186,0 -DA:187,0 -DA:190,0 -DA:199,14 -DA:202,14 -DA:203,15 -DA:204,15 -DA:206,15 +DA:151,6 +DA:152,6 +DA:153,12 +DA:154,4 +DA:155,2 +DA:157,2 +DA:158,2 +DA:159,4 +DA:160,2 +DA:163,2 +DA:165,8 +DA:167,2 +DA:177,12 +DA:178,12 +DA:179,8 +DA:180,8 +DA:182,8 +DA:185,8 +DA:186,4 +DA:187,4 +DA:190,8 +DA:199,23 +DA:202,23 +DA:203,24 +DA:204,24 +DA:206,24 DA:209,4 DA:210,4 DA:211,1 DA:212,1 -DA:216,15 -DA:221,7 -DA:222,7 -DA:225,15 -DA:227,14 -DA:234,2 -DA:235,2 -DA:236,2 -DA:237,2 +DA:216,24 +DA:221,11 +DA:222,11 +DA:225,24 +DA:227,23 +DA:234,11 +DA:235,11 +DA:236,11 +DA:237,11 DA:238,0 -DA:241,2 -DA:243,2 -DA:247,4 -DA:248,2 -DA:251,2 -DA:257,16 -DA:258,16 -DA:259,16 -DA:260,2 -DA:261,2 -DA:262,2 +DA:241,11 +DA:243,11 +DA:247,18 +DA:248,9 +DA:251,13 +DA:257,34 +DA:258,34 +DA:259,34 +DA:260,4 +DA:261,4 +DA:262,4 DA:264,0 DA:265,0 DA:266,0 DA:267,0 DA:268,0 -DA:275,16 -DA:276,2 -DA:277,2 -DA:279,2 -DA:280,2 -DA:282,2 +DA:275,34 +DA:276,14 +DA:277,14 +DA:279,14 +DA:280,14 +DA:282,14 DA:283,0 DA:289,0 DA:290,0 DA:293,0 DA:294,0 DA:296,0 -DA:299,2 +DA:299,14 DA:300,0 DA:301,0 DA:303,0 -DA:306,2 -DA:307,0 -DA:309,2 -DA:311,2 +DA:306,14 +DA:307,5 +DA:309,9 +DA:311,14 DA:312,0 -DA:314,2 +DA:314,14 DA:315,0 -DA:321,2 -DA:322,8 -DA:326,2 +DA:321,4 +DA:322,16 +DA:326,4 DA:327,0 DA:339,1 -DA:341,18 -DA:343,16 -DA:345,2 -DA:346,2 -DA:348,14 -DA:349,14 -DA:351,0 +DA:341,49 +DA:343,38 +DA:345,11 +DA:346,11 +DA:348,15 +DA:349,15 +DA:351,12 LF:146 -LH:93 +LH:121 BRDA:52,0,0,0 -BRDA:52,0,1,0 -BRDA:52,1,0,0 -BRDA:52,1,1,0 +BRDA:52,0,1,12 +BRDA:52,1,0,12 +BRDA:52,1,1,12 BRDA:53,2,0,0 -BRDA:53,2,1,0 +BRDA:53,2,1,12 BRDA:57,3,0,0 -BRDA:57,3,1,0 -BRDA:57,4,0,0 -BRDA:57,4,1,0 -BRDA:71,5,0,47 -BRDA:71,5,1,37 -BRDA:72,6,0,29 -BRDA:72,6,1,18 -BRDA:73,7,0,47 -BRDA:73,7,1,20 -BRDA:73,7,2,8 -BRDA:73,7,3,2 -BRDA:78,8,0,6 -BRDA:78,8,1,23 -BRDA:78,9,0,29 -BRDA:78,9,1,15 +BRDA:57,3,1,12 +BRDA:57,4,0,12 +BRDA:57,4,1,12 +BRDA:71,5,0,144 +BRDA:71,5,1,84 +BRDA:72,6,0,100 +BRDA:72,6,1,44 +BRDA:73,7,0,144 +BRDA:73,7,1,51 +BRDA:73,7,2,17 +BRDA:73,7,3,7 +BRDA:78,8,0,30 +BRDA:78,8,1,70 +BRDA:78,9,0,100 +BRDA:78,9,1,47 BRDA:96,10,0,0 -BRDA:96,10,1,5 -BRDA:96,11,0,5 +BRDA:96,10,1,7 +BRDA:96,11,0,7 BRDA:96,11,1,0 BRDA:98,12,0,0 -BRDA:98,12,1,5 -BRDA:98,13,0,5 +BRDA:98,12,1,7 +BRDA:98,13,0,7 BRDA:98,13,1,0 -BRDA:100,14,0,3 +BRDA:100,14,0,5 BRDA:100,14,1,2 -BRDA:101,15,0,5 -BRDA:101,15,1,3 +BRDA:101,15,0,7 +BRDA:101,15,1,5 BRDA:129,16,0,2 BRDA:129,16,1,3 BRDA:138,17,0,0 BRDA:138,17,1,0 -BRDA:153,18,0,0 -BRDA:153,18,1,0 -BRDA:153,19,0,0 -BRDA:153,19,1,0 -BRDA:154,20,0,0 -BRDA:154,20,1,0 +BRDA:153,18,0,4 +BRDA:153,18,1,8 +BRDA:153,19,0,12 +BRDA:153,19,1,8 +BRDA:154,20,0,2 +BRDA:154,20,1,2 BRDA:158,21,0,0 -BRDA:158,21,1,0 -BRDA:158,22,0,0 -BRDA:158,22,1,0 -BRDA:159,23,0,0 -BRDA:159,23,1,0 -BRDA:159,24,0,0 -BRDA:159,24,1,0 +BRDA:158,21,1,2 +BRDA:158,22,0,2 +BRDA:158,22,1,2 +BRDA:159,23,0,2 +BRDA:159,23,1,2 +BRDA:159,24,0,4 +BRDA:159,24,1,2 BRDA:159,25,0,0 -BRDA:159,25,1,0 -BRDA:159,26,0,0 -BRDA:159,26,1,0 -BRDA:152,27,0,0 -BRDA:152,27,1,0 -BRDA:178,28,0,0 -BRDA:178,28,1,0 +BRDA:159,25,1,2 +BRDA:159,26,0,2 +BRDA:159,26,1,2 +BRDA:152,27,0,14 +BRDA:152,27,1,14 +BRDA:178,28,0,8 +BRDA:178,28,1,4 BRDA:180,29,0,0 -BRDA:180,29,1,0 -BRDA:180,30,0,0 -BRDA:180,30,1,0 -BRDA:182,31,0,0 -BRDA:182,31,1,0 -BRDA:182,31,2,0 -BRDA:185,32,0,0 -BRDA:185,32,1,0 +BRDA:180,29,1,8 +BRDA:180,30,0,8 +BRDA:180,30,1,8 +BRDA:182,31,0,8 +BRDA:182,31,1,6 +BRDA:182,31,2,6 +BRDA:185,32,0,4 +BRDA:185,32,1,4 BRDA:206,33,0,4 -BRDA:206,33,1,11 +BRDA:206,33,1,20 BRDA:210,34,0,1 BRDA:210,34,1,3 -BRDA:217,35,0,22 -BRDA:217,35,1,21 -BRDA:217,35,2,21 -BRDA:222,36,0,7 +BRDA:217,35,0,35 +BRDA:217,35,1,33 +BRDA:217,35,2,33 +BRDA:222,36,0,11 BRDA:222,36,1,0 -BRDA:247,37,0,2 +BRDA:247,37,0,9 BRDA:247,37,1,0 -BRDA:261,38,0,2 +BRDA:261,38,0,4 BRDA:261,38,1,0 BRDA:267,39,0,0 BRDA:267,39,1,0 -BRDA:275,40,0,2 -BRDA:275,40,1,14 -BRDA:276,41,0,2 +BRDA:275,40,0,14 +BRDA:275,40,1,20 +BRDA:276,41,0,14 BRDA:276,41,1,0 -BRDA:279,42,0,2 +BRDA:279,42,0,14 BRDA:279,42,1,0 BRDA:282,43,0,0 -BRDA:282,43,1,2 +BRDA:282,43,1,14 BRDA:290,44,0,0 BRDA:290,44,1,0 BRDA:293,45,0,0 BRDA:293,45,1,0 BRDA:299,46,0,0 -BRDA:299,46,1,2 +BRDA:299,46,1,14 BRDA:300,47,0,0 BRDA:300,47,1,0 -BRDA:306,48,0,0 -BRDA:306,48,1,2 +BRDA:306,48,0,5 +BRDA:306,48,1,9 BRDA:311,49,0,0 -BRDA:311,49,1,2 +BRDA:311,49,1,14 BRDA:314,50,0,0 -BRDA:314,50,1,2 -BRDA:321,51,0,2 +BRDA:314,50,1,14 +BRDA:321,51,0,4 BRDA:321,51,1,0 BRDA:326,52,0,0 -BRDA:326,52,1,2 -BRDA:326,53,0,2 +BRDA:326,52,1,4 +BRDA:326,53,0,4 BRDA:326,53,1,0 -BRDA:341,54,0,2 -BRDA:341,54,1,14 -BRDA:344,55,0,2 -BRDA:344,55,1,14 -BRDA:344,55,2,0 +BRDA:341,54,0,11 +BRDA:341,54,1,27 +BRDA:344,55,0,11 +BRDA:344,55,1,15 +BRDA:344,55,2,12 BRF:117 -BRH:48 +BRH:85 end_of_record TN: SF:packages/roosterjs-editor-api/lib/format/createLink.ts @@ -14054,12 +14054,12 @@ FN:104,isList FN:108,alignList FN:111,(anonymous_7) FNF:8 -FNH:7 +FNH:8 FNDA:12,setAlignment FNDA:12,(anonymous_1) FNDA:3,alignTable FNDA:3,alignText -FNDA:0,(anonymous_4) +FNDA:3,(anonymous_4) FNDA:6,isList FNDA:6,alignList FNDA:6,(anonymous_7) @@ -14097,12 +14097,12 @@ DA:87,1 DA:88,1 DA:90,3 DA:91,3 -DA:92,0 -DA:93,0 +DA:92,3 +DA:93,3 DA:96,3 -DA:97,3 -DA:98,3 -DA:99,3 +DA:97,0 +DA:98,0 +DA:99,0 DA:105,6 DA:109,6 DA:112,6 @@ -14111,7 +14111,7 @@ DA:114,6 DA:115,6 DA:116,6 LF:47 -LH:45 +LH:44 BRDA:33,0,0,12 BRDA:33,0,1,12 BRDA:36,1,0,3 @@ -14131,9 +14131,9 @@ BRDA:83,7,0,1 BRDA:83,7,1,2 BRDA:86,8,0,1 BRDA:86,8,1,1 -BRDA:96,9,0,3 -BRDA:96,9,1,0 -BRDA:98,10,0,3 +BRDA:96,9,0,0 +BRDA:96,9,1,3 +BRDA:98,10,0,0 BRDA:98,10,1,0 BRDA:115,11,0,6 BRDA:115,11,1,0 @@ -14144,7 +14144,7 @@ BRDA:116,13,1,6 BRDA:116,14,0,6 BRDA:116,14,1,6 BRF:31 -BRH:27 +BRH:26 end_of_record TN: SF:packages/roosterjs-editor-api/lib/format/setBackgroundColor.ts @@ -14205,16 +14205,16 @@ FN:10,setFontName FN:16,(anonymous_1) FNF:2 FNH:2 -FNDA:3,setFontName -FNDA:4,(anonymous_1) +FNDA:15,setFontName +FNDA:40,(anonymous_1) DA:1,1 DA:10,1 -DA:13,3 -DA:17,4 +DA:13,15 +DA:17,40 LF:4 LH:4 BRDA:17,0,0,0 -BRDA:17,0,1,4 +BRDA:17,0,1,40 BRF:2 BRH:1 end_of_record @@ -14224,26 +14224,26 @@ FN:11,setFontSize FN:17,(anonymous_1) FNF:2 FNH:2 -FNDA:3,setFontSize -FNDA:4,(anonymous_1) +FNDA:15,setFontSize +FNDA:40,(anonymous_1) DA:1,1 DA:2,1 DA:11,1 -DA:14,3 -DA:18,4 -DA:19,4 -DA:20,4 +DA:14,15 +DA:18,40 +DA:19,40 +DA:20,40 DA:21,0 LF:8 LH:7 BRDA:18,0,0,0 -BRDA:18,0,1,4 +BRDA:18,0,1,40 BRDA:20,1,0,0 -BRDA:20,1,1,4 -BRDA:20,2,0,4 -BRDA:20,2,1,0 +BRDA:20,1,1,40 +BRDA:20,2,0,40 +BRDA:20,2,1,36 BRF:6 -BRH:3 +BRH:4 end_of_record TN: SF:packages/roosterjs-editor-api/lib/format/setImageAltText.ts @@ -14280,12 +14280,12 @@ FN:153,isFirstItem FN:160,shouldHandleWithBlockquotes FNF:10 FNH:10 -FNDA:6,setIndentation -FNDA:3,(anonymous_1) -FNDA:5,(anonymous_2) -FNDA:6,(anonymous_3) -FNDA:2,indent -FNDA:1,(anonymous_5) +FNDA:16,setIndentation +FNDA:13,(anonymous_1) +FNDA:15,(anonymous_2) +FNDA:16,(anonymous_3) +FNDA:12,indent +FNDA:12,(anonymous_5) FNDA:3,outdent FNDA:3,(anonymous_7) FNDA:2,isFirstItem @@ -14294,14 +14294,14 @@ DA:1,1 DA:2,1 DA:12,1 DA:37,1 -DA:41,6 -DA:43,6 -DA:46,3 -DA:47,3 -DA:49,3 -DA:50,4 -DA:51,4 -DA:57,4 +DA:41,16 +DA:43,16 +DA:46,13 +DA:47,13 +DA:49,13 +DA:50,15 +DA:51,15 +DA:57,15 DA:58,2 DA:59,0 DA:62,2 @@ -14313,10 +14313,10 @@ DA:76,0 DA:77,0 DA:86,0 DA:92,0 -DA:96,2 -DA:100,5 -DA:103,6 -DA:104,6 +DA:96,13 +DA:100,15 +DA:103,16 +DA:104,16 DA:109,3 DA:110,2 DA:111,2 @@ -14324,11 +14324,11 @@ DA:112,1 DA:114,1 DA:115,1 DA:117,3 -DA:120,3 -DA:126,2 -DA:127,2 -DA:128,2 -DA:129,2 +DA:120,13 +DA:126,12 +DA:127,12 +DA:128,12 +DA:129,12 DA:134,3 DA:135,3 DA:136,3 @@ -14343,10 +14343,10 @@ DA:154,2 DA:165,2 LF:51 LH:45 -BRDA:41,0,0,2 +BRDA:41,0,0,12 BRDA:41,0,1,4 BRDA:57,1,0,2 -BRDA:57,1,1,2 +BRDA:57,1,1,13 BRDA:58,2,0,2 BRDA:58,2,1,0 BRDA:66,3,0,2 @@ -14363,8 +14363,8 @@ BRDA:76,7,1,0 BRDA:78,8,0,0 BRDA:78,8,1,0 BRDA:104,9,0,3 -BRDA:104,9,1,3 -BRDA:105,10,0,6 +BRDA:104,9,1,13 +BRDA:105,10,0,16 BRDA:105,10,1,3 BRDA:105,10,2,3 BRDA:109,11,0,2 @@ -14462,9 +14462,9 @@ FN:26,(anonymous_3) FNF:4 FNH:3 FNDA:0,(anonymous_0) -FNDA:18,toggleBlockQuote -FNDA:20,(anonymous_2) -FNDA:18,(anonymous_3) +FNDA:19,toggleBlockQuote +FNDA:21,(anonymous_2) +FNDA:19,(anonymous_3) DA:1,1 DA:3,1 DA:5,1 @@ -14474,13 +14474,13 @@ DA:8,0 DA:9,0 DA:10,0 DA:19,1 -DA:20,18 -DA:23,20 -DA:24,20 -DA:26,18 +DA:20,19 +DA:23,21 +DA:24,21 +DA:26,19 LF:13 LH:9 -BRDA:24,0,0,20 +BRDA:24,0,0,21 BRDA:24,0,1,0 BRF:2 BRH:1 @@ -14490,10 +14490,10 @@ SF:packages/roosterjs-editor-api/lib/format/toggleBold.ts FN:12,toggleBold FNF:1 FNH:1 -FNDA:2,toggleBold +FNDA:11,toggleBold DA:1,1 DA:12,1 -DA:13,2 +DA:13,11 LF:3 LH:3 BRF:0 @@ -14614,10 +14614,10 @@ SF:packages/roosterjs-editor-api/lib/format/toggleItalic.ts FN:12,toggleItalic FNF:1 FNH:1 -FNDA:2,toggleItalic +FNDA:6,toggleItalic DA:1,1 DA:12,1 -DA:13,2 +DA:13,6 LF:3 LH:3 BRF:0 @@ -14684,10 +14684,10 @@ SF:packages/roosterjs-editor-api/lib/format/toggleUnderline.ts FN:12,toggleUnderline FNF:1 FNH:1 -FNDA:2,toggleUnderline +FNDA:6,toggleUnderline DA:1,1 DA:12,1 -DA:13,2 +DA:13,6 LF:3 LH:3 BRF:0 @@ -14903,19 +14903,19 @@ FN:55,(anonymous_3) FN:63,(anonymous_4) FNF:5 FNH:5 -FNDA:25,applyInlineStyle -FNDA:25,(anonymous_1) -FNDA:12,(anonymous_2) -FNDA:12,(anonymous_3) -FNDA:24,(anonymous_4) +FNDA:76,applyInlineStyle +FNDA:132,(anonymous_1) +FNDA:63,(anonymous_2) +FNDA:63,(anonymous_3) +FNDA:131,(anonymous_4) DA:1,1 DA:2,1 DA:17,1 -DA:22,25 -DA:23,25 -DA:25,25 -DA:26,25 -DA:28,25 +DA:22,76 +DA:23,76 +DA:25,76 +DA:26,132 +DA:28,76 DA:29,13 DA:30,13 DA:32,13 @@ -14924,29 +14924,29 @@ DA:36,1 DA:37,1 DA:39,12 DA:45,12 -DA:50,12 -DA:55,12 -DA:56,12 -DA:57,12 +DA:50,63 +DA:55,63 +DA:56,63 +DA:57,63 DA:58,0 -DA:60,12 -DA:61,12 -DA:62,24 -DA:63,24 -DA:64,24 -DA:65,24 -DA:66,24 -DA:68,24 -DA:72,12 -DA:73,12 +DA:60,63 +DA:61,63 +DA:62,134 +DA:63,134 +DA:64,131 +DA:65,131 +DA:66,131 +DA:68,134 +DA:72,63 +DA:73,63 LF:31 LH:30 -BRDA:26,0,0,25 -BRDA:26,0,1,25 +BRDA:26,0,0,132 +BRDA:26,0,1,132 BRDA:28,1,0,13 -BRDA:28,1,1,12 -BRDA:28,2,0,25 -BRDA:28,2,1,25 +BRDA:28,1,1,63 +BRDA:28,2,0,76 +BRDA:28,2,1,76 BRDA:32,3,0,13 BRDA:32,3,1,1 BRDA:32,3,2,0 @@ -14954,16 +14954,16 @@ BRDA:32,3,3,0 BRDA:35,4,0,1 BRDA:35,4,1,12 BRDA:57,5,0,0 -BRDA:57,5,1,12 -BRDA:60,6,0,12 -BRDA:60,6,1,12 -BRDA:65,7,0,24 -BRDA:65,7,1,12 -BRDA:72,8,0,12 +BRDA:57,5,1,63 +BRDA:60,6,0,63 +BRDA:60,6,1,63 +BRDA:65,7,0,131 +BRDA:65,7,1,63 +BRDA:72,8,0,63 BRDA:72,8,1,0 -BRDA:72,9,0,12 -BRDA:72,9,1,12 -BRDA:72,9,2,12 +BRDA:72,9,0,63 +BRDA:72,9,1,63 +BRDA:72,9,2,63 BRF:23 BRH:19 end_of_record @@ -14974,34 +14974,34 @@ FN:21,(anonymous_1) FN:41,applyStyleToListItems FN:42,(anonymous_3) FNF:4 -FNH:3 -FNDA:9,applyListItemStyleWrap -FNDA:12,(anonymous_1) -FNDA:9,applyStyleToListItems -FNDA:0,(anonymous_3) +FNH:4 +FNDA:40,applyListItemStyleWrap +FNDA:95,(anonymous_1) +FNDA:40,applyStyleToListItems +FNDA:3,(anonymous_3) DA:1,1 DA:3,1 DA:12,1 -DA:18,9 -DA:19,9 -DA:22,12 -DA:24,12 -DA:25,12 -DA:26,0 -DA:32,9 -DA:42,9 -DA:43,0 -DA:44,0 +DA:18,40 +DA:19,40 +DA:22,95 +DA:24,95 +DA:25,95 +DA:26,3 +DA:32,40 +DA:42,40 +DA:43,3 +DA:44,3 LF:13 -LH:10 -BRDA:25,0,0,0 -BRDA:25,0,1,12 -BRDA:25,1,0,12 -BRDA:25,1,1,0 -BRDA:43,2,0,0 +LH:13 +BRDA:25,0,0,3 +BRDA:25,0,1,92 +BRDA:25,1,0,95 +BRDA:25,1,1,3 +BRDA:43,2,0,3 BRDA:43,2,1,0 BRF:6 -BRH:2 +BRH:5 end_of_record TN: SF:packages/roosterjs-editor-api/lib/utils/blockFormat.ts @@ -15010,42 +15010,42 @@ FN:25,(anonymous_1) FN:30,(anonymous_2) FNF:3 FNH:3 -FNDA:48,blockFormat -FNDA:48,(anonymous_1) -FNDA:48,(anonymous_2) +FNDA:68,blockFormat +FNDA:68,(anonymous_1) +FNDA:68,(anonymous_2) DA:1,1 DA:2,1 DA:4,1 DA:9,1 -DA:20,48 -DA:21,48 -DA:23,48 -DA:26,48 -DA:27,42 -DA:28,42 -DA:29,42 -DA:30,48 -DA:31,42 -DA:34,48 -DA:35,45 +DA:20,68 +DA:21,68 +DA:23,68 +DA:26,68 +DA:27,62 +DA:28,62 +DA:29,62 +DA:30,68 +DA:31,62 +DA:34,68 +DA:35,65 DA:37,3 LF:16 LH:16 -BRDA:26,0,0,42 +BRDA:26,0,0,62 BRDA:26,0,1,6 -BRDA:26,1,0,48 -BRDA:26,1,1,24 -BRDA:28,2,0,42 +BRDA:26,1,0,68 +BRDA:26,1,1,35 +BRDA:28,2,0,62 BRDA:28,2,1,0 BRDA:29,3,0,0 -BRDA:29,3,1,42 -BRDA:29,4,0,42 -BRDA:29,4,1,42 -BRDA:34,5,0,45 +BRDA:29,3,1,62 +BRDA:29,4,0,62 +BRDA:29,4,1,62 +BRDA:34,5,0,65 BRDA:34,5,1,3 -BRDA:34,6,0,48 -BRDA:34,6,1,45 -BRDA:34,6,2,45 +BRDA:34,6,0,68 +BRDA:34,6,1,65 +BRDA:34,6,2,65 BRF:15 BRH:13 end_of_record @@ -15056,42 +15056,42 @@ FN:30,(anonymous_1) FN:47,(anonymous_2) FNF:3 FNH:3 -FNDA:18,blockWrap -FNDA:20,(anonymous_1) +FNDA:19,blockWrap +FNDA:21,(anonymous_1) FNDA:4,(anonymous_2) DA:1,1 DA:3,1 DA:22,1 -DA:28,18 -DA:31,20 -DA:32,20 -DA:33,20 -DA:34,20 -DA:35,12 -DA:36,12 +DA:28,19 +DA:31,21 +DA:32,21 +DA:33,21 +DA:34,21 +DA:35,13 +DA:36,13 DA:37,0 -DA:38,12 +DA:38,13 DA:39,0 -DA:43,20 +DA:43,21 DA:47,4 DA:49,0 DA:50,0 -DA:53,20 +DA:53,21 LF:18 LH:14 -BRDA:33,0,0,20 +BRDA:33,0,0,21 BRDA:33,0,1,0 -BRDA:34,1,0,12 +BRDA:34,1,0,13 BRDA:34,1,1,8 BRDA:36,2,0,0 -BRDA:36,2,1,12 +BRDA:36,2,1,13 BRDA:38,3,0,0 -BRDA:38,3,1,12 -BRDA:38,4,0,12 -BRDA:38,4,1,12 -BRDA:44,5,0,20 -BRDA:44,5,1,20 -BRDA:44,5,2,20 +BRDA:38,3,1,13 +BRDA:38,4,0,13 +BRDA:38,4,1,13 +BRDA:44,5,0,21 +BRDA:44,5,1,21 +BRDA:44,5,2,21 BRDA:44,5,3,2 BRDA:50,6,0,0 BRDA:50,6,1,0 @@ -15142,11 +15142,11 @@ FN:9,commitListChains FN:21,(anonymous_1) FNF:2 FNH:2 -FNDA:42,commitListChains +FNDA:62,commitListChains FNDA:7,(anonymous_1) DA:2,1 DA:9,1 -DA:10,42 +DA:10,62 DA:11,6 DA:12,6 DA:13,6 @@ -15160,11 +15160,11 @@ DA:35,1 LF:13 LH:13 BRDA:10,0,0,6 -BRDA:10,0,1,36 +BRDA:10,0,1,56 BRDA:10,1,0,0 -BRDA:10,1,1,42 -BRDA:10,2,0,42 -BRDA:10,2,1,42 +BRDA:10,1,1,62 +BRDA:10,2,0,62 +BRDA:10,2,1,62 BRDA:12,3,0,6 BRDA:12,3,1,6 BRDA:13,4,0,6 @@ -15184,19 +15184,19 @@ FN:36,(anonymous_2) FN:48,(anonymous_3) FN:51,(anonymous_4) FNF:5 -FNH:3 -FNDA:14,execCommand -FNDA:14,(anonymous_1) +FNH:5 +FNDA:40,execCommand +FNDA:40,(anonymous_1) FNDA:84,(anonymous_2) -FNDA:0,(anonymous_3) -FNDA:0,(anonymous_4) +FNDA:26,(anonymous_3) +FNDA:26,(anonymous_4) DA:1,1 DA:2,1 DA:21,1 -DA:26,14 -DA:28,14 -DA:30,14 -DA:31,14 +DA:26,40 +DA:28,40 +DA:30,40 +DA:31,40 DA:32,14 DA:33,14 DA:34,14 @@ -15205,43 +15205,43 @@ DA:36,84 DA:39,14 DA:40,9 DA:41,9 -DA:46,0 -DA:49,0 -DA:51,0 -DA:52,0 +DA:46,26 +DA:49,26 +DA:51,26 +DA:52,26 DA:53,0 -DA:55,0 -DA:58,0 +DA:55,26 +DA:58,26 DA:59,0 LF:23 -LH:15 +LH:21 BRDA:31,0,0,14 -BRDA:31,0,1,0 -BRDA:31,1,0,14 -BRDA:31,1,1,14 +BRDA:31,0,1,26 +BRDA:31,1,0,40 +BRDA:31,1,1,40 BRDA:39,2,0,9 BRDA:39,2,1,5 BRDA:52,3,0,0 -BRDA:52,3,1,0 +BRDA:52,3,1,26 BRDA:58,4,0,0 -BRDA:58,4,1,0 +BRDA:58,4,1,26 BRF:10 -BRH:5 +BRH:8 end_of_record TN: SF:packages/roosterjs-editor-api/lib/utils/formatUndoSnapshot.ts FN:11,formatUndoSnapshot FNF:1 FNH:1 -FNDA:108,formatUndoSnapshot +FNDA:214,formatUndoSnapshot DA:11,1 -DA:16,108 +DA:16,214 LF:2 LH:2 -BRDA:21,0,0,94 -BRDA:21,0,1,14 -BRDA:20,1,0,108 -BRDA:20,1,1,94 +BRDA:21,0,0,182 +BRDA:21,0,1,32 +BRDA:20,1,0,214 +BRDA:20,1,1,182 BRF:4 BRH:4 end_of_record @@ -15251,47 +15251,47 @@ FN:9,normalizeBlockquote FN:49,isRTL FNF:2 FNH:2 -FNDA:9,normalizeBlockquote -FNDA:6,isRTL +FNDA:20,normalizeBlockquote +FNDA:17,isRTL DA:1,1 DA:9,1 -DA:10,9 -DA:11,9 -DA:13,9 -DA:14,9 +DA:10,20 +DA:11,20 +DA:13,20 +DA:14,20 DA:15,3 -DA:17,6 -DA:19,6 -DA:20,6 -DA:21,1 -DA:23,5 -DA:26,5 -DA:27,5 +DA:17,17 +DA:19,17 +DA:20,17 +DA:21,2 +DA:23,15 +DA:26,15 +DA:27,15 DA:28,2 DA:29,1 DA:30,1 DA:32,1 DA:33,1 -DA:36,3 -DA:37,3 -DA:40,5 -DA:50,6 +DA:36,13 +DA:37,13 +DA:40,15 +DA:50,17 LF:23 LH:23 -BRDA:10,0,0,9 +BRDA:10,0,0,20 BRDA:10,0,1,0 BRDA:14,1,0,3 -BRDA:14,1,1,6 -BRDA:19,2,0,6 +BRDA:14,1,1,17 +BRDA:19,2,0,17 BRDA:19,2,1,0 -BRDA:20,3,0,1 -BRDA:20,3,1,5 +BRDA:20,3,0,2 +BRDA:20,3,1,15 BRDA:27,4,0,2 -BRDA:27,4,1,3 +BRDA:27,4,1,13 BRDA:28,5,0,1 BRDA:28,5,1,1 -BRDA:50,6,0,6 -BRDA:50,6,1,6 +BRDA:50,6,0,17 +BRDA:50,6,1,17 BRF:14 BRH:12 end_of_record @@ -15374,11 +15374,11 @@ FN:4,(anonymous_2) FN:5,(anonymous_3) FNF:4 FNH:4 -FNDA:4570,(anonymous_0) +FNDA:4753,(anonymous_0) FNDA:1,(anonymous_1) FNDA:150,(anonymous_2) FNDA:30,(anonymous_3) -DA:2,4571 +DA:2,4754 DA:3,2 DA:4,151 DA:5,31 @@ -15394,110 +15394,110 @@ FN:87,addUndoSnapshotInternal FN:110,createContentMetadata FNF:3 FNH:3 -FNDA:4859,(anonymous_0) -FNDA:4992,addUndoSnapshotInternal -FNDA:4990,createContentMetadata +FNDA:5160,(anonymous_0) +FNDA:5279,addUndoSnapshotInternal +FNDA:5277,createContentMetadata DA:2,1 DA:27,1 -DA:34,4859 -DA:35,4859 -DA:38,4859 -DA:39,4831 -DA:43,4831 -DA:44,4830 -DA:48,4859 -DA:49,4859 -DA:50,185 -DA:51,185 -DA:56,184 -DA:57,162 -DA:58,162 -DA:62,4859 -DA:63,4831 -DA:67,4858 -DA:68,168 -DA:74,168 -DA:77,4858 +DA:34,5160 +DA:35,5160 +DA:38,5160 +DA:39,5068 +DA:43,5068 +DA:44,5067 +DA:48,5160 +DA:49,5160 +DA:50,299 +DA:51,299 +DA:56,298 +DA:57,212 +DA:58,212 +DA:62,5160 +DA:63,5068 +DA:67,5159 +DA:68,268 +DA:74,268 +DA:77,5159 DA:78,18 DA:80,18 DA:81,18 DA:82,18 -DA:92,4992 -DA:93,4990 -DA:94,4990 -DA:95,4990 -DA:97,4990 -DA:106,4990 -DA:115,4990 +DA:92,5279 +DA:93,5277 +DA:94,5277 +DA:95,5277 +DA:97,5277 +DA:106,5277 +DA:115,5277 DA:117,22 -DA:124,38 -DA:130,4930 +DA:124,14 +DA:130,5241 LF:35 LH:35 -BRDA:38,0,0,4831 -BRDA:38,0,1,28 -BRDA:43,1,0,4830 +BRDA:38,0,0,5068 +BRDA:38,0,1,92 +BRDA:43,1,0,5067 BRDA:43,1,1,1 -BRDA:43,2,0,4831 -BRDA:43,2,1,4656 +BRDA:43,2,0,5068 +BRDA:43,2,1,4841 BRDA:43,2,2,1 -BRDA:43,3,0,4651 +BRDA:43,3,0,4836 BRDA:43,3,1,5 -BRDA:43,4,0,4656 -BRDA:43,4,1,4656 -BRDA:44,5,0,4830 +BRDA:43,4,0,4841 +BRDA:43,4,1,4841 +BRDA:44,5,0,5067 BRDA:44,5,1,0 -BRDA:44,6,0,4830 -BRDA:44,6,1,4830 -BRDA:44,7,0,4736 -BRDA:44,7,1,94 -BRDA:44,8,0,4830 -BRDA:44,8,1,4830 -BRDA:49,9,0,185 -BRDA:49,9,1,4674 -BRDA:52,10,0,185 -BRDA:52,10,1,151 -BRDA:53,11,0,185 -BRDA:53,11,1,151 -BRDA:56,12,0,162 -BRDA:56,12,1,22 -BRDA:57,13,0,161 +BRDA:44,6,0,5067 +BRDA:44,6,1,5067 +BRDA:44,7,0,4933 +BRDA:44,7,1,134 +BRDA:44,8,0,5067 +BRDA:44,8,1,5067 +BRDA:49,9,0,299 +BRDA:49,9,1,4861 +BRDA:52,10,0,299 +BRDA:52,10,1,277 +BRDA:53,11,0,299 +BRDA:53,11,1,277 +BRDA:56,12,0,212 +BRDA:56,12,1,86 +BRDA:57,13,0,211 BRDA:57,13,1,1 -BRDA:57,14,0,162 -BRDA:57,14,1,162 -BRDA:57,15,0,67 -BRDA:57,15,1,95 -BRDA:57,16,0,162 -BRDA:57,16,1,162 -BRDA:62,17,0,4831 -BRDA:62,17,1,28 -BRDA:67,18,0,168 -BRDA:67,18,1,4690 -BRDA:67,19,0,4858 -BRDA:67,19,1,184 +BRDA:57,14,0,212 +BRDA:57,14,1,212 +BRDA:57,15,0,77 +BRDA:57,15,1,135 +BRDA:57,16,0,212 +BRDA:57,16,1,212 +BRDA:62,17,0,5068 +BRDA:62,17,1,92 +BRDA:67,18,0,268 +BRDA:67,18,1,4891 +BRDA:67,19,0,5159 +BRDA:67,19,1,298 BRDA:77,20,0,18 -BRDA:77,20,1,4840 +BRDA:77,20,1,5141 BRDA:80,21,0,18 BRDA:80,21,1,0 -BRDA:92,22,0,4990 +BRDA:92,22,0,5277 BRDA:92,22,1,2 -BRDA:95,23,0,4990 +BRDA:95,23,0,5277 BRDA:95,23,1,0 -BRDA:101,24,0,4990 +BRDA:101,24,0,5277 BRDA:101,24,1,0 BRDA:101,25,0,0 -BRDA:101,25,1,4990 -BRDA:101,26,0,4990 -BRDA:101,26,1,4990 +BRDA:101,25,1,5277 +BRDA:101,26,0,5277 +BRDA:101,26,1,5277 BRDA:116,27,0,22 -BRDA:116,27,1,38 -BRDA:116,27,2,4930 +BRDA:116,27,1,14 +BRDA:116,27,2,5241 BRDA:115,28,0,0 -BRDA:115,28,1,4990 -BRDA:115,29,0,4990 -BRDA:115,29,1,4990 -BRDA:135,30,0,4930 -BRDA:135,30,1,4677 +BRDA:115,28,1,5277 +BRDA:115,29,0,5277 +BRDA:115,29,1,5277 +BRDA:135,30,0,5241 +BRDA:135,30,1,4864 BRF:64 BRH:58 end_of_record @@ -15512,48 +15512,48 @@ FN:47,(anonymous_5) FN:50,extractHandler FNF:7 FNH:7 -FNDA:13922,(anonymous_0) -FNDA:69476,(anonymous_1) -FNDA:651,(anonymous_2) -FNDA:68846,(anonymous_3) -FNDA:13792,(anonymous_4) -FNDA:68846,(anonymous_5) -FNDA:69476,extractHandler +FNDA:14483,(anonymous_0) +FNDA:72281,(anonymous_1) +FNDA:269,(anonymous_2) +FNDA:71471,(anonymous_3) +FNDA:14317,(anonymous_4) +FNDA:71471,(anonymous_5) +FNDA:72281,extractHandler DA:1,1 DA:18,1 -DA:22,13922 -DA:23,69476 -DA:24,69476 -DA:25,69476 -DA:26,651 -DA:27,622 -DA:29,651 -DA:30,42 -DA:41,69476 -DA:43,69476 -DA:44,68846 -DA:47,68846 -DA:51,69476 -DA:56,69476 -DA:57,4631 -DA:58,64845 -DA:59,46342 -DA:60,18503 -DA:61,18503 -DA:63,69476 +DA:22,14483 +DA:23,72281 +DA:24,72281 +DA:25,72281 +DA:26,269 +DA:27,240 +DA:29,269 +DA:30,67 +DA:41,72281 +DA:43,72281 +DA:44,71471 +DA:47,71471 +DA:51,72281 +DA:56,72281 +DA:57,4818 +DA:58,67463 +DA:59,48212 +DA:60,19251 +DA:61,19251 +DA:63,72281 LF:22 LH:22 -BRDA:22,0,0,13922 +BRDA:22,0,0,14483 BRDA:22,0,1,1 -BRDA:26,1,0,622 +BRDA:26,1,0,240 BRDA:26,1,1,29 -BRDA:29,2,0,42 -BRDA:29,2,1,609 -BRDA:56,3,0,4631 -BRDA:56,3,1,64845 -BRDA:58,4,0,46342 -BRDA:58,4,1,18503 -BRDA:60,5,0,18503 +BRDA:29,2,0,67 +BRDA:29,2,1,202 +BRDA:56,3,0,4818 +BRDA:56,3,1,67463 +BRDA:58,4,0,48212 +BRDA:58,4,1,19251 +BRDA:60,5,0,19251 BRDA:60,5,1,0 BRF:12 BRH:11 @@ -15625,38 +15625,38 @@ FN:25,(anonymous_0) FN:88,wasNodeJustCreatedByKeyboardEvent FNF:2 FNH:2 -FNDA:4639,(anonymous_0) +FNDA:4826,(anonymous_0) FNDA:3,wasNodeJustCreatedByKeyboardEvent DA:9,1 DA:25,1 -DA:30,4639 -DA:33,4639 +DA:30,4826 +DA:33,4826 DA:34,1 -DA:36,4639 -DA:38,4639 -DA:41,4639 +DA:36,4826 +DA:38,4826 +DA:41,4826 DA:42,12 DA:43,12 DA:44,2 DA:45,2 DA:51,12 DA:53,12 -DA:58,4627 -DA:62,4627 -DA:70,4627 -DA:73,4639 -DA:74,4627 -DA:83,4639 +DA:58,4814 +DA:62,4814 +DA:70,4814 +DA:73,4826 +DA:74,4814 +DA:83,4826 DA:84,5 DA:89,3 LF:22 LH:22 BRDA:33,0,0,1 -BRDA:33,0,1,4638 -BRDA:33,1,0,4639 +BRDA:33,0,1,4825 +BRDA:33,1,0,4826 BRDA:33,1,1,1 BRDA:41,2,0,12 -BRDA:41,2,1,4627 +BRDA:41,2,1,4814 BRDA:43,3,0,2 BRDA:43,3,1,10 BRDA:51,4,0,12 @@ -15666,12 +15666,12 @@ BRDA:53,5,0,4 BRDA:53,5,1,8 BRDA:53,6,0,12 BRDA:53,6,1,12 -BRDA:73,7,0,4627 +BRDA:73,7,0,4814 BRDA:73,7,1,12 -BRDA:73,8,0,4639 -BRDA:73,8,1,4631 +BRDA:73,8,0,4826 +BRDA:73,8,1,4818 BRDA:83,9,0,5 -BRDA:83,9,1,4634 +BRDA:83,9,1,4821 BRDA:90,10,0,3 BRDA:90,10,1,3 BRDA:90,10,2,3 @@ -15683,33 +15683,33 @@ SF:packages/roosterjs-editor-core/lib/coreApi/focus.ts FN:9,(anonymous_0) FNF:1 FNH:1 -FNDA:310,(anonymous_0) +FNDA:437,(anonymous_0) DA:1,1 DA:9,1 -DA:10,310 -DA:11,310 -DA:22,169 -DA:26,167 -DA:27,167 -DA:36,310 -DA:39,310 -DA:40,3 +DA:10,437 +DA:11,437 +DA:22,178 +DA:26,177 +DA:27,177 +DA:36,437 +DA:39,437 +DA:40,2 LF:10 LH:10 -BRDA:10,0,0,310 +BRDA:10,0,0,437 BRDA:10,0,1,0 -BRDA:11,1,0,169 -BRDA:11,1,1,141 -BRDA:12,2,0,310 -BRDA:12,2,1,141 -BRDA:22,3,0,167 -BRDA:22,3,1,2 -BRDA:23,4,0,169 -BRDA:23,4,1,3 -BRDA:26,5,0,167 +BRDA:11,1,0,178 +BRDA:11,1,1,259 +BRDA:12,2,0,437 +BRDA:12,2,1,259 +BRDA:22,3,0,177 +BRDA:22,3,1,1 +BRDA:23,4,0,178 +BRDA:23,4,1,2 +BRDA:26,5,0,177 BRDA:26,5,1,7 -BRDA:39,6,0,3 -BRDA:39,6,1,307 +BRDA:39,6,0,2 +BRDA:39,6,1,435 BRF:14 BRH:13 end_of_record @@ -15719,62 +15719,62 @@ FN:24,(anonymous_0) FN:86,cloneNode FNF:2 FNH:2 -FNDA:125,(anonymous_0) -FNDA:124,cloneNode +FNDA:191,(anonymous_0) +FNDA:190,cloneNode DA:8,1 DA:24,1 -DA:28,125 -DA:29,125 -DA:30,125 -DA:34,125 -DA:36,125 +DA:28,191 +DA:29,191 +DA:30,191 +DA:34,191 +DA:36,191 DA:37,1 -DA:38,124 +DA:38,190 DA:39,0 -DA:41,124 -DA:42,124 -DA:44,124 -DA:45,124 -DA:52,124 -DA:54,124 -DA:64,124 -DA:65,118 -DA:74,118 +DA:41,190 +DA:42,190 +DA:44,190 +DA:45,190 +DA:52,190 +DA:54,190 +DA:64,190 +DA:65,184 +DA:74,184 DA:75,6 DA:77,3 DA:79,3 -DA:83,125 -DA:88,124 +DA:83,191 +DA:88,190 DA:89,2 DA:90,2 -DA:92,122 -DA:95,124 +DA:92,188 +DA:95,190 LF:28 LH:27 -BRDA:34,0,0,125 -BRDA:34,0,1,123 +BRDA:34,0,0,191 +BRDA:34,0,1,189 BRDA:36,1,0,1 -BRDA:36,1,1,124 +BRDA:36,1,1,190 BRDA:38,2,0,0 -BRDA:38,2,1,124 -BRDA:46,3,0,121 +BRDA:38,2,1,190 +BRDA:46,3,0,187 BRDA:46,3,1,3 BRDA:48,4,0,1 BRDA:48,4,1,2 BRDA:50,5,0,2 BRDA:50,5,1,0 -BRDA:52,6,0,124 +BRDA:52,6,0,190 BRDA:52,6,1,3 -BRDA:64,7,0,118 +BRDA:64,7,0,184 BRDA:64,7,1,6 BRDA:75,8,0,3 BRDA:75,8,1,3 -BRDA:83,9,0,125 +BRDA:83,9,0,191 BRDA:83,9,1,0 -BRDA:83,10,0,125 -BRDA:83,10,1,125 +BRDA:83,10,0,191 +BRDA:83,10,1,191 BRDA:88,11,0,2 -BRDA:88,11,1,122 +BRDA:88,11,1,188 BRF:24 BRH:21 end_of_record @@ -15927,46 +15927,46 @@ SF:packages/roosterjs-editor-core/lib/coreApi/getSelectionRange.ts FN:11,(anonymous_0) FNF:1 FNH:1 -FNDA:1027,(anonymous_0) +FNDA:1088,(anonymous_0) DA:1,1 DA:11,1 -DA:15,1027 -DA:17,1027 +DA:15,1088 +DA:17,1088 DA:18,0 DA:26,0 -DA:28,1027 -DA:29,930 -DA:30,930 -DA:31,930 -DA:32,930 -DA:33,922 -DA:38,1027 -DA:39,99 -DA:42,1027 +DA:28,1088 +DA:29,1007 +DA:30,1007 +DA:31,1007 +DA:32,1007 +DA:33,1002 +DA:38,1088 +DA:39,81 +DA:42,1088 LF:15 LH:13 BRDA:17,0,0,0 -BRDA:17,0,1,1027 +BRDA:17,0,1,1088 BRDA:19,1,0,0 BRDA:19,1,1,0 -BRDA:28,2,0,930 -BRDA:28,2,1,97 -BRDA:28,3,0,1027 -BRDA:28,3,1,574 +BRDA:28,2,0,1007 +BRDA:28,2,1,81 +BRDA:28,3,0,1088 +BRDA:28,3,1,802 BRDA:29,4,0,0 -BRDA:29,4,1,930 -BRDA:29,5,0,930 -BRDA:29,5,1,930 -BRDA:30,6,0,930 +BRDA:29,4,1,1007 +BRDA:29,5,0,1007 +BRDA:29,5,1,1007 +BRDA:30,6,0,1007 BRDA:30,6,1,0 -BRDA:30,7,0,930 -BRDA:30,7,1,930 -BRDA:32,8,0,922 -BRDA:32,8,1,8 -BRDA:38,9,0,99 -BRDA:38,9,1,928 -BRDA:38,10,0,1027 -BRDA:38,10,1,105 +BRDA:30,7,0,1007 +BRDA:30,7,1,1007 +BRDA:32,8,0,1002 +BRDA:32,8,1,5 +BRDA:38,9,0,81 +BRDA:38,9,1,1007 +BRDA:38,10,0,1088 +BRDA:38,10,1,86 BRF:22 BRH:17 end_of_record @@ -15980,16 +15980,16 @@ FN:103,checkAllCollapsed FN:104,(anonymous_5) FNF:6 FNH:6 -FNDA:5545,(anonymous_0) +FNDA:6003,(anonymous_0) FNDA:3,(anonymous_1) FNDA:1,(anonymous_2) -FNDA:5405,createNormalSelectionEx -FNDA:5407,checkAllCollapsed -FNDA:596,(anonymous_5) +FNDA:5887,createNormalSelectionEx +FNDA:5889,checkAllCollapsed +FNDA:889,(anonymous_5) DA:1,1 DA:15,1 -DA:16,5545 -DA:17,5545 +DA:16,6003 +DA:17,6003 DA:19,3 DA:20,3 DA:21,3 @@ -16004,23 +16004,23 @@ DA:42,1 DA:44,1 DA:57,1 DA:64,1 -DA:67,5542 -DA:68,695 +DA:67,6000 +DA:68,996 DA:69,83 -DA:72,612 +DA:72,913 DA:73,30 -DA:76,582 -DA:77,582 -DA:78,582 -DA:79,582 -DA:80,582 -DA:85,4847 -DA:96,5405 -DA:104,5407 +DA:76,883 +DA:77,883 +DA:78,883 +DA:79,883 +DA:80,883 +DA:85,5004 +DA:96,5887 +DA:104,5889 LF:31 LH:31 BRDA:17,0,0,3 -BRDA:17,0,1,5542 +BRDA:17,0,1,6000 BRDA:24,1,0,1 BRDA:24,1,1,2 BRDA:24,2,0,3 @@ -16041,37 +16041,37 @@ BRDA:57,9,0,1 BRDA:57,9,1,1 BRDA:64,10,0,1 BRDA:64,10,1,0 -BRDA:67,11,0,695 -BRDA:67,11,1,4847 +BRDA:67,11,0,996 +BRDA:67,11,1,5004 BRDA:68,12,0,83 -BRDA:68,12,1,612 +BRDA:68,12,1,913 BRDA:72,13,0,30 -BRDA:72,13,1,582 +BRDA:72,13,1,883 BRDA:76,14,0,0 -BRDA:76,14,1,582 -BRDA:76,15,0,582 -BRDA:76,15,1,582 -BRDA:77,16,0,582 +BRDA:76,14,1,883 +BRDA:76,15,0,883 +BRDA:76,15,1,883 +BRDA:77,16,0,883 BRDA:77,16,1,0 -BRDA:77,17,0,582 -BRDA:77,17,1,582 -BRDA:77,17,2,582 -BRDA:79,18,0,582 +BRDA:77,17,0,883 +BRDA:77,17,1,883 +BRDA:77,17,2,883 +BRDA:79,18,0,883 BRDA:79,18,1,0 -BRDA:87,19,0,25 -BRDA:87,19,1,4822 -BRDA:86,20,0,4847 -BRDA:86,20,1,25 +BRDA:87,19,0,1 +BRDA:87,19,1,5003 +BRDA:86,20,0,5004 +BRDA:86,20,1,1 BRDA:86,21,0,0 -BRDA:86,21,1,4847 -BRDA:86,22,0,4847 +BRDA:86,21,1,5004 +BRDA:86,22,0,5004 BRDA:86,22,1,0 -BRDA:89,23,0,9 -BRDA:89,23,1,4813 +BRDA:89,23,0,1 +BRDA:89,23,1,5002 BRDA:104,24,0,0 -BRDA:104,24,1,596 -BRDA:104,25,0,596 -BRDA:104,25,1,596 +BRDA:104,24,1,889 +BRDA:104,25,0,889 +BRDA:104,25,1,889 BRF:53 BRH:46 end_of_record @@ -16150,15 +16150,15 @@ SF:packages/roosterjs-editor-core/lib/coreApi/hasFocus.ts FN:10,(anonymous_0) FNF:1 FNH:1 -FNDA:7492,(anonymous_0) +FNDA:8559,(anonymous_0) DA:1,1 DA:10,1 -DA:11,7492 -DA:12,7492 +DA:11,8559 +DA:12,8559 LF:4 LH:4 -BRDA:13,0,0,7492 -BRDA:13,0,1,7492 +BRDA:13,0,0,8559 +BRDA:13,0,1,8559 BRF:2 BRH:2 end_of_record @@ -16170,36 +16170,36 @@ FN:82,(anonymous_2) FN:200,adjustInsertPositionRegionRoot FN:224,adjustInsertPositionNewLine FNF:5 -FNH:4 -FNDA:22,getInitialRange -FNDA:4672,(anonymous_1) -FNDA:4671,(anonymous_2) +FNH:5 +FNDA:43,getInitialRange +FNDA:4880,(anonymous_1) +FNDA:4879,(anonymous_2) FNDA:1,adjustInsertPositionRegionRoot -FNDA:0,adjustInsertPositionNewLine +FNDA:5,adjustInsertPositionNewLine DA:13,1 -DA:37,22 -DA:38,22 -DA:39,22 -DA:40,10 -DA:41,10 -DA:42,12 -DA:43,11 -DA:46,22 +DA:37,43 +DA:38,43 +DA:39,43 +DA:40,14 +DA:41,14 +DA:42,29 +DA:43,28 +DA:46,43 DA:55,1 -DA:60,4672 -DA:67,4672 -DA:69,4672 -DA:70,29 -DA:73,4672 +DA:60,4880 +DA:67,4880 +DA:69,4880 +DA:70,42 +DA:73,4880 DA:74,1 DA:75,1 -DA:78,4671 -DA:83,4671 +DA:78,4879 +DA:83,4879 DA:84,0 -DA:86,4671 -DA:89,4646 -DA:90,4646 -DA:92,4646 +DA:86,4879 +DA:89,4833 +DA:90,4833 +DA:92,4833 DA:93,18 DA:94,18 DA:102,5 @@ -16207,37 +16207,37 @@ DA:105,0 DA:106,0 DA:111,5 DA:119,13 -DA:126,4628 -DA:131,4646 +DA:126,4815 +DA:131,4833 DA:132,1 DA:133,1 DA:134,1 -DA:138,4646 +DA:138,4833 DA:142,3 DA:145,3 DA:146,0 DA:148,3 -DA:151,22 -DA:152,22 +DA:151,43 +DA:152,43 DA:153,1 -DA:157,21 -DA:158,12 -DA:161,21 -DA:162,21 -DA:164,21 +DA:157,42 +DA:158,17 +DA:161,42 +DA:162,42 +DA:164,42 DA:165,1 -DA:166,20 -DA:170,0 -DA:172,20 -DA:176,21 -DA:178,21 -DA:179,21 -DA:181,21 -DA:182,19 -DA:187,21 -DA:188,21 -DA:191,21 -DA:197,4671 +DA:166,41 +DA:170,5 +DA:172,36 +DA:176,42 +DA:178,42 +DA:179,42 +DA:181,42 +DA:182,32 +DA:187,42 +DA:188,42 +DA:191,42 +DA:197,4879 DA:201,1 DA:202,1 DA:204,1 @@ -16250,38 +16250,38 @@ DA:212,2 DA:216,1 DA:217,1 DA:221,1 -DA:225,0 -DA:226,0 -DA:227,0 -DA:228,0 -DA:229,0 -DA:230,0 -DA:232,0 +DA:225,5 +DA:226,5 +DA:227,3 +DA:228,3 +DA:229,3 +DA:230,3 +DA:232,5 LF:81 -LH:69 -BRDA:39,0,0,10 -BRDA:39,0,1,12 -BRDA:42,1,0,11 +LH:77 +BRDA:39,0,0,14 +BRDA:39,0,1,29 +BRDA:42,1,0,28 BRDA:42,1,1,1 -BRDA:60,2,0,4672 -BRDA:60,2,1,9 -BRDA:69,3,0,29 -BRDA:69,3,1,4643 +BRDA:60,2,0,4880 +BRDA:60,2,1,13 +BRDA:69,3,0,42 +BRDA:69,3,1,4838 BRDA:73,4,0,1 -BRDA:73,4,1,4671 +BRDA:73,4,1,4879 BRDA:74,5,0,0 BRDA:74,5,1,1 BRDA:74,6,0,1 BRDA:74,6,1,1 BRDA:83,7,0,0 -BRDA:83,7,1,4671 +BRDA:83,7,1,4879 BRDA:87,8,0,15 -BRDA:87,8,1,4646 +BRDA:87,8,1,4833 BRDA:87,8,2,3 -BRDA:87,8,3,10 -BRDA:87,8,4,22 +BRDA:87,8,3,14 +BRDA:87,8,4,43 BRDA:92,9,0,18 -BRDA:92,9,1,4628 +BRDA:92,9,1,4815 BRDA:93,10,0,14 BRDA:93,10,1,4 BRDA:94,11,0,5 @@ -16306,9 +16306,9 @@ BRDA:113,19,1,1 BRDA:121,20,0,10 BRDA:121,20,1,3 BRDA:131,21,0,1 -BRDA:131,21,1,4645 -BRDA:131,22,0,4646 -BRDA:131,22,1,4646 +BRDA:131,21,1,4832 +BRDA:131,22,0,4833 +BRDA:131,22,1,4833 BRDA:132,23,0,0 BRDA:132,23,1,1 BRDA:133,24,0,1 @@ -16321,26 +16321,26 @@ BRDA:145,27,0,3 BRDA:145,27,1,3 BRDA:145,27,2,2 BRDA:152,28,0,1 -BRDA:152,28,1,21 -BRDA:157,29,0,12 -BRDA:157,29,1,9 -BRDA:157,30,0,21 -BRDA:157,30,1,21 +BRDA:152,28,1,42 +BRDA:157,29,0,17 +BRDA:157,29,1,25 +BRDA:157,30,0,42 +BRDA:157,30,1,32 BRDA:164,31,0,1 -BRDA:164,31,1,20 -BRDA:164,32,0,21 -BRDA:164,32,1,1 -BRDA:166,33,0,0 -BRDA:166,33,1,20 -BRDA:167,34,0,20 -BRDA:167,34,1,0 -BRDA:176,35,0,6 -BRDA:176,35,1,15 -BRDA:181,36,0,19 -BRDA:181,36,1,2 -BRDA:181,37,0,21 -BRDA:181,37,1,19 -BRDA:187,38,0,21 +BRDA:164,31,1,41 +BRDA:164,32,0,42 +BRDA:164,32,1,6 +BRDA:166,33,0,5 +BRDA:166,33,1,36 +BRDA:167,34,0,41 +BRDA:167,34,1,5 +BRDA:176,35,0,11 +BRDA:176,35,1,31 +BRDA:181,36,0,32 +BRDA:181,36,1,10 +BRDA:181,37,0,42 +BRDA:181,37,1,32 +BRDA:187,38,0,42 BRDA:187,38,1,0 BRDA:204,39,0,1 BRDA:204,39,1,0 @@ -16354,10 +16354,10 @@ BRDA:210,43,0,3 BRDA:210,43,1,3 BRDA:216,44,0,1 BRDA:216,44,1,0 -BRDA:226,45,0,0 -BRDA:226,45,1,0 +BRDA:226,45,0,3 +BRDA:226,45,1,2 BRF:97 -BRH:74 +BRH:78 end_of_record TN: SF:packages/roosterjs-editor-core/lib/coreApi/restoreUndoSnapshot.ts @@ -16423,24 +16423,24 @@ FN:138,isSelectionPath FN:144,isNodePosition FNF:5 FNH:5 -FNDA:5126,(anonymous_0) -FNDA:5126,isSelectionRangeEx +FNDA:5401,(anonymous_0) +FNDA:5401,isSelectionRangeEx FNDA:72,isTableSelectionOrNull -FNDA:196,isSelectionPath -FNDA:196,isNodePosition +FNDA:277,isSelectionPath +FNDA:277,isNodePosition DA:1,1 DA:23,1 -DA:24,5126 -DA:26,5126 -DA:27,9 -DA:28,5117 +DA:24,5401 +DA:26,5401 +DA:27,7 +DA:28,5394 DA:29,71 -DA:36,5046 +DA:36,5323 DA:37,55 -DA:44,4991 -DA:59,4991 -DA:68,5126 -DA:69,445 +DA:44,5268 +DA:59,5268 +DA:68,5401 +DA:69,545 DA:71,74 DA:72,73 DA:73,73 @@ -16451,82 +16451,82 @@ DA:83,51 DA:84,51 DA:85,51 DA:87,55 -DA:89,316 -DA:90,316 -DA:92,316 -DA:93,316 -DA:95,0 -DA:97,316 -DA:100,445 -DA:109,4681 -DA:110,4681 -DA:113,5126 -DA:117,5126 -DA:118,5126 +DA:89,416 +DA:90,416 +DA:92,416 +DA:93,414 +DA:95,2 +DA:97,416 +DA:100,545 +DA:109,4856 +DA:110,4856 +DA:113,5401 +DA:117,5401 +DA:118,5401 DA:127,72 DA:129,72 -DA:139,196 -DA:141,196 -DA:145,196 -DA:147,196 +DA:139,277 +DA:141,277 +DA:145,277 +DA:147,277 LF:41 -LH:40 -BRDA:26,0,0,9 -BRDA:26,0,1,5117 +LH:41 +BRDA:26,0,0,7 +BRDA:26,0,1,5394 BRDA:28,1,0,71 -BRDA:28,1,1,5046 -BRDA:28,2,0,5117 +BRDA:28,1,1,5323 +BRDA:28,2,0,5394 BRDA:28,2,1,72 BRDA:34,3,0,67 BRDA:34,3,1,4 BRDA:34,4,0,71 BRDA:34,4,1,67 BRDA:36,5,0,55 -BRDA:36,5,1,4991 -BRDA:36,6,0,5046 +BRDA:36,5,1,5268 +BRDA:36,6,0,5323 BRDA:36,6,1,56 -BRDA:45,7,0,4679 -BRDA:45,7,1,312 -BRDA:47,8,0,116 -BRDA:47,8,1,196 +BRDA:45,7,0,4854 +BRDA:45,7,1,414 +BRDA:47,8,0,137 +BRDA:47,8,1,277 BRDA:49,9,0,0 -BRDA:49,9,1,196 -BRDA:51,10,0,194 +BRDA:49,9,1,277 +BRDA:51,10,0,275 BRDA:51,10,1,2 -BRDA:50,11,0,196 -BRDA:50,11,1,131 -BRDA:60,12,0,310 -BRDA:60,12,1,4681 -BRDA:68,13,0,445 -BRDA:68,13,1,4681 +BRDA:50,11,0,277 +BRDA:50,11,1,192 +BRDA:60,12,0,412 +BRDA:60,12,1,4856 +BRDA:68,13,0,545 +BRDA:68,13,1,4856 BRDA:70,14,0,74 BRDA:70,14,1,55 -BRDA:70,14,2,316 +BRDA:70,14,2,416 BRDA:71,15,0,73 BRDA:71,15,1,1 BRDA:82,16,0,51 BRDA:82,16,1,4 -BRDA:92,17,0,316 -BRDA:92,17,1,0 -BRDA:119,18,0,5126 -BRDA:119,18,1,447 -BRDA:119,18,2,447 -BRDA:119,18,3,9 +BRDA:92,17,0,414 +BRDA:92,17,1,2 +BRDA:119,18,0,5401 +BRDA:119,18,1,547 +BRDA:119,18,2,547 +BRDA:119,18,3,7 BRDA:130,19,0,72 BRDA:130,19,1,68 BRDA:130,19,2,68 BRDA:130,19,3,67 BRDA:130,19,4,67 -BRDA:141,20,0,196 -BRDA:141,20,1,196 -BRDA:141,20,2,196 +BRDA:141,20,0,277 +BRDA:141,20,1,277 +BRDA:141,20,2,277 BRDA:141,20,3,0 -BRDA:148,21,0,196 -BRDA:148,21,1,196 -BRDA:148,21,2,196 -BRDA:148,21,3,65 +BRDA:148,21,0,277 +BRDA:148,21,1,277 +BRDA:148,21,2,277 +BRDA:148,21,3,85 BRF:54 -BRH:51 +BRH:52 end_of_record TN: SF:packages/roosterjs-editor-core/lib/coreApi/selectImage.ts @@ -16536,10 +16536,10 @@ FN:60,(anonymous_2) FN:67,(anonymous_3) FNF:4 FNH:4 -FNDA:5230,(anonymous_0) +FNDA:5504,(anonymous_0) FNDA:56,(anonymous_1) FNDA:56,(anonymous_2) -FNDA:5230,(anonymous_3) +FNDA:5504,(anonymous_3) DA:1,1 DA:2,1 DA:17,1 @@ -16547,16 +16547,16 @@ DA:18,1 DA:19,1 DA:20,1 DA:28,1 -DA:29,5230 -DA:31,5230 -DA:33,5230 +DA:29,5504 +DA:31,5504 +DA:33,5504 DA:34,56 DA:36,56 DA:37,56 DA:39,56 DA:41,56 DA:43,56 -DA:51,5230 +DA:51,5504 DA:54,1 DA:55,56 DA:56,56 @@ -16566,12 +16566,12 @@ DA:61,56 DA:62,56 DA:64,56 DA:67,1 -DA:68,5230 -DA:69,5230 +DA:68,5504 +DA:69,5504 LF:28 LH:28 BRDA:33,0,0,56 -BRDA:33,0,1,5174 +BRDA:33,0,1,5448 BRDA:62,1,0,56 BRDA:62,1,1,56 BRF:4 @@ -16584,22 +16584,22 @@ FN:48,restorePendingFormatState FN:58,(anonymous_2) FNF:3 FNH:3 -FNDA:755,(anonymous_0) -FNDA:607,restorePendingFormatState +FNDA:882,(anonymous_0) +FNDA:650,restorePendingFormatState FNDA:6,(anonymous_2) DA:2,1 DA:3,1 DA:21,1 -DA:26,755 -DA:27,751 -DA:29,751 -DA:30,71 -DA:33,751 -DA:36,607 -DA:39,751 +DA:26,882 +DA:27,878 +DA:29,878 +DA:30,52 +DA:33,878 +DA:36,650 +DA:39,878 DA:41,4 -DA:53,1821 -DA:55,607 +DA:53,1950 +DA:55,650 DA:56,1 DA:57,1 DA:58,1 @@ -16611,16 +16611,16 @@ DA:70,1 DA:71,1 LF:22 LH:22 -BRDA:26,0,0,751 +BRDA:26,0,0,878 BRDA:26,0,1,4 -BRDA:26,1,0,755 -BRDA:26,1,1,755 -BRDA:29,2,0,71 -BRDA:29,2,1,680 -BRDA:33,3,0,607 -BRDA:33,3,1,144 +BRDA:26,1,0,882 +BRDA:26,1,1,882 +BRDA:29,2,0,52 +BRDA:29,2,1,826 +BRDA:33,3,0,650 +BRDA:33,3,1,228 BRDA:55,4,0,1 -BRDA:55,4,1,606 +BRDA:55,4,1,649 BRDA:59,5,0,1 BRDA:59,5,1,5 BRDA:59,6,0,0 @@ -16656,7 +16656,7 @@ FN:267,isValidCoordinate FN:271,isMergedCell FNF:18 FNH:18 -FNDA:5244,(anonymous_0) +FNDA:5518,(anonymous_0) FNDA:158,(anonymous_1) FNDA:81,buildCss FNDA:24,handleAllTableSelected @@ -16667,10 +16667,10 @@ FNDA:228,(anonymous_7) FNDA:228,(anonymous_8) FNDA:81,select FNDA:87,(anonymous_10) -FNDA:5244,(anonymous_11) +FNDA:5518,(anonymous_11) FNDA:684,generateCssFromCell FNDA:684,removeImportant -FNDA:5244,areValidCoordinates +FNDA:5518,areValidCoordinates FNDA:169,(anonymous_15) FNDA:335,isValidCoordinate FNDA:81,isMergedCell @@ -16682,8 +16682,8 @@ DA:24,1 DA:26,1 DA:27,1 DA:38,1 -DA:43,5244 -DA:45,5244 +DA:43,5518 +DA:45,5518 DA:46,81 DA:47,81 DA:49,81 @@ -16693,7 +16693,7 @@ DA:55,81 DA:56,81 DA:63,81 DA:67,158 -DA:73,5163 +DA:73,5437 DA:81,81 DA:82,81 DA:84,81 @@ -16758,26 +16758,26 @@ DA:213,81 DA:214,87 DA:217,81 DA:220,1 -DA:221,5244 -DA:222,5244 +DA:221,5518 +DA:222,5518 DA:233,684 DA:249,684 DA:250,684 -DA:255,5244 +DA:255,5518 DA:256,88 DA:257,88 DA:258,86 DA:259,169 DA:260,86 -DA:264,5158 +DA:264,5432 DA:268,335 DA:272,81 DA:273,81 LF:99 LH:99 BRDA:45,0,0,81 -BRDA:45,0,1,5163 -BRDA:45,1,0,5244 +BRDA:45,0,1,5437 +BRDA:45,1,0,5518 BRDA:45,1,1,81 BRDA:50,2,0,81 BRDA:50,2,1,0 @@ -16836,7 +16836,7 @@ BRDA:193,27,1,134 BRDA:249,28,0,684 BRDA:249,28,1,0 BRDA:255,29,0,88 -BRDA:255,29,1,5156 +BRDA:255,29,1,5430 BRDA:256,30,0,88 BRDA:256,30,1,0 BRDA:257,31,0,86 @@ -16865,37 +16865,37 @@ FN:27,(anonymous_0) FN:86,selectContentMetadata FNF:2 FNH:2 -FNDA:5029,(anonymous_0) -FNDA:394,selectContentMetadata +FNDA:5292,(anonymous_0) +FNDA:470,selectContentMetadata DA:1,1 DA:27,1 -DA:33,5029 -DA:34,5029 -DA:35,394 -DA:44,394 -DA:45,394 -DA:46,394 -DA:51,394 -DA:53,394 -DA:54,394 -DA:55,394 -DA:56,394 -DA:59,5029 -DA:61,5029 +DA:33,5292 +DA:34,5292 +DA:35,470 +DA:44,470 +DA:45,470 +DA:46,470 +DA:51,470 +DA:53,470 +DA:54,470 +DA:55,470 +DA:56,470 +DA:59,5292 +DA:61,5292 DA:62,5 DA:71,5 -DA:74,5029 -DA:75,387 -DA:87,394 -DA:88,105 -DA:89,105 -DA:90,105 -DA:92,105 -DA:94,104 -DA:95,104 -DA:97,104 -DA:98,104 -DA:99,104 +DA:74,5292 +DA:75,463 +DA:87,470 +DA:88,104 +DA:89,104 +DA:90,104 +DA:92,104 +DA:94,103 +DA:95,103 +DA:97,103 +DA:98,103 +DA:99,103 DA:101,0 DA:106,0 DA:107,0 @@ -16906,41 +16906,41 @@ DA:117,0 DA:119,0 LF:37 LH:29 -BRDA:34,0,0,394 -BRDA:34,0,1,4635 -BRDA:45,1,0,394 +BRDA:34,0,0,470 +BRDA:34,0,1,4822 +BRDA:45,1,0,470 BRDA:45,1,1,17 -BRDA:47,2,0,394 +BRDA:47,2,0,470 BRDA:47,2,1,0 -BRDA:47,3,0,394 -BRDA:47,3,1,394 +BRDA:47,3,0,470 +BRDA:47,3,1,470 BRDA:47,4,0,0 -BRDA:47,4,1,394 -BRDA:47,5,0,394 -BRDA:47,5,1,394 -BRDA:54,6,0,394 -BRDA:54,6,1,391 +BRDA:47,4,1,470 +BRDA:47,5,0,470 +BRDA:47,5,1,470 +BRDA:54,6,0,470 +BRDA:54,6,1,467 BRDA:61,7,0,5 -BRDA:61,7,1,5024 -BRDA:61,8,0,5029 -BRDA:61,8,1,4924 -BRDA:61,8,2,5027 -BRDA:61,8,3,105 +BRDA:61,7,1,5287 +BRDA:61,8,0,5292 +BRDA:61,8,1,5188 +BRDA:61,8,2,5290 +BRDA:61,8,3,104 BRDA:67,9,0,5 BRDA:67,9,1,0 BRDA:69,10,0,2 BRDA:69,10,1,3 BRDA:69,11,0,5 BRDA:69,11,1,5 -BRDA:74,12,0,387 -BRDA:74,12,1,4642 -BRDA:74,13,0,5029 -BRDA:74,13,1,399 -BRDA:87,14,0,105 -BRDA:87,14,1,289 -BRDA:87,15,0,394 -BRDA:87,15,1,394 -BRDA:93,16,0,104 +BRDA:74,12,0,463 +BRDA:74,12,1,4829 +BRDA:74,13,0,5292 +BRDA:74,13,1,475 +BRDA:87,14,0,104 +BRDA:87,14,1,366 +BRDA:87,15,0,470 +BRDA:87,15,1,470 +BRDA:93,16,0,103 BRDA:93,16,1,0 BRDA:93,16,2,0 BRDA:106,17,0,0 @@ -17052,52 +17052,52 @@ FN:44,iterateElements FN:65,isHTMLElement FNF:5 FNH:4 -FNDA:4811,(anonymous_0) +FNDA:5083,(anonymous_0) FNDA:0,(anonymous_1) -FNDA:495,(anonymous_2) -FNDA:888,iterateElements -FNDA:759,isHTMLElement +FNDA:833,(anonymous_2) +FNDA:1443,iterateElements +FNDA:1248,isHTMLElement DA:15,1 -DA:22,9491 -DA:27,9622 -DA:28,4811 -DA:29,4811 -DA:30,137 +DA:22,9970 +DA:27,10166 +DA:28,5083 +DA:29,5083 +DA:30,201 DA:32,0 -DA:35,495 -DA:38,137 -DA:41,4811 -DA:49,888 -DA:50,8 -DA:53,888 -DA:54,751 -DA:55,487 -DA:58,751 -DA:66,759 -DA:67,759 +DA:35,833 +DA:38,201 +DA:41,5083 +DA:49,1443 +DA:50,6 +DA:53,1443 +DA:54,1242 +DA:55,827 +DA:58,1242 +DA:66,1248 +DA:67,1248 LF:18 LH:17 -BRDA:22,0,0,4680 -BRDA:22,0,1,131 -BRDA:29,1,0,137 -BRDA:29,1,1,4674 -BRDA:29,2,0,4811 -BRDA:29,2,1,4809 -BRDA:29,2,2,4672 +BRDA:22,0,0,4887 +BRDA:22,0,1,196 +BRDA:29,1,0,201 +BRDA:29,1,1,4882 +BRDA:29,2,0,5083 +BRDA:29,2,1,5081 +BRDA:29,2,2,4880 BRDA:31,3,0,1 -BRDA:31,3,1,136 -BRDA:41,4,0,138 -BRDA:41,4,1,4673 -BRDA:41,5,0,4811 -BRDA:41,5,1,4673 -BRDA:49,6,0,8 -BRDA:49,6,1,880 -BRDA:49,7,0,888 -BRDA:49,7,1,8 -BRDA:54,8,0,487 -BRDA:54,8,1,264 -BRDA:67,9,0,759 -BRDA:67,9,1,495 +BRDA:31,3,1,200 +BRDA:41,4,0,202 +BRDA:41,4,1,4881 +BRDA:41,5,0,5083 +BRDA:41,5,1,4881 +BRDA:49,6,0,6 +BRDA:49,6,1,1437 +BRDA:49,7,0,1443 +BRDA:49,7,1,6 +BRDA:54,8,0,827 +BRDA:54,8,1,415 +BRDA:67,9,0,1248 +BRDA:67,9,1,833 BRF:21 BRH:21 end_of_record @@ -17109,39 +17109,39 @@ FN:34,(anonymous_2) FN:42,handledExclusively FNF:4 FNH:4 -FNDA:10884,(anonymous_0) -FNDA:5681,(anonymous_1) -FNDA:119542,(anonymous_2) -FNDA:5681,handledExclusively +FNDA:11682,(anonymous_0) +FNDA:6737,(anonymous_1) +FNDA:128270,(anonymous_2) +FNDA:6737,handledExclusively DA:10,1 DA:24,1 -DA:29,10884 -DA:32,5681 -DA:34,10882 -DA:35,119542 -DA:36,97958 -DA:43,5681 +DA:29,11682 +DA:32,6737 +DA:34,11680 +DA:35,128270 +DA:36,105090 +DA:43,6737 DA:44,1 DA:45,1 -DA:48,5680 +DA:48,6736 LF:11 LH:11 -BRDA:29,0,0,10882 +BRDA:29,0,0,11680 BRDA:29,0,1,2 -BRDA:30,1,0,10884 +BRDA:30,1,0,11682 BRDA:30,1,1,2 -BRDA:30,1,2,10883 -BRDA:30,1,3,544 -BRDA:35,2,0,97958 -BRDA:35,2,1,21584 +BRDA:30,1,2,11681 +BRDA:30,1,3,641 +BRDA:35,2,0,105090 +BRDA:35,2,1,23180 BRDA:43,3,0,1 -BRDA:43,3,1,5680 -BRDA:43,4,0,5681 -BRDA:43,4,1,4689 -BRDA:43,5,0,4188 -BRDA:43,5,1,501 -BRDA:43,6,0,4689 -BRDA:43,6,1,4689 +BRDA:43,3,1,6736 +BRDA:43,4,0,6737 +BRDA:43,4,1,5551 +BRDA:43,5,0,4953 +BRDA:43,5,1,598 +BRDA:43,6,0,5551 +BRDA:43,6,1,5551 BRF:16 BRH:16 end_of_record @@ -17210,18 +17210,18 @@ FN:290,(anonymous_25) FNF:26 FNH:18 FNDA:1,(anonymous_0) -FNDA:4814,CopyPastePlugin +FNDA:5009,CopyPastePlugin FNDA:2,(anonymous_2) FNDA:2,(anonymous_3) FNDA:0,(anonymous_4) FNDA:0,(anonymous_5) FNDA:2,(anonymous_6) -FNDA:4628,(anonymous_7) +FNDA:4815,(anonymous_7) FNDA:2,(anonymous_8) FNDA:2,(anonymous_9) FNDA:2,(anonymous_10) -FNDA:4592,(anonymous_11) -FNDA:4804,(anonymous_12) +FNDA:4767,(anonymous_11) +FNDA:4999,(anonymous_12) FNDA:4,(anonymous_13) FNDA:3,(anonymous_14) FNDA:2,(anonymous_15) @@ -17239,25 +17239,25 @@ DA:1,1 DA:2,1 DA:3,1 DA:33,1 -DA:34,4814 -DA:35,4814 -DA:42,4814 -DA:43,4814 +DA:34,5009 +DA:35,5009 +DA:42,5009 +DA:43,5009 DA:51,1 DA:52,2 -DA:59,4628 -DA:60,4628 -DA:61,4628 +DA:59,4815 +DA:60,4815 +DA:61,4815 DA:62,2 DA:63,2 DA:64,2 DA:71,1 -DA:72,4592 -DA:73,4589 -DA:75,4592 -DA:76,4592 +DA:72,4767 +DA:73,4764 +DA:75,4767 +DA:76,4767 DA:82,1 -DA:83,4804 +DA:83,4999 DA:86,4 DA:87,4 DA:88,4 @@ -17289,7 +17289,7 @@ DA:148,2 DA:149,2 DA:150,2 DA:151,2 -DA:160,4814 +DA:160,5009 DA:161,2 DA:162,2 DA:163,2 @@ -17376,9 +17376,9 @@ BRDA:183,6,0,0 BRDA:183,6,1,2 BRDA:183,7,0,2 BRDA:183,7,1,0 -BRDA:44,8,0,4814 -BRDA:44,8,1,4814 -BRDA:72,9,0,4589 +BRDA:44,8,0,5009 +BRDA:44,8,1,5009 +BRDA:72,9,0,4764 BRDA:72,9,1,3 BRDA:87,10,0,4 BRDA:87,10,1,0 @@ -17490,102 +17490,102 @@ FN:248,isContextMenuProvider FNF:23 FNH:17 FNDA:1,(anonymous_0) -FNDA:4820,DOMEventPlugin +FNDA:5015,DOMEventPlugin FNDA:1,(anonymous_2) FNDA:1,(anonymous_3) FNDA:0,(anonymous_4) -FNDA:295,(anonymous_5) +FNDA:198,(anonymous_5) FNDA:0,(anonymous_6) FNDA:0,(anonymous_7) -FNDA:294,(anonymous_8) +FNDA:4,(anonymous_8) FNDA:0,(anonymous_9) FNDA:2,(anonymous_10) -FNDA:14,(anonymous_11) +FNDA:39,(anonymous_11) FNDA:0,(anonymous_12) FNDA:0,(anonymous_13) FNDA:2,(anonymous_14) -FNDA:4637,(anonymous_15) +FNDA:4824,(anonymous_15) FNDA:1,(anonymous_16) FNDA:1,(anonymous_17) -FNDA:4596,(anonymous_18) -FNDA:4820,(anonymous_19) -FNDA:18548,(anonymous_20) -FNDA:16,(anonymous_21) +FNDA:4771,(anonymous_18) +FNDA:5015,(anonymous_19) +FNDA:19296,(anonymous_20) +FNDA:41,(anonymous_21) FNDA:183,isContextMenuProvider DA:1,1 DA:27,1 -DA:28,4820 -DA:29,4820 -DA:37,4820 -DA:38,4820 +DA:28,5015 +DA:29,5015 +DA:37,5015 +DA:38,5015 DA:53,1 DA:54,2 -DA:61,4637 -DA:62,4637 -DA:64,4637 -DA:66,4637 +DA:61,4824 +DA:62,4824 +DA:64,4824 +DA:66,4824 DA:79,1 DA:81,1 DA:82,1 -DA:98,4637 +DA:98,4824 DA:99,0 DA:100,0 DA:101,0 -DA:102,4637 +DA:102,4824 DA:106,0 -DA:108,4637 -DA:111,4637 -DA:114,4637 -DA:115,4637 -DA:116,4637 +DA:108,4824 +DA:111,4824 +DA:114,4824 +DA:115,4824 +DA:116,4824 DA:122,1 -DA:123,4596 -DA:124,4596 +DA:123,4771 +DA:124,4771 DA:125,0 DA:130,0 DA:131,0 -DA:134,4596 -DA:135,4596 -DA:136,4596 -DA:137,4596 -DA:138,4596 -DA:139,4596 +DA:134,4771 +DA:135,4771 +DA:136,4771 +DA:137,4771 +DA:138,4771 +DA:139,4771 DA:145,1 -DA:146,4820 -DA:149,4820 +DA:146,5015 +DA:149,5015 DA:150,1 DA:151,1 -DA:155,4820 -DA:156,295 -DA:157,295 -DA:159,295 +DA:155,5015 +DA:156,198 +DA:157,198 +DA:159,198 DA:160,0 -DA:161,295 +DA:161,198 DA:162,0 -DA:163,295 +DA:163,198 DA:164,1 -DA:167,295 -DA:169,4820 +DA:167,198 +DA:169,5015 DA:170,0 DA:171,0 -DA:175,4820 +DA:175,5015 DA:176,0 DA:181,0 -DA:185,4820 -DA:186,294 -DA:187,294 -DA:190,4820 +DA:185,5015 +DA:186,4 +DA:187,4 +DA:190,5015 DA:191,0 -DA:197,18548 -DA:198,18548 -DA:199,16 -DA:203,18548 -DA:211,4820 +DA:197,19296 +DA:198,19296 +DA:199,41 +DA:203,19296 +DA:211,5015 DA:212,2 DA:215,1 -DA:219,4820 -DA:220,14 -DA:223,4820 +DA:219,5015 +DA:220,39 +DA:223,5015 DA:224,0 DA:225,0 DA:226,0 @@ -17607,26 +17607,26 @@ BRDA:150,0,0,0 BRDA:150,0,1,1 BRDA:150,1,0,1 BRDA:150,1,1,1 -BRDA:156,2,0,295 -BRDA:156,2,1,295 -BRDA:157,3,0,295 -BRDA:157,3,1,295 +BRDA:156,2,0,198 +BRDA:156,2,1,198 +BRDA:157,3,0,198 +BRDA:157,3,1,198 BRDA:159,4,0,0 -BRDA:159,4,1,295 -BRDA:159,5,0,295 +BRDA:159,4,1,198 +BRDA:159,5,0,198 BRDA:159,5,1,0 BRDA:160,6,0,0 BRDA:160,6,1,0 BRDA:160,7,0,0 BRDA:160,7,1,0 BRDA:161,8,0,0 -BRDA:161,8,1,295 +BRDA:161,8,1,198 BRDA:162,9,0,0 BRDA:162,9,1,0 BRDA:162,10,0,0 BRDA:162,10,1,0 BRDA:163,11,0,1 -BRDA:163,11,1,294 +BRDA:163,11,1,197 BRDA:164,12,0,0 BRDA:164,12,1,1 BRDA:164,13,0,1 @@ -17640,10 +17640,10 @@ BRDA:176,16,1,0 BRDA:177,17,0,0 BRDA:177,17,1,0 BRDA:177,17,2,0 -BRDA:186,18,0,294 +BRDA:186,18,0,4 BRDA:186,18,1,0 -BRDA:186,19,0,294 -BRDA:186,19,1,294 +BRDA:186,19,0,4 +BRDA:186,19,1,4 BRDA:191,20,0,0 BRDA:191,20,1,0 BRDA:191,21,0,0 @@ -17681,67 +17681,67 @@ BRDA:241,36,0,0 BRDA:241,36,1,0 BRDA:241,37,0,0 BRDA:241,37,1,0 -BRDA:40,38,0,4820 -BRDA:40,38,1,4818 -BRDA:44,39,0,4820 -BRDA:44,39,1,213 -BRDA:44,40,0,213 -BRDA:44,40,1,4607 -BRDA:44,41,0,4820 -BRDA:44,41,1,4820 +BRDA:40,38,0,5015 +BRDA:40,38,1,5013 +BRDA:44,39,0,5015 +BRDA:44,39,1,225 +BRDA:44,40,0,225 +BRDA:44,40,1,4790 +BRDA:44,41,0,5015 +BRDA:44,41,1,5015 BRDA:94,42,0,0 -BRDA:94,42,1,4637 +BRDA:94,42,1,4824 BRDA:98,43,0,0 -BRDA:98,43,1,4637 +BRDA:98,43,1,4824 BRDA:101,44,0,0 BRDA:101,44,1,0 BRDA:101,45,0,0 BRDA:101,45,1,0 BRDA:102,46,0,0 -BRDA:102,46,1,4637 +BRDA:102,46,1,4824 BRDA:115,47,0,0 -BRDA:115,47,1,4637 -BRDA:115,48,0,4637 -BRDA:115,48,1,4637 +BRDA:115,47,1,4824 +BRDA:115,48,0,4824 +BRDA:115,48,1,4824 BRDA:116,49,0,0 -BRDA:116,49,1,4637 -BRDA:116,50,0,4637 -BRDA:116,50,1,4637 +BRDA:116,49,1,4824 +BRDA:116,50,0,4824 +BRDA:116,50,1,4824 BRDA:123,51,0,0 -BRDA:123,51,1,4596 -BRDA:123,52,0,4596 -BRDA:123,52,1,4596 +BRDA:123,51,1,4771 +BRDA:123,52,0,4771 +BRDA:123,52,1,4771 BRDA:124,53,0,0 -BRDA:124,53,1,4596 -BRDA:124,54,0,4596 -BRDA:124,54,1,4596 +BRDA:124,53,1,4771 +BRDA:124,54,0,4771 +BRDA:124,54,1,4771 BRDA:131,55,0,0 BRDA:131,55,1,0 BRDA:131,56,0,0 BRDA:131,56,1,0 BRDA:134,57,0,0 -BRDA:134,57,1,4596 -BRDA:134,58,0,4596 -BRDA:134,58,1,4596 +BRDA:134,57,1,4771 +BRDA:134,58,0,4771 +BRDA:134,58,1,4771 BRDA:134,59,0,0 -BRDA:134,59,1,4596 -BRDA:134,60,0,4596 -BRDA:134,60,1,4596 +BRDA:134,59,1,4771 +BRDA:134,60,0,4771 +BRDA:134,60,1,4771 BRDA:135,61,0,0 -BRDA:135,61,1,4596 -BRDA:135,62,0,4596 -BRDA:135,62,1,4596 +BRDA:135,61,1,4771 +BRDA:135,62,0,4771 +BRDA:135,62,1,4771 BRDA:135,63,0,0 -BRDA:135,63,1,4596 -BRDA:135,64,0,4596 -BRDA:135,64,1,4596 +BRDA:135,63,1,4771 +BRDA:135,64,0,4771 +BRDA:135,64,1,4771 BRDA:137,65,0,0 -BRDA:137,65,1,4596 -BRDA:137,66,0,4596 -BRDA:137,66,1,4596 -BRDA:200,67,0,14 +BRDA:137,65,1,4771 +BRDA:137,66,0,4771 +BRDA:137,66,1,4771 +BRDA:200,67,0,39 BRDA:200,67,1,2 -BRDA:204,68,0,18524 +BRDA:204,68,0,19272 BRDA:204,68,1,24 BRDA:249,69,0,0 BRDA:249,69,1,183 @@ -17762,37 +17762,37 @@ FN:63,(anonymous_6) FNF:7 FNH:7 FNDA:1,(anonymous_0) -FNDA:4818,EditPlugin +FNDA:5013,EditPlugin FNDA:2,(anonymous_2) -FNDA:4635,(anonymous_3) -FNDA:4594,(anonymous_4) -FNDA:4818,(anonymous_5) -FNDA:10795,(anonymous_6) +FNDA:4822,(anonymous_3) +FNDA:4769,(anonymous_4) +FNDA:5013,(anonymous_5) +FNDA:11593,(anonymous_6) DA:1,1 DA:16,1 -DA:17,4818 -DA:25,4818 +DA:17,5013 +DA:25,5013 DA:33,1 DA:34,2 DA:41,1 -DA:42,4635 +DA:42,4822 DA:48,1 -DA:49,4594 +DA:49,4769 DA:55,1 -DA:56,4818 +DA:56,5013 DA:63,1 -DA:64,10795 -DA:65,10795 -DA:66,10795 -DA:68,10795 +DA:64,11593 +DA:65,11593 +DA:66,11593 +DA:68,11593 DA:69,22 DA:70,22 DA:72,22 DA:73,22 DA:74,22 -DA:77,10773 -DA:78,522 -DA:81,10795 +DA:77,11571 +DA:78,698 +DA:81,11593 DA:82,9 DA:83,9 DA:88,6 @@ -17801,7 +17801,7 @@ DA:93,1 LF:30 LH:30 BRDA:68,0,0,22 -BRDA:68,0,1,10773 +BRDA:68,0,1,11571 BRDA:70,1,0,0 BRDA:70,1,1,22 BRDA:70,2,0,22 @@ -17812,9 +17812,9 @@ BRDA:75,4,0,22 BRDA:75,4,1,16 BRDA:75,4,2,16 BRDA:75,4,3,3 -BRDA:77,5,0,522 -BRDA:77,5,1,10251 -BRDA:81,6,0,10798 +BRDA:77,5,0,698 +BRDA:77,5,1,10873 +BRDA:81,6,0,11596 BRDA:81,6,1,10 BRDA:81,7,0,0 BRDA:81,7,1,10 @@ -17867,31 +17867,31 @@ FN:408,(anonymous_32) FNF:33 FNH:28 FNDA:1,(anonymous_0) -FNDA:4829,EntityPlugin +FNDA:5024,EntityPlugin FNDA:0,(anonymous_2) FNDA:2,(anonymous_3) FNDA:2,(anonymous_4) -FNDA:4646,(anonymous_5) -FNDA:4605,(anonymous_6) -FNDA:4829,(anonymous_7) -FNDA:10804,(anonymous_8) +FNDA:4833,(anonymous_5) +FNDA:4780,(anonymous_6) +FNDA:5024,(anonymous_7) +FNDA:11602,(anonymous_8) FNDA:3,(anonymous_9) FNDA:25,(anonymous_10) FNDA:17,(anonymous_11) -FNDA:12,(anonymous_12) -FNDA:5158,(anonymous_13) +FNDA:9,(anonymous_12) +FNDA:5521,(anonymous_13) FNDA:12,(anonymous_14) FNDA:19,(anonymous_15) FNDA:13,(anonymous_16) FNDA:3,(anonymous_17) -FNDA:118,(anonymous_18) +FNDA:184,(anonymous_18) FNDA:2,(anonymous_19) -FNDA:6,(anonymous_20) +FNDA:5,(anonymous_20) FNDA:8,(anonymous_21) FNDA:6,(anonymous_22) FNDA:29,(anonymous_23) FNDA:13,(anonymous_24) -FNDA:5158,(anonymous_25) +FNDA:5521,(anonymous_25) FNDA:19,(anonymous_26) FNDA:13,(anonymous_27) FNDA:0,(anonymous_28) @@ -17909,24 +17909,24 @@ DA:46,1 DA:47,1 DA:53,1 DA:64,1 -DA:65,4829 -DA:67,4829 -DA:72,4829 -DA:73,4829 +DA:65,5024 +DA:67,5024 +DA:72,5024 +DA:73,5024 DA:81,1 DA:82,2 DA:89,1 -DA:90,4646 -DA:91,4646 +DA:90,4833 +DA:91,4833 DA:97,1 -DA:98,4605 -DA:99,4605 -DA:100,4605 -DA:101,4605 +DA:98,4780 +DA:99,4780 +DA:100,4780 +DA:101,4780 DA:107,1 -DA:108,4829 +DA:108,5024 DA:115,1 -DA:116,10804 +DA:116,11602 DA:118,25 DA:119,25 DA:121,17 @@ -17934,19 +17934,19 @@ DA:122,17 DA:124,0 DA:125,0 DA:127,0 -DA:129,12 -DA:130,12 -DA:132,530 -DA:133,530 -DA:135,4628 -DA:136,4628 -DA:138,118 -DA:139,118 +DA:129,9 +DA:130,9 +DA:132,706 +DA:133,706 +DA:135,4815 +DA:136,4815 +DA:138,184 +DA:139,184 DA:141,3 DA:142,3 DA:144,3 DA:145,3 -DA:148,10804 +DA:148,11602 DA:149,101 DA:153,1 DA:154,3 @@ -17954,7 +17954,7 @@ DA:155,3 DA:157,3 DA:158,0 DA:159,0 -DA:163,4829 +DA:163,5024 DA:164,0 DA:165,0 DA:166,0 @@ -17970,14 +17970,14 @@ DA:194,2 DA:195,2 DA:196,1 DA:201,1 -DA:202,12 -DA:204,12 -DA:205,5 -DA:208,12 -DA:209,12 -DA:213,5158 -DA:214,5158 -DA:216,5158 +DA:202,9 +DA:204,9 +DA:205,4 +DA:208,9 +DA:209,9 +DA:213,5521 +DA:214,5521 +DA:216,5521 DA:217,12 DA:218,12 DA:220,12 @@ -17985,38 +17985,38 @@ DA:221,5 DA:223,5 DA:225,5 DA:230,0 -DA:237,5158 +DA:237,5521 DA:240,19 DA:242,19 -DA:246,5158 +DA:246,5521 DA:247,52 DA:249,13 DA:250,13 DA:251,13 -DA:254,5158 +DA:254,5521 DA:258,0 DA:262,1 DA:263,3 DA:264,0 DA:266,0 DA:267,0 -DA:272,118 -DA:273,118 +DA:272,184 +DA:273,184 DA:274,2 DA:276,2 -DA:280,4829 +DA:280,5024 DA:281,2 DA:282,2 DA:287,2 DA:288,1 -DA:292,6 -DA:293,6 -DA:294,6 -DA:295,6 +DA:292,5 +DA:293,5 +DA:294,5 +DA:295,5 DA:296,8 DA:297,6 DA:299,2 -DA:305,6 +DA:305,5 DA:306,2 DA:310,2 DA:311,6 @@ -18032,7 +18032,7 @@ DA:341,13 DA:342,1 DA:345,13 DA:348,1 -DA:349,5158 +DA:349,5521 DA:353,19 DA:357,1 DA:358,13 @@ -18078,26 +18078,26 @@ BRDA:287,8,1,1 BRDA:287,9,0,2 BRDA:287,9,1,1 BRDA:98,10,0,20 -BRDA:98,10,1,4585 -BRDA:98,11,0,4605 -BRDA:98,11,1,4605 +BRDA:98,10,1,4760 +BRDA:98,11,0,4780 +BRDA:98,11,1,4780 BRDA:117,12,0,25 BRDA:117,12,1,17 BRDA:117,12,2,0 -BRDA:117,12,3,12 -BRDA:117,12,4,530 -BRDA:117,12,5,4628 -BRDA:117,12,6,118 +BRDA:117,12,3,9 +BRDA:117,12,4,706 +BRDA:117,12,5,4815 +BRDA:117,12,6,184 BRDA:117,12,7,3 BRDA:117,12,8,3 BRDA:124,13,0,0 BRDA:124,13,1,0 BRDA:148,14,0,101 -BRDA:148,14,1,10703 +BRDA:148,14,1,11501 BRDA:148,15,0,0 -BRDA:148,15,1,10804 -BRDA:148,16,0,10804 -BRDA:148,16,1,10804 +BRDA:148,15,1,11602 +BRDA:148,16,0,11602 +BRDA:148,16,1,11602 BRDA:155,17,0,3 BRDA:155,17,1,0 BRDA:155,18,0,0 @@ -18127,14 +18127,14 @@ BRDA:195,27,1,1 BRDA:195,28,0,2 BRDA:195,28,1,2 BRDA:202,29,0,0 -BRDA:202,29,1,12 -BRDA:202,30,0,12 -BRDA:202,30,1,12 -BRDA:204,31,0,5 -BRDA:204,31,1,7 -BRDA:204,32,0,12 -BRDA:204,32,1,12 -BRDA:208,33,0,12 +BRDA:202,29,1,9 +BRDA:202,30,0,9 +BRDA:202,30,1,9 +BRDA:204,31,0,4 +BRDA:204,31,1,5 +BRDA:204,32,0,9 +BRDA:204,32,1,9 +BRDA:208,33,0,9 BRDA:208,33,1,0 BRDA:220,34,0,5 BRDA:220,34,1,7 @@ -18147,19 +18147,19 @@ BRDA:226,37,0,5 BRDA:226,37,1,5 BRDA:226,37,2,5 BRDA:238,38,0,0 -BRDA:238,38,1,5158 -BRDA:237,39,0,5158 +BRDA:238,38,1,5521 +BRDA:237,39,0,5521 BRDA:237,39,1,0 -BRDA:237,40,0,4628 -BRDA:237,40,1,530 -BRDA:237,41,0,5158 -BRDA:237,41,1,5158 +BRDA:237,40,0,4815 +BRDA:237,40,1,706 +BRDA:237,41,0,5521 +BRDA:237,41,1,5521 BRDA:242,42,0,19 BRDA:242,42,1,10 BRDA:242,42,2,7 BRDA:254,43,0,0 -BRDA:254,43,1,5158 -BRDA:255,44,0,5158 +BRDA:254,43,1,5521 +BRDA:255,44,0,5521 BRDA:255,44,1,0 BRDA:256,45,0,0 BRDA:256,45,1,0 @@ -18172,15 +18172,15 @@ BRDA:263,48,1,3 BRDA:266,49,0,0 BRDA:266,49,1,0 BRDA:295,50,0,0 -BRDA:295,50,1,6 -BRDA:295,51,0,6 -BRDA:295,51,1,6 +BRDA:295,50,1,5 +BRDA:295,51,0,5 +BRDA:295,51,1,5 BRDA:296,52,0,6 BRDA:296,52,1,2 BRDA:305,53,0,2 -BRDA:305,53,1,4 -BRDA:305,54,0,6 -BRDA:305,54,1,6 +BRDA:305,53,1,3 +BRDA:305,54,0,5 +BRDA:305,54,1,5 BRDA:314,55,0,4 BRDA:314,55,1,2 BRDA:322,56,0,29 @@ -18197,14 +18197,14 @@ BRDA:341,61,0,9 BRDA:341,61,1,4 BRDA:341,62,0,13 BRDA:341,62,1,13 -BRDA:353,63,0,5158 +BRDA:353,63,0,5521 BRDA:353,63,1,0 -BRDA:350,64,0,5158 -BRDA:350,64,1,5158 +BRDA:350,64,0,5521 +BRDA:350,64,1,5521 BRDA:350,65,0,0 -BRDA:350,65,1,5158 -BRDA:350,66,0,5158 -BRDA:350,66,1,5158 +BRDA:350,65,1,5521 +BRDA:350,66,0,5521 +BRDA:350,66,1,5521 BRDA:359,67,0,13 BRDA:359,67,1,3 BRDA:359,68,0,0 @@ -18232,27 +18232,27 @@ FN:40,(anonymous_4) FN:45,(anonymous_5) FNF:5 FNH:5 -FNDA:4818,(anonymous_0) +FNDA:5013,(anonymous_0) FNDA:2,(anonymous_2) -FNDA:4634,(anonymous_3) -FNDA:4593,(anonymous_4) -FNDA:10849,(anonymous_5) +FNDA:4821,(anonymous_3) +FNDA:4768,(anonymous_4) +FNDA:11647,(anonymous_5) DA:1,1 DA:12,1 DA:13,1 DA:14,1 DA:19,1 -DA:20,4817 +DA:20,5012 DA:25,1 DA:26,2 DA:33,1 -DA:34,4634 +DA:34,4821 DA:40,1 -DA:41,4593 -DA:42,4593 +DA:41,4768 +DA:42,4768 DA:45,1 -DA:46,10849 -DA:47,10849 +DA:46,11647 +DA:47,11647 DA:50,8 DA:51,8 DA:52,4 @@ -18286,10 +18286,10 @@ DA:105,1 LF:46 LH:46 BRDA:41,0,0,0 -BRDA:41,0,1,4593 -BRDA:41,1,0,4593 -BRDA:41,1,1,4593 -BRDA:46,2,0,10849 +BRDA:41,0,1,4768 +BRDA:41,1,0,4768 +BRDA:41,1,1,4768 +BRDA:46,2,0,11647 BRDA:46,2,1,0 BRDA:48,3,0,4 BRDA:48,3,1,8 @@ -18344,153 +18344,153 @@ FN:206,(anonymous_12) FN:217,(anonymous_13) FN:218,(anonymous_14) FNF:15 -FNH:13 +FNH:14 FNDA:1,(anonymous_0) -FNDA:4813,LifecyclePlugin -FNDA:4628,(anonymous_2) -FNDA:4587,(anonymous_3) +FNDA:5008,LifecyclePlugin +FNDA:4815,(anonymous_2) +FNDA:4762,(anonymous_3) FNDA:0,(anonymous_4) -FNDA:4630,(anonymous_5) -FNDA:4580,(anonymous_6) +FNDA:4817,(anonymous_5) +FNDA:4761,(anonymous_6) FNDA:2,(anonymous_7) -FNDA:4630,(anonymous_8) -FNDA:4589,(anonymous_9) +FNDA:4817,(anonymous_8) +FNDA:4764,(anonymous_9) FNDA:2,(anonymous_10) -FNDA:4811,(anonymous_11) -FNDA:10787,(anonymous_12) -FNDA:4630,(anonymous_13) -FNDA:0,(anonymous_14) +FNDA:5006,(anonymous_11) +FNDA:11585,(anonymous_12) +FNDA:4817,(anonymous_13) +FNDA:9634,(anonymous_14) DA:1,1 DA:13,1 DA:14,1 DA:36,1 DA:51,1 -DA:52,4813 -DA:55,4813 -DA:56,4813 -DA:64,4813 -DA:65,4813 -DA:68,4813 -DA:69,4807 -DA:70,4628 -DA:71,4628 -DA:72,4628 -DA:74,4807 -DA:75,4587 -DA:76,4587 -DA:77,4587 -DA:80,4813 -DA:83,9260 -DA:84,4630 -DA:85,4630 -DA:86,4630 -DA:94,4630 -DA:104,4813 -DA:105,4813 -DA:107,4813 -DA:108,4610 -DA:109,4583 -DA:113,4583 -DA:116,4610 +DA:52,5008 +DA:55,5008 +DA:56,5008 +DA:64,5008 +DA:65,5008 +DA:68,5008 +DA:69,5002 +DA:70,4815 +DA:71,4815 +DA:72,4815 +DA:74,5002 +DA:75,4762 +DA:76,4762 +DA:77,4762 +DA:80,5008 +DA:83,9634 +DA:84,4817 +DA:85,4817 +DA:86,4817 +DA:94,4817 +DA:104,5008 +DA:105,5008 +DA:107,5008 +DA:108,4797 +DA:109,4764 +DA:113,4764 +DA:116,4797 DA:117,0 DA:121,0 -DA:125,4813 +DA:125,5008 DA:143,1 DA:144,2 DA:151,1 -DA:152,4630 -DA:155,4630 -DA:158,4630 -DA:161,4630 -DA:164,4630 -DA:167,4630 -DA:173,4589 -DA:174,4589 -DA:176,4589 +DA:152,4817 +DA:155,4817 +DA:158,4817 +DA:161,4817 +DA:164,4817 +DA:167,4817 +DA:173,4764 +DA:174,4764 +DA:176,4764 DA:177,2 DA:179,2 DA:180,1 DA:183,2 -DA:186,4589 -DA:187,4587 -DA:188,4587 -DA:189,4587 -DA:192,4589 +DA:186,4764 +DA:187,4762 +DA:188,4762 +DA:189,4762 +DA:192,4764 DA:198,1 -DA:199,4811 +DA:199,5006 DA:206,1 -DA:207,10787 +DA:207,11585 DA:212,0 DA:213,0 -DA:217,4630 -DA:218,4630 -DA:220,0 -DA:221,0 +DA:217,4817 +DA:218,4817 +DA:220,9634 +DA:221,9634 DA:225,1 LF:67 -LH:61 -BRDA:15,0,0,0 -BRDA:15,0,1,1 +LH:63 +BRDA:15,0,0,1 +BRDA:15,0,1,0 BRDA:23,1,0,0 -BRDA:23,1,1,1 -BRDA:65,2,0,4813 -BRDA:65,2,1,4809 -BRDA:65,2,2,4799 -BRDA:68,3,0,4807 +BRDA:23,1,1,0 +BRDA:65,2,0,5008 +BRDA:65,2,1,5004 +BRDA:65,2,2,4994 +BRDA:68,3,0,5002 BRDA:68,3,1,6 BRDA:81,4,0,0 -BRDA:81,4,1,4813 +BRDA:81,4,1,5008 BRDA:85,5,0,0 -BRDA:85,5,1,4630 -BRDA:85,6,0,4630 -BRDA:85,6,1,4630 -BRDA:104,7,0,13 -BRDA:104,7,1,4800 -BRDA:104,8,0,4813 -BRDA:104,8,1,4813 -BRDA:105,9,0,4610 -BRDA:105,9,1,203 -BRDA:107,10,0,4610 -BRDA:107,10,1,203 -BRDA:108,11,0,4583 -BRDA:108,11,1,27 -BRDA:108,12,0,4610 -BRDA:108,12,1,4583 +BRDA:85,5,1,4817 +BRDA:85,6,0,4817 +BRDA:85,6,1,4817 +BRDA:104,7,0,11 +BRDA:104,7,1,4997 +BRDA:104,8,0,5008 +BRDA:104,8,1,5008 +BRDA:105,9,0,4797 +BRDA:105,9,1,211 +BRDA:107,10,0,4797 +BRDA:107,10,1,211 +BRDA:108,11,0,4764 +BRDA:108,11,1,33 +BRDA:108,12,0,4797 +BRDA:108,12,1,4764 BRDA:116,13,0,0 -BRDA:116,13,1,4610 -BRDA:116,14,0,4610 +BRDA:116,13,1,4797 +BRDA:116,14,0,4797 BRDA:116,14,1,0 BRDA:130,15,0,1 -BRDA:130,15,1,4812 -BRDA:130,16,0,4813 -BRDA:130,16,1,4813 -BRDA:131,17,0,4813 -BRDA:131,17,1,334 +BRDA:130,15,1,5007 +BRDA:130,16,0,5008 +BRDA:130,16,1,5008 +BRDA:131,17,0,5008 +BRDA:131,17,1,346 BRDA:158,18,0,2 -BRDA:158,18,1,4628 -BRDA:158,19,0,4630 -BRDA:158,19,1,4628 +BRDA:158,18,1,4815 +BRDA:158,19,0,4817 +BRDA:158,19,1,4815 BRDA:174,20,0,0 -BRDA:174,20,1,4589 -BRDA:174,21,0,4589 -BRDA:174,21,1,4589 +BRDA:174,20,1,4764 +BRDA:174,21,0,4764 +BRDA:174,21,1,4764 BRDA:179,22,0,1 BRDA:179,22,1,1 BRDA:179,23,0,2 BRDA:179,23,1,2 -BRDA:186,24,0,4587 +BRDA:186,24,0,4762 BRDA:186,24,1,2 BRDA:207,25,0,0 -BRDA:207,25,1,10787 -BRDA:208,26,0,10787 -BRDA:208,26,1,521 -BRDA:208,26,2,521 +BRDA:207,25,1,11585 +BRDA:208,26,0,11585 +BRDA:208,26,1,697 +BRDA:208,26,2,697 BRDA:221,27,0,0 -BRDA:221,27,1,0 -BRDA:221,28,0,0 -BRDA:221,28,1,0 +BRDA:221,27,1,9634 +BRDA:221,28,0,9634 +BRDA:221,28,1,9634 BRF:60 -BRH:48 +BRH:50 end_of_record TN: SF:packages/roosterjs-editor-core/lib/corePlugins/MouseUpPlugin.ts @@ -18503,36 +18503,36 @@ FN:41,(anonymous_6) FN:55,(anonymous_7) FNF:7 FNH:7 -FNDA:4813,(anonymous_0) +FNDA:5008,(anonymous_0) FNDA:25,(anonymous_2) FNDA:1,(anonymous_3) -FNDA:4629,(anonymous_4) -FNDA:4589,(anonymous_5) -FNDA:10790,(anonymous_6) -FNDA:4614,(anonymous_7) -DA:8,4813 -DA:9,4812 -DA:10,4812 -DA:11,4812 -DA:12,4812 +FNDA:4816,(anonymous_4) +FNDA:4764,(anonymous_5) +FNDA:11588,(anonymous_6) +FNDA:4789,(anonymous_7) +DA:8,5008 +DA:9,5007 +DA:10,5007 +DA:11,5007 +DA:12,5007 DA:17,1 DA:18,1 DA:25,1 -DA:26,4629 +DA:26,4816 DA:32,1 -DA:33,4589 -DA:34,4589 +DA:33,4764 +DA:34,4764 DA:41,1 -DA:42,10790 +DA:42,11588 DA:47,32 DA:50,32 DA:51,32 DA:52,32 DA:55,1 -DA:56,4614 +DA:56,4789 DA:57,32 DA:58,32 -DA:62,4812 +DA:62,5007 DA:63,25 DA:64,25 DA:65,25 @@ -18544,14 +18544,14 @@ BRDA:63,0,1,0 BRDA:67,1,0,25 BRDA:67,1,1,9 BRDA:42,2,0,32 -BRDA:42,2,1,10758 -BRDA:43,3,0,10790 -BRDA:43,3,1,10790 +BRDA:42,2,1,11556 +BRDA:43,3,0,11588 +BRDA:43,3,1,11588 BRDA:43,3,2,33 BRDA:56,4,0,32 -BRDA:56,4,1,4582 -BRDA:56,5,0,4614 -BRDA:56,5,1,4614 +BRDA:56,4,1,4757 +BRDA:56,5,0,4789 +BRDA:56,5,1,4789 BRF:13 BRH:12 end_of_record @@ -18571,63 +18571,63 @@ FN:175,normalizeListsForExport FN:176,(anonymous_12) FNF:12 FNH:12 -FNDA:4831,(anonymous_0) +FNDA:5026,(anonymous_0) FNDA:2,(anonymous_2) -FNDA:4647,(anonymous_3) -FNDA:4606,(anonymous_4) -FNDA:10812,(anonymous_5) +FNDA:4834,(anonymous_3) +FNDA:4781,(anonymous_4) +FNDA:11610,(anonymous_5) FNDA:45,(anonymous_6) -FNDA:5214,(anonymous_7) -FNDA:174,normalizeTables -FNDA:180,(anonymous_9) +FNDA:5574,(anonymous_7) +FNDA:181,normalizeTables +FNDA:187,(anonymous_9) FNDA:7,(anonymous_10) -FNDA:117,normalizeListsForExport -FNDA:57,(anonymous_12) +FNDA:183,normalizeListsForExport +FNDA:69,(anonymous_12) DA:1,1 DA:27,1 -DA:28,4830 +DA:28,5025 DA:33,1 DA:34,2 DA:43,1 -DA:44,4647 +DA:44,4834 DA:52,1 -DA:53,4606 +DA:53,4781 DA:62,1 -DA:63,10812 -DA:66,5167 -DA:67,5167 -DA:69,5167 -DA:72,12 -DA:73,12 +DA:63,11610 +DA:66,5530 +DA:67,5530 +DA:69,5530 +DA:72,9 +DA:73,9 DA:76,29 DA:77,29 DA:80,18 DA:81,16 DA:83,18 -DA:86,117 -DA:87,117 +DA:86,183 +DA:87,183 DA:91,1 DA:92,45 DA:94,45 DA:95,35 DA:99,1 -DA:100,5214 -DA:101,174 -DA:102,174 -DA:103,174 -DA:105,174 -DA:107,174 +DA:100,5574 +DA:101,181 +DA:102,181 +DA:103,181 +DA:105,181 +DA:107,181 DA:108,25 DA:114,9 DA:115,16 DA:119,1 DA:124,1 -DA:127,174 -DA:128,174 -DA:129,180 -DA:131,180 -DA:132,250 -DA:133,250 +DA:127,181 +DA:128,181 +DA:129,187 +DA:131,187 +DA:132,265 +DA:133,265 DA:135,43 DA:136,20 DA:137,20 @@ -18635,36 +18635,36 @@ DA:140,43 DA:141,43 DA:142,43 DA:144,43 -DA:146,169 +DA:146,176 DA:147,8 DA:148,8 DA:149,8 DA:150,8 -DA:152,161 -DA:154,169 -DA:156,38 -DA:157,38 -DA:161,180 -DA:162,180 -DA:163,180 +DA:152,168 +DA:154,176 +DA:156,46 +DA:157,46 +DA:161,187 +DA:162,187 +DA:163,187 DA:164,11 DA:165,7 DA:166,2 -DA:172,174 -DA:176,117 -DA:177,57 -DA:179,57 +DA:172,181 +DA:176,183 +DA:177,69 +DA:179,69 DA:180,0 DA:182,0 LF:73 LH:71 -BRDA:64,0,0,4645 -BRDA:64,0,1,5167 -BRDA:64,0,2,12 +BRDA:64,0,0,4832 +BRDA:64,0,1,5530 +BRDA:64,0,2,9 BRDA:64,0,3,29 BRDA:64,0,4,18 -BRDA:64,0,5,117 -BRDA:66,1,0,5167 +BRDA:64,0,5,183 +BRDA:66,1,0,5530 BRDA:66,1,1,0 BRDA:80,2,0,16 BRDA:80,2,1,2 @@ -18674,19 +18674,19 @@ BRDA:92,4,0,45 BRDA:92,4,1,45 BRDA:94,5,0,35 BRDA:94,5,1,10 -BRDA:100,6,0,174 -BRDA:100,6,1,5040 -BRDA:100,7,0,5214 -BRDA:100,7,1,5214 -BRDA:103,8,0,174 -BRDA:103,8,1,142 -BRDA:103,8,2,110 +BRDA:100,6,0,181 +BRDA:100,6,1,5393 +BRDA:100,7,0,5574 +BRDA:100,7,1,5574 +BRDA:103,8,0,181 +BRDA:103,8,1,149 +BRDA:103,8,2,112 BRDA:103,9,0,16 -BRDA:103,9,1,158 -BRDA:103,10,0,174 -BRDA:103,10,1,174 +BRDA:103,9,1,165 +BRDA:103,10,0,181 +BRDA:103,10,1,181 BRDA:107,11,0,25 -BRDA:107,11,1,149 +BRDA:107,11,1,156 BRDA:108,12,0,9 BRDA:108,12,1,16 BRDA:109,13,0,25 @@ -18702,23 +18702,23 @@ BRDA:116,16,1,2 BRDA:116,17,0,16 BRDA:116,17,1,16 BRDA:134,18,0,43 -BRDA:134,18,1,169 -BRDA:134,18,2,38 +BRDA:134,18,1,176 +BRDA:134,18,2,46 BRDA:135,19,0,20 BRDA:135,19,1,23 BRDA:146,20,0,8 -BRDA:146,20,1,161 +BRDA:146,20,1,168 BRDA:148,21,0,0 BRDA:148,21,1,8 BRDA:148,22,0,8 BRDA:148,22,1,8 BRDA:163,23,0,11 -BRDA:163,23,1,169 +BRDA:163,23,1,176 BRDA:165,24,0,2 BRDA:165,24,1,5 BRDA:179,25,0,0 -BRDA:179,25,1,57 -BRDA:179,26,0,57 +BRDA:179,25,1,69 +BRDA:179,26,0,69 BRDA:179,26,1,0 BRF:62 BRH:57 @@ -18738,50 +18738,50 @@ FN:139,(anonymous_9) FNF:10 FNH:10 FNDA:1,(anonymous_0) -FNDA:4817,PendingFormatStatePlugin +FNDA:5012,PendingFormatStatePlugin FNDA:2,(anonymous_2) -FNDA:4634,(anonymous_3) -FNDA:4593,(anonymous_4) -FNDA:4817,(anonymous_5) -FNDA:10794,(anonymous_6) -FNDA:4610,(anonymous_7) +FNDA:4821,(anonymous_3) +FNDA:4768,(anonymous_4) +FNDA:5012,(anonymous_5) +FNDA:11592,(anonymous_6) +FNDA:4785,(anonymous_7) FNDA:42,(anonymous_8) FNDA:12,(anonymous_9) DA:1,1 DA:14,1 DA:20,1 -DA:22,4817 -DA:31,4817 +DA:22,5012 +DA:31,5012 DA:41,1 DA:42,2 DA:49,1 -DA:50,4634 +DA:50,4821 DA:56,1 -DA:57,4593 -DA:58,4593 +DA:57,4768 +DA:58,4768 DA:64,1 -DA:65,4817 +DA:65,5012 DA:72,1 -DA:73,10794 +DA:73,11592 DA:77,22 DA:78,22 DA:79,22 DA:80,22 DA:84,0 DA:87,22 -DA:91,570 -DA:92,570 +DA:91,746 +DA:92,746 DA:98,0 DA:99,0 DA:100,0 DA:106,0 -DA:107,570 +DA:107,746 DA:121,17 -DA:124,570 +DA:124,746 DA:128,1 -DA:129,4610 -DA:130,4610 -DA:131,4610 +DA:129,4785 +DA:130,4785 +DA:131,4785 DA:134,1 DA:135,42 DA:136,42 @@ -18810,28 +18810,28 @@ LH:53 BRDA:74,0,0,22 BRDA:74,0,1,17 BRDA:74,0,2,47 -BRDA:74,0,3,570 +BRDA:74,0,3,746 BRDA:77,1,0,22 BRDA:77,1,1,0 BRDA:81,2,0,12 BRDA:81,2,1,10 BRDA:92,3,0,0 -BRDA:92,3,1,570 -BRDA:93,4,0,570 -BRDA:93,4,1,570 +BRDA:92,3,1,746 +BRDA:93,4,0,746 +BRDA:93,4,1,746 BRDA:93,4,2,17 BRDA:93,4,3,0 BRDA:107,5,0,17 -BRDA:107,5,1,553 -BRDA:108,6,0,570 +BRDA:107,5,1,729 +BRDA:108,6,0,746 BRDA:108,6,1,17 BRDA:108,6,2,14 -BRDA:108,6,3,556 +BRDA:108,6,3,732 BRDA:108,6,4,20 BRDA:108,6,5,20 -BRDA:108,6,6,553 -BRDA:108,6,7,522 -BRDA:108,6,8,522 +BRDA:108,6,6,729 +BRDA:108,6,7,698 +BRDA:108,6,8,698 BRDA:135,7,0,0 BRDA:135,7,1,42 BRDA:135,8,0,42 @@ -18882,28 +18882,28 @@ FN:55,(anonymous_6) FN:83,(anonymous_7) FNF:7 FNH:6 -FNDA:4815,(anonymous_0) +FNDA:5010,(anonymous_0) FNDA:2,(anonymous_2) -FNDA:4631,(anonymous_3) -FNDA:4585,(anonymous_4) +FNDA:4818,(anonymous_3) +FNDA:4760,(anonymous_4) FNDA:4,(anonymous_5) -FNDA:10792,(anonymous_6) +FNDA:11590,(anonymous_6) FNDA:0,(anonymous_7) DA:2,1 DA:14,1 -DA:15,4814 +DA:15,5009 DA:20,1 DA:21,2 DA:28,1 -DA:29,4631 +DA:29,4818 DA:35,1 -DA:36,4585 +DA:36,4760 DA:39,1 DA:40,4 DA:46,0 DA:48,4 -DA:55,10792 -DA:58,10792 +DA:55,11590 +DA:58,11590 DA:70,5 DA:73,5 DA:76,5 @@ -18927,8 +18927,8 @@ BRDA:41,1,1,4 BRDA:41,1,2,0 BRDA:41,1,3,0 BRDA:58,2,0,5 -BRDA:58,2,1,10787 -BRDA:59,3,0,10792 +BRDA:58,2,1,11585 +BRDA:59,3,0,11590 BRDA:59,3,1,5 BRDA:59,3,2,5 BRDA:61,4,0,5 @@ -18993,27 +18993,27 @@ FN:278,(anonymous_26) FNF:27 FNH:26 FNDA:1,(anonymous_0) -FNDA:4845,UndoPlugin +FNDA:5038,UndoPlugin FNDA:2,(anonymous_2) -FNDA:4659,(anonymous_3) -FNDA:4614,(anonymous_4) -FNDA:4841,(anonymous_5) -FNDA:496,(anonymous_6) -FNDA:10836,(anonymous_7) -FNDA:49,(anonymous_8) +FNDA:4844,(anonymous_3) +FNDA:4787,(anonymous_4) +FNDA:5034,(anonymous_5) +FNDA:593,(anonymous_6) +FNDA:11626,(anonymous_7) +FNDA:41,(anonymous_8) FNDA:7,(anonymous_9) FNDA:1,(anonymous_10) -FNDA:524,(anonymous_11) -FNDA:526,(anonymous_12) -FNDA:7,(anonymous_13) -FNDA:4664,(anonymous_14) -FNDA:4838,createUndoSnapshots -FNDA:9252,(anonymous_16) +FNDA:700,(anonymous_11) +FNDA:702,(anonymous_12) +FNDA:4,(anonymous_13) +FNDA:4845,(anonymous_14) +FNDA:5031,createUndoSnapshots +FNDA:9626,(anonymous_16) FNDA:0,(anonymous_17) -FNDA:5001,(anonymous_18) -FNDA:523,(anonymous_19) -FNDA:14,(anonymous_20) -FNDA:4840,createUndoSnapshotServiceBridge +FNDA:5288,(anonymous_18) +FNDA:699,(anonymous_19) +FNDA:11,(anonymous_20) +FNDA:5033,createUndoSnapshotServiceBridge FNDA:1,(anonymous_22) FNDA:1,(anonymous_23) FNDA:1,(anonymous_24) @@ -19022,51 +19022,51 @@ FNDA:1,(anonymous_26) DA:14,1 DA:26,1 DA:32,1 -DA:33,4845 -DA:34,4845 -DA:42,4845 +DA:33,5038 +DA:34,5038 +DA:42,5038 DA:57,1 DA:58,2 DA:65,1 -DA:66,4659 +DA:66,4844 DA:72,1 -DA:73,4614 +DA:73,4787 DA:79,1 -DA:80,4841 +DA:80,5034 DA:87,1 -DA:88,496 +DA:88,593 DA:100,1 -DA:102,10836 +DA:102,11626 DA:103,0 -DA:106,10836 -DA:108,4629 -DA:109,4629 -DA:112,4627 -DA:114,4629 -DA:116,49 -DA:117,49 +DA:106,11626 +DA:108,4816 +DA:109,4816 +DA:112,4814 +DA:114,4816 +DA:116,41 +DA:117,41 DA:119,7 DA:120,7 DA:122,1 DA:123,1 DA:124,1 -DA:126,524 -DA:127,524 +DA:126,700 +DA:127,700 DA:129,1 DA:130,1 DA:134,1 -DA:138,49 -DA:139,16 +DA:138,41 +DA:139,8 DA:140,1 DA:141,1 DA:142,1 DA:143,1 -DA:144,15 -DA:145,15 -DA:151,15 -DA:157,12 -DA:161,15 -DA:162,15 +DA:144,7 +DA:145,7 +DA:151,7 +DA:157,6 +DA:161,7 +DA:162,7 DA:164,33 DA:166,31 DA:167,19 @@ -19090,27 +19090,27 @@ DA:208,1 DA:211,1 DA:212,1 DA:215,1 -DA:216,524 -DA:224,522 +DA:216,700 +DA:224,698 DA:228,1 -DA:229,526 -DA:230,526 -DA:231,526 +DA:229,702 +DA:230,702 +DA:231,702 DA:234,1 -DA:235,7 -DA:236,7 +DA:235,4 +DA:236,4 DA:243,1 -DA:244,4664 -DA:245,4664 +DA:244,4845 +DA:245,4845 DA:247,1 -DA:250,4838 -DA:252,4838 -DA:253,9252 +DA:250,5031 +DA:252,5031 +DA:253,9626 DA:254,0 -DA:256,5001 -DA:257,523 -DA:258,14 -DA:266,4840 +DA:256,5288 +DA:257,699 +DA:258,11 +DA:266,5033 DA:268,1 DA:270,1 DA:272,1 @@ -19118,53 +19118,53 @@ DA:277,2 DA:278,1 LF:97 LH:92 -BRDA:44,0,0,4845 -BRDA:44,0,1,4840 -BRDA:44,0,2,4838 -BRDA:89,1,0,496 +BRDA:44,0,0,5038 +BRDA:44,0,1,5033 +BRDA:44,0,2,5031 +BRDA:89,1,0,593 BRDA:89,1,1,15 BRDA:89,1,2,0 BRDA:89,1,3,0 BRDA:102,2,0,0 -BRDA:102,2,1,10836 -BRDA:102,3,0,10836 -BRDA:102,3,1,10836 -BRDA:107,4,0,4629 -BRDA:107,4,1,49 +BRDA:102,2,1,11626 +BRDA:102,3,0,11626 +BRDA:102,3,1,11626 +BRDA:107,4,0,4816 +BRDA:107,4,1,41 BRDA:107,4,2,7 BRDA:107,4,3,1 -BRDA:107,4,4,524 +BRDA:107,4,4,700 BRDA:107,4,5,1 -BRDA:109,5,0,4627 +BRDA:109,5,0,4814 BRDA:109,5,1,2 -BRDA:109,6,0,4629 -BRDA:109,6,1,4628 -BRDA:138,7,0,16 +BRDA:109,6,0,4816 +BRDA:109,6,1,4815 +BRDA:138,7,0,8 BRDA:138,7,1,33 -BRDA:138,8,0,49 -BRDA:138,8,1,8 -BRDA:138,8,2,41 +BRDA:138,8,0,41 +BRDA:138,8,1,4 +BRDA:138,8,2,37 BRDA:139,9,0,1 -BRDA:139,9,1,15 -BRDA:139,10,0,16 -BRDA:139,10,1,8 -BRDA:139,10,2,7 +BRDA:139,9,1,7 +BRDA:139,10,0,8 +BRDA:139,10,1,4 +BRDA:139,10,2,4 BRDA:141,11,0,0 BRDA:141,11,1,1 BRDA:141,12,0,1 BRDA:141,12,1,1 -BRDA:144,13,0,15 +BRDA:144,13,0,7 BRDA:144,13,1,0 BRDA:145,14,0,0 -BRDA:145,14,1,15 -BRDA:145,15,0,15 -BRDA:145,15,1,15 -BRDA:151,16,0,12 -BRDA:151,16,1,3 -BRDA:152,17,0,15 -BRDA:152,17,1,15 -BRDA:152,17,2,13 -BRDA:152,17,3,5 +BRDA:145,14,1,7 +BRDA:145,15,0,7 +BRDA:145,15,1,7 +BRDA:151,16,0,6 +BRDA:151,16,1,1 +BRDA:152,17,0,7 +BRDA:152,17,1,7 +BRDA:152,17,2,7 +BRDA:152,17,3,1 BRDA:164,18,0,31 BRDA:164,18,1,2 BRDA:164,19,0,33 @@ -19194,17 +19194,17 @@ BRDA:191,29,0,1 BRDA:191,29,1,3 BRDA:207,30,0,1 BRDA:207,30,1,0 -BRDA:216,31,0,522 +BRDA:216,31,0,698 BRDA:216,31,1,2 -BRDA:218,32,0,524 -BRDA:218,32,1,524 -BRDA:218,32,2,524 -BRDA:218,32,3,524 +BRDA:218,32,0,700 +BRDA:218,32,1,700 +BRDA:218,32,2,700 +BRDA:218,32,3,700 BRDA:235,33,0,0 -BRDA:235,33,1,7 -BRDA:235,34,0,7 -BRDA:235,34,1,7 -BRDA:237,35,0,7 +BRDA:235,33,1,4 +BRDA:235,34,0,4 +BRDA:235,34,1,4 +BRDA:237,35,0,4 BRDA:237,35,1,2 BRDA:237,35,2,2 BRDA:239,36,0,0 @@ -19212,11 +19212,11 @@ BRDA:239,36,1,2 BRDA:239,37,0,2 BRDA:239,37,1,2 BRDA:244,38,0,0 -BRDA:244,38,1,4664 -BRDA:244,39,0,4664 -BRDA:244,39,1,4664 +BRDA:244,38,1,4845 +BRDA:244,39,0,4845 +BRDA:244,39,1,4845 BRDA:267,40,0,2 -BRDA:267,40,1,4838 +BRDA:267,40,1,5031 BRDA:270,41,0,1 BRDA:270,41,1,0 BRDA:274,42,0,1 @@ -19230,8 +19230,8 @@ FN:27,createCorePlugins FN:56,getPluginState FNF:2 FNH:2 -FNDA:4809,createCorePlugins -FNDA:4809,getPluginState +FNDA:5004,createCorePlugins +FNDA:5004,getPluginState DA:1,1 DA:2,1 DA:3,1 @@ -19244,36 +19244,36 @@ DA:9,1 DA:10,1 DA:11,1 DA:27,1 -DA:31,4809 -DA:34,4809 +DA:31,5004 +DA:34,5004 DA:56,1 -DA:57,4809 +DA:57,5004 LF:16 LH:16 -BRDA:31,0,0,4809 -BRDA:31,0,1,4737 -BRDA:35,1,0,4809 -BRDA:35,1,1,4809 -BRDA:36,2,0,4809 -BRDA:36,2,1,4809 -BRDA:37,3,0,4809 -BRDA:37,3,1,4809 -BRDA:40,4,0,4809 -BRDA:40,4,1,4809 -BRDA:41,5,0,4809 -BRDA:41,5,1,4809 -BRDA:42,6,0,4809 -BRDA:42,6,1,4808 -BRDA:43,7,0,4809 -BRDA:43,7,1,4804 -BRDA:44,8,0,4809 -BRDA:44,8,1,4809 -BRDA:45,9,0,4809 -BRDA:45,9,1,4809 -BRDA:46,10,0,4809 -BRDA:46,10,1,4809 -BRDA:47,11,0,4809 -BRDA:47,11,1,4809 +BRDA:31,0,0,5004 +BRDA:31,0,1,4932 +BRDA:35,1,0,5004 +BRDA:35,1,1,5004 +BRDA:36,2,0,5004 +BRDA:36,2,1,5004 +BRDA:37,3,0,5004 +BRDA:37,3,1,5004 +BRDA:40,4,0,5004 +BRDA:40,4,1,5004 +BRDA:41,5,0,5004 +BRDA:41,5,1,5004 +BRDA:42,6,0,5004 +BRDA:42,6,1,5003 +BRDA:43,7,0,5004 +BRDA:43,7,1,4999 +BRDA:44,8,0,5004 +BRDA:44,8,1,5004 +BRDA:45,9,0,5004 +BRDA:45,9,1,5004 +BRDA:46,10,0,5004 +BRDA:46,10,1,5004 +BRDA:47,11,0,5004 +BRDA:47,11,1,5004 BRF:24 BRH:24 end_of_record @@ -19727,16 +19727,16 @@ FNF:12 FNH:12 FNDA:1,(anonymous_0) FNDA:1,(anonymous_1) -FNDA:4929,DarkColorHandlerImpl -FNDA:4990,(anonymous_3) -FNDA:13942,(anonymous_4) -FNDA:4586,(anonymous_5) +FNDA:5122,DarkColorHandlerImpl +FNDA:5277,(anonymous_3) +FNDA:14538,(anonymous_4) +FNDA:4761,(anonymous_5) FNDA:2,(anonymous_6) -FNDA:15222,(anonymous_7) +FNDA:16492,(anonymous_7) FNDA:11,(anonymous_8) FNDA:9,(anonymous_9) -FNDA:505,(anonymous_10) -FNDA:1010,(anonymous_11) +FNDA:843,(anonymous_10) +FNDA:1686,(anonymous_11) DA:2,1 DA:4,1 DA:5,1 @@ -19746,43 +19746,43 @@ DA:8,1 DA:9,1 DA:11,1 DA:25,1 -DA:26,4929 -DA:28,4929 +DA:26,5122 +DA:28,5122 DA:34,1 -DA:35,4990 +DA:35,5277 DA:45,1 -DA:46,13942 -DA:49,13942 -DA:50,13942 -DA:51,13942 -DA:52,13942 -DA:55,13942 +DA:46,14538 +DA:49,14538 +DA:50,14538 +DA:51,14538 +DA:52,14538 +DA:55,14538 DA:56,14 DA:59,14 DA:60,13 DA:62,13 DA:63,13 DA:66,14 -DA:68,13928 -DA:75,4586 -DA:76,4586 -DA:77,4586 +DA:68,14524 +DA:75,4761 +DA:76,4761 +DA:77,4761 DA:87,1 -DA:89,15222 -DA:92,15222 -DA:93,14028 -DA:95,14028 +DA:89,16492 +DA:92,16492 +DA:93,14667 +DA:95,14667 DA:96,10 DA:97,9 DA:98,9 DA:99,9 DA:101,1 -DA:103,14018 +DA:103,14657 DA:107,6 DA:109,6 DA:110,1 -DA:113,14012 -DA:117,15222 +DA:113,14651 +DA:117,16492 DA:124,11 DA:125,11 DA:127,11 @@ -19792,25 +19792,25 @@ DA:131,9 DA:139,6 DA:140,5 DA:144,6 -DA:153,505 -DA:154,505 -DA:155,1010 -DA:161,1010 -DA:162,1010 -DA:164,1010 -DA:165,37 +DA:153,843 +DA:154,843 +DA:155,1686 +DA:161,1686 +DA:162,1686 +DA:164,1686 +DA:165,76 DA:169,1 LF:63 LH:63 BRDA:7,0,0,1 BRDA:7,0,1,1 -BRDA:49,1,0,13942 +BRDA:49,1,0,14538 BRDA:49,1,1,0 -BRDA:51,2,0,13942 -BRDA:51,2,1,13941 +BRDA:51,2,0,14538 +BRDA:51,2,1,14537 BRDA:55,3,0,14 -BRDA:55,3,1,13928 -BRDA:55,4,0,13942 +BRDA:55,3,1,14524 +BRDA:55,4,0,14538 BRDA:55,4,1,15 BRDA:57,5,0,14 BRDA:57,5,1,11 @@ -19818,12 +19818,12 @@ BRDA:59,6,0,13 BRDA:59,6,1,1 BRDA:60,7,0,13 BRDA:60,7,1,9 -BRDA:92,8,0,14028 -BRDA:92,8,1,1194 +BRDA:92,8,0,14667 +BRDA:92,8,1,1825 BRDA:93,9,0,10 -BRDA:93,9,1,14018 +BRDA:93,9,1,14657 BRDA:95,10,0,10 -BRDA:95,10,1,14018 +BRDA:95,10,1,14657 BRDA:96,11,0,9 BRDA:96,11,1,1 BRDA:99,12,0,7 @@ -19831,7 +19831,7 @@ BRDA:99,12,1,2 BRDA:99,13,0,9 BRDA:99,13,1,9 BRDA:103,14,0,6 -BRDA:103,14,1,14012 +BRDA:103,14,1,14651 BRDA:107,15,0,6 BRDA:107,15,1,5 BRDA:109,16,0,1 @@ -19844,12 +19844,12 @@ BRDA:132,18,2,5 BRDA:132,18,3,5 BRDA:139,19,0,5 BRDA:139,19,1,1 -BRDA:156,20,0,1010 -BRDA:156,20,1,975 -BRDA:164,21,0,37 -BRDA:164,21,1,973 -BRDA:164,22,0,1010 -BRDA:164,22,1,37 +BRDA:156,20,0,1686 +BRDA:156,20,1,1612 +BRDA:164,21,0,76 +BRDA:164,21,1,1610 +BRDA:164,22,0,1686 +BRDA:164,22,1,76 BRF:48 BRH:47 end_of_record @@ -19860,19 +19860,19 @@ FN:14,Editor FNF:2 FNH:2 FNDA:1,(anonymous_0) -FNDA:4603,Editor +FNDA:4790,Editor DA:1,1 DA:2,1 DA:8,1 -DA:14,4605 -DA:15,4603 +DA:14,4792 +DA:15,4790 DA:17,1 LF:6 LH:6 BRDA:14,0,0,2 -BRDA:14,0,1,4601 -BRDA:15,1,0,4603 -BRDA:15,1,1,4601 +BRDA:14,0,1,4788 +BRDA:15,1,0,4790 +BRDA:15,1,1,4788 BRF:4 BRH:4 end_of_record @@ -19958,111 +19958,111 @@ FN:992,(anonymous_76) FN:1014,(anonymous_77) FN:1022,(anonymous_78) FNF:79 -FNH:62 +FNH:63 FNDA:1,(anonymous_0) -FNDA:4628,EditorBase -FNDA:51060,(anonymous_2) -FNDA:4585,(anonymous_3) +FNDA:4815,EditorBase +FNDA:53117,(anonymous_2) +FNDA:4760,(anonymous_3) FNDA:13,(anonymous_4) -FNDA:31,(anonymous_5) -FNDA:4,(anonymous_6) +FNDA:43,(anonymous_5) +FNDA:5,(anonymous_6) FNDA:2,(anonymous_7) FNDA:2,(anonymous_8) -FNDA:15,(anonymous_9) -FNDA:466,(anonymous_10) -FNDA:10393,(anonymous_11) -FNDA:65,(anonymous_12) +FNDA:39,(anonymous_9) +FNDA:487,(anonymous_10) +FNDA:11146,(anonymous_11) +FNDA:92,(anonymous_12) FNDA:0,(anonymous_13) FNDA:0,(anonymous_14) -FNDA:117,(anonymous_15) -FNDA:4971,(anonymous_16) -FNDA:3,(anonymous_17) -FNDA:5,(anonymous_18) +FNDA:183,(anonymous_15) +FNDA:5234,(anonymous_16) +FNDA:9,(anonymous_17) +FNDA:11,(anonymous_18) FNDA:0,(anonymous_19) -FNDA:6,(anonymous_20) -FNDA:6,(anonymous_21) -FNDA:497,(anonymous_22) -FNDA:534,(anonymous_23) +FNDA:5,(anonymous_20) +FNDA:5,(anonymous_21) +FNDA:234,(anonymous_22) +FNDA:709,(anonymous_23) FNDA:0,(anonymous_24) FNDA:0,(anonymous_25) -FNDA:270,(anonymous_26) -FNDA:5118,(anonymous_27) -FNDA:237,(anonymous_28) -FNDA:504,(anonymous_29) -FNDA:504,(anonymous_30) -FNDA:0,(anonymous_31) -FNDA:96,(anonymous_32) -FNDA:77,(anonymous_33) -FNDA:116,(anonymous_34) -FNDA:13915,(anonymous_35) -FNDA:9328,(anonymous_36) +FNDA:384,(anonymous_26) +FNDA:5395,(anonymous_27) +FNDA:234,(anonymous_28) +FNDA:584,(anonymous_29) +FNDA:584,(anonymous_30) +FNDA:6,(anonymous_31) +FNDA:116,(anonymous_32) +FNDA:97,(anonymous_33) +FNDA:136,(anonymous_34) +FNDA:14476,(anonymous_35) +FNDA:9684,(anonymous_36) FNDA:17,(anonymous_37) FNDA:0,(anonymous_38) FNDA:0,(anonymous_39) -FNDA:4846,(anonymous_40) -FNDA:4626,(anonymous_41) -FNDA:9832,(anonymous_42) +FNDA:5147,(anonymous_40) +FNDA:4813,(anonymous_41) +FNDA:19880,(anonymous_42) FNDA:0,(anonymous_43) -FNDA:35,(anonymous_44) -FNDA:10797,(anonymous_45) -FNDA:16,(anonymous_46) +FNDA:27,(anonymous_44) +FNDA:11595,(anonymous_45) +FNDA:34,(anonymous_46) FNDA:37,(anonymous_47) -FNDA:22,(anonymous_48) +FNDA:93,(anonymous_48) FNDA:0,(anonymous_49) -FNDA:54,(anonymous_50) -FNDA:53,(anonymous_51) +FNDA:58,(anonymous_50) +FNDA:57,(anonymous_51) FNDA:9,(anonymous_52) FNDA:9,(anonymous_53) FNDA:0,(anonymous_54) FNDA:17,(anonymous_55) FNDA:0,(anonymous_56) FNDA:0,(anonymous_57) -FNDA:137,(anonymous_58) -FNDA:223,(anonymous_59) -FNDA:72,(anonymous_60) -FNDA:110,(anonymous_61) +FNDA:131,(anonymous_58) +FNDA:214,(anonymous_59) +FNDA:68,(anonymous_60) +FNDA:104,(anonymous_61) FNDA:7,(anonymous_62) FNDA:14,(anonymous_63) -FNDA:4626,(anonymous_64) +FNDA:4813,(anonymous_64) FNDA:0,(anonymous_65) FNDA:75,(anonymous_66) FNDA:1,(anonymous_67) -FNDA:4646,(anonymous_68) +FNDA:4833,(anonymous_68) FNDA:3,(anonymous_69) FNDA:3,(anonymous_70) FNDA:0,(anonymous_71) -FNDA:10731,(anonymous_72) -FNDA:26,(anonymous_73) +FNDA:11529,(anonymous_72) +FNDA:20,(anonymous_73) FNDA:0,(anonymous_74) FNDA:103,(anonymous_75) FNDA:0,(anonymous_76) FNDA:31,(anonymous_77) -FNDA:101675,(anonymous_78) +FNDA:116883,(anonymous_78) DA:1,1 DA:41,1 DA:73,1 -DA:75,4628 -DA:84,4628 -DA:90,4628 +DA:75,4815 +DA:84,4815 +DA:90,4815 DA:91,2 -DA:95,4626 -DA:98,51060 -DA:101,4626 +DA:95,4813 +DA:98,53117 +DA:101,4813 DA:109,1 -DA:110,4585 -DA:111,4585 -DA:112,50546 -DA:115,4585 -DA:117,4585 +DA:110,4760 +DA:111,4760 +DA:112,52471 +DA:115,4760 +DA:117,4760 DA:124,1 DA:125,13 DA:142,1 -DA:143,31 -DA:144,31 +DA:143,43 +DA:144,43 DA:152,1 -DA:154,4 -DA:155,4 -DA:156,4 +DA:154,5 +DA:155,5 +DA:156,5 DA:159,0 DA:169,1 DA:174,2 @@ -20072,72 +20072,72 @@ DA:181,2 DA:185,2 DA:188,0 DA:196,1 -DA:197,15 +DA:197,39 DA:200,1 -DA:201,466 +DA:201,487 DA:202,0 -DA:204,466 +DA:204,487 DA:207,1 -DA:209,20715 -DA:215,10393 -DA:216,10393 -DA:217,10393 -DA:218,10393 -DA:220,10393 -DA:221,10393 -DA:222,65 -DA:223,65 -DA:226,10328 -DA:229,65 +DA:209,22194 +DA:215,11146 +DA:216,11146 +DA:217,11146 +DA:218,11146 +DA:220,11146 +DA:221,11146 +DA:222,92 +DA:223,92 +DA:226,11054 +DA:229,92 DA:243,1 DA:244,0 DA:256,1 DA:257,0 DA:265,1 -DA:266,234 -DA:268,117 -DA:269,117 -DA:277,5316 -DA:278,4971 -DA:279,4971 +DA:266,366 +DA:268,183 +DA:269,183 +DA:277,5655 +DA:278,5234 +DA:279,5234 DA:291,1 -DA:292,3 -DA:293,3 -DA:294,3 -DA:298,3 -DA:303,3 +DA:292,9 +DA:293,9 +DA:294,9 +DA:298,9 +DA:303,9 DA:304,0 -DA:307,3 -DA:308,5 -DA:310,3 +DA:307,9 +DA:308,11 +DA:310,9 DA:317,1 DA:318,0 DA:319,0 DA:320,0 DA:322,0 -DA:333,6 -DA:335,10 -DA:336,10 -DA:337,10 -DA:339,6 -DA:340,6 +DA:333,5 +DA:335,8 +DA:336,8 +DA:337,8 +DA:339,5 +DA:340,5 DA:341,0 -DA:344,6 -DA:346,6 +DA:344,5 +DA:346,5 DA:348,0 -DA:353,6 -DA:354,6 -DA:355,6 -DA:363,6 -DA:364,6 -DA:365,6 -DA:366,6 -DA:382,700 -DA:383,497 -DA:384,497 +DA:353,5 +DA:354,5 +DA:355,5 +DA:363,5 +DA:364,5 +DA:365,5 +DA:366,5 +DA:382,464 +DA:383,234 +DA:384,234 DA:394,1 -DA:395,534 -DA:396,534 +DA:395,709 +DA:396,709 DA:404,1 DA:405,0 DA:406,0 @@ -20145,47 +20145,47 @@ DA:413,1 DA:414,0 DA:415,0 DA:421,1 -DA:422,270 -DA:423,270 +DA:422,384 +DA:423,384 DA:426,1 -DA:432,5118 -DA:434,5118 +DA:432,5395 +DA:434,5395 DA:440,1 -DA:441,237 -DA:442,237 -DA:443,220 +DA:441,234 +DA:442,234 +DA:443,217 DA:446,17 DA:447,17 DA:448,7 DA:451,10 -DA:466,504 -DA:471,504 -DA:473,504 -DA:475,504 -DA:476,108 -DA:477,108 -DA:479,504 +DA:466,584 +DA:471,584 +DA:473,584 +DA:475,584 +DA:476,105 +DA:477,105 +DA:479,584 DA:493,1 -DA:494,0 +DA:494,6 DA:500,1 -DA:501,192 -DA:503,96 -DA:504,96 -DA:505,96 -DA:506,96 -DA:507,77 -DA:509,96 -DA:510,116 +DA:501,232 +DA:503,116 +DA:504,116 +DA:505,116 +DA:506,116 +DA:507,97 +DA:509,116 +DA:510,136 DA:518,1 -DA:522,13915 -DA:523,13915 -DA:524,13915 +DA:522,14476 +DA:523,14476 +DA:524,14476 DA:536,1 -DA:539,9440 -DA:541,9328 -DA:542,9328 -DA:546,9328 -DA:548,9328 +DA:539,9792 +DA:541,9684 +DA:542,9684 +DA:546,9684 +DA:548,9684 DA:556,1 DA:557,22 DA:560,17 @@ -20198,35 +20198,35 @@ DA:583,0 DA:584,0 DA:585,0 DA:598,1 -DA:604,4846 -DA:605,4846 +DA:604,5147 +DA:605,5147 DA:617,1 -DA:618,4626 -DA:619,4626 +DA:618,4813 +DA:619,4813 DA:633,1 -DA:634,9832 +DA:634,19880 DA:640,1 DA:641,0 DA:652,1 -DA:653,35 -DA:654,35 +DA:653,27 +DA:654,27 DA:664,1 -DA:665,10797 +DA:665,11595 DA:672,1 -DA:673,16 +DA:673,34 DA:680,1 DA:681,37 DA:688,1 -DA:689,22 -DA:690,22 +DA:689,93 +DA:690,93 DA:700,1 DA:701,0 DA:703,0 DA:704,0 -DA:715,54 -DA:716,54 -DA:717,53 -DA:718,53 +DA:715,58 +DA:716,58 +DA:717,57 +DA:718,57 DA:730,9 DA:731,9 DA:732,9 @@ -20254,19 +20254,19 @@ DA:785,0 DA:788,0 DA:792,0 DA:799,1 -DA:800,137 -DA:801,137 -DA:802,223 -DA:803,223 -DA:804,223 +DA:800,131 +DA:801,131 +DA:802,214 +DA:803,214 +DA:804,214 DA:812,1 -DA:813,72 -DA:814,72 -DA:815,110 -DA:816,110 -DA:817,110 -DA:818,110 -DA:819,110 +DA:813,68 +DA:814,68 +DA:815,104 +DA:816,104 +DA:817,104 +DA:818,104 +DA:819,104 DA:820,46 DA:829,1 DA:830,7 @@ -20278,8 +20278,8 @@ DA:843,14 DA:844,14 DA:845,14 DA:853,1 -DA:854,4626 -DA:855,4626 +DA:854,4813 +DA:855,4813 DA:866,1 DA:867,0 DA:869,0 @@ -20293,7 +20293,7 @@ DA:903,1 DA:904,1 DA:905,1 DA:917,1 -DA:918,4646 +DA:918,4833 DA:929,1 DA:930,3 DA:931,3 @@ -20303,9 +20303,9 @@ DA:939,3 DA:945,1 DA:946,0 DA:953,1 -DA:956,10731 +DA:956,11529 DA:965,1 -DA:966,26 +DA:966,20 DA:972,1 DA:973,0 DA:982,1 @@ -20320,25 +20320,25 @@ DA:999,0 DA:1014,1 DA:1015,31 DA:1022,1 -DA:1023,101675 +DA:1023,116883 DA:1024,0 -DA:1026,101675 +DA:1026,116883 DA:1030,1 LF:286 -LH:229 +LH:230 BRDA:90,0,0,2 -BRDA:90,0,1,4626 -BRDA:144,1,0,31 +BRDA:90,0,1,4813 +BRDA:144,1,0,43 BRDA:144,1,1,0 -BRDA:144,2,0,22 -BRDA:144,2,1,9 -BRDA:144,3,0,31 -BRDA:144,3,1,31 -BRDA:154,4,0,4 +BRDA:144,2,0,30 +BRDA:144,2,1,13 +BRDA:144,3,0,43 +BRDA:144,3,1,43 +BRDA:154,4,0,5 BRDA:154,4,1,0 -BRDA:154,5,0,4 -BRDA:154,5,1,4 -BRDA:154,5,2,4 +BRDA:154,5,0,5 +BRDA:154,5,1,5 +BRDA:154,5,2,5 BRDA:176,6,0,2 BRDA:176,6,1,0 BRDA:176,7,0,2 @@ -20350,144 +20350,144 @@ BRDA:181,9,1,2 BRDA:181,10,0,2 BRDA:181,10,1,2 BRDA:201,11,0,0 -BRDA:201,11,1,466 -BRDA:209,12,0,10322 -BRDA:209,12,1,71 +BRDA:201,11,1,487 +BRDA:209,12,0,11048 +BRDA:209,12,1,98 BRDA:217,13,0,6 -BRDA:217,13,1,10387 +BRDA:217,13,1,11140 BRDA:218,14,0,6 -BRDA:218,14,1,10387 -BRDA:220,15,0,10328 -BRDA:220,15,1,65 -BRDA:221,16,0,65 -BRDA:221,16,1,10328 -BRDA:266,17,0,117 +BRDA:218,14,1,11140 +BRDA:220,15,0,11054 +BRDA:220,15,1,92 +BRDA:221,16,0,92 +BRDA:221,16,1,11054 +BRDA:266,17,0,183 BRDA:266,17,1,0 -BRDA:277,18,0,345 -BRDA:277,18,1,4626 -BRDA:292,19,0,3 +BRDA:277,18,0,421 +BRDA:277,18,1,4813 +BRDA:292,19,0,9 BRDA:292,19,1,0 BRDA:297,20,0,0 -BRDA:297,20,1,3 -BRDA:294,21,0,3 -BRDA:294,21,1,3 -BRDA:298,22,0,3 +BRDA:297,20,1,9 +BRDA:294,21,0,9 +BRDA:294,21,1,9 +BRDA:298,22,0,9 BRDA:298,22,1,0 BRDA:298,23,0,0 -BRDA:298,23,1,3 -BRDA:298,24,0,3 -BRDA:298,24,1,3 +BRDA:298,23,1,9 +BRDA:298,24,0,9 +BRDA:298,24,1,9 BRDA:303,25,0,0 -BRDA:303,25,1,3 -BRDA:303,26,0,3 -BRDA:303,26,1,3 +BRDA:303,25,1,9 +BRDA:303,26,0,9 +BRDA:303,26,1,9 BRDA:303,26,2,0 BRDA:319,27,0,0 BRDA:319,27,1,0 BRDA:319,28,0,0 BRDA:319,28,1,0 -BRDA:335,29,0,4 +BRDA:335,29,0,3 BRDA:335,29,1,2 -BRDA:336,30,0,4 +BRDA:336,30,0,3 BRDA:336,30,1,2 -BRDA:337,31,0,4 +BRDA:337,31,0,3 BRDA:337,31,1,2 BRDA:340,32,0,0 -BRDA:340,32,1,6 -BRDA:344,33,0,6 +BRDA:340,32,1,5 +BRDA:344,33,0,5 BRDA:344,33,1,0 -BRDA:354,34,0,6 -BRDA:354,34,1,6 -BRDA:363,35,0,6 +BRDA:354,34,0,5 +BRDA:354,34,1,5 +BRDA:363,35,0,5 BRDA:363,35,1,0 -BRDA:382,36,0,203 -BRDA:382,36,1,294 +BRDA:382,36,0,230 +BRDA:382,36,1,4 BRDA:406,37,0,0 BRDA:406,37,1,0 BRDA:441,38,0,0 -BRDA:441,38,1,237 -BRDA:441,39,0,237 -BRDA:441,39,1,237 -BRDA:442,40,0,220 +BRDA:441,38,1,234 +BRDA:441,39,0,234 +BRDA:441,39,1,234 +BRDA:442,40,0,217 BRDA:442,40,1,17 -BRDA:442,41,0,237 -BRDA:442,41,1,237 +BRDA:442,41,0,234 +BRDA:442,41,1,234 BRDA:442,42,0,0 -BRDA:442,42,1,237 -BRDA:442,43,0,237 -BRDA:442,43,1,237 +BRDA:442,42,1,234 +BRDA:442,43,0,234 +BRDA:442,43,1,234 BRDA:447,44,0,7 BRDA:447,44,1,10 -BRDA:471,45,0,396 -BRDA:471,45,1,108 +BRDA:471,45,0,479 +BRDA:471,45,1,105 BRDA:483,46,0,437 -BRDA:483,46,1,67 -BRDA:474,47,0,504 +BRDA:483,46,1,147 +BRDA:474,47,0,584 BRDA:474,47,1,447 BRDA:474,48,0,32 -BRDA:474,48,1,472 -BRDA:474,49,0,504 -BRDA:474,49,1,504 -BRDA:475,50,0,108 -BRDA:475,50,1,396 +BRDA:474,48,1,552 +BRDA:474,49,0,584 +BRDA:474,49,1,584 +BRDA:475,50,0,105 +BRDA:475,50,1,479 BRDA:477,51,0,10 -BRDA:477,51,1,98 -BRDA:477,52,0,108 -BRDA:477,52,1,98 -BRDA:480,53,0,504 -BRDA:480,53,1,494 -BRDA:501,54,0,96 +BRDA:477,51,1,95 +BRDA:477,52,0,105 +BRDA:477,52,1,95 +BRDA:480,53,0,584 +BRDA:480,53,1,574 +BRDA:501,54,0,116 BRDA:501,54,1,0 -BRDA:507,55,0,77 +BRDA:507,55,0,97 BRDA:507,55,1,0 -BRDA:522,56,0,4626 -BRDA:522,56,1,9289 -BRDA:539,57,0,112 -BRDA:539,57,1,9216 +BRDA:522,56,0,4813 +BRDA:522,56,1,9663 +BRDA:539,57,0,108 +BRDA:539,57,1,9576 BRDA:557,58,0,5 BRDA:557,58,1,12 -BRDA:607,59,0,177 -BRDA:607,59,1,4669 -BRDA:607,60,0,4846 -BRDA:607,60,1,4846 -BRDA:608,61,0,166 -BRDA:608,61,1,4680 -BRDA:608,62,0,4846 -BRDA:608,62,1,4846 -BRDA:609,63,0,22 -BRDA:609,63,1,4824 -BRDA:609,64,0,4846 -BRDA:609,64,1,4846 -BRDA:620,65,0,4626 -BRDA:620,65,1,4626 -BRDA:654,66,0,35 -BRDA:654,66,1,12 -BRDA:655,67,0,11 +BRDA:607,59,0,291 +BRDA:607,59,1,4856 +BRDA:607,60,0,5147 +BRDA:607,60,1,5147 +BRDA:608,61,0,266 +BRDA:608,61,1,4881 +BRDA:608,62,0,5147 +BRDA:608,62,1,5147 +BRDA:609,63,0,20 +BRDA:609,63,1,5127 +BRDA:609,64,0,5147 +BRDA:609,64,1,5147 +BRDA:620,65,0,4813 +BRDA:620,65,1,4813 +BRDA:654,66,0,27 +BRDA:654,66,1,10 +BRDA:655,67,0,9 BRDA:655,67,1,1 -BRDA:673,68,0,16 +BRDA:673,68,0,34 BRDA:673,68,1,0 -BRDA:673,69,0,16 -BRDA:673,69,1,16 -BRDA:689,70,0,22 +BRDA:673,69,0,34 +BRDA:673,69,1,34 +BRDA:689,70,0,93 BRDA:689,70,1,0 -BRDA:689,71,0,22 -BRDA:689,71,1,22 -BRDA:689,72,0,12 -BRDA:689,72,1,10 -BRDA:689,73,0,22 -BRDA:689,73,1,22 -BRDA:691,74,0,22 +BRDA:689,71,0,93 +BRDA:689,71,1,93 +BRDA:689,72,0,63 +BRDA:689,72,1,30 +BRDA:689,73,0,93 +BRDA:689,73,1,93 +BRDA:691,74,0,93 BRDA:691,74,1,0 BRDA:701,75,0,0 BRDA:701,75,1,0 BRDA:705,76,0,0 BRDA:705,76,1,0 -BRDA:716,77,0,43 +BRDA:716,77,0,47 BRDA:716,77,1,11 -BRDA:716,78,0,54 -BRDA:716,78,1,54 -BRDA:719,79,0,53 -BRDA:719,79,1,53 +BRDA:716,78,0,58 +BRDA:716,78,1,58 +BRDA:719,79,0,57 +BRDA:719,79,1,57 BRDA:731,80,0,9 BRDA:731,80,1,0 BRDA:733,81,0,0 @@ -20513,27 +20513,27 @@ BRDA:781,90,1,0 BRDA:783,91,0,0 BRDA:783,91,1,0 BRDA:801,92,0,0 -BRDA:801,92,1,137 -BRDA:801,93,0,137 -BRDA:801,93,1,137 -BRDA:802,94,0,223 +BRDA:801,92,1,131 +BRDA:801,93,0,131 +BRDA:801,93,1,131 +BRDA:802,94,0,214 BRDA:802,94,1,127 BRDA:814,95,0,0 -BRDA:814,95,1,72 -BRDA:814,96,0,72 -BRDA:814,96,1,72 -BRDA:816,97,0,110 +BRDA:814,95,1,68 +BRDA:814,96,0,68 +BRDA:814,96,1,68 +BRDA:816,97,0,104 BRDA:816,97,1,0 -BRDA:816,98,0,110 -BRDA:816,98,1,110 +BRDA:816,98,0,104 +BRDA:816,98,1,104 BRDA:816,99,0,0 -BRDA:816,99,1,110 -BRDA:816,100,0,110 -BRDA:816,100,1,110 -BRDA:817,101,0,110 +BRDA:816,99,1,104 +BRDA:816,100,0,104 +BRDA:816,100,1,104 +BRDA:817,101,0,104 BRDA:817,101,1,0 BRDA:819,102,0,46 -BRDA:819,102,1,64 +BRDA:819,102,1,58 BRDA:830,103,0,7 BRDA:830,103,1,0 BRDA:832,104,0,7 @@ -20561,7 +20561,7 @@ BRDA:994,114,1,0 BRDA:998,115,0,0 BRDA:998,115,1,0 BRDA:1023,116,0,0 -BRDA:1023,116,1,101675 +BRDA:1023,116,1,116883 BRF:236 BRH:162 end_of_record @@ -20575,56 +20575,56 @@ FN:49,(anonymous_4) FN:51,(anonymous_5) FNF:6 FNH:5 -FNDA:4626,(anonymous_0) -FNDA:60138,(anonymous_1) +FNDA:4813,(anonymous_0) +FNDA:62569,(anonymous_1) FNDA:31,(anonymous_2) -FNDA:55686,(anonymous_3) -FNDA:371,(anonymous_4) +FNDA:57930,(anonymous_3) +FNDA:446,(anonymous_4) FNDA:0,(anonymous_5) DA:1,1 DA:2,1 DA:3,1 DA:4,1 DA:12,1 -DA:13,4626 -DA:14,4626 -DA:16,4626 -DA:17,60138 -DA:18,4626 -DA:19,4601 -DA:22,55512 -DA:26,4626 -DA:27,4626 -DA:29,4626 +DA:13,4813 +DA:14,4813 +DA:16,4813 +DA:17,62569 +DA:18,4813 +DA:19,4784 +DA:22,57756 +DA:26,4813 +DA:27,4813 +DA:29,4813 DA:31,31 DA:33,31 -DA:40,4626 -DA:47,55686 -DA:49,371 +DA:40,4813 +DA:47,57930 +DA:49,446 DA:51,0 -DA:57,4626 +DA:57,4813 LF:22 LH:21 -BRDA:17,0,0,4626 -BRDA:17,0,1,55512 -BRDA:18,1,0,4601 -BRDA:18,1,1,25 +BRDA:17,0,0,4813 +BRDA:17,0,1,57756 +BRDA:18,1,0,4784 +BRDA:18,1,1,29 BRDA:27,2,0,0 -BRDA:27,2,1,4626 +BRDA:27,2,1,4813 BRDA:27,3,0,0 -BRDA:27,3,1,4626 -BRDA:27,4,0,4626 -BRDA:27,4,1,4626 -BRDA:29,5,0,4626 -BRDA:29,5,1,4626 +BRDA:27,3,1,4813 +BRDA:27,4,0,4813 +BRDA:27,4,1,4813 +BRDA:29,5,0,4813 +BRDA:29,5,1,4813 BRDA:35,6,0,31 BRDA:35,6,1,0 -BRDA:44,7,0,4626 -BRDA:44,7,1,4625 -BRDA:49,8,0,4626 -BRDA:49,8,1,4626 -BRDA:51,9,0,4626 -BRDA:51,9,1,4626 +BRDA:44,7,0,4813 +BRDA:44,7,1,4812 +BRDA:49,8,0,4813 +BRDA:49,8,1,4813 +BRDA:51,9,0,4813 +BRDA:51,9,1,4813 BRF:20 BRH:17 end_of_record @@ -20633,12 +20633,12 @@ SF:packages/roosterjs-editor-core/lib/editor/isFeatureEnabled.ts FN:10,isFeatureEnabled FNF:1 FNH:1 -FNDA:10863,isFeatureEnabled +FNDA:11661,isFeatureEnabled DA:10,1 -DA:14,10863 +DA:14,11661 LF:2 LH:2 -BRDA:14,0,0,10863 +BRDA:14,0,0,11661 BRDA:14,0,1,36 BRF:2 BRH:2 @@ -20778,66 +20778,66 @@ FN:153,(anonymous_129) FN:154,(anonymous_130) FN:156,(anonymous_131) FNF:132 -FNH:103 -FNDA:4816,(anonymous_0) -FNDA:4646,(anonymous_1) -FNDA:193,(anonymous_2) -FNDA:123,(anonymous_3) +FNH:104 +FNDA:5032,(anonymous_0) +FNDA:4833,(anonymous_1) +FNDA:264,(anonymous_2) +FNDA:127,(anonymous_3) FNDA:31,(anonymous_4) FNDA:0,(anonymous_5) FNDA:0,(anonymous_6) -FNDA:556,(anonymous_7) +FNDA:547,(anonymous_7) FNDA:0,(anonymous_8) FNDA:1,(anonymous_9) FNDA:3,(anonymous_10) -FNDA:3,(anonymous_11) -FNDA:0,(anonymous_12) +FNDA:9,(anonymous_11) +FNDA:8,(anonymous_12) FNDA:0,(anonymous_13) FNDA:2,(anonymous_14) FNDA:2,(anonymous_15) FNDA:0,(anonymous_16) FNDA:24,(anonymous_17) -FNDA:1,(anonymous_18) +FNDA:0,(anonymous_18) FNDA:0,(anonymous_19) -FNDA:6,(anonymous_20) -FNDA:6,(anonymous_21) -FNDA:30,(anonymous_22) -FNDA:18823,(anonymous_23) +FNDA:4,(anonymous_20) +FNDA:4,(anonymous_21) +FNDA:28,(anonymous_22) +FNDA:19572,(anonymous_23) FNDA:0,(anonymous_24) -FNDA:4627,(anonymous_25) +FNDA:4814,(anonymous_25) FNDA:19,(anonymous_26) FNDA:29,(anonymous_27) -FNDA:11099,(anonymous_28) -FNDA:5788,(anonymous_29) +FNDA:12791,(anonymous_28) +FNDA:6076,(anonymous_29) FNDA:0,(anonymous_30) FNDA:12,(anonymous_31) -FNDA:162,(anonymous_32) +FNDA:213,(anonymous_32) FNDA:1,(anonymous_33) FNDA:100,(anonymous_34) -FNDA:7846,(anonymous_35) -FNDA:228,(anonymous_36) +FNDA:8185,(anonymous_35) +FNDA:372,(anonymous_36) FNDA:36,(anonymous_37) -FNDA:26,(anonymous_38) +FNDA:35,(anonymous_38) FNDA:70,(anonymous_39) -FNDA:10395,(anonymous_40) +FNDA:11167,(anonymous_40) FNDA:12,(anonymous_41) -FNDA:16,(anonymous_42) -FNDA:244,(anonymous_43) -FNDA:76,(anonymous_44) -FNDA:29,(anonymous_45) +FNDA:20,(anonymous_42) +FNDA:316,(anonymous_43) +FNDA:111,(anonymous_44) +FNDA:53,(anonymous_45) FNDA:32,(anonymous_46) -FNDA:172,(anonymous_47) +FNDA:206,(anonymous_47) FNDA:0,(anonymous_48) FNDA:3,(anonymous_49) FNDA:10,(anonymous_50) -FNDA:12013,(anonymous_51) +FNDA:12866,(anonymous_51) FNDA:6,(anonymous_52) FNDA:0,(anonymous_53) -FNDA:9317,(anonymous_54) +FNDA:9730,(anonymous_54) FNDA:383,(anonymous_55) -FNDA:4851,(anonymous_56) +FNDA:5038,(anonymous_56) FNDA:0,(anonymous_57) -FNDA:276,(anonymous_58) +FNDA:270,(anonymous_58) FNDA:31,(anonymous_59) FNDA:0,(anonymous_60) FNDA:115,(anonymous_61) @@ -20845,127 +20845,127 @@ FNDA:160,(anonymous_62) FNDA:94,(anonymous_63) FNDA:2,(anonymous_64) FNDA:0,(anonymous_65) -FNDA:14,(anonymous_66) -FNDA:93,(anonymous_67) -FNDA:0,(anonymous_68) +FNDA:25,(anonymous_66) +FNDA:113,(anonymous_67) +FNDA:3,(anonymous_68) FNDA:0,(anonymous_69) FNDA:1,(anonymous_70) -FNDA:78,(anonymous_71) -FNDA:44,(anonymous_72) -FNDA:37,(anonymous_73) -FNDA:50,(anonymous_74) +FNDA:98,(anonymous_71) +FNDA:64,(anonymous_72) +FNDA:57,(anonymous_73) +FNDA:63,(anonymous_74) FNDA:0,(anonymous_75) FNDA:0,(anonymous_76) -FNDA:10453,(anonymous_77) -FNDA:756,(anonymous_78) +FNDA:11189,(anonymous_77) +FNDA:912,(anonymous_78) FNDA:0,(anonymous_79) -FNDA:1,(anonymous_80) -FNDA:4940,(anonymous_81) +FNDA:7,(anonymous_80) +FNDA:5251,(anonymous_81) FNDA:3,(anonymous_82) FNDA:0,(anonymous_83) FNDA:4,(anonymous_84) -FNDA:394,(anonymous_85) -FNDA:761,(anonymous_86) +FNDA:470,(anonymous_85) +FNDA:888,(anonymous_86) FNDA:0,(anonymous_87) -FNDA:5001,(anonymous_88) -FNDA:9252,(anonymous_89) +FNDA:5288,(anonymous_88) +FNDA:9626,(anonymous_89) FNDA:0,(anonymous_90) -FNDA:523,(anonymous_91) +FNDA:699,(anonymous_91) FNDA:0,(anonymous_92) FNDA:0,(anonymous_93) -FNDA:4838,(anonymous_94) -FNDA:14,(anonymous_95) +FNDA:5031,(anonymous_94) +FNDA:11,(anonymous_95) FNDA:47,(anonymous_96) FNDA:0,(anonymous_97) -FNDA:59,(anonymous_98) -FNDA:342,(anonymous_99) +FNDA:57,(anonymous_98) +FNDA:323,(anonymous_99) FNDA:135,(anonymous_100) -FNDA:5405,(anonymous_101) -FNDA:5379,(anonymous_102) +FNDA:5767,(anonymous_101) +FNDA:5807,(anonymous_102) FNDA:0,(anonymous_103) FNDA:4,(anonymous_104) -FNDA:403,(anonymous_105) -FNDA:549,(anonymous_106) +FNDA:479,(anonymous_105) +FNDA:712,(anonymous_106) FNDA:7,(anonymous_107) FNDA:4,(anonymous_108) FNDA:53,(anonymous_109) -FNDA:29,(anonymous_110) -FNDA:168,(anonymous_111) +FNDA:25,(anonymous_110) +FNDA:166,(anonymous_111) FNDA:5,(anonymous_112) FNDA:740,(anonymous_113) FNDA:143,(anonymous_114) -FNDA:10474,(anonymous_115) -FNDA:20,(anonymous_116) +FNDA:11022,(anonymous_115) +FNDA:36,(anonymous_116) FNDA:0,(anonymous_117) FNDA:0,(anonymous_118) -FNDA:446,(anonymous_119) +FNDA:439,(anonymous_119) FNDA:6,(anonymous_120) FNDA:2,(anonymous_121) FNDA:2,(anonymous_122) FNDA:0,(anonymous_123) FNDA:5,(anonymous_124) -FNDA:94,(anonymous_125) -FNDA:29,(anonymous_126) -FNDA:16,(anonymous_127) -FNDA:4695,(anonymous_128) -FNDA:40794,(anonymous_129) -FNDA:816,(anonymous_130) -FNDA:21,(anonymous_131) -DA:1,4817 -DA:2,4647 -DA:4,194 -DA:5,124 +FNDA:74,(anonymous_125) +FNDA:19,(anonymous_126) +FNDA:6,(anonymous_127) +FNDA:4875,(anonymous_128) +FNDA:42416,(anonymous_129) +FNDA:1119,(anonymous_130) +FNDA:18,(anonymous_131) +DA:1,5033 +DA:2,4834 +DA:4,265 +DA:5,128 DA:7,1 DA:8,32 DA:9,1 DA:10,1 -DA:12,557 +DA:12,548 DA:14,1 DA:15,2 DA:16,4 -DA:17,4 -DA:18,1 +DA:17,10 +DA:18,9 DA:19,1 DA:21,3 DA:22,3 DA:23,1 DA:24,25 -DA:25,2 +DA:25,1 DA:26,1 -DA:27,7 -DA:28,7 -DA:29,31 -DA:31,18824 -DA:32,4628 +DA:27,5 +DA:28,5 +DA:29,29 +DA:31,19573 +DA:32,4815 DA:33,20 DA:34,30 -DA:35,11100 -DA:36,5789 +DA:35,12792 +DA:36,6077 DA:37,1 -DA:38,163 +DA:38,214 DA:39,1 DA:40,2 DA:41,101 -DA:44,7847 -DA:45,229 +DA:44,8186 +DA:45,373 DA:46,37 -DA:47,27 +DA:47,36 DA:48,71 -DA:49,10396 -DA:50,17 -DA:51,245 -DA:52,77 -DA:53,33 -DA:54,173 +DA:49,11168 +DA:50,21 +DA:51,317 +DA:52,112 +DA:53,54 +DA:54,207 DA:55,4 DA:56,11 -DA:57,12014 +DA:57,12867 DA:58,7 DA:59,1 -DA:60,9318 +DA:60,9731 DA:61,384 -DA:62,4852 -DA:63,277 +DA:62,5039 +DA:63,271 DA:64,32 DA:65,1 DA:66,116 @@ -20973,74 +20973,74 @@ DA:68,161 DA:69,95 DA:71,3 DA:72,1 -DA:73,15 -DA:74,94 -DA:75,1 +DA:73,26 +DA:74,114 +DA:75,4 DA:76,1 DA:77,2 -DA:79,79 -DA:80,45 -DA:81,38 -DA:82,51 +DA:79,99 +DA:80,65 +DA:81,58 +DA:82,64 DA:83,1 DA:84,1 -DA:86,10454 -DA:87,757 +DA:86,11190 +DA:87,913 DA:88,1 -DA:89,2 -DA:90,4941 +DA:89,8 +DA:90,5252 DA:91,4 DA:92,1 DA:93,1 DA:94,5 -DA:95,395 -DA:97,762 -DA:99,5002 -DA:100,9253 +DA:95,471 +DA:97,889 +DA:99,5289 +DA:100,9627 DA:101,1 DA:102,1 -DA:103,524 +DA:103,700 DA:105,1 DA:106,1 DA:107,1 -DA:109,4839 -DA:110,15 +DA:109,5032 +DA:110,12 DA:112,48 DA:113,1 -DA:114,60 -DA:115,343 +DA:114,58 +DA:115,324 DA:117,136 -DA:118,5406 -DA:119,5380 +DA:118,5768 +DA:119,5808 DA:120,1 DA:121,1 DA:122,5 -DA:123,404 -DA:126,550 +DA:123,480 +DA:126,713 DA:127,8 DA:128,5 DA:129,54 -DA:130,30 -DA:132,169 +DA:130,26 +DA:132,167 DA:133,6 DA:134,741 DA:135,144 -DA:136,10475 -DA:138,21 +DA:136,11023 +DA:138,37 DA:139,1 DA:140,1 -DA:142,447 +DA:142,440 DA:143,1 DA:144,7 DA:145,3 DA:146,3 DA:147,1 DA:148,6 -DA:150,95 -DA:152,4696 -DA:153,40795 -DA:154,817 -DA:156,22 +DA:150,75 +DA:152,4876 +DA:153,42417 +DA:154,1120 +DA:156,19 LF:130 LH:130 BRF:0 @@ -21060,30 +21060,30 @@ FN:64,(anonymous_8) FNF:9 FNH:9 FNDA:1,(anonymous_0) -FNDA:929,NodeBlockElement -FNDA:35,(anonymous_2) -FNDA:652,(anonymous_3) -FNDA:556,(anonymous_4) -FNDA:229,(anonymous_5) -FNDA:208,(anonymous_6) -FNDA:566,(anonymous_7) +FNDA:1237,NodeBlockElement +FNDA:36,(anonymous_2) +FNDA:830,(anonymous_3) +FNDA:764,(anonymous_4) +FNDA:295,(anonymous_5) +FNDA:288,(anonymous_6) +FNDA:983,(anonymous_7) FNDA:9,(anonymous_8) DA:1,1 DA:2,1 DA:10,1 -DA:11,929 +DA:11,1237 DA:18,1 -DA:19,35 +DA:19,36 DA:26,1 -DA:27,652 +DA:27,830 DA:34,1 -DA:35,556 +DA:35,764 DA:41,1 -DA:43,229 +DA:43,295 DA:49,1 -DA:51,208 +DA:51,288 DA:57,1 -DA:58,566 +DA:58,983 DA:64,1 DA:65,9 DA:67,1 @@ -21113,14 +21113,14 @@ FN:107,(anonymous_9) FNF:10 FNH:9 FNDA:1,(anonymous_0) -FNDA:826,StartEndBlockElement -FNDA:1650,(anonymous_2) +FNDA:864,StartEndBlockElement +FNDA:1996,(anonymous_2) FNDA:21,(anonymous_3) -FNDA:224,(anonymous_4) -FNDA:236,(anonymous_5) -FNDA:50,(anonymous_6) -FNDA:57,(anonymous_7) -FNDA:1093,(anonymous_8) +FNDA:255,(anonymous_4) +FNDA:276,(anonymous_5) +FNDA:80,(anonymous_6) +FNDA:80,(anonymous_7) +FNDA:1136,(anonymous_8) FNDA:0,(anonymous_9) DA:1,1 DA:2,1 @@ -21132,12 +21132,12 @@ DA:7,1 DA:9,1 DA:11,1 DA:22,1 -DA:23,826 +DA:23,864 DA:25,1 -DA:26,1650 -DA:27,1650 -DA:28,2186 -DA:30,1650 +DA:26,1996 +DA:27,1996 +DA:28,2693 +DA:30,1996 DA:38,1 DA:39,21 DA:40,21 @@ -21149,23 +21149,23 @@ DA:52,18 DA:54,0 DA:57,21 DA:65,1 -DA:66,224 +DA:66,255 DA:72,1 -DA:73,236 +DA:73,276 DA:79,1 -DA:80,50 +DA:80,80 DA:89,1 -DA:90,57 +DA:90,80 DA:96,1 -DA:97,1093 +DA:97,1136 DA:107,1 DA:108,0 DA:109,0 DA:111,1 LF:40 LH:37 -BRDA:27,0,0,3836 -BRDA:27,0,1,3836 +BRDA:27,0,0,4689 +BRDA:27,0,1,4689 BRDA:41,1,0,21 BRDA:41,1,1,0 BRDA:45,2,0,39 @@ -21178,12 +21178,12 @@ BRDA:58,4,0,13 BRDA:58,4,1,8 BRDA:57,5,0,21 BRDA:57,5,1,20 -BRDA:81,6,0,50 +BRDA:81,6,0,80 BRDA:81,6,1,18 -BRDA:98,7,0,1093 -BRDA:98,7,1,882 -BRDA:98,7,2,775 -BRDA:98,7,3,162 +BRDA:98,7,0,1136 +BRDA:98,7,1,918 +BRDA:98,7,2,800 +BRDA:98,7,3,165 BRDA:109,8,0,0 BRDA:109,8,1,0 BRF:22 @@ -21195,8 +21195,8 @@ FN:34,getBlockElementAtNode FN:111,findHeadTailLeafNode FNF:2 FNH:2 -FNDA:6776,getBlockElementAtNode -FNDA:3048,findHeadTailLeafNode +FNDA:7382,getBlockElementAtNode +FNDA:3656,findHeadTailLeafNode DA:1,1 DA:2,1 DA:3,1 @@ -21204,100 +21204,100 @@ DA:4,1 DA:5,1 DA:6,1 DA:34,1 -DA:38,6776 -DA:39,5168 -DA:45,1608 -DA:46,1608 +DA:38,7382 +DA:39,5428 +DA:45,1954 +DA:46,1954 DA:47,0 -DA:48,1608 -DA:49,84 -DA:53,1524 -DA:54,1524 -DA:56,1524 +DA:48,1954 +DA:49,126 +DA:53,1828 +DA:54,1828 +DA:56,1828 DA:57,0 -DA:65,1524 -DA:67,1524 +DA:65,1828 +DA:67,1828 DA:68,0 -DA:71,1524 -DA:72,1524 -DA:74,1524 +DA:71,1828 +DA:72,1828 +DA:74,1828 DA:76,1 -DA:79,1523 -DA:80,1523 -DA:81,1523 -DA:83,1407 -DA:85,728 -DA:87,1407 -DA:88,116 -DA:90,116 +DA:79,1827 +DA:80,1882 +DA:81,1882 +DA:83,1690 +DA:85,994 +DA:87,1690 +DA:88,192 +DA:90,192 DA:92,0 -DA:97,1523 -DA:112,3048 -DA:114,3048 -DA:115,96 -DA:118,2952 -DA:119,4031 -DA:120,4031 -DA:121,5234 -DA:122,5234 -DA:123,2809 -DA:127,1222 -DA:128,2455 -DA:129,59 -DA:130,2396 -DA:131,84 -DA:134,2312 -DA:135,2312 -DA:138,1079 +DA:97,1827 +DA:112,3656 +DA:114,3656 +DA:115,103 +DA:118,3553 +DA:119,4919 +DA:120,4919 +DA:121,6465 +DA:122,6465 +DA:123,3371 +DA:127,1548 +DA:128,3044 +DA:129,87 +DA:130,2957 +DA:131,95 +DA:134,2862 +DA:135,2862 +DA:138,1366 DA:140,0 LF:53 LH:48 -BRDA:38,0,0,5168 -BRDA:38,0,1,1608 +BRDA:38,0,0,5428 +BRDA:38,0,1,1954 BRDA:46,1,0,0 -BRDA:46,1,1,1608 -BRDA:48,2,0,84 -BRDA:48,2,1,1524 +BRDA:46,1,1,1954 +BRDA:48,2,0,126 +BRDA:48,2,1,1828 BRDA:56,3,0,0 -BRDA:56,3,1,1524 -BRDA:56,4,0,1524 -BRDA:56,4,1,1524 +BRDA:56,3,1,1828 +BRDA:56,4,0,1828 +BRDA:56,4,1,1828 BRDA:67,5,0,0 -BRDA:67,5,1,1524 +BRDA:67,5,1,1828 BRDA:74,6,0,1 -BRDA:74,6,1,1523 -BRDA:79,7,0,1639 -BRDA:79,7,1,1572 -BRDA:81,8,0,1407 -BRDA:81,8,1,116 -BRDA:83,9,0,728 -BRDA:83,9,1,679 -BRDA:88,10,0,116 +BRDA:74,6,1,1827 +BRDA:79,7,0,2019 +BRDA:79,7,1,1938 +BRDA:81,8,0,1690 +BRDA:81,8,1,192 +BRDA:83,9,0,994 +BRDA:83,9,1,696 +BRDA:88,10,0,192 BRDA:88,10,1,0 -BRDA:88,11,0,116 -BRDA:88,11,1,116 -BRDA:98,12,0,728 -BRDA:98,12,1,795 -BRDA:97,13,0,1523 -BRDA:97,13,1,1150 -BRDA:114,14,0,96 -BRDA:114,14,1,2952 -BRDA:114,15,0,3048 -BRDA:114,15,1,192 -BRDA:120,16,0,6456 -BRDA:120,16,1,6456 -BRDA:120,17,0,3101 -BRDA:120,17,1,3355 -BRDA:122,18,0,2809 -BRDA:122,18,1,2425 -BRDA:128,19,0,59 -BRDA:128,19,1,2396 -BRDA:130,20,0,84 -BRDA:130,20,1,2312 -BRDA:131,21,0,42 -BRDA:131,21,1,42 -BRDA:135,22,0,1077 -BRDA:135,22,1,1235 +BRDA:88,11,0,192 +BRDA:88,11,1,192 +BRDA:98,12,0,994 +BRDA:98,12,1,833 +BRDA:97,13,0,1827 +BRDA:97,13,1,1436 +BRDA:114,14,0,103 +BRDA:114,14,1,3553 +BRDA:114,15,0,3656 +BRDA:114,15,1,206 +BRDA:120,16,0,8013 +BRDA:120,16,1,8013 +BRDA:120,17,0,3931 +BRDA:120,17,1,4082 +BRDA:122,18,0,3371 +BRDA:122,18,1,3094 +BRDA:128,19,0,87 +BRDA:128,19,1,2957 +BRDA:130,20,0,95 +BRDA:130,20,1,2862 +BRDA:131,21,0,52 +BRDA:131,21,1,43 +BRDA:135,22,0,1407 +BRDA:135,22,1,1455 BRF:46 BRH:42 end_of_record @@ -21306,24 +21306,24 @@ SF:packages/roosterjs-editor-dom/lib/blockElements/getFirstLastBlockElement.ts FN:10,getFirstLastBlockElement FNF:1 FNH:1 -FNDA:4718,getFirstLastBlockElement +FNDA:4905,getFirstLastBlockElement DA:1,1 DA:10,1 -DA:14,4718 -DA:15,4718 -DA:16,4815 -DA:18,4718 +DA:14,4905 +DA:15,4905 +DA:16,5002 +DA:18,4905 LF:6 LH:6 -BRDA:17,0,0,4815 +BRDA:17,0,0,5002 BRDA:17,0,1,185 -BRDA:16,1,0,4815 -BRDA:16,1,1,4814 +BRDA:16,1,0,5002 +BRDA:16,1,1,5001 BRDA:16,2,0,171 -BRDA:16,2,1,4643 -BRDA:18,3,0,4718 +BRDA:16,2,1,4830 +BRDA:18,3,0,4905 BRDA:18,3,1,88 -BRDA:18,3,2,4630 +BRDA:18,3,2,4817 BRF:9 BRH:9 end_of_record @@ -21350,10 +21350,10 @@ DA:37,72 DA:38,24 DA:43,24 DA:46,24 -DA:48,2 -DA:49,22 -DA:50,10 -DA:52,10 +DA:48,3 +DA:49,21 +DA:50,9 +DA:52,9 DA:53,0 DA:54,0 DA:56,12 @@ -21366,29 +21366,29 @@ DA:72,0 DA:73,0 LF:27 LH:22 -BRDA:39,0,0,12 -BRDA:39,0,1,12 -BRDA:46,1,0,2 -BRDA:46,1,1,22 +BRDA:39,0,0,11 +BRDA:39,0,1,13 +BRDA:46,1,0,3 +BRDA:46,1,1,21 BRDA:46,2,0,24 BRDA:46,2,1,3 BRDA:46,2,2,22 BRDA:46,2,3,19 -BRDA:46,2,4,4 -BRDA:49,3,0,10 +BRDA:46,2,4,5 +BRDA:49,3,0,9 BRDA:49,3,1,12 -BRDA:49,4,0,10 +BRDA:49,4,0,9 BRDA:49,4,1,12 -BRDA:49,5,0,22 -BRDA:49,5,1,19 -BRDA:49,5,2,10 +BRDA:49,5,0,21 +BRDA:49,5,1,18 +BRDA:49,5,2,9 BRDA:50,6,0,0 -BRDA:50,6,1,10 -BRDA:50,7,0,10 -BRDA:50,7,1,10 +BRDA:50,6,1,9 +BRDA:50,7,0,9 +BRDA:50,7,1,9 BRDA:52,8,0,0 -BRDA:52,8,1,10 -BRDA:52,9,0,10 +BRDA:52,8,1,9 +BRDA:52,9,0,9 BRDA:52,9,1,0 BRDA:56,10,0,11 BRDA:56,10,1,1 @@ -21658,23 +21658,23 @@ SF:packages/roosterjs-editor-dom/lib/clipboard/getPasteType.ts FN:10,getPasteType FNF:1 FNH:1 -FNDA:30,getPasteType +FNDA:28,getPasteType DA:10,1 -DA:15,30 +DA:15,28 DA:16,4 -DA:17,26 +DA:17,24 DA:18,0 -DA:19,26 -DA:20,3 -DA:22,23 +DA:19,24 +DA:20,2 +DA:22,22 LF:8 LH:7 BRDA:15,0,0,4 -BRDA:15,0,1,26 +BRDA:15,0,1,24 BRDA:17,1,0,0 -BRDA:17,1,1,26 -BRDA:19,2,0,3 -BRDA:19,2,1,23 +BRDA:17,1,1,24 +BRDA:19,2,0,2 +BRDA:19,2,1,22 BRF:6 BRH:5 end_of_record @@ -21765,96 +21765,96 @@ FN:68,(anonymous_4) FN:73,processStyles FNF:6 FNH:6 -FNDA:30,retrieveMetadataFromClipboard -FNDA:26,(anonymous_1) -FNDA:31,(anonymous_2) -FNDA:11,(anonymous_3) +FNDA:28,retrieveMetadataFromClipboard +FNDA:14,(anonymous_1) +FNDA:21,(anonymous_2) +FNDA:8,(anonymous_3) FNDA:3,(anonymous_4) -FNDA:29,processStyles +FNDA:23,processStyles DA:1,1 DA:2,1 DA:5,1 DA:6,1 DA:14,1 -DA:19,60 -DA:20,30 -DA:21,30 -DA:22,18 -DA:23,18 -DA:24,26 -DA:25,26 -DA:27,18 -DA:28,31 -DA:29,31 -DA:32,18 -DA:33,18 -DA:35,18 -DA:36,72 -DA:37,72 -DA:38,34 -DA:39,34 -DA:40,30 -DA:43,42 -DA:44,42 -DA:45,28 -DA:50,18 -DA:51,11 -DA:52,11 -DA:55,18 -DA:56,18 -DA:58,18 -DA:59,11 -DA:60,11 -DA:61,11 -DA:62,11 -DA:68,11 -DA:74,29 +DA:19,56 +DA:20,28 +DA:21,28 +DA:22,15 +DA:23,15 +DA:24,14 +DA:25,14 +DA:27,15 +DA:28,21 +DA:29,21 +DA:32,15 +DA:33,15 +DA:35,15 +DA:36,57 +DA:37,57 +DA:38,25 +DA:39,25 +DA:40,21 +DA:43,36 +DA:44,36 +DA:45,24 +DA:50,15 +DA:51,8 +DA:52,8 +DA:55,15 +DA:56,15 +DA:58,15 +DA:59,8 +DA:60,8 +DA:61,8 +DA:62,8 +DA:68,8 +DA:74,23 LF:38 LH:38 -BRDA:21,0,0,18 -BRDA:21,0,1,12 -BRDA:21,1,0,30 -BRDA:21,1,1,18 +BRDA:21,0,0,15 +BRDA:21,0,1,13 +BRDA:21,1,0,28 +BRDA:21,1,1,15 BRDA:21,2,0,0 -BRDA:21,2,1,18 -BRDA:21,3,0,18 -BRDA:21,3,1,18 +BRDA:21,2,1,15 +BRDA:21,3,0,15 +BRDA:21,3,1,15 BRDA:22,4,0,0 -BRDA:22,4,1,18 -BRDA:22,5,0,18 -BRDA:22,5,1,18 -BRDA:23,6,0,18 +BRDA:22,4,1,15 +BRDA:22,5,0,15 +BRDA:22,5,1,15 +BRDA:23,6,0,15 BRDA:23,6,1,0 BRDA:33,7,0,0 -BRDA:33,7,1,18 -BRDA:33,8,0,18 -BRDA:33,8,1,18 +BRDA:33,7,1,15 +BRDA:33,8,0,15 +BRDA:33,8,1,15 BRDA:35,9,0,0 -BRDA:35,9,1,90 -BRDA:35,10,0,90 -BRDA:35,10,1,90 +BRDA:35,9,1,72 +BRDA:35,10,0,72 +BRDA:35,10,1,72 BRDA:36,11,0,0 -BRDA:36,11,1,72 -BRDA:36,12,0,72 -BRDA:36,12,1,72 -BRDA:37,13,0,34 -BRDA:37,13,1,38 +BRDA:36,11,1,57 +BRDA:36,12,0,57 +BRDA:36,12,1,57 +BRDA:37,13,0,25 +BRDA:37,13,1,32 BRDA:38,14,0,0 -BRDA:38,14,1,34 -BRDA:38,15,0,34 -BRDA:38,15,1,34 -BRDA:39,16,0,30 +BRDA:38,14,1,25 +BRDA:38,15,0,25 +BRDA:38,15,1,25 +BRDA:39,16,0,21 BRDA:39,16,1,4 -BRDA:44,17,0,28 -BRDA:44,17,1,14 +BRDA:44,17,0,24 +BRDA:44,17,1,12 BRDA:51,18,0,0 -BRDA:51,18,1,11 -BRDA:51,19,0,11 -BRDA:51,19,1,11 -BRDA:58,20,0,11 +BRDA:51,18,1,8 +BRDA:51,19,0,8 +BRDA:51,19,1,8 +BRDA:58,20,0,8 BRDA:58,20,1,7 -BRDA:58,21,0,18 -BRDA:58,21,1,11 +BRDA:58,21,0,15 +BRDA:58,21,1,8 BRDA:68,22,0,0 BRDA:68,22,1,3 BRDA:68,23,0,3 @@ -21867,18 +21867,18 @@ SF:packages/roosterjs-editor-dom/lib/clipboard/sanitizePasteContent.ts FN:10,sanitizePasteContent FNF:1 FNH:1 -FNDA:30,sanitizePasteContent +FNDA:28,sanitizePasteContent DA:1,1 DA:2,1 DA:10,1 -DA:14,30 -DA:15,30 -DA:16,30 -DA:17,30 +DA:14,28 +DA:15,28 +DA:16,28 +DA:17,28 LF:7 LH:7 -BRDA:17,0,0,11 -BRDA:17,0,1,19 +BRDA:17,0,0,8 +BRDA:17,0,1,20 BRF:2 BRH:2 end_of_record @@ -21893,36 +21893,36 @@ FN:53,(anonymous_5) FNF:6 FNH:6 FNDA:1,(anonymous_0) -FNDA:447,BodyScoper +FNDA:452,BodyScoper FNDA:64,(anonymous_2) -FNDA:383,(anonymous_3) +FNDA:388,(anonymous_3) FNDA:27,(anonymous_4) -FNDA:172,(anonymous_5) +FNDA:178,(anonymous_5) DA:1,1 DA:2,1 DA:3,1 DA:4,1 DA:7,1 DA:13,1 -DA:21,447 -DA:22,447 +DA:21,452 +DA:22,452 DA:28,1 DA:29,64 DA:37,1 -DA:38,383 +DA:38,388 DA:46,1 DA:47,27 DA:53,1 -DA:54,172 +DA:54,178 DA:56,1 LF:17 LH:17 BRDA:22,0,0,108 -BRDA:22,0,1,339 +BRDA:22,0,1,344 BRDA:30,1,0,0 BRDA:30,1,1,64 BRDA:39,2,0,108 -BRDA:39,2,1,275 +BRDA:39,2,1,280 BRF:6 BRH:5 end_of_record @@ -21945,19 +21945,19 @@ FN:207,getNextPreviousInlineElement FNF:14 FNH:14 FNDA:1,(anonymous_0) -FNDA:728,ContentTraverser -FNDA:447,(anonymous_2) -FNDA:133,(anonymous_3) -FNDA:148,(anonymous_4) -FNDA:382,(anonymous_5) -FNDA:216,(anonymous_6) +FNDA:852,ContentTraverser +FNDA:452,(anonymous_2) +FNDA:224,(anonymous_3) +FNDA:176,(anonymous_4) +FNDA:475,(anonymous_5) +FNDA:277,(anonymous_6) FNDA:40,(anonymous_7) -FNDA:256,(anonymous_8) -FNDA:1671,(anonymous_9) -FNDA:407,(anonymous_10) -FNDA:320,(anonymous_11) -FNDA:727,(anonymous_12) -FNDA:618,getNextPreviousInlineElement +FNDA:317,(anonymous_8) +FNDA:1913,(anonymous_9) +FNDA:528,(anonymous_10) +FNDA:343,(anonymous_11) +FNDA:871,(anonymous_12) +FNDA:756,getNextPreviousInlineElement DA:1,1 DA:2,1 DA:3,1 @@ -21968,120 +21968,120 @@ DA:7,1 DA:9,1 DA:10,1 DA:26,1 -DA:27,728 -DA:28,728 -DA:35,728 +DA:27,852 +DA:28,852 +DA:35,852 DA:43,1 -DA:48,447 +DA:48,452 DA:57,1 -DA:62,133 +DA:62,224 DA:73,1 -DA:76,290 -DA:79,148 +DA:76,346 +DA:79,176 DA:85,1 -DA:87,382 -DA:88,168 -DA:91,382 +DA:87,475 +DA:88,200 +DA:91,475 DA:97,1 -DA:98,216 +DA:98,277 DA:104,1 DA:105,40 DA:108,1 -DA:109,256 -DA:111,256 +DA:109,317 +DA:111,317 DA:112,0 -DA:115,256 -DA:121,256 -DA:128,256 -DA:133,100 -DA:134,100 -DA:137,156 +DA:115,317 +DA:121,317 +DA:128,317 +DA:133,133 +DA:134,133 +DA:137,184 DA:143,1 -DA:145,1671 -DA:146,560 -DA:149,1671 +DA:145,1913 +DA:146,652 +DA:149,1913 DA:155,1 -DA:156,407 +DA:156,528 DA:162,1 -DA:163,320 +DA:163,343 DA:166,1 -DA:167,727 -DA:170,727 -DA:171,11 -DA:174,716 -DA:175,98 -DA:180,98 +DA:167,871 +DA:170,871 +DA:171,13 +DA:174,858 +DA:175,102 +DA:180,102 DA:181,0 -DA:184,618 -DA:185,618 -DA:198,716 -DA:199,282 -DA:200,282 -DA:203,434 +DA:184,756 +DA:185,756 +DA:198,858 +DA:199,354 +DA:200,354 +DA:203,504 DA:205,1 -DA:212,618 +DA:212,756 DA:213,0 -DA:215,618 -DA:217,26 -DA:219,26 -DA:220,14 -DA:225,604 -DA:226,604 -DA:227,604 +DA:215,756 +DA:217,30 +DA:219,30 +DA:220,16 +DA:225,740 +DA:226,740 +DA:227,740 LF:70 LH:67 -BRDA:76,0,0,142 +BRDA:76,0,0,170 BRDA:76,0,1,6 -BRDA:87,1,0,168 -BRDA:87,1,1,214 +BRDA:87,1,0,200 +BRDA:87,1,1,275 BRDA:111,2,0,0 -BRDA:111,2,1,256 -BRDA:117,3,0,216 +BRDA:111,2,1,317 +BRDA:117,3,0,277 BRDA:117,3,1,40 -BRDA:121,4,0,150 -BRDA:121,4,1,106 -BRDA:128,5,0,100 -BRDA:128,5,1,156 -BRDA:129,6,0,256 -BRDA:129,6,1,150 -BRDA:129,6,2,100 -BRDA:129,6,3,99 +BRDA:121,4,0,192 +BRDA:121,4,1,125 +BRDA:128,5,0,133 +BRDA:128,5,1,184 +BRDA:129,6,0,317 +BRDA:129,6,1,192 +BRDA:129,6,2,133 +BRDA:129,6,3,132 BRDA:129,6,4,1 BRDA:129,6,5,1 -BRDA:145,7,0,560 -BRDA:145,7,1,1111 -BRDA:149,8,0,111 -BRDA:149,8,1,1560 -BRDA:167,9,0,727 -BRDA:167,9,1,109 -BRDA:170,10,0,11 -BRDA:170,10,1,716 -BRDA:174,11,0,98 -BRDA:174,11,1,618 +BRDA:145,7,0,652 +BRDA:145,7,1,1261 +BRDA:149,8,0,118 +BRDA:149,8,1,1795 +BRDA:167,9,0,871 +BRDA:167,9,1,115 +BRDA:170,10,0,13 +BRDA:170,10,1,858 +BRDA:174,11,0,102 +BRDA:174,11,1,756 BRDA:180,12,0,0 -BRDA:180,12,1,98 -BRDA:180,13,0,98 +BRDA:180,12,1,102 +BRDA:180,13,0,102 BRDA:180,13,1,86 -BRDA:189,14,0,213 -BRDA:189,14,1,405 -BRDA:186,15,0,618 -BRDA:186,15,1,213 -BRDA:186,15,2,213 -BRDA:186,15,3,120 -BRDA:186,15,4,93 -BRDA:186,15,5,93 -BRDA:198,16,0,282 -BRDA:198,16,1,434 -BRDA:198,17,0,716 -BRDA:198,17,1,299 +BRDA:189,14,0,299 +BRDA:189,14,1,457 +BRDA:186,15,0,756 +BRDA:186,15,1,299 +BRDA:186,15,2,299 +BRDA:186,15,3,199 +BRDA:186,15,4,100 +BRDA:186,15,5,100 +BRDA:198,16,0,354 +BRDA:198,16,1,504 +BRDA:198,17,0,858 +BRDA:198,17,1,385 BRDA:212,18,0,0 -BRDA:212,18,1,618 -BRDA:215,19,0,26 -BRDA:215,19,1,592 +BRDA:212,18,1,756 +BRDA:215,19,0,30 +BRDA:215,19,1,726 BRDA:217,20,0,19 -BRDA:217,20,1,7 -BRDA:219,21,0,14 -BRDA:219,21,1,12 +BRDA:217,20,1,11 +BRDA:219,21,0,16 +BRDA:219,21,1,14 BRF:52 BRH:49 end_of_record @@ -22104,48 +22104,48 @@ FN:184,(anonymous_13) FNF:14 FNH:13 FNDA:1,(anonymous_0) -FNDA:143,PositionContentSearcher +FNDA:159,PositionContentSearcher FNDA:26,(anonymous_2) FNDA:21,(anonymous_3) -FNDA:24,(anonymous_4) -FNDA:20,(anonymous_5) -FNDA:12,(anonymous_6) -FNDA:5,(anonymous_7) +FNDA:36,(anonymous_4) +FNDA:32,(anonymous_5) +FNDA:16,(anonymous_6) +FNDA:7,(anonymous_7) FNDA:49,(anonymous_8) FNDA:48,(anonymous_9) FNDA:60,(anonymous_10) FNDA:51,(anonymous_11) FNDA:0,(anonymous_12) -FNDA:165,(anonymous_13) +FNDA:181,(anonymous_13) DA:1,1 DA:2,1 DA:15,1 DA:20,1 -DA:22,143 -DA:25,143 -DA:28,143 -DA:31,143 -DA:34,143 -DA:37,143 -DA:40,143 -DA:43,143 -DA:50,143 +DA:22,159 +DA:25,159 +DA:28,159 +DA:31,159 +DA:34,159 +DA:37,159 +DA:40,159 +DA:43,159 +DA:50,159 DA:57,26 DA:58,26 DA:59,26 DA:62,26 DA:69,1 -DA:70,24 -DA:71,24 -DA:74,24 +DA:70,36 +DA:71,36 +DA:74,36 DA:81,1 -DA:82,20 -DA:83,20 -DA:89,20 -DA:100,12 -DA:101,12 -DA:102,8 -DA:105,12 +DA:82,32 +DA:83,32 +DA:89,32 +DA:100,16 +DA:101,16 +DA:102,12 +DA:105,16 DA:114,1 DA:115,49 DA:116,1 @@ -22175,28 +22175,28 @@ DA:174,51 DA:175,51 DA:178,51 DA:184,1 -DA:185,165 -DA:188,165 +DA:185,181 +DA:188,181 DA:189,3 -DA:192,162 -DA:193,162 -DA:194,197 -DA:196,197 -DA:197,87 -DA:200,87 -DA:203,87 -DA:204,87 +DA:192,178 +DA:193,178 +DA:194,220 +DA:196,220 +DA:197,94 +DA:200,94 +DA:203,94 +DA:204,94 DA:205,12 -DA:209,87 -DA:210,87 -DA:213,87 +DA:209,94 +DA:210,94 +DA:213,94 DA:214,52 -DA:217,110 -DA:218,110 -DA:219,110 -DA:221,104 -DA:227,110 -DA:230,35 +DA:217,126 +DA:218,126 +DA:219,126 +DA:221,120 +DA:227,126 +DA:230,42 DA:233,1 LF:81 LH:78 @@ -22204,11 +22204,11 @@ BRDA:58,0,0,26 BRDA:58,0,1,0 BRDA:62,1,0,26 BRDA:62,1,1,2 -BRDA:70,2,0,24 +BRDA:70,2,0,36 BRDA:70,2,1,0 -BRDA:82,3,0,20 +BRDA:82,3,0,32 BRDA:82,3,1,0 -BRDA:101,4,0,8 +BRDA:101,4,0,12 BRDA:101,4,1,4 BRDA:115,5,0,1 BRDA:115,5,1,48 @@ -22233,29 +22233,29 @@ BRDA:164,14,0,56 BRDA:164,14,1,4 BRDA:174,15,0,51 BRDA:174,15,1,0 -BRDA:186,16,0,165 -BRDA:186,16,1,122 +BRDA:186,16,0,181 +BRDA:186,16,1,138 BRDA:188,17,0,3 -BRDA:188,17,1,162 -BRDA:188,18,0,165 -BRDA:188,18,1,165 -BRDA:194,19,0,197 -BRDA:194,19,1,122 -BRDA:196,20,0,87 -BRDA:196,20,1,110 -BRDA:196,21,0,197 -BRDA:196,21,1,90 -BRDA:200,22,0,87 +BRDA:188,17,1,178 +BRDA:188,18,0,181 +BRDA:188,18,1,181 +BRDA:194,19,0,220 +BRDA:194,19,1,138 +BRDA:196,20,0,94 +BRDA:196,20,1,126 +BRDA:196,21,0,220 +BRDA:196,21,1,97 +BRDA:200,22,0,94 BRDA:200,22,1,0 BRDA:204,23,0,12 -BRDA:204,23,1,75 -BRDA:204,24,0,87 +BRDA:204,23,1,82 +BRDA:204,24,0,94 BRDA:204,24,1,12 BRDA:213,25,0,52 -BRDA:213,25,1,35 -BRDA:213,26,0,87 -BRDA:213,26,1,82 -BRDA:219,27,0,104 +BRDA:213,25,1,42 +BRDA:213,26,0,94 +BRDA:213,26,1,84 +BRDA:219,27,0,120 BRDA:219,27,1,6 BRF:57 BRH:45 @@ -22272,11 +22272,11 @@ FN:107,getFirstLastInlineElementFromBlockElement FNF:7 FNH:7 FNDA:1,(anonymous_0) -FNDA:161,SelectionBlockScoper +FNDA:189,SelectionBlockScoper FNDA:7,(anonymous_2) -FNDA:150,(anonymous_3) +FNDA:178,(anonymous_3) FNDA:3,(anonymous_4) -FNDA:96,(anonymous_5) +FNDA:103,(anonymous_5) FNDA:5,getFirstLastInlineElementFromBlockElement DA:1,1 DA:2,1 @@ -22287,25 +22287,25 @@ DA:6,1 DA:9,1 DA:10,1 DA:23,1 -DA:34,161 -DA:36,161 -DA:38,161 +DA:34,189 +DA:36,189 +DA:38,189 DA:39,19 -DA:42,161 -DA:43,161 +DA:42,189 +DA:43,189 DA:49,1 DA:50,7 DA:59,1 -DA:60,150 -DA:61,139 +DA:60,178 +DA:61,163 DA:65,5 -DA:71,134 -DA:72,134 -DA:78,11 +DA:71,158 +DA:72,158 +DA:78,15 DA:85,1 DA:86,3 DA:95,1 -DA:96,96 +DA:96,103 DA:100,1 DA:111,5 DA:112,1 @@ -22314,26 +22314,26 @@ DA:115,4 LF:33 LH:33 BRDA:38,0,0,19 -BRDA:38,0,1,142 -BRDA:60,1,0,139 -BRDA:60,1,1,11 +BRDA:38,0,1,170 +BRDA:60,1,0,163 +BRDA:60,1,1,15 BRDA:62,2,0,3 BRDA:62,2,1,5 BRDA:62,2,2,5 -BRDA:62,2,3,134 -BRDA:73,3,0,23 -BRDA:73,3,1,111 -BRDA:72,4,0,134 -BRDA:72,4,1,23 +BRDA:62,2,3,158 +BRDA:73,3,0,40 +BRDA:73,3,1,118 +BRDA:72,4,0,158 +BRDA:72,4,1,40 BRDA:86,5,0,3 BRDA:86,5,1,0 BRDA:86,6,0,3 BRDA:86,6,1,3 -BRDA:97,7,0,91 +BRDA:97,7,0,98 BRDA:97,7,1,5 -BRDA:96,8,0,96 -BRDA:96,8,1,96 -BRDA:96,8,2,96 +BRDA:96,8,0,103 +BRDA:96,8,1,103 +BRDA:96,8,2,103 BRDA:111,9,0,1 BRDA:111,9,1,4 BRDA:113,10,0,1 @@ -22354,97 +22354,97 @@ FN:89,(anonymous_5) FNF:6 FNH:6 FNDA:1,(anonymous_0) -FNDA:149,SelectionScoper -FNDA:233,(anonymous_2) -FNDA:35,(anonymous_3) -FNDA:126,(anonymous_4) -FNDA:71,(anonymous_5) +FNDA:240,SelectionScoper +FNDA:307,(anonymous_2) +FNDA:94,(anonymous_3) +FNDA:168,(anonymous_4) +FNDA:203,(anonymous_5) DA:1,1 DA:2,1 DA:3,1 DA:6,1 DA:14,1 -DA:17,149 -DA:18,149 -DA:25,149 -DA:26,149 -DA:27,149 +DA:17,240 +DA:18,240 +DA:25,240 +DA:26,240 +DA:27,240 DA:33,1 -DA:34,233 -DA:35,111 -DA:38,233 +DA:34,307 +DA:35,143 +DA:38,307 DA:44,1 -DA:45,35 -DA:46,35 -DA:51,35 +DA:45,94 +DA:46,94 +DA:51,94 DA:58,1 -DA:59,126 +DA:59,168 DA:60,0 -DA:62,126 -DA:63,126 -DA:64,126 +DA:62,168 +DA:63,168 +DA:64,168 DA:65,8 -DA:67,118 -DA:73,118 -DA:81,126 +DA:67,160 +DA:73,160 +DA:81,168 DA:89,1 -DA:90,71 +DA:90,203 DA:91,0 -DA:95,71 -DA:96,71 -DA:98,71 -DA:99,4 -DA:102,67 -DA:103,67 -DA:105,67 +DA:95,203 +DA:96,203 +DA:98,203 +DA:99,18 +DA:102,185 +DA:103,185 +DA:105,185 DA:106,1 DA:107,1 -DA:110,67 -DA:111,23 -DA:112,23 -DA:115,67 +DA:110,185 +DA:111,25 +DA:112,25 +DA:115,185 DA:125,1 LF:45 LH:43 -BRDA:34,0,0,111 -BRDA:34,0,1,122 -BRDA:45,1,0,35 +BRDA:34,0,0,143 +BRDA:34,0,1,164 +BRDA:45,1,0,94 BRDA:45,1,1,0 BRDA:59,2,0,0 -BRDA:59,2,1,126 +BRDA:59,2,1,168 BRDA:64,3,0,8 -BRDA:64,3,1,118 +BRDA:64,3,1,160 BRDA:65,4,0,8 BRDA:65,4,1,8 -BRDA:74,5,0,118 -BRDA:74,5,1,118 -BRDA:74,5,2,118 -BRDA:74,5,3,116 -BRDA:74,5,4,77 -BRDA:74,5,5,76 +BRDA:74,5,0,160 +BRDA:74,5,1,160 +BRDA:74,5,2,160 +BRDA:74,5,3,158 +BRDA:74,5,4,112 +BRDA:74,5,5,111 BRDA:90,6,0,0 -BRDA:90,6,1,71 -BRDA:90,7,0,71 -BRDA:90,7,1,71 -BRDA:98,8,0,4 -BRDA:98,8,1,67 -BRDA:98,9,0,71 -BRDA:98,9,1,68 +BRDA:90,6,1,203 +BRDA:90,7,0,203 +BRDA:90,7,1,203 +BRDA:98,8,0,18 +BRDA:98,8,1,185 +BRDA:98,9,0,203 +BRDA:98,9,1,186 BRDA:105,10,0,1 -BRDA:105,10,1,66 -BRDA:110,11,0,23 -BRDA:110,11,1,44 +BRDA:105,10,1,184 +BRDA:110,11,0,25 +BRDA:110,11,1,160 BRDA:116,12,0,10 -BRDA:116,12,1,57 -BRDA:115,13,0,67 -BRDA:115,13,1,67 -BRDA:118,14,0,14 -BRDA:118,14,1,43 -BRDA:117,15,0,57 -BRDA:117,15,1,56 +BRDA:116,12,1,175 +BRDA:115,13,0,185 +BRDA:115,13,1,185 +BRDA:118,14,0,16 +BRDA:118,14,1,159 +BRDA:117,15,0,175 +BRDA:117,15,1,174 BRDA:120,16,0,1 -BRDA:120,16,1,13 -BRDA:121,17,0,13 +BRDA:120,16,1,15 +BRDA:121,17,0,15 BRDA:121,17,1,1 BRF:40 BRH:37 @@ -22512,24 +22512,24 @@ SF:packages/roosterjs-editor-dom/lib/delimiter/getDelimiterFromElement.ts FN:11,getDelimiterFromElement FNF:1 FNH:1 -FNDA:578,getDelimiterFromElement +FNDA:569,getDelimiterFromElement DA:1,1 DA:4,1 DA:11,1 -DA:12,578 +DA:12,569 DA:13,1 -DA:15,577 +DA:15,568 DA:21,36 -DA:24,541 +DA:24,532 LF:8 LH:8 BRDA:12,0,0,1 -BRDA:12,0,1,577 +BRDA:12,0,1,568 BRDA:15,1,0,36 -BRDA:15,1,1,541 -BRDA:16,2,0,577 -BRDA:16,2,1,137 -BRDA:16,2,2,115 +BRDA:15,1,1,532 +BRDA:16,2,0,568 +BRDA:16,2,1,139 +BRDA:16,2,2,117 BRDA:16,2,3,41 BRF:8 BRH:8 @@ -22549,18 +22549,18 @@ FN:342,adjustInsertPositionBySteps FN:348,(anonymous_10) FN:354,safeRemove FNF:12 -FNH:10 -FNDA:20,adjustInsertPositionForHyperLink -FNDA:0,(anonymous_1) -FNDA:20,adjustInsertPositionForStructuredNode -FNDA:8,(anonymous_3) -FNDA:20,adjustInsertPositionForParagraph -FNDA:20,adjustInsertPositionForVoidElement -FNDA:20,adjustInsertPositionForMoveCursorOutOfALink -FNDA:21,adjustInsertPositionForNotEditableNode -FNDA:20,adjustInsertPositionForTable -FNDA:20,adjustInsertPositionBySteps -FNDA:140,(anonymous_10) +FNH:11 +FNDA:36,adjustInsertPositionForHyperLink +FNDA:2,(anonymous_1) +FNDA:36,adjustInsertPositionForStructuredNode +FNDA:12,(anonymous_3) +FNDA:36,adjustInsertPositionForParagraph +FNDA:36,adjustInsertPositionForVoidElement +FNDA:36,adjustInsertPositionForMoveCursorOutOfALink +FNDA:38,adjustInsertPositionForNotEditableNode +FNDA:36,adjustInsertPositionForTable +FNDA:36,adjustInsertPositionBySteps +FNDA:252,(anonymous_10) FNDA:0,safeRemove DA:1,1 DA:2,1 @@ -22585,15 +22585,15 @@ DA:20,1 DA:21,1 DA:30,1 DA:37,1 -DA:56,20 -DA:58,20 -DA:61,18 -DA:67,0 -DA:70,18 +DA:56,36 +DA:58,36 +DA:61,28 +DA:67,2 +DA:70,28 DA:71,0 DA:72,0 DA:73,0 -DA:78,18 +DA:78,28 DA:83,0 DA:84,0 DA:86,0 @@ -22604,23 +22604,23 @@ DA:99,0 DA:102,0 DA:103,0 DA:104,0 -DA:109,20 -DA:121,20 -DA:122,20 -DA:124,20 -DA:125,6 -DA:126,6 -DA:127,8 -DA:129,6 -DA:132,20 -DA:134,20 -DA:135,20 -DA:136,20 -DA:137,20 -DA:139,20 +DA:109,36 +DA:121,36 +DA:122,36 +DA:124,36 +DA:125,11 +DA:126,11 +DA:127,12 +DA:129,11 +DA:132,36 +DA:134,36 +DA:135,36 +DA:136,36 +DA:137,36 +DA:139,36 DA:140,0 DA:141,0 -DA:144,20 +DA:144,36 DA:149,0 DA:151,0 DA:152,0 @@ -22630,40 +22630,40 @@ DA:157,0 DA:158,0 DA:159,0 DA:160,0 -DA:169,20 +DA:169,36 DA:170,0 DA:176,0 DA:177,0 -DA:180,20 -DA:193,20 +DA:180,36 +DA:193,36 DA:196,0 DA:197,0 DA:198,0 DA:199,0 -DA:203,20 -DA:216,20 +DA:203,36 +DA:216,36 DA:217,0 -DA:222,20 -DA:235,20 -DA:236,20 -DA:237,20 -DA:238,20 -DA:239,20 +DA:222,36 +DA:235,36 +DA:236,32 +DA:237,32 +DA:238,32 +DA:239,32 DA:240,1 -DA:241,19 -DA:242,0 -DA:245,20 -DA:257,21 -DA:258,1 -DA:259,1 -DA:265,1 -DA:266,1 -DA:267,1 -DA:276,1 -DA:277,1 -DA:278,1 -DA:282,20 -DA:294,20 +DA:241,31 +DA:242,2 +DA:245,36 +DA:257,38 +DA:258,2 +DA:259,2 +DA:265,2 +DA:266,2 +DA:267,2 +DA:276,2 +DA:277,2 +DA:278,2 +DA:282,36 +DA:294,36 DA:299,5 DA:301,5 DA:302,5 @@ -22683,33 +22683,33 @@ DA:322,1 DA:323,1 DA:325,1 DA:326,1 -DA:330,20 +DA:330,36 DA:342,1 -DA:348,20 -DA:349,140 -DA:351,20 +DA:348,36 +DA:349,252 +DA:351,36 DA:355,0 LF:127 -LH:89 -BRDA:58,0,0,18 -BRDA:58,0,1,2 +LH:91 +BRDA:58,0,0,28 +BRDA:58,0,1,8 BRDA:70,1,0,0 -BRDA:70,1,1,18 -BRDA:70,2,0,18 -BRDA:70,2,1,0 +BRDA:70,1,1,28 +BRDA:70,2,0,28 +BRDA:70,2,1,2 BRDA:78,3,0,0 -BRDA:78,3,1,18 -BRDA:79,4,0,18 -BRDA:79,4,1,0 -BRDA:79,4,2,0 +BRDA:78,3,1,28 +BRDA:79,4,0,28 +BRDA:79,4,1,2 +BRDA:79,4,2,2 BRDA:80,5,0,0 -BRDA:80,5,1,0 -BRDA:80,6,0,0 -BRDA:80,6,1,0 +BRDA:80,5,1,2 +BRDA:80,6,0,2 +BRDA:80,6,1,2 BRDA:81,7,0,0 -BRDA:81,7,1,0 -BRDA:81,8,0,0 -BRDA:81,8,1,0 +BRDA:81,7,1,2 +BRDA:81,8,0,2 +BRDA:81,8,1,2 BRDA:87,9,0,0 BRDA:87,9,1,0 BRDA:93,10,0,0 @@ -22718,23 +22718,23 @@ BRDA:98,11,0,0 BRDA:98,11,1,0 BRDA:102,12,0,0 BRDA:102,12,1,0 -BRDA:124,13,0,6 -BRDA:124,13,1,14 -BRDA:129,14,0,4 -BRDA:129,14,1,2 -BRDA:134,15,0,20 -BRDA:134,15,1,18 -BRDA:134,15,2,18 -BRDA:136,16,0,20 +BRDA:124,13,0,11 +BRDA:124,13,1,25 +BRDA:129,14,0,10 +BRDA:129,14,1,1 +BRDA:134,15,0,36 +BRDA:134,15,1,29 +BRDA:134,15,2,29 +BRDA:136,16,0,36 BRDA:136,16,1,0 BRDA:139,17,0,0 -BRDA:139,17,1,20 +BRDA:139,17,1,36 BRDA:140,18,0,0 BRDA:140,18,1,0 BRDA:144,19,0,0 -BRDA:144,19,1,20 -BRDA:145,20,0,20 -BRDA:145,20,1,20 +BRDA:144,19,1,36 +BRDA:145,20,0,36 +BRDA:145,20,1,36 BRDA:145,20,2,0 BRDA:145,20,3,0 BRDA:149,21,0,0 @@ -22750,45 +22750,45 @@ BRDA:158,25,1,0 BRDA:163,26,0,0 BRDA:163,26,1,0 BRDA:169,27,0,0 -BRDA:169,27,1,20 -BRDA:169,28,0,20 -BRDA:169,28,1,6 +BRDA:169,27,1,36 +BRDA:169,28,0,36 +BRDA:169,28,1,11 BRDA:169,28,2,2 BRDA:193,29,0,0 -BRDA:193,29,1,20 +BRDA:193,29,1,36 BRDA:198,30,0,0 BRDA:198,30,1,0 BRDA:216,31,0,0 -BRDA:216,31,1,20 +BRDA:216,31,1,36 BRDA:219,32,0,0 BRDA:219,32,1,0 -BRDA:235,33,0,20 -BRDA:235,33,1,0 -BRDA:235,34,0,20 -BRDA:235,34,1,20 +BRDA:235,33,0,32 +BRDA:235,33,1,4 +BRDA:235,34,0,36 +BRDA:235,34,1,36 BRDA:239,35,0,1 -BRDA:239,35,1,19 -BRDA:241,36,0,0 -BRDA:241,36,1,19 -BRDA:257,37,0,1 -BRDA:257,37,1,20 +BRDA:239,35,1,31 +BRDA:241,36,0,2 +BRDA:241,36,1,29 +BRDA:257,37,0,2 +BRDA:257,37,1,36 BRDA:257,38,0,0 -BRDA:257,38,1,21 -BRDA:257,39,0,21 -BRDA:257,39,1,21 -BRDA:268,40,0,1 +BRDA:257,38,1,38 +BRDA:257,39,0,38 +BRDA:257,39,1,38 +BRDA:268,40,0,2 BRDA:268,40,1,0 BRDA:267,41,0,0 -BRDA:267,41,1,1 -BRDA:267,42,0,1 -BRDA:267,42,1,1 -BRDA:276,43,0,1 +BRDA:267,41,1,2 +BRDA:267,42,0,2 +BRDA:267,42,1,2 +BRDA:276,43,0,2 BRDA:276,43,1,0 BRDA:294,44,0,5 -BRDA:294,44,1,15 -BRDA:295,45,0,20 -BRDA:295,45,1,15 -BRDA:295,45,2,18 +BRDA:294,44,1,31 +BRDA:295,45,0,36 +BRDA:295,45,1,24 +BRDA:295,45,2,34 BRDA:305,46,0,5 BRDA:305,46,1,5 BRDA:307,47,0,5 @@ -22812,7 +22812,7 @@ BRDA:355,55,1,0 BRDA:355,56,0,0 BRDA:355,56,1,0 BRF:120 -BRH:55 +BRH:66 end_of_record TN: SF:packages/roosterjs-editor-dom/lib/edit/deleteSelectedContent.ts @@ -22998,10 +22998,10 @@ FNH:8 FNDA:1,createEntityPlaceholder FNDA:9,moveContentWithEntityPlaceholders FNDA:1,(anonymous_3) -FNDA:411,restoreContentWithEntityPlaceholder +FNDA:487,restoreContentWithEntityPlaceholder FNDA:2,(anonymous_5) -FNDA:421,removeUntil -FNDA:603,tryGetWrapperFromEntityPlaceholder +FNDA:497,removeUntil +FNDA:710,tryGetWrapperFromEntityPlaceholder FNDA:5,getPlaceholder DA:1,1 DA:2,1 @@ -23029,33 +23029,33 @@ DA:60,21 DA:63,9 DA:65,9 DA:75,1 -DA:81,411 -DA:83,411 -DA:85,411 -DA:86,601 -DA:87,601 -DA:89,601 +DA:81,487 +DA:83,487 +DA:85,487 +DA:86,708 +DA:87,708 +DA:89,708 DA:90,10 DA:92,10 DA:93,9 DA:95,1 -DA:98,591 -DA:99,591 -DA:101,591 -DA:102,457 +DA:98,698 +DA:99,698 +DA:101,698 +DA:102,565 DA:103,2 DA:105,2 DA:106,1 -DA:112,601 -DA:115,411 -DA:119,421 -DA:120,385 -DA:121,385 -DA:122,385 -DA:124,421 -DA:132,603 -DA:135,603 -DA:137,603 +DA:112,708 +DA:115,487 +DA:119,497 +DA:120,461 +DA:121,461 +DA:122,461 +DA:124,497 +DA:132,710 +DA:135,710 +DA:137,710 DA:147,5 DA:149,5 LF:55 @@ -23071,40 +23071,40 @@ BRDA:54,3,1,1 BRDA:54,4,0,1 BRDA:54,4,1,1 BRDA:89,5,0,10 -BRDA:89,5,1,591 +BRDA:89,5,1,698 BRDA:92,6,0,9 BRDA:92,6,1,1 BRDA:98,7,0,9 -BRDA:98,7,1,582 -BRDA:101,8,0,457 -BRDA:101,8,1,134 +BRDA:98,7,1,689 +BRDA:101,8,0,565 +BRDA:101,8,1,133 BRDA:105,9,0,1 BRDA:105,9,1,1 BRDA:106,10,0,0 BRDA:106,10,1,1 BRDA:106,11,0,1 BRDA:106,11,1,1 -BRDA:119,12,0,806 -BRDA:119,12,1,394 +BRDA:119,12,0,958 +BRDA:119,12,1,470 BRDA:119,12,2,22 BRDA:122,13,0,0 -BRDA:122,13,1,385 -BRDA:122,14,0,385 -BRDA:122,14,1,385 -BRDA:132,15,0,603 -BRDA:132,15,1,469 +BRDA:122,13,1,461 +BRDA:122,14,0,461 +BRDA:122,14,1,461 +BRDA:132,15,0,710 +BRDA:132,15,1,577 BRDA:132,15,2,15 BRDA:134,16,0,0 BRDA:134,16,1,15 BRDA:134,17,0,15 BRDA:134,17,1,15 BRDA:135,18,0,12 -BRDA:135,18,1,591 +BRDA:135,18,1,698 BRDA:135,19,0,0 BRDA:135,19,1,12 BRDA:135,20,0,12 BRDA:135,20,1,12 -BRDA:138,21,0,591 +BRDA:138,21,0,698 BRDA:138,21,1,12 BRDA:140,22,0,10 BRDA:140,22,1,2 @@ -23123,43 +23123,43 @@ FN:8,getEntityFromElement FN:14,(anonymous_1) FNF:2 FNH:2 -FNDA:269,getEntityFromElement -FNDA:661,(anonymous_1) +FNDA:268,getEntityFromElement +FNDA:660,(anonymous_1) DA:8,1 -DA:9,269 -DA:10,269 -DA:11,269 -DA:12,269 -DA:14,269 -DA:15,661 +DA:9,268 +DA:10,268 +DA:11,268 +DA:12,268 +DA:14,268 +DA:15,660 DA:16,64 -DA:17,597 +DA:17,596 DA:18,64 -DA:19,533 +DA:19,532 DA:20,52 -DA:21,481 +DA:21,480 DA:22,47 -DA:26,269 +DA:26,268 LF:15 LH:15 BRDA:14,0,0,0 -BRDA:14,0,1,269 -BRDA:14,1,0,269 -BRDA:14,1,1,269 +BRDA:14,0,1,268 +BRDA:14,1,0,268 +BRDA:14,1,1,268 BRDA:14,2,0,0 -BRDA:14,2,1,269 -BRDA:14,3,0,269 -BRDA:14,3,1,269 +BRDA:14,2,1,268 +BRDA:14,3,0,268 +BRDA:14,3,1,268 BRDA:15,4,0,64 -BRDA:15,4,1,597 +BRDA:15,4,1,596 BRDA:17,5,0,64 -BRDA:17,5,1,533 +BRDA:17,5,1,532 BRDA:19,6,0,52 -BRDA:19,6,1,481 +BRDA:19,6,1,480 BRDA:21,7,0,47 -BRDA:21,7,1,434 +BRDA:21,7,1,433 BRDA:27,8,0,64 -BRDA:27,8,1,205 +BRDA:27,8,1,204 BRF:18 BRH:16 end_of_record @@ -23168,17 +23168,17 @@ SF:packages/roosterjs-editor-dom/lib/entity/getEntitySelector.ts FN:8,getEntitySelector FNF:1 FNH:1 -FNDA:5799,getEntitySelector +FNDA:6303,getEntitySelector DA:8,1 -DA:9,5799 -DA:10,5799 -DA:11,5799 +DA:9,6303 +DA:10,6303 +DA:11,6303 LF:4 LH:4 BRDA:9,0,0,2 -BRDA:9,0,1,5797 +BRDA:9,0,1,6301 BRDA:10,1,0,2 -BRDA:10,1,1,5797 +BRDA:10,1,1,6301 BRF:4 BRH:4 end_of_record @@ -23187,24 +23187,24 @@ SF:packages/roosterjs-editor-dom/lib/event/cacheGetEventData.ts FN:10,cacheGetEventData FNF:1 FNH:1 -FNDA:856,cacheGetEventData +FNDA:940,cacheGetEventData DA:10,1 -DA:16,856 -DA:19,856 -DA:20,373 -DA:21,373 -DA:24,856 +DA:16,940 +DA:19,940 +DA:20,377 +DA:21,377 +DA:24,940 LF:6 LH:6 BRDA:17,0,0,68 -BRDA:17,0,1,788 -BRDA:16,1,0,856 -BRDA:16,1,1,373 +BRDA:17,0,1,872 +BRDA:16,1,0,940 +BRDA:16,1,1,377 BRDA:16,1,2,143 -BRDA:19,2,0,373 -BRDA:19,2,1,483 -BRDA:20,3,0,373 -BRDA:20,3,1,200 +BRDA:19,2,0,377 +BRDA:19,2,1,563 +BRDA:20,3,0,377 +BRDA:20,3,1,204 BRF:9 BRH:9 end_of_record @@ -23260,14 +23260,14 @@ FN:12,isCtrlOrMetaPressed FNF:3 FNH:2 FNDA:0,(anonymous_0) -FNDA:29,(anonymous_1) -FNDA:29,isCtrlOrMetaPressed +FNDA:25,(anonymous_1) +FNDA:25,isCtrlOrMetaPressed DA:1,1 DA:3,1 DA:4,0 -DA:5,29 +DA:5,25 DA:12,1 -DA:13,29 +DA:13,25 LF:6 LH:5 BRDA:4,0,0,0 @@ -23328,25 +23328,25 @@ FN:331,(anonymous_20) FNF:20 FNH:19 FNDA:1,(anonymous_0) -FNDA:214,HtmlSanitizer +FNDA:212,HtmlSanitizer FNDA:6,(anonymous_2) FNDA:0,(anonymous_3) FNDA:169,(anonymous_4) -FNDA:236,(anonymous_5) -FNDA:224,(anonymous_6) -FNDA:14,(anonymous_7) +FNDA:234,(anonymous_5) +FNDA:222,(anonymous_6) +FNDA:11,(anonymous_7) FNDA:8,(anonymous_8) -FNDA:22,(anonymous_9) -FNDA:22,(anonymous_11) +FNDA:19,(anonymous_9) +FNDA:18,(anonymous_11) FNDA:8,(anonymous_12) -FNDA:1098,(anonymous_13) -FNDA:509,(anonymous_14) -FNDA:53,(anonymous_15) -FNDA:509,(anonymous_16) -FNDA:511,(anonymous_17) -FNDA:509,(anonymous_18) -FNDA:26,(anonymous_19) -FNDA:74,(anonymous_20) +FNDA:1074,(anonymous_13) +FNDA:500,(anonymous_14) +FNDA:49,(anonymous_15) +FNDA:500,(anonymous_16) +FNDA:471,(anonymous_17) +FNDA:500,(anonymous_18) +FNDA:24,(anonymous_19) +FNDA:72,(anonymous_20) DA:1,1 DA:2,1 DA:3,1 @@ -23368,18 +23368,18 @@ DA:56,0 DA:57,0 DA:58,0 DA:61,0 -DA:81,214 -DA:82,214 -DA:83,214 -DA:84,214 -DA:85,214 -DA:86,214 -DA:87,214 -DA:90,214 -DA:91,214 -DA:92,214 -DA:93,214 -DA:94,214 +DA:81,212 +DA:82,212 +DA:83,212 +DA:84,212 +DA:85,212 +DA:86,212 +DA:87,212 +DA:90,212 +DA:91,212 +DA:92,212 +DA:93,212 +DA:94,212 DA:108,1 DA:109,169 DA:110,169 @@ -23389,132 +23389,132 @@ DA:114,164 DA:115,159 DA:118,169 DA:127,1 -DA:128,236 +DA:128,234 DA:129,0 -DA:131,236 -DA:132,236 +DA:131,234 +DA:132,234 DA:139,1 -DA:140,224 -DA:141,224 -DA:143,14 +DA:140,222 +DA:141,222 +DA:143,11 DA:144,8 -DA:145,22 -DA:146,224 -DA:147,63 -DA:149,63 -DA:150,63 -DA:151,63 -DA:155,29 -DA:156,29 +DA:145,19 +DA:146,222 +DA:147,44 +DA:149,44 +DA:150,44 +DA:151,44 +DA:155,21 +DA:156,21 DA:157,2 -DA:159,27 -DA:163,27 -DA:164,22 -DA:170,224 +DA:159,19 +DA:163,19 +DA:164,18 +DA:170,222 DA:171,8 DA:172,8 DA:177,1 -DA:178,1098 -DA:179,1098 -DA:180,1098 -DA:181,1098 -DA:182,1098 -DA:184,1098 -DA:186,1098 -DA:187,543 -DA:188,543 -DA:189,543 -DA:191,543 -DA:192,9 -DA:195,543 -DA:196,38 -DA:197,505 +DA:178,1074 +DA:179,1074 +DA:180,1074 +DA:181,1074 +DA:182,1074 +DA:184,1074 +DA:186,1074 +DA:187,534 +DA:188,534 +DA:189,534 +DA:191,534 +DA:192,7 +DA:195,534 +DA:196,36 +DA:197,498 DA:198,0 -DA:199,505 -DA:200,470 +DA:199,498 +DA:200,463 DA:201,35 DA:202,3 DA:203,3 -DA:205,555 -DA:206,487 -DA:207,487 -DA:212,68 -DA:213,60 +DA:205,540 +DA:206,474 +DA:207,474 +DA:212,66 +DA:213,58 DA:214,8 DA:215,8 DA:217,0 -DA:220,1098 -DA:221,55 -DA:222,1043 +DA:220,1074 +DA:221,51 +DA:222,1023 DA:226,12 -DA:229,1031 -DA:230,569 -DA:231,569 -DA:232,569 -DA:233,509 -DA:234,509 -DA:235,509 -DA:238,569 -DA:239,569 -DA:240,569 -DA:241,862 -DA:242,862 +DA:229,1011 +DA:230,558 +DA:231,558 +DA:232,558 +DA:233,500 +DA:234,500 +DA:235,500 +DA:238,558 +DA:239,558 +DA:240,558 +DA:241,840 +DA:242,840 DA:247,1 -DA:248,509 -DA:252,509 -DA:253,32 -DA:254,53 -DA:259,509 -DA:260,509 -DA:261,509 -DA:262,511 -DA:263,511 -DA:264,511 -DA:265,511 -DA:267,511 -DA:268,81 -DA:271,511 +DA:248,500 +DA:252,500 +DA:253,30 +DA:254,49 +DA:259,500 +DA:260,500 +DA:261,500 +DA:262,471 +DA:263,471 +DA:264,471 +DA:265,471 +DA:267,471 +DA:268,74 +DA:271,471 DA:272,0 DA:273,0 -DA:276,511 -DA:284,511 -DA:285,110 -DA:288,511 -DA:289,284 -DA:291,227 -DA:295,509 +DA:276,471 +DA:284,471 +DA:285,108 +DA:288,471 +DA:289,262 +DA:291,209 +DA:295,500 DA:298,1 -DA:299,509 -DA:300,293 -DA:301,293 -DA:302,293 -DA:303,293 -DA:305,293 -DA:311,293 -DA:312,26 -DA:315,293 -DA:320,80 -DA:322,213 -DA:327,26 -DA:328,26 -DA:329,26 -DA:331,26 -DA:332,74 +DA:299,500 +DA:300,277 +DA:301,277 +DA:302,277 +DA:303,277 +DA:305,277 +DA:311,277 +DA:312,24 +DA:315,277 +DA:320,75 +DA:322,202 +DA:327,24 +DA:328,24 +DA:329,24 +DA:331,24 +DA:332,72 DA:336,8 -DA:340,26 +DA:340,24 DA:342,1 LF:156 LH:147 -BRDA:81,0,0,214 +BRDA:81,0,0,212 BRDA:81,0,1,25 -BRDA:91,1,0,214 +BRDA:91,1,0,212 BRDA:91,1,1,156 -BRDA:92,2,0,214 +BRDA:92,2,0,212 BRDA:92,2,1,154 -BRDA:93,3,0,214 -BRDA:93,3,1,213 -BRDA:94,4,0,214 -BRDA:94,4,1,87 +BRDA:93,3,0,212 +BRDA:93,3,1,211 +BRDA:94,4,0,212 +BRDA:94,4,1,88 BRDA:56,5,0,0 BRDA:56,5,1,0 BRDA:59,6,0,0 @@ -23533,131 +23533,131 @@ BRDA:118,11,1,169 BRDA:118,11,2,169 BRDA:118,11,3,5 BRDA:128,12,0,0 -BRDA:128,12,1,236 -BRDA:150,13,0,63 +BRDA:128,12,1,234 +BRDA:150,13,0,44 BRDA:150,13,1,0 -BRDA:150,14,0,63 -BRDA:150,14,1,63 -BRDA:151,15,0,38 -BRDA:151,15,1,25 -BRDA:151,16,0,63 -BRDA:151,16,1,52 -BRDA:151,16,2,25 +BRDA:150,14,0,44 +BRDA:150,14,1,44 +BRDA:151,15,0,25 +BRDA:151,15,1,19 +BRDA:151,16,0,44 +BRDA:151,16,1,38 +BRDA:151,16,2,19 BRDA:156,17,0,2 -BRDA:156,17,1,27 -BRDA:156,18,0,29 -BRDA:156,18,1,29 -BRDA:156,18,2,29 -BRDA:164,19,0,22 -BRDA:164,19,1,5 +BRDA:156,17,1,19 +BRDA:156,18,0,21 +BRDA:156,18,1,21 +BRDA:156,18,2,21 +BRDA:164,19,0,18 +BRDA:164,19,1,3 BRDA:171,20,0,8 BRDA:171,20,1,0 -BRDA:186,21,0,543 -BRDA:186,21,1,555 -BRDA:191,22,0,9 -BRDA:191,22,1,534 -BRDA:195,23,0,38 -BRDA:195,23,1,505 +BRDA:186,21,0,534 +BRDA:186,21,1,540 +BRDA:191,22,0,7 +BRDA:191,22,1,527 +BRDA:195,23,0,36 +BRDA:195,23,1,498 BRDA:197,24,0,0 -BRDA:197,24,1,505 -BRDA:199,25,0,470 +BRDA:197,24,1,498 +BRDA:199,25,0,463 BRDA:199,25,1,35 -BRDA:199,26,0,505 -BRDA:199,26,1,505 +BRDA:199,26,0,498 +BRDA:199,26,1,498 BRDA:201,27,0,3 BRDA:201,27,1,32 BRDA:201,28,0,35 BRDA:201,28,1,4 -BRDA:205,29,0,487 -BRDA:205,29,1,68 -BRDA:208,30,0,487 -BRDA:208,30,1,484 -BRDA:208,30,2,483 -BRDA:208,30,3,474 -BRDA:211,31,0,474 +BRDA:205,29,0,474 +BRDA:205,29,1,66 +BRDA:208,30,0,474 +BRDA:208,30,1,471 +BRDA:208,30,2,470 +BRDA:208,30,3,461 +BRDA:211,31,0,461 BRDA:211,31,1,4 -BRDA:212,32,0,60 +BRDA:212,32,0,58 BRDA:212,32,1,8 BRDA:214,33,0,8 BRDA:214,33,1,0 -BRDA:220,34,0,55 -BRDA:220,34,1,1043 +BRDA:220,34,0,51 +BRDA:220,34,1,1023 BRDA:221,35,0,0 -BRDA:221,35,1,55 -BRDA:221,36,0,55 -BRDA:221,36,1,55 +BRDA:221,35,1,51 +BRDA:221,36,0,51 +BRDA:221,36,1,51 BRDA:222,37,0,12 -BRDA:222,37,1,1031 -BRDA:223,38,0,1043 -BRDA:223,38,1,473 -BRDA:223,38,2,470 +BRDA:222,37,1,1011 +BRDA:223,38,0,1023 +BRDA:223,38,1,464 +BRDA:223,38,2,461 BRDA:226,39,0,12 BRDA:226,39,1,0 -BRDA:229,40,0,569 -BRDA:229,40,1,462 -BRDA:229,41,0,1031 -BRDA:229,41,1,522 -BRDA:232,42,0,509 -BRDA:232,42,1,60 -BRDA:252,43,0,32 -BRDA:252,43,1,477 -BRDA:267,44,0,81 -BRDA:267,44,1,430 -BRDA:267,45,0,511 -BRDA:267,45,1,511 +BRDA:229,40,0,558 +BRDA:229,40,1,453 +BRDA:229,41,0,1011 +BRDA:229,41,1,511 +BRDA:232,42,0,500 +BRDA:232,42,1,58 +BRDA:252,43,0,30 +BRDA:252,43,1,470 +BRDA:267,44,0,74 +BRDA:267,44,1,397 +BRDA:267,45,0,471 +BRDA:267,45,1,471 BRDA:271,46,0,0 -BRDA:271,46,1,511 -BRDA:271,47,0,511 -BRDA:271,47,1,475 -BRDA:277,48,0,511 -BRDA:277,48,1,475 -BRDA:277,48,2,475 -BRDA:277,48,3,474 -BRDA:277,48,4,427 -BRDA:277,48,5,389 -BRDA:277,48,6,200 -BRDA:277,48,7,279 -BRDA:277,48,8,189 -BRDA:277,48,9,180 -BRDA:284,49,0,110 -BRDA:284,49,1,401 -BRDA:284,50,0,511 -BRDA:284,50,1,284 -BRDA:288,51,0,284 -BRDA:288,51,1,227 +BRDA:271,46,1,471 +BRDA:271,47,0,471 +BRDA:271,47,1,437 +BRDA:277,48,0,471 +BRDA:277,48,1,437 +BRDA:277,48,2,437 +BRDA:277,48,3,436 +BRDA:277,48,4,391 +BRDA:277,48,5,353 +BRDA:277,48,6,184 +BRDA:277,48,7,245 +BRDA:277,48,8,169 +BRDA:277,48,9,160 +BRDA:284,49,0,108 +BRDA:284,49,1,363 +BRDA:284,50,0,471 +BRDA:284,50,1,262 +BRDA:288,51,0,262 +BRDA:288,51,1,209 BRDA:306,52,0,9 -BRDA:306,52,1,284 -BRDA:308,53,0,199 -BRDA:308,53,1,85 -BRDA:307,54,0,284 -BRDA:307,54,1,106 -BRDA:311,55,0,26 -BRDA:311,55,1,267 -BRDA:311,56,0,293 -BRDA:311,56,1,38 -BRDA:315,57,0,80 -BRDA:315,57,1,213 -BRDA:316,58,0,293 -BRDA:316,58,1,215 -BRDA:316,58,2,215 -BRDA:328,59,0,26 +BRDA:306,52,1,268 +BRDA:308,53,0,188 +BRDA:308,53,1,80 +BRDA:307,54,0,268 +BRDA:307,54,1,101 +BRDA:311,55,0,24 +BRDA:311,55,1,253 +BRDA:311,56,0,277 +BRDA:311,56,1,36 +BRDA:315,57,0,75 +BRDA:315,57,1,202 +BRDA:316,58,0,277 +BRDA:316,58,1,204 +BRDA:316,58,2,204 +BRDA:328,59,0,24 BRDA:328,59,1,0 BRDA:329,60,0,0 -BRDA:329,60,1,26 +BRDA:329,60,1,24 BRDA:332,61,0,8 -BRDA:332,61,1,66 -BRDA:333,62,0,74 +BRDA:332,61,1,64 +BRDA:333,62,0,72 BRDA:333,62,1,8 BRDA:333,63,0,0 -BRDA:333,63,1,74 -BRDA:333,64,0,74 -BRDA:333,64,1,74 +BRDA:333,63,1,72 +BRDA:333,64,0,72 +BRDA:333,64,1,72 BRDA:340,65,0,8 -BRDA:340,65,1,18 +BRDA:340,65,1,16 BRDA:340,66,0,0 -BRDA:340,66,1,26 -BRDA:340,67,0,26 -BRDA:340,67,1,26 +BRDA:340,66,1,24 +BRDA:340,67,0,24 +BRDA:340,67,1,24 BRF:153 BRH:137 end_of_record @@ -23667,18 +23667,18 @@ FN:9,chainSanitizerCallback FN:18,(anonymous_1) FNF:2 FNH:1 -FNDA:342,chainSanitizerCallback +FNDA:323,chainSanitizerCallback FNDA:0,(anonymous_1) DA:9,1 -DA:14,342 -DA:15,342 +DA:14,323 +DA:15,323 DA:17,0 DA:18,0 DA:19,0 DA:20,0 LF:7 LH:3 -BRDA:14,0,0,342 +BRDA:14,0,0,323 BRDA:14,0,1,0 BRF:2 BRH:1 @@ -23690,11 +23690,11 @@ FN:10,customClone FN:29,cloneObject FNF:3 FNH:2 -FNDA:1661,nativeClone +FNDA:1640,nativeClone FNDA:0,customClone -FNDA:1661,cloneObject +FNDA:1640,cloneObject DA:1,1 -DA:7,1661 +DA:7,1640 DA:14,0 DA:15,0 DA:16,0 @@ -23702,11 +23702,11 @@ DA:17,0 DA:20,0 DA:24,1 DA:29,1 -DA:33,1661 +DA:33,1640 LF:10 LH:5 -BRDA:7,0,0,1661 -BRDA:7,0,1,1425 +BRDA:7,0,0,1640 +BRDA:7,0,1,1406 BRDA:14,1,0,0 BRDA:14,1,1,0 BRDA:15,2,0,0 @@ -23721,9 +23721,9 @@ SF:packages/roosterjs-editor-dom/lib/htmlSanitizer/createDefaultHtmlSanitizerOpt FN:6,createDefaultHtmlSanitizerOptions FNF:1 FNH:1 -FNDA:57,createDefaultHtmlSanitizerOptions +FNDA:55,createDefaultHtmlSanitizerOptions DA:6,1 -DA:7,57 +DA:7,55 LF:2 LH:2 BRF:0 @@ -23745,18 +23745,18 @@ FN:265,unique FN:266,(anonymous_11) FNF:12 FNH:12 -FNDA:214,getTagReplacement +FNDA:212,getTagReplacement FNDA:2,(anonymous_1) -FNDA:214,getAllowedAttributes -FNDA:14340,(anonymous_3) -FNDA:214,getAllowedCssClassesRegex -FNDA:214,getDefaultStyleValues +FNDA:212,getAllowedAttributes +FNDA:14418,(anonymous_3) +FNDA:212,getAllowedCssClassesRegex +FNDA:212,getDefaultStyleValues FNDA:1,(anonymous_6) -FNDA:214,getStyleCallbacks +FNDA:212,getStyleCallbacks FNDA:8,removeValue -FNDA:23,removeWidthForLiAndDiv -FNDA:214,unique -FNDA:14340,(anonymous_11) +FNDA:20,removeWidthForLiAndDiv +FNDA:212,unique +FNDA:14418,(anonymous_11) DA:1,1 DA:2,1 DA:5,1 @@ -23764,60 +23764,60 @@ DA:136,1 DA:145,1 DA:187,1 DA:192,1 -DA:195,214 -DA:196,214 -DA:197,214 +DA:195,212 +DA:196,212 +DA:197,212 DA:198,2 DA:199,2 -DA:203,214 +DA:203,212 DA:209,1 -DA:210,214 -DA:211,14340 +DA:210,212 +DA:211,14418 DA:218,1 -DA:221,214 -DA:222,214 +DA:221,212 +DA:222,212 DA:228,1 -DA:229,214 -DA:230,214 -DA:231,59 +DA:229,212 +DA:230,212 +DA:231,57 DA:232,1 DA:233,1 DA:234,1 DA:236,0 -DA:241,214 +DA:241,212 DA:247,1 -DA:250,214 -DA:251,214 -DA:252,214 -DA:253,214 +DA:250,212 +DA:251,212 +DA:252,212 +DA:253,212 DA:257,8 -DA:261,23 -DA:262,23 -DA:266,14340 +DA:261,20 +DA:262,20 +DA:266,14418 LF:37 LH:36 -BRDA:196,0,0,214 +BRDA:196,0,0,212 BRDA:196,0,1,155 BRDA:198,1,0,2 BRDA:198,1,1,0 -BRDA:210,2,0,214 +BRDA:210,2,0,212 BRDA:210,2,1,155 -BRDA:221,3,0,214 +BRDA:221,3,0,212 BRDA:221,3,1,156 -BRDA:222,4,0,11 -BRDA:222,4,1,203 -BRDA:230,5,0,59 +BRDA:222,4,0,8 +BRDA:222,4,1,204 +BRDA:230,5,0,57 BRDA:230,5,1,155 BRDA:233,6,0,1 BRDA:233,6,1,0 BRDA:233,7,0,1 BRDA:233,7,1,1 -BRDA:251,8,0,214 -BRDA:251,8,1,214 -BRDA:252,9,0,214 -BRDA:252,9,1,214 -BRDA:262,10,0,23 -BRDA:262,10,1,22 +BRDA:251,8,0,212 +BRDA:251,8,1,212 +BRDA:252,9,0,212 +BRDA:252,9,1,212 +BRDA:262,10,0,20 +BRDA:262,10,1,19 BRF:22 BRH:20 end_of_record @@ -23827,27 +23827,27 @@ FN:17,getInheritableStyles FN:22,(anonymous_1) FNF:2 FNH:2 -FNDA:249,getInheritableStyles -FNDA:6723,(anonymous_1) +FNDA:244,getInheritableStyles +FNDA:6588,(anonymous_1) DA:5,1 DA:17,1 -DA:18,249 -DA:19,249 -DA:20,249 -DA:21,249 -DA:22,6723 -DA:24,249 +DA:18,244 +DA:19,244 +DA:20,244 +DA:21,244 +DA:22,6588 +DA:24,244 LF:8 LH:8 -BRDA:18,0,0,249 -BRDA:18,0,1,12 -BRDA:18,0,2,12 -BRDA:19,1,0,249 -BRDA:19,1,1,12 -BRDA:19,1,2,12 -BRDA:22,2,0,6723 -BRDA:22,2,1,324 -BRDA:22,2,2,6401 +BRDA:18,0,0,244 +BRDA:18,0,1,9 +BRDA:18,0,2,9 +BRDA:19,1,0,244 +BRDA:19,1,1,9 +BRDA:19,1,2,9 +BRDA:22,2,0,6588 +BRDA:22,2,1,243 +BRDA:22,2,2,6365 BRF:9 BRH:9 end_of_record @@ -23856,17 +23856,17 @@ SF:packages/roosterjs-editor-dom/lib/htmlSanitizer/getPredefinedCssForElement.ts FN:44,getPredefinedCssForElement FNF:1 FNH:1 -FNDA:518,getPredefinedCssForElement +FNDA:509,getPredefinedCssForElement DA:1,1 DA:4,1 DA:44,1 -DA:48,518 -DA:49,518 +DA:48,509 +DA:49,509 LF:5 LH:5 -BRDA:49,0,0,518 -BRDA:49,0,1,485 -BRDA:49,1,0,485 +BRDA:49,0,0,509 +BRDA:49,0,1,478 +BRDA:49,1,0,478 BRDA:49,1,1,353 BRF:4 BRH:4 @@ -23878,14 +23878,14 @@ FN:16,isCssVariable FNF:2 FNH:2 FNDA:5,processCssVariable -FNDA:477,isCssVariable +FNDA:439,isCssVariable DA:1,1 DA:2,1 DA:8,1 DA:9,5 DA:10,5 DA:16,1 -DA:17,477 +DA:17,439 LF:7 LH:7 BRDA:10,0,0,5 @@ -23913,18 +23913,18 @@ FN:71,(anonymous_10) FNF:11 FNH:4 FNDA:1,(anonymous_0) -FNDA:111,EmptyInlineElement +FNDA:118,EmptyInlineElement FNDA:0,(anonymous_2) FNDA:0,(anonymous_3) FNDA:86,(anonymous_4) -FNDA:98,(anonymous_5) +FNDA:102,(anonymous_5) FNDA:0,(anonymous_6) FNDA:0,(anonymous_7) FNDA:0,(anonymous_8) FNDA:0,(anonymous_9) FNDA:0,(anonymous_10) DA:9,1 -DA:10,111 +DA:10,118 DA:15,1 DA:16,0 DA:22,1 @@ -23932,7 +23932,7 @@ DA:23,0 DA:29,1 DA:30,86 DA:36,1 -DA:37,98 +DA:37,102 DA:43,1 DA:44,0 DA:50,1 @@ -23957,15 +23957,15 @@ FN:8,ImageInlineElement FNF:2 FNH:2 FNDA:1,(anonymous_0) -FNDA:4,ImageInlineElement +FNDA:5,ImageInlineElement DA:1,1 DA:7,1 -DA:9,4 +DA:9,5 DA:11,1 LF:4 LH:4 -BRDA:9,0,0,4 -BRDA:9,0,1,4 +BRDA:9,0,0,5 +BRDA:9,0,1,5 BRF:2 BRH:2 end_of_record @@ -23976,15 +23976,15 @@ FN:8,LinkInlineElement FNF:2 FNH:2 FNDA:1,(anonymous_0) -FNDA:14,LinkInlineElement +FNDA:32,LinkInlineElement DA:1,1 DA:7,1 -DA:9,14 +DA:9,32 DA:11,1 LF:4 LH:4 -BRDA:9,0,0,14 -BRDA:9,0,1,14 +BRDA:9,0,0,32 +BRDA:9,0,1,32 BRF:2 BRH:2 end_of_record @@ -24004,54 +24004,54 @@ FN:89,(anonymous_10) FNF:11 FNH:11 FNDA:1,(anonymous_0) -FNDA:792,NodeInlineElement -FNDA:169,(anonymous_2) -FNDA:1776,(anonymous_3) +FNDA:957,NodeInlineElement +FNDA:174,(anonymous_2) +FNDA:2039,(anonymous_3) FNDA:14,(anonymous_4) -FNDA:349,(anonymous_5) -FNDA:246,(anonymous_6) -FNDA:93,(anonymous_7) -FNDA:203,(anonymous_8) -FNDA:129,(anonymous_9) -FNDA:7,(anonymous_10) +FNDA:554,(anonymous_5) +FNDA:450,(anonymous_6) +FNDA:100,(anonymous_7) +FNDA:287,(anonymous_8) +FNDA:201,(anonymous_9) +FNDA:117,(anonymous_10) DA:1,1 DA:2,1 DA:3,1 DA:18,1 -DA:19,792 +DA:19,957 DA:24,1 -DA:26,169 +DA:26,174 DA:36,1 -DA:37,1776 +DA:37,2039 DA:41,1 DA:42,14 DA:48,1 -DA:51,349 +DA:51,554 DA:57,1 -DA:60,246 +DA:60,450 DA:66,1 -DA:67,93 +DA:67,100 DA:73,1 -DA:74,203 +DA:74,287 DA:80,1 -DA:81,129 -DA:82,129 -DA:83,129 +DA:81,201 +DA:82,201 +DA:83,201 DA:89,1 -DA:90,7 +DA:90,117 DA:92,1 LF:26 LH:26 -BRDA:27,0,0,169 +BRDA:27,0,0,174 BRDA:27,0,1,5 -BRDA:28,1,0,157 +BRDA:28,1,0,162 BRDA:28,1,1,12 -BRDA:67,2,0,93 -BRDA:67,2,1,93 -BRDA:74,3,0,203 -BRDA:74,3,1,203 -BRDA:83,4,0,129 -BRDA:83,4,1,129 +BRDA:67,2,0,100 +BRDA:67,2,1,100 +BRDA:74,3,0,287 +BRDA:74,3,1,287 +BRDA:83,4,0,201 +BRDA:83,4,1,201 BRDA:83,4,2,88 BRF:11 BRH:11 @@ -24075,52 +24075,52 @@ FN:107,(anonymous_13) FNF:14 FNH:14 FNDA:1,(anonymous_0) -FNDA:121,PartialInlineElement +FNDA:129,PartialInlineElement FNDA:5,(anonymous_2) -FNDA:61,(anonymous_3) +FNDA:68,(anonymous_3) FNDA:8,(anonymous_4) -FNDA:17,(anonymous_5) -FNDA:111,(anonymous_6) -FNDA:103,(anonymous_7) +FNDA:19,(anonymous_5) +FNDA:116,(anonymous_6) +FNDA:108,(anonymous_7) FNDA:24,(anonymous_8) -FNDA:12,(anonymous_9) +FNDA:16,(anonymous_9) FNDA:5,(anonymous_10) -FNDA:6,(anonymous_11) -FNDA:22,(anonymous_12) +FNDA:8,(anonymous_11) +FNDA:24,(anonymous_12) FNDA:23,(anonymous_13) DA:1,1 DA:2,1 DA:3,1 DA:5,1 DA:14,1 -DA:16,121 -DA:17,144 -DA:18,155 +DA:16,129 +DA:17,156 +DA:18,167 DA:24,1 DA:25,5 DA:31,1 -DA:32,61 +DA:32,68 DA:38,1 DA:39,8 DA:45,1 -DA:46,17 -DA:48,17 +DA:46,19 +DA:48,19 DA:54,1 -DA:55,111 +DA:55,116 DA:61,1 -DA:62,103 +DA:62,108 DA:68,1 DA:69,24 DA:75,1 -DA:76,12 +DA:76,16 DA:84,1 DA:85,5 DA:91,1 -DA:92,6 +DA:92,8 DA:98,1 -DA:99,22 -DA:100,22 -DA:101,22 +DA:99,24 +DA:100,24 +DA:101,24 DA:107,1 DA:108,23 DA:109,23 @@ -24135,28 +24135,28 @@ DA:121,23 DA:123,1 LF:45 LH:41 -BRDA:17,0,0,23 -BRDA:17,0,1,98 -BRDA:18,1,0,34 -BRDA:18,1,1,87 -BRDA:55,2,0,111 -BRDA:55,2,1,38 -BRDA:62,3,0,103 -BRDA:62,3,1,39 +BRDA:17,0,0,27 +BRDA:17,0,1,102 +BRDA:18,1,0,38 +BRDA:18,1,1,91 +BRDA:55,2,0,116 +BRDA:55,2,1,40 +BRDA:62,3,0,108 +BRDA:62,3,1,40 BRDA:69,4,0,14 BRDA:69,4,1,10 -BRDA:77,5,0,8 -BRDA:77,5,1,4 +BRDA:77,5,0,10 +BRDA:77,5,1,6 BRDA:85,6,0,5 BRDA:85,6,1,5 BRDA:85,6,2,3 -BRDA:92,7,0,6 -BRDA:92,7,1,6 -BRDA:100,8,0,22 -BRDA:100,8,1,22 -BRDA:101,9,0,22 -BRDA:101,9,1,22 -BRDA:101,9,2,20 +BRDA:92,7,0,8 +BRDA:92,7,1,8 +BRDA:100,8,0,24 +BRDA:100,8,1,24 +BRDA:101,9,0,24 +BRDA:101,9,1,24 +BRDA:101,9,2,22 BRDA:112,10,0,0 BRDA:112,10,1,23 BRDA:114,11,0,0 @@ -24181,11 +24181,11 @@ FN:70,(anonymous_3) FN:95,callStylerWithInnerNode FNF:5 FNH:5 -FNDA:65,applyTextStyle -FNDA:74,(anonymous_1) +FNDA:175,applyTextStyle +FNDA:180,(anonymous_1) FNDA:15,(anonymous_2) -FNDA:67,(anonymous_3) -FNDA:74,callStylerWithInnerNode +FNDA:173,(anonymous_3) +FNDA:181,callStylerWithInnerNode DA:1,1 DA:2,1 DA:3,1 @@ -24195,66 +24195,66 @@ DA:7,1 DA:8,1 DA:10,1 DA:19,1 -DA:22,80 -DA:23,83 -DA:25,65 -DA:26,65 -DA:27,65 -DA:29,65 -DA:30,83 -DA:31,83 -DA:34,83 -DA:36,83 -DA:37,82 +DA:22,300 +DA:23,303 +DA:25,175 +DA:26,175 +DA:27,175 +DA:29,175 +DA:30,193 +DA:31,193 +DA:34,193 +DA:36,193 +DA:37,188 DA:38,24 -DA:45,82 +DA:45,188 DA:46,27 -DA:53,82 -DA:56,83 -DA:59,65 -DA:60,74 -DA:61,53 -DA:62,53 +DA:53,188 +DA:56,193 +DA:59,175 +DA:60,180 +DA:61,159 +DA:62,159 DA:63,15 DA:64,15 DA:65,15 -DA:67,53 -DA:70,56 -DA:73,67 -DA:74,67 -DA:79,48 -DA:80,48 -DA:83,67 -DA:84,26 -DA:85,26 -DA:88,67 -DA:89,67 -DA:99,74 -DA:100,7 +DA:67,159 +DA:70,162 +DA:73,173 +DA:74,173 +DA:79,98 +DA:80,98 +DA:83,173 +DA:84,83 +DA:85,83 +DA:88,173 +DA:89,173 +DA:99,181 +DA:100,8 LF:45 LH:45 -BRDA:22,0,0,15 +BRDA:22,0,0,125 BRDA:22,0,1,50 -BRDA:23,1,0,18 +BRDA:23,1,0,128 BRDA:23,1,1,47 -BRDA:29,2,0,148 -BRDA:29,2,1,94 -BRDA:29,2,2,94 -BRDA:36,3,0,82 -BRDA:36,3,1,1 -BRDA:36,4,0,83 -BRDA:36,4,1,82 +BRDA:29,2,0,368 +BRDA:29,2,1,204 +BRDA:29,2,2,204 +BRDA:36,3,0,188 +BRDA:36,3,1,5 +BRDA:36,4,0,193 +BRDA:36,4,1,188 BRDA:37,5,0,24 -BRDA:37,5,1,58 -BRDA:37,6,0,82 -BRDA:37,6,1,54 +BRDA:37,5,1,164 +BRDA:37,6,0,188 +BRDA:37,6,1,160 BRDA:45,7,0,27 -BRDA:45,7,1,55 -BRDA:56,8,0,83 +BRDA:45,7,1,161 +BRDA:56,8,0,193 BRDA:56,8,1,29 -BRDA:59,9,0,56 -BRDA:59,9,1,9 -BRDA:60,10,0,53 +BRDA:59,9,0,162 +BRDA:59,9,1,13 +BRDA:60,10,0,159 BRDA:60,10,1,3 BRDA:63,11,0,15 BRDA:63,11,1,1 @@ -24264,19 +24264,19 @@ BRDA:65,13,0,0 BRDA:65,13,1,15 BRDA:65,14,0,15 BRDA:65,14,1,15 -BRDA:75,15,0,115 -BRDA:75,15,1,115 -BRDA:75,15,2,74 -BRDA:83,16,0,26 -BRDA:83,16,1,41 -BRDA:83,17,0,67 -BRDA:83,17,1,67 -BRDA:88,18,0,67 +BRDA:75,15,0,271 +BRDA:75,15,1,271 +BRDA:75,15,2,181 +BRDA:83,16,0,83 +BRDA:83,16,1,90 +BRDA:83,17,0,173 +BRDA:83,17,1,173 +BRDA:88,18,0,173 BRDA:88,18,1,0 -BRDA:99,19,0,7 -BRDA:99,19,1,67 -BRDA:99,20,0,74 -BRDA:99,20,1,74 +BRDA:99,19,0,8 +BRDA:99,19,1,173 +BRDA:99,20,0,181 +BRDA:99,20,1,181 BRF:44 BRH:41 end_of_record @@ -24286,19 +24286,19 @@ FN:9,getFirstInlineElement FN:20,getLastInlineElement FNF:2 FNH:2 -FNDA:280,getFirstInlineElement +FNDA:285,getFirstInlineElement FNDA:4,getLastInlineElement DA:1,1 DA:2,1 DA:9,1 -DA:12,280 -DA:13,280 +DA:12,285 +DA:13,285 DA:20,1 DA:23,4 DA:24,4 LF:8 LH:8 -BRDA:13,0,0,246 +BRDA:13,0,0,251 BRDA:13,0,1,34 BRDA:24,1,0,4 BRDA:24,1,1,0 @@ -24311,8 +24311,8 @@ FN:26,getInlineElementAtNode FN:40,resolveInlineElement FNF:2 FNH:2 -FNDA:1313,getInlineElementAtNode -FNDA:785,resolveInlineElement +FNDA:1541,getInlineElementAtNode +FNDA:950,resolveInlineElement DA:1,1 DA:2,1 DA:3,1 @@ -24320,37 +24320,37 @@ DA:4,1 DA:5,1 DA:6,1 DA:26,1 -DA:31,1313 -DA:32,1313 -DA:41,785 -DA:42,785 -DA:43,785 -DA:47,594 -DA:52,785 -DA:53,1367 -DA:54,1367 -DA:55,1367 -DA:56,13 -DA:57,1354 -DA:58,3 -DA:62,785 +DA:31,1541 +DA:32,1541 +DA:41,950 +DA:42,950 +DA:43,950 +DA:47,863 +DA:52,950 +DA:53,1774 +DA:54,1774 +DA:55,1774 +DA:56,31 +DA:57,1743 +DA:58,4 +DA:62,950 LF:21 LH:21 -BRDA:31,0,0,1233 +BRDA:31,0,0,1461 BRDA:31,0,1,80 -BRDA:32,1,0,1313 -BRDA:32,1,1,785 -BRDA:32,1,2,785 -BRDA:44,2,0,1379 -BRDA:44,2,1,1379 -BRDA:52,3,0,2152 -BRDA:52,3,1,1378 -BRDA:55,4,0,13 -BRDA:55,4,1,1354 -BRDA:57,5,0,3 -BRDA:57,5,1,1351 -BRDA:62,6,0,785 -BRDA:62,6,1,769 +BRDA:32,1,0,1541 +BRDA:32,1,1,950 +BRDA:32,1,2,950 +BRDA:44,2,0,1813 +BRDA:44,2,1,1813 +BRDA:52,3,0,2724 +BRDA:52,3,1,1803 +BRDA:55,4,0,31 +BRDA:55,4,1,1743 +BRDA:57,5,0,4 +BRDA:57,5,1,1739 +BRDA:62,6,0,950 +BRDA:62,6,1,915 BRF:15 BRH:15 end_of_record @@ -24362,8 +24362,8 @@ FN:38,getInlineElementBeforeAfter FNF:3 FNH:2 FNDA:0,getInlineElementBefore -FNDA:169,getInlineElementAfter -FNDA:267,getInlineElementBeforeAfter +FNDA:252,getInlineElementAfter +FNDA:354,getInlineElementBeforeAfter DA:1,1 DA:2,1 DA:3,1 @@ -24371,55 +24371,55 @@ DA:4,1 DA:17,1 DA:18,0 DA:31,1 -DA:32,169 +DA:32,252 DA:38,1 -DA:39,267 +DA:39,354 DA:40,0 -DA:43,267 -DA:44,534 -DA:45,267 -DA:46,267 -DA:48,267 -DA:49,100 -DA:50,167 -DA:54,17 -DA:57,267 -DA:58,25 -DA:61,267 -DA:63,267 -DA:64,17 -DA:69,267 +DA:43,354 +DA:44,708 +DA:45,354 +DA:46,354 +DA:48,354 +DA:49,104 +DA:50,250 +DA:54,21 +DA:57,354 +DA:58,38 +DA:61,354 +DA:63,354 +DA:64,21 +DA:69,354 LF:25 LH:23 BRDA:39,0,0,0 -BRDA:39,0,1,267 -BRDA:39,1,0,267 -BRDA:39,1,1,267 -BRDA:39,1,2,267 -BRDA:48,2,0,100 -BRDA:48,2,1,167 -BRDA:48,3,0,267 -BRDA:48,3,1,98 -BRDA:48,3,2,15 -BRDA:48,3,3,255 -BRDA:48,3,4,169 -BRDA:50,4,0,17 -BRDA:50,4,1,150 -BRDA:51,5,0,167 -BRDA:51,5,1,147 +BRDA:39,0,1,354 +BRDA:39,1,0,354 +BRDA:39,1,1,354 +BRDA:39,1,2,354 +BRDA:48,2,0,104 +BRDA:48,2,1,250 +BRDA:48,3,0,354 +BRDA:48,3,1,102 +BRDA:48,3,2,19 +BRDA:48,3,3,338 +BRDA:48,3,4,252 +BRDA:50,4,0,21 +BRDA:50,4,1,229 +BRDA:51,5,0,250 +BRDA:51,5,1,214 BRDA:51,5,2,83 -BRDA:51,5,3,147 -BRDA:51,5,4,64 -BRDA:57,6,0,25 -BRDA:57,6,1,242 -BRDA:57,7,0,267 -BRDA:57,7,1,167 -BRDA:63,8,0,17 -BRDA:63,8,1,250 -BRDA:63,9,0,267 -BRDA:63,9,1,144 -BRDA:63,9,2,127 -BRDA:65,10,0,17 +BRDA:51,5,3,214 +BRDA:51,5,4,131 +BRDA:57,6,0,38 +BRDA:57,6,1,316 +BRDA:57,7,0,354 +BRDA:57,7,1,250 +BRDA:63,8,0,21 +BRDA:63,8,1,333 +BRDA:63,9,0,354 +BRDA:63,9,1,220 +BRDA:63,9,2,199 +BRDA:65,10,0,21 BRDA:65,10,1,0 BRF:30 BRH:28 @@ -24429,9 +24429,9 @@ SF:packages/roosterjs-editor-dom/lib/jsUtils/arrayPush.ts FN:6,arrayPush FNF:1 FNH:1 -FNDA:4807,arrayPush +FNDA:5014,arrayPush DA:6,1 -DA:7,4807 +DA:7,5014 LF:2 LH:2 BRF:0 @@ -24442,9 +24442,9 @@ SF:packages/roosterjs-editor-dom/lib/jsUtils/getObjectKeys.ts FN:6,getObjectKeys FNF:1 FNH:1 -FNDA:42730,getObjectKeys +FNDA:44326,getObjectKeys DA:6,1 -DA:9,42730 +DA:9,44326 LF:2 LH:2 BRF:0 @@ -24455,9 +24455,9 @@ SF:packages/roosterjs-editor-dom/lib/jsUtils/toArray.ts FN:33,toArray FNF:1 FNH:1 -FNDA:14215,toArray +FNDA:15747,toArray DA:33,1 -DA:34,14215 +DA:34,15747 LF:2 LH:2 BRF:0 @@ -24501,11 +24501,11 @@ FN:562,createListStyleMetadata FNF:33 FNH:33 FNDA:1,(anonymous_0) -FNDA:257,VList +FNDA:273,VList FNDA:5,(anonymous_2) FNDA:6,(anonymous_3) -FNDA:89,(anonymous_4) -FNDA:148,(anonymous_5) +FNDA:104,(anonymous_4) +FNDA:174,(anonymous_5) FNDA:55,(anonymous_6) FNDA:120,(anonymous_7) FNDA:4,(anonymous_8) @@ -24517,18 +24517,18 @@ FNDA:22,(anonymous_13) FNDA:31,(anonymous_14) FNDA:31,(anonymous_15) FNDA:32,(anonymous_16) -FNDA:23,(anonymous_17) +FNDA:24,(anonymous_17) FNDA:22,(anonymous_18) FNDA:34,(anonymous_19) FNDA:13,(anonymous_20) -FNDA:159,(anonymous_21) +FNDA:174,(anonymous_21) FNDA:62,(anonymous_22) FNDA:136,(anonymous_23) -FNDA:314,(anonymous_24) -FNDA:466,(anonymous_25) -FNDA:317,moveChildNodesToLi -FNDA:476,(anonymous_27) -FNDA:391,moveLiToList +FNDA:333,(anonymous_24) +FNDA:495,(anonymous_25) +FNDA:336,moveChildNodesToLi +FNDA:505,(anonymous_27) +FNDA:417,moveLiToList FNDA:7,(anonymous_29) FNDA:64,getValidValue FNDA:192,(anonymous_31) @@ -24548,20 +24548,20 @@ DA:12,1 DA:13,1 DA:14,1 DA:74,1 -DA:75,257 -DA:81,257 -DA:82,257 +DA:75,273 +DA:81,273 +DA:82,273 DA:83,1 -DA:107,256 -DA:108,256 -DA:142,256 -DA:144,256 +DA:107,272 +DA:108,272 +DA:142,272 +DA:144,272 DA:151,1 DA:155,6 DA:162,1 -DA:163,89 -DA:165,89 -DA:171,148 +DA:163,104 +DA:165,104 +DA:171,174 DA:184,55 DA:185,55 DA:186,0 @@ -24624,12 +24624,12 @@ DA:363,32 DA:364,32 DA:369,32 DA:377,1 -DA:378,23 -DA:381,23 -DA:382,15 +DA:378,24 +DA:381,24 +DA:382,16 DA:383,8 DA:384,5 -DA:387,23 +DA:387,24 DA:402,22 DA:403,22 DA:404,34 @@ -24646,7 +24646,7 @@ DA:443,13 DA:444,13 DA:448,0 DA:455,1 -DA:456,159 +DA:456,174 DA:459,1 DA:464,62 DA:465,8 @@ -24663,26 +24663,26 @@ DA:485,54 DA:487,54 DA:488,54 DA:491,54 -DA:494,314 -DA:496,570 -DA:503,314 -DA:504,314 -DA:506,314 -DA:507,466 -DA:509,466 -DA:510,58 -DA:511,408 -DA:512,395 +DA:494,333 +DA:496,605 +DA:503,333 +DA:504,333 +DA:506,333 +DA:507,495 +DA:509,495 +DA:510,61 +DA:511,434 +DA:512,421 DA:516,1 -DA:525,317 -DA:527,317 -DA:528,476 -DA:529,387 -DA:530,89 -DA:531,58 +DA:525,336 +DA:527,336 +DA:528,505 +DA:529,413 +DA:530,92 +DA:531,61 DA:532,31 DA:533,10 -DA:543,391 +DA:543,417 DA:544,7 DA:545,7 DA:547,7 @@ -24696,12 +24696,12 @@ DA:567,32 LF:160 LH:155 BRDA:82,0,0,1 -BRDA:82,0,1,256 +BRDA:82,0,1,272 BRDA:166,1,0,0 -BRDA:166,1,1,89 -BRDA:171,2,0,148 -BRDA:171,2,1,148 -BRDA:171,2,2,112 +BRDA:166,1,1,104 +BRDA:171,2,0,174 +BRDA:171,2,1,174 +BRDA:171,2,2,132 BRDA:185,3,0,0 BRDA:185,3,1,55 BRDA:192,4,0,55 @@ -24747,11 +24747,11 @@ BRDA:346,23,0,31 BRDA:346,23,1,23 BRDA:349,24,0,23 BRDA:349,24,1,8 -BRDA:381,25,0,15 +BRDA:381,25,0,16 BRDA:381,25,1,8 BRDA:383,26,0,5 BRDA:383,26,1,3 -BRDA:389,27,0,19 +BRDA:389,27,0,20 BRDA:389,27,1,4 BRDA:403,28,0,21 BRDA:403,28,1,1 @@ -24771,7 +24771,7 @@ BRDA:439,35,0,13 BRDA:439,35,1,13 BRDA:443,36,0,13 BRDA:443,36,1,0 -BRDA:456,37,0,149 +BRDA:456,37,0,164 BRDA:456,37,1,10 BRDA:464,38,0,8 BRDA:464,38,1,54 @@ -24791,19 +24791,19 @@ BRDA:485,45,0,54 BRDA:485,45,1,0 BRDA:487,46,0,54 BRDA:487,46,1,0 -BRDA:496,47,0,256 -BRDA:496,47,1,58 -BRDA:509,48,0,58 -BRDA:509,48,1,408 -BRDA:511,49,0,395 +BRDA:496,47,0,272 +BRDA:496,47,1,61 +BRDA:509,48,0,61 +BRDA:509,48,1,434 +BRDA:511,49,0,421 BRDA:511,49,1,13 -BRDA:511,50,0,408 +BRDA:511,50,0,434 BRDA:511,50,1,13 BRDA:511,51,0,13 BRDA:511,51,1,0 -BRDA:528,52,0,387 -BRDA:528,52,1,89 -BRDA:530,53,0,58 +BRDA:528,52,0,413 +BRDA:528,52,1,92 +BRDA:530,53,0,61 BRDA:530,53,1,31 BRDA:532,54,0,10 BRDA:532,54,1,21 @@ -24846,17 +24846,17 @@ FN:177,createListChainName FNF:15 FNH:15 FNDA:1,(anonymous_0) -FNDA:44,VListChain -FNDA:119,(anonymous_2) -FNDA:86,(anonymous_3) -FNDA:70,(anonymous_4) -FNDA:19,(anonymous_5) +FNDA:53,VListChain +FNDA:146,(anonymous_2) +FNDA:113,(anonymous_3) +FNDA:88,(anonymous_4) +FNDA:29,(anonymous_5) FNDA:18,(anonymous_6) -FNDA:4,(anonymous_7) +FNDA:5,(anonymous_7) FNDA:18,(anonymous_8) -FNDA:19,(anonymous_9) -FNDA:58,(anonymous_10) -FNDA:61,(anonymous_11) +FNDA:29,(anonymous_9) +FNDA:73,(anonymous_10) +FNDA:77,(anonymous_11) FNDA:18,(anonymous_12) FNDA:31,(anonymous_13) FNDA:39,createListChainName @@ -24871,40 +24871,40 @@ DA:10,1 DA:11,1 DA:12,1 DA:19,1 -DA:20,44 -DA:21,44 +DA:20,53 +DA:21,53 DA:29,1 -DA:34,119 -DA:35,119 -DA:36,119 -DA:37,86 -DA:40,86 -DA:41,70 -DA:43,70 -DA:45,58 -DA:47,58 -DA:48,58 -DA:50,58 -DA:53,46 -DA:54,8 -DA:57,46 -DA:58,12 +DA:34,146 +DA:35,146 +DA:36,146 +DA:37,113 +DA:40,113 +DA:41,88 +DA:43,88 +DA:45,73 +DA:47,73 +DA:48,73 +DA:50,73 +DA:53,60 +DA:54,13 +DA:57,60 +DA:58,13 DA:59,6 -DA:62,58 -DA:63,58 -DA:67,86 -DA:70,119 +DA:62,73 +DA:63,73 +DA:67,113 +DA:70,146 DA:77,1 DA:78,18 DA:86,1 -DA:87,4 -DA:88,3 -DA:90,3 -DA:91,3 -DA:92,3 -DA:94,3 -DA:96,3 -DA:97,3 +DA:87,5 +DA:88,4 +DA:90,4 +DA:91,4 +DA:92,4 +DA:94,4 +DA:96,4 +DA:97,4 DA:99,1 DA:109,1 DA:110,18 @@ -24920,17 +24920,17 @@ DA:126,31 DA:128,31 DA:129,31 DA:131,31 -DA:139,44 +DA:139,53 DA:145,1 -DA:146,19 +DA:146,29 DA:154,1 -DA:155,58 -DA:156,58 -DA:158,58 -DA:159,12 -DA:161,46 +DA:155,73 +DA:156,73 +DA:158,73 +DA:159,13 +DA:161,60 DA:165,1 -DA:166,61 +DA:166,77 DA:169,18 DA:170,18 DA:173,31 @@ -24938,30 +24938,30 @@ DA:175,1 DA:178,39 LF:76 LH:76 -BRDA:34,0,0,86 -BRDA:34,0,1,33 -BRDA:34,1,0,32 +BRDA:34,0,0,106 +BRDA:34,0,1,40 +BRDA:34,1,0,39 BRDA:34,1,1,1 -BRDA:43,2,0,58 -BRDA:43,2,1,12 -BRDA:45,3,0,58 -BRDA:45,3,1,44 -BRDA:46,4,0,44 +BRDA:43,2,0,73 +BRDA:43,2,1,15 +BRDA:45,3,0,73 +BRDA:45,3,1,53 +BRDA:46,4,0,53 BRDA:46,4,1,39 -BRDA:48,5,0,58 -BRDA:48,5,1,28 -BRDA:50,6,0,46 -BRDA:50,6,1,12 -BRDA:53,7,0,8 -BRDA:53,7,1,38 +BRDA:48,5,0,73 +BRDA:48,5,1,30 +BRDA:50,6,0,60 +BRDA:50,6,1,13 +BRDA:53,7,0,13 +BRDA:53,7,1,47 BRDA:58,8,0,6 -BRDA:58,8,1,6 +BRDA:58,8,1,7 BRDA:78,9,0,18 BRDA:78,9,1,12 -BRDA:87,10,0,3 +BRDA:87,10,0,4 BRDA:87,10,1,1 -BRDA:87,11,0,4 -BRDA:87,11,1,3 +BRDA:87,11,0,5 +BRDA:87,11,1,4 BRDA:116,12,0,31 BRDA:116,12,1,0 BRDA:118,13,0,8 @@ -24970,10 +24970,10 @@ BRDA:119,14,0,2 BRDA:119,14,1,6 BRDA:126,15,0,31 BRDA:126,15,1,0 -BRDA:156,16,0,58 +BRDA:156,16,0,73 BRDA:156,16,1,0 -BRDA:158,17,0,12 -BRDA:158,17,1,46 +BRDA:158,17,0,13 +BRDA:158,17,1,60 BRF:36 BRH:33 end_of_record @@ -25009,13 +25009,13 @@ FN:513,getChildrenAndUnwrap FNF:27 FNH:19 FNDA:1,(anonymous_0) -FNDA:498,VListItem -FNDA:187,(anonymous_2) -FNDA:257,(anonymous_3) -FNDA:331,(anonymous_4) +FNDA:526,VListItem +FNDA:213,(anonymous_2) +FNDA:283,(anonymous_3) +FNDA:332,(anonymous_4) FNDA:120,(anonymous_5) FNDA:281,(anonymous_6) -FNDA:198,(anonymous_7) +FNDA:218,(anonymous_7) FNDA:0,(anonymous_8) FNDA:0,(anonymous_9) FNDA:0,(anonymous_10) @@ -25029,10 +25029,10 @@ FNDA:35,(anonymous_17) FNDA:0,(anonymous_18) FNDA:4,(anonymous_19) FNDA:131,(anonymous_20) -FNDA:140,(anonymous_21) +FNDA:141,(anonymous_21) FNDA:40,(anonymous_23) -FNDA:111,(anonymous_24) -FNDA:111,createListElement +FNDA:112,(anonymous_24) +FNDA:112,createListElement FNDA:10,wrapIfNotBlockNode FNDA:10,getChildrenAndUnwrap DA:1,1 @@ -25059,26 +25059,26 @@ DA:35,1 DA:36,1 DA:42,1 DA:79,1 -DA:83,498 -DA:93,1578 -DA:100,498 +DA:83,526 +DA:93,1667 +DA:100,526 DA:101,1 -DA:104,497 -DA:107,497 -DA:109,497 -DA:112,497 +DA:104,525 +DA:107,525 +DA:109,525 +DA:112,525 DA:118,1 -DA:119,187 +DA:119,213 DA:125,1 -DA:126,257 +DA:126,283 DA:132,1 -DA:133,331 +DA:133,332 DA:139,1 DA:140,120 DA:147,1 DA:148,281 DA:156,1 -DA:157,198 +DA:157,218 DA:163,1 DA:164,0 DA:170,1 @@ -25122,35 +25122,35 @@ DA:272,6 DA:273,5 DA:278,5 DA:280,0 -DA:292,140 -DA:295,241 -DA:297,140 -DA:299,140 +DA:292,141 +DA:295,243 +DA:297,141 +DA:299,141 DA:301,0 DA:302,0 DA:309,0 DA:310,0 DA:315,0 DA:318,0 -DA:325,140 +DA:325,141 DA:326,98 DA:327,32 DA:328,32 -DA:338,140 -DA:339,111 -DA:340,111 -DA:347,111 -DA:348,111 -DA:352,111 +DA:338,141 +DA:339,112 +DA:340,112 +DA:347,112 +DA:348,112 +DA:352,112 DA:353,19 DA:354,19 DA:358,5 -DA:363,140 -DA:364,140 -DA:367,140 -DA:368,130 -DA:369,130 -DA:373,140 +DA:363,141 +DA:364,141 +DA:367,141 +DA:368,131 +DA:369,131 +DA:373,141 DA:375,10 DA:376,10 DA:384,10 @@ -25168,32 +25168,32 @@ DA:404,40 DA:405,0 DA:412,10 DA:432,1 -DA:433,111 -DA:434,111 +DA:433,112 +DA:434,112 DA:435,50 DA:436,50 DA:437,72 DA:438,72 DA:440,50 -DA:442,61 +DA:442,62 DA:444,1 -DA:452,111 -DA:461,111 +DA:452,112 +DA:461,112 DA:462,67 DA:464,9 DA:465,9 DA:468,58 DA:469,58 -DA:473,44 -DA:477,111 +DA:473,45 +DA:477,112 DA:478,7 DA:479,7 DA:480,0 -DA:484,111 +DA:484,112 DA:485,28 -DA:491,111 +DA:491,112 DA:492,3 -DA:498,111 +DA:498,112 DA:502,10 DA:507,7 DA:510,10 @@ -25203,11 +25203,11 @@ DA:516,10 LF:165 LH:143 BRDA:100,0,0,1 -BRDA:100,0,1,497 -BRDA:105,1,0,480 +BRDA:100,0,1,525 +BRDA:105,1,0,508 BRDA:105,1,1,17 -BRDA:109,2,0,497 -BRDA:109,2,1,497 +BRDA:109,2,0,525 +BRDA:109,2,1,525 BRDA:171,3,0,0 BRDA:171,3,1,0 BRDA:171,4,0,0 @@ -25246,10 +25246,10 @@ BRDA:273,19,1,0 BRDA:274,20,0,5 BRDA:274,20,1,5 BRDA:274,20,2,5 -BRDA:295,21,0,101 +BRDA:295,21,0,102 BRDA:295,21,1,39 BRDA:299,22,0,0 -BRDA:299,22,1,140 +BRDA:299,22,1,141 BRDA:301,23,0,0 BRDA:301,23,1,0 BRDA:310,24,0,0 @@ -25259,7 +25259,7 @@ BRDA:311,25,1,0 BRDA:326,26,0,32 BRDA:326,26,1,66 BRDA:352,27,0,19 -BRDA:352,27,1,92 +BRDA:352,27,1,93 BRDA:353,28,0,0 BRDA:353,28,1,19 BRDA:353,29,0,19 @@ -25269,11 +25269,11 @@ BRDA:354,30,1,14 BRDA:355,31,0,19 BRDA:355,31,1,5 BRDA:364,32,0,2 -BRDA:364,32,1,138 -BRDA:367,33,0,130 +BRDA:364,32,1,139 +BRDA:367,33,0,131 BRDA:367,33,1,10 BRDA:373,34,0,10 -BRDA:373,34,1,130 +BRDA:373,34,1,131 BRDA:377,35,0,10 BRDA:377,35,1,0 BRDA:384,36,0,10 @@ -25287,8 +25287,8 @@ BRDA:394,39,1,0 BRDA:404,40,0,0 BRDA:404,40,1,40 BRDA:434,41,0,50 -BRDA:434,41,1,61 -BRDA:434,42,0,111 +BRDA:434,41,1,62 +BRDA:434,42,0,112 BRDA:434,42,1,98 BRDA:436,43,0,122 BRDA:436,43,1,72 @@ -25299,28 +25299,28 @@ BRDA:438,45,1,72 BRDA:438,46,0,72 BRDA:438,46,1,72 BRDA:461,47,0,67 -BRDA:461,47,1,44 -BRDA:461,48,0,111 -BRDA:461,48,1,80 +BRDA:461,47,1,45 +BRDA:461,48,0,112 +BRDA:461,48,1,81 BRDA:461,48,2,74 BRDA:462,49,0,9 BRDA:462,49,1,58 -BRDA:473,50,0,31 +BRDA:473,50,0,32 BRDA:473,50,1,13 BRDA:477,51,0,7 -BRDA:477,51,1,104 -BRDA:477,52,0,111 +BRDA:477,51,1,105 +BRDA:477,52,0,112 BRDA:477,52,1,98 BRDA:477,52,2,74 BRDA:479,53,0,0 BRDA:479,53,1,7 BRDA:484,54,0,28 -BRDA:484,54,1,83 -BRDA:484,55,0,111 -BRDA:484,55,1,92 +BRDA:484,54,1,84 +BRDA:484,55,0,112 +BRDA:484,55,1,93 BRDA:491,56,0,3 -BRDA:491,56,1,108 -BRDA:491,57,0,111 +BRDA:491,56,1,109 +BRDA:491,57,0,112 BRDA:491,57,1,19 BRDA:502,58,0,7 BRDA:502,58,1,3 @@ -25384,7 +25384,7 @@ FN:115,tryIncludeSiblingNode FN:133,createVListFromItemNode FNF:6 FNH:6 -FNDA:41,createVListFromRegion +FNDA:52,createVListFromRegion FNDA:43,(anonymous_1) FNDA:52,(anonymous_2) FNDA:22,(anonymous_3) @@ -25404,12 +25404,12 @@ DA:11,1 DA:12,1 DA:20,1 DA:30,1 -DA:35,41 +DA:35,52 DA:36,1 -DA:39,40 -DA:41,40 -DA:42,10 -DA:43,10 +DA:39,51 +DA:41,51 +DA:42,21 +DA:43,21 DA:44,8 DA:47,30 DA:52,30 @@ -25430,8 +25430,8 @@ DA:83,30 DA:84,16 DA:85,16 DA:88,52 -DA:91,40 -DA:93,40 +DA:91,51 +DA:93,51 DA:94,38 DA:95,38 DA:101,38 @@ -25439,7 +25439,7 @@ DA:102,38 DA:103,22 DA:104,13 DA:106,9 -DA:112,40 +DA:112,51 DA:116,32 DA:117,32 DA:118,32 @@ -25458,11 +25458,11 @@ DA:147,5 LF:65 LH:65 BRDA:35,0,0,1 -BRDA:35,0,1,40 -BRDA:41,1,0,10 +BRDA:35,0,1,51 +BRDA:41,1,0,21 BRDA:41,1,1,30 BRDA:43,2,0,8 -BRDA:43,2,1,2 +BRDA:43,2,1,13 BRDA:55,3,0,30 BRDA:55,3,1,13 BRDA:56,4,0,29 @@ -25479,7 +25479,7 @@ BRDA:72,8,1,1 BRDA:83,9,0,16 BRDA:83,9,1,14 BRDA:93,10,0,38 -BRDA:93,10,1,2 +BRDA:93,10,1,13 BRDA:94,11,0,38 BRDA:94,11,1,0 BRDA:96,12,0,33 @@ -25513,21 +25513,21 @@ FN:25,getListTypeFromNode FN:41,isListElement FNF:2 FNH:2 -FNDA:1588,getListTypeFromNode -FNDA:1025,isListElement +FNDA:1665,getListTypeFromNode +FNDA:1083,isListElement DA:1,1 DA:25,1 -DA:26,1588 -DA:28,922 +DA:26,1665 +DA:28,973 DA:30,204 -DA:32,462 +DA:32,488 DA:41,1 -DA:42,1025 +DA:42,1083 LF:8 LH:8 -BRDA:27,0,0,922 +BRDA:27,0,0,973 BRDA:27,0,1,204 -BRDA:27,0,2,462 +BRDA:27,0,2,488 BRF:3 BRH:3 end_of_record @@ -25536,21 +25536,21 @@ SF:packages/roosterjs-editor-dom/lib/list/getRootListNode.ts FN:21,getRootListNode FNF:1 FNH:1 -FNDA:168,getRootListNode +FNDA:197,getRootListNode DA:1,1 DA:21,1 -DA:27,168 -DA:34,168 -DA:35,124 -DA:36,124 -DA:43,23 -DA:47,168 +DA:27,197 +DA:34,197 +DA:35,142 +DA:36,142 +DA:43,26 +DA:47,197 LF:8 LH:8 -BRDA:27,0,0,168 -BRDA:27,0,1,166 -BRDA:34,1,0,124 -BRDA:34,1,1,44 +BRDA:27,0,0,197 +BRDA:27,0,1,195 +BRDA:34,1,0,142 +BRDA:34,1,1,55 BRF:4 BRH:4 end_of_record @@ -25581,102 +25581,102 @@ FN:39,getInlineChildElementsStyle FN:61,(anonymous_6) FNF:5 FNH:5 -FNDA:274,setListItemStyle -FNDA:951,(anonymous_1) -FNDA:178,(anonymous_2) -FNDA:274,getInlineChildElementsStyle -FNDA:188,(anonymous_6) +FNDA:279,setListItemStyle +FNDA:961,(anonymous_1) +FNDA:191,(anonymous_2) +FNDA:279,getInlineChildElementsStyle +FNDA:201,(anonymous_6) DA:1,1 DA:2,1 DA:3,1 DA:13,1 -DA:16,274 -DA:18,274 -DA:20,274 -DA:21,951 -DA:22,178 -DA:25,951 -DA:30,26 -DA:31,24 +DA:16,282 +DA:18,279 +DA:20,279 +DA:21,961 +DA:22,191 +DA:25,961 +DA:30,29 +DA:31,27 DA:33,2 -DA:40,274 -DA:41,274 -DA:42,274 -DA:44,274 -DA:45,260 -DA:46,260 -DA:47,260 -DA:49,260 -DA:53,260 -DA:59,60 -DA:61,60 -DA:62,188 -DA:66,188 -DA:67,56 -DA:70,188 -DA:71,75 -DA:75,60 -DA:76,29 -DA:78,31 -DA:82,260 -DA:83,56 -DA:86,260 -DA:89,274 +DA:40,279 +DA:41,279 +DA:42,279 +DA:44,279 +DA:45,271 +DA:46,271 +DA:47,271 +DA:49,271 +DA:53,271 +DA:59,68 +DA:61,68 +DA:62,201 +DA:66,201 +DA:67,64 +DA:70,201 +DA:71,83 +DA:75,68 +DA:76,31 +DA:78,37 +DA:82,271 +DA:83,64 +DA:86,271 +DA:89,279 LF:36 LH:36 -BRDA:16,0,0,0 -BRDA:16,0,1,274 -BRDA:22,1,0,75 -BRDA:22,1,1,103 -BRDA:25,2,0,26 -BRDA:25,2,1,925 -BRDA:26,3,0,951 -BRDA:26,3,1,951 -BRDA:26,3,2,863 -BRDA:26,3,3,109 -BRDA:30,4,0,24 +BRDA:16,0,0,3 +BRDA:16,0,1,276 +BRDA:22,1,0,83 +BRDA:22,1,1,108 +BRDA:25,2,0,29 +BRDA:25,2,1,932 +BRDA:26,3,0,961 +BRDA:26,3,1,961 +BRDA:26,3,2,866 +BRDA:26,3,3,116 +BRDA:30,4,0,27 BRDA:30,4,1,2 -BRDA:46,5,0,260 +BRDA:46,5,0,271 BRDA:46,5,1,0 BRDA:46,6,0,0 -BRDA:46,6,1,260 -BRDA:46,7,0,260 -BRDA:46,7,1,260 -BRDA:49,8,0,260 +BRDA:46,6,1,271 +BRDA:46,7,0,271 +BRDA:46,7,1,271 +BRDA:49,8,0,271 BRDA:49,8,1,0 -BRDA:63,9,0,138 -BRDA:63,9,1,50 -BRDA:66,10,0,56 -BRDA:66,10,1,132 -BRDA:70,11,0,75 -BRDA:70,11,1,113 -BRDA:70,12,0,188 -BRDA:70,12,1,75 -BRDA:75,13,0,29 -BRDA:75,13,1,31 +BRDA:63,9,0,147 +BRDA:63,9,1,54 +BRDA:66,10,0,64 +BRDA:66,10,1,137 +BRDA:70,11,0,83 +BRDA:70,11,1,118 +BRDA:70,12,0,201 +BRDA:70,12,1,83 +BRDA:75,13,0,31 +BRDA:75,13,1,37 BRDA:75,14,0,0 -BRDA:75,14,1,60 -BRDA:75,15,0,60 -BRDA:75,15,1,60 +BRDA:75,14,1,68 +BRDA:75,15,0,68 +BRDA:75,15,1,68 BRDA:75,16,0,0 -BRDA:75,16,1,60 -BRDA:75,17,0,60 -BRDA:75,17,1,60 -BRDA:54,18,0,320 -BRDA:54,18,1,289 -BRDA:54,18,2,60 -BRDA:54,18,3,60 -BRDA:54,18,4,20 -BRDA:57,19,0,20 -BRDA:57,19,1,0 +BRDA:75,16,1,68 +BRDA:75,17,0,68 +BRDA:75,17,1,68 +BRDA:54,18,0,339 +BRDA:54,18,1,302 +BRDA:54,18,2,71 +BRDA:54,18,3,71 +BRDA:54,18,4,26 +BRDA:57,19,0,26 +BRDA:57,19,1,3 BRDA:57,20,0,0 -BRDA:57,20,1,20 -BRDA:57,21,0,20 -BRDA:57,21,1,20 -BRDA:82,22,0,56 -BRDA:82,22,1,204 +BRDA:57,20,1,26 +BRDA:57,21,0,26 +BRDA:57,21,1,26 +BRDA:82,22,0,64 +BRDA:82,22,1,207 BRF:51 -BRH:43 +BRH:45 end_of_record TN: SF:packages/roosterjs-editor-dom/lib/list/setNumberingListMarkers.ts @@ -25751,45 +25751,45 @@ FN:50,setMetadata FN:63,removeMetadata FNF:3 FNH:3 -FNDA:819,getMetadata -FNDA:84,setMetadata -FNDA:59,removeMetadata +FNDA:925,getMetadata +FNDA:74,setMetadata +FNDA:49,removeMetadata DA:1,1 DA:4,1 DA:15,1 -DA:20,819 -DA:23,819 -DA:24,819 -DA:27,819 -DA:28,818 -DA:29,94 -DA:30,724 -DA:31,722 +DA:20,925 +DA:23,925 +DA:24,925 +DA:27,925 +DA:28,924 +DA:29,74 +DA:30,850 +DA:31,848 DA:35,3 DA:36,1 DA:38,2 DA:50,1 -DA:51,84 -DA:52,83 -DA:53,83 +DA:51,74 +DA:52,73 +DA:53,73 DA:55,1 DA:63,1 -DA:64,59 +DA:64,49 LF:21 LH:21 -BRDA:24,0,0,81 -BRDA:24,0,1,738 -BRDA:27,1,0,818 +BRDA:24,0,0,71 +BRDA:24,0,1,854 +BRDA:27,1,0,924 BRDA:27,1,1,1 -BRDA:28,2,0,94 -BRDA:28,2,1,724 -BRDA:30,3,0,722 +BRDA:28,2,0,74 +BRDA:28,2,1,850 +BRDA:30,3,0,848 BRDA:30,3,1,2 BRDA:35,4,0,1 BRDA:35,4,1,2 -BRDA:51,5,0,83 +BRDA:51,5,0,73 BRDA:51,5,1,1 -BRDA:51,6,0,84 +BRDA:51,6,0,74 BRDA:51,6,1,55 BRF:14 BRH:14 @@ -25802,75 +25802,75 @@ FN:52,(anonymous_2) FN:66,areSameNumbers FNF:4 FNH:4 -FNDA:3989,validate -FNDA:999,(anonymous_1) -FNDA:1444,(anonymous_2) +FNDA:4087,validate +FNDA:989,(anonymous_1) +FNDA:1434,(anonymous_2) FNDA:54,areSameNumbers DA:1,1 DA:10,1 -DA:11,3989 -DA:12,3989 -DA:13,1416 -DA:14,2573 +DA:11,4087 +DA:12,4087 +DA:13,1533 +DA:14,2554 DA:18,47 -DA:20,2526 +DA:20,2507 DA:22,262 DA:25,262 -DA:28,1327 -DA:33,1327 +DA:28,1314 +DA:33,1314 DA:36,227 DA:39,227 -DA:42,322 -DA:46,999 -DA:47,322 -DA:50,380 -DA:53,1444 -DA:55,380 +DA:42,320 +DA:46,989 +DA:47,320 +DA:50,376 +DA:53,1434 +DA:55,376 DA:58,8 DA:59,8 -DA:63,3942 +DA:63,4040 DA:67,54 LF:24 LH:24 -BRDA:12,0,0,1416 -BRDA:12,0,1,2573 -BRDA:12,1,0,3989 -BRDA:12,1,1,1015 -BRDA:12,1,2,3668 -BRDA:12,1,3,1455 +BRDA:12,0,0,1533 +BRDA:12,0,1,2554 +BRDA:12,1,0,4087 +BRDA:12,1,1,1000 +BRDA:12,1,2,3771 +BRDA:12,1,3,1574 BRDA:14,2,0,47 -BRDA:14,2,1,2526 -BRDA:15,3,0,2573 -BRDA:15,3,1,2267 -BRDA:15,3,2,2539 -BRDA:15,3,3,2180 +BRDA:14,2,1,2507 +BRDA:15,3,0,2554 +BRDA:15,3,1,2254 +BRDA:15,3,2,2520 +BRDA:15,3,3,2164 BRDA:21,4,0,262 -BRDA:21,4,1,1327 +BRDA:21,4,1,1314 BRDA:21,4,2,227 -BRDA:21,4,3,322 -BRDA:21,4,4,380 +BRDA:21,4,3,320 +BRDA:21,4,4,376 BRDA:21,4,5,8 BRDA:23,5,0,262 BRDA:23,5,1,246 BRDA:23,5,2,4 -BRDA:29,6,0,1327 -BRDA:29,6,1,1309 +BRDA:29,6,0,1314 +BRDA:29,6,1,1296 BRDA:29,6,2,54 -BRDA:29,6,3,1279 -BRDA:29,6,4,158 -BRDA:29,6,5,1279 -BRDA:29,6,6,158 +BRDA:29,6,3,1266 +BRDA:29,6,4,155 +BRDA:29,6,5,1266 +BRDA:29,6,6,155 BRDA:37,7,0,227 BRDA:37,7,1,213 BRDA:37,7,2,4 -BRDA:43,8,0,322 -BRDA:43,8,1,310 +BRDA:43,8,0,320 +BRDA:43,8,1,308 BRDA:43,8,2,4 -BRDA:43,8,3,308 +BRDA:43,8,3,306 BRDA:43,8,4,4 -BRDA:43,8,5,306 -BRDA:51,9,0,380 -BRDA:51,9,1,372 +BRDA:43,8,5,304 +BRDA:51,9,0,376 +BRDA:51,9,1,368 BRF:39 BRH:39 end_of_record @@ -25891,11 +25891,11 @@ SF:packages/roosterjs-editor-dom/lib/pasteSourceValidations/documentContainWacEl FN:12,(anonymous_0) FNF:1 FNH:1 -FNDA:12,(anonymous_0) +FNDA:11,(anonymous_0) DA:4,1 DA:12,1 -DA:13,12 -DA:14,12 +DA:13,11 +DA:14,11 DA:16,1 LF:5 LH:5 @@ -25908,8 +25908,8 @@ FN:41,getPasteSource FN:55,(anonymous_1) FNF:2 FNH:2 -FNDA:19,getPasteSource -FNDA:133,(anonymous_1) +FNDA:16,getPasteSource +FNDA:112,(anonymous_1) DA:1,1 DA:2,1 DA:3,1 @@ -25919,23 +25919,23 @@ DA:6,1 DA:7,1 DA:25,1 DA:41,1 -DA:45,57 -DA:47,19 -DA:48,19 -DA:55,19 -DA:56,133 -DA:57,17 -DA:61,19 +DA:45,48 +DA:47,16 +DA:48,16 +DA:55,16 +DA:56,112 +DA:57,14 +DA:61,16 LF:16 LH:16 -BRDA:56,0,0,17 -BRDA:56,0,1,116 -BRDA:56,1,0,133 -BRDA:56,1,1,86 -BRDA:61,2,0,17 +BRDA:56,0,0,14 +BRDA:56,0,1,98 +BRDA:56,1,0,112 +BRDA:56,1,1,75 +BRDA:61,2,0,14 BRDA:61,2,1,2 -BRDA:61,3,0,19 -BRDA:61,3,1,17 +BRDA:61,3,0,16 +BRDA:61,3,1,14 BRF:8 BRH:8 end_of_record @@ -25944,12 +25944,12 @@ SF:packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelDesktopDocume FN:12,(anonymous_0) FNF:1 FNH:1 -FNDA:23,(anonymous_0) +FNDA:20,(anonymous_0) DA:1,1 DA:4,1 DA:12,1 -DA:13,23 -DA:15,23 +DA:13,20 +DA:15,20 DA:17,1 LF:6 LH:6 @@ -25961,16 +25961,16 @@ SF:packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelOnlineDocumen FN:13,(anonymous_0) FNF:1 FNH:1 -FNDA:17,(anonymous_0) +FNDA:16,(anonymous_0) DA:1,1 DA:5,1 DA:13,1 -DA:14,17 -DA:16,17 +DA:14,16 +DA:16,16 DA:21,1 LF:6 LH:6 -BRDA:17,0,0,17 +BRDA:17,0,0,16 BRDA:17,0,1,5 BRF:2 BRH:2 @@ -25980,11 +25980,11 @@ SF:packages/roosterjs-editor-dom/lib/pasteSourceValidations/isGoogleSheetDocumen FN:10,(anonymous_0) FNF:1 FNH:1 -FNDA:10,(anonymous_0) +FNDA:9,(anonymous_0) DA:1,1 DA:10,1 -DA:11,10 -DA:12,10 +DA:11,9 +DA:12,9 DA:15,1 LF:5 LH:5 @@ -25996,11 +25996,11 @@ SF:packages/roosterjs-editor-dom/lib/pasteSourceValidations/isPowerPointDesktopD FN:12,(anonymous_0) FNF:1 FNH:1 -FNDA:13,(anonymous_0) +FNDA:12,(anonymous_0) DA:1,1 DA:4,1 DA:12,1 -DA:13,13 +DA:13,12 DA:15,1 LF:5 LH:5 @@ -26012,19 +26012,19 @@ SF:packages/roosterjs-editor-dom/lib/pasteSourceValidations/isWordDesktopDocumen FN:14,(anonymous_0) FNF:1 FNH:1 -FNDA:23,(anonymous_0) +FNDA:20,(anonymous_0) DA:1,1 DA:4,1 DA:5,1 DA:6,1 DA:14,1 -DA:15,23 -DA:16,23 +DA:15,20 +DA:16,20 DA:22,1 LF:8 LH:8 -BRDA:17,0,0,23 -BRDA:17,0,1,18 +BRDA:17,0,0,20 +BRDA:17,0,1,16 BRF:2 BRH:2 end_of_record @@ -26033,14 +26033,14 @@ SF:packages/roosterjs-editor-dom/lib/pasteSourceValidations/shouldConvertToSingl FN:10,(anonymous_0) FNF:1 FNH:1 -FNDA:10,(anonymous_0) +FNDA:9,(anonymous_0) DA:10,1 -DA:11,20 -DA:12,10 +DA:11,18 +DA:12,9 DA:19,1 LF:4 LH:4 -BRDA:13,0,0,10 +BRDA:13,0,0,9 BRDA:13,0,1,3 BRDA:13,0,2,2 BRDA:14,1,0,0 @@ -26056,35 +26056,35 @@ FN:13,collapseNodesInRegion FN:28,(anonymous_1) FNF:2 FNH:2 -FNDA:72,collapseNodesInRegion -FNDA:141,(anonymous_1) +FNDA:92,collapseNodesInRegion +FNDA:179,(anonymous_1) DA:1,1 DA:2,1 DA:3,1 DA:13,1 -DA:17,72 -DA:18,4 -DA:21,68 -DA:28,141 -DA:30,68 -DA:31,68 -DA:33,68 -DA:34,66 +DA:17,92 +DA:18,5 +DA:21,87 +DA:28,179 +DA:30,87 +DA:31,87 +DA:33,87 +DA:34,85 DA:36,2 LF:13 LH:13 -BRDA:17,0,0,4 -BRDA:17,0,1,68 -BRDA:17,1,0,72 -BRDA:17,1,1,70 +BRDA:17,0,0,5 +BRDA:17,0,1,87 +BRDA:17,1,0,92 +BRDA:17,1,1,90 BRDA:22,2,0,33 -BRDA:22,2,1,35 -BRDA:28,3,0,68 -BRDA:28,3,1,68 -BRDA:33,4,0,66 +BRDA:22,2,1,54 +BRDA:28,3,0,87 +BRDA:28,3,1,87 +BRDA:33,4,0,85 BRDA:33,4,1,2 -BRDA:33,5,0,68 -BRDA:33,5,1,66 +BRDA:33,5,0,87 +BRDA:33,5,1,85 BRF:12 BRH:12 end_of_record @@ -26102,16 +26102,16 @@ FN:202,(anonymous_8) FN:225,areNodesValid FNF:10 FNH:10 -FNDA:142,getRegionsFromRange -FNDA:215,(anonymous_1) -FNDA:175,getRegionCreator -FNDA:309,(anonymous_3) -FNDA:139,buildBoundaryTree +FNDA:162,getRegionsFromRange +FNDA:235,(anonymous_1) +FNDA:195,getRegionCreator +FNDA:329,(anonymous_3) +FNDA:159,buildBoundaryTree FNDA:145,(anonymous_5) FNDA:59,(anonymous_6) -FNDA:257,iterateNodes +FNDA:277,iterateNodes FNDA:118,(anonymous_8) -FNDA:309,areNodesValid +FNDA:329,areNodesValid DA:1,1 DA:2,1 DA:3,1 @@ -26119,24 +26119,24 @@ DA:4,1 DA:5,1 DA:26,1 DA:41,1 -DA:46,142 -DA:47,142 -DA:48,139 -DA:49,139 -DA:50,139 -DA:51,139 -DA:52,139 -DA:53,139 -DA:56,215 +DA:46,162 +DA:47,162 +DA:48,159 +DA:49,159 +DA:50,159 +DA:51,159 +DA:52,159 +DA:53,159 +DA:56,235 DA:62,1 -DA:66,175 -DA:67,175 -DA:68,175 -DA:69,309 -DA:119,139 -DA:120,139 -DA:121,139 -DA:131,139 +DA:66,195 +DA:67,195 +DA:68,195 +DA:69,329 +DA:119,159 +DA:120,159 +DA:121,159 +DA:131,159 DA:135,145 DA:136,145 DA:137,118 @@ -26150,15 +26150,15 @@ DA:146,68 DA:149,118 DA:150,118 DA:153,118 -DA:160,139 -DA:180,257 -DA:181,257 -DA:182,514 -DA:183,257 -DA:185,257 -DA:186,196 -DA:187,196 -DA:188,196 +DA:160,159 +DA:180,277 +DA:181,277 +DA:182,554 +DA:183,277 +DA:185,277 +DA:186,216 +DA:187,216 +DA:188,216 DA:192,61 DA:193,105 DA:194,105 @@ -26169,26 +26169,26 @@ DA:198,19 DA:202,105 DA:204,118 DA:205,118 -DA:210,257 -DA:231,309 +DA:210,277 +DA:231,329 DA:232,0 -DA:234,309 -DA:235,309 -DA:237,309 -DA:239,309 -DA:241,309 -DA:247,309 +DA:234,329 +DA:235,329 +DA:237,329 +DA:239,329 +DA:241,329 +DA:247,329 LF:66 LH:65 -BRDA:47,0,0,139 +BRDA:47,0,0,159 BRDA:47,0,1,3 -BRDA:47,1,0,142 -BRDA:47,1,1,140 -BRDA:50,2,0,139 -BRDA:50,2,1,115 -BRDA:51,3,0,139 -BRDA:51,3,1,118 -BRDA:70,4,0,251 +BRDA:47,1,0,162 +BRDA:47,1,1,160 +BRDA:50,2,0,159 +BRDA:50,2,1,135 +BRDA:51,3,0,159 +BRDA:51,3,1,138 +BRDA:70,4,0,271 BRDA:70,4,1,58 BRDA:136,5,0,118 BRDA:136,5,1,27 @@ -26198,11 +26198,11 @@ BRDA:141,7,0,118 BRDA:141,7,1,92 BRDA:144,8,0,68 BRDA:144,8,1,50 -BRDA:180,9,0,257 -BRDA:180,9,1,167 -BRDA:185,10,0,196 +BRDA:180,9,0,277 +BRDA:180,9,1,187 +BRDA:185,10,0,216 BRDA:185,10,1,61 -BRDA:187,11,0,196 +BRDA:187,11,0,216 BRDA:187,11,1,0 BRDA:192,12,0,166 BRDA:192,12,1,129 @@ -26220,29 +26220,29 @@ BRDA:202,18,0,37 BRDA:202,18,1,68 BRDA:202,19,0,105 BRDA:202,19,1,105 -BRDA:210,20,0,257 -BRDA:210,20,1,233 +BRDA:210,20,0,277 +BRDA:210,20,1,253 BRDA:231,21,0,0 -BRDA:231,21,1,309 -BRDA:234,22,0,309 +BRDA:231,21,1,329 +BRDA:234,22,0,329 BRDA:234,22,1,68 -BRDA:235,23,0,309 +BRDA:235,23,0,329 BRDA:235,23,1,64 -BRDA:237,24,0,309 +BRDA:237,24,0,329 BRDA:237,24,1,68 BRDA:237,24,2,68 -BRDA:239,25,0,309 +BRDA:239,25,0,329 BRDA:239,25,1,64 BRDA:239,25,2,64 -BRDA:241,26,0,309 +BRDA:241,26,0,329 BRDA:241,26,1,68 BRDA:241,26,2,27 BRDA:241,26,3,27 BRDA:241,26,4,26 BRDA:241,26,5,26 -BRDA:247,27,0,309 -BRDA:247,27,1,281 -BRDA:247,27,2,252 +BRDA:247,27,0,329 +BRDA:247,27,1,301 +BRDA:247,27,2,272 BRF:63 BRH:61 end_of_record @@ -26252,59 +26252,59 @@ FN:15,getSelectedBlockElementsInRegion FN:36,(anonymous_1) FNF:2 FNH:2 -FNDA:99,getSelectedBlockElementsInRegion -FNDA:159,(anonymous_1) +FNDA:119,getSelectedBlockElementsInRegion +FNDA:208,(anonymous_1) DA:1,1 DA:2,1 DA:3,1 DA:4,1 DA:5,1 DA:15,1 -DA:20,99 -DA:21,99 -DA:23,99 -DA:24,178 -DA:25,89 -DA:27,89 -DA:28,89 -DA:32,159 -DA:36,89 -DA:37,159 -DA:38,159 -DA:40,159 -DA:41,4 -DA:42,4 -DA:44,155 -DA:49,99 -DA:50,1 -DA:54,1 -DA:56,1 -DA:58,1 -DA:59,1 -DA:63,99 +DA:20,119 +DA:21,119 +DA:23,119 +DA:24,218 +DA:25,109 +DA:27,109 +DA:28,109 +DA:32,208 +DA:36,109 +DA:37,208 +DA:38,208 +DA:40,208 +DA:41,14 +DA:42,14 +DA:44,194 +DA:49,119 +DA:50,2 +DA:54,2 +DA:56,2 +DA:58,2 +DA:59,2 +DA:63,119 LF:28 LH:28 -BRDA:23,0,0,89 +BRDA:23,0,0,109 BRDA:23,0,1,10 BRDA:28,1,0,0 -BRDA:28,1,1,89 -BRDA:28,2,0,89 -BRDA:28,2,1,89 -BRDA:40,3,0,4 -BRDA:40,3,1,155 -BRDA:40,4,0,159 -BRDA:40,4,1,147 +BRDA:28,1,1,109 +BRDA:28,2,0,109 +BRDA:28,2,1,109 +BRDA:40,3,0,14 +BRDA:40,3,1,194 +BRDA:40,4,0,208 +BRDA:40,4,1,196 BRDA:41,5,0,0 -BRDA:41,5,1,4 -BRDA:41,6,0,4 -BRDA:41,6,1,4 -BRDA:49,7,0,1 -BRDA:49,7,1,98 -BRDA:49,8,0,99 -BRDA:49,8,1,11 -BRDA:49,8,2,10 -BRDA:49,8,3,3 -BRDA:58,9,0,1 +BRDA:41,5,1,14 +BRDA:41,6,0,14 +BRDA:41,6,1,14 +BRDA:49,7,0,2 +BRDA:49,7,1,117 +BRDA:49,8,0,119 +BRDA:49,8,1,13 +BRDA:49,8,2,12 +BRDA:49,8,3,5 +BRDA:58,9,0,2 BRDA:58,9,1,0 BRF:22 BRH:19 @@ -26315,56 +26315,56 @@ FN:12,getSelectionRangeInRegion FN:46,isRegion FNF:2 FNH:2 -FNDA:126,getSelectionRangeInRegion -FNDA:125,isRegion +FNDA:146,getSelectionRangeInRegion +FNDA:145,isRegion DA:1,1 DA:2,1 DA:3,1 DA:12,1 -DA:13,126 +DA:13,146 DA:14,1 -DA:17,500 -DA:18,125 -DA:21,125 -DA:24,125 -DA:26,125 +DA:17,580 +DA:18,145 +DA:21,145 +DA:24,145 +DA:26,145 DA:27,1 -DA:28,124 -DA:29,121 -DA:30,121 -DA:31,242 -DA:33,121 -DA:34,114 -DA:37,114 -DA:39,114 +DA:28,144 +DA:29,141 +DA:30,141 +DA:31,282 +DA:33,141 +DA:34,134 +DA:37,134 +DA:39,134 DA:43,10 -DA:47,125 -DA:48,125 +DA:47,145 +DA:48,145 LF:23 LH:23 BRDA:13,0,0,1 -BRDA:13,0,1,125 +BRDA:13,0,1,145 BRDA:19,1,0,18 -BRDA:19,1,1,107 +BRDA:19,1,1,127 BRDA:22,2,0,15 -BRDA:22,2,1,110 -BRDA:24,3,0,125 -BRDA:24,3,1,122 -BRDA:24,3,2,122 +BRDA:22,2,1,130 +BRDA:24,3,0,145 +BRDA:24,3,1,142 +BRDA:24,3,2,142 BRDA:26,4,0,1 -BRDA:26,4,1,124 -BRDA:28,5,0,121 +BRDA:26,4,1,144 +BRDA:28,5,0,141 BRDA:28,5,1,3 -BRDA:33,6,0,114 +BRDA:33,6,0,134 BRDA:33,6,1,7 -BRDA:33,7,0,121 -BRDA:33,7,1,118 -BRDA:35,8,0,62 -BRDA:35,8,1,52 +BRDA:33,7,0,141 +BRDA:33,7,1,138 +BRDA:35,8,0,71 +BRDA:35,8,1,63 BRDA:37,9,0,25 -BRDA:37,9,1,89 -BRDA:48,10,0,125 -BRDA:48,10,1,124 +BRDA:37,9,1,109 +BRDA:48,10,0,145 +BRDA:48,10,1,144 BRF:23 BRH:23 end_of_record @@ -26373,17 +26373,17 @@ SF:packages/roosterjs-editor-dom/lib/region/isNodeInRegion.ts FN:9,isNodeInRegion FNF:1 FNH:1 -FNDA:472,isNodeInRegion +FNDA:561,isNodeInRegion DA:1,1 DA:9,1 -DA:10,472 +DA:10,561 LF:3 LH:3 -BRDA:11,0,0,472 -BRDA:11,0,1,467 -BRDA:11,0,2,402 +BRDA:11,0,0,561 +BRDA:11,0,1,556 +BRDA:11,0,2,482 BRDA:11,0,3,49 -BRDA:11,0,4,399 +BRDA:11,0,4,479 BRDA:11,0,5,32 BRF:6 BRH:6 @@ -26473,136 +26473,136 @@ FN:174,getEndOffset FNF:10 FNH:10 FNDA:1,(anonymous_0) -FNDA:15802,Position -FNDA:11828,(anonymous_2) -FNDA:314,(anonymous_3) -FNDA:1284,(anonymous_4) +FNDA:18342,Position +FNDA:13484,(anonymous_2) +FNDA:608,(anonymous_3) +FNDA:2152,(anonymous_4) FNDA:123,(anonymous_5) -FNDA:1514,(anonymous_6) -FNDA:916,(anonymous_7) -FNDA:856,getIndexOfNode -FNDA:14946,getEndOffset +FNDA:1971,(anonymous_6) +FNDA:1320,(anonymous_7) +FNDA:1024,getIndexOfNode +FNDA:17318,getEndOffset DA:1,1 DA:2,1 DA:9,1 -DA:41,15811 -DA:42,15802 -DA:44,15802 +DA:41,18351 +DA:42,18342 +DA:44,18342 DA:45,7 DA:46,7 -DA:48,15795 -DA:51,15802 -DA:53,437 -DA:54,437 -DA:55,437 -DA:56,437 -DA:59,419 -DA:60,419 -DA:61,419 -DA:62,419 -DA:65,905 -DA:66,905 -DA:67,905 -DA:70,14041 -DA:71,14041 -DA:72,14041 -DA:73,14041 -DA:76,15802 +DA:48,18335 +DA:51,18342 +DA:53,511 +DA:54,511 +DA:55,511 +DA:56,511 +DA:59,513 +DA:60,513 +DA:61,513 +DA:62,513 +DA:65,1456 +DA:66,1456 +DA:67,1456 +DA:70,15862 +DA:71,15862 +DA:72,15862 +DA:73,15862 +DA:76,18342 DA:83,1 -DA:84,11828 -DA:85,10707 -DA:88,1121 -DA:89,1121 -DA:92,1121 -DA:93,1997 -DA:103,1997 -DA:104,1737 -DA:105,1737 -DA:108,260 -DA:111,1121 +DA:84,13484 +DA:85,11894 +DA:88,1590 +DA:89,1590 +DA:92,1590 +DA:93,2972 +DA:103,2972 +DA:104,2651 +DA:105,2651 +DA:108,321 +DA:111,1590 DA:118,1 -DA:119,314 +DA:119,608 DA:131,1 -DA:132,1284 +DA:132,2152 DA:141,1 DA:142,123 DA:149,1 -DA:150,1514 +DA:150,1971 DA:157,1 -DA:160,916 +DA:160,1320 DA:164,1 -DA:167,856 -DA:168,856 -DA:169,305 -DA:171,856 -DA:175,14946 -DA:176,2998 -DA:177,11948 -DA:178,11843 +DA:167,1024 +DA:168,1024 +DA:169,364 +DA:171,1024 +DA:175,17318 +DA:176,4215 +DA:177,13103 +DA:178,12998 DA:180,105 LF:58 LH:58 BRDA:41,0,0,9 -BRDA:41,0,1,15793 +BRDA:41,0,1,18333 BRDA:44,1,0,7 -BRDA:44,1,1,15795 -BRDA:52,2,0,437 -BRDA:52,2,1,419 -BRDA:52,2,2,905 -BRDA:52,2,3,14041 -BRDA:72,3,0,14041 -BRDA:72,3,1,1682 -BRDA:84,4,0,10707 -BRDA:84,4,1,1121 -BRDA:84,5,0,11828 -BRDA:84,5,1,10518 -BRDA:90,6,0,370 -BRDA:90,6,1,751 -BRDA:92,7,0,2858 -BRDA:92,7,1,861 -BRDA:94,8,0,607 -BRDA:94,8,1,1390 -BRDA:95,9,0,542 -BRDA:95,9,1,65 -BRDA:98,10,0,1112 -BRDA:98,10,1,278 -BRDA:100,11,0,219 -BRDA:100,11,1,59 -BRDA:103,12,0,1737 -BRDA:103,12,1,260 -BRDA:106,13,0,750 -BRDA:106,13,1,987 -BRDA:106,14,0,1737 -BRDA:106,14,1,1091 -BRDA:120,15,0,314 -BRDA:120,15,1,314 -BRDA:120,15,2,289 -BRDA:120,15,3,142 -BRDA:120,15,4,35 -BRDA:133,16,0,735 -BRDA:133,16,1,549 -BRDA:133,17,0,735 -BRDA:133,17,1,301 -BRDA:133,17,2,588 -BRDA:161,18,0,338 -BRDA:161,18,1,578 -BRDA:168,19,0,1161 -BRDA:168,19,1,856 +BRDA:44,1,1,18335 +BRDA:52,2,0,511 +BRDA:52,2,1,513 +BRDA:52,2,2,1456 +BRDA:52,2,3,15862 +BRDA:72,3,0,15862 +BRDA:72,3,1,2099 +BRDA:84,4,0,11894 +BRDA:84,4,1,1590 +BRDA:84,5,0,13484 +BRDA:84,5,1,11431 +BRDA:90,6,0,565 +BRDA:90,6,1,1025 +BRDA:92,7,0,4241 +BRDA:92,7,1,1269 +BRDA:94,8,0,1003 +BRDA:94,8,1,1969 +BRDA:95,9,0,907 +BRDA:95,9,1,96 +BRDA:98,10,0,1601 +BRDA:98,10,1,368 +BRDA:100,11,0,293 +BRDA:100,11,1,75 +BRDA:103,12,0,2651 +BRDA:103,12,1,321 +BRDA:106,13,0,1189 +BRDA:106,13,1,1462 +BRDA:106,14,0,2651 +BRDA:106,14,1,1596 +BRDA:120,15,0,608 +BRDA:120,15,1,608 +BRDA:120,15,2,581 +BRDA:120,15,3,319 +BRDA:120,15,4,39 +BRDA:133,16,0,1303 +BRDA:133,16,1,849 +BRDA:133,17,0,1303 +BRDA:133,17,1,475 +BRDA:133,17,2,1044 +BRDA:161,18,0,351 +BRDA:161,18,1,969 +BRDA:168,19,0,1388 +BRDA:168,19,1,1024 BRDA:168,20,0,0 -BRDA:168,20,1,1161 -BRDA:168,21,0,1161 -BRDA:168,21,1,1161 -BRDA:175,22,0,2998 -BRDA:175,22,1,11948 -BRDA:176,23,0,2998 -BRDA:176,23,1,68 +BRDA:168,20,1,1388 +BRDA:168,21,0,1388 +BRDA:168,21,1,1388 +BRDA:175,22,0,4215 +BRDA:175,22,1,13103 +BRDA:176,23,0,4215 +BRDA:176,23,1,61 BRDA:176,24,0,0 -BRDA:176,24,1,2998 -BRDA:176,25,0,2998 -BRDA:176,25,1,2998 -BRDA:177,26,0,11843 +BRDA:176,24,1,4215 +BRDA:176,25,0,4215 +BRDA:176,25,1,4215 +BRDA:177,26,0,12998 BRDA:177,26,1,105 -BRDA:177,27,0,11948 +BRDA:177,27,0,13103 BRDA:177,27,1,105 BRF:62 BRH:60 @@ -26612,57 +26612,57 @@ SF:packages/roosterjs-editor-dom/lib/selection/addRangeToSelection.ts FN:10,addRangeToSelection FNF:1 FNH:1 -FNDA:757,addRangeToSelection +FNDA:884,addRangeToSelection DA:1,1 DA:10,1 -DA:11,757 -DA:12,757 -DA:13,755 -DA:15,755 -DA:17,750 -DA:18,750 -DA:21,750 -DA:29,1 -DA:31,749 -DA:36,755 -DA:37,754 +DA:11,884 +DA:12,884 +DA:13,882 +DA:15,882 +DA:17,878 +DA:18,878 +DA:21,878 +DA:29,0 +DA:31,878 +DA:36,882 +DA:37,882 LF:13 -LH:13 +LH:12 BRDA:11,0,0,2 -BRDA:11,0,1,755 -BRDA:11,1,0,757 -BRDA:11,1,1,757 +BRDA:11,0,1,882 +BRDA:11,1,0,884 +BRDA:11,1,1,884 BRDA:11,2,0,2 -BRDA:11,2,1,755 -BRDA:11,3,0,757 -BRDA:11,3,1,755 +BRDA:11,2,1,882 +BRDA:11,3,0,884 +BRDA:11,3,1,882 BRDA:11,4,0,0 -BRDA:11,4,1,757 -BRDA:11,5,0,757 -BRDA:11,5,1,757 +BRDA:11,4,1,884 +BRDA:11,5,0,884 +BRDA:11,5,1,884 BRDA:11,6,0,0 -BRDA:11,6,1,757 -BRDA:11,7,0,757 -BRDA:11,7,1,757 -BRDA:12,8,0,755 +BRDA:11,6,1,884 +BRDA:11,7,0,884 +BRDA:11,7,1,884 +BRDA:12,8,0,882 BRDA:12,8,1,2 -BRDA:15,9,0,750 -BRDA:15,9,1,5 -BRDA:21,10,0,1 -BRDA:21,10,1,749 -BRDA:22,11,0,750 -BRDA:22,11,1,582 -BRDA:22,11,2,168 -BRDA:22,11,3,168 -BRDA:22,11,4,1 -BRDA:22,11,5,1 -BRDA:22,11,6,1 -BRDA:23,12,0,168 +BRDA:15,9,0,878 +BRDA:15,9,1,4 +BRDA:21,10,0,0 +BRDA:21,10,1,878 +BRDA:22,11,0,878 +BRDA:22,11,1,700 +BRDA:22,11,2,178 +BRDA:22,11,3,178 +BRDA:22,11,4,0 +BRDA:22,11,5,0 +BRDA:22,11,6,0 +BRDA:23,12,0,178 BRDA:23,12,1,0 -BRDA:36,13,0,754 -BRDA:36,13,1,1 +BRDA:36,13,0,882 +BRDA:36,13,1,0 BRF:33 -BRH:30 +BRH:25 end_of_record TN: SF:packages/roosterjs-editor-dom/lib/selection/createRange.ts @@ -26672,100 +26672,100 @@ FN:108,isNodePosition FN:112,getPositionFromPath FNF:4 FNH:4 -FNDA:1282,createRange -FNDA:2556,getFocusablePosition -FNDA:1790,isNodePosition -FNDA:318,getPositionFromPath +FNDA:1490,createRange +FNDA:2972,getFocusablePosition +FNDA:2105,isNodePosition +FNDA:316,getPositionFromPath DA:1,1 DA:2,1 DA:3,1 DA:55,1 -DA:61,1282 -DA:62,1282 -DA:64,1282 -DA:66,508 -DA:67,508 -DA:68,774 -DA:69,772 -DA:71,159 -DA:72,159 -DA:73,613 -DA:76,308 -DA:77,308 -DA:78,305 -DA:80,305 -DA:81,305 -DA:85,1282 -DA:86,1278 -DA:87,1278 -DA:88,1278 -DA:89,1278 -DA:90,1278 -DA:92,1278 +DA:61,1490 +DA:62,1490 +DA:64,1490 +DA:66,615 +DA:67,615 +DA:68,875 +DA:69,873 +DA:71,158 +DA:72,158 +DA:73,715 +DA:76,390 +DA:77,390 +DA:78,325 +DA:80,325 +DA:81,325 +DA:85,1490 +DA:86,1486 +DA:87,1486 +DA:88,1486 +DA:89,1486 +DA:90,1486 +DA:92,1486 DA:94,4 -DA:103,2556 -DA:109,1790 -DA:113,318 +DA:103,2972 +DA:109,2105 +DA:113,316 DA:114,0 -DA:119,318 -DA:121,318 -DA:122,1071 -DA:123,1071 -DA:129,753 -DA:131,318 -DA:135,318 +DA:119,316 +DA:121,316 +DA:122,1061 +DA:123,1061 +DA:129,745 +DA:131,316 +DA:135,316 LF:38 LH:37 -BRDA:64,0,0,508 -BRDA:64,0,1,774 -BRDA:67,1,0,289 -BRDA:67,1,1,219 -BRDA:68,2,0,772 +BRDA:64,0,0,615 +BRDA:64,0,1,875 +BRDA:67,1,0,349 +BRDA:67,1,1,266 +BRDA:68,2,0,873 BRDA:68,2,1,2 -BRDA:69,3,0,159 -BRDA:69,3,1,613 -BRDA:72,4,0,159 +BRDA:69,3,0,158 +BRDA:69,3,1,715 +BRDA:72,4,0,158 BRDA:72,4,1,0 -BRDA:73,5,0,308 -BRDA:73,5,1,305 -BRDA:77,6,0,29 -BRDA:77,6,1,279 -BRDA:78,7,0,305 +BRDA:73,5,0,390 +BRDA:73,5,1,325 +BRDA:77,6,0,90 +BRDA:77,6,1,300 +BRDA:78,7,0,325 BRDA:78,7,1,0 -BRDA:78,8,0,305 +BRDA:78,8,0,325 BRDA:78,8,1,105 -BRDA:81,9,0,305 +BRDA:81,9,0,325 BRDA:81,9,1,105 -BRDA:85,10,0,1278 +BRDA:85,10,0,1486 BRDA:85,10,1,4 BRDA:85,11,0,4 -BRDA:85,11,1,1278 -BRDA:85,12,0,1282 -BRDA:85,12,1,1280 +BRDA:85,11,1,1486 +BRDA:85,12,0,1490 +BRDA:85,12,1,1488 BRDA:85,13,0,2 -BRDA:85,13,1,1280 -BRDA:85,14,0,1282 -BRDA:85,14,1,1280 -BRDA:88,15,0,1278 -BRDA:88,15,1,496 +BRDA:85,13,1,1488 +BRDA:85,14,0,1490 +BRDA:85,14,1,1488 +BRDA:88,15,0,1486 +BRDA:88,15,1,564 BRDA:104,16,0,93 -BRDA:104,16,1,2463 -BRDA:103,17,0,2556 -BRDA:103,17,1,1495 +BRDA:104,16,1,2879 +BRDA:103,17,0,2972 +BRDA:103,17,1,1779 BRDA:104,18,0,4 BRDA:104,18,1,89 -BRDA:109,19,0,1790 -BRDA:109,19,1,1569 +BRDA:109,19,0,2105 +BRDA:109,19,1,1837 BRDA:113,20,0,0 -BRDA:113,20,1,318 -BRDA:113,21,0,318 -BRDA:113,21,1,318 -BRDA:123,22,0,753 -BRDA:123,22,1,318 -BRDA:124,23,0,1071 -BRDA:124,23,1,753 -BRDA:124,23,2,753 -BRDA:124,23,3,753 +BRDA:113,20,1,316 +BRDA:113,21,0,316 +BRDA:113,21,1,316 +BRDA:123,22,0,745 +BRDA:123,22,1,316 +BRDA:124,23,0,1061 +BRDA:124,23,1,745 +BRDA:124,23,2,745 +BRDA:124,23,3,745 BRF:50 BRH:47 end_of_record @@ -26872,90 +26872,90 @@ FN:10,getSelectionPath FN:38,getPositionPath FNF:2 FNH:2 -FNDA:4978,getSelectionPath -FNDA:602,getPositionPath +FNDA:5289,getSelectionPath +FNDA:850,getPositionPath DA:1,1 DA:2,1 DA:10,1 -DA:14,4978 -DA:15,4677 -DA:18,301 -DA:23,301 -DA:39,602 +DA:14,5289 +DA:15,4864 +DA:18,425 +DA:23,425 +DA:39,850 DA:40,0 -DA:43,602 -DA:44,602 -DA:45,602 -DA:48,602 +DA:43,850 +DA:44,850 +DA:45,850 +DA:48,850 DA:49,2 -DA:52,600 -DA:53,317 -DA:54,317 -DA:55,47 -DA:56,47 -DA:58,317 -DA:60,283 -DA:61,283 -DA:64,600 -DA:65,1545 -DA:66,1545 -DA:68,1545 -DA:69,518 -DA:70,143 +DA:52,848 +DA:53,396 +DA:54,396 +DA:55,48 +DA:56,48 +DA:58,396 +DA:60,452 +DA:61,452 +DA:64,848 +DA:65,2075 +DA:66,2075 +DA:68,2075 +DA:69,817 +DA:70,203 DA:71,45 -DA:74,98 -DA:76,375 -DA:79,473 -DA:82,1545 -DA:83,1545 -DA:84,1545 -DA:87,600 +DA:74,158 +DA:76,614 +DA:79,772 +DA:82,2075 +DA:83,2075 +DA:84,2075 +DA:87,848 LF:36 LH:35 -BRDA:14,0,0,4677 -BRDA:14,0,1,301 +BRDA:14,0,0,4864 +BRDA:14,0,1,425 BRDA:39,1,0,0 -BRDA:39,1,1,602 -BRDA:39,2,0,602 -BRDA:39,2,1,602 +BRDA:39,1,1,850 +BRDA:39,2,0,850 +BRDA:39,2,1,850 BRDA:48,3,0,2 -BRDA:48,3,1,600 -BRDA:52,4,0,317 -BRDA:52,4,1,283 -BRDA:54,5,0,364 -BRDA:54,5,1,91 -BRDA:55,6,0,47 +BRDA:48,3,1,848 +BRDA:52,4,0,396 +BRDA:52,4,1,452 +BRDA:54,5,0,444 +BRDA:54,5,1,106 +BRDA:55,6,0,48 BRDA:55,6,1,14 BRDA:55,7,0,0 -BRDA:55,7,1,47 -BRDA:55,8,0,47 -BRDA:55,8,1,47 -BRDA:85,9,0,1545 -BRDA:85,9,1,1545 -BRDA:68,10,0,1545 -BRDA:68,10,1,24 +BRDA:55,7,1,48 +BRDA:55,8,0,48 +BRDA:55,8,1,48 +BRDA:85,9,0,2075 +BRDA:85,9,1,2075 +BRDA:68,10,0,2075 +BRDA:68,10,1,28 BRDA:68,11,0,0 -BRDA:68,11,1,1545 -BRDA:68,12,0,1545 -BRDA:68,12,1,1545 -BRDA:68,13,0,2063 -BRDA:68,13,1,1980 -BRDA:69,14,0,143 -BRDA:69,14,1,375 +BRDA:68,11,1,2075 +BRDA:68,12,0,2075 +BRDA:68,12,1,2075 +BRDA:68,13,0,2892 +BRDA:68,13,1,2735 +BRDA:69,14,0,203 +BRDA:69,14,1,614 BRDA:70,15,0,45 -BRDA:70,15,1,98 -BRDA:70,16,0,143 -BRDA:70,16,1,103 +BRDA:70,15,1,158 +BRDA:70,16,0,203 +BRDA:70,16,1,163 BRDA:70,17,0,0 -BRDA:70,17,1,143 -BRDA:70,18,0,143 -BRDA:70,18,1,143 -BRDA:84,19,0,1545 +BRDA:70,17,1,203 +BRDA:70,18,0,203 +BRDA:70,18,1,203 +BRDA:84,19,0,2075 BRDA:84,19,1,10 BRDA:84,20,0,0 -BRDA:84,20,1,1545 -BRDA:84,21,0,1545 -BRDA:84,21,1,1545 +BRDA:84,20,1,2075 +BRDA:84,21,0,2075 +BRDA:84,21,1,2075 BRF:44 BRH:39 end_of_record @@ -26965,41 +26965,41 @@ FN:13,isPositionAtBeginningOf FN:30,areAllPreviousNodesEmpty FNF:2 FNH:2 -FNDA:16,isPositionAtBeginningOf -FNDA:19,areAllPreviousNodesEmpty +FNDA:22,isPositionAtBeginningOf +FNDA:27,areAllPreviousNodesEmpty DA:1,1 DA:2,1 DA:3,1 DA:13,1 -DA:14,16 -DA:15,15 -DA:16,15 -DA:17,15 -DA:18,15 -DA:19,14 -DA:20,13 -DA:23,14 -DA:27,2 -DA:31,19 +DA:14,22 +DA:15,21 +DA:16,21 +DA:17,21 +DA:18,21 +DA:19,18 +DA:20,21 +DA:23,18 +DA:27,4 +DA:31,27 DA:32,7 DA:33,7 DA:34,6 -DA:37,13 +DA:37,21 LF:18 LH:18 -BRDA:14,0,0,15 +BRDA:14,0,0,21 BRDA:14,0,1,1 -BRDA:18,1,0,14 -BRDA:18,1,1,1 -BRDA:19,2,0,27 -BRDA:19,2,1,27 -BRDA:19,2,2,19 -BRDA:20,3,0,13 +BRDA:18,1,0,18 +BRDA:18,1,1,3 +BRDA:19,2,0,39 +BRDA:19,2,1,39 +BRDA:19,2,2,27 +BRDA:20,3,0,21 BRDA:20,3,1,0 BRDA:20,4,0,0 -BRDA:20,4,1,13 -BRDA:20,5,0,13 -BRDA:20,5,1,13 +BRDA:20,4,1,21 +BRDA:20,5,0,21 +BRDA:20,5,1,21 BRDA:33,6,0,6 BRDA:33,6,1,1 BRDA:33,7,0,7 @@ -27016,7 +27016,7 @@ FNF:3 FNH:3 FNDA:39,setHtmlWithSelectionPath FNDA:58,setHtmlWithMetadata -FNDA:466,extractContentMetadata +FNDA:542,extractContentMetadata DA:1,1 DA:2,1 DA:3,1 @@ -27037,16 +27037,16 @@ DA:87,57 DA:88,57 DA:90,57 DA:98,1 -DA:99,466 -DA:101,466 -DA:102,171 -DA:103,171 -DA:105,164 -DA:110,149 -DA:111,149 -DA:112,149 -DA:114,149 -DA:119,317 +DA:99,542 +DA:101,542 +DA:102,170 +DA:103,170 +DA:105,163 +DA:110,148 +DA:111,148 +DA:112,148 +DA:114,148 +DA:119,394 LF:30 LH:30 BRDA:66,0,0,34 @@ -27065,19 +27065,19 @@ BRDA:88,6,0,54 BRDA:88,6,1,3 BRDA:88,7,0,57 BRDA:88,7,1,57 -BRDA:101,8,0,171 -BRDA:101,8,1,295 -BRDA:103,9,0,171 +BRDA:101,8,0,170 +BRDA:101,8,1,372 +BRDA:103,9,0,170 BRDA:103,9,1,2 -BRDA:105,10,0,149 +BRDA:105,10,0,148 BRDA:105,10,1,15 -BRDA:106,11,0,164 +BRDA:106,11,0,163 BRDA:106,11,1,19 BRDA:106,11,2,15 -BRDA:111,12,0,141 +BRDA:111,12,0,140 BRDA:111,12,1,8 -BRDA:112,13,0,149 -BRDA:112,13,1,144 +BRDA:112,13,0,148 +BRDA:112,13,1,143 BRF:29 BRH:29 end_of_record @@ -27091,43 +27091,43 @@ FN:95,compareSnapshots FN:99,defaultCompare FNF:6 FNH:6 -FNDA:5028,addSnapshot +FNDA:5315,addSnapshot FNDA:27,(anonymous_1) -FNDA:5004,addSnapshotV2 -FNDA:4956,(anonymous_3) -FNDA:368,compareSnapshots +FNDA:5291,addSnapshotV2 +FNDA:5257,(anonymous_3) +FNDA:468,compareSnapshots FNDA:10,defaultCompare DA:1,1 DA:32,1 -DA:39,5028 -DA:40,5028 -DA:42,5028 -DA:43,5028 -DA:45,5028 -DA:46,4978 -DA:47,4978 -DA:48,4978 -DA:49,4978 -DA:51,4978 -DA:52,4978 +DA:39,5315 +DA:40,5315 +DA:42,5315 +DA:43,5315 +DA:45,5315 +DA:46,5279 +DA:47,5279 +DA:48,5279 +DA:49,5279 +DA:51,5279 +DA:52,5279 DA:56,3 DA:57,3 -DA:60,4978 +DA:60,5279 DA:61,3 DA:62,3 DA:63,3 -DA:66,4978 +DA:66,5279 DA:67,24 -DA:69,50 -DA:71,50 +DA:69,36 +DA:71,36 DA:81,1 -DA:86,5004 -DA:90,4956 -DA:96,368 +DA:86,5291 +DA:90,5257 +DA:96,468 DA:100,10 LF:28 LH:28 -BRDA:39,0,0,5028 +BRDA:39,0,0,5315 BRDA:39,0,1,24 BRDA:39,1,0,27 BRDA:39,1,1,4 @@ -27135,32 +27135,32 @@ BRDA:39,2,0,0 BRDA:39,2,1,27 BRDA:39,3,0,27 BRDA:39,3,1,27 -BRDA:40,4,0,5028 +BRDA:40,4,0,5315 BRDA:40,4,1,24 -BRDA:43,5,0,5028 -BRDA:43,5,1,378 -BRDA:45,6,0,4978 -BRDA:45,6,1,50 -BRDA:45,7,0,5028 -BRDA:45,7,1,381 -BRDA:45,7,2,378 -BRDA:53,8,0,4981 -BRDA:53,8,1,4980 +BRDA:43,5,0,5315 +BRDA:43,5,1,478 +BRDA:45,6,0,5279 +BRDA:45,6,1,36 +BRDA:45,7,0,5315 +BRDA:45,7,1,481 +BRDA:45,7,2,478 +BRDA:53,8,0,5282 +BRDA:53,8,1,5281 BRDA:60,9,0,3 -BRDA:60,9,1,4975 +BRDA:60,9,1,5276 BRDA:66,10,0,24 -BRDA:66,10,1,4954 -BRDA:69,11,0,50 +BRDA:66,10,1,5255 +BRDA:69,11,0,36 BRDA:69,11,1,0 -BRDA:90,12,0,4956 -BRDA:90,12,1,4635 +BRDA:90,12,0,5257 +BRDA:90,12,1,4813 BRDA:90,13,0,0 -BRDA:90,13,1,4956 -BRDA:90,14,0,4956 -BRDA:90,14,1,4956 -BRDA:96,15,0,368 -BRDA:96,15,1,49 -BRDA:96,15,2,49 +BRDA:90,13,1,5257 +BRDA:90,14,0,5257 +BRDA:90,14,1,5257 +BRDA:96,15,0,468 +BRDA:96,15,1,35 +BRDA:96,15,2,35 BRF:34 BRH:31 end_of_record @@ -27169,14 +27169,14 @@ SF:packages/roosterjs-editor-dom/lib/snapshots/canMoveCurrentSnapshot.ts FN:9,canMoveCurrentSnapshot FNF:1 FNH:1 -FNDA:14842,canMoveCurrentSnapshot +FNDA:15693,canMoveCurrentSnapshot DA:9,1 -DA:13,14842 -DA:14,14842 +DA:13,15693 +DA:14,15693 LF:3 LH:3 -BRDA:14,0,0,14842 -BRDA:14,0,1,10190 +BRDA:14,0,0,15693 +BRDA:14,0,1,10854 BRF:2 BRH:2 end_of_record @@ -27185,12 +27185,12 @@ SF:packages/roosterjs-editor-dom/lib/snapshots/canUndoAutoComplete.ts FN:6,canUndoAutoComplete FNF:1 FNH:1 -FNDA:14,canUndoAutoComplete +FNDA:11,canUndoAutoComplete DA:6,1 -DA:7,14 +DA:7,11 LF:2 LH:2 -BRDA:8,0,0,14 +BRDA:8,0,0,11 BRDA:8,0,1,8 BRF:2 BRH:2 @@ -27203,14 +27203,14 @@ FN:43,clearProceedingSnapshotsV2 FN:44,(anonymous_3) FNF:4 FNH:3 -FNDA:5507,clearProceedingSnapshots +FNDA:5984,clearProceedingSnapshots FNDA:3,(anonymous_1) -FNDA:523,clearProceedingSnapshotsV2 +FNDA:699,clearProceedingSnapshotsV2 FNDA:0,(anonymous_3) DA:1,1 DA:23,1 -DA:27,5507 -DA:28,5507 +DA:27,5984 +DA:28,5984 DA:29,5 DA:30,5 DA:31,5 @@ -27218,10 +27218,10 @@ DA:33,5 DA:34,5 DA:35,5 DA:43,1 -DA:44,523 +DA:44,699 LF:12 LH:12 -BRDA:27,0,0,5507 +BRDA:27,0,0,5984 BRDA:27,0,1,6 BRDA:27,1,0,3 BRDA:27,1,1,0 @@ -27230,7 +27230,7 @@ BRDA:27,2,1,3 BRDA:27,3,0,3 BRDA:27,3,1,3 BRDA:28,4,0,5 -BRDA:28,4,1,5502 +BRDA:28,4,1,5979 BRDA:44,5,0,0 BRDA:44,5,1,0 BRDA:44,6,0,0 @@ -27245,9 +27245,9 @@ SF:packages/roosterjs-editor-dom/lib/snapshots/createSnapshots.ts FN:7,createSnapshots FNF:1 FNH:1 -FNDA:4850,createSnapshots +FNDA:5043,createSnapshots DA:7,1 -DA:8,4850 +DA:8,5043 LF:2 LH:2 BRF:0 @@ -27280,30 +27280,30 @@ FN:5,getStyles FN:8,(anonymous_1) FNF:2 FNH:2 -FNDA:1456,getStyles -FNDA:2090,(anonymous_1) +FNDA:1445,getStyles +FNDA:2045,(anonymous_1) DA:5,1 -DA:6,1456 -DA:7,1456 -DA:8,1456 -DA:9,2090 -DA:10,2090 -DA:11,2090 -DA:12,2090 -DA:13,849 -DA:16,1456 +DA:6,1445 +DA:7,1445 +DA:8,1445 +DA:9,2045 +DA:10,2045 +DA:11,2045 +DA:12,2045 +DA:13,811 +DA:16,1445 LF:10 LH:10 -BRDA:7,0,0,1456 -BRDA:7,0,1,1177 +BRDA:7,0,0,1445 +BRDA:7,0,1,1172 BRDA:7,1,0,0 -BRDA:7,1,1,1456 -BRDA:7,2,0,1456 -BRDA:7,2,1,1456 -BRDA:12,3,0,849 -BRDA:12,3,1,1241 -BRDA:12,4,0,2090 -BRDA:12,4,1,850 +BRDA:7,1,1,1445 +BRDA:7,2,0,1445 +BRDA:7,2,1,1445 +BRDA:12,3,0,811 +BRDA:12,3,1,1234 +BRDA:12,4,0,2045 +BRDA:12,4,1,812 BRF:10 BRH:9 end_of_record @@ -27312,15 +27312,15 @@ SF:packages/roosterjs-editor-dom/lib/style/removeGlobalCssStyle.ts FN:7,removeGlobalCssStyle FNF:1 FNH:1 -FNDA:10475,removeGlobalCssStyle +FNDA:11023,removeGlobalCssStyle DA:7,1 -DA:8,10475 -DA:9,10475 +DA:8,11023 +DA:9,11023 DA:10,124 LF:4 LH:4 BRDA:9,0,0,124 -BRDA:9,0,1,10351 +BRDA:9,0,1,10899 BRDA:10,1,0,0 BRDA:10,1,1,124 BRDA:10,2,0,124 @@ -27395,37 +27395,37 @@ FN:11,(anonymous_1) FN:17,(anonymous_2) FNF:3 FNH:3 -FNDA:543,setStyles -FNDA:344,(anonymous_1) -FNDA:344,(anonymous_2) +FNDA:534,setStyles +FNDA:322,(anonymous_1) +FNDA:322,(anonymous_2) DA:1,1 DA:8,1 -DA:9,543 -DA:10,542 -DA:12,344 -DA:13,344 -DA:14,344 -DA:15,344 -DA:17,344 -DA:19,542 -DA:20,104 -DA:22,438 +DA:9,534 +DA:10,533 +DA:12,322 +DA:13,322 +DA:14,322 +DA:15,322 +DA:17,322 +DA:19,533 +DA:20,98 +DA:22,435 LF:12 LH:12 -BRDA:9,0,0,542 +BRDA:9,0,0,533 BRDA:9,0,1,1 -BRDA:10,1,0,542 +BRDA:10,1,0,533 BRDA:10,1,1,1 -BRDA:13,2,0,343 +BRDA:13,2,0,321 BRDA:13,2,1,1 -BRDA:14,3,0,320 +BRDA:14,3,0,298 BRDA:14,3,1,24 -BRDA:15,4,0,318 +BRDA:15,4,0,296 BRDA:15,4,1,26 -BRDA:15,5,0,344 -BRDA:15,5,1,343 -BRDA:19,6,0,104 -BRDA:19,6,1,438 +BRDA:15,5,0,322 +BRDA:15,5,1,321 +BRDA:19,6,0,98 +BRDA:19,6,1,435 BRF:14 BRH:14 end_of_record @@ -27479,23 +27479,23 @@ FN:774,getTableFromTd FN:784,cloneCell FN:796,cloneNode FNF:47 -FNH:38 +FNH:39 FNDA:1,(anonymous_0) -FNDA:506,VTable -FNDA:1412,(anonymous_2) -FNDA:1412,(anonymous_3) +FNDA:632,VTable +FNDA:1754,(anonymous_2) +FNDA:1754,(anonymous_3) FNDA:0,(anonymous_4) -FNDA:920,(anonymous_5) -FNDA:190,(anonymous_6) -FNDA:293,(anonymous_7) -FNDA:814,(anonymous_8) -FNDA:2409,(anonymous_9) -FNDA:1567,(anonymous_10) +FNDA:1276,(anonymous_5) +FNDA:253,(anonymous_6) +FNDA:419,(anonymous_7) +FNDA:1156,(anonymous_8) +FNDA:3363,(anonymous_9) +FNDA:2161,(anonymous_10) FNDA:15,(anonymous_11) FNDA:15,(anonymous_12) FNDA:34,(anonymous_13) FNDA:42,(anonymous_14) -FNDA:145,(anonymous_15) +FNDA:208,(anonymous_15) FNDA:63,(anonymous_17) FNDA:55,(anonymous_19) FNDA:65,(anonymous_21) @@ -27504,29 +27504,29 @@ FNDA:36,(anonymous_25) FNDA:13,(anonymous_26) FNDA:13,(anonymous_27) FNDA:13,(anonymous_28) -FNDA:0,(anonymous_29) +FNDA:42,(anonymous_29) FNDA:18,(anonymous_30) -FNDA:1572,(anonymous_31) +FNDA:2166,(anonymous_31) FNDA:5,(anonymous_32) FNDA:25,(anonymous_33) FNDA:0,(anonymous_34) FNDA:0,(anonymous_35) -FNDA:5060,(anonymous_36) +FNDA:6698,(anonymous_36) FNDA:23,(anonymous_37) FNDA:154,(anonymous_38) FNDA:60,(anonymous_39) FNDA:13,(anonymous_40) -FNDA:1567,(anonymous_41) -FNDA:1589,(anonymous_42) -FNDA:1590,(anonymous_43) +FNDA:2161,(anonymous_41) +FNDA:2183,(anonymous_42) +FNDA:2184,(anonymous_43) FNDA:0,(anonymous_44) FNDA:0,(anonymous_45) FNDA:0,(anonymous_46) FNDA:0,(anonymous_47) FNDA:0,setHTMLElementSizeInPx -FNDA:193,getTableFromTd +FNDA:256,getTableFromTd FNDA:142,cloneCell -FNDA:1066,cloneNode +FNDA:1408,cloneNode DA:1,1 DA:2,1 DA:3,1 @@ -27537,59 +27537,59 @@ DA:7,1 DA:8,1 DA:20,1 DA:38,1 -DA:47,506 -DA:62,506 -DA:64,506 -DA:66,506 -DA:74,506 -DA:79,506 -DA:80,506 -DA:81,494 -DA:82,494 -DA:83,1412 -DA:84,494 -DA:85,1412 -DA:86,1412 -DA:88,3863 -DA:89,3863 -DA:91,3863 -DA:92,181 -DA:93,181 -DA:96,3863 -DA:97,4333 -DA:98,4823 -DA:99,4823 -DA:100,4823 -DA:101,4823 -DA:113,494 -DA:114,494 +DA:47,632 +DA:62,632 +DA:64,632 +DA:66,632 +DA:74,632 +DA:79,632 +DA:80,632 +DA:81,620 +DA:82,620 +DA:83,1754 +DA:84,620 +DA:85,1754 +DA:86,1754 +DA:88,4457 +DA:89,4457 +DA:91,4457 +DA:92,244 +DA:93,244 +DA:96,4457 +DA:97,5107 +DA:98,5777 +DA:99,5777 +DA:100,5777 +DA:101,5777 +DA:113,620 +DA:114,620 DA:115,0 DA:123,1 -DA:124,920 -DA:128,190 -DA:129,97 -DA:130,97 -DA:131,97 -DA:133,190 -DA:141,293 -DA:142,293 -DA:143,276 -DA:144,276 -DA:145,814 -DA:147,814 -DA:148,814 -DA:149,814 -DA:150,2409 -DA:151,1567 -DA:152,1567 -DA:153,1567 -DA:158,276 +DA:124,1276 +DA:128,253 +DA:129,123 +DA:130,123 +DA:131,123 +DA:133,253 +DA:141,419 +DA:142,419 +DA:143,402 +DA:144,402 +DA:145,1156 +DA:147,1156 +DA:148,1156 +DA:149,1156 +DA:150,3363 +DA:151,2161 +DA:152,2161 +DA:153,2161 +DA:158,402 DA:159,15 DA:160,15 DA:162,17 DA:163,8 DA:167,1 -DA:168,1567 +DA:168,2161 DA:169,56 DA:170,56 DA:171,56 @@ -27604,16 +27604,16 @@ DA:199,15 DA:200,34 DA:201,42 DA:202,42 -DA:212,145 -DA:213,145 +DA:212,208 +DA:213,208 DA:214,1 -DA:217,144 -DA:218,144 -DA:219,144 -DA:220,144 -DA:221,144 -DA:222,144 -DA:223,144 +DA:217,207 +DA:218,207 +DA:219,207 +DA:220,207 +DA:221,207 +DA:222,207 +DA:223,207 DA:225,14 DA:226,20 DA:228,14 @@ -27710,36 +27710,36 @@ DA:396,2 DA:398,5 DA:399,13 DA:406,7 -DA:408,0 -DA:409,0 -DA:410,0 -DA:412,0 -DA:413,0 -DA:414,0 -DA:416,0 -DA:417,0 -DA:418,0 -DA:420,0 -DA:427,0 -DA:429,0 -DA:436,0 -DA:438,0 -DA:445,0 -DA:447,0 -DA:455,0 -DA:457,0 -DA:465,0 -DA:467,0 -DA:475,0 +DA:408,7 +DA:409,7 +DA:410,7 +DA:412,7 +DA:413,7 +DA:414,7 +DA:416,7 +DA:417,7 +DA:418,7 +DA:420,7 +DA:427,7 +DA:429,7 +DA:436,7 +DA:438,7 +DA:445,7 +DA:447,7 +DA:455,7 +DA:457,7 +DA:465,7 +DA:467,7 +DA:475,7 DA:479,1 -DA:487,0 -DA:488,0 -DA:489,0 -DA:490,0 -DA:491,0 -DA:492,0 -DA:493,0 -DA:494,0 +DA:487,42 +DA:488,68 +DA:489,68 +DA:490,68 +DA:491,68 +DA:492,24 +DA:493,44 +DA:494,24 DA:501,1 DA:502,18 DA:505,18 @@ -27749,7 +27749,7 @@ DA:508,5 DA:509,3 DA:511,2 DA:516,1 -DA:517,1572 +DA:517,2166 DA:520,1 DA:521,5 DA:522,0 @@ -27782,7 +27782,7 @@ DA:591,0 DA:598,1 DA:599,0 DA:608,1 -DA:609,5060 +DA:609,6698 DA:615,1 DA:616,23 DA:624,1 @@ -27809,30 +27809,30 @@ DA:658,13 DA:659,13 DA:660,36 DA:665,1 -DA:666,1567 -DA:667,1567 -DA:668,1567 -DA:669,1567 -DA:670,1567 -DA:671,1185 -DA:673,1567 -DA:674,1167 +DA:666,2161 +DA:667,2161 +DA:668,2161 +DA:669,2161 +DA:670,2161 +DA:671,1599 +DA:673,2161 +DA:674,1581 DA:679,1 -DA:680,1589 -DA:681,1589 -DA:682,1393 -DA:683,1393 -DA:684,979 -DA:686,414 -DA:688,1589 +DA:680,2183 +DA:681,2183 +DA:682,1915 +DA:683,1915 +DA:684,1321 +DA:686,594 +DA:688,2183 DA:691,1 -DA:692,1590 -DA:693,1590 -DA:694,1411 -DA:695,1411 -DA:696,969 -DA:698,442 -DA:700,1590 +DA:692,2184 +DA:693,2184 +DA:694,1933 +DA:695,1933 +DA:696,1311 +DA:698,622 +DA:700,2184 DA:703,1 DA:704,0 DA:705,0 @@ -27865,65 +27865,65 @@ DA:767,0 DA:768,0 DA:769,0 DA:770,0 -DA:775,193 -DA:776,193 -DA:777,193 +DA:775,256 +DA:776,256 +DA:777,256 DA:785,142 -DA:797,1066 -DA:798,1066 +DA:797,1408 +DA:798,1408 DA:799,188 DA:800,188 DA:801,188 -DA:804,1066 +DA:804,1408 LF:348 -LH:261 -BRDA:79,0,0,313 -BRDA:79,0,1,193 -BRDA:80,1,0,494 +LH:290 +BRDA:79,0,0,376 +BRDA:79,0,1,256 +BRDA:80,1,0,620 BRDA:80,1,1,12 -BRDA:81,2,0,313 -BRDA:81,2,1,181 -BRDA:91,3,0,181 -BRDA:91,3,1,3682 -BRDA:100,4,0,4823 +BRDA:81,2,0,376 +BRDA:81,2,1,244 +BRDA:91,3,0,244 +BRDA:91,3,1,4213 +BRDA:100,4,0,5777 BRDA:100,4,1,0 BRDA:100,5,0,0 -BRDA:100,5,1,4823 -BRDA:100,6,0,4823 -BRDA:100,6,1,4823 -BRDA:102,7,0,3863 -BRDA:102,7,1,960 -BRDA:105,8,0,3863 -BRDA:105,8,1,960 -BRDA:106,9,0,3863 -BRDA:106,9,1,960 +BRDA:100,5,1,5777 +BRDA:100,6,0,5777 +BRDA:100,6,1,5777 +BRDA:102,7,0,4457 +BRDA:102,7,1,1320 +BRDA:105,8,0,4457 +BRDA:105,8,1,1320 +BRDA:106,9,0,4457 +BRDA:106,9,1,1320 BRDA:114,10,0,0 -BRDA:114,10,1,494 +BRDA:114,10,1,620 BRDA:115,11,0,0 BRDA:115,11,1,0 -BRDA:124,12,0,920 -BRDA:124,12,1,436 -BRDA:128,13,0,97 -BRDA:128,13,1,93 +BRDA:124,12,0,1276 +BRDA:124,12,1,584 +BRDA:128,13,0,123 +BRDA:128,13,1,130 BRDA:130,14,0,2 -BRDA:130,14,1,95 -BRDA:130,15,0,97 -BRDA:130,15,1,95 +BRDA:130,14,1,121 +BRDA:130,15,0,123 +BRDA:130,15,1,121 BRDA:131,16,0,2 -BRDA:131,16,1,95 -BRDA:131,17,0,97 -BRDA:131,17,1,95 -BRDA:142,18,0,276 +BRDA:131,16,1,121 +BRDA:131,17,0,123 +BRDA:131,17,1,121 +BRDA:142,18,0,402 BRDA:142,18,1,17 -BRDA:145,19,0,814 +BRDA:145,19,0,1156 BRDA:145,19,1,0 -BRDA:147,20,0,814 +BRDA:147,20,0,1156 BRDA:147,20,1,0 -BRDA:150,21,0,1567 -BRDA:150,21,1,842 +BRDA:150,21,0,2161 +BRDA:150,21,1,1202 BRDA:158,22,0,15 -BRDA:158,22,1,261 -BRDA:158,23,0,276 +BRDA:158,22,1,387 +BRDA:158,23,0,402 BRDA:158,23,1,15 BRDA:162,24,0,8 BRDA:162,24,1,9 @@ -27932,8 +27932,8 @@ BRDA:163,25,1,8 BRDA:163,26,0,8 BRDA:163,26,1,8 BRDA:168,27,0,56 -BRDA:168,27,1,1511 -BRDA:168,28,0,1567 +BRDA:168,27,1,2105 +BRDA:168,28,0,2161 BRDA:168,28,1,354 BRDA:181,29,0,0 BRDA:181,29,1,15 @@ -27950,19 +27950,19 @@ BRDA:199,34,1,15 BRDA:201,35,0,42 BRDA:201,35,1,0 BRDA:213,36,0,1 -BRDA:213,36,1,144 -BRDA:213,37,0,145 -BRDA:213,37,1,144 -BRDA:213,37,2,144 -BRDA:213,37,3,144 -BRDA:219,38,0,42 -BRDA:219,38,1,102 -BRDA:220,39,0,42 -BRDA:220,39,1,102 -BRDA:221,40,0,42 -BRDA:221,40,1,102 -BRDA:222,41,0,42 -BRDA:222,41,1,102 +BRDA:213,36,1,207 +BRDA:213,37,0,208 +BRDA:213,37,1,207 +BRDA:213,37,2,207 +BRDA:213,37,3,207 +BRDA:219,38,0,68 +BRDA:219,38,1,139 +BRDA:220,39,0,68 +BRDA:220,39,1,139 +BRDA:221,40,0,68 +BRDA:221,40,1,139 +BRDA:222,41,0,68 +BRDA:222,41,1,139 BRDA:224,42,0,14 BRDA:224,42,1,17 BRDA:224,42,2,14 @@ -27977,15 +27977,15 @@ BRDA:224,42,10,6 BRDA:224,42,11,8 BRDA:224,42,12,7 BRDA:224,42,13,7 -BRDA:224,42,14,0 -BRDA:224,42,15,0 -BRDA:224,42,16,0 -BRDA:224,42,17,0 -BRDA:224,42,18,0 -BRDA:224,42,19,0 -BRDA:224,42,20,0 -BRDA:224,42,21,0 -BRDA:224,42,22,0 +BRDA:224,42,14,7 +BRDA:224,42,15,7 +BRDA:224,42,16,7 +BRDA:224,42,17,7 +BRDA:224,42,18,7 +BRDA:224,42,19,7 +BRDA:224,42,20,7 +BRDA:224,42,21,7 +BRDA:224,42,22,7 BRDA:238,43,0,13 BRDA:238,43,1,50 BRDA:240,44,0,3 @@ -28058,22 +28058,22 @@ BRDA:395,76,0,7 BRDA:395,76,1,7 BRDA:400,77,0,5 BRDA:400,77,1,8 -BRDA:489,78,0,0 +BRDA:489,78,0,68 BRDA:489,78,1,0 -BRDA:491,79,0,0 -BRDA:491,79,1,0 -BRDA:491,80,0,0 -BRDA:491,80,1,0 +BRDA:491,79,0,24 +BRDA:491,79,1,44 +BRDA:491,80,0,68 +BRDA:491,80,1,39 BRDA:492,81,0,0 -BRDA:492,81,1,0 -BRDA:492,82,0,0 -BRDA:492,82,1,0 -BRDA:493,83,0,0 -BRDA:493,83,1,0 +BRDA:492,81,1,24 +BRDA:492,82,0,24 +BRDA:492,82,1,24 +BRDA:493,83,0,24 +BRDA:493,83,1,20 BRDA:494,84,0,0 -BRDA:494,84,1,0 -BRDA:494,85,0,0 -BRDA:494,85,1,0 +BRDA:494,84,1,24 +BRDA:494,85,0,24 +BRDA:494,85,1,24 BRDA:503,86,0,12 BRDA:503,86,1,6 BRDA:503,87,0,12 @@ -28103,7 +28103,7 @@ BRDA:505,98,1,18 BRDA:505,98,2,18 BRDA:508,99,0,3 BRDA:508,99,1,2 -BRDA:517,100,0,1572 +BRDA:517,100,0,2166 BRDA:517,100,1,364 BRDA:521,101,0,0 BRDA:521,101,1,5 @@ -28123,9 +28123,9 @@ BRDA:580,108,0,0 BRDA:580,108,1,0 BRDA:583,109,0,0 BRDA:583,109,1,0 -BRDA:609,110,0,5060 -BRDA:609,110,1,5059 -BRDA:609,110,2,5033 +BRDA:609,110,0,6698 +BRDA:609,110,1,6697 +BRDA:609,110,2,6671 BRDA:609,110,3,66 BRDA:625,111,0,153 BRDA:625,111,1,1 @@ -28154,24 +28154,24 @@ BRDA:658,122,0,13 BRDA:658,122,1,0 BRDA:659,123,0,49 BRDA:659,123,1,49 -BRDA:667,124,0,1567 +BRDA:667,124,0,2161 BRDA:667,124,1,0 -BRDA:670,125,0,1185 -BRDA:670,125,1,382 -BRDA:673,126,0,1167 -BRDA:673,126,1,400 -BRDA:681,127,0,2003 -BRDA:681,127,1,2003 -BRDA:683,128,0,979 -BRDA:683,128,1,414 -BRDA:683,129,0,1393 -BRDA:683,129,1,629 -BRDA:693,130,0,2032 -BRDA:693,130,1,2032 -BRDA:695,131,0,969 -BRDA:695,131,1,442 -BRDA:695,132,0,1411 -BRDA:695,132,1,625 +BRDA:670,125,0,1599 +BRDA:670,125,1,562 +BRDA:673,126,0,1581 +BRDA:673,126,1,580 +BRDA:681,127,0,2777 +BRDA:681,127,1,2777 +BRDA:683,128,0,1321 +BRDA:683,128,1,594 +BRDA:683,129,0,1915 +BRDA:683,129,1,899 +BRDA:693,130,0,2806 +BRDA:693,130,1,2806 +BRDA:695,131,0,1311 +BRDA:695,131,1,622 +BRDA:695,132,0,1933 +BRDA:695,132,1,895 BRDA:706,133,0,0 BRDA:706,133,1,0 BRDA:707,134,0,0 @@ -28214,16 +28214,16 @@ BRDA:755,152,0,0 BRDA:755,152,1,0 BRDA:765,153,0,0 BRDA:765,153,1,0 -BRDA:776,154,0,736 -BRDA:776,154,1,724 -BRDA:797,155,0,1002 +BRDA:776,154,0,988 +BRDA:776,154,1,976 +BRDA:797,155,0,1344 BRDA:797,155,1,64 BRDA:798,156,0,188 -BRDA:798,156,1,878 +BRDA:798,156,1,1220 BRDA:800,157,0,188 BRDA:800,157,1,0 BRF:345 -BRH:234 +BRH:256 end_of_record TN: SF:packages/roosterjs-editor-dom/lib/table/applyTableFormat.ts @@ -28730,7 +28730,7 @@ FN:47,getTableFormatInfo FN:57,saveTableInfo FNF:2 FNH:2 -FNDA:495,getTableFormatInfo +FNDA:621,getTableFormatInfo FNDA:16,saveTableInfo DA:1,1 DA:3,1 @@ -28738,7 +28738,7 @@ DA:10,1 DA:16,1 DA:18,1 DA:47,1 -DA:48,495 +DA:48,621 DA:57,1 DA:58,16 DA:59,16 @@ -28776,7 +28776,7 @@ DA:48,7 DA:49,5 DA:50,5 DA:51,5 -DA:53,4 +DA:53,3 DA:57,5 DA:60,5 DA:61,1 @@ -28788,7 +28788,7 @@ DA:88,1 LF:26 LH:25 BRDA:21,0,0,7 -BRDA:21,0,1,2 +BRDA:21,0,1,3 BRDA:22,1,0,7 BRDA:22,1,1,6 BRDA:36,2,0,0 @@ -28800,9 +28800,9 @@ BRDA:46,4,1,0 BRDA:46,4,2,0 BRDA:48,5,0,5 BRDA:48,5,1,2 -BRDA:51,6,0,4 -BRDA:51,6,1,1 -BRDA:53,7,0,4 +BRDA:51,6,0,3 +BRDA:51,6,1,2 +BRDA:53,7,0,3 BRDA:53,7,1,1 BRDA:60,8,0,1 BRDA:60,8,1,4 @@ -28822,52 +28822,52 @@ SF:packages/roosterjs-editor-dom/lib/utils/applyFormat.ts FN:11,applyFormat FNF:1 FNH:1 -FNDA:4627,applyFormat +FNDA:4814,applyFormat DA:1,1 DA:11,1 -DA:17,4627 -DA:18,4627 -DA:29,41643 -DA:31,4627 -DA:32,4584 -DA:34,4627 -DA:35,4590 -DA:38,4627 -DA:39,4583 -DA:47,44 +DA:17,4814 +DA:18,4814 +DA:29,43326 +DA:31,4814 +DA:32,4765 +DA:34,4814 +DA:35,4771 +DA:38,4814 +DA:39,4764 +DA:47,50 DA:48,0 -DA:58,4627 +DA:58,4814 DA:59,1 -DA:67,4626 +DA:67,4813 DA:68,0 -DA:78,4627 -DA:79,1 -DA:81,4627 +DA:78,4814 +DA:79,6 +DA:81,4814 DA:82,1 -DA:84,4627 +DA:84,4814 DA:85,1 LF:23 LH:21 -BRDA:17,0,0,4627 +BRDA:17,0,0,4814 BRDA:17,0,1,0 -BRDA:31,1,0,4584 -BRDA:31,1,1,43 -BRDA:34,2,0,4590 -BRDA:34,2,1,37 -BRDA:38,3,0,4583 -BRDA:38,3,1,44 +BRDA:31,1,0,4765 +BRDA:31,1,1,49 +BRDA:34,2,0,4771 +BRDA:34,2,1,43 +BRDA:38,3,0,4764 +BRDA:38,3,1,50 BRDA:47,4,0,0 -BRDA:47,4,1,44 +BRDA:47,4,1,50 BRDA:58,5,0,1 -BRDA:58,5,1,4626 +BRDA:58,5,1,4813 BRDA:67,6,0,0 -BRDA:67,6,1,4626 -BRDA:78,7,0,1 -BRDA:78,7,1,4626 +BRDA:67,6,1,4813 +BRDA:78,7,0,6 +BRDA:78,7,1,4808 BRDA:81,8,0,1 -BRDA:81,8,1,4626 +BRDA:81,8,1,4813 BRDA:84,9,0,1 -BRDA:84,9,1,4626 +BRDA:84,9,1,4813 BRF:20 BRH:17 end_of_record @@ -28876,39 +28876,39 @@ SF:packages/roosterjs-editor-dom/lib/utils/changeElementTag.ts FN:24,changeElementTag FNF:1 FNH:1 -FNDA:114,changeElementTag +FNDA:115,changeElementTag DA:1,1 DA:2,1 DA:3,1 DA:24,1 -DA:25,114 +DA:25,115 DA:26,0 -DA:29,114 -DA:31,114 +DA:29,115 +DA:31,115 DA:33,55 -DA:36,59 -DA:38,59 -DA:39,28 -DA:40,28 -DA:43,59 -DA:45,59 +DA:36,60 +DA:38,60 +DA:39,29 +DA:40,29 +DA:43,60 +DA:45,60 DA:46,4 -DA:52,59 -DA:53,59 -DA:56,59 +DA:52,60 +DA:53,60 +DA:56,60 LF:19 LH:18 BRDA:25,0,0,0 -BRDA:25,0,1,114 -BRDA:25,1,0,114 -BRDA:25,1,1,114 +BRDA:25,0,1,115 +BRDA:25,1,0,115 +BRDA:25,1,1,115 BRDA:31,2,0,55 -BRDA:31,2,1,59 +BRDA:31,2,1,60 BRDA:45,3,0,4 -BRDA:45,3,1,55 -BRDA:45,4,0,59 -BRDA:45,4,1,57 -BRDA:52,5,0,59 +BRDA:45,3,1,56 +BRDA:45,4,0,60 +BRDA:45,4,1,58 +BRDA:52,5,0,60 BRDA:52,5,1,0 BRF:12 BRH:10 @@ -28919,66 +28919,66 @@ FN:17,collapseNodes FN:54,collapse FNF:2 FNH:2 -FNDA:1654,collapseNodes -FNDA:3320,collapse +FNDA:1977,collapseNodes +FNDA:3966,collapse DA:1,1 DA:2,1 DA:3,1 DA:17,1 -DA:23,1654 +DA:23,1977 DA:24,2 -DA:27,1652 -DA:28,1652 -DA:30,1652 -DA:31,1063 -DA:32,589 +DA:27,1975 +DA:28,1975 +DA:30,1975 +DA:31,1185 +DA:32,790 DA:33,0 -DA:34,589 -DA:35,585 -DA:36,585 -DA:37,585 -DA:38,585 +DA:34,790 +DA:35,786 +DA:36,786 +DA:37,786 +DA:38,786 DA:40,4 DA:54,1 -DA:61,3320 -DA:62,1104 +DA:61,3966 +DA:62,1410 DA:63,65 DA:64,5 DA:66,60 -DA:69,1099 +DA:69,1405 DA:70,0 -DA:73,1099 -DA:75,3320 +DA:73,1405 +DA:75,3966 LF:28 LH:26 BRDA:23,0,0,2 -BRDA:23,0,1,1652 -BRDA:23,1,0,1654 -BRDA:23,1,1,1652 -BRDA:30,2,0,1063 -BRDA:30,2,1,589 +BRDA:23,0,1,1975 +BRDA:23,1,0,1977 +BRDA:23,1,1,1975 +BRDA:30,2,0,1185 +BRDA:30,2,1,790 BRDA:32,3,0,0 -BRDA:32,3,1,589 -BRDA:34,4,0,585 +BRDA:32,3,1,790 +BRDA:34,4,0,786 BRDA:34,4,1,4 -BRDA:35,5,0,585 +BRDA:35,5,0,786 BRDA:35,5,1,0 BRDA:35,6,0,0 -BRDA:35,6,1,585 -BRDA:35,7,0,585 -BRDA:35,7,1,585 -BRDA:61,8,0,4419 -BRDA:61,8,1,2795 +BRDA:35,6,1,786 +BRDA:35,7,0,786 +BRDA:35,7,1,786 +BRDA:61,8,0,5371 +BRDA:61,8,1,3685 BRDA:62,9,0,65 -BRDA:62,9,1,1039 -BRDA:62,10,0,1104 -BRDA:62,10,1,545 -BRDA:62,10,2,1080 -BRDA:62,10,3,559 +BRDA:62,9,1,1345 +BRDA:62,10,0,1410 +BRDA:62,10,1,649 +BRDA:62,10,2,1386 +BRDA:62,10,3,761 BRDA:63,11,0,5 BRDA:63,11,1,60 BRDA:69,12,0,0 -BRDA:69,12,1,1099 +BRDA:69,12,1,1405 BRF:28 BRH:24 end_of_record @@ -28988,25 +28988,25 @@ FN:30,contains FN:63,internalContains FNF:2 FNH:2 -FNDA:39198,contains -FNDA:23254,internalContains +FNDA:45145,contains +FNDA:26997,internalContains DA:1,1 DA:30,1 -DA:35,39198 -DA:36,6381 -DA:39,32817 -DA:40,4017 -DA:43,28800 -DA:44,2590 -DA:45,2590 -DA:48,28800 -DA:49,8506 -DA:50,8506 -DA:53,28800 -DA:54,756 -DA:57,28044 -DA:64,23254 -DA:65,23254 +DA:35,45145 +DA:36,6818 +DA:39,38327 +DA:40,5323 +DA:43,33004 +DA:44,3195 +DA:45,3195 +DA:48,33004 +DA:49,10580 +DA:50,10580 +DA:53,33004 +DA:54,992 +DA:57,32012 +DA:64,26997 +DA:65,26997 DA:67,0 DA:68,0 DA:69,0 @@ -29014,33 +29014,33 @@ DA:72,0 DA:75,0 LF:22 LH:17 -BRDA:35,0,0,6381 -BRDA:35,0,1,32817 -BRDA:35,1,0,39198 -BRDA:35,1,1,39187 -BRDA:39,2,0,4017 -BRDA:39,2,1,28800 -BRDA:39,3,0,32817 -BRDA:39,3,1,12763 -BRDA:43,4,0,2590 -BRDA:43,4,1,26210 -BRDA:44,5,0,2590 -BRDA:44,5,1,2590 -BRDA:48,6,0,8506 -BRDA:48,6,1,20294 -BRDA:48,7,0,28800 -BRDA:48,7,1,28800 -BRDA:53,8,0,756 -BRDA:53,8,1,28044 -BRDA:53,9,0,28800 -BRDA:53,9,1,880 -BRDA:54,10,0,756 -BRDA:54,10,1,751 -BRDA:58,11,0,28044 -BRDA:58,11,1,23254 -BRDA:58,12,0,28044 -BRDA:58,12,1,10260 -BRDA:64,13,0,23254 +BRDA:35,0,0,6818 +BRDA:35,0,1,38327 +BRDA:35,1,0,45145 +BRDA:35,1,1,45134 +BRDA:39,2,0,5323 +BRDA:39,2,1,33004 +BRDA:39,3,0,38327 +BRDA:39,3,1,14896 +BRDA:43,4,0,3195 +BRDA:43,4,1,29809 +BRDA:44,5,0,3195 +BRDA:44,5,1,3195 +BRDA:48,6,0,10580 +BRDA:48,6,1,22424 +BRDA:48,7,0,33004 +BRDA:48,7,1,33004 +BRDA:53,8,0,992 +BRDA:53,8,1,32012 +BRDA:53,9,0,33004 +BRDA:53,9,1,1116 +BRDA:54,10,0,992 +BRDA:54,10,1,970 +BRDA:58,11,0,32012 +BRDA:58,11,1,26997 +BRDA:58,12,0,32012 +BRDA:58,12,1,11235 +BRDA:64,13,0,26997 BRDA:64,13,1,0 BRDA:68,14,0,0 BRDA:68,14,1,0 @@ -29055,69 +29055,69 @@ FN:112,(anonymous_2) FN:118,(anonymous_3) FNF:4 FNH:4 -FNDA:11021,createElement +FNDA:11407,createElement FNDA:163,(anonymous_1) FNDA:231,(anonymous_2) -FNDA:6920,(anonymous_3) +FNDA:7108,(anonymous_3) DA:1,1 DA:2,1 DA:3,1 DA:10,1 DA:77,1 -DA:84,11021 -DA:85,4687 -DA:88,11021 +DA:84,11407 +DA:85,4885 +DA:88,11407 DA:89,1 -DA:92,77140 -DA:93,11020 -DA:97,11020 -DA:98,395 -DA:101,11020 +DA:92,79842 +DA:93,11406 +DA:97,11406 +DA:98,405 +DA:101,11406 DA:102,374 -DA:105,11020 +DA:105,11406 DA:106,83 DA:107,163 -DA:111,11020 +DA:111,11406 DA:112,84 DA:113,231 -DA:117,11020 -DA:118,6106 -DA:119,6920 +DA:117,11406 +DA:118,6294 +DA:119,7108 DA:120,1017 -DA:121,5903 -DA:122,5902 -DA:123,5902 -DA:124,5902 -DA:130,11020 +DA:121,6091 +DA:122,6090 +DA:123,6090 +DA:124,6090 +DA:130,11406 LF:30 LH:30 BRDA:16,0,0,0 BRDA:16,0,1,1 -BRDA:84,1,0,4687 -BRDA:84,1,1,6334 +BRDA:84,1,0,4885 +BRDA:84,1,1,6522 BRDA:88,2,0,1 -BRDA:88,2,1,11020 -BRDA:88,3,0,11021 -BRDA:88,3,1,11020 +BRDA:88,2,1,11406 +BRDA:88,3,0,11407 +BRDA:88,3,1,11406 BRDA:94,4,0,109 -BRDA:94,4,1,10911 -BRDA:97,5,0,395 -BRDA:97,5,1,10625 +BRDA:94,4,1,11297 +BRDA:97,5,0,405 +BRDA:97,5,1,11001 BRDA:101,6,0,374 -BRDA:101,6,1,10646 +BRDA:101,6,1,11032 BRDA:105,7,0,83 -BRDA:105,7,1,10937 -BRDA:105,8,0,11020 +BRDA:105,7,1,11323 +BRDA:105,8,0,11406 BRDA:105,8,1,83 BRDA:111,9,0,84 -BRDA:111,9,1,10936 -BRDA:117,10,0,6106 -BRDA:117,10,1,4914 +BRDA:111,9,1,11322 +BRDA:117,10,0,6294 +BRDA:117,10,1,5112 BRDA:119,11,0,1017 -BRDA:119,11,1,5903 -BRDA:121,12,0,5902 +BRDA:119,11,1,6091 +BRDA:121,12,0,6090 BRDA:121,12,1,1 -BRDA:123,13,0,5902 +BRDA:123,13,0,6090 BRDA:123,13,1,0 BRF:28 BRH:26 @@ -29127,41 +29127,41 @@ SF:packages/roosterjs-editor-dom/lib/utils/findClosestElementAncestor.ts FN:13,findClosestElementAncestor FNF:1 FNH:1 -FNDA:23189,findClosestElementAncestor +FNDA:26290,findClosestElementAncestor DA:1,1 DA:2,1 DA:13,1 -DA:18,23189 -DA:19,23189 -DA:21,23189 -DA:22,6541 -DA:23,6541 +DA:18,26290 +DA:19,26290 +DA:21,26290 +DA:22,6956 +DA:23,6956 DA:25,0 DA:26,0 -DA:31,23189 +DA:31,26290 LF:11 LH:9 BRDA:18,0,0,30 -BRDA:18,0,1,23159 -BRDA:18,1,0,19335 -BRDA:18,1,1,3824 -BRDA:19,2,0,23020 +BRDA:18,0,1,26260 +BRDA:18,1,0,21184 +BRDA:18,1,1,5076 +BRDA:19,2,0,26121 BRDA:19,2,1,169 -BRDA:19,3,0,23189 -BRDA:19,3,1,23020 -BRDA:21,4,0,6541 -BRDA:21,4,1,16648 -BRDA:21,5,0,23189 -BRDA:21,5,1,23020 -BRDA:22,6,0,6541 +BRDA:19,3,0,26290 +BRDA:19,3,1,26121 +BRDA:21,4,0,6956 +BRDA:21,4,1,19334 +BRDA:21,5,0,26290 +BRDA:21,5,1,26121 +BRDA:22,6,0,6956 BRDA:22,6,1,0 BRDA:25,7,0,0 BRDA:25,7,1,0 BRDA:25,7,2,0 -BRDA:31,8,0,17744 -BRDA:31,8,1,5445 -BRDA:31,9,0,23189 -BRDA:31,9,1,6452 +BRDA:31,8,0,20476 +BRDA:31,8,1,5814 +BRDA:31,9,0,26290 +BRDA:31,9,1,6843 BRF:21 BRH:17 end_of_record @@ -29188,49 +29188,49 @@ FN:40,getComputedStyle FN:44,px2Pt FNF:3 FNH:3 -FNDA:534,getComputedStyles -FNDA:506,getComputedStyle +FNDA:672,getComputedStyles +FNDA:644,getComputedStyle FNDA:45,px2Pt DA:1,1 DA:10,1 -DA:12,538 -DA:14,534 -DA:15,534 -DA:16,534 -DA:17,534 -DA:18,531 -DA:19,531 -DA:21,531 -DA:22,642 -DA:23,642 -DA:24,642 -DA:25,642 -DA:26,642 -DA:31,534 +DA:12,676 +DA:14,672 +DA:15,672 +DA:16,672 +DA:17,672 +DA:18,669 +DA:19,669 +DA:21,669 +DA:22,780 +DA:23,780 +DA:24,780 +DA:25,780 +DA:26,780 +DA:31,672 DA:40,1 -DA:41,506 +DA:41,644 DA:45,45 DA:48,43 DA:50,2 LF:21 LH:21 BRDA:12,0,0,4 -BRDA:12,0,1,530 +BRDA:12,0,1,668 BRDA:16,1,0,27 -BRDA:16,1,1,507 -BRDA:17,2,0,531 +BRDA:16,1,1,645 +BRDA:17,2,0,669 BRDA:17,2,1,3 -BRDA:18,3,0,531 +BRDA:18,3,0,669 BRDA:18,3,1,0 -BRDA:21,4,0,531 +BRDA:21,4,0,669 BRDA:21,4,1,0 -BRDA:23,5,0,642 +BRDA:23,5,0,780 BRDA:23,5,1,73 -BRDA:24,6,0,627 +BRDA:24,6,0,765 BRDA:24,6,1,15 BRDA:25,7,0,45 -BRDA:25,7,1,597 -BRDA:41,8,0,506 +BRDA:25,7,1,735 +BRDA:41,8,0,644 BRDA:41,8,1,74 BRDA:45,9,0,43 BRDA:45,9,1,2 @@ -29312,33 +29312,33 @@ FN:27,getFirstLeafNode FN:35,getLastLeafNode FNF:4 FNH:4 -FNDA:466,getLeafNode -FNDA:1795,(anonymous_1) -FNDA:457,getFirstLeafNode +FNDA:505,getLeafNode +FNDA:1905,(anonymous_1) +FNDA:496,getFirstLeafNode FNDA:9,getLastLeafNode DA:1,1 DA:2,1 -DA:10,1795 -DA:11,466 -DA:12,466 -DA:13,436 -DA:16,466 +DA:10,1905 +DA:11,505 +DA:12,505 +DA:13,452 +DA:16,505 DA:17,35 -DA:20,466 +DA:20,505 DA:27,1 -DA:28,457 +DA:28,496 DA:35,1 DA:36,9 LF:13 LH:13 -BRDA:10,0,0,1766 +BRDA:10,0,0,1876 BRDA:10,0,1,29 -BRDA:12,1,0,902 -BRDA:12,1,1,893 +BRDA:12,1,0,957 +BRDA:12,1,1,948 BRDA:16,2,0,35 -BRDA:16,2,1,431 -BRDA:16,3,0,466 -BRDA:16,3,1,457 +BRDA:16,2,1,470 +BRDA:16,3,0,505 +BRDA:16,3,1,496 BRF:8 BRH:8 end_of_record @@ -29353,84 +29353,84 @@ FN:68,getNextLeafSibling FN:82,getPreviousLeafSibling FNF:7 FNH:7 -FNDA:1379,getLeafSibling -FNDA:1383,(anonymous_1) -FNDA:631,(anonymous_2) -FNDA:1177,(anonymous_3) -FNDA:625,(anonymous_4) -FNDA:203,getNextLeafSibling +FNDA:1727,getLeafSibling +FNDA:1767,(anonymous_1) +FNDA:670,(anonymous_2) +FNDA:1609,(anonymous_3) +FNDA:635,(anonymous_4) +FNDA:337,getNextLeafSibling FNDA:116,getPreviousLeafSibling DA:1,1 DA:2,1 DA:3,1 DA:14,1 -DA:21,1379 -DA:22,1379 -DA:23,1383 -DA:24,631 -DA:25,1379 -DA:26,1379 -DA:27,1354 -DA:28,1354 -DA:30,1354 -DA:33,1371 -DA:34,1371 -DA:35,1371 -DA:36,643 -DA:37,643 -DA:41,1371 -DA:46,617 -DA:50,1371 -DA:51,1371 -DA:53,1354 -DA:54,1354 -DA:59,1379 +DA:21,1727 +DA:22,1727 +DA:23,1767 +DA:24,670 +DA:25,1727 +DA:26,1727 +DA:27,1605 +DA:28,1605 +DA:30,1605 +DA:33,1628 +DA:34,1628 +DA:35,1628 +DA:36,809 +DA:37,809 +DA:41,1628 +DA:46,769 +DA:50,1628 +DA:51,1628 +DA:53,1605 +DA:54,1605 +DA:59,1727 DA:68,1 -DA:73,203 +DA:73,337 DA:82,1 DA:87,116 LF:29 LH:29 -BRDA:23,0,0,984 -BRDA:23,0,1,395 -BRDA:23,1,0,1383 -BRDA:23,1,1,995 +BRDA:23,0,0,1313 +BRDA:23,0,1,414 +BRDA:23,1,0,1767 +BRDA:23,1,1,1251 BRDA:23,2,0,0 -BRDA:23,2,1,1383 -BRDA:23,3,0,1383 -BRDA:23,3,1,1383 -BRDA:24,4,0,631 -BRDA:24,4,1,439 +BRDA:23,2,1,1767 +BRDA:23,3,0,1767 +BRDA:23,3,1,1767 +BRDA:24,4,0,670 +BRDA:24,4,1,468 BRDA:24,5,0,0 -BRDA:24,5,1,631 -BRDA:24,6,0,631 -BRDA:24,6,1,631 -BRDA:25,7,0,984 -BRDA:25,7,1,395 -BRDA:26,8,0,1354 -BRDA:26,8,1,25 -BRDA:33,9,0,1371 +BRDA:24,5,1,670 +BRDA:24,6,0,670 +BRDA:24,6,1,670 +BRDA:25,7,0,1313 +BRDA:25,7,1,414 +BRDA:26,8,0,1605 +BRDA:26,8,1,122 +BRDA:33,9,0,1628 BRDA:33,9,1,0 BRDA:33,10,0,0 -BRDA:33,10,1,1371 -BRDA:33,11,0,1371 -BRDA:33,11,1,1371 -BRDA:35,12,0,2014 -BRDA:35,12,1,1434 -BRDA:37,13,0,643 +BRDA:33,10,1,1628 +BRDA:33,11,0,1628 +BRDA:33,11,1,1628 +BRDA:35,12,0,2437 +BRDA:35,12,1,1719 +BRDA:37,13,0,809 BRDA:37,13,1,0 BRDA:37,14,0,0 -BRDA:37,14,1,643 -BRDA:37,15,0,643 -BRDA:37,15,1,643 -BRDA:42,16,0,1988 -BRDA:42,16,1,1197 -BRDA:42,16,2,552 -BRDA:42,16,3,1185 -BRDA:50,17,0,1371 -BRDA:50,17,1,580 -BRDA:51,18,0,1354 -BRDA:51,18,1,17 +BRDA:37,14,1,809 +BRDA:37,15,0,809 +BRDA:37,15,1,809 +BRDA:42,16,0,2397 +BRDA:42,16,1,1487 +BRDA:42,16,2,627 +BRDA:42,16,3,1475 +BRDA:50,17,0,1628 +BRDA:50,17,1,718 +BRDA:51,18,0,1605 +BRDA:51,18,1,23 BRF:40 BRH:34 end_of_record @@ -29459,15 +29459,15 @@ SF:packages/roosterjs-editor-dom/lib/utils/getTagOfNode.ts FN:8,getTagOfNode FNF:1 FNH:1 -FNDA:29121,getTagOfNode +FNDA:34015,getTagOfNode DA:8,1 -DA:9,29121 +DA:9,34015 LF:2 LH:2 -BRDA:9,0,0,21359 -BRDA:9,0,1,7762 -BRDA:9,1,0,29121 -BRDA:9,1,1,29057 +BRDA:9,0,0,24499 +BRDA:9,0,1,9516 +BRDA:9,1,0,34015 +BRDA:9,1,1,33942 BRF:4 BRH:4 end_of_record @@ -29476,18 +29476,18 @@ SF:packages/roosterjs-editor-dom/lib/utils/isBlockElement.ts FN:13,isBlockElement FNF:1 FNH:1 -FNDA:7729,isBlockElement +FNDA:9601,isBlockElement DA:1,1 DA:3,1 DA:6,1 DA:13,1 -DA:14,7729 -DA:15,7729 +DA:14,9601 +DA:15,9601 LF:6 LH:6 -BRDA:16,0,0,7729 -BRDA:16,0,1,4912 -BRDA:16,0,2,4912 +BRDA:16,0,0,9601 +BRDA:16,0,1,6223 +BRDA:16,0,2,6223 BRF:3 BRH:3 end_of_record @@ -29496,14 +29496,14 @@ SF:packages/roosterjs-editor-dom/lib/utils/isNodeAfter.ts FN:9,isNodeAfter FNF:1 FNH:1 -FNDA:2074,isNodeAfter +FNDA:2645,isNodeAfter DA:9,1 -DA:10,2074 +DA:10,2645 LF:2 LH:2 -BRDA:11,0,0,2074 -BRDA:11,0,1,2072 -BRDA:11,0,2,2071 +BRDA:11,0,0,2645 +BRDA:11,0,1,2643 +BRDA:11,0,2,2642 BRF:3 BRH:3 end_of_record @@ -29513,47 +29513,47 @@ FN:15,isNodeEmpty FN:41,trim FNF:2 FNH:2 -FNDA:90,isNodeEmpty -FNDA:88,trim +FNDA:92,isNodeEmpty +FNDA:90,trim DA:1,1 DA:4,1 DA:5,1 DA:6,1 DA:15,1 -DA:20,90 +DA:20,92 DA:21,2 -DA:22,88 +DA:22,90 DA:23,21 -DA:24,67 -DA:25,67 -DA:26,67 -DA:27,67 -DA:30,67 -DA:35,46 +DA:24,69 +DA:25,69 +DA:26,69 +DA:27,69 +DA:30,69 +DA:35,48 DA:38,21 -DA:42,88 -DA:43,88 +DA:42,90 +DA:43,90 LF:18 LH:18 BRDA:20,0,0,2 -BRDA:20,0,1,88 +BRDA:20,0,1,90 BRDA:22,1,0,21 -BRDA:22,1,1,67 +BRDA:22,1,1,69 BRDA:23,2,0,21 BRDA:23,2,1,2 -BRDA:24,3,0,67 +BRDA:24,3,0,69 BRDA:24,3,1,0 -BRDA:26,4,0,67 +BRDA:26,4,0,69 BRDA:26,4,1,30 BRDA:28,5,0,12 -BRDA:28,5,1,55 -BRDA:30,6,0,46 +BRDA:28,5,1,57 +BRDA:30,6,0,48 BRDA:30,6,1,21 -BRDA:31,7,0,67 +BRDA:31,7,0,69 BRDA:31,7,1,32 BRDA:31,7,2,29 BRDA:43,8,0,32 -BRDA:43,8,1,56 +BRDA:43,8,1,58 BRF:19 BRH:18 end_of_record @@ -29562,15 +29562,15 @@ SF:packages/roosterjs-editor-dom/lib/utils/isVoidHtmlElement.ts FN:17,isVoidHtmlElement FNF:1 FNH:1 -FNDA:1560,isVoidHtmlElement +FNDA:1869,isVoidHtmlElement DA:1,1 DA:9,1 DA:17,1 -DA:18,1560 +DA:18,1869 LF:4 LH:4 -BRDA:18,0,0,1560 -BRDA:18,0,1,1559 +BRDA:18,0,0,1869 +BRDA:18,0,1,1868 BRF:2 BRH:2 end_of_record @@ -29643,24 +29643,24 @@ SF:packages/roosterjs-editor-dom/lib/utils/moveChildNodes.ts FN:7,moveChildNodes FNF:1 FNH:1 -FNDA:718,moveChildNodes +FNDA:838,moveChildNodes DA:7,1 -DA:12,718 +DA:12,838 DA:13,4 -DA:16,714 -DA:17,391 -DA:20,714 -DA:21,379 +DA:16,834 +DA:17,516 +DA:20,834 +DA:21,372 LF:7 LH:7 BRDA:12,0,0,4 -BRDA:12,0,1,714 -BRDA:16,1,0,1105 -BRDA:16,1,1,1089 -BRDA:20,2,0,403 -BRDA:20,2,1,690 -BRDA:20,3,0,1093 -BRDA:20,3,1,1089 +BRDA:12,0,1,834 +BRDA:16,1,0,1350 +BRDA:16,1,1,1334 +BRDA:20,2,0,526 +BRDA:20,2,1,680 +BRDA:20,3,0,1206 +BRDA:20,3,1,1202 BRF:8 BRH:8 end_of_record @@ -29730,70 +29730,70 @@ FN:81,checkPosition FN:82,(anonymous_4) FNF:5 FNH:5 -FNDA:11343,queryElements -FNDA:723,(anonymous_1) -FNDA:723,isIntersectWithNodeRange -FNDA:2384,checkPosition -FNDA:4726,(anonymous_4) +FNDA:12224,queryElements +FNDA:842,(anonymous_1) +FNDA:842,isIntersectWithNodeRange +FNDA:2794,checkPosition +FNDA:5370,(anonymous_4) DA:1,1 DA:14,1 -DA:18,11959 -DA:21,11343 +DA:18,12899 +DA:21,12224 DA:22,6 -DA:25,11337 -DA:27,11337 -DA:28,1556 -DA:29,389 -DA:30,217 -DA:34,217 -DA:37,389 -DA:42,389 -DA:43,723 -DA:52,11337 -DA:53,795 -DA:55,11337 -DA:64,723 -DA:65,723 -DA:66,723 -DA:68,723 -DA:69,605 -DA:72,723 -DA:82,2384 -DA:83,4726 +DA:25,12218 +DA:27,12218 +DA:28,1940 +DA:29,485 +DA:30,266 +DA:34,266 +DA:37,485 +DA:42,485 +DA:43,842 +DA:52,12218 +DA:53,901 +DA:55,12218 +DA:64,842 +DA:65,842 +DA:66,842 +DA:68,842 +DA:69,611 +DA:72,842 +DA:82,2794 +DA:83,5370 LF:25 LH:25 -BRDA:18,0,0,616 -BRDA:18,0,1,10727 +BRDA:18,0,0,675 +BRDA:18,0,1,11549 BRDA:21,1,0,6 -BRDA:21,1,1,11337 -BRDA:21,2,0,11343 -BRDA:21,2,1,11340 -BRDA:27,3,0,389 -BRDA:27,3,1,10948 -BRDA:27,4,0,11337 -BRDA:27,4,1,389 -BRDA:29,5,0,217 -BRDA:29,5,1,172 -BRDA:29,6,0,389 -BRDA:29,6,1,235 -BRDA:34,7,0,217 +BRDA:21,1,1,12218 +BRDA:21,2,0,12224 +BRDA:21,2,1,12221 +BRDA:27,3,0,485 +BRDA:27,3,1,11733 +BRDA:27,4,0,12218 +BRDA:27,4,1,485 +BRDA:29,5,0,266 +BRDA:29,5,1,219 +BRDA:29,6,0,485 +BRDA:29,6,1,290 +BRDA:34,7,0,266 BRDA:34,7,1,13 -BRDA:39,8,0,174 -BRDA:39,8,1,215 -BRDA:38,9,0,389 -BRDA:38,9,1,239 -BRDA:38,9,2,221 -BRDA:52,10,0,795 -BRDA:52,10,1,10542 -BRDA:68,11,0,605 -BRDA:68,11,1,118 -BRDA:73,12,0,723 -BRDA:73,12,1,619 -BRDA:73,12,2,584 -BRDA:73,12,3,374 +BRDA:39,8,0,206 +BRDA:39,8,1,279 +BRDA:38,9,0,485 +BRDA:38,9,1,290 +BRDA:38,9,2,266 +BRDA:52,10,0,901 +BRDA:52,10,1,11317 +BRDA:68,11,0,611 +BRDA:68,11,1,231 +BRDA:73,12,0,842 +BRDA:73,12,1,731 +BRDA:73,12,2,696 +BRDA:73,12,3,441 BRDA:73,12,4,84 -BRDA:84,13,0,1342 -BRDA:84,13,1,3384 +BRDA:84,13,0,1573 +BRDA:84,13,1,3797 BRF:32 BRH:32 end_of_record @@ -29828,46 +29828,46 @@ FN:11,getTargetWindow FN:29,safeInstanceOf FNF:2 FNH:2 -FNDA:20699,getTargetWindow -FNDA:49975,safeInstanceOf +FNDA:23119,getTargetWindow +FNDA:56729,safeInstanceOf DA:11,1 -DA:13,20699 -DA:20,20699 -DA:21,20699 +DA:13,23119 +DA:20,23119 +DA:21,23119 DA:29,1 -DA:33,49975 -DA:34,29278 -DA:40,20697 -DA:41,20697 -DA:42,20697 -DA:43,20697 -DA:44,20697 +DA:33,56729 +DA:34,33612 +DA:40,23117 +DA:41,23117 +DA:42,23117 +DA:43,23117 +DA:44,23117 LF:12 LH:12 -BRDA:13,0,0,20699 -BRDA:13,0,1,10837 -BRDA:13,0,2,703 +BRDA:13,0,0,23119 +BRDA:13,0,1,12886 +BRDA:13,0,2,907 BRDA:16,1,0,0 -BRDA:16,1,1,703 -BRDA:20,2,0,20699 -BRDA:20,2,1,10134 -BRDA:20,2,2,574 -BRDA:33,3,0,29278 -BRDA:33,3,1,20697 -BRDA:35,4,0,29278 -BRDA:35,4,1,2727 +BRDA:16,1,1,907 +BRDA:20,2,0,23119 +BRDA:20,2,1,11979 +BRDA:20,2,2,681 +BRDA:33,3,0,33612 +BRDA:33,3,1,23117 +BRDA:35,4,0,33612 +BRDA:35,4,1,3353 BRDA:36,5,0,0 -BRDA:36,5,1,2727 -BRDA:36,6,0,2727 -BRDA:36,6,1,2727 -BRDA:41,7,0,20697 -BRDA:41,7,1,10132 -BRDA:43,8,0,20697 -BRDA:43,8,1,20697 -BRDA:45,9,0,20697 -BRDA:45,9,1,20697 -BRDA:45,9,2,13802 -BRDA:45,9,3,3237 +BRDA:36,5,1,3353 +BRDA:36,6,0,3353 +BRDA:36,6,1,3353 +BRDA:41,7,0,23117 +BRDA:41,7,1,11977 +BRDA:43,8,0,23117 +BRDA:43,8,1,23117 +BRDA:45,9,0,23117 +BRDA:45,9,1,23117 +BRDA:45,9,2,15153 +BRDA:45,9,3,4013 BRF:24 BRH:22 end_of_record @@ -29881,7 +29881,7 @@ FN:131,calculateLightness FNF:5 FNH:5 FNDA:1,(anonymous_0) -FNDA:13960,setColor +FNDA:14554,setColor FNDA:58,adaptFontColorToBackgroundColor FNDA:7,isADarkOrBrightColor FNDA:7,calculateLightness @@ -29897,14 +29897,14 @@ DA:11,1 DA:15,1 DA:17,1 DA:29,1 -DA:37,13960 -DA:38,13960 -DA:39,13960 -DA:41,13960 -DA:42,13960 -DA:43,13897 -DA:49,13897 -DA:52,13960 +DA:37,14554 +DA:38,14554 +DA:39,14554 +DA:41,14554 +DA:42,14554 +DA:43,14491 +DA:49,14491 +DA:52,14554 DA:53,58 DA:77,58 DA:78,51 @@ -29933,32 +29933,32 @@ LF:44 LH:40 BRDA:8,0,0,1 BRDA:8,0,1,1 -BRDA:37,1,0,114 -BRDA:37,1,1,13846 -BRDA:38,2,0,114 -BRDA:38,2,1,13846 -BRDA:39,3,0,4708 -BRDA:39,3,1,9252 -BRDA:41,4,0,13960 +BRDA:37,1,0,153 +BRDA:37,1,1,14401 +BRDA:38,2,0,153 +BRDA:38,2,1,14401 +BRDA:39,3,0,4903 +BRDA:39,3,1,9651 +BRDA:41,4,0,14554 BRDA:41,4,1,0 -BRDA:41,5,0,13960 -BRDA:41,5,1,13846 -BRDA:42,6,0,13897 +BRDA:41,5,0,14554 +BRDA:41,5,1,14401 +BRDA:42,6,0,14491 BRDA:42,6,1,63 -BRDA:44,7,0,13897 -BRDA:44,7,1,61 -BRDA:44,8,0,61 -BRDA:44,8,1,13836 -BRDA:44,9,0,13897 -BRDA:44,9,1,13836 -BRDA:46,10,0,61 -BRDA:46,10,1,13836 -BRDA:46,11,0,13897 -BRDA:46,11,1,13836 +BRDA:44,7,0,14491 +BRDA:44,7,1,100 +BRDA:44,8,0,100 +BRDA:44,8,1,14391 +BRDA:44,9,0,14491 +BRDA:44,9,1,14391 +BRDA:46,10,0,100 +BRDA:46,10,1,14391 +BRDA:46,11,0,14491 +BRDA:46,11,1,14391 BRDA:52,12,0,58 -BRDA:52,12,1,13902 -BRDA:52,13,0,13960 -BRDA:52,13,1,4708 +BRDA:52,12,1,14496 +BRDA:52,13,0,14554 +BRDA:52,13,1,4903 BRDA:55,14,0,58 BRDA:55,14,1,58 BRDA:55,15,0,58 @@ -29985,52 +29985,52 @@ SF:packages/roosterjs-editor-dom/lib/utils/shouldSkipNode.ts FN:21,shouldSkipNode FNF:1 FNH:1 -FNDA:1510,shouldSkipNode +FNDA:1843,shouldSkipNode DA:1,1 DA:2,1 DA:5,1 DA:6,1 DA:21,1 -DA:22,1510 -DA:23,1131 -DA:24,34 -DA:25,1097 -DA:26,12 -DA:28,1085 -DA:30,379 -DA:31,379 +DA:22,1843 +DA:23,1377 +DA:24,33 +DA:25,1344 +DA:26,20 +DA:28,1324 +DA:30,466 +DA:31,466 DA:32,1 -DA:35,378 -DA:37,378 -DA:41,139 -DA:42,99 -DA:43,90 -DA:46,49 -DA:50,239 +DA:35,465 +DA:37,465 +DA:41,185 +DA:42,123 +DA:43,112 +DA:46,73 +DA:50,280 DA:53,0 LF:22 LH:21 -BRDA:22,0,0,1131 -BRDA:22,0,1,379 -BRDA:23,1,0,34 -BRDA:23,1,1,1097 -BRDA:23,2,0,1131 -BRDA:23,2,1,1106 -BRDA:23,2,2,1106 -BRDA:25,3,0,12 -BRDA:25,3,1,1085 -BRDA:25,4,0,1097 -BRDA:25,4,1,112 -BRDA:30,5,0,379 +BRDA:22,0,0,1377 +BRDA:22,0,1,466 +BRDA:23,1,0,33 +BRDA:23,1,1,1344 +BRDA:23,2,0,1377 +BRDA:23,2,1,1353 +BRDA:23,2,2,1353 +BRDA:25,3,0,20 +BRDA:25,3,1,1324 +BRDA:25,4,0,1344 +BRDA:25,4,1,130 +BRDA:30,5,0,466 BRDA:30,5,1,0 BRDA:31,6,0,1 -BRDA:31,6,1,378 -BRDA:37,7,0,139 -BRDA:37,7,1,239 -BRDA:37,8,0,378 -BRDA:37,8,1,261 -BRDA:42,9,0,90 -BRDA:42,9,1,9 +BRDA:31,6,1,465 +BRDA:37,7,0,185 +BRDA:37,7,1,280 +BRDA:37,8,0,465 +BRDA:37,8,1,326 +BRDA:42,9,0,112 +BRDA:42,9,1,11 BRF:21 BRH:20 end_of_record @@ -30040,69 +30040,69 @@ FN:14,splitParentNode FN:51,splitBalancedNodeRange FNF:2 FNH:2 -FNDA:271,splitParentNode -FNDA:88,splitBalancedNodeRange +FNDA:379,splitParentNode +FNDA:142,splitBalancedNodeRange DA:1,1 DA:14,1 -DA:15,271 +DA:15,379 DA:16,2 -DA:19,269 -DA:20,269 -DA:21,269 -DA:22,269 -DA:23,126 -DA:24,93 -DA:27,143 -DA:28,123 -DA:33,269 -DA:34,164 -DA:39,105 -DA:42,269 +DA:19,377 +DA:20,377 +DA:21,377 +DA:22,377 +DA:23,180 +DA:24,97 +DA:27,197 +DA:28,138 +DA:33,377 +DA:34,173 +DA:39,204 +DA:42,377 DA:51,1 -DA:52,88 -DA:53,88 -DA:54,88 -DA:55,88 -DA:56,86 +DA:52,142 +DA:53,142 +DA:54,142 +DA:55,142 +DA:56,140 DA:57,1 DA:58,1 DA:59,1 -DA:61,86 -DA:62,86 -DA:65,88 +DA:61,140 +DA:62,140 +DA:65,142 LF:28 LH:28 BRDA:15,0,0,2 -BRDA:15,0,1,269 -BRDA:15,1,0,271 -BRDA:15,1,1,269 -BRDA:22,2,0,126 -BRDA:22,2,1,143 -BRDA:23,3,0,219 -BRDA:23,3,1,219 -BRDA:33,4,0,164 -BRDA:33,4,1,105 -BRDA:33,5,0,269 -BRDA:33,5,1,166 +BRDA:15,0,1,377 +BRDA:15,1,0,379 +BRDA:15,1,1,377 +BRDA:22,2,0,180 +BRDA:22,2,1,197 +BRDA:23,3,0,277 +BRDA:23,3,1,277 +BRDA:33,4,0,173 +BRDA:33,4,1,204 +BRDA:33,5,0,377 +BRDA:33,5,1,175 BRDA:34,6,0,0 -BRDA:34,6,1,164 -BRDA:34,7,0,164 -BRDA:34,7,1,164 -BRDA:36,8,0,69 -BRDA:36,8,1,95 -BRDA:52,9,0,31 -BRDA:52,9,1,57 -BRDA:53,10,0,31 -BRDA:53,10,1,57 -BRDA:54,11,0,86 +BRDA:34,6,1,173 +BRDA:34,7,0,173 +BRDA:34,7,1,173 +BRDA:36,8,0,73 +BRDA:36,8,1,100 +BRDA:52,9,0,35 +BRDA:52,9,1,107 +BRDA:53,10,0,35 +BRDA:53,10,1,107 +BRDA:54,11,0,140 BRDA:54,11,1,2 -BRDA:54,12,0,88 -BRDA:54,12,1,87 -BRDA:54,12,2,86 -BRDA:55,13,0,86 +BRDA:54,12,0,142 +BRDA:54,12,1,141 +BRDA:54,12,2,140 +BRDA:55,13,0,140 BRDA:55,13,1,2 BRDA:56,14,0,1 -BRDA:56,14,1,85 +BRDA:56,14,1,139 BRF:31 BRH:30 end_of_record @@ -30151,21 +30151,21 @@ SF:packages/roosterjs-editor-dom/lib/utils/unwrap.ts FN:5,unwrap FNF:1 FNH:1 -FNDA:253,unwrap +FNDA:324,unwrap DA:5,1 -DA:7,253 -DA:8,253 +DA:7,324 +DA:8,324 DA:9,12 -DA:12,241 -DA:13,256 -DA:16,241 -DA:17,241 +DA:12,312 +DA:13,361 +DA:16,312 +DA:17,312 LF:8 LH:8 -BRDA:7,0,0,252 +BRDA:7,0,0,323 BRDA:7,0,1,1 BRDA:8,1,0,12 -BRDA:8,1,1,241 +BRDA:8,1,1,312 BRF:4 BRH:4 end_of_record @@ -30174,47 +30174,47 @@ SF:packages/roosterjs-editor-dom/lib/utils/wrap.ts FN:48,wrap FNF:1 FNH:1 -FNDA:163,wrap +FNDA:255,wrap DA:1,1 DA:2,1 DA:3,1 DA:48,1 -DA:57,163 -DA:58,163 +DA:57,255 +DA:58,255 DA:59,3 -DA:62,160 -DA:63,36 -DA:66,160 -DA:67,160 -DA:69,160 -DA:70,141 -DA:74,19 -DA:78,160 -DA:80,160 -DA:81,143 -DA:84,182 -DA:85,182 -DA:88,160 +DA:62,252 +DA:63,60 +DA:66,252 +DA:67,252 +DA:69,252 +DA:70,223 +DA:74,29 +DA:78,252 +DA:80,252 +DA:81,235 +DA:84,275 +DA:85,275 +DA:88,252 LF:20 LH:20 BRDA:57,0,0,2 -BRDA:57,0,1,161 -BRDA:57,1,0,111 -BRDA:57,1,1,50 +BRDA:57,0,1,253 +BRDA:57,1,0,192 +BRDA:57,1,1,61 BRDA:58,2,0,3 -BRDA:58,2,1,160 -BRDA:58,3,0,163 -BRDA:58,3,1,160 -BRDA:58,3,2,160 -BRDA:62,4,0,36 -BRDA:62,4,1,124 -BRDA:66,5,0,160 +BRDA:58,2,1,252 +BRDA:58,3,0,255 +BRDA:58,3,1,252 +BRDA:58,3,2,252 +BRDA:62,4,0,60 +BRDA:62,4,1,192 +BRDA:66,5,0,252 BRDA:66,5,1,0 -BRDA:69,6,0,141 -BRDA:69,6,1,19 -BRDA:71,7,0,137 +BRDA:69,6,0,223 +BRDA:69,6,1,29 +BRDA:71,7,0,219 BRDA:71,7,1,4 -BRDA:80,8,0,143 +BRDA:80,8,0,235 BRDA:80,8,1,17 BRF:19 BRH:18 @@ -30636,9 +30636,9 @@ FNDA:5,ContentEdit FNDA:0,(anonymous_2) FNDA:3,(anonymous_3) FNDA:120,(anonymous_4) -FNDA:108,(anonymous_5) +FNDA:102,(anonymous_5) FNDA:2,(anonymous_6) -FNDA:72,(anonymous_7) +FNDA:68,(anonymous_7) FNDA:2,(anonymous_8) DA:1,1 DA:2,1 @@ -30656,12 +30656,12 @@ DA:50,3 DA:51,120 DA:53,120 DA:55,120 -DA:59,108 +DA:59,102 DA:62,3 -DA:63,108 +DA:63,102 DA:66,2 DA:67,2 -DA:68,72 +DA:68,68 DA:70,2 DA:76,1 DA:77,2 @@ -30671,8 +30671,8 @@ LF:27 LH:26 BRDA:53,0,0,120 BRDA:53,0,1,0 -BRDA:55,1,0,108 -BRDA:55,1,1,12 +BRDA:55,1,0,102 +BRDA:55,1,1,18 BRDA:56,2,0,120 BRDA:56,2,1,0 BRDA:56,2,2,120 @@ -30684,9 +30684,9 @@ BRDA:56,4,1,0 BRDA:62,5,0,3 BRDA:62,5,1,3 BRDA:63,6,0,0 -BRDA:63,6,1,108 -BRDA:63,7,0,108 -BRDA:63,7,1,108 +BRDA:63,6,1,102 +BRDA:63,7,0,102 +BRDA:63,7,1,102 BRDA:67,8,0,2 BRDA:67,8,1,0 BRF:20 @@ -30941,34 +30941,34 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/cursorFeat FN:12,(anonymous_0) FN:31,(anonymous_1) FNF:2 -FNH:0 -FNDA:0,(anonymous_0) -FNDA:0,(anonymous_1) +FNH:2 +FNDA:10,(anonymous_0) +FNDA:2,(anonymous_1) DA:1,1 DA:9,1 -DA:13,0 -DA:16,0 -DA:23,0 -DA:26,0 -DA:27,0 -DA:29,0 -DA:32,0 +DA:13,10 +DA:16,10 +DA:23,6 +DA:26,4 +DA:27,4 +DA:29,4 +DA:32,2 DA:40,1 LF:10 -LH:3 -BRDA:16,0,0,0 -BRDA:16,0,1,0 -BRDA:17,1,0,0 -BRDA:17,1,1,0 -BRDA:17,1,2,0 -BRDA:17,1,3,0 -BRDA:17,1,4,0 -BRDA:29,2,0,0 -BRDA:29,2,1,0 -BRDA:29,2,2,0 -BRDA:29,2,3,0 +LH:10 +BRDA:16,0,0,6 +BRDA:16,0,1,4 +BRDA:17,1,0,10 +BRDA:17,1,1,8 +BRDA:17,1,2,8 +BRDA:17,1,3,6 +BRDA:17,1,4,6 +BRDA:29,2,0,4 +BRDA:29,2,1,2 +BRDA:29,2,2,3 +BRDA:29,2,3,2 BRF:11 -BRH:0 +BRH:11 end_of_record TN: SF:packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/entityFeatures.ts @@ -32663,19 +32663,19 @@ FN:144,shouldSetIndentation FN:175,isRangeEmpty FN:188,insertTab FNF:12 -FNH:5 +FNH:10 FNDA:5,(anonymous_0) -FNDA:0,(anonymous_1) -FNDA:0,(anonymous_2) -FNDA:0,(anonymous_3) +FNDA:14,(anonymous_1) +FNDA:14,(anonymous_2) +FNDA:2,(anonymous_3) FNDA:4,(anonymous_4) FNDA:1,(anonymous_5) FNDA:1,(anonymous_6) FNDA:0,(anonymous_7) FNDA:0,(anonymous_8) -FNDA:1,shouldSetIndentation -FNDA:0,isRangeEmpty -FNDA:0,insertTab +FNDA:13,shouldSetIndentation +FNDA:21,isRangeEmpty +FNDA:4,insertTab DA:1,1 DA:2,1 DA:24,1 @@ -32686,20 +32686,20 @@ DA:42,5 DA:47,5 DA:53,5 DA:59,0 -DA:62,0 -DA:63,0 -DA:64,0 -DA:65,0 -DA:66,0 -DA:68,0 -DA:69,0 -DA:70,0 -DA:71,0 -DA:73,0 -DA:74,0 -DA:75,0 -DA:76,0 -DA:81,0 +DA:62,14 +DA:63,14 +DA:64,14 +DA:65,14 +DA:66,2 +DA:68,12 +DA:69,12 +DA:70,12 +DA:71,10 +DA:73,2 +DA:74,2 +DA:75,2 +DA:76,2 +DA:81,14 DA:90,1 DA:93,4 DA:97,3 @@ -32711,45 +32711,45 @@ DA:121,1 DA:124,0 DA:127,0 DA:135,1 -DA:145,1 -DA:147,1 -DA:148,1 -DA:149,1 -DA:150,1 -DA:152,1 +DA:145,13 +DA:147,13 +DA:148,13 +DA:149,13 +DA:150,13 +DA:152,13 DA:153,0 -DA:156,1 -DA:158,1 -DA:161,0 -DA:162,0 -DA:164,0 -DA:165,0 -DA:167,0 -DA:168,0 -DA:171,0 -DA:176,0 -DA:189,0 -DA:190,0 -DA:191,0 +DA:156,13 +DA:158,2 +DA:161,11 +DA:162,11 +DA:164,11 +DA:165,11 +DA:167,11 +DA:168,9 +DA:171,11 +DA:176,21 +DA:189,4 +DA:190,4 +DA:191,4 DA:192,0 -DA:194,0 -DA:195,0 -DA:196,0 -DA:198,0 -DA:199,0 -DA:200,0 -DA:202,0 -DA:203,0 -DA:204,0 -DA:205,0 -DA:206,0 -DA:207,0 -DA:209,0 -DA:214,0 -DA:215,0 -DA:216,0 +DA:194,4 +DA:195,4 +DA:196,4 +DA:198,4 +DA:199,4 +DA:200,19 +DA:202,4 +DA:203,4 +DA:204,1 +DA:205,1 +DA:206,1 +DA:207,1 +DA:209,4 +DA:214,4 +DA:215,4 +DA:216,1 LF:72 -LH:26 +LH:67 BRDA:37,0,0,5 BRDA:37,0,1,0 BRDA:38,1,0,5 @@ -32758,12 +32758,12 @@ BRDA:54,2,0,5 BRDA:54,2,1,4 BRDA:55,3,0,1 BRDA:55,3,1,3 -BRDA:63,4,0,0 +BRDA:63,4,0,14 BRDA:63,4,1,0 -BRDA:65,5,0,0 -BRDA:65,5,1,0 -BRDA:70,6,0,0 -BRDA:70,6,1,0 +BRDA:65,5,0,2 +BRDA:65,5,1,12 +BRDA:70,6,0,10 +BRDA:70,6,1,2 BRDA:93,7,0,3 BRDA:93,7,1,1 BRDA:94,8,0,4 @@ -32774,28 +32774,28 @@ BRDA:100,9,2,3 BRDA:100,9,3,1 BRDA:100,9,4,1 BRDA:152,10,0,0 -BRDA:152,10,1,1 -BRDA:152,11,0,1 -BRDA:152,11,1,1 -BRDA:156,12,0,1 -BRDA:156,12,1,0 -BRDA:167,13,0,0 -BRDA:167,13,1,0 -BRDA:167,14,0,0 -BRDA:167,14,1,0 -BRDA:167,14,2,0 -BRDA:177,15,0,0 -BRDA:177,15,1,0 +BRDA:152,10,1,13 +BRDA:152,11,0,13 +BRDA:152,11,1,13 +BRDA:156,12,0,2 +BRDA:156,12,1,11 +BRDA:167,13,0,9 +BRDA:167,13,1,2 +BRDA:167,14,0,11 +BRDA:167,14,1,11 +BRDA:167,14,2,10 +BRDA:177,15,0,21 +BRDA:177,15,1,19 BRDA:191,16,0,0 -BRDA:191,16,1,0 -BRDA:203,17,0,0 -BRDA:203,17,1,0 -BRDA:203,18,0,0 -BRDA:203,18,1,0 -BRDA:215,19,0,0 -BRDA:215,19,1,0 +BRDA:191,16,1,4 +BRDA:203,17,0,1 +BRDA:203,17,1,3 +BRDA:203,18,0,4 +BRDA:203,18,1,1 +BRDA:215,19,0,1 +BRDA:215,19,1,3 BRF:44 -BRH:20 +BRH:40 end_of_record TN: SF:packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/convertAlphaToDecimals.ts @@ -33654,22 +33654,22 @@ FN:749,isASmallImage FN:754,getColorString FN:761,setFlipped FNF:39 -FNH:35 +FNH:33 FNDA:1,(anonymous_0) FNDA:25,ImageEdit -FNDA:20,(anonymous_2) -FNDA:108,(anonymous_3) +FNDA:0,(anonymous_2) +FNDA:80,(anonymous_3) FNDA:31,(anonymous_4) FNDA:0,(anonymous_5) FNDA:25,(anonymous_6) -FNDA:20,(anonymous_7) +FNDA:0,(anonymous_7) FNDA:0,(anonymous_8) FNDA:25,(anonymous_9) -FNDA:202,(anonymous_10) +FNDA:186,(anonymous_10) FNDA:1,(anonymous_11) FNDA:0,(anonymous_12) -FNDA:70,(anonymous_13) -FNDA:22,(anonymous_14) +FNDA:53,(anonymous_13) +FNDA:10,(anonymous_14) FNDA:8,(anonymous_15) FNDA:2,(anonymous_16) FNDA:31,(anonymous_17) @@ -33678,7 +33678,7 @@ FNDA:142,(anonymous_19) FNDA:31,(anonymous_20) FNDA:84,(anonymous_21) FNDA:101,(anonymous_22) -FNDA:51,(anonymous_23) +FNDA:35,(anonymous_23) FNDA:101,(anonymous_24) FNDA:0,setSize FNDA:31,setWrapperSizeDimensions @@ -33734,7 +33734,7 @@ DA:167,0 DA:174,25 DA:175,25 DA:176,25 -DA:177,20 +DA:177,0 DA:179,0 DA:180,0 DA:189,1 @@ -33743,7 +33743,7 @@ DA:191,25 DA:192,25 DA:193,25 DA:200,1 -DA:201,202 +DA:201,186 DA:203,40 DA:209,40 DA:212,40 @@ -33754,8 +33754,8 @@ DA:222,1 DA:224,1 DA:226,1 DA:227,1 -DA:230,57 -DA:231,57 +DA:230,45 +DA:231,45 DA:235,1 DA:236,1 DA:238,1 @@ -33764,25 +33764,25 @@ DA:244,25 DA:245,25 DA:254,1 DA:255,0 -DA:277,70 -DA:282,70 -DA:283,70 -DA:285,70 -DA:294,26 -DA:298,26 +DA:277,53 +DA:282,53 +DA:283,53 +DA:285,53 +DA:294,10 +DA:298,10 DA:299,0 -DA:303,26 -DA:313,26 -DA:315,26 -DA:317,26 +DA:303,10 +DA:313,10 +DA:315,10 +DA:317,10 DA:318,0 -DA:321,26 -DA:322,26 -DA:323,26 -DA:324,26 -DA:325,26 -DA:326,26 -DA:329,70 +DA:321,10 +DA:322,10 +DA:323,10 +DA:324,10 +DA:325,10 +DA:326,10 +DA:329,53 DA:331,21 DA:332,21 DA:335,21 @@ -33818,7 +33818,7 @@ DA:404,2 DA:405,2 DA:406,2 DA:412,25 -DA:413,20 +DA:413,0 DA:418,31 DA:419,31 DA:421,31 @@ -33853,10 +33853,10 @@ DA:482,31 DA:483,31 DA:485,31 DA:492,25 -DA:493,108 +DA:493,80 DA:494,31 -DA:496,108 -DA:497,108 +DA:496,80 +DA:497,80 DA:504,25 DA:505,31 DA:506,31 @@ -33916,7 +33916,7 @@ DA:619,84 DA:622,101 DA:642,1 DA:643,101 -DA:644,51 +DA:644,35 DA:646,1 DA:657,0 DA:658,0 @@ -33961,9 +33961,9 @@ DA:756,31 DA:758,0 DA:766,31 LF:266 -LH:238 +LH:236 BRDA:493,0,0,31 -BRDA:493,0,1,77 +BRDA:493,0,1,49 BRDA:506,1,0,31 BRDA:506,1,1,0 BRDA:507,2,0,31 @@ -34016,7 +34016,7 @@ BRDA:191,22,1,25 BRDA:202,23,0,40 BRDA:202,23,1,1 BRDA:202,23,2,1 -BRDA:202,23,3,57 +BRDA:202,23,3,45 BRDA:202,23,4,1 BRDA:202,23,5,25 BRDA:203,24,0,40 @@ -34038,31 +34038,31 @@ BRDA:235,29,1,1 BRDA:235,30,0,1 BRDA:235,30,1,1 BRDA:282,31,0,43 -BRDA:282,31,1,27 +BRDA:282,31,1,10 BRDA:283,32,0,43 -BRDA:283,32,1,27 -BRDA:285,33,0,26 -BRDA:285,33,1,44 -BRDA:286,34,0,70 -BRDA:286,34,1,27 -BRDA:286,34,2,26 -BRDA:286,34,3,26 -BRDA:286,34,4,26 -BRDA:286,34,5,26 +BRDA:283,32,1,10 +BRDA:285,33,0,10 +BRDA:285,33,1,43 +BRDA:286,34,0,53 +BRDA:286,34,1,10 +BRDA:286,34,2,10 +BRDA:286,34,3,10 +BRDA:286,34,4,10 +BRDA:286,34,5,10 BRDA:298,35,0,0 -BRDA:298,35,1,26 -BRDA:308,36,0,26 -BRDA:308,36,1,11 +BRDA:298,35,1,10 +BRDA:308,36,0,10 +BRDA:308,36,1,10 BRDA:317,37,0,0 -BRDA:317,37,1,26 +BRDA:317,37,1,10 BRDA:329,38,0,21 -BRDA:329,38,1,49 -BRDA:329,39,0,70 -BRDA:329,39,1,48 +BRDA:329,38,1,32 +BRDA:329,39,0,53 +BRDA:329,39,1,31 BRDA:329,39,2,21 -BRDA:329,40,0,27 +BRDA:329,40,0,10 BRDA:329,40,1,21 -BRDA:329,41,0,48 +BRDA:329,41,0,31 BRDA:329,41,1,21 BRDA:344,42,0,21 BRDA:344,42,1,0 @@ -34125,9 +34125,9 @@ BRDA:619,68,1,84 BRDA:633,69,0,101 BRDA:633,69,1,0 BRDA:643,70,0,0 -BRDA:643,70,1,51 -BRDA:643,71,0,51 -BRDA:643,71,1,51 +BRDA:643,70,1,35 +BRDA:643,71,0,35 +BRDA:643,71,1,35 BRDA:657,72,0,0 BRDA:657,72,1,0 BRDA:658,73,0,0 @@ -34342,57 +34342,57 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/applyCh FN:18,applyChange FNF:1 FNH:1 -FNDA:34,applyChange +FNDA:14,applyChange DA:1,1 DA:2,1 DA:3,1 DA:5,1 DA:18,1 -DA:26,34 -DA:28,34 -DA:29,34 -DA:31,34 -DA:34,14 -DA:35,14 +DA:26,14 +DA:28,14 +DA:29,14 +DA:31,14 +DA:34,4 +DA:35,4 DA:39,0 DA:40,0 -DA:43,20 -DA:44,20 -DA:47,34 -DA:49,34 -DA:52,18 -DA:58,18 -DA:61,34 -DA:64,14 -DA:68,20 -DA:72,34 -DA:73,34 -DA:75,34 -DA:76,33 -DA:77,33 +DA:43,10 +DA:44,10 +DA:47,14 +DA:49,14 +DA:52,14 +DA:58,14 +DA:61,14 +DA:64,4 +DA:68,10 +DA:72,14 +DA:73,14 +DA:75,14 +DA:76,14 +DA:77,14 LF:27 LH:25 -BRDA:28,0,0,26 -BRDA:28,0,1,8 -BRDA:28,1,0,34 -BRDA:28,1,1,34 -BRDA:32,2,0,14 +BRDA:28,0,0,10 +BRDA:28,0,1,4 +BRDA:28,1,0,14 +BRDA:28,1,1,14 +BRDA:32,2,0,4 BRDA:32,2,1,0 -BRDA:32,2,2,20 -BRDA:43,3,0,20 +BRDA:32,2,2,10 +BRDA:43,3,0,10 BRDA:43,3,1,0 -BRDA:43,4,0,20 -BRDA:43,4,1,20 -BRDA:49,5,0,18 -BRDA:49,5,1,16 -BRDA:61,6,0,14 -BRDA:61,6,1,20 -BRDA:75,7,0,33 -BRDA:75,7,1,1 -BRDA:75,8,0,34 -BRDA:75,8,1,11 +BRDA:43,4,0,10 +BRDA:43,4,1,10 +BRDA:49,5,0,14 +BRDA:49,5,1,0 +BRDA:61,6,0,4 +BRDA:61,6,1,10 +BRDA:75,7,0,14 +BRDA:75,7,1,0 +BRDA:75,8,0,14 +BRDA:75,8,1,10 BRF:19 -BRH:17 +BRH:15 end_of_record TN: SF:packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/checkEditInfoState.ts @@ -34408,14 +34408,14 @@ FN:89,areSameNumber FNF:9 FNH:7 FNDA:1,(anonymous_0) -FNDA:99,checkEditInfoState -FNDA:688,(anonymous_2) -FNDA:214,(anonymous_3) -FNDA:20,(anonymous_4) +FNDA:69,checkEditInfoState +FNDA:478,(anonymous_2) +FNDA:144,(anonymous_3) +FNDA:10,(anonymous_4) FNDA:0,(anonymous_5) FNDA:0,(anonymous_6) -FNDA:688,isNumber -FNDA:234,areSameNumber +FNDA:478,isNumber +FNDA:154,areSameNumber DA:3,1 DA:4,1 DA:5,1 @@ -34427,40 +34427,40 @@ DA:30,1 DA:38,1 DA:45,1 DA:58,1 -DA:62,688 +DA:62,478 DA:63,1 -DA:64,98 -DA:65,214 -DA:70,29 -DA:71,69 -DA:73,20 +DA:64,68 +DA:65,144 +DA:70,19 +DA:71,49 +DA:73,10 DA:74,0 DA:75,0 DA:79,0 -DA:81,69 -DA:86,688 -DA:90,234 +DA:81,49 +DA:86,478 +DA:90,154 LF:24 LH:21 BRDA:19,0,0,1 BRDA:19,0,1,1 BRDA:62,1,0,1 -BRDA:62,1,1,98 -BRDA:62,2,0,99 -BRDA:62,2,1,99 -BRDA:62,2,2,99 -BRDA:64,3,0,29 -BRDA:64,3,1,69 -BRDA:65,4,0,98 -BRDA:65,4,1,29 -BRDA:65,4,2,29 -BRDA:65,4,3,29 -BRDA:65,4,4,14 -BRDA:65,4,5,14 +BRDA:62,1,1,68 +BRDA:62,2,0,69 +BRDA:62,2,1,69 +BRDA:62,2,2,69 +BRDA:64,3,0,19 +BRDA:64,3,1,49 +BRDA:65,4,0,68 +BRDA:65,4,1,19 +BRDA:65,4,2,19 +BRDA:65,4,3,19 +BRDA:65,4,4,4 +BRDA:65,4,5,4 BRDA:71,5,0,0 -BRDA:71,5,1,69 -BRDA:72,6,0,69 -BRDA:72,6,1,20 +BRDA:71,5,1,49 +BRDA:72,6,0,49 +BRDA:72,6,1,10 BRDA:72,6,2,0 BRDA:72,6,3,0 BRDA:72,6,4,0 @@ -34476,33 +34476,33 @@ FN:36,getEditInfoFromImage FN:43,getInitialEditInfo FNF:4 FNH:4 -FNDA:29,saveEditInfo -FNDA:16,deleteEditInfo -FNDA:90,getEditInfoFromImage -FNDA:26,getInitialEditInfo +FNDA:19,saveEditInfo +FNDA:6,deleteEditInfo +FNDA:70,getEditInfoFromImage +FNDA:16,getInitialEditInfo DA:1,1 DA:3,1 DA:11,1 -DA:12,29 -DA:13,29 +DA:12,19 +DA:13,19 DA:22,1 -DA:23,16 -DA:24,16 +DA:23,6 +DA:24,6 DA:36,1 -DA:37,90 -DA:38,90 -DA:44,26 +DA:37,70 +DA:38,70 +DA:44,16 LF:12 LH:12 -BRDA:12,0,0,29 +BRDA:12,0,0,19 BRDA:12,0,1,0 -BRDA:23,1,0,16 +BRDA:23,1,0,6 BRDA:23,1,1,0 -BRDA:39,2,0,26 -BRDA:39,2,1,64 -BRDA:38,3,0,90 -BRDA:38,3,1,65 -BRDA:45,4,0,26 +BRDA:39,2,0,16 +BRDA:39,2,1,54 +BRDA:38,3,0,70 +BRDA:38,3,1,55 +BRDA:45,4,0,16 BRDA:45,4,1,1 BRF:10 BRH:8 @@ -34512,35 +34512,35 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/generat FN:15,generateDataURL FNF:1 FNH:1 -FNDA:20,generateDataURL +FNDA:10,generateDataURL DA:1,1 DA:15,1 -DA:26,180 -DA:27,20 -DA:28,20 -DA:31,20 -DA:32,20 -DA:33,20 -DA:34,20 -DA:35,20 -DA:37,20 -DA:38,20 -DA:39,20 -DA:40,20 -DA:41,20 -DA:42,20 -DA:43,20 -DA:56,20 +DA:26,90 +DA:27,10 +DA:28,10 +DA:31,10 +DA:32,10 +DA:33,10 +DA:34,10 +DA:35,10 +DA:37,10 +DA:38,10 +DA:39,10 +DA:40,10 +DA:41,10 +DA:42,10 +DA:43,10 +DA:56,10 LF:18 LH:18 -BRDA:31,0,0,20 +BRDA:31,0,0,10 BRDA:31,0,1,0 -BRDA:38,1,0,20 +BRDA:38,1,0,10 BRDA:38,1,1,0 -BRDA:42,2,0,8 -BRDA:42,2,1,12 -BRDA:42,3,0,8 -BRDA:42,3,1,12 +BRDA:42,2,0,4 +BRDA:42,2,1,6 +BRDA:42,3,0,4 +BRDA:42,3,1,6 BRF:8 BRH:6 end_of_record @@ -34549,22 +34549,22 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getGene FN:16,getGeneratedImageSize FNF:1 FNH:1 -FNDA:85,getGeneratedImageSize +FNDA:55,getGeneratedImageSize DA:16,1 -DA:28,595 -DA:31,85 -DA:32,85 -DA:35,85 -DA:36,85 -DA:40,85 -DA:42,85 -DA:44,85 +DA:28,385 +DA:31,55 +DA:32,55 +DA:35,55 +DA:36,55 +DA:40,55 +DA:42,55 +DA:44,55 LF:9 LH:9 BRDA:35,0,0,0 -BRDA:35,0,1,85 +BRDA:35,0,1,55 BRDA:36,1,0,0 -BRDA:36,1,1,85 +BRDA:36,1,1,55 BRF:4 BRH:2 end_of_record @@ -34600,12 +34600,12 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getTarg FN:11,getTargetSizeByPercentage FNF:1 FNH:1 -FNDA:17,getTargetSizeByPercentage +FNDA:13,getTargetSizeByPercentage DA:11,1 -DA:22,102 -DA:23,17 -DA:24,17 -DA:25,17 +DA:22,78 +DA:23,13 +DA:24,13 +DA:25,13 LF:5 LH:5 BRF:0 @@ -34993,13 +34993,13 @@ DA:57,31 DA:58,31 DA:59,31 DA:60,31 -DA:61,27 -DA:62,4 +DA:61,23 +DA:62,8 DA:63,3 -DA:64,1 +DA:64,5 DA:65,0 -DA:66,1 -DA:67,0 +DA:66,5 +DA:67,4 DA:70,31 DA:71,31 DA:72,31 @@ -35012,7 +35012,7 @@ DA:86,36 DA:87,36 DA:105,36 LF:47 -LH:43 +LH:44 BRDA:26,0,0,18 BRDA:26,0,1,0 BRDA:26,1,0,18 @@ -35022,16 +35022,16 @@ BRDA:33,2,0,18 BRDA:33,2,1,0 BRDA:54,3,0,31 BRDA:54,3,1,0 -BRDA:60,4,0,27 -BRDA:60,4,1,4 +BRDA:60,4,0,23 +BRDA:60,4,1,8 BRDA:62,5,0,3 -BRDA:62,5,1,1 +BRDA:62,5,1,5 BRDA:64,6,0,0 -BRDA:64,6,1,1 -BRDA:66,7,0,0 +BRDA:64,6,1,5 +BRDA:66,7,0,4 BRDA:66,7,1,1 BRF:17 -BRH:12 +BRH:13 end_of_record TN: SF:packages/roosterjs-editor-plugins/lib/plugins/ImageResize/ImageResize.ts @@ -35102,7 +35102,7 @@ FNDA:20,Paste FNDA:1,(anonymous_2) FNDA:18,(anonymous_3) FNDA:10,(anonymous_4) -FNDA:61,(anonymous_5) +FNDA:57,(anonymous_5) DA:1,1 DA:2,1 DA:3,1 @@ -35125,12 +35125,12 @@ DA:54,18 DA:60,1 DA:61,10 DA:68,1 -DA:69,61 -DA:70,28 -DA:71,14 -DA:73,14 -DA:76,2 -DA:77,2 +DA:69,57 +DA:70,26 +DA:71,13 +DA:73,13 +DA:76,1 +DA:77,1 DA:80,5 DA:85,3 DA:87,5 @@ -35145,9 +35145,9 @@ DA:99,1 DA:101,1 DA:102,1 DA:103,1 -DA:105,14 -DA:106,14 -DA:109,14 +DA:105,13 +DA:106,13 +DA:109,13 DA:112,1 LF:46 LH:46 @@ -35155,11 +35155,11 @@ BRDA:38,0,0,11 BRDA:38,0,1,9 BRDA:39,1,0,20 BRDA:39,1,1,0 -BRDA:69,2,0,14 -BRDA:69,2,1,47 -BRDA:69,3,0,61 -BRDA:69,3,1,61 -BRDA:74,4,0,2 +BRDA:69,2,0,13 +BRDA:69,2,1,44 +BRDA:69,3,0,57 +BRDA:69,3,1,57 +BRDA:74,4,0,1 BRDA:74,4,1,3 BRDA:74,4,2,5 BRDA:74,4,3,1 @@ -35851,14 +35851,14 @@ FN:13,(anonymous_1) FN:17,(anonymous_2) FNF:3 FNH:3 -FNDA:11,sanitizeHtmlColorsFromPastedContent -FNDA:22,(anonymous_1) +FNDA:10,sanitizeHtmlColorsFromPastedContent +FNDA:20,(anonymous_1) FNDA:19,(anonymous_2) DA:1,1 DA:2,1 DA:10,1 -DA:13,11 -DA:14,22 +DA:13,10 +DA:14,20 DA:17,19 LF:6 LH:6 @@ -35872,13 +35872,13 @@ FN:15,(anonymous_1) FN:19,validateLink FNF:3 FNH:3 -FNDA:20,sanitizeLinks +FNDA:19,sanitizeLinks FNDA:6,(anonymous_1) FNDA:6,validateLink DA:1,1 DA:4,1 DA:11,1 -DA:12,20 +DA:12,19 DA:15,6 DA:21,6 DA:22,6 @@ -35901,9 +35901,9 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/LevelLists. FN:22,createLevelLists FNF:1 FNH:1 -FNDA:15,createLevelLists +FNDA:14,createLevelLists DA:22,1 -DA:23,15 +DA:23,14 LF:2 LH:2 BRF:0 @@ -35914,10 +35914,10 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordConvert FN:45,createWordConverterArguments FNF:1 FNH:1 -FNDA:12,createWordConverterArguments +FNDA:11,createWordConverterArguments DA:1,1 DA:45,1 -DA:48,12 +DA:48,11 LF:3 LH:3 BRF:0 @@ -35931,13 +35931,13 @@ FN:52,getObject FN:66,getAndSetNodeId FNF:4 FNH:4 -FNDA:23,createCustomData +FNDA:22,createCustomData FNDA:9,setObject FNDA:11,getObject FNDA:19,getAndSetNodeId DA:4,1 DA:22,1 -DA:23,23 +DA:23,22 DA:33,1 DA:35,9 DA:36,9 @@ -35986,11 +35986,11 @@ FN:96,(anonymous_4) FN:96,(anonymous_5) FNF:6 FNH:6 -FNDA:20,commentsRemoval +FNDA:19,commentsRemoval FNDA:6,(anonymous_1) FNDA:3,(anonymous_2) FNDA:3,(anonymous_3) -FNDA:100,(anonymous_4) +FNDA:95,(anonymous_4) FNDA:9,(anonymous_5) DA:2,1 DA:9,1 @@ -36004,22 +36004,22 @@ DA:16,1 DA:17,1 DA:18,1 DA:24,1 -DA:41,20 +DA:41,19 DA:42,6 DA:43,6 DA:44,1 DA:46,6 -DA:56,20 +DA:56,19 DA:57,3 DA:61,1 DA:63,3 -DA:78,20 +DA:78,19 DA:79,3 DA:80,3 DA:81,1 DA:83,3 -DA:90,20 -DA:96,100 +DA:90,19 +DA:96,95 LF:28 LH:28 BRDA:43,0,0,1 @@ -36049,12 +36049,12 @@ FN:41,(anonymous_2) FN:42,(anonymous_3) FN:52,(anonymous_4) FNF:5 -FNH:5 -FNDA:20,convertPastedContentFromWord -FNDA:2,(anonymous_1) -FNDA:40,(anonymous_2) +FNH:4 +FNDA:19,convertPastedContentFromWord +FNDA:0,(anonymous_1) +FNDA:38,(anonymous_2) FNDA:14,(anonymous_3) -FNDA:6,(anonymous_4) +FNDA:4,(anonymous_4) DA:1,1 DA:3,1 DA:4,1 @@ -36064,40 +36064,40 @@ DA:8,1 DA:9,1 DA:10,1 DA:16,1 -DA:17,40 -DA:20,20 -DA:21,2 -DA:22,2 -DA:23,2 -DA:26,20 -DA:31,20 -DA:32,20 -DA:33,12 -DA:34,12 +DA:17,38 +DA:20,19 +DA:21,0 +DA:22,0 +DA:23,0 +DA:26,19 +DA:31,19 +DA:32,19 +DA:33,11 +DA:34,11 DA:35,4 -DA:41,20 -DA:42,40 +DA:41,19 +DA:42,38 DA:43,14 DA:44,3 DA:47,14 -DA:52,20 -DA:54,6 -DA:59,3 +DA:52,19 +DA:54,4 +DA:59,1 DA:61,3 -DA:64,20 +DA:64,19 LF:30 -LH:30 -BRDA:32,0,0,12 +LH:27 +BRDA:32,0,0,11 BRDA:32,0,1,8 BRDA:34,1,0,4 -BRDA:34,1,1,8 +BRDA:34,1,1,7 BRDA:43,2,0,3 BRDA:43,2,1,11 -BRDA:54,3,0,3 +BRDA:54,3,0,1 BRDA:54,3,1,3 -BRDA:55,4,0,6 -BRDA:55,4,1,4 -BRDA:55,4,2,4 +BRDA:55,4,0,4 +BRDA:55,4,1,2 +BRDA:55,4,2,2 BRF:11 BRH:11 end_of_record @@ -36124,14 +36124,14 @@ FN:551,isEmptyTextNode FN:579,resetCurrentLists FNF:19 FNH:18 -FNDA:12,processNodesDiscovery +FNDA:11,processNodesDiscovery FNDA:4,processNodeConvert FNDA:8,getOrCreateListForNode FNDA:8,convertListIfNeeded FNDA:13,recurringGetOrCreateListAtNode FNDA:40,cleanupListIgnore FNDA:24,(anonymous_6) -FNDA:17,getListItemMetadata +FNDA:15,getListItemMetadata FNDA:7,isFakeBullet FNDA:7,getFakeBulletTagName FNDA:8,getFakeBulletText @@ -36140,7 +36140,7 @@ FNDA:12,getRealPreviousSibling FNDA:24,getRealNextSibling FNDA:48,isIgnoreNode FNDA:56,isEmptySpan -FNDA:41,getStyleValue +FNDA:39,getStyleValue FNDA:48,isEmptyTextNode FNDA:0,resetCurrentLists DA:5,1 @@ -36151,13 +36151,13 @@ DA:14,1 DA:17,1 DA:20,1 DA:29,1 -DA:30,12 -DA:31,12 +DA:30,11 +DA:31,11 DA:32,0 -DA:34,12 -DA:35,17 -DA:38,17 -DA:39,17 +DA:34,11 +DA:35,15 +DA:38,15 +DA:39,15 DA:41,8 DA:42,8 DA:45,8 @@ -36182,14 +36182,14 @@ DA:112,8 DA:115,8 DA:116,8 DA:119,8 -DA:126,9 -DA:127,9 +DA:126,7 +DA:127,7 DA:134,0 DA:135,0 DA:136,0 DA:139,0 -DA:144,17 -DA:146,12 +DA:144,15 +DA:146,11 DA:155,1 DA:156,4 DA:157,4 @@ -36259,14 +36259,14 @@ DA:337,56 DA:340,56 DA:341,24 DA:346,40 -DA:354,17 -DA:355,17 -DA:356,17 +DA:354,15 +DA:355,15 +DA:356,15 DA:357,8 DA:366,8 DA:367,8 DA:368,8 -DA:378,9 +DA:378,7 DA:382,7 DA:387,7 DA:405,8 @@ -36325,7 +36325,7 @@ DA:524,24 DA:529,16 DA:533,32 DA:538,56 -DA:547,41 +DA:547,39 DA:553,48 DA:554,0 DA:558,48 @@ -36343,9 +36343,9 @@ DA:583,0 LF:197 LH:164 BRDA:31,0,0,0 -BRDA:31,0,1,12 +BRDA:31,0,1,11 BRDA:39,1,0,8 -BRDA:39,1,1,9 +BRDA:39,1,1,7 BRDA:41,2,0,8 BRDA:41,2,1,3 BRDA:45,3,0,0 @@ -36371,8 +36371,8 @@ BRDA:91,11,3,0 BRDA:105,12,0,0 BRDA:105,12,1,8 BRDA:127,13,0,0 -BRDA:127,13,1,9 -BRDA:128,14,0,9 +BRDA:127,13,1,7 +BRDA:128,14,0,7 BRDA:128,14,1,0 BRDA:128,14,2,0 BRDA:128,14,3,0 @@ -36461,11 +36461,11 @@ BRDA:340,54,0,24 BRDA:340,54,1,32 BRDA:340,55,0,56 BRDA:340,55,1,40 -BRDA:354,56,0,17 +BRDA:354,56,0,15 BRDA:354,56,1,0 BRDA:356,57,0,8 -BRDA:356,57,1,9 -BRDA:356,58,0,17 +BRDA:356,57,1,7 +BRDA:356,58,0,15 BRDA:356,58,1,8 BRDA:367,59,0,8 BRDA:367,59,1,0 @@ -36554,8 +36554,8 @@ BRDA:525,100,1,16 BRDA:525,100,2,16 BRDA:538,101,0,56 BRDA:538,101,1,32 -BRDA:547,102,0,41 -BRDA:547,102,1,17 +BRDA:547,102,0,39 +BRDA:547,102,1,15 BRDA:553,103,0,0 BRDA:553,103,1,48 BRDA:558,104,0,0 @@ -36588,10 +36588,10 @@ SF:packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/wordConvert FN:29,createWordConverter FNF:1 FNH:1 -FNDA:20,createWordConverter +FNDA:19,createWordConverter DA:2,1 DA:29,1 -DA:30,20 +DA:30,19 LF:3 LH:3 BRF:0 diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/createDomToModelContext.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/createDomToModelContext.ts.html index d5593355a71..551b8231760 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/createDomToModelContext.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/createDomToModelContext.ts.html @@ -144,7 +144,7 @@

All files / pac       -524x +518x       @@ -187,15 +187,15 @@

All files / pac       -524x +518x       -524x -18x +518x +14x     -524x +518x    
import { defaultFormatParsers, getFormatParsers } from '../../formatHandlers/defaultFormatHandlers';
 import { defaultProcessorMap } from './defaultProcessors';
@@ -274,7 +274,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/defaultProcessors.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/defaultProcessors.ts.html index 9bfe8cca87d..fc6a2754869 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/defaultProcessors.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/defaultProcessors.ts.html @@ -253,7 +253,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/index.html index 0d5baf3592b..c057e526a4e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/context/index.html @@ -110,7 +110,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/domToContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/domToContentModel.ts.html index e5ec10eb4e3..a91a390f6ad 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/domToContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/domToContentModel.ts.html @@ -114,14 +114,14 @@

All files / packag       -116x -116x +110x +110x   -116x +110x   -116x +110x   -116x +110x    
import { createContentModelDocument } from '../modelApi/creators/createContentModelDocument';
 import { createDomToModelContext } from './context/createDomToModelContext';
@@ -163,7 +163,7 @@ 

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/index.html index 6c80ddc0e02..b90892907a2 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/index.html @@ -95,7 +95,7 @@

All files packages-content-model/rooste diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/blockProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/blockProcessor.ts.html index dc20f1f763c..03a8b75f116 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/blockProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/blockProcessor.ts.html @@ -127,33 +127,33 @@

All files / pac       -163x -163x +160x +160x   -163x +160x   -163x +160x   -163x +160x   -163x -652x +160x +640x 57x       -163x -159x +160x +156x             -159x +156x     -163x +160x    
import { addBlock } from '../../modelApi/common/addBlock';
 import { ContextStyles } from './formatContainerProcessor';
@@ -211,7 +211,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/brProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/brProcessor.ts.html index 5875d0af5bc..084a5164154 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/brProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/brProcessor.ts.html @@ -81,13 +81,13 @@

All files / pac     1x -13x +10x   -13x +10x       -13x +10x    
import { addSegment } from '../../modelApi/common/addSegment';
 import { createBr } from '../../modelApi/creators/createBr';
@@ -112,7 +112,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/childProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/childProcessor.ts.html index 551f4e4b8d7..6b22826c407 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/childProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/childProcessor.ts.html @@ -160,18 +160,18 @@

All files / pac       -797x -797x +787x +787x   -797x -979x +787x +968x   -979x +968x   -979x +968x     -797x +787x       @@ -186,10 +186,10 @@

All files / pac       -992x -630x -362x -334x +981x +621x +360x +332x       @@ -208,17 +208,17 @@

All files / pac       -1776x -16x +1755x +12x   -16x +12x     -1776x -15x +1755x +11x 5x   -15x +11x      
import { addSelectionMarker } from '../utils/addSelectionMarker';
@@ -310,7 +310,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/codeProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/codeProcessor.ts.html index 7aadfd14d9f..d002eff1000 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/codeProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/codeProcessor.ts.html @@ -109,7 +109,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/delimiterProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/delimiterProcessor.ts.html index 7bd69aed42a..eb4d8c04cd8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/delimiterProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/delimiterProcessor.ts.html @@ -127,7 +127,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/elementProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/elementProcessor.ts.html index bcf75392e01..5519d87dbc1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/elementProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/elementProcessor.ts.html @@ -104,24 +104,24 @@

All files / pac     1x -530x -530x +521x +521x         -530x +521x       -530x +521x             -528x +519x    
import { getDelimiterFromElement, getEntityFromElement } from 'roosterjs-editor-dom';
 import {
@@ -163,7 +163,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/entityProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/entityProcessor.ts.html index 16b241ce10a..1425eda21bc 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/entityProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/entityProcessor.ts.html @@ -127,26 +127,26 @@

All files / pac     1x -10x +9x     -10x -10x +9x +9x   -10x +9x       -10x +9x       -10x -3x -3x +9x +2x +2x     -10x +9x       @@ -155,12 +155,12 @@

All files / pac       -10x +9x 2x     -10x -6x +9x +5x   4x   @@ -229,7 +229,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/fontProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/fontProcessor.ts.html index db726dd03eb..46b8f3b5f2b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/fontProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/fontProcessor.ts.html @@ -226,7 +226,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/formatContainerProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/formatContainerProcessor.ts.html index e1eeb94b106..371ac4ebbfb 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/formatContainerProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/formatContainerProcessor.ts.html @@ -186,61 +186,61 @@

All files / pac       -40x -40x -40x +39x +39x +39x   -40x +39x       -40x +39x     -40x +39x     -40x +39x         -40x -160x +39x +156x     -40x +39x   -40x +39x 2x     -40x +39x     -9x +8x   -9x +8x 1x         -9x -9x -9x +8x +8x +8x   31x       -40x +39x       -40x +39x   -40x +39x       @@ -349,7 +349,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/generalProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/generalProcessor.ts.html index bbf14463222..dc2e563826d 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/generalProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/generalProcessor.ts.html @@ -259,7 +259,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/headingProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/headingProcessor.ts.html index 7006d31671a..ce072854ef6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/headingProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/headingProcessor.ts.html @@ -172,7 +172,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/hrProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/hrProcessor.ts.html index 318b4a2f98f..7e90cd65eb6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/hrProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/hrProcessor.ts.html @@ -160,7 +160,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/imageProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/imageProcessor.ts.html index 26450580e53..7822e02a102 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/imageProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/imageProcessor.ts.html @@ -115,30 +115,30 @@

All files / pac     1x -12x -12x +10x +10x   -12x -12x -12x +10x +10x +10x   -12x -12x -12x +10x +10x +10x   -12x -12x +10x +10x   -12x +10x 2x   -12x +10x     -12x +10x 1x   -12x +10x       @@ -146,7 +146,7 @@

All files / pac 2x     -12x +10x      
import { addDecorators } from '../../modelApi/common/addDecorators';
@@ -202,7 +202,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/index.html index 4ff9c0dce6c..2e03251613b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/index.html @@ -380,7 +380,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/knownElementProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/knownElementProcessor.ts.html index fed3852b59d..470525260c9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/knownElementProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/knownElementProcessor.ts.html @@ -230,28 +230,28 @@

All files / pac     1x -241x +239x   -241x +239x       -25x -216x -96x -96x +24x +215x +93x +93x   -96x -96x +93x +93x   -96x -96x +93x +93x   -96x +93x     -96x 93x +90x       @@ -262,7 +262,7 @@

All files / pac       -120x +122x       @@ -270,9 +270,9 @@

All files / pac       -120x +122x   -120x +122x 1x     @@ -281,7 +281,7 @@

All files / pac       -120x +122x       @@ -289,41 +289,41 @@

All files / pac       -123x +119x 4x     -119x -119x +115x +115x   -119x +115x     -119x +115x 8x         -111x +107x   -1650x +1591x     -12x +11x       -99x +96x         -99x +96x 5x     -94x +91x    
import { addBlock } from '../../modelApi/common/addBlock';
 import { blockProcessor } from './blockProcessor';
@@ -466,7 +466,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/linkProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/linkProcessor.ts.html index b1e6263b3a8..8fd174ad8a1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/linkProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/linkProcessor.ts.html @@ -127,7 +127,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listItemProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listItemProcessor.ts.html index 447fd57c09e..b401e576e3c 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listItemProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listItemProcessor.ts.html @@ -265,7 +265,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listProcessor.ts.html index 8d5c776e112..d9ff98ff679 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/listProcessor.ts.html @@ -241,7 +241,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/pProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/pProcessor.ts.html index 378a7c81313..c46550606a0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/pProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/pProcessor.ts.html @@ -151,7 +151,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/tableProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/tableProcessor.ts.html index b18c72dd62f..5298b685c40 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/tableProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/tableProcessor.ts.html @@ -359,69 +359,69 @@

All files / pac       -41x +40x       -41x +40x   -41x +40x   -41x +40x     -41x -41x +40x +40x   -41x +40x       -41x +40x 25x     -41x -41x -41x +40x +40x +40x           -41x -41x +40x +40x   -41x -41x -41x +40x +40x +40x   -45x -45x -45x +44x +44x +44x   -45x +44x 27x     -45x +44x   -45x -45x -45x +44x +44x +44x   -45x +44x         -31x +30x           -31x +30x       @@ -429,32 +429,32 @@

All files / pac       -45x -45x +44x +44x             -45x -122x +44x +118x       -61x -  -61x -61x -61x -61x -61x -61x +59x   -61x +59x +59x +59x +59x +59x 59x   59x +57x +  +57x 32x 29x   @@ -467,85 +467,85 @@

All files / pac       -61x +59x       -61x +59x           -61x +59x             -61x +59x     -61x +59x   -61x +59x           -61x +59x           -61x +59x   -61x -61x +59x +59x       +62x +64x 64x -66x -66x             -66x +64x   -66x +64x   -66x -66x +64x +64x     -66x -61x +64x +59x 32x     -61x +59x   -61x -61x +59x +59x   -61x -61x +59x +59x   -61x -61x +59x +59x       -66x +64x   -66x +64x       @@ -563,12 +563,12 @@

All files / pac       -41x +40x   -41x +40x   -41x -45x +40x +44x 27x     @@ -577,10 +577,10 @@

All files / pac       -82x -82x +80x +80x   -82x +80x 59x 3x   @@ -589,7 +589,7 @@

All files / pac       -82x +80x    
import { addBlock } from '../../modelApi/common/addBlock';
 import { createTable } from '../../modelApi/creators/createTable';
@@ -865,7 +865,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/textProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/textProcessor.ts.html index 694128d49cf..e413b901d97 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/textProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/processors/textProcessor.ts.html @@ -160,10 +160,10 @@

All files / pac       -349x -349x +347x +347x   -349x +347x 8x 8x   @@ -173,7 +173,7 @@

All files / pac 8x     -349x +347x 9x   9x @@ -184,19 +184,19 @@

All files / pac 9x     -349x +347x       1x     -366x -357x -357x -357x +364x +355x +355x +355x   -357x +355x       @@ -204,20 +204,20 @@

All files / pac     15x -342x +340x         -334x +332x   -334x +332x 15x     -334x +332x   -334x +332x       @@ -310,7 +310,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/addSelectionMarker.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/addSelectionMarker.ts.html index 70aabbe4d77..7689b03e8b8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/addSelectionMarker.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/addSelectionMarker.ts.html @@ -81,11 +81,11 @@

All files / pac     1x -39x +35x   -39x +35x   -39x +35x    
import { addDecorators } from '../../modelApi/common/addDecorators';
 import { addSegment } from '../../modelApi/common/addSegment';
@@ -109,7 +109,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/areSameFormats.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/areSameFormats.ts.html index cd612126576..2e5723207c9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/areSameFormats.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/areSameFormats.ts.html @@ -118,7 +118,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getBoundingClientRect.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getBoundingClientRect.ts.html index 23e46838739..3e6a0ea8af8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getBoundingClientRect.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getBoundingClientRect.ts.html @@ -67,7 +67,7 @@

All files / pac     1x -29x +27x    
/**
  * @internal
@@ -82,7 +82,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getDefaultStyle.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getDefaultStyle.ts.html index ce387b2516b..65cbc25b0b3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getDefaultStyle.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getDefaultStyle.ts.html @@ -87,9 +87,9 @@

All files / pac       -2720x +2674x   -2720x +2674x    
import { DefaultStyleMap, DomToModelContext } from 'roosterjs-content-model-types';
  
@@ -115,7 +115,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getRegularSelectionOffsets.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getRegularSelectionOffsets.ts.html index a50e0d65e2e..4db67c3d364 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getRegularSelectionOffsets.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/getRegularSelectionOffsets.ts.html @@ -94,12 +94,12 @@

All files / pac       -1160x +1148x   -1160x -1160x +1148x +1148x   -1160x +1148x    
import { DomToModelContext } from 'roosterjs-content-model-types';
 import { SelectionRangeTypes } from 'roosterjs-editor-types';
@@ -130,7 +130,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/index.html index 5fbae9691d8..b4a93d30675 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/index.html @@ -200,7 +200,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/isBlockElement.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/isBlockElement.ts.html index 2629ffd8a4d..bcaf86f3f6a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/isBlockElement.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/isBlockElement.ts.html @@ -85,9 +85,9 @@

All files / pac     1x -290x +287x   -290x +287x    
import { DomToModelContext } from 'roosterjs-content-model-types';
 import { getDefaultStyle } from './getDefaultStyle';
@@ -112,7 +112,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/parseFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/parseFormat.ts.html index 3554f9a738e..097bf119731 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/parseFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/parseFormat.ts.html @@ -103,10 +103,10 @@

All files / pac       -2283x +2245x   -2283x -14818x +2245x +14611x      
import { getDefaultStyle } from './getDefaultStyle';
@@ -142,7 +142,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/stackFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/stackFormat.ts.html index d2875a72531..0dbccdbef7d 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/stackFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domToModel/utils/stackFormat.ts.html @@ -268,23 +268,23 @@

All files / pac       -3800x -3800x +3755x +3755x   -760x -760x -760x -760x -760x -760x +751x +751x +751x +751x +751x +751x   -760x +751x   -760x -760x -760x -760x -760x +751x +751x +751x +751x +751x       @@ -292,7 +292,7 @@

All files / pac       -760x +751x   16x   @@ -309,7 +309,7 @@

All files / pac       -731x +722x       @@ -317,7 +317,7 @@

All files / pac       -760x +751x   5x   @@ -329,7 +329,7 @@

All files / pac       -755x +746x       @@ -337,14 +337,14 @@

All files / pac       -760x +751x   60x         -700x +691x       @@ -352,18 +352,18 @@

All files / pac       -1520x +1502x   -49x +47x     -187x +185x     -1284x +1270x   -1284x -199x +1270x +207x       @@ -374,7 +374,7 @@

All files / pac       -1284x +1270x      
import { getObjectKeys } from 'roosterjs-editor-dom';
@@ -544,7 +544,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/index.html index e68300464bf..46e0644d163 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/index.html @@ -110,7 +110,7 @@

All files packages-content-model/rooste diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/isNodeOfType.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/isNodeOfType.ts.html index 4395fdc8974..a0e345afeac 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/isNodeOfType.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/isNodeOfType.ts.html @@ -169,7 +169,7 @@

All files / packag       -2536x +2500x    
import { NodeType } from 'roosterjs-editor-types';
  
@@ -235,7 +235,7 @@ 

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/index.html index 34d12080bdf..99f5637967e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/index.html @@ -110,7 +110,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateListMetadata.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateListMetadata.ts.html index 1fe3614627e..940af8d2970 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateListMetadata.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateListMetadata.ts.html @@ -127,7 +127,7 @@

All files / pac       -240x +236x    
import { BulletListType, NumberingListType } from 'roosterjs-editor-types';
 import { ContentModelWithDataset, ListMetadataFormat } from 'roosterjs-content-model-types';
@@ -172,7 +172,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateMetadata.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateMetadata.ts.html index 83c158b757b..6df39462d8f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateMetadata.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateMetadata.ts.html @@ -124,28 +124,28 @@

All files / pac       -402x -402x +398x +398x   -402x -402x +398x +398x     -402x +398x 9x     -402x -394x +398x +390x   -394x -343x -51x -46x +390x +342x +48x +43x       -402x +398x       @@ -153,7 +153,7 @@

All files / pac     1x -15x +14x    
import { ContentModelWithDataset } from 'roosterjs-content-model-types';
 import { Definition } from 'roosterjs-editor-types';
@@ -211,7 +211,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/stringUtil.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/stringUtil.ts.html index f29ab2bdbe6..a2fec034362 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/stringUtil.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/domUtils/stringUtil.ts.html @@ -131,7 +131,7 @@

All files / packag     1x -712x +706x       @@ -193,7 +193,7 @@

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/directionFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/directionFormatHandler.ts.html index c3bece3b2f5..234b250cbaa 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/directionFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/directionFormatHandler.ts.html @@ -85,14 +85,14 @@

All files / pac   1x   -1940x +1911x   -1940x +1911x 23x       -582x +571x 3x     @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/displayFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/displayFormatHandler.ts.html index 6a9049ef6d6..893487d7812 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/displayFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/displayFormatHandler.ts.html @@ -85,14 +85,14 @@

All files / pac   1x   -280x +273x   -280x +273x 14x       -249x +241x 11x     @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/htmlAlignFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/htmlAlignFormatHandler.ts.html index b0fc5539379..3ba000c414f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/htmlAlignFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/htmlAlignFormatHandler.ts.html @@ -99,20 +99,20 @@

All files / pac       -319x +312x   -319x +312x   -319x +312x 21x 21x 21x       -258x +251x   -258x +251x 8x     @@ -154,7 +154,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/index.html index 87581e50c65..312ac62638e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/index.html @@ -200,7 +200,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/lineHeightFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/lineHeightFormatHandler.ts.html index eb39efd7ec2..be198e8b280 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/lineHeightFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/lineHeightFormatHandler.ts.html @@ -85,14 +85,14 @@

All files / pac   1x   -916x +905x   -916x +905x 21x       -879x +866x 10x     @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/marginFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/marginFormatHandler.ts.html index b0b9033498b..8006321eee4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/marginFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/marginFormatHandler.ts.html @@ -121,10 +121,10 @@

All files / pac   1x   -546x -2184x +539x +2156x   -2184x +2156x 401x     @@ -144,10 +144,10 @@

All files / pac       -480x -1920x +468x +1872x   -1920x +1872x 222x     @@ -208,7 +208,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/paddingFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/paddingFormatHandler.ts.html index 4038e3cbecd..14c41c2100d 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/paddingFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/paddingFormatHandler.ts.html @@ -104,19 +104,19 @@

All files / pac   1x   -430x -1720x +422x +1688x   -1720x -40x +1688x +34x         -375x -1500x -1500x -23x +362x +1448x +1448x +17x       @@ -160,7 +160,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/textAlignFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/textAlignFormatHandler.ts.html index f7aafc311a6..0392c1a80f0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/textAlignFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/textAlignFormatHandler.ts.html @@ -112,11 +112,11 @@

All files / pac   1x   -824x +813x   -824x +813x   -824x +813x       @@ -126,14 +126,14 @@

All files / pac       -824x +813x 20x       -624x +612x   -624x +612x 21x 21x   @@ -199,7 +199,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/whiteSpaceFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/whiteSpaceFormatHandler.ts.html index 53840ac5abb..844e24b19eb 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/whiteSpaceFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/whiteSpaceFormatHandler.ts.html @@ -86,16 +86,16 @@

All files / pac   1x   -528x +517x   -528x -29x +517x +27x       -348x -348x -19x +341x +341x +15x       @@ -127,7 +127,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/backgroundColorFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/backgroundColorFormatHandler.ts.html index 53c1a2810f5..dcc0d1825f3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/backgroundColorFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/backgroundColorFormatHandler.ts.html @@ -100,19 +100,19 @@

All files / pac 1x     -766x +758x             -766x +758x 23x       -863x +844x 20x     @@ -163,7 +163,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderBoxFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderBoxFormatHandler.ts.html index 4c7faa71a25..f8a4d61372a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderBoxFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderBoxFormatHandler.ts.html @@ -83,12 +83,12 @@

All files / pac   1x   -113x +108x 4x       -106x +101x 3x     @@ -118,7 +118,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderFormatHandler.ts.html index f3b94ff2445..d557435c262 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderFormatHandler.ts.html @@ -30,9 +30,9 @@

All files / pac
- 100% + 83.33% Branches - 6/6 + 5/6
@@ -113,20 +113,20 @@

All files / pac   1x   -339x -1695x +330x +1650x   -1695x -52x +1650x +44x         -299x -1495x +288x +1440x   -1495x -29x +1440x +24x       @@ -154,7 +154,7 @@

All files / pac const value = element.style[key];   if (value) { - format[key] = value == 'none' ? '' : value; + format[key] = value == 'none' ? '' : value; } }); }, @@ -175,7 +175,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/boxShadowFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/boxShadowFormatHandler.ts.html index 0d977c18fb2..49677587d15 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/boxShadowFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/boxShadowFormatHandler.ts.html @@ -83,12 +83,12 @@

All files / pac   1x   -14x +12x 1x       -13x +11x 1x     @@ -118,7 +118,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/datasetFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/datasetFormatHandler.ts.html index 57d4806fcad..e76cbc075ad 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/datasetFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/datasetFormatHandler.ts.html @@ -88,16 +88,16 @@

All files / pac   1x   -240x +235x   -240x +235x 13x         -242x -17x +232x +14x       @@ -130,7 +130,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/idFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/idFormatHandler.ts.html index 12a2946cf79..7682244923c 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/idFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/idFormatHandler.ts.html @@ -83,12 +83,12 @@

All files / pac   1x   -54x +51x 4x       -49x +46x 3x     @@ -118,7 +118,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/index.html index 09c49b6f60d..e94980a89a9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/index.html @@ -30,9 +30,9 @@

All files packages-content-model/roo
- 96.59% + 95.45% Branches - 85/88 + 84/88
@@ -109,8 +109,8 @@

All files packages-content-model/roo 100% 10/10 - 100% - 6/6 + 83.33% + 5/6 100% 4/4 100% @@ -215,7 +215,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/sizeFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/sizeFormatHandler.ts.html index 7465afe0bab..4652bbe1599 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/sizeFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/sizeFormatHandler.ts.html @@ -135,59 +135,59 @@

All files / pac   1x   -340x -340x -340x -340x -340x -340x +331x +331x +331x +331x +331x +331x   -340x -18x +331x +14x   -340x -8x +331x +7x   -340x -5x +331x +3x   -340x +331x 1x   -340x +331x 1x   -340x +331x 1x       -301x -13x +291x +8x   -301x -6x +291x +4x   -301x -2x +291x +1x   -301x +291x 1x   -301x +291x 1x   -301x +291x 1x           -658x -658x +645x +645x   -658x +645x       @@ -268,7 +268,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/verticalAlignFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/verticalAlignFormatHandler.ts.html index 6fdfa77c71c..3482784bd9c 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/verticalAlignFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/verticalAlignFormatHandler.ts.html @@ -97,9 +97,9 @@

All files / pac   1x   -71x +69x   -71x +69x       @@ -111,13 +111,13 @@

All files / pac 9x     -7x -7x +5x +5x       -62x -7x +60x +5x       @@ -160,7 +160,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/wordBreakFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/wordBreakFormatHandler.ts.html index 38bca286b77..d7200b98dc1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/wordBreakFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/wordBreakFormatHandler.ts.html @@ -85,14 +85,14 @@

All files / pac   1x   -62x +60x   -62x +60x 1x       -60x +58x 2x     @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/defaultFormatHandlers.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/defaultFormatHandlers.ts.html index 4c056926a71..b70f61bd26b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/defaultFormatHandlers.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/defaultFormatHandlers.ts.html @@ -538,22 +538,22 @@

All files / packag     1x -1041x -979x +1029x +969x   -526x -11046x +520x +10920x     -64698x +63960x           -11046x +10920x   -11046x +10920x       @@ -561,22 +561,22 @@

All files / packag     1x -808x -823x +794x +809x   -412x -8652x +405x +8505x     -50676x +49815x           -8652x +8505x   -8652x +8505x      
import { backgroundColorFormatHandler } from './common/backgroundColorFormatHandler';
@@ -847,7 +847,7 @@ 

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/index.html index e0a59edf348..19aafe160fd 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/index.html @@ -95,7 +95,7 @@

All files packages-content-model/rooste diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/index.html index 14e14c89f25..174045c705e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/index.html @@ -170,7 +170,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemMetadataFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemMetadataFormatHandler.ts.html index 85601e2aa28..717a5eaa8c2 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemMetadataFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemMetadataFormatHandler.ts.html @@ -376,7 +376,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemThreadFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemThreadFormatHandler.ts.html index f2b021feb99..f6495916092 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemThreadFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listItemThreadFormatHandler.ts.html @@ -205,7 +205,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelMetadataFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelMetadataFormatHandler.ts.html index d502e9993e5..067cec561a1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelMetadataFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelMetadataFormatHandler.ts.html @@ -233,13 +233,13 @@

All files / pac       -110x +106x   -110x +106x       -110x +106x 4x     @@ -361,7 +361,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelThreadFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelThreadFormatHandler.ts.html index e8ff7671150..bc1c1df75fc 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelThreadFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listLevelThreadFormatHandler.ts.html @@ -127,21 +127,21 @@

All files / pac       -114x -114x -114x +110x +110x +110x   -114x -39x +110x +35x   -39x -4x 35x +4x 31x +29x     -39x -39x +35x +35x       @@ -196,7 +196,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listStylePositionFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listStylePositionFormatHandler.ts.html index 1cf37856d04..8079a0dd739 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listStylePositionFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listStylePositionFormatHandler.ts.html @@ -92,7 +92,7 @@

All files / pac       -117x +113x 1x     @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listTypeFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listTypeFormatHandler.ts.html index f8fba23ac01..56f6cf0f25f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listTypeFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/list/listTypeFormatHandler.ts.html @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/boldFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/boldFormatHandler.ts.html index 82e2c4a3c2d..8975464d92a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/boldFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/boldFormatHandler.ts.html @@ -102,15 +102,15 @@

All files / pac   1x   -809x +800x   -809x +800x 73x       -556x -506x +546x +496x     50x @@ -172,7 +172,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontFamilyFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontFamilyFormatHandler.ts.html index 90b2ddbe12f..5809c2f0fbe 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontFamilyFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontFamilyFormatHandler.ts.html @@ -85,14 +85,14 @@

All files / pac   1x   -768x +759x   -768x -67x +759x +69x       -561x +551x 28x     @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontSizeFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontSizeFormatHandler.ts.html index caed9c01899..1924203d3fd 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontSizeFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/fontSizeFormatHandler.ts.html @@ -90,18 +90,18 @@

All files / pac   1x   -765x -765x +756x +756x       -765x -59x +756x +57x       -554x -35x +544x +33x       @@ -136,7 +136,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/index.html index 2567cd06603..b4df865a9d6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/index.html @@ -230,7 +230,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/italicFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/italicFormatHandler.ts.html index 7f8349e4d61..6035c051449 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/italicFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/italicFormatHandler.ts.html @@ -101,17 +101,17 @@

All files / pac   1x   -776x +767x   -776x +767x 10x -766x +757x 9x       -553x -546x +543x +536x     7x @@ -169,7 +169,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/letterSpacingFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/letterSpacingFormatHandler.ts.html index 3325f6e45bd..dcfeeb684cb 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/letterSpacingFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/letterSpacingFormatHandler.ts.html @@ -85,14 +85,14 @@

All files / pac   1x   -761x +752x   -761x +752x 2x       -551x +541x 2x     @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/linkFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/linkFormatHandler.ts.html index 572a71fecf8..ac9acf97d84 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/linkFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/linkFormatHandler.ts.html @@ -182,30 +182,30 @@

All files / pac       -33x 32x +31x   -32x +31x 1x     -32x +31x 1x     -32x +31x 1x     -32x +31x 1x     -32x +31x 2x     -32x +31x 1x     @@ -295,7 +295,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/strikeFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/strikeFormatHandler.ts.html index 9365142e495..18256501577 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/strikeFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/strikeFormatHandler.ts.html @@ -89,14 +89,14 @@

All files / pac   1x   -770x +761x   -770x +761x 8x       -553x +543x 5x 5x 5x @@ -133,7 +133,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/superOrSubScriptFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/superOrSubScriptFormatHandler.ts.html index 6cdcbcfbb17..30be058c248 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/superOrSubScriptFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/superOrSubScriptFormatHandler.ts.html @@ -113,10 +113,10 @@

All files / pac   1x   -768x -768x +759x +759x   -768x +759x 10x     @@ -125,7 +125,7 @@

All files / pac       -553x +543x 5x     @@ -149,7 +149,7 @@

All files / pac       -831x +820x    
import { FormatHandler } from '../FormatHandler';
 import { moveChildNodes } from 'roosterjs-editor-dom';
@@ -205,7 +205,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/textColorFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/textColorFormatHandler.ts.html index 22377ca3610..528281730aa 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/textColorFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/textColorFormatHandler.ts.html @@ -102,22 +102,22 @@

All files / pac 1x     -786x +777x             -786x -39x +777x +37x       -643x +630x   -643x -30x +630x +28x       @@ -169,7 +169,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/underlineFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/underlineFormatHandler.ts.html index 080083a98c8..09096ffe2f4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/underlineFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/segment/underlineFormatHandler.ts.html @@ -101,22 +101,22 @@

All files / pac   1x   -788x +779x   -788x -9x 779x +9x +770x         -586x -550x +575x +540x     -36x +35x   -36x +35x 7x 6x 6x @@ -169,7 +169,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/index.html index f5dc9d610a1..e25528c1ee1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/index.html @@ -125,7 +125,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableLayoutFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableLayoutFormatHandler.ts.html index b3e884de207..cd8e3027e42 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableLayoutFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableLayoutFormatHandler.ts.html @@ -84,13 +84,13 @@

All files / pac   1x   -44x -44x +43x +43x 2x       -38x +37x 1x     @@ -121,7 +121,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableSpacingFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableSpacingFormatHandler.ts.html index d27a90bbb19..0e299efaf95 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableSpacingFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/tableSpacingFormatHandler.ts.html @@ -89,15 +89,15 @@

All files / pac   1x   -103x -5x +100x +4x       -38x -4x -4x -4x +37x +3x +3x +3x       @@ -130,7 +130,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/textColorOnTableCellFormatHandler.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/textColorOnTableCellFormatHandler.ts.html index 0362fbef169..23b879d4064 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/textColorOnTableCellFormatHandler.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/table/textColorOnTableCellFormatHandler.ts.html @@ -82,11 +82,11 @@

All files / pac   1x   -63x +61x       -9x +7x       @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/color.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/color.ts.html index 3b425f5ca00..b19db7e757a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/color.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/color.ts.html @@ -144,8 +144,8 @@

All files / pac       -1559x -1559x +1542x +1542x       @@ -153,11 +153,11 @@

All files / pac       -1559x -265x +1542x +259x     -1559x +1542x       @@ -170,14 +170,14 @@

All files / pac       -54x +51x       -54x +51x 20x   -34x +31x       @@ -196,7 +196,7 @@

All files / pac       -265x +259x       @@ -283,7 +283,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/defaultStyles.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/defaultStyles.ts.html index 5165fdaf558..48e11856386 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/defaultStyles.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/defaultStyles.ts.html @@ -637,7 +637,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/dir.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/dir.ts.html index b0f8401ef57..0a1ec8e5dda 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/dir.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/dir.ts.html @@ -220,7 +220,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/index.html index 9c2f82b35eb..a15f83fe344 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/index.html @@ -140,7 +140,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/parseValueWithUnit.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/parseValueWithUnit.ts.html index 3760f21858d..0cace2556ef 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/parseValueWithUnit.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/utils/parseValueWithUnit.ts.html @@ -134,21 +134,21 @@

All files / pac     1x -105x +103x   -171x +167x   -97x -97x +95x +95x   -97x -83x -83x +95x +81x +81x   -83x +81x   -36x -36x +34x +34x   31x 31x @@ -167,11 +167,11 @@

All files / pac       -97x +95x 23x     -97x +95x       @@ -262,7 +262,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.html index 8d514e6970c..fcee3bde3ba 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roosterjs diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.ts.html index fa69bab5a9a..4be2e325f1a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/index.ts.html @@ -109,16 +109,16 @@

All files / packages- 50 51 52 -5398x -85x +5392x +83x   1x 1x 1x 14x   -3x -12x +2x +11x 14x 77x 10x @@ -129,7 +129,7 @@

All files / packages- 37x 145x 67x -675x +672x 194x 181x 718x @@ -145,7 +145,7 @@

All files / packages- 34x 8x 27x -62x +60x 75x 4x 117x @@ -220,7 +220,7 @@

All files / packages- diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/index.html index 8acf56d72c4..60792fadb09 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/setParagraphNotImplicit.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/setParagraphNotImplicit.ts.html index 46b33885175..0886d84d22c 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/setParagraphNotImplicit.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/block/setParagraphNotImplicit.ts.html @@ -75,8 +75,8 @@

All files / pac     1x -129x -48x +128x +47x      
import { ContentModelBlock } from 'roosterjs-content-model-types';
@@ -97,7 +97,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addBlock.ts.html index 7dd719d55c3..8acfaa2b305 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addBlock.ts.html @@ -75,7 +75,7 @@

All files / pac     1x -822x +808x    
import type { ContentModelBlock, ContentModelBlockGroup } from 'roosterjs-content-model-types';
  
@@ -94,7 +94,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addDecorators.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addDecorators.ts.html index a7108de77ed..21e0ee6e120 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addDecorators.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addDecorators.ts.html @@ -107,7 +107,7 @@

All files / pac     1x -420x +412x 52x     @@ -121,7 +121,7 @@

All files / pac     1x -400x +392x 13x     @@ -132,8 +132,8 @@

All files / pac     1x -391x -391x +383x +383x    
import {
     ContentModelCode,
@@ -181,7 +181,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addSegment.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addSegment.ts.html index 6c0c87c70bb..33bef78e660 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addSegment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/addSegment.ts.html @@ -121,28 +121,28 @@

All files / pac       -528x +517x     -528x -200x +517x +193x   -328x -328x +324x +324x     -528x +517x   -528x -71x -60x +517x +67x +56x     -457x +450x 9x     -457x +450x      
import { addBlock } from './addBlock';
@@ -196,7 +196,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/index.html index 60fd6c49e98..89564b31dd4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/index.html @@ -230,7 +230,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isEmpty.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isEmpty.ts.html index fb437deafcf..834b522d8c8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isEmpty.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isEmpty.ts.html @@ -167,18 +167,18 @@

All files / pac     1x -936x +916x   -709x +693x     -68x +65x     157x     -2x +1x     1x @@ -211,15 +211,15 @@

All files / pac     1x -470x +453x   -363x +359x     -10x +7x     -97x +87x       @@ -364,7 +364,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isGeneralSegment.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isGeneralSegment.ts.html index 151291b8f41..698c9c338c9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isGeneralSegment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isGeneralSegment.ts.html @@ -106,7 +106,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isWhiteSpacePreserved.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isWhiteSpacePreserved.ts.html index a3562d356e7..f467b63a7f9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isWhiteSpacePreserved.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/isWhiteSpacePreserved.ts.html @@ -83,7 +83,7 @@

All files / pac     1x -623x +607x       @@ -112,7 +112,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeContentModel.ts.html index 17a600fdf16..ed9ea7893b7 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeContentModel.ts.html @@ -118,10 +118,10 @@

All files / pac     1x -419x -737x +407x +718x   -737x +718x   157x 2x @@ -131,21 +131,21 @@

All files / pac   157x   -554x -554x +538x +538x   -24x -35x -74x -74x +22x +33x +70x +70x       -24x +22x     -737x -205x +718x +200x       @@ -202,7 +202,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeParagraph.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeParagraph.ts.html index 789fcdbfe5b..a98fae03841 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeParagraph.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeParagraph.ts.html @@ -116,41 +116,41 @@

All files / pac     1x -554x +538x   -554x -180x -180x +538x +174x +174x   -180x +174x       11x -169x -31x +163x +20x       -14x +9x       -4x +3x         -554x -537x +538x +521x     -554x +538x       -554x -464x +538x +447x 6x     @@ -211,7 +211,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeSegment.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeSegment.ts.html index 094607c956b..f71a8d9b549 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeSegment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/normalizeSegment.ts.html @@ -229,14 +229,14 @@

All files / pac     1x -537x +521x   -537x -447x +521x +430x     -537x -537x +521x +521x       @@ -275,7 +275,7 @@

All files / pac       -590x +570x       @@ -288,14 +288,14 @@

All files / pac     1x -469x +452x   -31x -31x +27x +27x     -31x -31x +27x +27x       @@ -303,20 +303,20 @@

All files / pac       -12x -12x -12x +9x +9x +9x     -362x -362x -362x +358x +358x +358x   -362x -362x +358x +358x   -362x -355x +358x +351x   37x   @@ -324,7 +324,7 @@

All files / pac       -355x +351x   44x   @@ -333,9 +333,9 @@

All files / pac       -362x +358x   -362x +358x       @@ -343,10 +343,10 @@

All files / pac       -568x +548x     -343x +339x 39x   39x @@ -364,7 +364,7 @@

All files / pac       -568x +548x   30x   @@ -532,7 +532,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/unwrapBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/unwrapBlock.ts.html index 576e8cb980c..4f761fb8efe 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/unwrapBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/common/unwrapBlock.ts.html @@ -124,7 +124,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createBr.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createBr.ts.html index 8cc24c3df20..3652c748bc2 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createBr.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createBr.ts.html @@ -76,7 +76,7 @@

All files / pac     1x -72x +69x       @@ -100,7 +100,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createContentModelDocument.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createContentModelDocument.ts.html index 1e3a710e324..3199faa39e1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createContentModelDocument.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createContentModelDocument.ts.html @@ -86,16 +86,16 @@

All files / pac 1x     -813x +807x         -813x -29x +807x +25x     -813x +807x    
import { ContentModelDocument, ContentModelSegmentFormat } from 'roosterjs-content-model-types';
  
@@ -124,7 +124,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createDivider.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createDivider.ts.html index d2cdf3918a9..a80a43c7729 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createDivider.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createDivider.ts.html @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createEntity.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createEntity.ts.html index f66625b1580..c3f636deb79 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createEntity.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createEntity.ts.html @@ -103,7 +103,7 @@

All files / pac       -26x +25x       @@ -151,7 +151,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createFormatContainer.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createFormatContainer.ts.html index 86592ba7e1a..c8855386cd6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createFormatContainer.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createFormatContainer.ts.html @@ -93,7 +93,7 @@

All files / pac       -117x +116x       @@ -130,7 +130,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralBlock.ts.html index 12e1c4a5b5a..e5a8c0e53e4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralBlock.ts.html @@ -109,7 +109,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralSegment.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralSegment.ts.html index 12162e26a1a..66867b6b3e0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralSegment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createGeneralSegment.ts.html @@ -133,7 +133,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createImage.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createImage.ts.html index 762d6e253ab..bb248cdeb01 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createImage.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createImage.ts.html @@ -80,7 +80,7 @@

All files / pac     1x -59x +57x       @@ -109,7 +109,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createListItem.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createListItem.ts.html index 3aeca5db56e..fa8f40dc84b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createListItem.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createListItem.ts.html @@ -98,11 +98,11 @@

All files / pac       -297x +294x       -363x +358x       @@ -139,7 +139,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraph.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraph.ts.html index 7e4b12add9c..a3e65d41d6f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraph.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraph.ts.html @@ -120,28 +120,28 @@

All files / pac       -1411x +1397x           -1411x -41x +1397x +39x     -1411x -688x +1397x +678x     -1411x +1397x 63x           -1411x +1397x    
import type {
     ContentModelBlockFormat,
@@ -193,7 +193,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraphDecorator.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraphDecorator.ts.html index 933aba0df02..bb942929c94 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraphDecorator.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createParagraphDecorator.ts.html @@ -121,7 +121,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createSelectionMarker.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createSelectionMarker.ts.html index 1be7305eda1..39529c685cb 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createSelectionMarker.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createSelectionMarker.ts.html @@ -87,7 +87,7 @@

All files / pac 1x     -549x +542x       @@ -118,7 +118,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTable.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTable.ts.html index f6516d2782f..d3bb9791194 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTable.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTable.ts.html @@ -99,17 +99,17 @@

All files / pac     1x -236x +235x   -236x -370x +235x +369x             -236x +235x       @@ -154,7 +154,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTableCell.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTableCell.ts.html index 6a526397e8e..e3a4069151f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTableCell.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createTableCell.ts.html @@ -102,10 +102,10 @@

All files / pac       -857x +855x   -857x -857x +855x +855x       @@ -151,7 +151,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createText.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createText.ts.html index 918de9a4712..7ae04663baf 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createText.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/createText.ts.html @@ -79,7 +79,7 @@

All files / pac     1x -931x +929x       @@ -106,7 +106,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/index.html index 6dd1c78d9c1..231deb32486 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelApi/creators/index.html @@ -305,7 +305,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/contentModelToDom.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/contentModelToDom.ts.html index c363566dc9e..ae74f666e76 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/contentModelToDom.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/contentModelToDom.ts.html @@ -23,16 +23,16 @@

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/createModelToDomContext.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/createModelToDomContext.ts.html index cbff791d38a..fa5a84225c1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/createModelToDomContext.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/createModelToDomContext.ts.html @@ -125,9 +125,9 @@

All files / pac       -410x +403x   -410x +403x       @@ -217,7 +217,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/defaultContentModelHandlers.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/defaultContentModelHandlers.ts.html index 96d272ec1a0..a7a7061095e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/defaultContentModelHandlers.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/defaultContentModelHandlers.ts.html @@ -175,7 +175,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/index.html index 047b2848085..2aee9232e44 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/context/index.html @@ -110,7 +110,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlock.ts.html index 77d8a587277..dca6abcb4b9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlock.ts.html @@ -124,15 +124,15 @@

All files / pac       -425x +420x   -425x +420x   -14x -14x +13x +13x   -256x -256x +252x +252x   3x 3x @@ -157,7 +157,7 @@

All files / pac 150x     -425x +420x    
import {
     ContentModelBlock,
@@ -217,7 +217,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlockGroupChildren.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlockGroupChildren.ts.html index 302bd820ce2..f6038c03183 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlockGroupChildren.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBlockGroupChildren.ts.html @@ -119,36 +119,36 @@

All files / pac       -322x -322x -322x +318x +318x +318x   -322x -322x +318x +318x         -411x +406x         -330x +325x     -411x +406x       -322x -8x +318x +6x   -8x -8x +6x +6x     -322x +318x      
import {
@@ -205,7 +205,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBr.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBr.ts.html index a365e20920f..798aa24b67b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBr.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleBr.ts.html @@ -96,12 +96,12 @@

All files / pac       -9x -9x -9x -9x +8x +8x +8x +8x   -9x +8x    
import { handleSegmentCommon } from '../utils/handleSegmentCommon';
 import {
@@ -133,7 +133,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleDivider.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleDivider.ts.html index 874d9281f30..9b7dd24ea72 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleDivider.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleDivider.ts.html @@ -181,7 +181,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleEntity.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleEntity.ts.html index 2a430ec84e7..5a666b24aee 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleEntity.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleEntity.ts.html @@ -247,7 +247,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleFormatContainer.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleFormatContainer.ts.html index 27d61867c37..be5a3493a46 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleFormatContainer.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleFormatContainer.ts.html @@ -250,7 +250,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleGeneralModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleGeneralModel.ts.html index 56b0b1f11ab..ea9a1e7ae93 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleGeneralModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleGeneralModel.ts.html @@ -199,7 +199,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleImage.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleImage.ts.html index c661d3f7469..92e06be7df6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleImage.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleImage.ts.html @@ -132,44 +132,44 @@

All files / pac       -11x -11x +9x +9x   -11x -11x +9x +9x   -11x +9x   -11x +9x 2x     -11x +9x 1x     -11x -11x +9x +9x   -11x -11x -11x +9x +9x +9x   -11x -2x +9x +1x     -11x -2x +9x +1x     -11x +9x 1x         -11x +9x    
import { applyFormat } from '../utils/applyFormat';
 import { handleSegmentCommon } from '../utils/handleSegmentCommon';
@@ -235,7 +235,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleList.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleList.ts.html index 7244388c591..0a4dddf7cd7 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleList.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleList.ts.html @@ -161,51 +161,51 @@

All files / pac       -152x -152x +149x +149x   -152x +149x 62x           -152x -123x -123x +149x +120x +120x   -123x +120x           -14x +12x         -152x +149x     -152x -115x -115x -115x +149x +111x +111x +111x   -115x +111x   -115x +111x   -115x +111x   -115x +111x   -115x +111x     -152x +149x       @@ -213,17 +213,17 @@

All files / pac       -115x +111x   -115x -115x +111x +111x             -115x +111x    
import { applyFormat } from '../utils/applyFormat';
 import { updateListMetadata } from '../../domUtils/metadata/updateListMetadata';
@@ -316,7 +316,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleListItem.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleListItem.ts.html index e1f958e061b..3bcab0f716c 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleListItem.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleListItem.ts.html @@ -217,7 +217,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleParagraph.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleParagraph.ts.html index 3d4e71b5f67..8e8dad9f5af 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleParagraph.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleParagraph.ts.html @@ -197,44 +197,44 @@

All files / pac       -272x +268x   -272x +268x 7x   -265x +261x   -265x +261x     -12x -265x +10x +261x             -265x +261x   -265x +261x   -265x +261x         -265x -265x +261x +261x   -265x -265x +261x +261x   -265x +261x       -4x +3x       @@ -246,18 +246,18 @@

All files / pac       -265x -277x +261x +271x         -265x -120x +261x +116x   -120x -120x -120x +116x +116x +116x       @@ -267,7 +267,7 @@

All files / pac 145x     -265x +261x       @@ -275,21 +275,21 @@

All files / pac       -265x +261x   -265x -120x +261x +116x   145x         -272x -272x +268x +268x     -272x +268x    
import { applyFormat } from '../utils/applyFormat';
 import { getObjectKeys, unwrap } from 'roosterjs-editor-dom';
@@ -415,7 +415,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegment.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegment.ts.html index 51d2be76e7a..a8e30ee38d4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegment.ts.html @@ -126,27 +126,27 @@

All files / pac       -276x +270x     -276x -7x +270x +5x         -276x +270x   -256x -256x +254x +254x     -7x -7x +6x +6x     -3x -3x +2x +2x     1x @@ -159,8 +159,8 @@

All files / pac       -276x -7x +270x +5x       @@ -226,7 +226,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegmentDecorator.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegmentDecorator.ts.html index 6c7d1fd8a32..484363e76b4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegmentDecorator.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleSegmentDecorator.ts.html @@ -114,23 +114,23 @@

All files / pac       -610x +598x   -305x -30x -30x +299x +29x +29x   -30x -30x +29x +29x   -30x -30x +29x +29x   -30x +29x       -305x +299x 7x 7x   @@ -193,7 +193,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleTable.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleTable.ts.html index f91cc2ff12a..0b10de48f9e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleTable.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleTable.ts.html @@ -216,57 +216,57 @@

All files / pac       -40x +39x   2x     -38x +37x   -38x +37x 2x   2x   -36x +35x   -36x -36x +35x +35x   -36x -36x -36x -36x +35x +35x +35x +35x     -38x +37x   -38x -38x +37x +37x   -38x -50x +37x +49x   -50x +49x   1x     -49x -49x -49x -  -49x +48x 48x 48x   +48x +47x +47x   -49x   -49x -72x +48x +  +48x +70x   -72x +70x       @@ -281,57 +281,57 @@

All files / pac       -72x -63x +70x +61x   -63x +61x   -63x -63x -63x -63x +61x +61x +61x +61x   -63x +61x 4x   -63x +61x 4x     -63x +61x 4x     -63x +61x 4x     -63x -59x +61x +57x 4x     -59x +57x 4x       -63x -58x -58x -58x -58x -58x +61x +56x +56x +56x +56x +56x     -63x +61x   -63x +61x         -38x +37x    
import { applyFormat } from '../utils/applyFormat';
 import { hasMetadata } from '../../domUtils/metadata/updateMetadata';
@@ -478,7 +478,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleText.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleText.ts.html index f7714f2a6f7..4b5001ed9c1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleText.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/handleText.ts.html @@ -97,13 +97,13 @@

All files / pac       -266x -266x +263x +263x   -266x -266x +263x +263x   -266x +263x    
import { handleSegmentCommon } from '../utils/handleSegmentCommon';
 import {
@@ -136,7 +136,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/index.html index c993d032042..5318cd20e0a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/handlers/index.html @@ -305,7 +305,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/index.html index 8e38bde9cc9..38509ddc2f9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/index.html @@ -23,16 +23,16 @@

All files packages-content-model/rooste
- 86.21% + 82.76% Statements - 25/29 + 24/29
- 69.05% + 66.67% Branches - 29/42 + 28/42
@@ -44,9 +44,9 @@

All files packages-content-model/rooste
- 85.71% + 82.14% Lines - 24/28 + 23/28
@@ -74,17 +74,17 @@

All files packages-content-model/rooste contentModelToDom.ts - -
+ +
- 86.21% - 25/29 - 69.05% - 29/42 + 82.76% + 24/29 + 66.67% + 28/42 100% 3/3 - 85.71% - 24/28 + 82.14% + 23/28 @@ -95,7 +95,7 @@

All files packages-content-model/rooste

diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/index.html index 13b20507e07..8db21f27556 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/index.html @@ -125,7 +125,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/mergeNode.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/mergeNode.ts.html index 6113e9cd0ea..e36986df1f8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/mergeNode.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/mergeNode.ts.html @@ -113,10 +113,10 @@

All files / pac     1x -623x -368x +614x +363x   -368x +363x       @@ -130,7 +130,7 @@

All files / pac   6x   -362x +357x       @@ -205,7 +205,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/optimize.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/optimize.ts.html index e8d410b1b66..6274e74e953 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/optimize.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/optimize.ts.html @@ -95,18 +95,18 @@

All files / pac       -619x +610x       2x     -617x -617x +608x +608x   -617x -350x +608x +345x      
import { EntityClasses, NodeType } from 'roosterjs-editor-types';
@@ -142,7 +142,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/removeUnnecessarySpan.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/removeUnnecessarySpan.ts.html index cac99539397..333ce98d4db 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/removeUnnecessarySpan.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/optimizers/removeUnnecessarySpan.ts.html @@ -93,23 +93,23 @@

All files / pac     1x -620x -358x +611x +353x         -235x -235x -235x +230x +230x +230x   -235x -234x -234x -234x +230x +229x +229x +229x     -235x +230x   123x   @@ -151,7 +151,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/applyFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/applyFormat.ts.html index 218b40c6f33..aa9d5c67860 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/applyFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/applyFormat.ts.html @@ -101,8 +101,8 @@

All files / pac       -2107x -11613x +2056x +11354x      
import {
@@ -136,7 +136,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/handleSegmentCommon.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/handleSegmentCommon.ts.html index ba0d1ab7a36..64a2258058f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/handleSegmentCommon.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/handleSegmentCommon.ts.html @@ -95,17 +95,17 @@

All files / pac       -294x -293x +288x +287x     -294x +288x   -294x +288x   -294x +288x   -294x +288x    
import { applyFormat } from './applyFormat';
 import { ContentModelSegment, ModelToDomContext } from 'roosterjs-content-model-types';
@@ -139,7 +139,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/index.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/index.html index b7dca539527..a181164ffeb 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/index.html @@ -140,7 +140,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/reuseCachedElement.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/reuseCachedElement.ts.html index f6996dc1fa6..ef35a3dced0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/reuseCachedElement.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/reuseCachedElement.ts.html @@ -196,7 +196,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/stackFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/stackFormat.ts.html index 098d208093b..79b58547b89 100644 --- a/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/stackFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-dom/lib/modelToDom/utils/stackFormat.ts.html @@ -108,25 +108,25 @@

All files / pac       -448x +439x       -448x -234x +439x +229x   -234x -234x +229x +229x         -234x +229x   -234x +229x     -214x +210x      
import {
@@ -172,7 +172,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/index.html index 0aa9bbbb09e..23600fce4e9 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/index.html @@ -110,7 +110,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/reducedModelChildProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/reducedModelChildProcessor.ts.html index d6320d646a9..c2a16557c15 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/reducedModelChildProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/reducedModelChildProcessor.ts.html @@ -349,7 +349,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/tablePreProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/tablePreProcessor.ts.html index 4c836ad31de..fe57ee26177 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/tablePreProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domToModel/processors/tablePreProcessor.ts.html @@ -92,9 +92,9 @@

All files / pac     1x -9x +8x   -9x +8x       @@ -103,7 +103,7 @@

All files / pac       -9x +8x       @@ -142,7 +142,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/borderValues.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/borderValues.ts.html index f6553a1f51f..48c1be6f4cc 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/borderValues.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/borderValues.ts.html @@ -202,7 +202,7 @@

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/index.html index a38830c7175..e7508526d46 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/index.html @@ -95,7 +95,7 @@

All files packages-content-model/rooste diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/index.html index 1a9f05f1352..d66a5853e8e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/index.html @@ -125,7 +125,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateImageMetadata.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateImageMetadata.ts.html index b5e708b18f1..eb27afa7518 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateImageMetadata.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateImageMetadata.ts.html @@ -166,7 +166,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableCellMetadata.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableCellMetadata.ts.html index f7e462d4187..34e4bcd516a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableCellMetadata.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableCellMetadata.ts.html @@ -136,7 +136,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableMetadata.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableMetadata.ts.html index 1d997a8d530..a6dbe62c99f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableMetadata.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/domUtils/metadata/updateTableMetadata.ts.html @@ -220,7 +220,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/ContentModelEditor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/ContentModelEditor.ts.html index ba395527482..441d2e31c89 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/ContentModelEditor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/ContentModelEditor.ts.html @@ -160,9 +160,9 @@

All files / packag     1x -16x +12x   -16x +12x       @@ -171,9 +171,9 @@

All files / packag     1x -8x +6x   -8x +6x       @@ -181,9 +181,9 @@

All files / packag     1x -19x +13x   -19x +13x 2x     @@ -277,7 +277,7 @@

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createContentModel.ts.html index d06e0e5aa41..a5d76618bed 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createContentModel.ts.html @@ -123,36 +123,36 @@

All files / pac     1x -27x +23x   -27x +23x   1x     -27x +23x             -24x +20x         -24x +20x           -24x -22x +20x +18x     -24x +20x       @@ -217,7 +217,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createEditorContext.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createEditorContext.ts.html index 4f06496a0bf..5802f3ca15f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createEditorContext.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/createEditorContext.ts.html @@ -104,34 +104,34 @@

All files / pac     1x -125x +95x   -25x +19x             -25x -25x +19x +19x   -25x +19x       -25x -25x +19x +19x   -25x -20x +19x +14x         -25x +19x   -25x +19x 1x     @@ -181,7 +181,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/index.html index 063d21026d5..aa8bab78da3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/index.html @@ -140,7 +140,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/setContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/setContentModel.ts.html index 14ee9a7063c..79ca2fb1430 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/setContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/setContentModel.ts.html @@ -92,7 +92,7 @@

All files / pac     1x -12x +10x       @@ -103,8 +103,8 @@

All files / pac       -12x -11x +10x +9x      
import { contentModelToDom } from 'roosterjs-content-model-dom';
@@ -139,7 +139,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/switchShadowEdit.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/switchShadowEdit.ts.html index b0a774678ae..7d831fc6cd7 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/switchShadowEdit.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/coreApi/switchShadowEdit.ts.html @@ -169,7 +169,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelCopyPastePlugin.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelCopyPastePlugin.ts.html index 0ad9c074294..7447e90db53 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelCopyPastePlugin.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelCopyPastePlugin.ts.html @@ -877,7 +877,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelTypeInContainerPlugin.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelTypeInContainerPlugin.ts.html index 50198c6a9a2..1e1d94971b0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelTypeInContainerPlugin.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/ContentModelTypeInContainerPlugin.ts.html @@ -148,7 +148,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/index.html index 09e1a553c7f..fae2d01524f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/corePlugins/index.html @@ -110,7 +110,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/createContentModelEditorCore.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/createContentModelEditorCore.ts.html index 0c8aa440d2c..a9ba759528e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/createContentModelEditorCore.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/createContentModelEditorCore.ts.html @@ -442,7 +442,7 @@

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/index.html index e03a80bc0cc..9f14e256b64 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/index.html @@ -125,7 +125,7 @@

All files packages-content-model/rooste diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/isContentModelEditor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/isContentModelEditor.ts.html index df3d82cb088..49e75cfcf8e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/isContentModelEditor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/isContentModelEditor.ts.html @@ -103,7 +103,7 @@

All files / packag diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelEditPlugin.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelEditPlugin.ts.html index fb88022ff26..a9f370c0e4a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelEditPlugin.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelEditPlugin.ts.html @@ -408,8 +408,8 @@

All files / pac     1x -75x -75x +65x +65x   1x 1x @@ -420,8 +420,8 @@

All files / pac       -11x -11x +7x +7x       @@ -859,7 +859,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelFormatPlugin.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelFormatPlugin.ts.html index 19a30462ed7..4ef147689e7 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelFormatPlugin.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/ContentModelFormatPlugin.ts.html @@ -191,11 +191,11 @@

All files / pac     1x -66x +56x       -66x +56x     4x @@ -217,10 +217,10 @@

All files / pac       -14x -13x +10x +9x   -14x +10x       @@ -325,7 +325,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/ContentModelPastePlugin.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/ContentModelPastePlugin.ts.html index 3e828657bf8..578384ccdbe 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/ContentModelPastePlugin.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/ContentModelPastePlugin.ts.html @@ -30,9 +30,9 @@

All files /
- 77.78% + 66.67% Branches - 14/18 + 12/18
@@ -241,16 +241,16 @@

All files /     1x -32x -25x +22x +17x     -7x -7x +5x +5x     -7x -7x +5x +5x   2x 2x @@ -259,14 +259,14 @@

All files / 1x     -3x +1x         -2x +1x   -3x +1x       @@ -275,10 +275,10 @@

All files /       -7x -7x +5x +5x   -7x +5x   1x  
import addParser from './utils/addParser';
@@ -371,9 +371,9 @@ 

All files / break; case KnownPasteSourceType.ExcelOnline: case KnownPasteSourceType.ExcelDesktop: - if ( + Eif ( event.pasteType === PasteType.Normal || - event.pasteType === PasteType.MergeFormat + event.pasteType === PasteType.MergeFormat ) { // Handle HTML copied from Excel processPastedContentFromExcel(ev, this.editor.getTrustedHTMLHandler()); @@ -400,7 +400,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/index.html index 25e30102e99..064c48a8957 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/index.html @@ -30,9 +30,9 @@

All files packages-content-mod
- 90.91% + 84.85% Branches - 30/33 + 28/33
@@ -79,8 +79,8 @@

All files packages-content-mod 100% 35/35 - 90.91% - 30/33 + 84.85% + 28/33 100% 4/4 100% @@ -95,7 +95,7 @@

All files packages-content-mod diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/processPastedContentFromExcel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/processPastedContentFromExcel.ts.html index fb1f02e73c5..dd44e1ae2a7 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/processPastedContentFromExcel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/Excel/processPastedContentFromExcel.ts.html @@ -30,9 +30,9 @@

All files / 90.91% + 84.85% Branches - 30/33 + 28/33 @@ -152,17 +152,17 @@

All files /       -24x -8x +21x +7x   -8x -5x -5x +7x +4x +4x       -8x -8x +7x +7x 1x   4x @@ -176,12 +176,12 @@

All files /       -8x -12x -6x -6x -6x -6x +7x +10x +4x +4x +4x +4x       @@ -192,18 +192,18 @@

All files /     1x -8x +7x +3x +3x +3x +  +7x 4x 4x 4x   -8x -5x -5x -5x -    -8x +7x    
import addParser from '../utils/addParser';
 import ContentModelBeforePasteEvent from '../../../../publicTypes/event/ContentModelBeforePasteEvent';
@@ -268,12 +268,12 @@ 

All files / trMatch[0] : '<TR>'; html = tr + html + '</TR>'; } if (html.match(LAST_TR_END_REGEX)) { let tableMatch = htmlBefore.match(LAST_TABLE_REGEX); - let table = tableMatch ? tableMatch[0] : '<TABLE>'; + let table = tableMatch ? tableMatch[0] : '<TABLE>'; html = table + html + '</TABLE>'; }   @@ -286,7 +286,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/index.html index c06ce34dab0..3dfb0a3c83f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/index.html @@ -95,7 +95,7 @@

All files packages-content-mod diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/processPastedContentFromPowerPoint.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/processPastedContentFromPowerPoint.ts.html index cedfdcb1c10..3076983ec78 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/processPastedContentFromPowerPoint.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/PowerPoint/processPastedContentFromPowerPoint.ts.html @@ -142,7 +142,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/index.html index 9a585fd2281..1eae44be33b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/index.html @@ -95,7 +95,7 @@

All files packages-content-mod diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/processPastedContentWacComponents.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/processPastedContentWacComponents.ts.html index 911d5eda563..d12efef4bdb 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/processPastedContentWacComponents.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WacComponents/processPastedContentWacComponents.ts.html @@ -847,7 +847,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/index.html index 949fcc18fa6..95a29b6cd45 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/index.html @@ -125,7 +125,7 @@

All files packages-content-mod diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processPastedContentFromWordDesktop.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processPastedContentFromWordDesktop.ts.html index b57920901bc..357e8a7ffe7 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processPastedContentFromWordDesktop.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processPastedContentFromWordDesktop.ts.html @@ -379,7 +379,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordComments.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordComments.ts.html index ccfa0dd7e87..802a6f1f9d3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordComments.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordComments.ts.html @@ -130,7 +130,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordLists.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordLists.ts.html index 1676e1445cf..df94ba8d9ea 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordLists.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/WordDesktop/processWordLists.ts.html @@ -691,7 +691,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/index.html index 9475b27958e..7262a8bc6a6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/index.html @@ -30,9 +30,9 @@

All files packages-content-model/
- 77.78% + 66.67% Branches - 14/18 + 12/18
@@ -79,8 +79,8 @@

All files packages-content-model/ 83.33% 35/42 - 77.78% - 14/18 + 66.67% + 12/18 66.67% 4/6 82.93% @@ -95,7 +95,7 @@

All files packages-content-model/ diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/addParser.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/addParser.ts.html index e61b96c6502..04d140b6145 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/addParser.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/addParser.ts.html @@ -96,14 +96,14 @@

All files /       -192x -69x +189x +67x   -192x -192x +189x +189x     -192x +189x    
import {
     ContentModelFormatMap,
@@ -136,7 +136,7 @@ 

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/deprecatedColorParser.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/deprecatedColorParser.ts.html index 95acb0e9652..eeeb93dba12 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/deprecatedColorParser.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/deprecatedColorParser.ts.html @@ -131,11 +131,11 @@

All files /     1x -7x -14x +5x +10x     -12x +10x       @@ -187,7 +187,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/index.html index 9ea4b21242d..530fd566f8f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/index.html @@ -140,7 +140,7 @@

All files packages-content-mod diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/linkParser.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/linkParser.ts.html index 300786934ff..cba7bc70f9b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/linkParser.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/linkParser.ts.html @@ -151,7 +151,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/setProcessor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/setProcessor.ts.html index 3f44cc1608a..80e098db81a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/setProcessor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/PastePlugin/utils/setProcessor.ts.html @@ -112,7 +112,7 @@

All files / istanbul - at Fri Jul 14 2023 16:16:00 GMT+0000 (Coordinated Universal Time) + at Fri Jul 14 2023 16:48:28 GMT+0000 (Coordinated Universal Time) diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/index.html index 40060672e20..4791465fb45 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/plugins/index.html @@ -110,7 +110,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/handleKeyboardEventCommon.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/handleKeyboardEventCommon.ts.html index cd79f87aa18..e0e9cf41959 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/handleKeyboardEventCommon.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/handleKeyboardEventCommon.ts.html @@ -166,9 +166,9 @@

All files / pac 1x     -43x +39x   -26x +24x 4x     @@ -355,7 +355,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/index.html index d1a39dbf45f..bab445632c1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/editor/utils/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/getLeafSiblingBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/getLeafSiblingBlock.ts.html index 4ea1ab4940b..ca1528de176 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/getLeafSiblingBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/getLeafSiblingBlock.ts.html @@ -367,7 +367,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/index.html index 6d60b2d54bc..09d9ffb7538 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/index.html @@ -155,7 +155,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelAlignment.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelAlignment.ts.html index 03f803b9b74..74da20f768b 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelAlignment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelAlignment.ts.html @@ -280,7 +280,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelDirection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelDirection.ts.html index e4a2536ec3c..71d9b691dc3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelDirection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelDirection.ts.html @@ -277,7 +277,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelIndentation.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelIndentation.ts.html index 9f49c3ba089..a036a3be101 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelIndentation.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/setModelIndentation.ts.html @@ -253,7 +253,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/toggleModelBlockQuote.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/toggleModelBlockQuote.ts.html index ab3c691d90e..754b03c8992 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/toggleModelBlockQuote.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/block/toggleModelBlockQuote.ts.html @@ -277,7 +277,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/clearModelFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/clearModelFormat.ts.html index 9b86820d5e4..4051c62c28a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/clearModelFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/clearModelFormat.ts.html @@ -634,7 +634,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/cloneModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/cloneModel.ts.html index 5025a25a67f..191e01b5e37 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/cloneModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/cloneModel.ts.html @@ -898,7 +898,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/getClosestAncestorBlockGroupIndex.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/getClosestAncestorBlockGroupIndex.ts.html index b04854aa876..31b7d29e4da 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/getClosestAncestorBlockGroupIndex.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/getClosestAncestorBlockGroupIndex.ts.html @@ -113,14 +113,14 @@

All files / pac 1x     -282x +281x   -271x -287x +270x +286x   -287x +286x 83x -204x +203x       @@ -129,7 +129,7 @@

All files / pac       -183x +182x    
import {
     ContentModelBlockGroup,
@@ -175,7 +175,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/index.html index 819e1086c17..8dfb4923d1d 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/index.html @@ -185,7 +185,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/isBlockGroupOfType.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/isBlockGroupOfType.ts.html index 974cf52d2c8..97bb4eb74d7 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/isBlockGroupOfType.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/isBlockGroupOfType.ts.html @@ -106,7 +106,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/mergeModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/mergeModel.ts.html index 5fb38f7bdc7..8b2f72ee5ae 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/mergeModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/mergeModel.ts.html @@ -475,10 +475,10 @@

All files / pac       -34x +32x   -34x -33x +32x +31x 13x     @@ -487,13 +487,13 @@

All files / pac 13x     -33x -40x +31x +38x   -40x +38x   -25x -25x +24x +24x       @@ -501,12 +501,12 @@

All files / pac 1x     -7x +6x 3x   -4x +3x   -7x +6x     7x @@ -523,7 +523,7 @@

All files / pac       -34x +32x       @@ -531,17 +531,17 @@

All files / pac       -50x -25x +48x +24x     -25x +24x   -25x -25x +24x +24x     -25x +24x 3x     @@ -628,31 +628,31 @@

All files / pac       -51x -17x -17x -17x +48x +16x +16x +16x           -17x -17x +16x +16x     -17x -17x +16x +16x     -17x +16x         -17x +16x   -17x +16x 4x 4x   @@ -671,18 +671,18 @@

All files / pac       -17x +16x   -17x +16x       -6x -6x -6x +5x +5x +5x   -6x -6x +5x +5x       @@ -1123,7 +1123,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/retrieveModelFormatState.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/retrieveModelFormatState.ts.html index 6d04c2cfbfb..8a8fd4267b0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/retrieveModelFormatState.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/retrieveModelFormatState.ts.html @@ -757,7 +757,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/wrapBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/wrapBlock.ts.html index 07322264874..28e0c974f7e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/wrapBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/common/wrapBlock.ts.html @@ -265,7 +265,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSelection.ts.html index a33b745e01c..660f2468976 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSelection.ts.html @@ -132,11 +132,11 @@

All files / pac 1x     -181x +177x   -126x +124x   -126x +124x 69x     @@ -146,9 +146,9 @@

All files / pac       -126x +124x   -126x +124x       @@ -159,9 +159,9 @@

All files / pac       -504x +496x   -126x +124x       @@ -238,7 +238,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteAllSegmentBefore.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteAllSegmentBefore.ts.html index 265e6c95d1a..bab68f480a3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteAllSegmentBefore.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteAllSegmentBefore.ts.html @@ -124,7 +124,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteCollapsedSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteCollapsedSelection.ts.html index 157546589e8..ce2007463cf 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteCollapsedSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteCollapsedSelection.ts.html @@ -349,7 +349,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteWordSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteWordSelection.ts.html index 4145c94f691..076b0005017 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteWordSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/deleteWordSelection.ts.html @@ -628,7 +628,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/index.html index ad2ad252983..7bb8a602fe6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/deleteSteps/index.html @@ -125,7 +125,7 @@

All files packages-content-model/ diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/index.html index 439d4aaa9d4..3aec883e5e2 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/createInsertPoint.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/createInsertPoint.ts.html index 2bf1ac64d6b..9d3a1c1bc74 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/createInsertPoint.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/createInsertPoint.ts.html @@ -98,7 +98,7 @@

All files /       -129x +127x       @@ -136,7 +136,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteBlock.ts.html index 33af3f12a6a..00c29ca94a1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteBlock.ts.html @@ -235,7 +235,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteExpandedSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteExpandedSelection.ts.html index 1eb33ebe693..9891414962a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteExpandedSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteExpandedSelection.ts.html @@ -205,45 +205,45 @@

All files /       -126x +124x         -126x +124x         -137x +135x         -137x -137x +135x +135x   -137x +135x   -110x +108x     -110x -110x -110x +108x +108x +108x   -110x -110x +108x +108x   -110x -113x +108x +111x             -75x +73x       @@ -257,7 +257,7 @@

All files /       -110x +108x 35x     @@ -283,7 +283,7 @@

All files / 3x     -137x +135x   47x   @@ -295,7 +295,7 @@

All files /       -126x +124x    
import { ContentModelDocument } from 'roosterjs-content-model-types';
 import { createInsertPoint } from '../utils/createInsertPoint';
@@ -424,7 +424,7 @@ 

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSegment.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSegment.ts.html index dda6ede2525..d8d195583e6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSegment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSegment.ts.html @@ -352,7 +352,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSingleChar.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSingleChar.ts.html index 41550857a98..8151cefb189 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSingleChar.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/deleteSingleChar.ts.html @@ -178,7 +178,7 @@

All files / diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/index.html index b4e1e9a2a84..8516b4ba549 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/edit/utils/index.html @@ -155,7 +155,7 @@

All files packages-content-model/ diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/index.html index 2fe4d564644..e3b88dca1ad 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/pendingFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/pendingFormat.ts.html index 9e4c7bfa823..d369ab75a22 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/pendingFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/format/pendingFormat.ts.html @@ -167,10 +167,10 @@

All files / pac     1x -12x +8x   -12x -12x +8x +8x       @@ -179,10 +179,10 @@

All files / pac     1x -15x -15x +11x +11x   -15x +11x 3x   3x @@ -190,7 +190,7 @@

All files / pac       -15x +11x       @@ -200,7 +200,7 @@

All files / pac 1x     -48x +40x       @@ -286,7 +286,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/applyImageBorderFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/applyImageBorderFormat.ts.html index 92a84a66c92..ec66867be98 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/applyImageBorderFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/applyImageBorderFormat.ts.html @@ -241,7 +241,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/index.html index d8f026a8b48..855d3f1524f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/image/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/findListItemsInSameThread.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/findListItemsInSameThread.ts.html index faeaae3f464..a3ccbd6c923 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/findListItemsInSameThread.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/findListItemsInSameThread.ts.html @@ -499,7 +499,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/index.html index a768298e9a5..fe389f0a706 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/index.html @@ -110,7 +110,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/setListType.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/setListType.ts.html index d504fb0390e..739daf93cf4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/setListType.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/list/setListType.ts.html @@ -391,7 +391,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustSegmentSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustSegmentSelection.ts.html index df6cb6ecf36..60733aaf212 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustSegmentSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustSegmentSelection.ts.html @@ -226,7 +226,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustWordSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustWordSelection.ts.html index c2d33d3349a..104c5bd9917 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustWordSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/adjustWordSelection.ts.html @@ -505,7 +505,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collapseTableSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collapseTableSelection.ts.html index 3353d68d92d..737b01bdfbc 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collapseTableSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collapseTableSelection.ts.html @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collectSelections.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collectSelections.ts.html index a9ef52fdb8a..235ea16059a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collectSelections.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/collectSelections.ts.html @@ -742,7 +742,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/getSelectionRootNode.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/getSelectionRootNode.ts.html index c132ed5b72e..cef7b7f0ee3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/getSelectionRootNode.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/getSelectionRootNode.ts.html @@ -79,7 +79,7 @@

All files / pac     1x -44x +43x       @@ -112,7 +112,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/index.html index 0a5efb55ecd..6d0e0f80309 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/index.html @@ -185,7 +185,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/iterateSelections.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/iterateSelections.ts.html index 60d2eba4b5f..0b115baf85a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/iterateSelections.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/iterateSelections.ts.html @@ -382,17 +382,17 @@

All files / pac       -614x -615x +612x +613x     2x     -615x +613x     -614x +612x       @@ -402,19 +402,19 @@

All files / pac       -816x -816x -816x +814x +814x +814x   -816x +814x   -816x -816x +814x +814x   -816x -869x +814x +867x   -869x +867x   119x   @@ -507,13 +507,13 @@

All files / pac 41x     -673x +671x   -673x -975x -975x +671x +971x +971x   -975x +971x   27x   @@ -540,21 +540,21 @@

All files / pac 27x 10x   -948x -612x +944x +610x     -975x -626x +971x +624x   -349x +347x       -673x +671x 40x   -633x +631x       @@ -566,7 +566,7 @@

All files / pac       -769x +767x       @@ -577,7 +577,7 @@

All files / pac       -769x +767x    
import { TableSelectionContext } from '../../publicTypes/selection/TableSelectionContext';
 import {
@@ -847,7 +847,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/setSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/setSelection.ts.html index cee553e84a7..27691e99585 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/setSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/selection/setSelection.ts.html @@ -667,7 +667,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTable.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTable.ts.html index c4479bcc3bc..91f8ee73678 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTable.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTable.ts.html @@ -130,7 +130,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTableCell.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTableCell.ts.html index 22472f01364..e71229742c2 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTableCell.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/alignTableCell.ts.html @@ -235,7 +235,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/applyTableFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/applyTableFormat.ts.html index 5fedff7dcc8..0ff17380b0a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/applyTableFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/applyTableFormat.ts.html @@ -859,7 +859,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/canMergeCells.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/canMergeCells.ts.html index 48be0457598..c33821cdbad 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/canMergeCells.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/canMergeCells.ts.html @@ -271,7 +271,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/createTableStructure.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/createTableStructure.ts.html index 2e026dd0c2a..d7058b12cfe 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/createTableStructure.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/createTableStructure.ts.html @@ -139,7 +139,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTable.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTable.ts.html index c77e0d451dc..b0b72ba4e7a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTable.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTable.ts.html @@ -91,7 +91,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableColumn.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableColumn.ts.html index d5b9da35c77..d67220e69ce 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableColumn.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableColumn.ts.html @@ -142,7 +142,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableRow.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableRow.ts.html index b4194ee4806..c60cfeb86ad 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableRow.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/deleteTableRow.ts.html @@ -136,7 +136,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/getSelectedCells.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/getSelectedCells.ts.html index e8f0eeea660..77f6f6a5029 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/getSelectedCells.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/getSelectedCells.ts.html @@ -196,7 +196,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/index.html index 92ee31ad4b8..504da8de0d1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/index.html @@ -350,7 +350,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableColumn.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableColumn.ts.html index 5af66ebf353..d4b0b5e67ac 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableColumn.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableColumn.ts.html @@ -181,7 +181,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableRow.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableRow.ts.html index dd3a9198f89..02ccf110946 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableRow.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/insertTableRow.ts.html @@ -166,7 +166,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableCells.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableCells.ts.html index c7ee2712674..c31e810580e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableCells.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableCells.ts.html @@ -145,7 +145,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableColumn.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableColumn.ts.html index 382555408fa..f586e32996a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableColumn.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableColumn.ts.html @@ -244,7 +244,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableRow.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableRow.ts.html index 283e0ff6ee9..e46345840df 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableRow.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/mergeTableRow.ts.html @@ -244,7 +244,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/normalizeTable.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/normalizeTable.ts.html index 1d1b0cebfa6..c0fe1c14823 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/normalizeTable.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/normalizeTable.ts.html @@ -451,7 +451,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/setTableCellBackgroundColor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/setTableCellBackgroundColor.ts.html index b57c546099f..a8754c9f223 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/setTableCellBackgroundColor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/setTableCellBackgroundColor.ts.html @@ -256,7 +256,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellHorizontally.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellHorizontally.ts.html index 44e00f4020b..e927e7cd76d 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellHorizontally.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellHorizontally.ts.html @@ -247,7 +247,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellVertically.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellVertically.ts.html index 8faac60273e..7d82d94a7de 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellVertically.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/modelApi/table/splitTableCellVertically.ts.html @@ -268,7 +268,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/index.html index 46714ce4eeb..14a88ccb564 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/index.html @@ -185,7 +185,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setAlignment.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setAlignment.ts.html index 4de5fcc930d..731d0535959 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setAlignment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setAlignment.ts.html @@ -109,7 +109,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setDirection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setDirection.ts.html index 4f96f6ae52e..d760850d694 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setDirection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setDirection.ts.html @@ -100,7 +100,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setHeaderLevel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setHeaderLevel.ts.html index a0b4f491552..c37c7d63316 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setHeaderLevel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setHeaderLevel.ts.html @@ -220,7 +220,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setIndentation.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setIndentation.ts.html index d096cbb1fcb..a8493d64b45 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setIndentation.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setIndentation.ts.html @@ -136,7 +136,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setParagraphMargin.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setParagraphMargin.ts.html index 81e2230dff9..8d323e98948 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setParagraphMargin.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setParagraphMargin.ts.html @@ -166,7 +166,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setSpacing.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setSpacing.ts.html index 292923e4239..3334ea94110 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setSpacing.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/setSpacing.ts.html @@ -118,7 +118,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/toggleBlockQuote.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/toggleBlockQuote.ts.html index 9ba36ca667a..80fdbc0d4e2 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/toggleBlockQuote.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/block/toggleBlockQuote.ts.html @@ -190,7 +190,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/handleKeyDownEvent.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/handleKeyDownEvent.ts.html index cd88a922144..13ef2d83a2e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/handleKeyDownEvent.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/handleKeyDownEvent.ts.html @@ -268,7 +268,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/index.html index f0b9feab849..68cdf9971d0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/editing/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/applyPendingFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/applyPendingFormat.ts.html index a37cc86a86d..49458c729ef 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/applyPendingFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/applyPendingFormat.ts.html @@ -301,7 +301,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/clearFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/clearFormat.ts.html index 33aab58f96d..79060f9cd50 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/clearFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/clearFormat.ts.html @@ -148,7 +148,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getFormatState.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getFormatState.ts.html index 6847a6f3175..e9442e79a05 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getFormatState.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getFormatState.ts.html @@ -169,7 +169,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getSegmentFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getSegmentFormat.ts.html index b8fea271766..de6ca4e2fe5 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getSegmentFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/getSegmentFormat.ts.html @@ -187,7 +187,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/index.html index 4d49aa4c206..3ed7e9dd360 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/format/index.html @@ -140,7 +140,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/adjustImageSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/adjustImageSelection.ts.html index 20f846b7098..42711195c0c 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/adjustImageSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/adjustImageSelection.ts.html @@ -157,7 +157,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/changeImage.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/changeImage.ts.html index 65050d467ca..da5c9ce2cf0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/changeImage.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/changeImage.ts.html @@ -193,7 +193,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/index.html index 45e1b8e2087..15ad49cb60d 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/index.html @@ -170,7 +170,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/insertImage.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/insertImage.ts.html index c446afbcd36..a3aa30ffdee 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/insertImage.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/insertImage.ts.html @@ -175,7 +175,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageAltText.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageAltText.ts.html index 04198d1b711..9219be147a8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageAltText.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageAltText.ts.html @@ -109,7 +109,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBorder.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBorder.ts.html index dfe528b5f8f..034cf8c59c4 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBorder.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBorder.ts.html @@ -130,7 +130,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBoxShadow.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBoxShadow.ts.html index 8d0e3e4bb1d..5bebd987917 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBoxShadow.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/image/setImageBoxShadow.ts.html @@ -154,7 +154,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/adjustLinkSelection.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/adjustLinkSelection.ts.html index 48c8bae6a5a..f639ee9a477 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/adjustLinkSelection.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/adjustLinkSelection.ts.html @@ -187,7 +187,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/index.html index c48b8b56bfb..7c03b543fdc 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/index.html @@ -125,7 +125,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/insertLink.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/insertLink.ts.html index 7ebd9ab8f23..ee8ea757bc8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/insertLink.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/insertLink.ts.html @@ -532,7 +532,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/removeLink.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/removeLink.ts.html index c0855c9e4a6..0f363372d63 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/removeLink.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/link/removeLink.ts.html @@ -169,7 +169,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/index.html index 4e0fff68993..1761d8906c8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/index.html @@ -140,7 +140,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStartNumber.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStartNumber.ts.html index b4e59d4cc68..434fb1716c6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStartNumber.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStartNumber.ts.html @@ -133,7 +133,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStyle.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStyle.ts.html index 7957e73d656..ad215d6a0a3 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStyle.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/setListStyle.ts.html @@ -169,7 +169,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleBullet.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleBullet.ts.html index dc63fe9c244..ae53955c814 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleBullet.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleBullet.ts.html @@ -109,7 +109,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleNumbering.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleNumbering.ts.html index 081593a13ed..b881e26cce6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleNumbering.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/list/toggleNumbering.ts.html @@ -109,7 +109,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/applySegmentFormat.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/applySegmentFormat.ts.html index 09c7ea3bcc2..e3be6a2cc1e 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/applySegmentFormat.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/applySegmentFormat.ts.html @@ -157,7 +157,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeCapitalization.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeCapitalization.ts.html index f9b9f821a32..8ff0a67db48 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeCapitalization.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeCapitalization.ts.html @@ -235,7 +235,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeFontSize.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeFontSize.ts.html index f4b88fa0aa8..ff36aa73b70 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeFontSize.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/changeFontSize.ts.html @@ -283,7 +283,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/index.html index 8a5e3d53d24..4373392a0d0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/index.html @@ -290,7 +290,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setBackgroundColor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setBackgroundColor.ts.html index 0714188fc3b..57e88a41881 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setBackgroundColor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setBackgroundColor.ts.html @@ -136,7 +136,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontName.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontName.ts.html index 6c56b2d3d52..83a74fb407f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontName.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontName.ts.html @@ -133,7 +133,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontSize.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontSize.ts.html index 239673fdafd..25c2dc6392f 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontSize.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setFontSize.ts.html @@ -121,7 +121,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setTextColor.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setTextColor.ts.html index e1a3f36f33c..296743c2fd8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setTextColor.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/setTextColor.ts.html @@ -157,7 +157,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleBold.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleBold.ts.html index 0e4456d91bf..f3d45246725 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleBold.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleBold.ts.html @@ -157,7 +157,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleCode.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleCode.ts.html index a52517c1a60..72386160ad0 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleCode.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleCode.ts.html @@ -157,7 +157,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleItalic.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleItalic.ts.html index abbce00444d..cd47eb9c049 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleItalic.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleItalic.ts.html @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleStrikethrough.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleStrikethrough.ts.html index eb534431633..312276ed586 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleStrikethrough.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleStrikethrough.ts.html @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSubscript.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSubscript.ts.html index 165bb6a3bb4..ca11192e8d8 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSubscript.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSubscript.ts.html @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSuperscript.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSuperscript.ts.html index b9d079e8dc0..ef85fcbc122 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSuperscript.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleSuperscript.ts.html @@ -115,7 +115,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleUnderline.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleUnderline.ts.html index 60bc2adf260..f90c4b55e72 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleUnderline.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/segment/toggleUnderline.ts.html @@ -127,7 +127,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlock.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlock.ts.html index da551c0ddb3..a337cfce6c6 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlock.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlock.ts.html @@ -145,7 +145,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlockGroup.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlockGroup.ts.html index 69919104c76..dca1b2e703d 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlockGroup.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInBlockGroup.ts.html @@ -118,7 +118,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInSegment.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInSegment.ts.html index f4e25b3d2d5..86b88a9b5c1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInSegment.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/hasSelectionInSegment.ts.html @@ -103,7 +103,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/index.html index 66f480d54c8..53d0ef9d966 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/selection/index.html @@ -125,7 +125,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/index.html index 17d76007659..fd412c6fa5a 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/index.html @@ -95,7 +95,7 @@

All files packages-content-model/roo diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/setTableCellShade.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/setTableCellShade.ts.html index ecd3aede7f8..2b4c2abd1bd 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/setTableCellShade.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/table/setTableCellShade.ts.html @@ -163,7 +163,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatImageWithContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatImageWithContentModel.ts.html index 2d88017c8e7..6b195d86d91 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatImageWithContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatImageWithContentModel.ts.html @@ -151,7 +151,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatParagraphWithContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatParagraphWithContentModel.ts.html index bb6602cef13..28ab737c766 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatParagraphWithContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatParagraphWithContentModel.ts.html @@ -148,7 +148,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatSegmentWithContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatSegmentWithContentModel.ts.html index c099842195d..b95185900f1 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatSegmentWithContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatSegmentWithContentModel.ts.html @@ -310,7 +310,7 @@

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatWithContentModel.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatWithContentModel.ts.html index b8ea536cbe6..3a822ab6ac5 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatWithContentModel.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/formatWithContentModel.ts.html @@ -226,30 +226,30 @@

All files / pac       -292x -292x -292x -292x -292x -292x -292x -292x +290x +290x +290x +290x +290x +290x +290x +290x             -292x +290x   -292x -188x -189x -189x -189x +290x +186x +187x +187x +187x     -189x +187x 16x 16x   @@ -258,17 +258,17 @@

All files / pac       -189x +187x     -188x +186x 6x   6x 3x     -182x +180x       @@ -278,7 +278,7 @@

All files / pac       -188x +186x      
import { ChangeSource } from 'roosterjs-editor-types';
@@ -400,7 +400,7 @@ 

All files / pac diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/index.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/index.html index 134d3590eab..49198b7e9ea 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/index.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/index.html @@ -23,16 +23,16 @@

All files packages-content-model/roo
- 94.31% + 93.5% Statements - 116/123 + 115/123
- 85.71% + 83.93% Branches - 96/112 + 94/112
@@ -44,9 +44,9 @@

All files packages-content-model/roo
- 94.78% + 93.91% Lines - 109/115 + 108/115
@@ -134,17 +134,17 @@

All files packages-content-model/roo paste.ts - -
+ +
- 86.36% - 38/44 - 77.78% - 42/54 + 84.09% + 37/44 + 74.07% + 40/54 71.43% 5/7 - 88.37% - 38/43 + 86.05% + 37/43 @@ -155,7 +155,7 @@

All files packages-content-model/roo

diff --git a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/paste.ts.html b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/paste.ts.html index 64a94579f9c..dc2b2fd5f30 100644 --- a/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/paste.ts.html +++ b/coverage/packages-content-model/roosterjs-content-model-editor/lib/publicApi/utils/paste.ts.html @@ -23,16 +23,16 @@

All files / pac
- 86.36% + 84.09% Statements - 38/44 + 37/44
- 77.78% + 74.07% Branches - 42/54 + 40/54
@@ -44,9 +44,9 @@

All files / pac
- 88.37% + 86.05% Lines - 38/43 + 37/43
@@ -268,26 +268,26 @@

All files / pac 1x     -10x -10x -10x +7x +7x +7x   -6x +4x   -5x +3x   1x     -6x -6x -6x +4x +4x +4x           -6x +4x       @@ -296,7 +296,7 @@

All files / pac       -6x +4x       @@ -312,19 +312,19 @@

All files / pac       -6x -6x +4x +4x       -6x +4x     -6x +4x       -6x +4x       @@ -335,12 +335,12 @@

All files / pac       -6x +4x     -6x +4x   -6x +4x       @@ -361,35 +361,35 @@

All files / pac       -6x -18x -6x +4x +12x +4x   -6x +4x         -6x +4x     -6x +4x   -1x -5x -5x +  +4x +4x             -6x +4x     -6x +4x   -6x +4x       @@ -547,9 +547,9 @@

All files / pac retrieveMetadataFromClipboard(doc, event, editor.getTrustedHTMLHandler());   // Step 3: Fill the BeforePasteEvent object, especially the fragment for paste - if ((pasteAsImage && imageDataUri) || (!pasteAsText && !text && imageDataUri)) { + Iif ((pasteAsImage && imageDataUri) || (!pasteAsText && !text && imageDataUri)) { // Paste image - handleImagePaste(imageDataUri, fragment); + handleImagePaste(imageDataUri, fragment); } else Eif (!pasteAsText && rawHtml && doc ? doc.body : false) { moveChildNodes(fragment, doc?.body); } else if (text) { @@ -586,7 +586,7 @@

All files / pac

diff --git a/coverage/packages/roosterjs-color-utils/lib/index.html b/coverage/packages/roosterjs-color-utils/lib/index.html index 4a0d6531bcf..414d85e6000 100644 --- a/coverage/packages/roosterjs-color-utils/lib/index.html +++ b/coverage/packages/roosterjs-color-utils/lib/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-color-utils/l diff --git a/coverage/packages/roosterjs-color-utils/lib/index.ts.html b/coverage/packages/roosterjs-color-utils/lib/index.ts.html index adb744296ab..26f784ee86d 100644 --- a/coverage/packages/roosterjs-color-utils/lib/index.ts.html +++ b/coverage/packages/roosterjs-color-utils/lib/index.ts.html @@ -58,7 +58,7 @@

All files / packages/
1 -222x +218x  
export { default as getDarkColor } from './utils/getDarkColor';
  
@@ -67,7 +67,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs-color-utils/lib/utils/getDarkColor.ts.html b/coverage/packages/roosterjs-color-utils/lib/utils/getDarkColor.ts.html index 81b86f57cae..054aefd9935 100644 --- a/coverage/packages/roosterjs-color-utils/lib/utils/getDarkColor.ts.html +++ b/coverage/packages/roosterjs-color-utils/lib/utils/getDarkColor.ts.html @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-color-utils/lib/utils/index.html b/coverage/packages/roosterjs-color-utils/lib/utils/index.html index 4d3349ef304..f590e7ce968 100644 --- a/coverage/packages/roosterjs-color-utils/lib/utils/index.html +++ b/coverage/packages/roosterjs-color-utils/lib/utils/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-color-util diff --git a/coverage/packages/roosterjs-editor-api/lib/format/changeCapitalization.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/changeCapitalization.ts.html index 0e6f18d46b0..775c775b681 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/changeCapitalization.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/changeCapitalization.ts.html @@ -23,30 +23,30 @@

All files / packag -
+

-	
-	
+	
-	
-	
-	
-	
-	
-	
-	
-	
+	
+	
+	
+	
+	
+	
+	
+	
@@ -118,18 +118,18 @@ 

All files packages/roosterjs-editor-api

- - + - - - - - - - - + + + + + + + + @@ -239,17 +239,17 @@

All files packages/roosterjs-editor-api

- - - - - - - - - + + + + + + + + @@ -304,8 +304,8 @@

All files packages/roosterjs-editor-api

- - + + @@ -545,7 +545,7 @@

All files packages/roosterjs-editor-api diff --git a/coverage/packages/roosterjs-editor-api/lib/format/insertEntity.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/insertEntity.ts.html index 382b1946a86..1370db9aec9 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/insertEntity.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/insertEntity.ts.html @@ -559,7 +559,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/insertImage.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/insertImage.ts.html index 83580bc2737..6faebbe0f0c 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/insertImage.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/insertImage.ts.html @@ -193,7 +193,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/removeLink.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/removeLink.ts.html index 2c379968ee2..267f6251b4e 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/removeLink.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/removeLink.ts.html @@ -133,7 +133,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/replaceWithNode.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/replaceWithNode.ts.html index bec7a029def..92a8ccd468e 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/replaceWithNode.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/replaceWithNode.ts.html @@ -304,7 +304,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/rotateElement.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/rotateElement.ts.html index 35b10f569dc..7dadc2e5713 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/rotateElement.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/rotateElement.ts.html @@ -124,7 +124,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setAlignment.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setAlignment.ts.html index 750b8cdc6af..6f9bc9361a8 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setAlignment.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setAlignment.ts.html @@ -23,30 +23,30 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setBackgroundColor.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setBackgroundColor.ts.html index 38d66553d39..5153cdbd8bc 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setBackgroundColor.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setBackgroundColor.ts.html @@ -154,7 +154,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setDirection.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setDirection.ts.html index 8518e7723c2..5a205327ed7 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setDirection.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setDirection.ts.html @@ -148,7 +148,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setFontName.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setFontName.ts.html index 1d3d0c1c296..f09b06a8126 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setFontName.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setFontName.ts.html @@ -90,11 +90,11 @@

All files / packag 1x     -3x +15x       -4x +40x       @@ -127,7 +127,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setFontSize.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setFontSize.ts.html index 336c069f840..f952dca5e4a 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setFontSize.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setFontSize.ts.html @@ -30,9 +30,9 @@

All files / packag
- 50% + 66.67% Branches - 3/6 + 4/6
@@ -96,13 +96,13 @@

All files / packag 1x     -3x +15x       -4x -4x -4x +40x +40x +40x       @@ -128,7 +128,7 @@

All files / packag (element, isInnerNode) => { element.style.fontSize = isInnerNode ? '' : fontSize; let lineHeight = getComputedStyle(element, 'line-height'); - Iif (lineHeight && lineHeight != 'normal') { + Iif (lineHeight && lineHeight != 'normal') { element.style.lineHeight = 'normal'; } }, @@ -142,7 +142,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setImageAltText.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setImageAltText.ts.html index 82594ce4dd7..dae97b42095 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setImageAltText.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setImageAltText.ts.html @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setIndentation.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setIndentation.ts.html index e053374b103..bed0d5c0634 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setIndentation.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setIndentation.ts.html @@ -265,23 +265,23 @@

All files / packag       -6x +16x   -6x +16x     -3x -3x +13x +13x   -3x -4x -4x +13x +15x +15x           -4x +15x 2x     @@ -320,15 +320,15 @@

All files / packag       -2x +13x       -5x +15x     -6x -6x +16x +16x       @@ -344,16 +344,16 @@

All files / packag 3x     -3x +13x           -2x -2x -2x -2x +12x +12x +12x +12x       @@ -568,7 +568,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setOrderedListNumbering.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setOrderedListNumbering.ts.html index bc38b5b0a02..69faa0ecf3d 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setOrderedListNumbering.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setOrderedListNumbering.ts.html @@ -178,7 +178,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/setTextColor.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/setTextColor.ts.html index 06f6dc900f6..4dc3f6b7b0a 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/setTextColor.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/setTextColor.ts.html @@ -178,7 +178,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleBlockQuote.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleBlockQuote.ts.html index b1768f5464f..ab541c64460 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleBlockQuote.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleBlockQuote.ts.html @@ -105,13 +105,13 @@

All files / packag     1x -18x +19x     -20x -20x +21x +21x   -18x +19x       @@ -151,7 +151,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleBold.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleBold.ts.html index eebe4d5ba37..3c6fbd801d9 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleBold.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleBold.ts.html @@ -83,7 +83,7 @@

All files / packag     1x -2x +11x    

';\n html = tr + html + '';\n }\n if (html.match(LAST_TR_END_REGEX)) {\n let tableMatch = htmlBefore.match(LAST_TABLE_REGEX);\n let table = tableMatch ? tableMatch[0] : '
1 2 @@ -149,19 +149,19 @@

All files / packag       -  +20x     -  -  +24x +24x       -  -  -  +24x +24x +24x   -  +1x       @@ -173,32 +173,32 @@

All files / packag       -  +25x     -  +25x   -  +3x   -  +14x   -  -  -  +6x +5x +14x     -  +5x     -  +2x           -  -  -  +2x +2x +6x       @@ -218,24 +218,24 @@

All files / packag * Identifying Languages". For example: 'en' or 'en-US' for English, 'tr' for Turkish. * Default is the host environment’s current locale. */ -export default function changeCapitalization( +export default function changeCapitalization( editor: IEditor, capitalization: Capitalization | CompatibleCapitalization, language?: string ) { - applyInlineStyle( + applyInlineStyle( editor, - element => { - for ( - let node = getFirstLeafNode(element); + element => { + for ( + let node = getFirstLeafNode(element); node; node = getNextLeafSibling(element, node) ) { - if (node.nodeType == NodeType.Text) { - try { - node.textContent = getCapitalizedText(node.textContent, language); + Eif (node.nodeType == NodeType.Text) { + try { + node.textContent = getCapitalizedText(node.textContent, language); } catch { - node.textContent = getCapitalizedText(node.textContent, undefined); + node.textContent = getCapitalizedText(node.textContent, undefined); } } } @@ -243,38 +243,38 @@

All files / packag 'changeCapitalization' );   - function getCapitalizedText( + function getCapitalizedText( originalText: string | null, language: string | undefined ): string | null { - if (originalText === null) { + Iif (originalText === null) { return originalText; } - switch (capitalization) { + switch (capitalization) { case Capitalization.Lowercase: - return originalText.toLocaleLowerCase(language); + return originalText.toLocaleLowerCase(language); case Capitalization.Uppercase: - return originalText.toLocaleUpperCase(language); + return originalText.toLocaleUpperCase(language); case Capitalization.CapitalizeEachWord: - const wordArray = originalText.toLocaleLowerCase(language).split(' '); - for (let i = 0; i < wordArray.length; i++) { - wordArray[i] = + const wordArray = originalText.toLocaleLowerCase(language).split(' '); + for (let i = 0; i < wordArray.length; i++) { + wordArray[i] = wordArray[i].charAt(0).toLocaleUpperCase(language) + wordArray[i].slice(1); } - return wordArray.join(' '); + return wordArray.join(' '); case Capitalization.Sentence: // TODO: Add rules on punctuation for internationalization - TASK 104769 - const punctuationMarks = '[\\.\\!\\?]'; + const punctuationMarks = '[\\.\\!\\?]'; // Find a match of a word character either: // - At the beginning of a string with or without preceding whitespace, for // example: ' hello world' and 'hello world' strings would both match 'h'. // - Or preceded by a punctuation mark and at least one whitespace, for // example 'yes. hello world' would match 'y' and 'h'. - const regex = new RegExp('^\\s*\\w|' + punctuationMarks + '\\s+\\w', 'g'); - return originalText.toLocaleLowerCase(language).replace(regex, match => { - return match.toLocaleUpperCase(language); + const regex = new RegExp('^\\s*\\w|' + punctuationMarks + '\\s+\\w', 'g'); + return originalText.toLocaleLowerCase(language).replace(regex, match => { + return match.toLocaleUpperCase(language); }); - default: + default: return originalText; } } @@ -286,7 +286,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/changeFontSize.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/changeFontSize.ts.html index 8be9a959951..872dc445d84 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/changeFontSize.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/changeFontSize.ts.html @@ -280,7 +280,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/clearBlockFormat.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/clearBlockFormat.ts.html index 77838dc44cd..403cafd1f41 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/clearBlockFormat.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/clearBlockFormat.ts.html @@ -75,7 +75,7 @@

All files / packag     1x -14x +15x    

import clearFormat from './clearFormat';
 import { ClearFormatMode, IEditor } from 'roosterjs-editor-types';
@@ -94,7 +94,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/clearFormat.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/clearFormat.ts.html index 2808a0ea209..78fc90c2beb 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/clearFormat.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/clearFormat.ts.html @@ -23,30 +23,30 @@

All files / packag -
+
1 2 @@ -460,60 +460,60 @@

All files / packag       -  -  -  +12x +12x +12x       -  +12x     -  +12x         -84x -84x -84x +228x +228x +228x     -84x -84x -47x +228x +228x +144x           -29x -6x +100x +30x   -29x +100x     -18x +44x       -84x +228x       -18x -18x +44x +44x   -18x -5x +44x +7x   -5x +7x   -5x +7x       -3x +5x       @@ -560,23 +560,23 @@

All files / packag       -  -  -  -  -  +6x +6x +12x +4x +2x   -  -  -  -  +2x +2x +4x +2x     -  +2x   -  +8x   -  +2x       @@ -586,20 +586,20 @@

All files / packag       -  -  -  -  +12x +12x +8x +8x   -  +8x     -  -  -  +8x +4x +4x     -  +8x       @@ -608,14 +608,14 @@

All files / packag       -14x +23x     -14x -15x -15x +23x +24x +24x   -15x +24x     4x @@ -625,53 +625,53 @@

All files / packag       -15x +24x         -7x -7x +11x +11x     -15x +24x   -14x +23x             -2x -2x -2x -2x +11x +11x +11x +11x       -2x +11x   -2x +11x       -4x -2x +18x +9x     -2x +13x           -16x -16x -16x -2x -2x -2x +34x +34x +34x +4x +4x +4x       @@ -684,14 +684,14 @@

All files / packag       -16x -2x -2x +34x +14x +14x   -2x -2x +14x +14x   -2x +14x       @@ -708,34 +708,34 @@

All files / packag       -2x +14x             -2x -  +14x +5x   -2x +9x   -2x +14x     -2x +14x             -2x -8x +4x +16x       -2x +4x       @@ -750,17 +750,17 @@

All files / packag   1x   -18x +49x   -16x +38x   -2x -2x +11x +11x   -14x -14x +15x +15x   -  +12x      

import applyListItemStyleWrap from '../utils/applyListItemWrap';
@@ -812,17 +812,17 @@ 

All files / packag * @param editor The editor instance * @returns if the current selection is composed of two or more block elements */ -function isMultiBlockSelection(editor: IEditor): boolean { - let transverser = editor.getSelectionTraverser(); - let blockElement = transverser?.currentBlockElement; - if (!blockElement) { +function isMultiBlockSelection(editor: IEditor): boolean { + let transverser = editor.getSelectionTraverser(); + let blockElement = transverser?.currentBlockElement; + Iif (!blockElement) { return false; }   - let nextBlockElement = transverser?.getNextBlockElement(); + let nextBlockElement = transverser?.getNextBlockElement();   //At least two blocks are selected - return !!nextBlockElement; + return !!nextBlockElement; }   function clearNodeFormat(node: Node): boolean { @@ -912,24 +912,24 @@

All files / packag * Ignoring the children of contentDiv and returning true if any node is LI * @returns `true` if this node, and its parents (minus the children of the contentDiv) have no siblings with text content */ -function isNodeWholeBlock(node: Node, editor: IEditor) { - let currentNode: ParentNode | Node | null = node; - while (currentNode && editor.contains(currentNode.parentNode)) { - if (currentNode.nextSibling || currentNode.previousSibling) { - if (safeInstanceOf(currentNode, 'HTMLLIElement')) { - return true; +function isNodeWholeBlock(node: Node, editor: IEditor) { + let currentNode: ParentNode | Node | null = node; + while (currentNode && editor.contains(currentNode.parentNode)) { + if (currentNode.nextSibling || currentNode.previousSibling) { + if (safeInstanceOf(currentNode, 'HTMLLIElement')) { + return true; } - let isOnlySiblingWithContent = true; - currentNode.parentNode?.childNodes.forEach(node => { - if (node != currentNode && node.textContent?.length) { - isOnlySiblingWithContent = false; + let isOnlySiblingWithContent = true; + currentNode.parentNode?.childNodes.forEach(node => { + if (node != currentNode && node.textContent?.length) { + isOnlySiblingWithContent = false; } }); - return isOnlySiblingWithContent; + return isOnlySiblingWithContent; } - currentNode = currentNode.parentNode; + currentNode = currentNode.parentNode; } - return true; + return true; }   /** @@ -938,21 +938,21 @@

All files / packag * If the current selection is compose of a partial inline element then only the text format is removed from the current selection * @param editor The editor instance */ -function clearAutoDetectFormat(editor: IEditor) { - const isMultiBlock = isMultiBlockSelection(editor); - if (!isMultiBlock) { - const transverser = editor.getSelectionTraverser(); - const inlineElement = transverser?.currentInlineElement; +function clearAutoDetectFormat(editor: IEditor) { + const isMultiBlock = isMultiBlockSelection(editor); + if (!isMultiBlock) { + const transverser = editor.getSelectionTraverser(); + const inlineElement = transverser?.currentInlineElement; const isPartial = - inlineElement instanceof PartialInlineElement || + inlineElement instanceof PartialInlineElement || (inlineElement instanceof NodeInlineElement && !isNodeWholeBlock(inlineElement.getContainerNode(), editor)); - if (isPartial) { - clearFormat(editor); - return; + if (isPartial) { + clearFormat(editor); + return; } } - clearBlockFormat(editor); + clearBlockFormat(editor); }   /** @@ -1068,8 +1068,8 @@

All files / packag setBackgroundColor(editor, defaultFormat.backgroundColor); } } - Iif (defaultFormat.bold) { - toggleBold(editor); + if (defaultFormat.bold) { + toggleBold(editor); } else { setDefaultFontWeight(editor); } @@ -1112,8 +1112,8 @@

All files / packag case ClearFormatMode.Block: clearBlockFormat(editor); break; - default: - clearAutoDetectFormat(editor); + default: + clearAutoDetectFormat(editor); } }  

@@ -1123,7 +1123,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/createLink.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/createLink.ts.html index 70bbd5af038..eb96c8f140a 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/createLink.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/createLink.ts.html @@ -538,7 +538,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/getFormatState.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/getFormatState.ts.html index 344797ae081..95886b481d8 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/getFormatState.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/getFormatState.ts.html @@ -370,7 +370,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/index.html b/coverage/packages/roosterjs-editor-api/lib/format/index.html index b9b82790ae2..16c52144175 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/index.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/index.html @@ -23,30 +23,30 @@

All files packages/roosterjs-editor-api
- 64.07% + 71.54% Statements - 403/629 + 450/629
- 46.28% + 55.41% Branches - 218/471 + 261/471
- 66.67% + 74.56% Functions - 76/114 + 85/114
- 63.68% + 71.17% Lines - 391/614 + 437/614
@@ -73,18 +73,18 @@

All files packages/roosterjs-editor-api

changeCapitalization.ts -
+
changeCapitalization.ts +
12%3/250%0/90%0/412.5%3/2492%23/2566.67%6/9100%4/491.67%22/24
clearFormat.ts -
+
clearFormat.ts +
65.13%99/15241.03%48/11765.52%19/2963.7%93/14683.55%127/15272.65%85/11779.31%23/2982.88%121/146
setAlignment.ts -
+
+
95.74%45/4787.1%27/3187.5%7/895.74%45/4793.62%44/4783.87%26/31100%8/893.62%44/47
87.5% 7/850%3/666.67%4/6 100% 2/2 87.5%
import execCommand from '../utils/execCommand';
 import { DocumentCommand, IEditor } from 'roosterjs-editor-types';
@@ -106,7 +106,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleBullet.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleBullet.ts.html index 87d4bc1cc95..bf874814a33 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleBullet.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleBullet.ts.html @@ -151,7 +151,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleCodeBlock.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleCodeBlock.ts.html index ec5af25a78c..93a338e0448 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleCodeBlock.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleCodeBlock.ts.html @@ -178,7 +178,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleHeader.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleHeader.ts.html index a982ad23a2e..6a4f4326471 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleHeader.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleHeader.ts.html @@ -214,7 +214,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleItalic.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleItalic.ts.html index 46933331e6e..461f858b308 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleItalic.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleItalic.ts.html @@ -83,7 +83,7 @@

All files / packag     1x -2x +6x    

import execCommand from '../utils/execCommand';
 import { DocumentCommand, IEditor } from 'roosterjs-editor-types';
@@ -106,7 +106,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleNumbering.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleNumbering.ts.html index 7530d33a945..223c09f5f98 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleNumbering.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleNumbering.ts.html @@ -157,7 +157,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleStrikethrough.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleStrikethrough.ts.html index ef7d69cd59d..2a55830d8ad 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleStrikethrough.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleStrikethrough.ts.html @@ -106,7 +106,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleSubscript.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleSubscript.ts.html index 01e60fef0b0..9350aa01c09 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleSubscript.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleSubscript.ts.html @@ -112,7 +112,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleSuperscript.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleSuperscript.ts.html index d0818f14c42..986a6122978 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleSuperscript.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleSuperscript.ts.html @@ -112,7 +112,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/format/toggleUnderline.ts.html b/coverage/packages/roosterjs-editor-api/lib/format/toggleUnderline.ts.html index ed88b405192..cea68ae5bd9 100644 --- a/coverage/packages/roosterjs-editor-api/lib/format/toggleUnderline.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/format/toggleUnderline.ts.html @@ -83,7 +83,7 @@

All files / packag     1x -2x +6x    

import execCommand from '../utils/execCommand';
 import { DocumentCommand, IEditor } from 'roosterjs-editor-types';
@@ -106,7 +106,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/index.html b/coverage/packages/roosterjs-editor-api/lib/index.html index f6c343f14b1..6b02e5663fa 100644 --- a/coverage/packages/roosterjs-editor-api/lib/index.html +++ b/coverage/packages/roosterjs-editor-api/lib/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-api/li diff --git a/coverage/packages/roosterjs-editor-api/lib/index.ts.html b/coverage/packages/roosterjs-editor-api/lib/index.ts.html index 1fcf93d4fc9..a0b2556fe89 100644 --- a/coverage/packages/roosterjs-editor-api/lib/index.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/index.ts.html @@ -116,7 +116,7 @@

All files / packages/ 1x 1x 1x -7x +17x 1x 2x 2x @@ -181,7 +181,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs-editor-api/lib/table/applyCellShading.ts.html b/coverage/packages/roosterjs-editor-api/lib/table/applyCellShading.ts.html index bfa011049eb..0bdd2cd89d8 100644 --- a/coverage/packages/roosterjs-editor-api/lib/table/applyCellShading.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/table/applyCellShading.ts.html @@ -160,7 +160,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/table/editTable.ts.html b/coverage/packages/roosterjs-editor-api/lib/table/editTable.ts.html index 107d043834a..b7bdae09643 100644 --- a/coverage/packages/roosterjs-editor-api/lib/table/editTable.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/table/editTable.ts.html @@ -307,7 +307,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/table/formatTable.ts.html b/coverage/packages/roosterjs-editor-api/lib/table/formatTable.ts.html index 77f1194a272..73ee9c5bc15 100644 --- a/coverage/packages/roosterjs-editor-api/lib/table/formatTable.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/table/formatTable.ts.html @@ -175,7 +175,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/table/index.html b/coverage/packages/roosterjs-editor-api/lib/table/index.html index 117aaddea36..d112567bc27 100644 --- a/coverage/packages/roosterjs-editor-api/lib/table/index.html +++ b/coverage/packages/roosterjs-editor-api/lib/table/index.html @@ -140,7 +140,7 @@

All files packages/roosterjs-editor-api diff --git a/coverage/packages/roosterjs-editor-api/lib/table/insertTable.ts.html b/coverage/packages/roosterjs-editor-api/lib/table/insertTable.ts.html index 7dc8cb1fac4..ee1d1c7957e 100644 --- a/coverage/packages/roosterjs-editor-api/lib/table/insertTable.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/table/insertTable.ts.html @@ -256,7 +256,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/applyInlineStyle.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/applyInlineStyle.ts.html index 4b0b44530dc..87483c2c670 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/applyInlineStyle.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/applyInlineStyle.ts.html @@ -157,13 +157,13 @@

All files / packag       -25x -25x +76x +76x   -25x -25x +76x +132x   -25x +76x 13x 13x   @@ -185,30 +185,30 @@

All files / packag       -12x +63x         -12x -12x -12x +63x +63x +63x     -12x -12x -24x -24x -24x -24x -24x +63x +63x +134x +134x +131x +131x +131x   -24x +134x       -12x -12x +63x +63x       @@ -301,7 +301,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/applyListItemWrap.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/applyListItemWrap.ts.html index d8b8701a8b8..3c944e6c414 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/applyListItemWrap.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/applyListItemWrap.ts.html @@ -23,30 +23,30 @@

All files / packag -
+

-	
-	
-	
-	
-	
-	
-	
-	
-	
+	
+	
+	
+	
+	
+	
+	
+	
@@ -260,7 +260,7 @@ 

All files packages/roosterjs-editor-cor diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/forEachSelectedCell.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/forEachSelectedCell.ts.html index fc90c7faa0e..68f383f84c3 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/forEachSelectedCell.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/forEachSelectedCell.ts.html @@ -130,7 +130,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/index.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/index.html index b18119e3b7e..c91593ec194 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/index.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/index.html @@ -125,7 +125,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/inlineEntityOnPluginEvent.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/inlineEntityOnPluginEvent.ts.html index 17d2f8365d2..9c3771850f3 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/inlineEntityOnPluginEvent.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/inlineEntityOnPluginEvent.ts.html @@ -937,7 +937,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/removeCellsOutsideSelection.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/removeCellsOutsideSelection.ts.html index ce19e81e0da..e5c64749a5e 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/removeCellsOutsideSelection.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/utils/removeCellsOutsideSelection.ts.html @@ -172,7 +172,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-core/lib/editor/DarkColorHandlerImpl.ts.html b/coverage/packages/roosterjs-editor-core/lib/editor/DarkColorHandlerImpl.ts.html index 567d361cf9a..e757820b810 100644 --- a/coverage/packages/roosterjs-editor-core/lib/editor/DarkColorHandlerImpl.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/editor/DarkColorHandlerImpl.ts.html @@ -251,16 +251,16 @@

All files / packag     1x -4929x +5122x   -4929x +5122x           1x -4990x +5277x       @@ -271,16 +271,16 @@

All files / packag     1x -13942x +14538x     -13942x -13942x -13942x -13942x +14538x +14538x +14538x +14538x     -13942x +14538x 14x     @@ -293,16 +293,16 @@

All files / packag   14x   -13928x +14524x             -4586x -4586x -4586x +4761x +4761x +4761x       @@ -314,13 +314,13 @@

All files / packag   1x   -15222x +16492x     -15222x -14028x +16492x +14667x   -14028x +14667x 10x 9x 9x @@ -328,7 +328,7 @@

All files / packag   1x   -14018x +14657x       @@ -338,11 +338,11 @@

All files / packag 1x     -14012x +14651x       -15222x +16492x       @@ -378,19 +378,19 @@

All files / packag       -505x -505x -1010x +843x +843x +1686x           -1010x -1010x +1686x +1686x   -1010x -37x +1686x +76x       @@ -571,7 +571,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/editor/Editor.ts.html b/coverage/packages/roosterjs-editor-core/lib/editor/Editor.ts.html index 063f4d65502..b11f7075284 100644 --- a/coverage/packages/roosterjs-editor-core/lib/editor/Editor.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/editor/Editor.ts.html @@ -87,8 +87,8 @@

All files / packag       -4605x -4603x +4792x +4790x   1x  

- - - + + - - - - + + + + @@ -155,7 +155,7 @@

All files packages/roosterjs-editor-cor diff --git a/coverage/packages/roosterjs-editor-core/lib/editor/isFeatureEnabled.ts.html b/coverage/packages/roosterjs-editor-core/lib/editor/isFeatureEnabled.ts.html index e708bb8d820..87a70979c93 100644 --- a/coverage/packages/roosterjs-editor-core/lib/editor/isFeatureEnabled.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/editor/isFeatureEnabled.ts.html @@ -85,7 +85,7 @@

All files / packag       -10863x +11661x    

- - - - - - - - - + + + + + + + + @@ -125,7 +125,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/entity/commitEntity.ts.html b/coverage/packages/roosterjs-editor-dom/lib/entity/commitEntity.ts.html index fd7269df816..7aa87b5e4ae 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/entity/commitEntity.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/entity/commitEntity.ts.html @@ -157,7 +157,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/entity/entityPlaceholderUtils.ts.html b/coverage/packages/roosterjs-editor-dom/lib/entity/entityPlaceholderUtils.ts.html index 730856910fb..ee54784b429 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/entity/entityPlaceholderUtils.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/entity/entityPlaceholderUtils.ts.html @@ -287,15 +287,15 @@

All files / packag       -411x +487x   -411x +487x   -411x -601x -601x +487x +708x +708x   -601x +708x 10x   10x @@ -304,11 +304,11 @@

All files / packag 1x     -591x -591x +698x +698x   -591x -457x +698x +565x 2x   2x @@ -318,19 +318,19 @@

All files / packag       -601x +708x     -411x +487x       -421x -385x -385x -385x +497x +461x +461x +461x   -421x +497x       @@ -338,12 +338,12 @@

All files / packag       -603x +710x     -603x +710x   -603x +710x       @@ -514,7 +514,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/entity/getEntityFromElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/entity/getEntityFromElement.ts.html index 5d1ebfa306c..c4bf7bc1025 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/entity/getEntityFromElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/entity/getEntityFromElement.ts.html @@ -99,24 +99,24 @@

All files / packag     1x -269x -269x -269x -269x +268x +268x +268x +268x   -269x -661x +268x +660x 64x -597x +596x 64x -533x +532x 52x -481x +480x 47x       -269x +268x       @@ -166,7 +166,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/entity/getEntitySelector.ts.html b/coverage/packages/roosterjs-editor-dom/lib/entity/getEntitySelector.ts.html index b7ea777d748..9bcc144a12c 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/entity/getEntitySelector.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/entity/getEntitySelector.ts.html @@ -77,9 +77,9 @@

All files / packag     1x -5799x -5799x -5799x +6303x +6303x +6303x    

- - + + @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-dom/li diff --git a/coverage/packages/roosterjs-editor-dom/lib/index.ts.html b/coverage/packages/roosterjs-editor-dom/lib/index.ts.html index 77763710a0b..918306f36ad 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/index.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/index.ts.html @@ -37,9 +37,9 @@

All files / packages/
- 78.03% + 78.79% Functions - 103/132 + 104/132
@@ -213,69 +213,69 @@

All files / packages/ 154 155 156 -157

- - + + @@ -245,7 +245,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/setBulletListMarkers.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/setBulletListMarkers.ts.html index 935e4b9b352..b0a255c47d9 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/setBulletListMarkers.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/setBulletListMarkers.ts.html @@ -148,7 +148,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/setListItemStyle.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/setListItemStyle.ts.html index a732f188ca7..19328077b6f 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/setListItemStyle.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/setListItemStyle.ts.html @@ -30,9 +30,9 @@

All files / packag
- 84.31% + 88.24% Branches - 43/51 + 45/51
@@ -162,22 +162,22 @@

All files / packag 1x     -274x +282x   -274x +279x   -274x -951x -178x +279x +961x +191x     -951x +961x         -26x -24x +29x +27x   2x   @@ -186,56 +186,56 @@

All files / packag       -274x -274x -274x -  -274x -260x -260x -260x +279x +279x +279x   -260x +279x +271x +271x +271x   +271x     -260x   +271x         -60x   -60x -188x +68x   +68x +201x     -188x -56x   +201x +64x   -188x -75x   +201x +83x     -60x -29x   +68x 31x   +37x +      -260x -56x +271x +64x     -260x +271x     -274x +279x    

- - - - - + + + + - - + + @@ -200,7 +200,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/isPositionAtBeginningOf.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/isPositionAtBeginningOf.ts.html index 6066fbe264e..c8b7cc8fa3b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/isPositionAtBeginningOf.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/isPositionAtBeginningOf.ts.html @@ -108,30 +108,30 @@

All files / packag     1x -16x -15x -15x -15x -15x -14x -13x +22x +21x +21x +21x +21x +18x +21x     -14x +18x       -2x +4x       -19x +27x 7x 7x 6x     -13x +21x    

")+e+""}if(e.match(i)){var r=t.match(l);e=(r?r[0]:"
1 2 @@ -121,21 +121,21 @@

All files / packag       -9x -9x +40x +40x     -12x +95x   -12x -12x -  +95x +95x +3x           -9x +40x       @@ -145,9 +145,9 @@

All files / packag       -9x -  -  +40x +3x +3x       @@ -175,8 +175,8 @@

All files / packag formatCallback(element, isInnerNode);   let parent = editor.getElementAtCursor('LI', element); - Iif (parent && parentNodes.indexOf(parent) === -1) { - parentNodes.push(parent); + if (parent && parentNodes.indexOf(parent) === -1) { + parentNodes.push(parent); } }, apiName @@ -192,9 +192,9 @@

All files / packag * @param styles styles to apply to the List Item Element */ function applyStyleToListItems(parentNodes: Node[], styles: string[]) { - parentNodes.forEach(node => { - if (safeInstanceOf(node, 'HTMLLIElement')) { - setListItemStyle(node, styles); + parentNodes.forEach(node => { + Eif (safeInstanceOf(node, 'HTMLLIElement')) { + setListItemStyle(node, styles); } }); } @@ -205,7 +205,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/blockFormat.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/blockFormat.ts.html index 86dc9069929..db828c1c4b3 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/blockFormat.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/blockFormat.ts.html @@ -118,22 +118,22 @@

All files / packag       -48x -48x +68x +68x   -48x +68x     -48x -42x -42x -42x -48x -42x +68x +62x +62x +62x +68x +62x     -48x -45x +68x +65x   3x   @@ -190,7 +190,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/blockWrap.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/blockWrap.ts.html index 236b118838f..fd6f1df8b70 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/blockWrap.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/blockWrap.ts.html @@ -143,22 +143,22 @@

All files / packag       -18x +19x     -20x -20x -20x -20x -12x -12x +21x +21x +21x +21x +13x +13x   -12x +13x         -20x +21x       @@ -168,7 +168,7 @@

All files / packag       -20x +21x       @@ -241,7 +241,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/collapseSelectedBlocks.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/collapseSelectedBlocks.ts.html index 711268b4a5b..3685c1a0718 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/collapseSelectedBlocks.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/collapseSelectedBlocks.ts.html @@ -187,7 +187,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/commitListChains.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/commitListChains.ts.html index 27d8470c93f..fd82abaf5ca 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/commitListChains.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/commitListChains.ts.html @@ -101,7 +101,7 @@

All files / packag     1x -42x +62x 6x 6x 6x @@ -169,7 +169,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/execCommand.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/execCommand.ts.html index 39167a789b5..feb07ef53d3 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/execCommand.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/execCommand.ts.html @@ -23,30 +23,30 @@

All files / packag -
+

-	
-	
+	
-	
-	
-	
-	
-	
-	
-	
-	
+	
+	
+	
+	
+	
+	
+	
+	
@@ -163,18 +163,18 @@ 

All files packages/roosterjs-editor-api

- - + - - - - - - - - + + + + + + + + @@ -230,7 +230,7 @@

All files packages/roosterjs-editor-api diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/normalizeBlockquote.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/normalizeBlockquote.ts.html index f2b2065da99..1e3962fafdb 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/normalizeBlockquote.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/normalizeBlockquote.ts.html @@ -117,24 +117,24 @@

All files / packag     1x -9x -9x +20x +20x   -9x -9x +20x +20x 3x   -6x +17x   -6x -6x -1x +17x +17x +2x   -5x +15x     -5x -5x +15x +15x 2x 1x 1x @@ -143,11 +143,11 @@

All files / packag 1x     -3x -3x +13x +13x     -5x +15x       @@ -157,7 +157,7 @@

All files / packag       -6x +17x    

- - - - - - - - - + + + + + + + + @@ -284,17 +284,17 @@

All files packages/roosterjs-editor-cor

- - - - - + + + + - - + + @@ -410,7 +410,7 @@

All files packages/roosterjs-editor-cor diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/insertNode.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/insertNode.ts.html index 3c3cf33df04..2e703852993 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/insertNode.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/insertNode.ts.html @@ -23,30 +23,30 @@

All files / packag

1 2 @@ -147,12 +147,12 @@

All files / packag       -14x +40x   -14x +40x   -14x -14x +40x +40x 14x 14x 14x @@ -167,19 +167,19 @@

All files / packag       -  +26x     -  +26x   -  -  +26x +26x     -  +26x     -  +26x       @@ -217,7 +217,7 @@

All files / packag let formatter = () => editor.getDocument().execCommand(command, false, undefined);   let selection = editor.getSelectionRangeEx(); - Eif (selection && selection.areAllCollapsed) { + if (selection && selection.areAllCollapsed) { editor.addUndoSnapshot(); const formatState = editor.getPendableFormatState(false /* forceGetStateFromDom */); formatter(); @@ -232,19 +232,19 @@

All files / packag }); } } else { - formatUndoSnapshot( + formatUndoSnapshot( editor, - () => { - const needToSwitchSelection = selection.type != SelectionRangeTypes.Normal; + () => { + const needToSwitchSelection = selection.type != SelectionRangeTypes.Normal;   - selection.ranges.forEach(range => { - if (needToSwitchSelection) { + selection.ranges.forEach(range => { + Iif (needToSwitchSelection) { editor.select(range); } - formatter(); + formatter(); });   - if (needToSwitchSelection) { + Iif (needToSwitchSelection) { editor.select(selection); } }, @@ -259,7 +259,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/formatUndoSnapshot.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/formatUndoSnapshot.ts.html index 072f8273af5..1b726226872 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/formatUndoSnapshot.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/formatUndoSnapshot.ts.html @@ -98,7 +98,7 @@

All files / packag       -108x +214x       @@ -142,7 +142,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/index.html b/coverage/packages/roosterjs-editor-api/lib/utils/index.html index 26d0389e4cc..458b87adacc 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/index.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/index.html @@ -23,30 +23,30 @@

All files packages/roosterjs-editor-api
- 88.51% + 93.68% Statements - 154/174 + 163/174
- 70.47% + 74.5% Branches - 105/149 + 111/149
- 87.1% + 96.77% Functions - 27/31 + 30/31
- 88.89% + 94.15% Lines - 152/171 + 161/171
@@ -88,18 +88,18 @@

All files packages/roosterjs-editor-api

applyListItemWrap.ts -
+
applyListItemWrap.ts +
76.92%10/1333.33%2/675%3/476.92%10/13100%13/1383.33%5/6100%4/4100%13/13
execCommand.ts -
+
execCommand.ts +
66.67%16/2450%5/1060%3/565.22%15/2391.67%22/2480%8/10100%5/591.3%21/23
import { findClosestElementAncestor, getComputedStyle, safeInstanceOf } from 'roosterjs-editor-dom';
  
@@ -217,7 +217,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-api/lib/utils/toggleListType.ts.html b/coverage/packages/roosterjs-editor-api/lib/utils/toggleListType.ts.html index c07ff90f0c9..caaa2b4b21a 100644 --- a/coverage/packages/roosterjs-editor-api/lib/utils/toggleListType.ts.html +++ b/coverage/packages/roosterjs-editor-api/lib/utils/toggleListType.ts.html @@ -301,7 +301,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/addUndoSnapshot.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/addUndoSnapshot.ts.html index 5cad884f1f0..46dab6bcd30 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/addUndoSnapshot.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/addUndoSnapshot.ts.html @@ -228,50 +228,50 @@

All files / packag       -4859x -4859x +5160x +5160x     -4859x -4831x +5160x +5068x       -4831x -4830x +5068x +5067x       -4859x -4859x -185x -185x +5160x +5160x +299x +299x         -184x -162x -162x +298x +212x +212x       -4859x -4831x +5160x +5068x       -4858x -168x +5159x +268x           -168x +268x     -4858x +5159x 18x   18x @@ -286,12 +286,12 @@

All files / packag       -4992x -4990x -4990x -4990x +5279x +5277x +5277x +5277x   -4990x +5277x       @@ -300,7 +300,7 @@

All files / packag       -4990x +5277x       @@ -309,7 +309,7 @@

All files / packag       -4990x +5277x   22x   @@ -318,13 +318,13 @@

All files / packag       -38x +14x           -4930x +5241x       @@ -478,7 +478,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/attachDomEvent.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/attachDomEvent.ts.html index 4779cfb983b..f347f731673 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/attachDomEvent.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/attachDomEvent.ts.html @@ -142,15 +142,15 @@

All files / packag       -13922x -69476x -69476x -69476x -651x -622x +14483x +72281x +72281x +72281x +269x +240x   -651x -42x +269x +67x       @@ -161,29 +161,29 @@

All files / packag       -69476x +72281x   -69476x -68846x +72281x +71471x     -68846x +71471x       -69476x +72281x         -69476x -4631x -64845x -46342x -18503x -18503x +72281x +4818x +67463x +48212x +19251x +19251x   -69476x +72281x    

import { getObjectKeys } from 'roosterjs-editor-dom';
 import {
@@ -256,7 +256,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/coreApiMap.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/coreApiMap.ts.html index b833098a22b..a5337856f33 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/coreApiMap.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/coreApiMap.ts.html @@ -211,7 +211,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/createPasteFragment.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/createPasteFragment.ts.html index d0fd77d6c84..6af93fc5bc4 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/createPasteFragment.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/createPasteFragment.ts.html @@ -283,7 +283,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/ensureTypeInContainer.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/ensureTypeInContainer.ts.html index af37305bf77..2fbb8f584e2 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/ensureTypeInContainer.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/ensureTypeInContainer.ts.html @@ -180,18 +180,18 @@

All files / packag       -4639x +4826x     -4639x +4826x 1x   -4639x +4826x   -4639x +4826x     -4639x +4826x 12x 12x 2x @@ -208,11 +208,11 @@

All files / packag       -4627x +4814x       -4627x +4814x       @@ -220,11 +220,11 @@

All files / packag       -4627x +4814x     -4639x -4627x +4826x +4814x       @@ -233,7 +233,7 @@

All files / packag       -4639x +4826x 5x     @@ -346,7 +346,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/focus.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/focus.ts.html index b4b5c20a5fa..80d6b5d1bc8 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/focus.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/focus.ts.html @@ -109,8 +109,8 @@

All files / packag     1x -310x -310x +437x +437x       @@ -121,12 +121,12 @@

All files / packag       -169x +178x       -167x -167x +177x +177x       @@ -135,11 +135,11 @@

All files / packag       -310x +437x     -310x -3x +437x +2x       @@ -193,7 +193,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/getContent.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/getContent.ts.html index 0732dc2a086..37e5f275441 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/getContent.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/getContent.ts.html @@ -180,33 +180,33 @@

All files / packag       -125x -125x -125x +191x +191x +191x       -125x +191x   -125x +191x 1x -124x +190x     -124x -124x +190x +190x   -124x -124x +190x +190x             -124x +190x   -124x +190x       @@ -216,8 +216,8 @@

All files / packag       -124x -118x +190x +184x       @@ -226,7 +226,7 @@

All files / packag       -118x +184x 6x   3x @@ -235,19 +235,19 @@

All files / packag       -125x +191x         -124x +190x 2x 2x   -122x +188x     -124x +190x    

import {
     ColorTransformDirection,
@@ -352,7 +352,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/getPendableFormatState.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/getPendableFormatState.ts.html index 4e22bdf17f2..88f7f2259d3 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/getPendableFormatState.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/getPendableFormatState.ts.html @@ -382,7 +382,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRange.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRange.ts.html index 6183c9ff1dc..8a044075645 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRange.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRange.ts.html @@ -115,9 +115,9 @@

All files / packag       -1027x +1088x   -1027x +1088x       @@ -128,21 +128,21 @@

All files / packag       -1027x -930x -930x -930x -930x -922x +1088x +1007x +1007x +1007x +1007x +1002x         -1027x -99x +1088x +81x     -1027x +1088x      

import { contains, createRange } from 'roosterjs-editor-dom';
@@ -196,7 +196,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRangeEx.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRangeEx.ts.html index acee8011708..74cdeb212c8 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRangeEx.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/getSelectionRangeEx.ts.html @@ -177,8 +177,8 @@

All files / packag     1x -5545x -5545x +6003x +6003x   3x 3x @@ -228,25 +228,25 @@

All files / packag 1x     -5542x -695x +6000x +996x 83x     -612x +913x 30x     -582x -582x -582x -582x -582x +883x +883x +883x +883x +883x         -4847x +5004x       @@ -257,7 +257,7 @@

All files / packag       -5405x +5887x       @@ -265,7 +265,7 @@

All files / packag       -5407x +5889x    

import { contains, createRange, findClosestElementAncestor } from 'roosterjs-editor-dom';
 import {
@@ -379,7 +379,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/getStyleBasedFormatState.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/getStyleBasedFormatState.ts.html index 99257242577..5b308e4fab0 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/getStyleBasedFormatState.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/getStyleBasedFormatState.ts.html @@ -343,7 +343,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/hasFocus.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/hasFocus.ts.html index bab9651d1e2..d19806f954f 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/hasFocus.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/hasFocus.ts.html @@ -82,8 +82,8 @@

All files / packag     1x -7492x -7492x +8559x +8559x       @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/index.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/index.html index aa2f7b78aad..c3693ec5804 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/index.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/index.html @@ -23,30 +23,30 @@

All files packages/roosterjs-editor-cor
- 95.74% + 97.02% Statements - 675/705 + 684/705
- 86.69% + 87.39% Branches - 612/706 + 617/706
- 95.79% + 96.84% Functions - 91/95 + 92/95
- 95.63% + 96.99% Lines - 635/664 + 644/664
@@ -254,17 +254,17 @@

All files packages/roosterjs-editor-cor

insertNode.ts -
+
+
85.71%72/8476.29%74/9780%4/585.19%69/8195.24%80/8480.41%78/97100%5/595.06%77/81
select.ts -
+
+
97.62%41/4294.44%51/54100%42/4296.3%52/54 100% 5/597.56%40/41100%41/41
import {
     BlockElement,
@@ -688,11 +688,11 @@ 

All files / packag   if (option.insertOnNewLine && option.insertToRegionRoot) { pos = adjustInsertPositionRegionRoot(core, range, pos); - } else Iif ( + } else if ( option.insertOnNewLine && - (blockElement = getBlockElementAtNode(contentDiv, pos.normalize().node)) + (blockElement = getBlockElementAtNode(contentDiv, pos.normalize().node)) ) { - pos = adjustInsertPositionNewLine(blockElement, core, pos); + pos = adjustInsertPositionNewLine(blockElement, core, pos); } else { pos = adjustInsertPosition(contentDiv, node, pos, range); } @@ -746,15 +746,15 @@

All files / packag return position; }   -function adjustInsertPositionNewLine(blockElement: BlockElement, core: EditorCore, pos: Position) { - let tempPos = new Position(blockElement.getEndNode(), PositionType.After); - if (safeInstanceOf(tempPos.node, 'HTMLTableRowElement')) { - const div = core.contentDiv.ownerDocument.createElement('div'); - const range = createRange(pos); - range.insertNode(div); - tempPos = new Position(div, PositionType.Begin); +function adjustInsertPositionNewLine(blockElement: BlockElement, core: EditorCore, pos: Position) { + let tempPos = new Position(blockElement.getEndNode(), PositionType.After); + if (safeInstanceOf(tempPos.node, 'HTMLTableRowElement')) { + const div = core.contentDiv.ownerDocument.createElement('div'); + const range = createRange(pos); + range.insertNode(div); + tempPos = new Position(div, PositionType.Begin); } - return tempPos; + return tempPos; }  

@@ -763,7 +763,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/restoreUndoSnapshot.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/restoreUndoSnapshot.ts.html index e3f84fa53e7..176ada1d552 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/restoreUndoSnapshot.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/restoreUndoSnapshot.ts.html @@ -283,7 +283,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/select.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/select.ts.html index 828890dd62b..bc9fde2fd32 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/select.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/select.ts.html @@ -23,16 +23,16 @@

All files / packag
- 97.62% + 100% Statements - 41/42 + 42/42
- 94.44% + 96.3% Branches - 51/54 + 52/54
@@ -44,9 +44,9 @@

All files / packag
- 97.56% + 100% Lines - 40/41 + 41/41
@@ -233,11 +233,11 @@

All files / packag     1x -5126x +5401x   -5126x -9x -5117x +5401x +7x +5394x 71x     @@ -245,7 +245,7 @@

All files / packag       -5046x +5323x 55x     @@ -253,7 +253,7 @@

All files / packag       -4991x +5268x       @@ -268,7 +268,7 @@

All files / packag       -4991x +5268x       @@ -277,8 +277,8 @@

All files / packag       -5126x -445x +5401x +545x   74x 73x @@ -298,18 +298,18 @@

All files / packag   55x   -316x -316x +416x +416x   -316x -316x +416x +414x   -  +2x   -316x +416x     -445x +545x       @@ -318,16 +318,16 @@

All files / packag       -4681x -4681x +4856x +4856x     -5126x +5401x       -5126x -5126x +5401x +5401x       @@ -348,15 +348,15 @@

All files / packag       -196x +277x   -196x +277x       -196x +277x   -196x +277x       @@ -454,10 +454,10 @@

All files / packag core.domEvent.tableSelectionRange = core.api.selectTable(core, null); core.domEvent.imageSelectionRange = core.api.selectImage(core, null);   - Eif (contains(core.contentDiv, rangeEx.ranges[0])) { + if (contains(core.contentDiv, rangeEx.ranges[0])) { core.api.selectRange(core, rangeEx.ranges[0]); } else { - rangeEx = null; + rangeEx = null; } break; } @@ -523,7 +523,7 @@

All files / packag

diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/selectImage.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/selectImage.ts.html index 24cf0ce9f43..0cec46f2774 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/selectImage.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/selectImage.ts.html @@ -155,11 +155,11 @@

All files / packag     1x -5230x +5504x   -5230x +5504x   -5230x +5504x 56x   56x @@ -177,7 +177,7 @@

All files / packag       -5230x +5504x     1x @@ -194,8 +194,8 @@

All files / packag     1x -5230x -5230x +5504x +5504x    

import addUniqueId from './utils/addUniqueId';
 import {
@@ -274,7 +274,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/selectRange.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/selectRange.ts.html index afbb63d8884..c297b9d695b 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/selectRange.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/selectRange.ts.html @@ -156,20 +156,20 @@

All files / packag       -755x -751x +882x +878x   -751x -71x +878x +52x     -751x +878x     -607x +650x     -751x +878x   4x   @@ -183,9 +183,9 @@

All files / packag       -1821x +1950x   -607x +650x 1x 1x 1x @@ -286,7 +286,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/selectTable.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/selectTable.ts.html index a5d5573cd9c..65c72948ed7 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/selectTable.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/selectTable.ts.html @@ -373,9 +373,9 @@

All files / packag       -5244x +5518x   -5244x +5518x 81x 81x   @@ -403,7 +403,7 @@

All files / packag       -5163x +5437x       @@ -551,8 +551,8 @@

All files / packag     1x -5244x -5244x +5518x +5518x       @@ -585,7 +585,7 @@

All files / packag       -5244x +5518x 88x 88x 86x @@ -594,7 +594,7 @@

All files / packag       -5158x +5432x       @@ -886,7 +886,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/setContent.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/setContent.ts.html index b1c7d8f2ac3..80d6e8f9432 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/setContent.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/setContent.ts.html @@ -211,9 +211,9 @@

All files / packag       -5029x -5029x -394x +5292x +5292x +470x       @@ -222,24 +222,24 @@

All files / packag       -394x -394x -394x +470x +470x +470x         -394x +470x   -394x -394x -394x -394x +470x +470x +470x +470x     -5029x +5292x   -5029x +5292x 5x     @@ -252,8 +252,8 @@

All files / packag 5x     -5029x -387x +5292x +463x       @@ -265,20 +265,20 @@

All files / packag       -394x -105x -105x -105x -  -105x -  +470x 104x 104x -  -104x 104x +  104x   +103x +103x +  +103x +103x +103x +        @@ -430,7 +430,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/switchShadowEdit.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/switchShadowEdit.ts.html index 03eff2d8f80..aa8e1ba8a46 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/switchShadowEdit.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/switchShadowEdit.ts.html @@ -487,7 +487,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/transformColor.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/transformColor.ts.html index f224f7ec90d..c2640926bc0 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/transformColor.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/transformColor.ts.html @@ -146,26 +146,26 @@

All files / packag       -9491x +9970x         -9622x -4811x -4811x -137x +10166x +5083x +5083x +201x         -495x +833x     -137x +201x     -4811x +5083x       @@ -173,16 +173,16 @@

All files / packag       -888x -8x +1443x +6x     -888x -751x -487x +1443x +1242x +827x     -751x +1242x       @@ -190,8 +190,8 @@

All files / packag       -759x -759x +1248x +1248x    

import { ColorTransformDirection, EditorCore, TransformColor } from 'roosterjs-editor-types';
 import type { CompatibleColorTransformDirection } from 'roosterjs-editor-types/lib/compatibleTypes';
@@ -268,7 +268,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/triggerEvent.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/triggerEvent.ts.html index 990669a6c7f..e9205f70649 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/triggerEvent.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/triggerEvent.ts.html @@ -134,26 +134,26 @@

All files / packag       -10884x +11682x     -5681x +6737x   -10882x -119542x -97958x +11680x +128270x +105090x             -5681x +6737x 1x 1x     -5680x +6736x    

import {
     EditorCore,
@@ -211,7 +211,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/addUniqueId.ts.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/addUniqueId.ts.html index 309b0bc800e..7ab93490352 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/addUniqueId.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/addUniqueId.ts.html @@ -154,7 +154,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/index.html b/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/index.html index fb51bf86a6b..b611454f514 100644 --- a/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/index.html +++ b/coverage/packages/roosterjs-editor-core/lib/coreApi/utils/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/CopyPastePlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/CopyPastePlugin.ts.html index e6d0859e5e3..e558a850c7c 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/CopyPastePlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/CopyPastePlugin.ts.html @@ -384,16 +384,16 @@

All files / packag     1x -4814x -4814x +5009x +5009x             -4814x -4814x +5009x +5009x       @@ -409,9 +409,9 @@

All files / packag       -4628x -4628x -4628x +4815x +4815x +4815x 2x 2x 2x @@ -422,18 +422,18 @@

All files / packag     1x -4592x -4589x +4767x +4764x   -4592x -4592x +4767x +4767x           1x -4804x +4999x     4x @@ -510,7 +510,7 @@

All files / packag       -4814x +5009x 2x 2x 2x @@ -946,7 +946,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/DOMEventPlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/DOMEventPlugin.ts.html index 2e3e7ba9d2d..719bbf7f4c4 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/DOMEventPlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/DOMEventPlugin.ts.html @@ -334,8 +334,8 @@

All files / packag     1x -4820x -4820x +5015x +5015x       @@ -343,8 +343,8 @@

All files / packag       -4820x -4820x +5015x +5015x       @@ -367,12 +367,12 @@

All files / packag       -4637x -4637x +4824x +4824x   -4637x +4824x   -4637x +4824x       @@ -404,33 +404,33 @@

All files / packag       -4637x +4824x       -4637x +4824x           -4637x +4824x     -4637x +4824x     -4637x -4637x -4637x +4824x +4824x +4824x           1x -4596x -4596x +4771x +4771x       @@ -440,48 +440,48 @@

All files / packag       -4596x -4596x -4596x -4596x -4596x -4596x +4771x +4771x +4771x +4771x +4771x +4771x           1x -4820x +5015x     -4820x +5015x 1x 1x       -4820x -295x -295x +5015x +198x +198x   -295x +198x   -295x +198x   -295x +198x 1x     -295x +198x   -4820x +5015x           -4820x +5015x       @@ -491,25 +491,25 @@

All files / packag       -4820x -294x -294x +5015x +4x +4x     -4820x +5015x             -18548x -18548x -16x +19296x +19296x +41x       -18548x +19296x       @@ -517,7 +517,7 @@

All files / packag       -4820x +5015x 2x     @@ -525,11 +525,11 @@

All files / packag       -4820x -14x +5015x +39x     -4820x +5015x       @@ -814,7 +814,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/EditPlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/EditPlugin.ts.html index 178d0429929..56f9d61d11a 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/EditPlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/EditPlugin.ts.html @@ -166,7 +166,7 @@

All files / packag     1x -4818x +5013x       @@ -174,7 +174,7 @@

All files / packag       -4818x +5013x       @@ -191,21 +191,21 @@

All files / packag     1x -4635x +4822x           1x -4594x +4769x           1x -4818x +5013x       @@ -213,11 +213,11 @@

All files / packag     1x -10795x -10795x -10795x +11593x +11593x +11593x   -10795x +11593x 22x 22x   @@ -226,11 +226,11 @@

All files / packag 22x     -10773x -522x +11571x +698x     -10795x +11593x 9x 9x   @@ -343,7 +343,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/EntityPlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/EntityPlugin.ts.html index 55b7bbdef26..084f69ff72d 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/EntityPlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/EntityPlugin.ts.html @@ -529,15 +529,15 @@

All files / packag     1x -4829x +5024x   -4829x +5024x         -4829x -4829x +5024x +5024x       @@ -554,25 +554,25 @@

All files / packag     1x -4646x -4646x +4833x +4833x           1x -4605x -4605x -4605x -4605x +4780x +4780x +4780x +4780x           1x -4829x +5024x       @@ -580,7 +580,7 @@

All files / packag     1x -10804x +11602x   25x 25x @@ -593,17 +593,17 @@

All files / packag       -12x -12x +9x +9x   -530x -530x +706x +706x   -4628x -4628x +4815x +4815x   -118x -118x +184x +184x   3x 3x @@ -612,7 +612,7 @@

All files / packag 3x     -10804x +11602x 101x     @@ -627,7 +627,7 @@

All files / packag       -4829x +5024x       @@ -666,21 +666,21 @@

All files / packag     1x -12x +9x   -12x -5x +9x +4x     -12x -12x +9x +9x       -5158x -5158x +5521x +5521x   -5158x +5521x 12x 12x   @@ -701,7 +701,7 @@

All files / packag       -5158x +5521x     19x @@ -710,7 +710,7 @@

All files / packag       -5158x +5521x 52x   13x @@ -718,7 +718,7 @@

All files / packag 13x     -5158x +5521x       @@ -736,15 +736,15 @@

All files / packag       -118x -118x +184x +184x 2x   2x       -4829x +5024x 2x 2x   @@ -756,10 +756,10 @@

All files / packag       -6x -6x -6x -6x +5x +5x +5x +5x 8x 6x   @@ -769,7 +769,7 @@

All files / packag       -6x +5x 2x     @@ -813,7 +813,7 @@

All files / packag     1x -5158x +5521x       @@ -1288,7 +1288,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/ImageSelection.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/ImageSelection.ts.html index 951fb213426..3a7dd218470 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/ImageSelection.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/ImageSelection.ts.html @@ -181,7 +181,7 @@

All files / packag     1x -4817x +5012x       @@ -195,20 +195,20 @@

All files / packag     1x -4634x +4821x           1x -4593x -4593x +4768x +4768x     1x -10849x -10849x +11647x +11647x     8x @@ -379,7 +379,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/LifecyclePlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/LifecyclePlugin.ts.html index 38cdd4c09d3..354e2d6f2c9 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/LifecyclePlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/LifecyclePlugin.ts.html @@ -23,30 +23,30 @@

All files / packag
- 91.43% + 94.29% Statements - 64/70 + 66/70
- 80% + 83.33% Branches - 48/60 + 50/60
- 86.67% + 93.33% Functions - 13/15 + 14/15
- 91.04% + 94.03% Lines - 61/67 + 63/67
@@ -333,11 +333,11 @@

All files / packag     1x -4813x +5008x     -4813x -4813x +5008x +5008x       @@ -345,29 +345,29 @@

All files / packag       -4813x -4813x +5008x +5008x     -4813x -4807x -4628x -4628x -4628x +5008x +5002x +4815x +4815x +4815x   -4807x -4587x -4587x -4587x +5002x +4762x +4762x +4762x     -4813x +5008x     -9260x -4630x -4630x -4630x +9634x +4817x +4817x +4817x       @@ -375,7 +375,7 @@

All files / packag       -4630x +4817x       @@ -385,19 +385,19 @@

All files / packag       -4813x -4813x +5008x +5008x   -4813x -4610x -4583x +5008x +4797x +4764x       -4583x +4764x     -4610x +4797x       @@ -406,7 +406,7 @@

All files / packag       -4813x +5008x       @@ -433,31 +433,31 @@

All files / packag     1x -4630x +4817x     -4630x +4817x     -4630x +4817x     -4630x +4817x     -4630x +4817x     -4630x +4817x           -4589x -4589x +4764x +4764x   -4589x +4764x 2x   2x @@ -467,20 +467,20 @@

All files / packag 2x     -4589x -4587x -4587x -4587x +4764x +4762x +4762x +4762x     -4589x +4764x           1x -4811x +5006x       @@ -488,7 +488,7 @@

All files / packag     1x -10787x +11585x       @@ -498,11 +498,11 @@

All files / packag       -4630x -4630x +4817x +4817x   -  -  +9634x +9634x       @@ -521,15 +521,15 @@

All files / packag   const CONTENT_EDITABLE_ATTRIBUTE_NAME = 'contenteditable'; const COMMANDS: Record<string, string> = Browser.isFirefox - ? { + ? { /** * Disable these object resizing for firefox since other browsers don't have these behaviors */ [DocumentCommand.EnableObjectResizing]: (false as any) as string, [DocumentCommand.EnableInlineTableEditing]: (false as any) as string, } - : Browser.isIE - ? { + : Browser.isIE + ? { /** * Change the default paragraph separator to DIV. This is mainly for IE since its default setting is P */ @@ -724,10 +724,10 @@

All files / packag }   private adjustBrowserBehavior() { - getObjectKeys(COMMANDS).forEach(command => { + getObjectKeys(COMMANDS).forEach(command => { // Catch any possible exception since this should not block the initialization of editor - try { - this.editor?.getDocument().execCommand(command, false, COMMANDS[command]); + try { + this.editor?.getDocument().execCommand(command, false, COMMANDS[command]); } catch {} }); } @@ -739,7 +739,7 @@

All files / packag

diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/MouseUpPlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/MouseUpPlugin.ts.html index 13b090ef0e5..bc917ed6c64 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/MouseUpPlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/MouseUpPlugin.ts.html @@ -135,11 +135,11 @@

All files / packag       -4813x -4812x -4812x -4812x -4812x +5008x +5007x +5007x +5007x +5007x       @@ -153,15 +153,15 @@

All files / packag     1x -4629x +4816x           1x -4589x -4589x +4764x +4764x       @@ -169,7 +169,7 @@

All files / packag     1x -10790x +11588x       @@ -183,13 +183,13 @@

All files / packag     1x -4614x +4789x 32x 32x       -4812x +5007x 25x 25x 25x @@ -277,7 +277,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/NormalizeTablePlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/NormalizeTablePlugin.ts.html index 3c7ab7e6ff2..8af68a58fb7 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/NormalizeTablePlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/NormalizeTablePlugin.ts.html @@ -269,7 +269,7 @@

All files / packag     1x -4830x +5025x       @@ -285,7 +285,7 @@

All files / packag     1x -4647x +4834x       @@ -294,7 +294,7 @@

All files / packag     1x -4606x +4781x       @@ -304,17 +304,17 @@

All files / packag     1x -10812x +11610x     -5167x -5167x +5530x +5530x   -5167x +5530x     -12x -12x +9x +9x     29x @@ -327,8 +327,8 @@

All files / packag 18x     -117x -117x +183x +183x       @@ -341,14 +341,14 @@

All files / packag     1x -5214x -174x -174x -174x +5574x +181x +181x +181x   -174x +181x   -174x +181x 25x     @@ -368,13 +368,13 @@

All files / packag 1x     -174x -174x -180x +181x +181x +187x   -180x -250x -250x +187x +265x +265x   43x 20x @@ -387,24 +387,24 @@

All files / packag   43x   -169x +176x 8x 8x 8x 8x   -161x +168x   -169x +176x   -38x -38x +46x +46x       -180x -180x -180x +187x +187x +187x 11x 7x 2x @@ -413,14 +413,14 @@

All files / packag       -174x +181x       -117x -57x +183x +69x   -57x +69x       @@ -619,7 +619,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/PendingFormatStatePlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/PendingFormatStatePlugin.ts.html index a621515eed6..a526abb4128 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/PendingFormatStatePlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/PendingFormatStatePlugin.ts.html @@ -265,7 +265,7 @@

All files / packag   1x   -4817x +5012x       @@ -274,7 +274,7 @@

All files / packag       -4817x +5012x       @@ -293,22 +293,22 @@

All files / packag     1x -4634x +4821x           1x -4593x -4593x +4768x +4768x           1x -4817x +5012x       @@ -316,7 +316,7 @@

All files / packag     1x -10794x +11592x       @@ -334,8 +334,8 @@

All files / packag       -570x -570x +746x +746x       @@ -350,7 +350,7 @@

All files / packag       -570x +746x       @@ -367,14 +367,14 @@

All files / packag 17x     -570x +746x       1x -4610x -4610x -4610x +4785x +4785x +4785x     1x @@ -625,7 +625,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts.html index 0731f94437a..ace4e979cdd 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts.html @@ -169,7 +169,7 @@

All files / packag     1x -4814x +5009x       @@ -183,14 +183,14 @@

All files / packag     1x -4631x +4818x           1x -4585x +4760x     1x @@ -209,10 +209,10 @@

All files / packag       -10792x +11590x     -10792x +11590x       @@ -358,7 +358,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/UndoPlugin.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/UndoPlugin.ts.html index b5f40856965..55e59c75b3f 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/UndoPlugin.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/UndoPlugin.ts.html @@ -370,8 +370,8 @@

All files / packag     1x -4845x -4845x +5038x +5038x       @@ -379,7 +379,7 @@

All files / packag       -4845x +5038x       @@ -403,21 +403,21 @@

All files / packag     1x -4659x +4844x           1x -4614x +4787x           1x -4841x +5034x       @@ -425,7 +425,7 @@

All files / packag     1x -496x +593x       @@ -439,22 +439,22 @@

All files / packag   1x   -10836x +11626x       -10836x +11626x   -4629x -4629x +4816x +4816x     -4627x +4814x   -4629x +4816x   -49x -49x +41x +41x   7x 7x @@ -463,8 +463,8 @@

All files / packag 1x 1x   -524x -524x +700x +700x   1x 1x @@ -475,31 +475,31 @@

All files / packag       -49x -16x +41x +8x 1x 1x 1x 1x -15x -15x +7x +7x           -15x +7x           -12x +6x       -15x -15x +7x +7x   33x   @@ -553,7 +553,7 @@

All files / packag     1x -524x +700x       @@ -561,19 +561,19 @@

All files / packag       -522x +698x       1x -526x -526x -526x +702x +702x +702x     1x -7x -7x +4x +4x       @@ -581,21 +581,21 @@

All files / packag     1x -4664x -4664x +4845x +4845x   1x     -4838x +5031x   -4838x -9252x +5031x +9626x     -5001x -523x -14x +5288x +699x +11x       @@ -603,7 +603,7 @@

All files / packag       -4840x +5033x   1x   @@ -907,7 +907,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/createCorePlugins.ts.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/createCorePlugins.ts.html index 9ab5547d54f..19ed9db177f 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/createCorePlugins.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/createCorePlugins.ts.html @@ -153,10 +153,10 @@

All files / packag       -4809x +5004x     -4809x +5004x       @@ -179,7 +179,7 @@

All files / packag     1x -4809x +5004x       @@ -262,7 +262,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/corePlugins/index.html b/coverage/packages/roosterjs-editor-core/lib/corePlugins/index.html index 721976ed02e..9cb2ee525d4 100644 --- a/coverage/packages/roosterjs-editor-core/lib/corePlugins/index.html +++ b/coverage/packages/roosterjs-editor-core/lib/corePlugins/index.html @@ -23,30 +23,30 @@

All files packages/roosterjs-editor-cor
- 86.02% + 86.27% Statements - 714/830 + 716/830
- 70.4% + 70.64% Branches - 585/831 + 587/831
- 86.78% + 87.36% Functions - 151/174 + 152/174
- 85.7% + 85.94% Lines - 695/811 + 697/811
@@ -149,17 +149,17 @@

All files packages/roosterjs-editor-cor

LifecyclePlugin.ts -
+
+
91.43%64/7080%48/6086.67%13/1591.04%61/6794.29%66/7083.33%50/6093.33%14/1594.03%63/67
import { createEditorCore } from './createEditorCore';
@@ -115,7 +115,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/editor/EditorBase.ts.html b/coverage/packages/roosterjs-editor-core/lib/editor/EditorBase.ts.html index 2738b3f67f3..9bd6fe18168 100644 --- a/coverage/packages/roosterjs-editor-core/lib/editor/EditorBase.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/editor/EditorBase.ts.html @@ -23,9 +23,9 @@

All files / packag
- 80.94% + 81.27% Statements - 242/299 + 243/299
@@ -37,16 +37,16 @@

All files / packag
- 78.48% + 79.75% Functions - 62/79 + 63/79
- 80.07% + 80.42% Lines - 229/286 + 230/286
@@ -1161,7 +1161,7 @@

All files / packag   1x   -4628x +4815x       @@ -1170,24 +1170,24 @@

All files / packag       -4628x +4815x           -4628x +4815x 2x       -4626x +4813x     -51060x +53117x     -4626x +4813x       @@ -1196,14 +1196,14 @@

All files / packag     1x -4585x -4585x -50546x +4760x +4760x +52471x     -4585x +4760x   -4585x +4760x       @@ -1229,8 +1229,8 @@

All files / packag     1x -31x -31x +43x +43x       @@ -1240,9 +1240,9 @@

All files / packag   1x   -4x -4x -4x +5x +5x +5x       @@ -1283,39 +1283,39 @@

All files / packag     1x -15x +39x     1x -466x +487x     -466x +487x     1x   -20715x +22194x           -10393x -10393x -10393x -10393x +11146x +11146x +11146x +11146x   -10393x -10393x -65x -65x +11146x +11146x +92x +92x     -10328x +11054x     -65x +92x       @@ -1352,10 +1352,10 @@

All files / packag     1x -234x +366x   -117x -117x +183x +183x       @@ -1363,9 +1363,9 @@

All files / packag       -5316x -4971x -4971x +5655x +5234x +5234x       @@ -1378,25 +1378,25 @@

All files / packag     1x -3x -3x -3x +9x +9x +9x       -3x +9x         -3x +9x       -3x -5x +9x +11x   -3x +9x       @@ -1419,29 +1419,29 @@

All files / packag       -6x +5x   -10x -10x -10x +8x +8x +8x   -6x -6x +5x +5x       -6x +5x   -6x +5x             -6x -6x -6x +5x +5x +5x       @@ -1449,10 +1449,10 @@

All files / packag       -6x -6x -6x -6x +5x +5x +5x +5x       @@ -1468,9 +1468,9 @@

All files / packag       -700x -497x -497x +464x +234x +234x       @@ -1481,8 +1481,8 @@

All files / packag     1x -534x -534x +709x +709x       @@ -1508,8 +1508,8 @@

All files / packag     1x -270x -270x +384x +384x     1x @@ -1518,18 +1518,18 @@

All files / packag       -5118x +5395x   -5118x +5395x           1x -237x -237x -220x +234x +234x +217x     17x @@ -1552,20 +1552,20 @@

All files / packag       -504x +584x         -504x +584x   -504x +584x   -504x -108x -108x +584x +105x +105x   -504x +584x       @@ -1580,23 +1580,23 @@

All files / packag     1x -  +6x           1x -192x +232x   -96x -96x -96x -96x -77x +116x +116x +116x +116x +97x   -96x 116x +136x       @@ -1608,9 +1608,9 @@

All files / packag       -13915x -13915x -13915x +14476x +14476x +14476x       @@ -1625,16 +1625,16 @@

All files / packag 1x     -9440x +9792x   -9328x -9328x +9684x +9684x       -9328x +9684x   -9328x +9684x       @@ -1690,8 +1690,8 @@

All files / packag       -4846x -4846x +5147x +5147x       @@ -1704,8 +1704,8 @@

All files / packag     1x -4626x -4626x +4813x +4813x       @@ -1720,7 +1720,7 @@

All files / packag     1x -9832x +19880x       @@ -1739,8 +1739,8 @@

All files / packag     1x -35x -35x +27x +27x       @@ -1751,7 +1751,7 @@

All files / packag     1x -10797x +11595x       @@ -1759,7 +1759,7 @@

All files / packag     1x -16x +34x       @@ -1775,8 +1775,8 @@

All files / packag     1x -22x -22x +93x +93x       @@ -1801,10 +1801,10 @@

All files / packag       -54x -54x -53x -53x +58x +58x +57x +57x       @@ -1886,11 +1886,11 @@

All files / packag     1x -137x -137x -223x -223x -223x +131x +131x +214x +214x +214x       @@ -1899,13 +1899,13 @@

All files / packag     1x -72x -72x -110x -110x -110x -110x -110x +68x +68x +104x +104x +104x +104x +104x 46x     @@ -1940,8 +1940,8 @@

All files / packag     1x -4626x -4626x +4813x +4813x       @@ -2004,7 +2004,7 @@

All files / packag     1x -4646x +4833x       @@ -2042,7 +2042,7 @@

All files / packag 1x     -10731x +11529x       @@ -2052,7 +2052,7 @@

All files / packag     1x -26x +20x       @@ -2109,10 +2109,10 @@

All files / packag     1x -101675x +116883x     -101675x +116883x       @@ -2609,8 +2609,8 @@

All files / packag * @param position The position to check * @returns True if position is at beginning of the editor, otherwise false */ - public isPositionAtBeginning(position: NodePosition): boolean { - return isPositionAtBeginningOf(position, this.getCore().contentDiv); + public isPositionAtBeginning(position: NodePosition): boolean { + return isPositionAtBeginningOf(position, this.getCore().contentDiv); }   /** @@ -3154,7 +3154,7 @@

All files / packag

diff --git a/coverage/packages/roosterjs-editor-core/lib/editor/createEditorCore.ts.html b/coverage/packages/roosterjs-editor-core/lib/editor/createEditorCore.ts.html index 7a8f73d4c6c..0d22e522d22 100644 --- a/coverage/packages/roosterjs-editor-core/lib/editor/createEditorCore.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/editor/createEditorCore.ts.html @@ -127,23 +127,23 @@

All files / packag     1x -4626x -4626x +4813x +4813x   -4626x -60138x -4626x -4601x +4813x +62569x +4813x +4784x     -55512x +57756x       -4626x -4626x +4813x +4813x   -4626x +4813x   31x   @@ -154,16 +154,16 @@

All files / packag       -4626x +4813x             -55686x +57930x   -371x +446x       @@ -171,7 +171,7 @@

All files / packag       -4626x +4813x    

import createCorePlugins, { getPluginState } from '../corePlugins/createCorePlugins';
 import DarkColorHandlerImpl from './DarkColorHandlerImpl';
@@ -238,7 +238,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/editor/index.html b/coverage/packages/roosterjs-editor-core/lib/editor/index.html index 80048f802b1..01af0ba6f01 100644 --- a/coverage/packages/roosterjs-editor-core/lib/editor/index.html +++ b/coverage/packages/roosterjs-editor-core/lib/editor/index.html @@ -23,9 +23,9 @@

All files packages/roosterjs-editor-cor
- 85.46% + 85.71% Statements - 341/399 + 342/399
@@ -37,16 +37,16 @@

All files packages/roosterjs-editor-cor
- 82% + 83% Functions - 82/100 + 83/100
- 84.7% + 84.96% Lines - 321/379 + 322/379
@@ -104,17 +104,17 @@

All files packages/roosterjs-editor-cor

EditorBase.ts -
+
+
80.94%242/29981.27%243/299 68.64% 162/23678.48%62/7980.07%229/28679.75%63/7980.42%230/286
import { ExperimentalFeatures } from 'roosterjs-editor-types';
 import type { CompatibleExperimentalFeatures } from 'roosterjs-editor-types/lib/compatibleTypes';
@@ -109,7 +109,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-core/lib/index.html b/coverage/packages/roosterjs-editor-core/lib/index.html index 0e5eedfbe0d..ef33afc6ca5 100644 --- a/coverage/packages/roosterjs-editor-core/lib/index.html +++ b/coverage/packages/roosterjs-editor-core/lib/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-core/l diff --git a/coverage/packages/roosterjs-editor-core/lib/index.ts.html b/coverage/packages/roosterjs-editor-core/lib/index.ts.html index 377b52745a4..3df31e77354 100644 --- a/coverage/packages/roosterjs-editor-core/lib/index.ts.html +++ b/coverage/packages/roosterjs-editor-core/lib/index.ts.html @@ -63,7 +63,7 @@

All files / packages/ 4 5 6

  -4571x +4754x 2x 151x 31x @@ -79,7 +79,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs-editor-dom/lib/blockElements/NodeBlockElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/blockElements/NodeBlockElement.ts.html index 621bd9b965b..237375a48b5 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/blockElements/NodeBlockElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/blockElements/NodeBlockElement.ts.html @@ -134,7 +134,7 @@

All files / packag     1x -929x +1237x       @@ -142,7 +142,7 @@

All files / packag     1x -35x +36x       @@ -150,7 +150,7 @@

All files / packag     1x -652x +830x       @@ -158,7 +158,7 @@

All files / packag     1x -556x +764x       @@ -166,7 +166,7 @@

All files / packag   1x   -229x +295x       @@ -174,14 +174,14 @@

All files / packag   1x   -208x +288x           1x -566x +983x       @@ -265,7 +265,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/blockElements/StartEndBlockElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/blockElements/StartEndBlockElement.ts.html index 70ac97ba13d..a3cb32c6401 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/blockElements/StartEndBlockElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/blockElements/StartEndBlockElement.ts.html @@ -190,14 +190,14 @@

All files / packag     1x -826x +864x   1x -1650x -1650x -2186x +1996x +1996x +2693x   -1650x +1996x       @@ -233,21 +233,21 @@

All files / packag     1x -224x +255x           1x -236x +276x           1x -50x +80x       @@ -257,14 +257,14 @@

All files / packag     1x -57x +80x           1x -1093x +1136x       @@ -397,7 +397,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/blockElements/getBlockElementAtNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/blockElements/getBlockElementAtNode.ts.html index e3a7ec7d2d0..417a1d12d42 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/blockElements/getBlockElementAtNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/blockElements/getBlockElementAtNode.ts.html @@ -235,25 +235,25 @@

All files / packag       -6776x -5168x +7382x +5428x           -1608x -1608x +1954x +1954x   -1608x -84x +1954x +126x       -1524x -1524x +1828x +1828x   -1524x +1828x       @@ -262,39 +262,39 @@

All files / packag       -1524x +1828x   -1524x +1828x       -1524x -1524x +1828x +1828x   -1524x +1828x   1x     -1523x -1523x -1523x +1827x +1882x +1882x   -1407x +1690x   -728x +994x   -1407x -116x +1690x +192x   -116x +192x             -1523x +1827x       @@ -309,33 +309,33 @@

All files / packag       -3048x +3656x   -3048x -96x +3656x +103x     -2952x -4031x -4031x -5234x -5234x -2809x +3553x +4919x +4919x +6465x +6465x +3371x       -1222x -2455x -59x -2396x -84x +1548x +3044x +87x +2957x +95x     -2312x -2312x +2862x +2862x     -1079x +1366x       @@ -487,7 +487,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/blockElements/getFirstLastBlockElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/blockElements/getFirstLastBlockElement.ts.html index 5df90748394..2e26498e408 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/blockElements/getFirstLastBlockElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/blockElements/getFirstLastBlockElement.ts.html @@ -89,11 +89,11 @@

All files / packag       -4718x -4718x -4815x +4905x +4905x +5002x   -4718x +4905x    

import getBlockElementAtNode from './getBlockElementAtNode';
 import { BlockElement } from 'roosterjs-editor-types';
@@ -121,7 +121,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/blockElements/index.html b/coverage/packages/roosterjs-editor-dom/lib/blockElements/index.html index 86bcfb6f7ce..747909bd1cd 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/blockElements/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/blockElements/index.html @@ -140,7 +140,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/createFragmentFromClipboardData.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/createFragmentFromClipboardData.ts.html index bb503f8a3bb..575ea79f343 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/createFragmentFromClipboardData.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/createFragmentFromClipboardData.ts.html @@ -188,11 +188,11 @@

All files / packag   24x   -2x -22x -10x +3x +21x +9x   -10x +9x       @@ -316,7 +316,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardEvent.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardEvent.ts.html index 54e1acb0869..24936dd2daa 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardEvent.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardEvent.ts.html @@ -223,7 +223,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItems.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItems.ts.html index 0ec9cb9b97a..ff3b9276554 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItems.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItems.ts.html @@ -472,7 +472,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItemsForIE.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItemsForIE.ts.html index f0f6948af60..297ba13ef49 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItemsForIE.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItemsForIE.ts.html @@ -268,7 +268,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/getPasteType.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/getPasteType.ts.html index 69c94b05325..d55177af6ef 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/getPasteType.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/getPasteType.ts.html @@ -95,14 +95,14 @@

All files / packag       -30x +28x 4x -26x +24x   -26x -3x +24x +2x   -23x +22x      

import { PasteType } from 'roosterjs-editor-types';
@@ -136,7 +136,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleImagePaste.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleImagePaste.ts.html index f2f03f7a4b3..5f26fa923f0 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleImagePaste.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleImagePaste.ts.html @@ -97,7 +97,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleTextPaste.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleTextPaste.ts.html index 9b79a743072..8fc1901c339 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleTextPaste.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/handleTextPaste.ts.html @@ -268,7 +268,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/index.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/index.html index 8e3cb2f8c34..f689ab6611e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/index.html @@ -215,7 +215,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/retrieveMetadataFromClipboard.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/retrieveMetadataFromClipboard.ts.html index adbcbe98c6b..ad7d2bec6b7 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/retrieveMetadataFromClipboard.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/retrieveMetadataFromClipboard.ts.html @@ -150,62 +150,62 @@

All files / packag       -60x -30x -30x -18x -18x -26x -26x +56x +28x +28x +15x +15x +14x +14x   -18x -31x -31x +15x +21x +21x     -18x -18x +15x +15x   -18x -72x -72x -34x -34x -30x +15x +57x +57x +25x +25x +21x     -42x -42x -28x +36x +36x +24x         -18x -11x -11x +15x +8x +8x     -18x -18x +15x +15x   -18x -11x -11x -11x -11x +15x +8x +8x +8x +8x           -11x +8x           -29x +23x    

import getTagOfNode from '../utils/getTagOfNode';
 import toArray from '../jsUtils/toArray';
@@ -289,7 +289,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/clipboard/sanitizePasteContent.ts.html b/coverage/packages/roosterjs-editor-dom/lib/clipboard/sanitizePasteContent.ts.html index 81f77655ade..777b22572ca 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/clipboard/sanitizePasteContent.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/clipboard/sanitizePasteContent.ts.html @@ -88,10 +88,10 @@

All files / packag       -30x -30x -30x -30x +28x +28x +28x +28x    

import getInheritableStyles from '../htmlSanitizer/getInheritableStyles';
 import HtmlSanitizer from '../htmlSanitizer/HtmlSanitizer';
@@ -118,7 +118,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/BodyScoper.ts.html b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/BodyScoper.ts.html index 623708ab2bb..79d39e2fb10 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/BodyScoper.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/BodyScoper.ts.html @@ -133,8 +133,8 @@

All files / packag       -447x -447x +452x +452x       @@ -150,7 +150,7 @@

All files / packag     1x -383x +388x       @@ -166,7 +166,7 @@

All files / packag     1x -172x +178x   1x  

import contains from '../utils/contains';
@@ -232,7 +232,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/ContentTraverser.ts.html b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/ContentTraverser.ts.html index 08af8d630ce..e41d0615610 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/ContentTraverser.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/ContentTraverser.ts.html @@ -311,15 +311,15 @@

All files / packag     1x -728x -728x +852x +852x             -728x +852x       @@ -332,7 +332,7 @@

All files / packag       -447x +452x       @@ -346,7 +346,7 @@

All files / packag       -133x +224x       @@ -360,10 +360,10 @@

All files / packag 1x     -290x +346x     -148x +176x       @@ -371,18 +371,18 @@

All files / packag   1x   -382x -168x +475x +200x     -382x +475x           1x -216x +277x       @@ -393,35 +393,35 @@

All files / packag     1x -256x +317x   -256x +317x       -256x +317x           -256x +317x             -256x +317x         -100x -100x +133x +133x     -156x +184x       @@ -429,47 +429,47 @@

All files / packag   1x   -1671x -560x +1913x +652x     -1671x +1913x           1x -407x +528x           1x -320x +343x     1x -727x +871x     -727x -11x +871x +13x     -716x -98x +858x +102x         -98x +102x       -618x -618x +756x +756x       @@ -482,12 +482,12 @@

All files / packag       -716x -282x -282x +858x +354x +354x     -434x +504x   1x   @@ -496,22 +496,22 @@

All files / packag       -618x +756x     -618x +756x   -26x +30x   -26x -14x +30x +16x         -604x -604x -604x +740x +740x +740x    

import BodyScoper from './BodyScoper';
 import EmptyInlineElement from '../inlineElements/EmptyInlineElement';
@@ -748,7 +748,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/PositionContentSearcher.ts.html b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/PositionContentSearcher.ts.html index f8f537f615b..eacad53d8c9 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/PositionContentSearcher.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/PositionContentSearcher.ts.html @@ -311,35 +311,35 @@

All files / packag   1x   -143x +159x     -143x +159x     -143x +159x     -143x +159x     -143x +159x     -143x +159x     -143x +159x     -143x +159x             -143x +159x       @@ -359,11 +359,11 @@

All files / packag     1x -24x -24x +36x +36x     -24x +36x       @@ -371,14 +371,14 @@

All files / packag     1x -20x -20x +32x +32x           -20x +32x       @@ -389,12 +389,12 @@

All files / packag       +16x +16x 12x -12x -8x     -12x +16x       @@ -474,52 +474,52 @@

All files / packag     1x -165x +181x     -165x +181x 3x     -162x -162x -197x +178x +178x +220x   -197x -87x +220x +94x     -87x +94x     -87x -87x +94x +94x 12x       -87x -87x +94x +94x     -87x +94x 52x     -110x -110x -110x +126x +126x +126x   -104x +120x           -110x +126x     -35x +42x     1x @@ -763,7 +763,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionBlockScoper.ts.html b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionBlockScoper.ts.html index 49cbf282644..d7980074f7c 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionBlockScoper.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionBlockScoper.ts.html @@ -207,16 +207,16 @@

All files / packag       -161x +189x   -161x +189x   -161x +189x 19x     -161x -161x +189x +189x       @@ -233,8 +233,8 @@

All files / packag     1x -150x -139x +178x +163x       @@ -244,14 +244,14 @@

All files / packag       -134x -134x +158x +158x           -11x +15x       @@ -269,7 +269,7 @@

All files / packag     1x -96x +103x       @@ -415,7 +415,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionScoper.ts.html b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionScoper.ts.html index 6f8d23f633d..ffaa26d3a87 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionScoper.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/SelectionScoper.ts.html @@ -198,41 +198,41 @@

All files / packag 1x     -149x -149x +240x +240x             -149x -149x -149x +240x +240x +240x           1x -233x -111x +307x +143x     -233x +307x           1x -35x -35x +94x +94x         -35x +94x       @@ -240,21 +240,21 @@

All files / packag     1x -126x +168x     -126x -126x -126x +168x +168x +168x 8x   -118x +160x           -118x +160x       @@ -262,7 +262,7 @@

All files / packag       -126x +168x       @@ -271,32 +271,32 @@

All files / packag     1x -71x +203x         -71x -71x +203x +203x   -71x -4x +203x +18x     -67x -67x +185x +185x   -67x +185x 1x 1x     -67x -23x -23x +185x +25x +25x     -67x +185x       @@ -439,7 +439,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/index.html b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/index.html index 0c810a1602c..10384bd6d1b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/contentTraverser/index.html @@ -155,7 +155,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/delimiter/addDelimiters.ts.html b/coverage/packages/roosterjs-editor-dom/lib/delimiter/addDelimiters.ts.html index 0f9895b1c45..9ceca8ef745 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/delimiter/addDelimiters.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/delimiter/addDelimiters.ts.html @@ -274,7 +274,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/delimiter/getDelimiterFromElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/delimiter/getDelimiterFromElement.ts.html index 3b715be0821..39be26404ef 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/delimiter/getDelimiterFromElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/delimiter/getDelimiterFromElement.ts.html @@ -93,10 +93,10 @@

All files / packag     1x -578x +569x 1x   -577x +568x       @@ -105,7 +105,7 @@

All files / packag 36x     -541x +532x    

import safeInstanceOf from '../utils/safeInstanceOf';
 import { DelimiterClasses } from 'roosterjs-editor-types';
@@ -139,7 +139,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/delimiter/index.html b/coverage/packages/roosterjs-editor-dom/lib/delimiter/index.html index 306896ed770..e9ef2b29fb2 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/delimiter/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/delimiter/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/edit/adjustInsertPosition.ts.html b/coverage/packages/roosterjs-editor-dom/lib/edit/adjustInsertPosition.ts.html index 94733d42d85..8554a1afa47 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/edit/adjustInsertPosition.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/edit/adjustInsertPosition.ts.html @@ -23,30 +23,30 @@

All files / packag
- 70.08% + 71.65% Statements - 89/127 + 91/127
- 45.83% + 55% Branches - 55/120 + 66/120
- 83.33% + 91.67% Functions - 10/12 + 11/12
- 70.08% + 71.65% Lines - 89/127 + 91/127
@@ -468,21 +468,21 @@

All files / packag       -20x +36x   -20x +36x     -18x +28x           -  +2x     -18x +28x       @@ -490,7 +490,7 @@

All files / packag       -18x +28x       @@ -521,7 +521,7 @@

All files / packag       -20x +36x       @@ -533,30 +533,30 @@

All files / packag       -20x -20x +36x +36x   -20x -6x -6x -8x +36x +11x +11x +12x   -6x +11x     -20x +36x   -20x -20x -20x -20x +36x +36x +36x +36x   -20x +36x         -20x +36x       @@ -581,7 +581,7 @@

All files / packag       -20x +36x       @@ -592,7 +592,7 @@

All files / packag       -20x +36x       @@ -605,7 +605,7 @@

All files / packag       -20x +36x       @@ -615,7 +615,7 @@

All files / packag       -20x +36x       @@ -628,13 +628,13 @@

All files / packag       -20x +36x           -20x +36x       @@ -647,17 +647,17 @@

All files / packag       -20x -20x -20x -20x -20x +36x +32x +32x +32x +32x 1x -19x -  +31x +2x     -20x +36x       @@ -669,17 +669,17 @@

All files / packag       -21x -1x -1x +38x +2x +2x           -1x -1x -1x +2x +2x +2x       @@ -688,13 +688,13 @@

All files / packag       -1x -1x -1x +2x +2x +2x       -20x +36x       @@ -706,7 +706,7 @@

All files / packag       -20x +36x       @@ -742,7 +742,7 @@

All files / packag       -20x +36x       @@ -760,10 +760,10 @@

All files / packag       -20x -140x +36x +252x   -20x +36x       @@ -835,10 +835,10 @@

All files / packag null /*forEachCallback*/, QueryScope.OnSelection, createRange(position) - ).filter((a: HTMLElement) => blockElement!.contains(a))[0]; + ).filter((a: HTMLElement) => blockElement!.contains(a))[0];   // If this is about to insert node to an empty A tag, clear the A tag and reset position - Iif (anchor && isNodeEmpty(anchor)) { + Iif (anchor && isNodeEmpty(anchor)) { position = new Position(anchor, PositionType.Before); safeRemove(anchor); anchor = null; @@ -848,8 +848,8 @@

All files / packag // otherwise we will have nested A tags which is a wrong HTML structure Iif ( anchor && - (<ParentNode>(nodeToInsert as HTMLElement))?.querySelector && - (<ParentNode>(nodeToInsert as HTMLElement))?.querySelector('a[href]') + (<ParentNode>(nodeToInsert as HTMLElement))?.querySelector && + (<ParentNode>(nodeToInsert as HTMLElement))?.querySelector('a[href]') ) { let normalizedPosition = position.normalize(); let parentNode = normalizedPosition.node.parentNode!; @@ -1003,14 +1003,14 @@

All files / packag position: NodePosition, range: Range ): NodePosition { - Eif (range && range.collapsed) { + if (range && range.collapsed) { const searcher = new PositionContentSearcher(root, Position.getStart(range)); const inlineElementBefore = searcher.getInlineElementBefore(); const inlineElementAfter = searcher.getInlineElementAfter(); if (inlineElementBefore instanceof LinkInlineElement) { position = new Position(inlineElementBefore.getContainerNode(), PositionType.After); - } else Iif (inlineElementAfter instanceof LinkInlineElement) { - position = new Position(inlineElementAfter.getContainerNode(), PositionType.Before); + } else if (inlineElementAfter instanceof LinkInlineElement) { + position = new Position(inlineElementAfter.getContainerNode(), PositionType.Before); } } return position; @@ -1132,7 +1132,7 @@

All files / packag

diff --git a/coverage/packages/roosterjs-editor-dom/lib/edit/deleteSelectedContent.ts.html b/coverage/packages/roosterjs-editor-dom/lib/edit/deleteSelectedContent.ts.html index 398b20360c0..6525017c23e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/edit/deleteSelectedContent.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/edit/deleteSelectedContent.ts.html @@ -475,7 +475,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/edit/getTextContent.ts.html b/coverage/packages/roosterjs-editor-dom/lib/edit/getTextContent.ts.html index 3ba45cd3156..78477c61ef7 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/edit/getTextContent.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/edit/getTextContent.ts.html @@ -121,7 +121,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/edit/index.html b/coverage/packages/roosterjs-editor-dom/lib/edit/index.html index 30166778cee..9386eccd6c2 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/edit/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/edit/index.html @@ -23,30 +23,30 @@

All files packages/roosterjs-editor-dom
- 72.77% + 73.82% Statements - 139/191 + 141/191
- 54.17% + 60.71% Branches - 91/168 + 102/168
- 84.21% + 89.47% Functions - 16/19 + 17/19
- 72.19% + 73.26% Lines - 135/187 + 137/187
@@ -74,17 +74,17 @@

All files packages/roosterjs-editor-dom

adjustInsertPosition.ts -
+
+
70.08%89/12745.83%55/12083.33%10/1270.08%89/12771.65%91/12755%66/12091.67%11/1271.65%91/127
import { EntityClasses } from 'roosterjs-editor-types';
  
@@ -100,7 +100,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/entity/index.html b/coverage/packages/roosterjs-editor-dom/lib/entity/index.html index 2dfe6d8cf3f..5deea3d0dba 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/entity/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/entity/index.html @@ -140,7 +140,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/event/cacheGetEventData.ts.html b/coverage/packages/roosterjs-editor-dom/lib/event/cacheGetEventData.ts.html index bd8981f1757..f098f43d26e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/event/cacheGetEventData.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/event/cacheGetEventData.ts.html @@ -97,15 +97,15 @@

All files / packag       -856x +940x     -856x -373x -373x +940x +377x +377x     -856x +940x    

import { PluginEvent } from 'roosterjs-editor-types';
  
@@ -139,7 +139,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/event/clearEventDataCache.ts.html b/coverage/packages/roosterjs-editor-dom/lib/event/clearEventDataCache.ts.html index a2250b8bbc7..a413cdd9177 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/event/clearEventDataCache.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/event/clearEventDataCache.ts.html @@ -112,7 +112,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/event/index.html b/coverage/packages/roosterjs-editor-dom/lib/event/index.html index cda7678d81a..d7ab717c49d 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/event/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/event/index.html @@ -155,7 +155,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/event/isCharacterValue.ts.html b/coverage/packages/roosterjs-editor-dom/lib/event/isCharacterValue.ts.html index ded0151b238..a2324ced14e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/event/isCharacterValue.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/event/isCharacterValue.ts.html @@ -100,7 +100,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/event/isCtrlOrMetaPressed.ts.html b/coverage/packages/roosterjs-editor-dom/lib/event/isCtrlOrMetaPressed.ts.html index 94ddf991d3f..14d8a7240fe 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/event/isCtrlOrMetaPressed.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/event/isCtrlOrMetaPressed.ts.html @@ -75,7 +75,7 @@

All files / packag   1x   -29x +25x       @@ -83,7 +83,7 @@

All files / packag     1x -29x +25x    

import { Browser } from '../utils/Browser';
  
@@ -106,7 +106,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/event/isModifierKey.ts.html b/coverage/packages/roosterjs-editor-dom/lib/event/isModifierKey.ts.html index bdf79589bc3..6fbd847df00 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/event/isModifierKey.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/event/isModifierKey.ts.html @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/HtmlSanitizer.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/HtmlSanitizer.ts.html index 03724757cee..1aa1b0147b8 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/HtmlSanitizer.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/HtmlSanitizer.ts.html @@ -479,20 +479,20 @@

All files / packag       -214x -214x -214x -214x -214x -214x -214x +212x +212x +212x +212x +212x +212x +212x     -214x -214x -214x -214x -214x +212x +212x +212x +212x +212x       @@ -526,11 +526,11 @@

All files / packag     1x -236x +234x     -236x -236x +234x +234x       @@ -538,37 +538,37 @@

All files / packag     1x -224x -224x +222x +222x   -14x +11x 8x -22x -224x -63x +19x +222x +44x   -63x -63x -63x +44x +44x +44x       -29x -29x +21x +21x 2x   -27x +19x       -27x -22x +19x +18x           -224x +222x 8x 8x   @@ -576,105 +576,105 @@

All files / packag     1x -1098x -1098x -1098x -1098x -1098x +1074x +1074x +1074x +1074x +1074x   -1098x +1074x   -1098x -543x -543x -543x +1074x +534x +534x +534x   -543x -9x +534x +7x     -543x -38x -505x +534x +36x +498x   -505x -470x +498x +463x 35x 3x 3x   -555x -487x -487x +540x +474x +474x         -68x -60x +66x +58x 8x 8x         -1098x -55x -1043x +1074x +51x +1023x       12x     -1031x -569x -569x -569x -509x -509x -509x +1011x +558x +558x +558x +500x +500x +500x     -569x -569x -569x -862x -862x +558x +558x +558x +840x +840x         1x -509x +500x       -509x -32x -53x +500x +30x +49x         -509x -509x -509x -511x -511x -511x -511x +500x +500x +500x +471x +471x +471x +471x   -511x -81x +471x +74x     -511x +471x         -511x +471x       @@ -682,55 +682,55 @@

All files / packag       -511x -110x +471x +108x     -511x -284x +471x +262x   -227x +209x       -509x +500x     1x -509x -293x -293x -293x -293x +500x +277x +277x +277x +277x   -293x +277x           -293x -26x +277x +24x     -293x +277x         -80x +75x   -213x +202x         -26x -26x -26x +24x +24x +24x   -26x -74x +24x +72x       @@ -738,7 +738,7 @@

All files / packag       -26x +24x   1x  

import changeElementTag from '../utils/changeElementTag';
@@ -1090,7 +1090,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/chainSanitizerCallback.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/chainSanitizerCallback.ts.html index fac5f825aa0..59b5c501cd4 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/chainSanitizerCallback.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/chainSanitizerCallback.ts.html @@ -93,8 +93,8 @@

All files / packag       -342x -342x +323x +323x       @@ -133,7 +133,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/cloneObject.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/cloneObject.ts.html index b38f30ef24d..2b4fa7fdf0d 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/cloneObject.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/cloneObject.ts.html @@ -97,7 +97,7 @@

All files / packag       -1661x +1640x       @@ -123,7 +123,7 @@

All files / packag       -1661x +1640x    

import getObjectKeys from '../jsUtils/getObjectKeys';
  
@@ -166,7 +166,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/createDefaultHtmlSanitizerOptions.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/createDefaultHtmlSanitizerOptions.ts.html index 8610889a4fa..b71a1645ebf 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/createDefaultHtmlSanitizerOptions.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/createDefaultHtmlSanitizerOptions.ts.html @@ -83,7 +83,7 @@

All files / packag     1x -57x +55x       @@ -124,7 +124,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getAllowedValues.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getAllowedValues.ts.html index ab32c059b94..ad094ab3ec9 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getAllowedValues.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getAllowedValues.ts.html @@ -518,23 +518,23 @@

All files / packag 1x     -214x -214x -214x +212x +212x +212x 2x 2x       -214x +212x           1x -214x -14340x +212x +14418x       @@ -544,17 +544,17 @@

All files / packag 1x     -214x -214x +212x +212x           1x -214x -214x -59x +212x +212x +57x 1x 1x 1x @@ -564,7 +564,7 @@

All files / packag       -214x +212x       @@ -573,10 +573,10 @@

All files / packag 1x     -214x -214x -214x -214x +212x +212x +212x +212x       @@ -584,12 +584,12 @@

All files / packag       -23x -23x +20x +20x       -14340x +14418x    

import getObjectKeys from '../jsUtils/getObjectKeys';
 import { cloneObject } from './cloneObject';
@@ -732,7 +732,7 @@ 

All files / packag 'hreflang,ismap,kind,label,lang,list,low,max,maxlength,media,min,multiple,open,optimum,pattern,' + 'placeholder,readonly,rel,required,reversed,rows,rowspan,scope,selected,shape,size,sizes,span,' + 'spellcheck,src,srclang,srcset,start,step,style,tabindex,target,title,translate,type,usemap,valign,value,' + - 'width,wrap' + 'width,wrap,bgColor' ).split(',');   const DEFAULT_STYLE_VALUES: { [name: string]: string } = { @@ -865,7 +865,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getInheritableStyles.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getInheritableStyles.ts.html index 1de58c2c246..e1292454acd 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getInheritableStyles.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getInheritableStyles.ts.html @@ -99,13 +99,13 @@

All files / packag     1x -249x -249x -249x -249x -6723x +244x +244x +244x +244x +6588x   -249x +244x    

import { StringMap } from 'roosterjs-editor-types';
  
@@ -139,7 +139,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getPredefinedCssForElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getPredefinedCssForElement.ts.html index 3200a3b9873..7ebbb784883 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getPredefinedCssForElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/getPredefinedCssForElement.ts.html @@ -154,8 +154,8 @@

All files / packag       -518x -518x +509x +509x    

import getTagOfNode from '../utils/getTagOfNode';
 import { PredefinedCssMap, StringMap } from 'roosterjs-editor-types';
@@ -214,7 +214,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/index.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/index.html index ae9a30e21a7..44f29a86204 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/index.html @@ -200,7 +200,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/processCssVariable.ts.html b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/processCssVariable.ts.html index 2bcfe63b265..db8ac1e6551 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/processCssVariable.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/htmlSanitizer/processCssVariable.ts.html @@ -91,7 +91,7 @@

All files / packag     1x -477x +439x    

const VARIABLE_REGEX = /^\s*var\(\s*[a-zA-Z0-9-_]+\s*(,\s*(.*))?\)\s*$/;
 const VARIABLE_PREFIX = 'var(';
@@ -118,7 +118,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/index.html b/coverage/packages/roosterjs-editor-dom/lib/index.html index 7df24bedaef..ab909b7c2f1 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/index.html @@ -37,9 +37,9 @@

All files packages/roosterjs-editor-dom/li
- 78.03% + 78.79% Functions - 103/132 + 104/132
@@ -81,8 +81,8 @@

All files packages/roosterjs-editor-dom/li

242/242 100% 0/078.03%103/13278.79%104/132 100% 130/130
4817x -4647x +1575033x +4834x   -194x -124x +265x +128x   1x 32x 1x 1x   -557x +548x   1x 2x 4x -4x -1x +10x +9x 1x   3x 3x 1x 25x -2x 1x -7x -7x -31x +1x +5x +5x +29x   -18824x -4628x +19573x +4815x 20x 30x -11100x -5789x +12792x +6077x 1x -163x +214x 1x 2x 101x     -7847x -229x +8186x +373x 37x -27x +36x 71x -10396x -17x -245x -77x -33x -173x +11168x +21x +317x +112x +54x +207x 4x 11x -12014x +12867x 7x 1x -9318x +9731x 384x -4852x -277x +5039x +271x 32x 1x 116x @@ -285,76 +285,76 @@

All files / packages/   3x 1x -15x -94x -1x +26x +114x +4x 1x 2x   -79x -45x -38x -51x +99x +65x +58x +64x 1x 1x   -10454x -757x +11190x +913x 1x -2x -4941x +8x +5252x 4x 1x 1x 5x -395x +471x   -762x +889x   -5002x -9253x +5289x +9627x 1x 1x -524x +700x   1x 1x 1x   -4839x -15x +5032x +12x   48x 1x -60x -343x +58x +324x   136x -5406x -5380x +5768x +5808x 1x 1x 5x -404x +480x     -550x +713x 8x 5x 54x -30x +26x   -169x +167x 6x 741x 144x -10475x +11023x   -21x +37x 1x 1x   -447x +440x 1x 7x 3x @@ -362,13 +362,13 @@

All files / packages/ 1x 6x   -95x +75x   -4696x -40795x -817x +4876x +42417x +1120x   -22x +19x  

export { default as getBlockElementAtNode } from './blockElements/getBlockElementAtNode';
 export { default as getFirstLastBlockElement } from './blockElements/getFirstLastBlockElement';
  
@@ -386,14 +386,14 @@ 

All files / packages/ export { default as ImageInlineElement } from './inlineElements/ImageInlineElement'; export { default as LinkInlineElement } from './inlineElements/LinkInlineElement'; export { default as NodeInlineElement } from './inlineElements/NodeInlineElement'; -export { default as PartialInlineElement } from './inlineElements/PartialInlineElement'; +export { default as PartialInlineElement } from './inlineElements/PartialInlineElement'; export { default as applyTextStyle } from './inlineElements/applyTextStyle';   export { default as extractClipboardEvent } from './clipboard/extractClipboardEvent'; export { default as extractClipboardItems } from './clipboard/extractClipboardItems'; export { default as extractClipboardItemsForIE } from './clipboard/extractClipboardItemsForIE'; export { default as createFragmentFromClipboardData } from './clipboard/createFragmentFromClipboardData'; -export { default as handleImagePaste } from './clipboard/handleImagePaste'; +export { default as handleImagePaste } from './clipboard/handleImagePaste'; export { default as handleTextPaste } from './clipboard/handleTextPaste'; export { default as retrieveMetadataFromClipboard } from './clipboard/retrieveMetadataFromClipboard'; export { default as sanitizePasteContent } from './clipboard/sanitizePasteContent'; @@ -443,7 +443,7 @@

All files / packages/ export { default as VListItem } from './list/VListItem'; export { default as createVListFromRegion } from './list/createVListFromRegion'; export { default as VListChain } from './list/VListChain'; -export { default as setListItemStyle } from './list/setListItemStyle'; +export { default as setListItemStyle } from './list/setListItemStyle'; export { getTableFormatInfo } from './table/tableFormatInfo'; export { saveTableCellMetadata } from './table/tableCellInfo';   @@ -532,7 +532,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/EmptyInlineElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/EmptyInlineElement.ts.html index 4e1a509cc7d..1b400af3f27 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/EmptyInlineElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/EmptyInlineElement.ts.html @@ -138,7 +138,7 @@

All files / packag     1x -111x +118x       @@ -165,7 +165,7 @@

All files / packag     1x -98x +102x       @@ -280,7 +280,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/ImageInlineElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/ImageInlineElement.ts.html index 886e2613190..9d72bd4c29d 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/ImageInlineElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/ImageInlineElement.ts.html @@ -76,7 +76,7 @@

All files / packag   1x   -4x +5x   1x  

import NodeInlineElement from './NodeInlineElement';
@@ -97,7 +97,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/LinkInlineElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/LinkInlineElement.ts.html index dd886fd36f9..d54cde4d21d 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/LinkInlineElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/LinkInlineElement.ts.html @@ -76,7 +76,7 @@

All files / packag   1x   -14x +32x   1x  

import NodeInlineElement from './NodeInlineElement';
@@ -97,7 +97,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/NodeInlineElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/NodeInlineElement.ts.html index 5e735ef8e1e..eb738acf61b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/NodeInlineElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/NodeInlineElement.ts.html @@ -167,14 +167,14 @@

All files / packag     1x -792x +957x         1x   -169x +174x       @@ -185,7 +185,7 @@

All files / packag     1x -1776x +2039x       @@ -199,7 +199,7 @@

All files / packag 1x     -349x +554x       @@ -208,37 +208,37 @@

All files / packag 1x     -246x +450x           1x -93x +100x           1x -203x +287x           1x -129x -129x -129x +201x +201x +201x           1x -7x +117x   1x  

import applyTextStyle from './applyTextStyle';
@@ -340,7 +340,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/PartialInlineElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/PartialInlineElement.ts.html index 4b7683cf1dd..ac4e1d6f4a0 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/PartialInlineElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/PartialInlineElement.ts.html @@ -195,9 +195,9 @@

All files / packag   1x   -121x -144x -155x +129x +156x +167x       @@ -211,7 +211,7 @@

All files / packag     1x -61x +68x       @@ -225,23 +225,23 @@

All files / packag     1x -17x +19x   -17x +19x           1x -111x +116x           1x -103x +108x       @@ -255,7 +255,7 @@

All files / packag     1x -12x +16x       @@ -271,16 +271,16 @@

All files / packag     1x -6x +8x           1x -22x -22x -22x +24x +24x +24x       @@ -433,7 +433,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/applyTextStyle.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/applyTextStyle.ts.html index 9d37628bac1..0cd9f08a87c 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/applyTextStyle.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/applyTextStyle.ts.html @@ -180,22 +180,22 @@

All files / packag 1x     -80x -83x +300x +303x   -65x -65x -65x +175x +175x +175x   -65x -83x -83x +175x +193x +193x     -83x +193x   -83x -82x +193x +188x 24x     @@ -203,7 +203,7 @@

All files / packag       -82x +188x 27x     @@ -211,43 +211,43 @@

All files / packag       -82x +188x     -83x +193x     -65x -74x -53x -53x +175x +180x +159x +159x 15x 15x 15x   -53x +159x     -56x +162x     -67x -67x +173x +173x         -48x -48x +98x +98x     -67x -26x -26x +173x +83x +83x     -67x -67x +173x +173x       @@ -257,8 +257,8 @@

All files / packag       -74x -7x +181x +8x      

import getTagOfNode from '../utils/getTagOfNode';
@@ -370,7 +370,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getFirstLastInlineElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getFirstLastInlineElement.ts.html index 7b1ec149a1b..e5e7066724b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getFirstLastInlineElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getFirstLastInlineElement.ts.html @@ -93,8 +93,8 @@

All files / packag 1x     -280x -280x +285x +285x       @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementAtNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementAtNode.ts.html index f80542f0393..a2f3a2b94ab 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementAtNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementAtNode.ts.html @@ -150,8 +150,8 @@

All files / packag       -1313x -1313x +1541x +1541x       @@ -160,28 +160,28 @@

All files / packag       -785x -785x -785x +950x +950x +950x       -594x +863x         -785x -1367x -1367x -1367x -13x -1354x -3x +950x +1774x +1774x +1774x +31x +1743x +4x       -785x +950x    

import getBlockElementAtNode from '../blockElements/getBlockElementAtNode';
 import getTagOfNode from '../utils/getTagOfNode';
@@ -253,7 +253,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementBeforeAfter.ts.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementBeforeAfter.ts.html index 411dfe8d01b..60ff279d9d2 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementBeforeAfter.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementBeforeAfter.ts.html @@ -158,44 +158,44 @@

All files / packag     1x -169x +252x           1x -267x +354x       -267x -534x -267x -267x +354x +708x +354x +354x   -267x -100x -167x +354x +104x +250x       -17x +21x     -267x -25x +354x +38x     -267x +354x   -267x -17x +354x +21x         -267x +354x    

import getInlineElementAtNode from './getInlineElementAtNode';
 import PartialInlineElement from './PartialInlineElement';
@@ -274,7 +274,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/index.html b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/index.html index a69642bbb58..4695a02d17d 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/inlineElements/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/inlineElements/index.html @@ -215,7 +215,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/arrayPush.ts.html b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/arrayPush.ts.html index ff8a2b3dc84..d39a97257c9 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/arrayPush.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/arrayPush.ts.html @@ -71,7 +71,7 @@

All files / packag     1x -4807x +5014x    

/**
  * A type-safe wrapper for Array.prototype.push.apply()
@@ -88,7 +88,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/getObjectKeys.ts.html b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/getObjectKeys.ts.html index 81d35db768c..b0ef469f4e1 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/getObjectKeys.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/getObjectKeys.ts.html @@ -75,7 +75,7 @@

All files / packag 1x     -42730x +44326x    

/**
  * Provide a strong-typed version of Object.keys()
@@ -94,7 +94,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/index.html b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/index.html index c101a355e09..85609b2707f 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/index.html @@ -125,7 +125,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/toArray.ts.html b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/toArray.ts.html index fcc73af1873..4f3d1a1e245 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/jsUtils/toArray.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/jsUtils/toArray.ts.html @@ -125,7 +125,7 @@

All files / packag     1x -14215x +15747x    

/**
  * Convert a named node map to an array
@@ -169,7 +169,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/VList.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/VList.ts.html index 7d23aec68ea..ed6eaf054f4 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/VList.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/VList.ts.html @@ -710,14 +710,14 @@

All files / packag     1x -257x +273x           -257x -257x +273x +273x 1x     @@ -742,8 +742,8 @@

All files / packag       -256x -256x +272x +272x       @@ -777,9 +777,9 @@

All files / packag       -256x +272x   -256x +272x       @@ -798,15 +798,15 @@

All files / packag     1x -89x +104x   -89x +104x           -148x +174x       @@ -1013,16 +1013,16 @@

All files / packag     1x -23x +24x     -23x -15x +24x +16x 8x 5x     -23x +24x       @@ -1091,7 +1091,7 @@

All files / packag     1x -159x +174x     1x @@ -1129,25 +1129,25 @@

All files / packag 54x     -314x +333x   -570x +605x             -314x -314x +333x +333x   -314x -466x +333x +495x   -466x -58x -408x -395x +495x +61x +434x +421x       @@ -1160,13 +1160,13 @@

All files / packag       -317x +336x   -317x -476x -387x -89x -58x +336x +505x +413x +92x +61x 31x 10x   @@ -1178,7 +1178,7 @@

All files / packag       -391x +417x 7x 7x   @@ -1801,7 +1801,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/VListChain.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/VListChain.ts.html index df2c581fc5c..2aee91a19d3 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/VListChain.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/VListChain.ts.html @@ -255,8 +255,8 @@

All files / packag     1x -44x -44x +53x +53x       @@ -269,43 +269,43 @@

All files / packag       -119x -119x -119x -86x +146x +146x +146x +113x     -86x -70x +113x +88x   -70x +88x   -58x +73x   -58x -58x +73x +73x   -58x +73x     -46x -8x +60x +13x     -46x -12x +60x +13x 6x     -58x -58x +73x +73x       -86x +113x     -119x +146x       @@ -322,17 +322,17 @@

All files / packag     1x +5x 4x -3x   -3x -3x -3x +4x +4x +4x   -3x +4x   -3x -3x +4x +4x   1x   @@ -374,14 +374,14 @@

All files / packag       -44x +53x           1x -19x +29x       @@ -390,18 +390,18 @@

All files / packag     1x -58x -58x +73x +73x   -58x -12x +73x +13x   -46x +60x       1x -61x +77x     18x @@ -601,7 +601,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/VListItem.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/VListItem.ts.html index 4b0b8d9a12f..ca54dca9c53 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/VListItem.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/VListItem.ts.html @@ -656,7 +656,7 @@

All files / packag       -498x +526x       @@ -666,47 +666,47 @@

All files / packag       -1578x +1667x             -498x +526x 1x     -497x +525x     -497x +525x   -497x +525x     -497x +525x           1x -187x +213x           1x -257x +283x           1x -331x +332x       @@ -730,7 +730,7 @@

All files / packag     1x -198x +218x       @@ -865,14 +865,14 @@

All files / packag       -140x +141x     -241x +243x   -140x +141x   -140x +141x       @@ -898,7 +898,7 @@

All files / packag       -140x +141x 98x 32x 32x @@ -911,21 +911,21 @@

All files / packag       -140x -111x -111x +141x +112x +112x             -111x -111x +112x +112x       -111x +112x 19x 19x   @@ -936,17 +936,17 @@

All files / packag       -140x -140x +141x +141x     -140x -130x -130x +141x +131x +131x       -140x +141x   10x 10x @@ -1006,8 +1006,8 @@

All files / packag     1x -111x -111x +112x +112x 50x 50x 72x @@ -1015,7 +1015,7 @@

All files / packag   50x   -61x +62x   1x   @@ -1025,7 +1025,7 @@

All files / packag       -111x +112x       @@ -1034,7 +1034,7 @@

All files / packag       -111x +112x 67x   9x @@ -1046,32 +1046,32 @@

All files / packag       -44x +45x       -111x +112x 7x 7x         -111x +112x 28x           -111x +112x 3x           -111x +112x       @@ -1615,7 +1615,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToAlpha.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToAlpha.ts.html index a33b8aa9682..6effaccdcea 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToAlpha.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToAlpha.ts.html @@ -196,7 +196,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToRomans.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToRomans.ts.html index a1efafb8789..86018e097cf 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToRomans.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/convertDecimalsToRomans.ts.html @@ -166,7 +166,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/createVListFromRegion.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/createVListFromRegion.ts.html index a3fe30ecc73..7f48e7705af 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/createVListFromRegion.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/createVListFromRegion.ts.html @@ -239,15 +239,15 @@

All files / packag       -41x +52x 1x     -40x +51x   -40x -10x -10x +51x +21x +21x 8x     @@ -295,9 +295,9 @@

All files / packag 52x     -40x +51x   -40x +51x 38x 38x   @@ -316,7 +316,7 @@

All files / packag       -40x +51x       @@ -508,7 +508,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/getListTypeFromNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/getListTypeFromNode.ts.html index 1a9dc6773a1..155cff5c499 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/getListTypeFromNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/getListTypeFromNode.ts.html @@ -125,13 +125,13 @@

All files / packag     1x -1588x +1665x   -922x +973x   204x   -462x +488x       @@ -141,7 +141,7 @@

All files / packag     1x -1025x +1083x    

import getTagOfNode from '../utils/getTagOfNode';
 import { ListType } from 'roosterjs-editor-types';
@@ -193,7 +193,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/getRootListNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/getRootListNode.ts.html index 0c464cf40a3..144bd2967f4 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/getRootListNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/getRootListNode.ts.html @@ -131,27 +131,27 @@

All files / packag       -168x +197x             -168x -124x -124x +197x +142x +142x             -23x +26x       -168x +197x    

import findClosestElementAncestor from '../utils/findClosestElementAncestor';
 import { RegionBase } from 'roosterjs-editor-types';
@@ -208,7 +208,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/index.html b/coverage/packages/roosterjs-editor-dom/lib/list/index.html index c20f9f6d01e..b2a5fbb1962 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/index.html @@ -30,9 +30,9 @@

All files packages/roosterjs-editor-dom
- 83.9% + 84.39% Branches - 344/410 + 346/410
@@ -214,8 +214,8 @@

All files packages/roosterjs-editor-dom

100% 36/3684.31%43/5188.24%45/51 100% 5/5 100%
import ContentTraverser from '../contentTraverser/ContentTraverser';
 import findClosestElementAncestor from '../utils/findClosestElementAncestor';
@@ -252,7 +252,7 @@ 

All files / packag export default function setListItemStyle( element: HTMLLIElement, styles: string[], - IisCssStyle: boolean = true + isCssStyle: boolean = true ) { const elementsStyles = getInlineChildElementsStyle(element, styles, isCssStyle);   @@ -293,7 +293,7 @@

All files / packag currentNode && currentNode !== element && safeInstanceOf(currentNode, 'HTMLElement') && - (result.length == 0 || (currentNode.textContent?.trim().length || 0) > 0) + (result.length == 0 || (currentNode.textContent?.trim().length || 0) > 0) ) { const element: HTMLElement = currentNode;   @@ -334,7 +334,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/list/setNumberingListMarkers.ts.html b/coverage/packages/roosterjs-editor-dom/lib/list/setNumberingListMarkers.ts.html index 9b368004907..088207e117b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/list/setNumberingListMarkers.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/list/setNumberingListMarkers.ts.html @@ -490,7 +490,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/metadata/definitionCreators.ts.html b/coverage/packages/roosterjs-editor-dom/lib/metadata/definitionCreators.ts.html index fb05efcf10b..46900bda5f0 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/metadata/definitionCreators.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/metadata/definitionCreators.ts.html @@ -424,7 +424,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/metadata/index.html b/coverage/packages/roosterjs-editor-dom/lib/metadata/index.html index eb98ef863f1..23f76d89e25 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/metadata/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/metadata/index.html @@ -125,7 +125,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/metadata/metadata.ts.html b/coverage/packages/roosterjs-editor-dom/lib/metadata/metadata.ts.html index 5d4f48056f3..1399b636d02 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/metadata/metadata.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/metadata/metadata.ts.html @@ -141,18 +141,18 @@

All files / packag       -819x +925x     -819x -819x +925x +925x     -819x -818x -94x -724x -722x +925x +924x +74x +850x +848x       @@ -172,9 +172,9 @@

All files / packag     1x -84x -83x -83x +74x +73x +73x   1x   @@ -185,7 +185,7 @@

All files / packag     1x -59x +49x    

import validate from './validate';
 import { Definition } from 'roosterjs-editor-types';
@@ -259,7 +259,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/metadata/validate.ts.html b/coverage/packages/roosterjs-editor-dom/lib/metadata/validate.ts.html index 70874e5933f..47687a3d2f5 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/metadata/validate.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/metadata/validate.ts.html @@ -135,16 +135,16 @@

All files / packag     1x -3989x -3989x -1416x -2573x +4087x +4087x +1533x +2554x       47x   -2526x +2507x   262x   @@ -152,12 +152,12 @@

All files / packag 262x     -1327x +1314x         -1327x +1314x     227x @@ -166,20 +166,20 @@

All files / packag 227x     -322x +320x       -999x -322x +989x +320x     -380x +376x     -1444x +1434x   -380x +376x     8x @@ -187,7 +187,7 @@

All files / packag       -3942x +4040x       @@ -268,7 +268,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/constants.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/constants.ts.html index 282706e4788..527966ef517 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/constants.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/constants.ts.html @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/documentContainWacElements.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/documentContainWacElements.ts.html index 3fa0026898b..110be050f03 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/documentContainWacElements.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/documentContainWacElements.ts.html @@ -85,8 +85,8 @@

All files / packag     1x -12x -12x +11x +11x   1x  

import type { getSourceFunction, getSourceInputParams } from './getPasteSource';
@@ -112,7 +112,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/getPasteSource.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/getPasteSource.ts.html index 0e3888750b4..2d78fba93cd 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/getPasteSource.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/getPasteSource.ts.html @@ -163,23 +163,23 @@

All files / packag       -57x +48x   -19x -19x +16x +16x             -19x -133x -17x +16x +112x +14x       -19x +16x    

import documentContainWacElements from './documentContainWacElements';
 import isExcelDesktopDocument from './isExcelDesktopDocument';
@@ -250,7 +250,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/index.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/index.html index 86bafba80cc..1f27222d4bb 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/index.html @@ -215,7 +215,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelDesktopDocument.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelDesktopDocument.ts.html index f95c6b1086f..866b807e562 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelDesktopDocument.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelDesktopDocument.ts.html @@ -86,9 +86,9 @@

All files / packag     1x -23x +20x   -23x +20x   1x  

import { EXCEL_DESKTOP_ATTRIBUTE_NAME } from './constants';
@@ -115,7 +115,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelOnlineDocument.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelOnlineDocument.ts.html index 4594f123a15..ebc7eedd238 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelOnlineDocument.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelOnlineDocument.ts.html @@ -91,9 +91,9 @@

All files / packag     1x -17x +16x   -17x +16x       @@ -127,7 +127,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isGoogleSheetDocument.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isGoogleSheetDocument.ts.html index 5a19ebf7a0c..3fe08dbc6c3 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isGoogleSheetDocument.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isGoogleSheetDocument.ts.html @@ -82,8 +82,8 @@

All files / packag     1x -10x -10x +9x +9x     1x @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isPowerPointDesktopDocument.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isPowerPointDesktopDocument.ts.html index 040c640a110..7a203df132b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isPowerPointDesktopDocument.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isPowerPointDesktopDocument.ts.html @@ -84,7 +84,7 @@

All files / packag     1x -13x +12x   1x  

import { PROG_ID_NAME } from './constants';
@@ -109,7 +109,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isWordDesktopDocument.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isWordDesktopDocument.ts.html index a1f97cfef50..88d77d3297a 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isWordDesktopDocument.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/isWordDesktopDocument.ts.html @@ -93,8 +93,8 @@

All files / packag     1x -23x -23x +20x +20x       @@ -130,7 +130,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/shouldConvertToSingleImage.ts.html b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/shouldConvertToSingleImage.ts.html index 8f823963862..e299c13d5c4 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/shouldConvertToSingleImage.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/pasteSourceValidations/shouldConvertToSingleImage.ts.html @@ -86,8 +86,8 @@

All files / packag     1x -20x -10x +18x +9x       @@ -121,7 +121,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/region/collapseNodesInRegion.ts.html b/coverage/packages/roosterjs-editor-dom/lib/region/collapseNodesInRegion.ts.html index 519fd16ba68..69547e333f6 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/region/collapseNodesInRegion.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/region/collapseNodesInRegion.ts.html @@ -111,24 +111,24 @@

All files / packag       -72x -4x +92x +5x     -68x +87x             -141x +179x   -68x -68x +87x +87x   -68x -66x +87x +85x   2x   @@ -178,7 +178,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/region/getRegionsFromRange.ts.html b/coverage/packages/roosterjs-editor-dom/lib/region/getRegionsFromRange.ts.html index 297a93cf37c..53f9bdd6cc8 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/region/getRegionsFromRange.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/region/getRegionsFromRange.ts.html @@ -351,17 +351,17 @@

All files / packag       -142x -142x -139x -139x -139x -139x -139x -139x +162x +162x +159x +159x +159x +159x +159x +159x     -215x +235x       @@ -371,10 +371,10 @@

All files / packag       -175x -175x -175x -309x +195x +195x +195x +329x       @@ -424,9 +424,9 @@

All files / packag       -139x -139x -139x +159x +159x +159x       @@ -436,7 +436,7 @@

All files / packag       -139x +159x       @@ -465,7 +465,7 @@

All files / packag       -139x +159x       @@ -485,15 +485,15 @@

All files / packag       -257x -257x -514x -257x +277x +277x +554x +277x   -257x -196x -196x -196x +277x +216x +216x +216x       @@ -515,7 +515,7 @@

All files / packag       -257x +277x       @@ -536,23 +536,23 @@

All files / packag       -309x +329x     -309x -309x +329x +329x   -309x +329x   -309x +329x   -309x +329x           -309x +329x      

import contains from '../utils/contains';
@@ -811,7 +811,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/region/getSelectedBlockElementsInRegion.ts.html b/coverage/packages/roosterjs-editor-dom/lib/region/getSelectedBlockElementsInRegion.ts.html index 5a0db866719..2d8881f7602 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/region/getSelectedBlockElementsInRegion.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/region/getSelectedBlockElementsInRegion.ts.html @@ -140,50 +140,50 @@

All files / packag       -99x -99x +119x +119x   -99x -178x -89x +119x +218x +109x   -89x -89x +109x +109x       -159x +208x       -89x -159x -159x +109x +208x +208x   -159x -4x -4x +208x +14x +14x   -155x +194x         -99x -1x +119x +2x       -1x +2x   -1x +2x   -1x -1x +2x +2x       -99x +119x    

import ContentTraverser from '../contentTraverser/ContentTraverser';
 import createElement from '../utils/createElement';
@@ -256,7 +256,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/region/getSelectionRangeInRegion.ts.html b/coverage/packages/roosterjs-editor-dom/lib/region/getSelectionRangeInRegion.ts.html index c43b704182c..51c4bd2cc74 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/region/getSelectionRangeInRegion.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/region/getSelectionRangeInRegion.ts.html @@ -118,33 +118,33 @@

All files / packag     1x -126x +146x 1x     -500x -125x +580x +145x     -125x +145x     -125x +145x   -125x +145x 1x -124x -121x -121x -242x +144x +141x +141x +282x   -121x -114x +141x +134x     -114x +134x   -114x +134x       @@ -152,8 +152,8 @@

All files / packag       -125x -125x +145x +145x    

import createRange from '../selection/createRange';
 import Position from '../selection/Position';
@@ -211,7 +211,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/region/index.html b/coverage/packages/roosterjs-editor-dom/lib/region/index.html index d420c2f6893..1da2c325162 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/region/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/region/index.html @@ -170,7 +170,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/region/isNodeInRegion.ts.html b/coverage/packages/roosterjs-editor-dom/lib/region/isNodeInRegion.ts.html index 8da00f79f28..135b02be88f 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/region/isNodeInRegion.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/region/isNodeInRegion.ts.html @@ -84,7 +84,7 @@

All files / packag     1x -472x +561x       @@ -118,7 +118,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/region/mergeBlocksInRegion.ts.html b/coverage/packages/roosterjs-editor-dom/lib/region/mergeBlocksInRegion.ts.html index 5309a90d41d..f9986819e05 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/region/mergeBlocksInRegion.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/region/mergeBlocksInRegion.ts.html @@ -280,7 +280,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/Position.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/Position.ts.html index 93a29958c93..953bcc84d3c 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/Position.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/Position.ts.html @@ -279,42 +279,42 @@

All files / packag       -15811x -15802x +18351x +18342x   -15802x +18342x 7x 7x   -15795x +18335x     -15802x +18342x   -437x -437x -437x -437x +511x +511x +511x +511x     -419x -419x -419x -419x +513x +513x +513x +513x     -905x -905x -905x +1456x +1456x +1456x     -14041x -14041x -14041x -14041x +15862x +15862x +15862x +15862x     -15802x +18342x       @@ -322,16 +322,16 @@

All files / packag     1x -11828x -10707x +13484x +11894x     -1121x -1121x +1590x +1590x     -1121x -1997x +1590x +2972x       @@ -341,15 +341,15 @@

All files / packag       -1997x -1737x -1737x +2972x +2651x +2651x     -260x +321x     -1121x +1590x       @@ -357,7 +357,7 @@

All files / packag     1x -314x +608x       @@ -370,7 +370,7 @@

All files / packag     1x -1284x +2152x       @@ -388,7 +388,7 @@

All files / packag     1x -1514x +1971x       @@ -398,25 +398,25 @@

All files / packag 1x     -916x +1320x       1x     -856x -856x -305x +1024x +1024x +364x   -856x +1024x       -14946x -2998x -11948x -11843x +17318x +4215x +13103x +12998x   105x   @@ -610,7 +610,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/addRangeToSelection.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/addRangeToSelection.ts.html index 732dd139ca2..24f114b8569 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/addRangeToSelection.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/addRangeToSelection.ts.html @@ -23,16 +23,16 @@

All files / packag
- 100% + 92.31% Statements - 13/13 + 12/13
- 90.91% + 75.76% Branches - 30/33 + 25/33
@@ -44,9 +44,9 @@

All files / packag
- 100% + 92.31% Lines - 13/13 + 12/13
@@ -107,17 +107,17 @@

All files / packag     1x -757x -757x -755x +884x +884x +882x   -755x +882x   -750x -750x +878x +878x     -750x +878x       @@ -125,15 +125,15 @@

All files / packag       -1x +    -749x +878x         -755x -754x +882x +882x       @@ -157,22 +157,22 @@

All files / packag let currentRange: Range | null = null; // Do not remove/add range if current selection is the same with target range // Without this check, execCommand() may fail in Edge since we changed the selection - if ( + Iif ( (skipSameRange || Browser.isEdge) && (currentRange = selection.rangeCount == 1 ? selection.getRangeAt(0) : null) && currentRange.startContainer == range.startContainer && - currentRange.startOffset == range.startOffset && - currentRange.endContainer == range.endContainer && - currentRange.endOffset == range.endOffset + currentRange.startOffset == range.startOffset && + currentRange.endContainer == range.endContainer && + currentRange.endOffset == range.endOffset ) { - needAddRange = false; + needAddRange = false; } else { selection.removeAllRanges(); } } catch (e) {} }   - if (needAddRange) { + Eif (needAddRange) { selection.addRange(range); } } @@ -184,7 +184,7 @@

All files / packag

diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/createRange.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/createRange.ts.html index 1078f25b9f2..a3e22cc09bd 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/createRange.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/createRange.ts.html @@ -253,38 +253,38 @@

All files / packag       -1282x -1282x +1490x +1490x   -1282x +1490x   -508x -508x -774x -772x +615x +615x +875x +873x   -159x -159x -613x +158x +158x +715x     -308x -308x -305x +390x +390x +325x   -305x -305x +325x +325x       -1282x -1278x -1278x -1278x -1278x -1278x +1490x +1486x +1486x +1486x +1486x +1486x   -1278x +1486x   4x   @@ -295,39 +295,39 @@

All files / packag       -2556x +2972x           -1790x +2105x       -318x +316x           -318x +316x   -318x -1071x -1071x +316x +1061x +1061x           -753x +745x   -318x +316x       -318x +316x    

import isVoidHtmlElement from '../utils/isVoidHtmlElement';
 import Position from './Position';
@@ -472,7 +472,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/getHtmlWithSelectionPath.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/getHtmlWithSelectionPath.ts.html index 485958765b7..dd8a32b7ca5 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/getHtmlWithSelectionPath.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/getHtmlWithSelectionPath.ts.html @@ -133,7 +133,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/getPositionRect.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/getPositionRect.ts.html index 73e6ecea676..d94405b4306 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/getPositionRect.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/getPositionRect.ts.html @@ -238,7 +238,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/getSelectionPath.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/getSelectionPath.ts.html index 88be192451a..e1212bd98ba 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/getSelectionPath.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/getSelectionPath.ts.html @@ -158,16 +158,16 @@

All files / packag       -4978x -4677x +5289x +4864x     -301x +425x         -301x +425x       @@ -183,55 +183,55 @@

All files / packag       -602x +850x       -602x -602x -602x +850x +850x +850x     -602x +850x 2x     -600x -317x -317x -47x -47x +848x +396x +396x +48x +48x   -317x +396x   -283x -283x +452x +452x     -600x -1545x -1545x +848x +2075x +2075x   -1545x -518x -143x +2075x +817x +203x 45x     -98x +158x   -375x +614x     -473x +772x     -1545x -1545x -1545x +2075x +2075x +2075x     -600x +848x    

import contains from '../utils/contains';
 import Position from './Position';
@@ -328,7 +328,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/index.html b/coverage/packages/roosterjs-editor-dom/lib/selection/index.html index 54744d06c5a..ed7d930b59d 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/index.html @@ -23,16 +23,16 @@

All files packages/roosterjs-editor-dom
- 87.93% + 87.5% Statements - 204/232 + 203/232
- 82.42% + 80.59% Branches - 225/273 + 220/273
@@ -44,9 +44,9 @@

All files packages/roosterjs-editor-dom
- 87.83% + 87.39% Lines - 202/230 + 201/230
@@ -89,17 +89,17 @@

All files packages/roosterjs-editor-dom

addRangeToSelection.ts -
+
+
100%13/1390.91%30/3392.31%12/1375.76%25/33 100% 1/1100%13/1392.31%12/13
import contains from '../utils/contains';
 import getTagOfNode from '../utils/getTagOfNode';
@@ -178,7 +178,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/selection/setHtmlWithSelectionPath.ts.html b/coverage/packages/roosterjs-editor-dom/lib/selection/setHtmlWithSelectionPath.ts.html index cfca60ab9ae..649da07e99f 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/selection/setHtmlWithSelectionPath.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/selection/setHtmlWithSelectionPath.ts.html @@ -275,27 +275,27 @@

All files / packag     1x -466x +542x   -466x -171x -171x +542x +170x +170x   -164x +163x         -149x -149x -149x +148x +148x +148x   -149x +148x         -317x +394x    

import createRange from './createRange';
 import safeInstanceOf from '../utils/safeInstanceOf';
@@ -424,7 +424,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/snapshots/addSnapshot.ts.html b/coverage/packages/roosterjs-editor-dom/lib/snapshots/addSnapshot.ts.html index 4976b1da07d..fdf8ddbc881 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/snapshots/addSnapshot.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/snapshots/addSnapshot.ts.html @@ -196,20 +196,20 @@

All files / packag       -5028x -5028x +5315x +5315x   -5028x -5028x +5315x +5315x   -5028x -4978x -4978x -4978x -4978x +5315x +5279x +5279x +5279x +5279x   -4978x -4978x +5279x +5279x       @@ -217,18 +217,18 @@

All files / packag 3x     -4978x +5279x 3x 3x 3x     -4978x +5279x 24x   -50x +36x   -50x +36x       @@ -243,17 +243,17 @@

All files / packag       -5004x +5291x       -4956x +5257x           -368x +468x       @@ -367,7 +367,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/snapshots/canMoveCurrentSnapshot.ts.html b/coverage/packages/roosterjs-editor-dom/lib/snapshots/canMoveCurrentSnapshot.ts.html index 46fdbc002db..c6ee95b33d0 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/snapshots/canMoveCurrentSnapshot.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/snapshots/canMoveCurrentSnapshot.ts.html @@ -84,8 +84,8 @@

All files / packag       -14842x -14842x +15693x +15693x    

import { Snapshots } from 'roosterjs-editor-types';
  
@@ -109,7 +109,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/snapshots/canUndoAutoComplete.ts.html b/coverage/packages/roosterjs-editor-dom/lib/snapshots/canUndoAutoComplete.ts.html index 54e88041aec..668f6f5edfc 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/snapshots/canUndoAutoComplete.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/snapshots/canUndoAutoComplete.ts.html @@ -74,7 +74,7 @@

All files / packag     1x -14x +11x       @@ -97,7 +97,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/snapshots/clearProceedingSnapshots.ts.html b/coverage/packages/roosterjs-editor-dom/lib/snapshots/clearProceedingSnapshots.ts.html index fb0bc72a8d3..5736a2552ab 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/snapshots/clearProceedingSnapshots.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/snapshots/clearProceedingSnapshots.ts.html @@ -128,8 +128,8 @@

All files / packag       -5507x -5507x +5984x +5984x 5x 5x 5x @@ -145,7 +145,7 @@

All files / packag     1x -523x +699x    

import canMoveCurrentSnapshot from './canMoveCurrentSnapshot';
 import { Snapshot, Snapshots } from 'roosterjs-editor-types';
@@ -199,7 +199,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/snapshots/createSnapshots.ts.html b/coverage/packages/roosterjs-editor-dom/lib/snapshots/createSnapshots.ts.html index 753b9d8baf9..ac10d8d1f73 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/snapshots/createSnapshots.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/snapshots/createSnapshots.ts.html @@ -79,7 +79,7 @@

All files / packag     1x -4850x +5043x       @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/snapshots/index.html b/coverage/packages/roosterjs-editor-dom/lib/snapshots/index.html index 37ebf74513b..5a5f9d030f9 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/snapshots/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/snapshots/index.html @@ -170,7 +170,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/snapshots/moveCurrentSnapshot.ts.html b/coverage/packages/roosterjs-editor-dom/lib/snapshots/moveCurrentSnapshot.ts.html index 7682a53308d..17fed43e794 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/snapshots/moveCurrentSnapshot.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/snapshots/moveCurrentSnapshot.ts.html @@ -145,7 +145,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/style/getStyles.ts.html b/coverage/packages/roosterjs-editor-dom/lib/style/getStyles.ts.html index 5f230b3fa4c..04fe19ba5f5 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/style/getStyles.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/style/getStyles.ts.html @@ -79,17 +79,17 @@

All files / packag     1x -1456x -1456x -1456x -2090x -2090x -2090x -2090x -849x +1445x +1445x +1445x +2045x +2045x +2045x +2045x +811x     -1456x +1445x    

/**
  * Get CSS styles of a given element in name-value pair format
@@ -115,7 +115,7 @@ 

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/style/index.html b/coverage/packages/roosterjs-editor-dom/lib/style/index.html index 3f26a962225..7f2a7c5c487 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/style/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/style/index.html @@ -155,7 +155,7 @@

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/style/removeGlobalCssStyle.ts.html b/coverage/packages/roosterjs-editor-dom/lib/style/removeGlobalCssStyle.ts.html index f63c467f2b7..73d269cc91a 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/style/removeGlobalCssStyle.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/style/removeGlobalCssStyle.ts.html @@ -76,8 +76,8 @@

All files / packag     1x -10475x -10475x +11023x +11023x 124x     @@ -100,7 +100,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/style/removeImportantStyleRule.ts.html b/coverage/packages/roosterjs-editor-dom/lib/style/removeImportantStyleRule.ts.html index 0df096d6c75..380317f56d7 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/style/removeImportantStyleRule.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/style/removeImportantStyleRule.ts.html @@ -133,7 +133,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/style/setGlobalCssStyles.ts.html b/coverage/packages/roosterjs-editor-dom/lib/style/setGlobalCssStyles.ts.html index 45b1b63dd14..371d525b38b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/style/setGlobalCssStyles.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/style/setGlobalCssStyles.ts.html @@ -118,7 +118,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/style/setStyles.ts.html b/coverage/packages/roosterjs-editor-dom/lib/style/setStyles.ts.html index cdb8e693e14..da5cc7b9ad3 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/style/setStyles.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/style/setStyles.ts.html @@ -90,20 +90,20 @@

All files / packag     1x -543x -542x +534x +533x   -344x -344x -344x -344x +322x +322x +322x +322x   -344x +322x   -542x -104x +533x +98x   -438x +435x       @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/VTable.ts.html b/coverage/packages/roosterjs-editor-dom/lib/table/VTable.ts.html index a3130f14bc7..412d9e1a23f 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/VTable.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/VTable.ts.html @@ -23,30 +23,30 @@

All files / packag -
+

-	
-	
+	
-	
-	
-	
-	
-	
-	
-	
-	
+	
+	
+	
+	
+	
+	
+	
+	
@@ -185,7 +185,7 @@ 

All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/isWholeTableSelected.ts.html b/coverage/packages/roosterjs-editor-dom/lib/table/isWholeTableSelected.ts.html index c5cb0c725ef..12d3a9eb83a 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/isWholeTableSelected.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/isWholeTableSelected.ts.html @@ -142,7 +142,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/pasteTable.ts.html b/coverage/packages/roosterjs-editor-dom/lib/table/pasteTable.ts.html index 2502b5660dc..fe8c8afb41e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/pasteTable.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/pasteTable.ts.html @@ -250,7 +250,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/tableCellInfo.ts.html b/coverage/packages/roosterjs-editor-dom/lib/table/tableCellInfo.ts.html index fdbd3f02f30..f7ebce044de 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/tableCellInfo.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/tableCellInfo.ts.html @@ -175,7 +175,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/tableFormatInfo.ts.html b/coverage/packages/roosterjs-editor-dom/lib/table/tableFormatInfo.ts.html index 86dd50859f2..3ca8e85ea95 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/tableFormatInfo.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/tableFormatInfo.ts.html @@ -165,7 +165,7 @@

All files / packag     1x -495x +621x       @@ -247,7 +247,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/Browser.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/Browser.ts.html index c507d8ebd0a..7dfe60e6133 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/Browser.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/Browser.ts.html @@ -204,7 +204,7 @@

All files / packag 5x 5x   -4x +3x       @@ -349,7 +349,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/applyFormat.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/applyFormat.ts.html index caed32385b9..d9ad746dcf7 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/applyFormat.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/applyFormat.ts.html @@ -161,8 +161,8 @@

All files / packag       -4627x -4627x +4814x +4814x       @@ -173,17 +173,17 @@

All files / packag       -41643x +43326x   -4627x -4584x +4814x +4765x   -4627x -4590x +4814x +4771x     -4627x -4583x +4814x +4764x       @@ -191,7 +191,7 @@

All files / packag       -44x +50x       @@ -202,7 +202,7 @@

All files / packag       -4627x +4814x 1x     @@ -211,7 +211,7 @@

All files / packag       -4626x +4813x       @@ -222,13 +222,13 @@

All files / packag       -4627x -1x +4814x +6x   -4627x +4814x 1x   -4627x +4814x 1x     @@ -328,7 +328,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/changeElementTag.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/changeElementTag.ts.html index 419013a0a59..f16d0d01a9c 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/changeElementTag.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/changeElementTag.ts.html @@ -138,38 +138,38 @@

All files / packag     1x -114x +115x       -114x +115x   -114x +115x   55x     -59x +60x   -59x -28x -28x +60x +29x +29x     -59x +60x   -59x +60x 4x           -59x -59x +60x +60x     -59x +60x    

- - + + @@ -200,7 +200,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/tryToConvertGifToPng.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/tryToConvertGifToPng.ts.html index cab240fbcea..4ed21c59814 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/tryToConvertGifToPng.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/tryToConvertGifToPng.ts.html @@ -169,7 +169,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Cropper.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Cropper.ts.html index 73b71d8483e..96839ebe271 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Cropper.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Cropper.ts.html @@ -511,7 +511,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Resizer.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Resizer.ts.html index 9fb902cb398..7b182c77e91 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Resizer.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Resizer.ts.html @@ -802,7 +802,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Rotator.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Rotator.ts.html index 733de5577e1..36edf01116e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Rotator.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Rotator.ts.html @@ -23,16 +23,16 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/index.html index 32e9e9c9f70..140f0ed50c1 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/index.html @@ -23,16 +23,16 @@

All files packages/roosterjs-edit
- 83.33% + 83.84% Statements - 165/198 + 166/198
- 75.41% + 76.23% Branches - 92/122 + 93/122
@@ -44,9 +44,9 @@

All files packages/roosterjs-edit
- 83.78% + 84.32% Lines - 155/185 + 156/185
@@ -104,17 +104,17 @@

All files packages/roosterjs-edit

- - - - - + + + + - - + + @@ -125,7 +125,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.html index a34bc39f2b1..78e1e3c1c32 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.html @@ -23,9 +23,9 @@

All files packages/roosterjs-editor-
- 90.14% + 89.44% Statements - 256/284 + 254/284
@@ -37,16 +37,16 @@

All files packages/roosterjs-editor-
- 81.82% + 77.27% Functions - 36/44 + 34/44
- 89.67% + 88.93% Lines - 243/271 + 241/271
@@ -74,17 +74,17 @@

All files packages/roosterjs-editor-

- - - + + - - - - + + + + @@ -110,7 +110,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.ts.html index 9c347f5ce80..395ad925876 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.ts.html @@ -85,7 +85,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/ImageResize.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/ImageResize.ts.html index 89d9c47f5f1..b4f0a8cc062 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/ImageResize.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/ImageResize.ts.html @@ -202,7 +202,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.html index a91f48338a2..0455cb3a2e9 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.ts.html index cc49c581949..106a33a81c7 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.ts.html @@ -67,7 +67,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/Paste.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/Paste.ts.html index e65a01520e2..5632337b14e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/Paste.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/Paste.ts.html @@ -237,15 +237,15 @@

All files / pac     1x -61x -28x -14x +57x +26x +13x   -14x +13x     -2x -2x +1x +1x     5x @@ -273,11 +273,11 @@

All files / pac 1x 1x   -14x -14x +13x +13x     -14x +13x     1x @@ -400,7 +400,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/convertPastedContentForLI.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/convertPastedContentForLI.ts.html index f257e4383e6..10feed4a93c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/convertPastedContentForLI.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/convertPastedContentForLI.ts.html @@ -205,7 +205,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/index.html index f2bc3777cb0..f5b38617416 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/convertPastedContentFromExcel.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/convertPastedContentFromExcel.ts.html index c6b0c779f6a..d2decdcaf0f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/convertPastedContentFromExcel.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/convertPastedContentFromExcel.ts.html @@ -268,7 +268,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/index.html index 57ac2951d2e..88cd49fc3d0 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/convertPasteContentForSingleImage.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/convertPasteContentForSingleImage.ts.html index d13c4f5054b..595629d4c55 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/convertPasteContentForSingleImage.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/convertPasteContentForSingleImage.ts.html @@ -127,7 +127,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/index.html index be76cfa0f71..fa294d99c1f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.html index b29a2a84079..4f834e32d02 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.ts.html index bf51c4002e2..f568c5abd4c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/index.ts.html @@ -67,7 +67,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/handleLineMerge.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/handleLineMerge.ts.html index ce09f02223f..386e1fefb28 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/handleLineMerge.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/handleLineMerge.ts.html @@ -367,7 +367,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/index.html index 44a71b63c66..cee3c4baf64 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/ListItemBlock.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/ListItemBlock.ts.html index 82fc2d183e6..dd2ead2982f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/ListItemBlock.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/ListItemBlock.ts.html @@ -178,7 +178,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromOfficeOnline.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromOfficeOnline.ts.html index 1103733f7a3..ea8c696fa21 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromOfficeOnline.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromOfficeOnline.ts.html @@ -223,7 +223,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromWordOnline.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromWordOnline.ts.html index 041b572e4b7..1c2a272fa0f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromWordOnline.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromWordOnline.ts.html @@ -1180,7 +1180,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/index.html index ef3fa09c38f..d9f7e9d843d 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/index.html @@ -125,7 +125,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/convertPastedContentFromPowerPoint.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/convertPastedContentFromPowerPoint.ts.html index d38ff7dad5d..250e0dfc8f8 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/convertPastedContentFromPowerPoint.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/convertPastedContentFromPowerPoint.ts.html @@ -139,7 +139,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/index.html index 8348dfd0a68..e4a685bbea1 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/deprecatedColorList.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/deprecatedColorList.ts.html index e1263f83490..c82eaa1a683 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/deprecatedColorList.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/deprecatedColorList.ts.html @@ -154,7 +154,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/index.html index dfd84af2b38..33a052ca69e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent.ts.html index 9647ba65088..f248a4a5ba4 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent.ts.html @@ -89,8 +89,8 @@

All files / 1x     -11x -22x +10x +20x     19x @@ -124,7 +124,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/index.html index 5685b1f4d90..9e5ffda3803 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts.html index ddc28ca439c..c413cffd72a 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts.html @@ -101,7 +101,7 @@

All files /     1x -20x +19x     6x @@ -163,7 +163,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/LevelLists.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/LevelLists.ts.html index 8e163a09e84..8fe1cf02392 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/LevelLists.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/LevelLists.ts.html @@ -106,7 +106,7 @@

All files /     1x -15x +14x       @@ -145,7 +145,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordConverterArguments.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordConverterArguments.ts.html index b7f178e4382..57e31cc6dea 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordConverterArguments.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordConverterArguments.ts.html @@ -160,7 +160,7 @@

All files / 1x     -12x +11x       @@ -232,7 +232,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordCustomData.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordCustomData.ts.html index 9f9ee6d8311..551102e55dd 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordCustomData.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordCustomData.ts.html @@ -153,7 +153,7 @@

All files /     1x -23x +22x       @@ -286,7 +286,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/commentsRemoval.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/commentsRemoval.ts.html index fe774ee10ea..456c99003ae 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/commentsRemoval.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/commentsRemoval.ts.html @@ -194,7 +194,7 @@

All files /       -20x +19x 6x 6x 1x @@ -209,7 +209,7 @@

All files /       -20x +19x 3x     @@ -231,7 +231,7 @@

All files /       -20x +19x 3x 3x 1x @@ -243,13 +243,13 @@

All files /       -20x +19x           -100x +95x    

- - - + + - - - - + + + + @@ -185,7 +185,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/wordConverter.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/wordConverter.ts.html index a0c4208c4f8..b1a3b3c37a2 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/wordConverter.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/wordConverter.ts.html @@ -123,7 +123,7 @@

All files /     1x -20x +19x       @@ -175,7 +175,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/PickerPlugin.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/PickerPlugin.ts.html index bb962d9325b..cbb9f047acb 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/PickerPlugin.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/PickerPlugin.ts.html @@ -1894,7 +1894,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.html index ed780e7460f..75f267f2b12 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.ts.html index 81048c1df0a..060b2fd0239 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Picker/index.ts.html @@ -67,7 +67,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/TableCellSelection.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/TableCellSelection.ts.html index 545519ed372..656295d06cd 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/TableCellSelection.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/TableCellSelection.ts.html @@ -454,7 +454,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/constants.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/constants.ts.html index ea7c72a168f..20128cb0ab7 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/constants.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/constants.ts.html @@ -79,7 +79,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/DeleteTableContents.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/DeleteTableContents.ts.html index 2a6debe2913..8a516090ab2 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/DeleteTableContents.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/DeleteTableContents.ts.html @@ -202,7 +202,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/index.html index 3651b65968c..1840f8d05f6 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.html index 824d7c0c614..58941fb7753 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.html @@ -125,7 +125,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.ts.html index d9247a5ad8f..872827b4ed4 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.ts.html @@ -67,7 +67,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyDownEvent.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyDownEvent.ts.html index e2a3af755b1..818e2df1492 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyDownEvent.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyDownEvent.ts.html @@ -736,7 +736,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyUpEvent.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyUpEvent.ts.html index 177e31b7343..5b4ff29539f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyUpEvent.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyUpEvent.ts.html @@ -160,7 +160,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/index.html index 8e6fe824f3d..fa0510c3e88 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleMouseDownEvent.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleMouseDownEvent.ts.html index ec66b7d3e94..6a47219f219 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleMouseDownEvent.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleMouseDownEvent.ts.html @@ -823,7 +823,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleScrollEvent.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleScrollEvent.ts.html index b4869c8ad1d..48bd0780b7c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleScrollEvent.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleScrollEvent.ts.html @@ -172,7 +172,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/index.html index 5355b00ec01..7b68d7f4b3f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/clearState.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/clearState.ts.html index bde8dcbb013..d7eddff3523 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/clearState.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/clearState.ts.html @@ -121,7 +121,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellAtCursor.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellAtCursor.ts.html index acdc7d05a61..51e7bde78bf 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellAtCursor.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellAtCursor.ts.html @@ -112,7 +112,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellCoordinates.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellCoordinates.ts.html index e40e563c493..ec0e197eb8c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellCoordinates.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellCoordinates.ts.html @@ -142,7 +142,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getTableAtCursor.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getTableAtCursor.ts.html index 4dfaeb1ddad..d21498d43ca 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getTableAtCursor.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getTableAtCursor.ts.html @@ -109,7 +109,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/index.html index 019878c53c4..a836a889aa6 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/index.html @@ -245,7 +245,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/isAfter.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/isAfter.ts.html index 8509d5acc01..c8682339fd3 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/isAfter.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/isAfter.ts.html @@ -130,7 +130,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/normalizeTableSelection.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/normalizeTableSelection.ts.html index aa6eed22457..183b21c4011 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/normalizeTableSelection.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/normalizeTableSelection.ts.html @@ -214,7 +214,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/prepareSelection.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/prepareSelection.ts.html index 0fefb3fd820..0b73a2d9d63 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/prepareSelection.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/prepareSelection.ts.html @@ -271,7 +271,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/restoreSelection.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/restoreSelection.ts.html index 492a818f882..6b37ec67b00 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/restoreSelection.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/restoreSelection.ts.html @@ -178,7 +178,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/selectTable.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/selectTable.ts.html index b1e26fa944c..fcfa0cf60c4 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/selectTable.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/selectTable.ts.html @@ -100,7 +100,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/setData.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/setData.ts.html index d65c2273726..d3605b9b36c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/setData.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/setData.ts.html @@ -142,7 +142,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/updateSelection.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/updateSelection.ts.html index eb595129968..e7183bf65b7 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/updateSelection.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/updateSelection.ts.html @@ -130,7 +130,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/TableResize.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/TableResize.ts.html index e20c174fd18..85b64c21f8f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/TableResize.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/TableResize.ts.html @@ -583,7 +583,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/CellResizer.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/CellResizer.ts.html index f273853e4f1..8a8a89213df 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/CellResizer.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/CellResizer.ts.html @@ -787,7 +787,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditor.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditor.ts.html index a0c388b8e9e..9265fe9f31d 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditor.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditor.ts.html @@ -1303,7 +1303,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditorFeature.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditorFeature.ts.html index 878bcb0e8e6..49d97d52e92 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditorFeature.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditorFeature.ts.html @@ -130,7 +130,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableInserter.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableInserter.ts.html index 05bd35216dc..22e44da9d9a 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableInserter.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableInserter.ts.html @@ -505,7 +505,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableResizer.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableResizer.ts.html index de0bb84b3ce..fe101c4923e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableResizer.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableResizer.ts.html @@ -514,7 +514,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableSelector.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableSelector.ts.html index c71b8fd0c32..fff347465ed 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableSelector.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableSelector.ts.html @@ -460,7 +460,7 @@

All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/index.html index 7395904e101..760802901d4 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/index.html @@ -170,7 +170,7 @@

All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.html index 2367a7a167e..d29a1c01e60 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.ts.html index aabbb9387ef..b2c3d4f8ea1 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.ts.html @@ -67,7 +67,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/Watermark.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/Watermark.ts.html index 72b83cc873f..ac571a3071a 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/Watermark.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/Watermark.ts.html @@ -484,7 +484,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.html index 2e1bea93836..00f56b1e12b 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.ts.html index 8d500d1f7bd..2afc6a23028 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.ts.html @@ -67,7 +67,7 @@

All files / pac diff --git a/coverage/packages/roosterjs-editor-types-compatible/lib/index.html b/coverage/packages/roosterjs-editor-types-compatible/lib/index.html index f1ded7a7ad8..ff2db7f13e3 100644 --- a/coverage/packages/roosterjs-editor-types-compatible/lib/index.html +++ b/coverage/packages/roosterjs-editor-types-compatible/lib/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-types- diff --git a/coverage/packages/roosterjs-editor-types-compatible/lib/index.ts.html b/coverage/packages/roosterjs-editor-types-compatible/lib/index.ts.html index 38a1198e100..f2b95413326 100644 --- a/coverage/packages/roosterjs-editor-types-compatible/lib/index.ts.html +++ b/coverage/packages/roosterjs-editor-types-compatible/lib/index.ts.html @@ -67,7 +67,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs-editor-types/lib/browser/index.html b/coverage/packages/roosterjs-editor-types/lib/browser/index.html index c89212dd7f9..6d3401d77e4 100644 --- a/coverage/packages/roosterjs-editor-types/lib/browser/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/browser/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-typ diff --git a/coverage/packages/roosterjs-editor-types/lib/browser/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/browser/index.ts.html index 82cb9603cdc..4eddb63ad13 100644 --- a/coverage/packages/roosterjs-editor-types/lib/browser/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/browser/index.ts.html @@ -70,7 +70,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Alignment.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Alignment.ts.html index 9fd302a4a81..7e91b95e099 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Alignment.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Alignment.ts.html @@ -124,7 +124,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/BulletListType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/BulletListType.ts.html index 96c6472f047..3354f72c2db 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/BulletListType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/BulletListType.ts.html @@ -244,7 +244,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Capitalization.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Capitalization.ts.html index 03b762ba4ac..6fb5e398701 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Capitalization.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Capitalization.ts.html @@ -145,7 +145,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ChangeSource.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ChangeSource.ts.html index b285c179c97..90eadd9d18e 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ChangeSource.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ChangeSource.ts.html @@ -280,7 +280,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ClearFormatMode.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ClearFormatMode.ts.html index d860170fe2a..ededd7e9eee 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ClearFormatMode.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ClearFormatMode.ts.html @@ -124,7 +124,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ColorTransformDirection.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ColorTransformDirection.ts.html index 09069f84243..6f8fd2fb178 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ColorTransformDirection.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ColorTransformDirection.ts.html @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentPosition.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentPosition.ts.html index 1918debbad8..964204b56cd 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentPosition.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentPosition.ts.html @@ -175,7 +175,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentType.ts.html index 04b990fa264..716b25ae5ce 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ContentType.ts.html @@ -160,7 +160,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DarkModeDatasetNames.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DarkModeDatasetNames.ts.html index f252abb38ef..2ce416113be 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DarkModeDatasetNames.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DarkModeDatasetNames.ts.html @@ -142,7 +142,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DefinitionType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DefinitionType.ts.html index 6b80a0c29a3..8fc2f0729d6 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DefinitionType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DefinitionType.ts.html @@ -169,7 +169,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DelimiterClasses.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DelimiterClasses.ts.html index 62bc0dd4fc3..fabec2d590b 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DelimiterClasses.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DelimiterClasses.ts.html @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Direction.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Direction.ts.html index e5ba63c59b5..6418a66cb58 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Direction.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Direction.ts.html @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentCommand.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentCommand.ts.html index 164ad0e85de..789eee43cb4 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentCommand.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentCommand.ts.html @@ -850,7 +850,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentPosition.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentPosition.ts.html index d6383979cbe..f1ce3ca0228 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentPosition.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/DocumentPosition.ts.html @@ -172,7 +172,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityClasses.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityClasses.ts.html index adca6ffcc35..ea72f94f2fc 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityClasses.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityClasses.ts.html @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityOperation.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityOperation.ts.html index 8add83a2bb6..d4317e7e201 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityOperation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/EntityOperation.ts.html @@ -295,7 +295,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ExperimentalFeatures.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ExperimentalFeatures.ts.html index 9681fbd55ed..8ab9ad89356 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ExperimentalFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ExperimentalFeatures.ts.html @@ -595,7 +595,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/FontSizeChange.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/FontSizeChange.ts.html index 7fcb3f4d23b..51497938ffb 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/FontSizeChange.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/FontSizeChange.ts.html @@ -112,7 +112,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/GetContentMode.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/GetContentMode.ts.html index 9c8c13bd145..8351025c6fe 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/GetContentMode.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/GetContentMode.ts.html @@ -175,7 +175,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ImageEditOperation.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ImageEditOperation.ts.html index 25f1c70af17..15d56468985 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ImageEditOperation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ImageEditOperation.ts.html @@ -199,7 +199,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Indentation.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Indentation.ts.html index 00886ecda3f..06f317d192e 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Indentation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Indentation.ts.html @@ -112,7 +112,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Keys.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Keys.ts.html index b8608afcb9e..fddd4b85ab7 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Keys.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/Keys.ts.html @@ -226,7 +226,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownCreateElementDataIndex.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownCreateElementDataIndex.ts.html index 76417165545..1d1199f7f00 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownCreateElementDataIndex.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownCreateElementDataIndex.ts.html @@ -274,7 +274,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownPasteSourceType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownPasteSourceType.ts.html index f44de3e26df..01b8fe0c2de 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownPasteSourceType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/KnownPasteSourceType.ts.html @@ -106,7 +106,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ListType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ListType.ts.html index 4be884991f2..fe2a26651b7 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ListType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/ListType.ts.html @@ -133,7 +133,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NodeType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NodeType.ts.html index 4b6472179b2..2d61e01e733 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NodeType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NodeType.ts.html @@ -205,7 +205,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NumberingListType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NumberingListType.ts.html index 65ae9ebdc49..c4512dafb72 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NumberingListType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/NumberingListType.ts.html @@ -409,7 +409,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PasteType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PasteType.ts.html index 1ebcf896eb2..185de00cad2 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PasteType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PasteType.ts.html @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PluginEventType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PluginEventType.ts.html index f7be956471c..52b55d05140 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PluginEventType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PluginEventType.ts.html @@ -460,7 +460,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PositionType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PositionType.ts.html index 37a022efc30..73dde916bfc 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PositionType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/PositionType.ts.html @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/QueryScope.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/QueryScope.ts.html index 5f2a5f15e77..2fd45402019 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/QueryScope.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/QueryScope.ts.html @@ -127,7 +127,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/RegionType.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/RegionType.ts.html index 26925b5e5af..a65efa5e16c 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/RegionType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/RegionType.ts.html @@ -94,7 +94,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/SelectionRangeTypes.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/SelectionRangeTypes.ts.html index 3eeb5382b58..13c40e9b064 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/SelectionRangeTypes.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/SelectionRangeTypes.ts.html @@ -118,7 +118,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableBorderFormat.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableBorderFormat.ts.html index 064e5cbeaa5..8956339775f 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableBorderFormat.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableBorderFormat.ts.html @@ -310,7 +310,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableOperation.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableOperation.ts.html index c9eebed3761..327b8370cd7 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableOperation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/TableOperation.ts.html @@ -424,7 +424,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.html index 2ad8d89bafb..85af1ebaae5 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.html @@ -620,7 +620,7 @@

All files packages/roosterjs-editor-typ diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.ts.html index a9cd97ba399..420b06b5b6f 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleEnum/index.ts.html @@ -169,7 +169,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/compatibleTypes.ts.html b/coverage/packages/roosterjs-editor-types/lib/compatibleTypes.ts.html index cab63e9d7bb..746a058f3a6 100644 --- a/coverage/packages/roosterjs-editor-types/lib/compatibleTypes.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/compatibleTypes.ts.html @@ -82,7 +82,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.html b/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.html index 66db1ac4d3e..2f9e8a1bc1e 100644 --- a/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-typ diff --git a/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.ts.html index b2879dbc187..d4005739701 100644 --- a/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/corePluginState/index.ts.html @@ -85,7 +85,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/Alignment.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/Alignment.ts.html index 9a0fd17792e..965f693d441 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/Alignment.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/Alignment.ts.html @@ -121,7 +121,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/BulletListType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/BulletListType.ts.html index 8fd515c4ac3..713a486df28 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/BulletListType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/BulletListType.ts.html @@ -241,7 +241,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/Capitalization.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/Capitalization.ts.html index 72553bf35b2..30d0dc63f54 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/Capitalization.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/Capitalization.ts.html @@ -142,7 +142,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ChangeSource.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ChangeSource.ts.html index 0249f2a67ca..f6141d80fb2 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ChangeSource.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ChangeSource.ts.html @@ -277,7 +277,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ClearFormatMode.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ClearFormatMode.ts.html index 78555645ca1..e7f08721642 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ClearFormatMode.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ClearFormatMode.ts.html @@ -121,7 +121,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ColorTransformDirection.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ColorTransformDirection.ts.html index 7744e3e97de..fe5955bff90 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ColorTransformDirection.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ColorTransformDirection.ts.html @@ -106,7 +106,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ContentPosition.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ContentPosition.ts.html index 91e4941ad46..3351d165853 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ContentPosition.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ContentPosition.ts.html @@ -172,7 +172,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ContentType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ContentType.ts.html index ff1ad6457a4..2ea384b68d1 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ContentType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ContentType.ts.html @@ -151,7 +151,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/DarkModeDatasetNames.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/DarkModeDatasetNames.ts.html index 77795c9fe17..adbe4c2dc57 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/DarkModeDatasetNames.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/DarkModeDatasetNames.ts.html @@ -139,7 +139,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/DefinitionType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/DefinitionType.ts.html index 9eb2d0fcacc..abed4c59996 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/DefinitionType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/DefinitionType.ts.html @@ -166,7 +166,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/DelimiterClasses.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/DelimiterClasses.ts.html index 0fa64715d20..9aa3075a5df 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/DelimiterClasses.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/DelimiterClasses.ts.html @@ -106,7 +106,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/Direction.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/Direction.ts.html index c912866098c..c14d5f384e3 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/Direction.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/Direction.ts.html @@ -106,7 +106,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/DocumentCommand.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/DocumentCommand.ts.html index 77364f26ea4..b706a57ae12 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/DocumentCommand.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/DocumentCommand.ts.html @@ -847,7 +847,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/DocumentPosition.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/DocumentPosition.ts.html index b67c655e443..f5391406d60 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/DocumentPosition.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/DocumentPosition.ts.html @@ -169,7 +169,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/EntityClasses.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/EntityClasses.ts.html index a12c3aad66b..bea731a0081 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/EntityClasses.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/EntityClasses.ts.html @@ -136,7 +136,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/EntityOperation.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/EntityOperation.ts.html index 12bfc64c98e..502376e2bb9 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/EntityOperation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/EntityOperation.ts.html @@ -292,7 +292,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ExperimentalFeatures.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ExperimentalFeatures.ts.html index f0eb9fa55fb..f0aba3759e0 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ExperimentalFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ExperimentalFeatures.ts.html @@ -592,7 +592,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/FontSizeChange.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/FontSizeChange.ts.html index 8d409c7abbe..a30e47c1968 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/FontSizeChange.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/FontSizeChange.ts.html @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/GetContentMode.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/GetContentMode.ts.html index 8bc29f2c526..b2d38d3062e 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/GetContentMode.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/GetContentMode.ts.html @@ -172,7 +172,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ImageEditOperation.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ImageEditOperation.ts.html index f562da53808..fca8c03097c 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ImageEditOperation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ImageEditOperation.ts.html @@ -196,7 +196,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/Indentation.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/Indentation.ts.html index 458c5f0dffd..61bf71ec89f 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/Indentation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/Indentation.ts.html @@ -109,7 +109,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/Keys.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/Keys.ts.html index 645e277e52e..c3f93435c30 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/Keys.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/Keys.ts.html @@ -223,7 +223,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/KnownCreateElementDataIndex.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/KnownCreateElementDataIndex.ts.html index 2cd455db748..598c5727977 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/KnownCreateElementDataIndex.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/KnownCreateElementDataIndex.ts.html @@ -271,7 +271,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/KnownPasteSourceType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/KnownPasteSourceType.ts.html index b4ee2f55246..4576338a59d 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/KnownPasteSourceType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/KnownPasteSourceType.ts.html @@ -103,7 +103,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/ListType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/ListType.ts.html index 4430aa31d6c..48efce337ff 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/ListType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/ListType.ts.html @@ -130,7 +130,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/NodeType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/NodeType.ts.html index 25d9882d530..b7863206b68 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/NodeType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/NodeType.ts.html @@ -202,7 +202,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/NumberingListType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/NumberingListType.ts.html index eb1b0408248..61c895367dc 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/NumberingListType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/NumberingListType.ts.html @@ -406,7 +406,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/PasteType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/PasteType.ts.html index 58ebcb504c0..de001261569 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/PasteType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/PasteType.ts.html @@ -136,7 +136,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/PluginEventType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/PluginEventType.ts.html index 227ccd4e558..b21ea792445 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/PluginEventType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/PluginEventType.ts.html @@ -457,7 +457,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/PositionType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/PositionType.ts.html index e1a1f2f2d73..11ce02204ff 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/PositionType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/PositionType.ts.html @@ -136,7 +136,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/QueryScope.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/QueryScope.ts.html index 3e410611c4b..e7ce4753c86 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/QueryScope.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/QueryScope.ts.html @@ -124,7 +124,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/RegionType.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/RegionType.ts.html index f92fa2dadc3..5739201fbe0 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/RegionType.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/RegionType.ts.html @@ -91,7 +91,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/SelectionRangeTypes.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/SelectionRangeTypes.ts.html index 3bba59e6547..7a39093cae0 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/SelectionRangeTypes.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/SelectionRangeTypes.ts.html @@ -115,7 +115,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/TableBorderFormat.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/TableBorderFormat.ts.html index 7739aba66cf..e8467c3b05c 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/TableBorderFormat.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/TableBorderFormat.ts.html @@ -307,7 +307,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/TableOperation.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/TableOperation.ts.html index e6d0fc76d96..3a2d98885c5 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/TableOperation.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/TableOperation.ts.html @@ -421,7 +421,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/index.html b/coverage/packages/roosterjs-editor-types/lib/enum/index.html index 65397296fa5..8670efa20bc 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/index.html @@ -620,7 +620,7 @@

All files packages/roosterjs-editor-typ diff --git a/coverage/packages/roosterjs-editor-types/lib/enum/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/enum/index.ts.html index a45cc18d0be..656f0e0b5e9 100644 --- a/coverage/packages/roosterjs-editor-types/lib/enum/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/enum/index.ts.html @@ -169,7 +169,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/event/index.html b/coverage/packages/roosterjs-editor-types/lib/event/index.html index 30802ad4fc2..55ef395e15c 100644 --- a/coverage/packages/roosterjs-editor-types/lib/event/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/event/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-typ diff --git a/coverage/packages/roosterjs-editor-types/lib/event/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/event/index.ts.html index 90626763384..dcd7967d0b3 100644 --- a/coverage/packages/roosterjs-editor-types/lib/event/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/event/index.ts.html @@ -367,7 +367,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/index.html b/coverage/packages/roosterjs-editor-types/lib/index.html index 07e8c24cc40..95989d37a7d 100644 --- a/coverage/packages/roosterjs-editor-types/lib/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs-editor-types/ diff --git a/coverage/packages/roosterjs-editor-types/lib/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/index.ts.html index 6660acdfd48..66cdd09129a 100644 --- a/coverage/packages/roosterjs-editor-types/lib/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/index.ts.html @@ -82,7 +82,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs-editor-types/lib/interface/index.html b/coverage/packages/roosterjs-editor-types/lib/interface/index.html index 67c56cc3155..24e42198a91 100644 --- a/coverage/packages/roosterjs-editor-types/lib/interface/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/interface/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-typ diff --git a/coverage/packages/roosterjs-editor-types/lib/interface/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/interface/index.ts.html index 2ce407cf087..56b7d79411a 100644 --- a/coverage/packages/roosterjs-editor-types/lib/interface/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/interface/index.ts.html @@ -439,7 +439,7 @@

All files / packag diff --git a/coverage/packages/roosterjs-editor-types/lib/type/index.html b/coverage/packages/roosterjs-editor-types/lib/type/index.html index 815605619d4..55ee0eba0ac 100644 --- a/coverage/packages/roosterjs-editor-types/lib/type/index.html +++ b/coverage/packages/roosterjs-editor-types/lib/type/index.html @@ -95,7 +95,7 @@

All files packages/roosterjs-editor-typ diff --git a/coverage/packages/roosterjs-editor-types/lib/type/index.ts.html b/coverage/packages/roosterjs-editor-types/lib/type/index.ts.html index 445d56c36ce..bc81d70fbb3 100644 --- a/coverage/packages/roosterjs-editor-types/lib/type/index.ts.html +++ b/coverage/packages/roosterjs-editor-types/lib/type/index.ts.html @@ -142,7 +142,7 @@

All files / packag diff --git a/coverage/packages/roosterjs/lib/createEditor.ts.html b/coverage/packages/roosterjs/lib/createEditor.ts.html index 57bf2282b9c..d15c1569a8a 100644 --- a/coverage/packages/roosterjs/lib/createEditor.ts.html +++ b/coverage/packages/roosterjs/lib/createEditor.ts.html @@ -172,7 +172,7 @@

All files / packages/ diff --git a/coverage/packages/roosterjs/lib/index.html b/coverage/packages/roosterjs/lib/index.html index c0916dd263d..55d0c9bbcce 100644 --- a/coverage/packages/roosterjs/lib/index.html +++ b/coverage/packages/roosterjs/lib/index.html @@ -110,7 +110,7 @@

All files packages/roosterjs/lib

diff --git a/coverage/packages/roosterjs/lib/index.ts.html b/coverage/packages/roosterjs/lib/index.ts.html index 71eebdb7e7b..9a033fdcded 100644 --- a/coverage/packages/roosterjs/lib/index.ts.html +++ b/coverage/packages/roosterjs/lib/index.ts.html @@ -88,7 +88,7 @@

All files / packages/ diff --git a/docs/classes/roosterjs_content_model_editor.contentmodelcopypasteplugin.html b/docs/classes/roosterjs_content_model_editor.contentmodelcopypasteplugin.html index aae060a4342..a467025235e 100644 --- a/docs/classes/roosterjs_content_model_editor.contentmodelcopypasteplugin.html +++ b/docs/classes/roosterjs_content_model_editor.contentmodelcopypasteplugin.html @@ -121,7 +121,7 @@

constructor

  • @@ -153,7 +153,7 @@

    dispose

    @@ -176,7 +176,7 @@

    getName

    @@ -199,7 +199,7 @@

    getState

    @@ -222,7 +222,7 @@

    initialize

    diff --git a/docs/classes/roosterjs_content_model_editor.contentmodeleditor.html b/docs/classes/roosterjs_content_model_editor.contentmodeleditor.html index 9b7232ea200..8789a0d444b 100644 --- a/docs/classes/roosterjs_content_model_editor.contentmodeleditor.html +++ b/docs/classes/roosterjs_content_model_editor.contentmodeleditor.html @@ -192,7 +192,7 @@

    constructor

    @@ -234,7 +234,7 @@

    addContentEditFeature

    Implementation of IContentModelEditor.addContentEditFeature

    Inherited from EditorBase.addContentEditFeature

    @@ -267,7 +267,7 @@

    addDomEventHandler

    Implementation of IContentModelEditor.addDomEventHandler

    Inherited from EditorBase.addDomEventHandler

    @@ -314,7 +314,7 @@

    addUndoSnapshot

    Implementation of IContentModelEditor.addUndoSnapshot

    Inherited from EditorBase.addUndoSnapshot

    @@ -386,7 +386,7 @@

    cacheContentModel

    @@ -418,7 +418,7 @@

    collapseNodes

    Implementation of IContentModelEditor.collapseNodes

    Inherited from EditorBase.collapseNodes

    @@ -468,7 +468,7 @@

    contains

    Implementation of IContentModelEditor.contains

    Inherited from EditorBase.contains

    @@ -498,7 +498,7 @@

    createContentModel

    @@ -531,7 +531,7 @@

    deleteNode

    Implementation of IContentModelEditor.deleteNode

    Inherited from EditorBase.deleteNode

    @@ -565,7 +565,7 @@

    deleteSelectedContent

    Implementation of IContentModelEditor.deleteSelectedContent

    Inherited from EditorBase.deleteSelectedContent

    @@ -589,7 +589,7 @@

    dispose

    Implementation of IContentModelEditor.dispose

    Inherited from EditorBase.dispose

    @@ -613,7 +613,7 @@

    ensureTypeInContainer

    Implementation of IContentModelEditor.ensureTypeInContainer

    Inherited from EditorBase.ensureTypeInContainer

    @@ -652,7 +652,7 @@

    focus

    Implementation of IContentModelEditor.focus

    Inherited from EditorBase.focus

    @@ -676,7 +676,7 @@

    getBlockElementAtNode

    Implementation of IContentModelEditor.getBlockElementAtNode

    Inherited from EditorBase.getBlockElementAtNode

    @@ -710,7 +710,7 @@

    getBlockTraverser

    Implementation of IContentModelEditor.getBlockTraverser

    Inherited from EditorBase.getBlockTraverser

    @@ -744,7 +744,7 @@

    getBodyTraverser

    Implementation of IContentModelEditor.getBodyTraverser

    Inherited from EditorBase.getBodyTraverser

    @@ -777,7 +777,7 @@

    getContent

    Implementation of IContentModelEditor.getContent

    Inherited from EditorBase.getContent

    @@ -810,7 +810,7 @@

    getContentModelDefaultFormat

    @@ -836,7 +836,7 @@

    getContentSearcherOfCursor

    Implementation of IContentModelEditor.getContentSearcherOfCursor

    Inherited from EditorBase.getContentSearcherOfCursor

    @@ -870,7 +870,7 @@

    Protected getCore

    @@ -897,7 +897,7 @@

    getCustomData

    Implementation of IContentModelEditor.getCustomData

    Inherited from EditorBase.getCustomData

    @@ -980,7 +980,7 @@

    getDarkColorHandler

    Implementation of IContentModelEditor.getDarkColorHandler

    Inherited from EditorBase.getDarkColorHandler

    @@ -1004,7 +1004,7 @@

    getDefaultFormat

    Implementation of IContentModelEditor.getDefaultFormat

    Inherited from EditorBase.getDefaultFormat

    @@ -1029,7 +1029,7 @@

    getDocument

    Implementation of IContentModelEditor.getDocument

    Inherited from EditorBase.getDocument

    @@ -1054,7 +1054,7 @@

    getEditorDomAttribute

    Implementation of IContentModelEditor.getEditorDomAttribute

    Inherited from EditorBase.getEditorDomAttribute

    @@ -1087,7 +1087,7 @@

    getElementAtCursor

    Implementation of IContentModelEditor.getElementAtCursor

    Inherited from EditorBase.getElementAtCursor

    @@ -1138,7 +1138,7 @@

    getFocusedPosition

    Implementation of IContentModelEditor.getFocusedPosition

    Inherited from EditorBase.getFocusedPosition

    @@ -1162,7 +1162,7 @@

    getPendableFormatState

    Implementation of IContentModelEditor.getPendableFormatState

    Inherited from EditorBase.getPendableFormatState

    @@ -1196,7 +1196,7 @@

    getRelativeDistanceToEditor

    Implementation of IContentModelEditor.getRelativeDistanceToEditor

    Inherited from EditorBase.getRelativeDistanceToEditor

    @@ -1240,7 +1240,7 @@

    getScrollContainer

    Implementation of IContentModelEditor.getScrollContainer

    Inherited from EditorBase.getScrollContainer

    @@ -1264,7 +1264,7 @@

    getSelectedRegions

    Implementation of IContentModelEditor.getSelectedRegions

    Inherited from EditorBase.getSelectedRegions

    @@ -1294,7 +1294,7 @@

    getSelectionPath

    Implementation of IContentModelEditor.getSelectionPath

    Inherited from EditorBase.getSelectionPath

    @@ -1320,7 +1320,7 @@

    getSelectionRange

    Implementation of IContentModelEditor.getSelectionRange

    Inherited from EditorBase.getSelectionRange

    @@ -1356,7 +1356,7 @@

    getSelectionRangeEx

    Implementation of IContentModelEditor.getSelectionRangeEx

    Inherited from EditorBase.getSelectionRangeEx

    @@ -1382,7 +1382,7 @@

    getSelectionTraverser

    Implementation of IContentModelEditor.getSelectionTraverser

    Inherited from EditorBase.getSelectionTraverser

    @@ -1413,7 +1413,7 @@

    getSizeTransformer

    Implementation of IContentModelEditor.getSizeTransformer

    Inherited from EditorBase.getSizeTransformer

    @@ -1439,7 +1439,7 @@

    getStyleBasedFormatState

    Implementation of IContentModelEditor.getStyleBasedFormatState

    Inherited from EditorBase.getStyleBasedFormatState

    @@ -1469,7 +1469,7 @@

    getTrustedHTMLHandler

    Implementation of IContentModelEditor.getTrustedHTMLHandler

    Inherited from EditorBase.getTrustedHTMLHandler

    @@ -1496,7 +1496,7 @@

    getUndoState

    Implementation of IContentModelEditor.getUndoState

    Inherited from EditorBase.getUndoState

    @@ -1520,7 +1520,7 @@

    getVisibleViewport

    Implementation of IContentModelEditor.getVisibleViewport

    Inherited from EditorBase.getVisibleViewport

    @@ -1544,7 +1544,7 @@

    getZoomScale

    Implementation of IContentModelEditor.getZoomScale

    Inherited from EditorBase.getZoomScale

    @@ -1571,7 +1571,7 @@

    hasFocus

    Implementation of IContentModelEditor.hasFocus

    Inherited from EditorBase.hasFocus

    @@ -1596,7 +1596,7 @@

    insertContent

    Implementation of IContentModelEditor.insertContent

    Inherited from EditorBase.insertContent

    @@ -1636,7 +1636,7 @@

    insertNode

    Implementation of IContentModelEditor.insertNode

    Inherited from EditorBase.insertNode

    @@ -1680,7 +1680,7 @@

    isDarkMode

    Implementation of IContentModelEditor.isDarkMode

    Inherited from EditorBase.isDarkMode

    @@ -1705,7 +1705,7 @@

    isDisposed

    Implementation of IContentModelEditor.isDisposed

    Inherited from EditorBase.isDisposed

    @@ -1730,7 +1730,7 @@

    isEmpty

    Implementation of IContentModelEditor.isEmpty

    Inherited from EditorBase.isEmpty

    @@ -1764,7 +1764,7 @@

    isFeatureEnabled

    Implementation of IContentModelEditor.isFeatureEnabled

    Inherited from EditorBase.isFeatureEnabled

    @@ -1797,7 +1797,7 @@

    isInIME

    Implementation of IContentModelEditor.isInIME

    Inherited from EditorBase.isInIME

    @@ -1822,7 +1822,7 @@

    isInShadowEdit

    Implementation of IContentModelEditor.isInShadowEdit

    Inherited from EditorBase.isInShadowEdit

    @@ -1846,7 +1846,7 @@

    isPositionAtBeginning

    Implementation of IContentModelEditor.isPositionAtBeginning

    Inherited from EditorBase.isPositionAtBeginning

    @@ -1881,7 +1881,7 @@

    paste

    Implementation of IContentModelEditor.paste

    Inherited from EditorBase.paste

    @@ -1926,7 +1926,7 @@

    queryElements

    Implementation of IContentModelEditor.queryElements

    Inherited from EditorBase.queryElements

    @@ -1981,7 +1981,7 @@

    redo

    Implementation of IContentModelEditor.redo

    Inherited from EditorBase.redo

    @@ -2005,7 +2005,7 @@

    removeContentEditFeature

    Implementation of IContentModelEditor.removeContentEditFeature

    Inherited from EditorBase.removeContentEditFeature

    @@ -2038,7 +2038,7 @@

    replaceNode

    Implementation of IContentModelEditor.replaceNode

    Inherited from EditorBase.replaceNode

    @@ -2084,7 +2084,7 @@

    runAsync

    Implementation of IContentModelEditor.runAsync

    Inherited from EditorBase.runAsync

    @@ -2148,7 +2148,7 @@

    select

    Implementation of IContentModelEditor.select

    Inherited from EditorBase.select

    @@ -2188,7 +2188,7 @@

    setContent

    Implementation of IContentModelEditor.setContent

    Inherited from EditorBase.setContent

    @@ -2226,7 +2226,7 @@

    setContentModel

    @@ -2265,7 +2265,7 @@

    setDarkModeState

    Implementation of IContentModelEditor.setDarkModeState

    Inherited from EditorBase.setDarkModeState

    @@ -2298,7 +2298,7 @@

    setEditorDomAttribute

    Implementation of IContentModelEditor.setEditorDomAttribute

    Inherited from EditorBase.setEditorDomAttribute

    @@ -2337,7 +2337,7 @@

    setZoomScale

    Implementation of IContentModelEditor.setZoomScale

    Inherited from EditorBase.setZoomScale

    @@ -2372,7 +2372,7 @@

    startShadowEdit

    Implementation of IContentModelEditor.startShadowEdit

    Inherited from EditorBase.startShadowEdit

    @@ -2401,7 +2401,7 @@

    stopShadowEdit

    Implementation of IContentModelEditor.stopShadowEdit

    Inherited from EditorBase.stopShadowEdit

    @@ -2425,7 +2425,7 @@

    transformToDarkColor

    Implementation of IContentModelEditor.transformToDarkColor

    Inherited from EditorBase.transformToDarkColor

    @@ -2458,7 +2458,7 @@

    triggerContentChangedEvent

    Implementation of IContentModelEditor.triggerContentChangedEvent

    Inherited from EditorBase.triggerContentChangedEvent

    @@ -2497,7 +2497,7 @@

    triggerPluginEvent

    Implementation of IContentModelEditor.triggerPluginEvent

    Inherited from EditorBase.triggerPluginEvent

    @@ -2551,7 +2551,7 @@

    undo

    Implementation of IContentModelEditor.undo

    Inherited from EditorBase.undo

    diff --git a/docs/classes/roosterjs_content_model_editor.contentmodeleditplugin.html b/docs/classes/roosterjs_content_model_editor.contentmodeleditplugin.html index 7bae9c4da99..8f9abde9760 100644 --- a/docs/classes/roosterjs_content_model_editor.contentmodeleditplugin.html +++ b/docs/classes/roosterjs_content_model_editor.contentmodeleditplugin.html @@ -144,7 +144,7 @@

    dispose

    @@ -169,7 +169,7 @@

    getName

    @@ -192,7 +192,7 @@

    initialize

    @@ -226,7 +226,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_content_model_editor.contentmodelformatplugin.html b/docs/classes/roosterjs_content_model_editor.contentmodelformatplugin.html index c3fa8e75fde..935463073ef 100644 --- a/docs/classes/roosterjs_content_model_editor.contentmodelformatplugin.html +++ b/docs/classes/roosterjs_content_model_editor.contentmodelformatplugin.html @@ -143,7 +143,7 @@

    dispose

    @@ -168,7 +168,7 @@

    getName

    @@ -191,7 +191,7 @@

    initialize

    @@ -225,7 +225,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_content_model_editor.contentmodelpasteplugin.html b/docs/classes/roosterjs_content_model_editor.contentmodelpasteplugin.html index 4ebc0245670..4d1c83886a9 100644 --- a/docs/classes/roosterjs_content_model_editor.contentmodelpasteplugin.html +++ b/docs/classes/roosterjs_content_model_editor.contentmodelpasteplugin.html @@ -128,7 +128,7 @@

    constructor

  • @@ -163,7 +163,7 @@

    dispose

    @@ -188,7 +188,7 @@

    getName

    @@ -211,7 +211,7 @@

    initialize

    @@ -245,7 +245,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_content_model_editor.contentmodeltypeincontainerplugin.html b/docs/classes/roosterjs_content_model_editor.contentmodeltypeincontainerplugin.html index 2839198c607..b0a6c5cbcea 100644 --- a/docs/classes/roosterjs_content_model_editor.contentmodeltypeincontainerplugin.html +++ b/docs/classes/roosterjs_content_model_editor.contentmodeltypeincontainerplugin.html @@ -138,7 +138,7 @@

    dispose

    @@ -163,7 +163,7 @@

    getName

    @@ -186,7 +186,7 @@

    initialize

    diff --git a/docs/classes/roosterjs_editor_core.editor.html b/docs/classes/roosterjs_editor_core.editor.html index bc8d747922a..5428dad8819 100644 --- a/docs/classes/roosterjs_editor_core.editor.html +++ b/docs/classes/roosterjs_editor_core.editor.html @@ -181,7 +181,7 @@

    constructor

    @@ -222,7 +222,7 @@

    addContentEditFeature

    @@ -254,7 +254,7 @@

    addDomEventHandler

    Parameters

    @@ -293,7 +293,7 @@

    addUndoSnapshot

    @@ -365,7 +365,7 @@

    collapseNodes

    @@ -414,7 +414,7 @@

    contains

    Parameters

    @@ -438,7 +438,7 @@

    deleteNode

    @@ -471,7 +471,7 @@

    deleteSelectedContent

    @@ -494,7 +494,7 @@

    dispose

    @@ -517,7 +517,7 @@

    ensureTypeInContainer

    @@ -555,7 +555,7 @@

    focus

    @@ -578,7 +578,7 @@

    getBlockElementAtNode

    @@ -611,7 +611,7 @@

    getBlockTraverser

    @@ -644,7 +644,7 @@

    getBodyTraverser

    @@ -676,7 +676,7 @@

    getContent

    @@ -709,7 +709,7 @@

    getContentSearcherOfCursor

    @@ -743,7 +743,7 @@

    Protected getCore

    @@ -769,7 +769,7 @@

    getCustomData

    @@ -851,7 +851,7 @@

    getDarkColorHandler

    @@ -874,7 +874,7 @@

    getDefaultFormat

    @@ -898,7 +898,7 @@

    getDocument

    @@ -922,7 +922,7 @@

    getEditorDomAttribute

    @@ -954,7 +954,7 @@

    getElementAtCursor

    @@ -1004,7 +1004,7 @@

    getFocusedPosition

    @@ -1027,7 +1027,7 @@

    getPendableFormatState

    @@ -1060,7 +1060,7 @@

    getRelativeDistanceToEditor

    @@ -1103,7 +1103,7 @@

    getScrollContainer

    @@ -1126,7 +1126,7 @@

    getSelectedRegions

    @@ -1155,7 +1155,7 @@

    getSelectionPath

    @@ -1180,7 +1180,7 @@

    getSelectionRange

    @@ -1215,7 +1215,7 @@

    getSelectionRangeEx

    @@ -1240,7 +1240,7 @@

    getSelectionTraverser

    @@ -1270,7 +1270,7 @@

    getSizeTransformer

    @@ -1295,7 +1295,7 @@

    getStyleBasedFormatState

    @@ -1324,7 +1324,7 @@

    getTrustedHTMLHandler

    @@ -1350,7 +1350,7 @@

    getUndoState

    @@ -1373,7 +1373,7 @@

    getVisibleViewport

    @@ -1396,7 +1396,7 @@

    getZoomScale

    @@ -1422,7 +1422,7 @@

    hasFocus

    @@ -1446,7 +1446,7 @@

    insertContent

    @@ -1485,7 +1485,7 @@

    insertNode

    @@ -1528,7 +1528,7 @@

    isDarkMode

    @@ -1552,7 +1552,7 @@

    isDisposed

    @@ -1576,7 +1576,7 @@

    isEmpty

    @@ -1609,7 +1609,7 @@

    isFeatureEnabled

    @@ -1641,7 +1641,7 @@

    isInIME

    @@ -1665,7 +1665,7 @@

    isInShadowEdit

    @@ -1688,7 +1688,7 @@

    isPositionAtBeginning

    @@ -1722,7 +1722,7 @@

    paste

    @@ -1766,7 +1766,7 @@

    queryElements

    Parameters

    @@ -1814,7 +1814,7 @@

    redo

    @@ -1837,7 +1837,7 @@

    removeContentEditFeature

    @@ -1869,7 +1869,7 @@

    replaceNode

    @@ -1914,7 +1914,7 @@

    runAsync

    @@ -1977,7 +1977,7 @@

    select

    Parameters

    @@ -2010,7 +2010,7 @@

    setContent

    @@ -2048,7 +2048,7 @@

    setDarkModeState

    @@ -2080,7 +2080,7 @@

    setEditorDomAttribute

    @@ -2118,7 +2118,7 @@

    setZoomScale

    @@ -2152,7 +2152,7 @@

    startShadowEdit

    @@ -2180,7 +2180,7 @@

    stopShadowEdit

    @@ -2203,7 +2203,7 @@

    transformToDarkColor

    @@ -2235,7 +2235,7 @@

    triggerContentChangedEvent

    @@ -2273,7 +2273,7 @@

    triggerPluginEvent

    @@ -2326,7 +2326,7 @@

    undo

    diff --git a/docs/classes/roosterjs_editor_core.editorbase.html b/docs/classes/roosterjs_editor_core.editorbase.html index bc1e2ef214b..891f813fb98 100644 --- a/docs/classes/roosterjs_editor_core.editorbase.html +++ b/docs/classes/roosterjs_editor_core.editorbase.html @@ -200,7 +200,7 @@

    constructor

  • @@ -253,7 +253,7 @@

    addContentEditFeature

    @@ -285,7 +285,7 @@

    addDomEventHandler

    @@ -331,7 +331,7 @@

    addUndoSnapshot

    @@ -403,7 +403,7 @@

    collapseNodes

    @@ -452,7 +452,7 @@

    contains

    @@ -482,7 +482,7 @@

    deleteNode

    @@ -515,7 +515,7 @@

    deleteSelectedContent

    @@ -538,7 +538,7 @@

    dispose

    @@ -561,7 +561,7 @@

    ensureTypeInContainer

  • @@ -812,7 +812,7 @@

    getCustomData

    @@ -894,7 +894,7 @@

    getDarkColorHandler

    @@ -917,7 +917,7 @@

    getDefaultFormat

    @@ -941,7 +941,7 @@

    getDocument

    @@ -965,7 +965,7 @@

    getEditorDomAttribute

    @@ -997,7 +997,7 @@

    getElementAtCursor

    @@ -1047,7 +1047,7 @@

    getFocusedPosition

    @@ -1070,7 +1070,7 @@

    getPendableFormatState

    @@ -1103,7 +1103,7 @@

    getRelativeDistanceToEditor

    @@ -1146,7 +1146,7 @@

    getScrollContainer

    @@ -1169,7 +1169,7 @@

    getSelectedRegions

    @@ -1198,7 +1198,7 @@

    getSelectionPath

    @@ -1223,7 +1223,7 @@

    getSelectionRange

    @@ -1258,7 +1258,7 @@

    getSelectionRangeEx

    @@ -1283,7 +1283,7 @@

    getSelectionTraverser

    @@ -1313,7 +1313,7 @@

    getSizeTransformer

    @@ -1338,7 +1338,7 @@

    getStyleBasedFormatState

    @@ -1367,7 +1367,7 @@

    getTrustedHTMLHandler

    @@ -1393,7 +1393,7 @@

    getUndoState

    @@ -1416,7 +1416,7 @@

    getVisibleViewport

    @@ -1439,7 +1439,7 @@

    getZoomScale

    @@ -1465,7 +1465,7 @@

    hasFocus

    @@ -1489,7 +1489,7 @@

    insertContent

    @@ -1528,7 +1528,7 @@

    insertNode

    @@ -1571,7 +1571,7 @@

    isDarkMode

    @@ -1595,7 +1595,7 @@

    isDisposed

    @@ -1619,7 +1619,7 @@

    isEmpty

    @@ -1652,7 +1652,7 @@

    isFeatureEnabled

    @@ -1684,7 +1684,7 @@

    isInIME

    @@ -1708,7 +1708,7 @@

    isInShadowEdit

    @@ -1731,7 +1731,7 @@

    isPositionAtBeginning

    @@ -1765,7 +1765,7 @@

    paste

    @@ -1809,7 +1809,7 @@

    queryElements

    @@ -1863,7 +1863,7 @@

    redo

    @@ -1886,7 +1886,7 @@

    removeContentEditFeature

    @@ -1918,7 +1918,7 @@

    replaceNode

    @@ -1963,7 +1963,7 @@

    runAsync

    @@ -2026,7 +2026,7 @@

    select

    @@ -2065,7 +2065,7 @@

    setContent

    @@ -2103,7 +2103,7 @@

    setDarkModeState

    @@ -2135,7 +2135,7 @@

    setEditorDomAttribute

    @@ -2173,7 +2173,7 @@

    setZoomScale

    @@ -2207,7 +2207,7 @@

    startShadowEdit

    @@ -2235,7 +2235,7 @@

    stopShadowEdit

    @@ -2258,7 +2258,7 @@

    transformToDarkColor

    @@ -2290,7 +2290,7 @@

    triggerContentChangedEvent

    @@ -2328,7 +2328,7 @@

    triggerPluginEvent

    @@ -2381,7 +2381,7 @@

    undo

    diff --git a/docs/classes/roosterjs_editor_dom.contenttraverser.html b/docs/classes/roosterjs_editor_dom.contenttraverser.html index 4bc04228c7e..2ac1246166a 100644 --- a/docs/classes/roosterjs_editor_dom.contenttraverser.html +++ b/docs/classes/roosterjs_editor_dom.contenttraverser.html @@ -129,7 +129,7 @@

    currentBlockElement

    @@ -152,7 +152,7 @@

    currentInlineElement

    @@ -178,7 +178,7 @@

    getNextBlockElement

    @@ -201,7 +201,7 @@

    getNextInlineElement

    @@ -224,7 +224,7 @@

    getPreviousBlockElement

    @@ -247,7 +247,7 @@

    getPreviousInlineElement

    @@ -269,7 +269,7 @@

    Static createBlockTrav
  • @@ -316,7 +316,7 @@

    Static createBodyTrave
  • @@ -359,7 +359,7 @@

    Static createSelection
  • diff --git a/docs/classes/roosterjs_editor_dom.htmlsanitizer.html b/docs/classes/roosterjs_editor_dom.htmlsanitizer.html index b14c860be9f..201487a8340 100644 --- a/docs/classes/roosterjs_editor_dom.htmlsanitizer.html +++ b/docs/classes/roosterjs_editor_dom.htmlsanitizer.html @@ -120,7 +120,7 @@

    constructor

  • @@ -154,7 +154,7 @@

    convertGlobalCssToInlineCss

  • @@ -185,7 +185,7 @@

    exec

  • @@ -234,7 +234,7 @@

    sanitize

  • @@ -272,7 +272,7 @@

    Static convertInlineCs
  • @@ -312,7 +312,7 @@

    Static sanitizeHtml

  • diff --git a/docs/classes/roosterjs_editor_dom.imageinlineelement.html b/docs/classes/roosterjs_editor_dom.imageinlineelement.html index 684cc2b7712..ba7e04f8c46 100644 --- a/docs/classes/roosterjs_editor_dom.imageinlineelement.html +++ b/docs/classes/roosterjs_editor_dom.imageinlineelement.html @@ -126,7 +126,7 @@

    constructor

    Parameters

    @@ -156,7 +156,7 @@

    applyStyle

    @@ -206,7 +206,7 @@

    contains

    @@ -235,7 +235,7 @@

    getContainerNode

    @@ -258,7 +258,7 @@

    getEndPosition

    @@ -281,7 +281,7 @@

    getParentBlock

    Returns BlockElement

    @@ -299,7 +299,7 @@

    getStartPosition

    @@ -322,7 +322,7 @@

    getTextContent

    @@ -345,7 +345,7 @@

    isAfter

    @@ -374,7 +374,7 @@

    isTextualInlineElement

    diff --git a/docs/classes/roosterjs_editor_dom.linkinlineelement.html b/docs/classes/roosterjs_editor_dom.linkinlineelement.html index 0abc69a0788..f7ff9a39c4b 100644 --- a/docs/classes/roosterjs_editor_dom.linkinlineelement.html +++ b/docs/classes/roosterjs_editor_dom.linkinlineelement.html @@ -126,7 +126,7 @@

    constructor

    Parameters

    @@ -156,7 +156,7 @@

    applyStyle

    @@ -206,7 +206,7 @@

    contains

    @@ -235,7 +235,7 @@

    getContainerNode

    @@ -258,7 +258,7 @@

    getEndPosition

    @@ -281,7 +281,7 @@

    getParentBlock

    Returns BlockElement

    @@ -299,7 +299,7 @@

    getStartPosition

    @@ -322,7 +322,7 @@

    getTextContent

    @@ -345,7 +345,7 @@

    isAfter

    @@ -374,7 +374,7 @@

    isTextualInlineElement

    diff --git a/docs/classes/roosterjs_editor_dom.nodeinlineelement.html b/docs/classes/roosterjs_editor_dom.nodeinlineelement.html index 3376bc040bd..4b7817ac48d 100644 --- a/docs/classes/roosterjs_editor_dom.nodeinlineelement.html +++ b/docs/classes/roosterjs_editor_dom.nodeinlineelement.html @@ -137,7 +137,7 @@

    constructor

  • Parameters

    @@ -167,7 +167,7 @@

    applyStyle

    @@ -217,7 +217,7 @@

    contains

    @@ -246,7 +246,7 @@

    getContainerNode

    @@ -269,7 +269,7 @@

    getEndPosition

    @@ -292,7 +292,7 @@

    getParentBlock

    @@ -315,7 +315,7 @@

    getStartPosition

    @@ -338,7 +338,7 @@

    getTextContent

    @@ -361,7 +361,7 @@

    isAfter

    @@ -390,7 +390,7 @@

    isTextualInlineElement

    diff --git a/docs/classes/roosterjs_editor_dom.partialinlineelement.html b/docs/classes/roosterjs_editor_dom.partialinlineelement.html index 4912427bf03..64e22c7ed38 100644 --- a/docs/classes/roosterjs_editor_dom.partialinlineelement.html +++ b/docs/classes/roosterjs_editor_dom.partialinlineelement.html @@ -138,7 +138,7 @@

    constructor

  • Parameters

    @@ -170,7 +170,7 @@

    nextInlineElement

  • @@ -192,7 +192,7 @@

    previousInlineElement

  • @@ -342,7 +342,7 @@

    getEndPosition

    @@ -365,7 +365,7 @@

    getParentBlock

    @@ -388,7 +388,7 @@

    getStartPosition

    @@ -411,7 +411,7 @@

    getTextContent

    @@ -434,7 +434,7 @@

    isAfter

    @@ -463,7 +463,7 @@

    isTextualInlineElement

    diff --git a/docs/classes/roosterjs_editor_dom.position.html b/docs/classes/roosterjs_editor_dom.position.html index 9845a0006cf..5b2fc2e8ef0 100644 --- a/docs/classes/roosterjs_editor_dom.position.html +++ b/docs/classes/roosterjs_editor_dom.position.html @@ -134,7 +134,7 @@

    constructor

  • @@ -157,7 +157,7 @@

    Returns
    @@ -193,7 +193,7 @@

    Returns
    @@ -230,7 +230,7 @@

    Readonly element

    @@ -241,7 +241,7 @@

    Readonly isAtEnd

    @@ -252,7 +252,7 @@

    Readonly node

    @@ -263,7 +263,7 @@

    Readonly offset

    @@ -281,7 +281,7 @@

    equalTo

    @@ -313,7 +313,7 @@

    isAfter

    @@ -342,7 +342,7 @@

    move

    @@ -374,7 +374,7 @@

    normalize

    @@ -397,7 +397,7 @@

    Static getEnd

  • @@ -428,7 +428,7 @@

    Static getStart

  • diff --git a/docs/classes/roosterjs_editor_dom.positioncontentsearcher.html b/docs/classes/roosterjs_editor_dom.positioncontentsearcher.html index fc76a6eff3e..06c91d237b5 100644 --- a/docs/classes/roosterjs_editor_dom.positioncontentsearcher.html +++ b/docs/classes/roosterjs_editor_dom.positioncontentsearcher.html @@ -124,7 +124,7 @@

    constructor

  • @@ -165,7 +165,7 @@

    forEachTextInlineElement

    @@ -216,7 +216,7 @@

    getInlineElementAfter

    @@ -240,7 +240,7 @@

    getInlineElementBefore

    @@ -264,7 +264,7 @@

    getNearestNonTextInlineElement

    @@ -288,7 +288,7 @@

    getRangeFromText

    @@ -327,7 +327,7 @@

    getSubStringBefore

    @@ -363,7 +363,7 @@

    getWordBefore

    diff --git a/docs/classes/roosterjs_editor_dom.vlist.html b/docs/classes/roosterjs_editor_dom.vlist.html index ad6a7f431dd..faccac22742 100644 --- a/docs/classes/roosterjs_editor_dom.vlist.html +++ b/docs/classes/roosterjs_editor_dom.vlist.html @@ -166,7 +166,7 @@

    constructor

  • @@ -196,7 +196,7 @@

    Readonly items

    items: VListItem[] = []
    @@ -220,7 +220,7 @@

    appendItem

  • @@ -257,7 +257,7 @@

    changeListType

  • @@ -302,7 +302,7 @@

    contains

  • @@ -333,7 +333,7 @@

    getLastItemNumber

  • @@ -356,7 +356,7 @@

    getListItemIndex

  • @@ -407,7 +407,7 @@

    getStart

  • @@ -430,7 +430,7 @@

    mergeVList

  • @@ -467,7 +467,7 @@

    setAlignment

  • @@ -511,7 +511,7 @@

    setIndentation

  • @@ -545,7 +545,7 @@

    Returns void
    @@ -602,7 +602,7 @@

    setListStyleType

  • @@ -640,7 +640,7 @@

    split

  • @@ -677,7 +677,7 @@

    writeBack

  • diff --git a/docs/classes/roosterjs_editor_dom.vlistchain.html b/docs/classes/roosterjs_editor_dom.vlistchain.html index f174bba8106..a1a152fd3b2 100644 --- a/docs/classes/roosterjs_editor_dom.vlistchain.html +++ b/docs/classes/roosterjs_editor_dom.vlistchain.html @@ -111,7 +111,7 @@

    canAppendAtCursor

  • @@ -142,7 +142,7 @@

    commit

  • @@ -180,7 +180,7 @@

    createVListAtBlock

  • @@ -217,7 +217,7 @@

    Static createListChain
  • diff --git a/docs/classes/roosterjs_editor_dom.vlistitem.html b/docs/classes/roosterjs_editor_dom.vlistitem.html index 424766774d3..26e7acd8601 100644 --- a/docs/classes/roosterjs_editor_dom.vlistitem.html +++ b/docs/classes/roosterjs_editor_dom.vlistitem.html @@ -132,7 +132,7 @@

    constructor

  • @@ -173,7 +173,7 @@

    addNegativeMargins

  • @@ -195,7 +195,7 @@

    applyListStyle

  • @@ -232,7 +232,7 @@

    canMerge

  • @@ -261,7 +261,7 @@

    changeListType

  • @@ -292,7 +292,7 @@

    contains

  • @@ -323,7 +323,7 @@

    getLevel

  • @@ -345,7 +345,7 @@

    getListType

  • @@ -367,7 +367,7 @@

    getNewListStart

  • @@ -389,7 +389,7 @@

    getNode

  • @@ -411,7 +411,7 @@

    indent

  • @@ -434,7 +434,7 @@

    isDummy

  • @@ -458,7 +458,7 @@

    isOrphanItem

  • @@ -482,7 +482,7 @@

    mergeItems

  • @@ -511,7 +511,7 @@

    outdent

  • @@ -543,7 +543,7 @@

    setIsDummy

  • @@ -574,7 +574,7 @@

    setNewListStart

  • @@ -602,7 +602,7 @@

    writeBack

  • diff --git a/docs/classes/roosterjs_editor_dom.vtable.html b/docs/classes/roosterjs_editor_dom.vtable.html index 2d4106f916e..e8005cb3550 100644 --- a/docs/classes/roosterjs_editor_dom.vtable.html +++ b/docs/classes/roosterjs_editor_dom.vtable.html @@ -138,7 +138,7 @@

    constructor

  • @@ -180,7 +180,7 @@

    cells

    cells: VCell[][] = null
    @@ -195,7 +195,7 @@

    col

    col: number
    @@ -210,7 +210,7 @@

    formatInfo

    formatInfo: Required<TableFormat> = null
    @@ -225,7 +225,7 @@

    row

    row: number
    @@ -240,7 +240,7 @@

    table

    table: HTMLTableElement
    @@ -263,7 +263,7 @@

    selection

  • @@ -276,7 +276,7 @@

    Returns
    @@ -307,7 +307,7 @@

    applyFormat

  • @@ -338,7 +338,7 @@

    edit

  • @@ -369,7 +369,7 @@

    forEachCellOfCurrentColumn

  • @@ -424,7 +424,7 @@

    forEachCellOfCurrentRow

  • @@ -476,7 +476,7 @@

    getCell

  • @@ -514,7 +514,7 @@

    getCellsWithBorder

  • @@ -565,7 +565,7 @@

    getCurrentTd

  • @@ -587,7 +587,7 @@

    getTd

  • @@ -624,7 +624,7 @@

    normalizeTableCellSize

  • Parameters

    @@ -647,7 +647,7 @@

    setAlignmentToSelectedCells

  • Parameters

    @@ -685,7 +685,7 @@

    writeBack

  • diff --git a/docs/classes/roosterjs_editor_plugins.autoformat.html b/docs/classes/roosterjs_editor_plugins.autoformat.html index 9d5b7a5bc20..bb4f2171a68 100644 --- a/docs/classes/roosterjs_editor_plugins.autoformat.html +++ b/docs/classes/roosterjs_editor_plugins.autoformat.html @@ -139,7 +139,7 @@

    dispose

    @@ -162,7 +162,7 @@

    getName

    @@ -185,7 +185,7 @@

    initialize

    @@ -217,7 +217,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_editor_plugins.contentedit.html b/docs/classes/roosterjs_editor_plugins.contentedit.html index 77ed709ea16..967da0c4951 100644 --- a/docs/classes/roosterjs_editor_plugins.contentedit.html +++ b/docs/classes/roosterjs_editor_plugins.contentedit.html @@ -131,7 +131,7 @@

    constructor

  • @@ -172,7 +172,7 @@

    dispose

    @@ -195,7 +195,7 @@

    getName

    @@ -218,7 +218,7 @@

    initialize

    diff --git a/docs/classes/roosterjs_editor_plugins.contextmenu.html b/docs/classes/roosterjs_editor_plugins.contextmenu.html index 4f1aca9e60e..efb02950238 100644 --- a/docs/classes/roosterjs_editor_plugins.contextmenu.html +++ b/docs/classes/roosterjs_editor_plugins.contextmenu.html @@ -129,7 +129,7 @@

    constructor

  • @@ -170,7 +170,7 @@

    dispose

    @@ -193,7 +193,7 @@

    getName

    @@ -216,7 +216,7 @@

    initialize

    @@ -248,7 +248,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_editor_plugins.customreplace.html b/docs/classes/roosterjs_editor_plugins.customreplace.html index 8497050c51d..e89ea9fc931 100644 --- a/docs/classes/roosterjs_editor_plugins.customreplace.html +++ b/docs/classes/roosterjs_editor_plugins.customreplace.html @@ -123,7 +123,7 @@

    constructor

  • @@ -158,7 +158,7 @@

    dispose

    @@ -181,7 +181,7 @@

    getName

    @@ -204,7 +204,7 @@

    initialize

    @@ -236,7 +236,7 @@

    onPluginEvent

    @@ -267,7 +267,7 @@

    updateReplacements

  • diff --git a/docs/classes/roosterjs_editor_plugins.cutpastelistchain.html b/docs/classes/roosterjs_editor_plugins.cutpastelistchain.html index 8f27a6b0a01..cba6d9e2315 100644 --- a/docs/classes/roosterjs_editor_plugins.cutpastelistchain.html +++ b/docs/classes/roosterjs_editor_plugins.cutpastelistchain.html @@ -139,7 +139,7 @@

    dispose

    @@ -162,7 +162,7 @@

    getName

    @@ -185,7 +185,7 @@

    initialize

    @@ -217,7 +217,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_editor_plugins.hyperlink.html b/docs/classes/roosterjs_editor_plugins.hyperlink.html index 314b16681ff..169457fc17b 100644 --- a/docs/classes/roosterjs_editor_plugins.hyperlink.html +++ b/docs/classes/roosterjs_editor_plugins.hyperlink.html @@ -123,7 +123,7 @@

    constructor

  • @@ -213,7 +213,7 @@

    dispose

    @@ -236,7 +236,7 @@

    getName

    @@ -259,7 +259,7 @@

    initialize

    @@ -290,7 +290,7 @@

    Protected onBlur

  • Parameters

    @@ -313,7 +313,7 @@

    Protected onMouse

  • Parameters

    @@ -337,7 +337,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_editor_plugins.imageedit.html b/docs/classes/roosterjs_editor_plugins.imageedit.html index 22e1324b3a2..6a079e4b6b2 100644 --- a/docs/classes/roosterjs_editor_plugins.imageedit.html +++ b/docs/classes/roosterjs_editor_plugins.imageedit.html @@ -137,7 +137,7 @@

    constructor

  • @@ -262,7 +262,7 @@

    getName

    @@ -285,7 +285,7 @@

    initialize

    @@ -316,7 +316,7 @@

    isOperationAllowed

  • @@ -349,7 +349,7 @@

    onPluginEvent

    @@ -380,7 +380,7 @@

    rotateImage

  • @@ -418,7 +418,7 @@

    setEditingImage

  • @@ -447,7 +447,7 @@

    Returns void
    diff --git a/docs/classes/roosterjs_editor_plugins.imageresize.html b/docs/classes/roosterjs_editor_plugins.imageresize.html index d797c394d60..d20e4a3c5f5 100644 --- a/docs/classes/roosterjs_editor_plugins.imageresize.html +++ b/docs/classes/roosterjs_editor_plugins.imageresize.html @@ -136,7 +136,7 @@

    constructor

    @@ -192,7 +192,7 @@

    Protected editor

    @@ -203,7 +203,7 @@

    Protected options

    @@ -221,7 +221,7 @@

    dispose

    @@ -244,7 +244,7 @@

    flipImage

    @@ -281,7 +281,7 @@

    getName

    @@ -303,7 +303,7 @@

    hideResizeHandle

  • @@ -333,7 +333,7 @@

    initialize

    @@ -365,7 +365,7 @@

    isOperationAllowed

    @@ -398,7 +398,7 @@

    onPluginEvent

    @@ -430,7 +430,7 @@

    rotateImage

    @@ -469,7 +469,7 @@

    setEditingImage

    @@ -499,7 +499,7 @@

    Returns void

    Inherited from ImageEdit.setEditingImage

    @@ -537,7 +537,7 @@

    showResizeHandle

  • diff --git a/docs/classes/roosterjs_editor_plugins.paste.html b/docs/classes/roosterjs_editor_plugins.paste.html index 81e08274400..2d9e211f06a 100644 --- a/docs/classes/roosterjs_editor_plugins.paste.html +++ b/docs/classes/roosterjs_editor_plugins.paste.html @@ -126,7 +126,7 @@

    constructor

  • @@ -168,7 +168,7 @@

    dispose

    @@ -191,7 +191,7 @@

    getName

    @@ -214,7 +214,7 @@

    initialize

    @@ -246,7 +246,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_editor_plugins.pickerplugin.html b/docs/classes/roosterjs_editor_plugins.pickerplugin.html index 53116ebd89c..a33aa165322 100644 --- a/docs/classes/roosterjs_editor_plugins.pickerplugin.html +++ b/docs/classes/roosterjs_editor_plugins.pickerplugin.html @@ -143,7 +143,7 @@

    constructor

  • Type parameters

    @@ -189,7 +189,7 @@

    dispose

    @@ -212,7 +212,7 @@

    getName

    @@ -235,7 +235,7 @@

    initialize

    @@ -267,7 +267,7 @@

    onPluginEvent

    @@ -299,7 +299,7 @@

    willHandleEventExclusively

    diff --git a/docs/classes/roosterjs_editor_plugins.tablecellselection.html b/docs/classes/roosterjs_editor_plugins.tablecellselection.html index 190271dd77c..d66819700ab 100644 --- a/docs/classes/roosterjs_editor_plugins.tablecellselection.html +++ b/docs/classes/roosterjs_editor_plugins.tablecellselection.html @@ -121,7 +121,7 @@

    constructor

  • Returns TableCellSelection

    @@ -142,7 +142,7 @@

    dispose

    @@ -165,7 +165,7 @@

    getName

    @@ -188,7 +188,7 @@

    initialize

    @@ -220,7 +220,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_editor_plugins.tableresize.html b/docs/classes/roosterjs_editor_plugins.tableresize.html index 83f05905398..d9ccd21f471 100644 --- a/docs/classes/roosterjs_editor_plugins.tableresize.html +++ b/docs/classes/roosterjs_editor_plugins.tableresize.html @@ -121,7 +121,7 @@

    constructor

  • @@ -179,7 +179,7 @@

    dispose

    @@ -202,7 +202,7 @@

    getName

    @@ -225,7 +225,7 @@

    initialize

    @@ -257,7 +257,7 @@

    onPluginEvent

    diff --git a/docs/classes/roosterjs_editor_plugins.watermark.html b/docs/classes/roosterjs_editor_plugins.watermark.html index 4b8b8cd3f83..3358071377a 100644 --- a/docs/classes/roosterjs_editor_plugins.watermark.html +++ b/docs/classes/roosterjs_editor_plugins.watermark.html @@ -121,7 +121,7 @@

    constructor

  • @@ -162,7 +162,7 @@

    dispose

    @@ -185,7 +185,7 @@

    getName

    @@ -208,7 +208,7 @@

    initialize

    @@ -240,7 +240,7 @@

    onPluginEvent

    diff --git a/docs/enums/roosterjs_editor_types.alignment.html b/docs/enums/roosterjs_editor_types.alignment.html index a999c65e13c..e2ad0627711 100644 --- a/docs/enums/roosterjs_editor_types.alignment.html +++ b/docs/enums/roosterjs_editor_types.alignment.html @@ -96,7 +96,7 @@

    Center

    Center: = 1
    @@ -111,7 +111,7 @@

    Left

    Left: = 0
    @@ -126,7 +126,7 @@

    Right

    Right: = 2
    diff --git a/docs/enums/roosterjs_editor_types.bulletlisttype.html b/docs/enums/roosterjs_editor_types.bulletlisttype.html index 14579af443f..22b7daf761c 100644 --- a/docs/enums/roosterjs_editor_types.bulletlisttype.html +++ b/docs/enums/roosterjs_editor_types.bulletlisttype.html @@ -104,7 +104,7 @@

    Circle

    Circle: = 9
    @@ -119,7 +119,7 @@

    Dash

    Dash: = 2
    @@ -134,7 +134,7 @@

    Disc

    Disc: = 1
    @@ -149,7 +149,7 @@

    DoubleLongArrow

    DoubleLongArrow: = 8
    @@ -164,7 +164,7 @@

    Hyphen

    Hyphen: = 7
    @@ -179,7 +179,7 @@

    LongArrow

    LongArrow: = 5
    @@ -194,7 +194,7 @@

    Max

    Max: = 9
    @@ -209,7 +209,7 @@

    Min

    Min: = 1
    @@ -224,7 +224,7 @@

    ShortArrow

    ShortArrow: = 4
    @@ -239,7 +239,7 @@

    Square

    Square: = 3
    @@ -254,7 +254,7 @@

    UnfilledArrow

    UnfilledArrow: = 6
    diff --git a/docs/enums/roosterjs_editor_types.capitalization.html b/docs/enums/roosterjs_editor_types.capitalization.html index 086c6bb3498..fe578d24ab8 100644 --- a/docs/enums/roosterjs_editor_types.capitalization.html +++ b/docs/enums/roosterjs_editor_types.capitalization.html @@ -98,7 +98,7 @@

    CapitalizeEachWord

    CapitalizeEachWord: = "capitalize"
    @@ -113,7 +113,7 @@

    Lowercase

    Lowercase: = "lowercase"
    @@ -128,7 +128,7 @@

    Sentence

    Sentence: = "sentence"
    @@ -144,7 +144,7 @@

    Uppercase

    Uppercase: = "uppercase"
    diff --git a/docs/enums/roosterjs_editor_types.changesource.html b/docs/enums/roosterjs_editor_types.changesource.html index 53cb61f98df..7e2a8eddace 100644 --- a/docs/enums/roosterjs_editor_types.changesource.html +++ b/docs/enums/roosterjs_editor_types.changesource.html @@ -107,7 +107,7 @@

    AutoLink

    AutoLink: = "AutoLink"
    @@ -122,7 +122,7 @@

    CreateLink

    CreateLink: = "CreateLink"
    @@ -137,7 +137,7 @@

    Cut

    Cut: = "Cut"
    @@ -152,7 +152,7 @@

    Drop

    Drop: = "Drop"
    @@ -167,7 +167,7 @@

    Format

    Format: = "Format"
    @@ -182,7 +182,7 @@

    ImageResize

    ImageResize: = "ImageResize"
    @@ -197,7 +197,7 @@

    InsertEntity

    InsertEntity: = "InsertEntity"
    @@ -212,7 +212,7 @@

    Keyboard

    Keyboard: = "Keyboard"
    @@ -228,7 +228,7 @@

    ListChain

    ListChain: = "ListChain"
    @@ -243,7 +243,7 @@

    Paste

    Paste: = "Paste"
    @@ -258,7 +258,7 @@

    SetContent

    SetContent: = "SetContent"
    @@ -273,7 +273,7 @@

    SwitchToDarkMode

    SwitchToDarkMode: = "SwitchToDarkMode"
    @@ -288,7 +288,7 @@

    SwitchToLightMode

    SwitchToLightMode: = "SwitchToLightMode"
    diff --git a/docs/enums/roosterjs_editor_types.clearformatmode.html b/docs/enums/roosterjs_editor_types.clearformatmode.html index 88465359ee7..d9bc5257875 100644 --- a/docs/enums/roosterjs_editor_types.clearformatmode.html +++ b/docs/enums/roosterjs_editor_types.clearformatmode.html @@ -96,7 +96,7 @@

    AutoDetect

    AutoDetect: = 2
    @@ -111,7 +111,7 @@

    Block

    Block: = 1
    @@ -126,7 +126,7 @@

    Inline

    Inline: = 0
    diff --git a/docs/enums/roosterjs_editor_types.colortransformdirection.html b/docs/enums/roosterjs_editor_types.colortransformdirection.html index fffcaf0bd7f..f4b11c556e7 100644 --- a/docs/enums/roosterjs_editor_types.colortransformdirection.html +++ b/docs/enums/roosterjs_editor_types.colortransformdirection.html @@ -95,7 +95,7 @@

    DarkToLight

    DarkToLight: = 1
    @@ -110,7 +110,7 @@

    LightToDark

    LightToDark: = 0
    diff --git a/docs/enums/roosterjs_editor_types.contentposition.html b/docs/enums/roosterjs_editor_types.contentposition.html index f97dbf98115..8ed55cebe0c 100644 --- a/docs/enums/roosterjs_editor_types.contentposition.html +++ b/docs/enums/roosterjs_editor_types.contentposition.html @@ -101,7 +101,7 @@

    Begin

    Begin: = 0
    @@ -116,7 +116,7 @@

    DomEnd

    DomEnd: = 2
    @@ -131,7 +131,7 @@

    End

    End: = 1
    @@ -146,7 +146,7 @@

    Outside

    Outside: = 4
    @@ -161,7 +161,7 @@

    Range

    Range: = 5
    @@ -176,7 +176,7 @@

    SelectionStart

    SelectionStart: = 3
    diff --git a/docs/enums/roosterjs_editor_types.contenttype.html b/docs/enums/roosterjs_editor_types.contenttype.html index a0a54c61782..308ef245f7e 100644 --- a/docs/enums/roosterjs_editor_types.contenttype.html +++ b/docs/enums/roosterjs_editor_types.contenttype.html @@ -95,7 +95,7 @@

    HTML

    HTML: = "text/html"
    @@ -110,7 +110,7 @@

    PlainText

    PlainText: = "text/plain"
    diff --git a/docs/enums/roosterjs_editor_types.contenttypeprefix.html b/docs/enums/roosterjs_editor_types.contenttypeprefix.html index 60550d0a0c1..00ec960a0cd 100644 --- a/docs/enums/roosterjs_editor_types.contenttypeprefix.html +++ b/docs/enums/roosterjs_editor_types.contenttypeprefix.html @@ -95,7 +95,7 @@

    Image

    Image: = "image/"
    @@ -110,7 +110,7 @@

    Text

    Text: = "text/"
    diff --git a/docs/enums/roosterjs_editor_types.darkmodedatasetnames.html b/docs/enums/roosterjs_editor_types.darkmodedatasetnames.html index d316a88a201..b9117eca7c5 100644 --- a/docs/enums/roosterjs_editor_types.darkmodedatasetnames.html +++ b/docs/enums/roosterjs_editor_types.darkmodedatasetnames.html @@ -99,7 +99,7 @@

    OriginalAttributeBackgroundColor

    OriginalAttributeBackgroundColor: = "ogab"
    @@ -114,7 +114,7 @@

    OriginalAttributeColor

    OriginalAttributeColor: = "ogac"
    @@ -129,7 +129,7 @@

    OriginalStyleBackgroundColor

    OriginalStyleBackgroundColor: = "ogsb"
    @@ -144,7 +144,7 @@

    OriginalStyleColor

    OriginalStyleColor: = "ogsc"
    diff --git a/docs/enums/roosterjs_editor_types.definitiontype.html b/docs/enums/roosterjs_editor_types.definitiontype.html index b6e2b9ed67f..80cec792e70 100644 --- a/docs/enums/roosterjs_editor_types.definitiontype.html +++ b/docs/enums/roosterjs_editor_types.definitiontype.html @@ -99,7 +99,7 @@

    Array

    Array: = 3
    @@ -114,7 +114,7 @@

    Boolean

    Boolean: = 0
    @@ -129,7 +129,7 @@

    Customize

    Customize: = 5
    @@ -144,7 +144,7 @@

    Number

    Number: = 1
    @@ -159,7 +159,7 @@

    Object

    Object: = 4
    @@ -174,7 +174,7 @@

    String

    String: = 2
    diff --git a/docs/enums/roosterjs_editor_types.delimiterclasses.html b/docs/enums/roosterjs_editor_types.delimiterclasses.html index 5f48fa14b38..b44473c143a 100644 --- a/docs/enums/roosterjs_editor_types.delimiterclasses.html +++ b/docs/enums/roosterjs_editor_types.delimiterclasses.html @@ -95,7 +95,7 @@

    DELIMITER_AFTER

    DELIMITER_AFTER: = "entityDelimiterAfter"
    @@ -110,7 +110,7 @@

    DELIMITER_BEFORE

    DELIMITER_BEFORE: = "entityDelimiterBefore"
    diff --git a/docs/enums/roosterjs_editor_types.direction.html b/docs/enums/roosterjs_editor_types.direction.html index 66bbb7d6b1a..18bf7a6cfd5 100644 --- a/docs/enums/roosterjs_editor_types.direction.html +++ b/docs/enums/roosterjs_editor_types.direction.html @@ -95,7 +95,7 @@

    LeftToRight

    LeftToRight: = 0
    @@ -110,7 +110,7 @@

    RightToLeft

    RightToLeft: = 1
    diff --git a/docs/enums/roosterjs_editor_types.documentcommand.html b/docs/enums/roosterjs_editor_types.documentcommand.html index d30431d0063..be891f34d10 100644 --- a/docs/enums/roosterjs_editor_types.documentcommand.html +++ b/docs/enums/roosterjs_editor_types.documentcommand.html @@ -141,7 +141,7 @@

    AutoUrlDetect

    AutoUrlDetect: = "AutoUrlDetect"
    @@ -156,7 +156,7 @@

    BackColor

    BackColor: = "backColor"
    @@ -173,7 +173,7 @@

    Bold

    Bold: = "bold"
    @@ -188,7 +188,7 @@

    ClearAuthenticationCache

    ClearAuthenticationCache: = "ClearAuthenticationCache"
    @@ -203,7 +203,7 @@

    ContentReadOnly

    ContentReadOnly: = "contentReadOnly"
    @@ -219,7 +219,7 @@

    Copy

    Copy: = "copy"
    @@ -235,7 +235,7 @@

    CreateLink

    CreateLink: = "createLink"
    @@ -252,7 +252,7 @@

    Cut

    Cut: = "cut"
    @@ -268,7 +268,7 @@

    DecreaseFontSize

    DecreaseFontSize: = "decreaseFontSize"
    @@ -283,7 +283,7 @@

    DefaultParagraphSeparator

    DefaultParagraphSeparator: = "defaultParagraphSeparator"
    @@ -299,7 +299,7 @@

    Delete

    Delete: = "delete"
    @@ -314,7 +314,7 @@

    EnableInlineTableEditing

    EnableInlineTableEditing: = "enableInlineTableEditing"
    @@ -329,7 +329,7 @@

    EnableObjectResizing

    EnableObjectResizing: = "enableObjectResizing"
    @@ -344,7 +344,7 @@

    FontName

    FontName: = "fontName"
    @@ -360,7 +360,7 @@

    FontSize

    FontSize: = "fontSize"
    @@ -375,7 +375,7 @@

    ForeColor

    ForeColor: = "foreColor"
    @@ -391,7 +391,7 @@

    FormatBlock

    FormatBlock: = "formatBlock"
    @@ -409,7 +409,7 @@

    ForwardDelete

    ForwardDelete: = "forwardDelete"
    @@ -424,7 +424,7 @@

    Heading

    Heading: = "heading"
    @@ -440,7 +440,7 @@

    HiliteColor

    HiliteColor: = "hiliteColor"
    @@ -456,7 +456,7 @@

    IncreaseFontSize

    IncreaseFontSize: = "increaseFontSize"
    @@ -471,7 +471,7 @@

    Indent

    Indent: = "indent"
    @@ -487,7 +487,7 @@

    InsertBrOnReturn

    InsertBrOnReturn: = "insertBrOnReturn"
    @@ -503,7 +503,7 @@

    InsertHTML

    InsertHTML: = "insertHTML"
    @@ -519,7 +519,7 @@

    InsertHorizontalRule

    InsertHorizontalRule: = "insertHorizontalRule"
    @@ -534,7 +534,7 @@

    InsertImage

    InsertImage: = "insertImage"
    @@ -550,7 +550,7 @@

    InsertOrderedList

    InsertOrderedList: = "insertOrderedList"
    @@ -565,7 +565,7 @@

    InsertParagraph

    InsertParagraph: = "insertParagraph"
    @@ -581,7 +581,7 @@

    InsertText

    InsertText: = "insertText"
    @@ -596,7 +596,7 @@

    InsertUnorderedList

    InsertUnorderedList: = "insertUnorderedList"
    @@ -611,7 +611,7 @@

    Italic

    Italic: = "italic"
    @@ -627,7 +627,7 @@

    JustifyCenter

    JustifyCenter: = "justifyCenter"
    @@ -642,7 +642,7 @@

    JustifyFull

    JustifyFull: = "justifyFull"
    @@ -657,7 +657,7 @@

    JustifyLeft

    JustifyLeft: = "justifyLeft"
    @@ -672,7 +672,7 @@

    JustifyRight

    JustifyRight: = "justifyRight"
    @@ -687,7 +687,7 @@

    Outdent

    Outdent: = "outdent"
    @@ -702,7 +702,7 @@

    Paste

    Paste: = "paste"
    @@ -717,7 +717,7 @@

    Redo

    Redo: = "redo"
    @@ -732,7 +732,7 @@

    RemoveFormat

    RemoveFormat: = "removeFormat"
    @@ -747,7 +747,7 @@

    SelectAll

    SelectAll: = "selectAll"
    @@ -762,7 +762,7 @@

    StrikeThrough

    StrikeThrough: = "strikeThrough"
    @@ -777,7 +777,7 @@

    StyleWithCSS

    StyleWithCSS: = "styleWithCSS"
    @@ -792,7 +792,7 @@

    Subscript

    Subscript: = "subscript"
    @@ -807,7 +807,7 @@

    Superscript

    Superscript: = "superscript"
    @@ -822,7 +822,7 @@

    Underline

    Underline: = "underline"
    @@ -837,7 +837,7 @@

    Undo

    Undo: = "undo"
    @@ -852,7 +852,7 @@

    Unlink

    Unlink: = "unlink"
    diff --git a/docs/enums/roosterjs_editor_types.documentposition.html b/docs/enums/roosterjs_editor_types.documentposition.html index ccd76cc34f0..0e4f6af1f74 100644 --- a/docs/enums/roosterjs_editor_types.documentposition.html +++ b/docs/enums/roosterjs_editor_types.documentposition.html @@ -100,7 +100,7 @@

    ContainedBy

    ContainedBy: = 16
    @@ -115,7 +115,7 @@

    Contains

    Contains: = 8
    @@ -130,7 +130,7 @@

    Disconnected

    Disconnected: = 1
    @@ -145,7 +145,7 @@

    Following

    Following: = 4
    @@ -160,7 +160,7 @@

    Preceding

    Preceding: = 2
    @@ -175,7 +175,7 @@

    Same

    Same: = 0
    diff --git a/docs/enums/roosterjs_editor_types.entityclasses.html b/docs/enums/roosterjs_editor_types.entityclasses.html index 428ffee2884..3e082b20857 100644 --- a/docs/enums/roosterjs_editor_types.entityclasses.html +++ b/docs/enums/roosterjs_editor_types.entityclasses.html @@ -97,7 +97,7 @@

    ENTITY_ID_PREFIX

    ENTITY_ID_PREFIX: = "_EId_"
    @@ -112,7 +112,7 @@

    ENTITY_INFO_NAME

    ENTITY_INFO_NAME: = "_Entity"
    @@ -127,7 +127,7 @@

    ENTITY_READONLY_PREFIX

    ENTITY_READONLY_PREFIX: = "_EReadonly_"
    @@ -142,7 +142,7 @@

    ENTITY_TYPE_PREFIX

    ENTITY_TYPE_PREFIX: = "_EType_"
    diff --git a/docs/enums/roosterjs_editor_types.entityoperation.html b/docs/enums/roosterjs_editor_types.entityoperation.html index 0363888c540..882d431f86a 100644 --- a/docs/enums/roosterjs_editor_types.entityoperation.html +++ b/docs/enums/roosterjs_editor_types.entityoperation.html @@ -105,7 +105,7 @@

    AddShadowRoot

    AddShadowRoot: = 9
    @@ -121,7 +121,7 @@

    Click

    Click: = 1
    @@ -136,7 +136,7 @@

    ContextMenu

    ContextMenu: = 2
    @@ -151,7 +151,7 @@

    Escape

    Escape: = 3
    @@ -166,7 +166,7 @@

    NewEntity

    NewEntity: = 0
    @@ -185,7 +185,7 @@

    Overwrite

    Overwrite: = 6
    @@ -202,7 +202,7 @@

    PartialOverwrite

    PartialOverwrite: = 7
    @@ -218,7 +218,7 @@

    RemoveFromEnd

    RemoveFromEnd: = 5
    @@ -233,7 +233,7 @@

    RemoveFromStart

    RemoveFromStart: = 4
    @@ -248,7 +248,7 @@

    RemoveShadowRoot

    RemoveShadowRoot: = 10
    @@ -264,7 +264,7 @@

    ReplaceTemporaryContent

    ReplaceTemporaryContent: = 8
    @@ -283,7 +283,7 @@

    UpdateEntityState

    UpdateEntityState: = 11
    diff --git a/docs/enums/roosterjs_editor_types.experimentalfeatures.html b/docs/enums/roosterjs_editor_types.experimentalfeatures.html index 6faf7d6641d..3531678cdca 100644 --- a/docs/enums/roosterjs_editor_types.experimentalfeatures.html +++ b/docs/enums/roosterjs_editor_types.experimentalfeatures.html @@ -123,7 +123,7 @@

    AdaptiveHandlesResizer

    AdaptiveHandlesResizer: = "AdaptiveHandlesResizer"
    @@ -141,7 +141,7 @@

    AlwaysApplyDefaultFormat

    AlwaysApplyDefaultFormat: = "AlwaysApplyDefaultFormat"
    @@ -159,7 +159,7 @@

    AutoFormatList

    AutoFormatList: = "AutoFormatList"
    @@ -174,7 +174,7 @@

    AutoHyphen

    AutoHyphen: = "AutoHyphen"
    @@ -192,7 +192,7 @@

    ContentModelPaste

    ContentModelPaste: = "ContentModelPaste"
    @@ -207,7 +207,7 @@

    ConvertSingleImageBody

    ConvertSingleImageBody: = "ConvertSingleImageBody"
    @@ -225,7 +225,7 @@

    DefaultFormatInSpan

    DefaultFormatInSpan: = "DefaultFormatInSpan"
    @@ -241,7 +241,7 @@

    DefaultFormatOnContainer

    DefaultFormatOnContainer: = "DefaultFormatOnContainer"
    @@ -257,7 +257,7 @@

    DeleteTableWithBackspace

    DeleteTableWithBackspace: = "DeleteTableWithBackspace"
    @@ -272,7 +272,7 @@

    DisableListChain

    DisableListChain: = "DisableListChain"
    @@ -287,7 +287,7 @@

    EditWithContentModel

    EditWithContentModel: = "EditWithContentModel"
    @@ -302,7 +302,7 @@

    ImageCrop

    ImageCrop: = "ImageCrop"
    @@ -319,7 +319,7 @@

    ImageRotate

    ImageRotate: = "ImageRotate"
    @@ -336,7 +336,7 @@

    ImageSelection

    ImageSelection: = "ImageSelection"
    @@ -354,7 +354,7 @@

    InlineEntityReadOnlyDelimiters

    InlineEntityReadOnlyDelimiters: = "InlineEntityReadOnlyDelimiters"
    @@ -369,7 +369,7 @@

    ListChain

    ListChain: = "ListChain"
    @@ -386,7 +386,7 @@

    ListItemAlignment

    ListItemAlignment: = "ListItemAlignment"
    @@ -404,7 +404,7 @@

    MergePastedLine

    MergePastedLine: = "MergePastedLine"
    @@ -421,7 +421,7 @@

    NewBullet

    NewBullet: = "NewBullet"
    @@ -438,7 +438,7 @@

    NewIndentation

    NewIndentation: = "NewIndentation"
    @@ -455,7 +455,7 @@

    NewNumbering

    NewNumbering: = "NewNumbering"
    @@ -472,7 +472,7 @@

    NormalizeList

    NormalizeList: = "NormalizeList"
    @@ -491,7 +491,7 @@

    PasteWithLinkPreview

    PasteWithLinkPreview: = "PasteWithLinkPreview"
    @@ -508,7 +508,7 @@

    PendingStyleBasedFormat

    PendingStyleBasedFormat: = "PendingStyleBasedFormat"
    @@ -528,7 +528,7 @@

    ReusableContentModel

    ReusableContentModel: = "ReusableContentModel"
    @@ -543,7 +543,7 @@

    ReuseAllAncestorListElements

    ReuseAllAncestorListElements: = "ReuseAllAncestorListElements"
    @@ -561,7 +561,7 @@

    SingleDirectionResize

    SingleDirectionResize: = "SingleDirectionResize"
    @@ -578,7 +578,7 @@

    TabKeyTextFeatures

    TabKeyTextFeatures: = "TabKeyTextFeatures"
    @@ -593,7 +593,7 @@

    TableAlignment

    TableAlignment: = "TableAlignment"
    @@ -611,7 +611,7 @@

    VariableBasedDarkColor

    VariableBasedDarkColor: = "VariableBasedDarkColor"
    diff --git a/docs/enums/roosterjs_editor_types.fontsizechange.html b/docs/enums/roosterjs_editor_types.fontsizechange.html index 380bd6a3786..0326df5b83b 100644 --- a/docs/enums/roosterjs_editor_types.fontsizechange.html +++ b/docs/enums/roosterjs_editor_types.fontsizechange.html @@ -96,7 +96,7 @@

    Decrease

    Decrease: = 1
    @@ -111,7 +111,7 @@

    Increase

    Increase: = 0
    diff --git a/docs/enums/roosterjs_editor_types.getcontentmode.html b/docs/enums/roosterjs_editor_types.getcontentmode.html index e98dcf10ecb..715b74e0128 100644 --- a/docs/enums/roosterjs_editor_types.getcontentmode.html +++ b/docs/enums/roosterjs_editor_types.getcontentmode.html @@ -98,7 +98,7 @@

    CleanHTML

    CleanHTML: = 0
    @@ -116,7 +116,7 @@

    PlainText

    PlainText: = 3
    @@ -131,7 +131,7 @@

    PlainTextFast

    PlainTextFast: = 4
    @@ -148,7 +148,7 @@

    RawHTMLOnly

    RawHTMLOnly: = 1
    @@ -163,7 +163,7 @@

    RawHTMLWithSelection

    RawHTMLWithSelection: = 2
    diff --git a/docs/enums/roosterjs_editor_types.imageeditoperation.html b/docs/enums/roosterjs_editor_types.imageeditoperation.html index 5ba5cb6f4e9..31716e9ad82 100644 --- a/docs/enums/roosterjs_editor_types.imageeditoperation.html +++ b/docs/enums/roosterjs_editor_types.imageeditoperation.html @@ -101,7 +101,7 @@

    All

    All: = 15
    @@ -116,7 +116,7 @@

    CornerResize

    CornerResize: = 1
    @@ -131,7 +131,7 @@

    Crop

    Crop: = 8
    @@ -146,7 +146,7 @@

    None

    None: = 0
    @@ -161,7 +161,7 @@

    Resize

    Resize: = 3
    @@ -176,7 +176,7 @@

    ResizeAndRotate

    ResizeAndRotate: = 7
    @@ -191,7 +191,7 @@

    Rotate

    Rotate: = 4
    @@ -206,7 +206,7 @@

    SideResize

    SideResize: = 2
    diff --git a/docs/enums/roosterjs_editor_types.indentation.html b/docs/enums/roosterjs_editor_types.indentation.html index 04ad486cc63..db7c02a9ab0 100644 --- a/docs/enums/roosterjs_editor_types.indentation.html +++ b/docs/enums/roosterjs_editor_types.indentation.html @@ -96,7 +96,7 @@

    Decrease

    Decrease: = 1
    @@ -111,7 +111,7 @@

    Increase

    Increase: = 0
    diff --git a/docs/enums/roosterjs_editor_types.keys.html b/docs/enums/roosterjs_editor_types.keys.html index 3b6341a5d46..25661632d56 100644 --- a/docs/enums/roosterjs_editor_types.keys.html +++ b/docs/enums/roosterjs_editor_types.keys.html @@ -130,7 +130,7 @@

    ALT

    ALT: = 18
    @@ -140,7 +140,7 @@

    B

    B: = 66
    @@ -150,7 +150,7 @@

    BACKSPACE

    BACKSPACE: = 8
    @@ -160,7 +160,7 @@

    COMMA

    COMMA: = 188
    @@ -170,7 +170,7 @@

    CONTENTCHANGED

    CONTENTCHANGED: = 257
    @@ -185,7 +185,7 @@

    CTRL_LEFT

    CTRL_LEFT: = 17
    @@ -195,7 +195,7 @@

    Ctrl

    Ctrl: = 4096
    @@ -205,7 +205,7 @@

    DASH_UNDERSCORE

    DASH_UNDERSCORE: = 189
    @@ -215,7 +215,7 @@

    DELETE

    DELETE: = 46
    @@ -225,7 +225,7 @@

    DOWN

    DOWN: = 40
    @@ -235,7 +235,7 @@

    EIGHT_ASTERISK

    EIGHT_ASTERISK: = 56
    @@ -245,7 +245,7 @@

    EIGHT_ASTIRISK

    EIGHT_ASTIRISK: = 56
    @@ -262,7 +262,7 @@

    END

    END: = 35
    @@ -272,7 +272,7 @@

    ENTER

    ENTER: = 13
    @@ -282,7 +282,7 @@

    ESCAPE

    ESCAPE: = 27
    @@ -292,7 +292,7 @@

    FORWARDSLASH

    FORWARDSLASH: = 191
    @@ -309,7 +309,7 @@

    FORWARD_SLASH

    FORWARD_SLASH: = 191
    @@ -319,7 +319,7 @@

    GRAVE_TILDE

    GRAVE_TILDE: = 192
    @@ -329,7 +329,7 @@

    HOME

    HOME: = 36
    @@ -339,7 +339,7 @@

    I

    I: = 73
    @@ -349,7 +349,7 @@

    LEFT

    LEFT: = 37
    @@ -359,7 +359,7 @@

    META_LEFT

    META_LEFT: = 91
    @@ -369,7 +369,7 @@

    Meta

    Meta: = 8192
    @@ -379,7 +379,7 @@

    NULL

    NULL: = 0
    @@ -389,7 +389,7 @@

    PAGEUP

    PAGEUP: = 33
    @@ -399,7 +399,7 @@

    PERIOD

    PERIOD: = 190
    @@ -409,7 +409,7 @@

    PRINT_SCREEN

    PRINT_SCREEN: = 44
    @@ -419,7 +419,7 @@

    RANGE

    RANGE: = 258
    @@ -429,7 +429,7 @@

    RIGHT

    RIGHT: = 39
    @@ -439,7 +439,7 @@

    SHIFT

    SHIFT: = 16
    @@ -449,7 +449,7 @@

    SPACE

    SPACE: = 32
    @@ -459,7 +459,7 @@

    Shift

    Shift: = 16384
    @@ -469,7 +469,7 @@

    TAB

    TAB: = 9
    @@ -479,7 +479,7 @@

    U

    U: = 85
    @@ -489,7 +489,7 @@

    UP

    UP: = 38
    @@ -499,7 +499,7 @@

    Y

    Y: = 89
    @@ -509,7 +509,7 @@

    Z

    Z: = 90
    diff --git a/docs/enums/roosterjs_editor_types.knowncreateelementdataindex.html b/docs/enums/roosterjs_editor_types.knowncreateelementdataindex.html index a12cdb06f6d..1c36bc025a9 100644 --- a/docs/enums/roosterjs_editor_types.knowncreateelementdataindex.html +++ b/docs/enums/roosterjs_editor_types.knowncreateelementdataindex.html @@ -106,7 +106,7 @@

    BlockListItem

    BlockListItem: = 4
    @@ -121,7 +121,7 @@

    BlockquoteWrapper

    BlockquoteWrapper: = 2
    @@ -136,7 +136,7 @@

    ContextMenuWrapper

    ContextMenuWrapper: = 5
    @@ -151,7 +151,7 @@

    CopyPasteTempDiv

    CopyPasteTempDiv: = 3
    @@ -166,7 +166,7 @@

    EmptyLine

    EmptyLine: = 1
    @@ -181,7 +181,7 @@

    EmptyLineFormatInSpan

    EmptyLineFormatInSpan: = 12
    @@ -197,7 +197,7 @@

    ImageEditWrapper

    ImageEditWrapper: = 6
    @@ -212,7 +212,7 @@

    None

    None: = 0
    @@ -227,7 +227,7 @@

    TableHorizontalResizer

    TableHorizontalResizer: = 7
    @@ -243,7 +243,7 @@

    TableResizerLTR

    TableResizerLTR: = 9
    @@ -259,7 +259,7 @@

    TableResizerRTL

    TableResizerRTL: = 10
    @@ -275,7 +275,7 @@

    TableSelector

    TableSelector: = 11
    @@ -291,7 +291,7 @@

    TableVerticalResizer

    TableVerticalResizer: = 8
    diff --git a/docs/enums/roosterjs_editor_types.knownpastesourcetype.html b/docs/enums/roosterjs_editor_types.knownpastesourcetype.html index e7f86f9e0a8..44c657eb1f7 100644 --- a/docs/enums/roosterjs_editor_types.knownpastesourcetype.html +++ b/docs/enums/roosterjs_editor_types.knownpastesourcetype.html @@ -101,7 +101,7 @@

    Default

    Default: = 6
    @@ -111,7 +111,7 @@

    ExcelDesktop

    ExcelDesktop: = 1
    @@ -121,7 +121,7 @@

    ExcelOnline

    ExcelOnline: = 2
    @@ -131,7 +131,7 @@

    GoogleSheets

    GoogleSheets: = 4
    @@ -141,7 +141,7 @@

    PowerPointDesktop

    PowerPointDesktop: = 3
    @@ -151,7 +151,7 @@

    SingleImage

    SingleImage: = 7
    @@ -161,7 +161,7 @@

    WacComponents

    WacComponents: = 5
    @@ -171,7 +171,7 @@

    WordDesktop

    WordDesktop: = 0
    diff --git a/docs/enums/roosterjs_editor_types.listtype.html b/docs/enums/roosterjs_editor_types.listtype.html index 72eed748800..f6b39427ecf 100644 --- a/docs/enums/roosterjs_editor_types.listtype.html +++ b/docs/enums/roosterjs_editor_types.listtype.html @@ -96,7 +96,7 @@

    None

    None: = 0
    @@ -112,7 +112,7 @@

    Ordered

    Ordered: = 1
    @@ -128,7 +128,7 @@

    Unordered

    Unordered: = 2
    diff --git a/docs/enums/roosterjs_editor_types.nodetype.html b/docs/enums/roosterjs_editor_types.nodetype.html index 95a107de41d..5e5ef74ac44 100644 --- a/docs/enums/roosterjs_editor_types.nodetype.html +++ b/docs/enums/roosterjs_editor_types.nodetype.html @@ -103,7 +103,7 @@

    Attribute

    Attribute: = 2
    @@ -118,7 +118,7 @@

    Comment

    Comment: = 8
    @@ -133,7 +133,7 @@

    Document

    Document: = 9
    @@ -148,7 +148,7 @@

    DocumentFragment

    DocumentFragment: = 11
    @@ -163,7 +163,7 @@

    DocumentType

    DocumentType: = 10
    @@ -178,7 +178,7 @@

    Element

    Element: = 1
    @@ -193,7 +193,7 @@

    ProcessingInstruction

    ProcessingInstruction: = 7
    @@ -208,7 +208,7 @@

    Text

    Text: = 3
    diff --git a/docs/enums/roosterjs_editor_types.numberinglisttype.html b/docs/enums/roosterjs_editor_types.numberinglisttype.html index 2f1cd2b9506..466c14b7140 100644 --- a/docs/enums/roosterjs_editor_types.numberinglisttype.html +++ b/docs/enums/roosterjs_editor_types.numberinglisttype.html @@ -115,7 +115,7 @@

    Decimal

    Decimal: = 1
    @@ -130,7 +130,7 @@

    DecimalDash

    DecimalDash: = 2
    @@ -145,7 +145,7 @@

    DecimalDoubleParenthesis

    DecimalDoubleParenthesis: = 4
    @@ -160,7 +160,7 @@

    DecimalParenthesis

    DecimalParenthesis: = 3
    @@ -175,7 +175,7 @@

    LowerAlpha

    LowerAlpha: = 5
    @@ -190,7 +190,7 @@

    LowerAlphaDash

    LowerAlphaDash: = 8
    @@ -205,7 +205,7 @@

    LowerAlphaDoubleParenthesis

    LowerAlphaDoubleParenthesis: = 7
    @@ -220,7 +220,7 @@

    LowerAlphaParenthesis

    LowerAlphaParenthesis: = 6
    @@ -235,7 +235,7 @@

    LowerRoman

    LowerRoman: = 13
    @@ -250,7 +250,7 @@

    LowerRomanDash

    LowerRomanDash: = 16
    @@ -265,7 +265,7 @@

    LowerRomanDoubleParenthesis

    LowerRomanDoubleParenthesis: = 15
    @@ -280,7 +280,7 @@

    LowerRomanParenthesis

    LowerRomanParenthesis: = 14
    @@ -295,7 +295,7 @@

    Max

    Max: = 20
    @@ -310,7 +310,7 @@

    Min

    Min: = 1
    @@ -325,7 +325,7 @@

    UpperAlpha

    UpperAlpha: = 9
    @@ -340,7 +340,7 @@

    UpperAlphaDash

    UpperAlphaDash: = 12
    @@ -355,7 +355,7 @@

    UpperAlphaDoubleParenthesis

    UpperAlphaDoubleParenthesis: = 11
    @@ -370,7 +370,7 @@

    UpperAlphaParenthesis

    UpperAlphaParenthesis: = 10
    @@ -385,7 +385,7 @@

    UpperRoman

    UpperRoman: = 17
    @@ -400,7 +400,7 @@

    UpperRomanDash

    UpperRomanDash: = 20
    @@ -415,7 +415,7 @@

    UpperRomanDoubleParenthesis

    UpperRomanDoubleParenthesis: = 19
    @@ -430,7 +430,7 @@

    UpperRomanParenthesis

    UpperRomanParenthesis: = 18
    diff --git a/docs/enums/roosterjs_editor_types.pastetype.html b/docs/enums/roosterjs_editor_types.pastetype.html index bb65c70fbd2..f619cb81768 100644 --- a/docs/enums/roosterjs_editor_types.pastetype.html +++ b/docs/enums/roosterjs_editor_types.pastetype.html @@ -97,7 +97,7 @@

    AsImage

    AsImage: = 3
    @@ -112,7 +112,7 @@

    AsPlainText

    AsPlainText: = 1
    @@ -127,7 +127,7 @@

    MergeFormat

    MergeFormat: = 2
    @@ -142,7 +142,7 @@

    Normal

    Normal: = 0
    diff --git a/docs/enums/roosterjs_editor_types.plugineventtype.html b/docs/enums/roosterjs_editor_types.plugineventtype.html index ca6e7dd3a5c..6477da85ff5 100644 --- a/docs/enums/roosterjs_editor_types.plugineventtype.html +++ b/docs/enums/roosterjs_editor_types.plugineventtype.html @@ -117,7 +117,7 @@

    BeforeCutCopy

    BeforeCutCopy: = 9
    @@ -132,7 +132,7 @@

    BeforeDispose

    BeforeDispose: = 12
    @@ -147,7 +147,7 @@

    BeforeKeyboardEditing

    BeforeKeyboardEditing: = 23
    @@ -164,7 +164,7 @@

    BeforePaste

    BeforePaste: = 10
    @@ -179,7 +179,7 @@

    BeforeSetContent

    BeforeSetContent: = 20
    @@ -195,7 +195,7 @@

    CompositionEnd

    CompositionEnd: = 4
    @@ -210,7 +210,7 @@

    ContentChanged

    ContentChanged: = 7
    @@ -225,7 +225,7 @@

    ContextMenu

    ContextMenu: = 16
    @@ -240,7 +240,7 @@

    EditImage

    EditImage: = 19
    @@ -255,7 +255,7 @@

    EditorReady

    EditorReady: = 11
    @@ -270,7 +270,7 @@

    EnteredShadowEdit

    EnteredShadowEdit: = 17
    @@ -285,7 +285,7 @@

    EntityOperation

    EntityOperation: = 15
    @@ -300,7 +300,7 @@

    ExtractContentWithDom

    ExtractContentWithDom: = 8
    @@ -318,7 +318,7 @@

    Input

    Input: = 3
    @@ -333,7 +333,7 @@

    KeyDown

    KeyDown: = 0
    @@ -348,7 +348,7 @@

    KeyPress

    KeyPress: = 1
    @@ -363,7 +363,7 @@

    KeyUp

    KeyUp: = 2
    @@ -378,7 +378,7 @@

    LeavingShadowEdit

    LeavingShadowEdit: = 18
    @@ -393,7 +393,7 @@

    MouseDown

    MouseDown: = 5
    @@ -408,7 +408,7 @@

    MouseUp

    MouseUp: = 6
    @@ -423,7 +423,7 @@

    PendingFormatStateChanged

    PendingFormatStateChanged: = 13
    @@ -438,7 +438,7 @@

    Scroll

    Scroll: = 14
    @@ -453,7 +453,7 @@

    SelectionChanged

    SelectionChanged: = 22
    @@ -469,7 +469,7 @@

    ZoomChanged

    ZoomChanged: = 21
    diff --git a/docs/enums/roosterjs_editor_types.positiontype.html b/docs/enums/roosterjs_editor_types.positiontype.html index 41d3f556927..96a143c28a2 100644 --- a/docs/enums/roosterjs_editor_types.positiontype.html +++ b/docs/enums/roosterjs_editor_types.positiontype.html @@ -97,7 +97,7 @@

    After

    After: = -3
    @@ -112,7 +112,7 @@

    Before

    Before: = -2
    @@ -127,7 +127,7 @@

    Begin

    Begin: = 0
    @@ -142,7 +142,7 @@

    End

    End: = -1
    diff --git a/docs/enums/roosterjs_editor_types.queryscope.html b/docs/enums/roosterjs_editor_types.queryscope.html index 2fbbff1295e..c9774afc64d 100644 --- a/docs/enums/roosterjs_editor_types.queryscope.html +++ b/docs/enums/roosterjs_editor_types.queryscope.html @@ -96,7 +96,7 @@

    Body

    Body: = 0
    @@ -111,7 +111,7 @@

    InSelection

    InSelection: = 2
    @@ -126,7 +126,7 @@

    OnSelection

    OnSelection: = 1
    diff --git a/docs/enums/roosterjs_editor_types.regiontype.html b/docs/enums/roosterjs_editor_types.regiontype.html index 1ab27ebe642..e98776e5bb4 100644 --- a/docs/enums/roosterjs_editor_types.regiontype.html +++ b/docs/enums/roosterjs_editor_types.regiontype.html @@ -94,7 +94,7 @@

    Table

    Table: = 0
    diff --git a/docs/enums/roosterjs_editor_types.selectionrangetypes.html b/docs/enums/roosterjs_editor_types.selectionrangetypes.html index c8774c6ac3f..3892947ded1 100644 --- a/docs/enums/roosterjs_editor_types.selectionrangetypes.html +++ b/docs/enums/roosterjs_editor_types.selectionrangetypes.html @@ -96,7 +96,7 @@

    ImageSelection

    ImageSelection: = 2
    @@ -111,7 +111,7 @@

    Normal

    Normal: = 0
    @@ -126,7 +126,7 @@

    TableSelection

    TableSelection: = 1
    diff --git a/docs/enums/roosterjs_editor_types.tableborderformat.html b/docs/enums/roosterjs_editor_types.tableborderformat.html index 71a4c6be7d8..45b16cdec5c 100644 --- a/docs/enums/roosterjs_editor_types.tableborderformat.html +++ b/docs/enums/roosterjs_editor_types.tableborderformat.html @@ -102,7 +102,7 @@

    CLEAR

    CLEAR: = 8
    @@ -117,7 +117,7 @@

    DEFAULT

    DEFAULT: = 0
    @@ -136,7 +136,7 @@

    ESPECIAL_TYPE_1

    ESPECIAL_TYPE_1: = 5
    @@ -156,7 +156,7 @@

    ESPECIAL_TYPE_2

    ESPECIAL_TYPE_2: = 6
    @@ -176,7 +176,7 @@

    ESPECIAL_TYPE_3

    ESPECIAL_TYPE_3: = 7
    @@ -194,7 +194,7 @@

    FIRST_COLUMN_HEADER_EXTERNAL

    FIRST_COLUMN_HEADER_EXTERNAL: = 4
    @@ -213,7 +213,7 @@

    LIST_WITH_SIDE_BORDERS

    LIST_WITH_SIDE_BORDERS: = 1
    @@ -232,7 +232,7 @@

    NO_HEADER_BORDERS

    NO_HEADER_BORDERS: = 2
    @@ -250,7 +250,7 @@

    NO_SIDE_BORDERS

    NO_SIDE_BORDERS: = 3
    diff --git a/docs/enums/roosterjs_editor_types.tableoperation.html b/docs/enums/roosterjs_editor_types.tableoperation.html index 1d64fd698ca..9685649234d 100644 --- a/docs/enums/roosterjs_editor_types.tableoperation.html +++ b/docs/enums/roosterjs_editor_types.tableoperation.html @@ -116,7 +116,7 @@

    AlignCellBottom

    AlignCellBottom: = 22
    @@ -131,7 +131,7 @@

    AlignCellCenter

    AlignCellCenter: = 18
    @@ -146,7 +146,7 @@

    AlignCellLeft

    AlignCellLeft: = 17
    @@ -161,7 +161,7 @@

    AlignCellMiddle

    AlignCellMiddle: = 21
    @@ -176,7 +176,7 @@

    AlignCellRight

    AlignCellRight: = 19
    @@ -191,7 +191,7 @@

    AlignCellTop

    AlignCellTop: = 20
    @@ -206,7 +206,7 @@

    AlignCenter

    AlignCenter: = 14
    @@ -221,7 +221,7 @@

    AlignLeft

    AlignLeft: = 15
    @@ -236,7 +236,7 @@

    AlignRight

    AlignRight: = 16
    @@ -251,7 +251,7 @@

    DeleteColumn

    DeleteColumn: = 5
    @@ -266,7 +266,7 @@

    DeleteRow

    DeleteRow: = 6
    @@ -281,7 +281,7 @@

    DeleteTable

    DeleteTable: = 4
    @@ -296,7 +296,7 @@

    InsertAbove

    InsertAbove: = 0
    @@ -311,7 +311,7 @@

    InsertBelow

    InsertBelow: = 1
    @@ -326,7 +326,7 @@

    InsertLeft

    InsertLeft: = 2
    @@ -341,7 +341,7 @@

    InsertRight

    InsertRight: = 3
    @@ -356,7 +356,7 @@

    MergeAbove

    MergeAbove: = 7
    @@ -371,7 +371,7 @@

    MergeBelow

    MergeBelow: = 8
    @@ -386,7 +386,7 @@

    MergeCells

    MergeCells: = 11
    @@ -401,7 +401,7 @@

    MergeLeft

    MergeLeft: = 9
    @@ -416,7 +416,7 @@

    MergeRight

    MergeRight: = 10
    @@ -431,7 +431,7 @@

    SplitHorizontally

    SplitHorizontally: = 12
    @@ -446,7 +446,7 @@

    SplitVertically

    SplitVertically: = 13
    diff --git a/docs/enums/roosterjs_react.knownribbonbuttonkey.html b/docs/enums/roosterjs_react.knownribbonbuttonkey.html index ac1b0efc96c..9448ccc2f51 100644 --- a/docs/enums/roosterjs_react.knownribbonbuttonkey.html +++ b/docs/enums/roosterjs_react.knownribbonbuttonkey.html @@ -124,7 +124,7 @@

    AlignCenter

    AlignCenter: = 15
    @@ -139,7 +139,7 @@

    AlignLeft

    AlignLeft: = 14
    @@ -154,7 +154,7 @@

    AlignRight

    AlignRight: = 16
    @@ -169,7 +169,7 @@

    BackgroundColor

    BackgroundColor: = 8
    @@ -184,7 +184,7 @@

    Bold

    Bold: = 0
    @@ -199,7 +199,7 @@

    BulletedList

    BulletedList: = 9
    @@ -214,7 +214,7 @@

    ClearFormat

    ClearFormat: = 30
    @@ -229,7 +229,7 @@

    Code

    Code: = 25
    @@ -244,7 +244,7 @@

    DecreaseFontSize

    DecreaseFontSize: = 6
    @@ -259,7 +259,7 @@

    DecreaseIndent

    DecreaseIndent: = 11
    @@ -274,7 +274,7 @@

    Font

    Font: = 3
    @@ -289,7 +289,7 @@

    FontSize

    FontSize: = 4
    @@ -304,7 +304,7 @@

    Header

    Header: = 24
    @@ -319,7 +319,7 @@

    IncreaseFontSize

    IncreaseFontSize: = 5
    @@ -334,7 +334,7 @@

    IncreaseIndent

    IncreaseIndent: = 12
    @@ -349,7 +349,7 @@

    InsertImage

    InsertImage: = 20
    @@ -364,7 +364,7 @@

    InsertLink

    InsertLink: = 17
    @@ -379,7 +379,7 @@

    InsertTable

    InsertTable: = 19
    @@ -394,7 +394,7 @@

    Italic

    Italic: = 1
    @@ -409,7 +409,7 @@

    Ltr

    Ltr: = 26
    @@ -424,7 +424,7 @@

    NumberedList

    NumberedList: = 10
    @@ -439,7 +439,7 @@

    Quote

    Quote: = 13
    @@ -454,7 +454,7 @@

    Redo

    Redo: = 29
    @@ -469,7 +469,7 @@

    RemoveLink

    RemoveLink: = 18
    @@ -484,7 +484,7 @@

    Rtl

    Rtl: = 27
    @@ -499,7 +499,7 @@

    Strikethrough

    Strikethrough: = 23
    @@ -514,7 +514,7 @@

    Subscript

    Subscript: = 22
    @@ -529,7 +529,7 @@

    Superscript

    Superscript: = 21
    @@ -544,7 +544,7 @@

    TextColor

    TextColor: = 7
    @@ -559,7 +559,7 @@

    Underline

    Underline: = 2
    @@ -574,7 +574,7 @@

    Undo

    Undo: = 28
    diff --git a/docs/enums/roosterjs_react.updatemode.html b/docs/enums/roosterjs_react.updatemode.html index d402a8037c4..2a782ea74e0 100644 --- a/docs/enums/roosterjs_react.updatemode.html +++ b/docs/enums/roosterjs_react.updatemode.html @@ -99,7 +99,7 @@

    Force

    Force: = 0
    @@ -114,7 +114,7 @@

    OnBlur

    OnBlur: = 16
    @@ -129,7 +129,7 @@

    OnContentChangedEvent

    OnContentChangedEvent: = 8
    @@ -144,7 +144,7 @@

    OnDispose

    OnDispose: = 2
    @@ -159,7 +159,7 @@

    OnInitialize

    OnInitialize: = 1
    @@ -174,7 +174,7 @@

    OnUserInput

    OnUserInput: = 4
    diff --git a/docs/interfaces/roosterjs_content_model_dom.nodetypemap.html b/docs/interfaces/roosterjs_content_model_dom.nodetypemap.html index 0453ec194e7..24fa3a14d79 100644 --- a/docs/interfaces/roosterjs_content_model_dom.nodetypemap.html +++ b/docs/interfaces/roosterjs_content_model_dom.nodetypemap.html @@ -109,7 +109,7 @@

    1

    1: HTMLElement
    @@ -124,7 +124,7 @@

    10

    10: DocumentType
    @@ -139,7 +139,7 @@

    11

    11: DocumentFragment
    @@ -154,7 +154,7 @@

    2

    2: Attr
    @@ -169,7 +169,7 @@

    3

    3: Text
    @@ -184,7 +184,7 @@

    7

    7: ProcessingInstruction
    @@ -199,7 +199,7 @@

    8

    8: Comment
    @@ -214,7 +214,7 @@

    9

    9: Document
    diff --git a/docs/interfaces/roosterjs_content_model_editor.border.html b/docs/interfaces/roosterjs_content_model_editor.border.html index 915e1b7a355..f208bb22a92 100644 --- a/docs/interfaces/roosterjs_content_model_editor.border.html +++ b/docs/interfaces/roosterjs_content_model_editor.border.html @@ -105,7 +105,7 @@

    Optional color

    color: string
    @@ -120,7 +120,7 @@

    Optional style

    style: string
    @@ -135,7 +135,7 @@

    Optional width

    width: string
    diff --git a/docs/interfaces/roosterjs_content_model_editor.compatiblecontentmodelbeforepasteevent.html b/docs/interfaces/roosterjs_content_model_editor.compatiblecontentmodelbeforepasteevent.html index fa867891ae4..b062f33d6d7 100644 --- a/docs/interfaces/roosterjs_content_model_editor.compatiblecontentmodelbeforepasteevent.html +++ b/docs/interfaces/roosterjs_content_model_editor.compatiblecontentmodelbeforepasteevent.html @@ -120,7 +120,7 @@

    clipboardData

    @@ -136,7 +136,7 @@

    domToModelOption

    @@ -152,7 +152,7 @@

    Optional eventDataCa
    @@ -178,7 +178,7 @@

    eventType

    @@ -194,7 +194,7 @@

    fragment

    @@ -210,7 +210,7 @@

    htmlAfter

    @@ -226,7 +226,7 @@

    htmlAttributes

    @@ -242,7 +242,7 @@

    htmlBefore

    @@ -258,7 +258,7 @@

    Readonly pasteType

    @@ -274,7 +274,7 @@

    sanitizingOption

    diff --git a/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteevent.html b/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteevent.html index c1bb91c5fcd..de923dd7ca7 100644 --- a/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteevent.html +++ b/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteevent.html @@ -120,7 +120,7 @@

    clipboardData

    @@ -136,7 +136,7 @@

    domToModelOption

    @@ -152,7 +152,7 @@

    Optional eventDataCa
    @@ -178,7 +178,7 @@

    eventType

    @@ -194,7 +194,7 @@

    fragment

    @@ -210,7 +210,7 @@

    htmlAfter

    @@ -226,7 +226,7 @@

    htmlAttributes

    @@ -242,7 +242,7 @@

    htmlBefore

    @@ -258,7 +258,7 @@

    Readonly pasteType

    @@ -274,7 +274,7 @@

    sanitizingOption

    diff --git a/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteeventdata.html b/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteeventdata.html index fd26c72c5f7..9365c17c929 100644 --- a/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteeventdata.html +++ b/docs/interfaces/roosterjs_content_model_editor.contentmodelbeforepasteeventdata.html @@ -123,7 +123,7 @@

    clipboardData

    @@ -138,7 +138,7 @@

    domToModelOption

    domToModelOption: Partial<DomToModelOption>
    @@ -154,7 +154,7 @@

    fragment

    @@ -170,7 +170,7 @@

    htmlAfter

    @@ -186,7 +186,7 @@

    htmlAttributes

    @@ -202,7 +202,7 @@

    htmlBefore

    @@ -218,7 +218,7 @@

    Readonly pasteType

    @@ -234,7 +234,7 @@

    sanitizingOption

    diff --git a/docs/interfaces/roosterjs_content_model_editor.contentmodelcoreapimap.html b/docs/interfaces/roosterjs_content_model_editor.contentmodelcoreapimap.html index 4ed2c3ca8ef..968b27e5840 100644 --- a/docs/interfaces/roosterjs_content_model_editor.contentmodelcoreapimap.html +++ b/docs/interfaces/roosterjs_content_model_editor.contentmodelcoreapimap.html @@ -132,7 +132,7 @@

    addUndoSnapshot

    @@ -163,7 +163,7 @@

    attachDomEvent

    @@ -192,7 +192,7 @@

    createContentModel

    createContentModel: CreateContentModel
    @@ -215,7 +215,7 @@

    createEditorContext

    createEditorContext: CreateEditorContext
    @@ -236,7 +236,7 @@

    createPasteFragment

    @@ -270,7 +270,7 @@

    ensureTypeInContainer

    @@ -300,7 +300,7 @@

    focus

    @@ -321,7 +321,7 @@

    getContent

    @@ -348,7 +348,7 @@

    getPendableFormatState

    @@ -375,7 +375,7 @@

    getSelectionRange

    @@ -402,7 +402,7 @@

    getSelectionRangeEx

    @@ -429,7 +429,7 @@

    getStyleBasedFormatState

    @@ -453,7 +453,7 @@

    hasFocus

    @@ -477,7 +477,7 @@

    insertNode

    @@ -501,7 +501,7 @@

    restoreUndoSnapshot

    @@ -525,7 +525,7 @@

    select

    @@ -559,7 +559,7 @@

    selectImage

    @@ -589,7 +589,7 @@

    selectRange

    @@ -618,7 +618,7 @@

    selectTable

    @@ -652,7 +652,7 @@

    setContent

    @@ -679,7 +679,7 @@

    setContentModel

    setContentModel: SetContentModel
    @@ -706,7 +706,7 @@

    switchShadowEdit

    @@ -730,7 +730,7 @@

    transformColor

    @@ -770,7 +770,7 @@

    triggerEvent

    diff --git a/docs/interfaces/roosterjs_content_model_editor.contentmodeleditorcore.html b/docs/interfaces/roosterjs_content_model_editor.contentmodeleditorcore.html index 46ff59b4797..13dff78710d 100644 --- a/docs/interfaces/roosterjs_content_model_editor.contentmodeleditorcore.html +++ b/docs/interfaces/roosterjs_content_model_editor.contentmodeleditorcore.html @@ -134,7 +134,7 @@

    addDelimiterForEntity

    addDelimiterForEntity: boolean
    @@ -150,7 +150,7 @@

    Readonly api

    @@ -165,7 +165,7 @@

    Optional cachedModel

    @@ -181,7 +181,7 @@

    Readonly contentDiv

    @@ -197,7 +197,7 @@

    darkColorHandler

    @@ -213,7 +213,7 @@

    defaultDomToModelOptions

    defaultDomToModelOptions: DomToModelOption
    @@ -228,7 +228,7 @@

    defaultFormat

    @@ -243,7 +243,7 @@

    defaultModelToDomOptions

    defaultModelToDomOptions: ModelToDomOption
    @@ -259,7 +259,7 @@

    getVisibleViewport

    @@ -290,7 +290,7 @@

    Optional imageSelection

    Inherited from EditorCore.imageSelectionBorderColor

    @@ -306,7 +306,7 @@

    Readonly originalApi

    @@ -322,7 +322,7 @@

    Readonly plugins

    @@ -337,7 +337,7 @@

    reuseModel

    reuseModel: boolean
    @@ -353,7 +353,7 @@

    sizeTransformer

    @@ -371,7 +371,7 @@

    Readonly trustedHTMLHandler

    Inherited from EditorCore.trustedHTMLHandler

    @@ -389,7 +389,7 @@

    zoomScale

    diff --git a/docs/interfaces/roosterjs_content_model_editor.contentmodeleditoroptions.html b/docs/interfaces/roosterjs_content_model_editor.contentmodeleditoroptions.html index c9ce12ca7d7..7dd6f2b0110 100644 --- a/docs/interfaces/roosterjs_content_model_editor.contentmodeleditoroptions.html +++ b/docs/interfaces/roosterjs_content_model_editor.contentmodeleditoroptions.html @@ -129,7 +129,7 @@

    Optional allowKeyboard

    Inherited from EditorOptions.allowKeyboardEventPropagation

    @@ -148,7 +148,7 @@

    Optional allowedCustom

    Inherited from EditorOptions.allowedCustomPasteType

    @@ -165,7 +165,7 @@

    Optional coreApiOver
    @@ -182,7 +182,7 @@

    Optional corePluginO
    @@ -198,7 +198,7 @@

    Optional defaultDomT
    defaultDomToModelOptions: DomToModelOption
    @@ -214,7 +214,7 @@

    Optional defaultFormat

    Inherited from EditorOptions.defaultFormat

    @@ -231,7 +231,7 @@

    Optional defaultModeldefaultModelToDomOptions: ModelToDomOption

    @@ -247,7 +247,7 @@

    Optional doNotAdjust
    @@ -263,7 +263,7 @@

    Optional experimentalFeat
    @@ -279,7 +279,7 @@

    Optional getDarkColo
    @@ -317,7 +317,7 @@

    Optional getVisibleV
    @@ -348,7 +348,7 @@

    Optional imageSelection

    Inherited from EditorOptions.imageSelectionBorderColor

    @@ -364,7 +364,7 @@

    Optional inDarkMode<
    @@ -380,7 +380,7 @@

    Optional initialContent

    Inherited from EditorOptions.initialContent

    @@ -397,7 +397,7 @@

    Optional onExternalC
    @@ -438,7 +438,7 @@

    Optional plugins

    @@ -457,7 +457,7 @@

    Optional scrollContainer<
    @@ -474,7 +474,7 @@

    Optional sizeTransformer<
    @@ -492,7 +492,7 @@

    Optional trustedHTMLHandler

    Inherited from EditorOptions.trustedHTMLHandler

    @@ -510,7 +510,7 @@

    Optional undoMetadata

    Inherited from EditorOptions.undoMetadataSnapshotService

    @@ -527,7 +527,7 @@

    Optional undoSnapshot

    Inherited from EditorOptions.undoSnapshotService

    @@ -546,7 +546,7 @@

    Optional zoomScale

    diff --git a/docs/interfaces/roosterjs_content_model_editor.contentmodelformatstate.html b/docs/interfaces/roosterjs_content_model_editor.contentmodelformatstate.html index 6617f808c78..dadb1b5c30f 100644 --- a/docs/interfaces/roosterjs_content_model_editor.contentmodelformatstate.html +++ b/docs/interfaces/roosterjs_content_model_editor.contentmodelformatstate.html @@ -142,7 +142,7 @@

    Optional backgroundColor<
    @@ -158,7 +158,7 @@

    Optional backgroundColors
    @@ -174,7 +174,7 @@

    Optional canAddImage
    @@ -190,7 +190,7 @@

    Optional canMergeTab
    @@ -206,7 +206,7 @@

    Optional canRedo

    @@ -222,7 +222,7 @@

    Optional canUndo

    @@ -238,7 +238,7 @@

    Optional canUnlink

    @@ -254,7 +254,7 @@

    Optional direction

    @@ -270,7 +270,7 @@

    Optional fontName

    @@ -286,7 +286,7 @@

    Optional fontSize

    @@ -302,7 +302,7 @@

    Optional headerLevel

    @@ -317,7 +317,7 @@

    Optional imageFormat

    imageFormat: ImageFormatState
    @@ -333,7 +333,7 @@

    Optional isBlockQuot
    @@ -349,7 +349,7 @@

    Optional isBold

    @@ -365,7 +365,7 @@

    Optional isBullet

    @@ -381,7 +381,7 @@

    Optional isCodeBlock
    @@ -397,7 +397,7 @@

    Optional isCodeInlin
    @@ -413,7 +413,7 @@

    Optional isDarkMode<
    @@ -429,7 +429,7 @@

    Optional isInTable

    @@ -445,7 +445,7 @@

    Optional isItalic

    @@ -461,7 +461,7 @@

    Optional isMultiline
    @@ -477,7 +477,7 @@

    Optional isNumbering

    @@ -493,7 +493,7 @@

    Optional isStrikeThr
    @@ -509,7 +509,7 @@

    Optional isSubscript

    @@ -525,7 +525,7 @@

    Optional isSuperscript

    Inherited from FormatState.isSuperscript

    @@ -541,7 +541,7 @@

    Optional isUnderline

    @@ -557,7 +557,7 @@

    Optional lineHeight

    @@ -573,7 +573,7 @@

    Optional marginBottom

    Inherited from FormatState.marginBottom

    @@ -589,7 +589,7 @@

    Optional marginTop

    @@ -605,7 +605,7 @@

    Optional tableFormat

    @@ -621,7 +621,7 @@

    Optional tableHasHea
    @@ -637,7 +637,7 @@

    Optional textAlign

    @@ -653,7 +653,7 @@

    Optional textColor

    @@ -669,7 +669,7 @@

    Optional textColors

    @@ -685,7 +685,7 @@

    Optional zoomScale

    diff --git a/docs/interfaces/roosterjs_content_model_editor.icontentmodeleditor.html b/docs/interfaces/roosterjs_content_model_editor.icontentmodeleditor.html index 73968fba06f..a9393d31750 100644 --- a/docs/interfaces/roosterjs_content_model_editor.icontentmodeleditor.html +++ b/docs/interfaces/roosterjs_content_model_editor.icontentmodeleditor.html @@ -185,7 +185,7 @@

    addContentEditFeature

    @@ -218,7 +218,7 @@

    addDomEventHandler

    @@ -261,7 +261,7 @@

    Returns void

    Inherited from IEditor.addDomEventHandler

    @@ -307,7 +307,7 @@

    addUndoSnapshot

    @@ -381,7 +381,7 @@

    cacheContentModel

  • @@ -412,7 +412,7 @@

    collapseNodes

    @@ -462,7 +462,7 @@

    contains

    @@ -486,7 +486,7 @@

    Returns boolean

    Inherited from IEditor.contains

    @@ -518,7 +518,7 @@

    createContentModel

  • @@ -550,7 +550,7 @@

    deleteNode

    @@ -583,7 +583,7 @@

    deleteSelectedContent

    @@ -606,7 +606,7 @@

    dispose

  • @@ -845,7 +845,7 @@

    getContentSearcherOfCursor

    @@ -879,7 +879,7 @@

    getCustomData

    @@ -961,7 +961,7 @@

    getDarkColorHandler

    @@ -984,7 +984,7 @@

    getDefaultFormat

    @@ -1008,7 +1008,7 @@

    getDocument

    @@ -1032,7 +1032,7 @@

    getEditorDomAttribute

    @@ -1064,7 +1064,7 @@

    getElementAtCursor

    @@ -1114,7 +1114,7 @@

    getFocusedPosition

    @@ -1137,7 +1137,7 @@

    getPendableFormatState

    @@ -1170,7 +1170,7 @@

    getRelativeDistanceToEditor

    @@ -1213,7 +1213,7 @@

    getScrollContainer

    @@ -1236,7 +1236,7 @@

    getSelectedRegions

    @@ -1265,7 +1265,7 @@

    getSelectionPath

    @@ -1290,7 +1290,7 @@

    getSelectionRange

    @@ -1325,7 +1325,7 @@

    getSelectionRangeEx

    @@ -1350,7 +1350,7 @@

    getSelectionTraverser

    @@ -1380,7 +1380,7 @@

    getSizeTransformer

    @@ -1405,7 +1405,7 @@

    getStyleBasedFormatState

    @@ -1434,7 +1434,7 @@

    getTrustedHTMLHandler

    @@ -1460,7 +1460,7 @@

    getUndoState

    @@ -1483,7 +1483,7 @@

    getVisibleViewport

    @@ -1506,7 +1506,7 @@

    getZoomScale

    @@ -1532,7 +1532,7 @@

    hasFocus

    @@ -1556,7 +1556,7 @@

    insertContent

    @@ -1595,7 +1595,7 @@

    insertNode

    @@ -1638,7 +1638,7 @@

    isDarkMode

    @@ -1662,7 +1662,7 @@

    isDisposed

    @@ -1686,7 +1686,7 @@

    isEmpty

    @@ -1719,7 +1719,7 @@

    isFeatureEnabled

    @@ -1751,7 +1751,7 @@

    isInIME

    @@ -1775,7 +1775,7 @@

    isInShadowEdit

    @@ -1798,7 +1798,7 @@

    isPositionAtBeginning

    @@ -1832,7 +1832,7 @@

    paste

    @@ -1879,7 +1879,7 @@

    queryElements

    @@ -1933,7 +1933,7 @@

    Returns HTMLEleme
    @@ -1987,7 +1987,7 @@

    Returns T<
    @@ -2047,7 +2047,7 @@

    Returns HTMLEleme
    @@ -2116,7 +2116,7 @@

    redo

    @@ -2139,7 +2139,7 @@

    removeContentEditFeature

    @@ -2171,7 +2171,7 @@

    replaceNode

    @@ -2216,7 +2216,7 @@

    runAsync

    @@ -2287,7 +2287,7 @@

    select

    @@ -2311,7 +2311,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2335,7 +2335,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2365,7 +2365,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2389,7 +2389,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2419,7 +2419,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2461,7 +2461,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2485,7 +2485,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2514,7 +2514,7 @@

    Returns boolean

    Inherited from IEditor.select

    @@ -2546,7 +2546,7 @@

    setContent

    @@ -2583,7 +2583,7 @@

    setContentModel

  • @@ -2621,7 +2621,7 @@

    setDarkModeState

    @@ -2653,7 +2653,7 @@

    setEditorDomAttribute

    @@ -2691,7 +2691,7 @@

    setZoomScale

    @@ -2722,7 +2722,7 @@

    startShadowEdit

    @@ -2750,7 +2750,7 @@

    stopShadowEdit

    @@ -2773,7 +2773,7 @@

    transformToDarkColor

    @@ -2805,7 +2805,7 @@

    triggerContentChangedEvent

    @@ -2843,7 +2843,7 @@

    triggerPluginEvent

    @@ -2896,7 +2896,7 @@

    undo

    diff --git a/docs/interfaces/roosterjs_content_model_editor.imageformatstate.html b/docs/interfaces/roosterjs_content_model_editor.imageformatstate.html index 8ce9cc65dbe..6aa8f152bce 100644 --- a/docs/interfaces/roosterjs_content_model_editor.imageformatstate.html +++ b/docs/interfaces/roosterjs_content_model_editor.imageformatstate.html @@ -106,7 +106,7 @@

    Optional borderColor

    borderColor: string
    @@ -121,7 +121,7 @@

    Optional borderRadius

    borderRadius: string
    @@ -136,7 +136,7 @@

    Optional borderStyle

    borderStyle: string
    @@ -151,7 +151,7 @@

    Optional borderWidth

    borderWidth: string
    @@ -166,7 +166,7 @@

    Optional boxShadow

    boxShadow: string
    diff --git a/docs/interfaces/roosterjs_content_model_editor.insertpoint.html b/docs/interfaces/roosterjs_content_model_editor.insertpoint.html index 38953c6cbc2..2e1bf50a3d7 100644 --- a/docs/interfaces/roosterjs_content_model_editor.insertpoint.html +++ b/docs/interfaces/roosterjs_content_model_editor.insertpoint.html @@ -105,7 +105,7 @@

    marker

    @@ -120,7 +120,7 @@

    paragraph

    @@ -135,7 +135,7 @@

    path

    @@ -150,7 +150,7 @@

    Optional tableContext

    tableContext: TableSelectionContext
    diff --git a/docs/interfaces/roosterjs_content_model_editor.tableselectioncontext.html b/docs/interfaces/roosterjs_content_model_editor.tableselectioncontext.html index 5d47c2387b0..fe9123dbae1 100644 --- a/docs/interfaces/roosterjs_content_model_editor.tableselectioncontext.html +++ b/docs/interfaces/roosterjs_content_model_editor.tableselectioncontext.html @@ -105,7 +105,7 @@

    colIndex

    colIndex: number
    @@ -120,7 +120,7 @@

    isWholeTableSelected

    isWholeTableSelected: boolean
    @@ -135,7 +135,7 @@

    rowIndex

    rowIndex: number
    @@ -150,7 +150,7 @@

    table

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelblockbase.html b/docs/interfaces/roosterjs_content_model_types.contentmodelblockbase.html index ed0164316d8..609bea3ff0b 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelblockbase.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelblockbase.html @@ -142,7 +142,7 @@

    blockType

    blockType: T
    @@ -158,7 +158,7 @@

    format

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelblockgroupbase.html b/docs/interfaces/roosterjs_content_model_types.contentmodelblockgroupbase.html index 1da3fe03a9c..86dac95f1ac 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelblockgroupbase.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelblockgroupbase.html @@ -128,7 +128,7 @@

    blockGroupType

    blockGroupType: T
    @@ -143,7 +143,7 @@

    blocks

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelblockwithcache.html b/docs/interfaces/roosterjs_content_model_types.contentmodelblockwithcache.html index 2d36776476d..e5954d48210 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelblockwithcache.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelblockwithcache.html @@ -130,7 +130,7 @@

    Optional cachedElementcachedElement: TElement

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelbr.html b/docs/interfaces/roosterjs_content_model_types.contentmodelbr.html index 1a28b3e93ba..eb239738937 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelbr.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelbr.html @@ -112,7 +112,7 @@

    Optional code

    @@ -128,7 +128,7 @@

    format

    @@ -144,7 +144,7 @@

    Optional isSelected

    @@ -160,7 +160,7 @@

    Optional link

    @@ -176,7 +176,7 @@

    segmentType

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelcode.html b/docs/interfaces/roosterjs_content_model_types.contentmodelcode.html index 48d48aada27..b81c304837c 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelcode.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelcode.html @@ -110,7 +110,7 @@

    format

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodeldivider.html b/docs/interfaces/roosterjs_content_model_types.contentmodeldivider.html index 3cae6165aad..c55be256533 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodeldivider.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodeldivider.html @@ -119,7 +119,7 @@

    blockType

    @@ -135,7 +135,7 @@

    Optional cachedElement

    Inherited from ContentModelBlockWithCache.cachedElement

    @@ -151,7 +151,7 @@

    format

    @@ -167,7 +167,7 @@

    Optional isSelected

    @@ -182,7 +182,7 @@

    Optional size

    size: string
    @@ -197,7 +197,7 @@

    tagName

    tagName: "div" | "hr"
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodeldocument.html b/docs/interfaces/roosterjs_content_model_types.contentmodeldocument.html index 7848a6b3acf..fa6d17a6dca 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodeldocument.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodeldocument.html @@ -113,7 +113,7 @@

    blockGroupType

    @@ -129,7 +129,7 @@

    blocks

    @@ -145,7 +145,7 @@

    Optional format

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelentity.html b/docs/interfaces/roosterjs_content_model_types.contentmodelentity.html index 0d1ff776a78..8bf4eb14da8 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelentity.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelentity.html @@ -120,7 +120,7 @@

    blockType

    @@ -136,7 +136,7 @@

    Optional code

    @@ -152,7 +152,7 @@

    format

    @@ -167,7 +167,7 @@

    Optional id

    id: string
    @@ -182,7 +182,7 @@

    isReadonly

    isReadonly: boolean
    @@ -198,7 +198,7 @@

    Optional isSelected

    @@ -214,7 +214,7 @@

    Optional link

    @@ -230,7 +230,7 @@

    segmentType

    @@ -245,7 +245,7 @@

    Optional type

    type: string
    @@ -260,7 +260,7 @@

    wrapper

    wrapper: HTMLElement
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelformatcontainer.html b/docs/interfaces/roosterjs_content_model_types.contentmodelformatcontainer.html index c0c4b1928a6..54d43c51b54 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelformatcontainer.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelformatcontainer.html @@ -120,7 +120,7 @@

    blockGroupType

    @@ -136,7 +136,7 @@

    blockType

    @@ -152,7 +152,7 @@

    blocks

    @@ -168,7 +168,7 @@

    Optional cachedElement

    Inherited from ContentModelBlockWithCache.cachedElement

    @@ -184,7 +184,7 @@

    format

    @@ -199,7 +199,7 @@

    tagName

    tagName: string
    @@ -214,7 +214,7 @@

    Optional zeroFontSiz
    zeroFontSize: boolean
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelformatmap.html b/docs/interfaces/roosterjs_content_model_types.contentmodelformatmap.html index c8011f16c83..530eafce326 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelformatmap.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelformatmap.html @@ -122,7 +122,7 @@

    block

    @@ -137,7 +137,7 @@

    code

    @@ -152,7 +152,7 @@

    container

    @@ -167,7 +167,7 @@

    dataset

    dataset: DatasetFormat
    @@ -182,7 +182,7 @@

    divider

    @@ -197,7 +197,7 @@

    elementBasedSegment

    elementBasedSegment: ContentModelSegmentFormat
    @@ -212,7 +212,7 @@

    image

    @@ -227,7 +227,7 @@

    link

    @@ -242,7 +242,7 @@

    listItem

    @@ -257,7 +257,7 @@

    listItemElement

    @@ -272,7 +272,7 @@

    listLevel

    @@ -287,7 +287,7 @@

    segment

    @@ -302,7 +302,7 @@

    segmentOnBlock

    @@ -319,7 +319,7 @@

    segmentOnTableCell

    segmentOnTableCell: ContentModelSegmentFormat
    @@ -337,7 +337,7 @@

    segmentUnderLink

    segmentUnderLink: ContentModelHyperLinkFormat
    @@ -352,7 +352,7 @@

    styleBasedSegment

    styleBasedSegment: ContentModelSegmentFormat
    @@ -367,7 +367,7 @@

    table

    @@ -382,7 +382,7 @@

    tableBorder

    @@ -397,7 +397,7 @@

    tableCell

    @@ -412,7 +412,7 @@

    tableCellBorder

    @@ -427,7 +427,7 @@

    tableRow

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralblock.html b/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralblock.html index be399a5d72a..88d93924b1f 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralblock.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralblock.html @@ -124,7 +124,7 @@

    blockGroupType

    @@ -140,7 +140,7 @@

    blockType

    @@ -156,7 +156,7 @@

    blocks

    @@ -171,7 +171,7 @@

    element

    element: HTMLElement
    @@ -187,7 +187,7 @@

    format

    @@ -203,7 +203,7 @@

    Optional isSelected

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralsegment.html b/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralsegment.html index ecf58e2c7d4..fe4f12f6ac0 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralsegment.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelgeneralsegment.html @@ -119,7 +119,7 @@

    blockGroupType

    @@ -135,7 +135,7 @@

    blockType

    @@ -151,7 +151,7 @@

    blocks

    @@ -167,7 +167,7 @@

    Optional code

    @@ -183,7 +183,7 @@

    element

    @@ -199,7 +199,7 @@

    format

    @@ -215,7 +215,7 @@

    Optional isSelected

    @@ -231,7 +231,7 @@

    Optional link

    @@ -247,7 +247,7 @@

    segmentType

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelimage.html b/docs/interfaces/roosterjs_content_model_types.contentmodelimage.html index a00d175c909..c5d9851cda0 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelimage.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelimage.html @@ -119,7 +119,7 @@

    Optional alt

    alt: string
    @@ -135,7 +135,7 @@

    Optional code

    @@ -151,7 +151,7 @@

    dataset

    @@ -167,7 +167,7 @@

    format

    @@ -183,7 +183,7 @@

    Optional isSelected

    @@ -198,7 +198,7 @@

    Optional isSelectedA
    isSelectedAsImageSelection: boolean
    @@ -214,7 +214,7 @@

    Optional link

    @@ -230,7 +230,7 @@

    segmentType

    @@ -245,7 +245,7 @@

    src

    src: string
    @@ -260,7 +260,7 @@

    Optional title

    title: string
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodellink.html b/docs/interfaces/roosterjs_content_model_types.contentmodellink.html index eb991f488cd..81c8aa43afe 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodellink.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodellink.html @@ -114,7 +114,7 @@

    dataset

    @@ -130,7 +130,7 @@

    format

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodellistitem.html b/docs/interfaces/roosterjs_content_model_types.contentmodellistitem.html index 8e5c919f409..d2beba0bc91 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodellistitem.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodellistitem.html @@ -116,7 +116,7 @@

    blockGroupType

    @@ -132,7 +132,7 @@

    blockType

    @@ -148,7 +148,7 @@

    blocks

    @@ -164,7 +164,7 @@

    format

    @@ -179,7 +179,7 @@

    formatHolder

    @@ -194,7 +194,7 @@

    levels

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelparagraph.html b/docs/interfaces/roosterjs_content_model_types.contentmodelparagraph.html index 5998c9ebac3..2a950a42b8f 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelparagraph.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelparagraph.html @@ -117,7 +117,7 @@

    blockType

    @@ -133,7 +133,7 @@

    Optional cachedElement

    Inherited from ContentModelBlockWithCache.cachedElement

    @@ -148,7 +148,7 @@

    Optional decorator

    @@ -164,7 +164,7 @@

    format

    @@ -179,7 +179,7 @@

    Optional isImplicit

    isImplicit: boolean
    @@ -195,7 +195,7 @@

    Optional segmentFormatsegmentFormat: ContentModelSegmentFormat

    @@ -210,7 +210,7 @@

    segments

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelparagraphdecorator.html b/docs/interfaces/roosterjs_content_model_types.contentmodelparagraphdecorator.html index 3c657260a6c..3c852897f66 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelparagraphdecorator.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelparagraphdecorator.html @@ -111,7 +111,7 @@

    format

    @@ -126,7 +126,7 @@

    tagName

    tagName: string
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelsegmentbase.html b/docs/interfaces/roosterjs_content_model_types.contentmodelsegmentbase.html index 6d5916c2385..87202b1307f 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelsegmentbase.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelsegmentbase.html @@ -145,7 +145,7 @@

    Optional code

    @@ -161,7 +161,7 @@

    format

    @@ -177,7 +177,7 @@

    Optional isSelected

    @@ -192,7 +192,7 @@

    Optional link

    @@ -207,7 +207,7 @@

    segmentType

    segmentType: T
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelselectionmarker.html b/docs/interfaces/roosterjs_content_model_types.contentmodelselectionmarker.html index c35874c9f5f..f235517db84 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelselectionmarker.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelselectionmarker.html @@ -112,7 +112,7 @@

    Optional code

    @@ -128,7 +128,7 @@

    format

    @@ -144,7 +144,7 @@

    isSelected

    @@ -160,7 +160,7 @@

    Optional link

    @@ -176,7 +176,7 @@

    segmentType

    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodeltable.html b/docs/interfaces/roosterjs_content_model_types.contentmodeltable.html index beba1c405d2..8b037c4a145 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodeltable.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodeltable.html @@ -119,7 +119,7 @@

    blockType

    @@ -135,7 +135,7 @@

    Optional cachedElement

    Inherited from ContentModelBlockWithCache.cachedElement

    @@ -151,7 +151,7 @@

    dataset

    @@ -167,7 +167,7 @@

    format

    @@ -182,7 +182,7 @@

    rows

    @@ -197,7 +197,7 @@

    widths

    widths: number[]
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodeltablecell.html b/docs/interfaces/roosterjs_content_model_types.contentmodeltablecell.html index 25494432856..208b77a9dfd 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodeltablecell.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodeltablecell.html @@ -128,7 +128,7 @@

    blockGroupType

    @@ -144,7 +144,7 @@

    blocks

    @@ -160,7 +160,7 @@

    Optional cachedElement

    Inherited from ContentModelBlockWithCache.cachedElement

    @@ -176,7 +176,7 @@

    dataset

    @@ -192,7 +192,7 @@

    format

    @@ -207,7 +207,7 @@

    Optional isHeader

    isHeader: boolean
    @@ -223,7 +223,7 @@

    Optional isSelected

    @@ -238,7 +238,7 @@

    spanAbove

    spanAbove: boolean
    @@ -253,7 +253,7 @@

    spanLeft

    spanLeft: boolean
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodeltablerow.html b/docs/interfaces/roosterjs_content_model_types.contentmodeltablerow.html index cdf820bbd63..315afe22696 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodeltablerow.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodeltablerow.html @@ -114,7 +114,7 @@

    Optional cachedElement

    Inherited from ContentModelBlockWithCache.cachedElement

    @@ -129,7 +129,7 @@

    cells

    @@ -145,7 +145,7 @@

    format

    @@ -160,7 +160,7 @@

    height

    height: number
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodeltext.html b/docs/interfaces/roosterjs_content_model_types.contentmodeltext.html index 22772fc54ad..b84977983a1 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodeltext.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodeltext.html @@ -113,7 +113,7 @@

    Optional code

    @@ -129,7 +129,7 @@

    format

    @@ -145,7 +145,7 @@

    Optional isSelected

    @@ -161,7 +161,7 @@

    Optional link

    @@ -177,7 +177,7 @@

    segmentType

    @@ -192,7 +192,7 @@

    text

    text: string
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelwithdataset.html b/docs/interfaces/roosterjs_content_model_types.contentmodelwithdataset.html index 47ebefeb8a4..a572bf48c86 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelwithdataset.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelwithdataset.html @@ -124,7 +124,7 @@

    dataset

    dataset: DatasetFormat
    diff --git a/docs/interfaces/roosterjs_content_model_types.contentmodelwithformat.html b/docs/interfaces/roosterjs_content_model_types.contentmodelwithformat.html index 78c4085e4ee..839ea4f7b4b 100644 --- a/docs/interfaces/roosterjs_content_model_types.contentmodelwithformat.html +++ b/docs/interfaces/roosterjs_content_model_types.contentmodelwithformat.html @@ -133,7 +133,7 @@

    format

    format: T
    diff --git a/docs/interfaces/roosterjs_content_model_types.domtomodelcontext.html b/docs/interfaces/roosterjs_content_model_types.domtomodelcontext.html index 1b52f9c1178..66d69992705 100644 --- a/docs/interfaces/roosterjs_content_model_types.domtomodelcontext.html +++ b/docs/interfaces/roosterjs_content_model_types.domtomodelcontext.html @@ -139,7 +139,7 @@

    Optional addDelimiter

    Inherited from EditorContext.addDelimiterForEntity

    @@ -155,7 +155,7 @@

    Optional allowCacheE
    @@ -172,7 +172,7 @@

    blockDecorator

    @@ -188,7 +188,7 @@

    blockFormat

    @@ -204,7 +204,7 @@

    code

    @@ -220,7 +220,7 @@

    Optional darkColorHa
    @@ -236,7 +236,7 @@

    defaultElementProcessors

    @@ -253,7 +253,7 @@

    Optional defaultFormat

    Inherited from EditorContext.defaultFormat

    @@ -269,7 +269,7 @@

    defaultFormatParsers

    @@ -286,7 +286,7 @@

    defaultStyles

    @@ -302,7 +302,7 @@

    elementProcessors

    @@ -318,7 +318,7 @@

    formatParsers

    @@ -334,7 +334,7 @@

    Optional isDarkMode<
    @@ -350,7 +350,7 @@

    Optional isInSelection

    Inherited from DomToModelSelectionContext.isInSelection

    @@ -366,7 +366,7 @@

    Optional isRootRtl

    Inherited from EditorContext.isRootRtl

    @@ -382,7 +382,7 @@

    link

    @@ -398,7 +398,7 @@

    listFormat

    @@ -414,7 +414,7 @@

    Optional rangeEx

    @@ -430,7 +430,7 @@

    segmentFormat

    @@ -446,7 +446,7 @@

    Optional zoomScale

    diff --git a/docs/interfaces/roosterjs_content_model_types.domtomodeldecoratorcontext.html b/docs/interfaces/roosterjs_content_model_types.domtomodeldecoratorcontext.html index 78f0a59c56b..e5dbeb5e13c 100644 --- a/docs/interfaces/roosterjs_content_model_types.domtomodeldecoratorcontext.html +++ b/docs/interfaces/roosterjs_content_model_types.domtomodeldecoratorcontext.html @@ -109,7 +109,7 @@

    blockDecorator

    @@ -124,7 +124,7 @@

    code

    @@ -139,7 +139,7 @@

    link

    diff --git a/docs/interfaces/roosterjs_content_model_types.domtomodelformatcontext.html b/docs/interfaces/roosterjs_content_model_types.domtomodelformatcontext.html index b7e454943ce..00d48812ef1 100644 --- a/docs/interfaces/roosterjs_content_model_types.domtomodelformatcontext.html +++ b/docs/interfaces/roosterjs_content_model_types.domtomodelformatcontext.html @@ -110,7 +110,7 @@

    Optional allowCacheE
    allowCacheElement: boolean
    @@ -126,7 +126,7 @@

    blockFormat

    @@ -141,7 +141,7 @@

    listFormat

    @@ -156,7 +156,7 @@

    segmentFormat

    diff --git a/docs/interfaces/roosterjs_content_model_types.domtomodellistformat.html b/docs/interfaces/roosterjs_content_model_types.domtomodellistformat.html index b2ec421292c..07c4bf9f6c5 100644 --- a/docs/interfaces/roosterjs_content_model_types.domtomodellistformat.html +++ b/docs/interfaces/roosterjs_content_model_types.domtomodellistformat.html @@ -104,7 +104,7 @@

    levels

    @@ -119,7 +119,7 @@

    Optional listParent

    @@ -134,7 +134,7 @@

    threadItemCounts

    threadItemCounts: number[]
    diff --git a/docs/interfaces/roosterjs_content_model_types.domtomodeloption.html b/docs/interfaces/roosterjs_content_model_types.domtomodeloption.html index e3ed8da1eb4..ac4e4a81b02 100644 --- a/docs/interfaces/roosterjs_content_model_types.domtomodeloption.html +++ b/docs/interfaces/roosterjs_content_model_types.domtomodeloption.html @@ -106,7 +106,7 @@

    Optional additionalFormat
    additionalFormatParsers: Partial<FormatParsersPerCategory>
    @@ -121,7 +121,7 @@

    Optional defaultStyledefaultStyleOverride: DefaultStyleMap

    @@ -136,7 +136,7 @@

    Optional disableCachedisableCacheElement: boolean

    @@ -152,7 +152,7 @@

    Optional formatParserformatParserOverride: Partial<FormatParsers>

    @@ -167,7 +167,7 @@

    Optional processorOverrid
    processorOverride: Partial<ElementProcessorMap>
    diff --git a/docs/interfaces/roosterjs_content_model_types.domtomodelselectioncontext.html b/docs/interfaces/roosterjs_content_model_types.domtomodelselectioncontext.html index 34663ca47ab..dd227289e0c 100644 --- a/docs/interfaces/roosterjs_content_model_types.domtomodelselectioncontext.html +++ b/docs/interfaces/roosterjs_content_model_types.domtomodelselectioncontext.html @@ -108,7 +108,7 @@

    Optional isInSelectionisInSelection: boolean

    @@ -123,7 +123,7 @@

    Optional rangeEx

    diff --git a/docs/interfaces/roosterjs_content_model_types.domtomodelsettings.html b/docs/interfaces/roosterjs_content_model_types.domtomodelsettings.html index d01bcd1738c..5b65a95f0f5 100644 --- a/docs/interfaces/roosterjs_content_model_types.domtomodelsettings.html +++ b/docs/interfaces/roosterjs_content_model_types.domtomodelsettings.html @@ -111,7 +111,7 @@

    defaultElementProcessors

    defaultElementProcessors: Readonly<ElementProcessorMap>
    @@ -127,7 +127,7 @@

    defaultFormatParsers

    defaultFormatParsers: Readonly<FormatParsers>
    @@ -143,7 +143,7 @@

    defaultStyles

    defaultStyles: DefaultStyleMap
    @@ -158,7 +158,7 @@

    elementProcessors

    elementProcessors: ElementProcessorMap
    @@ -173,7 +173,7 @@

    formatParsers

    diff --git a/docs/interfaces/roosterjs_content_model_types.editorcontext.html b/docs/interfaces/roosterjs_content_model_types.editorcontext.html index 814a5180d75..039c6680a64 100644 --- a/docs/interfaces/roosterjs_content_model_types.editorcontext.html +++ b/docs/interfaces/roosterjs_content_model_types.editorcontext.html @@ -115,7 +115,7 @@

    Optional addDelimiteraddDelimiterForEntity: boolean

    @@ -130,7 +130,7 @@

    Optional darkColorHa
    darkColorHandler: DarkColorHandler
    @@ -145,7 +145,7 @@

    Optional defaultFormatdefaultFormat: ContentModelSegmentFormat

    @@ -160,7 +160,7 @@

    Optional isDarkMode<
    isDarkMode: boolean
    @@ -175,7 +175,7 @@

    Optional isRootRtlisRootRtl: boolean

    @@ -190,7 +190,7 @@

    Optional zoomScale

    zoomScale: number
    diff --git a/docs/interfaces/roosterjs_content_model_types.formathandlertypemap.html b/docs/interfaces/roosterjs_content_model_types.formathandlertypemap.html index a8fb6adaefb..6462644f25a 100644 --- a/docs/interfaces/roosterjs_content_model_types.formathandlertypemap.html +++ b/docs/interfaces/roosterjs_content_model_types.formathandlertypemap.html @@ -137,7 +137,7 @@

    backgroundColor

    backgroundColor: BackgroundColorFormat
    @@ -152,7 +152,7 @@

    bold

    @@ -167,7 +167,7 @@

    border

    border: BorderFormat
    @@ -182,7 +182,7 @@

    borderBox

    borderBox: BorderBoxFormat
    @@ -197,7 +197,7 @@

    boxShadow

    boxShadow: BoxShadowFormat
    @@ -212,7 +212,7 @@

    dataset

    dataset: DatasetFormat
    @@ -227,7 +227,7 @@

    direction

    direction: DirectionFormat
    @@ -242,7 +242,7 @@

    display

    display: DisplayFormat
    @@ -257,7 +257,7 @@

    fontFamily

    fontFamily: FontFamilyFormat
    @@ -272,7 +272,7 @@

    fontSize

    fontSize: FontSizeFormat
    @@ -287,7 +287,7 @@

    htmlAlign

    htmlAlign: HtmlAlignFormat
    @@ -302,7 +302,7 @@

    id

    @@ -317,7 +317,7 @@

    italic

    italic: ItalicFormat
    @@ -332,7 +332,7 @@

    letterSpacing

    letterSpacing: LetterSpacingFormat
    @@ -347,7 +347,7 @@

    lineHeight

    lineHeight: LineHeightFormat
    @@ -362,7 +362,7 @@

    link

    @@ -377,7 +377,7 @@

    listItemMetadata

    listItemMetadata: ListMetadataFormat
    @@ -392,7 +392,7 @@

    listItemThread

    listItemThread: ListThreadFormat
    @@ -407,7 +407,7 @@

    listLevelMetadata

    listLevelMetadata: ListMetadataFormat
    @@ -422,7 +422,7 @@

    listLevelThread

    listLevelThread: ListThreadFormat
    @@ -437,7 +437,7 @@

    listStylePosition

    listStylePosition: ListStylePositionFormat
    @@ -452,7 +452,7 @@

    listType

    listType: ListTypeFormat
    @@ -467,7 +467,7 @@

    margin

    margin: MarginFormat
    @@ -482,7 +482,7 @@

    padding

    padding: PaddingFormat
    @@ -497,7 +497,7 @@

    size

    @@ -512,7 +512,7 @@

    strike

    strike: StrikeFormat
    @@ -527,7 +527,7 @@

    superOrSubScript

    superOrSubScript: SuperOrSubScriptFormat
    @@ -542,7 +542,7 @@

    tableLayout

    tableLayout: TableLayoutFormat
    @@ -557,7 +557,7 @@

    tableSpacing

    tableSpacing: SpacingFormat
    @@ -572,7 +572,7 @@

    textAlign

    textAlign: TextAlignFormat
    @@ -587,7 +587,7 @@

    textColor

    textColor: TextColorFormat
    @@ -602,7 +602,7 @@

    textColorOnTableCell

    textColorOnTableCell: TextColorFormat
    @@ -617,7 +617,7 @@

    underline

    underline: UnderlineFormat
    @@ -632,7 +632,7 @@

    verticalAlign

    verticalAlign: VerticalAlignFormat
    @@ -647,7 +647,7 @@

    whiteSpace

    whiteSpace: WhiteSpaceFormat
    @@ -662,7 +662,7 @@

    wordBreak

    wordBreak: WordBreakFormat
    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomblockandsegmentnode.html b/docs/interfaces/roosterjs_content_model_types.modeltodomblockandsegmentnode.html index 231ef823a8c..a0b2024ec80 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomblockandsegmentnode.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomblockandsegmentnode.html @@ -103,7 +103,7 @@

    block

    block: Node
    @@ -119,7 +119,7 @@

    segment

    segment: Node
    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomcontext.html b/docs/interfaces/roosterjs_content_model_types.modeltodomcontext.html index 0a75792611c..9610c0eccc4 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomcontext.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomcontext.html @@ -133,7 +133,7 @@

    Optional addDelimiter

    Inherited from EditorContext.addDelimiterForEntity

    @@ -149,7 +149,7 @@

    Optional darkColorHa
    @@ -165,7 +165,7 @@

    Optional defaultFormat

    Inherited from EditorContext.defaultFormat

    @@ -181,7 +181,7 @@

    defaultFormatAppliers

    @@ -198,7 +198,7 @@

    defaultImplicitFormatMap

    @@ -214,7 +214,7 @@

    defaultModelHandlers

    @@ -231,7 +231,7 @@

    formatAppliers

    @@ -247,7 +247,7 @@

    Optional imageSelection

    Inherited from ModelToDomSelectionContext.imageSelection

    @@ -263,7 +263,7 @@

    implicitFormat

    @@ -279,7 +279,7 @@

    Optional isDarkMode<
    @@ -295,7 +295,7 @@

    Optional isRootRtl

    Inherited from EditorContext.isRootRtl

    @@ -311,7 +311,7 @@

    listFormat

    @@ -327,7 +327,7 @@

    modelHandlers

    @@ -343,7 +343,7 @@

    Optional onNodeCreat
    @@ -367,7 +367,7 @@

    regularSelection

    @@ -383,7 +383,7 @@

    Optional tableSelection

    Inherited from ModelToDomSelectionContext.tableSelection

    @@ -399,7 +399,7 @@

    Optional zoomScale

    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomformatcontext.html b/docs/interfaces/roosterjs_content_model_types.modeltodomformatcontext.html index 055c1c07a8f..0646a3a20ca 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomformatcontext.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomformatcontext.html @@ -108,7 +108,7 @@

    implicitFormat

    @@ -123,7 +123,7 @@

    listFormat

    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomimageselection.html b/docs/interfaces/roosterjs_content_model_types.modeltodomimageselection.html index abb9c57c4bc..c3d7077483e 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomimageselection.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomimageselection.html @@ -102,7 +102,7 @@

    image

    image: HTMLImageElement
    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomlistcontext.html b/docs/interfaces/roosterjs_content_model_types.modeltodomlistcontext.html index 9b6f649a5c9..63651fdab73 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomlistcontext.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomlistcontext.html @@ -103,7 +103,7 @@

    nodeStack

    @@ -118,7 +118,7 @@

    threadItemCounts

    threadItemCounts: number[]
    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomliststackitem.html b/docs/interfaces/roosterjs_content_model_types.modeltodomliststackitem.html index d0409558240..82c242fff30 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomliststackitem.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomliststackitem.html @@ -124,7 +124,7 @@

    Optional direction

    @@ -140,7 +140,7 @@

    Optional displayForD
    @@ -159,7 +159,7 @@

    Optional listStylePo
    @@ -175,7 +175,7 @@

    Optional listType

    @@ -191,7 +191,7 @@

    Optional marginBottom

    Inherited from ContentModelListItemLevelFormat.marginBottom

    @@ -207,7 +207,7 @@

    Optional marginLeft

    @@ -223,7 +223,7 @@

    Optional marginRight

    @@ -239,7 +239,7 @@

    Optional marginTop

    @@ -254,7 +254,7 @@

    node

    node: Node
    @@ -270,7 +270,7 @@

    Optional orderedStyle

    Inherited from ContentModelListItemLevelFormat.orderedStyleType

    @@ -286,7 +286,7 @@

    Optional paddingBottom

    Inherited from ContentModelListItemLevelFormat.paddingBottom

    @@ -302,7 +302,7 @@

    Optional paddingLeft

    @@ -318,7 +318,7 @@

    Optional paddingRight

    Inherited from ContentModelListItemLevelFormat.paddingRight

    @@ -334,7 +334,7 @@

    Optional paddingTop

    @@ -350,7 +350,7 @@

    Optional startNumber
    @@ -367,7 +367,7 @@

    Optional textAlign

    @@ -383,7 +383,7 @@

    Optional unorderedStyle

    Inherited from ContentModelListItemLevelFormat.unorderedStyleType

    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomoption.html b/docs/interfaces/roosterjs_content_model_types.modeltodomoption.html index 1aabe7f1b08..c4833cf0992 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomoption.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomoption.html @@ -106,7 +106,7 @@

    Optional additionalFormat
    additionalFormatAppliers: Partial<FormatAppliersPerCategory>
    @@ -121,7 +121,7 @@

    Optional defaultImplicit<
    defaultImplicitFormatOverride: DefaultImplicitFormatMap
    @@ -136,7 +136,7 @@

    Optional formatApplierformatApplierOverride: Partial<FormatAppliers>

    @@ -151,7 +151,7 @@

    Optional modelHandlermodelHandlerOverride: Partial<ContentModelHandlerMap>

    @@ -166,7 +166,7 @@

    Optional onNodeCreat
    onNodeCreated: OnNodeCreated
    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomregularselection.html b/docs/interfaces/roosterjs_content_model_types.modeltodomregularselection.html index 1dcff080e1f..9f22a25d1d6 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomregularselection.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomregularselection.html @@ -104,7 +104,7 @@

    current

    @@ -119,7 +119,7 @@

    Optional end

    @@ -134,7 +134,7 @@

    Optional start

    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomselectioncontext.html b/docs/interfaces/roosterjs_content_model_types.modeltodomselectioncontext.html index c6ca0542d5d..3336aa29500 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomselectioncontext.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomselectioncontext.html @@ -109,7 +109,7 @@

    Optional imageSelectionimageSelection: ModelToDomImageSelection

    @@ -124,7 +124,7 @@

    regularSelection

    regularSelection: ModelToDomRegularSelection
    @@ -139,7 +139,7 @@

    Optional tableSelectiontableSelection: ModelToDomTableSelection

    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomsettings.html b/docs/interfaces/roosterjs_content_model_types.modeltodomsettings.html index cdf69f046ba..c2e095ebb1f 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomsettings.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomsettings.html @@ -112,7 +112,7 @@

    defaultFormatAppliers

    defaultFormatAppliers: Readonly<FormatAppliers>
    @@ -128,7 +128,7 @@

    defaultImplicitFormatMap

    defaultImplicitFormatMap: DefaultImplicitFormatMap
    @@ -143,7 +143,7 @@

    defaultModelHandlers

    defaultModelHandlers: Readonly<ContentModelHandlerMap>
    @@ -159,7 +159,7 @@

    formatAppliers

    @@ -174,7 +174,7 @@

    modelHandlers

    modelHandlers: ContentModelHandlerMap
    @@ -189,7 +189,7 @@

    Optional onNodeCreat
    onNodeCreated: OnNodeCreated
    diff --git a/docs/interfaces/roosterjs_content_model_types.modeltodomtableselection.html b/docs/interfaces/roosterjs_content_model_types.modeltodomtableselection.html index 6a9e87c4676..c455317a780 100644 --- a/docs/interfaces/roosterjs_content_model_types.modeltodomtableselection.html +++ b/docs/interfaces/roosterjs_content_model_types.modeltodomtableselection.html @@ -104,7 +104,7 @@

    firstCell

    firstCell: Coordinates
    @@ -119,7 +119,7 @@

    lastCell

    lastCell: Coordinates
    @@ -134,7 +134,7 @@

    table

    table: HTMLTableElement
    diff --git a/docs/interfaces/roosterjs_content_model_types.selectable.html b/docs/interfaces/roosterjs_content_model_types.selectable.html index 1eb4deea755..79a91bd18fc 100644 --- a/docs/interfaces/roosterjs_content_model_types.selectable.html +++ b/docs/interfaces/roosterjs_content_model_types.selectable.html @@ -116,7 +116,7 @@

    Optional isSelected

    isSelected: boolean
    diff --git a/docs/interfaces/roosterjs_editor_plugins.contextmenuoptions.html b/docs/interfaces/roosterjs_editor_plugins.contextmenuoptions.html index a34f5c16f15..cb4dab323ae 100644 --- a/docs/interfaces/roosterjs_editor_plugins.contextmenuoptions.html +++ b/docs/interfaces/roosterjs_editor_plugins.contextmenuoptions.html @@ -112,7 +112,7 @@

    Optional allowDefaultallowDefaultMenu: boolean

    @@ -127,7 +127,7 @@

    Optional dismiss

    dismiss: (container: HTMLElement) => void
    @@ -169,7 +169,7 @@

    render

    render: (container: HTMLElement, items: T[], onDismiss: () => void) => void
    diff --git a/docs/interfaces/roosterjs_editor_plugins.onshowresizehandle.html b/docs/interfaces/roosterjs_editor_plugins.onshowresizehandle.html index 2c51647fcc7..5c5cab96d1b 100644 --- a/docs/interfaces/roosterjs_editor_plugins.onshowresizehandle.html +++ b/docs/interfaces/roosterjs_editor_plugins.onshowresizehandle.html @@ -83,7 +83,7 @@

    Callable

  • diff --git a/docs/interfaces/roosterjs_editor_types.arraydefinition.html b/docs/interfaces/roosterjs_editor_types.arraydefinition.html index 58cfd2fc5d1..8f58493636d 100644 --- a/docs/interfaces/roosterjs_editor_types.arraydefinition.html +++ b/docs/interfaces/roosterjs_editor_types.arraydefinition.html @@ -121,7 +121,7 @@

    Optional allowNull

    @@ -137,7 +137,7 @@

    Optional isOptional

    @@ -152,7 +152,7 @@

    itemDef

    @@ -167,7 +167,7 @@

    Optional maxLength

    maxLength: number
    @@ -182,7 +182,7 @@

    Optional minLength

    minLength: number
    @@ -198,7 +198,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.autolinkfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.autolinkfeaturesettings.html index ac24bd95d5f..f305186155a 100644 --- a/docs/interfaces/roosterjs_editor_types.autolinkfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.autolinkfeaturesettings.html @@ -108,7 +108,7 @@

    autoLink

    autoLink: boolean
    @@ -128,7 +128,7 @@

    unlinkWhenBackspaceAfterLink

    unlinkWhenBackspaceAfterLink: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.basepluginevent.html b/docs/interfaces/roosterjs_editor_types.basepluginevent.html index 169e6cb79c5..bee68623beb 100644 --- a/docs/interfaces/roosterjs_editor_types.basepluginevent.html +++ b/docs/interfaces/roosterjs_editor_types.basepluginevent.html @@ -206,7 +206,7 @@

    Optional eventDataCa
    eventDataCache: {}
    @@ -231,7 +231,7 @@

    eventType

    eventType: T
    diff --git a/docs/interfaces/roosterjs_editor_types.beforecutcopyevent.html b/docs/interfaces/roosterjs_editor_types.beforecutcopyevent.html index ad65e07aeac..b3f08b967a6 100644 --- a/docs/interfaces/roosterjs_editor_types.beforecutcopyevent.html +++ b/docs/interfaces/roosterjs_editor_types.beforecutcopyevent.html @@ -116,7 +116,7 @@

    clonedRoot

    @@ -132,7 +132,7 @@

    Optional eventDataCa
    @@ -158,7 +158,7 @@

    eventType

    @@ -174,7 +174,7 @@

    isCut

    @@ -190,7 +190,7 @@

    range

    @@ -206,7 +206,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.beforecutcopyeventdata.html b/docs/interfaces/roosterjs_editor_types.beforecutcopyeventdata.html index a13f613962b..c231243845c 100644 --- a/docs/interfaces/roosterjs_editor_types.beforecutcopyeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.beforecutcopyeventdata.html @@ -113,7 +113,7 @@

    clonedRoot

    clonedRoot: HTMLDivElement
    @@ -128,7 +128,7 @@

    isCut

    isCut: boolean
    @@ -143,7 +143,7 @@

    range

    range: Range
    @@ -158,7 +158,7 @@

    rawEvent

    rawEvent: ClipboardEvent
    diff --git a/docs/interfaces/roosterjs_editor_types.beforedisposeevent.html b/docs/interfaces/roosterjs_editor_types.beforedisposeevent.html index 96496ee778a..b3d5fb64f56 100644 --- a/docs/interfaces/roosterjs_editor_types.beforedisposeevent.html +++ b/docs/interfaces/roosterjs_editor_types.beforedisposeevent.html @@ -109,7 +109,7 @@

    Optional eventDataCa
    @@ -135,7 +135,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingdata.html b/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingdata.html index 7f5e2a6969d..f0971456c9f 100644 --- a/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingdata.html +++ b/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingdata.html @@ -110,7 +110,7 @@

    rawEvent

    rawEvent: KeyboardEvent
    diff --git a/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingevent.html b/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingevent.html index 72ea01c343d..4b4fc384aed 100644 --- a/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingevent.html +++ b/docs/interfaces/roosterjs_editor_types.beforekeyboardeditingevent.html @@ -113,7 +113,7 @@

    Optional eventDataCa
    @@ -139,7 +139,7 @@

    eventType

    @@ -155,7 +155,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.beforepasteevent.html b/docs/interfaces/roosterjs_editor_types.beforepasteevent.html index 7e10826474c..6a3ee48fd6a 100644 --- a/docs/interfaces/roosterjs_editor_types.beforepasteevent.html +++ b/docs/interfaces/roosterjs_editor_types.beforepasteevent.html @@ -124,7 +124,7 @@

    clipboardData

    @@ -140,7 +140,7 @@

    Optional eventDataCa
    @@ -166,7 +166,7 @@

    eventType

    @@ -182,7 +182,7 @@

    fragment

    @@ -198,7 +198,7 @@

    htmlAfter

    @@ -214,7 +214,7 @@

    htmlAttributes

    @@ -230,7 +230,7 @@

    htmlBefore

    @@ -246,7 +246,7 @@

    Readonly pasteType

    @@ -262,7 +262,7 @@

    sanitizingOption

    diff --git a/docs/interfaces/roosterjs_editor_types.beforepasteeventdata.html b/docs/interfaces/roosterjs_editor_types.beforepasteeventdata.html index 54b722afb57..db0b758afc8 100644 --- a/docs/interfaces/roosterjs_editor_types.beforepasteeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.beforepasteeventdata.html @@ -119,7 +119,7 @@

    clipboardData

    clipboardData: ClipboardData
    @@ -134,7 +134,7 @@

    fragment

    fragment: DocumentFragment
    @@ -149,7 +149,7 @@

    htmlAfter

    htmlAfter: string
    @@ -164,7 +164,7 @@

    htmlAttributes

    htmlAttributes: Record<string, string>
    @@ -179,7 +179,7 @@

    htmlBefore

    htmlBefore: string
    @@ -194,7 +194,7 @@

    Readonly pasteType

    @@ -209,7 +209,7 @@

    sanitizingOption

    sanitizingOption: Required<HtmlSanitizerOptions>
    diff --git a/docs/interfaces/roosterjs_editor_types.beforesetcontentevent.html b/docs/interfaces/roosterjs_editor_types.beforesetcontentevent.html index 2b15aab5d7f..55bbc4d387b 100644 --- a/docs/interfaces/roosterjs_editor_types.beforesetcontentevent.html +++ b/docs/interfaces/roosterjs_editor_types.beforesetcontentevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    newContent

    diff --git a/docs/interfaces/roosterjs_editor_types.beforesetcontenteventdata.html b/docs/interfaces/roosterjs_editor_types.beforesetcontenteventdata.html index 8d49a2fc46a..7357ba47b8b 100644 --- a/docs/interfaces/roosterjs_editor_types.beforesetcontenteventdata.html +++ b/docs/interfaces/roosterjs_editor_types.beforesetcontenteventdata.html @@ -110,7 +110,7 @@

    newContent

    newContent: string
    diff --git a/docs/interfaces/roosterjs_editor_types.blockelement.html b/docs/interfaces/roosterjs_editor_types.blockelement.html index 84c82f714e8..d2ce20fc500 100644 --- a/docs/interfaces/roosterjs_editor_types.blockelement.html +++ b/docs/interfaces/roosterjs_editor_types.blockelement.html @@ -115,7 +115,7 @@

    collapseToSingleElement

  • @@ -137,7 +137,7 @@

    contains

  • @@ -165,7 +165,7 @@

    equals

  • @@ -193,7 +193,7 @@

    getEndNode

  • @@ -215,7 +215,7 @@

    getStartNode

  • @@ -237,7 +237,7 @@

    getTextContent

  • @@ -259,7 +259,7 @@

    isAfter

  • diff --git a/docs/interfaces/roosterjs_editor_types.booleandefinition.html b/docs/interfaces/roosterjs_editor_types.booleandefinition.html index 29f41afa832..bb2f9796ae0 100644 --- a/docs/interfaces/roosterjs_editor_types.booleandefinition.html +++ b/docs/interfaces/roosterjs_editor_types.booleandefinition.html @@ -111,7 +111,7 @@

    Optional allowNull

    @@ -127,7 +127,7 @@

    Optional isOptional

    @@ -143,7 +143,7 @@

    type

    @@ -158,7 +158,7 @@

    Optional value

    value: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.browserinfo.html b/docs/interfaces/roosterjs_editor_types.browserinfo.html index e395977ed5c..3fab00082cb 100644 --- a/docs/interfaces/roosterjs_editor_types.browserinfo.html +++ b/docs/interfaces/roosterjs_editor_types.browserinfo.html @@ -113,7 +113,7 @@

    Optional isAndroid: boolean

    @@ -128,7 +128,7 @@

    Optional isChrome: boolean

    @@ -143,7 +143,7 @@

    Optional isEdge: boolean

    @@ -158,7 +158,7 @@

    Optional isFirefox: boolean

    @@ -173,7 +173,7 @@

    Optional isIE: boolean

    @@ -188,7 +188,7 @@

    Optional isIE11OrGreater: boolean

    @@ -203,7 +203,7 @@

    Optional isIEOrEdge: boolean

    @@ -218,7 +218,7 @@

    Optional isMac: boolean

    @@ -233,7 +233,7 @@

    Optional isMobileOrTablet: boolean

    @@ -248,7 +248,7 @@

    Optional isSafari: boolean

    @@ -263,7 +263,7 @@

    Optional isWebKit: boolean

    @@ -278,7 +278,7 @@

    Optional isWin: boolean

    diff --git a/docs/interfaces/roosterjs_editor_types.buildineditfeature.html b/docs/interfaces/roosterjs_editor_types.buildineditfeature.html index 320a6657afc..7ce14cbfa18 100644 --- a/docs/interfaces/roosterjs_editor_types.buildineditfeature.html +++ b/docs/interfaces/roosterjs_editor_types.buildineditfeature.html @@ -120,7 +120,7 @@

    Optional allowFunction

    Inherited from GenericContentEditFeature.allowFunctionKeys

    @@ -136,7 +136,7 @@

    Optional defaultDisabled<
    defaultDisabled: boolean
    @@ -152,7 +152,7 @@

    handleEvent

    @@ -202,7 +202,7 @@

    keys

    @@ -218,7 +218,7 @@

    shouldHandleEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.clipboarddata.html b/docs/interfaces/roosterjs_editor_types.clipboarddata.html index af5c5cbe9a1..400203dd6bc 100644 --- a/docs/interfaces/roosterjs_editor_types.clipboarddata.html +++ b/docs/interfaces/roosterjs_editor_types.clipboarddata.html @@ -112,7 +112,7 @@

    customValues

    customValues: Record<string, string>
    @@ -128,7 +128,7 @@

    Optional files

    files: File[]
    @@ -143,7 +143,7 @@

    Optional html

    html: string
    @@ -158,7 +158,7 @@

    Optional htmlFirstLe
    htmlFirstLevelChildTags: string[]
    @@ -173,7 +173,7 @@

    image

    image: File
    @@ -188,7 +188,7 @@

    Optional imageDataUr
    imageDataUri: string
    @@ -203,7 +203,7 @@

    Optional linkPreview

    linkPreview: EdgeLinkPreview
    @@ -218,7 +218,7 @@

    rawHtml

    rawHtml: string
    @@ -235,7 +235,7 @@

    Optional snapshotBeforesnapshotBeforePaste: string

    @@ -250,7 +250,7 @@

    text

    text: string
    @@ -265,7 +265,7 @@

    types

    types: string[]
    diff --git a/docs/interfaces/roosterjs_editor_types.codefeaturesettings.html b/docs/interfaces/roosterjs_editor_types.codefeaturesettings.html index 8cbb41e13ab..0db0e27b40a 100644 --- a/docs/interfaces/roosterjs_editor_types.codefeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.codefeaturesettings.html @@ -108,7 +108,7 @@

    removeCodeWhenBackspaceOnEmptyFirstLine

    removeCodeWhenBackspaceOnEmptyFirstLine: boolean
    @@ -128,7 +128,7 @@

    removeCodeWhenEnterOnEmptyLine

    removeCodeWhenEnterOnEmptyLine: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.colorkeyandvalue.html b/docs/interfaces/roosterjs_editor_types.colorkeyandvalue.html index 012fe64ace1..a7fdbe25558 100644 --- a/docs/interfaces/roosterjs_editor_types.colorkeyandvalue.html +++ b/docs/interfaces/roosterjs_editor_types.colorkeyandvalue.html @@ -104,7 +104,7 @@

    Optional darkModeCol
    darkModeColor: string
    @@ -119,7 +119,7 @@

    Optional key

    key: string
    @@ -134,7 +134,7 @@

    lightModeColor

    lightModeColor: string
    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblebeforecutcopyevent.html b/docs/interfaces/roosterjs_editor_types.compatiblebeforecutcopyevent.html index 6c47761d40d..e9a7067dc32 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblebeforecutcopyevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblebeforecutcopyevent.html @@ -116,7 +116,7 @@

    clonedRoot

    @@ -132,7 +132,7 @@

    Optional eventDataCa
    @@ -158,7 +158,7 @@

    eventType

    @@ -174,7 +174,7 @@

    isCut

    @@ -190,7 +190,7 @@

    range

    @@ -206,7 +206,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblebeforedisposeevent.html b/docs/interfaces/roosterjs_editor_types.compatiblebeforedisposeevent.html index 3ccc7b0aec0..4cc39de03ac 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblebeforedisposeevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblebeforedisposeevent.html @@ -109,7 +109,7 @@

    Optional eventDataCa
    @@ -135,7 +135,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblebeforekeyboardeditingevent.html b/docs/interfaces/roosterjs_editor_types.compatiblebeforekeyboardeditingevent.html index 17f4c26a89d..e3c5ff3ad3d 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblebeforekeyboardeditingevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblebeforekeyboardeditingevent.html @@ -113,7 +113,7 @@

    Optional eventDataCa
    @@ -139,7 +139,7 @@

    eventType

    @@ -155,7 +155,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblebeforepasteevent.html b/docs/interfaces/roosterjs_editor_types.compatiblebeforepasteevent.html index cf0a49907b1..0360f8b67c2 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblebeforepasteevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblebeforepasteevent.html @@ -124,7 +124,7 @@

    clipboardData

    @@ -140,7 +140,7 @@

    Optional eventDataCa
    @@ -166,7 +166,7 @@

    eventType

    @@ -182,7 +182,7 @@

    fragment

    @@ -198,7 +198,7 @@

    htmlAfter

    @@ -214,7 +214,7 @@

    htmlAttributes

    @@ -230,7 +230,7 @@

    htmlBefore

    @@ -246,7 +246,7 @@

    Readonly pasteType

    @@ -262,7 +262,7 @@

    sanitizingOption

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblebeforesetcontentevent.html b/docs/interfaces/roosterjs_editor_types.compatiblebeforesetcontentevent.html index 3a644b73c33..5473a20dd82 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblebeforesetcontentevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblebeforesetcontentevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    newContent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblecontentchangedevent.html b/docs/interfaces/roosterjs_editor_types.compatiblecontentchangedevent.html index 408606f70e6..fa0b9760310 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblecontentchangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblecontentchangedevent.html @@ -115,7 +115,7 @@

    Optional additionalData

    Inherited from ContentChangedEventData.additionalData

    @@ -126,7 +126,7 @@

    Optional data

    @@ -142,7 +142,7 @@

    Optional eventDataCa
    @@ -168,7 +168,7 @@

    eventType

    @@ -184,7 +184,7 @@

    source

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleeditimageevent.html b/docs/interfaces/roosterjs_editor_types.compatibleeditimageevent.html index 08371b4dc0b..94eafb484db 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleeditimageevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleeditimageevent.html @@ -117,7 +117,7 @@

    Optional eventDataCa
    @@ -143,7 +143,7 @@

    eventType

    @@ -159,7 +159,7 @@

    Readonly image

    @@ -175,7 +175,7 @@

    newSrc

    @@ -192,7 +192,7 @@

    Readonly originalSrc

    @@ -208,7 +208,7 @@

    Readonly previousSrc

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleeditorreadyevent.html b/docs/interfaces/roosterjs_editor_types.compatibleeditorreadyevent.html index 2f86054d725..4dc9484a9f2 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleeditorreadyevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleeditorreadyevent.html @@ -109,7 +109,7 @@

    Optional eventDataCa
    @@ -135,7 +135,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleentershadoweditevent.html b/docs/interfaces/roosterjs_editor_types.compatibleentershadoweditevent.html index a140986542b..6531a203c1d 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleentershadoweditevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleentershadoweditevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    fragment

    @@ -172,7 +172,7 @@

    selectionPath

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleentityoperationevent.html b/docs/interfaces/roosterjs_editor_types.compatibleentityoperationevent.html index 580c1fbb6e0..6a6135aa437 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleentityoperationevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleentityoperationevent.html @@ -119,7 +119,7 @@

    Optional contentForS
    @@ -136,7 +136,7 @@

    entity

    @@ -152,7 +152,7 @@

    Optional eventDataCa
    @@ -178,7 +178,7 @@

    eventType

    @@ -194,7 +194,7 @@

    operation

    @@ -210,7 +210,7 @@

    Optional rawEvent

    @@ -226,7 +226,7 @@

    Optional shouldPersist

    Inherited from EntityOperationEventData.shouldPersist

    @@ -244,7 +244,7 @@

    Optional state

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleextractcontentwithdomevent.html b/docs/interfaces/roosterjs_editor_types.compatibleextractcontentwithdomevent.html index 6dd9878cb6d..095f147ca40 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleextractcontentwithdomevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleextractcontentwithdomevent.html @@ -116,7 +116,7 @@

    clonedRoot

    @@ -133,7 +133,7 @@

    Optional eventDataCa
    @@ -159,7 +159,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleleaveshadoweditevent.html b/docs/interfaces/roosterjs_editor_types.compatibleleaveshadoweditevent.html index 4cf1476f0b3..63f3a393ef8 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleleaveshadoweditevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleleaveshadoweditevent.html @@ -109,7 +109,7 @@

    Optional eventDataCa
    @@ -135,7 +135,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblependingformatstatechangedevent.html b/docs/interfaces/roosterjs_editor_types.compatiblependingformatstatechangedevent.html index add16b83e8d..e19ac97f5af 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblependingformatstatechangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblependingformatstatechangedevent.html @@ -111,7 +111,7 @@

    Optional eventDataCa
    @@ -137,7 +137,7 @@

    eventType

    @@ -152,7 +152,7 @@

    Optional formatCallbackformatCallback: (element: HTMLElement, isInnerNode?: boolean) => any

    @@ -191,7 +191,7 @@

    formatState

    formatState: PendableFormatState
    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleplugincompositionevent.html b/docs/interfaces/roosterjs_editor_types.compatibleplugincompositionevent.html index 810fb72caa4..90974ec6848 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleplugincompositionevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleplugincompositionevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleplugincontextmenuevent.html b/docs/interfaces/roosterjs_editor_types.compatibleplugincontextmenuevent.html index 4734d06638b..66fa286fd2c 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleplugincontextmenuevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleplugincontextmenuevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    items

    @@ -174,7 +174,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleplugininputevent.html b/docs/interfaces/roosterjs_editor_types.compatibleplugininputevent.html index 87390aa8782..37973655327 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleplugininputevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleplugininputevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblepluginkeydownevent.html b/docs/interfaces/roosterjs_editor_types.compatiblepluginkeydownevent.html index b06b4d4b58e..fc47f528b68 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblepluginkeydownevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblepluginkeydownevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblepluginkeypressevent.html b/docs/interfaces/roosterjs_editor_types.compatiblepluginkeypressevent.html index 4fc738fb46c..c311d44ff72 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblepluginkeypressevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblepluginkeypressevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblepluginkeyupevent.html b/docs/interfaces/roosterjs_editor_types.compatiblepluginkeyupevent.html index bebf7ebabd2..0cdf81c30cf 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblepluginkeyupevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblepluginkeyupevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblepluginmousedownevent.html b/docs/interfaces/roosterjs_editor_types.compatiblepluginmousedownevent.html index 9921cb4b376..ed22ea05057 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblepluginmousedownevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblepluginmousedownevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblepluginmouseupevent.html b/docs/interfaces/roosterjs_editor_types.compatiblepluginmouseupevent.html index 78390cdf548..8558166315a 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblepluginmouseupevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblepluginmouseupevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    Optional isClicking

    @@ -172,7 +172,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblepluginscrollevent.html b/docs/interfaces/roosterjs_editor_types.compatiblepluginscrollevent.html index 245582da1ca..4c7658a837a 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblepluginscrollevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblepluginscrollevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    rawEvent

    @@ -167,7 +167,7 @@

    scrollContainer

    diff --git a/docs/interfaces/roosterjs_editor_types.compatibleselectionchangedevent.html b/docs/interfaces/roosterjs_editor_types.compatibleselectionchangedevent.html index 44a1f4d641b..61871c7d3c6 100644 --- a/docs/interfaces/roosterjs_editor_types.compatibleselectionchangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatibleselectionchangedevent.html @@ -113,7 +113,7 @@

    Optional eventDataCa
    @@ -139,7 +139,7 @@

    eventType

    @@ -155,7 +155,7 @@

    selectionRangeEx

    diff --git a/docs/interfaces/roosterjs_editor_types.compatiblezoomchangedevent.html b/docs/interfaces/roosterjs_editor_types.compatiblezoomchangedevent.html index b37ba23f6c7..28c39bf6a7b 100644 --- a/docs/interfaces/roosterjs_editor_types.compatiblezoomchangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.compatiblezoomchangedevent.html @@ -115,7 +115,7 @@

    Optional eventDataCa
    @@ -141,7 +141,7 @@

    eventType

    @@ -157,7 +157,7 @@

    newZoomScale

    @@ -173,7 +173,7 @@

    oldZoomScale

    diff --git a/docs/interfaces/roosterjs_editor_types.contentchangeddata.html b/docs/interfaces/roosterjs_editor_types.contentchangeddata.html index 6ee02623540..f1932301ecf 100644 --- a/docs/interfaces/roosterjs_editor_types.contentchangeddata.html +++ b/docs/interfaces/roosterjs_editor_types.contentchangeddata.html @@ -103,7 +103,7 @@

    Optional formatApiNa
    formatApiName: string
    @@ -118,7 +118,7 @@

    Optional getEntitySt
    getEntityState: () => EntityState[]
    diff --git a/docs/interfaces/roosterjs_editor_types.contentchangedevent.html b/docs/interfaces/roosterjs_editor_types.contentchangedevent.html index ca0bb1999c8..ea125ffecb6 100644 --- a/docs/interfaces/roosterjs_editor_types.contentchangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.contentchangedevent.html @@ -115,7 +115,7 @@

    Optional additionalData

    Inherited from ContentChangedEventData.additionalData

    @@ -126,7 +126,7 @@

    Optional data

    @@ -142,7 +142,7 @@

    Optional eventDataCa
    @@ -168,7 +168,7 @@

    eventType

    @@ -184,7 +184,7 @@

    source

    diff --git a/docs/interfaces/roosterjs_editor_types.contentchangedeventdata.html b/docs/interfaces/roosterjs_editor_types.contentchangedeventdata.html index c529b442b2b..936486adc01 100644 --- a/docs/interfaces/roosterjs_editor_types.contentchangedeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.contentchangedeventdata.html @@ -112,7 +112,7 @@

    Optional additionalDataadditionalData: ContentChangedData

    @@ -122,7 +122,7 @@

    Optional data

    data: any
    @@ -137,7 +137,7 @@

    source

    source: string
    diff --git a/docs/interfaces/roosterjs_editor_types.contenteditfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.contenteditfeaturesettings.html index 7ad590b7f2a..5e43e6286b5 100644 --- a/docs/interfaces/roosterjs_editor_types.contenteditfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.contenteditfeaturesettings.html @@ -177,7 +177,7 @@

    autoBullet

    @@ -198,7 +198,7 @@

    autoBulletList

    @@ -219,7 +219,7 @@

    autoHyphen

    @@ -238,7 +238,7 @@

    autoLink

    @@ -259,7 +259,7 @@

    autoNumberingList

    @@ -280,7 +280,7 @@

    backspaceAfterEntity

    @@ -297,7 +297,7 @@

    clickOnEntity

    @@ -314,7 +314,7 @@

    defaultShortcut

    @@ -335,7 +335,7 @@

    deleteBeforeEntity

    @@ -352,7 +352,7 @@

    deleteTableWithBackspace

    @@ -369,7 +369,7 @@

    enterBeforeReadonlyEntity

    @@ -388,7 +388,7 @@

    escapeFromEntity

    @@ -405,7 +405,7 @@

    indentTableOnTab

    @@ -421,7 +421,7 @@

    indentWhenAltShiftRight

    @@ -442,7 +442,7 @@

    indentWhenTab

    @@ -463,7 +463,7 @@

    indentWhenTabText

    @@ -484,7 +484,7 @@

    insertLineBeforeStructuredNodeFeature

    @@ -506,7 +506,7 @@

    maintainListChain

    @@ -522,7 +522,7 @@

    maintainListChainWhenDelete

    @@ -538,7 +538,7 @@

    markdownBold

    @@ -559,7 +559,7 @@

    markdownInlineCode

    @@ -580,7 +580,7 @@

    markdownItalic

    @@ -601,7 +601,7 @@

    markdownStrikethru

    @@ -622,7 +622,7 @@

    mergeInNewLineWhenBackspaceOnFirstChar

    @@ -643,7 +643,7 @@

    mergeListOnBackspaceAfterList

    @@ -664,7 +664,7 @@

    moveBetweenDelimitersFeature

    @@ -680,7 +680,7 @@

    noCycleCursorMove

    @@ -702,7 +702,7 @@

    outdentWhenAltShiftLeft

    @@ -723,7 +723,7 @@

    outdentWhenBackspaceOnEmptyFirstLine

    @@ -744,7 +744,7 @@

    outdentWhenEnterOnEmptyLine

    @@ -765,7 +765,7 @@

    outdentWhenShiftTab

    @@ -786,7 +786,7 @@

    outdentWhenTabText

    @@ -804,7 +804,7 @@

    removeCodeWhenBackspaceOnEmptyFirstLine

    @@ -825,7 +825,7 @@

    removeCodeWhenEnterOnEmptyLine

    @@ -846,7 +846,7 @@

    removeEntityBetweenDelimiters

    @@ -862,7 +862,7 @@

    tabInTable

    @@ -883,7 +883,7 @@

    unlinkWhenBackspaceAfterLink

    @@ -904,7 +904,7 @@

    unquoteWhenBackspaceOnEmptyFirstLine

    @@ -925,7 +925,7 @@

    unquoteWhenEnterOnEmptyLine

    @@ -946,7 +946,7 @@

    upDownInTable

    diff --git a/docs/interfaces/roosterjs_editor_types.contentmetadatabase.html b/docs/interfaces/roosterjs_editor_types.contentmetadatabase.html index dbfbeb0c946..11c38f4fcbf 100644 --- a/docs/interfaces/roosterjs_editor_types.contentmetadatabase.html +++ b/docs/interfaces/roosterjs_editor_types.contentmetadatabase.html @@ -122,7 +122,7 @@

    isDarkMode

    isDarkMode: boolean
    @@ -132,7 +132,7 @@

    type

    type: T
    diff --git a/docs/interfaces/roosterjs_editor_types.contextmenuprovider.html b/docs/interfaces/roosterjs_editor_types.contextmenuprovider.html index f9808e8838c..551f8c613b4 100644 --- a/docs/interfaces/roosterjs_editor_types.contextmenuprovider.html +++ b/docs/interfaces/roosterjs_editor_types.contextmenuprovider.html @@ -121,7 +121,7 @@

    dispose

    @@ -153,7 +153,7 @@

    getContextMenuItems

    getContextMenuItems: (target: Node) => T[]
    @@ -185,7 +185,7 @@

    getName

    @@ -216,7 +216,7 @@

    initialize

    @@ -260,7 +260,7 @@

    Optional onPluginEve
    @@ -304,7 +304,7 @@

    Optional willHandleE
    diff --git a/docs/interfaces/roosterjs_editor_types.coordinates.html b/docs/interfaces/roosterjs_editor_types.coordinates.html index 8b2dbae047f..0d784a68ecc 100644 --- a/docs/interfaces/roosterjs_editor_types.coordinates.html +++ b/docs/interfaces/roosterjs_editor_types.coordinates.html @@ -103,7 +103,7 @@

    x

    x: number
    @@ -118,7 +118,7 @@

    y

    y: number
    diff --git a/docs/interfaces/roosterjs_editor_types.copypastepluginstate.html b/docs/interfaces/roosterjs_editor_types.copypastepluginstate.html index f4482c52672..9b5e1f11f87 100644 --- a/docs/interfaces/roosterjs_editor_types.copypastepluginstate.html +++ b/docs/interfaces/roosterjs_editor_types.copypastepluginstate.html @@ -102,7 +102,7 @@

    allowedCustomPasteType

    allowedCustomPasteType: string[]
    diff --git a/docs/interfaces/roosterjs_editor_types.coreapimap.html b/docs/interfaces/roosterjs_editor_types.coreapimap.html index bbd8bd61e50..c736de82f6c 100644 --- a/docs/interfaces/roosterjs_editor_types.coreapimap.html +++ b/docs/interfaces/roosterjs_editor_types.coreapimap.html @@ -128,7 +128,7 @@

    addUndoSnapshot

    addUndoSnapshot: AddUndoSnapshot
    @@ -158,7 +158,7 @@

    attachDomEvent

    attachDomEvent: AttachDomEvent
    @@ -187,7 +187,7 @@

    createPasteFragment

    createPasteFragment: CreatePasteFragment
    @@ -220,7 +220,7 @@

    ensureTypeInContainer

    ensureTypeInContainer: EnsureTypeInContainer
    @@ -249,7 +249,7 @@

    focus

    focus: Focus
    @@ -269,7 +269,7 @@

    getContent

    getContent: GetContent
    @@ -295,7 +295,7 @@

    getPendableFormatState

    getPendableFormatState: GetPendableFormatState
    @@ -321,7 +321,7 @@

    getSelectionRange

    getSelectionRange: GetSelectionRange
    @@ -347,7 +347,7 @@

    getSelectionRangeEx

    getSelectionRangeEx: GetSelectionRangeEx
    @@ -373,7 +373,7 @@

    getStyleBasedFormatState

    getStyleBasedFormatState: GetStyleBasedFormatState
    @@ -396,7 +396,7 @@

    hasFocus

    hasFocus: HasFocus
    @@ -419,7 +419,7 @@

    insertNode

    insertNode: InsertNode
    @@ -442,7 +442,7 @@

    restoreUndoSnapshot

    restoreUndoSnapshot: RestoreUndoSnapshot
    @@ -465,7 +465,7 @@

    select

    select: Select
    @@ -498,7 +498,7 @@

    selectImage

    selectImage: SelectImage
    @@ -527,7 +527,7 @@

    selectRange

    selectRange: SelectRange
    @@ -555,7 +555,7 @@

    selectTable

    selectTable: SelectTable
    @@ -588,7 +588,7 @@

    setContent

    setContent: SetContent
    @@ -615,7 +615,7 @@

    switchShadowEdit

    switchShadowEdit: SwitchShadowEdit
    @@ -638,7 +638,7 @@

    transformColor

    transformColor: TransformColor
    @@ -677,7 +677,7 @@

    triggerEvent

    triggerEvent: TriggerEvent
    diff --git a/docs/interfaces/roosterjs_editor_types.coreplugins.html b/docs/interfaces/roosterjs_editor_types.coreplugins.html index a4233791043..e518e9b19ee 100644 --- a/docs/interfaces/roosterjs_editor_types.coreplugins.html +++ b/docs/interfaces/roosterjs_editor_types.coreplugins.html @@ -114,7 +114,7 @@

    Readonly copyPaste

    @@ -129,7 +129,7 @@

    Readonly domEvent

    @@ -144,7 +144,7 @@

    Readonly edit

    @@ -159,7 +159,7 @@

    Readonly entity

    @@ -174,7 +174,7 @@

    Readonly imageSelectionimageSelection: EditorPlugin

    @@ -189,7 +189,7 @@

    Readonly lifecycle

    @@ -204,7 +204,7 @@

    Readonly mouseUp

    mouseUp: EditorPlugin
    @@ -220,7 +220,7 @@

    Readonly normalizeTablenormalizeTable: EditorPlugin

    @@ -235,7 +235,7 @@

    Readonly pendingFormatpendingFormatState: PluginWithState<PendingFormatStatePluginState>

    @@ -250,7 +250,7 @@

    Readonly typeAfterLi
    typeAfterLink: EditorPlugin
    @@ -268,7 +268,7 @@

    Readonly typeInContainer<
    typeInContainer: EditorPlugin
    @@ -283,7 +283,7 @@

    Readonly undo

    diff --git a/docs/interfaces/roosterjs_editor_types.createelementdata.html b/docs/interfaces/roosterjs_editor_types.createelementdata.html index ecf37e81d0a..afd0b2ec5be 100644 --- a/docs/interfaces/roosterjs_editor_types.createelementdata.html +++ b/docs/interfaces/roosterjs_editor_types.createelementdata.html @@ -108,7 +108,7 @@

    Optional attributes

    attributes: Record<string, string>
    @@ -123,7 +123,7 @@

    Optional children

    children: (string | CreateElementData)[]
    @@ -138,7 +138,7 @@

    Optional className

    className: string
    @@ -153,7 +153,7 @@

    Optional dataset

    dataset: Record<string, string>
    @@ -168,7 +168,7 @@

    Optional namespace

    namespace: string
    @@ -183,7 +183,7 @@

    Optional style

    style: string
    @@ -198,7 +198,7 @@

    tag

    tag: string
    diff --git a/docs/interfaces/roosterjs_editor_types.cursorfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.cursorfeaturesettings.html index 7e689813db3..d4930e1661f 100644 --- a/docs/interfaces/roosterjs_editor_types.cursorfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.cursorfeaturesettings.html @@ -107,7 +107,7 @@

    noCycleCursorMove

    noCycleCursorMove: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.customdata.html b/docs/interfaces/roosterjs_editor_types.customdata.html index d21c3849071..e5342b4065d 100644 --- a/docs/interfaces/roosterjs_editor_types.customdata.html +++ b/docs/interfaces/roosterjs_editor_types.customdata.html @@ -103,7 +103,7 @@

    Optional disposer

    disposer: (value: any) => void
    @@ -140,7 +140,7 @@

    value

    value: any
    diff --git a/docs/interfaces/roosterjs_editor_types.customizedefinition.html b/docs/interfaces/roosterjs_editor_types.customizedefinition.html index 0e2cdef1385..bf026358834 100644 --- a/docs/interfaces/roosterjs_editor_types.customizedefinition.html +++ b/docs/interfaces/roosterjs_editor_types.customizedefinition.html @@ -112,7 +112,7 @@

    Optional allowNull

    @@ -128,7 +128,7 @@

    Optional isOptional

    @@ -144,7 +144,7 @@

    type

    @@ -159,7 +159,7 @@

    validator

    validator: (input: any) => boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.customreplacement.html b/docs/interfaces/roosterjs_editor_types.customreplacement.html index ab6b4e66509..06f465451eb 100644 --- a/docs/interfaces/roosterjs_editor_types.customreplacement.html +++ b/docs/interfaces/roosterjs_editor_types.customreplacement.html @@ -105,7 +105,7 @@

    matchSourceCaseSensitive

    matchSourceCaseSensitive: boolean
    @@ -120,7 +120,7 @@

    replacementHTML

    replacementHTML: string
    @@ -135,7 +135,7 @@

    Optional shouldReplaceshouldReplace: (replacement: CustomReplacement, content: string, sourceEditor?: IEditor) => boolean

    @@ -193,7 +193,7 @@

    sourceString

    sourceString: string
    diff --git a/docs/interfaces/roosterjs_editor_types.darkcolorhandler.html b/docs/interfaces/roosterjs_editor_types.darkcolorhandler.html index ae0f061d07d..13d612f1d78 100644 --- a/docs/interfaces/roosterjs_editor_types.darkcolorhandler.html +++ b/docs/interfaces/roosterjs_editor_types.darkcolorhandler.html @@ -111,7 +111,7 @@

    findLightColorFromDarkColor

  • @@ -142,7 +142,7 @@

    getKnownColorsCopy

  • @@ -164,7 +164,7 @@

    parseColorValue

  • @@ -203,7 +203,7 @@

    registerColor

  • @@ -247,7 +247,7 @@

    reset

  • @@ -269,7 +269,7 @@

    transformElementColor

  • diff --git a/docs/interfaces/roosterjs_editor_types.defaultformat.html b/docs/interfaces/roosterjs_editor_types.defaultformat.html index b05febb9562..3e061adcbea 100644 --- a/docs/interfaces/roosterjs_editor_types.defaultformat.html +++ b/docs/interfaces/roosterjs_editor_types.defaultformat.html @@ -110,7 +110,7 @@

    Optional backgroundColor<
    backgroundColor: string
    @@ -125,7 +125,7 @@

    Optional backgroundColors
    backgroundColors: ModeIndependentColor
    @@ -140,7 +140,7 @@

    Optional bold

    bold: boolean
    @@ -155,7 +155,7 @@

    Optional fontFamily

    fontFamily: string
    @@ -170,7 +170,7 @@

    Optional fontSize

    fontSize: string
    @@ -185,7 +185,7 @@

    Optional italic

    italic: boolean
    @@ -200,7 +200,7 @@

    Optional textColor

    textColor: string
    @@ -215,7 +215,7 @@

    Optional textColors

    @@ -230,7 +230,7 @@

    Optional underline

    underline: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.definitionbase.html b/docs/interfaces/roosterjs_editor_types.definitionbase.html index ec0589f11ee..c0eca9ffe2e 100644 --- a/docs/interfaces/roosterjs_editor_types.definitionbase.html +++ b/docs/interfaces/roosterjs_editor_types.definitionbase.html @@ -132,7 +132,7 @@

    Optional allowNull

    allowNull: boolean
    @@ -147,7 +147,7 @@

    Optional isOptional

    isOptional: boolean
    @@ -162,7 +162,7 @@

    type

    type: T
    diff --git a/docs/interfaces/roosterjs_editor_types.domeventhandlerobject.html b/docs/interfaces/roosterjs_editor_types.domeventhandlerobject.html index 2efee8c46fc..d09ce57bbd4 100644 --- a/docs/interfaces/roosterjs_editor_types.domeventhandlerobject.html +++ b/docs/interfaces/roosterjs_editor_types.domeventhandlerobject.html @@ -103,7 +103,7 @@

    beforeDispatch

    beforeDispatch: DOMEventHandlerFunction<Event>
    @@ -119,7 +119,7 @@

    pluginEventType

    diff --git a/docs/interfaces/roosterjs_editor_types.domeventpluginstate.html b/docs/interfaces/roosterjs_editor_types.domeventpluginstate.html index 7b7d6943b1e..5a7fc585d17 100644 --- a/docs/interfaces/roosterjs_editor_types.domeventpluginstate.html +++ b/docs/interfaces/roosterjs_editor_types.domeventpluginstate.html @@ -108,7 +108,7 @@

    contextMenuProviders

    contextMenuProviders: ContextMenuProvider<any>[]
    @@ -123,7 +123,7 @@

    imageSelectionRange

    imageSelectionRange: ImageSelectionRange
    @@ -138,7 +138,7 @@

    isInIME

    isInIME: boolean
    @@ -153,7 +153,7 @@

    scrollContainer

    scrollContainer: HTMLElement
    @@ -168,7 +168,7 @@

    selectionRange

    selectionRange: Range
    @@ -183,7 +183,7 @@

    stopPrintableKeyboardEventPropagation

    stopPrintableKeyboardEventPropagation: boolean
    @@ -198,7 +198,7 @@

    tableSelectionRange

    tableSelectionRange: TableSelectionRange
    diff --git a/docs/interfaces/roosterjs_editor_types.edgelinkpreview.html b/docs/interfaces/roosterjs_editor_types.edgelinkpreview.html index 29514de578c..d6d1b2bcd48 100644 --- a/docs/interfaces/roosterjs_editor_types.edgelinkpreview.html +++ b/docs/interfaces/roosterjs_editor_types.edgelinkpreview.html @@ -106,7 +106,7 @@

    domain

    domain: string
    @@ -121,7 +121,7 @@

    preferred_format

    preferred_format: string
    @@ -136,7 +136,7 @@

    title

    title: string
    @@ -151,7 +151,7 @@

    type

    type: string
    @@ -166,7 +166,7 @@

    url

    url: string
    diff --git a/docs/interfaces/roosterjs_editor_types.editimageevent.html b/docs/interfaces/roosterjs_editor_types.editimageevent.html index 845b285bfe5..99f5670db4d 100644 --- a/docs/interfaces/roosterjs_editor_types.editimageevent.html +++ b/docs/interfaces/roosterjs_editor_types.editimageevent.html @@ -117,7 +117,7 @@

    Optional eventDataCa
    @@ -143,7 +143,7 @@

    eventType

    @@ -159,7 +159,7 @@

    Readonly image

    @@ -175,7 +175,7 @@

    newSrc

    @@ -192,7 +192,7 @@

    Readonly originalSrc

    @@ -208,7 +208,7 @@

    Readonly previousSrc

    diff --git a/docs/interfaces/roosterjs_editor_types.editimageeventdata.html b/docs/interfaces/roosterjs_editor_types.editimageeventdata.html index 6e13c03a0c7..d5e52ab5423 100644 --- a/docs/interfaces/roosterjs_editor_types.editimageeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.editimageeventdata.html @@ -113,7 +113,7 @@

    Readonly image

    image: HTMLImageElement
    @@ -128,7 +128,7 @@

    newSrc

    newSrc: string
    @@ -144,7 +144,7 @@

    Readonly originalSrc

    originalSrc: string
    @@ -159,7 +159,7 @@

    Readonly previousSrc

    previousSrc: string
    diff --git a/docs/interfaces/roosterjs_editor_types.editorcore.html b/docs/interfaces/roosterjs_editor_types.editorcore.html index cce59ee88d3..e6f81ede46c 100644 --- a/docs/interfaces/roosterjs_editor_types.editorcore.html +++ b/docs/interfaces/roosterjs_editor_types.editorcore.html @@ -133,7 +133,7 @@

    Readonly api

    @@ -148,7 +148,7 @@

    Readonly contentDiv

    contentDiv: HTMLDivElement
    @@ -163,7 +163,7 @@

    darkColorHandler

    darkColorHandler: DarkColorHandler
    @@ -179,7 +179,7 @@

    getVisibleViewport

    getVisibleViewport: () => Rect
    @@ -209,7 +209,7 @@

    Optional imageSelectionimageSelectionBorderColor: string

    @@ -224,7 +224,7 @@

    Readonly originalApi

    originalApi: CoreApiMap
    @@ -239,7 +239,7 @@

    Readonly plugins

    plugins: EditorPlugin[]
    @@ -254,7 +254,7 @@

    sizeTransformer

    sizeTransformer: SizeTransformer
    @@ -271,7 +271,7 @@

    Readonly trustedHTMLHandlertrustedHTMLHandler: TrustedHTMLHandler

    @@ -288,7 +288,7 @@

    zoomScale

    zoomScale: number
    diff --git a/docs/interfaces/roosterjs_editor_types.editoroptions.html b/docs/interfaces/roosterjs_editor_types.editoroptions.html index 4e18f54f24f..2673c0ce323 100644 --- a/docs/interfaces/roosterjs_editor_types.editoroptions.html +++ b/docs/interfaces/roosterjs_editor_types.editoroptions.html @@ -129,7 +129,7 @@

    Optional allowKeyboardallowKeyboardEventPropagation: boolean

    @@ -147,7 +147,7 @@

    Optional allowedCustomallowedCustomPasteType: string[]

    @@ -163,7 +163,7 @@

    Optional coreApiOver
    coreApiOverride: Partial<CoreApiMap>
    @@ -179,7 +179,7 @@

    Optional corePluginO
    corePluginOverride: Partial<CorePlugins>
    @@ -195,7 +195,7 @@

    Optional defaultFormatdefaultFormat: DefaultFormat

    @@ -212,7 +212,7 @@

    Optional doNotAdjust
    doNotAdjustEditorColor: boolean
    @@ -227,7 +227,7 @@

    Optional experimentalFeat
    @@ -242,7 +242,7 @@

    Optional getDarkColo
    getDarkColor: (lightColor: string) => string
    @@ -279,7 +279,7 @@

    Optional getVisibleV
    getVisibleViewport: () => Rect
    @@ -309,7 +309,7 @@

    Optional imageSelectionimageSelectionBorderColor: string

    @@ -324,7 +324,7 @@

    Optional inDarkMode<
    inDarkMode: boolean
    @@ -339,7 +339,7 @@

    Optional initialContentinitialContent: string

    @@ -355,7 +355,7 @@

    Optional onExternalC
    onExternalContentTransform: (element: HTMLElement, fromDarkMode: boolean, toDarkMode: boolean, darkColorHandler: DarkColorHandler) => void
    @@ -395,7 +395,7 @@

    Optional plugins

    plugins: EditorPlugin[]
    @@ -413,7 +413,7 @@

    Optional scrollContainer<
    scrollContainer: HTMLElement
    @@ -429,7 +429,7 @@

    Optional sizeTransformer<
    sizeTransformer: SizeTransformer
    @@ -446,7 +446,7 @@

    Optional trustedHTMLHandlertrustedHTMLHandler: TrustedHTMLHandler

    @@ -463,7 +463,7 @@

    Optional undoMetadataundoMetadataSnapshotService: UndoSnapshotsService<Snapshot>

    @@ -479,7 +479,7 @@

    Optional undoSnapshotundoSnapshotService: UndoSnapshotsService<string>

    @@ -497,7 +497,7 @@

    Optional zoomScale

    zoomScale: number
    diff --git a/docs/interfaces/roosterjs_editor_types.editorplugin.html b/docs/interfaces/roosterjs_editor_types.editorplugin.html index 4046b9f3832..c8437c3176d 100644 --- a/docs/interfaces/roosterjs_editor_types.editorplugin.html +++ b/docs/interfaces/roosterjs_editor_types.editorplugin.html @@ -141,7 +141,7 @@

    dispose

    dispose: () => void
    @@ -173,7 +173,7 @@

    getName

    getName: () => string
    @@ -203,7 +203,7 @@

    initialize

    initialize: (editor: IEditor) => void
    @@ -246,7 +246,7 @@

    Optional onPluginEve
    onPluginEvent: (event: PluginEvent) => void
    @@ -289,7 +289,7 @@

    Optional willHandleE
    willHandleEventExclusively: (event: PluginEvent) => boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.editorreadyevent.html b/docs/interfaces/roosterjs_editor_types.editorreadyevent.html index aa0771a8600..7a898634e76 100644 --- a/docs/interfaces/roosterjs_editor_types.editorreadyevent.html +++ b/docs/interfaces/roosterjs_editor_types.editorreadyevent.html @@ -109,7 +109,7 @@

    Optional eventDataCa
    @@ -135,7 +135,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.editorundostate.html b/docs/interfaces/roosterjs_editor_types.editorundostate.html index 27a0da24adc..2cc54f944ba 100644 --- a/docs/interfaces/roosterjs_editor_types.editorundostate.html +++ b/docs/interfaces/roosterjs_editor_types.editorundostate.html @@ -108,7 +108,7 @@

    Optional canRedo

    canRedo: boolean
    @@ -123,7 +123,7 @@

    Optional canUndo

    canUndo: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.editpluginstate.html b/docs/interfaces/roosterjs_editor_types.editpluginstate.html index e2e417749c9..bd65fbfdc71 100644 --- a/docs/interfaces/roosterjs_editor_types.editpluginstate.html +++ b/docs/interfaces/roosterjs_editor_types.editpluginstate.html @@ -102,7 +102,7 @@

    features

    features: Record<number, GenericContentEditFeature<PluginEvent>[]>
    diff --git a/docs/interfaces/roosterjs_editor_types.elementbasedformatstate.html b/docs/interfaces/roosterjs_editor_types.elementbasedformatstate.html index 7ac67d4e91d..6fb267ec1c5 100644 --- a/docs/interfaces/roosterjs_editor_types.elementbasedformatstate.html +++ b/docs/interfaces/roosterjs_editor_types.elementbasedformatstate.html @@ -119,7 +119,7 @@

    Optional canAddImage
    canAddImageAltText: boolean
    @@ -134,7 +134,7 @@

    Optional canMergeTab
    canMergeTableCell: boolean
    @@ -149,7 +149,7 @@

    Optional canUnlink

    canUnlink: boolean
    @@ -164,7 +164,7 @@

    Optional headerLevel

    headerLevel: number
    @@ -179,7 +179,7 @@

    Optional isBlockQuot
    isBlockQuote: boolean
    @@ -194,7 +194,7 @@

    Optional isBullet

    isBullet: boolean
    @@ -209,7 +209,7 @@

    Optional isCodeBlock
    isCodeBlock: boolean
    @@ -224,7 +224,7 @@

    Optional isCodeInlin
    isCodeInline: boolean
    @@ -239,7 +239,7 @@

    Optional isInTable

    isInTable: boolean
    @@ -254,7 +254,7 @@

    Optional isMultiline
    isMultilineSelection: boolean
    @@ -269,7 +269,7 @@

    Optional isNumbering

    isNumbering: boolean
    @@ -284,7 +284,7 @@

    Optional tableFormat

    tableFormat: TableFormat
    @@ -299,7 +299,7 @@

    Optional tableHasHea
    tableHasHeader: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.entershadoweditevent.html b/docs/interfaces/roosterjs_editor_types.entershadoweditevent.html index a79eaf2ec3c..75ac9a5996b 100644 --- a/docs/interfaces/roosterjs_editor_types.entershadoweditevent.html +++ b/docs/interfaces/roosterjs_editor_types.entershadoweditevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    fragment

    @@ -172,7 +172,7 @@

    selectionPath

    diff --git a/docs/interfaces/roosterjs_editor_types.entershadowediteventdata.html b/docs/interfaces/roosterjs_editor_types.entershadowediteventdata.html index 215b76731fc..6363c1ce915 100644 --- a/docs/interfaces/roosterjs_editor_types.entershadowediteventdata.html +++ b/docs/interfaces/roosterjs_editor_types.entershadowediteventdata.html @@ -111,7 +111,7 @@

    fragment

    fragment: DocumentFragment
    @@ -126,7 +126,7 @@

    selectionPath

    selectionPath: SelectionPath
    diff --git a/docs/interfaces/roosterjs_editor_types.entity.html b/docs/interfaces/roosterjs_editor_types.entity.html index 224b425c268..c902c4acc9a 100644 --- a/docs/interfaces/roosterjs_editor_types.entity.html +++ b/docs/interfaces/roosterjs_editor_types.entity.html @@ -110,7 +110,7 @@

    id

    id: string
    @@ -125,7 +125,7 @@

    isReadonly

    isReadonly: boolean
    @@ -140,7 +140,7 @@

    type

    type: string
    @@ -155,7 +155,7 @@

    wrapper

    wrapper: HTMLElement
    diff --git a/docs/interfaces/roosterjs_editor_types.entityfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.entityfeaturesettings.html index 8ed1f130cb6..2a88d762c00 100644 --- a/docs/interfaces/roosterjs_editor_types.entityfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.entityfeaturesettings.html @@ -113,7 +113,7 @@

    backspaceAfterEntity

    backspaceAfterEntity: boolean
    @@ -129,7 +129,7 @@

    clickOnEntity

    clickOnEntity: boolean
    @@ -145,7 +145,7 @@

    deleteBeforeEntity

    deleteBeforeEntity: boolean
    @@ -161,7 +161,7 @@

    enterBeforeReadonlyEntity

    enterBeforeReadonlyEntity: boolean
    @@ -179,7 +179,7 @@

    escapeFromEntity

    escapeFromEntity: boolean
    @@ -195,7 +195,7 @@

    moveBetweenDelimitersFeature

    moveBetweenDelimitersFeature: boolean
    @@ -210,7 +210,7 @@

    removeEntityBetweenDelimiters

    removeEntityBetweenDelimiters: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.entityoperationevent.html b/docs/interfaces/roosterjs_editor_types.entityoperationevent.html index 0d754c73fe3..de288d873e7 100644 --- a/docs/interfaces/roosterjs_editor_types.entityoperationevent.html +++ b/docs/interfaces/roosterjs_editor_types.entityoperationevent.html @@ -119,7 +119,7 @@

    Optional contentForS
    @@ -136,7 +136,7 @@

    entity

    @@ -152,7 +152,7 @@

    Optional eventDataCa
    @@ -178,7 +178,7 @@

    eventType

    @@ -194,7 +194,7 @@

    operation

    @@ -210,7 +210,7 @@

    Optional rawEvent

    @@ -226,7 +226,7 @@

    Optional shouldPersist

    Inherited from EntityOperationEventData.shouldPersist

    @@ -244,7 +244,7 @@

    Optional state

    diff --git a/docs/interfaces/roosterjs_editor_types.entityoperationeventdata.html b/docs/interfaces/roosterjs_editor_types.entityoperationeventdata.html index 5c79de9acb7..b9e358b5d48 100644 --- a/docs/interfaces/roosterjs_editor_types.entityoperationeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.entityoperationeventdata.html @@ -115,7 +115,7 @@

    Optional contentForS
    contentForShadowEntity: DocumentFragment
    @@ -131,7 +131,7 @@

    entity

    entity: Entity
    @@ -146,7 +146,7 @@

    operation

    @@ -161,7 +161,7 @@

    Optional rawEvent

    rawEvent: Event
    @@ -176,7 +176,7 @@

    Optional shouldPersistshouldPersist: boolean

    @@ -193,7 +193,7 @@

    Optional state

    state: string
    diff --git a/docs/interfaces/roosterjs_editor_types.entitypluginstate.html b/docs/interfaces/roosterjs_editor_types.entitypluginstate.html index 8192dcfdeff..dd4e742982e 100644 --- a/docs/interfaces/roosterjs_editor_types.entitypluginstate.html +++ b/docs/interfaces/roosterjs_editor_types.entitypluginstate.html @@ -105,7 +105,7 @@

    Optional clickingPointclickingPoint: { pageX: number; pageY: number }

    @@ -133,7 +133,7 @@

    entityMap

    entityMap: Record<string, KnownEntityItem>
    @@ -148,7 +148,7 @@

    Optional knownEntity
    knownEntityElements: HTMLElement[]
    @@ -165,7 +165,7 @@

    Optional shadowEntityshadowEntityCache: Record<string, HTMLElement>

    diff --git a/docs/interfaces/roosterjs_editor_types.entitystate.html b/docs/interfaces/roosterjs_editor_types.entitystate.html index 8c6af6c7b04..fcf78abae82 100644 --- a/docs/interfaces/roosterjs_editor_types.entitystate.html +++ b/docs/interfaces/roosterjs_editor_types.entitystate.html @@ -104,7 +104,7 @@

    id

    id: string
    @@ -119,7 +119,7 @@

    state

    state: string
    @@ -136,7 +136,7 @@

    type

    type: string
    diff --git a/docs/interfaces/roosterjs_editor_types.extractclipboardeventoption.html b/docs/interfaces/roosterjs_editor_types.extractclipboardeventoption.html index db29aba9fb2..67b70da5415 100644 --- a/docs/interfaces/roosterjs_editor_types.extractclipboardeventoption.html +++ b/docs/interfaces/roosterjs_editor_types.extractclipboardeventoption.html @@ -116,7 +116,7 @@

    Optional allowLinkPr
    @@ -134,7 +134,7 @@

    Optional allowedCustom

    Inherited from ExtractClipboardItemsOption.allowedCustomPasteType

    @@ -151,7 +151,7 @@

    Optional getTempDiv<
    @@ -182,7 +182,7 @@

    Optional removeTempD
    diff --git a/docs/interfaces/roosterjs_editor_types.extractclipboarditemsforieoptions.html b/docs/interfaces/roosterjs_editor_types.extractclipboarditemsforieoptions.html index 113cb8d219f..987a9453abd 100644 --- a/docs/interfaces/roosterjs_editor_types.extractclipboarditemsforieoptions.html +++ b/docs/interfaces/roosterjs_editor_types.extractclipboarditemsforieoptions.html @@ -108,7 +108,7 @@

    Optional getTempDiv<
    getTempDiv: () => HTMLDivElement
    @@ -138,7 +138,7 @@

    Optional removeTempD
    removeTempDiv: (div: HTMLDivElement) => void
    diff --git a/docs/interfaces/roosterjs_editor_types.extractclipboarditemsoption.html b/docs/interfaces/roosterjs_editor_types.extractclipboarditemsoption.html index 19452379838..36b5999763c 100644 --- a/docs/interfaces/roosterjs_editor_types.extractclipboarditemsoption.html +++ b/docs/interfaces/roosterjs_editor_types.extractclipboarditemsoption.html @@ -108,7 +108,7 @@

    Optional allowLinkPr
    allowLinkPreview: boolean
    @@ -125,7 +125,7 @@

    Optional allowedCustomallowedCustomPasteType: string[]

    diff --git a/docs/interfaces/roosterjs_editor_types.extractcontentwithdomevent.html b/docs/interfaces/roosterjs_editor_types.extractcontentwithdomevent.html index 0bd14d12a90..2b0003310f4 100644 --- a/docs/interfaces/roosterjs_editor_types.extractcontentwithdomevent.html +++ b/docs/interfaces/roosterjs_editor_types.extractcontentwithdomevent.html @@ -116,7 +116,7 @@

    clonedRoot

    @@ -133,7 +133,7 @@

    Optional eventDataCa
    @@ -159,7 +159,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.extractcontentwithdomeventdata.html b/docs/interfaces/roosterjs_editor_types.extractcontentwithdomeventdata.html index 4d796aee66d..7d93e439e2a 100644 --- a/docs/interfaces/roosterjs_editor_types.extractcontentwithdomeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.extractcontentwithdomeventdata.html @@ -110,7 +110,7 @@

    clonedRoot

    clonedRoot: HTMLElement
    diff --git a/docs/interfaces/roosterjs_editor_types.formatstate.html b/docs/interfaces/roosterjs_editor_types.formatstate.html index c27b7287433..a6ccecca5c3 100644 --- a/docs/interfaces/roosterjs_editor_types.formatstate.html +++ b/docs/interfaces/roosterjs_editor_types.formatstate.html @@ -155,7 +155,7 @@

    Optional backgroundColor<
    @@ -171,7 +171,7 @@

    Optional backgroundColors
    @@ -187,7 +187,7 @@

    Optional canAddImage
    @@ -203,7 +203,7 @@

    Optional canMergeTab
    @@ -219,7 +219,7 @@

    Optional canRedo

    @@ -235,7 +235,7 @@

    Optional canUndo

    @@ -251,7 +251,7 @@

    Optional canUnlink

    @@ -267,7 +267,7 @@

    Optional direction

    @@ -283,7 +283,7 @@

    Optional fontName

    @@ -299,7 +299,7 @@

    Optional fontSize

    @@ -315,7 +315,7 @@

    Optional headerLevel

    @@ -331,7 +331,7 @@

    Optional isBlockQuot
    @@ -347,7 +347,7 @@

    Optional isBold

    @@ -363,7 +363,7 @@

    Optional isBullet

    @@ -379,7 +379,7 @@

    Optional isCodeBlock
    @@ -395,7 +395,7 @@

    Optional isCodeInlin
    @@ -410,7 +410,7 @@

    Optional isDarkMode<
    isDarkMode: boolean
    @@ -426,7 +426,7 @@

    Optional isInTable

    @@ -442,7 +442,7 @@

    Optional isItalic

    @@ -458,7 +458,7 @@

    Optional isMultiline
    @@ -474,7 +474,7 @@

    Optional isNumbering

    @@ -490,7 +490,7 @@

    Optional isStrikeThr
    @@ -506,7 +506,7 @@

    Optional isSubscript

    @@ -522,7 +522,7 @@

    Optional isSuperscript

    Inherited from PendableFormatState.isSuperscript

    @@ -538,7 +538,7 @@

    Optional isUnderline

    @@ -554,7 +554,7 @@

    Optional lineHeight

    @@ -570,7 +570,7 @@

    Optional marginBottom

    Inherited from StyleBasedFormatState.marginBottom

    @@ -586,7 +586,7 @@

    Optional marginTop

    @@ -602,7 +602,7 @@

    Optional tableFormat

    @@ -618,7 +618,7 @@

    Optional tableHasHea
    @@ -634,7 +634,7 @@

    Optional textAlign

    @@ -650,7 +650,7 @@

    Optional textColor

    @@ -666,7 +666,7 @@

    Optional textColors

    @@ -681,7 +681,7 @@

    Optional zoomScale

    zoomScale: number
    diff --git a/docs/interfaces/roosterjs_editor_types.genericcontenteditfeature.html b/docs/interfaces/roosterjs_editor_types.genericcontenteditfeature.html index a9fb109f4af..9bf756bd69f 100644 --- a/docs/interfaces/roosterjs_editor_types.genericcontenteditfeature.html +++ b/docs/interfaces/roosterjs_editor_types.genericcontenteditfeature.html @@ -118,7 +118,7 @@

    Optional allowFunctionallowFunctionKeys: boolean

    @@ -134,7 +134,7 @@

    handleEvent

    handleEvent: (event: TEvent, editor: IEditor) => any
    @@ -183,7 +183,7 @@

    keys

    keys: number[]
    @@ -198,7 +198,7 @@

    shouldHandleEvent

    shouldHandleEvent: (event: TEvent, editor: IEditor, ctrlOrMeta: boolean) => any
    diff --git a/docs/interfaces/roosterjs_editor_types.htmlsanitizeroptions.html b/docs/interfaces/roosterjs_editor_types.htmlsanitizeroptions.html index b5d12054a44..0e6f4004604 100644 --- a/docs/interfaces/roosterjs_editor_types.htmlsanitizeroptions.html +++ b/docs/interfaces/roosterjs_editor_types.htmlsanitizeroptions.html @@ -117,7 +117,7 @@

    Optional additionalAllowe
    additionalAllowedAttributes: string[]
    @@ -132,7 +132,7 @@

    Optional additionalAllowe
    additionalAllowedCssClasses: string[]
    @@ -147,7 +147,7 @@

    Optional additionalDefaul
    additionalDefaultStyleValues: StringMap
    @@ -162,7 +162,7 @@

    Optional additionalGlobal
    additionalGlobalStyleNodes: HTMLStyleElement[]
    @@ -177,7 +177,7 @@

    Optional additionalPredef
    additionalPredefinedCssForElement: PredefinedCssMap
    @@ -192,7 +192,7 @@

    Optional additionalTagadditionalTagReplacements: Record<string, string>

    @@ -212,7 +212,7 @@

    Optional attributeCallbac
    attributeCallbacks: AttributeCallbackMap
    @@ -227,7 +227,7 @@

    Optional cssStyleCal
    cssStyleCallbacks: CssStyleCallbackMap
    @@ -242,7 +242,7 @@

    Optional elementCallbacks
    elementCallbacks: ElementCallbackMap
    @@ -257,7 +257,7 @@

    Optional preserveHtmlpreserveHtmlComments: boolean

    @@ -272,7 +272,7 @@

    Optional unknownTagR
    unknownTagReplacement: string
    diff --git a/docs/interfaces/roosterjs_editor_types.icontenttraverser.html b/docs/interfaces/roosterjs_editor_types.icontenttraverser.html index 2bcd18a6653..5942415e680 100644 --- a/docs/interfaces/roosterjs_editor_types.icontenttraverser.html +++ b/docs/interfaces/roosterjs_editor_types.icontenttraverser.html @@ -118,7 +118,7 @@

    currentBlockElement

    currentBlockElement: BlockElement
    @@ -133,7 +133,7 @@

    currentInlineElement

    currentInlineElement: InlineElement
    @@ -155,7 +155,7 @@

    getNextBlockElement

  • @@ -177,7 +177,7 @@

    getNextInlineElement

  • @@ -199,7 +199,7 @@

    getPreviousBlockElement

  • @@ -221,7 +221,7 @@

    getPreviousInlineElement

  • diff --git a/docs/interfaces/roosterjs_editor_types.ieditor.html b/docs/interfaces/roosterjs_editor_types.ieditor.html index 1082a064e4c..7942cfd572a 100644 --- a/docs/interfaces/roosterjs_editor_types.ieditor.html +++ b/docs/interfaces/roosterjs_editor_types.ieditor.html @@ -179,7 +179,7 @@

    addContentEditFeature

  • @@ -211,7 +211,7 @@

    addDomEventHandler

  • @@ -253,7 +253,7 @@

    Returns void
    @@ -298,7 +298,7 @@

    addUndoSnapshot

  • @@ -372,7 +372,7 @@

    collapseNodes

  • @@ -421,7 +421,7 @@

    contains

  • @@ -444,7 +444,7 @@

    Returns boolean
    @@ -476,7 +476,7 @@

    deleteNode

  • @@ -508,7 +508,7 @@

    deleteSelectedContent

  • @@ -530,7 +530,7 @@

    dispose

  • @@ -552,7 +552,7 @@

    ensureTypeInContainer

  • @@ -589,7 +589,7 @@

    focus

  • @@ -611,7 +611,7 @@

    getBlockElementAtNode

  • @@ -643,7 +643,7 @@

    getBlockTraverser

  • @@ -675,7 +675,7 @@

    getBodyTraverser

  • @@ -706,7 +706,7 @@

    getContent

  • @@ -738,7 +738,7 @@

    getContentSearcherOfCursor

  • @@ -771,7 +771,7 @@

    getCustomData

  • @@ -852,7 +852,7 @@

    getDarkColorHandler

  • @@ -874,7 +874,7 @@

    getDefaultFormat

  • @@ -897,7 +897,7 @@

    getDocument

  • @@ -920,7 +920,7 @@

    getEditorDomAttribute

  • @@ -951,7 +951,7 @@

    getElementAtCursor

  • @@ -1000,7 +1000,7 @@

    getFocusedPosition

  • @@ -1022,7 +1022,7 @@

    getPendableFormatState

  • @@ -1054,7 +1054,7 @@

    getRelativeDistanceToEditor

  • @@ -1096,7 +1096,7 @@

    getScrollContainer

  • @@ -1118,7 +1118,7 @@

    getSelectedRegions

  • @@ -1146,7 +1146,7 @@

    getSelectionPath

  • @@ -1170,7 +1170,7 @@

    getSelectionRange

  • @@ -1204,7 +1204,7 @@

    getSelectionRangeEx

  • @@ -1228,7 +1228,7 @@

    getSelectionTraverser

  • @@ -1257,7 +1257,7 @@

    getSizeTransformer

  • @@ -1281,7 +1281,7 @@

    getStyleBasedFormatState

  • @@ -1309,7 +1309,7 @@

    getTrustedHTMLHandler

  • @@ -1334,7 +1334,7 @@

    getUndoState

  • @@ -1356,7 +1356,7 @@

    getVisibleViewport

  • @@ -1378,7 +1378,7 @@

    getZoomScale

  • @@ -1403,7 +1403,7 @@

    hasFocus

  • @@ -1426,7 +1426,7 @@

    insertContent

  • @@ -1464,7 +1464,7 @@

    insertNode

  • @@ -1506,7 +1506,7 @@

    isDarkMode

  • @@ -1529,7 +1529,7 @@

    isDisposed

  • @@ -1552,7 +1552,7 @@

    isEmpty

  • @@ -1584,7 +1584,7 @@

    isFeatureEnabled

  • @@ -1615,7 +1615,7 @@

    isInIME

  • @@ -1638,7 +1638,7 @@

    isInShadowEdit

  • @@ -1660,7 +1660,7 @@

    isPositionAtBeginning

  • @@ -1693,7 +1693,7 @@

    paste

  • @@ -1739,7 +1739,7 @@

    queryElements

  • @@ -1792,7 +1792,7 @@

    Returns HTMLEleme
  • @@ -1845,7 +1845,7 @@

    Returns T<
  • @@ -1904,7 +1904,7 @@

    Returns HTMLEleme
  • @@ -1972,7 +1972,7 @@

    redo

  • @@ -1994,7 +1994,7 @@

    removeContentEditFeature

  • @@ -2025,7 +2025,7 @@

    replaceNode

  • @@ -2069,7 +2069,7 @@

    runAsync

  • @@ -2139,7 +2139,7 @@

    select

  • @@ -2162,7 +2162,7 @@

    Returns boolean
    @@ -2185,7 +2185,7 @@

    Returns boolean
    @@ -2214,7 +2214,7 @@

    Returns boolean
    @@ -2237,7 +2237,7 @@

    Returns boolean
    @@ -2266,7 +2266,7 @@

    Returns boolean
    @@ -2307,7 +2307,7 @@

    Returns boolean
    @@ -2330,7 +2330,7 @@

    Returns boolean
    @@ -2358,7 +2358,7 @@

    Returns boolean
    @@ -2389,7 +2389,7 @@

    setContent

  • @@ -2426,7 +2426,7 @@

    setDarkModeState

  • @@ -2457,7 +2457,7 @@

    setEditorDomAttribute

  • @@ -2494,7 +2494,7 @@

    setZoomScale

  • @@ -2524,7 +2524,7 @@

    startShadowEdit

  • @@ -2551,7 +2551,7 @@

    stopShadowEdit

  • @@ -2573,7 +2573,7 @@

    transformToDarkColor

  • @@ -2604,7 +2604,7 @@

    triggerContentChangedEvent

  • @@ -2641,7 +2641,7 @@

    triggerPluginEvent

  • @@ -2693,7 +2693,7 @@

    undo

  • diff --git a/docs/interfaces/roosterjs_editor_types.imagecontentmetadata.html b/docs/interfaces/roosterjs_editor_types.imagecontentmetadata.html index 2aef6c636d2..4eba984d8fb 100644 --- a/docs/interfaces/roosterjs_editor_types.imagecontentmetadata.html +++ b/docs/interfaces/roosterjs_editor_types.imagecontentmetadata.html @@ -113,7 +113,7 @@

    imageId

    imageId: string
    @@ -124,7 +124,7 @@

    isDarkMode

    @@ -135,7 +135,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.imageeditoptions.html b/docs/interfaces/roosterjs_editor_types.imageeditoptions.html index 08f1ac93906..53cc5788762 100644 --- a/docs/interfaces/roosterjs_editor_types.imageeditoptions.html +++ b/docs/interfaces/roosterjs_editor_types.imageeditoptions.html @@ -112,7 +112,7 @@

    Optional borderColor

    borderColor: string | ModeIndependentColor
    @@ -132,7 +132,7 @@

    Optional disableCrop

    disableCrop: boolean
    @@ -147,7 +147,7 @@

    Optional disableRotatedisableRotate: boolean

    @@ -162,7 +162,7 @@

    Optional disableSide
    disableSideResize: boolean
    @@ -177,7 +177,7 @@

    Optional imageSelectorimageSelector: string

    @@ -197,7 +197,7 @@

    Optional minHeight

    minHeight: number
    @@ -217,7 +217,7 @@

    Optional minRotateDe
    minRotateDeg: number
    @@ -238,7 +238,7 @@

    Optional minWidth

    minWidth: number
    @@ -258,7 +258,7 @@

    Optional onSelectSta
    @@ -278,7 +278,7 @@

    Optional preserveRatiopreserveRatio: boolean

    @@ -299,7 +299,7 @@

    Optional rotateIconHTMLrotateIconHTML: string

    diff --git a/docs/interfaces/roosterjs_editor_types.imageselectionrange.html b/docs/interfaces/roosterjs_editor_types.imageselectionrange.html index a6c70753938..10fe6cebc03 100644 --- a/docs/interfaces/roosterjs_editor_types.imageselectionrange.html +++ b/docs/interfaces/roosterjs_editor_types.imageselectionrange.html @@ -111,7 +111,7 @@

    areAllCollapsed

    @@ -126,7 +126,7 @@

    image

    image: HTMLImageElement
    @@ -142,7 +142,7 @@

    ranges

    @@ -158,7 +158,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.inlineelement.html b/docs/interfaces/roosterjs_editor_types.inlineelement.html index 237369b37aa..d21b88d1042 100644 --- a/docs/interfaces/roosterjs_editor_types.inlineelement.html +++ b/docs/interfaces/roosterjs_editor_types.inlineelement.html @@ -131,7 +131,7 @@

    applyStyle

  • @@ -180,7 +180,7 @@

    contains

  • @@ -208,7 +208,7 @@

    getContainerNode

  • @@ -230,7 +230,7 @@

    getEndPosition

  • @@ -252,7 +252,7 @@

    getParentBlock

  • @@ -274,7 +274,7 @@

    getStartPosition

  • @@ -296,7 +296,7 @@

    getTextContent

  • @@ -318,7 +318,7 @@

    isAfter

  • @@ -346,7 +346,7 @@

    isTextualInlineElement

  • diff --git a/docs/interfaces/roosterjs_editor_types.insertoptionbase.html b/docs/interfaces/roosterjs_editor_types.insertoptionbase.html index 9e10bde369c..e29a30f882a 100644 --- a/docs/interfaces/roosterjs_editor_types.insertoptionbase.html +++ b/docs/interfaces/roosterjs_editor_types.insertoptionbase.html @@ -113,7 +113,7 @@

    Optional insertOnNew
    insertOnNewLine: boolean
    @@ -129,7 +129,7 @@

    Optional insertToRegioninsertToRegionRoot: boolean

    @@ -146,7 +146,7 @@

    Optional replaceSelection
    replaceSelection: boolean
    @@ -162,7 +162,7 @@

    Optional updateCursor

    updateCursor: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.insertoptionbasic.html b/docs/interfaces/roosterjs_editor_types.insertoptionbasic.html index 1292380cb5f..832dfd6d383 100644 --- a/docs/interfaces/roosterjs_editor_types.insertoptionbasic.html +++ b/docs/interfaces/roosterjs_editor_types.insertoptionbasic.html @@ -112,7 +112,7 @@

    Optional insertOnNew
    @@ -129,7 +129,7 @@

    Optional insertToRegion

    Inherited from InsertOptionBase.insertToRegionRoot

    @@ -146,7 +146,7 @@

    position

    @@ -157,7 +157,7 @@

    Optional replaceSelection
    @@ -174,7 +174,7 @@

    Optional updateCursor

    Inherited from InsertOptionBase.updateCursor

    diff --git a/docs/interfaces/roosterjs_editor_types.insertoptionrange.html b/docs/interfaces/roosterjs_editor_types.insertoptionrange.html index 36819455df3..6d5be8de6b9 100644 --- a/docs/interfaces/roosterjs_editor_types.insertoptionrange.html +++ b/docs/interfaces/roosterjs_editor_types.insertoptionrange.html @@ -113,7 +113,7 @@

    Optional insertOnNew
    @@ -130,7 +130,7 @@

    Optional insertToRegion

    Inherited from InsertOptionBase.insertToRegionRoot

    @@ -147,7 +147,7 @@

    position

    position: Range | Range
    @@ -157,7 +157,7 @@

    range

    range: Range
    @@ -173,7 +173,7 @@

    Optional replaceSelection
    @@ -190,7 +190,7 @@

    Optional updateCursor

    Inherited from InsertOptionBase.updateCursor

    diff --git a/docs/interfaces/roosterjs_editor_types.ipositioncontentsearcher.html b/docs/interfaces/roosterjs_editor_types.ipositioncontentsearcher.html index 76529c98cc3..90c848b7da0 100644 --- a/docs/interfaces/roosterjs_editor_types.ipositioncontentsearcher.html +++ b/docs/interfaces/roosterjs_editor_types.ipositioncontentsearcher.html @@ -118,7 +118,7 @@

    forEachTextInlineElement

  • @@ -168,7 +168,7 @@

    getInlineElementAfter

  • @@ -191,7 +191,7 @@

    getInlineElementBefore

  • @@ -214,7 +214,7 @@

    getNearestNonTextInlineElement

  • @@ -237,7 +237,7 @@

    getRangeFromText

  • @@ -275,7 +275,7 @@

    getSubStringBefore

  • @@ -310,7 +310,7 @@

    getWordBefore

  • diff --git a/docs/interfaces/roosterjs_editor_types.knownentityitem.html b/docs/interfaces/roosterjs_editor_types.knownentityitem.html index 2a4d99267cc..05187dcb17c 100644 --- a/docs/interfaces/roosterjs_editor_types.knownentityitem.html +++ b/docs/interfaces/roosterjs_editor_types.knownentityitem.html @@ -104,7 +104,7 @@

    Optional canPersist

    canPersist: boolean
    @@ -119,7 +119,7 @@

    element

    element: HTMLElement
    @@ -134,7 +134,7 @@

    Optional isDeleted

    isDeleted: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.leaveshadoweditevent.html b/docs/interfaces/roosterjs_editor_types.leaveshadoweditevent.html index 216d6aaf5b9..14f7b4b0493 100644 --- a/docs/interfaces/roosterjs_editor_types.leaveshadoweditevent.html +++ b/docs/interfaces/roosterjs_editor_types.leaveshadoweditevent.html @@ -109,7 +109,7 @@

    Optional eventDataCa
    @@ -135,7 +135,7 @@

    eventType

    diff --git a/docs/interfaces/roosterjs_editor_types.lifecyclepluginstate.html b/docs/interfaces/roosterjs_editor_types.lifecyclepluginstate.html index 22da152a71d..c83256d0a23 100644 --- a/docs/interfaces/roosterjs_editor_types.lifecyclepluginstate.html +++ b/docs/interfaces/roosterjs_editor_types.lifecyclepluginstate.html @@ -112,7 +112,7 @@

    customData

    customData: Record<string, CustomData>
    @@ -127,7 +127,7 @@

    defaultFormat

    defaultFormat: DefaultFormat
    @@ -142,7 +142,7 @@

    experimentalFeatures

    @@ -157,7 +157,7 @@

    getDarkColor

    getDarkColor: (lightColor: string) => string
    @@ -193,7 +193,7 @@

    isDarkMode

    isDarkMode: boolean
    @@ -208,7 +208,7 @@

    onExternalContentTransform

    onExternalContentTransform: (element: HTMLElement, fromDarkMode: boolean, toDarkMode: boolean, darkColorHandler: DarkColorHandler) => void
    @@ -253,7 +253,7 @@

    shadowEditEntities

    shadowEditEntities: Record<string, HTMLElement>
    @@ -268,7 +268,7 @@

    shadowEditFragment

    shadowEditFragment: DocumentFragment
    @@ -283,7 +283,7 @@

    shadowEditImageSelectionPath

    shadowEditImageSelectionPath: SelectionPath[]
    @@ -298,7 +298,7 @@

    shadowEditSelectionPath

    shadowEditSelectionPath: SelectionPath
    @@ -313,7 +313,7 @@

    shadowEditTableSelectionPath

    shadowEditTableSelectionPath: SelectionPath[]
    diff --git a/docs/interfaces/roosterjs_editor_types.linkdata.html b/docs/interfaces/roosterjs_editor_types.linkdata.html index 41f9f0d63bf..839e66ae971 100644 --- a/docs/interfaces/roosterjs_editor_types.linkdata.html +++ b/docs/interfaces/roosterjs_editor_types.linkdata.html @@ -104,7 +104,7 @@

    normalizedUrl

    normalizedUrl: string
    @@ -119,7 +119,7 @@

    originalUrl

    originalUrl: string
    @@ -134,7 +134,7 @@

    scheme

    scheme: string
    diff --git a/docs/interfaces/roosterjs_editor_types.listfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.listfeaturesettings.html index fcb47ca598f..ef2af39718a 100644 --- a/docs/interfaces/roosterjs_editor_types.listfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.listfeaturesettings.html @@ -119,7 +119,7 @@

    autoBullet

    autoBullet: boolean
    @@ -139,7 +139,7 @@

    autoBulletList

    autoBulletList: boolean
    @@ -159,7 +159,7 @@

    autoNumberingList

    autoNumberingList: boolean
    @@ -179,7 +179,7 @@

    indentWhenAltShiftRight

    indentWhenAltShiftRight: boolean
    @@ -199,7 +199,7 @@

    indentWhenTab

    indentWhenTab: boolean
    @@ -219,7 +219,7 @@

    maintainListChain

    maintainListChain: boolean
    @@ -234,7 +234,7 @@

    maintainListChainWhenDelete

    maintainListChainWhenDelete: boolean
    @@ -249,7 +249,7 @@

    mergeInNewLineWhenBackspaceOnFirstChar

    mergeInNewLineWhenBackspaceOnFirstChar: boolean
    @@ -269,7 +269,7 @@

    mergeListOnBackspaceAfterList

    mergeListOnBackspaceAfterList: boolean
    @@ -289,7 +289,7 @@

    outdentWhenAltShiftLeft

    outdentWhenAltShiftLeft: boolean
    @@ -309,7 +309,7 @@

    outdentWhenBackspaceOnEmptyFirstLine

    outdentWhenBackspaceOnEmptyFirstLine: boolean
    @@ -329,7 +329,7 @@

    outdentWhenEnterOnEmptyLine

    outdentWhenEnterOnEmptyLine: boolean
    @@ -349,7 +349,7 @@

    outdentWhenShiftTab

    outdentWhenShiftTab: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.markdownfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.markdownfeaturesettings.html index 68c4db9e358..c7096e81adc 100644 --- a/docs/interfaces/roosterjs_editor_types.markdownfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.markdownfeaturesettings.html @@ -110,7 +110,7 @@

    markdownBold

    markdownBold: boolean
    @@ -130,7 +130,7 @@

    markdownInlineCode

    markdownInlineCode: boolean
    @@ -150,7 +150,7 @@

    markdownItalic

    markdownItalic: boolean
    @@ -170,7 +170,7 @@

    markdownStrikethru

    markdownStrikethru: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.modeindependentcolor.html b/docs/interfaces/roosterjs_editor_types.modeindependentcolor.html index aa8e5a0c760..f4bbdf96bdb 100644 --- a/docs/interfaces/roosterjs_editor_types.modeindependentcolor.html +++ b/docs/interfaces/roosterjs_editor_types.modeindependentcolor.html @@ -103,7 +103,7 @@

    darkModeColor

    darkModeColor: string
    @@ -118,7 +118,7 @@

    lightModeColor

    lightModeColor: string
    diff --git a/docs/interfaces/roosterjs_editor_types.nodeposition.html b/docs/interfaces/roosterjs_editor_types.nodeposition.html index b41248ed590..1c46d659c90 100644 --- a/docs/interfaces/roosterjs_editor_types.nodeposition.html +++ b/docs/interfaces/roosterjs_editor_types.nodeposition.html @@ -120,7 +120,7 @@

    Readonly element

    element: HTMLElement
    @@ -130,7 +130,7 @@

    Readonly isAtEnd

    isAtEnd: boolean
    @@ -140,7 +140,7 @@

    Readonly node

    node: Node
    @@ -150,7 +150,7 @@

    Readonly offset

    offset: number
    @@ -167,7 +167,7 @@

    equalTo

  • @@ -198,7 +198,7 @@

    isAfter

  • @@ -229,7 +229,7 @@

    move

  • @@ -260,7 +260,7 @@

    normalize

  • diff --git a/docs/interfaces/roosterjs_editor_types.normalcontentmetadata.html b/docs/interfaces/roosterjs_editor_types.normalcontentmetadata.html index 078f2adbfe3..3ac5cb79a5c 100644 --- a/docs/interfaces/roosterjs_editor_types.normalcontentmetadata.html +++ b/docs/interfaces/roosterjs_editor_types.normalcontentmetadata.html @@ -118,7 +118,7 @@

    end

    @@ -134,7 +134,7 @@

    isDarkMode

    @@ -145,7 +145,7 @@

    start

    @@ -161,7 +161,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.normalselectionrange.html b/docs/interfaces/roosterjs_editor_types.normalselectionrange.html index 4434d2186e6..d6713c65402 100644 --- a/docs/interfaces/roosterjs_editor_types.normalselectionrange.html +++ b/docs/interfaces/roosterjs_editor_types.normalselectionrange.html @@ -110,7 +110,7 @@

    areAllCollapsed

    @@ -126,7 +126,7 @@

    ranges

    @@ -142,7 +142,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.numberdefinition.html b/docs/interfaces/roosterjs_editor_types.numberdefinition.html index f68b6cebed9..2b0c516e84c 100644 --- a/docs/interfaces/roosterjs_editor_types.numberdefinition.html +++ b/docs/interfaces/roosterjs_editor_types.numberdefinition.html @@ -113,7 +113,7 @@

    Optional allowNull

    @@ -129,7 +129,7 @@

    Optional isOptional

    @@ -144,7 +144,7 @@

    Optional maxValue

    maxValue: number
    @@ -159,7 +159,7 @@

    Optional minValue

    minValue: number
    @@ -175,7 +175,7 @@

    type

    @@ -190,7 +190,7 @@

    Optional value

    value: number
    diff --git a/docs/interfaces/roosterjs_editor_types.objectdefinition.html b/docs/interfaces/roosterjs_editor_types.objectdefinition.html index 25839f39e26..983759d3611 100644 --- a/docs/interfaces/roosterjs_editor_types.objectdefinition.html +++ b/docs/interfaces/roosterjs_editor_types.objectdefinition.html @@ -119,7 +119,7 @@

    Optional allowNull

    @@ -135,7 +135,7 @@

    Optional isOptional

    @@ -150,7 +150,7 @@

    propertyDef

    propertyDef: ObjectPropertyDefinition<T>
    @@ -166,7 +166,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.pendableformatstate.html b/docs/interfaces/roosterjs_editor_types.pendableformatstate.html index a003e503407..df8d10ce510 100644 --- a/docs/interfaces/roosterjs_editor_types.pendableformatstate.html +++ b/docs/interfaces/roosterjs_editor_types.pendableformatstate.html @@ -115,7 +115,7 @@

    Optional isBold

    isBold: boolean
    @@ -130,7 +130,7 @@

    Optional isItalic

    isItalic: boolean
    @@ -145,7 +145,7 @@

    Optional isStrikeThr
    isStrikeThrough: boolean
    @@ -160,7 +160,7 @@

    Optional isSubscript

    isSubscript: boolean
    @@ -175,7 +175,7 @@

    Optional isSuperscriptisSuperscript: boolean

    @@ -190,7 +190,7 @@

    Optional isUnderline

    isUnderline: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.pendingformatstatechangedevent.html b/docs/interfaces/roosterjs_editor_types.pendingformatstatechangedevent.html index db175b47fce..b30fbb92f99 100644 --- a/docs/interfaces/roosterjs_editor_types.pendingformatstatechangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.pendingformatstatechangedevent.html @@ -111,7 +111,7 @@

    Optional eventDataCa
    @@ -137,7 +137,7 @@

    eventType

    @@ -152,7 +152,7 @@

    Optional formatCallbackformatCallback: (element: HTMLElement, isInnerNode?: boolean) => any

    @@ -191,7 +191,7 @@

    formatState

    formatState: PendableFormatState
    diff --git a/docs/interfaces/roosterjs_editor_types.pendingformatstatepluginstate.html b/docs/interfaces/roosterjs_editor_types.pendingformatstatepluginstate.html index 30cedb6c9e5..1abd8059667 100644 --- a/docs/interfaces/roosterjs_editor_types.pendingformatstatepluginstate.html +++ b/docs/interfaces/roosterjs_editor_types.pendingformatstatepluginstate.html @@ -104,7 +104,7 @@

    pendableFormatPosition

    pendableFormatPosition: NodePosition
    @@ -119,7 +119,7 @@

    pendableFormatSpan

    pendableFormatSpan: HTMLElement
    @@ -135,7 +135,7 @@

    pendableFormatState

    pendableFormatState: PendableFormatState
    diff --git a/docs/interfaces/roosterjs_editor_types.pickerdataprovider.html b/docs/interfaces/roosterjs_editor_types.pickerdataprovider.html index 85b0dca0aab..4645d212613 100644 --- a/docs/interfaces/roosterjs_editor_types.pickerdataprovider.html +++ b/docs/interfaces/roosterjs_editor_types.pickerdataprovider.html @@ -112,7 +112,7 @@

    Optional getSelected
    getSelectedIndex: () => number
    @@ -142,7 +142,7 @@

    Optional onContentCh
    onContentChanged: (elementIds: string[]) => void
    @@ -179,7 +179,7 @@

    onDispose

    onDispose: () => void
    @@ -209,7 +209,7 @@

    onInitalize

    onInitalize: (insertNodeCallback: (nodeToInsert: HTMLElement) => void, setIsSuggestingCallback: (isSuggesting: boolean) => void, editor?: IEditor) => void
    @@ -294,7 +294,7 @@

    onIsSuggestingChanged

    onIsSuggestingChanged: (isSuggesting: boolean) => void
    @@ -331,7 +331,7 @@

    onRemove

    onRemove: (nodeRemoved: Node, isBackwards: boolean) => Node
    @@ -371,7 +371,7 @@

    Optional onScroll

    onScroll: (scrollContainer: HTMLElement) => void
    @@ -407,7 +407,7 @@

    queryStringUpdated

    queryStringUpdated: (queryString: string, isExactMatch: boolean) => void
    @@ -446,7 +446,7 @@

    Optional selectOption

    selectOption: () => void
    @@ -476,7 +476,7 @@

    Optional setCursorPo
    setCursorPoint: (targetPoint: { x: number; y: number }, buffer: number) => void
    @@ -524,7 +524,7 @@

    Optional shiftHighlightshiftHighlight: (isIncrement: boolean) => void

    diff --git a/docs/interfaces/roosterjs_editor_types.pickerpluginoptions.html b/docs/interfaces/roosterjs_editor_types.pickerpluginoptions.html index c1d8ef16837..789faac07aa 100644 --- a/docs/interfaces/roosterjs_editor_types.pickerpluginoptions.html +++ b/docs/interfaces/roosterjs_editor_types.pickerpluginoptions.html @@ -108,7 +108,7 @@

    changeSource

    changeSource: string
    @@ -124,7 +124,7 @@

    elementIdPrefix

    elementIdPrefix: string
    @@ -140,7 +140,7 @@

    Optional handleAutoC
    handleAutoComplete: boolean
    @@ -156,7 +156,7 @@

    Optional isHorizontal

    isHorizontal: boolean
    @@ -173,7 +173,7 @@

    Optional suggestionLabel<
    suggestionLabelPrefix: string
    @@ -189,7 +189,7 @@

    Optional suggestionsLabel
    suggestionsLabel: string
    @@ -205,7 +205,7 @@

    triggerCharacter

    triggerCharacter: string
    diff --git a/docs/interfaces/roosterjs_editor_types.plugincompositionevent.html b/docs/interfaces/roosterjs_editor_types.plugincompositionevent.html index a72cfc94e60..4cabac5c186 100644 --- a/docs/interfaces/roosterjs_editor_types.plugincompositionevent.html +++ b/docs/interfaces/roosterjs_editor_types.plugincompositionevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.plugincontextmenuevent.html b/docs/interfaces/roosterjs_editor_types.plugincontextmenuevent.html index 96a053e2e1a..cd3f3c58729 100644 --- a/docs/interfaces/roosterjs_editor_types.plugincontextmenuevent.html +++ b/docs/interfaces/roosterjs_editor_types.plugincontextmenuevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    items

    @@ -174,7 +174,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.plugincontextmenueventdata.html b/docs/interfaces/roosterjs_editor_types.plugincontextmenueventdata.html index 1ea618c4780..f422e6eee13 100644 --- a/docs/interfaces/roosterjs_editor_types.plugincontextmenueventdata.html +++ b/docs/interfaces/roosterjs_editor_types.plugincontextmenueventdata.html @@ -110,7 +110,7 @@

    items

    items: any[]
    diff --git a/docs/interfaces/roosterjs_editor_types.plugindomeventbase.html b/docs/interfaces/roosterjs_editor_types.plugindomeventbase.html index 1ad685a820f..75d116e06d2 100644 --- a/docs/interfaces/roosterjs_editor_types.plugindomeventbase.html +++ b/docs/interfaces/roosterjs_editor_types.plugindomeventbase.html @@ -177,7 +177,7 @@

    Optional eventDataCa
    @@ -203,7 +203,7 @@

    eventType

    @@ -218,7 +218,7 @@

    rawEvent

    rawEvent: TRawEvent
    diff --git a/docs/interfaces/roosterjs_editor_types.plugininputevent.html b/docs/interfaces/roosterjs_editor_types.plugininputevent.html index 3b76fa348c8..cd6d6a5f49f 100644 --- a/docs/interfaces/roosterjs_editor_types.plugininputevent.html +++ b/docs/interfaces/roosterjs_editor_types.plugininputevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.pluginkeydownevent.html b/docs/interfaces/roosterjs_editor_types.pluginkeydownevent.html index 79955f0feca..2e5e0c3a797 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginkeydownevent.html +++ b/docs/interfaces/roosterjs_editor_types.pluginkeydownevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.pluginkeypressevent.html b/docs/interfaces/roosterjs_editor_types.pluginkeypressevent.html index ba44d1e9660..3682db2b5cc 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginkeypressevent.html +++ b/docs/interfaces/roosterjs_editor_types.pluginkeypressevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.pluginkeyupevent.html b/docs/interfaces/roosterjs_editor_types.pluginkeyupevent.html index 537649b9646..da901918c8b 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginkeyupevent.html +++ b/docs/interfaces/roosterjs_editor_types.pluginkeyupevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.pluginmousedownevent.html b/docs/interfaces/roosterjs_editor_types.pluginmousedownevent.html index 4feb9c37fc2..15ac4598d95 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginmousedownevent.html +++ b/docs/interfaces/roosterjs_editor_types.pluginmousedownevent.html @@ -110,7 +110,7 @@

    Optional eventDataCa
    @@ -136,7 +136,7 @@

    eventType

    @@ -152,7 +152,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.pluginmouseupevent.html b/docs/interfaces/roosterjs_editor_types.pluginmouseupevent.html index fd2b803fd95..cccf7d81cc2 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginmouseupevent.html +++ b/docs/interfaces/roosterjs_editor_types.pluginmouseupevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    Optional isClicking

    @@ -172,7 +172,7 @@

    rawEvent

    diff --git a/docs/interfaces/roosterjs_editor_types.pluginmouseupeventdata.html b/docs/interfaces/roosterjs_editor_types.pluginmouseupeventdata.html index 71d1764513b..b521544664a 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginmouseupeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.pluginmouseupeventdata.html @@ -110,7 +110,7 @@

    Optional isClicking

    isClicking: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.pluginscrollevent.html b/docs/interfaces/roosterjs_editor_types.pluginscrollevent.html index 7319fa2a617..10a3613de73 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginscrollevent.html +++ b/docs/interfaces/roosterjs_editor_types.pluginscrollevent.html @@ -114,7 +114,7 @@

    Optional eventDataCa
    @@ -140,7 +140,7 @@

    eventType

    @@ -156,7 +156,7 @@

    rawEvent

    @@ -167,7 +167,7 @@

    scrollContainer

    diff --git a/docs/interfaces/roosterjs_editor_types.pluginscrolleventdata.html b/docs/interfaces/roosterjs_editor_types.pluginscrolleventdata.html index 2be4ee67e87..e458158824b 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginscrolleventdata.html +++ b/docs/interfaces/roosterjs_editor_types.pluginscrolleventdata.html @@ -110,7 +110,7 @@

    scrollContainer

    scrollContainer: HTMLElement
    diff --git a/docs/interfaces/roosterjs_editor_types.pluginwithstate.html b/docs/interfaces/roosterjs_editor_types.pluginwithstate.html index 9d0ee934845..5db336f0b5f 100644 --- a/docs/interfaces/roosterjs_editor_types.pluginwithstate.html +++ b/docs/interfaces/roosterjs_editor_types.pluginwithstate.html @@ -133,7 +133,7 @@

    dispose

    @@ -166,7 +166,7 @@

    getName

    @@ -197,7 +197,7 @@

    initialize

    @@ -241,7 +241,7 @@

    Optional onPluginEve
    @@ -285,7 +285,7 @@

    Optional willHandleE
    @@ -337,7 +337,7 @@

    getState

  • diff --git a/docs/interfaces/roosterjs_editor_types.quotefeaturesettings.html b/docs/interfaces/roosterjs_editor_types.quotefeaturesettings.html index 454bba77fed..7cce584bcb7 100644 --- a/docs/interfaces/roosterjs_editor_types.quotefeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.quotefeaturesettings.html @@ -108,7 +108,7 @@

    unquoteWhenBackspaceOnEmptyFirstLine

    unquoteWhenBackspaceOnEmptyFirstLine: boolean
    @@ -128,7 +128,7 @@

    unquoteWhenEnterOnEmptyLine

    unquoteWhenEnterOnEmptyLine: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.rect.html b/docs/interfaces/roosterjs_editor_types.rect.html index f4f7157f93e..77ad3bc9277 100644 --- a/docs/interfaces/roosterjs_editor_types.rect.html +++ b/docs/interfaces/roosterjs_editor_types.rect.html @@ -105,7 +105,7 @@

    bottom

    bottom: number
    @@ -120,7 +120,7 @@

    left

    left: number
    @@ -135,7 +135,7 @@

    right

    right: number
    @@ -150,7 +150,7 @@

    top

    top: number
    diff --git a/docs/interfaces/roosterjs_editor_types.region.html b/docs/interfaces/roosterjs_editor_types.region.html index a713ba24b94..73ef4bed19b 100644 --- a/docs/interfaces/roosterjs_editor_types.region.html +++ b/docs/interfaces/roosterjs_editor_types.region.html @@ -113,7 +113,7 @@

    fullSelectionEnd

    fullSelectionEnd: NodePosition
    @@ -129,7 +129,7 @@

    fullSelectionStart

    fullSelectionStart: NodePosition
    @@ -146,7 +146,7 @@

    Optional nodeAfter

    @@ -163,7 +163,7 @@

    Optional nodeBefore

    @@ -180,7 +180,7 @@

    rootNode

    @@ -196,7 +196,7 @@

    skipTags

    diff --git a/docs/interfaces/roosterjs_editor_types.regionbase.html b/docs/interfaces/roosterjs_editor_types.regionbase.html index 56d78a19b72..2f032b466fa 100644 --- a/docs/interfaces/roosterjs_editor_types.regionbase.html +++ b/docs/interfaces/roosterjs_editor_types.regionbase.html @@ -123,7 +123,7 @@

    Optional nodeAfter

    nodeAfter: Node
    @@ -139,7 +139,7 @@

    Optional nodeBefore

    nodeBefore: Node
    @@ -155,7 +155,7 @@

    rootNode

    rootNode: HTMLElement
    @@ -170,7 +170,7 @@

    skipTags

    skipTags: string[]
    diff --git a/docs/interfaces/roosterjs_editor_types.sanitizehtmloptions.html b/docs/interfaces/roosterjs_editor_types.sanitizehtmloptions.html index 0c77aff9073..31b697abfff 100644 --- a/docs/interfaces/roosterjs_editor_types.sanitizehtmloptions.html +++ b/docs/interfaces/roosterjs_editor_types.sanitizehtmloptions.html @@ -122,7 +122,7 @@

    Optional additionalAllowe
    @@ -138,7 +138,7 @@

    Optional additionalAllowe
    @@ -154,7 +154,7 @@

    Optional additionalDefaul
    @@ -170,7 +170,7 @@

    Optional additionalGlobal
    @@ -186,7 +186,7 @@

    Optional additionalPredef
    @@ -202,7 +202,7 @@

    Optional additionalTag

    Inherited from HtmlSanitizerOptions.additionalTagReplacements

    @@ -223,7 +223,7 @@

    Optional attributeCallbac
    @@ -238,7 +238,7 @@

    Optional convertCssO
    convertCssOnly: boolean
    @@ -254,7 +254,7 @@

    Optional cssStyleCal
    @@ -269,7 +269,7 @@

    Optional currentElementcurrentElementOrStyle: HTMLElement | StringMap

    @@ -286,7 +286,7 @@

    Optional elementCallbacks
    @@ -302,7 +302,7 @@

    Optional preserveHtml

    Inherited from HtmlSanitizerOptions.preserveHtmlComments

    @@ -318,7 +318,7 @@

    Optional unknownTagR
    diff --git a/docs/interfaces/roosterjs_editor_types.selectionchangedevent.html b/docs/interfaces/roosterjs_editor_types.selectionchangedevent.html index 022554b191d..56583c0a20b 100644 --- a/docs/interfaces/roosterjs_editor_types.selectionchangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.selectionchangedevent.html @@ -113,7 +113,7 @@

    Optional eventDataCa
    @@ -139,7 +139,7 @@

    eventType

    @@ -155,7 +155,7 @@

    selectionRangeEx

    diff --git a/docs/interfaces/roosterjs_editor_types.selectionchangedeventdata.html b/docs/interfaces/roosterjs_editor_types.selectionchangedeventdata.html index 4d35730cc8e..613006d7555 100644 --- a/docs/interfaces/roosterjs_editor_types.selectionchangedeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.selectionchangedeventdata.html @@ -110,7 +110,7 @@

    selectionRangeEx

    selectionRangeEx: SelectionRangeEx
    diff --git a/docs/interfaces/roosterjs_editor_types.selectionpath.html b/docs/interfaces/roosterjs_editor_types.selectionpath.html index a5537e6ec17..937f15d1516 100644 --- a/docs/interfaces/roosterjs_editor_types.selectionpath.html +++ b/docs/interfaces/roosterjs_editor_types.selectionpath.html @@ -108,7 +108,7 @@

    end

    end: number[]
    @@ -123,7 +123,7 @@

    start

    start: number[]
    diff --git a/docs/interfaces/roosterjs_editor_types.selectionrangeexbase.html b/docs/interfaces/roosterjs_editor_types.selectionrangeexbase.html index 2eca8f7f307..b75023e7b42 100644 --- a/docs/interfaces/roosterjs_editor_types.selectionrangeexbase.html +++ b/docs/interfaces/roosterjs_editor_types.selectionrangeexbase.html @@ -123,7 +123,7 @@

    areAllCollapsed

    areAllCollapsed: boolean
    @@ -138,7 +138,7 @@

    ranges

    ranges: Range[]
    @@ -153,7 +153,7 @@

    type

    type: T
    diff --git a/docs/interfaces/roosterjs_editor_types.shortcutfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.shortcutfeaturesettings.html index b69b808a5e7..6bb345eb3af 100644 --- a/docs/interfaces/roosterjs_editor_types.shortcutfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.shortcutfeaturesettings.html @@ -107,7 +107,7 @@

    defaultShortcut

    defaultShortcut: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.snapshot.html b/docs/interfaces/roosterjs_editor_types.snapshot.html index f161f68d667..f854231b743 100644 --- a/docs/interfaces/roosterjs_editor_types.snapshot.html +++ b/docs/interfaces/roosterjs_editor_types.snapshot.html @@ -105,7 +105,7 @@

    Optional entityStates

    entityStates: EntityState[]
    @@ -121,7 +121,7 @@

    html

    html: string
    @@ -136,7 +136,7 @@

    knownColors

    knownColors: Readonly<ModeIndependentColor>[]
    @@ -151,7 +151,7 @@

    metadata

    metadata: ContentMetadata
    diff --git a/docs/interfaces/roosterjs_editor_types.snapshots.html b/docs/interfaces/roosterjs_editor_types.snapshots.html index 0a71cf94ccf..f637c6e4fb8 100644 --- a/docs/interfaces/roosterjs_editor_types.snapshots.html +++ b/docs/interfaces/roosterjs_editor_types.snapshots.html @@ -114,7 +114,7 @@

    autoCompleteIndex

    autoCompleteIndex: number
    @@ -129,7 +129,7 @@

    currentIndex

    currentIndex: number
    @@ -144,7 +144,7 @@

    Readonly maxSize

    maxSize: number
    @@ -159,7 +159,7 @@

    snapshots

    snapshots: T[]
    @@ -174,7 +174,7 @@

    totalSize

    totalSize: number
    diff --git a/docs/interfaces/roosterjs_editor_types.stringdefinition.html b/docs/interfaces/roosterjs_editor_types.stringdefinition.html index 65e58a61ef8..8f3559e211b 100644 --- a/docs/interfaces/roosterjs_editor_types.stringdefinition.html +++ b/docs/interfaces/roosterjs_editor_types.stringdefinition.html @@ -111,7 +111,7 @@

    Optional allowNull

    @@ -127,7 +127,7 @@

    Optional isOptional

    @@ -143,7 +143,7 @@

    type

    @@ -158,7 +158,7 @@

    Optional value

    value: string
    diff --git a/docs/interfaces/roosterjs_editor_types.structurednodefeaturesettings.html b/docs/interfaces/roosterjs_editor_types.structurednodefeaturesettings.html index 81d75d2593e..1b4393c7e4b 100644 --- a/docs/interfaces/roosterjs_editor_types.structurednodefeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.structurednodefeaturesettings.html @@ -107,7 +107,7 @@

    insertLineBeforeStructuredNodeFeature

    insertLineBeforeStructuredNodeFeature: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.stylebasedformatstate.html b/docs/interfaces/roosterjs_editor_types.stylebasedformatstate.html index 9da277a2fba..f934ac9582b 100644 --- a/docs/interfaces/roosterjs_editor_types.stylebasedformatstate.html +++ b/docs/interfaces/roosterjs_editor_types.stylebasedformatstate.html @@ -117,7 +117,7 @@

    Optional backgroundColor<
    backgroundColor: string
    @@ -132,7 +132,7 @@

    Optional backgroundColors
    backgroundColors: ModeIndependentColor
    @@ -147,7 +147,7 @@

    Optional direction

    direction: string
    @@ -162,7 +162,7 @@

    Optional fontName

    fontName: string
    @@ -177,7 +177,7 @@

    Optional fontSize

    fontSize: string
    @@ -192,7 +192,7 @@

    Optional lineHeight

    lineHeight: string
    @@ -207,7 +207,7 @@

    Optional marginBottom

    marginBottom: string
    @@ -222,7 +222,7 @@

    Optional marginTop

    marginTop: string
    @@ -237,7 +237,7 @@

    Optional textAlign

    textAlign: string
    @@ -252,7 +252,7 @@

    Optional textColor

    textColor: string
    @@ -267,7 +267,7 @@

    Optional textColors

    diff --git a/docs/interfaces/roosterjs_editor_types.tablecontentmetadata.html b/docs/interfaces/roosterjs_editor_types.tablecontentmetadata.html index 922f5dbc779..a89d856ce6d 100644 --- a/docs/interfaces/roosterjs_editor_types.tablecontentmetadata.html +++ b/docs/interfaces/roosterjs_editor_types.tablecontentmetadata.html @@ -119,7 +119,7 @@

    firstCell

    @@ -135,7 +135,7 @@

    isDarkMode

    @@ -146,7 +146,7 @@

    lastCell

    @@ -161,7 +161,7 @@

    tableId

    tableId: string
    @@ -172,7 +172,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.tablefeaturesettings.html b/docs/interfaces/roosterjs_editor_types.tablefeaturesettings.html index 2ce6b8ca95f..2ed63f989fb 100644 --- a/docs/interfaces/roosterjs_editor_types.tablefeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.tablefeaturesettings.html @@ -110,7 +110,7 @@

    deleteTableWithBackspace

    deleteTableWithBackspace: boolean
    @@ -126,7 +126,7 @@

    indentTableOnTab

    indentTableOnTab: boolean
    @@ -141,7 +141,7 @@

    tabInTable

    tabInTable: boolean
    @@ -161,7 +161,7 @@

    upDownInTable

    upDownInTable: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.tableformat.html b/docs/interfaces/roosterjs_editor_types.tableformat.html index 11f25ee200f..d330e38b05a 100644 --- a/docs/interfaces/roosterjs_editor_types.tableformat.html +++ b/docs/interfaces/roosterjs_editor_types.tableformat.html @@ -113,7 +113,7 @@

    Optional bgColorEven
    bgColorEven: string
    @@ -128,7 +128,7 @@

    Optional bgColorOdd<
    bgColorOdd: string
    @@ -143,7 +143,7 @@

    Optional bottomBorderbottomBorderColor: string

    @@ -158,7 +158,7 @@

    Optional hasBandedCo
    hasBandedColumns: boolean
    @@ -173,7 +173,7 @@

    Optional hasBandedRo
    hasBandedRows: boolean
    @@ -188,7 +188,7 @@

    Optional hasFirstCol
    hasFirstColumn: boolean
    @@ -203,7 +203,7 @@

    Optional hasHeaderRo
    hasHeaderRow: boolean
    @@ -218,7 +218,7 @@

    Optional headerRowCo
    headerRowColor: string
    @@ -233,7 +233,7 @@

    Optional keepCellSha
    keepCellShade: boolean
    @@ -248,7 +248,7 @@

    Optional tableBorder
    @@ -263,7 +263,7 @@

    Optional topBorderCo
    topBorderColor: string
    @@ -278,7 +278,7 @@

    Optional verticalBorderverticalBorderColor: string

    diff --git a/docs/interfaces/roosterjs_editor_types.tableselection.html b/docs/interfaces/roosterjs_editor_types.tableselection.html index 57b2a104ec6..04c03ab4dd4 100644 --- a/docs/interfaces/roosterjs_editor_types.tableselection.html +++ b/docs/interfaces/roosterjs_editor_types.tableselection.html @@ -108,7 +108,7 @@

    firstCell

    firstCell: Coordinates
    @@ -123,7 +123,7 @@

    lastCell

    lastCell: Coordinates
    diff --git a/docs/interfaces/roosterjs_editor_types.tableselectionrange.html b/docs/interfaces/roosterjs_editor_types.tableselectionrange.html index 4f07ea219b0..20cb1554154 100644 --- a/docs/interfaces/roosterjs_editor_types.tableselectionrange.html +++ b/docs/interfaces/roosterjs_editor_types.tableselectionrange.html @@ -113,7 +113,7 @@

    areAllCollapsed

    @@ -128,7 +128,7 @@

    coordinates

    coordinates: TableSelection
    @@ -143,7 +143,7 @@

    Optional isWholeTabl
    isWholeTableSelected: boolean
    @@ -159,7 +159,7 @@

    ranges

    @@ -174,7 +174,7 @@

    table

    table: HTMLTableElement
    @@ -190,7 +190,7 @@

    type

    diff --git a/docs/interfaces/roosterjs_editor_types.targetwindow.html b/docs/interfaces/roosterjs_editor_types.targetwindow.html index 18b6f2eb68f..c3fc6045c03 100644 --- a/docs/interfaces/roosterjs_editor_types.targetwindow.html +++ b/docs/interfaces/roosterjs_editor_types.targetwindow.html @@ -200,7 +200,7 @@

    Attr

    @@ -211,7 +211,7 @@

    CDATASection

    @@ -222,7 +222,7 @@

    CharacterData

    @@ -233,7 +233,7 @@

    ChildNode

    @@ -244,7 +244,7 @@

    Comment

    @@ -255,7 +255,7 @@

    Document

    @@ -266,7 +266,7 @@

    DocumentFragment

    @@ -277,7 +277,7 @@

    DocumentType

    @@ -288,7 +288,7 @@

    Element

    @@ -299,7 +299,7 @@

    HTMLAnchorElement

    @@ -309,7 +309,7 @@

    HTMLAppletElement

    HTMLAppletElement: Element
    @@ -327,7 +327,7 @@

    HTMLAreaElement

    @@ -338,7 +338,7 @@

    HTMLAudioElement

    @@ -349,7 +349,7 @@

    HTMLBRElement

    @@ -360,7 +360,7 @@

    HTMLBaseElement

    @@ -370,7 +370,7 @@

    HTMLBaseFontElement

    HTMLBaseFontElement: Element
    @@ -388,7 +388,7 @@

    HTMLBodyElement

    @@ -399,7 +399,7 @@

    HTMLButtonElement

    @@ -410,7 +410,7 @@

    HTMLCanvasElement

    @@ -421,7 +421,7 @@

    HTMLDListElement

    @@ -432,7 +432,7 @@

    HTMLDataElement

    @@ -443,7 +443,7 @@

    HTMLDataListElement

    @@ -454,7 +454,7 @@

    HTMLDetailsElement

    @@ -465,7 +465,7 @@

    HTMLDialogElement

    @@ -476,7 +476,7 @@

    HTMLDirectoryElement

    @@ -487,7 +487,7 @@

    HTMLDivElement

    @@ -498,7 +498,7 @@

    HTMLDocument

    @@ -509,7 +509,7 @@

    HTMLElement

    @@ -520,7 +520,7 @@

    HTMLEmbedElement

    @@ -531,7 +531,7 @@

    HTMLFieldSetElement

    @@ -542,7 +542,7 @@

    HTMLFontElement

    @@ -553,7 +553,7 @@

    HTMLFormElement

    @@ -564,7 +564,7 @@

    HTMLFrameElement

    @@ -575,7 +575,7 @@

    HTMLFrameSetElement

    @@ -586,7 +586,7 @@

    HTMLHRElement

    @@ -597,7 +597,7 @@

    HTMLHeadElement

    @@ -608,7 +608,7 @@

    HTMLHeadingElement

    @@ -619,7 +619,7 @@

    HTMLHtmlElement

    @@ -630,7 +630,7 @@

    HTMLIFrameElement

    @@ -641,7 +641,7 @@

    HTMLImageElement

    @@ -652,7 +652,7 @@

    HTMLInputElement

    @@ -663,7 +663,7 @@

    HTMLLIElement

    @@ -674,7 +674,7 @@

    HTMLLabelElement

    @@ -685,7 +685,7 @@

    HTMLLegendElement

    @@ -696,7 +696,7 @@

    HTMLLinkElement

    @@ -707,7 +707,7 @@

    HTMLMapElement

    @@ -718,7 +718,7 @@

    HTMLMarqueeElement

    @@ -729,7 +729,7 @@

    HTMLMediaElement

    @@ -740,7 +740,7 @@

    HTMLMenuElement

    @@ -751,7 +751,7 @@

    HTMLMetaElement

    @@ -762,7 +762,7 @@

    HTMLMeterElement

    @@ -773,7 +773,7 @@

    HTMLModElement

    @@ -784,7 +784,7 @@

    HTMLOListElement

    @@ -795,7 +795,7 @@

    HTMLObjectElement

    @@ -806,7 +806,7 @@

    HTMLOptGroupElement

    @@ -817,7 +817,7 @@

    HTMLOptionElement

    @@ -828,7 +828,7 @@

    HTMLOutputElement

    @@ -839,7 +839,7 @@

    HTMLParagraphElement

    @@ -850,7 +850,7 @@

    HTMLParamElement

    @@ -861,7 +861,7 @@

    HTMLPictureElement

    @@ -872,7 +872,7 @@

    HTMLPreElement

    @@ -883,7 +883,7 @@

    HTMLProgressElement

    @@ -894,7 +894,7 @@

    HTMLQuoteElement

    @@ -905,7 +905,7 @@

    HTMLScriptElement

    @@ -916,7 +916,7 @@

    HTMLSelectElement

    @@ -927,7 +927,7 @@

    HTMLSlotElement

    @@ -938,7 +938,7 @@

    HTMLSourceElement

    @@ -949,7 +949,7 @@

    HTMLSpanElement

    @@ -960,7 +960,7 @@

    HTMLStyleElement

    @@ -971,7 +971,7 @@

    HTMLTableCaptionElement

    @@ -982,7 +982,7 @@

    HTMLTableCellElement

    @@ -993,7 +993,7 @@

    HTMLTableColElement

    @@ -1004,7 +1004,7 @@

    HTMLTableDataCellElement

    @@ -1015,7 +1015,7 @@

    HTMLTableElement

    @@ -1026,7 +1026,7 @@

    HTMLTableHeaderCellElement

    @@ -1037,7 +1037,7 @@

    HTMLTableRowElement

    @@ -1048,7 +1048,7 @@

    HTMLTableSectionElement

    @@ -1059,7 +1059,7 @@

    HTMLTemplateElement

    @@ -1070,7 +1070,7 @@

    HTMLTextAreaElement

    @@ -1081,7 +1081,7 @@

    HTMLTimeElement

    @@ -1092,7 +1092,7 @@

    HTMLTitleElement

    @@ -1103,7 +1103,7 @@

    HTMLTrackElement

    @@ -1114,7 +1114,7 @@

    HTMLUListElement

    @@ -1125,7 +1125,7 @@

    HTMLUnknownElement

    @@ -1136,7 +1136,7 @@

    HTMLVideoElement

    @@ -1147,7 +1147,7 @@

    Node

    @@ -1158,7 +1158,7 @@

    ParentNode

    @@ -1169,7 +1169,7 @@

    ProcessingInstruction

    @@ -1180,7 +1180,7 @@

    Range

    @@ -1190,7 +1190,7 @@

    SVGCursorElement

    SVGCursorElement: Element
    @@ -1208,7 +1208,7 @@

    ShadowRoot

    @@ -1219,7 +1219,7 @@

    Text

    @@ -1230,7 +1230,7 @@

    XMLDocument

    diff --git a/docs/interfaces/roosterjs_editor_types.targetwindowbase.html b/docs/interfaces/roosterjs_editor_types.targetwindowbase.html index ba12dcf7731..914df408e7e 100644 --- a/docs/interfaces/roosterjs_editor_types.targetwindowbase.html +++ b/docs/interfaces/roosterjs_editor_types.targetwindowbase.html @@ -196,7 +196,7 @@

    Attr

    Attr: Attr
    @@ -206,7 +206,7 @@

    CDATASection

    CDATASection: CDATASection
    @@ -216,7 +216,7 @@

    CharacterData

    CharacterData: CharacterData
    @@ -226,7 +226,7 @@

    ChildNode

    ChildNode: ChildNode
    @@ -236,7 +236,7 @@

    Comment

    Comment: Comment
    @@ -246,7 +246,7 @@

    Document

    Document: Document
    @@ -256,7 +256,7 @@

    DocumentFragment

    DocumentFragment: DocumentFragment
    @@ -266,7 +266,7 @@

    DocumentType

    DocumentType: DocumentType
    @@ -276,7 +276,7 @@

    Element

    Element: Element
    @@ -286,7 +286,7 @@

    HTMLAnchorElement

    HTMLAnchorElement: HTMLAnchorElement
    @@ -296,7 +296,7 @@

    HTMLAreaElement

    HTMLAreaElement: HTMLAreaElement
    @@ -306,7 +306,7 @@

    HTMLAudioElement

    HTMLAudioElement: HTMLAudioElement
    @@ -316,7 +316,7 @@

    HTMLBRElement

    HTMLBRElement: HTMLBRElement
    @@ -326,7 +326,7 @@

    HTMLBaseElement

    HTMLBaseElement: HTMLBaseElement
    @@ -336,7 +336,7 @@

    HTMLBodyElement

    HTMLBodyElement: HTMLBodyElement
    @@ -346,7 +346,7 @@

    HTMLButtonElement

    HTMLButtonElement: HTMLButtonElement
    @@ -356,7 +356,7 @@

    HTMLCanvasElement

    HTMLCanvasElement: HTMLCanvasElement
    @@ -366,7 +366,7 @@

    HTMLDListElement

    HTMLDListElement: HTMLDListElement
    @@ -376,7 +376,7 @@

    HTMLDataElement

    HTMLDataElement: HTMLDataElement
    @@ -386,7 +386,7 @@

    HTMLDataListElement

    HTMLDataListElement: HTMLDataListElement
    @@ -396,7 +396,7 @@

    HTMLDetailsElement

    HTMLDetailsElement: HTMLDetailsElement
    @@ -406,7 +406,7 @@

    HTMLDialogElement

    HTMLDialogElement: HTMLDialogElement
    @@ -416,7 +416,7 @@

    HTMLDirectoryElement

    HTMLDirectoryElement: HTMLDirectoryElement
    @@ -426,7 +426,7 @@

    HTMLDivElement

    HTMLDivElement: HTMLDivElement
    @@ -436,7 +436,7 @@

    HTMLDocument

    HTMLDocument: HTMLDocument
    @@ -446,7 +446,7 @@

    HTMLElement

    HTMLElement: HTMLElement
    @@ -456,7 +456,7 @@

    HTMLEmbedElement

    HTMLEmbedElement: HTMLEmbedElement
    @@ -466,7 +466,7 @@

    HTMLFieldSetElement

    HTMLFieldSetElement: HTMLFieldSetElement
    @@ -476,7 +476,7 @@

    HTMLFontElement

    HTMLFontElement: HTMLFontElement
    @@ -486,7 +486,7 @@

    HTMLFormElement

    HTMLFormElement: HTMLFormElement
    @@ -496,7 +496,7 @@

    HTMLFrameElement

    HTMLFrameElement: HTMLFrameElement
    @@ -506,7 +506,7 @@

    HTMLFrameSetElement

    HTMLFrameSetElement: HTMLFrameSetElement
    @@ -516,7 +516,7 @@

    HTMLHRElement

    HTMLHRElement: HTMLHRElement
    @@ -526,7 +526,7 @@

    HTMLHeadElement

    HTMLHeadElement: HTMLHeadElement
    @@ -536,7 +536,7 @@

    HTMLHeadingElement

    HTMLHeadingElement: HTMLHeadingElement
    @@ -546,7 +546,7 @@

    HTMLHtmlElement

    HTMLHtmlElement: HTMLHtmlElement
    @@ -556,7 +556,7 @@

    HTMLIFrameElement

    HTMLIFrameElement: HTMLIFrameElement
    @@ -566,7 +566,7 @@

    HTMLImageElement

    HTMLImageElement: HTMLImageElement
    @@ -576,7 +576,7 @@

    HTMLInputElement

    HTMLInputElement: HTMLInputElement
    @@ -586,7 +586,7 @@

    HTMLLIElement

    HTMLLIElement: HTMLLIElement
    @@ -596,7 +596,7 @@

    HTMLLabelElement

    HTMLLabelElement: HTMLLabelElement
    @@ -606,7 +606,7 @@

    HTMLLegendElement

    HTMLLegendElement: HTMLLegendElement
    @@ -616,7 +616,7 @@

    HTMLLinkElement

    HTMLLinkElement: HTMLLinkElement
    @@ -626,7 +626,7 @@

    HTMLMapElement

    HTMLMapElement: HTMLMapElement
    @@ -636,7 +636,7 @@

    HTMLMarqueeElement

    HTMLMarqueeElement: HTMLMarqueeElement
    @@ -646,7 +646,7 @@

    HTMLMediaElement

    HTMLMediaElement: HTMLMediaElement
    @@ -656,7 +656,7 @@

    HTMLMenuElement

    HTMLMenuElement: HTMLMenuElement
    @@ -666,7 +666,7 @@

    HTMLMetaElement

    HTMLMetaElement: HTMLMetaElement
    @@ -676,7 +676,7 @@

    HTMLMeterElement

    HTMLMeterElement: HTMLMeterElement
    @@ -686,7 +686,7 @@

    HTMLModElement

    HTMLModElement: HTMLModElement
    @@ -696,7 +696,7 @@

    HTMLOListElement

    HTMLOListElement: HTMLOListElement
    @@ -706,7 +706,7 @@

    HTMLObjectElement

    HTMLObjectElement: HTMLObjectElement
    @@ -716,7 +716,7 @@

    HTMLOptGroupElement

    HTMLOptGroupElement: HTMLOptGroupElement
    @@ -726,7 +726,7 @@

    HTMLOptionElement

    HTMLOptionElement: HTMLOptionElement
    @@ -736,7 +736,7 @@

    HTMLOutputElement

    HTMLOutputElement: HTMLOutputElement
    @@ -746,7 +746,7 @@

    HTMLParagraphElement

    HTMLParagraphElement: HTMLParagraphElement
    @@ -756,7 +756,7 @@

    HTMLParamElement

    HTMLParamElement: HTMLParamElement
    @@ -766,7 +766,7 @@

    HTMLPictureElement

    HTMLPictureElement: HTMLPictureElement
    @@ -776,7 +776,7 @@

    HTMLPreElement

    HTMLPreElement: HTMLPreElement
    @@ -786,7 +786,7 @@

    HTMLProgressElement

    HTMLProgressElement: HTMLProgressElement
    @@ -796,7 +796,7 @@

    HTMLQuoteElement

    HTMLQuoteElement: HTMLQuoteElement
    @@ -806,7 +806,7 @@

    HTMLScriptElement

    HTMLScriptElement: HTMLScriptElement
    @@ -816,7 +816,7 @@

    HTMLSelectElement

    HTMLSelectElement: HTMLSelectElement
    @@ -826,7 +826,7 @@

    HTMLSlotElement

    HTMLSlotElement: HTMLSlotElement
    @@ -836,7 +836,7 @@

    HTMLSourceElement

    HTMLSourceElement: HTMLSourceElement
    @@ -846,7 +846,7 @@

    HTMLSpanElement

    HTMLSpanElement: HTMLSpanElement
    @@ -856,7 +856,7 @@

    HTMLStyleElement

    HTMLStyleElement: HTMLStyleElement
    @@ -866,7 +866,7 @@

    HTMLTableCaptionElement

    HTMLTableCaptionElement: HTMLTableCaptionElement
    @@ -876,7 +876,7 @@

    HTMLTableCellElement

    HTMLTableCellElement: HTMLTableCellElement
    @@ -886,7 +886,7 @@

    HTMLTableColElement

    HTMLTableColElement: HTMLTableColElement
    @@ -896,7 +896,7 @@

    HTMLTableDataCellElement

    HTMLTableDataCellElement: HTMLTableDataCellElement
    @@ -906,7 +906,7 @@

    HTMLTableElement

    HTMLTableElement: HTMLTableElement
    @@ -916,7 +916,7 @@

    HTMLTableHeaderCellElement

    HTMLTableHeaderCellElement: HTMLTableHeaderCellElement
    @@ -926,7 +926,7 @@

    HTMLTableRowElement

    HTMLTableRowElement: HTMLTableRowElement
    @@ -936,7 +936,7 @@

    HTMLTableSectionElement

    HTMLTableSectionElement: HTMLTableSectionElement
    @@ -946,7 +946,7 @@

    HTMLTemplateElement

    HTMLTemplateElement: HTMLTemplateElement
    @@ -956,7 +956,7 @@

    HTMLTextAreaElement

    HTMLTextAreaElement: HTMLTextAreaElement
    @@ -966,7 +966,7 @@

    HTMLTimeElement

    HTMLTimeElement: HTMLTimeElement
    @@ -976,7 +976,7 @@

    HTMLTitleElement

    HTMLTitleElement: HTMLTitleElement
    @@ -986,7 +986,7 @@

    HTMLTrackElement

    HTMLTrackElement: HTMLTrackElement
    @@ -996,7 +996,7 @@

    HTMLUListElement

    HTMLUListElement: HTMLUListElement
    @@ -1006,7 +1006,7 @@

    HTMLUnknownElement

    HTMLUnknownElement: HTMLUnknownElement
    @@ -1016,7 +1016,7 @@

    HTMLVideoElement

    HTMLVideoElement: HTMLVideoElement
    @@ -1026,7 +1026,7 @@

    Node

    Node: Node
    @@ -1036,7 +1036,7 @@

    ParentNode

    ParentNode: ParentNode
    @@ -1046,7 +1046,7 @@

    ProcessingInstruction

    ProcessingInstruction: ProcessingInstruction
    @@ -1056,7 +1056,7 @@

    Range

    Range: Range
    @@ -1066,7 +1066,7 @@

    ShadowRoot

    ShadowRoot: ShadowRoot
    @@ -1076,7 +1076,7 @@

    Text

    Text: Text
    @@ -1086,7 +1086,7 @@

    XMLDocument

    XMLDocument: XMLDocument
    diff --git a/docs/interfaces/roosterjs_editor_types.textfeaturesettings.html b/docs/interfaces/roosterjs_editor_types.textfeaturesettings.html index ca15b462fe3..e07428c2843 100644 --- a/docs/interfaces/roosterjs_editor_types.textfeaturesettings.html +++ b/docs/interfaces/roosterjs_editor_types.textfeaturesettings.html @@ -109,7 +109,7 @@

    autoHyphen

    autoHyphen: boolean
    @@ -127,7 +127,7 @@

    indentWhenTabText

    indentWhenTabText: boolean
    @@ -147,7 +147,7 @@

    outdentWhenTabText

    outdentWhenTabText: boolean
    diff --git a/docs/interfaces/roosterjs_editor_types.undopluginstate.html b/docs/interfaces/roosterjs_editor_types.undopluginstate.html index be2ca34ee02..97773d5e10b 100644 --- a/docs/interfaces/roosterjs_editor_types.undopluginstate.html +++ b/docs/interfaces/roosterjs_editor_types.undopluginstate.html @@ -106,7 +106,7 @@

    autoCompletePosition

    autoCompletePosition: NodePosition
    @@ -121,7 +121,7 @@

    hasNewContent

    hasNewContent: boolean
    @@ -136,7 +136,7 @@

    isNested

    isNested: boolean
    @@ -151,7 +151,7 @@

    isRestoring

    isRestoring: boolean
    @@ -166,7 +166,7 @@

    snapshotsService

    snapshotsService: UndoSnapshotsService<Snapshot>
    diff --git a/docs/interfaces/roosterjs_editor_types.undosnapshotsservice.html b/docs/interfaces/roosterjs_editor_types.undosnapshotsservice.html index 152b4416a8f..6d3834b8a6f 100644 --- a/docs/interfaces/roosterjs_editor_types.undosnapshotsservice.html +++ b/docs/interfaces/roosterjs_editor_types.undosnapshotsservice.html @@ -118,7 +118,7 @@

    addSnapshot

  • @@ -152,7 +152,7 @@

    canMove

  • @@ -184,7 +184,7 @@

    canUndoAutoComplete

  • @@ -206,7 +206,7 @@

    clearRedo

  • @@ -228,7 +228,7 @@

    move

  • diff --git a/docs/interfaces/roosterjs_editor_types.vcell.html b/docs/interfaces/roosterjs_editor_types.vcell.html index 3b655fd7093..7151268214a 100644 --- a/docs/interfaces/roosterjs_editor_types.vcell.html +++ b/docs/interfaces/roosterjs_editor_types.vcell.html @@ -106,7 +106,7 @@

    Optional height

    height: number
    @@ -122,7 +122,7 @@

    Optional spanAbove

    spanAbove: boolean
    @@ -137,7 +137,7 @@

    Optional spanLeft

    spanLeft: boolean
    @@ -152,7 +152,7 @@

    Optional td

    td: HTMLTableCellElement
    @@ -167,7 +167,7 @@

    Optional width

    width: number
    diff --git a/docs/interfaces/roosterjs_editor_types.zoomchangedevent.html b/docs/interfaces/roosterjs_editor_types.zoomchangedevent.html index 5ad2e1247e8..8a401958482 100644 --- a/docs/interfaces/roosterjs_editor_types.zoomchangedevent.html +++ b/docs/interfaces/roosterjs_editor_types.zoomchangedevent.html @@ -115,7 +115,7 @@

    Optional eventDataCa
    @@ -141,7 +141,7 @@

    eventType

    @@ -157,7 +157,7 @@

    newZoomScale

    @@ -173,7 +173,7 @@

    oldZoomScale

    diff --git a/docs/interfaces/roosterjs_editor_types.zoomchangedeventdata.html b/docs/interfaces/roosterjs_editor_types.zoomchangedeventdata.html index a596c09cec4..3b60c95c224 100644 --- a/docs/interfaces/roosterjs_editor_types.zoomchangedeventdata.html +++ b/docs/interfaces/roosterjs_editor_types.zoomchangedeventdata.html @@ -111,7 +111,7 @@

    newZoomScale

    newZoomScale: number
    @@ -126,7 +126,7 @@

    oldZoomScale

    oldZoomScale: number
    diff --git a/docs/interfaces/roosterjs_react.contextmenuitem.html b/docs/interfaces/roosterjs_react.contextmenuitem.html index 1cd39af4c88..ebfe8f12fc0 100644 --- a/docs/interfaces/roosterjs_react.contextmenuitem.html +++ b/docs/interfaces/roosterjs_react.contextmenuitem.html @@ -120,7 +120,7 @@

    Optional commandBarS
    commandBarSubMenuProperties: Partial<IContextualMenuProps>
    @@ -135,7 +135,7 @@

    Optional itemClassNa
    itemClassName: string
    @@ -150,7 +150,7 @@

    Optional itemRender

    itemRender: (item: IContextualMenuItem, onClick: (e: MouseEvent<Element, MouseEvent> | KeyboardEvent<Element>, item: IContextualMenuItem) => void) => ReactNode
    @@ -220,7 +220,7 @@

    key

    key: TString
    @@ -235,7 +235,7 @@

    onClick

    onClick: (key: TString, editor: IEditor, targetNode: Node, strings: LocalizedStrings<TString, string>, uiUtilities: UIUtilities, context?: TContext) => void
    @@ -316,7 +316,7 @@

    Optional shouldShow

    shouldShow: (editor: IEditor, targetNode: Node, context?: TContext) => boolean
    @@ -373,7 +373,7 @@

    Optional subItems

    subItems: {[ key in string]: string }
    @@ -389,7 +389,7 @@

    unlocalizedText

    unlocalizedText: string
    diff --git a/docs/interfaces/roosterjs_react.reacteditorplugin.html b/docs/interfaces/roosterjs_react.reacteditorplugin.html index 862baaa0f01..6d894a4491b 100644 --- a/docs/interfaces/roosterjs_react.reacteditorplugin.html +++ b/docs/interfaces/roosterjs_react.reacteditorplugin.html @@ -123,7 +123,7 @@

    dispose

    @@ -156,7 +156,7 @@

    getName

    @@ -187,7 +187,7 @@

    initialize

    @@ -231,7 +231,7 @@

    Optional onPluginEve
    @@ -275,7 +275,7 @@

    Optional willHandleE
    @@ -327,7 +327,7 @@

    setUIUtilities

  • diff --git a/docs/interfaces/roosterjs_react.ribbonbutton.html b/docs/interfaces/roosterjs_react.ribbonbutton.html index a7855bc71f1..09be60b4c24 100644 --- a/docs/interfaces/roosterjs_react.ribbonbutton.html +++ b/docs/interfaces/roosterjs_react.ribbonbutton.html @@ -118,7 +118,7 @@

    Optional commandBarP
    commandBarProperties: Partial<ICommandBarItemProps>
    @@ -135,7 +135,7 @@

    Optional dropDownMen
    dropDownMenu: RibbonButtonDropDown
    @@ -152,7 +152,7 @@

    Optional flipWhenRtl
    flipWhenRtl: boolean
    @@ -167,7 +167,7 @@

    iconName

    iconName: string
    @@ -182,7 +182,7 @@

    Optional isChecked

    isChecked: (formatState: FormatState) => boolean
    @@ -224,7 +224,7 @@

    Optional isDisabled

    isDisabled: (formatState: FormatState) => boolean
    @@ -266,7 +266,7 @@

    key

    key: T
    @@ -281,7 +281,7 @@

    onClick

    onClick: (editor: IEditor, key: T, strings: LocalizedStrings<T, string>, uiUtilities: UIUtilities) => void
    @@ -346,7 +346,7 @@

    unlocalizedText

    unlocalizedText: string
    diff --git a/docs/interfaces/roosterjs_react.ribbonbuttondropdown.html b/docs/interfaces/roosterjs_react.ribbonbuttondropdown.html index 68239dd932e..89b78e1149e 100644 --- a/docs/interfaces/roosterjs_react.ribbonbuttondropdown.html +++ b/docs/interfaces/roosterjs_react.ribbonbuttondropdown.html @@ -107,7 +107,7 @@

    Optional allowLivePr
    allowLivePreview: boolean
    @@ -124,7 +124,7 @@

    Optional commandBarS
    commandBarSubMenuProperties: Partial<IContextualMenuProps>
    @@ -139,7 +139,7 @@

    Optional getSelected
    getSelectedItemKey: (formatState: FormatState) => string
    @@ -181,7 +181,7 @@

    Optional itemClassNa
    itemClassName: string
    @@ -196,7 +196,7 @@

    Optional itemRender

    itemRender: (item: IContextualMenuItem, onClick: (e: MouseEvent<Element, MouseEvent> | KeyboardEvent<Element>, item: IContextualMenuItem) => void) => ReactNode
    @@ -266,7 +266,7 @@

    items

    items: Record<string, string>
    diff --git a/docs/interfaces/roosterjs_react.ribbonplugin.html b/docs/interfaces/roosterjs_react.ribbonplugin.html index a61790c0c7b..1a755c03eea 100644 --- a/docs/interfaces/roosterjs_react.ribbonplugin.html +++ b/docs/interfaces/roosterjs_react.ribbonplugin.html @@ -122,7 +122,7 @@

    dispose

    @@ -155,7 +155,7 @@

    getName

    @@ -186,7 +186,7 @@

    initialize

    @@ -229,7 +229,7 @@

    onButtonClick

    onButtonClick: <T>(button: RibbonButton<T>, key: T, strings?: LocalizedStrings<T, string>) => void
    @@ -293,7 +293,7 @@

    Optional onPluginEve
    @@ -336,7 +336,7 @@

    registerFormatChangedCallback

    registerFormatChangedCallback: (callback: (formatState: FormatState) => void) => () => void
    @@ -402,7 +402,7 @@

    startLivePreview

    startLivePreview: <T>(button: RibbonButton<T>, key: T, strings?: LocalizedStrings<T, string>) => void
    @@ -465,7 +465,7 @@

    stopLivePreview

    stopLivePreview: () => void
    @@ -496,7 +496,7 @@

    Optional willHandleE
    @@ -549,7 +549,7 @@

    setUIUtilities

    diff --git a/docs/interfaces/roosterjs_react.ribbonprops.html b/docs/interfaces/roosterjs_react.ribbonprops.html index 1b4da840415..0e753631cdc 100644 --- a/docs/interfaces/roosterjs_react.ribbonprops.html +++ b/docs/interfaces/roosterjs_react.ribbonprops.html @@ -117,7 +117,7 @@

    buttons

    buttons: RibbonButton<T>[]
    @@ -132,7 +132,7 @@

    plugin

    plugin: RibbonPlugin
    @@ -147,7 +147,7 @@

    Optional strings

    strings: LocalizedStrings<T, string>
    diff --git a/docs/interfaces/roosterjs_react.roosterprops.html b/docs/interfaces/roosterjs_react.roosterprops.html index c3f986bc527..0bd228043dc 100644 --- a/docs/interfaces/roosterjs_react.roosterprops.html +++ b/docs/interfaces/roosterjs_react.roosterprops.html @@ -132,7 +132,7 @@

    Optional allowKeyboard

    Inherited from EditorOptions.allowKeyboardEventPropagation

    @@ -151,7 +151,7 @@

    Optional allowedCustom

    Inherited from EditorOptions.allowedCustomPasteType

    @@ -168,7 +168,7 @@

    Optional coreApiOver
    @@ -185,7 +185,7 @@

    Optional corePluginO
    @@ -202,7 +202,7 @@

    Optional defaultFormat

    Inherited from EditorOptions.defaultFormat

    @@ -220,7 +220,7 @@

    Optional doNotAdjust
    @@ -235,7 +235,7 @@

    Optional editorCreatoreditorCreator: (div: HTMLDivElement, options: EditorOptions) => IEditor

    @@ -276,7 +276,7 @@

    Optional experimentalFeat
    @@ -291,7 +291,7 @@

    Optional focusOnInit

    focusOnInit: boolean
    @@ -308,7 +308,7 @@

    Optional getDarkColo
    @@ -346,7 +346,7 @@

    Optional getVisibleV
    @@ -377,7 +377,7 @@

    Optional imageSelection

    Inherited from EditorOptions.imageSelectionBorderColor

    @@ -393,7 +393,7 @@

    Optional inDarkMode<
    @@ -409,7 +409,7 @@

    Optional initialContent

    Inherited from EditorOptions.initialContent

    @@ -426,7 +426,7 @@

    Optional onExternalC
    @@ -467,7 +467,7 @@

    Optional plugins

    @@ -486,7 +486,7 @@

    Optional scrollContainer<
    @@ -503,7 +503,7 @@

    Optional sizeTransformer<
    @@ -521,7 +521,7 @@

    Optional trustedHTMLHandler

    Inherited from EditorOptions.trustedHTMLHandler

    @@ -539,7 +539,7 @@

    Optional undoMetadata

    Inherited from EditorOptions.undoMetadataSnapshotService

    @@ -556,7 +556,7 @@

    Optional undoSnapshot

    Inherited from EditorOptions.undoSnapshotService

    @@ -575,7 +575,7 @@

    Optional zoomScale

    diff --git a/docs/interfaces/roosterjs_react.uiutilities.html b/docs/interfaces/roosterjs_react.uiutilities.html index 0845b2b69bc..d1aff5dfc4a 100644 --- a/docs/interfaces/roosterjs_react.uiutilities.html +++ b/docs/interfaces/roosterjs_react.uiutilities.html @@ -107,7 +107,7 @@

    isRightToLeft

  • @@ -129,7 +129,7 @@

    renderComponent

  • diff --git a/docs/interfaces/roosterjs_react.updatecontentplugin.html b/docs/interfaces/roosterjs_react.updatecontentplugin.html index 7f04097d9c3..3331f492a2d 100644 --- a/docs/interfaces/roosterjs_react.updatecontentplugin.html +++ b/docs/interfaces/roosterjs_react.updatecontentplugin.html @@ -113,7 +113,7 @@

    dispose

    @@ -145,7 +145,7 @@

    forceUpdate

    forceUpdate: () => void
    @@ -176,7 +176,7 @@

    getName

    @@ -207,7 +207,7 @@

    initialize

    @@ -251,7 +251,7 @@

    Optional onPluginEve
    @@ -295,7 +295,7 @@

    Optional willHandleE
    diff --git a/docs/modules/roosterjs.html b/docs/modules/roosterjs.html index 77a3eeb9a71..4c84181b386 100644 --- a/docs/modules/roosterjs.html +++ b/docs/modules/roosterjs.html @@ -88,7 +88,7 @@

    createEditor

  • diff --git a/docs/modules/roosterjs_color_utils.html b/docs/modules/roosterjs_color_utils.html index a7bf82b30db..3204a427820 100644 --- a/docs/modules/roosterjs_color_utils.html +++ b/docs/modules/roosterjs_color_utils.html @@ -88,7 +88,7 @@

    getDarkColor

  • diff --git a/docs/modules/roosterjs_content_model.html b/docs/modules/roosterjs_content_model.html index 901695817e0..248f768705c 100644 --- a/docs/modules/roosterjs_content_model.html +++ b/docs/modules/roosterjs_content_model.html @@ -88,7 +88,7 @@

    createContentModelEditor

  • diff --git a/docs/modules/roosterjs_content_model_dom.html b/docs/modules/roosterjs_content_model_dom.html index aad1af9830f..1c0c3e85235 100644 --- a/docs/modules/roosterjs_content_model_dom.html +++ b/docs/modules/roosterjs_content_model_dom.html @@ -139,7 +139,7 @@

    Const BorderKeys

    BorderKeys: (keyof BorderFormat & keyof CSSStyleDeclaration)[] = ...
    @@ -154,7 +154,7 @@

    Const defaultImplicitFo
    defaultImplicitFormatMap: DefaultImplicitFormatMap = ...
    @@ -176,7 +176,7 @@

    addBlock

  • @@ -213,7 +213,7 @@

    addCode

  • @@ -250,7 +250,7 @@

    addLink

  • @@ -282,7 +282,7 @@

    addSegment

  • @@ -325,7 +325,7 @@

    areSameFormats

  • @@ -368,7 +368,7 @@

    Const childProcessor

  • @@ -408,7 +408,7 @@

    contentModelToDom

  • @@ -471,7 +471,7 @@

    createBr

  • @@ -502,7 +502,7 @@

    createContentModelDocument

  • @@ -533,7 +533,7 @@

    createDivider

  • @@ -570,7 +570,7 @@

    createDomToModelContext

  • @@ -613,7 +613,7 @@

    createEntity

  • @@ -668,7 +668,7 @@

    createFormatContainer

  • @@ -705,7 +705,7 @@

    createGeneralBlock

  • @@ -736,7 +736,7 @@

    createGeneralSegment

  • @@ -773,7 +773,7 @@

    createImage

  • @@ -810,7 +810,7 @@

    createListItem

  • @@ -847,7 +847,7 @@

    createParagraph

  • @@ -896,7 +896,7 @@

    createParagraphDecorator

  • @@ -933,7 +933,7 @@

    createSelectionMarker

  • @@ -964,7 +964,7 @@

    createTable

  • @@ -1001,7 +1001,7 @@

    createTableCell

  • @@ -1050,7 +1050,7 @@

    createText

  • @@ -1087,7 +1087,7 @@

    domToContentModel

  • @@ -1137,7 +1137,7 @@

    Const entityProcessor

  • @@ -1177,7 +1177,7 @@

    getRegularSelectionOffsets

  • @@ -1216,7 +1216,7 @@

    handleRegularSelection

  • @@ -1271,7 +1271,7 @@

    hasMetadata

  • @@ -1308,7 +1308,7 @@

    isGeneralSegment

  • @@ -1339,7 +1339,7 @@

    isNodeOfType

  • @@ -1382,7 +1382,7 @@

    isPunctuation

  • @@ -1413,7 +1413,7 @@

    isSpace

  • @@ -1445,7 +1445,7 @@

    isWhiteSpacePreserved

  • @@ -1476,7 +1476,7 @@

    normalizeContentModel

  • @@ -1514,7 +1514,7 @@

    normalizeSingleSegment

  • @@ -1551,7 +1551,7 @@

    normalizeText

  • @@ -1589,7 +1589,7 @@

    parseFormat

  • @@ -1644,7 +1644,7 @@

    parseValueWithUnit

  • @@ -1687,7 +1687,7 @@

    processChildNode

  • @@ -1727,7 +1727,7 @@

    setParagraphNotImplicit

  • @@ -1758,7 +1758,7 @@

    Const tableProcessor

  • @@ -1809,7 +1809,7 @@

    unwrapBlock

  • @@ -1846,7 +1846,7 @@

    updateMetadata

  • diff --git a/docs/modules/roosterjs_content_model_editor.html b/docs/modules/roosterjs_content_model_editor.html index d620b5dd1c5..4850faf0eec 100644 --- a/docs/modules/roosterjs_content_model_editor.html +++ b/docs/modules/roosterjs_content_model_editor.html @@ -173,7 +173,7 @@

    CreateContentModel

    CreateContentModel: (core: ContentModelEditorCore, option?: DomToModelOption) => ContentModelDocument
  • @@ -356,7 +356,7 @@

    adjustLinkSelection

  • @@ -385,7 +385,7 @@

    applyPendingFormat

  • @@ -422,7 +422,7 @@

    applySegmentFormat

  • @@ -459,7 +459,7 @@

    changeCapitalization

  • @@ -504,7 +504,7 @@

    changeFontSize

  • @@ -541,7 +541,7 @@

    changeImage

  • @@ -578,7 +578,7 @@

    clearFormat

  • @@ -609,7 +609,7 @@

    combineBorderValue

  • @@ -637,7 +637,7 @@

    Const createContentMode
  • @@ -668,7 +668,7 @@

    editTable

  • @@ -705,7 +705,7 @@

    extractBorderValues

  • @@ -737,7 +737,7 @@

    formatTable

  • @@ -780,7 +780,7 @@

    getFormatState

  • @@ -811,7 +811,7 @@

    getSegmentFormat

  • @@ -842,7 +842,7 @@

    hasSelectionInBlock

  • @@ -873,7 +873,7 @@

    hasSelectionInBlockGroup

  • @@ -901,7 +901,7 @@

    hasSelectionInSegment

  • @@ -932,7 +932,7 @@

    insertImage

  • @@ -966,7 +966,7 @@

    insertLink

  • @@ -1026,7 +1026,7 @@

    insertTable

  • @@ -1077,7 +1077,7 @@

    isContentModelEditor

  • @@ -1109,7 +1109,7 @@

    paste

  • @@ -1155,7 +1155,7 @@

    promoteToContentModelEditorCore

  • @@ -1192,7 +1192,7 @@

    removeLink

  • @@ -1225,7 +1225,7 @@

    setAlignment

  • @@ -1262,7 +1262,7 @@

    setBackgroundColor

  • @@ -1299,7 +1299,7 @@

    setDirection

  • @@ -1336,7 +1336,7 @@

    setFontName

  • @@ -1373,7 +1373,7 @@

    setFontSize

  • @@ -1410,7 +1410,7 @@

    setHeaderLevel

  • @@ -1447,7 +1447,7 @@

    setImageAltText

  • @@ -1485,7 +1485,7 @@

    setImageBorder

  • @@ -1529,7 +1529,7 @@

    setImageBoxShadow

  • @@ -1572,7 +1572,7 @@

    setIndentation

  • @@ -1615,7 +1615,7 @@

    setListStartNumber

  • @@ -1652,7 +1652,7 @@

    setListStyle

  • @@ -1689,7 +1689,7 @@

    setParagraphMargin

  • @@ -1733,7 +1733,7 @@

    setSpacing

  • @@ -1770,7 +1770,7 @@

    setTableCellShade

  • @@ -1807,7 +1807,7 @@

    setTextColor

  • @@ -1844,7 +1844,7 @@

    toggleBlockQuote

  • @@ -1883,7 +1883,7 @@

    toggleBold

  • @@ -1914,7 +1914,7 @@

    toggleBullet

  • @@ -1949,7 +1949,7 @@

    toggleCode

  • @@ -1980,7 +1980,7 @@

    toggleItalic

  • @@ -2011,7 +2011,7 @@

    toggleNumbering

  • @@ -2046,7 +2046,7 @@

    toggleStrikethrough

  • @@ -2077,7 +2077,7 @@

    toggleSubscript

  • @@ -2108,7 +2108,7 @@

    toggleSuperscript

  • @@ -2139,7 +2139,7 @@

    toggleUnderline

  • @@ -2170,7 +2170,7 @@

    updateImageMetadata

  • @@ -2225,7 +2225,7 @@

    updateTableCellMetadata

  • @@ -2280,7 +2280,7 @@

    updateTableMetadata

  • diff --git a/docs/modules/roosterjs_content_model_types.html b/docs/modules/roosterjs_content_model_types.html index 0743380e4cb..a5eb7bf8c90 100644 --- a/docs/modules/roosterjs_content_model_types.html +++ b/docs/modules/roosterjs_content_model_types.html @@ -206,7 +206,7 @@

    BackgroundColorFormat

    BackgroundColorFormat: { backgroundColor?: string }
    @@ -234,7 +234,7 @@

    BoldFormat

    BoldFormat: { fontWeight?: string }
    @@ -262,7 +262,7 @@

    BorderBoxFormat

    BorderBoxFormat: { useBorderBox?: boolean }
    @@ -290,7 +290,7 @@

    BorderFormat

    BorderFormat: { borderBottom?: string; borderLeft?: string; borderRadius?: string; borderRight?: string; borderTop?: string }
    @@ -350,7 +350,7 @@

    BoxShadowFormat

    BoxShadowFormat: { boxShadow?: string }
    @@ -378,7 +378,7 @@

    ContentModelBlock

    @@ -393,7 +393,7 @@

    ContentModelBlockFormat

    @@ -408,7 +408,7 @@

    ContentModelBlockGroup

    @@ -423,7 +423,7 @@

    ContentModelBlockGroupType

    ContentModelBlockGroupType: "Document" | "FormatContainer" | "ListItem" | "TableCell" | "General"
    @@ -438,7 +438,7 @@

    ContentModelBlockHandler

    ContentModelBlockHandler<T>: (doc: Document, parent: Node, model: T, context: ModelToDomContext, refNode: Node | null) => Node | null

    Type parameters

    @@ -518,7 +518,7 @@

    ContentModelBlockType

    ContentModelBlockType: "BlockGroup" | "Table" | "Paragraph" | "Entity" | "Divider"
    @@ -533,7 +533,7 @@

    ContentModelCodeFormat

    ContentModelCodeFormat: FontFamilyFormat & DisplayFormat
    @@ -548,7 +548,7 @@

    ContentModelDecorator

    ContentModelDecorator: ContentModelLink | ContentModelCode
    @@ -563,7 +563,7 @@

    ContentModelDividerFormat

    ContentModelDividerFormat: ContentModelBlockFormat & DisplayFormat & SizeFormat
    @@ -578,7 +578,7 @@

    ContentModelFormatBase

    ContentModelFormatBase<V>: {}
    @@ -609,7 +609,7 @@

    ContentModelFormatContainerFormat

    @@ -624,7 +624,7 @@

    ContentModelHandler

    ContentModelHandler<T>: (doc: Document, parent: Node, model: T, context: ModelToDomContext) => void

    Type parameters

    @@ -695,7 +695,7 @@

    ContentModelHandlerMap

    @@ -835,7 +835,7 @@

    ContentModelHyperLinkFormat

    @@ -850,7 +850,7 @@

    ContentModelImageFormat

    @@ -865,7 +865,7 @@

    ContentModelListItemFormat

    @@ -880,7 +880,7 @@

    ContentModelListItemLevelFormat

    @@ -895,7 +895,7 @@

    ContentModelSegment

    @@ -910,7 +910,7 @@

    ContentModelSegmentFormat

    @@ -925,7 +925,7 @@

    ContentModelSegmentType

    ContentModelSegmentType: "Text" | "Br" | "Image" | "SelectionMarker" | "General" | "Entity"
    @@ -940,7 +940,7 @@

    ContentModelTableCellFormat

    @@ -955,7 +955,7 @@

    ContentModelTableFormat

    @@ -970,7 +970,7 @@

    DatasetFormat

    DatasetFormat: Record<string, string>
    @@ -985,7 +985,7 @@

    DefaultImplicitFormatMap

    DefaultImplicitFormatMap: Record<string, Readonly<ContentModelSegmentFormat & ContentModelBlockFormat>>
    @@ -1000,7 +1000,7 @@

    DefaultStyleMap

    DefaultStyleMap: {[ key in keyof HTMLElementDeprecatedTagNameMap]: Readonly<Partial<CSSStyleDeclaration>> } & {[ key in keyof HTMLElementTagNameMap]: Readonly<Partial<CSSStyleDeclaration>> } & { center?: Partial<CSSStyleDeclaration>; strike?: Partial<CSSStyleDeclaration> }
    @@ -1015,7 +1015,7 @@

    DirectionFormat

    DirectionFormat: { direction?: "ltr" | "rtl" }
    @@ -1043,7 +1043,7 @@

    DisplayFormat

    DisplayFormat: { display?: string }
    @@ -1071,7 +1071,7 @@

    ElementProcessor

    ElementProcessor<T>: (group: ContentModelBlockGroup, element: T, context: DomToModelContext) => void

    Type parameters

    @@ -1134,7 +1134,7 @@

    ElementProcessorMap

    ElementProcessorMap: {[ key in keyof HTMLElementDeprecatedTagNameMap]: ElementProcessor<HTMLElementDeprecatedTagNameMap[key]> } & {[ key in keyof HTMLElementTagNameMap]: ElementProcessor<HTMLElementTagNameMap[key]> } & { #text: ElementProcessor<Text>; *: ElementProcessor<HTMLElement>; center?: ElementProcessor<HTMLElement>; child: ElementProcessor<ParentNode>; delimiter?: ElementProcessor<HTMLSpanElement>; element: ElementProcessor<HTMLElement>; entity: ElementProcessor<HTMLElement>; strike?: ElementProcessor<HTMLElement> }
    @@ -1149,7 +1149,7 @@

    FontFamilyFormat

    FontFamilyFormat: { fontFamily?: string }
    @@ -1177,7 +1177,7 @@

    FontSizeFormat

    FontSizeFormat: { fontSize?: string }
    @@ -1205,7 +1205,7 @@

    FormatApplier

    FormatApplier<TFormat>: (format: TFormat, element: HTMLElement, context: ModelToDomContext) => void

    Type parameters

    @@ -1268,7 +1268,7 @@

    FormatAppliers

    FormatAppliers: {[ Key in FormatKey]: FormatApplier<FormatHandlerTypeMap[Key]> | null }
    @@ -1283,7 +1283,7 @@

    FormatAppliersPerCategory

    FormatAppliersPerCategory: {[ Key in keyof ContentModelFormatMap]: (FormatApplier<ContentModelFormatMap[Key]> | null)[] }
    @@ -1298,7 +1298,7 @@

    FormatKey

    FormatKey: keyof FormatHandlerTypeMap
    @@ -1313,7 +1313,7 @@

    FormatParser

    FormatParser<TFormat>: (format: TFormat, element: HTMLElement, context: DomToModelContext, defaultStyle: Readonly<Partial<CSSStyleDeclaration>>) => void

    Type parameters

    @@ -1384,7 +1384,7 @@

    FormatParsers

    FormatParsers: {[ Key in FormatKey]: FormatParser<FormatHandlerTypeMap[Key]> | null }
    @@ -1399,7 +1399,7 @@

    FormatParsersPerCategory

    FormatParsersPerCategory: {[ Key in keyof ContentModelFormatMap]: (FormatParser<ContentModelFormatMap[Key]> | null)[] }
    @@ -1414,7 +1414,7 @@

    HtmlAlignFormat

    HtmlAlignFormat: { htmlAlign?: "start" | "center" | "end" | "justify" | "initial" }
    @@ -1442,7 +1442,7 @@

    IdFormat

    IdFormat: { id?: string }
    @@ -1470,7 +1470,7 @@

    ImageCropMetadataFormat

    ImageCropMetadataFormat: { bottomPercent?: number; leftPercent?: number; rightPercent?: number; topPercent?: number }
    @@ -1542,7 +1542,7 @@

    ImageMetadataFormat

    ImageMetadataFormat: ImageResizeMetadataFormat & ImageCropMetadataFormat & ImageRotateMetadataFormat & { naturalHeight?: number; naturalWidth?: number; src?: string }
    @@ -1557,7 +1557,7 @@

    ImageResizeMetadataFormat

    ImageResizeMetadataFormat: { heightPx?: number; widthPx?: number }
    @@ -1607,7 +1607,7 @@

    ImageRotateMetadataFormat

    ImageRotateMetadataFormat: { angleRad?: number }
    @@ -1640,7 +1640,7 @@

    ItalicFormat

    ItalicFormat: { italic?: boolean }
    @@ -1668,7 +1668,7 @@

    LetterSpacingFormat

    LetterSpacingFormat: { letterSpacing?: string }
    @@ -1696,7 +1696,7 @@

    LineHeightFormat

    LineHeightFormat: { lineHeight?: string }
    @@ -1724,7 +1724,7 @@

    LinkFormat

    LinkFormat: { anchorClass?: string; anchorId?: string; anchorTitle?: string; href?: string; name?: string; relationship?: string; target?: string }
    @@ -1800,7 +1800,7 @@

    ListMetadataFormat

    ListMetadataFormat: { orderedStyleType?: NumberingListType; unorderedStyleType?: BulletListType }
    @@ -1836,7 +1836,7 @@

    ListStylePositionFormat

    ListStylePositionFormat: { listStylePosition?: string }
    @@ -1864,7 +1864,7 @@

    ListThreadFormat

    ListThreadFormat: { displayForDummyItem?: string; startNumberOverride?: number }
    @@ -1904,7 +1904,7 @@

    ListTypeFormat

    ListTypeFormat: { listType?: "OL" | "UL" }
    @@ -1932,7 +1932,7 @@

    MarginFormat

    MarginFormat: { marginBottom?: string; marginLeft?: string; marginRight?: string; marginTop?: string }
    @@ -1984,7 +1984,7 @@

    OnNodeCreated

    @@ -2033,7 +2033,7 @@

    PaddingFormat

    PaddingFormat: { paddingBottom?: string; paddingLeft?: string; paddingRight?: string; paddingTop?: string }
    @@ -2085,7 +2085,7 @@

    SizeFormat

    SizeFormat: { height?: string; maxHeight?: string; maxWidth?: string; minHeight?: string; minWidth?: string; width?: string }
    @@ -2153,7 +2153,7 @@

    SpacingFormat

    SpacingFormat: { borderCollapse?: boolean }
    @@ -2181,7 +2181,7 @@

    StrikeFormat

    StrikeFormat: { strikethrough?: boolean }
    @@ -2209,7 +2209,7 @@

    SuperOrSubScriptFormat

    SuperOrSubScriptFormat: { superOrSubScriptSequence?: string }
    @@ -2238,7 +2238,7 @@

    TableLayoutFormat

    TableLayoutFormat: { tableLayout?: string }
    @@ -2266,7 +2266,7 @@

    TableMetadataFormat

    TableMetadataFormat: { bgColorEven?: string | null; bgColorOdd?: string | null; bottomBorderColor?: string | null; hasBandedColumns?: boolean; hasBandedRows?: boolean; hasFirstColumn?: boolean; hasHeaderRow?: boolean; headerRowColor?: string | null; tableBorderFormat?: TableBorderFormat | CompatibleTableBorderFormat; topBorderColor?: string | null; verticalBorderColor?: string | null }
    @@ -2374,7 +2374,7 @@

    TextAlignFormat

    TextAlignFormat: { textAlign?: "start" | "center" | "end" | "justify" | "initial" }
    @@ -2402,7 +2402,7 @@

    TextColorFormat

    TextColorFormat: { textColor?: string }
    @@ -2430,7 +2430,7 @@

    UnderlineFormat

    UnderlineFormat: { underline?: boolean }
    @@ -2458,7 +2458,7 @@

    VerticalAlignFormat

    VerticalAlignFormat: { verticalAlign?: "top" | "middle" | "bottom" }
    @@ -2486,7 +2486,7 @@

    WhiteSpaceFormat

    WhiteSpaceFormat: { whiteSpace?: string }
    @@ -2514,7 +2514,7 @@

    WordBreakFormat

    WordBreakFormat: { wordBreak?: string }
    diff --git a/docs/modules/roosterjs_editor_api.html b/docs/modules/roosterjs_editor_api.html index c62783b55a6..f044c0d3396 100644 --- a/docs/modules/roosterjs_editor_api.html +++ b/docs/modules/roosterjs_editor_api.html @@ -129,7 +129,7 @@

    Const FONT_SIZES

    FONT_SIZES: number[] = ...
    @@ -152,7 +152,7 @@

    applyCellShading

  • @@ -189,7 +189,7 @@

    blockFormat

  • @@ -265,7 +265,7 @@

    changeCapitalization

  • @@ -310,7 +310,7 @@

    changeFontSize

  • @@ -353,7 +353,7 @@

    clearBlockFormat

  • @@ -386,7 +386,7 @@

    clearFormat

  • @@ -425,7 +425,7 @@

    commitListChains

  • @@ -462,7 +462,7 @@

    createLink

  • @@ -522,7 +522,7 @@

    editTable

  • @@ -559,7 +559,7 @@

    Const experimentCommitL
  • @@ -592,7 +592,7 @@

    formatTable

  • @@ -635,7 +635,7 @@

    getElementBasedFormatState

  • @@ -675,7 +675,7 @@

    getFormatState

  • @@ -717,7 +717,7 @@

    insertEntity

  • @@ -794,7 +794,7 @@

    insertImage

  • @@ -837,7 +837,7 @@

    insertTable

  • @@ -888,7 +888,7 @@

    removeLink

  • @@ -922,7 +922,7 @@

    replaceWithNode

  • @@ -969,7 +969,7 @@

    Returns boolean
    @@ -1019,7 +1019,7 @@

    rotateElement

  • @@ -1062,7 +1062,7 @@

    setAlignment

  • @@ -1100,7 +1100,7 @@

    setBackgroundColor

  • @@ -1142,7 +1142,7 @@

    setDirection

  • @@ -1180,7 +1180,7 @@

    setFontName

  • @@ -1218,7 +1218,7 @@

    setFontSize

  • @@ -1256,7 +1256,7 @@

    setImageAltText

  • @@ -1297,7 +1297,7 @@

    setIndentation

  • @@ -1337,7 +1337,7 @@

    setOrderedListNumbering

  • @@ -1380,7 +1380,7 @@

    setTextColor

  • @@ -1446,7 +1446,7 @@

    toggleBlockQuote

  • @@ -1502,7 +1502,7 @@

    toggleBold

  • @@ -1537,7 +1537,7 @@

    toggleBullet

  • @@ -1584,7 +1584,7 @@

    toggleCodeBlock

  • @@ -1640,7 +1640,7 @@

    toggleHeader

  • @@ -1679,7 +1679,7 @@

    toggleItalic

  • @@ -1714,7 +1714,7 @@

    toggleListType

  • @@ -1791,7 +1791,7 @@

    toggleNumbering

  • @@ -1844,7 +1844,7 @@

    toggleStrikethrough

  • @@ -1879,7 +1879,7 @@

    toggleSubscript

  • @@ -1916,7 +1916,7 @@

    toggleSuperscript

  • @@ -1953,7 +1953,7 @@

    toggleUnderline

  • diff --git a/docs/modules/roosterjs_editor_core.html b/docs/modules/roosterjs_editor_core.html index 9b9c179f756..c886a972e13 100644 --- a/docs/modules/roosterjs_editor_core.html +++ b/docs/modules/roosterjs_editor_core.html @@ -96,7 +96,7 @@

    Const createEditorCore<
  • @@ -133,7 +133,7 @@

    isFeatureEnabled

  • diff --git a/docs/modules/roosterjs_editor_dom.html b/docs/modules/roosterjs_editor_dom.html index 7860d8156b1..2f77c66367a 100644 --- a/docs/modules/roosterjs_editor_dom.html +++ b/docs/modules/roosterjs_editor_dom.html @@ -231,7 +231,7 @@

    PendableFormatNames

    PendableFormatNames: keyof PendableFormatState
    @@ -249,7 +249,7 @@

    Const Browser

    Browser: BrowserInfo = ...
    @@ -264,7 +264,7 @@

    Const KnownCreateElemen
    KnownCreateElementData: Record<KnownCreateElementDataIndex, CreateElementData> = ...
    @@ -279,7 +279,7 @@

    Const PendableFormatCom
    PendableFormatCommandMap: {[ key in PendableFormatNames]: DocumentCommand } = ...
    @@ -301,7 +301,7 @@

    addDelimiterAfter

  • @@ -332,7 +332,7 @@

    addDelimiterBefore

  • @@ -363,7 +363,7 @@

    addDelimiters

  • @@ -394,7 +394,7 @@

    addRangeToSelection

  • @@ -434,7 +434,7 @@

    addSnapshot

  • @@ -468,7 +468,7 @@

    Returns void
    @@ -568,7 +568,7 @@

    addSnapshotV2

  • @@ -611,7 +611,7 @@

    adjustInsertPosition

  • Parameters

    @@ -656,7 +656,7 @@

    applyFormat

  • @@ -705,7 +705,7 @@

    applyTextStyle

  • @@ -769,7 +769,7 @@

    arrayPush

  • @@ -812,7 +812,7 @@

    cacheGetEventData

  • @@ -874,7 +874,7 @@

    canMoveCurrentSnapshot

  • @@ -918,7 +918,7 @@

    canUndoAutoComplete

  • @@ -952,7 +952,7 @@

    chainSanitizerCallback

  • @@ -1010,7 +1010,7 @@

    changeElementTag

  • @@ -1045,7 +1045,7 @@

    Returns HTMLEleme
  • @@ -1083,7 +1083,7 @@

    clearEventDataCache

  • @@ -1121,7 +1121,7 @@

    clearProceedingSnapshots

  • @@ -1143,7 +1143,7 @@

    Returns void
    @@ -1201,7 +1201,7 @@

    clearProceedingSnapshotsV2

  • @@ -1232,7 +1232,7 @@

    collapseNodes

  • @@ -1286,7 +1286,7 @@

    collapseNodesInRegion

  • @@ -1325,7 +1325,7 @@

    commitEntity

  • @@ -1375,7 +1375,7 @@

    contains

  • @@ -1412,7 +1412,7 @@

    Returns boolean
    @@ -1450,7 +1450,7 @@

    createArrayDefinition

  • @@ -1506,7 +1506,7 @@

    createBooleanDefinition

  • @@ -1550,7 +1550,7 @@

    createDefaultHtmlSanitizerOptions

  • @@ -1572,7 +1572,7 @@

    createElement

  • @@ -1610,7 +1610,7 @@

    createEntityPlaceholder

  • @@ -1644,7 +1644,7 @@

    createFragmentFromClipboardData

  • @@ -1712,7 +1712,7 @@

    createNumberDefinition

  • @@ -1768,7 +1768,7 @@

    createObjectDefinition

  • @@ -1822,7 +1822,7 @@

    createRange

  • @@ -1852,7 +1852,7 @@

    Returns Range
    @@ -1881,7 +1881,7 @@

    Returns Range
    @@ -1922,7 +1922,7 @@

    Returns Range
    @@ -1957,7 +1957,7 @@

    Returns Range
    @@ -1995,7 +1995,7 @@

    createSnapshots

  • @@ -2032,7 +2032,7 @@

    createStringDefinition

  • @@ -2076,7 +2076,7 @@

    createVListFromRegion

  • @@ -2121,7 +2121,7 @@

    deleteSelectedContent

  • @@ -2155,7 +2155,7 @@

    extractClipboardEvent

  • @@ -2232,7 +2232,7 @@

    extractClipboardItems

  • @@ -2273,7 +2273,7 @@

    extractClipboardItemsForIE

  • @@ -2338,7 +2338,7 @@

    extractContentMetadata

  • @@ -2370,7 +2370,7 @@

    findClosestElementAncestor

  • @@ -2415,7 +2415,7 @@

    fromHtml

  • @@ -2455,7 +2455,7 @@

    getBlockElementAtNode

  • @@ -2514,7 +2514,7 @@

    getBrowserInfo

  • @@ -2558,7 +2558,7 @@

    getComputedStyle

  • @@ -2596,7 +2596,7 @@

    getComputedStyles

  • @@ -2635,7 +2635,7 @@

    getDelimiterFromElement

  • @@ -2667,7 +2667,7 @@

    getEntityFromElement

  • @@ -2699,7 +2699,7 @@

    getEntitySelector

  • @@ -2736,7 +2736,7 @@

    getFirstLastBlockElement

  • @@ -2774,7 +2774,7 @@

    getFirstLeafNode

  • @@ -2805,7 +2805,7 @@

    getHtmlWithSelectionPath

  • @@ -2844,7 +2844,7 @@

    getInheritableStyles

  • @@ -2876,7 +2876,7 @@

    getInlineElementAtNode

  • @@ -2904,7 +2904,7 @@

    Returns
    @@ -2941,7 +2941,7 @@

    getInnerHTML

  • @@ -2972,7 +2972,7 @@

    getIntersectedRect

  • @@ -3030,7 +3030,7 @@

    getLastLeafNode

  • @@ -3061,7 +3061,7 @@

    getMetadata

  • @@ -3113,7 +3113,7 @@

    getNextLeafSibling

  • @@ -3156,7 +3156,7 @@

    getObjectKeys

  • @@ -3194,7 +3194,7 @@

    getPasteSource

  • @@ -3232,7 +3232,7 @@

    getPasteType

  • @@ -3275,7 +3275,7 @@

    getPendableFormatState

  • @@ -3307,7 +3307,7 @@

    getPositionRect

  • @@ -3338,7 +3338,7 @@

    getPreviousLeafSibling

  • @@ -3381,7 +3381,7 @@

    getRegionsFromRange

  • @@ -3425,7 +3425,7 @@

    getSelectedBlockElementsInRegion

  • @@ -3469,7 +3469,7 @@

    getSelectionPath

  • @@ -3506,7 +3506,7 @@

    getSelectionRangeInRegion

  • @@ -3539,7 +3539,7 @@

    getStyles

  • @@ -3570,7 +3570,7 @@

    getTableFormatInfo

  • @@ -3602,7 +3602,7 @@

    getTagOfNode

  • @@ -3634,7 +3634,7 @@

    getTextContent

  • @@ -3666,7 +3666,7 @@

    handleImagePaste

  • @@ -3703,7 +3703,7 @@

    handleTextPaste

  • @@ -3746,7 +3746,7 @@

    isBlockElement

  • @@ -3778,7 +3778,7 @@

    isCharacterValue

  • @@ -3812,7 +3812,7 @@

    isCtrlOrMetaPressed

  • @@ -3844,7 +3844,7 @@

    isModifierKey

  • @@ -3875,7 +3875,7 @@

    isNodeAfter

  • @@ -3913,7 +3913,7 @@

    isNodeEmpty

  • @@ -3955,7 +3955,7 @@

    isNodeInRegion

  • @@ -3992,7 +3992,7 @@

    isPositionAtBeginningOf

  • @@ -4031,7 +4031,7 @@

    isVoidHtmlElement

  • @@ -4062,7 +4062,7 @@

    isWholeTableSelected

  • @@ -4099,7 +4099,7 @@

    matchLink

  • @@ -4132,7 +4132,7 @@

    matchesSelector

  • @@ -4169,7 +4169,7 @@

    mergeBlocksInRegion

  • @@ -4212,7 +4212,7 @@

    moveChildNodes

  • @@ -4255,7 +4255,7 @@

    moveContentWithEntityPlaceholders

  • @@ -4298,7 +4298,7 @@

    moveCurrentSnapshot

  • @@ -4342,7 +4342,7 @@

    Const moveCurrentSnapsn
  • @@ -4381,7 +4381,7 @@

    normalizeRect

  • @@ -4410,7 +4410,7 @@

    parseColor

  • @@ -4439,7 +4439,7 @@

    queryElements

  • @@ -4495,7 +4495,7 @@

    readFile

  • @@ -4551,7 +4551,7 @@

    removeGlobalCssStyle

  • @@ -4588,7 +4588,7 @@

    removeImportantStyleRule

  • @@ -4625,7 +4625,7 @@

    removeMetadata

  • @@ -4656,7 +4656,7 @@

    restoreContentWithEntityPlaceholder

  • @@ -4705,7 +4705,7 @@

    retrieveMetadataFromClipboard

  • @@ -4748,7 +4748,7 @@

    safeInstanceOf

  • @@ -4794,7 +4794,7 @@

    sanitizePasteContent

  • @@ -4831,7 +4831,7 @@

    saveTableCellMetadata

  • @@ -4868,7 +4868,7 @@

    setColor

  • @@ -4930,7 +4930,7 @@

    setGlobalCssStyles

  • @@ -4973,7 +4973,7 @@

    setHtmlWithMetadata

  • @@ -5015,7 +5015,7 @@

    setHtmlWithSelectionPath

  • @@ -5060,7 +5060,7 @@

    setListItemStyle

  • @@ -5104,7 +5104,7 @@

    setMetadata

  • @@ -5155,7 +5155,7 @@

    setStyles

  • @@ -5192,7 +5192,7 @@

    splitBalancedNodeRange

  • @@ -5225,7 +5225,7 @@

    splitParentNode

  • @@ -5266,7 +5266,7 @@

    splitTextNode

  • @@ -5314,7 +5314,7 @@

    toArray

  • @@ -5336,7 +5336,7 @@

    Returns Attr
    @@ -5358,7 +5358,7 @@

    Returns DataTrans
  • @@ -5386,7 +5386,7 @@

    Returns T<
  • @@ -5414,7 +5414,7 @@

    Returns T<
  • @@ -5453,7 +5453,7 @@

    unwrap

  • @@ -5484,7 +5484,7 @@

    validate

  • @@ -5531,7 +5531,7 @@

    wrap

  • @@ -5566,7 +5566,7 @@

    Returns HTMLEleme
  • @@ -5597,7 +5597,7 @@

    Returns HTMLEleme
  • @@ -5626,7 +5626,7 @@

    Returns HTMLEleme
  • diff --git a/docs/modules/roosterjs_editor_plugins.html b/docs/modules/roosterjs_editor_plugins.html index ec2ac5d44f9..a3d507f55de 100644 --- a/docs/modules/roosterjs_editor_plugins.html +++ b/docs/modules/roosterjs_editor_plugins.html @@ -120,7 +120,7 @@

    DNDDirectionX

    DNDDirectionX: "w" | "" | "e"
    @@ -135,7 +135,7 @@

    DnDDirectionY

    DnDDirectionY: "n" | "" | "s"
    @@ -157,7 +157,7 @@

    canRegenerateImage

  • @@ -190,7 +190,7 @@

    getAllFeatures

  • @@ -212,7 +212,7 @@

    isResizedTo

  • @@ -249,7 +249,7 @@

    resetImage

  • @@ -286,7 +286,7 @@

    resizeByPercentage

  • diff --git a/docs/modules/roosterjs_editor_types.html b/docs/modules/roosterjs_editor_types.html index 802d62a9abf..e8aedf7fa28 100644 --- a/docs/modules/roosterjs_editor_types.html +++ b/docs/modules/roosterjs_editor_types.html @@ -346,7 +346,7 @@

    AddUndoSnapshot

    AddUndoSnapshot: (core: EditorCore, callback: ((start: NodePosition | null, end: NodePosition | null) => any) | null, changeSource: ChangeSource | CompatibleChangeSource | string | null, canUndoByBackspace: boolean, additionalData?: ContentChangedData) => void
    @@ -420,7 +420,7 @@

    ArrayItemType

    ArrayItemType<T>: T extends infer U[] ? U : never
    @@ -441,7 +441,7 @@

    AttachDomEvent

    AttachDomEvent: (core: EditorCore, eventMap: Record<string, DOMEventHandler>) => () => void
    @@ -502,7 +502,7 @@

    AttributeCallback

    AttributeCallback: (value: string, element: HTMLElement, context: Object) => string
    @@ -560,7 +560,7 @@

    AttributeCallbackMap

    AttributeCallbackMap: Record<string, AttributeCallback>
    @@ -575,7 +575,7 @@

    CompatiblePluginDomEvent

    @@ -590,7 +590,7 @@

    CompatiblePluginKeyboardEvent

    @@ -605,7 +605,7 @@

    CompatiblePluginMouseEvent

    @@ -620,7 +620,7 @@

    ContentEditFeature

    @@ -635,7 +635,7 @@

    ContentMetadata

    @@ -651,7 +651,7 @@

    CoreCreator

    CoreCreator<TEditorCore, TEditorOptions>: (contentDiv: HTMLDivElement, options: TEditorOptions) => TEditorCore

    Type parameters

    @@ -709,7 +709,7 @@

    CreatePasteFragment

    CreatePasteFragment: (core: EditorCore, clipboardData: ClipboardData, position: NodePosition | null, pasteAsText: boolean, applyCurrentStyle: boolean, pasteAsImage: boolean) => DocumentFragment | null
    @@ -786,7 +786,7 @@

    CssStyleCallback

    CssStyleCallback: (value: string, element: HTMLElement, thisStyle: StringMap, context: Object) => boolean
    @@ -852,7 +852,7 @@

    CssStyleCallbackMap

    CssStyleCallbackMap: Record<string, CssStyleCallback>
    @@ -867,7 +867,7 @@

    DOMEventHandler

    @@ -888,7 +888,7 @@

    DOMEventHandlerFunction

    DOMEventHandlerFunction<E>: (event: E) => void

    Type parameters

    @@ -930,7 +930,7 @@

    Definition

    Definition<T>: CustomizeDefinition | (T extends any[] ? ArrayDefinition<T> : T extends Record<string, any> ? ObjectDefinition<T> : T extends String ? StringDefinition : T extends Number ? NumberDefinition : T extends Boolean ? BooleanDefinition : never)
    @@ -951,7 +951,7 @@

    ElementCallback

    ElementCallback: (element: HTMLElement, context: Object) => boolean
    @@ -1001,7 +1001,7 @@

    ElementCallbackMap

    ElementCallbackMap: Record<string, ElementCallback>
    @@ -1016,7 +1016,7 @@

    EnsureTypeInContainer

    EnsureTypeInContainer: (core: EditorCore, position: NodePosition, keyboardEvent?: KeyboardEvent, deprecated?: boolean) => void
    @@ -1081,7 +1081,7 @@

    Focus

    Focus: (core: EditorCore) => void
    @@ -1122,7 +1122,7 @@

    GenericPluginState

    GenericPluginState<Key>: {[ P in StatePluginKeys<Key>]: TypeOfStatePlugin<P> }
    @@ -1143,7 +1143,7 @@

    GetContent

    GetContent: (core: EditorCore, mode: GetContentMode | CompatibleGetContentMode) => string
    @@ -1193,7 +1193,7 @@

    GetPendableFormatState

    GetPendableFormatState: (core: EditorCore, forceGetStateFromDOM: boolean) => PendableFormatState
    @@ -1243,7 +1243,7 @@

    GetSelectionRange

    GetSelectionRange: (core: EditorCore, tryGetFromCache: boolean) => Range | null
    @@ -1293,7 +1293,7 @@

    GetSelectionRangeEx

    GetSelectionRangeEx: (core: EditorCore) => SelectionRangeEx
    @@ -1335,7 +1335,7 @@

    GetStyleBasedFormatState

    GetStyleBasedFormatState: (core: EditorCore, node: Node | null) => StyleBasedFormatState
    @@ -1384,7 +1384,7 @@

    HasFocus

    HasFocus: (core: EditorCore) => boolean
    @@ -1426,7 +1426,7 @@

    InsertNode

    InsertNode: (core: EditorCore, node: Node, option: InsertOption | null) => boolean
    @@ -1478,7 +1478,7 @@

    InsertOption

    @@ -1496,7 +1496,7 @@

    KeyOfStatePlugin

    KeyOfStatePlugin<Key>: CorePlugins[Key] extends PluginWithState<infer U> ? Key : never
    @@ -1517,7 +1517,7 @@

    ObjectPropertyDefinition

    ObjectPropertyDefinition<T>: {[ Key in keyof T]: Definition<T[Key]> }
    @@ -1538,7 +1538,7 @@

    PluginDomEvent

    @@ -1553,7 +1553,7 @@

    PluginEvent

    @@ -1568,7 +1568,7 @@

    PluginEventData

    PluginEventData<T>: PluginEventDataGeneric<PluginEvent, T>
    @@ -1589,7 +1589,7 @@

    PluginEventDataGeneric

    PluginEventDataGeneric<E, T>: E extends BasePluginEvent<T> ? Pick<E, Exclude<keyof E, "eventType">> : never
    @@ -1614,7 +1614,7 @@

    PluginEventFromType

    PluginEventFromType<T>: PluginEventFromTypeGeneric<PluginEvent, T>
    @@ -1635,7 +1635,7 @@

    PluginEventFromTypeGeneric

    PluginEventFromTypeGeneric<E, T>: E extends BasePluginEvent<T> ? E : never
    @@ -1660,7 +1660,7 @@

    PluginKey

    PluginKey: keyof CorePlugins
    @@ -1675,7 +1675,7 @@

    PluginKeyboardEvent

    @@ -1690,7 +1690,7 @@

    PluginMouseEvent

    @@ -1705,7 +1705,7 @@

    PluginState

    @@ -1720,7 +1720,7 @@

    PredefinedCssMap

    PredefinedCssMap: Record<string, StringMap>
    @@ -1735,7 +1735,7 @@

    RestoreUndoSnapshot

    RestoreUndoSnapshot: (core: EditorCore, step: number) => void
    @@ -1784,7 +1784,7 @@

    Select

    Select: (core: EditorCore, arg1: Range | SelectionRangeEx | NodePosition | Node | SelectionPath | null, arg2?: NodePosition | number | PositionType | TableSelection | null, arg3?: Node, arg4?: number | PositionType) => boolean
    @@ -1858,7 +1858,7 @@

    SelectImage

    SelectImage: (core: EditorCore, image: HTMLImageElement | null) => ImageSelectionRange | null
    @@ -1908,7 +1908,7 @@

    SelectRange

    SelectRange: (core: EditorCore, range: Range, skipSameRange?: boolean) => boolean
    @@ -1967,7 +1967,7 @@

    SelectTable

    SelectTable: (core: EditorCore, table: HTMLTableElement | null, coordinates?: TableSelection) => TableSelectionRange | null
    @@ -2026,7 +2026,7 @@

    SelectionRangeEx

    @@ -2041,7 +2041,7 @@

    SetContent

    SetContent: (core: EditorCore, content: string, triggerContentChangedEvent: boolean, metadata?: ContentMetadata) => void
    @@ -2102,7 +2102,7 @@

    SizeTransformer

    SizeTransformer: (size: number) => number
    @@ -2146,7 +2146,7 @@

    StatePluginKeys

    StatePluginKeys<Key>: {[ P in Key]: KeyOfStatePlugin<P> }[Key]
    @@ -2167,7 +2167,7 @@

    StringMap

    StringMap: Record<string, string>
    @@ -2182,7 +2182,7 @@

    SwitchShadowEdit

    SwitchShadowEdit: (core: EditorCore, isOn: boolean) => void
    @@ -2231,7 +2231,7 @@

    TableCellMetadataFormat

    TableCellMetadataFormat: { bgColorOverride?: boolean }
    @@ -2259,7 +2259,7 @@

    TransformColor

    TransformColor: (core: EditorCore, rootNode: Node | null, includeSelf: boolean, callback: (() => void) | null, direction: ColorTransformDirection | CompatibleColorTransformDirection, forceTransform?: boolean, fromDarkMode?: boolean) => void
    @@ -2344,7 +2344,7 @@

    TriggerEvent

    TriggerEvent: (core: EditorCore, pluginEvent: PluginEvent, broadcast: boolean) => void
    @@ -2401,7 +2401,7 @@

    TrustedHTMLHandler

    TrustedHTMLHandler: (html: string) => string
    @@ -2437,7 +2437,7 @@

    TypeOfStatePlugin

    TypeOfStatePlugin<Key>: CorePlugins[Key] extends PluginWithState<infer U> ? U : never
    diff --git a/docs/modules/roosterjs_react.html b/docs/modules/roosterjs_react.html index 948a45e82a8..850cb1a498c 100644 --- a/docs/modules/roosterjs_react.html +++ b/docs/modules/roosterjs_react.html @@ -184,7 +184,7 @@

    AlignCenterButtonStringKey

    AlignCenterButtonStringKey: "buttonNameAlignCenter"
    @@ -199,7 +199,7 @@

    AlignLeftButtonStringKey

    AlignLeftButtonStringKey: "buttonNameAlignLeft"
    @@ -214,7 +214,7 @@

    AlignRightButtonStringKey

    AlignRightButtonStringKey: "buttonNameAlignRight"
    @@ -229,7 +229,7 @@

    AllButtonStringKeys

    @@ -244,7 +244,7 @@

    BackgroundColorButtonStringKey

    BackgroundColorButtonStringKey: "buttonNameBackgroundColor" | BackgroundColorKeys
    @@ -259,7 +259,7 @@

    BackgroundColorKeys

    BackgroundColorKeys: "backgroundColorCyan" | "backgroundColorGreen" | "backgroundColorYellow" | "backgroundColorOrange" | "backgroundColorRed" | "backgroundColorMagenta" | "backgroundColorLightCyan" | "backgroundColorLightGreen" | "backgroundColorLightYellow" | "backgroundColorLightOrange" | "backgroundColorLightRed" | "backgroundColorLightMagenta" | "backgroundColorWhite" | "backgroundColorLightGray" | "backgroundColorGray" | "backgroundColorDarkGray" | "backgroundColorDarkerGray" | "backgroundColorBlack"
    @@ -274,7 +274,7 @@

    BoldButtonStringKey

    BoldButtonStringKey: "buttonNameBold"
    @@ -289,7 +289,7 @@

    BulletedListButtonStringKey

    BulletedListButtonStringKey: "buttonNameBulletedList"
    @@ -304,7 +304,7 @@

    CancelButtonStringKey

    CancelButtonStringKey: "buttonNameCancel"
    @@ -319,7 +319,7 @@

    CellShadeButtonStringKey

    CellShadeButtonStringKey: "buttonNameCellShade" | BackgroundColorKeys
    @@ -336,7 +336,7 @@

    ClearFormatButtonStringKey

    ClearFormatButtonStringKey: "buttonNameClearFormat"
    @@ -351,7 +351,7 @@

    CodeButtonStringKey

    CodeButtonStringKey: "buttonNameCode"
    @@ -366,7 +366,7 @@

    DecreaseFontSizeButtonStringKey

    DecreaseFontSizeButtonStringKey: "buttonNameDecreaseFontSize"
    @@ -381,7 +381,7 @@

    DecreaseIndentButtonStringKey

    DecreaseIndentButtonStringKey: "buttonNameDecreaseIndent"
    @@ -396,7 +396,7 @@

    EmojiStringKeys

    EmojiStringKeys: "emojiSearchPlaceholder" | "emojiSearchInputAriaLabel"
    @@ -411,7 +411,7 @@

    FontButtonStringKey

    FontButtonStringKey: "buttonNameFont"
    @@ -426,7 +426,7 @@

    FontSizeButtonStringKey

    FontSizeButtonStringKey: "buttonNameFontSize"
    @@ -441,7 +441,7 @@

    HeaderButtonStringKey

    HeaderButtonStringKey: "buttonNameHeader" | "buttonNameHeader1" | "buttonNameHeader2" | "buttonNameHeader3" | "buttonNameHeader4" | "buttonNameHeader5" | "buttonNameHeader6" | "buttonNameNoHeader" | MenuItemSplitterKey0
    @@ -456,7 +456,7 @@

    ImageEditMenuItemStringKey

    ImageEditMenuItemStringKey: "menuNameImageAltText" | "menuNameImageResize" | "menuNameImageCrop" | "menuNameImageRotate" | "menuNameImageRemove" | "menuNameImageFlip" | "menuNameImageSizeBestFit" | "menuNameImageSizeSmall" | "menuNameImageSizeMedium" | "menuNameImageSizeOriginal" | "menuNameImageRotateLeft" | "menuNameImageRotateRight" | "menuNameImageRotateFlipHorizontally" | "menuNameImageRotateFlipVertically" | "menuNameImageCopy" | "menuNameImageCut" | OkButtonStringKey | CancelButtonStringKey
    @@ -480,7 +480,7 @@

    IncreaseFontSizeButtonStringKey

    IncreaseFontSizeButtonStringKey: "buttonNameIncreaseFontSize"
    @@ -495,7 +495,7 @@

    IncreaseIndentButtonStringKey

    IncreaseIndentButtonStringKey: "buttonNameIncreaseIndent"
    @@ -510,7 +510,7 @@

    InsertImageButtonStringKey

    InsertImageButtonStringKey: "buttonNameInsertImage"
    @@ -525,7 +525,7 @@

    InsertLinkButtonStringKey

    InsertLinkButtonStringKey: "buttonNameInsertLink" | "insertLinkTitle" | "insertLinkDialogUrl" | "insertLinkDialogDisplayAs" | OkButtonStringKey | CancelButtonStringKey
    @@ -540,7 +540,7 @@

    InsertTableButtonStringKey

    InsertTableButtonStringKey: "buttonNameInsertTable" | "insertTablePane"
    @@ -555,7 +555,7 @@

    ItalicButtonStringKey

    ItalicButtonStringKey: "buttonNameItalic"
    @@ -570,7 +570,7 @@

    ListNumberMenuItemStringKey

    ListNumberMenuItemStringKey: "menuNameListNumberEdit" | "menuNameListNumberReset" | "dialogTextSetListNumber" | OkButtonStringKey | CancelButtonStringKey
    @@ -593,7 +593,7 @@

    LocalizedStrings

    LocalizedStrings<T, V>: {[ key in T]: V | (() => V) }
    @@ -617,7 +617,7 @@

    LtrButtonStringKey

    LtrButtonStringKey: "buttonNameLtr"
    @@ -632,7 +632,7 @@

    MenuItemSplitterKey0

    MenuItemSplitterKey0: "-"
    @@ -648,7 +648,7 @@

    MoreCommandsButtonStringKey

    MoreCommandsButtonStringKey: "buttonNameMoreCommands"
    @@ -663,7 +663,7 @@

    NumberedListButtonStringKey

    NumberedListButtonStringKey: "buttonNameNumberedList"
    @@ -678,7 +678,7 @@

    OkButtonStringKey

    OkButtonStringKey: "buttonNameOK"
    @@ -693,7 +693,7 @@

    PasteOptionButtonKeys

    PasteOptionButtonKeys: "pasteOptionPasteAsIs" | "pasteOptionPasteText" | "pasteOptionMergeFormat" | "pasteOptionPasteAsImage"
    @@ -708,7 +708,7 @@

    PasteOptionStringKeys

    PasteOptionStringKeys: PasteOptionButtonKeys | "pasteOptionPaneText"
    @@ -723,7 +723,7 @@

    QuoteButtonStringKey

    QuoteButtonStringKey: "buttonNameQuote"
    @@ -738,7 +738,7 @@

    RedoButtonStringKey

    RedoButtonStringKey: "buttonNameRedo"
    @@ -753,7 +753,7 @@

    RemoveLinkButtonStringKey

    RemoveLinkButtonStringKey: "buttonNameRemoveLink"
    @@ -768,7 +768,7 @@

    RtlButtonStringKey

    RtlButtonStringKey: "buttonNameRtl"
    @@ -783,7 +783,7 @@

    StrikethroughButtonStringKey

    StrikethroughButtonStringKey: "buttonNameStrikethrough"
    @@ -798,7 +798,7 @@

    SubscriptButtonStringKey

    SubscriptButtonStringKey: "buttonNameSubscript"
    @@ -813,7 +813,7 @@

    SuperscriptButtonStringKey

    SuperscriptButtonStringKey: "buttonNameSuperscript"
    @@ -828,7 +828,7 @@

    TableEditAlignMenuItemStringKey

    TableEditAlignMenuItemStringKey: "menuNameTableAlign" | "menuNameTableAlignLeft" | "menuNameTableAlignCenter" | "menuNameTableAlignRight" | "menuNameTableAlignTop" | "menuNameTableAlignMiddle" | "menuNameTableAlignBottom" | MenuItemSplitterKey0
    @@ -843,7 +843,7 @@

    TableEditAlignTableMenuItemStringKey

    TableEditAlignTableMenuItemStringKey: "menuNameTableAlignTable" | "menuNameTableAlignTableLeft" | "menuNameTableAlignTableCenter" | "menuNameTableAlignTableRight"
    @@ -858,7 +858,7 @@

    TableEditDeleteMenuItemStringKey

    TableEditDeleteMenuItemStringKey: "menuNameTableDelete" | "menuNameTableDeleteTable" | "menuNameTableDeleteColumn" | "menuNameTableDeleteRow"
    @@ -873,7 +873,7 @@

    TableEditInsertMenuItemStringKey

    TableEditInsertMenuItemStringKey: "menuNameTableInsert" | "menuNameTableInsertAbove" | "menuNameTableInsertBelow" | "menuNameTableInsertLeft" | "menuNameTableInsertRight"
    @@ -888,7 +888,7 @@

    TableEditMenuItemStringKey

    @@ -911,7 +911,7 @@

    TableEditMergeMenuItemStringKey

    TableEditMergeMenuItemStringKey: "menuNameTableMerge" | "menuNameTableMergeAbove" | "menuNameTableMergeBelow" | "menuNameTableMergeLeft" | "menuNameTableMergeRight" | "menuNameTableMergeCells" | MenuItemSplitterKey0
    @@ -926,7 +926,7 @@

    TableEditShadeMenuItemStringKey

    TableEditShadeMenuItemStringKey: "menuNameTableCellShade" | BackgroundColorKeys
    @@ -941,7 +941,7 @@

    TableEditSplitMenuItemStringKey

    TableEditSplitMenuItemStringKey: "menuNameTableSplit" | "menuNameTableSplitHorizontally" | "menuNameTableSplitVertically"
    @@ -956,7 +956,7 @@

    TextColorButtonStringKey

    TextColorButtonStringKey: "buttonNameTextColor" | TextColorKeys
    @@ -971,7 +971,7 @@

    TextColorKeys

    TextColorKeys: "textColorLightBlue" | "textColorLightGreen" | "textColorLightYellow" | "textColorLightOrange" | "textColorLightRed" | "textColorLightPurple" | "textColorBlue" | "textColorGreen" | "textColorYellow" | "textColorOrange" | "textColorRed" | "textColorPurple" | "textColorDarkBlue" | "textColorDarkGreen" | "textColorDarkYellow" | "textColorDarkOrange" | "textColorDarkRed" | "textColorDarkPurple" | "textColorDarkerBlue" | "textColorDarkerGreen" | "textColorDarkerYellow" | "textColorDarkerOrange" | "textColorDarkerRed" | "textColorDarkerPurple" | "textColorWhite" | "textColorLightGray" | "textColorGray" | "textColorDarkGray" | "textColorDarkerGray" | "textColorBlack"
    @@ -986,7 +986,7 @@

    UnderlineButtonStringKey

    UnderlineButtonStringKey: "buttonNameUnderline"
    @@ -1001,7 +1001,7 @@

    UndoButtonStringKey

    UndoButtonStringKey: "buttonNameUndo"
    @@ -1019,7 +1019,7 @@

    Const AllButtonKeys

    AllButtonKeys: KnownRibbonButtonKey[] = ...
    @@ -1041,7 +1041,7 @@

    Ribbon

  • @@ -1079,7 +1079,7 @@

    Rooster

  • @@ -1111,7 +1111,7 @@

    createContextMenuPlugin

  • @@ -1133,7 +1133,7 @@

    createContextMenuProvider

  • @@ -1215,7 +1215,7 @@

    createEmojiPlugin

  • @@ -1243,7 +1243,7 @@

    createImageEditMenuProvider

  • @@ -1275,7 +1275,7 @@

    createListEditMenuProvider

  • @@ -1304,7 +1304,7 @@

    createPasteOptionPlugin

  • @@ -1342,7 +1342,7 @@

    createRibbonPlugin

  • @@ -1373,7 +1373,7 @@

    createTableEditMenuProvider

  • @@ -1402,7 +1402,7 @@

    createUIUtilities

  • @@ -1440,7 +1440,7 @@

    createUpdateContentPlugin

  • @@ -1498,7 +1498,7 @@

    getBackgroundColorValue

  • @@ -1530,7 +1530,7 @@

    getButtons

  • @@ -1568,7 +1568,7 @@

    getLocalizedString

  • @@ -1621,7 +1621,7 @@

    getTextColorValue

  • diff --git a/rooster-min.js b/rooster-min.js index f712f7a1bf1..ee249310ac2 100644 --- a/rooster-min.js +++ b/rooster-min.js @@ -1,2 +1,2 @@ -var roosterjs;(()=>{var e={8168:(e,t,n)=>{var r=n(8874),o={};for(var i in r)r.hasOwnProperty(i)&&(o[r[i]]=i);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var l in a)if(a.hasOwnProperty(l)){if(!("channels"in a[l]))throw new Error("missing channels property: "+l);if(!("labels"in a[l]))throw new Error("missing channel labels property: "+l);if(a[l].labels.length!==a[l].channels)throw new Error("channel and label counts mismatch: "+l);var s=a[l].channels,u=a[l].labels;delete a[l].channels,delete a[l].labels,Object.defineProperty(a[l],"channels",{value:s}),Object.defineProperty(a[l],"labels",{value:u})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),l=Math.max(r,o,i),s=l-a;return l===a?t=0:r===l?t=(o-i)/s:o===l?t=2+(i-r)/s:i===l&&(t=4+(r-o)/s),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+l)/2,[t,100*(l===a?0:n<=.5?s/(l+a):s/(2-l-a)),100*n]},a.rgb.hsv=function(e){var t,n,r,o,i,a=e[0]/255,l=e[1]/255,s=e[2]/255,u=Math.max(a,l,s),d=u-Math.min(a,l,s),c=function(e){return(u-e)/6/d+.5};return 0===d?o=i=0:(i=d/u,t=c(a),n=c(l),r=c(s),a===u?o=r-n:l===u?o=1/3+t-r:s===u&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*u]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-o)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=o[e];if(t)return t;var n,i,a,l=1/0;for(var s in r)if(r.hasOwnProperty(s)){var u=(i=e,a=r[s],Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)+Math.pow(i[2]-a[2],2));u.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},a.hsl.rgb=function(e){var t,n,r,o,i,a=e[0]/360,l=e[1]/100,s=e[2]/100;if(0===l)return[i=255*s,i,i];t=2*s-(n=s<.5?s*(1+l):s+l-s*l),o=[0,0,0];for(var u=0;u<3;u++)(r=a+1/3*-(u-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[u]=255*i;return o},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=i<=1?i:2-i,[t,100*(0===r?2*o/(i+o):2*n/(r+n)),(r+n)/2*100]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),l=255*r*(1-n*i),s=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,s,a];case 1:return[l,r,a];case 2:return[a,r,s];case 3:return[a,l,r];case 4:return[s,a,r];case 5:return[r,a,l]}},a.hsv.hsl=function(e){var t,n,r,o=e[0],i=e[1]/100,a=e[2]/100,l=Math.max(a,.01);return r=(2-i)*a,n=i*l,[o,100*(n=(n/=(t=(2-i)*l)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,o,i,a,l,s=e[0]/360,u=e[1]/100,d=e[2]/100,c=u+d;switch(c>1&&(u/=c,d/=c),r=6*s-(t=Math.floor(6*s)),0!=(1&t)&&(r=1-r),o=u+r*((n=1-d)-u),t){default:case 6:case 0:i=n,a=o,l=u;break;case 1:i=o,a=n,l=u;break;case 2:i=u,a=n,l=o;break;case 3:i=u,a=o,l=n;break;case 4:i=o,a=u,l=n;break;case 5:i=n,a=u,l=o}return[255*i,255*a,255*l]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},a.xyz.rgb=function(e){var t,n,r,o=e[0]/100,i=e[1]/100,a=e[2]/100;return n=-.9689*o+1.8758*i+.0415*a,r=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),a=Math.pow(t,3),l=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=l>.008856?l:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],o=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(i+=60),i},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.max(Math.max(n,r),o),a=Math.min(Math.min(n,r),o),l=i-a;return t=l<=0?0:i===n?(r-o)/l%6:i===r?2+(o-n)/l:4+(n-r)/l+4,t/=6,[360*(t%=1),100*l,100*(l<1?a/(1-l):0)]},a.hsl.hcg=function(e){var t,n=e[1]/100,r=e[2]/100,o=0;return(t=r<.5?2*n*r:2*n*(1-r))<1&&(o=(r-.5*t)/(1-t)),[e[0],100*t,100*o]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,i=[0,0,0],a=t%1*6,l=a%1,s=1-l;switch(Math.floor(a)){case 0:i[0]=1,i[1]=l,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=l;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=l,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return o=(1-n)*r,[255*(n*i[0]+o),255*(n*i[1]+o),255*(n*i[2]+o)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},2085:(e,t,n)=>{var r=n(8168),o=n(4111),i={};Object.keys(r).forEach((function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:r[e].channels}),Object.defineProperty(i[e],"labels",{value:r[e].labels});var t=o(e);Object.keys(t).forEach((function(n){var r=t[n];i[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,o=0;o1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=i},4111:(e,t,n)=>{var r=n(8168);function o(e,t){return function(n){return t(e(n))}}function i(e,t){for(var n=[t[e].parent,e],i=r[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),i=o(r[t[a].parent][a],i),a=t[a].parent;return i.conversion=n,i}e.exports=function(e){for(var t=function(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,o=0;o{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},9818:(e,t,n)=>{var r=n(8874),o=n(6851),i={};for(var a in r)r.hasOwnProperty(a)&&(i[r[a]]=a);var l=e.exports={to:{},get:{}};function s(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}l.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=l.get.hsl(e),n="hsl";break;case"hwb":t=l.get.hwb(e),n="hwb";break;default:t=l.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},l.get.rgb=function(e){if(!e)return null;var t,n,o,i=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(t.slice(a,a+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)i[n]=parseInt(t[n]+t[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(t[n+1],0);t[4]&&(i[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(t=e.match(/(\D+)/))?"transparent"===t[1]?[0,0,0,0]:(i=r[t[1]])?(i[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(i[3]=parseFloat(t[4]))}for(n=0;n<3;n++)i[n]=s(i[n],0,255);return i[3]=s(i[3],0,1),i},l.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])+360)%360,s(parseFloat(t[2]),0,100),s(parseFloat(t[3]),0,100),s(isNaN(n)?1:n,0,1)]}return null},l.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,s(parseFloat(t[2]),0,100),s(parseFloat(t[3]),0,100),s(isNaN(n)?1:n,0,1)]}return null},l.to.hex=function(){var e=o(arguments);return"#"+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):"")},l.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},l.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},l.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},l.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},l.to.keyword=function(e){return i[e.slice(0,3)]}},6767:(e,t,n)=>{"use strict";var r=n(9818),o=n(2085),i=[].slice,a=["keyword","gray","hex"],l={};Object.keys(o).forEach((function(e){l[i.call(o[e].labels).sort().join("")]=e}));var s={};function u(e,t){if(!(this instanceof u))return new u(e,t);if(t&&t in a&&(t=null),t&&!(t in o))throw new Error("Unknown model: "+t);var n,d;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof u)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"==typeof e){var c=r.get(e);if(null===c)throw new Error("Unable to parse color from string: "+e);this.model=c.model,d=o[this.model].channels,this.color=c.value.slice(0,d),this.valpha="number"==typeof c.value[d]?c.value[d]:1}else if(e.length){this.model=t||"rgb",d=o[this.model].channels;var p=i.call(e,0,d);this.color=f(p,d),this.valpha="number"==typeof e[d]?e[d]:1}else if("number"==typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var v=Object.keys(e);"alpha"in e&&(v.splice(v.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var h=v.sort().join("");if(!(h in l))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=l[h];var g=o[this.model].labels,m=[];for(n=0;nn?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return u.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,i=2*o-1,a=n.alpha()-r.alpha(),l=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return u.rgb(l*n.red()+s*r.red(),l*n.green()+s*r.green(),l*n.blue()+s*r.blue(),n.alpha()*o+r.alpha()*(1-o))}},Object.keys(o).forEach((function(e){if(-1===a.indexOf(e)){var t=o[e].channels;u.prototype[e]=function(){if(this.model===e)return new u(this);if(arguments.length)return new u(arguments,e);var n,r="number"==typeof arguments[t]?t:this.valpha;return new u((n=o[this.model][e].raw(this.color),Array.isArray(n)?n:[n]).concat(r),e)},u[e]=function(n){return"number"==typeof n&&(n=f(i.call(arguments),t)),new u(n,e)}}})),e.exports=u},5171:e=>{e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},6851:(e,t,n)=>{"use strict";var r=n(5171),o=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDarkColor=void 0;var r=n(6134);Object.defineProperty(t,"getDarkColor",{enumerable:!0,get:function(){return r.default}})},6134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6767);t.default=function(e,t){void 0===t&&(t=21.247);try{var n=r(e||void 0),o=n.lab().array(),i=(100-o[0])*((100-t)/100)+t;e=r.lab(i,o[1],o[2]).rgb().alpha(n.alpha()).toString()}catch(e){}return e}},8106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9069),o=n(6344);t.default=function(e,t,n){function i(e,n){if(null===e)return e;switch(t){case"lowercase":return e.toLocaleLowerCase(n);case"uppercase":return e.toLocaleUpperCase(n);case"capitalize":for(var r=e.toLocaleLowerCase(n).split(" "),o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNewFontSize=t.FONT_SIZES=void 0;var r=n(9069),o=n(6344);t.FONT_SIZES=[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72];function i(e,t,n){e=1==t?Math.floor(e):Math.ceil(e);var r=n[n.length-1];if(e<=n[0])e=Math.max(e+t,1);else if(e>r||e==r&&1==t)e/=10,e=1==t?Math.floor(e):Math.ceil(e),e=Math.min(Math.max(10*(e+t),r),1e3);else if(1==t){for(var o=0;o=0;o--)if(e>n[o]){e=n[o];break}return e}t.default=function(e,n,a){void 0===a&&(a=t.FONT_SIZES);var l=0==n?1:-1;(0,r.default)(e,(function(e){var t=parseFloat((0,o.getComputedStyle)(e,"font-size")||e.style.fontSize);e.style.fontSize=i(t,l,a)+"pt";var n=(0,o.getComputedStyle)(e,"line-height");n&&"normal"!=n&&(e.style.lineHeight="normal")}),"changeFontSize")},t.getNewFontSize=i},4234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4040);t.default=function(e){(0,r.default)(e,1)}},4040:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4485),i=n(9703),a=n(9733),l=n(4077),s=n(6304),u=n(690),d=n(9339),c=n(8683),f=n(6823),p=n(926),v=n(3275),h=n(6344),g=["font","text-decoration","color","background"],m="B,I,U,STRONG,EM,SUB,SUP,STRIKE,FONT,CENTER,H1,H2,H3,H4,H5,H6,UL,OL,LI,SPAN,P,BLOCKQUOTE,CODE,S,PRE".split(","),y=["href","src","cellpadding","cellspacing"],b=["TD","TH","TR","TABLE","TBODY","THEAD"];function C(e){var t=(0,h.toArray)(e.childNodes).map(C).every((function(e){return e})),n=(0,h.isBlockElement)(e),o=(0,h.getTagOfNode)(e);return o&&(m.indexOf(o)>=0||t&&!(0,h.isVoidHtmlElement)(e)&&b.indexOf(o)<0?(n&&!t&&(0,h.wrap)(e),(0,h.unwrap)(e)):function(e){var t,n,o=(0,h.safeInstanceOf)(e,"HTMLTableCellElement"),i=(0,h.safeInstanceOf)(e,"HTMLTableElement");try{for(var a=(0,r.__values)((0,h.toArray)(e.attributes)),l=a.next();!l.done;l=a.next()){var s=l.value;o&&"style"==s.name?S(e):i&&"style"==s.name?T(e):y.indexOf(s.name.toLowerCase())<0&&0!=s.name.indexOf("data-")&&e.removeAttribute(s.name)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}(e)),n}function E(e,t){var n=(0,h.getStyles)(e),r={};return(0,h.getObjectKeys)(n).forEach((function(e){return t(e,n,r)})),(0,h.setStyles)(e,n),r}function S(e){return E(e,(function(e,t,n){e.indexOf("border")<0&&(n[e]=t[e],delete t[e])}))}function T(e){return E(e,(function(e,t,n){"border-collapse"!=e&&(n[e]=t[e],delete t[e])}))}function P(e){(0,l.default)(e,(function(){(0,i.default)(e,(function(t){var n=(0,h.getSelectedBlockElementsInRegion)(t),r=(0,h.collapseNodesInRegion)(t,n);if(e.contains(t.rootNode)){var o=S(t.rootNode);if((0,h.getObjectKeys)(o).length>0){var i=(0,h.wrap)((0,h.toArray)(t.rootNode.childNodes));(0,h.setStyles)(i,o)}}for(;r.length>0&&r[0].parentNode&&(0,h.isNodeInRegion)(t,r[0].parentNode);){var a=(0,h.splitBalancedNodeRange)(r);r=a?[a]:[]}r.forEach(C)})),w(e)}),"clearBlockFormat")}function w(e){var t=e.getDefaultFormat(),n=0===(0,h.getObjectKeys)(t).length;if(e.queryElements("[style]",2,(function(e){var t=(0,h.getTagOfNode)(e);-1==b.indexOf(t)?_(t,e,n):e.childNodes.forEach((function(e){e.childNodes.forEach((function(e){var t=(0,h.getTagOfNode)(e);(0,h.safeInstanceOf)(e,"HTMLElement")&&_(t,e,n)}))}))})),!n){if(t.fontFamily&&(0,u.default)(e,t.fontFamily),t.fontSize&&(0,d.default)(e,t.fontSize),t.textColor){var r=e.queryElements("a *, a",1),i=r.length>0?function(e){return-1==r.indexOf(e)}:void 0;t.textColors?(0,c.default)(e,t.textColors,i):(0,c.default)(e,t.textColor,i)}t.backgroundColor&&(t.backgroundColors?(0,s.default)(e,t.backgroundColors):(0,s.default)(e,t.backgroundColor)),t.bold?(0,f.default)(e):function(e,t){void 0===t&&(t="400"),(0,o.default)(e,"font-weight",(function(e){return e.style.fontWeight=t}),"setDefaultFontWeight")}(e),t.italic&&(0,p.default)(e),t.underline&&(0,v.default)(e)}}function _(e,t,n){-1==b.indexOf(e)&&(g.forEach((function(e){return t.style.removeProperty(e)})),n&&""===t.getAttribute("style")&&t.removeAttribute("style"))}function O(e,t){switch(void 0===t&&(t=0),t){case 0:!function(e){e.focus(),e.addUndoSnapshot((function(){return(0,a.default)(e,"removeFormat"),e.queryElements("[class]",1,(function(e){return e.removeAttribute("class")})),w(e),"clearInlineFormat"}),"Format")}(e);break;case 1:P(e);break;default:!function(e){var t=function(e){var t=e.getSelectionTraverser();return!!(null==t?void 0:t.currentBlockElement)&&!!(null==t?void 0:t.getNextBlockElement())}(e);if(!t){var n=e.getSelectionTraverser(),r=null==n?void 0:n.currentInlineElement,o=r instanceof h.PartialInlineElement||r instanceof h.NodeInlineElement&&!function(e,t){for(var n,r=e,o=function(){if(r.nextSibling||r.previousSibling){if((0,h.safeInstanceOf)(r,"HTMLLIElement"))return{value:!0};var e=!0;return null===(n=r.parentNode)||void 0===n||n.childNodes.forEach((function(t){var n;t!=r&&(null===(n=t.textContent)||void 0===n?void 0:n.length)&&(e=!1)})),{value:e}}r=r.parentNode};r&&t.contains(r.parentNode);){var i=o();if("object"==typeof i)return i.value}return!0}(r.getContainerNode(),e);if(o)return void O(e)}P(e)}(e)}}t.default=O},2149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=/^[a-zA-Z]+:/i,i=/^[\w.%+-]+@/i,a=/^ftp\./i;function l(e){return e.queryElements("a[href]",1)[0]}function s(e,t){t&&e.textContent!=t&&(e.textContent=t)}t.default=function(e,t,n,u,d){e.focus();var c=(function(e){var t=new r.HtmlSanitizer,n=document.createElement("a");return n.href=e||"",t.sanitize(n),n.getAttribute("href")}(t)||"").trim();if(c){var f=(0,r.matchLink)(c),p=f?f.normalizedUrl:function(e){if(!e)return e;var t="";return e.search(o)<0&&(t=0==e.search(i)?"mailto:":0==e.search(a)?"ftp://":"http://"),t+e}(c),v=f?f.originalUrl:c;e.addUndoSnapshot((function(){var t=e.getSelectionRangeEx(),o=null;if(0===t.type){var i=t.ranges[0];if(i&&i.collapsed)(o=l(e))?(o.href=p,s(o,u)):((o=e.getDocument().createElement("A")).textContent=u||v,o.href=p,e.insertNode(o));else{e.getDocument().execCommand("createLink",!1,p);for(var a=e.getSelectionTraverser(),c=null==a?void 0:a.getNextInlineElement(),f=[];c;)f.push(c.getContainerNode()),c=null==a?void 0:a.getNextInlineElement();f.forEach((function(t){return e.deleteNode(t)})),s(o=l(e),u)}}else 2===t.type&&((o=(0,r.wrap)(t.image,"A")).href=p);return n&&o&&(o.title=n),o&&function(e,t){t?e.target=t:!t&&e.getAttribute("target")&&e.removeAttribute("target")}(o,d),o}),"CreateLink")}}},3956:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementBasedFormatState=void 0;var r=n(7582),o=n(6344);function i(e,t){var n=(0,o.getTagOfNode)(e.getElementAtCursor("OL,UL",void 0,t)),r=e.getSelectionRange(),i=!1;if(r&&!r.collapsed){var l=e.getBlockElementAtNode(r.startContainer),s=e.getBlockElementAtNode(r.endContainer);i=!(!s||!l||s.equals(l))}var u=(0,o.getTagOfNode)(e.getElementAtCursor("H1,H2,H3,H4,H5,H6",void 0,t)),d=e.queryElements("table",1)[0],c=d?(0,o.getTableFormatInfo)(d):void 0,f=(null==d?void 0:d.rows[0])?(0,o.toArray)(d.rows[0].cells).every((function(e){return"TH"==(0,o.getTagOfNode)(e)})):void 0;return{isBullet:"UL"==n,isNumbering:"OL"==n,isMultilineSelection:i,headerLevel:u&&parseInt(u[1])||0,canUnlink:!!e.queryElements("a[href]",1)[0],canAddImageAltText:!!e.queryElements("img",1)[0],isBlockQuote:!!e.queryElements("blockquote",1)[0],isCodeInline:!!e.queryElements("code",1)[0],isCodeBlock:!!e.queryElements("pre>code",1)[0],isInTable:!!d,tableFormat:c||{},tableHasHeader:f,canMergeTableCell:a(e)}}t.getElementBasedFormatState=i,t.default=function(e,t){return(0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)({},e.getPendableFormatState(!1)),i(e,t)),e.getStyleBasedFormatState()),e.getUndoState()),{isDarkMode:e.isDarkMode(),zoomScale:e.getZoomScale()})};var a=function(e){var t=e.getSelectionRangeEx();if(t&&1===t.type&&t.coordinates){var n=t.coordinates,r=n.firstCell,o=n.lastCell;return r.x!==o.x||r.y!==o.y}return!1}},9540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),o=n(6344);t.default=function(e,t,n,i,a,l,s,u){var d,c=(0,o.wrap)(n,i?"div":"span");if(!i&&a&&(c.style.display="inline-block"),(0,o.commitEntity)(c,t,a),!e.contains(c)){var f=null,p=void 0;if("number"==typeof l)p=l;else if(l){f=e.getSelectionRange();var v=l.normalize().node,h=v&&e.getElementAtCursor((0,o.getEntitySelector)(),v);h&&(l=new o.Position(h,-3)),e.select(l),p=3}else e.focus(),p=3;var g=s&&e.getSelectedRegions(),m=g&&o.VListChain.createListChains(g);e.insertNode(c,{updateCursor:!1,insertOnNewLine:i,replaceSelection:!0,position:p,insertToRegionRoot:s}),m&&(0,r.default)(e,m),3==p&&(f?e.select(f):i||e.select(c,-3))}var y=(0,o.getEntityFromElement)(c);if(i){var b=(0,o.createElement)(1,e.getDocument());if(null===(d=c.parentNode)||void 0===d||d.insertBefore(b,c.nextSibling),b&&(0,o.applyFormat)(b,e.getDefaultFormat(),e.isDarkMode(),e.getDarkColorHandler()),u){var C=null==b?void 0:b.querySelector("br"),E=C&&new o.Position(C,-2);E&&e.select(E)}}else a&&e.isFeatureEnabled("InlineEntityReadOnlyDelimiters")&&((0,o.addDelimiters)(y.wrapper),y.wrapper.nextElementSibling&&e.select(new o.Position(y.wrapper.nextElementSibling,-3)));return e.triggerContentChangedEvent("InsertEntity",y),y}},7239:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);function i(e,t,n){(0,r.default)(e,(function(){var r=e.getDocument().createElement("img");r.src=t,n&&(0,o.getObjectKeys)(n).forEach((function(e){return r.setAttribute(e,n[e])})),e.insertNode(r)}),"insertImage")}t.default=function(e,t,n){"string"==typeof t?i(e,t,n):(0,o.readFile)(t,(function(t){t&&!e.isDisposed()&&i(e,t,n)}))}},2633:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e){e.focus(),(0,r.default)(e,(function(t,n){e.queryElements("a[href]",1,o.unwrap),t&&n&&e.select(t,n)}),"removeLink")}},7758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){var i,a,l;if(!t||!n)return!1;if(l="string"==typeof t?null!==(a=null==(o=null!==(i=o||e.getContentSearcherOfCursor())&&void 0!==i?i:void 0)?void 0:o.getRangeFromText(t,r))&&void 0!==a?a:null:t){var s=e.getSelectionRange();return(null==s?void 0:s.collapsed)&&l.endContainer==s.startContainer&&l.endOffset==s.startOffset&&(r=!0),e.insertNode(n,{position:5,updateCursor:r,replaceSelection:!0,insertOnNewLine:!1,range:l}),!0}return!1}},6827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077);t.default=function(e,t,n){t&&(0,r.default)(e,(function(){t.style.transform="rotate("+n+"deg)"}),"rotateElement")}},2391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(9733),i=n(4077),a=n(6577),l=n(6344);t.default=function(e,t){(0,i.default)(e,(function(){var n,i=e.getSelectionRangeEx(),s=i&&1===i.type,u=e.getElementAtCursor();s&&i.coordinates&&(0,l.isWholeTableSelected)(new l.VTable(i.table),i.coordinates)?function(e,t){var n=e.table;1==t?(n.style.marginLeft="auto",n.style.marginRight="auto"):2==t?(n.style.marginLeft="auto",n.style.marginRight=""):(n.style.marginLeft="",n.style.marginRight="auto")}(i,t):u&&(n=u,(0,l.findClosestElementAncestor)(n,void 0,"LI"))?function(e,t){(0,r.default)(e,(function(e,n,r){var o=(0,l.getSelectedBlockElementsInRegion)(e)[0].getStartNode(),i=(0,l.createVListFromRegion)(e,!0,o);n&&r&&(null==i||i.setAlignment(n,r,t))}),void 0,"alignList")}(e,t):function(e,t){var n="left",r="justifyLeft";1==t?(r="justifyCenter",n="center"):2==t&&(r="justifyRight",n="right"),(0,o.default)(e,r);var i=e.queryElements("[align]",1,(function(e){e.style.textAlign=n,(0,a.default)(e)}));if(0==i.length){var l=e.getElementAtCursor();l&&(0,a.default)(l)}}(e,t)}),"setAlignment")}},6304:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9069),o=n(6344);t.default=function(e,t){(0,r.default)(e,(function(n,r){(0,o.setColor)(n,r?"":t,!0,e.isDarkMode(),!1,e.getDarkColorHandler())}),"setBackgroundColor")}},9741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5483),o=n(4077);t.default=function(e,t){e.focus(),(0,o.default)(e,(function(n,o){(0,r.default)(e,(function(e){e.setAttribute("dir",0==t?"ltr":"rtl"),e.style.textAlign=0==t?"left":"right"})),n&&o&&e.select(n,o)}),"setDirection")}},690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4485);t.default=function(e,t){(0,r.default)(e,"font-family",(function(e,n){e.style.fontFamily=n?"":t}),"setFontName")}},9339:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4485),o=n(6344);t.default=function(e,t){(0,r.default)(e,"font-size",(function(e,n){e.style.fontSize=n?"":t;var r=(0,o.getComputedStyle)(e,"line-height");r&&"normal"!=r&&(e.style.lineHeight="normal")}),"setFontSize")}},620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077);t.default=function(e,t){e.focus(),(0,r.default)(e,(function(){e.queryElements("img",1,(function(e){return e.setAttribute("alt",t)}))}),"setImageAltText")}},1696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(6577),i=n(6344);function a(e,t){t.forEach((function(t){var n=t.collapseToSingleElement(),r=(0,i.findClosestElementAncestor)(n,e.rootNode,"blockquote");if(r){for(n==r&&(n=(0,i.wrap)((0,i.toArray)(n.childNodes)));n&&(0,i.isNodeInRegion)(e,n)&&"BLOCKQUOTE"!=(0,i.getTagOfNode)(n);)n=(0,i.splitBalancedNodeRange)(n);n&&(0,i.isNodeInRegion)(e,n)&&(0,i.unwrap)(n)}}))}function l(e,t){var n;return(null===(n=e.items[0])||void 0===n?void 0:n.getNode())==t&&e.getListItemIndex(t)==(e.getStart()||1)}function s(e,t,n){return 0==e||t.getElementAtCursor("blockquote",n)}t.default=function(e,t){var n=0==t?function(e,t){var n=(0,i.collapseNodesInRegion)(e,t);(0,i.wrap)(n,2);var r=[];n.forEach((function(e){return(0,o.default)(e,r)}))}:a;(0,r.default)(e,(function(r,o,a){for(var u=(0,i.getSelectedBlockElementsInRegion)(r,!0),d=[[]],c=0;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){void 0===n&&(n=1),(0,r.default)(e,(function(){e.focus();var r=e.getSelectedRegions();if(r[0]){var i=(0,o.createVListFromRegion)(r[0],!1,t);i&&(i.split(t,n),i.writeBack(e.isFeatureEnabled("ReuseAllAncestorListElements"),e.isFeatureEnabled("DisableListChain")))}}),"setOrderedListNumbering")}},8683:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4485),o=n(6344);t.default=function(e,t,n){(0,r.default)(e,"color",(function(r,i){n&&!n(r)||(0,o.setColor)(r,i?"":t,!1,e.isDarkMode(),!1,e.getDarkColorHandler())}),"setTextColor")}},5936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(949),o=n(6344),i=function(e){e.style.borderLeft="3px solid",e.style.borderColor="#C8C8C8",e.style.paddingLeft="10px",e.style.color="#666666"};t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,"blockquote");(t||i)(n)}),(function(){return 0==e.queryElements("blockquote",1,o.unwrap).length}),"toggleBlockQuote")}},6823:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"bold","toggleBold")}},2473:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5367);t.default=function(e,t,n){(0,r.default)(e,2,void 0,!1,void 0,t,n)}},8761:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(949),o=n(6344),i="code",a="pre>"+i;t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,i),r=(0,o.wrap)(n,"pre");null==t||t(r)}),(function(){return 0==e.queryElements(a,1,(function(e){if(!e.previousSibling&&!e.nextSibling){var t=e.parentNode;(0,o.unwrap)(e),t&&(0,o.unwrap)(t)}})).length}),"toggleCodeBlock")}},8227:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t){t=Math.min(Math.max(Math.round(t),0),6),(0,r.default)(e,(function(){e.focus();var n=!1;if(e.queryElements("H1,H2,H3,H4,H5,H6",1,(function(t){n||(e.getDocument().execCommand("formatBlock",!1,"
    "),n=!0);var r=e.getDocument().createElement("div");(0,o.moveChildNodes)(r,t),e.replaceNode(t,r)})),t>0){for(var r=e.getSelectionTraverser(),i=null==r?void 0:r.currentBlockElement,a=new o.HtmlSanitizer({cssStyleCallbacks:{"font-size":function(){return!1}}});i;){var l=i.collapseToSingleElement();a.sanitize(l),i=null==r?void 0:r.getNextBlockElement()}e.getDocument().execCommand("formatBlock",!1,"")}}),"toggleHeader")}},926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"italic","toggleItalic")}},5485:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5367);t.default=function(e,t,n,o){(0,r.default)(e,1,t,void 0,n,void 0,o)}},2809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"strikeThrough","toggleStrikethrough")}},9752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"subscript","toggleSubscript")}},9282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"superscript","toggleSuperscript")}},3275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"underline","toggleUnderline")}},4548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentCommitListChains=t.commitListChains=t.blockFormat=t.toggleListType=t.applyCellShading=t.toggleHeader=t.toggleUnderline=t.toggleSuperscript=t.toggleSubscript=t.toggleStrikethrough=t.toggleCodeBlock=t.toggleBlockQuote=t.setOrderedListNumbering=t.toggleNumbering=t.toggleItalic=t.toggleBullet=t.toggleBold=t.changeCapitalization=t.setIndentation=t.setImageAltText=t.setFontSize=t.setFontName=t.setDirection=t.setTextColor=t.setBackgroundColor=t.setAlignment=t.rotateElement=t.replaceWithNode=t.removeLink=t.formatTable=t.editTable=t.insertTable=t.insertImage=t.insertEntity=t.getElementBasedFormatState=t.getFormatState=t.createLink=t.clearFormat=t.clearBlockFormat=t.FONT_SIZES=t.changeFontSize=void 0;var r=n(5177);Object.defineProperty(t,"changeFontSize",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"FONT_SIZES",{enumerable:!0,get:function(){return r.FONT_SIZES}});var o=n(4234);Object.defineProperty(t,"clearBlockFormat",{enumerable:!0,get:function(){return o.default}});var i=n(4040);Object.defineProperty(t,"clearFormat",{enumerable:!0,get:function(){return i.default}});var a=n(2149);Object.defineProperty(t,"createLink",{enumerable:!0,get:function(){return a.default}});var l=n(3956);Object.defineProperty(t,"getFormatState",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"getElementBasedFormatState",{enumerable:!0,get:function(){return l.getElementBasedFormatState}});var s=n(9540);Object.defineProperty(t,"insertEntity",{enumerable:!0,get:function(){return s.default}});var u=n(7239);Object.defineProperty(t,"insertImage",{enumerable:!0,get:function(){return u.default}});var d=n(6725);Object.defineProperty(t,"insertTable",{enumerable:!0,get:function(){return d.default}});var c=n(5443);Object.defineProperty(t,"editTable",{enumerable:!0,get:function(){return c.default}});var f=n(3242);Object.defineProperty(t,"formatTable",{enumerable:!0,get:function(){return f.default}});var p=n(2633);Object.defineProperty(t,"removeLink",{enumerable:!0,get:function(){return p.default}});var v=n(7758);Object.defineProperty(t,"replaceWithNode",{enumerable:!0,get:function(){return v.default}});var h=n(6827);Object.defineProperty(t,"rotateElement",{enumerable:!0,get:function(){return h.default}});var g=n(2391);Object.defineProperty(t,"setAlignment",{enumerable:!0,get:function(){return g.default}});var m=n(6304);Object.defineProperty(t,"setBackgroundColor",{enumerable:!0,get:function(){return m.default}});var y=n(8683);Object.defineProperty(t,"setTextColor",{enumerable:!0,get:function(){return y.default}});var b=n(9741);Object.defineProperty(t,"setDirection",{enumerable:!0,get:function(){return b.default}});var C=n(690);Object.defineProperty(t,"setFontName",{enumerable:!0,get:function(){return C.default}});var E=n(9339);Object.defineProperty(t,"setFontSize",{enumerable:!0,get:function(){return E.default}});var S=n(620);Object.defineProperty(t,"setImageAltText",{enumerable:!0,get:function(){return S.default}});var T=n(1696);Object.defineProperty(t,"setIndentation",{enumerable:!0,get:function(){return T.default}});var P=n(8106);Object.defineProperty(t,"changeCapitalization",{enumerable:!0,get:function(){return P.default}});var w=n(6823);Object.defineProperty(t,"toggleBold",{enumerable:!0,get:function(){return w.default}});var _=n(2473);Object.defineProperty(t,"toggleBullet",{enumerable:!0,get:function(){return _.default}});var O=n(926);Object.defineProperty(t,"toggleItalic",{enumerable:!0,get:function(){return O.default}});var M=n(5485);Object.defineProperty(t,"toggleNumbering",{enumerable:!0,get:function(){return M.default}});var D=n(8073);Object.defineProperty(t,"setOrderedListNumbering",{enumerable:!0,get:function(){return D.default}});var L=n(5936);Object.defineProperty(t,"toggleBlockQuote",{enumerable:!0,get:function(){return L.default}});var R=n(8761);Object.defineProperty(t,"toggleCodeBlock",{enumerable:!0,get:function(){return R.default}});var A=n(2809);Object.defineProperty(t,"toggleStrikethrough",{enumerable:!0,get:function(){return A.default}});var I=n(9752);Object.defineProperty(t,"toggleSubscript",{enumerable:!0,get:function(){return I.default}});var x=n(9282);Object.defineProperty(t,"toggleSuperscript",{enumerable:!0,get:function(){return x.default}});var N=n(3275);Object.defineProperty(t,"toggleUnderline",{enumerable:!0,get:function(){return N.default}});var k=n(8227);Object.defineProperty(t,"toggleHeader",{enumerable:!0,get:function(){return k.default}});var j=n(7622);Object.defineProperty(t,"applyCellShading",{enumerable:!0,get:function(){return j.default}});var B=n(5367);Object.defineProperty(t,"toggleListType",{enumerable:!0,get:function(){return B.default}});var F=n(9703);Object.defineProperty(t,"blockFormat",{enumerable:!0,get:function(){return F.default}});var H=n(19);Object.defineProperty(t,"commitListChains",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,"experimentCommitListChains",{enumerable:!0,get:function(){return H.experimentCommitListChains}})},7622:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t){e.focus(),(0,r.default)(e,(function(){e.getSelectedRegions().forEach((function(n){(0,o.safeInstanceOf)(n.rootNode,"HTMLTableCellElement")&&((0,o.setColor)(n.rootNode,t,!0,e.isDarkMode(),!0,e.getDarkColorHandler()),(0,o.saveTableCellMetadata)(n.rootNode,{bgColorOverride:!0}))}))}),"applyCellShading")}},5443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);function i(e){return null==e}t.default=function(e,t){var n=e.getElementAtCursor("TD,TH");n&&(0,r.default)(e,(function(){var r=new o.VTable(n);if(function(e,t){var n,r=e.getSelectionRangeEx();r&&1===r.type&&(t.selection=null!==(n=r.coordinates)&&void 0!==n?n:null)}(e,r),r.edit(t),r.writeBack(!1,e.getDarkColorHandler()),e.transformToDarkColor(r.table),e.focus(),!i(r.row)&&!i(r.col)){var a=function(e,t,n){var r=t,o=n;switch(e){case 0:o=0;break;case 1:r+=1,o=0;break;case 2:r=0;break;case 3:r=0,o+=1}return{newRow:r,newCol:o}}(t,r.row,r.col),l=a.newCol,s=a.newRow,u=r.getCell(s,l).td;u&&e.select(u,0)}}),"editTable")}},3242:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){(n=n||e.getElementAtCursor("TABLE"))&&(0,r.default)(e,(function(r,i){if(n){var a=new o.VTable(n);a.applyFormat(t),a.writeBack(!1,e.getDarkColorHandler()),e.transformToDarkColor(a.table),e.focus(),r&&i&&e.select(r,i)}}),"formatTable")}},6725:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6304),i=n(6344);function a(e){return e<=4?"120px":e<=6?"100px":"70px"}t.default=function(e,t,n,l){var s=e.getDocument(),u=s.createElement("table");u.cellSpacing="0",u.cellPadding="1";for(var d=0;d{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){e.focus();var i=e.getSelectionRangeEx(),a=function(e,n){return e.isContentEditable&&t(e,n)};if(i&&i.areAllCollapsed){var l=i.ranges[0].startContainer;"SPAN"!=(0,o.getTagOfNode)(l)||l.firstChild&&("BR"!=(0,o.getTagOfNode)(l.firstChild)||l.firstChild.nextSibling)?(e.triggerPluginEvent(13,{formatState:{},formatCallback:t}),e.triggerContentChangedEvent("Format")):(e.addUndoSnapshot(),a(l))}else(0,r.default)(e,(function(){var t,n;i.ranges.forEach((function(r){var o=e.getSelectionTraverser(r);if(o)for(var i=o&&o.currentInlineElement;i;){var l=o.getNextInlineElement();i.applyStyle((function(e,r){a(e,r),t=t||e,n=e})),i=l}})),t&&n&&0==i.type&&e.select(t,-2,n,-3)}),n)}},4485:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9069),o=n(6344);t.default=function(e,t,n,i){var a=[];(0,r.default)(e,(function(t,r){n(t,r);var o=e.getElementAtCursor("LI",t);o&&-1===a.indexOf(o)&&a.push(o)}),i),function(e,t){e.forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLLIElement")&&(0,o.setListItemStyle)(e,t)}))}(a,[t])}},9703:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),o=n(4077),i=n(6344);t.default=function(e,t,n,a){e.focus();var l=e.getSelectionRangeEx();(0,o.default)(e,(function(o,a){if(!n||n()){var s=e.getSelectedRegions();if(s.length>0){var u=i.VListChain.createListChains(s,null==o?void 0:o.node);s.forEach((function(e){return t(e,o,a,u)})),(0,r.default)(e,u)}}0==l.type&&o&&a?e.select(o,a):e.select(l)}),a)}},949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(6344);t.default=function(e,t,n,i){(0,r.default)(e,(function(e){var n=(0,o.getSelectedBlockElementsInRegion)(e,!0),r=(0,o.collapseNodesInRegion)(e,n);if(r.length>0){if(1==r.length){var i=(0,o.getTagOfNode)(r[0]);"BR"==i?r=[(0,o.wrap)(r[0])]:"LI"!=i&&"TD"!=i||(r=(0,o.toArray)(r[0].childNodes))}for(;r[0]&&r[0].parentNode&&(0,o.isNodeInRegion)(e,r[0].parentNode)&&r.some((function(e){return"LI"==(0,o.getTagOfNode)(e)}));){var a=(0,o.splitBalancedNodeRange)(r);r=a?[a]:[]}t(r)}}),n,i)}},5483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);function o(e){var t=e.getStartNode();return t==e.getEndNode()&&3==t.nodeType&&["TR","TABLE"].indexOf((0,r.getTagOfNode)(t.parentNode))>=0}t.default=function(e,t){var n=e.getSelectionTraverser();if(n){for(var r=n.currentBlockElement,i=[];r;)o(r)||i.push(r),r=n.getNextBlockElement();i.forEach((function(e){var n=e.collapseToSingleElement();t(n)}))}}},19:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentCommitListChains=void 0;var r=n(6344);function o(e,t){if((null==t?void 0:t.length)>0){var n=e.getSelectionRange(),o=n&&r.Position.getStart(n),i=n&&r.Position.getEnd(n),a=e.isFeatureEnabled("ReuseAllAncestorListElements"),l=e.isFeatureEnabled("DisableListChain");t.forEach((function(e){return e.commit(a,l)})),o&&i&&e.select(o,i)}}t.default=o,t.experimentCommitListChains=o},9733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){e.focus();var i=function(){return e.getDocument().execCommand(t,!1,void 0)},a=e.getSelectionRangeEx();if(a&&a.areAllCollapsed){e.addUndoSnapshot();var l=e.getPendableFormatState(!1);i();var s=(0,o.getObjectKeys)(o.PendableFormatCommandMap).filter((function(e){return o.PendableFormatCommandMap[e]==t}))[0];s&&(l[s]=!l[s],e.triggerPluginEvent(13,{formatState:l}))}else(0,r.default)(e,(function(){var t=0!=a.type;a.ranges.forEach((function(n){t&&e.select(n),i()})),t&&e.select(a)}),n)}},4077:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){e.addUndoSnapshot(t,"Format",void 0,n&&""!=n?{formatApiName:n}:void 0)}},6577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t){if((0,r.safeInstanceOf)(e,"HTMLElement")){var n=e.style.textAlign,o=(0,r.findClosestElementAncestor)(e,void 0,"blockquote");if(!o)return;var i=(a=e,"rtl"==(0,r.getComputedStyle)(a,"direction")||"rtl"==a.getAttribute("dir"));if(t){if(t.indexOf(o)>-1)return;t.push(o)}for(;o;)"center"==n?i?(o.style.removeProperty("marginInlineEnd"),o.style.marginInlineStart="auto"):(o.style.removeProperty("marginInlineStart"),o.style.marginInlineEnd="auto"):(o.style.removeProperty("marginInlineEnd"),o.style.removeProperty("marginInlineStart")),o=(0,r.findClosestElementAncestor)(o.parentElement,void 0,"blockquote")}var a}},5367:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(6344);t.default=function(e,t,n,i,a,l,s){void 0===n&&(n=0),void 0===i&&(i=!0),(0,r.default)(e,(function(r,s,u,d){var c,f,p=n>0&&d.filter((function(e){return e.canAppendAtCursor(n)}))[0],v=null===(f=(0,o.getBlockElementAtNode)(r.rootNode,null!==(c=null==s?void 0:s.node)&&void 0!==c?c:null))||void 0===f?void 0:f.collapseToSingleElement();if(v){var h=p&&u&&(null==s?void 0:s.equalTo(u))?p.createVListAtBlock(v,n):(0,o.createVListFromRegion)(r,1!==n&&i);h&&s&&u&&(h.changeListType(s,u,t),e.isFeatureEnabled("AutoFormatList")&&h.setListStyleType(a,l),h.writeBack(e.isFeatureEnabled("ReuseAllAncestorListElements"),e.isFeatureEnabled("DisableListChain")))}}),void 0,s||"toggleListType")}},9484:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addUndoSnapshot=void 0;var r=n(7582),o=n(6344);function i(e,t,n){var i;if(!e.lifecycle.shadowEditFragment){var a=e.api.getSelectionRangeEx(e),l=e.lifecycle.isDarkMode,s=function(e,t,n){switch(null==t?void 0:t.type){case 1:return(0,r.__assign)({type:1,tableId:t.table.id,isDarkMode:!!n},t.coordinates);case 2:return{type:2,imageId:t.image.id,isDarkMode:!!n};case 0:return(0,r.__assign)({type:0,isDarkMode:!!n,start:[],end:[]},(0,o.getSelectionPath)(e,t.ranges[0])||{})}}(e.contentDiv,a,l)||null;e.undo.snapshotsService.addSnapshot({html:e.contentDiv.innerHTML,metadata:s,knownColors:(null===(i=e.darkColorHandler)||void 0===i?void 0:i.getKnownColorsCopy())||[],entityStates:n},t),e.undo.hasNewContent=!1}}t.addUndoSnapshot=function(e,t,n,r,a){var l,s,u,d=e.undo,c=d.isNested;c||(d.isNested=!0,!e.undo.hasNewContent&&(null==a?void 0:a.getEntityState)&&t||i(e,r,null===(l=null==a?void 0:a.getEntityState)||void 0===l?void 0:l.call(a)));try{var f;t&&(u=t((f=e.api.getSelectionRange(e,!0))&&o.Position.getStart(f).normalize(),f&&o.Position.getEnd(f).normalize()),c||i(e,!1,null===(s=null==a?void 0:a.getEntityState)||void 0===s?void 0:s.call(a)))}finally{c||(d.isNested=!1)}if(t&&n){var p={eventType:7,source:n,data:u,additionalData:a};e.api.triggerEvent(e,p,!0)}r&&(f=e.api.getSelectionRange(e,!1))&&(e.undo.hasNewContent=!1,e.undo.autoCompletePosition=o.Position.getStart(f))}},9457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachDomEvent=void 0;var r=n(6344);t.attachDomEvent=function(e,t){var n=(0,r.getObjectKeys)(t||{}).map((function(n){var r,o,i=(r=t[n],o={pluginEventType:null,beforeDispatch:null},"number"==typeof r?o.pluginEventType=r:"function"==typeof r?o.beforeDispatch=r:"object"==typeof r&&(o=r),o),a=i.pluginEventType,l=i.beforeDispatch,s=n,u=function(t){l&&l(t),null!=a&&e.api.triggerEvent(e,{eventType:a,rawEvent:t},!1)};return e.contentDiv.addEventListener(s,u),function(){e.contentDiv.removeEventListener(s,u)}}));return function(){return n.forEach((function(e){return e()}))}}},6447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreApiMap=void 0;var r=n(9484),o=n(9457),i=n(3942),a=n(9943),l=n(3221),s=n(5049),u=n(5719),d=n(1467),c=n(2634),f=n(2628),p=n(5149),v=n(1844),h=n(6651),g=n(674),m=n(4830),y=n(7243),b=n(1036),C=n(1282),E=n(6233),S=n(5764),T=n(857);t.coreApiMap={attachDomEvent:o.attachDomEvent,addUndoSnapshot:r.addUndoSnapshot,createPasteFragment:i.createPasteFragment,ensureTypeInContainer:a.ensureTypeInContainer,focus:l.focus,getContent:s.getContent,getSelectionRange:d.getSelectionRange,getSelectionRangeEx:c.getSelectionRangeEx,getStyleBasedFormatState:f.getStyleBasedFormatState,getPendableFormatState:u.getPendableFormatState,hasFocus:p.hasFocus,insertNode:v.insertNode,restoreUndoSnapshot:h.restoreUndoSnapshot,select:g.select,selectRange:y.selectRange,setContent:C.setContent,switchShadowEdit:E.switchShadowEdit,transformColor:S.transformColor,triggerEvent:T.triggerEvent,selectTable:b.selectTable,selectImage:m.selectImage}},3942:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPasteFragment=void 0;var r=n(6344);t.createPasteFragment=function(e,t,n,o,i,a){if(void 0===a&&(a=!1),!t)return null;var l=function(e,t,n){var o=(0,r.createDefaultHtmlSanitizerOptions)();return o.cssStyleCallbacks["caret-color"]=function(){return!1},{eventType:10,clipboardData:t,fragment:e.contentDiv.ownerDocument.createDocumentFragment(),sanitizingOption:o,htmlBefore:"",htmlAfter:"",htmlAttributes:{},pasteType:n}}(e,t,(0,r.getPasteType)(o,i,a));return(0,r.createFragmentFromClipboardData)(e,t,n,o,i,a,l)}},9943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureTypeInContainer=void 0;var r=n(6344);t.ensureTypeInContainer=function(e,t,n){var o,i=(0,r.findClosestElementAncestor)(t.node,e.contentDiv,"table");i&&(o=i.querySelector("td,th"))&&(t=new r.Position(o,0)),t=t.normalize();var a,l=(0,r.getBlockElementAtNode)(e.contentDiv,t.node);if(l){if(a=l.collapseToSingleElement(),(0,r.isNodeEmpty)(a,!1,!0)){var s=a.ownerDocument.createElement("br");a.append(s)}var u=(0,r.isNodeEmpty)(a)||n&&function(e,t){return(0,r.safeInstanceOf)(e.target,"Node")&&e.target.contains(t)&&e.key===t.innerText}(n,a);a=a&&u?a:null}else a=(0,r.createElement)(1,e.contentDiv.ownerDocument),e.api.insertNode(e,a,{position:1,updateCursor:!1,replaceSelection:!1,insertOnNewLine:!1}),t=new r.Position(a,0);a&&e.lifecycle.defaultFormat&&(0,r.applyFormat)(a,e.lifecycle.defaultFormat,e.lifecycle.isDarkMode,e.darkColorHandler),n&&e.api.selectRange(e,(0,r.createRange)(new r.Position(t)))}},3221:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focus=void 0;var r=n(6344);t.focus=function(e){if(!e.lifecycle.shadowEditFragment){if(!(e.api.hasFocus(e)&&e.api.getSelectionRange(e,!1)||e.domEvent.selectionRange&&e.api.selectRange(e,e.domEvent.selectionRange,!0))){var t=(0,r.getFirstLeafNode)(e.contentDiv)||e.contentDiv;e.api.selectRange(e,(0,r.createRange)(t,0),!0)}e.domEvent.selectionRange=null,e.api.hasFocus(e)||e.contentDiv.focus()}}},5049:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContent=void 0;var r=n(6344);t.getContent=function(e,t){var n,o,i="",a=0==t,l=2==t,s=e.lifecycle.shadowEditFragment||e.contentDiv;if(4==t)i=s.textContent;else if(3==t)i=(0,r.getTextContent)(s);else{var u=(n=s,(0,r.safeInstanceOf)(n,"DocumentFragment")?(o=n.ownerDocument.createElement("div")).appendChild(n.cloneNode(!0)):o=n.cloneNode(!0),o);u.normalize();var d=e.api.getSelectionRange(e,!0),c=l?e.lifecycle.shadowEditFragment?e.lifecycle.shadowEditSelectionPath:d?(0,r.getSelectionPath)(e.contentDiv,d):null:null,f=c&&(0,r.createRange)(u,c.start,c.end);e.api.transformColor(e,u,!1,null,1,!0,e.lifecycle.isDarkMode),a?(e.api.triggerEvent(e,{eventType:8,clonedRoot:u},!0),i=u.innerHTML):i=f?(0,r.getHtmlWithSelectionPath)(u,f):u.innerHTML}return null!=i?i:""}},5719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPendableFormatState=void 0;var r=n(6344);t.getPendableFormatState=function(e,t){var n,a=e.api.getSelectionRange(e,!0),l=e.pendingFormatState.pendableFormatState,s=null===(n=e.pendingFormatState.pendableFormatPosition)||void 0===n?void 0:n.normalize(),u=a&&r.Position.getStart(a).normalize(),d=u&&s&&a.collapsed&&u.equalTo(s);return a&&l&&d&&!t?l:u?function(e,t){for(var n=t.node,a={},l=[],s=function(){var e=(0,r.getTagOfNode)(n),t=1==n.nodeType&&n.style;e&&t&&(0,r.getObjectKeys)(o).forEach((function(n){l.indexOf(n)>=0||(a[n]=a[n]||o[n](e,t),i[n](t)&&l.push(n))})),n=n.parentNode};n&&(0,r.contains)(e.contentDiv,n);)s();return a}(e,u):{}};var o={isBold:function(e,t){return"B"==e||"STRONG"==e||"H1"==e||"H2"==e||"H3"==e||"H4"==e||"H5"==e||"H6"==e||parseInt(t.fontWeight)>=700||["bold","bolder"].indexOf(t.fontWeight)>=0},isUnderline:function(e,t){return"U"==e||t.textDecoration.indexOf("underline")>=0},isItalic:function(e,t){return"I"==e||"EM"==e||"italic"===t.fontStyle},isSubscript:function(e,t){return"SUB"==e||"sub"===t.verticalAlign},isSuperscript:function(e,t){return"SUP"==e||"super"===t.verticalAlign},isStrikeThrough:function(e,t){return"S"==e||"STRIKE"==e||t.textDecoration.indexOf("line-through")>=0}},i={isBold:function(e){return""!==e.fontWeight&&parseInt(e.fontWeight)<700||"normal"===e.fontWeight},isUnderline:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("underline")<0},isItalic:function(e){return""!==e.fontStyle&&"italic"!==e.fontStyle},isSubscript:function(e){return""!==e.verticalAlign&&"sub"!==e.verticalAlign},isSuperscript:function(e){return""!==e.verticalAlign&&"super"!==e.verticalAlign},isStrikeThrough:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("line-through")<0}}},1467:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRange=void 0;var r=n(6344);t.getSelectionRange=function(e,t){var n,o=null;if(e.lifecycle.shadowEditFragment)return e.lifecycle.shadowEditSelectionPath&&(0,r.createRange)(e.contentDiv,e.lifecycle.shadowEditSelectionPath.start,e.lifecycle.shadowEditSelectionPath.end);if(!t||e.api.hasFocus(e)){var i=null===(n=e.contentDiv.ownerDocument.defaultView)||void 0===n?void 0:n.getSelection();if(i&&i.rangeCount>0){var a=i.getRangeAt(0);(0,r.contains)(e.contentDiv,a)&&(o=a)}}return!o&&t&&(o=e.domEvent.selectionRange),o}},2634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRangeEx=void 0;var r=n(6344);function o(e){return{type:0,ranges:e,areAllCollapsed:i(e)}}function i(e){return e.filter((function(e){return null==e?void 0:e.collapsed})).length==e.length}t.getSelectionRangeEx=function(e){var t,n,a;if(e.lifecycle.shadowEditFragment){var l,s=e.lifecycle,u=s.shadowEditTableSelectionPath,d=s.shadowEditSelectionPath,c=s.shadowEditImageSelectionPath;if(((null==u?void 0:u.length)||0)>0)return{type:1,ranges:l=e.lifecycle.shadowEditTableSelectionPath.map((function(t){return(0,r.createRange)(e.contentDiv,t.start,t.end)})),areAllCollapsed:i(l),table:(0,r.findClosestElementAncestor)(l[0].startContainer,e.contentDiv,"table"),coordinates:void 0};if(((null==c?void 0:c.length)||0)>0)return{type:2,ranges:l=e.lifecycle.shadowEditImageSelectionPath.map((function(t){return(0,r.createRange)(e.contentDiv,t.start,t.end)})),areAllCollapsed:i(l),image:(0,r.findClosestElementAncestor)(l[0].startContainer,e.contentDiv,"img"),imageId:void 0};var f=d&&(0,r.createRange)(e.contentDiv,d.start,d.end);return o(f?[f]:[])}if(e.api.hasFocus(e)){if(e.domEvent.tableSelectionRange)return e.domEvent.tableSelectionRange;if(e.domEvent.imageSelectionRange)return e.domEvent.imageSelectionRange;var p=null===(t=e.contentDiv.ownerDocument.defaultView)||void 0===t?void 0:t.getSelection();if(p&&p.rangeCount>0){var v=p.getRangeAt(0);if((0,r.contains)(e.contentDiv,v))return o([v])}}return null!==(a=null!==(n=e.domEvent.tableSelectionRange)&&void 0!==n?n:e.domEvent.imageSelectionRange)&&void 0!==a?a:o(e.domEvent.selectionRange?[e.domEvent.selectionRange]:[])}},2628:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleBasedFormatState=void 0;var r=n(6344);t.getStyleBasedFormatState=function(e,t){if(!t)return{};var n=[],o=e.pendingFormatState.pendableFormatSpan;o&&(n=[o.style.fontFamily,o.style.fontSize,o.style.color,o.style.backgroundColor]);for(var i,a,l=t?(0,r.getComputedStyles)(t,["font-family","font-size","color","background-color","line-height","margin-top","margin-bottom","text-align","direction"]):[],s=e.contentDiv,u=e.darkColorHandler;t&&(0,r.contains)(s,t,!0)&&(!i||!a);){if(1==t.nodeType){var d=t;i=i||d.style.getPropertyValue("color"),a=a||d.style.getPropertyValue("background-color")}t=t.parentNode}e.lifecycle.isDarkMode||t!=e.contentDiv||(i=i||l[2],a=a||l[3]);var c=u.parseColorValue(n[2]||i),f=u.parseColorValue(n[3]||a);return{fontName:n[0]||l[0],fontSize:n[1]||l[1],textColor:c.lightModeColor,backgroundColor:f.lightModeColor,textColors:c.darkModeColor?{lightModeColor:c.lightModeColor,darkModeColor:c.darkModeColor}:void 0,backgroundColors:f.darkModeColor?{lightModeColor:f.lightModeColor,darkModeColor:f.darkModeColor}:void 0,lineHeight:l[4],marginTop:l[5],marginBottom:l[6],textAlign:l[7],direction:l[8]}}},5149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasFocus=void 0;var r=n(6344);t.hasFocus=function(e){var t=e.contentDiv.ownerDocument.activeElement;return!(!t||!(0,r.contains)(e.contentDiv,t,!0))}},1844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertNode=void 0;var r=n(6344);t.insertNode=function(e,t,n){var o;n=n||{position:3,insertOnNewLine:!1,updateCursor:!0,replaceSelection:!0,insertToRegionRoot:!1};var i=e.contentDiv;return n.updateCursor&&e.api.focus(e),4==n.position?(null===(o=i.parentNode)||void 0===o||o.insertBefore(t,i.nextSibling),!0):(e.api.transformColor(e,t,!0,(function(){var o,a;if(n)switch(n.position){case 0:case 1:var l,s=0==n.position,u=(0,r.getFirstLastBlockElement)(i,s);if(u){var d=s?u.getStartNode():u.getEndNode();n.insertOnNewLine||3==d.nodeType||(0,r.isVoidHtmlElement)(d)?(0,r.safeInstanceOf)(t,"DocumentFragment")?(l=(0,r.toArray)(t.childNodes),null===(o=d.parentNode)||void 0===o||o.insertBefore(t,s?d:d.nextSibling)):l=null===(a=d.parentNode)||void 0===a?void 0:a.insertBefore(t,s?d:d.nextSibling):l=d.insertBefore(t,s?d.firstChild:null)}else l=i.appendChild(t);if(l&&n.insertOnNewLine){var c=Array.isArray(l)?l:[l];(0,r.isBlockElement)(c[0])&&(0,r.isBlockElement)(c[c.length-1])||(0,r.wrap)(c)}break;case 2:var f=i.appendChild(t);f&&n.insertOnNewLine&&!(0,r.isBlockElement)(f)&&(0,r.wrap)(f);break;case 5:case 3:var p=function(e,t){var n=e.api.getSelectionRange(e,!0),r=null;return 5==t.position?(r=n,n=t.range):n&&(r=n.cloneRange()),{range:n,rangeToRestore:r}}(e,n),v=p.range,h=p.rangeToRestore;if(!v)return;n.replaceSelection&&!v.collapsed&&v.deleteContents();var g=r.Position.getStart(v),m=void 0;g=n.insertOnNewLine&&n.insertToRegionRoot?function(e,t,n){var o=(0,r.getRegionsFromRange)(e.contentDiv,t,0)[0],i=n.node;if(o){if(3!=i.nodeType||n.isAtEnd||(i=(0,r.splitTextNode)(i,n.offset,!0)),i!=o.rootNode)for(;i&&i.parentNode!=o.rootNode;)(0,r.splitParentNode)(i,!1),i=i.parentNode;i&&(n=new r.Position(i,-3))}return n}(e,v,g):n.insertOnNewLine&&(m=(0,r.getBlockElementAtNode)(i,g.normalize().node))?function(e,t,n){var o=new r.Position(e.getEndNode(),-3);if((0,r.safeInstanceOf)(o.node,"HTMLTableRowElement")){var i=t.contentDiv.ownerDocument.createElement("div");(0,r.createRange)(n).insertNode(i),o=new r.Position(i,0)}return o}(m,e,g):(0,r.adjustInsertPosition)(i,t,g,v);var y=11==t.nodeType?t.lastChild:t;(v=(0,r.createRange)(g)).insertNode(t),n.updateCursor&&y&&(h=(0,r.createRange)(new r.Position(y,-3).normalize())),h&&e.api.selectRange(e,h)}}),0),!0)}},6651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreUndoSnapshot=void 0;var r=n(6344);t.restoreUndoSnapshot=function(e,t){var n,o;e.undo.hasNewContent&&t<0&&e.api.addUndoSnapshot(e,null,null,!1);var i=e.undo.snapshotsService.move(t);if(i&&null!=i.html)try{e.undo.isRestoring=!0,e.api.setContent(e,i.html,!0,null!==(n=i.metadata)&&void 0!==n?n:void 0);var a=e.darkColorHandler,l=e.lifecycle.isDarkMode;i.knownColors.forEach((function(e){a.registerColor(e.lightModeColor,l,e.darkModeColor)})),null===(o=i.entityStates)||void 0===o||o.forEach((function(t){var n=t.type,o=t.id,i=t.state,a=(0,r.queryElements)(e.contentDiv,(0,r.getEntitySelector)(n,o))[0],l=a&&(0,r.getEntityFromElement)(a);l&&e.api.triggerEvent(e,{eventType:15,operation:11,entity:l,state:i},!1)}))}finally{e.undo.isRestoring=!1}}},674:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.select=void 0;var r=n(6344);t.select=function(e,t,n,o,i){var a,l,s=null;if(function(e){var t=e;return t&&"object"==typeof t&&"number"==typeof t.type&&Array.isArray(t.ranges)}(t))s=t;else if((0,r.safeInstanceOf)(t,"HTMLTableElement")&&(null===(a=n)||a&&"object"==typeof a&&"object"==typeof a.firstCell&&"object"==typeof a.lastCell))s={type:1,ranges:[],areAllCollapsed:!1,table:t,coordinates:null!=n?n:void 0};else if((0,r.safeInstanceOf)(t,"HTMLImageElement")&&void 0===n)s={type:2,ranges:[],areAllCollapsed:!1,image:t};else{var u=t?(0,r.safeInstanceOf)(t,"Range")?t:(l=t)&&"object"==typeof l&&Array.isArray(l.start)&&Array.isArray(l.end)?(0,r.createRange)(e.contentDiv,t.start,t.end):function(e){var t=e;return t&&"object"==typeof t&&"object"==typeof t.node&&"number"==typeof t.offset}(t)||(0,r.safeInstanceOf)(t,"Node")?(0,r.createRange)(t,n,o,i):null:null;s=u?{type:0,ranges:[u],areAllCollapsed:u.collapsed}:null}if(s){switch(s.type){case 1:(0,r.contains)(e.contentDiv,s.table)&&(e.domEvent.imageSelectionRange=e.api.selectImage(e,null),e.domEvent.tableSelectionRange=e.api.selectTable(e,s.table,s.coordinates),s=e.domEvent.tableSelectionRange);break;case 2:(0,r.contains)(e.contentDiv,s.image)&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,null),e.domEvent.imageSelectionRange=e.api.selectImage(e,s.image),s=e.domEvent.imageSelectionRange);break;case 0:e.domEvent.tableSelectionRange=e.api.selectTable(e,null),e.domEvent.imageSelectionRange=e.api.selectImage(e,null),(0,r.contains)(e.contentDiv,s.ranges[0])?e.api.selectRange(e,s.ranges[0]):s=null}e.api.triggerEvent(e,{eventType:22,selectionRangeEx:s},!0)}else e.domEvent.tableSelectionRange=e.api.selectTable(e,null),e.domEvent.imageSelectionRange=e.api.selectImage(e,null);return!!s}},4830:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectImage=void 0;var r=n(3505),o=n(6344),i="imageStyle";t.selectImage=function(e,t){s(e);var n=null;if(t){var i=(0,o.createRange)(t);(0,r.default)(t,"imageSelected"),(0,r.default)(e.contentDiv,"contentDiv_"),e.api.selectRange(e,(0,o.createRange)(new o.Position(t,-3))),a(e,t),n={type:2,ranges:[i],image:t,areAllCollapsed:i.collapsed}}return n};var a=function(e,t){(0,o.removeImportantStyleRule)(t,["border","margin"]);var n=l(e,t.id);(0,o.setGlobalCssStyles)(e.contentDiv.ownerDocument,n,i+e.contentDiv.id)},l=function(e,t){return"#"+e.contentDiv.id+" #"+t+" {outline-style: auto!important;outline-color: "+(e.imageSelectionBorderColor||"#DB626C")+"!important;caret-color: transparent!important;}"},s=function(e){var t=e.contentDiv.ownerDocument;(0,o.removeGlobalCssStyle)(t,i+e.contentDiv.id)}},7243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectRange=void 0;var r=n(5149),o=n(6344);t.selectRange=function(e,t,n){return!(e.lifecycle.shadowEditSelectionPath||!(0,o.contains)(e.contentDiv,t)||((0,o.addRangeToSelection)(t,n),(0,r.hasFocus)(e)||(e.domEvent.selectionRange=t),t.collapsed&&function(e){var t=e.contentDiv,n=e.pendingFormatState,r=e.api.getSelectionRange;if(n.pendableFormatState){var i=t.ownerDocument,a=(0,o.getPendableFormatState)(i);(0,o.getObjectKeys)(o.PendableFormatCommandMap).forEach((function(e){var t;!!(null===(t=n.pendableFormatState)||void 0===t?void 0:t[e])!=a[e]&&i.execCommand(o.PendableFormatCommandMap[e],!1,void 0)}));var l=r(e,!0),s=l&&o.Position.getStart(l);s&&(n.pendableFormatPosition=s)}}(e),0))}},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectTable=void 0;var r=n(3505),o=n(6344),i="tableStyle";t.selectTable=function(e,t,n){var d;if(a(e),function(e){if(e){var t=e||{},n=t.firstCell,r=t.lastCell;if(n&&r){var o=function(e){return u(e.x)&&u(e.y)};return o(n)&&o(r)}}return!1}(n)&&t){(0,r.default)(t,"tableSelected"),(0,r.default)(e.contentDiv,"contentDiv_");var c=function(e,t,n){var r=function(e,t,n){var r,i=[],a=[],u=new o.VTable(e),d=(0,o.isWholeTableSelected)(u,t);d?function(e,t,n,r){var o=t.table,i=e+" #"+o.id;n.push(i,i+" *");var a=new Range;a.selectNode(o),r.push(a)}(n,u,a,i):function(e,t,n,r,i){var a,u=e.firstCell.y,d=e.firstCell.x,c=e.lastCell.y,f=e.lastCell.x,p=t.table,v=null,h=null,g=(0,o.toArray)(p.childNodes).filter((function(e){return["THEAD","TBODY","TFOOT"].indexOf((0,o.getTagOfNode)(e))>-1})),m=0,y=g.map((function(e){var t={el:(0,o.getTagOfNode)(e),start:m,end:e.childNodes.length+m};return m=t.end,t}));null===(a=t.cells)||void 0===a||a.forEach((function(e,t){var a=0;v=null,h=null;for(var g=y.filter((function(e){return e.start<=t&&e.end>t}))[0],m=g?">"+g.el+">":">",b=g&&t+1>=g.start?t+1-g.start:t+1,C=0;C=u&&t<=c&&C>=d&&C<=f)){s(E);var S=l(n,p.id,m,b,(0,o.getTagOfNode)(E),a),T=S+" *";r.push(S,T),v=v||p.querySelector(S),h=p.querySelector(S)}}if(v&&h){var P=new Range;P.setStartBefore(v),P.setEndAfter(h),i.push(P)}}))}(t,u,n,a,i);for(var c=[],f="";a.length>0;)((f+=(f.length>0?",":"")+a.shift()||"").length+((null===(r=a[0])||void 0===r?void 0:r.length)||0)>9e3||0==a.length)&&(c.push(f+" {background-color: rgb(198,198,198) !important; caret-color: transparent}"),f="");return{cssRules:c,ranges:i,isWholeTableSelected:d}}(t,n,"#"+e.contentDiv.id),a=r.cssRules,u=r.ranges,d=r.isWholeTableSelected;return a.forEach((function(t){return(0,o.setGlobalCssStyles)(e.contentDiv.ownerDocument,t,i+e.contentDiv.id)})),{ranges:u,isWholeTableSelected:d}}(e,t,n),f=c.ranges,p=c.isWholeTableSelected;if(!function(e,t){var n,r=t.firstCell;return!(e.rows.item(r.y)&&(null===(n=e.rows.item(r.y))||void 0===n?void 0:n.cells.item(r.x)))}(t,n)){var v=null===(d=t.rows.item(n.firstCell.y))||void 0===d?void 0:d.cells.item(n.firstCell.x);v&&e.api.selectRange(e,(0,o.createRange)(new o.Position(v,0)))}return{type:1,ranges:f,table:t,areAllCollapsed:f.filter((function(e){return null==e?void 0:e.collapsed})).length==f.length,coordinates:n,isWholeTableSelected:p}}return null};var a=function(e){var t=e.contentDiv.ownerDocument;(0,o.removeGlobalCssStyle)(t,i+e.contentDiv.id)};function l(e,t,n,r,o,i){return e+" #"+t+n+" tr:nth-child("+r+")>"+o+":nth-child("+i+")"}function s(e){e&&(0,o.removeImportantStyleRule)(e,["background-color","background"])}function u(e){return(!!e||0==e)&&e>-1}},1282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setContent=void 0;var r=n(6344);t.setContent=function(e,t,n,o){var i,a,l=!1;if(e.contentDiv.innerHTML!=t){e.api.triggerEvent(e,{eventType:20,newContent:t},!0);var s=e.entity.entityMap,u=t||"",d=(new DOMParser).parseFromString(null!==(a=null===(i=e.trustedHTMLHandler)||void 0===i?void 0:i.call(e,u))&&void 0!==a?a:u,"text/html").body;(0,r.restoreContentWithEntityPlaceholder)(d,e.contentDiv,s);var c=(0,r.extractContentMetadata)(e.contentDiv);(function(e,t){if(!e.lifecycle.shadowEditSelectionPath&&t)switch(e.domEvent.tableSelectionRange=null,e.domEvent.imageSelectionRange=null,e.domEvent.selectionRange=null,t.type){case 0:e.api.selectTable(e,null),e.api.selectImage(e,null);var n=(0,r.createRange)(e.contentDiv,t.start,t.end);e.api.selectRange(e,n);break;case 1:var o=(0,r.queryElements)(e.contentDiv,"#"+t.tableId)[0];o&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,o,t));break;case 2:var i=(0,r.queryElements)(e.contentDiv,"#"+t.imageId)[0];i&&(e.domEvent.imageSelectionRange=e.api.selectImage(e,i))}})(e,o=o||c),l=!0}var f=e.lifecycle.isDarkMode;(!o&&f||o&&!!o.isDarkMode!=!!f)&&(e.api.transformColor(e,e.contentDiv,!1,null,f?0:1,!0,null==o?void 0:o.isDarkMode),l=!0),n&&l&&e.api.triggerEvent(e,{eventType:7,source:"SetContent"},!1)}},6233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchShadowEdit=void 0;var r=n(6344);t.switchShadowEdit=function(e,t){var n=e.lifecycle,o=e.contentDiv,i=n.shadowEditEntities,a=n.shadowEditFragment,l=n.shadowEditSelectionPath,s=n.shadowEditTableSelectionPath,u=n.shadowEditImageSelectionPath,d=!!a,c=function(e,t){return(null==t?void 0:t.type)==e&&t.ranges.map((function(e){return(0,r.getSelectionPath)(o,e)})).map((function(e){return e}))||null};if(t){if(!d){var f=e.api.getSelectionRangeEx(e),p=e.api.getSelectionRange(e,!0);l=p&&(0,r.getSelectionPath)(o,p),s=c(1,f),u=c(2,f),i={},a=(0,r.moveContentWithEntityPlaceholders)(o,i),e.api.triggerEvent(e,{eventType:17,fragment:a,selectionPath:l},!1),n.shadowEditFragment=a,n.shadowEditSelectionPath=l,n.shadowEditTableSelectionPath=s,n.shadowEditImageSelectionPath=u,n.shadowEditEntities=i}n.shadowEditFragment&&(0,r.restoreContentWithEntityPlaceholder)(n.shadowEditFragment,o,n.shadowEditEntities,!0)}else if(n.shadowEditFragment=null,n.shadowEditSelectionPath=null,n.shadowEditEntities=null,d){if(e.api.triggerEvent(e,{eventType:18},!1),a&&(0,r.restoreContentWithEntityPlaceholder)(a,o,i),e.api.focus(e),l&&e.api.selectRange(e,(0,r.createRange)(o,l.start,l.end)),e.domEvent.imageSelectionRange){var v=e.domEvent.imageSelectionRange.image;e.contentDiv.querySelector("#"+v.id)&&e.api.selectImage(e,v)}if(e.domEvent.tableSelectionRange){var h=e.domEvent.tableSelectionRange,g=h.table,m=h.coordinates,y=g.id,b=e.contentDiv.querySelector("#"+y);g&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,b,m))}}}},5764:(e,t)=>{"use strict";function n(e,t,o){o&&r(e)&&t(e);for(var i=e.firstChild;i;i=i.nextSibling)r(i)&&t(i),n(i,t)}function r(e){var t=e;return e.nodeType==Node.ELEMENT_NODE&&!!t.style}Object.defineProperty(t,"__esModule",{value:!0}),t.transformColor=void 0,t.transformColor=function(e,t,r,o,i,a,l){void 0===l&&(l=!1);var s=e.darkColorHandler,u=e.lifecycle.onExternalContentTransform,d=0==i;t&&(a||e.lifecycle.isDarkMode)&&n(t,u?function(e){u(e,l,d,s)}:function(e){s.transformElementColor(e,l,d)},r),null==o||o()}},857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerEvent=void 0;var n=[11,12,8,21];t.triggerEvent=function(e,t,r){e.lifecycle.shadowEditFragment&&!(n.indexOf(t.eventType)>=0)||!r&&e.plugins.some((function(e){return function(e,t){var n;return!(!t.onPluginEvent||!(null===(n=t.willHandleEventExclusively)||void 0===n?void 0:n.call(t,e)))&&(t.onPluginEvent(e),!0)}(t,e)}))||e.plugins.forEach((function(e){e.onPluginEvent&&e.onPluginEvent(t)}))}},3505:(e,t)=>{"use strict";function n(e,t,n){for(var r=0,o=function(){return n.getElementById(t+r)},i=o();i;)r++,i=o();e.id=t+r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=e.ownerDocument;e.id?r.querySelectorAll("#"+e.id).length>1&&(e.removeAttribute("id"),n(e,t,r)):n(e,t,r)}},4142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2544),o=n(4082),i=n(6344),a=function(){function e(e){var t=this;this.editor=null,this.disposer=null,this.onPaste=function(e){var n,r=null;if(t.editor){var o=t.editor;(0,i.extractClipboardEvent)(e,(function(e){o&&!o.isDisposed()&&o.paste(e)}),{allowedCustomPasteType:t.state.allowedCustomPasteType,getTempDiv:function(){var e;return r=null!==(e=o.getSelectionRange())&&void 0!==e?e:null,t.getTempDiv(o)},removeTempDiv:function(e){r&&t.cleanUpAndRestoreSelection(e,r,!1)}},null!==(n=t.editor.getSelectionRange())&&void 0!==n?n:void 0)}},this.state={allowedCustomPasteType:e.allowedCustomPasteType||[]}}return e.prototype.getName=function(){return"CopyPaste"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=this.editor.addDomEventHandler({paste:function(e){return t.onPaste(e)},copy:function(e){return t.onCutCopy(e,!1)},cut:function(e){return t.onCutCopy(e,!0)}})},e.prototype.dispose=function(){this.disposer&&this.disposer(),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onCutCopy=function(e,t){var n=this;if(this.editor){var r=this.editor.getSelectionRangeEx();if(r&&!r.areAllCollapsed){var o=this.editor.getContent(2),a=this.getTempDiv(this.editor,!0),l=(0,i.setHtmlWithMetadata)(a,o,this.editor.getTrustedHTMLHandler()),s=null;if(1===r.type&&r.coordinates){var u=a.querySelector("#"+r.table.id);s=this.createTableRange(u,r.coordinates),t&&this.deleteTableContent(this.editor,r.table,r.coordinates)}else if(2===r.type){var d=a.querySelector("#"+r.image.id);d&&(s=(0,i.createRange)(d),t&&this.deleteImage(this.editor,r.image.id))}else s=0===(null==l?void 0:l.type)?(0,i.createRange)(a,l.start,l.end):null;s&&(this.editor.triggerPluginEvent(9,{clonedRoot:a,range:s,rawEvent:e,isCut:t}).range&&(0,i.addRangeToSelection)(s),this.editor.runAsync((function(e){n.cleanUpAndRestoreSelection(a,r,!t),t&&e.addUndoSnapshot((function(){var t=e.deleteSelectedContent();e.focus(),e.select(t)}),"Cut")})))}}},e.prototype.getTempDiv=function(e,t){var n=e.getCustomData("CopyPasteTempDiv",(function(){var t=(0,i.createElement)(3,e.getDocument());return e.getDocument().body.appendChild(t),t}),(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)}));return t&&(n.style.backgroundColor="white",n.style.color="black"),n.style.display="",n.focus(),n},e.prototype.cleanUpAndRestoreSelection=function(e,t,n){var r,o,a;if((null===(r=t)||void 0===r?void 0:r.type)||0==t.type){var l=t;switch(l.type){case 1:case 2:null===(o=this.editor)||void 0===o||o.select(l);break;case 0:var s=null===(a=l.ranges)||void 0===a?void 0:a[0];this.restoreRange(s,n)}}else this.restoreRange(t,n);e.style.backgroundColor="",e.style.color="",e.style.display="none",(0,i.moveChildNodes)(e)},e.prototype.restoreRange=function(e,t){e&&this.editor&&(t&&i.Browser.isAndroid&&e.collapse(),this.editor.select(e))},e.prototype.createTableRange=function(e,t){var n=new i.VTable(e);return n.selection=t,(0,o.removeCellsOutsideSelection)(n),n.writeBack(),(0,i.createRange)(n.table)},e.prototype.deleteTableContent=function(e,t,n){var o=new i.VTable(t);o.selection=n,(0,r.forEachSelectedCell)(o,(function(t){(null==t?void 0:t.td)&&(t.td.innerHTML=e.getTrustedHTMLHandler()("
    "))}));var a=(0,i.isWholeTableSelected)(o,n),l=t.rows.length-1===n.lastCell.y&&0===n.firstCell.y;a?(o.edit(4),o.writeBack()):l&&(o.edit(5),o.writeBack()),(a||l)&&(t.style.removeProperty("width"),t.style.removeProperty("height"))},e.prototype.deleteImage=function(e,t){e.queryElements("#"+t,(function(t){e.deleteNode(t)}))},e}();t.default=a},7039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e,t){var n,o=this;this.editor=null,this.disposer=null,this.onDrop=function(){var e;null===(e=o.editor)||void 0===e||e.runAsync((function(e){e.addUndoSnapshot((function(){}),"Drop")}))},this.onFocus=function(){var e,t,n,r=o.state.tableSelectionRange||{},i=r.table,a=r.coordinates,l=(o.state.imageSelectionRange||{}).image;i&&a?null===(e=o.editor)||void 0===e||e.select(i,a):l?null===(t=o.editor)||void 0===t||t.select(l):o.state.selectionRange&&(null===(n=o.editor)||void 0===n||n.select(o.state.selectionRange)),o.state.selectionRange=null},this.onKeyDownDocument=function(e){9!=e.which||e.defaultPrevented||o.cacheSelection()},this.onMouseDownDocument=function(e){!o.editor||o.state.selectionRange||o.editor.contains(e.target)||o.cacheSelection()},this.cacheSelection=function(){!o.state.selectionRange&&o.editor&&(o.state.selectionRange=o.editor.getSelectionRange(!1))},this.onScroll=function(e){var t;null===(t=o.editor)||void 0===t||t.triggerPluginEvent(14,{rawEvent:e,scrollContainer:o.state.scrollContainer})},this.onKeyboardEvent=function(e){((0,r.isCharacterValue)(e)||e.which>=33&&e.which<=40)&&e.stopPropagation()},this.onInputEvent=function(e){e.stopPropagation()},this.onContextMenuEvent=function(e){var t,n,i=[],a=null===(t=o.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(),l=null==a?void 0:a.getInlineElementBefore(),s=e.target;2!=e.button&&l&&(s=l.getContainerNode()),o.state.contextMenuProviders.forEach((function(e){var t,n=null!==(t=e.getContextMenuItems(s))&&void 0!==t?t:[];(null==n?void 0:n.length)>0&&(i.length>0&&i.push(null),(0,r.arrayPush)(i,n))})),null===(n=o.editor)||void 0===n||n.triggerPluginEvent(16,{rawEvent:e,items:i})},this.state={isInIME:!1,scrollContainer:e.scrollContainer||t,selectionRange:null,stopPrintableKeyboardEventPropagation:!e.allowKeyboardEventPropagation,contextMenuProviders:(null===(n=e.plugins)||void 0===n?void 0:n.filter(i))||[],tableSelectionRange:null,imageSelectionRange:null}}return e.prototype.getName=function(){return"DOMEvent"},e.prototype.initialize=function(e){var t,n,o,i,a=this;this.editor=e;var l=this.editor.getDocument(),s=((t={keypress:this.getEventHandler(1),keydown:this.getEventHandler(0),keyup:this.getEventHandler(2),mousedown:5,contextmenu:this.onContextMenuEvent,compositionstart:function(){return a.state.isInIME=!0},compositionend:function(t){a.state.isInIME=!1,e.triggerPluginEvent(4,{rawEvent:t})},drop:this.onDrop,focus:this.onFocus})[r.Browser.isIE?"textinput":"input"]=this.getEventHandler(3),t);r.Browser.isSafari?(l.addEventListener("mousedown",this.onMouseDownDocument,!0),l.addEventListener("keydown",this.onKeyDownDocument),null===(n=l.defaultView)||void 0===n||n.addEventListener("blur",this.cacheSelection)):r.Browser.isIEOrEdge?s.beforedeactivate=this.cacheSelection:s.blur=this.cacheSelection,this.disposer=e.addDomEventHandler(s),this.state.scrollContainer.addEventListener("scroll",this.onScroll),null===(o=l.defaultView)||void 0===o||o.addEventListener("scroll",this.onScroll),null===(i=l.defaultView)||void 0===i||i.addEventListener("resize",this.onScroll)},e.prototype.dispose=function(){var e,t,n,o,i,a=null===(e=this.editor)||void 0===e?void 0:e.getDocument();a&&r.Browser.isSafari&&(a.removeEventListener("mousedown",this.onMouseDownDocument,!0),a.removeEventListener("keydown",this.onKeyDownDocument),null===(t=a.defaultView)||void 0===t||t.removeEventListener("blur",this.cacheSelection)),null===(n=null==a?void 0:a.defaultView)||void 0===n||n.removeEventListener("resize",this.onScroll),null===(o=null==a?void 0:a.defaultView)||void 0===o||o.removeEventListener("scroll",this.onScroll),this.state.scrollContainer.removeEventListener("scroll",this.onScroll),null===(i=this.disposer)||void 0===i||i.call(this),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.getEventHandler=function(e){var t=this;return this.state.stopPrintableKeyboardEventPropagation?{pluginEventType:e,beforeDispatch:function(n){return 3==e?t.onInputEvent(n):t.onKeyboardEvent(n)}}:e},e}();function i(e){var t;return!!(null===(t=e)||void 0===t?void 0:t.getContextMenuItems)}t.default=o},6262:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null,this.state={features:{}}}return e.prototype.getName=function(){return"Edit"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){var t,n=!1,o=null,i=!1;if(0==e.eventType){var a=e.rawEvent,l=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n=(i=(0,r.isCtrlOrMetaPressed)(a))||a.altKey,o=this.state.features[a.which]||l&&!l.collapsed&&this.state.features[258]}else 7==e.eventType&&(o=this.state.features[257]);for(var s=0;o&&s<(null==o?void 0:o.length);s++){var u=o[s];if((u.allowFunctionKeys||!n)&&this.editor&&u.shouldHandleEvent(e,this.editor,i)){u.handleEvent(e,this.editor);break}}},e}();t.default=o},3346:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4195),o=n(6344),i=/_(\d{1,8})$/,a=["^_Entity$","^_EId_","^_EType_","^_EReadonly_"],l=[6,7,4,5],s=function(){function e(){var e=this;this.editor=null,this.disposer=null,this.handleCutEvent=function(t){var n,r=null===(n=e.editor)||void 0===n?void 0:n.getSelectionRange();r&&!r.collapsed&&e.checkRemoveEntityForRange(t)},this.onDragStart=function(t){var n,r,i=t,a=null===(n=e.editor)||void 0===n?void 0:n.getElementAtCursor((0,o.getEntitySelector)(),i.target);a&&(null===(r=(0,o.getEntityFromElement)(a))||void 0===r?void 0:r.isReadonly)&&i.preventDefault()},this.state={entityMap:{}}}return e.prototype.getName=function(){return"Entity"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler("dragstart",this.onDragStart)},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null,this.state.entityMap={}},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 6:this.handleMouseUpEvent(e);break;case 0:this.handleKeyDownEvent(e.rawEvent);break;case 9:e.isCut&&this.handleCutEvent(e.rawEvent);break;case 10:this.handleBeforePasteEvent(e.sanitizingOption);break;case 7:this.handleContentChangedEvent(e);break;case 11:this.handleContentChangedEvent();break;case 8:this.handleExtractContentWithDomEvent(e.clonedRoot);break;case 16:this.handleContextMenuEvent(e.rawEvent);break;case 15:this.handleEntityOperationEvent(e)}(null===(t=this.editor)||void 0===t?void 0:t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))&&(0,r.inlineEntityOnPluginEvent)(e,this.editor)},e.prototype.handleContextMenuEvent=function(e){var t,n=e.target,r=n&&(null===(t=this.editor)||void 0===t?void 0:t.getElementAtCursor((0,o.getEntitySelector)(),n));r&&(e.preventDefault(),this.triggerEvent(r,2,e))},e.prototype.handleMouseUpEvent=function(e){var t,n=e.rawEvent,r=e.isClicking,i=n.target;this.editor&&r&&i&&(t=this.editor.getElementAtCursor((0,o.getEntitySelector)(),i))&&(this.triggerEvent(t,1,n),u(this.editor))},e.prototype.handleKeyDownEvent=function(e){var t;if((0,o.isCharacterValue)(e)||8==e.which||46==e.which||13==e.which){var n=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n&&!n.collapsed&&this.checkRemoveEntityForRange(e)}},e.prototype.handleBeforePasteEvent=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n&&!n.collapsed&&this.checkRemoveEntityForRange(null),e.additionalAllowedCssClasses&&(0,o.arrayPush)(e.additionalAllowedCssClasses,a)},e.prototype.handleContentChangedEvent=function(e){var t,n=this,i=!1;(0,o.getObjectKeys)(this.state.entityMap).forEach((function(e){var t=n.state.entityMap[e],r=t.element;!n.editor||t.isDeleted||n.editor.contains(r)||(t.isDeleted=!0,n.triggerEvent(r,6),i||r.isContentEditable||(0,o.isBlockElement)(r)||(i=!0))})),("InsertEntity"==(null==e?void 0:e.source)&&e.data?[e.data]:this.getExistingEntities().filter((function(e){var t=n.state.entityMap[e.id];return!t||t.element!=e.wrapper||t.isDeleted}))).forEach((function(e){var t=e.wrapper,r=e.type,i=e.id,a=e.isReadonly;e.id=n.ensureUniqueId(r,i,t),(0,o.commitEntity)(t,r,a,e.id),n.handleNewEntity(e)})),i&&(null===(t=this.editor)||void 0===t?void 0:t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))&&(0,r.normalizeDelimitersInEditor)(this.editor)},e.prototype.handleEntityOperationEvent=function(e){if(this.editor&&l.indexOf(e.operation)>=0){var t=this.state.entityMap[e.entity.id];t&&(t.isDeleted=!0)}},e.prototype.handleExtractContentWithDomEvent=function(e){var t=this;(0,o.toArray)(e.querySelectorAll((0,o.getEntitySelector)())).forEach((function(e){e.removeAttribute("contentEditable"),t.triggerEvent(e,8)}))},e.prototype.checkRemoveEntityForRange=function(e){var t,n=this,r=[],i=(0,o.getEntitySelector)();if(null===(t=this.editor)||void 0===t||t.queryElements(i,1,(function(t){t.isContentEditable?r.push(t):n.triggerEvent(t,6,e)})),this.editor&&r.length>0){var a=this.editor.queryElements(i,2);r.forEach((function(t){var r=a.indexOf(t)>=0;n.triggerEvent(t,r?6:7,e)}))}},e.prototype.triggerEvent=function(e,t,n){var r,i=e&&(0,o.getEntityFromElement)(e);return i?null===(r=this.editor)||void 0===r?void 0:r.triggerPluginEvent(15,{operation:t,rawEvent:n,entity:i}):null},e.prototype.handleNewEntity=function(e){var t=e.wrapper,n=this.triggerEvent(t,0),r={element:e.wrapper};(null==n?void 0:n.shouldPersist)&&(r.canPersist=!0),this.state.entityMap[e.id]=r},e.prototype.getExistingEntities=function(){var e,t;return null!==(t=null===(e=this.editor)||void 0===e?void 0:e.queryElements((0,o.getEntitySelector)()).map(o.getEntityFromElement).filter((function(e){return!!e})))&&void 0!==t?t:[]},e.prototype.ensureUniqueId=function(e,t,n){for(var r=i.exec(t),o=(r?t.substr(0,t.length-r[0].length):t)||e,a="",l=r&&parseInt(r[1])||0;;l++){a=l>0?o+"_"+l:o;var s=this.state.entityMap[a];if(!s||s.element==n)break}return a},e}();t.default=s;var u=o.Browser.isIE?function(e){e.runAsync((function(e){var t=e.getCustomData("ENTITY_IE_FOCUS_BUTTON",(function(){var t=(0,o.createElement)({tag:"button",style:"overflow:hidden;position:fixed;width:0;height:0;top:-1000px"},e.getDocument());return t.onblur=function(){t.style.display="none"},e.insertNode(t,{position:4}),t}));t.style.display="",(0,o.addRangeToSelection)((0,o.createRange)(t,0))}))}:function(){}},6194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null}return e.prototype.getName=function(){return"ImageSelection"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){var e;null===(e=this.editor)||void 0===e||e.select(null),this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(this.editor)switch(e.eventType){case 17:case 18:var n=this.editor.getSelectionRangeEx();2==n.type&&this.editor.select(n.image);break;case 6:var o=e.rawEvent.target;(0,r.safeInstanceOf)(o,"HTMLImageElement")&&0===e.rawEvent.button&&this.editor.select(o);break;case 5:var i=e.rawEvent.target,a=this.editor.getSelectionRangeEx();a&&2===a.type&&a.image!==i&&this.editor.select(null);break;case 2:var l=e.rawEvent.key,s=this.editor.getSelectionRangeEx();2===s.type&&("Escape"===l?(this.editor.select(s.image,-2),null===(t=this.editor.getSelectionRange())||void 0===t||t.collapse(),e.rawEvent.stopPropagation()):"Delete"===l?(this.editor.deleteNode(s.image),e.rawEvent.preventDefault()):this.editor.select(s.ranges[0]));break;case 16:var u=e.rawEvent.target,d=this.editor.getSelectionRangeEx();!(0,r.safeInstanceOf)(u,"HTMLImageElement")||2===d.type&&d.image===u||this.editor.select(u)}},e}();t.default=o},6121:(e,t,n)=>{"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0});var i=n(7582),a=n(6344),l="contenteditable",s=a.Browser.isFirefox?((r={}).enableObjectResizing=!1,r.enableInlineTableEditing=!1,r):a.Browser.isIE?((o={}).defaultParagraphSeparator="div",o.AutoUrlDetect=!1,o):{},u={darkModeColor:"rgb(51,51,51)",lightModeColor:"rgb(255,255,255)"},d={darkModeColor:"rgb(255,255,255)",lightModeColor:"rgb(0,0,0)"},c=function(){function e(e,t){var n,r,o=this;this.editor=null,this.initializer=null,this.disposer=null,this.initialContent=e.initialContent||t.innerHTML||"",null===t.getAttribute(l)&&(this.initializer=function(){t.contentEditable="true",t.style.userSelect="text",t.style.webkitUserSelect="text"},this.disposer=function(){t.style.userSelect="",t.style.webkitUserSelect="",t.removeAttribute(l)}),this.adjustColor=e.doNotAdjustEditorColor?function(){}:function(){var e,n=d,r=u,i=o.state.isDarkMode,l=null===(e=o.editor)||void 0===e?void 0:e.getDarkColorHandler();(0,a.setColor)(t,n,!1,i,!1,l),(0,a.setColor)(t,r,!0,i,!1,l)};var s=null!==(n=e.getDarkColor)&&void 0!==n?n:function(e){return e},c=e.defaultFormat?(0,i.__assign)({},e.defaultFormat):null;c&&(c.textColor&&!c.textColors&&(c.textColors={lightModeColor:c.textColor,darkModeColor:s(c.textColor)},delete c.textColor),c.backgroundColor&&!c.backgroundColors&&(c.backgroundColors={lightModeColor:c.backgroundColor,darkModeColor:s(c.backgroundColor)},delete c.backgroundColor)),this.state={customData:{},defaultFormat:c,isDarkMode:!!e.inDarkMode,getDarkColor:s,onExternalContentTransform:null!==(r=e.onExternalContentTransform)&&void 0!==r?r:null,experimentalFeatures:e.experimentalFeatures||[],shadowEditFragment:null,shadowEditEntities:null,shadowEditSelectionPath:null,shadowEditTableSelectionPath:null,shadowEditImageSelectionPath:null}}return e.prototype.getName=function(){return"Lifecycle"},e.prototype.initialize=function(e){var t;this.editor=e,this.editor.setContent(this.initialContent,!1),null===(t=this.initializer)||void 0===t||t.call(this),this.adjustColor(),this.adjustBrowserBehavior(),this.editor.triggerPluginEvent(11,{},!0)},e.prototype.dispose=function(){var e,t=this;null===(e=this.editor)||void 0===e||e.triggerPluginEvent(12,{},!0),(0,a.getObjectKeys)(this.state.customData).forEach((function(e){var n=t.state.customData[e];n&&n.disposer&&n.disposer(n.value),delete t.state.customData[e]})),this.disposer&&(this.disposer(),this.disposer=null,this.initializer=null),this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){7!=e.eventType||"SwitchToDarkMode"!=e.source&&"SwitchToLightMode"!=e.source||(this.state.isDarkMode="SwitchToDarkMode"==e.source,this.adjustColor())},e.prototype.adjustBrowserBehavior=function(){var e=this;(0,a.getObjectKeys)(s).forEach((function(t){var n;try{null===(n=e.editor)||void 0===n||n.getDocument().execCommand(t,!1,s[t])}catch(e){}}))},e}();t.default=c},5896:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.editor=null,this.mouseUpEventListerAdded=!1,this.mouseDownX=null,this.mouseDownY=null,this.onMouseUp=function(t){e.editor&&(e.removeMouseUpEventListener(),e.editor.triggerPluginEvent(6,{rawEvent:t,isClicking:e.mouseDownX==t.pageX&&e.mouseDownY==t.pageY}))}}return e.prototype.getName=function(){return"MouseUp"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.removeMouseUpEventListener(),this.editor=null},e.prototype.onPluginEvent=function(e){this.editor&&5==e.eventType&&!this.mouseUpEventListerAdded&&(this.editor.getDocument().addEventListener("mouseup",this.onMouseUp,!0),this.mouseUpEventListerAdded=!0,this.mouseDownX=e.rawEvent.pageX,this.mouseDownY=e.rawEvent.pageY)},e.prototype.removeMouseUpEventListener=function(){this.editor&&this.mouseUpEventListerAdded&&(this.mouseUpEventListerAdded=!1,this.editor.getDocument().removeEventListener("mouseup",this.onMouseUp,!0))},e}();t.default=n},3433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null}return e.prototype.getName=function(){return"NormalizeTable"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 11:case 7:this.editor&&this.normalizeTables(this.editor.queryElements("table"));break;case 10:this.normalizeTables((0,r.toArray)(e.fragment.querySelectorAll("table")));break;case 5:this.normalizeTableFromEvent(e.rawEvent);break;case 0:e.rawEvent.shiftKey&&this.normalizeTableFromEvent(e.rawEvent);break;case 8:t=e.clonedRoot,(0,r.toArray)(t.querySelectorAll("li")).forEach((function(e){var t=e.previousSibling;"block"==e.style.display&&(0,r.safeInstanceOf)(t,"HTMLLIElement")&&(e.style.removeProperty("display"),t.appendChild((0,r.changeElementTag)(e,"div")))}))}var t},e.prototype.normalizeTableFromEvent=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getElementAtCursor("table",e.target);n&&this.normalizeTables([n])},e.prototype.normalizeTables=function(e){if(this.editor&&e.length>0){var t=this.editor.getSelectionRangeEx(),n=0==(null==t?void 0:t.type)&&t.ranges[0]||{},o=n.startContainer,i=n.endContainer,a=n.startOffset,l=n.endOffset,s=function(e){var t=!1;return e.forEach((function(e){for(var n,o=null,i=e.firstChild;i;i=i.nextSibling)switch((0,r.getTagOfNode)(i)){case"TR":o||(o=e.ownerDocument.createElement("tbody"),e.insertBefore(o,i)),o.appendChild(i),i=o,t=!0;break;case"TBODY":o?((0,r.moveChildNodes)(o,i,!0),null===(n=i.parentNode)||void 0===n||n.removeChild(i),i=o,t=!0):o=i;break;default:o=null}var a=e.querySelectorAll("colgroup"),l=e.querySelector("thead");l&&a.forEach((function(e){l.contains(e)||l.appendChild(e)}))})),t}(e);s&&(o&&i&&"number"==typeof a&&"number"==typeof l?this.editor.select(o,a,i,l):1==(null==t?void 0:t.type)&&t.coordinates&&this.editor.select(t.table,t.coordinates))}},e}();t.default=o},4465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null,this.state={pendableFormatPosition:null,pendableFormatState:null,pendableFormatSpan:null}}return e.prototype.getName=function(){return"PendingFormatState"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null,this.clear()},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 13:e.formatState?(this.state.pendableFormatPosition=this.getCurrentPosition(),this.state.pendableFormatState=e.formatState,this.state.pendableFormatSpan=e.formatCallback?this.createPendingFormatSpan(e.formatCallback):null):this.clear();break;case 0:case 5:case 7:var t=null;this.editor&&0==e.eventType&&(0,r.isCharacterValue)(e.rawEvent)&&this.state.pendableFormatSpan?(this.state.pendableFormatSpan.removeAttribute("contentEditable"),this.editor.insertNode(this.state.pendableFormatSpan),this.editor.select(this.state.pendableFormatSpan,0,this.state.pendableFormatSpan,-1),this.clear()):(0==e.eventType&&e.rawEvent.which>=33&&e.rawEvent.which<=40||this.state.pendableFormatPosition&&(t=this.getCurrentPosition())&&!this.state.pendableFormatPosition.equalTo(t)||7==e.eventType&&("SwitchToDarkMode"==e.source||"SwitchToLightMode"==e.source))&&this.clear()}},e.prototype.clear=function(){this.state.pendableFormatPosition=null,this.state.pendableFormatState=null,this.state.pendableFormatSpan=null},e.prototype.getCurrentPosition=function(){var e,t,n=null===(e=this.editor)||void 0===e?void 0:e.getSelectionRange();return null!==(t=n&&r.Position.getStart(n).normalize())&&void 0!==t?t:null},e.prototype.createPendingFormatSpan=function(e){var t,n,o=this.state.pendableFormatSpan;if(!o&&this.editor){var i=this.editor.getStyleBasedFormatState(),a=this.editor.getDocument(),l=this.editor.isDarkMode();(o=a.createElement("span")).contentEditable="true",o.appendChild(a.createTextNode("​")),o.style.setProperty("font-family",null!==(t=i.fontName)&&void 0!==t?t:null),o.style.setProperty("font-size",null!==(n=i.fontSize)&&void 0!==n?n:null);var s=this.editor.getDarkColorHandler();(i.textColors||i.textColor)&&(0,r.setColor)(o,i.textColors||i.textColor,!1,l,!1,s),(i.backgroundColors||i.backgroundColor)&&(0,r.setColor)(o,i.backgroundColors||i.backgroundColor,!0,l,!1,s)}return o&&e(o),o},e}();t.default=o},4269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null}return e.prototype.getName=function(){return"TypeInContainer"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.isRangeEmpty=function(e){return!(!e.collapsed||e.startContainer.nodeType!==Node.ELEMENT_NODE||"DIV"!=(0,r.getTagOfNode)(e.startContainer)||e.startContainer.firstChild)},e.prototype.onPluginEvent=function(e){var t,n=this;if(1==e.eventType&&this.editor&&(!e.rawEvent||!(0,r.isCtrlOrMetaPressed)(e.rawEvent))){var o=this.editor.getSelectionRange(),i=o&&(0,r.findClosestElementAncestor)(o.startContainer,void 0,"[style]");if(!o||!this.isRangeEmpty(o)&&this.editor.contains(i))return;if(o.collapsed)this.editor.ensureTypeInContainer(r.Position.getStart(o),e.rawEvent);else{var a=function(){var t,r,o=null===(t=n.editor)||void 0===t?void 0:t.getFocusedPosition();o&&(null===(r=n.editor)||void 0===r||r.ensureTypeInContainer(o,e.rawEvent))};r.Browser.isMobileOrTablet?null===(t=this.editor.getDocument().defaultView)||void 0===t||t.setTimeout(a,100):this.editor.runAsync(a)}}},e}();t.default=o},6469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e){var t,n,o;this.editor=null,this.lastKeyPress=null,this.state={snapshotsService:e.undoMetadataSnapshotService||(n=e.undoSnapshotService,n?{canMove:function(e){return n.canMove(e)},move:function(e){return(o=n.move(e))?{html:o,metadata:null,knownColors:[]}:null},addSnapshot:function(e,t){return n.addSnapshot(e.html+(e.metadata?"\x3c!--"+JSON.stringify(e.metadata)+"--\x3e":""),t)},clearRedo:function(){return n.clearRedo()},canUndoAutoComplete:function(){return n.canUndoAutoComplete()}}:void 0)||(t=(0,r.createSnapshots)(1e7),{canMove:function(e){return(0,r.canMoveCurrentSnapshot)(t,e)},move:function(e){return(0,r.moveCurrentSnapshot)(t,e)},addSnapshot:function(e,n){return(0,r.addSnapshotV2)(t,e,n)},clearRedo:function(){return(0,r.clearProceedingSnapshotsV2)(t)},canUndoAutoComplete:function(){return(0,r.canUndoAutoComplete)(t)}}),isRestoring:!1,hasNewContent:!1,isNested:!1,autoCompletePosition:null}}return e.prototype.getName=function(){return"Undo"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.willHandleEventExclusively=function(e){return 0==e.eventType&&8==e.rawEvent.which&&!e.rawEvent.ctrlKey&&this.canUndoAutoComplete()},e.prototype.onPluginEvent=function(e){if(this.editor&&!this.editor.isInIME())switch(e.eventType){case 11:var t=this.editor.getUndoState();t.canUndo||t.canRedo||this.addUndoSnapshot();break;case 0:this.onKeyDown(e.rawEvent);break;case 1:this.onKeyPress(e.rawEvent);break;case 4:this.clearRedoForInput(),this.addUndoSnapshot();break;case 7:this.onContentChanged(e);break;case 23:this.onBeforeKeyboardEditing(e.rawEvent)}},e.prototype.onKeyDown=function(e){var t,n;if(8==e.which&&!e.altKey||46==e.which){if(8==e.which&&!e.ctrlKey&&this.canUndoAutoComplete())e.preventDefault(),null===(t=this.editor)||void 0===t||t.undo(),this.state.autoCompletePosition=null,this.lastKeyPress=e.which;else if(!e.defaultPrevented){var o=null===(n=this.editor)||void 0===n?void 0:n.getSelectionRange();!o||o.collapsed&&this.lastKeyPress==e.which&&!(0,r.isCtrlOrMetaPressed)(e)||this.addUndoSnapshot(),this.state.hasNewContent=!0,this.lastKeyPress=e.which}}else e.which>=33&&e.which<=40?(this.state.hasNewContent&&this.addUndoSnapshot(),this.lastKeyPress=0):8!=this.lastKeyPress&&46!=this.lastKeyPress||this.state.hasNewContent&&this.addUndoSnapshot()},e.prototype.onKeyPress=function(e){var t;if(!e.metaKey){var n=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n&&!n.collapsed||32==e.which&&32!=this.lastKeyPress||13==e.which?(this.addUndoSnapshot(),13==e.which&&(this.state.hasNewContent=!0)):this.clearRedoForInput(),this.lastKeyPress=e.which}},e.prototype.onBeforeKeyboardEditing=function(e){e.which!=this.lastKeyPress&&this.addUndoSnapshot(),this.lastKeyPress=e.which,this.state.hasNewContent=!0},e.prototype.onContentChanged=function(e){this.state.isRestoring||"SwitchToDarkMode"==e.source||"SwitchToLightMode"==e.source||"Keyboard"==e.source||this.clearRedoForInput()},e.prototype.clearRedoForInput=function(){this.state.snapshotsService.clearRedo(),this.lastKeyPress=0,this.state.hasNewContent=!0},e.prototype.canUndoAutoComplete=function(){var e,t,n=null===(e=this.editor)||void 0===e?void 0:e.getFocusedPosition();return this.state.snapshotsService.canUndoAutoComplete()&&!!n&&!!(null===(t=this.state.autoCompletePosition)||void 0===t?void 0:t.equalTo(n))},e.prototype.addUndoSnapshot=function(){var e;null===(e=this.editor)||void 0===e||e.addUndoSnapshot(),this.state.autoCompletePosition=null},e}();t.default=o},8376:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPluginState=void 0;var r=n(4142),o=n(7039),i=n(6262),a=n(3346),l=n(6194),s=n(6121),u=n(5896),d=n(3433),c=n(4465),f=n(4269),p=n(6469);t.default=function(e,t){var n=t.corePluginOverride||{};return{typeInContainer:n.typeInContainer||new f.default,edit:n.edit||new i.default,pendingFormatState:n.pendingFormatState||new c.default,_placeholder:null,typeAfterLink:null,undo:n.undo||new p.default(t),domEvent:n.domEvent||new o.default(t,e),mouseUp:n.mouseUp||new u.default,copyPaste:n.copyPaste||new r.default(t),entity:n.entity||new a.default,imageSelection:n.imageSelection||new l.default,normalizeTable:n.normalizeTable||new d.default,lifecycle:n.lifecycle||new s.default(t,e)}},t.getPluginState=function(e){return{domEvent:e.domEvent.getState(),pendingFormatState:e.pendingFormatState.getState(),edit:e.edit.getState(),lifecycle:e.lifecycle.getState(),undo:e.undo.getState(),entity:e.entity.getState(),copyPaste:e.copyPaste.getState()}}},2544:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEachSelectedCell=void 0,t.forEachSelectedCell=function(e,t){var n;if(e.selection)for(var r=e.selection,o=r.lastCell,i=r.firstCell,a=i.y;a<=o.y;a++)for(var l=i.x;l<=o.x;l++)e.cells&&(null===(n=e.cells[a][l])||void 0===n?void 0:n.td)&&t(e.cells[a][l])}},4195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeDelimitersInEditor=t.inlineEntityOnPluginEvent=void 0;var r=n(6344),o=".entityDelimiterAfter,.entityDelimiterBefore",i="​",a="span"+(0,r.getEntitySelector)();function l(e){var t,n,o,a;e.normalize();var l,s=e.firstChild,u=null!==(n=null===(t=s.nodeValue)||void 0===t?void 0:t.indexOf(i))&&void 0!==n?n:-1;if(u>=0&&((0,r.splitTextNode)(s,0==u?1:u,!1),e.childNodes.forEach((function(e){e.nodeValue!==i&&(l=e)})),l)){null===(o=e.parentElement)||void 0===o||o.insertBefore(l,"entityDelimiterBefore"==e.className?e:e.nextSibling);var d=null===(a=l.ownerDocument)||void 0===a?void 0:a.getSelection();d&&d.setPosition(l,new r.Position(l,-1).offset)}}function s(e){e.queryElements(o).forEach((function(e){if((0,r.getDelimiterFromElement)(e)){var t=e.classList.contains("entityDelimiterBefore")?e.nextElementSibling:e.previousElementSibling;(0,r.safeInstanceOf)(t,"HTMLElement")&&(0,r.getEntityFromElement)(t)||c(e)}else f(e)})),u(e.queryElements(a))}function u(e){e.forEach((function(e){d(e)&&(0,r.addDelimiters)(e)}))}function d(e){return!!(e&&(0,r.safeInstanceOf)(e,"HTMLElement")&&(t=(0,r.getEntityFromElement)(e),(null==t?void 0:t.isReadonly)&&!(0,r.isBlockElement)(t.wrapper)&&(0,r.safeInstanceOf)(t.wrapper,"HTMLElement")));var t}function c(e){var t;null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(e)}function f(e,t){if(void 0===t&&(t=!0),e){var n=e.classList.contains("entityDelimiterAfter")?e.previousElementSibling:e.nextElementSibling;t&&n&&d(n)||(e.classList.remove("entityDelimiterAfter","entityDelimiterBefore"),e.normalize(),e.childNodes.forEach((function(e){var t,n,o,a=null!==(n=null===(t=e.textContent)||void 0===t?void 0:t.indexOf(i))&&void 0!==n?n:-1;a>=0&&(null===(o=(0,r.createRange)(e,a,e,a+1))||void 0===o||o.deleteContents())})))}}t.inlineEntityOnPluginEvent=function(e,t){switch(e.eventType){case 7:"SetContent"===e.source&&s(t);break;case 11:s(t);break;case 10:var n=e.fragment,i=e.sanitizingOption;u(n.querySelectorAll(a)),i.additionalAllowedCssClasses&&(0,r.arrayPush)(i.additionalAllowedCssClasses,["entityDelimiterAfter","entityDelimiterBefore"]);break;case 8:case 9:e.clonedRoot.querySelectorAll(o).forEach((function(e){(0,r.getDelimiterFromElement)(e)?c(e):f(e)}));break;case 0:!function(e,t){var n,i,a=e.getSelectionRangeEx(),s=t.rawEvent;if(0==a.type)if(a.areAllCollapsed&&((0,r.isCharacterValue)(s)||13===s.which)){var u=null===(n=e.getFocusedPosition())||void 0===n?void 0:n.normalize();if(!u)return;var c=u.element,v=c==u.node?c.childNodes.item(u.offset):c,h=e.getElementAtCursor(o,v);if(!h)return;13===s.which?function(e,t){var n=t.classList.contains("entityDelimiterAfter"),i=n?t.previousSibling:t.nextSibling,a=function(e,t){var n;if(t){for(var o=null===(n=e.getBlockElementAtNode(t))||void 0===n?void 0:n.getStartNode();o&&!(0,r.isBlockElement)(o);)o=e.contains(o.parentElement)?o.parentElement:void 0;return o}}(e,t);e.runAsync((function(){if(a){var e=n?a.nextSibling:a.previousSibling;if(e&&(0,r.safeInstanceOf)(e,"HTMLElement")){var t=e.querySelectorAll(o);f(t.item(n?0:t.length-1))}d(i)&&([i.nextElementSibling,i.previousElementSibling].forEach((function(e){e&&(0,r.matchesSelector)(e,o)&&!(0,r.getDelimiterFromElement)(e)&&f(e,!1)})),(0,r.addDelimiters)(i))}}))}(e,h):3==(null===(i=h.firstChild)||void 0===i?void 0:i.nodeType)&&e.runAsync((function(){return l(h)}))}else if(!a.areAllCollapsed&&!s.shiftKey&&16!=s.which){var g=a.ranges[0];if(!g)return;!function(e,t,n){var i=t.startContainer,a=t.endContainer,s=t.startOffset,u=t.endOffset,d=e.getElementAtCursor(o,i),c=e.getElementAtCursor(o,a),v=p(d),h=p(c);(v||h)&&e.select(null!=v?v:new r.Position(i,s),null!=h?h:new r.Position(a,u)),e.runAsync((function(e){var t=e.getElementAtCursor(o);t&&(l(t),13===n.which&&f(t))}))}(e,g,s)}}(t,e)}},t.normalizeDelimitersInEditor=s;var p=function(e){if(e&&(0,r.getDelimiterFromElement)(e)){var t=e.classList.contains("entityDelimiterAfter");return new r.Position(e,t?-3:-2)}}},4082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeCellsOutsideSelection=void 0;var r=n(6344);t.removeCellsOutsideSelection=function(e){if(e.selection){if((0,r.isWholeTableSelected)(e,e.selection))return;e.table.style.removeProperty("width"),e.table.style.removeProperty("height");var t=e.selection,n=t.firstCell,o=t.lastCell,i=[],a=n.x,l=n.y,s=o.x,u=o.y;e.cells&&(e.cells.forEach((function(e,t){(e=e.filter((function(e,n){return t>=l&&t<=u&&n>=a&&n<=s}))).length>0&&i.push(e)})),e.cells=i)}}},2842:(e,t,n)=>{"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(6344),l=/^\s*var\(\s*(\-\-[a-zA-Z0-9\-_]+)\s*(?:,\s*(.*))?\)\s*$/;!function(e){e[e.CssColor=0]="CssColor",e[e.HtmlColor=1]="HtmlColor"}(i||(i={}));var s=[(r={},r[0]="color",r[1]="color",r),(o={},o[0]="background-color",o[1]="bgcolor",o)],u=function(){function e(e,t){this.contentDiv=e,this.getDarkColor=t,this.knownColors={}}return e.prototype.getKnownColorsCopy=function(){return Object.values(this.knownColors)},e.prototype.registerColor=function(e,t,n){var r,o=this.parseColorValue(e);return o&&(e=o.lightModeColor,n=o.darkModeColor||n,r=o.key),t&&e?(r=r||"--darkColor_"+e.replace(/[^\d\w]/g,"_"),this.knownColors[r]||(n=n||this.getDarkColor(e),this.knownColors[r]={lightModeColor:e,darkModeColor:n},this.contentDiv.style.setProperty(r,n)),"var("+r+", "+e+")"):e},e.prototype.reset=function(){var e=this;(0,a.getObjectKeys)(this.knownColors).forEach((function(t){return e.contentDiv.style.removeProperty(t)})),this.knownColors={}},e.prototype.parseColorValue=function(e,t){var n,r,o,i="";if(e){var a=e.startsWith("var(")?l.exec(e):null;a?a[2]?(r=a[1],i=a[2],o=null===(n=this.knownColors[r])||void 0===n?void 0:n.darkModeColor):i="":t?(i=this.findLightColorFromDarkColor(e)||"")&&(o=e):i=e}return{key:r,lightModeColor:i,darkModeColor:o}},e.prototype.findLightColorFromDarkColor=function(e){var t=this,n=(0,a.parseColor)(e);if(n){var r=(0,a.getObjectKeys)(this.knownColors).find((function(e){var r=(0,a.parseColor)(t.knownColors[e].darkModeColor);return r&&r[0]==n[0]&&r[1]==n[1]&&r[2]==n[2]}));if(r)return this.knownColors[r].lightModeColor}return null},e.prototype.transformElementColor=function(e,t,n){var r=this;s.forEach((function(o,i){var l=r.parseColorValue(e.style.getPropertyValue(o[0])||e.getAttribute(o[1]),!!t).lightModeColor;e.style.setProperty(o[0],null),e.removeAttribute(o[1]),l&&"inherit"!=l&&(0,a.setColor)(e,l,0!=i,n,!1,r)}))},e}();t.default=u},3386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(9602),i=function(e){function t(t,n){return void 0===n&&(n={}),e.call(this,t,n,o.createEditorCore)||this}return(0,r.__extends)(t,e),t}(n(5075).EditorBase);t.default=i},5075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorBase=void 0;var r=n(7582),o=n(3441),i=n(6344),a=function(){function e(e,t,n){var r=this;if(this.core=null,"DIV"!=(0,i.getTagOfNode)(e))throw new Error("contentDiv must be an HTML DIV element");this.core=n(e,t),this.core.plugins.forEach((function(e){return e.initialize(r)})),this.ensureTypeInContainer(new i.Position(this.core.contentDiv,0).normalize())}return e.prototype.dispose=function(){for(var e=this.getCore(),t=e.plugins.length-1;t>=0;t--)e.plugins[t].dispose();e.darkColorHandler.reset(),this.core=null},e.prototype.isDisposed=function(){return!this.core},e.prototype.insertNode=function(e,t){var n=this.getCore();return!!e&&n.api.insertNode(n,e,null!=t?t:null)},e.prototype.deleteNode=function(e){return!!(e&&this.contains(e)&&e.parentNode)&&(e.parentNode.removeChild(e),!0)},e.prototype.replaceNode=function(e,t,n){var r=this.getCore();return!(!this.contains(e)||!t||(r.api.transformColor(r,n?t:null,!0,(function(){var n;return null===(n=e.parentNode)||void 0===n?void 0:n.replaceChild(t,e)}),0),0))},e.prototype.getBlockElementAtNode=function(e){return(0,i.getBlockElementAtNode)(this.getCore().contentDiv,e)},e.prototype.contains=function(e){return!!e&&(0,i.contains)(this.getCore().contentDiv,e)},e.prototype.queryElements=function(e,t,n){void 0===t&&(t=0);var o=this.getCore(),a=[],l=t instanceof Function?0:t;n=t instanceof Function?t:n;var s=0==l?null:this.getSelectionRangeEx();return s?(s.ranges.forEach((function(t){a.push.apply(a,(0,r.__spreadArray)([],(0,r.__read)((0,i.queryElements)(o.contentDiv,e,n,l,t)),!1))})),a):(0,i.queryElements)(o.contentDiv,e,n,l,void 0)},e.prototype.collapseNodes=function(e,t,n){return(0,i.collapseNodes)(this.getCore().contentDiv,e,t,n)},e.prototype.isEmpty=function(e){return(0,i.isNodeEmpty)(this.getCore().contentDiv,e)},e.prototype.getContent=function(e){void 0===e&&(e=0);var t=this.getCore();return t.api.getContent(t,e)},e.prototype.setContent=function(e,t){void 0===t&&(t=!0);var n=this.getCore();n.api.setContent(n,e,t)},e.prototype.insertContent=function(e,t){var n;if(e){var r=this.getDocument(),o=null===(n=(new DOMParser).parseFromString(this.getCore().trustedHTMLHandler(e),"text/html"))||void 0===n?void 0:n.body,a=(null==o?void 0:o.childNodes)?(0,i.toArray)(o.childNodes):[];t&&t.insertOnNewLine&&a.length>1&&(a=[(0,i.wrap)(a)]);var l=r.createDocumentFragment();a.forEach((function(e){return l.appendChild(e)})),this.insertNode(l,t)}},e.prototype.deleteSelectedContent=function(){var e=this.getSelectionRange();return e&&!e.collapsed?(0,i.deleteSelectedContent)(this.getCore().contentDiv,e):null},e.prototype.paste=function(e,t,n,r){var o=this;void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===r&&(r=!1);var a=this.getCore();if(e){e.snapshotBeforePaste?this.setContent(e.snapshotBeforePaste):e.snapshotBeforePaste=this.getContent(2);var l=this.getSelectionRange(),s=l&&i.Position.getStart(l),u=a.api.createPasteFragment(a,e,s,t,n,r);u&&this.addUndoSnapshot((function(){return o.insertNode(u),e}),"Paste")}},e.prototype.getSelectionRange=function(e){void 0===e&&(e=!0);var t=this.getCore();return t.api.getSelectionRange(t,e)},e.prototype.getSelectionRangeEx=function(){var e=this.getCore();return e.api.getSelectionRangeEx(e)},e.prototype.getSelectionPath=function(){var e=this.getSelectionRange();return e&&(0,i.getSelectionPath)(this.getCore().contentDiv,e)},e.prototype.hasFocus=function(){var e=this.getCore();return e.api.hasFocus(e)},e.prototype.focus=function(){var e=this.getCore();e.api.focus(e)},e.prototype.select=function(e,t,n,r){var o=this.getCore();return o.api.select(o,e,t,n,r)},e.prototype.getFocusedPosition=function(){var e,t=null===(e=this.getDocument().defaultView)||void 0===e?void 0:e.getSelection();if((null==t?void 0:t.focusNode)&&this.contains(t.focusNode))return new i.Position(t.focusNode,t.focusOffset);var n=this.getSelectionRange();return n?i.Position.getStart(n):null},e.prototype.getElementAtCursor=function(e,t,n){var r,o=this;return n=t?void 0:n,null!==(r=(0,i.cacheGetEventData)(null!=n?n:null,"GET_ELEMENT_AT_CURSOR_"+e,(function(){if(!t){var n=o.getFocusedPosition();t=null==n?void 0:n.node}return t&&(0,i.findClosestElementAncestor)(t,o.getCore().contentDiv,e)})))&&void 0!==r?r:null},e.prototype.isPositionAtBeginning=function(e){return(0,i.isPositionAtBeginningOf)(e,this.getCore().contentDiv)},e.prototype.getSelectedRegions=function(e){void 0===e&&(e=0);var t=this.getSelectionRangeEx(),n=[],o=this.getCore().contentDiv;return t.ranges.forEach((function(t){n.push.apply(n,(0,r.__spreadArray)([],(0,r.__read)(t?(0,i.getRegionsFromRange)(o,t,e):[]),!1))})),n.filter((function(e,t,n){return n.indexOf(e)===t}))},e.prototype.addDomEventHandler=function(e,t){var n,r="string"==typeof e?((n={})[e]=t,n):e,o=this.getCore();return o.api.attachDomEvent(o,r)},e.prototype.triggerPluginEvent=function(e,t,n){void 0===n&&(n=!1);var o=this.getCore(),i=(0,r.__assign)({eventType:e},t);return o.api.triggerEvent(o,i,n),i},e.prototype.triggerContentChangedEvent=function(e,t){void 0===e&&(e="SetContent"),this.triggerPluginEvent(7,{source:e,data:t})},e.prototype.undo=function(){this.focus();var e=this.getCore();e.api.restoreUndoSnapshot(e,-1)},e.prototype.redo=function(){this.focus();var e=this.getCore();e.api.restoreUndoSnapshot(e,1)},e.prototype.addUndoSnapshot=function(e,t,n,r){var o=this.getCore();o.api.addUndoSnapshot(o,null!=e?e:null,null!=t?t:null,null!=n&&n,r)},e.prototype.getUndoState=function(){var e=this.getCore().undo,t=e.hasNewContent,n=e.snapshotsService;return{canUndo:t||n.canMove(-1),canRedo:n.canMove(1)}},e.prototype.getDocument=function(){return this.getCore().contentDiv.ownerDocument},e.prototype.getScrollContainer=function(){return this.getCore().domEvent.scrollContainer},e.prototype.getCustomData=function(e,t,n){var r=this.getCore();return(r.lifecycle.customData[e]=r.lifecycle.customData[e]||{value:t?t():void 0,disposer:n}).value},e.prototype.isInIME=function(){return this.getCore().domEvent.isInIME},e.prototype.getDefaultFormat=function(){var e;return null!==(e=this.getCore().lifecycle.defaultFormat)&&void 0!==e?e:{}},e.prototype.getBodyTraverser=function(e){return i.ContentTraverser.createBodyTraverser(this.getCore().contentDiv,e)},e.prototype.getSelectionTraverser=function(e){var t;return(e=null!==(t=null!=e?e:this.getSelectionRange())&&void 0!==t?t:void 0)?i.ContentTraverser.createSelectionTraverser(this.getCore().contentDiv,e):null},e.prototype.getBlockTraverser=function(e){void 0===e&&(e=3);var t=this.getSelectionRange();return t?i.ContentTraverser.createBlockTraverser(this.getCore().contentDiv,t,e):null},e.prototype.getContentSearcherOfCursor=function(e){var t=this;return(0,i.cacheGetEventData)(null!=e?e:null,"ContentSearcher",(function(){var e=t.getSelectionRange();return e&&new i.PositionContentSearcher(t.getCore().contentDiv,i.Position.getStart(e))}))},e.prototype.runAsync=function(e){var t=this,n=this.getCore().contentDiv.ownerDocument.defaultView||window,r=n.requestAnimationFrame((function(){!t.isDisposed()&&e&&e(t)}));return function(){n.cancelAnimationFrame(r)}},e.prototype.setEditorDomAttribute=function(e,t){null===t?this.getCore().contentDiv.removeAttribute(e):this.getCore().contentDiv.setAttribute(e,t)},e.prototype.getEditorDomAttribute=function(e){return this.getCore().contentDiv.getAttribute(e)},e.prototype.getRelativeDistanceToEditor=function(e,t){if(this.contains(e)){var n=this.getCore().contentDiv,r=n.getBoundingClientRect(),o=e.getBoundingClientRect();if(r&&o){var i=o.left-(null==r?void 0:r.left),a=o.top-(null==r?void 0:r.top);return t&&(i+=n.scrollLeft,a+=n.scrollTop),[i,a]}}return null},e.prototype.addContentEditFeature=function(e){var t=this.getCore();null==e||e.keys.forEach((function(n){var r=t.edit.features[n]||[];r.push(e),t.edit.features[n]=r}))},e.prototype.removeContentEditFeature=function(e){var t=this.getCore();null==e||e.keys.forEach((function(n){var r,o=t.edit.features[n],i=null!==(r=null==o?void 0:o.indexOf(e))&&void 0!==r?r:-1;i>=0&&(t.edit.features[n].splice(i,1),t.edit.features[n].length<1&&delete t.edit.features[n])}))},e.prototype.getStyleBasedFormatState=function(e){var t;if(!e){var n=this.getSelectionRange();e=null!==(t=n&&i.Position.getStart(n).normalize().node)&&void 0!==t?t:void 0}var r=this.getCore();return r.api.getStyleBasedFormatState(r,null!=e?e:null)},e.prototype.getPendableFormatState=function(e){void 0===e&&(e=!1);var t=this.getCore();return t.api.getPendableFormatState(t,e)},e.prototype.ensureTypeInContainer=function(e,t){var n=this.getCore();n.api.ensureTypeInContainer(n,e,t)},e.prototype.setDarkModeState=function(e){var t=this.isDarkMode();if(t!=!!e){var n=this.getCore();n.api.transformColor(n,n.contentDiv,!1,null,e?0:1,!0,t),this.triggerContentChangedEvent(e?"SwitchToDarkMode":"SwitchToLightMode")}},e.prototype.isDarkMode=function(){return this.getCore().lifecycle.isDarkMode},e.prototype.transformToDarkColor=function(e){var t=this.getCore();t.api.transformColor(t,e,!0,null,0)},e.prototype.getDarkColorHandler=function(){return this.getCore().darkColorHandler},e.prototype.startShadowEdit=function(){var e=this.getCore();e.api.switchShadowEdit(e,!0)},e.prototype.stopShadowEdit=function(){var e=this.getCore();e.api.switchShadowEdit(e,!1)},e.prototype.isInShadowEdit=function(){return!!this.getCore().lifecycle.shadowEditFragment},e.prototype.isFeatureEnabled=function(e){return(0,o.isFeatureEnabled)(this.getCore().lifecycle.experimentalFeatures,e)},e.prototype.getTrustedHTMLHandler=function(){return this.getCore().trustedHTMLHandler},e.prototype.getSizeTransformer=function(){return this.getCore().sizeTransformer},e.prototype.getZoomScale=function(){return this.getCore().zoomScale},e.prototype.setZoomScale=function(e){var t=this.getCore();if(e>0&&e<=10){var n=t.zoomScale;t.zoomScale=e,n!=e&&this.triggerPluginEvent(21,{oldZoomScale:n,newZoomScale:e},!0)}},e.prototype.getVisibleViewport=function(){return this.getCore().getVisibleViewport()},e.prototype.getCore=function(){if(!this.core)throw new Error("Editor is already disposed");return this.core},e}();t.EditorBase=a},9602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorCore=void 0;var r=n(7582),o=n(8376),i=n(2842),a=n(6344),l=n(6447);t.createEditorCore=function(e,t){var n,s=(0,o.default)(e,t),u=[];(0,a.getObjectKeys)(s).forEach((function(e){"_placeholder"==e?t.plugins&&(0,a.arrayPush)(u,t.plugins):u.push(s[e])}));var d=(0,o.getPluginState)(s),c=(null!==(n=t.zoomScale)&&void 0!==n?n:-1)>0?t.zoomScale:1,f=t.getVisibleViewport||function(){var e=d.domEvent.scrollContainer;return(0,a.getIntersectedRect)(e==p.contentDiv?[e]:[e,p.contentDiv])},p=(0,r.__assign)((0,r.__assign)({contentDiv:e,api:(0,r.__assign)((0,r.__assign)({},l.coreApiMap),t.coreApiOverride||{}),originalApi:l.coreApiMap,plugins:u.filter((function(e){return!!e}))},d),{trustedHTMLHandler:t.trustedHTMLHandler||function(e){return e},zoomScale:c,sizeTransformer:t.sizeTransformer||function(e){return e/c},getVisibleViewport:f,imageSelectionBorderColor:t.imageSelectionBorderColor,darkColorHandler:new i.default(e,d.lifecycle.getDarkColor)});return p}},3441:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFeatureEnabled=void 0,t.isFeatureEnabled=function(e,t){return(e||[]).indexOf(t)>=0}},6630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorCore=t.isFeatureEnabled=t.EditorBase=t.Editor=void 0;var r=n(3386);Object.defineProperty(t,"Editor",{enumerable:!0,get:function(){return r.default}});var o=n(5075);Object.defineProperty(t,"EditorBase",{enumerable:!0,get:function(){return o.EditorBase}});var i=n(3441);Object.defineProperty(t,"isFeatureEnabled",{enumerable:!0,get:function(){return i.isFeatureEnabled}});var a=n(9602);Object.defineProperty(t,"createEditorCore",{enumerable:!0,get:function(){return a.createEditorCore}})},8715:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(6997),i=function(){function e(e){this.element=e}return e.prototype.collapseToSingleElement=function(){return this.element},e.prototype.getStartNode=function(){return this.element},e.prototype.getEndNode=function(){return this.element},e.prototype.equals=function(e){return this.element==e.getStartNode()},e.prototype.isAfter=function(e){return(0,o.default)(this.element,e.getEndNode())},e.prototype.contains=function(e){return(0,r.default)(this.element,e,!0)},e.prototype.getTextContent=function(){var e;return(null===(e=this.element)||void 0===e?void 0:e.textContent)||""},e}();t.default=i},461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8053),o=n(8655),i=n(8831),a=n(3408),l=n(5499),s=n(6997),u=n(4251),d=n(9381),c=["TD","TH","LI","BLOCKQUOTE"],f=function(){function e(e,t,n){this.rootNode=e,this.startNode=t,this.endNode=n}return e.getBlockContext=function(e){for(var t=e;t&&!(0,l.default)(t);)t=t.parentNode;return t},e.prototype.collapseToSingleElement=function(){for(var t=e.getBlockContext(this.startNode),n=t?(0,r.default)(t,this.startNode,this.endNode,!0):[],o=e.getBlockContext(this.startNode);n[0]&&n[0]!=o&&n[0].parentNode!=this.rootNode&&c.indexOf((0,a.default)(n[0].parentNode))<0;){var i=(0,d.splitBalancedNodeRange)(n);if(!i)break;n=[i]}return 1==n.length&&(0,l.default)(n[0])?n[0]:(0,u.default)(n)},e.prototype.getStartNode=function(){return this.startNode},e.prototype.getEndNode=function(){return this.endNode},e.prototype.equals=function(e){return this.startNode==e.getStartNode()&&this.endNode==e.getEndNode()},e.prototype.isAfter=function(e){return(0,s.default)(this.getStartNode(),e.getEndNode())},e.prototype.contains=function(e){return(0,o.default)(this.startNode,e,!0)||(0,o.default)(this.endNode,e,!0)||(0,s.default)(e,this.startNode)&&(0,s.default)(this.endNode,e)},e.prototype.getTextContent=function(){var e=(0,i.default)(this.getStartNode(),this.getEndNode());return e?e.toString():""},e}();t.default=f},7070:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8053),o=n(8655),i=n(3408),a=n(5499),l=n(8715),s=n(461);function u(e,t,n){var r=e;if("BR"==(0,i.default)(r)&&n)return r;for(;r;){for(var o=e;e.parentNode&&!(o=n?e.nextSibling:e.previousSibling);)if((e=e.parentNode)==t)return r;for(;o;){if((0,a.default)(o))return r;if("BR"==(0,i.default)(o))return n?o:r;e=o,o=n?e.firstChild:e.lastChild}r=e}return r}t.default=function(e,t){if(!(0,o.default)(e,t))return null;var n=s.default.getBlockContext(t);if(!n)return null;if(n==t)return new l.default(n);var i=u(t,n,!1),d=u(t,n,!0);if(!i||!d)return null;var c=(0,r.default)(e,i,d,!1);if(0===c.length)return null;if(i=c[0],d=c[c.length-1],i.parentNode!=d.parentNode)return new s.default(e,i,d);for(;!i.previousSibling&&!d.nextSibling;){var f=i.parentNode;if(f==n){n!=e&&(i=d=f);break}if(!f||f==e)break;i=d=f}return i==d&&(0,a.default)(i)?new l.default(i):new s.default(e,i,d)}},1306:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7070);t.default=function(e,t){var n=e;do{n=n&&(t?n.firstChild:n.lastChild)}while(n&&n.firstChild);return n&&(0,r.default)(e,n)||null}},1851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5400),o=n(140),i=n(8736),a=n(2543),l=n(1473),s=n(5673),u=n(5216);t.default=function(e,t,n,d,c,f,p){var v=p.fragment,h=t.rawHtml,g=t.text,m=t.imageDataUri,y=h?(new DOMParser).parseFromString(e.trustedHTMLHandler(h),"text/html"):void 0;if((0,s.default)(y,p,e.trustedHTMLHandler),f&&m||!d&&!g&&m)(0,i.default)(m,v);else if(!d&&h&&y&&y.body){if((0,l.default)(v,null==y?void 0:y.body),c&&n){var b=function(e,t){var n=e.api.getPendableFormatState(e,!0),r=e.api.getStyleBasedFormatState(e,t);return{fontFamily:r.fontName,fontSize:r.fontSize,textColor:r.textColor,backgroundColor:r.backgroundColor,textColors:r.textColors,backgroundColors:r.backgroundColors,bold:n.isBold,italic:n.isItalic,underline:n.isUnderline}}(e,n.node);(0,o.default)(v,(function(e){return(0,r.default)(e,b)}))}}else g&&(0,a.default)(g,n,v);return e.api.triggerEvent(e,p,!0),(0,u.default)(p,n),v}},1545:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3877),o=n(6960),i=n(8375),a=n(246);t.default=function(e,t,n,l){var s,u=e.clipboardData||(null===(s=e.target.ownerDocument)||void 0===s?void 0:s.defaultView).clipboardData;u.items?(e.preventDefault(),(0,r.default)((0,i.default)(u.items),n).then((function(e){var n;n=l,a.Browser.isAndroid&&n&&n.deleteContents(),t(e)}))):(0,o.default)(u,t,n)}},3877:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3126),i=n(246),a=/^Version:[0-9\.]+\s+StartHTML:\s*([0-9]+)\s+EndHTML:\s*([0-9]+)\s+/i,l="text/*",s="link-preview",u=((r={})["text/html"]=function(e,t){return e.rawHtml=i.Browser.isEdge?function(e){var t=a.exec(e);if(3==(null==t?void 0:t.length)){var n=parseInt(t[1]),r=parseInt(t[2]);n>0&&r>n&&(e=e.substring(n,r))}return e}(t):t},r["text/plain"]=function(e,t){return e.text=t},r[l]=function(e,t,n){return!!n&&(e.customValues[n]=t)},r["text/"+s]=function(e,t){try{e.customValues[s]=t,e.linkPreview=JSON.parse(t)}catch(e){}},r);t.default=function(e,t){var n={types:[],text:"",image:null,files:[],rawHtml:null,customValues:{}};return Promise.all((e||[]).map((function(e){var r=e.type;if(0!=r.indexOf("image/")||n.image||"file"!=e.kind){if("file"==e.kind)return new Promise((function(t){var o=e.getAsFile();o&&(n.types.push(r),n.files.push(o)),t()}));var i=function(e,t){var n=0==e.indexOf("text/")?e.substring(5):null,r=t&&n?t.indexOf(n):-1;return n&&r>=0?n:void 0}(r,null==t?void 0:t.allowedCustomPasteType),a=u[r]||(i?u[l]:null);return new Promise((function(t){return a?e.getAsString((function(e){n.types.push(r),a(n,e,i),t()})):t()}))}return n.types.push(r),n.image=e.getAsFile(),new Promise((function(e){n.image?(0,o.default)(n.image,(function(t){n.imageDataUri=t,e()})):e()}))}))).then((function(){return n}))}},6960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3126),o=n(8375);t.default=function(e,t,n){for(var i,a,l,s={types:e.types?(0,o.default)(e.types):[],text:e.getData("text"),image:null,files:[],rawHtml:null,customValues:{}},u=0;u<(e.files?e.files.length:0);u++){var d=e.files.item(u);if(0==(null===(i=null==d?void 0:d.type)||void 0===i?void 0:i.indexOf("image/"))){s.image=d;break}}var c=function(){s.image?(0,r.default)(s.image,(function(e){s.imageDataUri=e,t(s)})):t(s)};if((null==n?void 0:n.getTempDiv)&&(null==n?void 0:n.removeTempDiv)){var f=n.getTempDiv();f.contentEditable="true",f.innerHTML="",f.focus(),null===(l=null===(a=f.ownerDocument)||void 0===a?void 0:a.defaultView)||void 0===l||l.setTimeout((function(){var e;s.rawHtml=f.innerHTML,null===(e=n.removeTempDiv)||void 0===e||e.call(n,f),c()}),0)}else s.rawHtml=void 0,c()}},351:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return e?1:t?2:n?3:0}},8736:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.ownerDocument.createElement("img");n.style.maxWidth="100%",n.src=e,t.appendChild(n)}},2543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformTabCharacters=void 0;var r=n(4251);function o(e,t){void 0===t&&(t=0);for(var n,r=e;-1!=(n=r.indexOf("\t"));){var o=r.slice(0,n),i=r.slice(n+1),a=6-(o.length+t)%6;r=o+Array(a).fill(" ").join("")+i}return r}t.default=function(e,t,n){var i=n.ownerDocument;e.split("\n").forEach((function(e,a,l){(e=e.replace(/^ /g," ").replace(/\r/g,"").replace(/ {2}/g,"  ")).includes("\t")&&(e=o(e,0===a?null==t?void 0:t.offset:0));var s=i.createTextNode(e);2==l.length&&0==a?(n.appendChild(s),n.appendChild(i.createElement("br"))):a>0&&a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=n(8375);function i(e,t){(0,o.default)(e.querySelectorAll("style")).forEach(t)}t.default=function(e,t,n){var a,l,s=t.clipboardData,u=t.sanitizingOption,d=s.rawHtml;if(d&&(null==e?void 0:e.body)){var c=null===(a=e.querySelector("html"))||void 0===a?void 0:a.attributes;(c?(0,o.default)(c):[]).reduce((function(e,t){return e[t.name]=t.value,e}),t.htmlAttributes),(0,o.default)(e.querySelectorAll("meta")).reduce((function(e,t){return e[t.name]=t.content,e}),t.htmlAttributes),s.htmlFirstLevelChildTags=[],null==e||e.body.normalize();for(var f=0;f<(null==e?void 0:e.body.childNodes.length);f++){var p=null==e?void 0:e.body.childNodes.item(f);if(p.nodeType!=Node.TEXT_NODE||(null===(l=p.nodeValue)||void 0===l?void 0:l.replace(/(\r\n|\r|\n)/gm,"").trim())){var v=(0,r.default)(p);p.nodeType!=Node.COMMENT_NODE&&s.htmlFirstLevelChildTags.push(v)}}i(e,(function(t){null==e||e.head.appendChild(t),u.additionalGlobalStyleNodes.push(t)}));var h=d.indexOf("\x3c!--StartFragment--\x3e"),g=d.lastIndexOf("\x3c!--EndFragment--\x3e");h>=0&&g>=h+20&&(t.htmlBefore=d.substr(0,h),t.htmlAfter=d.substr(g+18),s.html=d.substring(h+20,g),e.body.innerHTML=n(s.html),i(e.body,(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})))}}},5216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(623),o=n(8488);t.default=function(e,t){var n=e.fragment,i=new o.default(e.sanitizingOption);i.convertGlobalCssToInlineCss(n),i.sanitize(n,t?(0,r.default)(t.element):void 0)}},7676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(7070),i=n(1306),a=n(8153),l=n(7229),s=function(){function e(e,t){this.rootNode=e,this.startNode=(0,r.default)(e,t)?t:null}return e.prototype.getStartBlockElement=function(){return this.startNode?(0,o.default)(this.rootNode,this.startNode):(0,i.default)(this.rootNode,!0)},e.prototype.getStartInlineElement=function(){return this.startNode?(0,a.default)(this.rootNode,this.startNode):(0,l.getFirstInlineElement)(this.rootNode)},e.prototype.isBlockInScope=function(e){return(0,r.default)(this.rootNode,e.getStartNode())},e.prototype.trimInlineElement=function(e){return e},e}();t.default=s},6754:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7676),o=n(8251),i=n(7070),a=n(8153),l=n(5269),s=n(9984),u=n(3526),d=n(2571),c=n(2513),f=function(){function e(e,t){this.scoper=e,this.skipTags=t,this.currentInline=null,this.currentBlock=null}return e.createBodyTraverser=function(t,n,o){return new e(new r.default(t,n))},e.createSelectionTraverser=function(t,n,r){return new e(new u.default(t,n),r)},e.createBlockTraverser=function(t,n,r,o){return void 0===r&&(r=3),new e(new s.default(t,n,r))},Object.defineProperty(e.prototype,"currentBlockElement",{get:function(){return this.currentBlock||(this.currentBlock=this.scoper.getStartBlockElement()),this.currentBlock},enumerable:!1,configurable:!0}),e.prototype.getNextBlockElement=function(){return this.getPreviousNextBlockElement(!0)},e.prototype.getPreviousBlockElement=function(){return this.getPreviousNextBlockElement(!1)},e.prototype.getPreviousNextBlockElement=function(e){var t=this.currentBlockElement;if(!t)return null;var n=(0,c.getLeafSibling)(this.scoper.rootNode,e?t.getEndNode():t.getStartNode(),e,this.skipTags),r=n?(0,i.default)(this.scoper.rootNode,n):null;return r&&this.scoper.isBlockInScope(r)&&(e&&r.isAfter(t)||!e&&t.isAfter(r))?(this.currentBlock=r,this.currentBlock):null},Object.defineProperty(e.prototype,"currentInlineElement",{get:function(){return this.currentInline||(this.currentInline=this.scoper.getStartInlineElement()),this.currentInline instanceof o.default?null:this.currentInline},enumerable:!1,configurable:!0}),e.prototype.getNextInlineElement=function(){return this.getPreviousNextInlineElement(!0)},e.prototype.getPreviousInlineElement=function(){return this.getPreviousNextInlineElement(!1)},e.prototype.getPreviousNextInlineElement=function(e){var t,n=this.currentInlineElement||this.currentInline;return n?(n instanceof o.default?(t=(0,d.getInlineElementBeforeAfter)(this.scoper.rootNode,n.getStartPosition(),e))&&!n.getParentBlock().contains(t.getContainerNode())&&(t=null):(t=function(e,t,n){if(!t)return null;if(t instanceof l.default){var r=n?t.nextInlineElement:t.previousInlineElement;if(r)return r}var o=t.getContainerNode();return o=(0,c.getLeafSibling)(e,o,n),(0,a.default)(e,o)}(this.scoper.rootNode,n,e),t=t&&n&&(e&&t.isAfter(n)||!e&&n.isAfter(t))?t:null),t&&(t=this.scoper.trimInlineElement(t))?(this.currentInline=t,this.currentInline):null):null},e}();t.default=f},6091:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754),o=n(8831),i=/[\s\u00A0\u200B\u3000]+([^\s\u00A0\u200B\u3000]*)$/i,a=function(){function e(e,t){this.rootNode=e,this.position=t,this.text="",this.word="",this.inlineBefore=null,this.inlineAfter=null,this.traverser=null,this.traversingComplete=!1,this.inlineElements=[],this.nearestNonTextInlineElement=null}return e.prototype.getWordBefore=function(){var e=this;return this.word||this.traverse((function(){return e.word})),this.word||""},e.prototype.getInlineElementBefore=function(){return this.inlineBefore||this.traverse(null),this.inlineBefore},e.prototype.getInlineElementAfter=function(){return this.inlineAfter||(this.inlineAfter=r.default.createBlockTraverser(this.rootNode,this.position).currentInlineElement),this.inlineAfter},e.prototype.getSubStringBefore=function(e){var t=this;return this.text.length=e})),this.text.substr(Math.max(0,this.text.length-e))},e.prototype.getRangeFromText=function(e,t){if(!e)return null;var n=null,r=null,i=e.length-1;return this.forEachTextInlineElement((function(o){for(var a=o.getTextContent()||"",l=a.length-1;l>=0&&i>=0;l--)if(e.charCodeAt(i)==a.charCodeAt(l))i--,r||(r=o.getStartPosition().move(l+1));else if(t||r)return!0;return-1==i&&(n=o.getStartPosition().move(l+1),!0)})),n&&r&&(0,o.default)(n,r)},e.prototype.forEachTextInlineElement=function(e){this.inlineElements.some(e)||this.traverse(e)},e.prototype.getNearestNonTextInlineElement=function(){var e=this;return this.nearestNonTextInlineElement||this.traverse((function(){return e.nearestNonTextInlineElement})),this.nearestNonTextInlineElement},e.prototype.traverse=function(e){if(this.traverser=this.traverser||r.default.createBlockTraverser(this.rootNode,this.position),this.traverser&&!this.traversingComplete)for(var t=this.traverser.getPreviousInlineElement();!this.traversingComplete;){if(this.inlineBefore=this.inlineBefore||t,!t||!t.isTextualInlineElement()){this.nearestNonTextInlineElement=t,this.traversingComplete=!0,this.word||(this.word=this.text);break}var n=t.getTextContent();if(!this.word){var o=i.exec(n);o&&2==o.length&&(this.word=o[1]+this.text)}if(this.text=n+this.text,this.inlineElements.push(t),e&&e(t))break;t=this.traverser.getPreviousInlineElement()}},e}();t.default=a},9984:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8251),o=n(7070),i=n(8153),a=n(8715),l=n(4630),s=n(5924),u=n(2571),d=n(7229),c=function(){function e(e,t,n){this.rootNode=e,this.startFrom=n,(0,s.default)(t,"Range")&&(t=l.default.getStart(t)),this.position=t.normalize(),this.block=(0,o.default)(this.rootNode,this.position.node)}return e.prototype.getStartBlockElement=function(){return this.block},e.prototype.getStartInlineElement=function(){if(this.block)switch(this.startFrom){case 0:case 1:case 2:return function(e,t){if(e instanceof a.default){var n=e.getStartNode();return t?(0,d.getFirstInlineElement)(n):(0,d.getLastInlineElement)(n)}return(0,i.default)(e,t?e.getStartNode():e.getEndNode())}(this.block,0==this.startFrom);case 3:var e=(0,u.getInlineElementAfter)(this.rootNode,this.position);return e&&this.block.contains(e.getContainerNode())?e:new r.default(this.position,this.block)}return null},e.prototype.isBlockInScope=function(e){return!(!this.block||!e)&&this.block.equals(e)},e.prototype.trimInlineElement=function(e){return this.block&&e&&this.block.contains(e.getContainerNode())?e:null},e}();t.default=c},3526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7070),o=n(5269),i=n(4630),a=n(2571),l=function(){function e(e,t){this.rootNode=e,this.startBlock=null,this.startInline=null,this.start=i.default.getStart(t).normalize(),this.end=i.default.getEnd(t).normalize()}return e.prototype.getStartBlockElement=function(){return this.startBlock||(this.startBlock=(0,r.default)(this.rootNode,this.start.node)),this.startBlock},e.prototype.getStartInlineElement=function(){return this.startInline||(this.startInline=this.trimInlineElement((0,a.getInlineElementAfter)(this.rootNode,this.start))),this.startInline},e.prototype.isBlockInScope=function(e){if(!e)return!1;var t=!1,n=this.getStartBlockElement();if(this.start.equalTo(this.end))t=!!n&&n.equals(e);else{var o=(0,r.default)(this.rootNode,this.end.node);t=!!n&&!!o&&(e.equals(n)||e.equals(o)||e.isAfter(n)&&o.isAfter(e))}return t},e.prototype.trimInlineElement=function(e){if(!e||this.start.equalTo(this.end))return null;var t=e.getStartPosition(),n=e.getEndPosition();if(t.isAfter(this.end)||this.start.isAfter(n))return null;var r=!1,i=!1;return this.start.isAfter(t)&&(t=this.start,r=!0),n.isAfter(this.end)&&(n=this.end,i=!0),t.isAfter(n)||t.equalTo(n)?null:r||i?new o.default(e,r?t:void 0,i?n:void 0):e},e}();t.default=l},8937:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDelimiterBefore=t.addDelimiterAfter=void 0;var r=n(7582),o=n(6935),i=n(3765),a="​";function l(e){return d(e,"entityDelimiterAfter")}function s(e){return d(e,"entityDelimiterBefore")}function u(e,t){return e&&(0,i.default)(e)&&e.classList.contains(t)?e:void 0}function d(e,t){var n=(0,o.default)({tag:"span",className:t,children:[a]},e.ownerDocument);if(n){var r="entityDelimiterAfter"==t?"afterend":"beforebegin";e.insertAdjacentElement(r,n)}return n}t.default=function(e){var t,n,o,i,a=(0,r.__read)((n=[],o=(t=e).nextElementSibling,i=t.previousElementSibling,n.push(u(o,"entityDelimiterAfter"),u(i,"entityDelimiterBefore")),n),2),d=a[0],c=a[1];return d||(d=l(e)),c||(c=s(e)),[d,c]},t.addDelimiterAfter=l,t.addDelimiterBefore=s},3765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e){return e&&(0,r.default)(e,"HTMLSpanElement")&&(e.classList.contains("entityDelimiterAfter")||e.classList.contains("entityDelimiterBefore"))&&"​"===e.textContent?e:null}},2738:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4984),o=n(8655),i=n(6754),a=n(8831),l=n(3598),s=n(7070),u=n(3408),d=n(1657),c=n(1431),f=n(8235),p=n(5672),v=n(1473),h=n(4731),g=n(4630),m=n(6091),y=n(8471),b=n(7409),C=n(8375),E=n(82),S=n(4251),T=n(9381),P="[contenteditable=false]",w=[function(e,t,n,r){var i,l,u=(0,s.default)(e,n.node);if(u){var c=(0,y.default)(e,"a[href]",null,1,(0,a.default)(n)).filter((function(e){return u.contains(e)}))[0];if(c&&(0,d.default)(c)&&(n=new g.default(c,-2),_(c),c=null),c&&(null===(i=t)||void 0===i?void 0:i.querySelector)&&(null===(l=t)||void 0===l?void 0:l.querySelector("a[href]"))){var f=n.normalize(),p=f.node.parentNode,v=3==f.node.nodeType?(0,b.default)(f.node,f.offset,!1):f.isAtEnd?f.node.nextSibling:f.node,h=e.ownerDocument.createTextNode("");for(p.insertBefore(h,v);h&&(0,o.default)(c,h);)h=(0,T.splitBalancedNodeRange)(h);h&&(n=new g.default(h,-2),_(h))}}return n},function(e,t,n,r){var o=t,i=!1;if(11==o.nodeType){i=!0;var a=(0,C.default)(o.childNodes).filter((function(e){return"BR"!=(0,u.default)(e)}));o=1==a.length?a[0]:null}var s=(0,u.default)(o),d=s&&o&&"BR"==(0,u.default)(o.nextSibling),f=(0,l.default)(n.node,e,"LI"),p=f&&(0,l.default)(f,e,"OL,UL"),m=(0,l.default)(n.node,e,"TD,TH");if("LI"==s&&(s=p?(0,u.default)(p):"UL",o=(0,S.default)(o,s)),("OL"==s||"UL"==s)&&o&&"LI"==(0,u.default)(o.firstChild)){var y=!o.firstChild.nextSibling&&!d;d&&o.parentNode&&_(o.nextSibling),y?((0,E.default)(o.firstChild),(0,E.default)(o)):(0,u.default)(p)==s&&((0,E.default)(o),n=new g.default(f,(0,c.default)(n,f)?-2:-3))}return i&&"TABLE"==s&&m&&((0,h.default)(m,o,n,r),n=new g.default(o,0),(0,v.default)(t)),n},function(e,t,n,o){if("P"==(0,u.default)(n.node)){var i=n.normalize(),a=(0,r.default)(n.node,"div");i.node!=a&&(n=i)}return n},function(e,t,n,r){return(0,f.default)(n.node)&&(n=new g.default(n.node,n.isAtEnd?-3:-2)),n},function(e,t,n,r){if(r&&r.collapsed){var o=new m.default(e,g.default.getStart(r)),i=o.getInlineElementBefore(),a=o.getInlineElementAfter();i instanceof p.default?n=new g.default(i.getContainerNode(),-3):a instanceof p.default&&(n=new g.default(a.getContainerNode(),-2))}return n},function e(t,n,r,o){var i;if(!(null===(i=r.element)||void 0===i?void 0:i.isContentEditable)){for(var a=void 0,s=(0,l.default)(r.node,t,P);s;)s=(null==(a=s)?void 0:a.parentElement)?(0,l.default)(a.parentElement,t,P):null;if(a)return e(t,n,r=new g.default(a,-3),o)}return r},function(e,t,n,r){if(1==t.childNodes.length&&"TABLE"==(0,u.default)(t.childNodes[0])||"TABLE"==(0,u.default)(t)){var o=n.element,s=new g.default(o,-2),d=(0,a.default)(s,n),c=i.default.createSelectionTraverser(e,d),f=c&&c.currentBlockElement;if(f){for(var p=f;!p;)(p=c.getNextBlockElement())&&(f=p);var v=null==f?void 0:f.getEndNode();if(v&&(0,l.default)(v,e,"TABLE")){var h=(0,a.default)(n);h.collapse(!1);var m=e.ownerDocument.createElement("br");h.insertNode(m),h=(0,a.default)(m),n=g.default.getEnd(h)}}}return n}];function _(e){var t;null===(t=null==e?void 0:e.parentNode)||void 0===t||t.removeChild(e)}t.default=function(e,t,n,r){return w.forEach((function(o){n=o(e,t,n,r)})),n}},3030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(8605),i=n(6688),a=n(8394),l=n(4539),s=n(2799),u=n(4630),d=n(8471),c=n(5924),f=n(7409);function p(e,t,n){var r,o;if((0,c.default)(e,"Text")){var i=(0,f.default)(e,t,n);return n?[i,e]:[e,i]}var a=e.childNodes[t-1],l=e.childNodes[t];if(a||l||(n?a=(l=e).previousSibling:l=(a=e).nextSibling),(a||l)&&(!a||!l)){var s=e.ownerDocument.createTextNode("");null===(o=null===(r=a||l)||void 0===r?void 0:r.parentNode)||void 0===o||o.insertBefore(s,l),a?l=s:a=s}return[a,l]}t.default=function(e,t){var n=null,f=(0,d.default)(e,"table,tr",null,2,t),v=(0,a.default)(e,t,0).map((function(e){var t=(0,l.default)(e);if(!t)return null;var a=t.startContainer,s=t.endContainer,u=t.startOffset,d=t.endOffset,v=t.commonAncestorContainer;if((0,c.default)(v,"HTMLElement")&&!v.isContentEditable)return null;var h=(0,r.__read)(p(s,d,!1),2),g=h[0],m=h[1],y=(0,r.__read)(p(a,u,!0),2),b=y[0],C=y[1];n=n||b;var E=(0,i.default)(e,[C,g]);return(0,o.default)(f,E),{region:e,beforeStart:b,afterEnd:m}})).filter((function(e){return!!e}));return f.forEach((function(e){var t;return(null===(t=e.parentElement)||void 0===t?void 0:t.isContentEditable)&&e.parentElement.removeChild(e)})),v.forEach((function(e){e&&(0,s.default)(e.region,e.beforeStart,e.afterEnd)})),n&&new u.default(n,-1)}},8606:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754);t.default=function(e){for(var t=r.default.createBodyTraverser(e),n=t&&t.currentBlockElement,o=[];n;)o.push(n.getTextContent()),n=t.getNextBlockElement();return o.join("\n")}},8839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="contenteditable";t.default=function(e,t,r,o){e&&(e.className="_Entity _EType_"+t+" "+(o?"_EId_"+o+" ":"")+"_EReadonly_"+(r?"1":"0"),r?e.contentEditable="false":e.getAttribute(n)&&e.removeAttribute(n))}},3032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreContentWithEntityPlaceholder=t.moveContentWithEntityPlaceholders=t.createEntityPlaceholder=void 0;var r=n(3726),o=n(4965),i=n(5924);function a(e,t){for(var n;e&&(!t||e!=t);){var r=e;e=e.nextSibling,null===(n=r.parentNode)||void 0===n||n.removeChild(r)}return e}function l(e,t){var n,o=(0,i.default)(t,"HTMLElement")&&t.classList.contains("_Entity")&&(null===(n=(0,r.default)(t))||void 0===n?void 0:n.id),a=o?null==e?void 0:e[o]:null;return a?(0,i.default)(a,"HTMLElement")?a:(null==a?void 0:a.canPersist)?a.element:null:null}function s(e,t){return t[e.id]=e.wrapper,e.wrapper.cloneNode(!0)}t.createEntityPlaceholder=function(e){var t=e.wrapper.ownerDocument.createElement("ENTITY-PLACEHOLDER");return t.id=e.id,t},t.moveContentWithEntityPlaceholders=function(e,t){for(var n=(0,o.default)(),a=e.ownerDocument.createDocumentFragment(),l=null,u=function(e){var o,u=e;l=e.nextSibling,(0,i.default)(e,"HTMLElement")&&((o=(0,r.default)(e))?u=s(o,t):e.querySelectorAll(n).forEach((function(e){var n;if(o=(0,r.default)(e)){var i=s(o,t);null===(n=e.parentNode)||void 0===n||n.replaceChild(i,e)}}))),a.appendChild(u)},d=e.firstChild;d;d=l)u(d);return a.normalize(),a},t.restoreContentWithEntityPlaceholder=function(e,t,n,r){for(var s=t.firstChild,u=(0,o.default)(),d=e.firstChild;d;){var c=d.nextSibling,f=l(n,d);if(f)(s=a(s,f))?s=s.nextSibling:t.appendChild(f);else{var p=r?d.cloneNode(!0):d;t.insertBefore(p,s),(0,i.default)(p,"HTMLElement")&&p.querySelectorAll(u).forEach((function(e){var t,r=l(n,e);r&&(null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e))}))}d=c}a(s)}},3726:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=!1,r="",o="",i=!1;return null===(t=null==e?void 0:e.className)||void 0===t||t.split(" ").forEach((function(e){"_Entity"==e?n=!0:0==e.indexOf("_EType_")?r=e.substr(7):0==e.indexOf("_EId_")?o=e.substr(5):0==e.indexOf("_EReadonly_")&&(i="1"==e.substr(11))})),n?{wrapper:e,id:o,type:r,isReadonly:i}:null}},4965:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"._Entity"+(e?"._EType_"+e:"")+(t?"._EId_"+t:"")}},996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e&&e.eventDataCache&&e.eventDataCache.hasOwnProperty(t)?e.eventDataCache[t]:n();return e&&(e.eventDataCache=e.eventDataCache||{},e.eventDataCache[t]=r),r}},2924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e&&e.eventDataCache&&(t&&e.eventDataCache.hasOwnProperty(t)?delete e.eventDataCache[t]:t||(e.eventDataCache={}))}},7254:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1045);t.default=function(e){return!(0,r.default)(e)&&!!e.key&&1==e.key.length}},5188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(246).Browser.isMac?function(e){return e.metaKey}:function(e){return e.ctrlKey};t.default=function(e){return r(e)}},1045:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.ctrlKey||"Control"===e.key,n=e.altKey||"Alt"===e.key,r=e.metaKey||"Meta"===e.key;return t||n||r}},8488:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4984),i=n(623),a=n(4709),l=n(4869),s=n(359),u=n(3408),d=n(5924),c=n(6092),f=n(8375),p=n(9420),v=n(5097),h=n(2374),g=function(){function e(e){e=e||{},this.elementCallbacks=(0,p.cloneObject)(e.elementCallbacks),this.styleCallbacks=(0,h.getStyleCallbacks)(e.cssStyleCallbacks),this.attributeCallbacks=(0,p.cloneObject)(e.attributeCallbacks),this.tagReplacements=(0,h.getTagReplacement)(e.additionalTagReplacements),this.allowedAttributes=(0,h.getAllowedAttributes)(e.additionalAllowedAttributes),this.allowedCssClassesRegex=(0,h.getAllowedCssClassesRegex)(e.additionalAllowedCssClasses),this.defaultStyleValues=(0,h.getDefaultStyleValues)(e.additionalDefaultStyleValues),this.additionalPredefinedCssForElement=e.additionalPredefinedCssForElement||null,this.additionalGlobalStyleNodes=e.additionalGlobalStyleNodes||[],this.preserveHtmlComments=e.preserveHtmlComments||!1,this.unknownTagReplacement=e.unknownTagReplacement||null}return e.convertInlineCss=function(t,n){return new e({additionalGlobalStyleNodes:n}).exec(t,!0)},e.sanitizeHtml=function(t,n){var r=new e(n=n||{}),o=(0,d.default)(n.currentElementOrStyle,"HTMLElement")?(0,i.default)(n.currentElementOrStyle):n.currentElementOrStyle;return r.exec(t,n.convertCssOnly,o)},e.prototype.exec=function(e,t,n){var r=(new DOMParser).parseFromString(e||"","text/html");return r&&r.body&&r.body.firstChild&&(this.convertGlobalCssToInlineCss(r),t||this.sanitize(r.body,n)),r&&r.body&&r.body.innerHTML||""},e.prototype.sanitize=function(e,t){if(!e)return"";t=(0,p.cloneObject)(t,(0,i.default)(null)),this.processNode(e,t,{})},e.prototype.convertGlobalCssToInlineCss=function(e){var t,n,o=(0,f.default)(e.querySelectorAll("style")),i=this.additionalGlobalStyleNodes.reverse().map((function(e){return e.sheet})).concat(o.map((function(e){return e.sheet})).reverse()).filter((function(e){return e}));try{for(var a=(0,r.__values)(i),l=a.next();!l.done;l=a.next())for(var s=l.value,u=function(t){var n,o,i=s.cssRules[t],a=i&&i.style?i.style.cssText:null;if(i.type!=CSSRule.STYLE_RULE||!a||!i.selectorText)return"continue";try{for(var l=(n=void 0,(0,r.__values)(i.selectorText.split(","))),u=l.next();!u.done;u=l.next()){var d=u.value;!d||!d.trim()||d.indexOf(":")>=0||(0,f.default)(e.querySelectorAll(d)).forEach((function(e){return e.setAttribute("style",a+(e.getAttribute("style")||""))}))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}},d=s.cssRules.length-1;d>=0;d--)u(d)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}o.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},e.prototype.processNode=function(e,t,n){var r,i=e.nodeType,a=1==i,l=3==i,s=11==i,d=8==i,c=!1;if(a){var f=(0,u.default)(e),v=this.elementCallbacks[f],h=this.tagReplacements[f.toLowerCase()];void 0===h&&(h=this.unknownTagReplacement),v?c=v(e,n):f.indexOf(":")>0||f==h||"*"==h?c=!0:h&&/^[a-zA-Z][\w\-]*$/.test(h)&&(e=(0,o.default)(e,h),c=!0)}else if(l){var g=t["white-space"];c="pre"==g||"pre-line"==g||"pre-wrap"==g||!/^[\r\n]*$/g.test(e.nodeValue||"")}else c=!!s||!!d&&this.preserveHtmlComments;if(c)if(!l||"pre"!=t["white-space"]&&"pre-wrap"!=t["white-space"]){if(a||s){var m=(0,p.cloneObject)(t),y=e;a&&(this.processAttributes(y,n),this.preprocessCss(y,m),this.processCss(y,m,n));for(var b=y.firstChild,C=void 0;b;b=C)C=b.nextSibling,this.processNode(b,m,n)}}else e.nodeValue=(e.nodeValue||"").replace(/^ /gm," ").replace(/ {2}/g,"  ");else null===(r=e.parentNode)||void 0===r||r.removeChild(e)},e.prototype.preprocessCss=function(e,t){var n=(0,l.default)(e,this.additionalPredefinedCssForElement);n&&(0,a.default)(n).forEach((function(e){t[e]=n[e]}))},e.prototype.processCss=function(e,t,n){var r=this,o=(0,s.default)(e);(0,a.default)(o).forEach((function(i){var a=o[i],l=r.styleCallbacks[i],s=null!=t[i],u=!0;u&&l&&(u=l(a,e,t,n)),u&&(0,v.isCssVariable)(a)&&(u=!!(a=(0,v.processCssVariable)(a))),(u=u&&"inherit"!=a&&a.indexOf("expression")<0&&"-"!=i.substr(0,1)&&r.defaultStyleValues[i]!=a&&(s&&a!=t[i]||!s&&"initial"!=a&&"normal"!=a))&&s&&(t[i]=a),u?o[i]=a:delete o[i]})),(0,c.default)(e,o)},e.prototype.processAttributes=function(e,t){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n],o=r.name.toLowerCase().trim(),i=r.value,a=this.attributeCallbacks[o],l=a?a(i,e,t):this.allowedAttributes.indexOf(o)>=0||0==o.indexOf("data-")?i:null;"class"==o&&this.allowedCssClassesRegex&&(l=this.processCssClass(i,l)),null==l||l.match(/s\n*c\n*r\n*i\n*p\n*t\n*:/i)?e.removeAttribute(o):r.value=l}},e.prototype.processCssClass=function(e,t){var n=this,r=e?e.split(" "):[],o=t?t.split(" "):[];return r.forEach((function(e){var t;(null===(t=n.allowedCssClassesRegex)||void 0===t?void 0:t.test(e))&&o.indexOf(e)<0&&o.push(e)})),(null==o?void 0:o.length)>0?o.join(" "):null},e}();t.default=g},585:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);t.default=function(e,t,n){if(e[t]){var o=e[t];e[t]=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cloneObject=void 0;var r=n(7582),o=n(4709),i=Object.assign?function(e,t){return Object.assign(t||{},e)}:function(e,t){var n,i,a=t||{};if(e)try{for(var l=(0,r.__values)((0,o.default)(e)),s=l.next();!s.done;s=l.next()){var u=s.value;a[u]=e[u]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return a};t.cloneObject=function(e,t){return i(e,t)}},4834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{elementCallbacks:{},attributeCallbacks:{},cssStyleCallbacks:{},additionalTagReplacements:{},additionalAllowedAttributes:[],additionalAllowedCssClasses:[],additionalDefaultStyleValues:{},additionalGlobalStyleNodes:[],additionalPredefinedCssForElement:{},preserveHtmlComments:!1,unknownTagReplacement:null}}},2374:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleCallbacks=t.getDefaultStyleValues=t.getAllowedCssClassesRegex=t.getAllowedAttributes=t.getTagReplacement=void 0;var r=n(7582),o=n(4709),i=n(9420),a={a:"*",abbr:"*",address:"*",area:"*",article:"*",aside:"*",b:"*",bdi:"*",bdo:"*",blockquote:"*",body:"*",br:"*",button:"*",canvas:"*",caption:"*",center:"*",cite:"*",code:"*",col:"*",colgroup:"*",data:"*",datalist:"*",dd:"*",del:"*",details:"*",dfn:"*",dialog:"*",dir:"*",div:"*",dl:"*",dt:"*",em:"*",fieldset:"*",figcaption:"*",figure:"*",font:"*",footer:"*",h1:"*",h2:"*",h3:"*",h4:"*",h5:"*",h6:"*",head:"*",header:"*",hgroup:"*",hr:"*",html:"*",i:"*",img:"*",input:"*",ins:"*",kbd:"*",label:"*",legend:"*",li:"*",main:"*",map:"*",mark:"*",menu:"*",menuitem:"*",meter:"*",nav:"*",ol:"*",optgroup:"*",option:"*",output:"*",p:"*",picture:"*",pre:"*",progress:"*",q:"*",rp:"*",rt:"*",ruby:"*",s:"*",samp:"*",section:"*",select:"*",small:"*",span:"*",strike:"*",strong:"*",sub:"*",summary:"*",sup:"*",table:"*",tbody:"*",td:"*",textarea:"*",tfoot:"*",th:"*",thead:"*",time:"*",tr:"*",tt:"*",u:"*",ul:"*",var:"*",wbr:"*",xmp:"*",form:"SPAN",applet:null,audio:null,base:null,basefont:null,embed:null,frame:null,frameset:null,iframe:null,link:null,meta:null,noscript:null,object:null,param:null,script:null,slot:null,source:null,style:null,template:null,title:null,track:null,video:null},l="accept,align,alt,checked,cite,color,cols,colspan,contextmenu,coords,datetime,default,dir,dirname,disabled,download,face,headers,height,hidden,high,href,hreflang,ismap,kind,label,lang,list,low,max,maxlength,media,min,multiple,open,optimum,pattern,placeholder,readonly,rel,required,reversed,rows,rowspan,scope,selected,shape,size,sizes,span,spellcheck,src,srclang,srcset,start,step,style,tabindex,target,title,translate,type,usemap,valign,value,width,wrap".split(","),s={"background-color":"transparent","border-bottom-color":"rgb(0, 0, 0)","border-bottom-style":"none","border-bottom-width":"0px","border-image-outset":"0","border-image-repeat":"stretch","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-left-color":"rgb(0, 0, 0)","border-left-style":"none","border-left-width":"0px","border-right-color":"rgb(0, 0, 0)","border-right-style":"none","border-right-width":"0px","border-top-color":"rgb(0, 0, 0)","border-top-style":"none","border-top-width":"0px","outline-color":"transparent","outline-style":"none","outline-width":"0px",overflow:"visible","-webkit-text-stroke-width":"0px","word-wrap":"break-word","margin-left":"0px","margin-right":"0px",padding:"0px","padding-top":"0px","padding-left":"0px","padding-right":"0px","padding-bottom":"0px",border:"0px","border-top":"0px","border-left":"0px","border-right":"0px","border-bottom":"0px","vertical-align":"baseline",float:"none"},u=[];function d(){return null}function c(e,t){var n=t.tagName;return!("LI"==n||"DIV"==n)}t.getTagReplacement=function(e){var t=(0,r.__assign)({},a),n=e||{};return(0,o.default)(n).forEach((function(e){e&&(t[e.toLowerCase()]=n[e])})),t},t.getAllowedAttributes=function(e){return(t=l.concat(e||[]),t.filter((function(e,t,n){return n.indexOf(e)==t}))).map((function(e){return e.toLocaleLowerCase()}));var t},t.getAllowedCssClassesRegex=function(e){var t=u.concat(e||[]);return t.length>0?new RegExp(t.join("|")):null},t.getDefaultStyleValues=function(e){var t=(0,i.cloneObject)(s);return e&&Object.keys(e).forEach((function(n){var r=e[n];null!=r?t[n]=r:delete t[n]})),t},t.getStyleCallbacks=function(e){var t=(0,i.cloneObject)(e);return t.position=t.position||d,t.width=t.width||c,t}},623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="border-spacing,caption-side,color,cursor,direction,empty-cells,font-family,font-size,font-style,font-variant,font-weight,font,letter-spacing,line-height,list-style-image,list-style-position,list-style-type,list-style,orphans,quotes,text-align,text-indent,text-transform,visibility,white-space,widows,word-spacing".split(",");t.default=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView,r=t&&e&&t.getComputedStyle(e),o={};return n.forEach((function(e){return o[e]=r&&r.getPropertyValue(e)||""})),o}},4869:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o={B:{"font-weight":"bold"},EM:{"font-style":"italic"},I:{"font-style":"italic"},U:{"text-decoration":"underline"},P:{"margin-top":"1em","margin-bottom":"1em"},PRE:{"white-space":"pre"},S:{"text-decoration":"line-through"},STRIKE:{"text-decoration":"line-through"},SUB:{"vertical-align":"sub","font-size":"smaller"},SUP:{"vertical-align":"super","font-size":"smaller"}};t.default=function(e,t){var n=(0,r.default)(e);return o[n]||(t||{})[n]}},5097:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCssVariable=t.processCssVariable=void 0;var n=/^\s*var\(\s*[a-zA-Z0-9-_]+\s*(,\s*(.*))?\)\s*$/;t.processCssVariable=function(e){var t=n.exec(e);return(null==t?void 0:t[2])||""},t.isCssVariable=function(e){return 0==e.indexOf("var(")}},6344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitTextNode=t.getLastLeafNode=t.getFirstLeafNode=t.getPreviousLeafSibling=t.getNextLeafSibling=t.wrap=t.unwrap=t.splitBalancedNodeRange=t.splitParentNode=t.queryElements=t.matchLink=t.isVoidHtmlElement=t.isNodeEmpty=t.isBlockElement=t.getTagOfNode=t.PendableFormatCommandMap=t.getPendableFormatState=t.getComputedStyle=t.getComputedStyles=t.fromHtml=t.findClosestElementAncestor=t.contains=t.collapseNodes=t.changeElementTag=t.applyFormat=t.getBrowserInfo=t.Browser=t.getPasteType=t.sanitizePasteContent=t.retrieveMetadataFromClipboard=t.handleTextPaste=t.handleImagePaste=t.createFragmentFromClipboardData=t.extractClipboardItemsForIE=t.extractClipboardItems=t.extractClipboardEvent=t.applyTextStyle=t.PartialInlineElement=t.NodeInlineElement=t.LinkInlineElement=t.ImageInlineElement=t.getInlineElementAtNode=t.getDelimiterFromElement=t.addDelimiterBefore=t.addDelimiterAfter=t.addDelimiters=t.PositionContentSearcher=t.ContentTraverser=t.getFirstLastBlockElement=t.getBlockElementAtNode=void 0,t.chainSanitizerCallback=t.createDefaultHtmlSanitizerOptions=t.getInheritableStyles=t.HtmlSanitizer=t.canUndoAutoComplete=t.createSnapshots=t.moveCurrentSnapsnot=t.moveCurrentSnapshot=t.clearProceedingSnapshotsV2=t.clearProceedingSnapshots=t.canMoveCurrentSnapshot=t.addSnapshotV2=t.addSnapshot=t.addRangeToSelection=t.extractContentMetadata=t.setHtmlWithMetadata=t.setHtmlWithSelectionPath=t.getHtmlWithSelectionPath=t.getSelectionPath=t.isPositionAtBeginningOf=t.getPositionRect=t.createRange=t.Position=t.mergeBlocksInRegion=t.getSelectionRangeInRegion=t.isNodeInRegion=t.collapseNodesInRegion=t.getSelectedBlockElementsInRegion=t.getRegionsFromRange=t.saveTableCellMetadata=t.getTableFormatInfo=t.setListItemStyle=t.VListChain=t.createVListFromRegion=t.VListItem=t.VList=t.isWholeTableSelected=t.VTable=t.parseColor=t.isNodeAfter=t.getIntersectedRect=t.moveChildNodes=t.KnownCreateElementData=t.createElement=t.matchesSelector=t.setColor=t.getInnerHTML=t.readFile=t.safeInstanceOf=t.normalizeRect=void 0,t.getPasteSource=t.toArray=t.getObjectKeys=t.arrayPush=t.removeMetadata=t.setMetadata=t.getMetadata=t.createObjectDefinition=t.createArrayDefinition=t.createStringDefinition=t.createBooleanDefinition=t.createNumberDefinition=t.validate=t.getTextContent=t.deleteSelectedContent=t.adjustInsertPosition=t.removeGlobalCssStyle=t.setGlobalCssStyles=t.removeImportantStyleRule=t.setStyles=t.getStyles=t.isCtrlOrMetaPressed=t.isCharacterValue=t.isModifierKey=t.clearEventDataCache=t.cacheGetEventData=t.restoreContentWithEntityPlaceholder=t.moveContentWithEntityPlaceholders=t.createEntityPlaceholder=t.getEntitySelector=t.getEntityFromElement=t.commitEntity=void 0;var r=n(7070);Object.defineProperty(t,"getBlockElementAtNode",{enumerable:!0,get:function(){return r.default}});var o=n(1306);Object.defineProperty(t,"getFirstLastBlockElement",{enumerable:!0,get:function(){return o.default}});var i=n(6754);Object.defineProperty(t,"ContentTraverser",{enumerable:!0,get:function(){return i.default}});var a=n(6091);Object.defineProperty(t,"PositionContentSearcher",{enumerable:!0,get:function(){return a.default}});var l=n(8937);Object.defineProperty(t,"addDelimiters",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"addDelimiterAfter",{enumerable:!0,get:function(){return l.addDelimiterAfter}}),Object.defineProperty(t,"addDelimiterBefore",{enumerable:!0,get:function(){return l.addDelimiterBefore}});var s=n(3765);Object.defineProperty(t,"getDelimiterFromElement",{enumerable:!0,get:function(){return s.default}});var u=n(8153);Object.defineProperty(t,"getInlineElementAtNode",{enumerable:!0,get:function(){return u.default}});var d=n(271);Object.defineProperty(t,"ImageInlineElement",{enumerable:!0,get:function(){return d.default}});var c=n(5672);Object.defineProperty(t,"LinkInlineElement",{enumerable:!0,get:function(){return c.default}});var f=n(8797);Object.defineProperty(t,"NodeInlineElement",{enumerable:!0,get:function(){return f.default}});var p=n(5269);Object.defineProperty(t,"PartialInlineElement",{enumerable:!0,get:function(){return p.default}});var v=n(140);Object.defineProperty(t,"applyTextStyle",{enumerable:!0,get:function(){return v.default}});var h=n(1545);Object.defineProperty(t,"extractClipboardEvent",{enumerable:!0,get:function(){return h.default}});var g=n(3877);Object.defineProperty(t,"extractClipboardItems",{enumerable:!0,get:function(){return g.default}});var m=n(6960);Object.defineProperty(t,"extractClipboardItemsForIE",{enumerable:!0,get:function(){return m.default}});var y=n(1851);Object.defineProperty(t,"createFragmentFromClipboardData",{enumerable:!0,get:function(){return y.default}});var b=n(8736);Object.defineProperty(t,"handleImagePaste",{enumerable:!0,get:function(){return b.default}});var C=n(2543);Object.defineProperty(t,"handleTextPaste",{enumerable:!0,get:function(){return C.default}});var E=n(5673);Object.defineProperty(t,"retrieveMetadataFromClipboard",{enumerable:!0,get:function(){return E.default}});var S=n(5216);Object.defineProperty(t,"sanitizePasteContent",{enumerable:!0,get:function(){return S.default}});var T=n(351);Object.defineProperty(t,"getPasteType",{enumerable:!0,get:function(){return T.default}});var P=n(246);Object.defineProperty(t,"Browser",{enumerable:!0,get:function(){return P.Browser}}),Object.defineProperty(t,"getBrowserInfo",{enumerable:!0,get:function(){return P.getBrowserInfo}});var w=n(5400);Object.defineProperty(t,"applyFormat",{enumerable:!0,get:function(){return w.default}});var _=n(4984);Object.defineProperty(t,"changeElementTag",{enumerable:!0,get:function(){return _.default}});var O=n(8053);Object.defineProperty(t,"collapseNodes",{enumerable:!0,get:function(){return O.default}});var M=n(8655);Object.defineProperty(t,"contains",{enumerable:!0,get:function(){return M.default}});var D=n(3598);Object.defineProperty(t,"findClosestElementAncestor",{enumerable:!0,get:function(){return D.default}});var L=n(5023);Object.defineProperty(t,"fromHtml",{enumerable:!0,get:function(){return L.default}});var R=n(7695);Object.defineProperty(t,"getComputedStyles",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"getComputedStyle",{enumerable:!0,get:function(){return R.getComputedStyle}});var A=n(3764);Object.defineProperty(t,"getPendableFormatState",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"PendableFormatCommandMap",{enumerable:!0,get:function(){return A.PendableFormatCommandMap}});var I=n(3408);Object.defineProperty(t,"getTagOfNode",{enumerable:!0,get:function(){return I.default}});var x=n(5499);Object.defineProperty(t,"isBlockElement",{enumerable:!0,get:function(){return x.default}});var N=n(1657);Object.defineProperty(t,"isNodeEmpty",{enumerable:!0,get:function(){return N.default}});var k=n(8235);Object.defineProperty(t,"isVoidHtmlElement",{enumerable:!0,get:function(){return k.default}});var j=n(844);Object.defineProperty(t,"matchLink",{enumerable:!0,get:function(){return j.default}});var B=n(8471);Object.defineProperty(t,"queryElements",{enumerable:!0,get:function(){return B.default}});var F=n(9381);Object.defineProperty(t,"splitParentNode",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"splitBalancedNodeRange",{enumerable:!0,get:function(){return F.splitBalancedNodeRange}});var H=n(82);Object.defineProperty(t,"unwrap",{enumerable:!0,get:function(){return H.default}});var z=n(4251);Object.defineProperty(t,"wrap",{enumerable:!0,get:function(){return z.default}});var U=n(2513);Object.defineProperty(t,"getNextLeafSibling",{enumerable:!0,get:function(){return U.getNextLeafSibling}}),Object.defineProperty(t,"getPreviousLeafSibling",{enumerable:!0,get:function(){return U.getPreviousLeafSibling}});var K=n(4061);Object.defineProperty(t,"getFirstLeafNode",{enumerable:!0,get:function(){return K.getFirstLeafNode}}),Object.defineProperty(t,"getLastLeafNode",{enumerable:!0,get:function(){return K.getLastLeafNode}});var W=n(7409);Object.defineProperty(t,"splitTextNode",{enumerable:!0,get:function(){return W.default}});var V=n(5203);Object.defineProperty(t,"normalizeRect",{enumerable:!0,get:function(){return V.default}});var q=n(5924);Object.defineProperty(t,"safeInstanceOf",{enumerable:!0,get:function(){return q.default}});var G=n(3126);Object.defineProperty(t,"readFile",{enumerable:!0,get:function(){return G.default}});var Y=n(4746);Object.defineProperty(t,"getInnerHTML",{enumerable:!0,get:function(){return Y.default}});var X=n(7727);Object.defineProperty(t,"setColor",{enumerable:!0,get:function(){return X.default}});var Z=n(5010);Object.defineProperty(t,"matchesSelector",{enumerable:!0,get:function(){return Z.default}});var $=n(6935);Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(t,"KnownCreateElementData",{enumerable:!0,get:function(){return $.KnownCreateElementData}});var Q=n(1473);Object.defineProperty(t,"moveChildNodes",{enumerable:!0,get:function(){return Q.default}});var J=n(3798);Object.defineProperty(t,"getIntersectedRect",{enumerable:!0,get:function(){return J.default}});var ee=n(6997);Object.defineProperty(t,"isNodeAfter",{enumerable:!0,get:function(){return ee.default}});var te=n(8121);Object.defineProperty(t,"parseColor",{enumerable:!0,get:function(){return te.default}});var ne=n(8094);Object.defineProperty(t,"VTable",{enumerable:!0,get:function(){return ne.default}});var re=n(8570);Object.defineProperty(t,"isWholeTableSelected",{enumerable:!0,get:function(){return re.default}});var oe=n(64);Object.defineProperty(t,"VList",{enumerable:!0,get:function(){return oe.default}});var ie=n(711);Object.defineProperty(t,"VListItem",{enumerable:!0,get:function(){return ie.default}});var ae=n(7909);Object.defineProperty(t,"createVListFromRegion",{enumerable:!0,get:function(){return ae.default}});var le=n(4327);Object.defineProperty(t,"VListChain",{enumerable:!0,get:function(){return le.default}});var se=n(3339);Object.defineProperty(t,"setListItemStyle",{enumerable:!0,get:function(){return se.default}});var ue=n(4711);Object.defineProperty(t,"getTableFormatInfo",{enumerable:!0,get:function(){return ue.getTableFormatInfo}});var de=n(3606);Object.defineProperty(t,"saveTableCellMetadata",{enumerable:!0,get:function(){return de.saveTableCellMetadata}});var ce=n(8394);Object.defineProperty(t,"getRegionsFromRange",{enumerable:!0,get:function(){return ce.default}});var fe=n(531);Object.defineProperty(t,"getSelectedBlockElementsInRegion",{enumerable:!0,get:function(){return fe.default}});var pe=n(6688);Object.defineProperty(t,"collapseNodesInRegion",{enumerable:!0,get:function(){return pe.default}});var ve=n(4794);Object.defineProperty(t,"isNodeInRegion",{enumerable:!0,get:function(){return ve.default}});var he=n(4539);Object.defineProperty(t,"getSelectionRangeInRegion",{enumerable:!0,get:function(){return he.default}});var ge=n(2799);Object.defineProperty(t,"mergeBlocksInRegion",{enumerable:!0,get:function(){return ge.default}});var me=n(4630);Object.defineProperty(t,"Position",{enumerable:!0,get:function(){return me.default}});var ye=n(8831);Object.defineProperty(t,"createRange",{enumerable:!0,get:function(){return ye.default}});var be=n(5473);Object.defineProperty(t,"getPositionRect",{enumerable:!0,get:function(){return be.default}});var Ce=n(1431);Object.defineProperty(t,"isPositionAtBeginningOf",{enumerable:!0,get:function(){return Ce.default}});var Ee=n(8805);Object.defineProperty(t,"getSelectionPath",{enumerable:!0,get:function(){return Ee.default}});var Se=n(9372);Object.defineProperty(t,"getHtmlWithSelectionPath",{enumerable:!0,get:function(){return Se.default}});var Te=n(4477);Object.defineProperty(t,"setHtmlWithSelectionPath",{enumerable:!0,get:function(){return Te.default}}),Object.defineProperty(t,"setHtmlWithMetadata",{enumerable:!0,get:function(){return Te.setHtmlWithMetadata}}),Object.defineProperty(t,"extractContentMetadata",{enumerable:!0,get:function(){return Te.extractContentMetadata}});var Pe=n(5537);Object.defineProperty(t,"addRangeToSelection",{enumerable:!0,get:function(){return Pe.default}});var we=n(3680);Object.defineProperty(t,"addSnapshot",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(t,"addSnapshotV2",{enumerable:!0,get:function(){return we.addSnapshotV2}});var _e=n(3205);Object.defineProperty(t,"canMoveCurrentSnapshot",{enumerable:!0,get:function(){return _e.default}});var Oe=n(5892);Object.defineProperty(t,"clearProceedingSnapshots",{enumerable:!0,get:function(){return Oe.default}}),Object.defineProperty(t,"clearProceedingSnapshotsV2",{enumerable:!0,get:function(){return Oe.clearProceedingSnapshotsV2}});var Me=n(5105);Object.defineProperty(t,"moveCurrentSnapshot",{enumerable:!0,get:function(){return Me.default}}),Object.defineProperty(t,"moveCurrentSnapsnot",{enumerable:!0,get:function(){return Me.moveCurrentSnapsnot}});var De=n(7424);Object.defineProperty(t,"createSnapshots",{enumerable:!0,get:function(){return De.default}});var Le=n(6687);Object.defineProperty(t,"canUndoAutoComplete",{enumerable:!0,get:function(){return Le.default}});var Re=n(8488);Object.defineProperty(t,"HtmlSanitizer",{enumerable:!0,get:function(){return Re.default}});var Ae=n(623);Object.defineProperty(t,"getInheritableStyles",{enumerable:!0,get:function(){return Ae.default}});var Ie=n(4834);Object.defineProperty(t,"createDefaultHtmlSanitizerOptions",{enumerable:!0,get:function(){return Ie.default}});var xe=n(585);Object.defineProperty(t,"chainSanitizerCallback",{enumerable:!0,get:function(){return xe.default}});var Ne=n(8839);Object.defineProperty(t,"commitEntity",{enumerable:!0,get:function(){return Ne.default}});var ke=n(3726);Object.defineProperty(t,"getEntityFromElement",{enumerable:!0,get:function(){return ke.default}});var je=n(4965);Object.defineProperty(t,"getEntitySelector",{enumerable:!0,get:function(){return je.default}});var Be=n(3032);Object.defineProperty(t,"createEntityPlaceholder",{enumerable:!0,get:function(){return Be.createEntityPlaceholder}}),Object.defineProperty(t,"moveContentWithEntityPlaceholders",{enumerable:!0,get:function(){return Be.moveContentWithEntityPlaceholders}}),Object.defineProperty(t,"restoreContentWithEntityPlaceholder",{enumerable:!0,get:function(){return Be.restoreContentWithEntityPlaceholder}});var Fe=n(996);Object.defineProperty(t,"cacheGetEventData",{enumerable:!0,get:function(){return Fe.default}});var He=n(2924);Object.defineProperty(t,"clearEventDataCache",{enumerable:!0,get:function(){return He.default}});var ze=n(1045);Object.defineProperty(t,"isModifierKey",{enumerable:!0,get:function(){return ze.default}});var Ue=n(7254);Object.defineProperty(t,"isCharacterValue",{enumerable:!0,get:function(){return Ue.default}});var Ke=n(5188);Object.defineProperty(t,"isCtrlOrMetaPressed",{enumerable:!0,get:function(){return Ke.default}});var We=n(359);Object.defineProperty(t,"getStyles",{enumerable:!0,get:function(){return We.default}});var Ve=n(6092);Object.defineProperty(t,"setStyles",{enumerable:!0,get:function(){return Ve.default}});var qe=n(9130);Object.defineProperty(t,"removeImportantStyleRule",{enumerable:!0,get:function(){return qe.default}});var Ge=n(8182);Object.defineProperty(t,"setGlobalCssStyles",{enumerable:!0,get:function(){return Ge.default}});var Ye=n(4136);Object.defineProperty(t,"removeGlobalCssStyle",{enumerable:!0,get:function(){return Ye.default}});var Xe=n(2738);Object.defineProperty(t,"adjustInsertPosition",{enumerable:!0,get:function(){return Xe.default}});var Ze=n(3030);Object.defineProperty(t,"deleteSelectedContent",{enumerable:!0,get:function(){return Ze.default}});var $e=n(8606);Object.defineProperty(t,"getTextContent",{enumerable:!0,get:function(){return $e.default}});var Qe=n(2373);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return Qe.default}});var Je=n(681);Object.defineProperty(t,"createNumberDefinition",{enumerable:!0,get:function(){return Je.createNumberDefinition}}),Object.defineProperty(t,"createBooleanDefinition",{enumerable:!0,get:function(){return Je.createBooleanDefinition}}),Object.defineProperty(t,"createStringDefinition",{enumerable:!0,get:function(){return Je.createStringDefinition}}),Object.defineProperty(t,"createArrayDefinition",{enumerable:!0,get:function(){return Je.createArrayDefinition}}),Object.defineProperty(t,"createObjectDefinition",{enumerable:!0,get:function(){return Je.createObjectDefinition}});var et=n(7570);Object.defineProperty(t,"getMetadata",{enumerable:!0,get:function(){return et.getMetadata}}),Object.defineProperty(t,"setMetadata",{enumerable:!0,get:function(){return et.setMetadata}}),Object.defineProperty(t,"removeMetadata",{enumerable:!0,get:function(){return et.removeMetadata}});var tt=n(8605);Object.defineProperty(t,"arrayPush",{enumerable:!0,get:function(){return tt.default}});var nt=n(4709);Object.defineProperty(t,"getObjectKeys",{enumerable:!0,get:function(){return nt.default}});var rt=n(8375);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return rt.default}});var ot=n(6433);Object.defineProperty(t,"getPasteSource",{enumerable:!0,get:function(){return ot.default}})},8251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.position=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return""},e.prototype.getContainerNode=function(){return this.position.node},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return this.position},e.prototype.getEndPosition=function(){return this.position},e.prototype.isAfter=function(e){return e&&this.position.isAfter(e.getEndPosition())},e.prototype.isTextualInlineElement=function(){return!1},e.prototype.contains=function(e){return!1},e.prototype.applyStyle=function(e){},e}();t.default=n},271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e){function t(t,n){return e.call(this,t,n)||this}return(0,r.__extends)(t,e),t}(n(8797).default);t.default=o},5672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e){function t(t,n){return e.call(this,t,n)||this}return(0,r.__extends)(t,e),t}(n(8797).default);t.default=o},8797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(140),o=n(6997),i=n(4630),a=function(){function e(e,t){this.containerNode=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return(3==this.containerNode.nodeType?this.containerNode.nodeValue:this.containerNode.textContent)||""},e.prototype.getContainerNode=function(){return this.containerNode},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return new i.default(this.containerNode,0).normalize()},e.prototype.getEndPosition=function(){return new i.default(this.containerNode,-1).normalize()},e.prototype.isTextualInlineElement=function(){return this.containerNode&&3==this.containerNode.nodeType},e.prototype.isAfter=function(e){return e&&(0,o.default)(this.containerNode,e.getContainerNode())},e.prototype.contains=function(e){var t=this.getStartPosition(),n=this.getEndPosition();return e&&e.isAfter(t)&&n.isAfter(e)},e.prototype.applyStyle=function(e){(0,r.default)(this.containerNode,e)},e}();t.default=a},5269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(140),o=n(8831),i=n(4630),a=n(2513),l=function(){function e(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.inlineElement=e,this.start=t,this.end=n}return e.prototype.getDecoratedInline=function(){return this.inlineElement},e.prototype.getContainerNode=function(){return this.inlineElement.getContainerNode()},e.prototype.getParentBlock=function(){return this.inlineElement.getParentBlock()},e.prototype.getTextContent=function(){return(0,o.default)(this.getStartPosition(),this.getEndPosition()).toString()},e.prototype.getStartPosition=function(){return this.start||this.inlineElement.getStartPosition()},e.prototype.getEndPosition=function(){return this.end||this.inlineElement.getEndPosition()},Object.defineProperty(e.prototype,"nextInlineElement",{get:function(){return this.end?new e(this.inlineElement,this.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousInlineElement",{get:function(){return this.start?new e(this.inlineElement,void 0,this.start):null},enumerable:!1,configurable:!0}),e.prototype.contains=function(e){return e&&e.isAfter(this.getStartPosition())&&this.getEndPosition().isAfter(e)},e.prototype.isTextualInlineElement=function(){return this.inlineElement&&this.inlineElement.isTextualInlineElement()},e.prototype.isAfter=function(e){var t=this.getStartPosition(),n=e&&e.getEndPosition();return n&&(t.isAfter(n)||t.equalTo(n))},e.prototype.applyStyle=function(e){var t=this.getStartPosition().normalize(),n=this.getEndPosition().normalize(),o=this.getContainerNode();if(t.isAtEnd){var l=(0,a.getNextLeafSibling)(o,t.node);t=l?new i.default(l,0):null}if(0==n.offset){var s=(0,a.getPreviousLeafSibling)(o,n.node);n=s?new i.default(s,-1):null}(0,r.default)(o,e,t||void 0,n||void 0)},e}();t.default=l},140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=n(4630),i=n(7409),a=n(4251),l=n(2513),s=n(9381),u=n(5924),d="SPAN,B,I,U,EM,STRONG,STRIKE,S,SMALL,SUP,SUB".split(",");function c(e,t){e&&1==e.nodeType&&t(e,!0)}t.default=function(e,t,n,f){void 0===n&&(n=new o.default(e,0).normalize()),void 0===f&&(f=new o.default(e,-1).normalize());for(var p=[],v=n,h=f;v&&h&&h.isAfter(v);){var g=v.node,m=(0,r.default)(g.parentNode),y=(0,l.getNextLeafSibling)(e,g);3==g.nodeType&&["TR","TABLE"].indexOf(m)<0&&(g!=h.node||h.isAtEnd||(g=(0,i.default)(g,h.offset,!0)),v.offset>0&&(g=(0,i.default)(g,v.offset,!1)),p.push(g)),v=y&&new o.default(y,0)}if(p.length>0){if(p.every((function(e){return e.parentNode==p[0].parentNode}))){var b=p.shift();p.forEach((function(e){var t,n=(b.nodeValue||"")+(e.nodeValue||"");b.nodeValue=n,null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),p=[b]}p.forEach((function(e){for(var n=e;n&&"SPAN"!=(0,r.default)(n)&&d.indexOf((0,r.default)(n.parentNode))>=0;)c(n,t),n=(0,s.splitBalancedNodeRange)(n);n&&"SPAN"!=(0,r.default)(n)&&(c(n,t),n=(0,a.default)(n,"SPAN")),(0,u.default)(n,"HTMLElement")&&t(n)}))}}},7229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastInlineElement=t.getFirstInlineElement=void 0;var r=n(8153),o=n(4061);t.getFirstInlineElement=function(e){var t=(0,o.getFirstLeafNode)(e);return t?(0,r.default)(e,t):null},t.getLastInlineElement=function(e){var t=(0,o.getLastLeafNode)(e);return t?(0,r.default)(e,t):null}},8153:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7070),o=n(3408),i=n(271),a=n(5672),l=n(8797),s=n(5924);t.default=function(e,t){var n=(0,s.default)(e,"Node")?(0,r.default)(e,t):e;return t&&n&&function(e,t){for(var n,r=[e],s=e.parentNode;s&&t.contains(s);s=s.parentNode)r.push(s);for(var u=r.length-1;u>=0&&!n;u--){var d=r[u],c=(0,o.default)(d);"A"==c?n=new a.default(d,t):"IMG"==c&&(n=new i.default(d,t))}return n||new l.default(e,t)}(t,n)}},2571:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInlineElementBeforeAfter=t.getInlineElementAfter=t.getInlineElementBefore=void 0;var r=n(8153),o=n(5269),i=n(1630),a=n(2513);function l(e,t,n){if(!e||!t||!t.node)return null;var l=(t=t.normalize()).offset,s=t.isAtEnd,u=t.node,d=!1;!n&&0==l&&!s||n&&s?u=(0,a.getLeafSibling)(e,u,n):3==u.nodeType&&(!n&&!s||n&&l>0)&&(d=!0),u&&(0,i.default)(u)&&(u=(0,a.getLeafSibling)(e,u,n));var c=(0,r.default)(e,u);return c&&(d||c.contains(t))&&(c=n?new o.default(c,t,void 0):new o.default(c,void 0,t)),c}t.getInlineElementBefore=function(e,t){return l(e,t,!1)},t.getInlineElementAfter=function(e,t){return l(e,t,!0)},t.getInlineElementBeforeAfter=l},8605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){Array.prototype.push.apply(e,t)}},4709:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e)}},8375:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e)}},64:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4984),i=n(2042),a=n(3408),l=n(5499),s=n(1657),u=n(4630),d=n(8471),c=n(5924),f=n(9381),p=n(8375),v=n(82),h=n(711),g=n(4251),m=n(7570),y=function(){function e(e){if(this.rootList=e,this.items=[],!e)throw new Error("rootList must not be null");b(this.rootList),(0,d.default)(this.rootList,"ol,ul",b),(0,d.default)(this.rootList,"li",C),this.populateItems(this.rootList)}return e.prototype.contains=function(e){return this.items.some((function(t){return t.contains(e)}))},e.prototype.getLastItemNumber=function(){var e=this.getStart();return void 0===e?e:e-1+this.items.filter((function(e){return 1==e.getListType()&&1==e.getLevel()&&!e.isDummy()})).length},e.prototype.writeBack=function(e,t){var n=this;if(!this.rootList)throw new Error("rootList must not be null");var r,o=this.rootList.ownerDocument,i=[o.createDocumentFragment()],a=o.createTextNode(""),l=this.getStart()||1;this.rootList.parentNode.replaceChild(a,this.rootList),this.items.forEach((function(o){var a=o.getNewListStart();a&&a!=l&&(i.splice(1,i.length-1),l=a),o.writeBack(i,n.rootList,e);var s=i[1];o.applyListStyle(n.rootList,l),(0,c.default)(s,"HTMLOListElement")&&(r!=s&&(1==l?s.removeAttribute("start"):s.start=l),1!=o.getLevel()||o.isDummy()||t||l++),r=s})),a.parentNode.replaceChild(i[0],a)},e.prototype.split=function(e,t){if(!this.rootList)throw new Error("rootList must not be null");for(var n=0;n=0?Math.min(this.items.length-1,a):a;var l=i<=a?this.items.slice(i,a+1):[];return n&&l.forEach(n),l},e.prototype.populateItems=function(e,t){var n=this;void 0===t&&(t=[]);var o=(0,i.default)(e);(0,p.default)(e.childNodes).forEach((function(e){var a=(0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(t),!1),[o],!1);(0,i.isListElement)(e)?n.populateItems(e,a):3==e.nodeType&&""==(e.nodeValue||"").trim()||n.items.push(new(h.default.bind.apply(h.default,(0,r.__spreadArray)([void 0,e],(0,r.__read)(a),!1))))}))},e}();function b(e){var t=null;(0,p.default)(e.childNodes).forEach((function(e){"LI"==(0,a.default)(e)?t=e:(0,i.isListElement)(e)?t=null:t&&!(0,s.default)(e,!0)&&t.appendChild((0,l.default)(e)?e:(0,g.default)(e))}))}function C(e){for(;!(0,i.isListElement)(e.parentNode);){(0,f.default)(e,!0);var t=(0,p.default)(e.parentNode.childNodes).slice(1);t.length>0&&((0,l.default)(t[0])||(t=[(0,g.default)(t)]),t.forEach((function(t){return e.appendChild(t)}))),(0,v.default)(e.parentNode)}}function E(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8605),o=n(6133),i=n(6997),a=n(4794),l=n(8471),s=n(64),u="listchain",d="listchainafter",c=0,f=function(){function e(e,t){this.region=e,this.name=t,this.lastNumber=0,this.lastNumberBeforeCursor=0}return e.createListChains=function(t,n,a){var s=Array.isArray(t)?t:t?[t]:[],u=[];return s.forEach((function(t){var s,d=[];(0,l.default)(t.rootNode,"ol",(function(r){var l=(0,o.default)(t,"ol",r);if(s!=l){var u=d.filter((function(e){return e.canAppendToTail(l)}))[0]||new e(t,(a||p)()),c=d.indexOf(u),f=!!n&&(0,i.default)(l,n);f?c<0&&d.push(u):(c>=0&&d.splice(c,1),d.unshift(u)),u.append(l,f),s=l}})),(0,r.default)(u,d)})),u},e.prototype.canAppendAtCursor=function(e){return e>1&&this.lastNumberBeforeCursor+1==e},e.prototype.createVListAtBlock=function(e,t){if(e&&e.parentNode){var n=e.ownerDocument.createElement("ol");n.start=t,this.applyChainName(n),e.parentNode.insertBefore(n,e);var r=new s.default(n);return r.appendItem(e,0),r}return null},e.prototype.commit=function(e,t){for(var n=this.getLists(),r=0,o=0;o1?i.start=i.start===r?r+1:i.start:i.start=r+1);var a=new s.default(i);r=a.getLastItemNumber()||0,delete i.dataset[u],delete i.dataset[d],a.writeBack(e)}},e.prototype.canAppendToTail=function(e){return this.lastNumber+1==e.start},e.prototype.append=function(e,t){this.applyChainName(e),this.lastNumber=new s.default(e).getLastItemNumber()||0,t?e.dataset[d]="true":this.lastNumberBeforeCursor=this.lastNumber},e.prototype.applyChainName=function(e){e.dataset[u]=this.name},e.prototype.getLists=function(){var e=this;return(0,l.default)(this.region.rootNode,"ol[data-"+u+"="+this.name+"]").filter((function(t){return(0,a.default)(e.region,t)}))},e}();function p(){return"__List_Chain_"+c++}t.default=f},711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListStyleDefinitionMetadata=void 0;var r=n(7582),o=n(8655),i=n(2042),a=n(359),l=n(3408),s=n(5499),u=n(1473),d=n(5924),c=n(3848),f=n(3339),p=n(8275),v=n(6092),h=n(8375),g=n(82),m=n(4251),y=n(681),b=n(7570),C=[null,"lower-alpha","lower-roman"],E=["disc","circle","square"],S="-.25in",T=["font-size","font-family","color"],P=["data-ogsc","data-ogsb","data-ogac","data-ogab"];t.ListStyleDefinitionMetadata=(0,y.createObjectDefinition)({orderedStyleType:(0,y.createNumberDefinition)(!0,void 0,1,20),unorderedStyleType:(0,y.createNumberDefinition)(!0,void 0,1,9)},!0,!0);var w=function(){function e(e){for(var t=[],n=1;nt&&this.listTypes.pop()},e.prototype.addNegativeMargins=function(){this.node.style.margin="0in 0in 0in 0.5in",this.node.style.marginLeft=S},e.prototype.changeListType=function(e){0==e?this.listTypes=[e]:(this.outdent(),this.listTypes.push(e))},e.prototype.setIsDummy=function(e){this.dummy=e},e.prototype.setNewListStart=function(e){this.newListStart=e},e.prototype.applyListStyle=function(e,n){var r=(0,b.getMetadata)(e,t.ListStyleDefinitionMetadata),o=this.listTypes.length<3;r&&(o&&2===this.listTypes[1]&&r.unorderedStyleType?(0,c.default)(this.node,r.unorderedStyleType):o&&1===this.listTypes[1]&&r.orderedStyleType?(0,p.default)(this.node,r.orderedStyleType,n):this.node.style.removeProperty("list-style-type"))},e.prototype.writeBack=function(e,t,n){var o,s=this;void 0===n&&(n=!1);var u,c,p=1;if(n){e.length>this.listTypes.length&&e.splice(this.listTypes.length);var y=e.length-1;y===this.listTypes.length-1&&(0,i.default)(e[y])!==this.listTypes[y]&&e.splice(y),p=e.length}else for(;p1&&((0,f.default)(this.node,T,!0),(0,f.default)(this.node,P,!1)),this.listTypes.length<=1){var S="LI"==(0,l.default)(this.node),w=S?{"font-family":this.node.style.fontFamily,"font-size":this.node.style.fontSize,color:this.node.style.color}:void 0,M=S?(u=this.node,c=(0,h.default)(u.childNodes),(0,g.default)(u),c):[this.node];if(w)for(var D=function(e){(0,d.default)(M[e],"Text")&&(M[e]=(0,m.default)(M[e],"span"));var t=M[e];if((0,d.default)(t,"HTMLElement")){var n=(0,r.__assign)((0,r.__assign)({},w),(0,a.default)(t));(0,v.default)(t,n),P.forEach((function(e){var n=s.node.getAttribute(e);n&&t.setAttribute(e,n)}))}},L=0;L1&&l.style.setProperty("list-style-type",C[(r-1)%C.length]),2==n&&r>1&&l.style.setProperty("list-style-type",E[(r-1)%E.length]),l}function O(e,t,n){return!(e.length>0)||t&&(0,s.default)(e[0])||n&&(0,s.default)(e[e.length])||(e=[(0,m.default)(e)]),e}t.default=w},6692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T",20:"U",21:"V",22:"W",23:"X",24:"Y",25:"Z"};t.default=function(e,t){for(var r="";e>=0;)r=n[e%26]+r,e=Math.floor(e/26)-1;return t?r.toLowerCase():r}},4321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4709),i={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1};t.default=function(e,t){var n,a,l="";try{for(var s=(0,r.__values)((0,o.default)(i)),u=s.next();!u.done;u=s.next()){var d=u.value,c=Math.floor(e/i[d]);e-=c*i[d],l+=d.repeat(c)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(n)throw n.error}}return t?l.toLocaleLowerCase():l}},7909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6935),o=n(6133),i=n(531),a=n(4794),l=n(4630),s=n(5924),u=n(1630),d=n(8375),c=n(64),f=n(4251),p=n(2513),v=n(2042),h="ol,ul";function g(e,t,n){var r=t[n?t.length-1:0];r=(0,p.getLeafSibling)(e.rootNode,r,n,e.skipTags,!0),r=(0,o.default)(e,h,r),(0,a.default)(e,r)&&(0,v.isListElement)(r)&&(n?(0,s.default)(r,"HTMLOListElement")&&1!=r.start||t.push(r):t.unshift(r))}t.default=function(e,t,n){if(!e)return null;var a=[];if(n){var p=(0,o.default)(e,h,n);p&&a.push(p)}else{if((0,i.default)(e,void 0,!0).forEach((function(n){var r=(0,o.default)(e,h,n.getStartNode());r?(a[a.length-1]!=r&&a.push(r),1==a.length&&(0,s.default)(r,"HTMLOListElement")&&r.start>1&&(t=!1)):a.push(n.collapseToSingleElement())})),0==a.length&&!e.rootNode.firstChild){var m=(0,r.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(m),a.push(m),e.fullSelectionStart=new l.default(m,0),e.fullSelectionEnd=new l.default(m,-1)}t&&(g(e,a,!1),g(e,a,!0)),a=a.filter((function(e){return!(0,u.default)(e,!0)}))}var y=null;if(a.length>0){var b=a.shift()||null;(y=(0,v.isListElement)(b)?new c.default(b):b?function(e){var t=(0,d.default)(e.childNodes),n=1==t.length?t[0]:(0,f.default)(t,"SPAN"),r=e.ownerDocument.createElement("ol");e.appendChild(r);var o=new c.default(r);return o.appendItem(n,0),o}(b):null)&&a.forEach((function(e){(0,v.isListElement)(e)?y.mergeVList(new c.default(e)):y.appendItem(e,0)}))}return y}},2042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isListElement=void 0;var r=n(3408);function o(e){switch((0,r.default)(e)){case"OL":return 1;case"UL":return 2;default:return 0}}t.default=o,t.isListElement=function(e){return 0!=o(e)}},6133:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3598);t.default=function(e,t,n){var o=e&&(0,r.default)(n,e.rootNode,t);if(o)for(var i=void 0;i=(0,r.default)(o.parentNode,e.rootNode,t);)o=i;return o}},3848:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=r[t],o=1===t;e.style.listStyleType=o?n:'"'+n+'"'};var r=((n={})[1]="disc",n[3]="∎ ",n[2]="- ",n[5]="➔ ",n[8]="➔ ",n[4]="➢ ",n[6]="➪ ",n[7]="— ",n)},3339:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754),o=n(3598),i=n(5924);t.default=function(e,t,n){void 0===n&&(n=!0);var a=function(e,t,n){for(var a,l,s=[],u=r.default.createBodyTraverser(e),d=null,c=function(){var r=(null==(d=u.currentInlineElement)?void 0:d.getContainerNode())||null,c=null;r=r?(0,o.default)(r):null;for(var f=function(){var e=r;t.forEach((function(t){var r=n?e.style.getPropertyValue(t):e.getAttribute(t);c||(c={}),r&&!c[t]&&(c[t]=r)})),r=1===(null===(l=null==r?void 0:r.parentNode)||void 0===l?void 0:l.childNodes.length)?r.parentNode:null};r&&r!==e&&(0,i.default)(r,"HTMLElement")&&(0==s.length||((null===(a=r.textContent)||void 0===a?void 0:a.trim().length)||0)>0);)f();c&&s.push(c),u.getNextInlineElement()};u.currentInlineElement!=d;)c();return s}(e,t,n);t.forEach((function(t){var r=a.map((function(e){return void 0!==e[t]?e[t]:""}));r&&(1==r.length||1==new Set(r).size)&&r[0]&&(n?e.style.setProperty(t,r[0]):e.setAttribute(t,r[0]))}))}},8275:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(6692),a=n(4321);!function(e){e[e.Decimal=0]="Decimal",e[e.Roman=1]="Roman",e[e.Alpha=2]="Alpha"}(o||(o={})),t.default=function(e,t,n){var r=l[t],s=r.markerSeparator,u=r.markerSecondSeparator,d=r.markerType,c=r.lowerCase,f=n.toString();d===o.Roman?f=(0,a.default)(n,c):d===o.Alpha&&(f=(0,i.default)(n-1,c));var p=u?u+f+s:f+s;e.style.listStyleType='"'+p+'"'};var l=((r={})[1]={markerType:o.Decimal,markerSeparator:". "},r[2]={markerType:o.Decimal,markerSeparator:"- "},r[3]={markerType:o.Decimal,markerSeparator:") "},r[4]={markerType:o.Decimal,markerSeparator:") ",markerSecondSeparator:"("},r[5]={markerType:o.Alpha,markerSeparator:". ",lowerCase:!0},r[8]={markerType:o.Alpha,markerSeparator:"- ",lowerCase:!0},r[6]={markerType:o.Alpha,markerSeparator:") ",lowerCase:!0},r[7]={markerType:o.Alpha,markerSeparator:") ",markerSecondSeparator:"(",lowerCase:!0},r[9]={markerType:o.Alpha,markerSeparator:". "},r[12]={markerType:o.Alpha,markerSeparator:"- "},r[10]={markerType:o.Alpha,markerSeparator:") "},r[11]={markerType:o.Alpha,markerSeparator:") ",markerSecondSeparator:"("},r[13]={markerType:o.Roman,markerSeparator:". ",lowerCase:!0},r[16]={markerType:o.Roman,markerSeparator:"- ",lowerCase:!0},r[14]={markerType:o.Roman,markerSeparator:") ",lowerCase:!0},r[15]={markerType:o.Roman,markerSeparator:") ",markerSecondSeparator:"(",lowerCase:!0},r[17]={markerType:o.Roman,markerSeparator:". "},r[20]={markerType:o.Roman,markerSeparator:"- "},r[18]={markerType:o.Roman,markerSeparator:") "},r[19]={markerType:o.Roman,markerSeparator:") ",markerSecondSeparator:"("},r)},681:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObjectDefinition=t.createArrayDefinition=t.createStringDefinition=t.createBooleanDefinition=t.createNumberDefinition=void 0,t.createNumberDefinition=function(e,t,n,r,o){return{type:1,isOptional:e,value:t,maxValue:r,minValue:n,allowNull:o}},t.createBooleanDefinition=function(e,t,n){return{type:0,isOptional:e,value:t,allowNull:n}},t.createStringDefinition=function(e,t,n){return{type:2,isOptional:e,value:t,allowNull:n}},t.createArrayDefinition=function(e,t,n,r,o){return{type:3,isOptional:t,itemDef:e,minLength:n,maxLength:r,allowNull:o}},t.createObjectDefinition=function(e,t,n){return{type:4,isOptional:t,propertyDef:e,allowNull:n}}},7570:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeMetadata=t.setMetadata=t.getMetadata=void 0;var r=n(2373),o="editingInfo";t.getMetadata=function(e,t,n){var i,a=e.dataset[o];try{i=a?JSON.parse(a):null}catch(e){}if(void 0!==i){if(!t)return i;if((0,r.default)(i,t))return i}return n||null},t.setMetadata=function(e,t,n){return!(n&&!(0,r.default)(t,n)||(e.dataset[o]=JSON.stringify(t),0))},t.removeMetadata=function(e){delete e.dataset[o]}},2373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4709);t.default=function e(t,n){var o,i,a=!1;if(n.isOptional&&void 0===t||n.allowNull&&null===t)a=!0;else{if(!n.isOptional&&void 0===t||!n.allowNull&&null===t)return!1;switch(n.type){case 2:a="string"==typeof t&&(void 0===n.value||t===n.value);break;case 1:a="number"==typeof t&&(void 0===n.value||(o=n.value,i=t,Math.abs(o-i)<.001))&&(void 0===n.minValue||t>=n.minValue)&&(void 0===n.maxValue||t<=n.maxValue);break;case 0:a="boolean"==typeof t&&(void 0===n.value||t===n.value);break;case 3:a=Array.isArray(t)&&(void 0===n.minLength||t.length>=n.minLength)&&(void 0===n.maxLength||t.length<=n.maxLength)&&t.every((function(t){return e(t,n.itemDef)}));break;case 4:a="object"==typeof t&&(0,r.default)(n.propertyDef).every((function(r){return e(t[r],n.propertyDef[r])}));break;case 5:a=n.validator(t)}}return a}},2881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXCEL_DESKTOP_ATTRIBUTE_NAME=t.PROG_ID_NAME=t.GOOGLE_SHEET_NODE_NAME=void 0,t.GOOGLE_SHEET_NODE_NAME="google-sheets-html-origin",t.PROG_ID_NAME="ProgId",t.EXCEL_DESKTOP_ATTRIBUTE_NAME="xmlns:x"},7477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e.fragment.querySelector('ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer')}},6433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7477),o=n(2586),i=n(4675),a=n(3810),l=n(7050),s=n(8064),u=n(8773),d=new Map([[0,s.default],[1,o.default],[2,i.default],[3,l.default],[5,r.default],[4,a.default],[7,u.default]]);t.default=function(e,t){var n=e.htmlAttributes,r=e.clipboardData,o=e.fragment,i=null,a={htmlAttributes:n,fragment:o,shouldConvertSingleImage:t,clipboardData:r};return d.forEach((function(e,t){!i&&e(a)&&(i=t)})),null!=i?i:6}},2586:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){return"urn:schemas-microsoft-com:office:excel"==e.htmlAttributes[r.EXCEL_DESKTOP_ATTRIBUTE_NAME]}},4675:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){var t=e.htmlAttributes;return"Excel.Sheet"==t[r.PROG_ID_NAME]&&null==t[r.EXCEL_DESKTOP_ATTRIBUTE_NAME]}},3810:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){return!!e.fragment.querySelector(r.GOOGLE_SHEET_NODE_NAME)}},7050:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){return"PowerPoint.Slide"==e.htmlAttributes[r.PROG_ID_NAME]}},8064:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){var t=e.htmlAttributes;return"urn:schemas-microsoft-com:office:word"==t["xmlns:w"]||"Word.Document"==t[r.PROG_ID_NAME]}},8773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.shouldConvertSingleImage,r=e.clipboardData;return n&&1==(null===(t=r.htmlFirstLevelChildTags)||void 0===t?void 0:t.length)&&"IMG"==r.htmlFirstLevelChildTags[0]}},6688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8053),o=n(4794),i=n(5924);t.default=function(e,t){if(!t||0==t.length)return[];var n=(0,i.default)(t[0],"Node")?t:[t[0].getStartNode(),t[t.length-1].getEndNode()],a=(n=n&&n.filter((function(t){return(0,o.default)(e,t)})))[0],l=n[n.length-1];return(0,o.default)(e,a)&&(0,o.default)(e,l)?(0,r.default)(e.rootNode,a,l,!0):[]}},8394:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getRegionCreator=void 0;var o=n(7582),i=n(8655),a=n(3598),l=n(4630),s=n(8471),u=n(2513),d=((r={})[0]={skipTags:["TABLE"],outerSelector:"table",innerSelector:"td,th"},r);function c(e,t){var n=l.default.getStart(e).normalize(),r=l.default.getEnd(e).normalize();return function(e,o,a){return function(e,t,n,r){if(e){var o=t&&(0,u.getNextLeafSibling)(e,t,r),a=n&&(0,u.getPreviousLeafSibling)(e,n,r),l=!t||(0,i.default)(e,t)&&(0,i.default)(e,o),s=!n||(0,i.default)(e,n)&&(0,i.default)(e,a),d=!(t&&n&&((0,i.default)(t,n,!0)||(0,i.default)(t,a,!0)||(0,i.default)(n,t,!0)||(0,i.default)(n,o,!0)));return l&&s&&d}return!1}(e,o,a,t)?{rootNode:e,nodeBefore:o,nodeAfter:a,skipTags:t,fullSelectionStart:n,fullSelectionEnd:r}:null}}function f(e,t,n,r,i){var a;i=i||t.innerNode==n;var l=!1,s=t.children,u=t.innerNode,d=[];if(0==s.length)(p=e(u))&&d.push(p);else for(var c=0;c<=s.length&&!l;c++){var p,v=s[c]||{},h=v.outerNode,g=v.boundaries,m=null===(a=s[c-1])||void 0===a?void 0:a.outerNode;i&&(p=e(u,m,h))&&d.push(p),null==g||g.forEach((function(t){var a,s;s=(a=(0,o.__read)(f(e,t,n,r,i),3))[0],i=a[1],l=a[2],d=d.concat(s)}))}return[d,i,l||u==r]}t.default=function(e,t,n){var r=[];if(e&&t){var l=d[n],u=l.innerSelector,p=l.skipTags,v=function(e,t,n){var r=[{innerNode:e,children:[]}],o=d[n],l=o.outerSelector,u=o.innerSelector,c=(0,s.default)(e,l,null,2,t);return(0,s.default)(e,u,(function(t){var n=(0,a.default)(t,e,l);if(n&&c.indexOf(n)<0){for(var o={innerNode:t,children:[]},s=r.length-1;s>=0;s--){var u=r[s],d=u.innerNode,f=u.children;if((0,i.default)(d,n)){var p=f.filter((function(e){return e.outerNode==n}))[0];p||(p={outerNode:n,boundaries:[]},f.push(p)),p.boundaries.push(o);break}}r.push(o)}}),1,t),r[0]}(e,t,n),h=(0,a.default)(t.startContainer,e,u)||e,g=(0,a.default)(t.endContainer,e,u)||e,m=c(t,p);r=(0,o.__read)(f(m,v,h,g),1)[0]}return r.filter((function(e){return!!e}))},t.getRegionCreator=c},531:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754),o=n(6935),i=n(7070),a=n(4539),l=n(1630);t.default=function(e,t,n){var s=(0,a.default)(e),u=[];if(s){for(var d=e.rootNode,c=e.skipTags,f=r.default.createSelectionTraverser(d,s,c),p=null==f?void 0:f.currentBlockElement;p;p=f.getNextBlockElement())u.push(p);u=u.filter((function(e){var t,n=e.getStartNode();return n!=e.getEndNode()||!(0,l.default)(n,!0)||(null===(t=n.parentNode)||void 0===t||t.removeChild(n),!1)}))}if(0==u.length&&e&&!e.rootNode.firstChild&&t){var v=(0,o.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(v),(p=(0,i.default)(e.rootNode,v))&&u.push(p)}return u}},4539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8831),o=n(4630),i=n(2513);t.default=function(e){if(!e)return null;var t=e.nodeBefore,n=e.nodeAfter,a=e.rootNode,l=e.skipTags,s=t?(0,i.getNextLeafSibling)(e.rootNode,t,e.skipTags):a.firstChild,u=n?(0,i.getPreviousLeafSibling)(a,n,l):a.lastChild,d=s&&u&&(0,r.default)(s,u);if(!function(e){var t=e;return!!t.fullSelectionEnd&&!!t.fullSelectionStart}(e))return d;if(d){var c=o.default.getStart(d).normalize(),f=o.default.getEnd(d).normalize(),p=e.fullSelectionEnd,v=e.fullSelectionStart;if(!v.isAfter(f)&&!c.isAfter(p)){var h=v.isAfter(c)?v:c,g=p.isAfter(f)?f:p;return(0,r.default)(h,g)}}return null}},4794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655);t.default=function(e,t){return!(!e||!(0,r.default)(e.rootNode,t)||e.nodeBefore&&4!=e.nodeBefore.compareDocumentPosition(t)||e.nodeAfter&&2!=e.nodeAfter.compareDocumentPosition(t))}},2799:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4984),i=n(8655),a=n(7070),l=n(4869),s=n(359),u=n(4794),d=n(5924),c=n(6092),f=n(8053);t.default=function(e,t,n){var p,v,h,g;if((0,u.default)(e,t)&&(0,u.default)(e,n)&&(g=(0,a.default)(e.rootNode,n))&&!g.contains(t)){for(var m=g.collapseToSingleElement(),y=(0,f.collapse)(e.rootNode,m,t,!1,!0),b=m;(0,i.default)(y,b);){var C=b.parentNode;if((0,d.default)(C,"HTMLElement")){var E=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},(0,l.default)(C)||{}),(0,s.default)(C)),(0,s.default)(m));(0,c.default)(m,E)}b=C}var S=null,T=1==m.childNodes.length&&0==m.attributes.length?m.firstChild:(0,o.default)(m,"SPAN");for(b=T;(0,i.default)(y,b)&&1==(null===(p=b.parentNode)||void 0===p?void 0:p.childNodes.length);b=b.parentNode)S=b.parentNode;null===(v=t.parentNode)||void 0===v||v.insertBefore(T,t.nextSibling),null===(h=null==S?void 0:S.parentNode)||void 0===h||h.removeChild(S)}}},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3598),o=n(6997),i=function(){function e(e,t,n){switch(void 0===t&&(t=0),this.isFromEndOfRange=n,e.node?(this.node=e.node,t=e.offset):this.node=e,t){case-2:this.offset=a(this.node),this.node=this.node.parentNode,this.isAtEnd=!1;break;case-3:this.offset=a(this.node)+1,this.isAtEnd=!this.node.nextSibling,this.node=this.node.parentNode;break;case-1:this.offset=l(this.node),this.isAtEnd=!0;break;default:var o=l(this.node);this.offset=Math.max(0,Math.min(t,o)),this.isAtEnd=t>0&&t>=o}this.element=(0,r.default)(this.node)}return e.prototype.normalize=function(){if(3==this.node.nodeType||!this.node.firstChild)return this;for(var t=this.node,n=this.isAtEnd?-1:this.offset;1==t.nodeType||11==t.nodeType;){var r=this.isFromEndOfRange?-1==n?t.lastChild:t.childNodes[n-1]:0==n?t.firstChild:-1==n?t.lastChild:t.childNodes[n];if(!r)break;t=r,n=this.isAtEnd||this.isFromEndOfRange?-1:0}return new e(t,n,this.isFromEndOfRange)},e.prototype.equalTo=function(e){return e&&(this==e||this.node==e.node&&this.offset==e.offset&&this.isAtEnd==e.isAtEnd)},e.prototype.isAfter=function(e){return this.node==e.node?this.isAtEnd&&!e.isAtEnd||this.offset>e.offset:(0,o.default)(this.node,e.node)},e.prototype.move=function(t){return new e(this.node,Math.max(this.offset+t,0))},e.getStart=function(t){return new e(t.startContainer,t.startOffset)},e.getEnd=function(t){return t.collapsed?e.getStart(t):new e(t.endContainer,t.endOffset,!0)},e}();function a(e){for(var t=0;e=(null==e?void 0:e.previousSibling)||null;)t++;return t}function l(e){var t;return 3==e.nodeType?(null===(t=e.nodeValue)||void 0===t?void 0:t.length)||0:1==e.nodeType||11==e.nodeType?e.childNodes.length:1}t.default=i},5537:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(246);t.default=function(e,t){var n,o,i,a=null===(i=null===(o=null===(n=null==e?void 0:e.commonAncestorContainer)||void 0===n?void 0:n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===i?void 0:i.getSelection();if(a){var l=!0;if(a.rangeCount>0)try{var s=null;(t||r.Browser.isEdge)&&(s=1==a.rangeCount?a.getRangeAt(0):null)&&s.startContainer==e.startContainer&&s.startOffset==e.startOffset&&s.endContainer==e.endContainer&&s.endOffset==e.endOffset?l=!1:a.removeAllRanges()}catch(e){}l&&a.addRange(e)}}},8831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8235),o=n(4630),i=n(5924);function a(e){return 1==e.node.nodeType&&(0,r.default)(e.node)?new o.default(e.node,e.isAtEnd?-3:-2):e}function l(e){return e&&e.node}function s(e,t){if(!e||!t)return null;for(var n=0,r=0;rn);r++)e=e.childNodes[n];return new o.default(e,n)}t.default=function(e,t,n,r){var u,d=null,c=null;if(l(e)?(d=e,c=l(t)?t:null):(0,i.default)(e,"Node")&&(Array.isArray(t)?(d=s(e,t),c=Array.isArray(n)?s(e,n):null):"number"==typeof t?(d=new o.default(e,t),c=(0,i.default)(n,"Node")?new o.default(n,r):null):!(0,i.default)(t,"Node")&&t||(d=new o.default(e,-2),c=new o.default(t||e,-3))),null===(u=null==d?void 0:d.node)||void 0===u?void 0:u.ownerDocument){var f=d.node.ownerDocument.createRange();return d=a(d),c=a(c||d),f.setStart(d.node,d.offset),f.setEnd(c.node,c.offset),f}return null}},9372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4746),o=n(8805);t.default=function(e,t){if(!e)return"";var n=(0,r.default)(e),i=t&&(0,o.default)(e,t);return i?n+"\x3c!--"+JSON.stringify(i)+"--\x3e":n}},5473:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6935),o=n(8831),i=n(5203);t.default=function(e){var t;if(!e)return null;var n=(0,o.default)(e),a=n.getBoundingClientRect&&(0,i.default)(n.getBoundingClientRect());if(a)return a;e=e.normalize();var l=n.getClientRects&&n.getClientRects();if(a=l&&1==l.length?(0,i.default)(l[0]):null)return a;if(3==e.node.nodeType&&e.node.ownerDocument){var s=(0,r.default)({tag:"span",children:["​"]},e.node.ownerDocument);if((n=(0,o.default)(e)).insertNode(s),a=s.getBoundingClientRect&&(0,i.default)(s.getBoundingClientRect()),null===(t=s.parentNode)||void 0===t||t.removeChild(s),a)return a}var u=e.element;return u&&u.getBoundingClientRect&&(a=(0,i.default)(u.getBoundingClientRect()))?a:null}},8805:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(4630);function i(e,t){var n,o;if(!e||!t)return[];var i,a=e.node,l=e.offset,s=[];if(!(0,r.default)(t,a,!0))return[];if(3==a.nodeType){for(i=a.parentNode;a.previousSibling&&3==a.previousSibling.nodeType;)l+=(null===(n=a.previousSibling.nodeValue)||void 0===n?void 0:n.length)||0,a=a.previousSibling;s.unshift(l)}else i=a,a=a.childNodes[l];do{l=0;for(var u=!1,d=(null==i?void 0:i.firstChild)||null;d&&d!=a;d=d.nextSibling){if(3==d.nodeType){if(0===(null===(o=d.nodeValue)||void 0===o?void 0:o.length)||u)continue;u=!0}else u=!1;l++}s.unshift(l),a=i,i=(null==i?void 0:i.parentNode)||null}while(a&&a!=t);return s}t.default=function(e,t){return t?{start:i(o.default.getStart(t),e),end:i(o.default.getEnd(t),e)}:null}},1431:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(3408),i=n(1657);function a(e){for(;e.previousSibling;)if(e=e.previousSibling,"BR"==(0,o.default)(e)||!(0,i.default)(e))return!1;return!0}t.default=function(e,t){if(e){var n=(e=e.normalize()).node;if(0==e.offset){for(;n&&(0,r.default)(t,n)&&a(n);)n=(null==n?void 0:n.parentNode)||null;return n==t}}return!1}},4477:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractContentMetadata=t.setHtmlWithMetadata=void 0;var r=n(8831),o=n(5924),i=n(2373),a=n(681),l=(0,a.createArrayDefinition)((0,a.createNumberDefinition)()),s=(0,a.createObjectDefinition)({x:(0,a.createNumberDefinition)(),y:(0,a.createNumberDefinition)()}),u=(0,a.createBooleanDefinition)(!0),d=(0,a.createObjectDefinition)({type:(0,a.createNumberDefinition)(!0,0),isDarkMode:u,start:l,end:l}),c=(0,a.createObjectDefinition)({type:(0,a.createNumberDefinition)(!1,1),isDarkMode:u,tableId:(0,a.createStringDefinition)(),firstCell:s,lastCell:s}),f=(0,a.createObjectDefinition)({type:(0,a.createNumberDefinition)(!1,2),isDarkMode:u,imageId:(0,a.createStringDefinition)()});function p(e,t,n){if(e)return t=t||"",e.innerHTML=(null==n?void 0:n(t))||t,v(e)}function v(e){var t=e.lastChild;if((0,o.default)(t,"Comment"))try{var n=JSON.parse(t.nodeValue||"");if((0,i.default)(n,d)||(0,i.default)(n,c)||(0,i.default)(n,f))return e.removeChild(t),n.type=void 0===n.type?0:n.type,n.isDarkMode=n.isDarkMode||!1,n}catch(e){}}t.default=function(e,t,n){var o=p(e,t,n);return 0==(null==o?void 0:o.type)?(0,r.default)(e,o.start,o.end):null},t.setHtmlWithMetadata=p,t.extractContentMetadata=v},3680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSnapshotV2=void 0;var r=n(5892);function o(e,t,n,o,i){o=o||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},i=i||a;var l=e.snapshots[e.currentIndex],s=l&&i(l,t);if(e.currentIndex<0||!l||!s){(0,r.default)(e,o),e.snapshots.push(t),e.currentIndex++,e.totalSize+=o(t);for(var u=0;ue.maxSize;)e.totalSize-=o(e.snapshots[u]),u++;u>0&&(e.snapshots.splice(0,u),e.currentIndex-=u,e.autoCompleteIndex-=u),n&&(e.autoCompleteIndex=e.currentIndex)}else s&&e.snapshots.splice(e.currentIndex,1,t)}function i(e,t){return e.html==t.html&&!e.entityStates&&!t.entityStates}function a(e,t){return e==t}t.default=o,t.addSnapshotV2=function(e,t,n){o(e,t,n,(function(e){var t;return(null===(t=e.html)||void 0===t?void 0:t.length)||0}),i)}},3205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.currentIndex+t;return n>=0&&n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.autoCompleteIndex>=0&&e.currentIndex-e.autoCompleteIndex==1}},5892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearProceedingSnapshotsV2=void 0;var r=n(3205);function o(e,t){if(t=t||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},(0,r.default)(e,1)){for(var n=0,o=e.currentIndex+1;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{snapshots:[],totalSize:0,currentIndex:-1,autoCompleteIndex:-1,maxSize:e}}},5105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.moveCurrentSnapsnot=void 0;var r=n(3205);function o(e,t){return(0,r.default)(e,t)?(e.currentIndex+=t,e.autoCompleteIndex=-1,e.snapshots[e.currentIndex]):null}t.default=o,t.moveCurrentSnapsnot=o},359:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};return((null==e?void 0:e.getAttribute("style"))||"").split(";").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n),o=e.slice(n+1);r&&o&&(t[r.trim()]=o.trim())})),t}},4136:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,r=e.getElementById(t);r&&(null===(n=r.parentNode)||void 0===n||n.removeChild(r))}},9130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(359),o=n(6092);t.default=function(e,t){var n=(0,r.default)(e),i=0;t.forEach((function(e){var t;if((null===(t=n[e])||void 0===t?void 0:t.indexOf("!important"))>-1){var r=n[e].indexOf("!");n[e]=n[e].substring(0,r),i++}})),i>0&&(0,o.default)(e,n)}},8182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r;if(t){var o=e.getElementById(n);o||((o=e.createElement("style")).id=n,e.head.appendChild(o)),null===(r=o.sheet)||void 0===r||r.insertRule(t)}}},6092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4709);t.default=function(e,t){if(e){var n=(0,r.default)(t||{}).map((function(e){var n=t[e],r=e?e.trim():null,o=n?n.trim():null;return r&&o?r+":"+o:null})).filter((function(e){return e})).join(";");n?e.setAttribute("style",n):e.removeAttribute("style")}}},8094:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(6160),i=n(3408),a=n(1473),l=n(5203),s=n(5924),u=n(8375),d=n(4711),c=n(7570),f={topBorderColor:"#ABABAB",bottomBorderColor:"#ABABAB",verticalBorderColor:"#ABABAB",hasHeaderRow:!1,hasFirstColumn:!1,hasBandedRows:!1,hasBandedColumns:!1,bgColorEven:null,bgColorOdd:"#ABABAB20",headerRowColor:"#ABABAB",tableBorderFormat:0,keepCellShade:!1},p=function(){function e(e,t,n){var r=this;if(this.cells=null,this.formatInfo=null,this.trs=[],this.tableSelection=null,this.table=(0,s.default)(e,"HTMLTableElement")?e:function(e){for(var t=e;t&&"TABLE"!=t.tagName;t=t.parentElement);return t}(e),this.table){var o=(0,s.default)(e,"HTMLTableElement")?null:e,i=(0,u.default)(this.table.rows);this.cells=i.map((function(e){return[]})),i.forEach((function(e,t){var n;r.trs[t%2]=e;for(var i=0,a=0;i0,spanAbove:u>0,width:d?c.width:void 0,height:d?c.height:void 0})}}})),this.formatInfo=(0,d.getTableFormatInfo)(this.table),t&&this.normalizeSize("number"==typeof n?function(e){return e/n}:n)}}return Object.defineProperty(e.prototype,"selection",{get:function(){return this.tableSelection||null},set:function(e){if(e){var t=e.firstCell;this.row=null==t?void 0:t.y,this.col=null==t?void 0:t.x}this.tableSelection=e},enumerable:!1,configurable:!0}),e.prototype.writeBack=function(e,t){var n,r=this;this.cells?((0,a.default)(this.table),this.cells.forEach((function(e,t){var n=g(r.trs[t%2]||r.trs[0]);n&&(r.table.appendChild(n),e.forEach((function(e,o){e.td&&(r.recalculateSpans(t,o),r.recalculateCellHeight(e.td),n.appendChild(e.td))})))})),this.formatInfo&&!e&&((0,d.saveTableInfo)(this.table,this.formatInfo),(0,o.default)(this.table,this.cells,this.formatInfo,t))):this.table&&(null===(n=this.table.parentNode)||void 0===n||n.removeChild(this.table))},e.prototype.recalculateCellHeight=function(e){if(this.isEmptyCell(e)&&e.rowSpan>1)for(var t=1;t1&&o.spanAbove&&(o.td=t.td)}))},C=this,E=a;E<=l;E++)b(E);var S=this.selection?this.selection.lastCell.y-this.selection.firstCell.y:0;this.cells.splice(a,S+1),0===this.cells.length&&(this.cells=null);break;case 5:for(var T=0,P=function(e){w.forEachCellOfColumn(e,(function(t,n,o){var i=r.getCell(o,e+1);t.td&&t.td.colSpan>1&&i.spanLeft&&(i.td=t.td);var a=r.selection?e-T:r.col;n.splice(a,1)})),T++},w=this,_=s;_<=u;_++)P(_);(0===(null===(t=this.cells)||void 0===t?void 0:t.length)||(null===(n=this.cells)||void 0===n?void 0:n.every((function(e){return 0===e.length}))))&&(this.cells=null);break;case 7:case 8:var O=7==e?-1:1;for(E=this.row+O;E>=0&&E=0&&_1)this.getCell(this.row+1,this.col).td=g(i.td);else{var k=o.map((function(e){return{td:e==i?g(e.td):null,spanAbove:e!=i,spanLeft:e.spanLeft}}));this.cells.splice(this.row+1,0,k)}break;case 12:i.td&&i.td.colSpan>1?this.getCell(this.row,this.col+1).td=g(i.td):this.forEachCellOfCurrentColumn((function(e,t){t.splice(r.col+1,0,{td:t==o?g(e.td):null,spanAbove:e.spanAbove,spanLeft:t!=o})}));break;case 14:this.table.style.marginLeft="auto",this.table.style.marginRight="auto";break;case 15:this.table.style.marginLeft="",this.table.style.marginRight="auto";break;case 16:this.table.style.marginLeft="auto",this.table.style.marginRight="";break;case 18:this.setAlignmentToSelectedCells(a,l,s,u,"center");break;case 17:this.setAlignmentToSelectedCells(a,l,s,u,"left");break;case 19:this.setAlignmentToSelectedCells(a,l,s,u,"right");break;case 20:this.setAlignmentToSelectedCells(a,l,s,u,"top",!0);break;case 21:this.setAlignmentToSelectedCells(a,l,s,u,"middle",!0);break;case 22:this.setAlignmentToSelectedCells(a,l,s,u,"bottom",!0)}}},e.prototype.setAlignmentToSelectedCells=function(e,t,n,r,o,i){for(var a,l,s=e;s<=t;s++)for(var u=n;u<=r;u++)if(this.cells){var d=this.cells[s][u].td;i&&d?null===(a=d.style)||void 0===a||a.setProperty("vertical-align",o):d&&(null===(l=d.style)||void 0===l||l.setProperty("text-align",o))}},e.prototype.mergeCells=function(e,t,n){var r,o,i,a,l=n?(null===(r=e.td)||void 0===r?void 0:r.rowSpan)===(null===(o=t.td)||void 0===o?void 0:o.rowSpan)&&!e.spanLeft:(null===(i=e.td)||void 0===i?void 0:i.colSpan)===(null===(a=t.td)||void 0===a?void 0:a.colSpan)&&!e.spanAbove;e.td&&t.td&&l&&(this.mergeCellContents(e.td,t.td),t.td=null,n?t.spanLeft=!0:t.spanAbove=!0)},e.prototype.isEmptyCell=function(e){return 1===e.childElementCount&&"BR"===(0,i.default)(e.firstChild)},e.prototype.mergeCellContents=function(e,t){if(this.isEmptyCell(t))(0,a.default)(e,t,!1);else{var n=document.createElement("br");e.appendChild(n),(0,a.default)(e,t,!0)}},e.prototype.forEachCellOfCurrentColumn=function(e){this.forEachCellOfColumn(this.col,e)},e.prototype.getCellsWithBorder=function(e,t){for(var n=[],r=0;this.cells&&r=0&&t>=0;){var n=this.getCell(e,t);if(n.td)return n.td;if(n.spanLeft)t--;else{if(!n.spanAbove)break;e--}}return null},e.prototype.forEachCellOfColumn=function(e,t){if(void 0!==e)for(var n=0;this.cells&&n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4984),o=n(7727),i=n(3606),a="transparent";function l(e){var t;return!!e.td&&!!(null===(t=(0,i.getTableCellMetadata)(e.td))||void 0===t?void 0:t.bgColorOverride)}function s(e){return"solid 1px "+(e||"transparent")}t.default=function(e,t,n,i){n&&(e.style.borderCollapse="collapse",function(e,t){e.forEach((function(n,r){n.forEach((function(o,i){o.td&&function(e,t,n,r,o,i){switch(function(e,t){e.style.borderTop=s(t.topBorderColor),e.style.borderLeft=s(t.verticalBorderColor),e.style.borderRight=s(t.verticalBorderColor),e.style.borderBottom=s(t.bottomBorderColor)}(t,e),e.tableBorderFormat){case 0:return;case 1:o||(t.style.borderLeftColor=a),i||(t.style.borderRightColor=a);break;case 4:n||(t.style.borderTopColor=a),r||n||(t.style.borderBottomColor=a),o||(t.style.borderLeftColor=a),i||o||(t.style.borderRightColor=a),o&&n&&(t.style.borderRightColor=a);break;case 2:n&&(t.style.borderTopColor=a,t.style.borderRightColor=a,t.style.borderLeftColor=a),o&&(t.style.borderLeftColor=a),i&&(t.style.borderRightColor=a);break;case 3:o&&(t.style.borderLeftColor=a),i&&(t.style.borderRightColor=a);break;case 5:n&&(t.style.borderRightColor=a,t.style.borderLeftColor=a),o&&(t.style.borderBottomColor=a,t.style.borderTopColor=a),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||a,t.style.borderBottomColor=e.bottomBorderColor||a,t.style.borderTopColor=e.topBorderColor||a);break;case 6:n&&(t.style.borderRightColor=a,t.style.borderLeftColor=a),o&&(t.style.borderBottomColor=a,t.style.borderTopColor=a),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||a,t.style.borderBottomColor=e.bottomBorderColor||a,t.style.borderTopColor=e.topBorderColor||a),n||o||(t.style.borderLeftColor=a,t.style.borderBottomColor=a,t.style.borderTopColor=a,t.style.borderRightColor=a);break;case 7:n&&(t.style.borderLeftColor=a,t.style.borderTopColor=a,t.style.borderRightColor=a),o&&(t.style.borderLeftColor=a,t.style.borderTopColor=a,t.style.borderBottomColor=a),n||o||(t.style.borderLeftColor=a,t.style.borderBottomColor=a,t.style.borderTopColor=a,t.style.borderRightColor=a),n&&o&&(t.style.borderBottomColor=e.bottomBorderColor||a)}}(t,o.td,0===r,r===e.length-1,0===i,i===n.length-1)}))}))}(t,n),function(e,t,n){var r=function(e){return e%2==0?t.bgColorEven:t.bgColorOdd},i=t.hasBandedRows,s=t.hasBandedColumns,u=t.bgColorOdd,d=t.bgColorEven,c=!i&&u===d;e.forEach((function(e,s){e.forEach((function(e){if(e.td&&!l(e))if(i){var u=r(s);(0,o.default)(e.td,u||a,!0,void 0,!0,n)}else c?(0,o.default)(e.td,t.bgColorOdd||a,!0,void 0,!0,n):(0,o.default)(e.td,a,!0,void 0,!0,n)}))})),s&&e.forEach((function(e){e.forEach((function(e,t){var i=r(t);e.td&&i&&!l(e)&&(0,o.default)(e.td,i,!0,void 0,!0,n)}))}))}(t,n,i),function(e,t){t.hasFirstColumn?e.forEach((function(t,n){t.forEach((function(t,i){t.td&&0===i&&(0===n||l(t)||(t.td.style.borderTopColor=a,(0,o.default)(t.td,a,!0,void 0,!0)),n!==e.length-1&&0!==n&&(t.td.style.borderBottomColor=a),t.td=(0,r.default)(t.td,"TH"),t.td.scope="col")}))})):e.forEach((function(e){e.forEach((function(e,t){e.td&&0===t&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")}))}))}(t,n),function(e,t,n){var i,a;t.hasHeaderRow?null===(a=e[0])||void 0===a||a.forEach((function(e){e.td&&t.headerRowColor&&(l(e)||(0,o.default)(e.td,t.headerRowColor,!0,void 0,!0,n),e.td.style.borderRightColor=t.headerRowColor,e.td.style.borderLeftColor=t.headerRowColor,e.td.style.borderTopColor=t.headerRowColor,e.td=(0,r.default)(e.td,"TH"),e.td.scope="row")})):null===(i=e[0])||void 0===i||i.forEach((function(e){e.td&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")}))}(t,n,i))}},7146:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3606);t.default=function(e,t){var n=t.getAttribute("style");n&&(e.setAttribute("style",n),(0,r.saveTableCellMetadata)(e,{bgColorOverride:!0}))}},8570:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!t||!e.cells)return!1;var n=t.firstCell,r=t.lastCell,o=e.cells.length-1,i=e.cells[o];if(!i)return!1;var a=i.length-1,l=n.x,s=n.y,u=r.x,d=r.y;return 0==l&&0==s&&u==a&&d==o}},4731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7146),o=n(1473),i=n(8094);t.default=function(e,t,n,a){var l,s,u,d,c=new i.default(t),f=new i.default(e),p=f.row,v=f.col,h=null!==(s=p+(null===(l=c.cells)||void 0===l?void 0:l.length))&&void 0!==s?s:0,g=null!==(d=v+(null===(u=c.cells)||void 0===u?void 0:u[0].length))&&void 0!==d?d:0;for(f.row=f.cells.length-1;f.cells.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saveTableCellMetadata=t.getTableCellMetadata=void 0;var r=n(681),o=n(7570),i=(0,r.createBooleanDefinition)(!1,void 0,!0),a=(0,r.createObjectDefinition)({bgColorOverride:i},!1,!0);t.getTableCellMetadata=function(e){return(0,o.getMetadata)(e,a)},t.saveTableCellMetadata=function(e,t){e&&t&&(0,o.setMetadata)(e,t,a)}},4711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saveTableInfo=t.getTableFormatInfo=void 0;var r=n(7570),o=n(681),i=(0,o.createStringDefinition)(!1,void 0,!0),a=(0,o.createBooleanDefinition)(!1),l=(0,o.createObjectDefinition)({topBorderColor:i,bottomBorderColor:i,verticalBorderColor:i,hasHeaderRow:a,headerRowColor:i,hasFirstColumn:a,hasBandedColumns:a,hasBandedRows:a,bgColorEven:i,bgColorOdd:i,tableBorderFormat:(0,o.createNumberDefinition)(!1,void 0,0,8),keepCellShade:(0,o.createBooleanDefinition)(!0)},!1,!0);t.getTableFormatInfo=function(e){return(0,r.getMetadata)(e,l)},t.saveTableInfo=function(e,t){e&&t&&(0,r.setMetadata)(e,t,l)}},246:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Browser=t.getBrowserInfo=void 0;var n=/android/i;function r(e,t,r){var o,i=-1!=e.indexOf("rv:")&&-1!=e.indexOf("Trident"),a=-1!=e.indexOf("MSIE")||i,l=!1,s=!1,u=!1,d=!1,c=-1!=e.indexOf("WebKit"),f=!1;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(o=e||r||"")||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(o.substr(0,4)))&&(f=!0),a||(l=-1!=e.indexOf("Chrome"),s=-1!=e.indexOf("Firefox"),-1!=e.indexOf("Safari")&&(u=-1==e.indexOf("Chrome")&&-1==e.indexOf("Android")),(d=-1!=e.indexOf("Edge"))&&(c=l=s=!1)),{isMac:-1!=t.indexOf("Mac"),isWin:-1!=t.indexOf("Win")||-1!=t.indexOf("NT"),isWebKit:c,isIE:a,isIE11OrGreater:i,isSafari:u,isChrome:l,isFirefox:s,isEdge:d,isIEOrEdge:a||d,isAndroid:n.test(e),isMobileOrTablet:f}}t.getBrowserInfo=r,t.Browser="undefined"!=typeof window&&window?r(window.navigator.userAgent,window.navigator.appVersion,window.navigator.vendor):{}},5400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7727);t.default=function(e,t,n,o){if(t){var i=e.style,a=t.fontFamily,l=t.fontSize,s=t.textColor,u=t.textColors,d=t.backgroundColor,c=t.backgroundColors,f=t.bold,p=t.italic,v=t.underline;a&&(i.fontFamily=a),l&&(i.fontSize=l),u?(0,r.default)(e,u,!1,n,!1,o):s&&(0,r.default)(e,s,!1,n,!1,o),c?(0,r.default)(e,c,!0,n,!1,o):d&&(0,r.default)(e,d,!0,n,!1,o),f&&(i.fontWeight="bold"),p&&(i.fontStyle="italic"),v&&(i.textDecoration="underline")}}},4984:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(7695),i=n(3408),a=n(1473);t.default=function(e,t){var n;if(!e||!t)return null;var l=(0,i.default)(e);if(l==t.toUpperCase())return e;for(var s=e.ownerDocument.createElement(t),u=0;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapse=void 0;var r=n(8655),o=n(9381),i=n(8375);function a(e,t,n,i,a){for(;t.parentNode!=e&&!(0,r.default)(t.parentNode,n);){if(i&&t.previousSibling||!i&&t.nextSibling){if(!a)break;(0,o.default)(t,i)}if(!t.parentNode)break;t=t.parentNode}return t}t.default=function(e,t,n,o){var l;if(!(0,r.default)(e,t)||!(0,r.default)(e,n))return[];if(t=a(e,t,n,!0,o),n=a(e,n,t,!1,o),(0,r.default)(t,n,!0))return[t];if((0,r.default)(n,t))return[n];if(t.parentNode==n.parentNode){var s=t.parentNode?(0,i.default)(null===(l=t.parentNode)||void 0===l?void 0:l.childNodes):[],u=s.indexOf(t),d=s.indexOf(n);return s.slice(u,d+1)}return[t,n]},t.collapse=a},8655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e,t,n){return!(!e||!t)&&(!(!n||e!=t)||((0,r.default)(t,"Range")&&(t=t&&t.commonAncestorContainer,n=!0),t&&3==t.nodeType&&(t=t.parentNode,n=!0),1!=e.nodeType&&11!=e.nodeType?!!n&&e==t:!(!n&&e==t)&&function(e,t){if(e.contains)return e.contains(t);for(;t;){if(t==e)return!0;t=t.parentNode}return!1}(e,t)))}},6935:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementData=void 0;var o=n(4709),i=n(5924),a=n(246);t.KnownCreateElementData=((r={})[0]={tag:""},r[1]=a.Browser.isEdge?{tag:"div",children:[{tag:"span",children:[{tag:"br"}]}]}:{tag:"div",children:[{tag:"br"}]},r[2]={tag:"blockquote",style:"margin-top:0;margin-bottom:0"},r[3]={tag:"div",style:"width: 600px; height: 1px; overflow: hidden; position: fixed; top: 0; left; 0; -webkit-user-select: text",attributes:{contenteditable:"true"}},r[4]={tag:"li",style:"display:block"},r[5]={tag:"div",style:"position: fixed; width: 0; height: 0"},r[6]={tag:"span",style:"max-width:100%;position:relative",children:[{tag:"div",style:"width:100%;height:100%;position:relative;overflow:hidden"}]},r[7]={tag:"div",style:"position: fixed; cursor: row-resize; user-select: none"},r[8]={tag:"div",style:"position: fixed; cursor: col-resize; user-select: none"},r[9]={tag:"div",style:"position: fixed; cursor: nw-resize; user-select: none; border: 1px solid #808080"},r[10]={tag:"div",style:"position: fixed; cursor: ne-resize; user-select: none; border: 1px solid #808080"},r[11]={tag:"div",style:"position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080"},r[12]={tag:"div",children:[{tag:"span",children:[{tag:"br"}]}]},r),t.default=function e(n,r){if("number"==typeof n&&(n=t.KnownCreateElementData[n]),!n||!n.tag)return null;var a=n.tag,l=n.namespace,s=n.className,u=n.style,d=n.dataset,c=n.attributes,f=n.children,p=l?r.createElementNS(l,a):r.createElement(a);return u&&p.setAttribute("style",u),s&&(p.className=s),d&&(0,i.default)(p,"HTMLElement")&&(0,o.default)(d).forEach((function(e){p.dataset[e]=d[e]})),c&&(0,o.default)(c).forEach((function(e){p.setAttribute(e,c[e])})),f&&f.forEach((function(t){if("string"==typeof t)p.appendChild(r.createTextNode(t));else if(t){var n=e(t,r);n&&p.appendChild(n)}})),p}},3598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(5010);t.default=function(e,t,n){var i=(e=e?1==e.nodeType?e:e.parentNode:null)&&1==e.nodeType?e:null;if(i&&n)if(i.closest)i=i.closest(n);else for(;i&&i!=t&&!(0,o.default)(i,n);)i=i.parentElement;return!t||(0,r.default)(t,i)?i:null}},5023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8375);t.default=function(e,t){var n=t.createElement("DIV");return n.innerHTML=e,(0,r.default)(n.childNodes)}},7695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComputedStyle=void 0;var r=n(7582),o=n(3598);function i(e,t){var n,i;void 0===t&&(t=["font-family","font-size","color","background-color"]);var a,l=(0,o.default)(e),s=[];if(t=Array.isArray(t)?t:[t],l){var u=(l.ownerDocument.defaultView||window).getComputedStyle(l);if(u)try{for(var d=(0,r.__values)(t),c=d.next();!c.done;c=d.next()){var f=c.value,p=u.getPropertyValue(f)||"";p="font-family"!=f?p.toLowerCase():p,p="font-size"==f?(a=p)&&a.indexOf("px")==a.length-2?Math.round(75*parseFloat(a)+.05)/100+"pt":a:p,s.push(p)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}return s}t.default=i,t.getComputedStyle=function(e,t){return i(e,t)[0]||""}},4746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e){if((0,r.default)(e,"HTMLElement"))return e.innerHTML;if(e){var t=e.ownerDocument.createElement("span");return t.appendChild(e.cloneNode(!0)),t.innerHTML}return""}},3798:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(5203);t.default=function(e,t){void 0===t&&(t=[]);var n=e.map((function(e){return(0,o.default)(e.getBoundingClientRect())})).concat(t).filter((function(e){return!!e})),i={top:Math.max.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.top}))),!1)),bottom:Math.min.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.bottom}))),!1)),left:Math.max.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.left}))),!1)),right:Math.min.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.right}))),!1))};return i.top{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastLeafNode=t.getFirstLeafNode=void 0;var r=n(1630),o=n(2513);function i(e,t){for(var n=function(e){return t?e.firstChild:e.lastChild},i=n(e);i&&n(i);)i=n(i);return i&&(0,r.default)(i)&&(i=(0,o.getLeafSibling)(e,i,t)),i}t.getFirstLeafNode=function(e){return i(e,!0)},t.getLastLeafNode=function(e){return i(e,!1)}},2513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPreviousLeafSibling=t.getNextLeafSibling=t.getLeafSibling=void 0;var r=n(8655),o=n(3408),i=n(1630);function a(e,t,n,a,l){var s=null,u=n?function(e){return(null==e?void 0:e.nextSibling)||null}:function(e){return(null==e?void 0:e.previousSibling)||null},d=n?function(e){return e.firstChild}:function(e){return e.lastChild};if((0,r.default)(e,t))for(var c=t,f=!0;f;){var p=(null==c?void 0:c.parentNode)||null;for(c=u(c);!c&&p!=e;)c=u(p),p=(null==p?void 0:p.parentNode)||null;for(;c&&(!a||a.indexOf((0,o.default)(c))<0)&&d(c);)c=d(c);if(!(f=!!c&&(0,i.default)(c,l))){s=c;break}}return s}t.getLeafSibling=a,t.getNextLeafSibling=function(e,t,n){return a(e,t,!0,n)},t.getPreviousLeafSibling=function(e,t,n){return a(e,t,!1,n)}},3764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendableFormatCommandMap=void 0;var r=n(4709);t.PendableFormatCommandMap={isBold:"bold",isItalic:"italic",isUnderline:"underline",isStrikeThrough:"strikeThrough",isSubscript:"subscript",isSuperscript:"superscript"},t.default=function(e){return(0,r.default)(t.PendableFormatCommandMap).reduce((function(n,r){return n[r]=e.queryCommandState(t.PendableFormatCommandMap[r]),n}),{})}},3408:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&1==e.nodeType?e.tagName.toUpperCase():""}},5499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o="ADDRESS,ARTICLE,ASIDE,BLOCKQUOTE,CANVAS,DD,DIV,DL,DT,FIELDSET,FIGCAPTION,FIGURE,FOOTER,FORM,H1,H2,H3,H4,H5,H6,HEADER,HR,LI,MAIN,NAV,NOSCRIPT,OL,OUTPUT,P,PRE,SECTION,TABLE,TD,TH,TFOOT,UL,VIDEO".split(","),i=["block","list-item","table-cell"];t.default=function(e){var t=(0,r.default)(e);return!(!t||!(i.indexOf(e.style.display)>=0||o.indexOf(t)>=0))}},6997:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!e||!t||4!=(4&t.compareDocumentPosition(e)))}},1657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=["IMG"],i=["TABLE","IMG","LI"].join(","),a=/\u200b/g;function l(e,t){return e=e.replace(a,""),t?e.trim():e}t.default=function(e,t,n){if(!e)return!1;if(3==e.nodeType)return""==l(e.nodeValue||"",t);if(1==e.nodeType){var a=e,s=l(a.textContent||"",t),u=n?i+",BR":i;if(""!=s||o.indexOf((0,r.default)(a))>=0||a.querySelectorAll(u)[0])return!1}return!0}},8235:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o="AREA,BASE,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,KEYGEN,LINK,META,PARAM,SOURCE,TRACK,WBR".split(",");t.default=function(e){return!!e&&o.indexOf((0,r.default)(e))>=0}},844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4709),i=/^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\/\/[^?\/]+@|^www\.[^?\/]+@/i,a="[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",l="(?:"+a+"\\.)*"+a+"(?:\\:[0-9]+)?(?:[\\/\\?]\\S*)?",s={http:{match:new RegExp("^(?:microsoft-edge:)?http:\\/\\/"+l+"|www\\."+l,"i"),except:i,normalizeUrl:function(e){return new RegExp("^(?:microsoft-edge:)?http:\\/\\/","i").test(e)?e:"http://"+e}},https:{match:new RegExp("^(?:microsoft-edge:)?https:\\/\\/"+l,"i"),except:i},mailto:{match:new RegExp("^mailto:\\S+@\\S+\\.\\S+","i")},notes:{match:new RegExp("^notes:\\/\\/\\S+","i")},file:{match:new RegExp("^file:\\/\\/\\/?\\S+","i")},unc:{match:new RegExp("^\\\\\\\\\\S+","i")},ftp:{match:new RegExp("^ftp:\\/\\/"+l+"|ftp\\."+l,"i"),normalizeUrl:function(e){return new RegExp("^ftp:\\/\\/","i").test(e)?e:"ftp://"+e}},news:{match:new RegExp("^news:(\\/\\/)?"+l,"i")},telnet:{match:new RegExp("^telnet:(\\/\\/)?"+l,"i")},gopher:{match:new RegExp("^gopher:\\/\\/"+l,"i")},wais:{match:new RegExp("^wais:(\\/\\/)?"+l,"i")}};t.default=function(e){var t,n;if(e)try{for(var i=(0,r.__values)((0,o.default)(s)),a=i.next();!a.done;a=i.next()){var l=a.value,u=s[l],d=e.match(u.match);if(d&&d[0]==e&&(!u.except||!u.except.test(e)))return{scheme:l,originalUrl:e,normalizedUrl:u.normalizeUrl?u.normalizeUrl(e):e}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return null}},5010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e,t){return(0,r.default)(e,"HTMLElement")&&(e.matches||e.msMatchesSelector).call(e,t)}},1473:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e){for(;!n&&e.firstChild;)e.removeChild(e.firstChild);for(;null==t?void 0:t.firstChild;)e.appendChild(t.firstChild)}}},5203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e||{left:0,right:0,top:0,bottom:0},n=t.left,r=t.right,o=t.top,i=t.bottom;return 0===n&&0===r&&0===o&&0===i?null:{left:Math.round(n),right:Math.round(r),top:Math.round(o),bottom:Math.round(i)}}},8121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,r=/^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,o=/^rgb\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*\)$/,i=/^rgba\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*\)$/;t.default=function(e){var t;return(t=(e=(e||"").trim()).match(n))?[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]:(t=e.match(r))?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:(t=e.match(o)||e.match(i))?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}},8471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8375);function o(e,t){return t.some((function(t){return 0==t?0==e:(e&t)==t}))}t.default=function(e,t,n,i,a){if(void 0===i&&(i=0),!e||!t)return[];var l=(0,r.default)(e.querySelectorAll(t));if(0!=i&&a){var s=a.startContainer,u=a.startOffset,d=a.endContainer,c=a.endOffset;if(1==s.nodeType&&s.firstChild){var f=s.childNodes[u];s=f||s.lastChild}d=1==d.nodeType&&d.firstChild&&c>0?d.childNodes[c-1]:d,l=l.filter((function(e){return n=s,r=d,a=2==i,l=(t=e).compareDocumentPosition(n),u=t.compareDocumentPosition(r),c=[0,8],a||c.push(16),o(l,c)||o(u,c)||o(l,[2])&&o(u,[4])&&!o(u,[16]);var t,n,r,a,l,u,c}))}return n&&l.forEach(n),l}},3126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(){t(null)},n.readAsDataURL(e)}}},5924:(e,t)=>{"use strict";function n(e){var t=e&&(e.ownerDocument||("[object HTMLDocument]"==Object.prototype.toString.apply(e)?e:null));return t&&(t.defaultView||window)}Object.defineProperty(t,"__esModule",{value:!0}),t.getTargetWindow=void 0,t.getTargetWindow=n,t.default=function(e,t){var r;if("Range"==t)return"[object Range]"==Object.prototype.toString.apply(e)&&!!(null===(r=e)||void 0===r?void 0:r.commonAncestorContainer);var o=n(e),i=o&&o[t],a=window,l=a&&a[t];return l&&e instanceof l||i&&e instanceof i}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(8121),i="#ffffff";!function(e){e[e.BRIGHT=0]="BRIGHT",e[e.DARK=1]="DARK",e[e.NONE=2]="NONE"}(r||(r={}));t.default=function e(t,n,r,a,l,s){var u="string"==typeof n?n.trim():"",d="string"==typeof n?null:n,c=r?"background-color":"color";if(u||d){if(s){var f=s.registerColor((null==d?void 0:d.lightModeColor)||u,!!a,null==d?void 0:d.darkModeColor);t.style.setProperty(c,f)}r&&l&&function(t,n,r,a){if(n&&"transparent"!==n)switch(function(e){var t=function(e){var t=(0,o.default)(e);if(t){var n=t[0]/255,r=t[1]/255,i=t[2]/255;return 50*(Math.max(n,r,i)+Math.min(n,r,i))}return 255}(e);return t<20?1:t>80?0:2}(n)){case 1:e(t,{lightModeColor:i,darkModeColor:"#333333"},!1,r,!1,a);break;case 0:e(t,{lightModeColor:"#000000",darkModeColor:i},!1,r,!1,a)}}(t,(null==d?void 0:d.lightModeColor)||u,a,s)}}},1630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=n(7695),i=/^[\r\n]+$/g,a=/[\t\r\n\u0020\u200B]/gm;t.default=function e(t,n){if(3==t.nodeType)return!(t.nodeValue&&""!=t.textContent&&!i.test(t.nodeValue)&&(!n||""!=t.nodeValue.replace(a,"")));if(1==t.nodeType){if("none"==(0,o.getComputedStyle)(t,"display"))return!0;var l=(0,r.default)(t);if("DIV"==l||"SPAN"==l){for(var s=t.firstChild;s;s=s.nextSibling)if(!e(s,n))return!1;return!0}return!1}return!0}},9381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitBalancedNodeRange=void 0;var r=n(6997);function o(e,t){var n;if(!e||!e.parentNode)return null;var r=e.parentNode,o=r.cloneNode(!1);if(o.removeAttribute("id"),t)for(;r.firstChild&&r.firstChild!=e;)o.appendChild(r.firstChild);else for(;e.nextSibling;)o.appendChild(e.nextSibling);return o.firstChild&&""!=o.innerHTML?null===(n=r.parentNode)||void 0===n||n.insertBefore(o,t?r:r.nextSibling):o=null,o}t.default=o,t.splitBalancedNodeRange=function(e){var t=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[e.length-1]:e,i=t&&n&&t.parentNode==n.parentNode?t.parentNode:null;if(i){if((0,r.default)(t,n)){var a=n;n=t,t=a}o(t,!0),o(n,!1)}return i}},7409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,o,i,a=(null===(r=e.nodeValue)||void 0===r?void 0:r.substring(0,t))||"",l=(null===(o=e.nodeValue)||void 0===o?void 0:o.substring(t))||"",s=e.ownerDocument.createTextNode(n?a:l);return e.nodeValue=n?l:a,null===(i=e.parentNode)||void 0===i||i.insertBefore(s,n?e:e.nextSibling),s}},82:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e?e.parentNode:null;if(!t)return null;for(;e.firstChild;)t.insertBefore(e.firstChild,e);return t.removeChild(e),t}},4251:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(6935),i=n(5023),a=n(5924);t.default=function(e,t){var n,l;if(0==(e=e?(0,a.default)(e,"Node")?[e]:e:[]).length||!e[0]||!e[0].ownerDocument)return null;if(t||(t="div"),!(0,a.default)(t,"HTMLElement")){var s=e[0].ownerDocument;t="string"==typeof t?/^\w+$/.test(t)?s.createElement(t):(0,i.default)(t,s)[0]:(0,o.default)(t,s)}var u=e[0].parentNode;u&&u.insertBefore(t,e[0]);try{for(var d=(0,r.__values)(e),c=d.next();!c.done;c=d.next()){var f=c.value;t.appendChild(f)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(n)throw n.error}}return t}},4730:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(3381),t)},1184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(9025),t)},8801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(936),t)},4165:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(7030),t)},3106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(8854),t)},7099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(5061),t)},9082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(872),t)},2151:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(9835),t)},3775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(2184),t)},941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(8833),t)},7037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(7311),t)},2125:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(9963),t)},7019:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(2939),t)},4739:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);(0,r.__exportStar)(n(1184),t),(0,r.__exportStar)(n(8801),t),(0,r.__exportStar)(n(4165),t),(0,r.__exportStar)(n(3106),t),(0,r.__exportStar)(n(7099),t),(0,r.__exportStar)(n(9082),t),(0,r.__exportStar)(n(2151),t),(0,r.__exportStar)(n(3775),t),(0,r.__exportStar)(n(941),t),(0,r.__exportStar)(n(2125),t),(0,r.__exportStar)(n(7019),t),(0,r.__exportStar)(n(7037),t),(0,r.__exportStar)(n(4730),t)},4296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(6344),i={MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEUP:"mouseup",getPageXY:function(e){return[e.pageX,e.pageY]}},a={MOUSEDOWN:"touchstart",MOUSEMOVE:"touchmove",MOUSEUP:"touchend",getPageXY:function(e){var t=0,n=0;if(e.targetTouches&&e.targetTouches.length>0){var r=e.targetTouches[0];t=r.pageX,n=r.pageY}return[t,n]}};var l=function(){function e(e,t,n,l,s,u){var d=this;this.trigger=e,this.context=t,this.onSubmit=n,this.handler=l,this.zoomScale=s,this.initX=0,this.initY=0,this.initValue=void 0,this.onMouseDown=function(e){var t,n,o;e.preventDefault(),e.stopPropagation(),d.addDocumentEvents(),t=(0,r.__read)(d.dndMouse.getPageXY(e),2),d.initX=t[0],d.initY=t[1],d.initValue=null===(o=(n=d.handler).onDragStart)||void 0===o?void 0:o.call(n,d.context,e)},this.onMouseMove=function(e){var t,n,o;e.preventDefault();var i=(0,r.__read)(d.dndMouse.getPageXY(e),2),a=i[0],l=i[1],s=(a-d.initX)/d.zoomScale,u=(l-d.initY)/d.zoomScale;d.initValue&&(null===(n=(t=d.handler).onDragging)||void 0===n?void 0:n.call(t,d.context,e,d.initValue,s,u))&&(null===(o=d.onSubmit)||void 0===o||o.call(d,d.context,d.trigger))},this.onMouseUp=function(e){var t,n,r;e.preventDefault(),d.removeDocumentEvents(),(null===(n=(t=d.handler).onDragEnd)||void 0===n?void 0:n.call(t,d.context,e,d.initValue))&&(null===(r=d.onSubmit)||void 0===r||r.call(d,d.context,d.trigger))},this.dndMouse=u||o.Browser.isMobileOrTablet?a:i,e.addEventListener(this.dndMouse.MOUSEDOWN,this.onMouseDown)}return e.prototype.dispose=function(){this.trigger.removeEventListener(this.dndMouse.MOUSEDOWN,this.onMouseDown),this.removeDocumentEvents()},Object.defineProperty(e.prototype,"mouseType",{get:function(){return this.dndMouse==a?"touch":"mouse"},enumerable:!1,configurable:!0}),e.prototype.addDocumentEvents=function(){var e=this.trigger.ownerDocument;e.addEventListener(this.dndMouse.MOUSEMOVE,this.onMouseMove,!0),e.addEventListener(this.dndMouse.MOUSEUP,this.onMouseUp,!0)},e.prototype.removeDocumentEvents=function(){var e=this.trigger.ownerDocument;e.removeEventListener(this.dndMouse.MOUSEMOVE,this.onMouseMove,!0),e.removeEventListener(this.dndMouse.MOUSEUP,this.onMouseUp,!0)},e}();t.default=l},3904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/[`!@#$%^&*()_+\=\[\]{};':"\\|,.<>\/?~]/,r=function(){function e(){this.editor=null,this.lastKeyTyped=null}return e.prototype.getName=function(){return"AutoFormat"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null,this.lastKeyTyped=null},e.prototype.onPluginEvent=function(e){var t=this;if(this.editor&&(7!==e.eventType&&5!==e.eventType&&6!==e.eventType||(this.lastKeyTyped=""),1===e.eventType)){var r=e.rawEvent.key;if(r&&r.length>1&&(this.lastKeyTyped=""),"-"!==this.lastKeyTyped||n.test(r)||" "===r||"-"===r)this.lastKeyTyped=r;else{var o=this.editor.getContentSearcherOfCursor(e),i=null==o?void 0:o.getSubStringBefore(3),a=null==o?void 0:o.getSubStringBefore(2),l="-"===(null==i?void 0:i[0]),s=" "===(null==i?void 0:i[0]);if(l||s||"string"==typeof i&&n.test(i[0])||"--"!==a)return;var u=null==o?void 0:o.getRangeFromText(a,!0),d=document.createTextNode("—");this.editor.addUndoSnapshot((function(){u&&(u.deleteContents(),u.insertNode(d),t.editor.select(d,-1))}),"Format",!0,{formatApiName:"autoHyphen"}),this.lastKeyTyped=null}}},e}();t.default=r},3381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFormat=void 0;var r=n(3904);Object.defineProperty(t,"AutoFormat",{enumerable:!0,get:function(){return r.default}})},678:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(692),o=n(6344),i=function(){function e(e,t){this.settingsOverride=e,this.additionalFeatures=t,this.editor=void 0,this.features=[]}return e.prototype.getName=function(){return"ContentEdit"},e.prototype.initialize=function(e){var t=this;this.editor=e;var n=(0,r.default)();(0,o.getObjectKeys)(n).forEach((function(e){var r,o=n[e],i=t.settingsOverride&&void 0!==t.settingsOverride[e];(i&&(null===(r=t.settingsOverride)||void 0===r?void 0:r[e])||!i&&!o.defaultDisabled)&&t.features.push(o)})),this.features=this.features.concat(this.additionalFeatures||[]),this.features.forEach((function(e){var n;return null===(n=t.editor)||void 0===n?void 0:n.addContentEditFeature(e)}))},e.prototype.disposeFeatures=function(){var e=this;this.editor&&this.features.forEach((function(t){return e.editor.removeContentEditFeature(t)})),this.features=[]},e.prototype.dispose=function(){this.disposeFeatures(),this.editor=void 0},e}();t.default=i},7539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLinkFeatures=void 0;var r=n(4548),o=n(6344),i=/[.+=\s:;"',>]+$/i,a={keys:[13,32,257],shouldHandleEvent:s,handleEvent:function(e,t){var n=s(e,t);if(n){var i=t.getDocument().createElement("a"),a=t.getContentSearcherOfCursor();i.textContent=n.originalUrl,i.href=n.normalizedUrl,t.runAsync((function(t){t.addUndoSnapshot((function(){return(0,r.replaceWithNode)(t,n.originalUrl,i,!1,null!=a?a:void 0),(0,o.clearEventDataCache)(e),i}),"AutoLink",!0)}))}}},l={keys:[8],shouldHandleEvent:function(e,t){var n=t.getContentSearcherOfCursor(e);return(null==n?void 0:n.getInlineElementBefore())instanceof o.LinkInlineElement},handleEvent:function(e,t){e.rawEvent.preventDefault(),(0,r.removeLink)(t)},defaultDisabled:!0};function s(e,t){return 0==e.eventType||7==e.eventType&&"Paste"==e.source?(0,o.cacheGetEventData)(e,"LINK_DATA",(function(){var n=7==e.eventType&&"Paste"==e.source&&e.data||null,r=(0,o.matchLink)(((null==n?void 0:n.text)||"").trim()),a=t.getContentSearcherOfCursor(e);if(r&&(null==a?void 0:a.getRangeFromText(r.originalUrl,!1)))return r;var l=a&&a.getWordBefore();if(l&&l.length>5){var s=(l.match(i)||[])[0]||"",u=l.substring(0,l.length-s.length);return["()","{}","[]"].forEach((function(e){u[u.length-1]==e[1]&&u.indexOf(e[0])<0&&(u=u.substr(0,u.length-1))})),(0,o.matchLink)(u)}return null})):null}t.AutoLinkFeatures={autoLink:a,unlinkWhenBackspaceAfterLink:l}},2056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeFeatures=void 0;var r=n(6344),o={keys:[13],shouldHandleEvent:function(e,t){var n=a(e,t);return n&&(0,r.isNodeEmpty)(n)},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){l(e,t)}),void 0,!0)}},i={keys:[8],shouldHandleEvent:function(e,t){var n=a(e,t);return n&&(0,r.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){return l(e,t)}))}};function a(e,t){return(0,r.cacheGetEventData)(e,"CODE_CHILD",(function(){var e,n=null!==(e=t.getElementAtCursor("code"))&&void 0!==e?e:t.queryElements("code",1)[0];if(n){var o=t.getFocusedPosition(),i=o&&t.getBlockElementAtNode(o.normalize().node);if(i){var a=i.getStartNode()==n.parentNode?i.getStartNode():i.collapseToSingleElement();return(0,r.isNodeEmpty)(a)?a:null}}return null}))}function l(e,t){var n=a(e,t);if((0,r.safeInstanceOf)(n,"HTMLElement")){var o=n.querySelector("code");if(o)(0,r.unwrap)(o);else{var i=(0,r.splitBalancedNodeRange)(n);if(i&&(0,r.unwrap)(i),(0,r.safeInstanceOf)(n.parentElement,"HTMLPreElement")){var l=(0,r.splitBalancedNodeRange)(n);l&&(0,r.unwrap)(l)}}t.select(n,0)}}t.CodeFeatures={removeCodeWhenEnterOnEmptyLine:o,removeCodeWhenBackspaceOnEmptyFirstLine:i}},7167:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorFeatures=void 0;var r=n(6344),o={keys:[37,39],allowFunctionKeys:!0,shouldHandleEvent:function(e,t,n){var o,i=null;if(!(n&&(i=t.getSelectionRange())&&i.collapsed&&(o=r.Position.getStart(i))&&t.isPositionAtBeginning(o)))return!1;var a="rtl"==(0,r.getComputedStyle)(o.element,"direction"),l=e.rawEvent;return!a&&37==l.which||a&&39==l.which},handleEvent:function(e){e.rawEvent.preventDefault()},defaultDisabled:!r.Browser.isChrome};t.CursorFeatures={noCycleCursorMove:o}},4397:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntityFeatures=void 0;var r=n(7582),o=n(6344),i=n(6344),a={keys:[13],shouldHandleEvent:function(e,t){return s(e,t)},handleEvent:function(e,t){s(e,t,1)}},l={keys:[27],shouldHandleEvent:function(e,t){return s(e,t)},handleEvent:function(e,t){s(e,t,3)}};function s(e,t,n){var r=(0,i.cacheGetEventData)(e,"READONLY_ENTITY_ELEMENT",(function(){var n=e.rawEvent.target,r=n&&t.getElementAtCursor((0,i.getEntitySelector)(),n);return r&&!r.isContentEditable?r:null}));if(r&&void 0!==n){var o=(0,i.getEntityFromElement)(r);o&&t.triggerPluginEvent(15,{operation:n,rawEvent:e.rawEvent,entity:o})}return r}var u={keys:[13],shouldHandleEvent:function(e,t){return f(e,t,!0,!1)},handleEvent:function(e,t){var n,r,o;e.rawEvent.preventDefault();var a=t.getSelectionRange();if(a){var l=i.Position.getEnd(a).normalize().node,s=t.getDocument().createElement("BR");null===(n=l.parentNode)||void 0===n||n.insertBefore(s,l.nextSibling);var u,d=t.getBlockElementAtNode(l);d&&(u=d.collapseToSingleElement(),null===(r=s.parentNode)||void 0===r||r.removeChild(s)),null===(o=t.getSelectionRange())||void 0===o||o.deleteContents(),(null==u?void 0:u.nextSibling)&&t.select(u.nextSibling,0)}}},d={keys:[8],shouldHandleEvent:function(e,t){return f(e,t,!1,!0)},handleEvent:function(e,t){f(e,t,!1,!0,5)}},c={keys:[46],shouldHandleEvent:function(e,t){return f(e,t,!0,!0)},handleEvent:function(e,t){f(e,t,!0,!0,4)}};function f(e,t,n,r,a){var l=(0,i.cacheGetEventData)(e,"NEIGHBOR_ENTITY_ELEMENT_"+n+"_"+r,(function(){var e,a=t.getSelectionRange();if(!a||r&&!a.collapsed)return null;var l=null===(e=t.getSelectedRegions()[0])||void 0===e?void 0:e.rootNode;a.commonAncestorContainer.normalize();var s=i.Position.getEnd(a).normalize(),u=null;if((0==s.offset||s.isAtEnd)&&l){var d=o.ContentTraverser.createBodyTraverser(l,s.node),c=n?0==s.offset?d.currentInlineElement:d.getNextInlineElement():s.isAtEnd?d.currentInlineElement:d.getPreviousInlineElement(),f=c&&c.getContainerNode();if(!r){var p=t.getBlockElementAtNode(s.node);(!p||f&&!p.contains(f))&&(f=null)}u=f&&t.getElementAtCursor((0,i.getEntitySelector)(),f)}return u}));if(l&&void 0!==a){var s=(0,i.getEntityFromElement)(l);s&&b(s,t,a,e)}return l}var p={keys:[39,37],allowFunctionKeys:!0,shouldHandleEvent:function(e,t){if(e.rawEvent.altKey||!t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))return!1;var n=t.getElementAtCursor();return!!n&&h(e,t,"rtl"===(0,i.getComputedStyle)(n,"direction")==(37===e.rawEvent.which))},handleEvent:function(e,t){var n=C(e),r=m(e,n);if(r){var o=E(r,n,t),a=o.delimiterPair,l=o.entity;a&&l&&(0,i.matchesSelector)(l,(0,i.getEntitySelector)())&&(e.rawEvent.preventDefault(),t.runAsync((function(){var r=n?e.rawEvent.shiftKey?-3:-1:-2,o=new i.Position(a,r);if(e.rawEvent.shiftKey){var l=a.ownerDocument.getSelection();null==l||l.extend(o.node,o.offset)}else t.select(o)})))}}},v={keys:[8,46],shouldHandleEvent:function(e,t){if(!t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))return!1;var n=t.getSelectionRange();if(!(null==n?void 0:n.collapsed))return!1;var r=46===e.rawEvent.which;if(h(e,t,r)){var o=m(e,r);return!!y(e,t,r,r?null==o?void 0:o.nextElementSibling:null==o?void 0:o.previousElementSibling)}return!1},handleEvent:function(e,t){var n=46===e.rawEvent.which;y(e,t,n,null,n?4:5)}};function h(e,t,n){var r,o=null===(r=t.getFocusedPosition())||void 0===r?void 0:r.normalize();if(C(e,n),!o)return!1;var i=3==o.node.nodeType?o.node:o.node==o.element?o.element.childNodes.item(o.offset):o.element,a=n?{class:"entityDelimiterBefore",pairClass:"entityDelimiterAfter",isAtEndOrBeginning:o.isAtEnd}:{class:"entityDelimiterAfter",pairClass:"entityDelimiterBefore",isAtEndOrBeginning:0==o.offset},l=function(e,t,n){var r=g(e,t);if(r){for(var o,i=r.currentInlineElement;i&&i.getContainerNode()===t;)o=r,i=n?o.getNextInlineElement():o.getPreviousInlineElement();return null==i?void 0:i.getContainerNode()}}(t,i,n);if(a.isAtEndOrBeginning&&l){var s=t.getElementAtCursor("."+a.class,l);if(s&&u(s))return!0}return!!u(i&&t.getElementAtCursor("."+a.class,i));function u(r){if(!r)return!1;var o=E(r,n,t).delimiterPair;return o&&(o.className||"").indexOf(a.pairClass)>-1&&m(e,n,r)}}function g(e,t){var n;if(t){var r=null===(n=e.getBlockElementAtNode(t))||void 0===n?void 0:n.getStartNode();if(r&&(0,i.isBlockElement)(r))return o.ContentTraverser.createBodyTraverser(r,t)}}function m(e,t,n){return(0,i.cacheGetEventData)(e,"delimiter_cache_key_"+t,(function(){return n}))}function y(e,t,n,r,o){var a=(0,i.cacheGetEventData)(e,"entity_delimiter_cache_key_"+n,(function(){return r&&t.getElementAtCursor((0,i.getEntitySelector)(),r)}));if(a&&void 0!==o){var l=(0,i.getEntityFromElement)(a);l&&b(l,t,o,e)}return a}function b(e,t,n,o){var a=e.wrapper,l=a.nextElementSibling,s=a.previousElementSibling;t.triggerPluginEvent(15,{operation:n,rawEvent:o.rawEvent,entity:e}),e.isReadonly&&!(0,i.isBlockElement)(e.wrapper)&&t.isFeatureEnabled("InlineEntityReadOnlyDelimiters")&&(o.rawEvent.defaultPrevented?t.runAsync((function(){if(t.contains(e.wrapper)){var n=(0,r.__read)((0,i.addDelimiters)(e.wrapper),1)[0];n&&t.select(n,-3)}else!function(e,t){[e,t].forEach((function(e){var t;(0,i.getDelimiterFromElement)(e)&&(null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(e))}))}(l,s)})):(0,i.getDelimiterFromElement)(l)&&(0,i.getDelimiterFromElement)(s)&&t.select((0,i.createRange)(s,l)))}function C(e,t){return!!(0,i.cacheGetEventData)(e,"Check_Before",(function(){return t}))}function E(e,t,n){var r=null,o=null,a=g(n,e);if(!a)return{delimiterPair:o,entity:r};for(var l,s="."+(t?"entityDelimiterAfter":"entityDelimiterBefore"),u=function(e,t){var r,o=null==e?void 0:e.getContainerNode();return null!==(r=o&&n.getElementAtCursor(t,o))&&void 0!==r?r:null},d=(0,i.getEntitySelector)(),c=a.currentInlineElement;c&&(!r||!o);){if(r=r||u(c,d),o=o||u(c,s),r&&!o&&!u(c,d)){o=null;break}l=a,c=t?l.getNextInlineElement():l.getPreviousInlineElement()}return{entity:r,delimiterPair:o}}t.EntityFeatures={clickOnEntity:a,escapeFromEntity:l,enterBeforeReadonlyEntity:u,backspaceAfterEntity:d,deleteBeforeEntity:c,moveBetweenDelimitersFeature:p,removeEntityBetweenDelimiters:v}},7018:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListFeatures=void 0;var r=n(3279),o=n(1892),i=n(4548),a=n(6344),l="previousBlock",s="nextBlock",u=(0,a.createObjectDefinition)({orderedStyleType:(0,a.createNumberDefinition)(!0,void 0,1,20),unorderedStyleType:(0,a.createNumberDefinition)(!0,void 0,1,9)},!0,!0),d=function(e){return function(t,n){var r=t.rawEvent,o=r.keyCode,i=r.altKey,a=r.shiftKey,l=r.ctrlKey,s=r.metaKey;return!l&&!s&&(9===o?!i&&a===!e:a&&i&&o===(e?39:37))&&R(t,n)}},c=function(e){return function(t,n){var r=null,o=9!==t.rawEvent.keyCode&&(r=n.getElementAtCursor())&&"rtl"==(0,a.getComputedStyle)(r,"direction");(0,i.setIndentation)(n,o==e?1:0),t.rawEvent.preventDefault()}},f={keys:[9],shouldHandleEvent:d(!0),handleEvent:c(!0)},p={keys:[9],shouldHandleEvent:d(!1),handleEvent:c(!1),allowFunctionKeys:!0},v={keys:[39],shouldHandleEvent:d(!0),handleEvent:c(!0),allowFunctionKeys:!0,defaultDisabled:a.Browser.isMac},h={keys:[37],shouldHandleEvent:d(!1),handleEvent:c(!1),allowFunctionKeys:!0,defaultDisabled:a.Browser.isMac},g={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e),r=t.getSelectionRange();return n&&(null==r?void 0:r.collapsed)&&(0,a.isPositionAtBeginningOf)(a.Position.getStart(r),n)},handleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e);(null==n?void 0:n.previousSibling)?(0,i.blockFormat)(t,(function(r,o,i){var l=(0,a.createVListFromRegion)(r,!1,null!=n?n:void 0);l&&o&&i&&(l.setIndentation(o,i,1,!0),l.writeBack(t.isFeatureEnabled("ReuseAllAncestorListElements"),t.isFeatureEnabled("DisableListChain")),e.rawEvent.preventDefault())})):L(e,t)},defaultDisabled:!0},m={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e);return n&&(0,a.isNodeEmpty)(n)&&!n.previousSibling&&!n.getElementsByTagName("blockquote").length},handleEvent:L},y={keys:[46],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e),r=t.getSelectionRange();if(n||!r)return!1;var o=a.Position.getEnd(r).isAtEnd?function(e,t){var n=(0,a.cacheGetEventData)(e,"nextSibling",(function(){var e,n=t.getSelectionRange(),r=n&&a.Position.getEnd(n).normalize(),o=r&&t.getBodyTraverser(r.node);return null===(e=null==o?void 0:o.getNextBlockElement())||void 0===e?void 0:e.getStartNode()}));return n}(e,t):void 0;return t.getElementAtCursor("LI",o,e)},handleEvent:function(e,t){var n=M(t);t.runAsync((function(e){return(0,i.commitListChains)(e,n)}))}},b={keys:[13],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e);return!e.rawEvent.shiftKey&&n&&(0,a.isNodeEmpty)(n)},handleEvent:function(e,t){t.addUndoSnapshot((function(){return L(e,t,!1)}),void 0,!0)},defaultDisabled:!a.Browser.isIE&&!a.Browser.isChrome};function C(e){return/^(\*|-|[0-9]{1,2}\.|[0-9]{1,2}\>|[0-9]{1,2}\)|[0-9]{1,2}\-|\([0-9]{1,2}\))$/.test(e)}var E={keys:[32],shouldHandleEvent:function(e,t){var n;return!(R(e,t)||t.isFeatureEnabled("AutoFormatList")||!(n=t.getContentSearcherOfCursor(e)))&&C(n.getSubStringBefore(4))&&!n.getNearestNonTextInlineElement()},handleEvent:function(e,t){t.insertContent(" "),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n,r=t.getContentSearcherOfCursor();if(r){var o=r.getSubStringBefore(4),a=r.getRangeFromText(o,!0);if(a)if(0==o.indexOf("*")||0==o.indexOf("-"))D(t,a),(0,i.toggleBullet)(t);else if(C(o))D(t,a),(0,i.toggleNumbering)(t);else if((n=t.getSelectedRegions())&&1==n.length){var l=parseInt(o);D(t,a),(0,i.toggleNumbering)(t,l)}null===(e=r.getRangeFromText(o,!0))||void 0===e||e.deleteContents()}}),void 0,!0)}},S={keys:[32],shouldHandleEvent:function(e,t){return!(R(e,t)||!t.isFeatureEnabled("AutoFormatList"))&&A(e,t,r.default,2)},handleEvent:function(e,t){t.insertContent(" "),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n=t.getContentSearcherOfCursor();if(n){var o=n.getSubStringBefore(5),a=n.getRangeFromText(o,!0),l=(0,r.default)(o);a&&(D(t,a),(0,i.toggleBullet)(t,null!=l?l:void 0,"autoToggleList")),null===(e=n.getRangeFromText(o,!0))||void 0===e||e.deleteContents()}}),void 0,!0)}},T={keys:[32],shouldHandleEvent:function(e,t){return!(R(e,t)||!t.isFeatureEnabled("AutoFormatList"))&&A(e,t,o.default,1)},handleEvent:function(e,t){t.insertContent(" "),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n,r=t.getContentSearcherOfCursor();if(r){var a=r.getSubStringBefore(5),l=r.getRangeFromText(a,!0);if(l){var s=_(a)?1:parseInt(a),u=P(t,l),d=null!==(e=(0,o.default)(a))&&void 0!==e?e:void 0;D(t,l),(0,i.toggleNumbering)(t,u&&1!==s?void 0:s,d,"autoToggleList")}null===(n=r.getRangeFromText(a,!0))||void 0===n||n.deleteContents()}}),void 0,!0)}},P=function(e,t){var n,r=e.getBodyTraverser(null==t?void 0:t.startContainer).getPreviousBlockElement(),o=null!==(n=null==r?void 0:r.getEndNode())&&void 0!==n?n:null;return"LI"===(0,a.getTagOfNode)(o)?o:void 0},w=function(e,t,n){var r=1===n?"orderedStyleType":"unorderedStyleType",o=P(e,t),i=o?(0,a.findClosestElementAncestor)(o,void 0,1===n?"ol":"ul"):null,l=i?(0,a.getMetadata)(i,u):null;return l?l[r]:null},_=function(e){var t=parseInt(e);if(t&&1===t)return 1;var n=e.replace(/\(|\)|\-|\./g,"").trim();return 1===n.length&&["i","a","I","A"].indexOf(n)>-1?1:void 0},O={keys:[13,9,46,8,258],shouldHandleEvent:function(e,t){return t.queryElements("li",1).filter((function(e){return!e.getElementsByTagName("blockquote").length})).length>0},handleEvent:function(e,t){var n=M(t);t.runAsync((function(e){return(0,i.commitListChains)(e,n)}))}};function M(e){return a.VListChain.createListChains(e.getSelectedRegions())}function D(e,t){var n,r=e.getBlockElementAtNode(t.startContainer),o=null==r?void 0:r.getEndNode();if(o&&"BR"!=(0,a.getTagOfNode)(o)){var i=e.getDocument().createElement("BR");(0,a.isBlockElement)(o)?o.appendChild(i):null===(n=o.parentNode)||void 0===n||n.insertBefore(i,o.nextSibling),e.select(t.startContainer,t.startOffset)}}function L(e,t,n){void 0===n&&(n=!0);var r=R(e,t);if(r){var o=r[0],l=(0,a.getTagOfNode)(o);"UL"!=l&&"OL"!=l||(0,i.toggleListType)(t,"UL"==l?2:1,void 0,n),t.focus(),e.rawEvent.preventDefault()}}function R(e,t){var n=t.getElementAtCursor("LI,TABLE",void 0,e),r=n&&"LI"==(0,a.getTagOfNode)(n)&&t.getElementAtCursor("UL,OL",n);return r?[r,n]:null}function A(e,t,n,r){var o=t.getContentSearcherOfCursor(e);if(!o)return!1;var i=o.getSubStringBefore(4),a=t.getBlockTraverser(),l=a&&a.currentBlockElement?a.currentBlockElement.getTextContent().slice(0,i.length):null,s=l&&l===i,u=M(t),d=o.getRangeFromText(i,!0),c=d&&w(t,d,r),f=_(i),p=n(i,u,null!=c?c:void 0),v=f||!c||c===p||2===r;return s&&!o.getNearestNonTextInlineElement()&&p&&v}var I={keys:[8],shouldHandleEvent:function(e,t){var n,r,o=t.getElementAtCursor();if(o){var i=null===(n=t.getBlockElementAtNode(o))||void 0===n?void 0:n.getStartNode(),u=null!==(r=null==i?void 0:i.previousElementSibling)&&void 0!==r?r:null;if(x(u)){var d=t.getSelectionRange(),c=t.getContentSearcherOfCursor(e),f=null==c?void 0:c.getSubStringBefore(4),p=null==c?void 0:c.getNearestNonTextInlineElement();if(d&&d.collapsed&&""===f&&!p){var v=null==i?void 0:i.nextElementSibling,h=x(v)?v:null==v?void 0:v.firstChild;if(x(h)&&(0,a.getTagOfNode)(u)==(0,a.getTagOfNode)(h)){var g=(0,a.cacheGetEventData)(e,l,(function(){return u})),m=(0,a.cacheGetEventData)(e,s,(function(){return h}));return!!g&&!!m}}}}return!1},handleEvent:function(e,t){t.runAsync((function(t){var n=(0,a.cacheGetEventData)(e,l,(function(){return null})),r=(0,a.cacheGetEventData)(e,s,(function(){return null})),o=t.getSelectionRange();if(n&&r&&o){var i=new a.VList(n);i.mergeVList(new a.VList(r));var u=t.getDocument().createElement("span");u.id="restoreRange",o.insertNode(u),i.writeBack(),(u=t.queryElements("#restoreRange")[0]).parentElement&&(t.select(new a.Position(u,-3)),u.parentElement.removeChild(u))}}))}};function x(e){return!!e&&((0,a.safeInstanceOf)(e,"HTMLOListElement")||(0,a.safeInstanceOf)(e,"HTMLUListElement"))}t.ListFeatures={autoBullet:E,indentWhenTab:f,outdentWhenShiftTab:p,outdentWhenBackspaceOnEmptyFirstLine:m,outdentWhenEnterOnEmptyLine:b,mergeInNewLineWhenBackspaceOnFirstChar:g,maintainListChain:O,maintainListChainWhenDelete:y,autoNumberingList:T,autoBulletList:S,mergeListOnBackspaceAfterList:I,outdentWhenAltShiftLeft:h,indentWhenAltShiftRight:v}},57:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownFeatures=void 0;var r=n(6344);function o(e,t,n,o){return{keys:[e],shouldHandleEvent:function(e,n){return e.rawEvent.shiftKey===o&&!!i(e,n,t)},handleEvent:function(e,o){o.runAsync((function(o){!function(e,t,n,o){t.addUndoSnapshot((function(){var a=i(e,t,n);if(a){var l=new r.Position(a.endContainer,-1),s=a.endOffset+1<=l.offset;if(a&&s){var u=a.cloneRange();u.setStart(u.startContainer,u.startOffset+1);var d=u.extractContents().textContent,c=t.getDocument().createTextNode(null!=d?d:""),f=(0,r.wrap)(c,o);a.setEnd(a.endContainer,a.endOffset+1),a.deleteContents();var p=t.getDocument().createTextNode("​");a.insertNode(p),a.insertNode(f),t.select(p,-1)}}}),"Format",!0)}(e,o,t,n)}))}}}function i(e,t,n){return(0,r.cacheGetEventData)(e,"MARKDOWN_RANGE",(function(){var o=t.getContentSearcherOfCursor(e),i=null,a=null;return null==o||o.forEachTextInlineElement((function(e){if(a&&i)return!0;var t=e.getTextContent();if(0==t[t.length-1].trim().length)return!1;var r=e.getParentBlock().getTextContent();if(r[r.length-1].trim()===n)return!1;if(a||(a=e.getStartPosition().move(t.length)),t[0]==n)i=e.getStartPosition();else for(var o=t.length-1;o>0;o--){if(i)return!0;if(t[o]==n&&0==t[o-1].trim().length)return i=e.getStartPosition().move(o),!0}})),i&&a&&(0,r.createRange)(i,a)}))}var a=o(56,"*","b",!0),l=o(189,"_","i",!0),s=o(192,"~","s",!0),u=o(192,"`","code",!1);t.MarkdownFeatures={markdownBold:a,markdownItalic:l,markdownStrikethru:s,markdownInlineCode:u}},1495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteFeatures=void 0;var r=n(4548),o=n(6344),i="BLOCKQUOTE",a=[i,"LI","TD","TH"].join(","),l={keys:[8],shouldHandleEvent:function(e,t){var n=u(e,t);return n&&(0,o.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:d},s={keys:[13],shouldHandleEvent:function(e,t){var n=u(e,t);return!e.rawEvent.shiftKey&&n&&(0,o.isNodeEmpty)(n)},handleEvent:function(e,t){return t.addUndoSnapshot((function(){return d(e,t)}),void 0,!0)}};function u(e,t){return(0,o.cacheGetEventData)(e,"QUOTE_CHILD",(function(){var e=t.getElementAtCursor(a);if(e&&(0,o.getTagOfNode)(e)==i){var n=t.getFocusedPosition(),r=n&&t.getBlockElementAtNode(n.normalize().node);if(r){var l=r.getStartNode()==e?r.getStartNode():r.collapseToSingleElement();return(0,o.isNodeEmpty)(l)?l:null}}return null}))}function d(e,t){t.addUndoSnapshot((function(){var n=u(e,t);if(n){(0,o.getTagOfNode)(n)==i&&(n=(0,o.wrap)((0,o.toArray)(n.childNodes)));var a=(0,o.splitBalancedNodeRange)(n),l=!!a&&c(a),s=a&&(0,o.unwrap)(a);t.select(n,0),l&&((0,o.safeInstanceOf)(s,"HTMLLIElement")&&s.style.removeProperty("color"),(0,r.clearFormat)(t))}})),e.rawEvent.preventDefault()}var c=function(e){return!!(e&&(0,o.safeInstanceOf)(e,"HTMLQuoteElement")&&e.style.borderLeft&&e.style.borderColor&&e.style.paddingLeft&&e.style.color)};t.QuoteFeatures={unquoteWhenBackspaceOnEmptyFirstLine:l,unquoteWhenEnterOnEmptyLine:s}},9187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShortcutFeatures=void 0;var r=n(6344),o=n(4548);function i(e,t,n,r){return void 0===r&&(r=!1),r?null:{winKey:e,macKey:t,action:n}}var a=[i(4162,8258,o.toggleBold),i(4169,8265,o.toggleItalic),i(4181,8277,o.toggleUnderline),i(4128,8224,o.clearFormat),i(4186,8282,(function(e){return e.undo()})),i(26,26,(function(e){return e.undo()}),r.Browser.isMac),i(4185,24666,(function(e){return e.redo()})),i(4286,8382,o.toggleBullet),i(4287,8383,o.toggleNumbering),i(20670,24766,(function(e){return(0,o.changeFontSize)(e,0)})),i(20668,24764,(function(e){return(0,o.changeFontSize)(e,1)}))].filter((function(e){return!!e})),l={allowFunctionKeys:!0,keys:[66,73,85,89,90,188,190,191,32,8],shouldHandleEvent:s,handleEvent:function(e,t){var n=s(e);n&&(n.action(t),e.rawEvent.preventDefault(),e.rawEvent.stopPropagation())}};function s(e){return(0,r.cacheGetEventData)(e,"DEFAULT_SHORT_COMMAND",(function(){var t=e.rawEvent,n=0!=e.eventType||t.getModifierState("AltGraph")?0:t.which|(t.metaKey&&8192)|(t.shiftKey&&16384)|(t.ctrlKey&&4096)|(t.altKey&&18);return n&&a.filter((function(e){return(r.Browser.isMac?e.macKey:e.winKey)==n}))[0]}))}t.ShortcutFeatures={defaultShortcut:l}},2828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructuredNodeFeatures=void 0;var r=n(6344),o={TD:"TABLE",TH:"TABLE",LI:"OL,UL"},i=(0,r.getObjectKeys)(o).join(","),a={keys:[13],shouldHandleEvent:l,handleEvent:function(e,t){var n=l(e,t),o=(0,r.createElement)(1,t.getDocument());t.addUndoSnapshot((function(){var e;null===(e=null==n?void 0:n.parentNode)||void 0===e||e.insertBefore(o,n),"TABLE"==(0,r.getTagOfNode)(n)&&t.select(new r.Position(o,0).normalize())})),e.rawEvent.preventDefault()},defaultDisabled:!0};function l(e,t){return(0,r.cacheGetEventData)(e,"FIRST_STRUCTURE",(function(){var n=e.rawEvent.shiftKey?null:t.getElementAtCursor(i);if(n){var a=t.getSelectionRange();if(a&&a.collapsed&&(0,r.isPositionAtBeginningOf)(r.Position.getStart(a),n)&&!t.getBodyTraverser(n).getPreviousBlockElement())return t.getElementAtCursor(o[(0,r.getTagOfNode)(n)])}return null}))}t.StructuredNodeFeatures={insertLineBeforeStructuredNodeFeature:a}},4683:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableFeatures=void 0;var r=n(4548),o=n(6344),i={keys:[9],shouldHandleEvent:function(e,t){return u(e,t)&&!d(e,t)},handleEvent:function(e,t){var n,i,a,l=e.rawEvent.shiftKey,s=u(e,t);if(s){for(var d=c(e,s),f=l?-1:1,p=null!==(n=d.row)&&void 0!==n?n:0,v=(null!==(i=d.col)&&void 0!==i?i:0)+f;;v+=f){var h=null!==(a=d.cells)&&void 0!==a?a:[];if(v<0||v>=h[p].length){if((p+=f)<0){t.select(d.table,-2);break}if(p>=h.length){(0,r.editTable)(t,1);break}v=l?h[p].length-1:0}var g=d.getCell(p,v);if(g.td){var m=new o.Position(g.td,0).normalize();t.select(m);break}}e.rawEvent.preventDefault()}}},a={keys:[9],shouldHandleEvent:function(e,t){return u(e,t)&&d(e,t)},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var n=e.rawEvent.shiftKey,o=t.getSelectionRangeEx(),i=u(e,t);if(i){var a=c(e,i);n&&t.getElementAtCursor("blockquote",a.table,e)?(0,r.setIndentation)(t,1):n||(0,r.setIndentation)(t,0),o.coordinates&&t.select(o.table,o.coordinates)}}))}},l={keys:[38,40],shouldHandleEvent:function(e,t){return u(e,t)&&!d(e,t)},handleEvent:function(e,t){var n,r,i,a=u(e,t);if(a){var l=new o.VTable(a),s=38==e.rawEvent.which,d=s?-1:1,c=e.rawEvent.shiftKey,f=null===(n=t.getDocument().defaultView)||void 0===n?void 0:n.getSelection(),p=null;if(f){for(var v=f.anchorNode,h=f.anchorOffset,g=null!==(r=l.row)&&void 0!==r?r:0;g>=0&&l.cells&&g{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextFeatures=void 0;var r=n(4548),o=n(6344),i={keys:[9],shouldHandleEvent:function(e,t){if(t.isFeatureEnabled("TabKeyTextFeatures")&&!e.rawEvent.shiftKey){var n=t.getDocument().activeElement,r=t.getElementAtCursor("LI,TABLE",void 0,e),i=t.getElementAtCursor((0,o.getEntitySelector)(),void 0,e);return!r&&(i?i.isContentEditable:n.isContentEditable)}return!1},handleEvent:function(e,t){var n=t.getSelectionRangeEx();0==n.type&&(t.addUndoSnapshot((function(){if(n.areAllCollapsed)u(t,e);else{var i=n.ranges,a=i[0];if(l(t,a))(0,r.setIndentation)(t,0);else{var s=(0,o.createRange)(a.startContainer,a.startOffset);i.forEach((function(e){return e.deleteContents()})),t.select(s),u(t,e)}}})),e.rawEvent.preventDefault())}},a={keys:[9],shouldHandleEvent:function(e,t){if(e.rawEvent.shiftKey&&t.isFeatureEnabled("TabKeyTextFeatures")){var n=t.getSelectionRangeEx();return 0==n.type&&!n.areAllCollapsed&&t.getElementAtCursor("blockquote",void 0,e)&&!t.getElementAtCursor("LI,TABLE",void 0,e)&&l(t,n.ranges[0])}return!1},handleEvent:function(e,t){t.addUndoSnapshot((function(){return(0,r.setIndentation)(t,1)})),e.rawEvent.preventDefault()}};function l(e,t){var n=!1,r=o.Position.getStart(t),i=o.Position.getEnd(t),a=e.getBlockElementAtNode(r.node),l=e.getBlockElementAtNode(i.node);if(!a||!l)return!1;if(a.equals(l)){var u=new o.Position(a.getStartNode(),0),d=new o.Position(a.getEndNode(),-1),c=(0,o.createRange)(u,o.Position.getStart(t)),f=(0,o.createRange)(o.Position.getEnd(t),d);return!n&&s(c)&&s(f)&&(n=!0),n}return!0}function s(e){return""==e.toString()&&0==(0,o.queryElements)(e.commonAncestorContainer,"img,table,ul,ol",null,2,e).length}function u(e,t){var n=e.getDocument().createElement("span"),r=e.getContentSearcherOfCursor(t);if(r){for(var i=6-r.getSubStringBefore(Number.MAX_SAFE_INTEGER).length%6,a=null,l="",s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(7539),i=n(7167),a=n(4397),l=n(7018),s=n(57),u=n(1495),d=n(9187),c=n(2828),f=n(4683),p=n(3171),v=n(2056),h=(0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)({},l.ListFeatures),u.QuoteFeatures),f.TableFeatures),c.StructuredNodeFeatures),o.AutoLinkFeatures),d.ShortcutFeatures),i.CursorFeatures),s.MarkdownFeatures),a.EntityFeatures),p.TextFeatures),v.CodeFeatures);t.default=function(){return h}},9025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllFeatures=t.ContentEdit=void 0;var r=n(678);Object.defineProperty(t,"ContentEdit",{enumerable:!0,get:function(){return r.default}});var o=n(692);Object.defineProperty(t,"getAllFeatures",{enumerable:!0,get:function(){return o.default}})},4239:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.toLocaleLowerCase();if(t){var n=t.length-1;return 26*n+t.charCodeAt(n)-96}return null}},3279:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={"*":1,"-":2,"--":3,"->":5,"--\x3e":8,"=>":6,">":4,"—":7};t.default=function(e){var t=e.trim();return n[t]||null}},1892:(e,t,n)=>{"use strict";var r,o,i,a,l,s;Object.defineProperty(t,"__esModule",{value:!0});var u,d,c=n(4239);!function(e){e[e.Decimal=1]="Decimal",e[e.LowerAlpha=2]="LowerAlpha",e[e.UpperAlpha=3]="UpperAlpha",e[e.LowerRoman=4]="LowerRoman",e[e.UpperRoman=5]="UpperRoman"}(u||(u={})),function(e){e[e.Dot=1]="Dot",e[e.Dash=2]="Dash",e[e.Parenthesis=3]="Parenthesis",e[e.DoubleParenthesis=4]="DoubleParenthesis"}(d||(d={}));var f={".":1,"-":2,")":3},p=[13,16,15,14],v=[17,20,19,18],h=["1","a","A","I","i"],g=["i","v","x","l","c","d","m"],m=["I","V","X","L","C","D","M"],y=((r={})[1]=function(e){return T[e]||null},r[2]=function(e){return S[e]||null},r[3]=function(e){return E[e]||null},r[4]=function(e){return C[e]||null},r[5]=function(e){return b[e]||null},r),b=((o={})[1]=17,o[2]=20,o[3]=18,o[4]=19,o),C=((i={})[1]=13,i[2]=16,i[3]=14,i[4]=15,i),E=((a={})[1]=9,a[2]=12,a[3]=10,a[4]=11,a),S=((l={})[1]=5,l[2]=8,l[3]=6,l[4]=7,l),T=((s={})[1]=1,s[2]=2,s[3]=3,s[4]=4,s);t.default=function(e,t,n){var r,o=e.trim(),i="("===o[0]&&")"===o[o.length-1],a=i?o.slice(1,-1):o.slice(0,-1),l=parseInt(a),s=isNaN(l)?(0,c.default)(a):l;return!s||s<1||t&&s>1&&(t.length<1&&h.indexOf(a)<0||(null==t?void 0:t.length)>0&&!(null===(r=t[t.length-1])||void 0===r?void 0:r.canAppendAtCursor(s)))?null:function(e){return Number(e)||/^[A-Za-z\s]*$/.test(e)}(a)?function(e,t,n){var r=t?4:f[e[e.length-1]];if(r){var o=function(e,t){if(!isNaN(parseInt(e)))return 1;if(/[a-z]+/g.test(e)){if(null!=t&&p.indexOf(t)>-1&&g.indexOf(e[0])>-1||!t&&"i"===e)return 4;if(t||!t&&"a"===e)return 2}else if(/[A-Z]+/g.test(e)){if(null!=t&&v.indexOf(t)>-1&&m.indexOf(e[0])>-1||!t&&"I"===e)return 5;if(t||!t&&"A"===e)return 3}}(t?e.slice(1,-1):e.slice(0,-1),n);return o?y[o](r):null}return null}(o,i,n):null}},5713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e){var t=this;this.options=e,this.container=null,this.editor=null,this.isMenuShowing=!1,this.onDismiss=function(){var e,n;t.container&&t.isMenuShowing&&(null===(n=(e=t.options).dismiss)||void 0===n||n.call(e,t.container),t.isMenuShowing=!1)}}return e.prototype.getName=function(){return"ContextMenu"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){var e;this.onDismiss(),(null===(e=this.container)||void 0===e?void 0:e.parentNode)&&(this.container.parentNode.removeChild(this.container),this.container=null),this.editor=null},e.prototype.onPluginEvent=function(e){if(16==e.eventType&&e.items.length>0){var t=e.rawEvent,n=e.items;this.onDismiss(),this.options.allowDefaultMenu||t.preventDefault(),this.initContainer(t.pageX,t.pageY)&&(this.options.render(this.container,n,this.onDismiss),this.isMenuShowing=!0)}},e.prototype.initContainer=function(e,t){var n,o;return!this.container&&this.editor&&(this.container=(0,r.createElement)(5,this.editor.getDocument()),this.editor.getDocument().body.appendChild(this.container)),null===(n=this.container)||void 0===n||n.style.setProperty("left",e+"px"),null===(o=this.container)||void 0===o||o.style.setProperty("top",t+"px"),!!this.container},e}();t.default=o},936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenu=void 0;var r=n(5713);Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return r.default}})},2522:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e,t,n,r){return{sourceString:e,replacementHTML:t,matchSourceCaseSensitive:n,shouldReplace:r}},i=[o(":)","🙂",!0),o(";)","😉",!0),o(":O","😲",!0),o(":o","😯",!0),o("<3","❤️",!0)],a=function(){function e(e){void 0===e&&(e=i),this.longestReplacementLength=null,this.editor=null,this.replacements=null,this.replacementEndCharacters=null,this.updateReplacements(e)}return e.prototype.updateReplacements=function(e){var t;this.replacements=e,this.longestReplacementLength=(t=this.replacements,Math.max.apply(null,t.map((function(e){return e.sourceString.length})))),this.replacementEndCharacters=function(e){var t,n,o=new Set;try{for(var i=(0,r.__values)(e),a=i.next();!a.done;a=i.next()){var l=a.value,s=l.sourceString;if(0!=s.length){var u=s[s.length-1];l.matchSourceCaseSensitive?o.add(u):(o.add(u.toLocaleLowerCase()),o.add(u.toLocaleUpperCase()))}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o}(this.replacements)},e.prototype.getName=function(){return"CustomReplace"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){var t,n=this;if(3==e.eventType&&this.editor&&!this.editor.isInIME()&&e.rawEvent.data&&(null===(t=this.replacementEndCharacters)||void 0===t?void 0:t.has(e.rawEvent.data))){var r=this.editor.getContentSearcherOfCursor(e);if(r&&null!=this.longestReplacementLength){var o=r.getSubStringBefore(this.longestReplacementLength),i=this.getMatchingReplacement(o);if(i&&(!i.shouldReplace||!r||i.shouldReplace(i,r.getWordBefore(),this.editor))){var a=r.getSubStringBefore(i.sourceString.length),l=r.getRangeFromText(a,!0),s=this.editor.getDocument().createElement("span");s.innerHTML=this.editor.getTrustedHTMLHandler()(i.replacementHTML);var u=1==s.childNodes.length?s.childNodes[0]:s;l&&this.editor.addUndoSnapshot((function(){var e;l.deleteContents(),l.insertNode(u),null===(e=n.editor)||void 0===e||e.select(u,-1)}),void 0,!0)}}}},e.prototype.getMatchingReplacement=function(e){var t,n;if(0==e.length||!this.replacements)return null;var o=e.replace(/\s/g," "),i=o.toLocaleLowerCase();try{for(var a=(0,r.__values)(this.replacements),l=a.next();!l.done;l=a.next()){var s=l.value,u=(0,r.__read)(s.matchSourceCaseSensitive?[o,s.sourceString]:[i,s.sourceString.toLocaleLowerCase()],2),d=u[0],c=u[1];if(d.substring(d.length-c.length)==c)return s}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return null},e}();t.default=a},7030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomReplace=void 0;var r=n(2522);Object.defineProperty(t,"CustomReplace",{enumerable:!0,get:function(){return r.default}})},7578:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4548),o=n(6344),i=function(){function e(){var e=this;this.chains=null,this.expectedChangeSource=null,this.editor=null,this.disposer=null,this.onDrop=function(){e.cacheListChains("Drop")}}return e.prototype.getName=function(){return"CutPasteListChain"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler("drop",this.onDrop)},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 9:e.isCut&&this.cacheListChains("Cut");break;case 10:this.cacheListChains("Paste");break;case 7:this.chains&&this.chains.length>0&&this.expectedChangeSource==e.source&&this.editor&&((0,r.commitListChains)(this.editor,this.chains),this.chains=null,this.expectedChangeSource=null)}},e.prototype.cacheListChains=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getSelectedRegions();n&&(this.chains=o.VListChain.createListChains(n),this.expectedChangeSource=e)},e}();t.default=i},8854:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CutPasteListChain=void 0;var r=n(7578);Object.defineProperty(t,"CutPasteListChain",{enumerable:!0,get:function(){return r.default}})},4039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e,t,n){var r=this;void 0===e&&(e=function(e){return e}),this.getTooltipCallback=e,this.target=t,this.onLinkClick=n,this.originalHref=null,this.trackedLink=null,this.editor=null,this.disposer=null,this.onMouse=function(e){var t,n,o=null===(t=r.editor)||void 0===t?void 0:t.getElementAtCursor("a[href]",e.target),i=o&&r.tryGetHref(o);i&&(null===(n=r.editor)||void 0===n||n.setEditorDomAttribute("title","mouseover"==e.type?r.getTooltipCallback(i,o):null))},this.onBlur=function(e){r.trackedLink&&r.updateLinkHrefIfShouldUpdate(),r.resetLinkTracking()}}return e.prototype.getName=function(){return"Hyperlink"},e.prototype.initialize=function(e){this.editor=e,this.disposer=e.addDomEventHandler({mouseover:this.onMouse,mouseout:this.onMouse,blur:this.onBlur})},e.prototype.dispose=function(){this.disposer&&(this.disposer(),this.disposer=null),this.editor=null},e.prototype.onPluginEvent=function(e){var t,n,o;if(6==e.eventType||2==e.eventType&&(!this.isContentEditValue(e.rawEvent)||32==e.rawEvent.which)||7==e.eventType){var i,a=(i=null===(t=this.editor)||void 0===t?void 0:t.getElementAtCursor("A[href]",void 0,e))&&i!==this.trackedLink||2==e.eventType||7==e.eventType;7==e.eventType&&"Keyboard"==e.source&&this.trackedLink!=i&&i&&(this.trackedLink=i),this.trackedLink&&(a||this.tryGetHref(this.trackedLink)!==this.originalHref)&&(a&&this.updateLinkHrefIfShouldUpdate(),this.resetLinkTracking()),!this.trackedLink&&i&&this.doesLinkDisplayMatchHref(i)&&(this.trackedLink=i,this.originalHref=this.tryGetHref(i))}if(6==e.eventType&&(i=null===(n=this.editor)||void 0===n?void 0:n.getElementAtCursor("A",e.rawEvent.srcElement))){if(this.onLinkClick&&!1!==this.onLinkClick(i,e.rawEvent))return;var l;if((l=this.tryGetHref(i))&&(0,r.isCtrlOrMetaPressed)(e.rawEvent)&&0===e.rawEvent.button){e.rawEvent.preventDefault();try{var s=this.target||"_blank",u=null===(o=this.editor)||void 0===o?void 0:o.getDocument().defaultView;null==u||u.open(l,s)}catch(e){}}}},e.prototype.tryGetHref=function(e){try{return e?e.href:null}catch(e){return null}},e.prototype.isContentEditValue=function(e){return(0,r.isCharacterValue)(e)||8==e.which||46==e.which},e.prototype.updateLinkHrefIfShouldUpdate=function(){this.trackedLink&&!this.doesLinkDisplayMatchHref(this.trackedLink)&&this.updateLinkHref()},e.prototype.resetLinkTracking=function(){this.trackedLink=null,this.originalHref=""},e.prototype.doesLinkDisplayMatchHref=function(e){if(e){var t=e.innerText.trim().replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),n=new RegExp("^(?:https?:\\/\\/)?"+t+"\\/?","i"),r=this.tryGetHref(e);if(null!==r)return n.test(r)}return!1},e.prototype.updateLinkHref=function(){var e,t=this;if(this.trackedLink){var n=(0,r.matchLink)(this.trackedLink.innerText.trim());null!==n&&(null===(e=this.editor)||void 0===e||e.addUndoSnapshot((function(){t.trackedLink.href=n.normalizedUrl})))}},e}();t.default=o},5061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HyperLink=void 0;var r=n(4039);Object.defineProperty(t,"HyperLink",{enumerable:!0,get:function(){return r.default}})},9770:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7582),i=n(7058),a=n(971),l=n(4296),s=n(2448),u=n(2627),d=n(8755),c=n(330),f=n(6147),p=n(6344),v=n(1400),h=Math.PI,g=8,m=2*h/g,y=["nw","n","ne","e","se","s","sw","w"],b={borderColor:"#DB626C",minWidth:10,minHeight:10,preserveRatio:!1,minRotateDeg:5,imageSelector:"img",rotateIconHTML:"",disableCrop:!1,disableRotate:!1,disableSideResize:!1,onSelectState:7},C=((r={})[1]=v.getCornerResizeHTML,r[2]=v.getSideResizeHTML,r[4]=c.getRotateHTML,r[8]=u.getCropHTML,r),E=function(){function e(e,t){var n=this;this.onShowResizeHandle=t,this.editor=null,this.disposer=null,this.image=null,this.clonedImage=null,this.wrapper=null,this.editInfo=null,this.lastSrc=null,this.dndHelpers=[],this.wasResized=!1,this.shadowSpan=null,this.isCropping=!1,this.pngSource=null,this.onBlur=function(){n.setEditingImage(null,!1)},this.removeWrapper=function(){n.shadowSpan&&(0,p.unwrap)(n.shadowSpan),n.wrapper=null,n.shadowSpan=null},this.updateWrapper=function(e){var t,r,o,i=n.wrapper;if(i&&n.editInfo&&n.image&&n.clonedImage&&n.options&&(null===(t=n.shadowSpan)||void 0===t?void 0:t.parentElement)){var a=P(i,"r_cropC"),l=P(i,"r_cropO"),u=P(i,"r_resizeH"),d=P(i,"r_rotateC")[0],f=P(i,"r_rotateH")[0],h=P(i,"r_cropH");n.isCropping=1==a.length&&4==l.length;var g=n.editInfo,m=g.angleRad,y=g.bottomPercent,b=g.leftPercent,C=g.rightPercent,E=g.topPercent,_=(0,s.default)(n.editInfo,n.isCropping),O=_.targetWidth,M=_.targetHeight,D=_.originalWidth,L=_.originalHeight,R=_.visibleWidth,A=_.visibleHeight,I=(O-R)/2,x=(M-A)/2,N=D*b,k=D*C,j=L*E,B=L*y;if(i.style.margin=x+"px "+I+"px",i.style.transform="rotate("+m+"rad)",function(e,t,n,r){if(t.style.borderStyle){var o=t.style.borderWidth?2*parseInt(t.style.borderWidth):2;return e.style.width=T(n+o),void(e.style.height=T(r+o))}e.style.width=T(n),e.style.height=T(r)}(i,n.image,R,A),i.style.textAlign=(o=n.shadowSpan.parentElement,(0,p.safeInstanceOf)(o,"HTMLElement")&&"rtl"==(0,p.getComputedStyle)(o,"direction")?"right":"left"),n.clonedImage.style.width=T(D),n.clonedImage.style.height=T(L),n.isCropping)S(a[0],N,j,k,B,void 0,void 0),S(l[0],0,0,k,void 0,void 0,j),S(l[1],void 0,0,0,B,k,void 0),S(l[2],N,void 0,0,0,void 0,B),S(l[3],0,j,void 0,0,N,void 0),w(h,m);else{if(n.clonedImage.style.margin=-j+"px 0 0 "+-N+"px","r_resizeH"==(null==e?void 0:e.elementClass)){var F=i.clientWidth,H=i.clientHeight;n.wasResized=!0,(0,v.doubleCheckResize)(n.editInfo,n.options.preserveRatio||!1,F,H),n.updateWrapper()}var z=null===(r=n.editor)||void 0===r?void 0:r.getVisibleViewport();f&&d&&z&&(0,c.updateRotateHandlePosition)(z,d,f),w(u,m)}}},this.options=(0,o.__assign)((0,o.__assign)({},b),e||{}),this.allowedOperations=1|(this.options.disableCrop?0:8)|(this.options.disableRotate?0:4)|(this.options.disableSideResize?0:2)}return e.prototype.getName=function(){return"ImageEdit"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=e.addDomEventHandler({blur:function(){return t.onBlur()},dragstart:function(e){t.image&&e.preventDefault()}})},e.prototype.dispose=function(){var e;this.clearDndHelpers(),null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 22:e.selectionRangeEx&&2===e.selectionRangeEx.type&&this.options&&void 0!==this.options.onSelectState&&this.setEditingImage(e.selectionRangeEx.image,this.options.onSelectState);break;case 5:var n=e.rawEvent.target,r=e.rawEvent.button;(this.shadowSpan!==n||this.shadowSpan===n&&0!==r||this.isCropping)&&this.setEditingImage(null);break;case 0:this.setEditingImage(null);break;case 7:case 12:this.removeWrapper();break;case 8:(null===(t=this.options)||void 0===t?void 0:t.imageSelector)&&(0,p.toArray)(e.clonedRoot.querySelectorAll(this.options.imageSelector)).forEach((function(e){(0,d.deleteEditInfo)(e)}))}},e.prototype.isOperationAllowed=function(e){return!!(this.allowedOperations&e)},e.prototype.setEditingImage=function(e,t){var n=this,r="number"==typeof t?t:0,l="number"!=typeof t&&!!t;!e&&this.image&&this.editor&&this.editInfo&&this.lastSrc&&this.clonedImage&&(this.clearDndHelpers(),this.pngSource&&(this.clonedImage.src=this.editInfo.src),(0,i.default)(this.editor,this.image,this.editInfo,this.lastSrc,this.wasResized||this.isCropping,this.clonedImage),this.removeWrapper(),this.editor.addUndoSnapshot((function(){return n.image}),"ImageResize"),l&&this.editor.select(this.image),this.pngSource=null,this.image=null,this.editInfo=null,this.lastSrc=null,this.clonedImage=null,this.isCropping=!1),!this.image&&(null==e?void 0:e.isContentEditable)&&this.editor&&(this.editor.addUndoSnapshot(),this.image=e,this.editInfo=(0,d.getEditInfoFromImage)(e),this.pngSource=(0,f.tryToConvertGifToPng)(this.editInfo),this.wasResized=function(e){var t=e.width,n=e.height,r=e.style;return!(""!==r.maxWidth&&"initial"!==r.maxWidth&&"auto"!==r.maxWidth||!(_(r.height)||_(r.width)||_(t)||_(n)))}(this.image),r=((0,a.default)(e)?r:3)&this.allowedOperations,this.createWrapper(r),this.updateWrapper(),this.dndHelpers=(0,o.__spreadArray)((0,o.__spreadArray)((0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(this.createDndHelpers("r_resizeH",v.Resizer)),!1),(0,o.__read)(this.createDndHelpers("r_rotateH",c.Rotator)),!1),(0,o.__read)(this.createDndHelpers("r_cropH",u.Cropper)),!1),(0,o.__read)(this.createDndHelpers("r_cropC",u.Cropper)),!1),this.editor.select(this.image))},e.prototype.flipImage=function(e,t){var n;this.image=e,this.editInfo=(0,d.getEditInfoFromImage)(e);var r=this.editInfo.angleRad;r>=Math.PI/2&&r<3*Math.PI/4||r<=-Math.PI/2&&r>-3*Math.PI/4?"horizontal"===t?this.editInfo.flippedVertical=!this.editInfo.flippedVertical:this.editInfo.flippedHorizontal=!this.editInfo.flippedHorizontal:"vertical"===t?this.editInfo.flippedVertical=!this.editInfo.flippedVertical:this.editInfo.flippedHorizontal=!this.editInfo.flippedHorizontal,this.createWrapper(4),this.updateWrapper(),this.setEditingImage(null),null===(n=this.editor)||void 0===n||n.select(e)},e.prototype.rotateImage=function(e,t){var n;this.image=e,this.editInfo=(0,d.getEditInfoFromImage)(e),this.editInfo.angleRad=this.editInfo.angleRad+t,this.createWrapper(4),this.updateWrapper(),this.setEditingImage(null),null===(n=this.editor)||void 0===n||n.select(e)},e.prototype.createWrapper=function(e){var t,n,r,o,i,a,l,s,u,d,c,f=this;if(this.image&&this.editor&&this.options&&this.editInfo){this.clonedImage=this.image.cloneNode(!0),this.clonedImage.removeAttribute("id"),this.clonedImage.style.removeProperty("max-width"),this.clonedImage.style.width=this.editInfo.widthPx+"px",this.clonedImage.style.height=this.editInfo.heightPx+"px",this.wrapper=(0,p.createElement)(6,this.image.ownerDocument),null===(n=null===(t=this.wrapper)||void 0===t?void 0:t.firstChild)||void 0===n||n.appendChild(this.clonedImage),this.wrapper.style.display=p.Browser.isSafari?"inline-block":"inline-flex",this.lastSrc=this.image.getAttribute("src"),this.clonedImage&&(this.clonedImage.src=null!==(r=this.pngSource)&&void 0!==r?r:this.editInfo.src,l=this.clonedImage,s=this.editInfo.flippedHorizontal,u=this.editInfo.flippedVertical,l.style.transform="scale("+(s?"-1":"1")+", "+(u?"-1":"1")+")",this.clonedImage.style.position="absolute");var h={borderColor:(d=this.options.borderColor,c=this.editor.isDarkMode(),"string"==typeof d?d.trim():c?d.darkModeColor.trim():d.lightModeColor.trim()),rotateIconHTML:this.options.rotateIconHTML,rotateHandleBackColor:this.editor.isDarkMode()?"#333":"white",isSmallImage:(o=this.editInfo,i=o.widthPx,a=o.heightPx,!!(i&&a&&i*i<1e4))},g=[(0,v.getResizeBordersHTML)(h)];(0,p.getObjectKeys)(C).forEach((function(t){var n=C[t](h,f.onShowResizeHandle);(e&t)==t&&n&&(0,p.arrayPush)(g,n)})),g.forEach((function(e){var t=(0,p.createElement)(e,f.image.ownerDocument);t&&f.wrapper&&f.wrapper.appendChild(t)})),this.insertImageWrapper(this.wrapper)}},e.prototype.insertImageWrapper=function(e){if(this.image){this.shadowSpan=(0,p.wrap)(this.image,"span");var t=this.shadowSpan.attachShadow({mode:"open"});this.shadowSpan.style.verticalAlign="bottom",this.shadowSpan.style.fontSize="24px",t.appendChild(e)}},e.prototype.createDndHelpers=function(e,t){var n=this,r=this.wrapper;return r&&this.editInfo?P(r,e).map((function(r){return new l.default(r,{editInfo:n.editInfo,options:n.options,elementClass:e,x:r.dataset.x,y:r.dataset.y},n.updateWrapper,t,n.editor?n.editor.getZoomScale():1)})):[]},e.prototype.clearDndHelpers=function(){var e;null===(e=this.dndHelpers)||void 0===e||e.forEach((function(e){return e.dispose()})),this.dndHelpers=[]},e}();function S(e,t,n,r,o,i,a){e.style.left=void 0!==t?T(t):e.style.left,e.style.top=void 0!==n?T(n):e.style.top,e.style.right=void 0!==r?T(r):e.style.right,e.style.bottom=void 0!==o?T(o):e.style.bottom,e.style.width=void 0!==i?T(i):e.style.width,e.style.height=void 0!==a?T(a):e.style.height}function T(e){return e+"px"}function P(e,t){return(0,p.toArray)(e.querySelectorAll("."+t))}function w(e,t){e.map((function(e){var n=e.dataset.y,r=e.dataset.x;e.style.cursor=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n="");var r=function(e){var t=Math.round(e/m)%g;return t<0?t+g:t}(e),o=t+n,i=y.indexOf(o),a=i>=0&&i+r;return a?y[a%g]:""}(t,n,r)+"-resize"}))}function _(e){var t="string"==typeof e?parseInt(e):e;return!isNaN(t)}t.default=E},971:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return!1;try{var t=e.ownerDocument.createElement("canvas");t.width=10,t.height=10;var n=t.getContext("2d");return!!n&&(n.drawImage(e,0,0),n.getImageData(0,0,1,1),!0)}catch(e){return!1}}},8318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2463),o=n(8755);t.default=function(e,t){var n=(0,o.getEditInfoFromImage)(e);if(n){var i=(0,r.default)(n,t),a=i.width,l=i.height;return Math.round(a)==Math.round(n.widthPx)&&Math.round(l)==Math.round(n.heightPx)}return!1}},5801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8755);t.default=function(e,t){e.addUndoSnapshot((function(){t.style.width="",t.style.height="",t.style.maxWidth="100%",t.removeAttribute("width"),t.removeAttribute("height"),(0,r.deleteEditInfo)(t)}),"ImageResize")}},470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7058),o=n(2463),i=n(8318),a=n(8755);t.default=function(e,t,n,l,s){var u,d,c,f=(0,a.getEditInfoFromImage)(t);(0,i.default)(t,n)||(u=t,d=t.src,c=function(){if(!e.isDisposed()&&e.contains(t)&&f){var i=t.getAttribute("src"),a=(0,o.default)(f,n),u=a.width,d=a.height;f.widthPx=Math.max(u,l),f.heightPx=Math.max(d,s),e.addUndoSnapshot((function(){(0,r.default)(e,t,f,i||"",!0)}),"ImageResize"),e.select(t)}},u.onload=function(){u.onload=null,u.onerror=null,c()},u.onerror=function(){u.onload=null,u.onerror=null,c()},u.src=d)}},7058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6249),o=n(4081),i=n(2448),a=n(8755);t.default=function(e,t,n,l,s,u){var d="",c=(0,a.getEditInfoFromImage)(null!=u?u:t),f=(0,r.default)(n,c);switch(f){case 1:d=n.src;break;case 2:d=l;break;case 3:d=(0,o.default)(null!=u?u:t,n)}d!=l&&(d=e.triggerPluginEvent(19,{image:t,originalSrc:n.src,previousSrc:l,newSrc:d}).newSrc),d==n.src?(0,a.deleteEditInfo)(t):(0,a.saveEditInfo)(t,n);var p=(0,i.default)(n),v=p.targetWidth,h=p.targetHeight;t.src=d,(s||3==f)&&(t.width=v,t.height=h)}},6249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditInfoState=void 0;var r,o=n(7582),i=["angleRad"],a=["leftPercent","rightPercent","topPercent","bottomPercent"],l=(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(i),!1),(0,o.__read)(a),!1),s=(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(l),!1),(0,o.__read)(["widthPx","heightPx"]),!1);function u(e,t){return Math.abs(e-t)<.001}(r=t.ImageEditInfoState||(t.ImageEditInfoState={}))[r.Invalid=0]="Invalid",r[r.ResizeOnly=1]="ResizeOnly",r[r.SameWithLast=2]="SameWithLast",r[r.FullyChanged=3]="FullyChanged",t.default=function(e,t){return e&&e.src&&!s.some((function(t){return!("number"==typeof e[t])}))?!l.every((function(t){return u(e[t],0)}))||e.flippedHorizontal||e.flippedVertical||t&&(!t||e.angleRad!==t.angleRad)?t&&i.every((function(t){return u(e[t],0)}))&&i.every((function(e){return u(t[e],0)}))&&a.every((function(n){return u(e[n],t[n])}))&&t.flippedHorizontal===e.flippedHorizontal&&t.flippedVertical===e.flippedVertical?2:3:1:0}},8755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEditInfoFromImage=t.deleteEditInfo=t.saveEditInfo=void 0;var r=n(6249),o=n(6344);t.saveEditInfo=function(e,t){e&&(0,o.setMetadata)(e,t)},t.deleteEditInfo=function(e){e&&(0,o.removeMetadata)(e)},t.getEditInfoFromImage=function(e){var t=(0,o.getMetadata)(e);return t&&0!=(0,r.default)(t)?t:function(e){return{src:e.getAttribute("src")||"",widthPx:e.clientWidth,heightPx:e.clientHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight,leftPercent:0,rightPercent:0,topPercent:0,bottomPercent:0,angleRad:0}}(e)}},4081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2448);t.default=function(e,t){var n=t.angleRad,o=t.widthPx,i=t.heightPx,a=t.bottomPercent,l=t.leftPercent,s=t.rightPercent,u=t.topPercent,d=t.naturalWidth,c=t.naturalHeight,f=d*(1-l-s),p=c*(1-u-a),v=window.devicePixelRatio||1,h=document.createElement("canvas"),g=(0,r.default)(t),m=g.targetWidth,y=g.targetHeight;h.width=m*v,h.height=y*v;var b=h.getContext("2d");return b&&(b.scale(v,v),b.translate(m/2,y/2),b.rotate(n),b.scale(t.flippedHorizontal?-1:1,t.flippedVertical?-1:1),b.drawImage(e,d*l,c*u,f,p,-o/2,-i/2,o,i)),h.toDataURL("image/png",1)}},2448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.widthPx,r=e.heightPx,o=e.angleRad,i=n/(1-e.leftPercent-e.rightPercent),a=r/(1-e.topPercent-e.bottomPercent),l=t?i:n,s=t?a:r;return{targetWidth:Math.abs(l*Math.cos(o))+Math.abs(s*Math.sin(o)),targetHeight:Math.abs(l*Math.sin(o))+Math.abs(s*Math.cos(o)),originalWidth:i,originalHeight:a,visibleWidth:l,visibleHeight:s}}},2463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.naturalWidth,r=e.naturalHeight,o=e.leftPercent,i=e.topPercent;return{width:n*(1-o-e.rightPercent)*t,height:r*(1-i-e.bottomPercent)*t}}},6147:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryToConvertGifToPng=void 0;var r=n(4081);t.tryToConvertGifToPng=function(e){var t=e.src,n=e.widthPx,o=e.heightPx,i=e.naturalHeight,a=e.naturalWidth;if(t.indexOf(".gif")>-1||t.indexOf("image/gif")>-1)try{var l=document.createElement("img");l.src=t;var s={src:t,widthPx:n,heightPx:o,naturalWidth:a,naturalHeight:i,leftPercent:0,rightPercent:0,topPercent:0,bottomPercent:0,angleRad:0};return(0,r.default)(l,s)}catch(e){return null}return null}},2627:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCropHTML=t.Cropper=void 0;var r=n(7582),o=n(1400),i=["w","e"],a=["s","n"],l={sw:0,nw:90,ne:180,se:270};function s(e,t,n,r,o){var i=n*(1-r)-o,a=n*e+t;return Math.max(Math.min(a,i),0)/n}t.Cropper={onDragStart:function(e){var t=e.editInfo;return(0,r.__assign)({},t)},onDragging:function(e,t,n,i,a){var l,u=e.editInfo,d=e.x,c=e.y,f=e.options;i=(l=(0,r.__read)((0,o.rotateCoordinate)(i,a,u.angleRad),2))[0],a=l[1];var p=u.widthPx,v=u.heightPx,h=u.leftPercent,g=u.rightPercent,m=u.topPercent,y=u.bottomPercent,b=f.minWidth,C=f.minHeight,E=1-h-g,S=1-m-y;if(E>0&&S>0&&void 0!==b&&void 0!==C){var T=p/E,P=v/S,w="e"!=d?s(n.leftPercent,i,T,g,b):h,_="w"!=d?s(n.rightPercent,-i,T,h,b):g,O="s"!=c?s(n.topPercent,a,P,y,C):m,M="n"!=c?s(n.bottomPercent,-a,P,m,C):y;return u.leftPercent=w,u.rightPercent=_,u.topPercent=O,u.bottomPercent=M,u.widthPx=T*(1-w-_),u.heightPx=P*(1-O-M),!0}return!1}},t.getCropHTML=function(){var e={tag:"div",style:"position:absolute;background-color:rgb(0,0,0,0.5);pointer-events:none",className:"r_cropO"},t={tag:"div",style:"position:absolute;overflow:hidden",className:"r_cropC",children:[]};return t&&i.forEach((function(e){return a.forEach((function(n){var r;return null===(r=t.children)||void 0===r?void 0:r.push(function(e,t){var n;return{tag:"div",className:"r_cropH",style:"position:absolute;pointer-events:auto;cursor:"+t+e+"-resize;"+("w"==e?"left":"right")+":0;"+("n"==t?"top":"bottom")+":0;width:22px;height:22px;transform:rotate("+l[t+e]+"deg)",dataset:{x:e,y:t},children:(n=[],[0,1].forEach((function(e){return[0,1].forEach((function(t){n.push(function(e,t){return{tag:"div",style:"position:absolute;left:"+e+"px;bottom:"+e+"px;"+(0==t?"right:"+e+"px;height:"+(7-2*e)+"px;":"top:"+e+"px;width:"+(7-2*e)+"px;")+";background-color:"+(0==e?"white":"black")}}(e,t))}))})),n)}}(e,n))}))})),[t,e,e,e,e]}},1400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getResizeBordersHTML=t.getSideResizeHTML=t.getCornerResizeHTML=t.doubleCheckResize=t.rotateCoordinate=t.Resizer=void 0;var r,o=n(7582);!function(e){e[e.SquareHandles=0]="SquareHandles",e[e.CircularHandlesCorner=1]="CircularHandlesCorner"}(r||(r={}));var i=["w","","e"],a=["s","","n"];function l(e,t,n){if(0==e&&0==t)return[0,0];var r=Math.sqrt(e*e+t*t);return n=Math.atan2(t,e)-n,[r*Math.cos(n),r*Math.sin(n)]}function s(e,t,n,r){var o="w"==e?"left":"right",i="n"==t?"top":"bottom",a=t+e;return""==e&&""==t?null:{tag:"div",style:"position:absolute;"+o+":"+(""==e?"50%":"0px")+";"+i+":"+(""==t?"50%":"0px"),children:[{tag:"div",style:u[r](a,i,o,n),className:"r_resizeH",dataset:{x:e,y:t}}]}}t.Resizer={onDragStart:function(e){var t=e.editInfo;return(0,o.__assign)({},t)},onDragging:function(e,t,n,r,i){var a,s=e.x,u=e.y,d=e.editInfo,c=e.options,f=n.widthPx>0&&n.heightPx>0?1*n.widthPx/n.heightPx:0;if(r=(a=(0,o.__read)(l(r,i,d.angleRad),2))[0],i=a[1],void 0!==c.minWidth&&void 0!==c.minHeight){var p=""==s,v=""==u,h=!(p||v)&&(c.preserveRatio||t.shiftKey),g=p?n.widthPx:Math.max(n.widthPx+r*("w"==s?-1:1),c.minWidth),m=v?n.heightPx:Math.max(n.heightPx+i*("n"==u?-1:1),c.minHeight);return h&&f>0&&(f>1?(g=m*f)0?o/i:0;n=Math.floor(n),r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),e.widthPx=n,e.heightPx=r,t&&a>0&&(o!==n||i!==r)&&(n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRotateHTML=t.updateRotateHandlePosition=t.Rotator=void 0;var r=n(7582),o=180/Math.PI;function i(e){var t;return{tag:"svg",namespace:"http://www.w3.org/2000/svg",style:"width:16px;height:16px;margin: 8px 8px",children:[{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:(t={d:"M 10.5,10.0 A 3.8,3.8 0 1 1 6.7,6.3",transform:"matrix(1.1 1.1 -1.1 1.1 11.6 -10.8)"},t["fill-opacity"]="0",t.stroke=e,t)},{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:{d:"M12.0 3.648l.884-.884.53 2.298-2.298-.53z",stroke:e}}]}}t.Rotator={onDragStart:function(e){var t=e.editInfo;return(0,r.__assign)({},t)},onDragging:function(e,t,n,r,i){var a=e.editInfo,l=e.options,s=a.heightPx/2+31,u=s*Math.sin(n.angleRad)+r,d=s*Math.cos(n.angleRad)-i,c=Math.atan2(u,d);if(!t.altKey&&l&&void 0!==l.minRotateDeg){var f=c*o;c=Math.round(f/l.minRotateDeg)*l.minRotateDeg/o}return a.angleRad!=c&&(a.angleRad=c,!0)}},t.updateRotateHandlePosition=function(e,t,n){var r=n.getBoundingClientRect();if(r){var o=r.top-e.top,i=r.left-e.left,a=r.right-e.right,l=r.bottom-e.bottom,s=Number.MAX_SAFE_INTEGER;o<=0?s=o:i<=0?s=i:a>=0?s=a:l>=0&&(s=l);var u=Math.max(Math.min(15,s),0),d=Math.max(Math.min(32,s-u),0);t.style.top=-u+"px",t.style.height=u+"px",n.style.top=-d+"px"}},t.getRotateHTML=function(e){var t=e.borderColor;return[{tag:"div",className:"r_rotateC",style:"position:absolute;left:50%;width:1px;background-color:"+t+";top:-15px;height:15px;",children:[{tag:"div",className:"r_rotateH",style:"position:absolute;background-color:"+e.rotateHandleBackColor+";border:solid 1px "+t+";border-radius:50%;width:32px;height:32px;left:-16px;cursor:move;top:-32px;",children:[i(t)]}]}]}},872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetImage=t.isResizedTo=t.resizeByPercentage=t.canRegenerateImage=t.ImageEdit=void 0;var r=n(9770);Object.defineProperty(t,"ImageEdit",{enumerable:!0,get:function(){return r.default}});var o=n(971);Object.defineProperty(t,"canRegenerateImage",{enumerable:!0,get:function(){return o.default}});var i=n(470);Object.defineProperty(t,"resizeByPercentage",{enumerable:!0,get:function(){return i.default}});var a=n(8318);Object.defineProperty(t,"isResizedTo",{enumerable:!0,get:function(){return a.default}});var l=n(5801);Object.defineProperty(t,"resetImage",{enumerable:!0,get:function(){return l.default}})},8099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e){function t(t,n,r,o,i){return void 0===t&&(t=10),void 0===n&&(n=10),void 0===r&&(r="#DB626C"),void 0===o&&(o=!1),void 0===i&&(i="img"),e.call(this,{minHeight:n,minWidth:t,borderColor:r,preserveRatio:o,imageSelector:i})||this}return(0,r.__extends)(t,e),t.prototype.showResizeHandle=function(e){this.setEditingImage(e,3)},t.prototype.hideResizeHandle=function(e){this.setEditingImage(null,e)},t}(n(9770).default);t.default=o},9835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageResize=void 0;var r=n(8099);Object.defineProperty(t,"ImageResize",{enumerable:!0,get:function(){return r.default}})},3835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7401),o=n(9474),i=n(8373),a=n(1820),l=n(2621),s=n(8149),u=n(5155),d=n(9053),c=n(5323),f=n(6344),p=function(){function e(e,t){void 0===e&&(e="SPAN"),void 0===t&&(t=!1),this.unknownTagReplacement=e,this.convertSingleImageBody=t,this.editor=null}return e.prototype.getName=function(){return"Paste"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){if(this.editor&&10==e.eventType){var t=e.fragment,n=e.sanitizingOption,p=this.editor.getTrustedHTMLHandler();switch((0,f.getPasteSource)(e,this.convertSingleImageBody)){case 0:(0,s.default)(e);break;case 1:case 2:0!==e.pasteType&&2!==e.pasteType||(0,i.default)(e,p);break;case 3:(0,l.default)(e,p);break;case 5:(0,a.default)(t,n);break;case 4:n.additionalTagReplacements["google-sheets-html-origin"]="*";break;case 7:(0,r.default)(e,p);break;case 6:(0,o.default)(t),(0,u.default)(t)}(0,c.default)(n),(0,d.default)(n),n.unknownTagReplacement=this.unknownTagReplacement}},e}();t.default=p},9474:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);function o(e){if(e&&!e.nextSibling&&["OL","UL","MENU"].indexOf((0,r.getTagOfNode)(e))<0){var t=!1;if((0,r.toArray)(e.childNodes).every((function(e){var n;return!(!(0,r.safeInstanceOf)(e,"Text")||(null===(n=e.nodeValue)||void 0===n?void 0:n.trim()))||"LI"==(0,r.getTagOfNode)(e)&&(t=!0,!0)}))&&t)return!0}return!1}t.default=function(e){o(e)?(0,r.wrap)((0,r.toArray)(e.childNodes),"UL"):(0,r.safeInstanceOf)(e.firstChild,"HTMLElement")&&o(e.firstChild)&&(0,r.changeElementTag)(e.firstChild,"UL")}},8373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.excelHandler=void 0;var r=n(6344),o=/<\/\s*td\s*>((?!<\/\s*tr\s*>)[\s\S])*$/i,i=/<\/\s*tr\s*>((?!<\/\s*table\s*>)[\s\S])*$/i,a=/]*>[^<]*/i,l=/]*>[^<]*/i;function s(e,t){if(e.match(o)){var n=t.match(a);e=(n?n[0]:"
  • ")+e+""}if(e.match(i)){var r=t.match(l);e=(r?r[0]:"
    1 2 @@ -908,7 +908,7 @@

    All files / packag       -506x +632x       @@ -923,11 +923,11 @@

    All files / packag       -506x +632x   -506x +632x   -506x +632x       @@ -935,34 +935,34 @@

    All files / packag       -506x +632x         -506x -506x -494x -494x -1412x -494x -1412x -1412x +632x +632x +620x +620x +1754x +620x +1754x +1754x   -3863x -3863x +4457x +4457x   -3863x -181x -181x +4457x +244x +244x     -3863x -4333x -4823x -4823x -4823x -4823x +4457x +5107x +5777x +5777x +5777x +5777x       @@ -974,8 +974,8 @@

    All files / packag       -494x -494x +620x +620x       @@ -985,16 +985,16 @@

    All files / packag     1x -920x +1276x       -190x -97x -97x -97x +253x +123x +123x +123x   -190x +253x       @@ -1002,24 +1002,24 @@

    All files / packag       -293x -293x -276x -276x -814x +419x +419x +402x +402x +1156x   -814x -814x -814x -2409x -1567x -1567x -1567x +1156x +1156x +1156x +3363x +2161x +2161x +2161x         -276x +402x 15x 15x   @@ -1029,7 +1029,7 @@

    All files / packag     1x -1567x +2161x 56x 56x 56x @@ -1073,18 +1073,18 @@

    All files / packag       -145x -145x +208x +208x 1x     -144x -144x -144x -144x -144x -144x -144x +207x +207x +207x +207x +207x +207x +207x   14x 20x @@ -1269,46 +1269,46 @@

    All files / packag   7x   -  -  -  +7x +7x +7x   -  -  -  +7x +7x +7x   -  -  -  +7x +7x +7x   -  +7x             -  +7x   -  +7x             -  +7x   -  +7x             -  +7x   -  +7x       @@ -1316,9 +1316,9 @@

    All files / packag       -  +7x   -  +7x       @@ -1326,9 +1326,9 @@

    All files / packag       -  +7x   -  +7x       @@ -1336,7 +1336,7 @@

    All files / packag       -  +7x       @@ -1348,14 +1348,14 @@

    All files / packag       -  -  -  -  -  -  -  -  +42x +68x +68x +68x +68x +24x +44x +24x       @@ -1378,7 +1378,7 @@

    All files / packag     1x -1572x +2166x     1x @@ -1470,7 +1470,7 @@

    All files / packag     1x -5060x +6698x       @@ -1527,41 +1527,41 @@

    All files / packag     1x -1567x -1567x -1567x -1567x -1567x -1185x +2161x +2161x +2161x +2161x +2161x +1599x   -1567x -1167x +2161x +1581x         1x -1589x -1589x -1393x -1393x -979x +2183x +2183x +1915x +1915x +1321x   -414x +594x   -1589x +2183x     1x -1590x -1590x -1411x -1411x -969x +2184x +2184x +1933x +1933x +1311x   -442x +622x   -1590x +2184x     1x @@ -1636,9 +1636,9 @@

    All files / packag       -193x -193x -193x +256x +256x +256x       @@ -1658,14 +1658,14 @@

    All files / packag       -1066x -1066x +1408x +1408x 188x 188x 188x     -1066x +1408x    

    import applyTableFormat from './applyTableFormat';
     import getTagOfNode from '../utils/getTagOfNode';
    @@ -2073,47 +2073,47 @@ 

    All files / packag }); } break; - case TableOperation.AlignCenter: - this.table.style.marginLeft = 'auto'; - this.table.style.marginRight = 'auto'; - break; - case TableOperation.AlignLeft: - this.table.style.marginLeft = ''; - this.table.style.marginRight = 'auto'; - break; - case TableOperation.AlignRight: - this.table.style.marginLeft = 'auto'; - this.table.style.marginRight = ''; - break; - case TableOperation.AlignCellCenter: - this.setAlignmentToSelectedCells( + case TableOperation.AlignCenter: + this.table.style.marginLeft = 'auto'; + this.table.style.marginRight = 'auto'; + break; + case TableOperation.AlignLeft: + this.table.style.marginLeft = ''; + this.table.style.marginRight = 'auto'; + break; + case TableOperation.AlignRight: + this.table.style.marginLeft = 'auto'; + this.table.style.marginRight = ''; + break; + case TableOperation.AlignCellCenter: + this.setAlignmentToSelectedCells( firstRow, lastRow, firstColumn, lastColumn, 'center' ); - break; - case TableOperation.AlignCellLeft: - this.setAlignmentToSelectedCells( + break; + case TableOperation.AlignCellLeft: + this.setAlignmentToSelectedCells( firstRow, lastRow, firstColumn, lastColumn, 'left' ); - break; - case TableOperation.AlignCellRight: - this.setAlignmentToSelectedCells( + break; + case TableOperation.AlignCellRight: + this.setAlignmentToSelectedCells( firstRow, lastRow, firstColumn, lastColumn, 'right' ); - break; - case TableOperation.AlignCellTop: - this.setAlignmentToSelectedCells( + break; + case TableOperation.AlignCellTop: + this.setAlignmentToSelectedCells( firstRow, lastRow, firstColumn, @@ -2121,9 +2121,9 @@

    All files / packag 'top', true /** isVertical */ ); - break; - case TableOperation.AlignCellMiddle: - this.setAlignmentToSelectedCells( + break; + case TableOperation.AlignCellMiddle: + this.setAlignmentToSelectedCells( firstRow, lastRow, firstColumn, @@ -2131,9 +2131,9 @@

    All files / packag 'middle', true /** isVertical */ ); - break; - case TableOperation.AlignCellBottom: - this.setAlignmentToSelectedCells( + break; + case TableOperation.AlignCellBottom: + this.setAlignmentToSelectedCells( firstRow, lastRow, firstColumn, @@ -2141,11 +2141,11 @@

    All files / packag 'bottom', true /** isVertical */ ); - break; + break; } }   - setAlignmentToSelectedCells( + setAlignmentToSelectedCells( firstRow: number, lastRow: number, firstColumn: number, @@ -2153,14 +2153,14 @@

    All files / packag alignmentType: string, isVertical?: boolean ) { - for (let i = firstRow; i <= lastRow; i++) { - for (let j = firstColumn; j <= lastColumn; j++) { - if (this.cells) { - const cell = this.cells[i][j].td; - if (isVertical && cell) { - cell.style?.setProperty('vertical-align', alignmentType); - } else if (cell) { - cell.style?.setProperty('text-align', alignmentType); + for (let i = firstRow; i <= lastRow; i++) { + for (let j = firstColumn; j <= lastColumn; j++) { + Eif (this.cells) { + const cell = this.cells[i][j].td; + if (isVertical && cell) { + cell.style?.setProperty('vertical-align', alignmentType); + } else if (cell) { + cell.style?.setProperty('text-align', alignmentType); } } } @@ -2479,7 +2479,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/applyTableFormat.ts.html b/coverage/packages/roosterjs-editor-dom/lib/table/applyTableFormat.ts.html index 2335af9bed1..f3239e39980 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/applyTableFormat.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/applyTableFormat.ts.html @@ -1138,7 +1138,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/cloneCellStyles.ts.html b/coverage/packages/roosterjs-editor-dom/lib/table/cloneCellStyles.ts.html index a88ee611ab6..3e2e1cf3290 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/cloneCellStyles.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/cloneCellStyles.ts.html @@ -121,7 +121,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/table/index.html b/coverage/packages/roosterjs-editor-dom/lib/table/index.html index 8f53d942833..f71e42c854d 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/table/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/table/index.html @@ -23,30 +23,30 @@

    All files packages/roosterjs-editor-dom
    - 70.77% + 75.86% Statements - 431/609 + 462/609
    - 59.59% + 63.65% Branches - 323/542 + 345/542
    - 88.16% + 89.47% Functions - 67/76 + 68/76
    - 70.97% + 76.11% Lines - 401/565 + 430/565
    @@ -73,18 +73,18 @@

    All files packages/roosterjs-editor-dom

    VTable.ts -
    +
    VTable.ts +
    74.04%288/38967.83%234/34580.85%38/4775%261/34882.01%319/38974.2%256/34582.98%39/4783.33%290/348
    import getComputedStyles from './getComputedStyles';
     import getTagOfNode from './getTagOfNode';
    @@ -235,7 +235,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/collapseNodes.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/collapseNodes.ts.html index 0ae6e0d0839..37fd97311f6 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/collapseNodes.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/collapseNodes.ts.html @@ -155,22 +155,22 @@

    All files / packag       -1654x +1977x 2x     -1652x -1652x +1975x +1975x   -1652x -1063x -589x +1975x +1185x +790x   -589x -585x -585x -585x -585x +790x +786x +786x +786x +786x   4x   @@ -193,21 +193,21 @@

    All files / packag       -3320x -1104x +3966x +1410x 65x 5x   60x     -1099x +1405x       -1099x +1405x   -3320x +3966x    

    import contains from './contains';
     import splitParentNode from './splitParentNode';
    @@ -292,7 +292,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/contains.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/contains.ts.html index d24d7674a66..368173b7c8b 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/contains.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/contains.ts.html @@ -168,37 +168,37 @@

    All files / packag       -39198x -6381x +45145x +6818x     -32817x -4017x +38327x +5323x     -28800x -2590x -2590x +33004x +3195x +3195x     -28800x -8506x -8506x +33004x +10580x +10580x     -28800x -756x +33004x +992x     -28044x +32012x             -23254x -23254x +26997x +26997x       @@ -295,7 +295,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/createElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/createElement.ts.html index a4c76bf54dd..1507b2eb371 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/createElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/createElement.ts.html @@ -271,53 +271,53 @@

    All files / packag       -11021x -4687x +11407x +4885x     -11021x +11407x 1x     -77140x -11020x +79842x +11406x       -11020x -395x +11406x +405x     -11020x +11406x 374x     -11020x +11406x 83x 163x       -11020x +11406x 84x 231x       -11020x -6106x -6920x +11406x +6294x +7108x 1017x -5903x -5902x -5902x -5902x +6091x +6090x +6090x +6090x           -11020x +11406x    

    import getObjectKeys from '../jsUtils/getObjectKeys';
     import safeInstanceOf from './safeInstanceOf';
    @@ -457,7 +457,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/findClosestElementAncestor.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/findClosestElementAncestor.ts.html index f351caf8da1..b967c3700cd 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/findClosestElementAncestor.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/findClosestElementAncestor.ts.html @@ -106,12 +106,12 @@

    All files / packag       -23189x -23189x +26290x +26290x   -23189x -6541x -6541x +26290x +6956x +6956x       @@ -119,7 +119,7 @@

    All files / packag       -23189x +26290x    

    import contains from './contains';
     import matchesSelector from './matchesSelector';
    @@ -160,7 +160,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/fromHtml.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/fromHtml.ts.html index 0e075bcd205..f9ad8c8e954 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/fromHtml.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/fromHtml.ts.html @@ -109,7 +109,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/getComputedStyles.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/getComputedStyles.ts.html index 229f0ce8fa8..5d608a8d201 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/getComputedStyles.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/getComputedStyles.ts.html @@ -119,26 +119,26 @@

    All files / packag   1x   -538x +676x   -534x -534x -534x -534x -531x -531x +672x +672x +672x +672x +669x +669x   -531x -642x -642x -642x -642x -642x +669x +780x +780x +780x +780x +780x         -534x +672x       @@ -148,7 +148,7 @@

    All files / packag     1x -506x +644x       @@ -217,7 +217,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/getInnerHTML.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/getInnerHTML.ts.html index a027ba0f76a..ff2071850bd 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/getInnerHTML.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/getInnerHTML.ts.html @@ -115,7 +115,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/getIntersectedRect.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/getIntersectedRect.ts.html index 7dce7f65b31..c3f01f85cc7 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/getIntersectedRect.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/getIntersectedRect.ts.html @@ -202,7 +202,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafNode.ts.html index 0d8362d4f5f..1c127ed458e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafNode.ts.html @@ -103,17 +103,17 @@

    All files / packag       -1795x -466x -466x -436x +1905x +505x +505x +452x     -466x +505x 35x     -466x +505x       @@ -121,7 +121,7 @@

    All files / packag     1x -457x +496x       @@ -175,7 +175,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafSibling.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafSibling.ts.html index f4174904238..40c8f053c28 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafSibling.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/getLeafSibling.ts.html @@ -165,45 +165,45 @@

    All files / packag       -1379x -1379x -1383x -631x -1379x -1379x -1354x -1354x +1727x +1727x +1767x +670x +1727x +1727x +1605x +1605x   -1354x +1605x     -1371x -1371x -1371x -643x -643x +1628x +1628x +1628x +809x +809x       -1371x +1628x         -617x +769x       -1371x -1371x +1628x +1628x   -1354x -1354x +1605x +1605x         -1379x +1727x       @@ -217,7 +217,7 @@

    All files / packag       -203x +337x       @@ -328,7 +328,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/getPendableFormatState.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/getPendableFormatState.ts.html index e456cce8c78..515b49efbe3 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/getPendableFormatState.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/getPendableFormatState.ts.html @@ -232,7 +232,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/getTagOfNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/getTagOfNode.ts.html index 1852eac4d63..f7b21b1cbc9 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/getTagOfNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/getTagOfNode.ts.html @@ -75,7 +75,7 @@

    All files / packag     1x -29121x +34015x    

    import { NodeType } from 'roosterjs-editor-types';
      
    @@ -94,7 +94,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/index.html b/coverage/packages/roosterjs-editor-dom/lib/utils/index.html index 77d41d909e9..8efdaeb3e93 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/index.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/index.html @@ -575,7 +575,7 @@

    All files packages/roosterjs-editor-dom diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/isBlockElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/isBlockElement.ts.html index 9d80c93b5af..44d688696f0 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/isBlockElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/isBlockElement.ts.html @@ -90,8 +90,8 @@

    All files / packag     1x -7729x -7729x +9601x +9601x       @@ -124,7 +124,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeAfter.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeAfter.ts.html index 0e186349f77..c4065cf5af3 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeAfter.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeAfter.ts.html @@ -82,7 +82,7 @@

    All files / packag     1x -2074x +2645x       @@ -112,7 +112,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeEmpty.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeEmpty.ts.html index 8698f6608a9..4e2069d241c 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeEmpty.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/isNodeEmpty.ts.html @@ -120,30 +120,30 @@

    All files / packag       -90x +92x 2x -88x +90x 21x -67x -67x -67x -67x +69x +69x +69x +69x     -67x +69x         -46x +48x     21x       -88x -88x +90x +90x    

    import getTagOfNode from './getTagOfNode';
     import { NodeType } from 'roosterjs-editor-types';
    @@ -196,7 +196,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/isVoidHtmlElement.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/isVoidHtmlElement.ts.html index f382c7a65ee..9d344210c4e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/isVoidHtmlElement.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/isVoidHtmlElement.ts.html @@ -93,7 +93,7 @@

    All files / packag     1x -1560x +1869x    

    import getTagOfNode from './getTagOfNode';
      
    @@ -121,7 +121,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/matchLink.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/matchLink.ts.html index 2d90d0715ae..c76c27d210e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/matchLink.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/matchLink.ts.html @@ -346,7 +346,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/matchesSelector.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/matchesSelector.ts.html index df47406ed85..a588818602f 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/matchesSelector.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/matchesSelector.ts.html @@ -136,7 +136,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/moveChildNodes.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/moveChildNodes.ts.html index 2ba56ee359b..90c222dc8e0 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/moveChildNodes.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/moveChildNodes.ts.html @@ -91,16 +91,16 @@

    All files / packag       -718x +838x 4x     -714x -391x +834x +516x     -714x -379x +834x +372x      

    /**
    @@ -133,7 +133,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/normalizeRect.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/normalizeRect.ts.html index cc2486928e8..81eee34cfce 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/normalizeRect.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/normalizeRect.ts.html @@ -118,7 +118,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/parseColor.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/parseColor.ts.html index ad214669563..396dba87341 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/parseColor.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/parseColor.ts.html @@ -151,7 +151,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/queryElements.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/queryElements.ts.html index 19d1371910a..2c900b08ab6 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/queryElements.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/queryElements.ts.html @@ -161,32 +161,32 @@

    All files / packag       -11959x +12899x     -11343x +12224x 6x     -11337x +12218x   -11337x -1556x -389x -217x +12218x +1940x +485x +266x       -217x +266x     -389x +485x         -389x -723x +485x +842x       @@ -195,10 +195,10 @@

    All files / packag       -11337x -795x +12218x +901x   -11337x +12218x       @@ -207,15 +207,15 @@

    All files / packag       -723x -723x -723x +842x +842x +842x   -723x -605x +842x +611x     -723x +842x       @@ -225,8 +225,8 @@

    All files / packag       -2384x -4726x +2794x +5370x       @@ -325,7 +325,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/readFile.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/readFile.ts.html index 3072fc5d746..9051c4da503 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/readFile.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/readFile.ts.html @@ -118,7 +118,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/safeInstanceOf.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/safeInstanceOf.ts.html index 2dfed75a0bb..bfc1d502e4e 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/safeInstanceOf.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/safeInstanceOf.ts.html @@ -117,15 +117,15 @@

    All files / packag   1x   -20699x +23119x             -20699x -20699x +23119x +23119x       @@ -137,18 +137,18 @@

    All files / packag       -49975x -29278x +56729x +33612x           -20697x -20697x -20697x -20697x -20697x +23117x +23117x +23117x +23117x +23117x       @@ -208,7 +208,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/setColor.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/setColor.ts.html index 1cf9ae17706..0e44af49574 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/setColor.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/setColor.ts.html @@ -239,22 +239,22 @@

    All files / packag       -13960x -13960x -13960x +14554x +14554x +14554x   -13960x -13960x -13897x +14554x +14554x +14491x           -13897x +14491x     -13960x +14554x 58x     @@ -502,7 +502,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/shouldSkipNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/shouldSkipNode.ts.html index 2f79770ec6c..78624fa14c1 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/shouldSkipNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/shouldSkipNode.ts.html @@ -133,35 +133,35 @@

    All files / packag     1x -1510x -1131x -34x -1097x -12x +1843x +1377x +33x +1344x +20x   -1085x +1324x   -379x -379x +466x +466x 1x     -378x +465x   -378x +465x       -139x -99x -90x +185x +123x +112x     -49x +73x       -239x +280x       @@ -229,7 +229,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/splitParentNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/splitParentNode.ts.html index ee77b002d7f..d5d4a1b33de 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/splitParentNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/splitParentNode.ts.html @@ -137,34 +137,34 @@

    All files / packag     1x -271x +379x 2x     -269x -269x -269x -269x -126x -93x +377x +377x +377x +377x +180x +97x     -143x -123x +197x +138x         -269x -164x +377x +173x         -105x +204x     -269x +377x       @@ -174,20 +174,20 @@

    All files / packag     1x -88x -88x -88x -88x -86x +142x +142x +142x +142x +140x 1x 1x 1x   -86x -86x +140x +140x     -88x +142x    

    import isNodeAfter from './isNodeAfter';
      
    @@ -262,7 +262,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/splitTextNode.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/splitTextNode.ts.html index 0ccbdf4bf12..509512b4d37 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/splitTextNode.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/splitTextNode.ts.html @@ -109,7 +109,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/unwrap.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/unwrap.ts.html index 3084e730e36..36b5b90ded8 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/unwrap.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/unwrap.ts.html @@ -81,17 +81,17 @@

    All files / packag   1x   -253x -253x +324x +324x 12x     -241x -256x +312x +361x     -241x -241x +312x +312x    

    /**
      * Removes the node and keep all children in place, return the parentNode where the children are attached
    @@ -118,7 +118,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-dom/lib/utils/wrap.ts.html b/coverage/packages/roosterjs-editor-dom/lib/utils/wrap.ts.html index beaa3c51dd5..f350972f088 100644 --- a/coverage/packages/roosterjs-editor-dom/lib/utils/wrap.ts.html +++ b/coverage/packages/roosterjs-editor-dom/lib/utils/wrap.ts.html @@ -202,38 +202,38 @@

    All files / packag       -163x -163x +255x +255x 3x     -160x -36x +252x +60x     -160x -160x +252x +252x   -160x -141x +252x +223x       -19x +29x       -160x +252x   -160x -143x +252x +235x     -182x -182x +275x +275x     -160x +252x    

    import createElement from './createElement';
     import fromHtml from './fromHtml';
    @@ -331,7 +331,7 @@ 

    All files / packag diff --git a/coverage/packages/roosterjs-editor-plugins/lib/AutoFormat.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/AutoFormat.ts.html index e2b95520e74..112b2bab0f9 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/AutoFormat.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/AutoFormat.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/ContentEdit.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/ContentEdit.ts.html index 6809c6c7642..558b072e5dc 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/ContentEdit.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/ContentEdit.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/ContextMenu.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/ContextMenu.ts.html index 165bf815c2a..fb9ccbb1a92 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/ContextMenu.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/ContextMenu.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/CustomReplace.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/CustomReplace.ts.html index a54c5431eca..32f4537dfe6 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/CustomReplace.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/CustomReplace.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/CutPasteListChain.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/CutPasteListChain.ts.html index ff123936923..5976b662542 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/CutPasteListChain.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/CutPasteListChain.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/HyperLink.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/HyperLink.ts.html index 44839a275b4..7d85960b2ca 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/HyperLink.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/HyperLink.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/ImageEdit.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/ImageEdit.ts.html index b56f2a38a9d..8eb1b0de646 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/ImageEdit.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/ImageEdit.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/ImageResize.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/ImageResize.ts.html index 7d69e7c2179..5329e8b1260 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/ImageResize.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/ImageResize.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/Paste.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/Paste.ts.html index ba942d07814..c8b1b0b0b1e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/Paste.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/Paste.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/Picker.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/Picker.ts.html index e727f7cbdd7..e86e6aa7876 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/Picker.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/Picker.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/TableCellSelection.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/TableCellSelection.ts.html index e50e6278263..22eafbf7776 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/TableCellSelection.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/TableCellSelection.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/TableResize.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/TableResize.ts.html index de5f4fcf3f9..8025a1de531 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/TableResize.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/TableResize.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/Watermark.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/Watermark.ts.html index 9f1c4564d04..eea07ecbe9f 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/Watermark.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/Watermark.ts.html @@ -67,7 +67,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/index.html b/coverage/packages/roosterjs-editor-plugins/lib/index.html index 544095b36b3..9cbcd874347 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/index.html @@ -290,7 +290,7 @@

    All files packages/roosterjs-editor-plugin diff --git a/coverage/packages/roosterjs-editor-plugins/lib/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/index.ts.html index b5d2d1ea376..40627c88c5e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/index.ts.html @@ -103,7 +103,7 @@

    All files / packages/ diff --git a/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/DragAndDropHelper.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/DragAndDropHelper.ts.html index 9b82f09f44c..55ca6d617d0 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/DragAndDropHelper.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/DragAndDropHelper.ts.html @@ -523,7 +523,7 @@

    All files / packag diff --git a/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/index.html b/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/index.html index 5efa7503db9..3bd1ef98a1b 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/pluginUtils/index.html @@ -95,7 +95,7 @@

    All files packages/roosterjs-editor-plu diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/AutoFormat.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/AutoFormat.ts.html index a5f642d61f1..5704f8211f2 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/AutoFormat.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/AutoFormat.ts.html @@ -388,7 +388,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.html index 971e60d23b2..23b0537f846 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.html @@ -110,7 +110,7 @@

    All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.ts.html index 34cbc1c211a..067d27a0997 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.ts.html @@ -67,7 +67,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/ContentEdit.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/ContentEdit.ts.html index 6d1073378f9..b4ec290ad82 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/ContentEdit.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/ContentEdit.ts.html @@ -195,16 +195,16 @@

    All files / pac       -108x +102x     3x -108x +102x     2x 2x -72x +68x   2x   @@ -304,7 +304,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/autoLinkFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/autoLinkFeatures.ts.html index 7d712efa039..2924e8179d2 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/autoLinkFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/autoLinkFeatures.ts.html @@ -505,7 +505,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/codeFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/codeFeatures.ts.html index 0526cb03d09..e9f58d5f559 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/codeFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/codeFeatures.ts.html @@ -361,7 +361,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/cursorFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/cursorFeatures.ts.html index c11724496b6..fd5f3bc2353 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/cursorFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/cursorFeatures.ts.html @@ -23,30 +23,30 @@

    All files / -
    +
    
    -	
    -	
    +	
    -	
    -	
    -	
    -	
    -	
    -	
    -	
    -	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    +	
    @@ -223,18 +223,18 @@ 

    All files packages/roosterjs-edit

    - - + - - - - - - - - + + + + + + + + @@ -245,7 +245,7 @@

    All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/listFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/listFeatures.ts.html index 62bd4c0d243..cdbc2a7a559 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/listFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/listFeatures.ts.html @@ -2056,7 +2056,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/markdownFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/markdownFeatures.ts.html index 631231a568b..f027b91ebb8 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/markdownFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/markdownFeatures.ts.html @@ -631,7 +631,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/quoteFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/quoteFeatures.ts.html index f1a4340f488..73e74dde589 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/quoteFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/quoteFeatures.ts.html @@ -430,7 +430,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/shortcutFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/shortcutFeatures.ts.html index 608b6169e31..c3e9a7a0563 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/shortcutFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/shortcutFeatures.ts.html @@ -472,7 +472,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/structuredNodeFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/structuredNodeFeatures.ts.html index 38e6d63f23f..2a9927b281b 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/structuredNodeFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/structuredNodeFeatures.ts.html @@ -307,7 +307,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/tableFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/tableFeatures.ts.html index 213e331438f..0d432beae9e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/tableFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/tableFeatures.ts.html @@ -781,7 +781,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/textFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/textFeatures.ts.html index 51cdb16364a..dce835074e4 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/textFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/textFeatures.ts.html @@ -23,30 +23,30 @@

    All files / -
    +

    1 2 @@ -114,26 +114,26 @@

    All files /       -  +10x     -  +10x             -  +6x     -  -  +4x +4x   -  +4x     -  +2x       @@ -158,27 +158,27 @@

    All files / const NoCycleCursorMove: BuildInEditFeature<PluginKeyboardEvent> = { keys: [Keys.LEFT, Keys.RIGHT], allowFunctionKeys: true, - shouldHandleEvent: (event, editor, ctrlOrMeta) => { - let range: Range | null = null; + shouldHandleEvent: (event, editor, ctrlOrMeta) => { + let range: Range | null = null; let position: Position;   - if ( + if ( !ctrlOrMeta || !(range = editor.getSelectionRange()) || !range.collapsed || !(position = Position.getStart(range)) || !editor.isPositionAtBeginning(position) ) { - return false; + return false; }   - let rtl = getComputedStyle(position.element, 'direction') == 'rtl'; - let rawEvent = event.rawEvent; + let rtl = getComputedStyle(position.element, 'direction') == 'rtl'; + let rawEvent = event.rawEvent;   - return (!rtl && rawEvent.which == Keys.LEFT) || (rtl && rawEvent.which == Keys.RIGHT); + return (!rtl && rawEvent.which == Keys.LEFT) || (rtl && rawEvent.which == Keys.RIGHT); }, - handleEvent: event => { - event.rawEvent.preventDefault(); + handleEvent: event => { + event.rawEvent.preventDefault(); }, defaultDisabled: !Browser.isChrome, }; @@ -199,7 +199,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/entityFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/entityFeatures.ts.html index 951d92e1dd1..38f46acf082 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/entityFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/entityFeatures.ts.html @@ -1642,7 +1642,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/index.html index 83fd52e3b6f..a8e4b24d3be 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/index.html @@ -23,30 +23,30 @@

    All files packages/roosterjs-edit
    - 67.37% + 73.55% Statements - 545/809 + 595/809
    - 57.38% + 61.01% Branches - 490/854 + 521/854
    - 67.48% + 71.78% Functions - 110/163 + 117/163
    - 66.92% + 73.03% Lines - 526/786 + 574/786
    @@ -103,18 +103,18 @@

    All files packages/roosterjs-edit

    cursorFeatures.ts -
    +
    cursorFeatures.ts +
    30%3/100%0/110%0/230%3/10100%10/10100%11/11100%2/2100%10/10
    textFeatures.ts -
    +
    textFeatures.ts +
    36%27/7545.45%20/4441.67%5/1236.11%26/7293.33%70/7590.91%40/4483.33%10/1293.06%67/72
    1 2 @@ -336,26 +336,26 @@

    All files /       -  -  -  -  -  +14x +14x +14x +14x +2x   -  -  -  -  +12x +12x +12x +10x   -  -  -  -  +2x +2x +2x +2x         -  +14x       @@ -419,38 +419,38 @@

    All files /       -1x +13x   -1x -1x -1x -1x +13x +13x +13x +13x   -1x +13x       -1x +13x   -1x +2x     -  -  +11x +11x   -  -  +11x +11x   -  -  +11x +9x     -  +11x         -  +21x       @@ -463,34 +463,34 @@

    All files /       -  -  -  +4x +4x +4x     -  -  -  +4x +4x +4x   -  -  -  +4x +4x +19x   -  -  -  -  -  -  +4x +4x +1x +1x +1x +1x   -  +4x         -  -  -  +4x +4x +1x      

    import { setIndentation } from 'roosterjs-editor-api';
    @@ -553,27 +553,27 @@ 

    All files /   return false; }, - handleEvent: (event, editor) => { - const selection = editor.getSelectionRangeEx(); - if (selection.type == SelectionRangeTypes.Normal) { - editor.addUndoSnapshot(() => { - if (selection.areAllCollapsed) { - insertTab(editor, event); + handleEvent: (event, editor) => { + const selection = editor.getSelectionRangeEx(); + Eif (selection.type == SelectionRangeTypes.Normal) { + editor.addUndoSnapshot(() => { + if (selection.areAllCollapsed) { + insertTab(editor, event); } else { - const { ranges } = selection; - const range = ranges[0]; - if (shouldSetIndentation(editor, range)) { - setIndentation(editor, Indentation.Increase); + const { ranges } = selection; + const range = ranges[0]; + if (shouldSetIndentation(editor, range)) { + setIndentation(editor, Indentation.Increase); } else { - const tempRange = createRange(range.startContainer, range.startOffset); - ranges.forEach(range => range.deleteContents()); - editor.select(tempRange); - insertTab(editor, event); + const tempRange = createRange(range.startContainer, range.startOffset); + ranges.forEach(range => range.deleteContents()); + editor.select(tempRange); + insertTab(editor, event); } } });   - event.rawEvent.preventDefault(); + event.rawEvent.preventDefault(); } }, }; @@ -648,27 +648,27 @@

    All files / return false; }   - Eif (!firstBlock.equals(lastBlock)) { + if (!firstBlock.equals(lastBlock)) { //If the selections has more than one block, we indent all the blocks in the selection return true; } else { //We only indent a single block if all the block is selected. - const blockStart = new Position(firstBlock.getStartNode(), PositionType.Begin); - const blockEnd = new Position(firstBlock.getEndNode(), PositionType.End); + const blockStart = new Position(firstBlock.getStartNode(), PositionType.Begin); + const blockEnd = new Position(firstBlock.getEndNode(), PositionType.End);   - const rangeBefore = createRange(blockStart, Position.getStart(range)); - const rangeAfter = createRange(Position.getEnd(range), blockEnd); + const rangeBefore = createRange(blockStart, Position.getStart(range)); + const rangeAfter = createRange(Position.getEnd(range), blockEnd);   - if (!result && isRangeEmpty(rangeBefore) && isRangeEmpty(rangeAfter)) { - result = true; + if (!result && isRangeEmpty(rangeBefore) && isRangeEmpty(rangeAfter)) { + result = true; }   - return result; + return result; } }   -function isRangeEmpty(range: Range) { - return ( +function isRangeEmpty(range: Range) { + return ( range.toString() == '' && queryElements( range.commonAncestorContainer as ParentNode, @@ -680,35 +680,35 @@

    All files / ); }   -function insertTab(editor: IEditor, event: PluginKeyboardEvent) { - const span = editor.getDocument().createElement('span'); - let searcher = editor.getContentSearcherOfCursor(event); - if (!searcher) { +function insertTab(editor: IEditor, event: PluginKeyboardEvent) { + const span = editor.getDocument().createElement('span'); + let searcher = editor.getContentSearcherOfCursor(event); + Iif (!searcher) { return; } - const charsBefore = searcher.getSubStringBefore(Number.MAX_SAFE_INTEGER); - const numberOfChars = TAB_SPACES - (charsBefore.length % TAB_SPACES); - let span2: HTMLSpanElement | null = null; + const charsBefore = searcher.getSubStringBefore(Number.MAX_SAFE_INTEGER); + const numberOfChars = TAB_SPACES - (charsBefore.length % TAB_SPACES); + let span2: HTMLSpanElement | null = null;   - let textContent = ''; - for (let index = 0; index < numberOfChars; index++) { - textContent += '&ensp;'; + let textContent = ''; + for (let index = 0; index < numberOfChars; index++) { + textContent += '&ensp;'; } - editor.insertNode(span); - if (span.nextElementSibling && getTagOfNode(span.nextElementSibling) == 'A') { - span2 = editor.getDocument().createElement('span'); - span2.textContent = ' '; - editor.insertNode(span2); - editor.select(createRange(span2, PositionType.Before)); + editor.insertNode(span); + if (span.nextElementSibling && getTagOfNode(span.nextElementSibling) == 'A') { + span2 = editor.getDocument().createElement('span'); + span2.textContent = ' '; + editor.insertNode(span2); + editor.select(createRange(span2, PositionType.Before)); } - editor.insertContent(textContent, { + editor.insertContent(textContent, { position: ContentPosition.Range, range: createRange(span, PositionType.Begin), updateCursor: false, }); - editor.select(createRange(span, PositionType.After)); - if (span2) { - editor.deleteNode(span2); + editor.select(createRange(span, PositionType.After)); + if (span2) { + editor.deleteNode(span2); } }  

    @@ -718,7 +718,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/getAllFeatures.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/getAllFeatures.ts.html index a6712bd7dc3..7aa7b2c96cd 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/getAllFeatures.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/getAllFeatures.ts.html @@ -175,7 +175,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.html index 15cfa65f29f..6abf53f4aa7 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.html @@ -125,7 +125,7 @@

    All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.ts.html index 09376730e97..77765f0c737 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.ts.html @@ -70,7 +70,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/convertAlphaToDecimals.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/convertAlphaToDecimals.ts.html index b3bcb6d3748..9937d5a764b 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/convertAlphaToDecimals.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/convertAlphaToDecimals.ts.html @@ -109,7 +109,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoBulletListStyle.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoBulletListStyle.ts.html index 8a40e06aa86..4f51f110ca3 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoBulletListStyle.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoBulletListStyle.ts.html @@ -145,7 +145,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoNumberingListStyle.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoNumberingListStyle.ts.html index 9fce61cb949..b0d7cc6bbc2 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoNumberingListStyle.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoNumberingListStyle.ts.html @@ -598,7 +598,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/index.html index 1a627ce728e..92ad2fb8267 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/index.html @@ -125,7 +125,7 @@

    All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/ContextMenu.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/ContextMenu.ts.html index 12ad0947f14..52a2ed7c897 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/ContextMenu.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/ContextMenu.ts.html @@ -418,7 +418,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.html index 40266e4e8a6..3096b795bf0 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.html @@ -110,7 +110,7 @@

    All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.ts.html index ab4542f8279..8b4896f88dd 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.ts.html @@ -67,7 +67,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/CustomReplace.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/CustomReplace.ts.html index 097d65b68f2..8d2a329c959 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/CustomReplace.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/CustomReplace.ts.html @@ -625,7 +625,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.html index 5580ac74fe1..5005fe0433c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.html @@ -110,7 +110,7 @@

    All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.ts.html index d16b5b54de1..562c3ae090e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.ts.html @@ -67,7 +67,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/CutPasteListChain.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/CutPasteListChain.ts.html index 244e59b7e85..5441dc994a7 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/CutPasteListChain.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/CutPasteListChain.ts.html @@ -328,7 +328,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.html index 1c6f2b4991a..ba037d2a353 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.html @@ -110,7 +110,7 @@

    All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.ts.html index cfa8ad5002f..0042e34bd2c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.ts.html @@ -67,7 +67,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/HyperLink.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/HyperLink.ts.html index e61ed197f57..67b668de022 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/HyperLink.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/HyperLink.ts.html @@ -796,7 +796,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.html index 97fd911f987..5bb599b1d4e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.html @@ -110,7 +110,7 @@

    All files packages/roosterjs-editor- diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.ts.html index fc13462879e..f4b8bd9a729 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.ts.html @@ -67,7 +67,7 @@

    All files / pac diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/ImageEdit.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/ImageEdit.ts.html index 533c671e5e3..4f05307c170 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/ImageEdit.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/ImageEdit.ts.html @@ -23,9 +23,9 @@

    All files / pac
    - 89.78% + 89.05% Statements - 246/274 + 244/274
    @@ -37,16 +37,16 @@

    All files / pac
    - 89.74% + 84.62% Functions - 35/39 + 33/39
    - 89.47% + 88.72% Lines - 238/266 + 236/266
    @@ -1002,7 +1002,7 @@

    All files / pac 25x 25x 25x -20x +        @@ -1026,7 +1026,7 @@

    All files / pac     1x -202x +186x   40x   @@ -1055,8 +1055,8 @@

    All files / pac 1x     -57x -57x +45x +45x       @@ -1102,15 +1102,15 @@

    All files / pac       -70x +53x         -70x -70x +53x +53x   -70x +53x       @@ -1119,16 +1119,16 @@

    All files / pac       -26x +10x       -26x +10x         -26x +10x       @@ -1138,23 +1138,23 @@

    All files / pac       -26x +10x   -26x +10x   -26x +10x       -26x -26x -26x -26x -26x -26x +10x +10x +10x +10x +10x +10x     -70x +53x   21x 21x @@ -1238,7 +1238,7 @@

    All files / pac     25x -20x +        @@ -1318,11 +1318,11 @@

    All files / pac     25x -108x +80x 31x   -108x -108x +80x +80x       @@ -1469,7 +1469,7 @@

    All files / pac   1x 101x -51x +35x   1x   @@ -1771,7 +1771,7 @@

    All files / pac initialize(editor: IEditor) { this.editor = editor; this.disposer = editor.addDomEventHandler({ - blur: () => this.onBlur(), + blur: () => this.onBlur(), dragstart: e => { if (this.image) { e.preventDefault(); @@ -2006,8 +2006,8 @@

    All files / pac /** * quit editing mode when editor lose focus */ - private onBlur = () => { - this.setEditingImage(null, false /* selectImage */); + private onBlur = () => { + this.setEditingImage(null, false /* selectImage */); }; /** * Create editing wrapper for the image @@ -2371,7 +2371,7 @@

    All files / pac

    diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/canRegenerateImage.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/canRegenerateImage.ts.html index ef588c9dcd6..9478ac94a32 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/canRegenerateImage.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/canRegenerateImage.ts.html @@ -145,7 +145,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/index.html index 41f1f435cbe..d2991180135 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/index.html @@ -140,7 +140,7 @@

    All files packages/roosterjs-edit diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/isResizedTo.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/isResizedTo.ts.html index b278dc6f397..814c9eb0b13 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/isResizedTo.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/isResizedTo.ts.html @@ -121,7 +121,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resetImage.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resetImage.ts.html index 36227288e2f..11a368622e9 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resetImage.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resetImage.ts.html @@ -118,7 +118,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resizeByPercentage.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resizeByPercentage.ts.html index 130db3ff8d9..01c43df593c 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resizeByPercentage.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resizeByPercentage.ts.html @@ -226,7 +226,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/applyChange.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/applyChange.ts.html index 943504d8bc7..16ab2d30b64 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/applyChange.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/applyChange.ts.html @@ -30,9 +30,9 @@

    All files /
    - 89.47% + 78.95% Branches - 17/19 + 15/19
    @@ -161,16 +161,16 @@

    All files /       -34x +14x   -34x -34x +14x +14x   -34x +14x     -14x -14x +4x +4x       @@ -178,41 +178,41 @@

    All files /       -20x -20x +10x +10x     -34x +14x   -34x +14x     -18x +14x           -18x +14x     -34x +14x     -14x +4x       -20x +10x       -34x -34x +14x +14x   -34x -33x -33x +14x +14x +14x      

    import checkEditInfoState, { ImageEditInfoState } from './checkEditInfoState';
    @@ -263,7 +263,7 @@ 

    All files /   const srcChanged = newSrc != previousSrc;   - if (srcChanged) { + Eif (srcChanged) { // If the src is changed, fire an EditImage event so that plugins knows that a new image is used, and can // replace the new src with some other string and it will be used and set to the image const event = editor.triggerPluginEvent(PluginEventType.EditImage, { @@ -289,7 +289,7 @@

    All files / const { targetWidth, targetHeight } = getGeneratedImageSize(editInfo); image.src = newSrc;   - if (wasResizedOrCropped || state == ImageEditInfoState.FullyChanged) { + Eif (wasResizedOrCropped || state == ImageEditInfoState.FullyChanged) { image.width = targetWidth; image.height = targetHeight; } @@ -301,7 +301,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/checkEditInfoState.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/checkEditInfoState.ts.html index 14b7dbedcc6..b7cfc9460b4 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/checkEditInfoState.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/checkEditInfoState.ts.html @@ -209,18 +209,18 @@

    All files /       -688x +478x 1x -98x -214x +68x +144x         -29x -69x +19x +49x   -20x +10x       @@ -228,16 +228,16 @@

    All files /       -69x +49x         -688x +478x       -234x +154x    

    import ImageEditInfo, { CropInfo, ResizeInfo, RotateInfo } from '../types/ImageEditInfo';
      
    @@ -337,7 +337,7 @@ 

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/editInfo.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/editInfo.ts.html index b60b853357a..14bb2b88f3e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/editInfo.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/editInfo.ts.html @@ -124,8 +124,8 @@

    All files /     1x -29x -29x +19x +19x       @@ -135,8 +135,8 @@

    All files /     1x -16x -16x +6x +6x       @@ -149,14 +149,14 @@

    All files /     1x -90x -90x +70x +70x           -26x +16x       @@ -232,7 +232,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/generateDataURL.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/generateDataURL.ts.html index be05743cd48..68eefb0d808 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/generateDataURL.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/generateDataURL.ts.html @@ -139,24 +139,24 @@

    All files /       -180x -20x -20x +90x +10x +10x     -20x -20x -20x -20x -20x +10x +10x +10x +10x +10x   -20x -20x -20x -20x -20x -20x -20x +10x +10x +10x +10x +10x +10x +10x       @@ -169,7 +169,7 @@

    All files /       -20x +10x    

    import getGeneratedImageSize from './getGeneratedImageSize';
     import ImageEditInfo from '../types/ImageEditInfo';
    @@ -235,7 +235,7 @@ 

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getGeneratedImageSize.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getGeneratedImageSize.ts.html index cdf7d8bb393..c2566f6afc1 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getGeneratedImageSize.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getGeneratedImageSize.ts.html @@ -136,23 +136,23 @@

    All files /       -595x +385x     -85x -85x +55x +55x     -85x -85x +55x +55x       -85x +55x   -85x +55x   -85x +55x       @@ -220,7 +220,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getLastZIndex.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getLastZIndex.ts.html index a5640142cbd..d7a93a5021b 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getLastZIndex.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getLastZIndex.ts.html @@ -124,7 +124,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getTargetSizeByPercentage.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getTargetSizeByPercentage.ts.html index f3cbe0b2398..be673932e6e 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getTargetSizeByPercentage.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getTargetSizeByPercentage.ts.html @@ -104,10 +104,10 @@

    All files /       -102x -17x -17x -17x +78x +13x +13x +13x    

    import ImageEditInfo from '../types/ImageEditInfo';
     import ImageSize from '../types/ImageSize';
    @@ -142,7 +142,7 @@ 

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/index.html index 3ac8e348878..1f3b2de8a7b 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/index.html @@ -30,9 +30,9 @@

    All files packages/roosterjs-edit
    - 81.08% + 78.38% Branches - 60/74 + 58/74
    @@ -79,8 +79,8 @@

    All files packages/roosterjs-edit

    93.1% 27/2989.47%17/1978.95%15/19 100% 1/1 92.59%
    Rotator.ts -
    +
    +
    89.8%44/4970.59%12/1791.84%45/4976.47%13/17 80% 4/591.49%43/4793.62%44/47
    ImageEdit.ts +
    89.78%246/27489.05%244/274 70.32% 154/21989.74%35/3989.47%238/26684.62%33/3988.72%236/266
    import { CssStyleCallbackMap, ElementCallbackMap } from 'roosterjs-editor-types';
     import {
    @@ -355,7 +355,7 @@ 

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/convertPastedContentFromWord.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/convertPastedContentFromWord.ts.html index 9e4375e651d..f970ffc4e5a 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/convertPastedContentFromWord.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/convertPastedContentFromWord.ts.html @@ -23,9 +23,9 @@

    All files /

    import commentsRemoval from './commentsRemoval';
     import { BeforePasteEvent } from 'roosterjs-editor-types';
    @@ -206,10 +206,10 @@ 

    All files / const { sanitizingOption, fragment } = event;   // Preserve <o:p> when its innerHTML is "&nbsp;" to avoid dropping an empty line - chainSanitizerCallback(sanitizingOption.elementCallbacks, 'O:P', element => { - moveChildNodes(element); - element.appendChild(element.ownerDocument.createTextNode('\u00A0')); // &nbsp; - return true; + chainSanitizerCallback(sanitizingOption.elementCallbacks, 'O:P', element => { + moveChildNodes(element); + element.appendChild(element.ownerDocument.createTextNode('\u00A0')); // &nbsp; + return true; });   let wordConverter = createWordConverter(); @@ -259,7 +259,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/converterUtils.ts.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/converterUtils.ts.html index 1ef10d86c1d..6152f9c2462 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/converterUtils.ts.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/converterUtils.ts.html @@ -672,16 +672,16 @@

    All files /     1x -12x -12x +11x +11x     -12x -17x +11x +15x     -17x -17x +15x +15x   8x 8x @@ -768,8 +768,8 @@

    All files /       -9x -9x +7x +7x       @@ -786,9 +786,9 @@

    All files /       -17x +15x   -12x +11x       @@ -996,9 +996,9 @@

    All files /       -17x -17x -17x +15x +15x +15x 8x     @@ -1020,7 +1020,7 @@

    All files /       -9x +7x       @@ -1189,7 +1189,7 @@

    All files /       -41x +39x       @@ -1822,7 +1822,7 @@

    All files / diff --git a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/index.html b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/index.html index 5636bce021c..8dc1f3d21b6 100644 --- a/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/index.html +++ b/coverage/packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/index.html @@ -23,9 +23,9 @@

    All files packages/roosterjs-edit
    - 88.28% + 87.24% Statements - 256/290 + 253/290
    @@ -37,16 +37,16 @@

    All files packages/roosterjs-edit
    - 97.3% + 94.59% Functions - 36/37 + 35/37
    - 88.42% + 87.37% Lines - 252/285 + 249/285
    @@ -134,17 +134,17 @@

    All files packages/roosterjs-edit

    convertPastedContentFromWord.ts -
    +
    +
    100%30/3090%27/30 100% 11/11100%5/5100%30/3080%4/590%27/30
    ")+e+"
    "}return e}t.default=function(e,t){var n=e.fragment,o=e.sanitizingOption,i=e.htmlBefore,a=e.clipboardData,l=a.html?s(a.html,i):void 0;if(l&&a.html!=l){var u=(new DOMParser).parseFromString(t(l),"text/html");(0,r.moveChildNodes)(n,null==u?void 0:u.body)}var d=n.firstChild;d&&d.childNodes.length>0&&"DIV"==(0,r.getTagOfNode)(d)&&Array.from(d.childNodes).every((function(e){return"META"==(0,r.getTagOfNode)(e)||"TABLE"==(0,r.getTagOfNode)(e)&&e==d.lastChild}))&&d.lastChild&&e.fragment.replaceChildren(d.lastChild),(0,r.chainSanitizerCallback)(o.elementCallbacks,"TD",(function(e){return"none"==e.style.borderStyle&&(e.style.border="solid 1px #d4d4d4"),!0}))},t.excelHandler=s},7401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t){var n=e.fragment,o=e.clipboardData,i=o.html,a=o.image;if(i&&a){var l=(new DOMParser).parseFromString(t(i),"text/html");(0,r.moveChildNodes)(n,null==l?void 0:l.body)}}},2184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Paste=void 0;var r=n(3835);Object.defineProperty(t,"Paste",{enumerable:!0,get:function(){return r.default}})},5155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);function o(e){var t,n,o,i=e.start,a=e.end;if(i==a&&"DIV"==(0,r.getTagOfNode)(i)){var l=(0,r.changeElementTag)(i,"SPAN");e.start=l,e.end=l,l&&l.lastChild&&"BR"==(0,r.getTagOfNode)(l.lastChild)&&l.removeChild(l.lastChild)}else"BR"==(0,r.getTagOfNode)(a)&&(l=null===(t=a.ownerDocument)||void 0===t?void 0:t.createTextNode(""))&&(null===(n=a.parentNode)||void 0===n||n.insertBefore(l,a),e.end=l,null===(o=a.parentNode)||void 0===o||o.removeChild(a))}function i(e,t,n,o){var i,a,l,s,u=(0,r.getBlockElementAtNode)(e,t.start),d=n?(0,r.getNextLeafSibling)(e,t.end):(0,r.getPreviousLeafSibling)(e,t.start);if(d)if(null==u?void 0:u.contains(d))(c=null===(i=t.start.ownerDocument)||void 0===i?void 0:i.createElement("br"))&&(null===(a=(n?t.end:t.start).parentNode)||void 0===a||a.insertBefore(c,n?t.end.nextSibling:t.start));else if(o&&o.end==o.start&&"SPAN"==(0,r.getTagOfNode)(o.end)){var c,f=(0,r.getPreviousLeafSibling)(e,t.start);o.end.contains(f)&&!(0,r.findClosestElementAncestor)(t.start,e,"li")&&(c=null===(l=t.start.ownerDocument)||void 0===l?void 0:l.createElement("br"))&&(null===(s=t.start.parentNode)||void 0===s||s.insertBefore(c,t.start))}}t.default=function(e){for(var t=r.ContentTraverser.createBodyTraverser(e),n=[],a=null==t?void 0:t.currentBlockElement;a;a=t.getNextBlockElement())n.push({start:a.getStartNode(),end:a.getEndNode()});if(n.length>0){var l=n.length-1;o(n[0]),o(n[l]),i(e,n[0],!0),i(e,n[l],!1,n[0])}}},6728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createListItemBlock=void 0,t.createListItemBlock=function(e){return void 0===e&&(e=null),{startElement:e,endElement:e,insertPositionNode:null,listItemContainers:e?[e]:[]}}},1820:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=n(8979),i=["TableInsertRowGapBlank","TableColumnResizeHandle","TableCellTopBorderHandle","TableCellLeftBorderHandle","TableHoverColumnHandle","TableHoverRowHandle"].map((function(e){return"."+e})).join(",");t.default=function(e,t){e.querySelectorAll('ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer').forEach((function(e){var t=e;t.style.removeProperty("display"),t.style.removeProperty("margin")})),(0,o.isWordOnlineWithList)(e)&&(0,o.default)(e),(0,r.chainSanitizerCallback)(t.cssStyleCallbacks,"border",(function(e,t){return"IMG"!=t.tagName||"none"!=e})),e.querySelectorAll(i).forEach((function(e){var t;return null===(t=e.parentElement)||void 0===t?void 0:t.removeChild(e)}))}},8979:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWordOnlineWithList=void 0;var r=n(6728),o=n(6344),i='div.ListContainerWrapper>ul[class^="BulletListStyle"],div.ListContainerWrapper>ol[class^="NumberListStyle"],span.WACImageContainer > img',a="ListContainerWrapper",l=["111","9643","9830"];function s(e,t,n){var r,o=t.createElement(n),i=null===(r=e.firstElementChild)||void 0===r?void 0:r.getAttribute("start");return i&&o.setAttribute("start",i),o}function u(e,t,n){var r;if(e){var o,i=n.insertPositionNode;i?(o=i.parentNode)&&o.insertBefore(e,i):(o=null===(r=n.startElement)||void 0===r?void 0:r.parentNode)?o.appendChild(e):t.appendChild(e)}}t.isWordOnlineWithList=function(e){return!(!e||!e.querySelector(i))},t.default=function(e){!function(e){(0,o.toArray)(e.querySelectorAll(i)).forEach((function(e){var t=new RegExp("\\b"+a+"\\b","g");if(e.previousSibling){var n=(0,o.splitParentNode)(e,!0);n.className=n.className.replace(t,"")}if(e.nextSibling){var r=(0,o.splitParentNode)(e,!1);r.className=r.className.replace(t,"")}}))}(e),function(e){for(var t=e.querySelectorAll("."+a),n=[],i=null,l=0;l0&&n.push(i),n}(e).forEach((function(t){var n,r,i;!function(e,t){t.startElement&&t.endElement&&(0,o.collapseNodes)(e,t.startElement,t.endElement,!0).forEach((function(e){"DIV"==(0,o.getTagOfNode)(e.firstChild)&&(0,o.unwrap)(e)}))}(e,t),t.insertPositionNode=null!==(r=null===(n=t.endElement)||void 0===n?void 0:n.nextSibling)&&void 0!==r?r:null;var a=void 0,d=e.ownerDocument;t.listItemContainers.forEach((function(n){var r=function(e){var t=(0,o.getTagOfNode)(e.firstChild);return"UL"==t||"OL"==t?t:null}(n);r&&(a||(a=s(n,d,r)),(0,o.toArray)(n.querySelectorAll("li")).forEach((function(i){var c,f=parseInt(null!==(c=i.getAttribute("data-aria-level"))&&void 0!==c?c:"");a&&(0,o.getTagOfNode)(a)!=r&&1==f&&r&&(u(a,e,t),a=s(n,d,r)),a&&r&&function(e,t,n,r){var i;if(n){var a=parseInt(null!==(i=t.getAttribute("data-aria-level"))&&void 0!==i?i:""),s=t.getAttribute("data-leveltext");"UL"==n&&s&&l.indexOf(s.charCodeAt(0).toString())>-1&&(t.style.listStyleType='"'+s+' "');for(var u=e;a>1;){if(u.firstChild){var d=u.lastElementChild,c=(0,o.getTagOfNode)(d);!d||"UL"!=c&&"OL"!=c?(u.appendChild(r.createElement(n)),u.lastElementChild&&(u=u.lastElementChild)):u=d}else u.appendChild(r.createElement(n)),u.firstElementChild&&(u=u.firstElementChild);a--}u.appendChild(t)}}(a,i,r,d)})))})),a&&u(a,e,t);var c=null===(i=t.startElement)||void 0===i?void 0:i.parentNode;c&&t.listItemContainers.forEach((function(e){c.removeChild(e)}))})),function(e){return e.querySelectorAll(".WACImageContainer")}(e).forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLSpanElement")&&e.childNodes.forEach((function(e){var t;"IMG"!=(0,o.getTagOfNode)(e)&&(null===(t=e.parentElement)||void 0===t||t.removeChild(e))}))}))}},2621:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t){var n=e.fragment,o=e.clipboardData;if(o.html&&!o.text&&o.image){var i=(new DOMParser).parseFromString(t(o.html),"text/html");(0,r.moveChildNodes)(n,null==i?void 0:i.body)}}},4726:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecatedColorList=void 0,t.DeprecatedColorList=["activeborder","activecaption","appworkspace","background","buttonhighlight","buttonshadow","captiontext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedfhadow","window","windowframe","windowtext"]},9053:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=n(4726);t.default=function(e){["color","background-color"].forEach((function(t){(0,r.chainSanitizerCallback)(e.cssStyleCallbacks,t,(function(e){return o.DeprecatedColorList.indexOf(e)<0}))}))}},5323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=["http:","https:","notes:","mailto:","onenote:"];t.default=function(e){(0,r.chainSanitizerCallback)(e.attributeCallbacks,"href",(function(e,t){return function(e,t){var n;try{n=new URL(e)}catch(e){n=void 0}return n&&o.indexOf(n.protocol)>-1?e:(t.removeAttribute("href"),"")}(e,t)}))}},3825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLevelLists=void 0,t.createLevelLists=function(){return{listsMetadata:{},currentUniqueListId:-1}}},6482:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverterArguments=void 0;var r=n(3825);t.createWordConverterArguments=function(e){return{nodes:e,currentIndex:0,lists:{},listItems:[],currentListIdsByLevels:[(0,r.createLevelLists)()],lastProcessedItem:null}}},9873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getObject=t.setObject=t.createCustomData=void 0;var n="NodeId";function r(e,t){var r=t.getAttribute(n);return r||(r=e.nextNodeId.toString(),e.nextNodeId++,t.setAttribute(n,r)),r}t.createCustomData=function(){return{dict:{},nextNodeId:1}},t.setObject=function(e,t,n,o){if(1==t.nodeType){var i=r(e,t);""!=i&&(e.dict[i]||(e.dict[i]={}),e.dict[i][n]=o)}},t.getObject=function(e,t,n){if(1==t.nodeType){var o=r(e,t);if(""!=o)return e.dict[o]&&e.dict[o][n]}return null}},7921:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o="mso-comment-parent",i="mso-comment-reference",a="mso-comment-date",l=/#_msocom_/,s="mso-comment-continuation",u="mso-comment-done";t.default=function(e,t){(0,r.chainSanitizerCallback)(e,"SPAN",(function(e){var t;return"comment"==(0,r.getStyles)(e)["mso-special-character"]&&(null===(t=e.parentElement)||void 0===t||t.removeChild(e)),!0})),(0,r.chainSanitizerCallback)(e,"A",(function(e){var t;return(0,r.safeInstanceOf)(e,"HTMLAnchorElement")&&l.test(e.href)&&(null===(t=e.parentElement)||void 0===t||t.removeChild(e)),!0})),(0,r.chainSanitizerCallback)(e,"DIV",(function(e){return"comment-list"==(0,r.getStyles)(e)["mso-element"]&&(0,r.moveChildNodes)(e),!0})),[i,a,o,s,u].forEach((function(e){return(0,r.chainSanitizerCallback)(t,e,(function(){return!1}))}))}},8149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7921),o=n(6344),i=n(4704),a=n(6482),l=n(1101),s=/%/;t.default=function(e){var t=e.sanitizingOption,n=e.fragment;(0,o.chainSanitizerCallback)(t.elementCallbacks,"O:P",(function(e){return(0,o.moveChildNodes)(e),e.appendChild(e.ownerDocument.createTextNode(" ")),!0}));var u=(0,i.createWordConverter)(),d=n.querySelectorAll("p,h1,h2,h3,h4,h5,h6");d.length>0&&(u.wordConverterArgs=(0,a.createWordConverterArguments)(d),(0,l.processNodesDiscovery)(u)&&(0,l.processNodeConvert)(u)),["OL","UL"].forEach((function(e){(0,o.chainSanitizerCallback)(t.elementCallbacks,e,(function(e){return"0in"==e.style.marginBottom&&(e.style.marginBottom=""),!0}))})),(0,o.chainSanitizerCallback)(t.cssStyleCallbacks,"line-height",(function(e){var t;return!(s.test(e)&&!isNaN(t=parseInt(e))&&t<120)})),(0,r.default)(t.elementCallbacks,t.cssStyleCallbacks)}},1101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processNodeConvert=t.processNodesDiscovery=void 0;var r=n(3825),o=n(9873),i=n(6344),a="UniqueListId",l="mso-list",s=/[\n|\r]/gi;function u(e,t,n,r){var l,s=d(t,n.level,r),u=(0,o.getObject)(e.wordCustomData,s,a);if(u&&u!=n.uniqueListId||!u&&s.firstChild){var c=t.ownerDocument.createElement(r.tagName);null===(l=s.parentNode)||void 0===l||l.insertBefore(c,s.nextSibling),s=c}return(0,o.setObject)(e.wordCustomData,s,a,n.uniqueListId),function(e,t,n){var r,l,s;if(n.tagName!=(0,i.getTagOfNode)(t)){var u=null===(r=t.ownerDocument)||void 0===r?void 0:r.createElement(n.tagName);u&&((0,o.setObject)(e.wordCustomData,u,a,(0,o.getObject)(e.wordCustomData,t,a)),(0,i.moveChildNodes)(u,t),null===(l=t.parentNode)||void 0===l||l.insertBefore(u,t),null===(s=t.parentNode)||void 0===s||s.removeChild(t),t=u)}return t}(e,s,r)}function d(e,t,n){var r,o,a=null,l=null;if(1==t?l=g(e):(a=d(e,t-1,null)).lastChild&&(l=a.lastChild),l&&1==l.nodeType){var s=(0,i.getTagOfNode)(l);if("UL"==s||"OL"==s)return l}var u=null===(r=e.ownerDocument)||void 0===r?void 0:r.createElement(n?n.tagName:"UL");return 1==t?null===(o=e.parentNode)||void 0===o||o.insertBefore(u,e):null==a||a.appendChild(u),u}function c(e,t){for(var n=[],r=e.firstChild;r;r=r.nextSibling)r&&(r&&1==r.nodeType&&t>1&&c(r,t-1),(b(r=h(r,!0))||y(r))&&n.push(r));n.forEach((function(t){return e.removeChild(t)}))}function f(e){if(1==e.nodeType){var t=C(e,l);if(t&&t.length>0)try{var n=t.split(" ");if(3==n.length)return{level:parseInt(n[1].substr(5)),wordListId:t,originalNode:e,uniqueListId:0}}catch(e){}}return null}function p(e){return["o","·","§","-"].indexOf(e)>=0}function v(e,t){for(var n,r,o="",i=e.firstChild;!o&&i;)y(i=h(i,!0))?0==(o=null!==(r=null===(n=i.textContent)||void 0===n?void 0:n.trim())&&void 0!==r?r:"").length&&(o="o"):1==i.nodeType&&t>1&&(o=v(i,t-1)),i=i.nextSibling;return o}function h(e,t){var n,r,o,i;if(8==e.nodeType){var a=e.data;if(a&&"[if !supportlists]"==a.trim().toLowerCase()){for(var l=e,s=null,u=0;u<4&&(l=m(l));u++)if(8==l.nodeType&&(a=l.data)&&"[endif]"==a.trim().toLowerCase()){s=l;break}if(s){var d=null===(n=e.ownerDocument)||void 0===n?void 0:n.createElement("span");for(null==d||d.setAttribute("style","mso-list: ignore"),l=m(e);l!=s;)(l=null==l?void 0:l.nextSibling).previousSibling&&(null==d||d.appendChild(l.previousSibling));d&&(null===(r=s.parentNode)||void 0===r||r.insertBefore(d,s)),t&&(null===(o=e.parentNode)||void 0===o||o.removeChild(e),null===(i=s.parentNode)||void 0===i||i.removeChild(s)),d&&(e=d)}}}return e}function g(e){var t=e;do{t=t.previousSibling}while(t&&E(t));return t}function m(e){var t=e;do{t=t.nextSibling}while(t&&E(t));return t}function y(e){if(1==e.nodeType){var t=C(e,l);if(t&&t.length>0&&"ignore"==t.trim().toLowerCase())return!0}return!1}function b(e){return"SPAN"==(0,i.getTagOfNode)(e)&&!e.firstChild}function C(e,t){return(0,i.getStyles)(e)[t]||null}function E(e){var t;if(!e)return!0;if(3==e.nodeType){var n=e.nodeValue;return 0==(null==(n=null!==(t=null==n?void 0:n.replace(s,""))&&void 0!==t?t:"")?void 0:n.trim().length)}var r=(0,i.getTagOfNode)(e);return!(!e.firstChild||e.firstChild!=e.lastChild||"SPAN"!=r&&"FONT"!=r)&&E(e.firstChild)}function S(e){for(var t=0;t0&&s.currentUniqueListId!=l.uniqueListId?(u.ignore=!0,o.currentListIdsByLevels[0].currentUniqueListId=-1,o.currentListIdsByLevels=o.currentListIdsByLevels.slice(0,1)):(o.currentListIdsByLevels.length>l.level&&(o.currentListIdsByLevels=o.currentListIdsByLevels.slice(0,l.level)),s.currentUniqueListId=l.uniqueListId,o.listItems.push(l),u.numberOfItems++),o.lastProcessedItem=a}else{var h=o.lastProcessedItem;h&&g(a)==h&&a.tagName==h.tagName&&a.className==h.className&&(h.appendChild(h.ownerDocument.createElement("br")),h.appendChild(h.ownerDocument.createElement("br")),(0,i.moveChildNodes)(h,a,!0),null===(t=a.parentNode)||void 0===t||t.removeChild(a))}o.currentIndex++}return o.listItems.length>0},t.processNodeConvert=function(e){var t,n=e.wordConverterArgs;if(n)for(n.currentIndex=0;n.currentIndex0||e.numNumberedConverted>0}},4704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverter=void 0;var r=n(9873);t.createWordConverter=function(){return{nextUniqueId:1,numBulletsConverted:0,numNumberedConverted:0,wordConverterArgs:null,wordCustomData:(0,r.createCustomData)()}}},6575:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4548),o=n(6344),i="Backspace",a=o.Browser.isIE?"Esc":"Escape",l=o.Browser.isIE?"Left":"ArrowLeft",s=o.Browser.isIE?"Up":"ArrowUp",u=o.Browser.isIE?"Right":"ArrowRight",d=o.Browser.isIE?"Down":"ArrowDown",c=o.Browser.isIE?"Del":"Delete",f=[0,229],p=function(){function e(e,t){this.dataProvider=e,this.pickerOptions=t,this.editor=null,this.eventHandledOnKeyDown=!1,this.blockSuggestions=!1,this.isSuggesting=!1,this.lastKnownRange=null,this.isPendingInputEventHandling=!1,this.currentInputLength=0,this.newInputLength=0}return e.prototype.getName=function(){return"Picker"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.dataProvider.onInitalize((function(e){if(t.editor){t.editor.focus();var n=t.getWord(null);n&&0!=n.length||!t.lastKnownRange||(t.editor.select(t.lastKnownRange),n=t.getWord(null)),t.editor.addUndoSnapshot((function(){var o;n&&t.editor?(0,r.replaceWithNode)(t.editor,n,e,!0):null===(o=t.editor)||void 0===o||o.insertNode(e),t.setIsSuggesting(!1)}),t.pickerOptions.changeSource,t.pickerOptions.handleAutoComplete)}}),(function(e){t.setIsSuggesting(e)}),e)},e.prototype.dispose=function(){this.editor=null,this.isSuggesting=!1,this.blockSuggestions=!1,this.eventHandledOnKeyDown=!1,this.lastKnownRange=null,this.isPendingInputEventHandling=!1,this.currentInputLength=0,this.newInputLength=0,this.dataProvider.onDispose()},e.prototype.willHandleEventExclusively=function(e){return this.isSuggesting&&(0==e.eventType||2==e.eventType||3==e.eventType)},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 7:if("SetContent"==e.source&&this.dataProvider.onContentChanged){this.isSuggesting&&this.setIsSuggesting(!1);var n=[];null===(t=this.editor)||void 0===t||t.queryElements("[id^='"+this.pickerOptions.elementIdPrefix+"']",(function(e){e.id&&n.push(e.id)})),this.dataProvider.onContentChanged(n)}break;case 0:this.eventHandledOnKeyDown=!1,this.isAndroidKeyboardEvent(e)?(this.currentInputLength=this.calcInputLength(e),this.isPendingInputEventHandling=!0):(this.onKeyDownEvent(e),this.isPendingInputEventHandling=!1);break;case 3:this.isPendingInputEventHandling&&this.onAndroidInputEvent(e);break;case 2:!this.eventHandledOnKeyDown&&this.shouldHandleKeyUpEvent(e)&&(this.onKeyUpDomEvent(e),this.isPendingInputEventHandling=!1);break;case 6:this.isSuggesting&&this.setIsSuggesting(!1);break;case 14:this.dataProvider.onScroll&&this.dataProvider.onScroll(e.scrollContainer)}},e.prototype.setLastKnownRange=function(e){this.lastKnownRange=e},e.prototype.setIsSuggesting=function(e){this.isSuggesting=e,e||this.setLastKnownRange(null),this.dataProvider.onIsSuggestingChanged(e),this.setAriaOwns(e),this.setAriaActiveDescendant(e?0:null)},e.prototype.cancelDefaultKeyDownEvent=function(e){this.eventHandledOnKeyDown=!0,e.rawEvent.preventDefault(),e.rawEvent.stopImmediatePropagation()},e.prototype.getIdValue=function(e){if((0,o.safeInstanceOf)(e,"HTMLElement")){var t=e.attributes.getNamedItem("id");return t?t.value:null}return null},e.prototype.getWordBeforeCursor=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e);return n?n.getWordBefore():null},e.prototype.replaceNode=function(e,t){var n,r;e&&(null===(n=this.editor)||void 0===n||n.deleteNode(e)),t&&(null===(r=this.editor)||void 0===r||r.insertNode(t))},e.prototype.getRangeUntilAt=function(e){var t,n,r,i=this,a=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e),l=void 0,s=void 0;return null==a||a.forEachTextInlineElement((function(e){for(var t=!1,n=e.getTextContent(),r=n?n.length:-1;r>=0;){if(n[r]==i.pickerOptions.triggerCharacter){l=e.getStartPosition().move(r),t=!0;break}r--}return t&&(s=e.getEndPosition()),t})),l?(0,o.createRange)(l,s):null!==(r=null===(n=this.editor)||void 0===n?void 0:n.getDocument().createRange())&&void 0!==r?r:null},e.prototype.shouldHandleKeyUpEvent=function(e){return this.isAndroidKeyboardEvent(e)||(0,o.isCharacterValue)(e.rawEvent)||this.isSuggesting&&!(0,o.isModifierKey)(e.rawEvent)},e.prototype.onKeyUpDomEvent=function(e){var t,n,r,o,i;if(this.editor)if(this.isSuggesting){if(null!==(l=this.getWord(e))){var a=(s=l.substring(1)).trim();l==this.pickerOptions.triggerCharacter||a&&a.length>0&&a.split(" ").length<=4?(this.dataProvider.queryStringUpdated(a,s==a),this.setLastKnownRange(null!==(t=this.editor.getSelectionRange())&&void 0!==t?t:null)):this.setIsSuggesting(!1)}}else{var l=this.getWordBeforeCursor(e);if(this.blockSuggestions)null!=l&&l[0]!=this.pickerOptions.triggerCharacter&&(this.blockSuggestions=!1);else if(null!=l&&l.split(" ").length<=4&&l[0]==this.pickerOptions.triggerCharacter){var s;if(this.setIsSuggesting(!0),a=(s=l.substring(1)).trim(),this.dataProvider.queryStringUpdated(a,s==a),this.setLastKnownRange(null!==(n=this.editor.getSelectionRange())&&void 0!==n?n:null),this.dataProvider.setCursorPoint){var u=this.editor.getContentSearcherOfCursor(e),d=this.editor.getDocument().createRange();if(d){var c=null!==(o=null===(r=null==u?void 0:u.getInlineElementBefore())||void 0===r?void 0:r.getContainerNode())&&void 0!==o?o:null;if(!this.setRangeStart(d,c,l)){var f=null!==(i=null==c?void 0:c.previousSibling)&&void 0!==i?i:null;this.setRangeStart(d,f,this.pickerOptions.triggerCharacter)}var p=d.getBoundingClientRect();if(0==p.left&&0==p.bottom&&0==p.top&&(p=d.getClientRects()[0]),p){d.detach();var v={x:p.left,y:(p.bottom+p.top)/2},h=(p.bottom-p.top)/2;this.dataProvider.setCursorPoint(v,h)}}}}}},e.prototype.onKeyDownEvent=function(e){var t,n,r=e.rawEvent;if(this.isSuggesting)r.key==a?(this.setIsSuggesting(!1),this.blockSuggestions=!0,this.cancelDefaultKeyDownEvent(e)):r.key==i?this.getWord(e)==this.pickerOptions.triggerCharacter&&this.setIsSuggesting(!1):this.dataProvider.shiftHighlight&&(this.pickerOptions.isHorizontal?r.key==l||r.key==u:r.key==s||r.key==d)?(this.dataProvider.shiftHighlight(this.pickerOptions.isHorizontal?r.key==u:r.key==d),this.dataProvider.getSelectedIndex&&this.setAriaActiveDescendant(this.dataProvider.getSelectedIndex()),this.cancelDefaultKeyDownEvent(e)):!this.dataProvider.selectOption||"Enter"!=r.key&&"Tab"!=r.key||(this.dataProvider.selectOption(),this.cancelDefaultKeyDownEvent(e));else if(r.key==i)this.tryRemoveNode(e)&&this.cancelDefaultKeyDownEvent(e);else if(r.key==c){var o=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e);if(o){var f=o.getInlineElementAfter()?null===(n=o.getInlineElementAfter())||void 0===n?void 0:n.getContainerNode():null,p=f?this.getIdValue(f):null;if(p&&0==p.indexOf(this.pickerOptions.elementIdPrefix)&&f){var v=this.dataProvider.onRemove(f,!1);this.replaceNode(f,v),this.cancelDefaultKeyDownEvent(e)}}}},e.prototype.onAndroidInputEvent=function(e){this.newInputLength=this.calcInputLength(e),(this.newInputLength-1)&&(e.setStart(t,r),!0)},e.prototype.setAriaOwns=function(e){var t;null===(t=this.editor)||void 0===t||t.setEditorDomAttribute("aria-owns",e&&this.pickerOptions.suggestionsLabel?this.pickerOptions.suggestionsLabel:null)},e.prototype.setAriaActiveDescendant=function(e){var t;null===(t=this.editor)||void 0===t||t.setEditorDomAttribute("aria-activedescendant",null!=e&&this.pickerOptions.suggestionLabelPrefix?this.pickerOptions.suggestionLabelPrefix+e.toString():null)},e.prototype.getInlineElementBeforeCursor=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e),r=n?n.getInlineElementBefore():null;return r?r.getTextContent():null},e.prototype.isAndroidKeyboardEvent=function(e){return"Unidentified"==e.rawEvent.key||null==e.rawEvent.key&&f.indexOf(e.rawEvent.charCode)>-1},e}();t.default=p},8833:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PickerPlugin=void 0;var r=n(6575);Object.defineProperty(t,"PickerPlugin",{enumerable:!0,get:function(){return r.default}})},9467:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7905),o=n(191),i=n(4199),a=n(6817),l=n(9905),s=n(1679),u=function(){function e(){this.editor=null,this.shadowEditCoordinatesBackup=null,this.state={firstTable:null,lastTarget:null,firstTarget:null,preventKeyUp:!1,startedSelection:!1,tableSelection:!1,targetTable:null,vTable:null,mouseMoveDisposer:null}}return e.prototype.getName=function(){return"TableCellSelection"},e.prototype.initialize=function(e){this.editor=e,this.editor.addContentEditFeature(o.DeleteTableContents)},e.prototype.dispose=function(){(0,r.clearState)(this.state,this.editor),this.state=null,this.editor=null},e.prototype.onPluginEvent=function(e){if(this.editor&&this.state)switch(e.eventType){case 17:this.handleEnteredShadowEdit(this.state,this.editor);break;case 18:this.handleLeavingShadowEdit(this.state,this.editor);break;case 5:this.state.startedSelection||(0,l.handleMouseDownEvent)(e,this.state,this.editor);break;case 0:this.state.startedSelection?e.rawEvent.preventDefault():(0,i.handleKeyDownEvent)(e,this.state,this.editor);break;case 2:this.state.startedSelection?e.rawEvent.preventDefault():(0,a.handleKeyUpEvent)(e,this.state,this.editor);break;case 14:this.state.startedSelection&&(0,s.handleScrollEvent)(this.state,this.editor);break;case 20:this.state.firstTable=null,this.state.tableSelection=!1,this.editor.select(null)}},e.prototype.handleLeavingShadowEdit=function(e,t){if(e.firstTable&&e.tableSelection&&e.firstTable){var n=t.queryElements("#"+e.firstTable.id);1==n.length&&(e.firstTable=n[0],t.select(e.firstTable,this.shadowEditCoordinatesBackup),this.shadowEditCoordinatesBackup=null)}},e.prototype.handleEnteredShadowEdit=function(e,t){var n,r=t.getSelectionRangeEx();1==r.type&&(this.shadowEditCoordinatesBackup=null!==(n=r.coordinates)&&void 0!==n?n:null,e.firstTable=r.table,e.tableSelection=!0,t.select(r.table,null))},e}();t.default=u},4332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABLE_CELL_SELECTOR=void 0,t.TABLE_CELL_SELECTOR="td,th"},191:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteTableContents=void 0;var r=n(6344),o=n(4332);function i(e,t){if((0,r.safeInstanceOf)(e,"HTMLTableCellElement")){var n=new Range;n.selectNodeContents(e),n.deleteContents(),e.appendChild(t.getDocument().createElement("br"))}}t.DeleteTableContents={keys:[46,8],shouldHandleEvent:function(e,t){return 1==t.getSelectionRangeEx().type},handleEvent:function(e,t){var n=t.getSelectionRangeEx();1==n.type&&t.addUndoSnapshot((function(){n.isWholeTableSelected?n.table.querySelectorAll(o.TABLE_CELL_SELECTOR).forEach((function(e){return i(e,t)})):t.getSelectedRegions().forEach((function(e){return i(e.rootNode,t)}))}))}}},7311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableCellSelection=void 0;var r=n(9467);Object.defineProperty(t,"TableCellSelection",{enumerable:!0,get:function(){return r.default}})},4199:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleKeyDownEvent=void 0;var r=n(4192),o=n(8098),i=n(4846),a=n(8533),l=n(4550),s=n(7463),u=n(4332),d=n(1648),c=n(6344);t.handleKeyDownEvent=function(e,t,n){var f,p=e.rawEvent,v=p.shiftKey,h=p.ctrlKey,g=p.metaKey,m=p.which,y=p.defaultPrevented;if(v&&(h||g)||16==m||y)t.preventKeyUp=y;else if(v){if(!t.firstTarget){var b=n.getFocusedPosition(),C=b&&(0,r.getCellAtCursor)(n,b.node);t.firstTarget=C}if(!(0,c.safeInstanceOf)(t.firstTarget,"HTMLTableCellElement"))return;n.runAsync((function(n){var f=n.getFocusedPosition(),p=t.tableSelection?t.lastTarget:null==f?void 0:f.node;if(p&&(0,s.setData)(p,t,n),t.firstTable==t.targetTable){if(!function(e,t){if(!e.firstTable||!t)return!1;var n=t.getSelectedRegions();if(1==n.length)return!1;var r=!0;return n.forEach((function(t){(0,c.contains)(e.firstTable,t.rootNode)||(r=!1)})),r}(t,n)&&!t.tableSelection)return;!function(e,t,n){var s,f;t.firstTarget=(0,r.getCellAtCursor)(n,t.firstTarget),t.lastTarget=(0,r.getCellAtCursor)(n,t.lastTarget),(0,d.updateSelection)(n,t.firstTarget,0),t.vTable=t.vTable||new c.VTable(t.firstTable);var p=(0,o.getCellCoordinates)(t.vTable,t.firstTarget),v=function(e,t,n){var r;if(n.lastTarget=n.lastTarget&&t.getElementAtCursor(u.TABLE_CELL_SELECTOR,n.lastTarget),(0,c.safeInstanceOf)(n.lastTarget,"HTMLTableCellElement")&&(null===(r=n.vTable)||void 0===r?void 0:r.cells)){var i=(0,o.getCellCoordinates)(n.vTable,n.lastTarget);if(n.tableSelection&&i)switch(e.rawEvent.which){case 39:i.x+=n.lastTarget.colSpan,null==n.vTable.cells[i.y][i.x]&&(i.x=n.vTable.cells[i.y].length-1,i.y++);break;case 37:0==i.x?i.y--:i.x--;break;case 38:i.y--;break;case 40:i.y++}return i&&i.y>=0&&i.x>=0&&(n.lastTarget=n.vTable.getTd(i.y,i.x)),i}}(e,n,t);if(p&&v){t.vTable.selection={firstCell:p,lastCell:v};var h=t.vTable.selection;if(!h.lastCell||t.vTable.cells&&h.lastCell.y>t.vTable.cells.length-1||-1==h.lastCell.y)if(t.lastTarget=n.getElementAtCursor(u.TABLE_CELL_SELECTOR+",div",null!==(s=t.firstTable)&&void 0!==s?s:void 0),(0,c.safeInstanceOf)(t.lastTarget,"HTMLTableCellElement"))(0,a.prepareSelection)(t,n);else{var g=t.targetTable&&new c.Position(t.targetTable,null==h.lastCell.y||-1==h.lastCell.y?-2:-3),m=null===(f=n.getDocument().defaultView)||void 0===f?void 0:f.getSelection(),y=m||{},b=y.anchorNode,C=y.anchorOffset;if(m&&b&&null!=C&&null!=C&&g)return n.select(m.getRangeAt(0)),m.setBaseAndExtent(b,C,g.node,g.offset),t.lastTarget=g.node,void e.rawEvent.preventDefault()}(0,l.selectTable)(n,t);var E=(0,i.isAfter)(t.firstTarget,t.lastTarget);if(t.lastTarget){var S=new c.Position(t.lastTarget,E?0:-1);(0,d.updateSelection)(n,S.node,S.offset)}t.tableSelection=!0,e.rawEvent.preventDefault()}}(e,t,n)}else t.tableSelection&&(t.firstTable&&n.select(t.firstTable,null),t.tableSelection=!1)}))}else 1!=(null===(f=n.getSelectionRangeEx())||void 0===f?void 0:f.type)||(0,c.isCtrlOrMetaPressed)(e.rawEvent)&&36!=m&&35!=m||n.select(null)}},6817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleKeyUpEvent=void 0;var r=n(7905),o=[16,18,91,17,44];t.handleKeyUpEvent=function(e,t,n){var i=e.rawEvent,a=i.shiftKey,l=i.which,s=i.ctrlKey;a||s||!t.firstTarget||t.preventKeyUp||-1!=o.indexOf(l)||(0,r.clearState)(t,n),t.preventKeyUp=!1}},9905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectionInsideTableMouseMove=t.handleMouseDownEvent=void 0;var r=n(8616),o=n(7905),i=n(6344),a=n(4192),l=n(8098),s=n(9878),u=n(8533),d=n(9991),c=n(4550),f=n(7463),p=n(4332),v=n(1648);function h(e,t,n){var r;if(t.firstTarget&&t.firstTable&&t.lastTarget!=t.firstTarget&&t.lastTarget){if((0,v.updateSelection)(n,t.firstTarget,0),t.firstTable!=t.targetTable&&(null===(r=t.targetTable)||void 0===r?void 0:r.contains(t.firstTable))&&(t.firstTarget=n.getElementAtCursor(p.TABLE_CELL_SELECTOR,t.lastTarget)),t.firstTable&&t.firstTarget){t.tableSelection=!0,t.vTable=t.vTable||new i.VTable(t.firstTable);var o=(0,l.getCellCoordinates)(t.vTable,t.firstTarget),a=(0,l.getCellCoordinates)(t.vTable,t.lastTarget);if(!o||!a)return;t.vTable.selection={firstCell:o,lastCell:a},(0,c.selectTable)(n,t)}e.preventDefault()}else if(t.lastTarget==t.firstTarget&&t.tableSelection&&t.firstTable&&t.firstTarget){t.vTable=new i.VTable(t.firstTable);var s=(0,l.getCellCoordinates)(t.vTable,t.firstTarget);s&&(t.vTable.selection={firstCell:s,lastCell:s}),(0,c.selectTable)(n,t)}}t.handleMouseDownEvent=function(e,t,n){var g,m=e.rawEvent,y=m.which,b=m.shiftKey,C=n.getElementAtCursor(p.TABLE_CELL_SELECTOR);if(3==y&&t.tableSelection&&t.vTable&&C){var E=(0,l.getCellCoordinates)(t.vTable,C);if(E){var S=(0,r.default)(t.vTable)||{},T=S.firstCell,P=S.lastCell;if(T&&P&&E.y>=T.y&&E.y<=P.y&&E.x>=T.x&&E.x<=P.x){if(t.firstTarget=t.vTable.getCell(T.y,T.x).td,t.lastTarget=t.vTable.getCell(P.y,P.x).td,t.firstTarget&&t.lastTarget){var w=null===(g=n.getDocument().defaultView)||void 0===g?void 0:g.getSelection();null==w||w.setBaseAndExtent(t.firstTarget,0,t.lastTarget,0),(0,c.selectTable)(n,t)}return}}}if(1==y&&!b&&((0,o.clearState)(t,n),(0,s.getTableAtCursor)(n,e.rawEvent.target))){var _=n.getDocument()||document,O=function(e){return function(){!function(e){var t;e.startedSelection&&(e.startedSelection=!1,null===(t=e.mouseMoveDisposer)||void 0===t||t.call(e))}(e)}}(t),M=function(e,t){return function(n){if(t.contains(n.target)){if(e.tableSelection&&e.firstTarget&&(0,i.contains)(e.lastTarget,n.target,!0))return(0,v.updateSelection)(t,e.firstTarget,0),void n.preventDefault();if("TABLE"!=(0,i.getTagOfNode)(n.target)){if((0,f.setData)(n.target,e,t),!e.firstTarget||e.firstTable)if(!e.lastTarget||(e.lastTarget.lastChild!=e.lastTarget.firstChild||"TABLE"!=(0,i.getTagOfNode)(e.lastTarget.lastChild)||"DIV"!=(0,i.getTagOfNode)(e.lastTarget))&&t.contains(e.lastTarget)){(0,u.prepareSelection)(e,t);var r=!!(0,i.safeInstanceOf)(e.lastTarget,"HTMLTableCellElement")&&(0,i.contains)(e.lastTarget,e.firstTable);e.firstTable&&e.firstTable==e.targetTable||r?h(n,e,t):e.tableSelection&&(0,d.restoreSelection)(e,t),e.tableSelection&&e.firstTarget&&((0,v.updateSelection)(t,e.firstTarget,0),n.preventDefault())}else n.preventDefault()}else n.preventDefault()}}}(t,n);_.addEventListener("mouseup",O,!0),_.addEventListener("mousemove",M,!0),t.mouseMoveDisposer=function(){_.removeEventListener("mouseup",O,!0),_.removeEventListener("mousemove",M,!0)},t.startedSelection=!0}1==y&&b&&n.runAsync((function(e){var n,r=null===(n=e.getDocument().defaultView)||void 0===n?void 0:n.getSelection(),o=(0,a.getCellAtCursor)(e,null==r?void 0:r.anchorNode),u=(0,a.getCellAtCursor)(e,null==r?void 0:r.focusNode),d=(0,s.getTableAtCursor)(e,o),f=(0,s.getTableAtCursor)(e,o);if(d==f&&(0,i.safeInstanceOf)(o,"HTMLTableCellElement")&&(0,i.safeInstanceOf)(u,"HTMLTableCellElement")){t.vTable=new i.VTable(o);var p=(0,l.getCellCoordinates)(t.vTable,o),h=(0,l.getCellCoordinates)(t.vTable,u);if(!p||!h)return;t.vTable.selection={firstCell:p,lastCell:h},t.firstTarget=o,t.lastTarget=u,(0,c.selectTable)(e,t),t.tableSelection=!0,t.firstTable=d,t.targetTable=f,(0,v.updateSelection)(e,o,0)}}))},t.selectionInsideTableMouseMove=h},1679:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleScrollEvent=void 0;var r=n(8098),o=n(9991),i=n(4550),a=n(7463),l=n(1648);t.handleScrollEvent=function(e,t){var n,s=t.getElementAtCursor();if(s)if((0,a.setData)(s,e,t),e.firstTable==e.targetTable&&e.firstTarget&&(null===(n=e.vTable)||void 0===n?void 0:n.selection)&&e.lastTarget&&e.tableSelection){var u=(0,r.getCellCoordinates)(e.vTable,e.lastTarget);u&&(e.vTable.selection.lastCell=u,(0,i.selectTable)(t,e),(0,l.updateSelection)(t,e.firstTarget,0))}else e.tableSelection&&(0,o.restoreSelection)(e,t)}},7905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearState=void 0,t.clearState=function(e,t){var n;null==t||t.select(null),e&&(e.vTable=null,e.firstTarget=null,e.lastTarget=null,e.tableSelection=!1,e.firstTable=null,e.targetTable=null,null===(n=e.mouseMoveDisposer)||void 0===n||n.call(e),e.mouseMoveDisposer=null)}},4192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCellAtCursor=void 0;var r=n(4332);t.getCellAtCursor=function(e,t){return e&&e.getElementAtCursor(r.TABLE_CELL_SELECTOR,null!=t?t:void 0)||t}},8098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCellCoordinates=void 0,t.getCellCoordinates=function(e,t){var n;if(null==e?void 0:e.cells)for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTableAtCursor=void 0,t.getTableAtCursor=function(e,t){return e?e.getElementAtCursor("table",t):null}},4846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAfter=void 0;var r=n(6344);t.isAfter=function(e,t){var n,o,i,a;if(e&&t){if(t.contains(e)){var l=null===(o=(n=e).getBoundingClientRect)||void 0===o?void 0:o.call(n),s=null===(a=(i=t).getBoundingClientRect)||void 0===a?void 0:a.call(i);if(l&&s)return l.top>s.top&&l.bottom{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(null==e?void 0:e.selection)||{},n=t.firstCell,r=t.lastCell;if(!((null==e?void 0:e.cells)&&e.selection&&n&&r))return null;var o=e.cells,i={x:Math.min(n.x,r.x),y:Math.min(n.y,r.y)},a={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},l=function(e){e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.y>=o.length&&(e.y=o.length-1);var t=o[e.y].length;e.x>=t&&(e.x=t-1)};return l(i),l(a),{firstCell:i,lastCell:a}}},8533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareSelection=void 0;var r=n(6344),o=n(9878),i=n(4332);t.prepareSelection=function(e,t){var n,a,l,s;if(e.firstTable&&e.targetTable){var u=e.lastTarget!=e.firstTarget&&(null===(n=e.firstTable)||void 0===n?void 0:n.contains((0,r.findClosestElementAncestor)(e.targetTable,e.firstTable,i.TABLE_CELL_SELECTOR)));if(u&&e.tableSelection)for(;u;)e.lastTarget=(0,r.findClosestElementAncestor)(e.targetTable,e.firstTable,i.TABLE_CELL_SELECTOR),e.targetTable=(0,o.getTableAtCursor)(t,e.lastTarget),u=e.lastTarget!=e.firstTarget&&(null===(a=e.firstTable)||void 0===a?void 0:a.contains((0,r.findClosestElementAncestor)(e.targetTable,e.firstTable,i.TABLE_CELL_SELECTOR)));var d=e.lastTarget!=e.firstTarget&&(null===(l=e.targetTable)||void 0===l?void 0:l.contains((0,r.findClosestElementAncestor)(e.firstTable,e.targetTable,i.TABLE_CELL_SELECTOR)));if(d&&e.tableSelection&&e.targetTable)for(;d;){if(e.firstTarget=(0,r.findClosestElementAncestor)(e.firstTable,e.targetTable,i.TABLE_CELL_SELECTOR),!e.firstTarget)return;e.firstTable=(0,o.getTableAtCursor)(t,e.firstTarget),d=e.lastTarget!=e.firstTarget&&(null===(s=e.targetTable)||void 0===s?void 0:s.contains((0,r.findClosestElementAncestor)(e.firstTable,e.targetTable,i.TABLE_CELL_SELECTOR)))}}}},9991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreSelection=void 0;var r=n(4846),o=n(6344),i=n(1648);t.restoreSelection=function(e,t){if(e.lastTarget&&e.firstTarget){e.firstTable&&t.select(e.firstTable,null),e.tableSelection=!1;var n=(0,r.isAfter)(e.firstTarget,e.lastTarget),a=new o.Position(e.lastTarget,n?-1:0),l=new Range;e.firstTarget&&l.selectNodeContents(e.firstTarget),(0,i.updateSelection)(t,e.firstTarget,n?o.Position.getEnd(l).offset:o.Position.getStart(l).offset,a.element,a.offset)}}},4550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectTable=void 0;var r=n(8616);t.selectTable=function(e,t){e&&t.vTable&&(null==e||e.select(t.vTable.table,(0,r.default)(t.vTable)))}},7463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setData=void 0;var r=n(4192),o=n(9878),i=n(4332);t.setData=function(e,t,n){var a=n.getFocusedPosition();a&&(t.firstTarget=t.firstTarget||(0,r.getCellAtCursor)(n,a.node),t.firstTarget.nodeType==Node.TEXT_NODE&&(t.firstTarget=n.getElementAtCursor(i.TABLE_CELL_SELECTOR,t.firstTarget)),!n.contains(t.firstTarget)&&t.lastTarget&&(t.firstTarget=t.lastTarget)),t.firstTable=(0,o.getTableAtCursor)(n,t.firstTarget),t.lastTarget=(0,r.getCellAtCursor)(n,e),t.targetTable=(0,o.getTableAtCursor)(n,t.lastTarget)}},1648:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSelection=void 0,t.updateSelection=function(e,t,n,r,o){var i,a=null===(i=e.getDocument().defaultView)||void 0===i?void 0:i.getSelection();a&&(r=r||t,o=o||n,a.setBaseAndExtent(t,n,r,o))}},12:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3087),o=n(6344),i=function(){function e(e){var t=this;this.onShowHelperElement=e,this.editor=null,this.onMouseMoveDisposer=null,this.tableRectMap=null,this.tableEditor=null,this.onMouseOut=function(e){var n;e.pageX&&(0,o.safeInstanceOf)(e.relatedTarget,"HTMLElement")&&t.tableEditor&&!t.tableEditor.isOwnedElement(e.relatedTarget)&&!(null===(n=t.editor)||void 0===n?void 0:n.contains(e.relatedTarget))&&t.setTableEditor(null)},this.onMouseMove=function(e){var n,r=e;if(!(r.buttons>0)&&t.editor){t.ensureTableRects();var o=t.editor.getDocument().defaultView||window,i=r.pageX-o.scrollX,a=r.pageY-o.scrollY,l=null;if(t.tableRectMap)for(var s=t.tableRectMap.length-1;s>=0;s--){var u=t.tableRectMap[s],d=u.table,c=u.rect;if(i>=c.left-12&&i<=c.right+12&&a>=c.top-12&&a<=c.bottom+12){l=d;break}}t.setTableEditor(l,r),null===(n=t.tableEditor)||void 0===n||n.onMouseMove(i,a)}},this.invalidateTableRects=function(){t.tableRectMap=null}}return e.prototype.getName=function(){return"TableResize"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.onMouseMoveDisposer=this.editor.addDomEventHandler({mousemove:this.onMouseMove,mouseout:function(e){return t.onMouseOut(e)}})},e.prototype.dispose=function(){var e;null===(e=this.onMouseMoveDisposer)||void 0===e||e.call(this),this.invalidateTableRects(),this.disposeTableEditor(),this.editor=null,this.onMouseMoveDisposer=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 3:case 7:case 14:case 21:this.setTableEditor(null),this.invalidateTableRects()}},e.prototype.setTableEditor=function(e,t){this.tableEditor&&!this.tableEditor.isEditing()&&e!=this.tableEditor.table&&this.disposeTableEditor(),!this.tableEditor&&e&&this.editor&&e.rows.length>0&&(this.tableEditor=new r.default(this.editor,e,this.invalidateTableRects,this.onShowHelperElement,null==t?void 0:t.currentTarget))},e.prototype.disposeTableEditor=function(){var e;null===(e=this.tableEditor)||void 0===e||e.dispose(),this.tableEditor=null},e.prototype.ensureTableRects=function(){var e=this;!this.tableRectMap&&this.editor&&(this.tableRectMap=[],this.editor.queryElements("table",(function(t){if(t.isContentEditable){var n=(0,o.normalizeRect)(t.getBoundingClientRect());n&&e.tableRectMap&&e.tableRectMap.push({table:t,rect:n})}})))},e}();t.default=i},1565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4296),o=n(6344);function i(e,t){var n=e.td,r=e.isRTL,i=e.zoomScale,a=e.onStart,l=new o.VTable(n,!0,i),s=(0,o.normalizeRect)(n.getBoundingClientRect());if(s){a();var u=l.getCellsWithBorder(r?s.left:s.right,!r),d=l.getCellsWithBorder(r?s.left:s.right,r);return{vTable:l,currentCells:u,nextCells:d,initialX:t.pageX}}return{vTable:l,currentCells:[],nextCells:[],initialX:0}}function a(e,t,n,r,o){var i=e.td,a=e.zoomScale,l=n.vTable;return l.table.removeAttribute("height"),l.table.style.setProperty("height",null),l.forEachCellOfCurrentRow((function(e){var t;e.td&&e.td.style.setProperty("height",e.td==i?(null!==(t=e.height)&&void 0!==t?t:0)/a+o+"px":null)})),l.writeBack(!0),!0}function l(e,t,n,r){var i=e.isRTL,a=e.zoomScale,l=n.vTable,u=n.nextCells,d=n.currentCells,c=n.initialX;if(!function(e,t,n,r,i){for(var a=0;a1?0:e.getBoundingClientRect().right-c;e.style.wordBreak="break-word",e.style.whiteSpace="normal",e.style.boxSizing="border-box",e.style.width=e.rowSpan>1?"":t/a-r+"px"})),l.writeBack(!0),!0}function s(e,t,n){return n?t-e.left:e.right-t}function u(e,t){var n=e.td,r=(0,o.normalizeRect)(n.getBoundingClientRect());r&&(t.style.top=r.bottom-4+"px",t.style.left=r.left+"px",t.style.width=r.right-r.left+"px",t.style.height="4px")}function d(e,t){var n=e.td,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.top+"px",t.style.left=(r?i.left:i.right)-4+1+"px",t.style.width="4px",t.style.height=i.bottom-i.top+"px")}t.default=function(e,t,n,s,c,f,p){var v=e.ownerDocument,h={tag:"div",style:"position: fixed; cursor: "+(s?"row":"col")+"-resize; user-select: none"};null==p||p(h,"CellResizer");var g=(0,o.createElement)(h,v);v.body.appendChild(g);var m={td:e,isRTL:n,zoomScale:t,onStart:c},y=s?u:d;y(m,g);var b={onDragStart:i,onDragging:s?a:l,onDragEnd:f};return{node:e,div:g,featureHandler:new r.default(g,m,y,b,t)}}},3087:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(1565),i=n(669),a=n(255),l=n(6034),s=n(6080),u=n(6344);!function(e){e[e.top=0]="top",e[e.side=1]="side"}(r||(r={}));var d=function(){function e(e,t,n,r,o){var i=this;this.editor=e,this.table=t,this.onChanged=n,this.onShowHelperElement=r,this.contentDiv=o,this.horizontalInserter=null,this.verticalInserter=null,this.horizontalResizer=null,this.verticalResizer=null,this.tableResizer=null,this.tableSelector=null,this.start=null,this.end=null,this.onFinishEditing=function(){return i.editor.focus(),i.start&&i.end&&i.editor.select(i.start,i.end),i.editor.addUndoSnapshot(void 0,"Format"),i.onChanged(),i.isCurrentlyEditing=!1,!1},this.onStartTableResize=function(){i.isCurrentlyEditing=!0,i.onStartResize()},this.onStartCellResize=function(){i.isCurrentlyEditing=!0,i.disposeTableResizer(),i.onStartResize()},this.onInserted=function(e){i.editor.transformToDarkColor(e),i.disposeTableResizer(),i.onFinishEditing()},this.onSelect=function(e){if(i.editor.focus(),e){var t=new u.VTable(e);if(t.cells){var n=t.cells.length-1,r=0;t.cells[n].forEach((function(e,t){r=t}));var o={firstCell:{x:0,y:0},lastCell:{y:n,x:r}};i.editor.select(e,o)}}},this.getOnMouseOut=function(e){return function(t){e&&t.relatedTarget!=e&&(0,u.safeInstanceOf)(i.contentDiv,"HTMLElement")&&(0,u.safeInstanceOf)(t.relatedTarget,"HTMLElement")&&!(0,u.contains)(i.contentDiv,t.relatedTarget,!0)&&i.dispose()}},this.isRTL="rtl"==(0,u.getComputedStyle)(t,"direction"),this.setEditorFeatures(),this.isCurrentlyEditing=!1}return e.prototype.dispose=function(){this.disposeTableResizer(),this.disposeCellResizers(),this.disposeTableInserter(),this.disposeTableSelector()},e.prototype.isEditing=function(){return this.isCurrentlyEditing},e.prototype.isOwnedElement=function(e){return[this.tableResizer,this.tableSelector,this.horizontalInserter,this.verticalInserter,this.horizontalResizer,this.verticalResizer].filter((function(e){return!!(null==e?void 0:e.div)})).some((function(t){return(0,u.contains)(null==t?void 0:t.div,e,!0)}))},e.prototype.onMouseMove=function(e,t){var n,r,o=null===(n=this.table.rows[0])||void 0===n?void 0:n.cells[0];if(o){var i=(0,u.normalizeRect)(o.getBoundingClientRect());if(i){for(var a=t<=i.top+6?0:this.isRTL?e>=i.right-6?1:void 0:e<=i.left+6?1:void 0,l=0;l=p.left:e>=p.left-6;if(v&&h&&g){var m=this.isRTL?p.right<=f.right&&p.right>=f.right-1:p.left>=f.left&&p.left<=f.left+1;if(0===l&&0==a){var y=(p.left+p.right)/2,b=this.isRTL?ey;this.setInserterTd(b?c:s.cells[d-1],!1)}else if(0===d&&1==a&&m){var C=null===(r=this.table.rows[l-1])||void 0===r?void 0:r.cells[0],E=C?(0,u.normalizeRect)(C.getBoundingClientRect()):null,S=E?this.isRTL?E.right===p.right:E.left===p.left:null;this.setInserterTd(t<(p.top+p.bottom)/2&&S?C:c,!0)}else this.setInserterTd(null);this.setResizingTd(c);break}}}if(d{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disposeTableEditFeature=void 0,t.disposeTableEditFeature=function(e){var t,n,r;e&&(null===(n=null===(t=e.div)||void 0===t?void 0:t.parentNode)||void 0===n||n.removeChild(e.div),e.div=null,null===(r=e.featureHandler)||void 0===r||r.dispose(),e.featureHandler=null)}},669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t,n,i,a,l,s){var u=e.getElementAtCursor("table",t),d=(0,r.normalizeRect)(t.getBoundingClientRect()),c=e.getVisibleViewport(),f=u&&c?(0,r.getIntersectedRect)([u],[c]):null;if(d&&f){var p=t.ownerDocument,v=function(e,t,n,r){var o=t?"white":"#4A4A4A";return{tag:"div",style:"position: fixed; width: 12px; height: 12px; font-size: 16px; color: black; line-height: 8px; vertical-align: middle; text-align: center; cursor: pointer; border: solid 1px "+o+"; border-radius: 50%; background-color: "+r,children:[{tag:"div",style:"position: absolute; box-sizing: border-box; background-color: "+r+";"+(e?(n?"right":"left")+": 12px; top: 5px; height: 3px; border-top: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-right: 1px solid "+o+"; border-left: 0px;":"left: 5px; top: 12px; width: 3px; border-left: 1px solid "+o+"; border-right: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-top: 0px;")},"+"]}}(i,e.isDarkMode(),n,e.getDefaultFormat().backgroundColor||"white");null==s||s(v,"TableInserter");var h=(0,r.createElement)(v,p);return i?(h.style.left=(n?f.right:f.left-13)+"px",h.style.top=d.bottom-8+"px",h.firstChild.style.width=f.right-f.left+"px"):(h.style.left=(n?d.left-8:d.right-8)+"px",h.style.top=f.top-13+"px",h.firstChild.style.height=f.bottom-f.top+"px"),p.body.appendChild(h),{div:h,featureHandler:new o(h,t,i,e,a,l),node:t}}return null};var o=function(){function e(e,t,n,o,i,a){var l=this;this.div=e,this.td=t,this.isHorizontal=n,this.editor=o,this.onInsert=i,this.insertTd=function(){var e=new r.VTable(l.td);l.isHorizontal||(e.normalizeTableCellSize(l.editor.getZoomScale()),e.table.removeAttribute("width"),e.table.style.setProperty("width",null)),e.edit(l.isHorizontal?1:3),e.writeBack(),l.onInsert(e.table)},this.div.addEventListener("click",this.insertTd),this.onMouseOutEvent=a(e),this.div.addEventListener("mouseout",this.onMouseOutEvent)}return e.prototype.dispose=function(){this.div.removeEventListener("click",this.insertTd),this.onMouseOutEvent&&this.div.removeEventListener("mouseout",this.onMouseOutEvent),this.onMouseOutEvent=null},e}()},255:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4296),o=n(6344);function i(e){return e.onStart(),{originalRect:e.table.getBoundingClientRect(),vTable:new o.VTable(e.table,!0,e.zoomScale)}}function a(e,t,n,r,o){var i,a,l=e.isRTL,s=e.zoomScale,u=n.originalRect,d=n.vTable,c=1+r/u.width*s*(l?-1:1),f=1+o/u.height*s,p=Math.abs(c-1)>.001,v=Math.abs(f-1)>.001;if(d.cells&&(p||v)){for(var h=0;h=30&&(m.td.style.wordBreak="break-word",m.td.style.whiteSpace="normal",m.td.style.width=y+"px")}if(v)if(d.table.style.setProperty("height",null),0==g){var b=(null!==(a=m.height)&&void 0!==a?a:0)*f/s;b>=20&&(m.td.style.height=b+"px")}else m.td.style.setProperty("height",null)}}return d.writeBack(!0),!0}return!1}function l(e,t){var n=e.table,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.bottom+"px",t.style.left=r?i.left-12-2+"px":i.right+"px")}t.default=function(e,t,n,s,u,d){var c=e.ownerDocument,f={tag:"div",style:"position: fixed; cursor: "+(n?"ne":"nw")+"-resize; user-select: none; border: 1px solid #808080"};null==d||d(f,"TableResizer");var p=(0,o.createElement)(f,c);p.style.width="12px",p.style.height="12px",c.body.appendChild(p);var v={isRTL:n,table:e,zoomScale:t,onStart:s};return l(v,p),{node:e,div:p,featureHandler:new r.default(p,v,l,{onDragStart:i,onDragging:a,onDragEnd:u},t)}}},6034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4296),i=n(6344);t.default=function(e,t,n,r,o,s,u){var d=(0,i.normalizeRect)(e.getBoundingClientRect());if(!function(e,t,n){var r=e.getVisibleViewport();if(n&&(0,i.safeInstanceOf)(n,"HTMLElement")&&r&&t){var o=(0,i.normalizeRect)(n.getBoundingClientRect());return!!o&&o.top<=t.top&&r.top<=t.top}return!0}(n,d,u))return null;var c=e.ownerDocument,f={tag:"div",style:"position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080"};null==s||s(f,"TableSelector");var p=(0,i.createElement)(f,c);p.id="_Table_Selector",p.style.width="12px",p.style.height="12px",c.body.appendChild(p);var v={table:e,zoomScale:t,rect:d};l(v,p);var h=new a(p,v,l,{onDragEnd:function(e,t){return t.target==p&&r(e.table),!1}},t,o);return{div:p,featureHandler:h,node:e}};var a=function(e){function t(t,n,r,o,i,a,l){var s=e.call(this,t,n,r,o,i,l)||this;return s.div=t,s.onMouseOut=a(t),t.addEventListener("mouseout",s.onMouseOut),s}return(0,r.__extends)(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onMouseOut&&this.div.removeEventListener("mouseout",this.onMouseOut),this.onMouseOut=null},t}(o.default);function l(e,t){var n=e.rect;n&&(t.style.top=n.top-12+"px",t.style.left=n.left-12-2+"px")}},9963:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableResize=void 0;var r=n(12);Object.defineProperty(t,"TableResize",{enumerable:!0,get:function(){return r.default}})},909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=n(4548),i="WATERMARK_WRAPPER",a=function(){function e(e,t,n){var a=this;this.watermark=e,this.customClass=n,this.editor=null,this.disposer=null,this.showHideWatermark=function(){if(a.editor){var e=a.editor.hasFocus(),t=a.editor.queryElements((0,r.getEntitySelector)(i)),n=t.length>0;if(e&&n)t.forEach(a.removeWatermark),a.editor.focus();else if(!e&&!n&&a.editor.isEmpty()){var l=(0,o.insertEntity)(a.editor,i,a.editor.getDocument().createTextNode(a.watermark),!1,!1,0);a.customClass&&l.wrapper.classList.add(a.customClass)}}},this.removeWatermark=function(e){var t,n=e.parentNode;null==n||n.removeChild(e),n&&(null===(t=a.editor)||void 0===t?void 0:t.contains(n))&&"DIV"==(0,r.getTagOfNode)(n)&&!n.firstChild&&n.appendChild(a.editor.getDocument().createElement("BR"))},this.format=t||{fontSize:"14px",textColors:{lightModeColor:"#AAAAAA",darkModeColor:"#6B6B6B"}}}return e.prototype.getName=function(){return"Watermark"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler({focus:this.showHideWatermark,blur:this.showHideWatermark})},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(11==e.eventType||7==e.eventType&&(null===(t=e.data)||void 0===t?void 0:t.type)!=i)this.showHideWatermark();else if(15==e.eventType&&e.entity.type==i&&this.editor){var n=e.operation,o=e.entity.wrapper;8==n?this.removeWatermark(o):0==e.operation&&((0,r.applyFormat)(o,this.format,this.editor.isDarkMode(),this.editor.getDarkColorHandler()),o.spellcheck=!1)}},e}();t.default=a},2939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watermark=void 0;var r=n(909);Object.defineProperty(t,"Watermark",{enumerable:!0,get:function(){return r.default}})},1286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(7246),t)},2091:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5160:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleAlignment=void 0,(n=t.CompatibleAlignment||(t.CompatibleAlignment={}))[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"},8411:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleBulletListType=void 0,(n=t.CompatibleBulletListType||(t.CompatibleBulletListType={}))[n.Min=1]="Min",n[n.Disc=1]="Disc",n[n.Dash=2]="Dash",n[n.Square=3]="Square",n[n.ShortArrow=4]="ShortArrow",n[n.LongArrow=5]="LongArrow",n[n.UnfilledArrow=6]="UnfilledArrow",n[n.Hyphen=7]="Hyphen",n[n.DoubleLongArrow=8]="DoubleLongArrow",n[n.Circle=9]="Circle",n[n.Max=9]="Max"},5412:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleCapitalization=void 0,(n=t.CompatibleCapitalization||(t.CompatibleCapitalization={})).Sentence="sentence",n.Lowercase="lowercase",n.Uppercase="uppercase",n.CapitalizeEachWord="capitalize"},5588:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleChangeSource=void 0,(n=t.CompatibleChangeSource||(t.CompatibleChangeSource={})).AutoLink="AutoLink",n.CreateLink="CreateLink",n.Format="Format",n.ImageResize="ImageResize",n.Paste="Paste",n.SetContent="SetContent",n.Cut="Cut",n.Drop="Drop",n.InsertEntity="InsertEntity",n.SwitchToDarkMode="SwitchToDarkMode",n.SwitchToLightMode="SwitchToLightMode",n.ListChain="ListChain",n.Keyboard="Keyboard"},6627:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleClearFormatMode=void 0,(n=t.CompatibleClearFormatMode||(t.CompatibleClearFormatMode={}))[n.Inline=0]="Inline",n[n.Block=1]="Block",n[n.AutoDetect=2]="AutoDetect"},2874:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleColorTransformDirection=void 0,(n=t.CompatibleColorTransformDirection||(t.CompatibleColorTransformDirection={}))[n.LightToDark=0]="LightToDark",n[n.DarkToLight=1]="DarkToLight"},1109:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleContentPosition=void 0,(n=t.CompatibleContentPosition||(t.CompatibleContentPosition={}))[n.Begin=0]="Begin",n[n.End=1]="End",n[n.DomEnd=2]="DomEnd",n[n.SelectionStart=3]="SelectionStart",n[n.Outside=4]="Outside",n[n.Range=5]="Range"},695:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleContentType=t.CompatibleContentTypePrefix=void 0,(r=t.CompatibleContentTypePrefix||(t.CompatibleContentTypePrefix={})).Text="text/",r.Image="image/",(n=t.CompatibleContentType||(t.CompatibleContentType={})).PlainText="text/plain",n.HTML="text/html"},7838:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDarkModeDatasetNames=void 0,(n=t.CompatibleDarkModeDatasetNames||(t.CompatibleDarkModeDatasetNames={})).OriginalStyleColor="ogsc",n.OriginalStyleBackgroundColor="ogsb",n.OriginalAttributeColor="ogac",n.OriginalAttributeBackgroundColor="ogab"},35:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDefinitionType=void 0,(n=t.CompatibleDefinitionType||(t.CompatibleDefinitionType={}))[n.Boolean=0]="Boolean",n[n.Number=1]="Number",n[n.String=2]="String",n[n.Array=3]="Array",n[n.Object=4]="Object",n[n.Customize=5]="Customize"},7028:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDelimiterClasses=void 0,(n=t.CompatibleDelimiterClasses||(t.CompatibleDelimiterClasses={})).DELIMITER_BEFORE="entityDelimiterBefore",n.DELIMITER_AFTER="entityDelimiterAfter"},6234:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDirection=void 0,(n=t.CompatibleDirection||(t.CompatibleDirection={}))[n.LeftToRight=0]="LeftToRight",n[n.RightToLeft=1]="RightToLeft"},2805:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDocumentCommand=void 0,(n=t.CompatibleDocumentCommand||(t.CompatibleDocumentCommand={})).AutoUrlDetect="AutoUrlDetect",n.BackColor="backColor",n.Bold="bold",n.ClearAuthenticationCache="ClearAuthenticationCache",n.ContentReadOnly="contentReadOnly",n.Copy="copy",n.CreateLink="createLink",n.Cut="cut",n.DecreaseFontSize="decreaseFontSize",n.DefaultParagraphSeparator="defaultParagraphSeparator",n.Delete="delete",n.EnableInlineTableEditing="enableInlineTableEditing",n.EnableObjectResizing="enableObjectResizing",n.FontName="fontName",n.FontSize="fontSize",n.ForeColor="foreColor",n.FormatBlock="formatBlock",n.ForwardDelete="forwardDelete",n.Heading="heading",n.HiliteColor="hiliteColor",n.IncreaseFontSize="increaseFontSize",n.Indent="indent",n.InsertBrOnReturn="insertBrOnReturn",n.InsertHorizontalRule="insertHorizontalRule",n.InsertHTML="insertHTML",n.InsertImage="insertImage",n.InsertOrderedList="insertOrderedList",n.InsertUnorderedList="insertUnorderedList",n.InsertParagraph="insertParagraph",n.InsertText="insertText",n.Italic="italic",n.JustifyCenter="justifyCenter",n.JustifyFull="justifyFull",n.JustifyLeft="justifyLeft",n.JustifyRight="justifyRight",n.Outdent="outdent",n.Paste="paste",n.Redo="redo",n.RemoveFormat="removeFormat",n.SelectAll="selectAll",n.StrikeThrough="strikeThrough",n.Subscript="subscript",n.Superscript="superscript",n.Underline="underline",n.Undo="undo",n.Unlink="unlink",n.StyleWithCSS="styleWithCSS"},6550:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDocumentPosition=void 0,(n=t.CompatibleDocumentPosition||(t.CompatibleDocumentPosition={}))[n.Same=0]="Same",n[n.Disconnected=1]="Disconnected",n[n.Preceding=2]="Preceding",n[n.Following=4]="Following",n[n.Contains=8]="Contains",n[n.ContainedBy=16]="ContainedBy"},3779:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleEntityClasses=void 0,(n=t.CompatibleEntityClasses||(t.CompatibleEntityClasses={})).ENTITY_INFO_NAME="_Entity",n.ENTITY_TYPE_PREFIX="_EType_",n.ENTITY_ID_PREFIX="_EId_",n.ENTITY_READONLY_PREFIX="_EReadonly_"},8206:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleEntityOperation=void 0,(n=t.CompatibleEntityOperation||(t.CompatibleEntityOperation={}))[n.NewEntity=0]="NewEntity",n[n.Click=1]="Click",n[n.ContextMenu=2]="ContextMenu",n[n.Escape=3]="Escape",n[n.RemoveFromStart=4]="RemoveFromStart",n[n.RemoveFromEnd=5]="RemoveFromEnd",n[n.Overwrite=6]="Overwrite",n[n.PartialOverwrite=7]="PartialOverwrite",n[n.ReplaceTemporaryContent=8]="ReplaceTemporaryContent",n[n.AddShadowRoot=9]="AddShadowRoot",n[n.RemoveShadowRoot=10]="RemoveShadowRoot",n[n.UpdateEntityState=11]="UpdateEntityState"},2322:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleExperimentalFeatures=void 0,(n=t.CompatibleExperimentalFeatures||(t.CompatibleExperimentalFeatures={})).NewIndentation="NewIndentation",n.NewBullet="NewBullet",n.NewNumbering="NewNumbering",n.ListChain="ListChain",n.MergePastedLine="MergePastedLine",n.SingleDirectionResize="SingleDirectionResize",n.PasteWithLinkPreview="PasteWithLinkPreview",n.ImageRotate="ImageRotate",n.ImageCrop="ImageCrop",n.AlwaysApplyDefaultFormat="AlwaysApplyDefaultFormat",n.ConvertSingleImageBody="ConvertSingleImageBody",n.TableAlignment="TableAlignment",n.AdaptiveHandlesResizer="AdaptiveHandlesResizer",n.AutoHyphen="AutoHyphen",n.PendingStyleBasedFormat="PendingStyleBasedFormat",n.NormalizeList="NormalizeList",n.ImageSelection="ImageSelection",n.VariableBasedDarkColor="VariableBasedDarkColor",n.ListItemAlignment="ListItemAlignment",n.DefaultFormatInSpan="DefaultFormatInSpan",n.DefaultFormatOnContainer="DefaultFormatOnContainer",n.TabKeyTextFeatures="TabKeyTextFeatures",n.AutoFormatList="AutoFormatList",n.ReuseAllAncestorListElements="ReuseAllAncestorListElements",n.ReusableContentModel="ReusableContentModel",n.EditWithContentModel="EditWithContentModel",n.DeleteTableWithBackspace="DeleteTableWithBackspace",n.InlineEntityReadOnlyDelimiters="InlineEntityReadOnlyDelimiters",n.ContentModelPaste="ContentModelPaste",n.DisableListChain="DisableListChain"},3271:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleFontSizeChange=void 0,(n=t.CompatibleFontSizeChange||(t.CompatibleFontSizeChange={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},2776:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleGetContentMode=void 0,(n=t.CompatibleGetContentMode||(t.CompatibleGetContentMode={}))[n.CleanHTML=0]="CleanHTML",n[n.RawHTMLOnly=1]="RawHTMLOnly",n[n.RawHTMLWithSelection=2]="RawHTMLWithSelection",n[n.PlainText=3]="PlainText",n[n.PlainTextFast=4]="PlainTextFast"},7705:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleImageEditOperation=void 0,(n=t.CompatibleImageEditOperation||(t.CompatibleImageEditOperation={}))[n.None=0]="None",n[n.CornerResize=1]="CornerResize",n[n.SideResize=2]="SideResize",n[n.Resize=3]="Resize",n[n.Rotate=4]="Rotate",n[n.ResizeAndRotate=7]="ResizeAndRotate",n[n.Crop=8]="Crop",n[n.All=15]="All"},6020:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleIndentation=void 0,(n=t.CompatibleIndentation||(t.CompatibleIndentation={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},2693:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleKeys=void 0,(n=t.CompatibleKeys||(t.CompatibleKeys={}))[n.NULL=0]="NULL",n[n.BACKSPACE=8]="BACKSPACE",n[n.TAB=9]="TAB",n[n.ENTER=13]="ENTER",n[n.SHIFT=16]="SHIFT",n[n.CTRL_LEFT=17]="CTRL_LEFT",n[n.ALT=18]="ALT",n[n.ESCAPE=27]="ESCAPE",n[n.SPACE=32]="SPACE",n[n.PAGEUP=33]="PAGEUP",n[n.END=35]="END",n[n.HOME=36]="HOME",n[n.LEFT=37]="LEFT",n[n.UP=38]="UP",n[n.RIGHT=39]="RIGHT",n[n.DOWN=40]="DOWN",n[n.PRINT_SCREEN=44]="PRINT_SCREEN",n[n.DELETE=46]="DELETE",n[n.EIGHT_ASTIRISK=56]="EIGHT_ASTIRISK",n[n.EIGHT_ASTERISK=56]="EIGHT_ASTERISK",n[n.B=66]="B",n[n.I=73]="I",n[n.U=85]="U",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.META_LEFT=91]="META_LEFT",n[n.COMMA=188]="COMMA",n[n.DASH_UNDERSCORE=189]="DASH_UNDERSCORE",n[n.PERIOD=190]="PERIOD",n[n.FORWARDSLASH=191]="FORWARDSLASH",n[n.FORWARD_SLASH=191]="FORWARD_SLASH",n[n.GRAVE_TILDE=192]="GRAVE_TILDE",n[n.CONTENTCHANGED=257]="CONTENTCHANGED",n[n.RANGE=258]="RANGE",n[n.Ctrl=4096]="Ctrl",n[n.Meta=8192]="Meta",n[n.Shift=16384]="Shift"},4845:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleKnownCreateElementDataIndex=void 0,(n=t.CompatibleKnownCreateElementDataIndex||(t.CompatibleKnownCreateElementDataIndex={}))[n.None=0]="None",n[n.EmptyLine=1]="EmptyLine",n[n.BlockquoteWrapper=2]="BlockquoteWrapper",n[n.CopyPasteTempDiv=3]="CopyPasteTempDiv",n[n.BlockListItem=4]="BlockListItem",n[n.ContextMenuWrapper=5]="ContextMenuWrapper",n[n.ImageEditWrapper=6]="ImageEditWrapper",n[n.TableHorizontalResizer=7]="TableHorizontalResizer",n[n.TableVerticalResizer=8]="TableVerticalResizer",n[n.TableResizerLTR=9]="TableResizerLTR",n[n.TableResizerRTL=10]="TableResizerRTL",n[n.TableSelector=11]="TableSelector",n[n.EmptyLineFormatInSpan=12]="EmptyLineFormatInSpan"},9603:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleKnownPasteSourceType=void 0,(n=t.CompatibleKnownPasteSourceType||(t.CompatibleKnownPasteSourceType={}))[n.WordDesktop=0]="WordDesktop",n[n.ExcelDesktop=1]="ExcelDesktop",n[n.ExcelOnline=2]="ExcelOnline",n[n.PowerPointDesktop=3]="PowerPointDesktop",n[n.GoogleSheets=4]="GoogleSheets",n[n.WacComponents=5]="WacComponents",n[n.Default=6]="Default",n[n.SingleImage=7]="SingleImage"},3115:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleListType=void 0,(n=t.CompatibleListType||(t.CompatibleListType={}))[n.None=0]="None",n[n.Ordered=1]="Ordered",n[n.Unordered=2]="Unordered"},6993:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleNodeType=void 0,(n=t.CompatibleNodeType||(t.CompatibleNodeType={}))[n.Element=1]="Element",n[n.Attribute=2]="Attribute",n[n.Text=3]="Text",n[n.ProcessingInstruction=7]="ProcessingInstruction",n[n.Comment=8]="Comment",n[n.Document=9]="Document",n[n.DocumentType=10]="DocumentType",n[n.DocumentFragment=11]="DocumentFragment"},1040:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleNumberingListType=void 0,(n=t.CompatibleNumberingListType||(t.CompatibleNumberingListType={}))[n.Min=1]="Min",n[n.Decimal=1]="Decimal",n[n.DecimalDash=2]="DecimalDash",n[n.DecimalParenthesis=3]="DecimalParenthesis",n[n.DecimalDoubleParenthesis=4]="DecimalDoubleParenthesis",n[n.LowerAlpha=5]="LowerAlpha",n[n.LowerAlphaParenthesis=6]="LowerAlphaParenthesis",n[n.LowerAlphaDoubleParenthesis=7]="LowerAlphaDoubleParenthesis",n[n.LowerAlphaDash=8]="LowerAlphaDash",n[n.UpperAlpha=9]="UpperAlpha",n[n.UpperAlphaParenthesis=10]="UpperAlphaParenthesis",n[n.UpperAlphaDoubleParenthesis=11]="UpperAlphaDoubleParenthesis",n[n.UpperAlphaDash=12]="UpperAlphaDash",n[n.LowerRoman=13]="LowerRoman",n[n.LowerRomanParenthesis=14]="LowerRomanParenthesis",n[n.LowerRomanDoubleParenthesis=15]="LowerRomanDoubleParenthesis",n[n.LowerRomanDash=16]="LowerRomanDash",n[n.UpperRoman=17]="UpperRoman",n[n.UpperRomanParenthesis=18]="UpperRomanParenthesis",n[n.UpperRomanDoubleParenthesis=19]="UpperRomanDoubleParenthesis",n[n.UpperRomanDash=20]="UpperRomanDash",n[n.Max=20]="Max"},610:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatiblePasteType=void 0,(n=t.CompatiblePasteType||(t.CompatiblePasteType={}))[n.Normal=0]="Normal",n[n.AsPlainText=1]="AsPlainText",n[n.MergeFormat=2]="MergeFormat",n[n.AsImage=3]="AsImage"},5912:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatiblePluginEventType=void 0,(n=t.CompatiblePluginEventType||(t.CompatiblePluginEventType={}))[n.KeyDown=0]="KeyDown",n[n.KeyPress=1]="KeyPress",n[n.KeyUp=2]="KeyUp",n[n.Input=3]="Input",n[n.CompositionEnd=4]="CompositionEnd",n[n.MouseDown=5]="MouseDown",n[n.MouseUp=6]="MouseUp",n[n.ContentChanged=7]="ContentChanged",n[n.ExtractContentWithDom=8]="ExtractContentWithDom",n[n.BeforeCutCopy=9]="BeforeCutCopy",n[n.BeforePaste=10]="BeforePaste",n[n.EditorReady=11]="EditorReady",n[n.BeforeDispose=12]="BeforeDispose",n[n.PendingFormatStateChanged=13]="PendingFormatStateChanged",n[n.Scroll=14]="Scroll",n[n.EntityOperation=15]="EntityOperation",n[n.ContextMenu=16]="ContextMenu",n[n.EnteredShadowEdit=17]="EnteredShadowEdit",n[n.LeavingShadowEdit=18]="LeavingShadowEdit",n[n.EditImage=19]="EditImage",n[n.BeforeSetContent=20]="BeforeSetContent",n[n.ZoomChanged=21]="ZoomChanged",n[n.SelectionChanged=22]="SelectionChanged",n[n.BeforeKeyboardEditing=23]="BeforeKeyboardEditing"},685:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatiblePositionType=void 0,(n=t.CompatiblePositionType||(t.CompatiblePositionType={}))[n.Begin=0]="Begin",n[n.End=-1]="End",n[n.Before=-2]="Before",n[n.After=-3]="After"},8465:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleQueryScope=void 0,(n=t.CompatibleQueryScope||(t.CompatibleQueryScope={}))[n.Body=0]="Body",n[n.OnSelection=1]="OnSelection",n[n.InSelection=2]="InSelection"},2906:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleRegionType=void 0,(n=t.CompatibleRegionType||(t.CompatibleRegionType={}))[n.Table=0]="Table"},895:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleSelectionRangeTypes=void 0,(n=t.CompatibleSelectionRangeTypes||(t.CompatibleSelectionRangeTypes={}))[n.Normal=0]="Normal",n[n.TableSelection=1]="TableSelection",n[n.ImageSelection=2]="ImageSelection"},3088:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleTableBorderFormat=void 0,(n=t.CompatibleTableBorderFormat||(t.CompatibleTableBorderFormat={}))[n.DEFAULT=0]="DEFAULT",n[n.LIST_WITH_SIDE_BORDERS=1]="LIST_WITH_SIDE_BORDERS",n[n.NO_HEADER_BORDERS=2]="NO_HEADER_BORDERS",n[n.NO_SIDE_BORDERS=3]="NO_SIDE_BORDERS",n[n.FIRST_COLUMN_HEADER_EXTERNAL=4]="FIRST_COLUMN_HEADER_EXTERNAL",n[n.ESPECIAL_TYPE_1=5]="ESPECIAL_TYPE_1",n[n.ESPECIAL_TYPE_2=6]="ESPECIAL_TYPE_2",n[n.ESPECIAL_TYPE_3=7]="ESPECIAL_TYPE_3",n[n.CLEAR=8]="CLEAR"},6011:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleTableOperation=void 0,(n=t.CompatibleTableOperation||(t.CompatibleTableOperation={}))[n.InsertAbove=0]="InsertAbove",n[n.InsertBelow=1]="InsertBelow",n[n.InsertLeft=2]="InsertLeft",n[n.InsertRight=3]="InsertRight",n[n.DeleteTable=4]="DeleteTable",n[n.DeleteColumn=5]="DeleteColumn",n[n.DeleteRow=6]="DeleteRow",n[n.MergeAbove=7]="MergeAbove",n[n.MergeBelow=8]="MergeBelow",n[n.MergeLeft=9]="MergeLeft",n[n.MergeRight=10]="MergeRight",n[n.MergeCells=11]="MergeCells",n[n.SplitHorizontally=12]="SplitHorizontally",n[n.SplitVertically=13]="SplitVertically",n[n.AlignCenter=14]="AlignCenter",n[n.AlignLeft=15]="AlignLeft",n[n.AlignRight=16]="AlignRight",n[n.AlignCellLeft=17]="AlignCellLeft",n[n.AlignCellCenter=18]="AlignCellCenter",n[n.AlignCellRight=19]="AlignCellRight",n[n.AlignCellTop=20]="AlignCellTop",n[n.AlignCellMiddle=21]="AlignCellMiddle",n[n.AlignCellBottom=22]="AlignCellBottom"},5414:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleTableOperation=t.CompatibleTableBorderFormat=t.CompatibleSelectionRangeTypes=t.CompatibleRegionType=t.CompatibleQueryScope=t.CompatiblePositionType=t.CompatiblePluginEventType=t.CompatiblePasteType=t.CompatibleNumberingListType=t.CompatibleNodeType=t.CompatibleListType=t.CompatibleKnownPasteSourceType=t.CompatibleKnownCreateElementDataIndex=t.CompatibleKeys=t.CompatibleIndentation=t.CompatibleImageEditOperation=t.CompatibleGetContentMode=t.CompatibleFontSizeChange=t.CompatibleExperimentalFeatures=t.CompatibleEntityOperation=t.CompatibleEntityClasses=t.CompatibleDocumentPosition=t.CompatibleDocumentCommand=t.CompatibleDirection=t.CompatibleDelimiterClasses=t.CompatibleDefinitionType=t.CompatibleDarkModeDatasetNames=t.CompatibleContentType=t.CompatibleContentTypePrefix=t.CompatibleContentPosition=t.CompatibleColorTransformDirection=t.CompatibleClearFormatMode=t.CompatibleChangeSource=t.CompatibleCapitalization=t.CompatibleBulletListType=t.CompatibleAlignment=void 0;var r=n(5160);Object.defineProperty(t,"CompatibleAlignment",{enumerable:!0,get:function(){return r.CompatibleAlignment}});var o=n(8411);Object.defineProperty(t,"CompatibleBulletListType",{enumerable:!0,get:function(){return o.CompatibleBulletListType}});var i=n(5412);Object.defineProperty(t,"CompatibleCapitalization",{enumerable:!0,get:function(){return i.CompatibleCapitalization}});var a=n(5588);Object.defineProperty(t,"CompatibleChangeSource",{enumerable:!0,get:function(){return a.CompatibleChangeSource}});var l=n(6627);Object.defineProperty(t,"CompatibleClearFormatMode",{enumerable:!0,get:function(){return l.CompatibleClearFormatMode}});var s=n(2874);Object.defineProperty(t,"CompatibleColorTransformDirection",{enumerable:!0,get:function(){return s.CompatibleColorTransformDirection}});var u=n(1109);Object.defineProperty(t,"CompatibleContentPosition",{enumerable:!0,get:function(){return u.CompatibleContentPosition}});var d=n(695);Object.defineProperty(t,"CompatibleContentTypePrefix",{enumerable:!0,get:function(){return d.CompatibleContentTypePrefix}}),Object.defineProperty(t,"CompatibleContentType",{enumerable:!0,get:function(){return d.CompatibleContentType}});var c=n(7838);Object.defineProperty(t,"CompatibleDarkModeDatasetNames",{enumerable:!0,get:function(){return c.CompatibleDarkModeDatasetNames}});var f=n(35);Object.defineProperty(t,"CompatibleDefinitionType",{enumerable:!0,get:function(){return f.CompatibleDefinitionType}});var p=n(7028);Object.defineProperty(t,"CompatibleDelimiterClasses",{enumerable:!0,get:function(){return p.CompatibleDelimiterClasses}});var v=n(6234);Object.defineProperty(t,"CompatibleDirection",{enumerable:!0,get:function(){return v.CompatibleDirection}});var h=n(2805);Object.defineProperty(t,"CompatibleDocumentCommand",{enumerable:!0,get:function(){return h.CompatibleDocumentCommand}});var g=n(6550);Object.defineProperty(t,"CompatibleDocumentPosition",{enumerable:!0,get:function(){return g.CompatibleDocumentPosition}});var m=n(3779);Object.defineProperty(t,"CompatibleEntityClasses",{enumerable:!0,get:function(){return m.CompatibleEntityClasses}});var y=n(8206);Object.defineProperty(t,"CompatibleEntityOperation",{enumerable:!0,get:function(){return y.CompatibleEntityOperation}});var b=n(2322);Object.defineProperty(t,"CompatibleExperimentalFeatures",{enumerable:!0,get:function(){return b.CompatibleExperimentalFeatures}});var C=n(3271);Object.defineProperty(t,"CompatibleFontSizeChange",{enumerable:!0,get:function(){return C.CompatibleFontSizeChange}});var E=n(2776);Object.defineProperty(t,"CompatibleGetContentMode",{enumerable:!0,get:function(){return E.CompatibleGetContentMode}});var S=n(7705);Object.defineProperty(t,"CompatibleImageEditOperation",{enumerable:!0,get:function(){return S.CompatibleImageEditOperation}});var T=n(6020);Object.defineProperty(t,"CompatibleIndentation",{enumerable:!0,get:function(){return T.CompatibleIndentation}});var P=n(2693);Object.defineProperty(t,"CompatibleKeys",{enumerable:!0,get:function(){return P.CompatibleKeys}});var w=n(4845);Object.defineProperty(t,"CompatibleKnownCreateElementDataIndex",{enumerable:!0,get:function(){return w.CompatibleKnownCreateElementDataIndex}});var _=n(9603);Object.defineProperty(t,"CompatibleKnownPasteSourceType",{enumerable:!0,get:function(){return _.CompatibleKnownPasteSourceType}});var O=n(3115);Object.defineProperty(t,"CompatibleListType",{enumerable:!0,get:function(){return O.CompatibleListType}});var M=n(6993);Object.defineProperty(t,"CompatibleNodeType",{enumerable:!0,get:function(){return M.CompatibleNodeType}});var D=n(1040);Object.defineProperty(t,"CompatibleNumberingListType",{enumerable:!0,get:function(){return D.CompatibleNumberingListType}});var L=n(610);Object.defineProperty(t,"CompatiblePasteType",{enumerable:!0,get:function(){return L.CompatiblePasteType}});var R=n(5912);Object.defineProperty(t,"CompatiblePluginEventType",{enumerable:!0,get:function(){return R.CompatiblePluginEventType}});var A=n(685);Object.defineProperty(t,"CompatiblePositionType",{enumerable:!0,get:function(){return A.CompatiblePositionType}});var I=n(8465);Object.defineProperty(t,"CompatibleQueryScope",{enumerable:!0,get:function(){return I.CompatibleQueryScope}});var x=n(2906);Object.defineProperty(t,"CompatibleRegionType",{enumerable:!0,get:function(){return x.CompatibleRegionType}});var N=n(895);Object.defineProperty(t,"CompatibleSelectionRangeTypes",{enumerable:!0,get:function(){return N.CompatibleSelectionRangeTypes}});var k=n(3088);Object.defineProperty(t,"CompatibleTableBorderFormat",{enumerable:!0,get:function(){return k.CompatibleTableBorderFormat}});var j=n(6011);Object.defineProperty(t,"CompatibleTableOperation",{enumerable:!0,get:function(){return j.CompatibleTableOperation}})},7246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);(0,r.__exportStar)(n(2091),t),(0,r.__exportStar)(n(3424),t),(0,r.__exportStar)(n(5414),t),(0,r.__exportStar)(n(796),t),(0,r.__exportStar)(n(7882),t),(0,r.__exportStar)(n(8568),t)},3424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4625:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Alignment=void 0,(n=t.Alignment||(t.Alignment={}))[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"},8982:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BulletListType=void 0,(n=t.BulletListType||(t.BulletListType={}))[n.Min=1]="Min",n[n.Disc=1]="Disc",n[n.Dash=2]="Dash",n[n.Square=3]="Square",n[n.ShortArrow=4]="ShortArrow",n[n.LongArrow=5]="LongArrow",n[n.UnfilledArrow=6]="UnfilledArrow",n[n.Hyphen=7]="Hyphen",n[n.DoubleLongArrow=8]="DoubleLongArrow",n[n.Circle=9]="Circle",n[n.Max=9]="Max"},9003:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Capitalization=void 0,(n=t.Capitalization||(t.Capitalization={})).Sentence="sentence",n.Lowercase="lowercase",n.Uppercase="uppercase",n.CapitalizeEachWord="capitalize"},8591:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeSource=void 0,(n=t.ChangeSource||(t.ChangeSource={})).AutoLink="AutoLink",n.CreateLink="CreateLink",n.Format="Format",n.ImageResize="ImageResize",n.Paste="Paste",n.SetContent="SetContent",n.Cut="Cut",n.Drop="Drop",n.InsertEntity="InsertEntity",n.SwitchToDarkMode="SwitchToDarkMode",n.SwitchToLightMode="SwitchToLightMode",n.ListChain="ListChain",n.Keyboard="Keyboard"},2101:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ClearFormatMode=void 0,(n=t.ClearFormatMode||(t.ClearFormatMode={}))[n.Inline=0]="Inline",n[n.Block=1]="Block",n[n.AutoDetect=2]="AutoDetect"},4471:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorTransformDirection=void 0,(n=t.ColorTransformDirection||(t.ColorTransformDirection={}))[n.LightToDark=0]="LightToDark",n[n.DarkToLight=1]="DarkToLight"},8983:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentPosition=void 0,(n=t.ContentPosition||(t.ContentPosition={}))[n.Begin=0]="Begin",n[n.End=1]="End",n[n.DomEnd=2]="DomEnd",n[n.SelectionStart=3]="SelectionStart",n[n.Outside=4]="Outside",n[n.Range=5]="Range"},7157:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentType=t.ContentTypePrefix=void 0,(r=t.ContentTypePrefix||(t.ContentTypePrefix={})).Text="text/",r.Image="image/",(n=t.ContentType||(t.ContentType={})).PlainText="text/plain",n.HTML="text/html"},4490:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DarkModeDatasetNames=void 0,(n=t.DarkModeDatasetNames||(t.DarkModeDatasetNames={})).OriginalStyleColor="ogsc",n.OriginalStyleBackgroundColor="ogsb",n.OriginalAttributeColor="ogac",n.OriginalAttributeBackgroundColor="ogab"},9097:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionType=void 0,(n=t.DefinitionType||(t.DefinitionType={}))[n.Boolean=0]="Boolean",n[n.Number=1]="Number",n[n.String=2]="String",n[n.Array=3]="Array",n[n.Object=4]="Object",n[n.Customize=5]="Customize"},2910:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DelimiterClasses=void 0,(n=t.DelimiterClasses||(t.DelimiterClasses={})).DELIMITER_BEFORE="entityDelimiterBefore",n.DELIMITER_AFTER="entityDelimiterAfter"},265:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,(n=t.Direction||(t.Direction={}))[n.LeftToRight=0]="LeftToRight",n[n.RightToLeft=1]="RightToLeft"},6386:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentCommand=void 0,(n=t.DocumentCommand||(t.DocumentCommand={})).AutoUrlDetect="AutoUrlDetect",n.BackColor="backColor",n.Bold="bold",n.ClearAuthenticationCache="ClearAuthenticationCache",n.ContentReadOnly="contentReadOnly",n.Copy="copy",n.CreateLink="createLink",n.Cut="cut",n.DecreaseFontSize="decreaseFontSize",n.DefaultParagraphSeparator="defaultParagraphSeparator",n.Delete="delete",n.EnableInlineTableEditing="enableInlineTableEditing",n.EnableObjectResizing="enableObjectResizing",n.FontName="fontName",n.FontSize="fontSize",n.ForeColor="foreColor",n.FormatBlock="formatBlock",n.ForwardDelete="forwardDelete",n.Heading="heading",n.HiliteColor="hiliteColor",n.IncreaseFontSize="increaseFontSize",n.Indent="indent",n.InsertBrOnReturn="insertBrOnReturn",n.InsertHorizontalRule="insertHorizontalRule",n.InsertHTML="insertHTML",n.InsertImage="insertImage",n.InsertOrderedList="insertOrderedList",n.InsertUnorderedList="insertUnorderedList",n.InsertParagraph="insertParagraph",n.InsertText="insertText",n.Italic="italic",n.JustifyCenter="justifyCenter",n.JustifyFull="justifyFull",n.JustifyLeft="justifyLeft",n.JustifyRight="justifyRight",n.Outdent="outdent",n.Paste="paste",n.Redo="redo",n.RemoveFormat="removeFormat",n.SelectAll="selectAll",n.StrikeThrough="strikeThrough",n.Subscript="subscript",n.Superscript="superscript",n.Underline="underline",n.Undo="undo",n.Unlink="unlink",n.StyleWithCSS="styleWithCSS"},565:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentPosition=void 0,(n=t.DocumentPosition||(t.DocumentPosition={}))[n.Same=0]="Same",n[n.Disconnected=1]="Disconnected",n[n.Preceding=2]="Preceding",n[n.Following=4]="Following",n[n.Contains=8]="Contains",n[n.ContainedBy=16]="ContainedBy"},2372:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EntityClasses=void 0,(n=t.EntityClasses||(t.EntityClasses={})).ENTITY_INFO_NAME="_Entity",n.ENTITY_TYPE_PREFIX="_EType_",n.ENTITY_ID_PREFIX="_EId_",n.ENTITY_READONLY_PREFIX="_EReadonly_"},9468:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EntityOperation=void 0,(n=t.EntityOperation||(t.EntityOperation={}))[n.NewEntity=0]="NewEntity",n[n.Click=1]="Click",n[n.ContextMenu=2]="ContextMenu",n[n.Escape=3]="Escape",n[n.RemoveFromStart=4]="RemoveFromStart",n[n.RemoveFromEnd=5]="RemoveFromEnd",n[n.Overwrite=6]="Overwrite",n[n.PartialOverwrite=7]="PartialOverwrite",n[n.ReplaceTemporaryContent=8]="ReplaceTemporaryContent",n[n.AddShadowRoot=9]="AddShadowRoot",n[n.RemoveShadowRoot=10]="RemoveShadowRoot",n[n.UpdateEntityState=11]="UpdateEntityState"},9084:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentalFeatures=void 0,(n=t.ExperimentalFeatures||(t.ExperimentalFeatures={})).NewIndentation="NewIndentation",n.NewBullet="NewBullet",n.NewNumbering="NewNumbering",n.ListChain="ListChain",n.MergePastedLine="MergePastedLine",n.SingleDirectionResize="SingleDirectionResize",n.PasteWithLinkPreview="PasteWithLinkPreview",n.ImageRotate="ImageRotate",n.ImageCrop="ImageCrop",n.AlwaysApplyDefaultFormat="AlwaysApplyDefaultFormat",n.ConvertSingleImageBody="ConvertSingleImageBody",n.TableAlignment="TableAlignment",n.AdaptiveHandlesResizer="AdaptiveHandlesResizer",n.AutoHyphen="AutoHyphen",n.PendingStyleBasedFormat="PendingStyleBasedFormat",n.NormalizeList="NormalizeList",n.ImageSelection="ImageSelection",n.VariableBasedDarkColor="VariableBasedDarkColor",n.ListItemAlignment="ListItemAlignment",n.DefaultFormatInSpan="DefaultFormatInSpan",n.DefaultFormatOnContainer="DefaultFormatOnContainer",n.TabKeyTextFeatures="TabKeyTextFeatures",n.AutoFormatList="AutoFormatList",n.ReuseAllAncestorListElements="ReuseAllAncestorListElements",n.ReusableContentModel="ReusableContentModel",n.EditWithContentModel="EditWithContentModel",n.DeleteTableWithBackspace="DeleteTableWithBackspace",n.InlineEntityReadOnlyDelimiters="InlineEntityReadOnlyDelimiters",n.ContentModelPaste="ContentModelPaste",n.DisableListChain="DisableListChain"},5397:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FontSizeChange=void 0,(n=t.FontSizeChange||(t.FontSizeChange={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},4051:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GetContentMode=void 0,(n=t.GetContentMode||(t.GetContentMode={}))[n.CleanHTML=0]="CleanHTML",n[n.RawHTMLOnly=1]="RawHTMLOnly",n[n.RawHTMLWithSelection=2]="RawHTMLWithSelection",n[n.PlainText=3]="PlainText",n[n.PlainTextFast=4]="PlainTextFast"},2681:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditOperation=void 0,(n=t.ImageEditOperation||(t.ImageEditOperation={}))[n.None=0]="None",n[n.CornerResize=1]="CornerResize",n[n.SideResize=2]="SideResize",n[n.Resize=3]="Resize",n[n.Rotate=4]="Rotate",n[n.ResizeAndRotate=7]="ResizeAndRotate",n[n.Crop=8]="Crop",n[n.All=15]="All"},6039:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Indentation=void 0,(n=t.Indentation||(t.Indentation={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},3692:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Keys=void 0,(n=t.Keys||(t.Keys={}))[n.NULL=0]="NULL",n[n.BACKSPACE=8]="BACKSPACE",n[n.TAB=9]="TAB",n[n.ENTER=13]="ENTER",n[n.SHIFT=16]="SHIFT",n[n.CTRL_LEFT=17]="CTRL_LEFT",n[n.ALT=18]="ALT",n[n.ESCAPE=27]="ESCAPE",n[n.SPACE=32]="SPACE",n[n.PAGEUP=33]="PAGEUP",n[n.END=35]="END",n[n.HOME=36]="HOME",n[n.LEFT=37]="LEFT",n[n.UP=38]="UP",n[n.RIGHT=39]="RIGHT",n[n.DOWN=40]="DOWN",n[n.PRINT_SCREEN=44]="PRINT_SCREEN",n[n.DELETE=46]="DELETE",n[n.EIGHT_ASTIRISK=56]="EIGHT_ASTIRISK",n[n.EIGHT_ASTERISK=56]="EIGHT_ASTERISK",n[n.B=66]="B",n[n.I=73]="I",n[n.U=85]="U",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.META_LEFT=91]="META_LEFT",n[n.COMMA=188]="COMMA",n[n.DASH_UNDERSCORE=189]="DASH_UNDERSCORE",n[n.PERIOD=190]="PERIOD",n[n.FORWARDSLASH=191]="FORWARDSLASH",n[n.FORWARD_SLASH=191]="FORWARD_SLASH",n[n.GRAVE_TILDE=192]="GRAVE_TILDE",n[n.CONTENTCHANGED=257]="CONTENTCHANGED",n[n.RANGE=258]="RANGE",n[n.Ctrl=4096]="Ctrl",n[n.Meta=8192]="Meta",n[n.Shift=16384]="Shift"},9278:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementDataIndex=void 0,(n=t.KnownCreateElementDataIndex||(t.KnownCreateElementDataIndex={}))[n.None=0]="None",n[n.EmptyLine=1]="EmptyLine",n[n.BlockquoteWrapper=2]="BlockquoteWrapper",n[n.CopyPasteTempDiv=3]="CopyPasteTempDiv",n[n.BlockListItem=4]="BlockListItem",n[n.ContextMenuWrapper=5]="ContextMenuWrapper",n[n.ImageEditWrapper=6]="ImageEditWrapper",n[n.TableHorizontalResizer=7]="TableHorizontalResizer",n[n.TableVerticalResizer=8]="TableVerticalResizer",n[n.TableResizerLTR=9]="TableResizerLTR",n[n.TableResizerRTL=10]="TableResizerRTL",n[n.TableSelector=11]="TableSelector",n[n.EmptyLineFormatInSpan=12]="EmptyLineFormatInSpan"},2342:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownPasteSourceType=void 0,(n=t.KnownPasteSourceType||(t.KnownPasteSourceType={}))[n.WordDesktop=0]="WordDesktop",n[n.ExcelDesktop=1]="ExcelDesktop",n[n.ExcelOnline=2]="ExcelOnline",n[n.PowerPointDesktop=3]="PowerPointDesktop",n[n.GoogleSheets=4]="GoogleSheets",n[n.WacComponents=5]="WacComponents",n[n.Default=6]="Default",n[n.SingleImage=7]="SingleImage"},8185:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ListType=void 0,(n=t.ListType||(t.ListType={}))[n.None=0]="None",n[n.Ordered=1]="Ordered",n[n.Unordered=2]="Unordered"},9883:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,(n=t.NodeType||(t.NodeType={}))[n.Element=1]="Element",n[n.Attribute=2]="Attribute",n[n.Text=3]="Text",n[n.ProcessingInstruction=7]="ProcessingInstruction",n[n.Comment=8]="Comment",n[n.Document=9]="Document",n[n.DocumentType=10]="DocumentType",n[n.DocumentFragment=11]="DocumentFragment"},7821:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NumberingListType=void 0,(n=t.NumberingListType||(t.NumberingListType={}))[n.Min=1]="Min",n[n.Decimal=1]="Decimal",n[n.DecimalDash=2]="DecimalDash",n[n.DecimalParenthesis=3]="DecimalParenthesis",n[n.DecimalDoubleParenthesis=4]="DecimalDoubleParenthesis",n[n.LowerAlpha=5]="LowerAlpha",n[n.LowerAlphaParenthesis=6]="LowerAlphaParenthesis",n[n.LowerAlphaDoubleParenthesis=7]="LowerAlphaDoubleParenthesis",n[n.LowerAlphaDash=8]="LowerAlphaDash",n[n.UpperAlpha=9]="UpperAlpha",n[n.UpperAlphaParenthesis=10]="UpperAlphaParenthesis",n[n.UpperAlphaDoubleParenthesis=11]="UpperAlphaDoubleParenthesis",n[n.UpperAlphaDash=12]="UpperAlphaDash",n[n.LowerRoman=13]="LowerRoman",n[n.LowerRomanParenthesis=14]="LowerRomanParenthesis",n[n.LowerRomanDoubleParenthesis=15]="LowerRomanDoubleParenthesis",n[n.LowerRomanDash=16]="LowerRomanDash",n[n.UpperRoman=17]="UpperRoman",n[n.UpperRomanParenthesis=18]="UpperRomanParenthesis",n[n.UpperRomanDoubleParenthesis=19]="UpperRomanDoubleParenthesis",n[n.UpperRomanDash=20]="UpperRomanDash",n[n.Max=20]="Max"},2368:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PasteType=void 0,(n=t.PasteType||(t.PasteType={}))[n.Normal=0]="Normal",n[n.AsPlainText=1]="AsPlainText",n[n.MergeFormat=2]="MergeFormat",n[n.AsImage=3]="AsImage"},2688:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PluginEventType=void 0,(n=t.PluginEventType||(t.PluginEventType={}))[n.KeyDown=0]="KeyDown",n[n.KeyPress=1]="KeyPress",n[n.KeyUp=2]="KeyUp",n[n.Input=3]="Input",n[n.CompositionEnd=4]="CompositionEnd",n[n.MouseDown=5]="MouseDown",n[n.MouseUp=6]="MouseUp",n[n.ContentChanged=7]="ContentChanged",n[n.ExtractContentWithDom=8]="ExtractContentWithDom",n[n.BeforeCutCopy=9]="BeforeCutCopy",n[n.BeforePaste=10]="BeforePaste",n[n.EditorReady=11]="EditorReady",n[n.BeforeDispose=12]="BeforeDispose",n[n.PendingFormatStateChanged=13]="PendingFormatStateChanged",n[n.Scroll=14]="Scroll",n[n.EntityOperation=15]="EntityOperation",n[n.ContextMenu=16]="ContextMenu",n[n.EnteredShadowEdit=17]="EnteredShadowEdit",n[n.LeavingShadowEdit=18]="LeavingShadowEdit",n[n.EditImage=19]="EditImage",n[n.BeforeSetContent=20]="BeforeSetContent",n[n.ZoomChanged=21]="ZoomChanged",n[n.SelectionChanged=22]="SelectionChanged",n[n.BeforeKeyboardEditing=23]="BeforeKeyboardEditing"},758:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PositionType=void 0,(n=t.PositionType||(t.PositionType={}))[n.Begin=0]="Begin",n[n.End=-1]="End",n[n.Before=-2]="Before",n[n.After=-3]="After"},8827:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.QueryScope=void 0,(n=t.QueryScope||(t.QueryScope={}))[n.Body=0]="Body",n[n.OnSelection=1]="OnSelection",n[n.InSelection=2]="InSelection"},2025:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.RegionType=void 0,(n=t.RegionType||(t.RegionType={}))[n.Table=0]="Table"},3852:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeTypes=void 0,(n=t.SelectionRangeTypes||(t.SelectionRangeTypes={}))[n.Normal=0]="Normal",n[n.TableSelection=1]="TableSelection",n[n.ImageSelection=2]="ImageSelection"},372:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TableBorderFormat=void 0,(n=t.TableBorderFormat||(t.TableBorderFormat={}))[n.DEFAULT=0]="DEFAULT",n[n.LIST_WITH_SIDE_BORDERS=1]="LIST_WITH_SIDE_BORDERS",n[n.NO_HEADER_BORDERS=2]="NO_HEADER_BORDERS",n[n.NO_SIDE_BORDERS=3]="NO_SIDE_BORDERS",n[n.FIRST_COLUMN_HEADER_EXTERNAL=4]="FIRST_COLUMN_HEADER_EXTERNAL",n[n.ESPECIAL_TYPE_1=5]="ESPECIAL_TYPE_1",n[n.ESPECIAL_TYPE_2=6]="ESPECIAL_TYPE_2",n[n.ESPECIAL_TYPE_3=7]="ESPECIAL_TYPE_3",n[n.CLEAR=8]="CLEAR"},6841:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TableOperation=void 0,(n=t.TableOperation||(t.TableOperation={}))[n.InsertAbove=0]="InsertAbove",n[n.InsertBelow=1]="InsertBelow",n[n.InsertLeft=2]="InsertLeft",n[n.InsertRight=3]="InsertRight",n[n.DeleteTable=4]="DeleteTable",n[n.DeleteColumn=5]="DeleteColumn",n[n.DeleteRow=6]="DeleteRow",n[n.MergeAbove=7]="MergeAbove",n[n.MergeBelow=8]="MergeBelow",n[n.MergeLeft=9]="MergeLeft",n[n.MergeRight=10]="MergeRight",n[n.MergeCells=11]="MergeCells",n[n.SplitHorizontally=12]="SplitHorizontally",n[n.SplitVertically=13]="SplitVertically",n[n.AlignCenter=14]="AlignCenter",n[n.AlignLeft=15]="AlignLeft",n[n.AlignRight=16]="AlignRight",n[n.AlignCellLeft=17]="AlignCellLeft",n[n.AlignCellCenter=18]="AlignCellCenter",n[n.AlignCellRight=19]="AlignCellRight",n[n.AlignCellTop=20]="AlignCellTop",n[n.AlignCellMiddle=21]="AlignCellMiddle",n[n.AlignCellBottom=22]="AlignCellBottom"},6395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasteType=t.DefinitionType=t.BulletListType=t.NumberingListType=t.SelectionRangeTypes=t.PluginEventType=t.TableBorderFormat=t.KnownPasteSourceType=t.KnownCreateElementDataIndex=t.ClearFormatMode=t.ImageEditOperation=t.TableOperation=t.RegionType=t.QueryScope=t.PositionType=t.ListType=t.Capitalization=t.Indentation=t.GetContentMode=t.FontSizeChange=t.ExperimentalFeatures=t.EntityOperation=t.EntityClasses=t.Direction=t.DelimiterClasses=t.DarkModeDatasetNames=t.ContentPosition=t.ColorTransformDirection=t.ChangeSource=t.Alignment=t.ContentType=t.ContentTypePrefix=t.NodeType=t.Keys=t.DocumentPosition=t.DocumentCommand=void 0;var r=n(6386);Object.defineProperty(t,"DocumentCommand",{enumerable:!0,get:function(){return r.DocumentCommand}});var o=n(565);Object.defineProperty(t,"DocumentPosition",{enumerable:!0,get:function(){return o.DocumentPosition}});var i=n(3692);Object.defineProperty(t,"Keys",{enumerable:!0,get:function(){return i.Keys}});var a=n(9883);Object.defineProperty(t,"NodeType",{enumerable:!0,get:function(){return a.NodeType}});var l=n(7157);Object.defineProperty(t,"ContentTypePrefix",{enumerable:!0,get:function(){return l.ContentTypePrefix}}),Object.defineProperty(t,"ContentType",{enumerable:!0,get:function(){return l.ContentType}});var s=n(4625);Object.defineProperty(t,"Alignment",{enumerable:!0,get:function(){return s.Alignment}});var u=n(8591);Object.defineProperty(t,"ChangeSource",{enumerable:!0,get:function(){return u.ChangeSource}});var d=n(4471);Object.defineProperty(t,"ColorTransformDirection",{enumerable:!0,get:function(){return d.ColorTransformDirection}});var c=n(8983);Object.defineProperty(t,"ContentPosition",{enumerable:!0,get:function(){return c.ContentPosition}});var f=n(4490);Object.defineProperty(t,"DarkModeDatasetNames",{enumerable:!0,get:function(){return f.DarkModeDatasetNames}});var p=n(2910);Object.defineProperty(t,"DelimiterClasses",{enumerable:!0,get:function(){return p.DelimiterClasses}});var v=n(265);Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return v.Direction}});var h=n(2372);Object.defineProperty(t,"EntityClasses",{enumerable:!0,get:function(){return h.EntityClasses}});var g=n(9468);Object.defineProperty(t,"EntityOperation",{enumerable:!0,get:function(){return g.EntityOperation}});var m=n(9084);Object.defineProperty(t,"ExperimentalFeatures",{enumerable:!0,get:function(){return m.ExperimentalFeatures}});var y=n(5397);Object.defineProperty(t,"FontSizeChange",{enumerable:!0,get:function(){return y.FontSizeChange}});var b=n(4051);Object.defineProperty(t,"GetContentMode",{enumerable:!0,get:function(){return b.GetContentMode}});var C=n(6039);Object.defineProperty(t,"Indentation",{enumerable:!0,get:function(){return C.Indentation}});var E=n(9003);Object.defineProperty(t,"Capitalization",{enumerable:!0,get:function(){return E.Capitalization}});var S=n(8185);Object.defineProperty(t,"ListType",{enumerable:!0,get:function(){return S.ListType}});var T=n(758);Object.defineProperty(t,"PositionType",{enumerable:!0,get:function(){return T.PositionType}});var P=n(8827);Object.defineProperty(t,"QueryScope",{enumerable:!0,get:function(){return P.QueryScope}});var w=n(2025);Object.defineProperty(t,"RegionType",{enumerable:!0,get:function(){return w.RegionType}});var _=n(6841);Object.defineProperty(t,"TableOperation",{enumerable:!0,get:function(){return _.TableOperation}});var O=n(2681);Object.defineProperty(t,"ImageEditOperation",{enumerable:!0,get:function(){return O.ImageEditOperation}});var M=n(2101);Object.defineProperty(t,"ClearFormatMode",{enumerable:!0,get:function(){return M.ClearFormatMode}});var D=n(9278);Object.defineProperty(t,"KnownCreateElementDataIndex",{enumerable:!0,get:function(){return D.KnownCreateElementDataIndex}});var L=n(2342);Object.defineProperty(t,"KnownPasteSourceType",{enumerable:!0,get:function(){return L.KnownPasteSourceType}});var R=n(372);Object.defineProperty(t,"TableBorderFormat",{enumerable:!0,get:function(){return R.TableBorderFormat}});var A=n(2688);Object.defineProperty(t,"PluginEventType",{enumerable:!0,get:function(){return A.PluginEventType}});var I=n(3852);Object.defineProperty(t,"SelectionRangeTypes",{enumerable:!0,get:function(){return I.SelectionRangeTypes}});var x=n(7821);Object.defineProperty(t,"NumberingListType",{enumerable:!0,get:function(){return x.NumberingListType}});var N=n(8982);Object.defineProperty(t,"BulletListType",{enumerable:!0,get:function(){return N.BulletListType}});var k=n(9097);Object.defineProperty(t,"DefinitionType",{enumerable:!0,get:function(){return k.DefinitionType}});var j=n(2368);Object.defineProperty(t,"PasteType",{enumerable:!0,get:function(){return j.PasteType}})},796:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);(0,r.__exportStar)(n(2091),t),(0,r.__exportStar)(n(3424),t),(0,r.__exportStar)(n(6395),t),(0,r.__exportStar)(n(796),t),(0,r.__exportStar)(n(7882),t),(0,r.__exportStar)(n(8568),t)},7882:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8568:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5115:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6630),o=n(1660),i=n(4739);t.default=function(e,t,n){var a=[new i.HyperLink,new i.Paste,new i.ContentEdit];t&&(a=a.concat(t));var l={plugins:a,initialContent:n,getDarkColor:o.getDarkColor,defaultFormat:{fontFamily:"Calibri,Arial,Helvetica,sans-serif",fontSize:"11pt",textColor:"#000000"}};return new r.Editor(e,l)}},8608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditor=void 0;var r=n(7582),o=n(5115);Object.defineProperty(t,"createEditor",{enumerable:!0,get:function(){return o.default}}),(0,r.__exportStar)(n(8075),t),(0,r.__exportStar)(n(1286),t),(0,r.__exportStar)(n(6344),t),(0,r.__exportStar)(n(6630),t),(0,r.__exportStar)(n(4548),t),(0,r.__exportStar)(n(4739),t),(0,r.__exportStar)(n(1660),t)},7582:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>w,__asyncGenerator:()=>P,__asyncValues:()=>_,__await:()=>T,__awaiter:()=>v,__classPrivateFieldGet:()=>R,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>A,__createBinding:()=>g,__decorate:()=>l,__esDecorate:()=>u,__exportStar:()=>m,__extends:()=>o,__generator:()=>h,__importDefault:()=>L,__importStar:()=>D,__makeTemplateObject:()=>O,__metadata:()=>p,__param:()=>s,__propKey:()=>c,__read:()=>b,__rest:()=>a,__runInitializers:()=>d,__setFunctionName:()=>f,__spread:()=>C,__spreadArray:()=>S,__spreadArrays:()=>E,__values:()=>y,default:()=>x});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,u="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?r.static?e:e.prototype:null,c=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var v={};for(var h in r)v[h]="access"===h?{}:r[h];for(var h in r.access)v.access[h]=r.access[h];v.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var g=(0,n[p])("accessor"===s?{get:c.get,set:c.set}:c[u],v);if("accessor"===s){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(l=a(g.get))&&(c.get=l),(l=a(g.set))&&(c.set=l),(l=a(g.init))&&o.unshift(l)}else(l=a(g))&&("field"===s?o.unshift(l):c[u]=l)}d&&Object.defineProperty(d,r.name,c),f=!0}function d(e,t,n){for(var r=arguments.length>2,o=0;o0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function C(){for(var e=[],t=0;t1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof T?Promise.resolve(n.value.v).then(s,u):d(i[0][2],n)}catch(e){d(i[0][3],e)}var n}function s(e){l("next",e)}function u(e){l("throw",e)}function d(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:T(e[r](t)),done:!1}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var M=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&g(t,e,n);return M(t,e),t}function L(e){return e&&e.__esModule?e:{default:e}}function R(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}const x={__extends:o,__assign:i,__rest:a,__decorate:l,__param:s,__metadata:p,__awaiter:v,__generator:h,__createBinding:g,__exportStar:m,__values:y,__read:b,__spread:C,__spreadArrays:E,__spreadArray:S,__await:T,__asyncGenerator:P,__asyncDelegator:w,__asyncValues:_,__makeTemplateObject:O,__importStar:D,__importDefault:L,__classPrivateFieldGet:R,__classPrivateFieldSet:A,__classPrivateFieldIn:I}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(8608);roosterjs=r})(); +var roosterjs;(()=>{var e={8168:(e,t,n)=>{var r=n(8874),o={};for(var i in r)r.hasOwnProperty(i)&&(o[r[i]]=i);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var l in a)if(a.hasOwnProperty(l)){if(!("channels"in a[l]))throw new Error("missing channels property: "+l);if(!("labels"in a[l]))throw new Error("missing channel labels property: "+l);if(a[l].labels.length!==a[l].channels)throw new Error("channel and label counts mismatch: "+l);var s=a[l].channels,u=a[l].labels;delete a[l].channels,delete a[l].labels,Object.defineProperty(a[l],"channels",{value:s}),Object.defineProperty(a[l],"labels",{value:u})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),l=Math.max(r,o,i),s=l-a;return l===a?t=0:r===l?t=(o-i)/s:o===l?t=2+(i-r)/s:i===l&&(t=4+(r-o)/s),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+l)/2,[t,100*(l===a?0:n<=.5?s/(l+a):s/(2-l-a)),100*n]},a.rgb.hsv=function(e){var t,n,r,o,i,a=e[0]/255,l=e[1]/255,s=e[2]/255,u=Math.max(a,l,s),d=u-Math.min(a,l,s),c=function(e){return(u-e)/6/d+.5};return 0===d?o=i=0:(i=d/u,t=c(a),n=c(l),r=c(s),a===u?o=r-n:l===u?o=1/3+t-r:s===u&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*u]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-o)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=o[e];if(t)return t;var n,i,a,l=1/0;for(var s in r)if(r.hasOwnProperty(s)){var u=(i=e,a=r[s],Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)+Math.pow(i[2]-a[2],2));u.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},a.hsl.rgb=function(e){var t,n,r,o,i,a=e[0]/360,l=e[1]/100,s=e[2]/100;if(0===l)return[i=255*s,i,i];t=2*s-(n=s<.5?s*(1+l):s+l-s*l),o=[0,0,0];for(var u=0;u<3;u++)(r=a+1/3*-(u-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[u]=255*i;return o},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=i<=1?i:2-i,[t,100*(0===r?2*o/(i+o):2*n/(r+n)),(r+n)/2*100]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),l=255*r*(1-n*i),s=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,s,a];case 1:return[l,r,a];case 2:return[a,r,s];case 3:return[a,l,r];case 4:return[s,a,r];case 5:return[r,a,l]}},a.hsv.hsl=function(e){var t,n,r,o=e[0],i=e[1]/100,a=e[2]/100,l=Math.max(a,.01);return r=(2-i)*a,n=i*l,[o,100*(n=(n/=(t=(2-i)*l)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,o,i,a,l,s=e[0]/360,u=e[1]/100,d=e[2]/100,c=u+d;switch(c>1&&(u/=c,d/=c),r=6*s-(t=Math.floor(6*s)),0!=(1&t)&&(r=1-r),o=u+r*((n=1-d)-u),t){default:case 6:case 0:i=n,a=o,l=u;break;case 1:i=o,a=n,l=u;break;case 2:i=u,a=n,l=o;break;case 3:i=u,a=o,l=n;break;case 4:i=o,a=u,l=n;break;case 5:i=n,a=u,l=o}return[255*i,255*a,255*l]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},a.xyz.rgb=function(e){var t,n,r,o=e[0]/100,i=e[1]/100,a=e[2]/100;return n=-.9689*o+1.8758*i+.0415*a,r=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),a=Math.pow(t,3),l=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=l>.008856?l:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],o=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(i+=60),i},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.max(Math.max(n,r),o),a=Math.min(Math.min(n,r),o),l=i-a;return t=l<=0?0:i===n?(r-o)/l%6:i===r?2+(o-n)/l:4+(n-r)/l+4,t/=6,[360*(t%=1),100*l,100*(l<1?a/(1-l):0)]},a.hsl.hcg=function(e){var t,n=e[1]/100,r=e[2]/100,o=0;return(t=r<.5?2*n*r:2*n*(1-r))<1&&(o=(r-.5*t)/(1-t)),[e[0],100*t,100*o]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,i=[0,0,0],a=t%1*6,l=a%1,s=1-l;switch(Math.floor(a)){case 0:i[0]=1,i[1]=l,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=l;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=l,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return o=(1-n)*r,[255*(n*i[0]+o),255*(n*i[1]+o),255*(n*i[2]+o)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},2085:(e,t,n)=>{var r=n(8168),o=n(4111),i={};Object.keys(r).forEach((function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:r[e].channels}),Object.defineProperty(i[e],"labels",{value:r[e].labels});var t=o(e);Object.keys(t).forEach((function(n){var r=t[n];i[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,o=0;o1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=i},4111:(e,t,n)=>{var r=n(8168);function o(e,t){return function(n){return t(e(n))}}function i(e,t){for(var n=[t[e].parent,e],i=r[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),i=o(r[t[a].parent][a],i),a=t[a].parent;return i.conversion=n,i}e.exports=function(e){for(var t=function(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,o=0;o{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},9818:(e,t,n)=>{var r=n(8874),o=n(6851),i={};for(var a in r)r.hasOwnProperty(a)&&(i[r[a]]=a);var l=e.exports={to:{},get:{}};function s(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}l.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=l.get.hsl(e),n="hsl";break;case"hwb":t=l.get.hwb(e),n="hwb";break;default:t=l.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},l.get.rgb=function(e){if(!e)return null;var t,n,o,i=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=t[2],t=t[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(t.slice(a,a+2),16)}o&&(i[3]=parseInt(o,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(o=(t=t[1])[3],n=0;n<3;n++)i[n]=parseInt(t[n]+t[n],16);o&&(i[3]=parseInt(o+o,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(n=0;n<3;n++)i[n]=parseInt(t[n+1],0);t[4]&&(i[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(t=e.match(/(\D+)/))?"transparent"===t[1]?[0,0,0,0]:(i=r[t[1]])?(i[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(i[3]=parseFloat(t[4]))}for(n=0;n<3;n++)i[n]=s(i[n],0,255);return i[3]=s(i[3],0,1),i},l.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])+360)%360,s(parseFloat(t[2]),0,100),s(parseFloat(t[3]),0,100),s(isNaN(n)?1:n,0,1)]}return null},l.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,s(parseFloat(t[2]),0,100),s(parseFloat(t[3]),0,100),s(isNaN(n)?1:n,0,1)]}return null},l.to.hex=function(){var e=o(arguments);return"#"+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):"")},l.to.rgb=function(){var e=o(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},l.to.rgb.percent=function(){var e=o(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},l.to.hsl=function(){var e=o(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},l.to.hwb=function(){var e=o(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},l.to.keyword=function(e){return i[e.slice(0,3)]}},6767:(e,t,n)=>{"use strict";var r=n(9818),o=n(2085),i=[].slice,a=["keyword","gray","hex"],l={};Object.keys(o).forEach((function(e){l[i.call(o[e].labels).sort().join("")]=e}));var s={};function u(e,t){if(!(this instanceof u))return new u(e,t);if(t&&t in a&&(t=null),t&&!(t in o))throw new Error("Unknown model: "+t);var n,d;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof u)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"==typeof e){var c=r.get(e);if(null===c)throw new Error("Unable to parse color from string: "+e);this.model=c.model,d=o[this.model].channels,this.color=c.value.slice(0,d),this.valpha="number"==typeof c.value[d]?c.value[d]:1}else if(e.length){this.model=t||"rgb",d=o[this.model].channels;var p=i.call(e,0,d);this.color=f(p,d),this.valpha="number"==typeof e[d]?e[d]:1}else if("number"==typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var v=Object.keys(e);"alpha"in e&&(v.splice(v.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var h=v.sort().join("");if(!(h in l))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=l[h];var g=o[this.model].labels,m=[];for(n=0;nn?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return u.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,i=2*o-1,a=n.alpha()-r.alpha(),l=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return u.rgb(l*n.red()+s*r.red(),l*n.green()+s*r.green(),l*n.blue()+s*r.blue(),n.alpha()*o+r.alpha()*(1-o))}},Object.keys(o).forEach((function(e){if(-1===a.indexOf(e)){var t=o[e].channels;u.prototype[e]=function(){if(this.model===e)return new u(this);if(arguments.length)return new u(arguments,e);var n,r="number"==typeof arguments[t]?t:this.valpha;return new u((n=o[this.model][e].raw(this.color),Array.isArray(n)?n:[n]).concat(r),e)},u[e]=function(n){return"number"==typeof n&&(n=f(i.call(arguments),t)),new u(n,e)}}})),e.exports=u},5171:e=>{e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},6851:(e,t,n)=>{"use strict";var r=n(5171),o=Array.prototype.concat,i=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDarkColor=void 0;var r=n(6134);Object.defineProperty(t,"getDarkColor",{enumerable:!0,get:function(){return r.default}})},6134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6767);t.default=function(e,t){void 0===t&&(t=21.247);try{var n=r(e||void 0),o=n.lab().array(),i=(100-o[0])*((100-t)/100)+t;e=r.lab(i,o[1],o[2]).rgb().alpha(n.alpha()).toString()}catch(e){}return e}},8106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9069),o=n(6344);t.default=function(e,t,n){function i(e,n){if(null===e)return e;switch(t){case"lowercase":return e.toLocaleLowerCase(n);case"uppercase":return e.toLocaleUpperCase(n);case"capitalize":for(var r=e.toLocaleLowerCase(n).split(" "),o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNewFontSize=t.FONT_SIZES=void 0;var r=n(9069),o=n(6344);t.FONT_SIZES=[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72];function i(e,t,n){e=1==t?Math.floor(e):Math.ceil(e);var r=n[n.length-1];if(e<=n[0])e=Math.max(e+t,1);else if(e>r||e==r&&1==t)e/=10,e=1==t?Math.floor(e):Math.ceil(e),e=Math.min(Math.max(10*(e+t),r),1e3);else if(1==t){for(var o=0;o=0;o--)if(e>n[o]){e=n[o];break}return e}t.default=function(e,n,a){void 0===a&&(a=t.FONT_SIZES);var l=0==n?1:-1;(0,r.default)(e,(function(e){var t=parseFloat((0,o.getComputedStyle)(e,"font-size")||e.style.fontSize);e.style.fontSize=i(t,l,a)+"pt";var n=(0,o.getComputedStyle)(e,"line-height");n&&"normal"!=n&&(e.style.lineHeight="normal")}),"changeFontSize")},t.getNewFontSize=i},4234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4040);t.default=function(e){(0,r.default)(e,1)}},4040:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4485),i=n(9703),a=n(9733),l=n(4077),s=n(6304),u=n(690),d=n(9339),c=n(8683),f=n(6823),p=n(926),v=n(3275),h=n(6344),g=["font","text-decoration","color","background"],m="B,I,U,STRONG,EM,SUB,SUP,STRIKE,FONT,CENTER,H1,H2,H3,H4,H5,H6,UL,OL,LI,SPAN,P,BLOCKQUOTE,CODE,S,PRE".split(","),y=["href","src","cellpadding","cellspacing"],b=["TD","TH","TR","TABLE","TBODY","THEAD"];function C(e){var t=(0,h.toArray)(e.childNodes).map(C).every((function(e){return e})),n=(0,h.isBlockElement)(e),o=(0,h.getTagOfNode)(e);return o&&(m.indexOf(o)>=0||t&&!(0,h.isVoidHtmlElement)(e)&&b.indexOf(o)<0?(n&&!t&&(0,h.wrap)(e),(0,h.unwrap)(e)):function(e){var t,n,o=(0,h.safeInstanceOf)(e,"HTMLTableCellElement"),i=(0,h.safeInstanceOf)(e,"HTMLTableElement");try{for(var a=(0,r.__values)((0,h.toArray)(e.attributes)),l=a.next();!l.done;l=a.next()){var s=l.value;o&&"style"==s.name?S(e):i&&"style"==s.name?T(e):y.indexOf(s.name.toLowerCase())<0&&0!=s.name.indexOf("data-")&&e.removeAttribute(s.name)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}(e)),n}function E(e,t){var n=(0,h.getStyles)(e),r={};return(0,h.getObjectKeys)(n).forEach((function(e){return t(e,n,r)})),(0,h.setStyles)(e,n),r}function S(e){return E(e,(function(e,t,n){e.indexOf("border")<0&&(n[e]=t[e],delete t[e])}))}function T(e){return E(e,(function(e,t,n){"border-collapse"!=e&&(n[e]=t[e],delete t[e])}))}function P(e){(0,l.default)(e,(function(){(0,i.default)(e,(function(t){var n=(0,h.getSelectedBlockElementsInRegion)(t),r=(0,h.collapseNodesInRegion)(t,n);if(e.contains(t.rootNode)){var o=S(t.rootNode);if((0,h.getObjectKeys)(o).length>0){var i=(0,h.wrap)((0,h.toArray)(t.rootNode.childNodes));(0,h.setStyles)(i,o)}}for(;r.length>0&&r[0].parentNode&&(0,h.isNodeInRegion)(t,r[0].parentNode);){var a=(0,h.splitBalancedNodeRange)(r);r=a?[a]:[]}r.forEach(C)})),w(e)}),"clearBlockFormat")}function w(e){var t=e.getDefaultFormat(),n=0===(0,h.getObjectKeys)(t).length;if(e.queryElements("[style]",2,(function(e){var t=(0,h.getTagOfNode)(e);-1==b.indexOf(t)?_(t,e,n):e.childNodes.forEach((function(e){e.childNodes.forEach((function(e){var t=(0,h.getTagOfNode)(e);(0,h.safeInstanceOf)(e,"HTMLElement")&&_(t,e,n)}))}))})),!n){if(t.fontFamily&&(0,u.default)(e,t.fontFamily),t.fontSize&&(0,d.default)(e,t.fontSize),t.textColor){var r=e.queryElements("a *, a",1),i=r.length>0?function(e){return-1==r.indexOf(e)}:void 0;t.textColors?(0,c.default)(e,t.textColors,i):(0,c.default)(e,t.textColor,i)}t.backgroundColor&&(t.backgroundColors?(0,s.default)(e,t.backgroundColors):(0,s.default)(e,t.backgroundColor)),t.bold?(0,f.default)(e):function(e,t){void 0===t&&(t="400"),(0,o.default)(e,"font-weight",(function(e){return e.style.fontWeight=t}),"setDefaultFontWeight")}(e),t.italic&&(0,p.default)(e),t.underline&&(0,v.default)(e)}}function _(e,t,n){-1==b.indexOf(e)&&(g.forEach((function(e){return t.style.removeProperty(e)})),n&&""===t.getAttribute("style")&&t.removeAttribute("style"))}function O(e,t){switch(void 0===t&&(t=0),t){case 0:!function(e){e.focus(),e.addUndoSnapshot((function(){return(0,a.default)(e,"removeFormat"),e.queryElements("[class]",1,(function(e){return e.removeAttribute("class")})),w(e),"clearInlineFormat"}),"Format")}(e);break;case 1:P(e);break;default:!function(e){var t=function(e){var t=e.getSelectionTraverser();return!!(null==t?void 0:t.currentBlockElement)&&!!(null==t?void 0:t.getNextBlockElement())}(e);if(!t){var n=e.getSelectionTraverser(),r=null==n?void 0:n.currentInlineElement,o=r instanceof h.PartialInlineElement||r instanceof h.NodeInlineElement&&!function(e,t){for(var n,r=e,o=function(){if(r.nextSibling||r.previousSibling){if((0,h.safeInstanceOf)(r,"HTMLLIElement"))return{value:!0};var e=!0;return null===(n=r.parentNode)||void 0===n||n.childNodes.forEach((function(t){var n;t!=r&&(null===(n=t.textContent)||void 0===n?void 0:n.length)&&(e=!1)})),{value:e}}r=r.parentNode};r&&t.contains(r.parentNode);){var i=o();if("object"==typeof i)return i.value}return!0}(r.getContainerNode(),e);if(o)return void O(e)}P(e)}(e)}}t.default=O},2149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=/^[a-zA-Z]+:/i,i=/^[\w.%+-]+@/i,a=/^ftp\./i;function l(e){return e.queryElements("a[href]",1)[0]}function s(e,t){t&&e.textContent!=t&&(e.textContent=t)}t.default=function(e,t,n,u,d){e.focus();var c=(function(e){var t=new r.HtmlSanitizer,n=document.createElement("a");return n.href=e||"",t.sanitize(n),n.getAttribute("href")}(t)||"").trim();if(c){var f=(0,r.matchLink)(c),p=f?f.normalizedUrl:function(e){if(!e)return e;var t="";return e.search(o)<0&&(t=0==e.search(i)?"mailto:":0==e.search(a)?"ftp://":"http://"),t+e}(c),v=f?f.originalUrl:c;e.addUndoSnapshot((function(){var t=e.getSelectionRangeEx(),o=null;if(0===t.type){var i=t.ranges[0];if(i&&i.collapsed)(o=l(e))?(o.href=p,s(o,u)):((o=e.getDocument().createElement("A")).textContent=u||v,o.href=p,e.insertNode(o));else{e.getDocument().execCommand("createLink",!1,p);for(var a=e.getSelectionTraverser(),c=null==a?void 0:a.getNextInlineElement(),f=[];c;)f.push(c.getContainerNode()),c=null==a?void 0:a.getNextInlineElement();f.forEach((function(t){return e.deleteNode(t)})),s(o=l(e),u)}}else 2===t.type&&((o=(0,r.wrap)(t.image,"A")).href=p);return n&&o&&(o.title=n),o&&function(e,t){t?e.target=t:!t&&e.getAttribute("target")&&e.removeAttribute("target")}(o,d),o}),"CreateLink")}}},3956:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementBasedFormatState=void 0;var r=n(7582),o=n(6344);function i(e,t){var n=(0,o.getTagOfNode)(e.getElementAtCursor("OL,UL",void 0,t)),r=e.getSelectionRange(),i=!1;if(r&&!r.collapsed){var l=e.getBlockElementAtNode(r.startContainer),s=e.getBlockElementAtNode(r.endContainer);i=!(!s||!l||s.equals(l))}var u=(0,o.getTagOfNode)(e.getElementAtCursor("H1,H2,H3,H4,H5,H6",void 0,t)),d=e.queryElements("table",1)[0],c=d?(0,o.getTableFormatInfo)(d):void 0,f=(null==d?void 0:d.rows[0])?(0,o.toArray)(d.rows[0].cells).every((function(e){return"TH"==(0,o.getTagOfNode)(e)})):void 0;return{isBullet:"UL"==n,isNumbering:"OL"==n,isMultilineSelection:i,headerLevel:u&&parseInt(u[1])||0,canUnlink:!!e.queryElements("a[href]",1)[0],canAddImageAltText:!!e.queryElements("img",1)[0],isBlockQuote:!!e.queryElements("blockquote",1)[0],isCodeInline:!!e.queryElements("code",1)[0],isCodeBlock:!!e.queryElements("pre>code",1)[0],isInTable:!!d,tableFormat:c||{},tableHasHeader:f,canMergeTableCell:a(e)}}t.getElementBasedFormatState=i,t.default=function(e,t){return(0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)({},e.getPendableFormatState(!1)),i(e,t)),e.getStyleBasedFormatState()),e.getUndoState()),{isDarkMode:e.isDarkMode(),zoomScale:e.getZoomScale()})};var a=function(e){var t=e.getSelectionRangeEx();if(t&&1===t.type&&t.coordinates){var n=t.coordinates,r=n.firstCell,o=n.lastCell;return r.x!==o.x||r.y!==o.y}return!1}},9540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),o=n(6344);t.default=function(e,t,n,i,a,l,s,u){var d,c=(0,o.wrap)(n,i?"div":"span");if(!i&&a&&(c.style.display="inline-block"),(0,o.commitEntity)(c,t,a),!e.contains(c)){var f=null,p=void 0;if("number"==typeof l)p=l;else if(l){f=e.getSelectionRange();var v=l.normalize().node,h=v&&e.getElementAtCursor((0,o.getEntitySelector)(),v);h&&(l=new o.Position(h,-3)),e.select(l),p=3}else e.focus(),p=3;var g=s&&e.getSelectedRegions(),m=g&&o.VListChain.createListChains(g);e.insertNode(c,{updateCursor:!1,insertOnNewLine:i,replaceSelection:!0,position:p,insertToRegionRoot:s}),m&&(0,r.default)(e,m),3==p&&(f?e.select(f):i||e.select(c,-3))}var y=(0,o.getEntityFromElement)(c);if(i){var b=(0,o.createElement)(1,e.getDocument());if(null===(d=c.parentNode)||void 0===d||d.insertBefore(b,c.nextSibling),b&&(0,o.applyFormat)(b,e.getDefaultFormat(),e.isDarkMode(),e.getDarkColorHandler()),u){var C=null==b?void 0:b.querySelector("br"),E=C&&new o.Position(C,-2);E&&e.select(E)}}else a&&e.isFeatureEnabled("InlineEntityReadOnlyDelimiters")&&((0,o.addDelimiters)(y.wrapper),y.wrapper.nextElementSibling&&e.select(new o.Position(y.wrapper.nextElementSibling,-3)));return e.triggerContentChangedEvent("InsertEntity",y),y}},7239:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);function i(e,t,n){(0,r.default)(e,(function(){var r=e.getDocument().createElement("img");r.src=t,n&&(0,o.getObjectKeys)(n).forEach((function(e){return r.setAttribute(e,n[e])})),e.insertNode(r)}),"insertImage")}t.default=function(e,t,n){"string"==typeof t?i(e,t,n):(0,o.readFile)(t,(function(t){t&&!e.isDisposed()&&i(e,t,n)}))}},2633:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e){e.focus(),(0,r.default)(e,(function(t,n){e.queryElements("a[href]",1,o.unwrap),t&&n&&e.select(t,n)}),"removeLink")}},7758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){var i,a,l;if(!t||!n)return!1;if(l="string"==typeof t?null!==(a=null==(o=null!==(i=o||e.getContentSearcherOfCursor())&&void 0!==i?i:void 0)?void 0:o.getRangeFromText(t,r))&&void 0!==a?a:null:t){var s=e.getSelectionRange();return(null==s?void 0:s.collapsed)&&l.endContainer==s.startContainer&&l.endOffset==s.startOffset&&(r=!0),e.insertNode(n,{position:5,updateCursor:r,replaceSelection:!0,insertOnNewLine:!1,range:l}),!0}return!1}},6827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077);t.default=function(e,t,n){t&&(0,r.default)(e,(function(){t.style.transform="rotate("+n+"deg)"}),"rotateElement")}},2391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(9733),i=n(4077),a=n(6577),l=n(6344);t.default=function(e,t){(0,i.default)(e,(function(){var n,i=e.getSelectionRangeEx(),s=i&&1===i.type,u=e.getElementAtCursor();s&&i.coordinates&&(0,l.isWholeTableSelected)(new l.VTable(i.table),i.coordinates)?function(e,t){var n=e.table;1==t?(n.style.marginLeft="auto",n.style.marginRight="auto"):2==t?(n.style.marginLeft="auto",n.style.marginRight=""):(n.style.marginLeft="",n.style.marginRight="auto")}(i,t):u&&(n=u,(0,l.findClosestElementAncestor)(n,void 0,"LI"))?function(e,t){(0,r.default)(e,(function(e,n,r){var o=(0,l.getSelectedBlockElementsInRegion)(e)[0].getStartNode(),i=(0,l.createVListFromRegion)(e,!0,o);n&&r&&(null==i||i.setAlignment(n,r,t))}),void 0,"alignList")}(e,t):function(e,t){var n="left",r="justifyLeft";1==t?(r="justifyCenter",n="center"):2==t&&(r="justifyRight",n="right"),(0,o.default)(e,r);var i=e.queryElements("[align]",1,(function(e){e.style.textAlign=n,(0,a.default)(e)}));if(0==i.length){var l=e.getElementAtCursor();l&&(0,a.default)(l)}}(e,t)}),"setAlignment")}},6304:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9069),o=n(6344);t.default=function(e,t){(0,r.default)(e,(function(n,r){(0,o.setColor)(n,r?"":t,!0,e.isDarkMode(),!1,e.getDarkColorHandler())}),"setBackgroundColor")}},9741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5483),o=n(4077);t.default=function(e,t){e.focus(),(0,o.default)(e,(function(n,o){(0,r.default)(e,(function(e){e.setAttribute("dir",0==t?"ltr":"rtl"),e.style.textAlign=0==t?"left":"right"})),n&&o&&e.select(n,o)}),"setDirection")}},690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4485);t.default=function(e,t){(0,r.default)(e,"font-family",(function(e,n){e.style.fontFamily=n?"":t}),"setFontName")}},9339:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4485),o=n(6344);t.default=function(e,t){(0,r.default)(e,"font-size",(function(e,n){e.style.fontSize=n?"":t;var r=(0,o.getComputedStyle)(e,"line-height");r&&"normal"!=r&&(e.style.lineHeight="normal")}),"setFontSize")}},620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077);t.default=function(e,t){e.focus(),(0,r.default)(e,(function(){e.queryElements("img",1,(function(e){return e.setAttribute("alt",t)}))}),"setImageAltText")}},1696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(6577),i=n(6344);function a(e,t){t.forEach((function(t){var n=t.collapseToSingleElement(),r=(0,i.findClosestElementAncestor)(n,e.rootNode,"blockquote");if(r){for(n==r&&(n=(0,i.wrap)((0,i.toArray)(n.childNodes)));n&&(0,i.isNodeInRegion)(e,n)&&"BLOCKQUOTE"!=(0,i.getTagOfNode)(n);)n=(0,i.splitBalancedNodeRange)(n);n&&(0,i.isNodeInRegion)(e,n)&&(0,i.unwrap)(n)}}))}function l(e,t){var n;return(null===(n=e.items[0])||void 0===n?void 0:n.getNode())==t&&e.getListItemIndex(t)==(e.getStart()||1)}function s(e,t,n){return 0==e||t.getElementAtCursor("blockquote",n)}t.default=function(e,t){var n=0==t?function(e,t){var n=(0,i.collapseNodesInRegion)(e,t);(0,i.wrap)(n,2);var r=[];n.forEach((function(e){return(0,o.default)(e,r)}))}:a;(0,r.default)(e,(function(r,o,a){for(var u=(0,i.getSelectedBlockElementsInRegion)(r,!0),d=[[]],c=0;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){void 0===n&&(n=1),(0,r.default)(e,(function(){e.focus();var r=e.getSelectedRegions();if(r[0]){var i=(0,o.createVListFromRegion)(r[0],!1,t);i&&(i.split(t,n),i.writeBack(e.isFeatureEnabled("ReuseAllAncestorListElements"),e.isFeatureEnabled("DisableListChain")))}}),"setOrderedListNumbering")}},8683:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4485),o=n(6344);t.default=function(e,t,n){(0,r.default)(e,"color",(function(r,i){n&&!n(r)||(0,o.setColor)(r,i?"":t,!1,e.isDarkMode(),!1,e.getDarkColorHandler())}),"setTextColor")}},5936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(949),o=n(6344),i=function(e){e.style.borderLeft="3px solid",e.style.borderColor="#C8C8C8",e.style.paddingLeft="10px",e.style.color="#666666"};t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,"blockquote");(t||i)(n)}),(function(){return 0==e.queryElements("blockquote",1,o.unwrap).length}),"toggleBlockQuote")}},6823:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"bold","toggleBold")}},2473:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5367);t.default=function(e,t,n){(0,r.default)(e,2,void 0,!1,void 0,t,n)}},8761:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(949),o=n(6344),i="code",a="pre>"+i;t.default=function(e,t){(0,r.default)(e,(function(e){var n=(0,o.wrap)(e,i),r=(0,o.wrap)(n,"pre");null==t||t(r)}),(function(){return 0==e.queryElements(a,1,(function(e){if(!e.previousSibling&&!e.nextSibling){var t=e.parentNode;(0,o.unwrap)(e),t&&(0,o.unwrap)(t)}})).length}),"toggleCodeBlock")}},8227:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t){t=Math.min(Math.max(Math.round(t),0),6),(0,r.default)(e,(function(){e.focus();var n=!1;if(e.queryElements("H1,H2,H3,H4,H5,H6",1,(function(t){n||(e.getDocument().execCommand("formatBlock",!1,"
    "),n=!0);var r=e.getDocument().createElement("div");(0,o.moveChildNodes)(r,t),e.replaceNode(t,r)})),t>0){for(var r=e.getSelectionTraverser(),i=null==r?void 0:r.currentBlockElement,a=new o.HtmlSanitizer({cssStyleCallbacks:{"font-size":function(){return!1}}});i;){var l=i.collapseToSingleElement();a.sanitize(l),i=null==r?void 0:r.getNextBlockElement()}e.getDocument().execCommand("formatBlock",!1,"")}}),"toggleHeader")}},926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"italic","toggleItalic")}},5485:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5367);t.default=function(e,t,n,o){(0,r.default)(e,1,t,void 0,n,void 0,o)}},2809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"strikeThrough","toggleStrikethrough")}},9752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"subscript","toggleSubscript")}},9282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"superscript","toggleSuperscript")}},3275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9733);t.default=function(e){(0,r.default)(e,"underline","toggleUnderline")}},4548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentCommitListChains=t.commitListChains=t.blockFormat=t.toggleListType=t.applyCellShading=t.toggleHeader=t.toggleUnderline=t.toggleSuperscript=t.toggleSubscript=t.toggleStrikethrough=t.toggleCodeBlock=t.toggleBlockQuote=t.setOrderedListNumbering=t.toggleNumbering=t.toggleItalic=t.toggleBullet=t.toggleBold=t.changeCapitalization=t.setIndentation=t.setImageAltText=t.setFontSize=t.setFontName=t.setDirection=t.setTextColor=t.setBackgroundColor=t.setAlignment=t.rotateElement=t.replaceWithNode=t.removeLink=t.formatTable=t.editTable=t.insertTable=t.insertImage=t.insertEntity=t.getElementBasedFormatState=t.getFormatState=t.createLink=t.clearFormat=t.clearBlockFormat=t.FONT_SIZES=t.changeFontSize=void 0;var r=n(5177);Object.defineProperty(t,"changeFontSize",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"FONT_SIZES",{enumerable:!0,get:function(){return r.FONT_SIZES}});var o=n(4234);Object.defineProperty(t,"clearBlockFormat",{enumerable:!0,get:function(){return o.default}});var i=n(4040);Object.defineProperty(t,"clearFormat",{enumerable:!0,get:function(){return i.default}});var a=n(2149);Object.defineProperty(t,"createLink",{enumerable:!0,get:function(){return a.default}});var l=n(3956);Object.defineProperty(t,"getFormatState",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"getElementBasedFormatState",{enumerable:!0,get:function(){return l.getElementBasedFormatState}});var s=n(9540);Object.defineProperty(t,"insertEntity",{enumerable:!0,get:function(){return s.default}});var u=n(7239);Object.defineProperty(t,"insertImage",{enumerable:!0,get:function(){return u.default}});var d=n(6725);Object.defineProperty(t,"insertTable",{enumerable:!0,get:function(){return d.default}});var c=n(5443);Object.defineProperty(t,"editTable",{enumerable:!0,get:function(){return c.default}});var f=n(3242);Object.defineProperty(t,"formatTable",{enumerable:!0,get:function(){return f.default}});var p=n(2633);Object.defineProperty(t,"removeLink",{enumerable:!0,get:function(){return p.default}});var v=n(7758);Object.defineProperty(t,"replaceWithNode",{enumerable:!0,get:function(){return v.default}});var h=n(6827);Object.defineProperty(t,"rotateElement",{enumerable:!0,get:function(){return h.default}});var g=n(2391);Object.defineProperty(t,"setAlignment",{enumerable:!0,get:function(){return g.default}});var m=n(6304);Object.defineProperty(t,"setBackgroundColor",{enumerable:!0,get:function(){return m.default}});var y=n(8683);Object.defineProperty(t,"setTextColor",{enumerable:!0,get:function(){return y.default}});var b=n(9741);Object.defineProperty(t,"setDirection",{enumerable:!0,get:function(){return b.default}});var C=n(690);Object.defineProperty(t,"setFontName",{enumerable:!0,get:function(){return C.default}});var E=n(9339);Object.defineProperty(t,"setFontSize",{enumerable:!0,get:function(){return E.default}});var S=n(620);Object.defineProperty(t,"setImageAltText",{enumerable:!0,get:function(){return S.default}});var T=n(1696);Object.defineProperty(t,"setIndentation",{enumerable:!0,get:function(){return T.default}});var P=n(8106);Object.defineProperty(t,"changeCapitalization",{enumerable:!0,get:function(){return P.default}});var w=n(6823);Object.defineProperty(t,"toggleBold",{enumerable:!0,get:function(){return w.default}});var _=n(2473);Object.defineProperty(t,"toggleBullet",{enumerable:!0,get:function(){return _.default}});var O=n(926);Object.defineProperty(t,"toggleItalic",{enumerable:!0,get:function(){return O.default}});var M=n(5485);Object.defineProperty(t,"toggleNumbering",{enumerable:!0,get:function(){return M.default}});var D=n(8073);Object.defineProperty(t,"setOrderedListNumbering",{enumerable:!0,get:function(){return D.default}});var L=n(5936);Object.defineProperty(t,"toggleBlockQuote",{enumerable:!0,get:function(){return L.default}});var R=n(8761);Object.defineProperty(t,"toggleCodeBlock",{enumerable:!0,get:function(){return R.default}});var A=n(2809);Object.defineProperty(t,"toggleStrikethrough",{enumerable:!0,get:function(){return A.default}});var I=n(9752);Object.defineProperty(t,"toggleSubscript",{enumerable:!0,get:function(){return I.default}});var x=n(9282);Object.defineProperty(t,"toggleSuperscript",{enumerable:!0,get:function(){return x.default}});var N=n(3275);Object.defineProperty(t,"toggleUnderline",{enumerable:!0,get:function(){return N.default}});var k=n(8227);Object.defineProperty(t,"toggleHeader",{enumerable:!0,get:function(){return k.default}});var j=n(7622);Object.defineProperty(t,"applyCellShading",{enumerable:!0,get:function(){return j.default}});var B=n(5367);Object.defineProperty(t,"toggleListType",{enumerable:!0,get:function(){return B.default}});var F=n(9703);Object.defineProperty(t,"blockFormat",{enumerable:!0,get:function(){return F.default}});var H=n(19);Object.defineProperty(t,"commitListChains",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,"experimentCommitListChains",{enumerable:!0,get:function(){return H.experimentCommitListChains}})},7622:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t){e.focus(),(0,r.default)(e,(function(){e.getSelectedRegions().forEach((function(n){(0,o.safeInstanceOf)(n.rootNode,"HTMLTableCellElement")&&((0,o.setColor)(n.rootNode,t,!0,e.isDarkMode(),!0,e.getDarkColorHandler()),(0,o.saveTableCellMetadata)(n.rootNode,{bgColorOverride:!0}))}))}),"applyCellShading")}},5443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);function i(e){return null==e}t.default=function(e,t){var n=e.getElementAtCursor("TD,TH");n&&(0,r.default)(e,(function(){var r=new o.VTable(n);if(function(e,t){var n,r=e.getSelectionRangeEx();r&&1===r.type&&(t.selection=null!==(n=r.coordinates)&&void 0!==n?n:null)}(e,r),r.edit(t),r.writeBack(!1,e.getDarkColorHandler()),e.transformToDarkColor(r.table),e.focus(),!i(r.row)&&!i(r.col)){var a=function(e,t,n){var r=t,o=n;switch(e){case 0:o=0;break;case 1:r+=1,o=0;break;case 2:r=0;break;case 3:r=0,o+=1}return{newRow:r,newCol:o}}(t,r.row,r.col),l=a.newCol,s=a.newRow,u=r.getCell(s,l).td;u&&e.select(u,0)}}),"editTable")}},3242:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){(n=n||e.getElementAtCursor("TABLE"))&&(0,r.default)(e,(function(r,i){if(n){var a=new o.VTable(n);a.applyFormat(t),a.writeBack(!1,e.getDarkColorHandler()),e.transformToDarkColor(a.table),e.focus(),r&&i&&e.select(r,i)}}),"formatTable")}},6725:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6304),i=n(6344);function a(e){return e<=4?"120px":e<=6?"100px":"70px"}t.default=function(e,t,n,l){var s=e.getDocument(),u=s.createElement("table");u.cellSpacing="0",u.cellPadding="1";for(var d=0;d{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){e.focus();var i=e.getSelectionRangeEx(),a=function(e,n){return e.isContentEditable&&t(e,n)};if(i&&i.areAllCollapsed){var l=i.ranges[0].startContainer;"SPAN"!=(0,o.getTagOfNode)(l)||l.firstChild&&("BR"!=(0,o.getTagOfNode)(l.firstChild)||l.firstChild.nextSibling)?(e.triggerPluginEvent(13,{formatState:{},formatCallback:t}),e.triggerContentChangedEvent("Format")):(e.addUndoSnapshot(),a(l))}else(0,r.default)(e,(function(){var t,n;i.ranges.forEach((function(r){var o=e.getSelectionTraverser(r);if(o)for(var i=o&&o.currentInlineElement;i;){var l=o.getNextInlineElement();i.applyStyle((function(e,r){a(e,r),t=t||e,n=e})),i=l}})),t&&n&&0==i.type&&e.select(t,-2,n,-3)}),n)}},4485:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9069),o=n(6344);t.default=function(e,t,n,i){var a=[];(0,r.default)(e,(function(t,r){n(t,r);var o=e.getElementAtCursor("LI",t);o&&-1===a.indexOf(o)&&a.push(o)}),i),function(e,t){e.forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLLIElement")&&(0,o.setListItemStyle)(e,t)}))}(a,[t])}},9703:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(19),o=n(4077),i=n(6344);t.default=function(e,t,n,a){e.focus();var l=e.getSelectionRangeEx();(0,o.default)(e,(function(o,a){if(!n||n()){var s=e.getSelectedRegions();if(s.length>0){var u=i.VListChain.createListChains(s,null==o?void 0:o.node);s.forEach((function(e){return t(e,o,a,u)})),(0,r.default)(e,u)}}0==l.type&&o&&a?e.select(o,a):e.select(l)}),a)}},949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(6344);t.default=function(e,t,n,i){(0,r.default)(e,(function(e){var n=(0,o.getSelectedBlockElementsInRegion)(e,!0),r=(0,o.collapseNodesInRegion)(e,n);if(r.length>0){if(1==r.length){var i=(0,o.getTagOfNode)(r[0]);"BR"==i?r=[(0,o.wrap)(r[0])]:"LI"!=i&&"TD"!=i||(r=(0,o.toArray)(r[0].childNodes))}for(;r[0]&&r[0].parentNode&&(0,o.isNodeInRegion)(e,r[0].parentNode)&&r.some((function(e){return"LI"==(0,o.getTagOfNode)(e)}));){var a=(0,o.splitBalancedNodeRange)(r);r=a?[a]:[]}t(r)}}),n,i)}},5483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);function o(e){var t=e.getStartNode();return t==e.getEndNode()&&3==t.nodeType&&["TR","TABLE"].indexOf((0,r.getTagOfNode)(t.parentNode))>=0}t.default=function(e,t){var n=e.getSelectionTraverser();if(n){for(var r=n.currentBlockElement,i=[];r;)o(r)||i.push(r),r=n.getNextBlockElement();i.forEach((function(e){var n=e.collapseToSingleElement();t(n)}))}}},19:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentCommitListChains=void 0;var r=n(6344);function o(e,t){if((null==t?void 0:t.length)>0){var n=e.getSelectionRange(),o=n&&r.Position.getStart(n),i=n&&r.Position.getEnd(n),a=e.isFeatureEnabled("ReuseAllAncestorListElements"),l=e.isFeatureEnabled("DisableListChain");t.forEach((function(e){return e.commit(a,l)})),o&&i&&e.select(o,i)}}t.default=o,t.experimentCommitListChains=o},9733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4077),o=n(6344);t.default=function(e,t,n){e.focus();var i=function(){return e.getDocument().execCommand(t,!1,void 0)},a=e.getSelectionRangeEx();if(a&&a.areAllCollapsed){e.addUndoSnapshot();var l=e.getPendableFormatState(!1);i();var s=(0,o.getObjectKeys)(o.PendableFormatCommandMap).filter((function(e){return o.PendableFormatCommandMap[e]==t}))[0];s&&(l[s]=!l[s],e.triggerPluginEvent(13,{formatState:l}))}else(0,r.default)(e,(function(){var t=0!=a.type;a.ranges.forEach((function(n){t&&e.select(n),i()})),t&&e.select(a)}),n)}},4077:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){e.addUndoSnapshot(t,"Format",void 0,n&&""!=n?{formatApiName:n}:void 0)}},6577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t){if((0,r.safeInstanceOf)(e,"HTMLElement")){var n=e.style.textAlign,o=(0,r.findClosestElementAncestor)(e,void 0,"blockquote");if(!o)return;var i=(a=e,"rtl"==(0,r.getComputedStyle)(a,"direction")||"rtl"==a.getAttribute("dir"));if(t){if(t.indexOf(o)>-1)return;t.push(o)}for(;o;)"center"==n?i?(o.style.removeProperty("marginInlineEnd"),o.style.marginInlineStart="auto"):(o.style.removeProperty("marginInlineStart"),o.style.marginInlineEnd="auto"):(o.style.removeProperty("marginInlineEnd"),o.style.removeProperty("marginInlineStart")),o=(0,r.findClosestElementAncestor)(o.parentElement,void 0,"blockquote")}var a}},5367:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9703),o=n(6344);t.default=function(e,t,n,i,a,l,s){void 0===n&&(n=0),void 0===i&&(i=!0),(0,r.default)(e,(function(r,s,u,d){var c,f,p=n>0&&d.filter((function(e){return e.canAppendAtCursor(n)}))[0],v=null===(f=(0,o.getBlockElementAtNode)(r.rootNode,null!==(c=null==s?void 0:s.node)&&void 0!==c?c:null))||void 0===f?void 0:f.collapseToSingleElement();if(v){var h=p&&u&&(null==s?void 0:s.equalTo(u))?p.createVListAtBlock(v,n):(0,o.createVListFromRegion)(r,1!==n&&i);h&&s&&u&&(h.changeListType(s,u,t),e.isFeatureEnabled("AutoFormatList")&&h.setListStyleType(a,l),h.writeBack(e.isFeatureEnabled("ReuseAllAncestorListElements"),e.isFeatureEnabled("DisableListChain")))}}),void 0,s||"toggleListType")}},9484:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addUndoSnapshot=void 0;var r=n(7582),o=n(6344);function i(e,t,n){var i;if(!e.lifecycle.shadowEditFragment){var a=e.api.getSelectionRangeEx(e),l=e.lifecycle.isDarkMode,s=function(e,t,n){switch(null==t?void 0:t.type){case 1:return(0,r.__assign)({type:1,tableId:t.table.id,isDarkMode:!!n},t.coordinates);case 2:return{type:2,imageId:t.image.id,isDarkMode:!!n};case 0:return(0,r.__assign)({type:0,isDarkMode:!!n,start:[],end:[]},(0,o.getSelectionPath)(e,t.ranges[0])||{})}}(e.contentDiv,a,l)||null;e.undo.snapshotsService.addSnapshot({html:e.contentDiv.innerHTML,metadata:s,knownColors:(null===(i=e.darkColorHandler)||void 0===i?void 0:i.getKnownColorsCopy())||[],entityStates:n},t),e.undo.hasNewContent=!1}}t.addUndoSnapshot=function(e,t,n,r,a){var l,s,u,d=e.undo,c=d.isNested;c||(d.isNested=!0,!e.undo.hasNewContent&&(null==a?void 0:a.getEntityState)&&t||i(e,r,null===(l=null==a?void 0:a.getEntityState)||void 0===l?void 0:l.call(a)));try{var f;t&&(u=t((f=e.api.getSelectionRange(e,!0))&&o.Position.getStart(f).normalize(),f&&o.Position.getEnd(f).normalize()),c||i(e,!1,null===(s=null==a?void 0:a.getEntityState)||void 0===s?void 0:s.call(a)))}finally{c||(d.isNested=!1)}if(t&&n){var p={eventType:7,source:n,data:u,additionalData:a};e.api.triggerEvent(e,p,!0)}r&&(f=e.api.getSelectionRange(e,!1))&&(e.undo.hasNewContent=!1,e.undo.autoCompletePosition=o.Position.getStart(f))}},9457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachDomEvent=void 0;var r=n(6344);t.attachDomEvent=function(e,t){var n=(0,r.getObjectKeys)(t||{}).map((function(n){var r,o,i=(r=t[n],o={pluginEventType:null,beforeDispatch:null},"number"==typeof r?o.pluginEventType=r:"function"==typeof r?o.beforeDispatch=r:"object"==typeof r&&(o=r),o),a=i.pluginEventType,l=i.beforeDispatch,s=n,u=function(t){l&&l(t),null!=a&&e.api.triggerEvent(e,{eventType:a,rawEvent:t},!1)};return e.contentDiv.addEventListener(s,u),function(){e.contentDiv.removeEventListener(s,u)}}));return function(){return n.forEach((function(e){return e()}))}}},6447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreApiMap=void 0;var r=n(9484),o=n(9457),i=n(3942),a=n(9943),l=n(3221),s=n(5049),u=n(5719),d=n(1467),c=n(2634),f=n(2628),p=n(5149),v=n(1844),h=n(6651),g=n(674),m=n(4830),y=n(7243),b=n(1036),C=n(1282),E=n(6233),S=n(5764),T=n(857);t.coreApiMap={attachDomEvent:o.attachDomEvent,addUndoSnapshot:r.addUndoSnapshot,createPasteFragment:i.createPasteFragment,ensureTypeInContainer:a.ensureTypeInContainer,focus:l.focus,getContent:s.getContent,getSelectionRange:d.getSelectionRange,getSelectionRangeEx:c.getSelectionRangeEx,getStyleBasedFormatState:f.getStyleBasedFormatState,getPendableFormatState:u.getPendableFormatState,hasFocus:p.hasFocus,insertNode:v.insertNode,restoreUndoSnapshot:h.restoreUndoSnapshot,select:g.select,selectRange:y.selectRange,setContent:C.setContent,switchShadowEdit:E.switchShadowEdit,transformColor:S.transformColor,triggerEvent:T.triggerEvent,selectTable:b.selectTable,selectImage:m.selectImage}},3942:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPasteFragment=void 0;var r=n(6344);t.createPasteFragment=function(e,t,n,o,i,a){if(void 0===a&&(a=!1),!t)return null;var l=function(e,t,n){var o=(0,r.createDefaultHtmlSanitizerOptions)();return o.cssStyleCallbacks["caret-color"]=function(){return!1},{eventType:10,clipboardData:t,fragment:e.contentDiv.ownerDocument.createDocumentFragment(),sanitizingOption:o,htmlBefore:"",htmlAfter:"",htmlAttributes:{},pasteType:n}}(e,t,(0,r.getPasteType)(o,i,a));return(0,r.createFragmentFromClipboardData)(e,t,n,o,i,a,l)}},9943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureTypeInContainer=void 0;var r=n(6344);t.ensureTypeInContainer=function(e,t,n){var o,i=(0,r.findClosestElementAncestor)(t.node,e.contentDiv,"table");i&&(o=i.querySelector("td,th"))&&(t=new r.Position(o,0)),t=t.normalize();var a,l=(0,r.getBlockElementAtNode)(e.contentDiv,t.node);if(l){if(a=l.collapseToSingleElement(),(0,r.isNodeEmpty)(a,!1,!0)){var s=a.ownerDocument.createElement("br");a.append(s)}var u=(0,r.isNodeEmpty)(a)||n&&function(e,t){return(0,r.safeInstanceOf)(e.target,"Node")&&e.target.contains(t)&&e.key===t.innerText}(n,a);a=a&&u?a:null}else a=(0,r.createElement)(1,e.contentDiv.ownerDocument),e.api.insertNode(e,a,{position:1,updateCursor:!1,replaceSelection:!1,insertOnNewLine:!1}),t=new r.Position(a,0);a&&e.lifecycle.defaultFormat&&(0,r.applyFormat)(a,e.lifecycle.defaultFormat,e.lifecycle.isDarkMode,e.darkColorHandler),n&&e.api.selectRange(e,(0,r.createRange)(new r.Position(t)))}},3221:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.focus=void 0;var r=n(6344);t.focus=function(e){if(!e.lifecycle.shadowEditFragment){if(!(e.api.hasFocus(e)&&e.api.getSelectionRange(e,!1)||e.domEvent.selectionRange&&e.api.selectRange(e,e.domEvent.selectionRange,!0))){var t=(0,r.getFirstLeafNode)(e.contentDiv)||e.contentDiv;e.api.selectRange(e,(0,r.createRange)(t,0),!0)}e.domEvent.selectionRange=null,e.api.hasFocus(e)||e.contentDiv.focus()}}},5049:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContent=void 0;var r=n(6344);t.getContent=function(e,t){var n,o,i="",a=0==t,l=2==t,s=e.lifecycle.shadowEditFragment||e.contentDiv;if(4==t)i=s.textContent;else if(3==t)i=(0,r.getTextContent)(s);else{var u=(n=s,(0,r.safeInstanceOf)(n,"DocumentFragment")?(o=n.ownerDocument.createElement("div")).appendChild(n.cloneNode(!0)):o=n.cloneNode(!0),o);u.normalize();var d=e.api.getSelectionRange(e,!0),c=l?e.lifecycle.shadowEditFragment?e.lifecycle.shadowEditSelectionPath:d?(0,r.getSelectionPath)(e.contentDiv,d):null:null,f=c&&(0,r.createRange)(u,c.start,c.end);e.api.transformColor(e,u,!1,null,1,!0,e.lifecycle.isDarkMode),a?(e.api.triggerEvent(e,{eventType:8,clonedRoot:u},!0),i=u.innerHTML):i=f?(0,r.getHtmlWithSelectionPath)(u,f):u.innerHTML}return null!=i?i:""}},5719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPendableFormatState=void 0;var r=n(6344);t.getPendableFormatState=function(e,t){var n,a=e.api.getSelectionRange(e,!0),l=e.pendingFormatState.pendableFormatState,s=null===(n=e.pendingFormatState.pendableFormatPosition)||void 0===n?void 0:n.normalize(),u=a&&r.Position.getStart(a).normalize(),d=u&&s&&a.collapsed&&u.equalTo(s);return a&&l&&d&&!t?l:u?function(e,t){for(var n=t.node,a={},l=[],s=function(){var e=(0,r.getTagOfNode)(n),t=1==n.nodeType&&n.style;e&&t&&(0,r.getObjectKeys)(o).forEach((function(n){l.indexOf(n)>=0||(a[n]=a[n]||o[n](e,t),i[n](t)&&l.push(n))})),n=n.parentNode};n&&(0,r.contains)(e.contentDiv,n);)s();return a}(e,u):{}};var o={isBold:function(e,t){return"B"==e||"STRONG"==e||"H1"==e||"H2"==e||"H3"==e||"H4"==e||"H5"==e||"H6"==e||parseInt(t.fontWeight)>=700||["bold","bolder"].indexOf(t.fontWeight)>=0},isUnderline:function(e,t){return"U"==e||t.textDecoration.indexOf("underline")>=0},isItalic:function(e,t){return"I"==e||"EM"==e||"italic"===t.fontStyle},isSubscript:function(e,t){return"SUB"==e||"sub"===t.verticalAlign},isSuperscript:function(e,t){return"SUP"==e||"super"===t.verticalAlign},isStrikeThrough:function(e,t){return"S"==e||"STRIKE"==e||t.textDecoration.indexOf("line-through")>=0}},i={isBold:function(e){return""!==e.fontWeight&&parseInt(e.fontWeight)<700||"normal"===e.fontWeight},isUnderline:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("underline")<0},isItalic:function(e){return""!==e.fontStyle&&"italic"!==e.fontStyle},isSubscript:function(e){return""!==e.verticalAlign&&"sub"!==e.verticalAlign},isSuperscript:function(e){return""!==e.verticalAlign&&"super"!==e.verticalAlign},isStrikeThrough:function(e){return""!==e.textDecoration&&e.textDecoration.indexOf("line-through")<0}}},1467:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRange=void 0;var r=n(6344);t.getSelectionRange=function(e,t){var n,o=null;if(e.lifecycle.shadowEditFragment)return e.lifecycle.shadowEditSelectionPath&&(0,r.createRange)(e.contentDiv,e.lifecycle.shadowEditSelectionPath.start,e.lifecycle.shadowEditSelectionPath.end);if(!t||e.api.hasFocus(e)){var i=null===(n=e.contentDiv.ownerDocument.defaultView)||void 0===n?void 0:n.getSelection();if(i&&i.rangeCount>0){var a=i.getRangeAt(0);(0,r.contains)(e.contentDiv,a)&&(o=a)}}return!o&&t&&(o=e.domEvent.selectionRange),o}},2634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionRangeEx=void 0;var r=n(6344);function o(e){return{type:0,ranges:e,areAllCollapsed:i(e)}}function i(e){return e.filter((function(e){return null==e?void 0:e.collapsed})).length==e.length}t.getSelectionRangeEx=function(e){var t,n,a;if(e.lifecycle.shadowEditFragment){var l,s=e.lifecycle,u=s.shadowEditTableSelectionPath,d=s.shadowEditSelectionPath,c=s.shadowEditImageSelectionPath;if(((null==u?void 0:u.length)||0)>0)return{type:1,ranges:l=e.lifecycle.shadowEditTableSelectionPath.map((function(t){return(0,r.createRange)(e.contentDiv,t.start,t.end)})),areAllCollapsed:i(l),table:(0,r.findClosestElementAncestor)(l[0].startContainer,e.contentDiv,"table"),coordinates:void 0};if(((null==c?void 0:c.length)||0)>0)return{type:2,ranges:l=e.lifecycle.shadowEditImageSelectionPath.map((function(t){return(0,r.createRange)(e.contentDiv,t.start,t.end)})),areAllCollapsed:i(l),image:(0,r.findClosestElementAncestor)(l[0].startContainer,e.contentDiv,"img"),imageId:void 0};var f=d&&(0,r.createRange)(e.contentDiv,d.start,d.end);return o(f?[f]:[])}if(e.api.hasFocus(e)){if(e.domEvent.tableSelectionRange)return e.domEvent.tableSelectionRange;if(e.domEvent.imageSelectionRange)return e.domEvent.imageSelectionRange;var p=null===(t=e.contentDiv.ownerDocument.defaultView)||void 0===t?void 0:t.getSelection();if(p&&p.rangeCount>0){var v=p.getRangeAt(0);if((0,r.contains)(e.contentDiv,v))return o([v])}}return null!==(a=null!==(n=e.domEvent.tableSelectionRange)&&void 0!==n?n:e.domEvent.imageSelectionRange)&&void 0!==a?a:o(e.domEvent.selectionRange?[e.domEvent.selectionRange]:[])}},2628:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleBasedFormatState=void 0;var r=n(6344);t.getStyleBasedFormatState=function(e,t){if(!t)return{};var n=[],o=e.pendingFormatState.pendableFormatSpan;o&&(n=[o.style.fontFamily,o.style.fontSize,o.style.color,o.style.backgroundColor]);for(var i,a,l=t?(0,r.getComputedStyles)(t,["font-family","font-size","color","background-color","line-height","margin-top","margin-bottom","text-align","direction"]):[],s=e.contentDiv,u=e.darkColorHandler;t&&(0,r.contains)(s,t,!0)&&(!i||!a);){if(1==t.nodeType){var d=t;i=i||d.style.getPropertyValue("color"),a=a||d.style.getPropertyValue("background-color")}t=t.parentNode}e.lifecycle.isDarkMode||t!=e.contentDiv||(i=i||l[2],a=a||l[3]);var c=u.parseColorValue(n[2]||i),f=u.parseColorValue(n[3]||a);return{fontName:n[0]||l[0],fontSize:n[1]||l[1],textColor:c.lightModeColor,backgroundColor:f.lightModeColor,textColors:c.darkModeColor?{lightModeColor:c.lightModeColor,darkModeColor:c.darkModeColor}:void 0,backgroundColors:f.darkModeColor?{lightModeColor:f.lightModeColor,darkModeColor:f.darkModeColor}:void 0,lineHeight:l[4],marginTop:l[5],marginBottom:l[6],textAlign:l[7],direction:l[8]}}},5149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasFocus=void 0;var r=n(6344);t.hasFocus=function(e){var t=e.contentDiv.ownerDocument.activeElement;return!(!t||!(0,r.contains)(e.contentDiv,t,!0))}},1844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertNode=void 0;var r=n(6344);t.insertNode=function(e,t,n){var o;n=n||{position:3,insertOnNewLine:!1,updateCursor:!0,replaceSelection:!0,insertToRegionRoot:!1};var i=e.contentDiv;return n.updateCursor&&e.api.focus(e),4==n.position?(null===(o=i.parentNode)||void 0===o||o.insertBefore(t,i.nextSibling),!0):(e.api.transformColor(e,t,!0,(function(){var o,a;if(n)switch(n.position){case 0:case 1:var l,s=0==n.position,u=(0,r.getFirstLastBlockElement)(i,s);if(u){var d=s?u.getStartNode():u.getEndNode();n.insertOnNewLine||3==d.nodeType||(0,r.isVoidHtmlElement)(d)?(0,r.safeInstanceOf)(t,"DocumentFragment")?(l=(0,r.toArray)(t.childNodes),null===(o=d.parentNode)||void 0===o||o.insertBefore(t,s?d:d.nextSibling)):l=null===(a=d.parentNode)||void 0===a?void 0:a.insertBefore(t,s?d:d.nextSibling):l=d.insertBefore(t,s?d.firstChild:null)}else l=i.appendChild(t);if(l&&n.insertOnNewLine){var c=Array.isArray(l)?l:[l];(0,r.isBlockElement)(c[0])&&(0,r.isBlockElement)(c[c.length-1])||(0,r.wrap)(c)}break;case 2:var f=i.appendChild(t);f&&n.insertOnNewLine&&!(0,r.isBlockElement)(f)&&(0,r.wrap)(f);break;case 5:case 3:var p=function(e,t){var n=e.api.getSelectionRange(e,!0),r=null;return 5==t.position?(r=n,n=t.range):n&&(r=n.cloneRange()),{range:n,rangeToRestore:r}}(e,n),v=p.range,h=p.rangeToRestore;if(!v)return;n.replaceSelection&&!v.collapsed&&v.deleteContents();var g=r.Position.getStart(v),m=void 0;g=n.insertOnNewLine&&n.insertToRegionRoot?function(e,t,n){var o=(0,r.getRegionsFromRange)(e.contentDiv,t,0)[0],i=n.node;if(o){if(3!=i.nodeType||n.isAtEnd||(i=(0,r.splitTextNode)(i,n.offset,!0)),i!=o.rootNode)for(;i&&i.parentNode!=o.rootNode;)(0,r.splitParentNode)(i,!1),i=i.parentNode;i&&(n=new r.Position(i,-3))}return n}(e,v,g):n.insertOnNewLine&&(m=(0,r.getBlockElementAtNode)(i,g.normalize().node))?function(e,t,n){var o=new r.Position(e.getEndNode(),-3);if((0,r.safeInstanceOf)(o.node,"HTMLTableRowElement")){var i=t.contentDiv.ownerDocument.createElement("div");(0,r.createRange)(n).insertNode(i),o=new r.Position(i,0)}return o}(m,e,g):(0,r.adjustInsertPosition)(i,t,g,v);var y=11==t.nodeType?t.lastChild:t;(v=(0,r.createRange)(g)).insertNode(t),n.updateCursor&&y&&(h=(0,r.createRange)(new r.Position(y,-3).normalize())),h&&e.api.selectRange(e,h)}}),0),!0)}},6651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreUndoSnapshot=void 0;var r=n(6344);t.restoreUndoSnapshot=function(e,t){var n,o;e.undo.hasNewContent&&t<0&&e.api.addUndoSnapshot(e,null,null,!1);var i=e.undo.snapshotsService.move(t);if(i&&null!=i.html)try{e.undo.isRestoring=!0,e.api.setContent(e,i.html,!0,null!==(n=i.metadata)&&void 0!==n?n:void 0);var a=e.darkColorHandler,l=e.lifecycle.isDarkMode;i.knownColors.forEach((function(e){a.registerColor(e.lightModeColor,l,e.darkModeColor)})),null===(o=i.entityStates)||void 0===o||o.forEach((function(t){var n=t.type,o=t.id,i=t.state,a=(0,r.queryElements)(e.contentDiv,(0,r.getEntitySelector)(n,o))[0],l=a&&(0,r.getEntityFromElement)(a);l&&e.api.triggerEvent(e,{eventType:15,operation:11,entity:l,state:i},!1)}))}finally{e.undo.isRestoring=!1}}},674:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.select=void 0;var r=n(6344);t.select=function(e,t,n,o,i){var a,l,s=null;if(function(e){var t=e;return t&&"object"==typeof t&&"number"==typeof t.type&&Array.isArray(t.ranges)}(t))s=t;else if((0,r.safeInstanceOf)(t,"HTMLTableElement")&&(null===(a=n)||a&&"object"==typeof a&&"object"==typeof a.firstCell&&"object"==typeof a.lastCell))s={type:1,ranges:[],areAllCollapsed:!1,table:t,coordinates:null!=n?n:void 0};else if((0,r.safeInstanceOf)(t,"HTMLImageElement")&&void 0===n)s={type:2,ranges:[],areAllCollapsed:!1,image:t};else{var u=t?(0,r.safeInstanceOf)(t,"Range")?t:(l=t)&&"object"==typeof l&&Array.isArray(l.start)&&Array.isArray(l.end)?(0,r.createRange)(e.contentDiv,t.start,t.end):function(e){var t=e;return t&&"object"==typeof t&&"object"==typeof t.node&&"number"==typeof t.offset}(t)||(0,r.safeInstanceOf)(t,"Node")?(0,r.createRange)(t,n,o,i):null:null;s=u?{type:0,ranges:[u],areAllCollapsed:u.collapsed}:null}if(s){switch(s.type){case 1:(0,r.contains)(e.contentDiv,s.table)&&(e.domEvent.imageSelectionRange=e.api.selectImage(e,null),e.domEvent.tableSelectionRange=e.api.selectTable(e,s.table,s.coordinates),s=e.domEvent.tableSelectionRange);break;case 2:(0,r.contains)(e.contentDiv,s.image)&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,null),e.domEvent.imageSelectionRange=e.api.selectImage(e,s.image),s=e.domEvent.imageSelectionRange);break;case 0:e.domEvent.tableSelectionRange=e.api.selectTable(e,null),e.domEvent.imageSelectionRange=e.api.selectImage(e,null),(0,r.contains)(e.contentDiv,s.ranges[0])?e.api.selectRange(e,s.ranges[0]):s=null}e.api.triggerEvent(e,{eventType:22,selectionRangeEx:s},!0)}else e.domEvent.tableSelectionRange=e.api.selectTable(e,null),e.domEvent.imageSelectionRange=e.api.selectImage(e,null);return!!s}},4830:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectImage=void 0;var r=n(3505),o=n(6344),i="imageStyle";t.selectImage=function(e,t){s(e);var n=null;if(t){var i=(0,o.createRange)(t);(0,r.default)(t,"imageSelected"),(0,r.default)(e.contentDiv,"contentDiv_"),e.api.selectRange(e,(0,o.createRange)(new o.Position(t,-3))),a(e,t),n={type:2,ranges:[i],image:t,areAllCollapsed:i.collapsed}}return n};var a=function(e,t){(0,o.removeImportantStyleRule)(t,["border","margin"]);var n=l(e,t.id);(0,o.setGlobalCssStyles)(e.contentDiv.ownerDocument,n,i+e.contentDiv.id)},l=function(e,t){return"#"+e.contentDiv.id+" #"+t+" {outline-style: auto!important;outline-color: "+(e.imageSelectionBorderColor||"#DB626C")+"!important;caret-color: transparent!important;}"},s=function(e){var t=e.contentDiv.ownerDocument;(0,o.removeGlobalCssStyle)(t,i+e.contentDiv.id)}},7243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectRange=void 0;var r=n(5149),o=n(6344);t.selectRange=function(e,t,n){return!(e.lifecycle.shadowEditSelectionPath||!(0,o.contains)(e.contentDiv,t)||((0,o.addRangeToSelection)(t,n),(0,r.hasFocus)(e)||(e.domEvent.selectionRange=t),t.collapsed&&function(e){var t=e.contentDiv,n=e.pendingFormatState,r=e.api.getSelectionRange;if(n.pendableFormatState){var i=t.ownerDocument,a=(0,o.getPendableFormatState)(i);(0,o.getObjectKeys)(o.PendableFormatCommandMap).forEach((function(e){var t;!!(null===(t=n.pendableFormatState)||void 0===t?void 0:t[e])!=a[e]&&i.execCommand(o.PendableFormatCommandMap[e],!1,void 0)}));var l=r(e,!0),s=l&&o.Position.getStart(l);s&&(n.pendableFormatPosition=s)}}(e),0))}},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectTable=void 0;var r=n(3505),o=n(6344),i="tableStyle";t.selectTable=function(e,t,n){var d;if(a(e),function(e){if(e){var t=e||{},n=t.firstCell,r=t.lastCell;if(n&&r){var o=function(e){return u(e.x)&&u(e.y)};return o(n)&&o(r)}}return!1}(n)&&t){(0,r.default)(t,"tableSelected"),(0,r.default)(e.contentDiv,"contentDiv_");var c=function(e,t,n){var r=function(e,t,n){var r,i=[],a=[],u=new o.VTable(e),d=(0,o.isWholeTableSelected)(u,t);d?function(e,t,n,r){var o=t.table,i=e+" #"+o.id;n.push(i,i+" *");var a=new Range;a.selectNode(o),r.push(a)}(n,u,a,i):function(e,t,n,r,i){var a,u=e.firstCell.y,d=e.firstCell.x,c=e.lastCell.y,f=e.lastCell.x,p=t.table,v=null,h=null,g=(0,o.toArray)(p.childNodes).filter((function(e){return["THEAD","TBODY","TFOOT"].indexOf((0,o.getTagOfNode)(e))>-1})),m=0,y=g.map((function(e){var t={el:(0,o.getTagOfNode)(e),start:m,end:e.childNodes.length+m};return m=t.end,t}));null===(a=t.cells)||void 0===a||a.forEach((function(e,t){var a=0;v=null,h=null;for(var g=y.filter((function(e){return e.start<=t&&e.end>t}))[0],m=g?">"+g.el+">":">",b=g&&t+1>=g.start?t+1-g.start:t+1,C=0;C=u&&t<=c&&C>=d&&C<=f)){s(E);var S=l(n,p.id,m,b,(0,o.getTagOfNode)(E),a),T=S+" *";r.push(S,T),v=v||p.querySelector(S),h=p.querySelector(S)}}if(v&&h){var P=new Range;P.setStartBefore(v),P.setEndAfter(h),i.push(P)}}))}(t,u,n,a,i);for(var c=[],f="";a.length>0;)((f+=(f.length>0?",":"")+a.shift()||"").length+((null===(r=a[0])||void 0===r?void 0:r.length)||0)>9e3||0==a.length)&&(c.push(f+" {background-color: rgb(198,198,198) !important; caret-color: transparent}"),f="");return{cssRules:c,ranges:i,isWholeTableSelected:d}}(t,n,"#"+e.contentDiv.id),a=r.cssRules,u=r.ranges,d=r.isWholeTableSelected;return a.forEach((function(t){return(0,o.setGlobalCssStyles)(e.contentDiv.ownerDocument,t,i+e.contentDiv.id)})),{ranges:u,isWholeTableSelected:d}}(e,t,n),f=c.ranges,p=c.isWholeTableSelected;if(!function(e,t){var n,r=t.firstCell;return!(e.rows.item(r.y)&&(null===(n=e.rows.item(r.y))||void 0===n?void 0:n.cells.item(r.x)))}(t,n)){var v=null===(d=t.rows.item(n.firstCell.y))||void 0===d?void 0:d.cells.item(n.firstCell.x);v&&e.api.selectRange(e,(0,o.createRange)(new o.Position(v,0)))}return{type:1,ranges:f,table:t,areAllCollapsed:f.filter((function(e){return null==e?void 0:e.collapsed})).length==f.length,coordinates:n,isWholeTableSelected:p}}return null};var a=function(e){var t=e.contentDiv.ownerDocument;(0,o.removeGlobalCssStyle)(t,i+e.contentDiv.id)};function l(e,t,n,r,o,i){return e+" #"+t+n+" tr:nth-child("+r+")>"+o+":nth-child("+i+")"}function s(e){e&&(0,o.removeImportantStyleRule)(e,["background-color","background"])}function u(e){return(!!e||0==e)&&e>-1}},1282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setContent=void 0;var r=n(6344);t.setContent=function(e,t,n,o){var i,a,l=!1;if(e.contentDiv.innerHTML!=t){e.api.triggerEvent(e,{eventType:20,newContent:t},!0);var s=e.entity.entityMap,u=t||"",d=(new DOMParser).parseFromString(null!==(a=null===(i=e.trustedHTMLHandler)||void 0===i?void 0:i.call(e,u))&&void 0!==a?a:u,"text/html").body;(0,r.restoreContentWithEntityPlaceholder)(d,e.contentDiv,s);var c=(0,r.extractContentMetadata)(e.contentDiv);(function(e,t){if(!e.lifecycle.shadowEditSelectionPath&&t)switch(e.domEvent.tableSelectionRange=null,e.domEvent.imageSelectionRange=null,e.domEvent.selectionRange=null,t.type){case 0:e.api.selectTable(e,null),e.api.selectImage(e,null);var n=(0,r.createRange)(e.contentDiv,t.start,t.end);e.api.selectRange(e,n);break;case 1:var o=(0,r.queryElements)(e.contentDiv,"#"+t.tableId)[0];o&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,o,t));break;case 2:var i=(0,r.queryElements)(e.contentDiv,"#"+t.imageId)[0];i&&(e.domEvent.imageSelectionRange=e.api.selectImage(e,i))}})(e,o=o||c),l=!0}var f=e.lifecycle.isDarkMode;(!o&&f||o&&!!o.isDarkMode!=!!f)&&(e.api.transformColor(e,e.contentDiv,!1,null,f?0:1,!0,null==o?void 0:o.isDarkMode),l=!0),n&&l&&e.api.triggerEvent(e,{eventType:7,source:"SetContent"},!1)}},6233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchShadowEdit=void 0;var r=n(6344);t.switchShadowEdit=function(e,t){var n=e.lifecycle,o=e.contentDiv,i=n.shadowEditEntities,a=n.shadowEditFragment,l=n.shadowEditSelectionPath,s=n.shadowEditTableSelectionPath,u=n.shadowEditImageSelectionPath,d=!!a,c=function(e,t){return(null==t?void 0:t.type)==e&&t.ranges.map((function(e){return(0,r.getSelectionPath)(o,e)})).map((function(e){return e}))||null};if(t){if(!d){var f=e.api.getSelectionRangeEx(e),p=e.api.getSelectionRange(e,!0);l=p&&(0,r.getSelectionPath)(o,p),s=c(1,f),u=c(2,f),i={},a=(0,r.moveContentWithEntityPlaceholders)(o,i),e.api.triggerEvent(e,{eventType:17,fragment:a,selectionPath:l},!1),n.shadowEditFragment=a,n.shadowEditSelectionPath=l,n.shadowEditTableSelectionPath=s,n.shadowEditImageSelectionPath=u,n.shadowEditEntities=i}n.shadowEditFragment&&(0,r.restoreContentWithEntityPlaceholder)(n.shadowEditFragment,o,n.shadowEditEntities,!0)}else if(n.shadowEditFragment=null,n.shadowEditSelectionPath=null,n.shadowEditEntities=null,d){if(e.api.triggerEvent(e,{eventType:18},!1),a&&(0,r.restoreContentWithEntityPlaceholder)(a,o,i),e.api.focus(e),l&&e.api.selectRange(e,(0,r.createRange)(o,l.start,l.end)),e.domEvent.imageSelectionRange){var v=e.domEvent.imageSelectionRange.image;e.contentDiv.querySelector("#"+v.id)&&e.api.selectImage(e,v)}if(e.domEvent.tableSelectionRange){var h=e.domEvent.tableSelectionRange,g=h.table,m=h.coordinates,y=g.id,b=e.contentDiv.querySelector("#"+y);g&&(e.domEvent.tableSelectionRange=e.api.selectTable(e,b,m))}}}},5764:(e,t)=>{"use strict";function n(e,t,o){o&&r(e)&&t(e);for(var i=e.firstChild;i;i=i.nextSibling)r(i)&&t(i),n(i,t)}function r(e){var t=e;return e.nodeType==Node.ELEMENT_NODE&&!!t.style}Object.defineProperty(t,"__esModule",{value:!0}),t.transformColor=void 0,t.transformColor=function(e,t,r,o,i,a,l){void 0===l&&(l=!1);var s=e.darkColorHandler,u=e.lifecycle.onExternalContentTransform,d=0==i;t&&(a||e.lifecycle.isDarkMode)&&n(t,u?function(e){u(e,l,d,s)}:function(e){s.transformElementColor(e,l,d)},r),null==o||o()}},857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerEvent=void 0;var n=[11,12,8,21];t.triggerEvent=function(e,t,r){e.lifecycle.shadowEditFragment&&!(n.indexOf(t.eventType)>=0)||!r&&e.plugins.some((function(e){return function(e,t){var n;return!(!t.onPluginEvent||!(null===(n=t.willHandleEventExclusively)||void 0===n?void 0:n.call(t,e)))&&(t.onPluginEvent(e),!0)}(t,e)}))||e.plugins.forEach((function(e){e.onPluginEvent&&e.onPluginEvent(t)}))}},3505:(e,t)=>{"use strict";function n(e,t,n){for(var r=0,o=function(){return n.getElementById(t+r)},i=o();i;)r++,i=o();e.id=t+r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=e.ownerDocument;e.id?r.querySelectorAll("#"+e.id).length>1&&(e.removeAttribute("id"),n(e,t,r)):n(e,t,r)}},4142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2544),o=n(4082),i=n(6344),a=function(){function e(e){var t=this;this.editor=null,this.disposer=null,this.onPaste=function(e){var n,r=null;if(t.editor){var o=t.editor;(0,i.extractClipboardEvent)(e,(function(e){o&&!o.isDisposed()&&o.paste(e)}),{allowedCustomPasteType:t.state.allowedCustomPasteType,getTempDiv:function(){var e;return r=null!==(e=o.getSelectionRange())&&void 0!==e?e:null,t.getTempDiv(o)},removeTempDiv:function(e){r&&t.cleanUpAndRestoreSelection(e,r,!1)}},null!==(n=t.editor.getSelectionRange())&&void 0!==n?n:void 0)}},this.state={allowedCustomPasteType:e.allowedCustomPasteType||[]}}return e.prototype.getName=function(){return"CopyPaste"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=this.editor.addDomEventHandler({paste:function(e){return t.onPaste(e)},copy:function(e){return t.onCutCopy(e,!1)},cut:function(e){return t.onCutCopy(e,!0)}})},e.prototype.dispose=function(){this.disposer&&this.disposer(),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onCutCopy=function(e,t){var n=this;if(this.editor){var r=this.editor.getSelectionRangeEx();if(r&&!r.areAllCollapsed){var o=this.editor.getContent(2),a=this.getTempDiv(this.editor,!0),l=(0,i.setHtmlWithMetadata)(a,o,this.editor.getTrustedHTMLHandler()),s=null;if(1===r.type&&r.coordinates){var u=a.querySelector("#"+r.table.id);s=this.createTableRange(u,r.coordinates),t&&this.deleteTableContent(this.editor,r.table,r.coordinates)}else if(2===r.type){var d=a.querySelector("#"+r.image.id);d&&(s=(0,i.createRange)(d),t&&this.deleteImage(this.editor,r.image.id))}else s=0===(null==l?void 0:l.type)?(0,i.createRange)(a,l.start,l.end):null;s&&(this.editor.triggerPluginEvent(9,{clonedRoot:a,range:s,rawEvent:e,isCut:t}).range&&(0,i.addRangeToSelection)(s),this.editor.runAsync((function(e){n.cleanUpAndRestoreSelection(a,r,!t),t&&e.addUndoSnapshot((function(){var t=e.deleteSelectedContent();e.focus(),e.select(t)}),"Cut")})))}}},e.prototype.getTempDiv=function(e,t){var n=e.getCustomData("CopyPasteTempDiv",(function(){var t=(0,i.createElement)(3,e.getDocument());return e.getDocument().body.appendChild(t),t}),(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)}));return t&&(n.style.backgroundColor="white",n.style.color="black"),n.style.display="",n.focus(),n},e.prototype.cleanUpAndRestoreSelection=function(e,t,n){var r,o,a;if((null===(r=t)||void 0===r?void 0:r.type)||0==t.type){var l=t;switch(l.type){case 1:case 2:null===(o=this.editor)||void 0===o||o.select(l);break;case 0:var s=null===(a=l.ranges)||void 0===a?void 0:a[0];this.restoreRange(s,n)}}else this.restoreRange(t,n);e.style.backgroundColor="",e.style.color="",e.style.display="none",(0,i.moveChildNodes)(e)},e.prototype.restoreRange=function(e,t){e&&this.editor&&(t&&i.Browser.isAndroid&&e.collapse(),this.editor.select(e))},e.prototype.createTableRange=function(e,t){var n=new i.VTable(e);return n.selection=t,(0,o.removeCellsOutsideSelection)(n),n.writeBack(),(0,i.createRange)(n.table)},e.prototype.deleteTableContent=function(e,t,n){var o=new i.VTable(t);o.selection=n,(0,r.forEachSelectedCell)(o,(function(t){(null==t?void 0:t.td)&&(t.td.innerHTML=e.getTrustedHTMLHandler()("
    "))}));var a=(0,i.isWholeTableSelected)(o,n),l=t.rows.length-1===n.lastCell.y&&0===n.firstCell.y;a?(o.edit(4),o.writeBack()):l&&(o.edit(5),o.writeBack()),(a||l)&&(t.style.removeProperty("width"),t.style.removeProperty("height"))},e.prototype.deleteImage=function(e,t){e.queryElements("#"+t,(function(t){e.deleteNode(t)}))},e}();t.default=a},7039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e,t){var n,o=this;this.editor=null,this.disposer=null,this.onDrop=function(){var e;null===(e=o.editor)||void 0===e||e.runAsync((function(e){e.addUndoSnapshot((function(){}),"Drop")}))},this.onFocus=function(){var e,t,n,r=o.state.tableSelectionRange||{},i=r.table,a=r.coordinates,l=(o.state.imageSelectionRange||{}).image;i&&a?null===(e=o.editor)||void 0===e||e.select(i,a):l?null===(t=o.editor)||void 0===t||t.select(l):o.state.selectionRange&&(null===(n=o.editor)||void 0===n||n.select(o.state.selectionRange)),o.state.selectionRange=null},this.onKeyDownDocument=function(e){9!=e.which||e.defaultPrevented||o.cacheSelection()},this.onMouseDownDocument=function(e){!o.editor||o.state.selectionRange||o.editor.contains(e.target)||o.cacheSelection()},this.cacheSelection=function(){!o.state.selectionRange&&o.editor&&(o.state.selectionRange=o.editor.getSelectionRange(!1))},this.onScroll=function(e){var t;null===(t=o.editor)||void 0===t||t.triggerPluginEvent(14,{rawEvent:e,scrollContainer:o.state.scrollContainer})},this.onKeyboardEvent=function(e){((0,r.isCharacterValue)(e)||e.which>=33&&e.which<=40)&&e.stopPropagation()},this.onInputEvent=function(e){e.stopPropagation()},this.onContextMenuEvent=function(e){var t,n,i=[],a=null===(t=o.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(),l=null==a?void 0:a.getInlineElementBefore(),s=e.target;2!=e.button&&l&&(s=l.getContainerNode()),o.state.contextMenuProviders.forEach((function(e){var t,n=null!==(t=e.getContextMenuItems(s))&&void 0!==t?t:[];(null==n?void 0:n.length)>0&&(i.length>0&&i.push(null),(0,r.arrayPush)(i,n))})),null===(n=o.editor)||void 0===n||n.triggerPluginEvent(16,{rawEvent:e,items:i})},this.state={isInIME:!1,scrollContainer:e.scrollContainer||t,selectionRange:null,stopPrintableKeyboardEventPropagation:!e.allowKeyboardEventPropagation,contextMenuProviders:(null===(n=e.plugins)||void 0===n?void 0:n.filter(i))||[],tableSelectionRange:null,imageSelectionRange:null}}return e.prototype.getName=function(){return"DOMEvent"},e.prototype.initialize=function(e){var t,n,o,i,a=this;this.editor=e;var l=this.editor.getDocument(),s=((t={keypress:this.getEventHandler(1),keydown:this.getEventHandler(0),keyup:this.getEventHandler(2),mousedown:5,contextmenu:this.onContextMenuEvent,compositionstart:function(){return a.state.isInIME=!0},compositionend:function(t){a.state.isInIME=!1,e.triggerPluginEvent(4,{rawEvent:t})},drop:this.onDrop,focus:this.onFocus})[r.Browser.isIE?"textinput":"input"]=this.getEventHandler(3),t);r.Browser.isSafari?(l.addEventListener("mousedown",this.onMouseDownDocument,!0),l.addEventListener("keydown",this.onKeyDownDocument),null===(n=l.defaultView)||void 0===n||n.addEventListener("blur",this.cacheSelection)):r.Browser.isIEOrEdge?s.beforedeactivate=this.cacheSelection:s.blur=this.cacheSelection,this.disposer=e.addDomEventHandler(s),this.state.scrollContainer.addEventListener("scroll",this.onScroll),null===(o=l.defaultView)||void 0===o||o.addEventListener("scroll",this.onScroll),null===(i=l.defaultView)||void 0===i||i.addEventListener("resize",this.onScroll)},e.prototype.dispose=function(){var e,t,n,o,i,a=null===(e=this.editor)||void 0===e?void 0:e.getDocument();a&&r.Browser.isSafari&&(a.removeEventListener("mousedown",this.onMouseDownDocument,!0),a.removeEventListener("keydown",this.onKeyDownDocument),null===(t=a.defaultView)||void 0===t||t.removeEventListener("blur",this.cacheSelection)),null===(n=null==a?void 0:a.defaultView)||void 0===n||n.removeEventListener("resize",this.onScroll),null===(o=null==a?void 0:a.defaultView)||void 0===o||o.removeEventListener("scroll",this.onScroll),this.state.scrollContainer.removeEventListener("scroll",this.onScroll),null===(i=this.disposer)||void 0===i||i.call(this),this.disposer=null,this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.getEventHandler=function(e){var t=this;return this.state.stopPrintableKeyboardEventPropagation?{pluginEventType:e,beforeDispatch:function(n){return 3==e?t.onInputEvent(n):t.onKeyboardEvent(n)}}:e},e}();function i(e){var t;return!!(null===(t=e)||void 0===t?void 0:t.getContextMenuItems)}t.default=o},6262:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null,this.state={features:{}}}return e.prototype.getName=function(){return"Edit"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){var t,n=!1,o=null,i=!1;if(0==e.eventType){var a=e.rawEvent,l=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n=(i=(0,r.isCtrlOrMetaPressed)(a))||a.altKey,o=this.state.features[a.which]||l&&!l.collapsed&&this.state.features[258]}else 7==e.eventType&&(o=this.state.features[257]);for(var s=0;o&&s<(null==o?void 0:o.length);s++){var u=o[s];if((u.allowFunctionKeys||!n)&&this.editor&&u.shouldHandleEvent(e,this.editor,i)){u.handleEvent(e,this.editor);break}}},e}();t.default=o},3346:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4195),o=n(6344),i=/_(\d{1,8})$/,a=["^_Entity$","^_EId_","^_EType_","^_EReadonly_"],l=[6,7,4,5],s=function(){function e(){var e=this;this.editor=null,this.disposer=null,this.handleCutEvent=function(t){var n,r=null===(n=e.editor)||void 0===n?void 0:n.getSelectionRange();r&&!r.collapsed&&e.checkRemoveEntityForRange(t)},this.onDragStart=function(t){var n,r,i=t,a=null===(n=e.editor)||void 0===n?void 0:n.getElementAtCursor((0,o.getEntitySelector)(),i.target);a&&(null===(r=(0,o.getEntityFromElement)(a))||void 0===r?void 0:r.isReadonly)&&i.preventDefault()},this.state={entityMap:{}}}return e.prototype.getName=function(){return"Entity"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler("dragstart",this.onDragStart)},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null,this.state.entityMap={}},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 6:this.handleMouseUpEvent(e);break;case 0:this.handleKeyDownEvent(e.rawEvent);break;case 9:e.isCut&&this.handleCutEvent(e.rawEvent);break;case 10:this.handleBeforePasteEvent(e.sanitizingOption);break;case 7:this.handleContentChangedEvent(e);break;case 11:this.handleContentChangedEvent();break;case 8:this.handleExtractContentWithDomEvent(e.clonedRoot);break;case 16:this.handleContextMenuEvent(e.rawEvent);break;case 15:this.handleEntityOperationEvent(e)}(null===(t=this.editor)||void 0===t?void 0:t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))&&(0,r.inlineEntityOnPluginEvent)(e,this.editor)},e.prototype.handleContextMenuEvent=function(e){var t,n=e.target,r=n&&(null===(t=this.editor)||void 0===t?void 0:t.getElementAtCursor((0,o.getEntitySelector)(),n));r&&(e.preventDefault(),this.triggerEvent(r,2,e))},e.prototype.handleMouseUpEvent=function(e){var t,n=e.rawEvent,r=e.isClicking,i=n.target;this.editor&&r&&i&&(t=this.editor.getElementAtCursor((0,o.getEntitySelector)(),i))&&(this.triggerEvent(t,1,n),u(this.editor))},e.prototype.handleKeyDownEvent=function(e){var t;if((0,o.isCharacterValue)(e)||8==e.which||46==e.which||13==e.which){var n=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n&&!n.collapsed&&this.checkRemoveEntityForRange(e)}},e.prototype.handleBeforePasteEvent=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n&&!n.collapsed&&this.checkRemoveEntityForRange(null),e.additionalAllowedCssClasses&&(0,o.arrayPush)(e.additionalAllowedCssClasses,a)},e.prototype.handleContentChangedEvent=function(e){var t,n=this,i=!1;(0,o.getObjectKeys)(this.state.entityMap).forEach((function(e){var t=n.state.entityMap[e],r=t.element;!n.editor||t.isDeleted||n.editor.contains(r)||(t.isDeleted=!0,n.triggerEvent(r,6),i||r.isContentEditable||(0,o.isBlockElement)(r)||(i=!0))})),("InsertEntity"==(null==e?void 0:e.source)&&e.data?[e.data]:this.getExistingEntities().filter((function(e){var t=n.state.entityMap[e.id];return!t||t.element!=e.wrapper||t.isDeleted}))).forEach((function(e){var t=e.wrapper,r=e.type,i=e.id,a=e.isReadonly;e.id=n.ensureUniqueId(r,i,t),(0,o.commitEntity)(t,r,a,e.id),n.handleNewEntity(e)})),i&&(null===(t=this.editor)||void 0===t?void 0:t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))&&(0,r.normalizeDelimitersInEditor)(this.editor)},e.prototype.handleEntityOperationEvent=function(e){if(this.editor&&l.indexOf(e.operation)>=0){var t=this.state.entityMap[e.entity.id];t&&(t.isDeleted=!0)}},e.prototype.handleExtractContentWithDomEvent=function(e){var t=this;(0,o.toArray)(e.querySelectorAll((0,o.getEntitySelector)())).forEach((function(e){e.removeAttribute("contentEditable"),t.triggerEvent(e,8)}))},e.prototype.checkRemoveEntityForRange=function(e){var t,n=this,r=[],i=(0,o.getEntitySelector)();if(null===(t=this.editor)||void 0===t||t.queryElements(i,1,(function(t){t.isContentEditable?r.push(t):n.triggerEvent(t,6,e)})),this.editor&&r.length>0){var a=this.editor.queryElements(i,2);r.forEach((function(t){var r=a.indexOf(t)>=0;n.triggerEvent(t,r?6:7,e)}))}},e.prototype.triggerEvent=function(e,t,n){var r,i=e&&(0,o.getEntityFromElement)(e);return i?null===(r=this.editor)||void 0===r?void 0:r.triggerPluginEvent(15,{operation:t,rawEvent:n,entity:i}):null},e.prototype.handleNewEntity=function(e){var t=e.wrapper,n=this.triggerEvent(t,0),r={element:e.wrapper};(null==n?void 0:n.shouldPersist)&&(r.canPersist=!0),this.state.entityMap[e.id]=r},e.prototype.getExistingEntities=function(){var e,t;return null!==(t=null===(e=this.editor)||void 0===e?void 0:e.queryElements((0,o.getEntitySelector)()).map(o.getEntityFromElement).filter((function(e){return!!e})))&&void 0!==t?t:[]},e.prototype.ensureUniqueId=function(e,t,n){for(var r=i.exec(t),o=(r?t.substr(0,t.length-r[0].length):t)||e,a="",l=r&&parseInt(r[1])||0;;l++){a=l>0?o+"_"+l:o;var s=this.state.entityMap[a];if(!s||s.element==n)break}return a},e}();t.default=s;var u=o.Browser.isIE?function(e){e.runAsync((function(e){var t=e.getCustomData("ENTITY_IE_FOCUS_BUTTON",(function(){var t=(0,o.createElement)({tag:"button",style:"overflow:hidden;position:fixed;width:0;height:0;top:-1000px"},e.getDocument());return t.onblur=function(){t.style.display="none"},e.insertNode(t,{position:4}),t}));t.style.display="",(0,o.addRangeToSelection)((0,o.createRange)(t,0))}))}:function(){}},6194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null}return e.prototype.getName=function(){return"ImageSelection"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){var e;null===(e=this.editor)||void 0===e||e.select(null),this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(this.editor)switch(e.eventType){case 17:case 18:var n=this.editor.getSelectionRangeEx();2==n.type&&this.editor.select(n.image);break;case 6:var o=e.rawEvent.target;(0,r.safeInstanceOf)(o,"HTMLImageElement")&&0===e.rawEvent.button&&this.editor.select(o);break;case 5:var i=e.rawEvent.target,a=this.editor.getSelectionRangeEx();a&&2===a.type&&a.image!==i&&this.editor.select(null);break;case 2:var l=e.rawEvent.key,s=this.editor.getSelectionRangeEx();2===s.type&&("Escape"===l?(this.editor.select(s.image,-2),null===(t=this.editor.getSelectionRange())||void 0===t||t.collapse(),e.rawEvent.stopPropagation()):"Delete"===l?(this.editor.deleteNode(s.image),e.rawEvent.preventDefault()):this.editor.select(s.ranges[0]));break;case 16:var u=e.rawEvent.target,d=this.editor.getSelectionRangeEx();!(0,r.safeInstanceOf)(u,"HTMLImageElement")||2===d.type&&d.image===u||this.editor.select(u)}},e}();t.default=o},6121:(e,t,n)=>{"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0});var i=n(7582),a=n(6344),l="contenteditable",s=a.Browser.isFirefox?((r={}).enableObjectResizing=!1,r.enableInlineTableEditing=!1,r):a.Browser.isIE?((o={}).defaultParagraphSeparator="div",o.AutoUrlDetect=!1,o):{},u={darkModeColor:"rgb(51,51,51)",lightModeColor:"rgb(255,255,255)"},d={darkModeColor:"rgb(255,255,255)",lightModeColor:"rgb(0,0,0)"},c=function(){function e(e,t){var n,r,o=this;this.editor=null,this.initializer=null,this.disposer=null,this.initialContent=e.initialContent||t.innerHTML||"",null===t.getAttribute(l)&&(this.initializer=function(){t.contentEditable="true",t.style.userSelect="text",t.style.webkitUserSelect="text"},this.disposer=function(){t.style.userSelect="",t.style.webkitUserSelect="",t.removeAttribute(l)}),this.adjustColor=e.doNotAdjustEditorColor?function(){}:function(){var e,n=d,r=u,i=o.state.isDarkMode,l=null===(e=o.editor)||void 0===e?void 0:e.getDarkColorHandler();(0,a.setColor)(t,n,!1,i,!1,l),(0,a.setColor)(t,r,!0,i,!1,l)};var s=null!==(n=e.getDarkColor)&&void 0!==n?n:function(e){return e},c=e.defaultFormat?(0,i.__assign)({},e.defaultFormat):null;c&&(c.textColor&&!c.textColors&&(c.textColors={lightModeColor:c.textColor,darkModeColor:s(c.textColor)},delete c.textColor),c.backgroundColor&&!c.backgroundColors&&(c.backgroundColors={lightModeColor:c.backgroundColor,darkModeColor:s(c.backgroundColor)},delete c.backgroundColor)),this.state={customData:{},defaultFormat:c,isDarkMode:!!e.inDarkMode,getDarkColor:s,onExternalContentTransform:null!==(r=e.onExternalContentTransform)&&void 0!==r?r:null,experimentalFeatures:e.experimentalFeatures||[],shadowEditFragment:null,shadowEditEntities:null,shadowEditSelectionPath:null,shadowEditTableSelectionPath:null,shadowEditImageSelectionPath:null}}return e.prototype.getName=function(){return"Lifecycle"},e.prototype.initialize=function(e){var t;this.editor=e,this.editor.setContent(this.initialContent,!1),null===(t=this.initializer)||void 0===t||t.call(this),this.adjustColor(),this.adjustBrowserBehavior(),this.editor.triggerPluginEvent(11,{},!0)},e.prototype.dispose=function(){var e,t=this;null===(e=this.editor)||void 0===e||e.triggerPluginEvent(12,{},!0),(0,a.getObjectKeys)(this.state.customData).forEach((function(e){var n=t.state.customData[e];n&&n.disposer&&n.disposer(n.value),delete t.state.customData[e]})),this.disposer&&(this.disposer(),this.disposer=null,this.initializer=null),this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){7!=e.eventType||"SwitchToDarkMode"!=e.source&&"SwitchToLightMode"!=e.source||(this.state.isDarkMode="SwitchToDarkMode"==e.source,this.adjustColor())},e.prototype.adjustBrowserBehavior=function(){var e=this;(0,a.getObjectKeys)(s).forEach((function(t){var n;try{null===(n=e.editor)||void 0===n||n.getDocument().execCommand(t,!1,s[t])}catch(e){}}))},e}();t.default=c},5896:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.editor=null,this.mouseUpEventListerAdded=!1,this.mouseDownX=null,this.mouseDownY=null,this.onMouseUp=function(t){e.editor&&(e.removeMouseUpEventListener(),e.editor.triggerPluginEvent(6,{rawEvent:t,isClicking:e.mouseDownX==t.pageX&&e.mouseDownY==t.pageY}))}}return e.prototype.getName=function(){return"MouseUp"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.removeMouseUpEventListener(),this.editor=null},e.prototype.onPluginEvent=function(e){this.editor&&5==e.eventType&&!this.mouseUpEventListerAdded&&(this.editor.getDocument().addEventListener("mouseup",this.onMouseUp,!0),this.mouseUpEventListerAdded=!0,this.mouseDownX=e.rawEvent.pageX,this.mouseDownY=e.rawEvent.pageY)},e.prototype.removeMouseUpEventListener=function(){this.editor&&this.mouseUpEventListerAdded&&(this.mouseUpEventListerAdded=!1,this.editor.getDocument().removeEventListener("mouseup",this.onMouseUp,!0))},e}();t.default=n},3433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null}return e.prototype.getName=function(){return"NormalizeTable"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 11:case 7:this.editor&&this.normalizeTables(this.editor.queryElements("table"));break;case 10:this.normalizeTables((0,r.toArray)(e.fragment.querySelectorAll("table")));break;case 5:this.normalizeTableFromEvent(e.rawEvent);break;case 0:e.rawEvent.shiftKey&&this.normalizeTableFromEvent(e.rawEvent);break;case 8:t=e.clonedRoot,(0,r.toArray)(t.querySelectorAll("li")).forEach((function(e){var t=e.previousSibling;"block"==e.style.display&&(0,r.safeInstanceOf)(t,"HTMLLIElement")&&(e.style.removeProperty("display"),t.appendChild((0,r.changeElementTag)(e,"div")))}))}var t},e.prototype.normalizeTableFromEvent=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getElementAtCursor("table",e.target);n&&this.normalizeTables([n])},e.prototype.normalizeTables=function(e){if(this.editor&&e.length>0){var t=this.editor.getSelectionRangeEx(),n=0==(null==t?void 0:t.type)&&t.ranges[0]||{},o=n.startContainer,i=n.endContainer,a=n.startOffset,l=n.endOffset,s=function(e){var t=!1;return e.forEach((function(e){for(var n,o=null,i=e.firstChild;i;i=i.nextSibling)switch((0,r.getTagOfNode)(i)){case"TR":o||(o=e.ownerDocument.createElement("tbody"),e.insertBefore(o,i)),o.appendChild(i),i=o,t=!0;break;case"TBODY":o?((0,r.moveChildNodes)(o,i,!0),null===(n=i.parentNode)||void 0===n||n.removeChild(i),i=o,t=!0):o=i;break;default:o=null}var a=e.querySelectorAll("colgroup"),l=e.querySelector("thead");l&&a.forEach((function(e){l.contains(e)||l.appendChild(e)}))})),t}(e);s&&(o&&i&&"number"==typeof a&&"number"==typeof l?this.editor.select(o,a,i,l):1==(null==t?void 0:t.type)&&t.coordinates&&this.editor.select(t.table,t.coordinates))}},e}();t.default=o},4465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null,this.state={pendableFormatPosition:null,pendableFormatState:null,pendableFormatSpan:null}}return e.prototype.getName=function(){return"PendingFormatState"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null,this.clear()},e.prototype.getState=function(){return this.state},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 13:e.formatState?(this.state.pendableFormatPosition=this.getCurrentPosition(),this.state.pendableFormatState=e.formatState,this.state.pendableFormatSpan=e.formatCallback?this.createPendingFormatSpan(e.formatCallback):null):this.clear();break;case 0:case 5:case 7:var t=null;this.editor&&0==e.eventType&&(0,r.isCharacterValue)(e.rawEvent)&&this.state.pendableFormatSpan?(this.state.pendableFormatSpan.removeAttribute("contentEditable"),this.editor.insertNode(this.state.pendableFormatSpan),this.editor.select(this.state.pendableFormatSpan,0,this.state.pendableFormatSpan,-1),this.clear()):(0==e.eventType&&e.rawEvent.which>=33&&e.rawEvent.which<=40||this.state.pendableFormatPosition&&(t=this.getCurrentPosition())&&!this.state.pendableFormatPosition.equalTo(t)||7==e.eventType&&("SwitchToDarkMode"==e.source||"SwitchToLightMode"==e.source))&&this.clear()}},e.prototype.clear=function(){this.state.pendableFormatPosition=null,this.state.pendableFormatState=null,this.state.pendableFormatSpan=null},e.prototype.getCurrentPosition=function(){var e,t,n=null===(e=this.editor)||void 0===e?void 0:e.getSelectionRange();return null!==(t=n&&r.Position.getStart(n).normalize())&&void 0!==t?t:null},e.prototype.createPendingFormatSpan=function(e){var t,n,o=this.state.pendableFormatSpan;if(!o&&this.editor){var i=this.editor.getStyleBasedFormatState(),a=this.editor.getDocument(),l=this.editor.isDarkMode();(o=a.createElement("span")).contentEditable="true",o.appendChild(a.createTextNode("​")),o.style.setProperty("font-family",null!==(t=i.fontName)&&void 0!==t?t:null),o.style.setProperty("font-size",null!==(n=i.fontSize)&&void 0!==n?n:null);var s=this.editor.getDarkColorHandler();(i.textColors||i.textColor)&&(0,r.setColor)(o,i.textColors||i.textColor,!1,l,!1,s),(i.backgroundColors||i.backgroundColor)&&(0,r.setColor)(o,i.backgroundColors||i.backgroundColor,!0,l,!1,s)}return o&&e(o),o},e}();t.default=o},4269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(){this.editor=null}return e.prototype.getName=function(){return"TypeInContainer"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.isRangeEmpty=function(e){return!(!e.collapsed||e.startContainer.nodeType!==Node.ELEMENT_NODE||"DIV"!=(0,r.getTagOfNode)(e.startContainer)||e.startContainer.firstChild)},e.prototype.onPluginEvent=function(e){var t,n=this;if(1==e.eventType&&this.editor&&(!e.rawEvent||!(0,r.isCtrlOrMetaPressed)(e.rawEvent))){var o=this.editor.getSelectionRange(),i=o&&(0,r.findClosestElementAncestor)(o.startContainer,void 0,"[style]");if(!o||!this.isRangeEmpty(o)&&this.editor.contains(i))return;if(o.collapsed)this.editor.ensureTypeInContainer(r.Position.getStart(o),e.rawEvent);else{var a=function(){var t,r,o=null===(t=n.editor)||void 0===t?void 0:t.getFocusedPosition();o&&(null===(r=n.editor)||void 0===r||r.ensureTypeInContainer(o,e.rawEvent))};r.Browser.isMobileOrTablet?null===(t=this.editor.getDocument().defaultView)||void 0===t||t.setTimeout(a,100):this.editor.runAsync(a)}}},e}();t.default=o},6469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e){var t,n,o;this.editor=null,this.lastKeyPress=null,this.state={snapshotsService:e.undoMetadataSnapshotService||(n=e.undoSnapshotService,n?{canMove:function(e){return n.canMove(e)},move:function(e){return(o=n.move(e))?{html:o,metadata:null,knownColors:[]}:null},addSnapshot:function(e,t){return n.addSnapshot(e.html+(e.metadata?"\x3c!--"+JSON.stringify(e.metadata)+"--\x3e":""),t)},clearRedo:function(){return n.clearRedo()},canUndoAutoComplete:function(){return n.canUndoAutoComplete()}}:void 0)||(t=(0,r.createSnapshots)(1e7),{canMove:function(e){return(0,r.canMoveCurrentSnapshot)(t,e)},move:function(e){return(0,r.moveCurrentSnapshot)(t,e)},addSnapshot:function(e,n){return(0,r.addSnapshotV2)(t,e,n)},clearRedo:function(){return(0,r.clearProceedingSnapshotsV2)(t)},canUndoAutoComplete:function(){return(0,r.canUndoAutoComplete)(t)}}),isRestoring:!1,hasNewContent:!1,isNested:!1,autoCompletePosition:null}}return e.prototype.getName=function(){return"Undo"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.getState=function(){return this.state},e.prototype.willHandleEventExclusively=function(e){return 0==e.eventType&&8==e.rawEvent.which&&!e.rawEvent.ctrlKey&&this.canUndoAutoComplete()},e.prototype.onPluginEvent=function(e){if(this.editor&&!this.editor.isInIME())switch(e.eventType){case 11:var t=this.editor.getUndoState();t.canUndo||t.canRedo||this.addUndoSnapshot();break;case 0:this.onKeyDown(e.rawEvent);break;case 1:this.onKeyPress(e.rawEvent);break;case 4:this.clearRedoForInput(),this.addUndoSnapshot();break;case 7:this.onContentChanged(e);break;case 23:this.onBeforeKeyboardEditing(e.rawEvent)}},e.prototype.onKeyDown=function(e){var t,n;if(8==e.which&&!e.altKey||46==e.which){if(8==e.which&&!e.ctrlKey&&this.canUndoAutoComplete())e.preventDefault(),null===(t=this.editor)||void 0===t||t.undo(),this.state.autoCompletePosition=null,this.lastKeyPress=e.which;else if(!e.defaultPrevented){var o=null===(n=this.editor)||void 0===n?void 0:n.getSelectionRange();!o||o.collapsed&&this.lastKeyPress==e.which&&!(0,r.isCtrlOrMetaPressed)(e)||this.addUndoSnapshot(),this.state.hasNewContent=!0,this.lastKeyPress=e.which}}else e.which>=33&&e.which<=40?(this.state.hasNewContent&&this.addUndoSnapshot(),this.lastKeyPress=0):8!=this.lastKeyPress&&46!=this.lastKeyPress||this.state.hasNewContent&&this.addUndoSnapshot()},e.prototype.onKeyPress=function(e){var t;if(!e.metaKey){var n=null===(t=this.editor)||void 0===t?void 0:t.getSelectionRange();n&&!n.collapsed||32==e.which&&32!=this.lastKeyPress||13==e.which?(this.addUndoSnapshot(),13==e.which&&(this.state.hasNewContent=!0)):this.clearRedoForInput(),this.lastKeyPress=e.which}},e.prototype.onBeforeKeyboardEditing=function(e){e.which!=this.lastKeyPress&&this.addUndoSnapshot(),this.lastKeyPress=e.which,this.state.hasNewContent=!0},e.prototype.onContentChanged=function(e){this.state.isRestoring||"SwitchToDarkMode"==e.source||"SwitchToLightMode"==e.source||"Keyboard"==e.source||this.clearRedoForInput()},e.prototype.clearRedoForInput=function(){this.state.snapshotsService.clearRedo(),this.lastKeyPress=0,this.state.hasNewContent=!0},e.prototype.canUndoAutoComplete=function(){var e,t,n=null===(e=this.editor)||void 0===e?void 0:e.getFocusedPosition();return this.state.snapshotsService.canUndoAutoComplete()&&!!n&&!!(null===(t=this.state.autoCompletePosition)||void 0===t?void 0:t.equalTo(n))},e.prototype.addUndoSnapshot=function(){var e;null===(e=this.editor)||void 0===e||e.addUndoSnapshot(),this.state.autoCompletePosition=null},e}();t.default=o},8376:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPluginState=void 0;var r=n(4142),o=n(7039),i=n(6262),a=n(3346),l=n(6194),s=n(6121),u=n(5896),d=n(3433),c=n(4465),f=n(4269),p=n(6469);t.default=function(e,t){var n=t.corePluginOverride||{};return{typeInContainer:n.typeInContainer||new f.default,edit:n.edit||new i.default,pendingFormatState:n.pendingFormatState||new c.default,_placeholder:null,typeAfterLink:null,undo:n.undo||new p.default(t),domEvent:n.domEvent||new o.default(t,e),mouseUp:n.mouseUp||new u.default,copyPaste:n.copyPaste||new r.default(t),entity:n.entity||new a.default,imageSelection:n.imageSelection||new l.default,normalizeTable:n.normalizeTable||new d.default,lifecycle:n.lifecycle||new s.default(t,e)}},t.getPluginState=function(e){return{domEvent:e.domEvent.getState(),pendingFormatState:e.pendingFormatState.getState(),edit:e.edit.getState(),lifecycle:e.lifecycle.getState(),undo:e.undo.getState(),entity:e.entity.getState(),copyPaste:e.copyPaste.getState()}}},2544:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEachSelectedCell=void 0,t.forEachSelectedCell=function(e,t){var n;if(e.selection)for(var r=e.selection,o=r.lastCell,i=r.firstCell,a=i.y;a<=o.y;a++)for(var l=i.x;l<=o.x;l++)e.cells&&(null===(n=e.cells[a][l])||void 0===n?void 0:n.td)&&t(e.cells[a][l])}},4195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeDelimitersInEditor=t.inlineEntityOnPluginEvent=void 0;var r=n(6344),o=".entityDelimiterAfter,.entityDelimiterBefore",i="​",a="span"+(0,r.getEntitySelector)();function l(e){var t,n,o,a;e.normalize();var l,s=e.firstChild,u=null!==(n=null===(t=s.nodeValue)||void 0===t?void 0:t.indexOf(i))&&void 0!==n?n:-1;if(u>=0&&((0,r.splitTextNode)(s,0==u?1:u,!1),e.childNodes.forEach((function(e){e.nodeValue!==i&&(l=e)})),l)){null===(o=e.parentElement)||void 0===o||o.insertBefore(l,"entityDelimiterBefore"==e.className?e:e.nextSibling);var d=null===(a=l.ownerDocument)||void 0===a?void 0:a.getSelection();d&&d.setPosition(l,new r.Position(l,-1).offset)}}function s(e){e.queryElements(o).forEach((function(e){if((0,r.getDelimiterFromElement)(e)){var t=e.classList.contains("entityDelimiterBefore")?e.nextElementSibling:e.previousElementSibling;(0,r.safeInstanceOf)(t,"HTMLElement")&&(0,r.getEntityFromElement)(t)||c(e)}else f(e)})),u(e.queryElements(a))}function u(e){e.forEach((function(e){d(e)&&(0,r.addDelimiters)(e)}))}function d(e){return!!(e&&(0,r.safeInstanceOf)(e,"HTMLElement")&&(t=(0,r.getEntityFromElement)(e),(null==t?void 0:t.isReadonly)&&!(0,r.isBlockElement)(t.wrapper)&&(0,r.safeInstanceOf)(t.wrapper,"HTMLElement")));var t}function c(e){var t;null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(e)}function f(e,t){if(void 0===t&&(t=!0),e){var n=e.classList.contains("entityDelimiterAfter")?e.previousElementSibling:e.nextElementSibling;t&&n&&d(n)||(e.classList.remove("entityDelimiterAfter","entityDelimiterBefore"),e.normalize(),e.childNodes.forEach((function(e){var t,n,o,a=null!==(n=null===(t=e.textContent)||void 0===t?void 0:t.indexOf(i))&&void 0!==n?n:-1;a>=0&&(null===(o=(0,r.createRange)(e,a,e,a+1))||void 0===o||o.deleteContents())})))}}t.inlineEntityOnPluginEvent=function(e,t){switch(e.eventType){case 7:"SetContent"===e.source&&s(t);break;case 11:s(t);break;case 10:var n=e.fragment,i=e.sanitizingOption;u(n.querySelectorAll(a)),i.additionalAllowedCssClasses&&(0,r.arrayPush)(i.additionalAllowedCssClasses,["entityDelimiterAfter","entityDelimiterBefore"]);break;case 8:case 9:e.clonedRoot.querySelectorAll(o).forEach((function(e){(0,r.getDelimiterFromElement)(e)?c(e):f(e)}));break;case 0:!function(e,t){var n,i,a=e.getSelectionRangeEx(),s=t.rawEvent;if(0==a.type)if(a.areAllCollapsed&&((0,r.isCharacterValue)(s)||13===s.which)){var u=null===(n=e.getFocusedPosition())||void 0===n?void 0:n.normalize();if(!u)return;var c=u.element,v=c==u.node?c.childNodes.item(u.offset):c,h=e.getElementAtCursor(o,v);if(!h)return;13===s.which?function(e,t){var n=t.classList.contains("entityDelimiterAfter"),i=n?t.previousSibling:t.nextSibling,a=function(e,t){var n;if(t){for(var o=null===(n=e.getBlockElementAtNode(t))||void 0===n?void 0:n.getStartNode();o&&!(0,r.isBlockElement)(o);)o=e.contains(o.parentElement)?o.parentElement:void 0;return o}}(e,t);e.runAsync((function(){if(a){var e=n?a.nextSibling:a.previousSibling;if(e&&(0,r.safeInstanceOf)(e,"HTMLElement")){var t=e.querySelectorAll(o);f(t.item(n?0:t.length-1))}d(i)&&([i.nextElementSibling,i.previousElementSibling].forEach((function(e){e&&(0,r.matchesSelector)(e,o)&&!(0,r.getDelimiterFromElement)(e)&&f(e,!1)})),(0,r.addDelimiters)(i))}}))}(e,h):3==(null===(i=h.firstChild)||void 0===i?void 0:i.nodeType)&&e.runAsync((function(){return l(h)}))}else if(!a.areAllCollapsed&&!s.shiftKey&&16!=s.which){var g=a.ranges[0];if(!g)return;!function(e,t,n){var i=t.startContainer,a=t.endContainer,s=t.startOffset,u=t.endOffset,d=e.getElementAtCursor(o,i),c=e.getElementAtCursor(o,a),v=p(d),h=p(c);(v||h)&&e.select(null!=v?v:new r.Position(i,s),null!=h?h:new r.Position(a,u)),e.runAsync((function(e){var t=e.getElementAtCursor(o);t&&(l(t),13===n.which&&f(t))}))}(e,g,s)}}(t,e)}},t.normalizeDelimitersInEditor=s;var p=function(e){if(e&&(0,r.getDelimiterFromElement)(e)){var t=e.classList.contains("entityDelimiterAfter");return new r.Position(e,t?-3:-2)}}},4082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeCellsOutsideSelection=void 0;var r=n(6344);t.removeCellsOutsideSelection=function(e){if(e.selection){if((0,r.isWholeTableSelected)(e,e.selection))return;e.table.style.removeProperty("width"),e.table.style.removeProperty("height");var t=e.selection,n=t.firstCell,o=t.lastCell,i=[],a=n.x,l=n.y,s=o.x,u=o.y;e.cells&&(e.cells.forEach((function(e,t){(e=e.filter((function(e,n){return t>=l&&t<=u&&n>=a&&n<=s}))).length>0&&i.push(e)})),e.cells=i)}}},2842:(e,t,n)=>{"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(6344),l=/^\s*var\(\s*(\-\-[a-zA-Z0-9\-_]+)\s*(?:,\s*(.*))?\)\s*$/;!function(e){e[e.CssColor=0]="CssColor",e[e.HtmlColor=1]="HtmlColor"}(i||(i={}));var s=[(r={},r[0]="color",r[1]="color",r),(o={},o[0]="background-color",o[1]="bgcolor",o)],u=function(){function e(e,t){this.contentDiv=e,this.getDarkColor=t,this.knownColors={}}return e.prototype.getKnownColorsCopy=function(){return Object.values(this.knownColors)},e.prototype.registerColor=function(e,t,n){var r,o=this.parseColorValue(e);return o&&(e=o.lightModeColor,n=o.darkModeColor||n,r=o.key),t&&e?(r=r||"--darkColor_"+e.replace(/[^\d\w]/g,"_"),this.knownColors[r]||(n=n||this.getDarkColor(e),this.knownColors[r]={lightModeColor:e,darkModeColor:n},this.contentDiv.style.setProperty(r,n)),"var("+r+", "+e+")"):e},e.prototype.reset=function(){var e=this;(0,a.getObjectKeys)(this.knownColors).forEach((function(t){return e.contentDiv.style.removeProperty(t)})),this.knownColors={}},e.prototype.parseColorValue=function(e,t){var n,r,o,i="";if(e){var a=e.startsWith("var(")?l.exec(e):null;a?a[2]?(r=a[1],i=a[2],o=null===(n=this.knownColors[r])||void 0===n?void 0:n.darkModeColor):i="":t?(i=this.findLightColorFromDarkColor(e)||"")&&(o=e):i=e}return{key:r,lightModeColor:i,darkModeColor:o}},e.prototype.findLightColorFromDarkColor=function(e){var t=this,n=(0,a.parseColor)(e);if(n){var r=(0,a.getObjectKeys)(this.knownColors).find((function(e){var r=(0,a.parseColor)(t.knownColors[e].darkModeColor);return r&&r[0]==n[0]&&r[1]==n[1]&&r[2]==n[2]}));if(r)return this.knownColors[r].lightModeColor}return null},e.prototype.transformElementColor=function(e,t,n){var r=this;s.forEach((function(o,i){var l=r.parseColorValue(e.style.getPropertyValue(o[0])||e.getAttribute(o[1]),!!t).lightModeColor;e.style.setProperty(o[0],null),e.removeAttribute(o[1]),l&&"inherit"!=l&&(0,a.setColor)(e,l,0!=i,n,!1,r)}))},e}();t.default=u},3386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(9602),i=function(e){function t(t,n){return void 0===n&&(n={}),e.call(this,t,n,o.createEditorCore)||this}return(0,r.__extends)(t,e),t}(n(5075).EditorBase);t.default=i},5075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorBase=void 0;var r=n(7582),o=n(3441),i=n(6344),a=function(){function e(e,t,n){var r=this;if(this.core=null,"DIV"!=(0,i.getTagOfNode)(e))throw new Error("contentDiv must be an HTML DIV element");this.core=n(e,t),this.core.plugins.forEach((function(e){return e.initialize(r)})),this.ensureTypeInContainer(new i.Position(this.core.contentDiv,0).normalize())}return e.prototype.dispose=function(){for(var e=this.getCore(),t=e.plugins.length-1;t>=0;t--)e.plugins[t].dispose();e.darkColorHandler.reset(),this.core=null},e.prototype.isDisposed=function(){return!this.core},e.prototype.insertNode=function(e,t){var n=this.getCore();return!!e&&n.api.insertNode(n,e,null!=t?t:null)},e.prototype.deleteNode=function(e){return!!(e&&this.contains(e)&&e.parentNode)&&(e.parentNode.removeChild(e),!0)},e.prototype.replaceNode=function(e,t,n){var r=this.getCore();return!(!this.contains(e)||!t||(r.api.transformColor(r,n?t:null,!0,(function(){var n;return null===(n=e.parentNode)||void 0===n?void 0:n.replaceChild(t,e)}),0),0))},e.prototype.getBlockElementAtNode=function(e){return(0,i.getBlockElementAtNode)(this.getCore().contentDiv,e)},e.prototype.contains=function(e){return!!e&&(0,i.contains)(this.getCore().contentDiv,e)},e.prototype.queryElements=function(e,t,n){void 0===t&&(t=0);var o=this.getCore(),a=[],l=t instanceof Function?0:t;n=t instanceof Function?t:n;var s=0==l?null:this.getSelectionRangeEx();return s?(s.ranges.forEach((function(t){a.push.apply(a,(0,r.__spreadArray)([],(0,r.__read)((0,i.queryElements)(o.contentDiv,e,n,l,t)),!1))})),a):(0,i.queryElements)(o.contentDiv,e,n,l,void 0)},e.prototype.collapseNodes=function(e,t,n){return(0,i.collapseNodes)(this.getCore().contentDiv,e,t,n)},e.prototype.isEmpty=function(e){return(0,i.isNodeEmpty)(this.getCore().contentDiv,e)},e.prototype.getContent=function(e){void 0===e&&(e=0);var t=this.getCore();return t.api.getContent(t,e)},e.prototype.setContent=function(e,t){void 0===t&&(t=!0);var n=this.getCore();n.api.setContent(n,e,t)},e.prototype.insertContent=function(e,t){var n;if(e){var r=this.getDocument(),o=null===(n=(new DOMParser).parseFromString(this.getCore().trustedHTMLHandler(e),"text/html"))||void 0===n?void 0:n.body,a=(null==o?void 0:o.childNodes)?(0,i.toArray)(o.childNodes):[];t&&t.insertOnNewLine&&a.length>1&&(a=[(0,i.wrap)(a)]);var l=r.createDocumentFragment();a.forEach((function(e){return l.appendChild(e)})),this.insertNode(l,t)}},e.prototype.deleteSelectedContent=function(){var e=this.getSelectionRange();return e&&!e.collapsed?(0,i.deleteSelectedContent)(this.getCore().contentDiv,e):null},e.prototype.paste=function(e,t,n,r){var o=this;void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===r&&(r=!1);var a=this.getCore();if(e){e.snapshotBeforePaste?this.setContent(e.snapshotBeforePaste):e.snapshotBeforePaste=this.getContent(2);var l=this.getSelectionRange(),s=l&&i.Position.getStart(l),u=a.api.createPasteFragment(a,e,s,t,n,r);u&&this.addUndoSnapshot((function(){return o.insertNode(u),e}),"Paste")}},e.prototype.getSelectionRange=function(e){void 0===e&&(e=!0);var t=this.getCore();return t.api.getSelectionRange(t,e)},e.prototype.getSelectionRangeEx=function(){var e=this.getCore();return e.api.getSelectionRangeEx(e)},e.prototype.getSelectionPath=function(){var e=this.getSelectionRange();return e&&(0,i.getSelectionPath)(this.getCore().contentDiv,e)},e.prototype.hasFocus=function(){var e=this.getCore();return e.api.hasFocus(e)},e.prototype.focus=function(){var e=this.getCore();e.api.focus(e)},e.prototype.select=function(e,t,n,r){var o=this.getCore();return o.api.select(o,e,t,n,r)},e.prototype.getFocusedPosition=function(){var e,t=null===(e=this.getDocument().defaultView)||void 0===e?void 0:e.getSelection();if((null==t?void 0:t.focusNode)&&this.contains(t.focusNode))return new i.Position(t.focusNode,t.focusOffset);var n=this.getSelectionRange();return n?i.Position.getStart(n):null},e.prototype.getElementAtCursor=function(e,t,n){var r,o=this;return n=t?void 0:n,null!==(r=(0,i.cacheGetEventData)(null!=n?n:null,"GET_ELEMENT_AT_CURSOR_"+e,(function(){if(!t){var n=o.getFocusedPosition();t=null==n?void 0:n.node}return t&&(0,i.findClosestElementAncestor)(t,o.getCore().contentDiv,e)})))&&void 0!==r?r:null},e.prototype.isPositionAtBeginning=function(e){return(0,i.isPositionAtBeginningOf)(e,this.getCore().contentDiv)},e.prototype.getSelectedRegions=function(e){void 0===e&&(e=0);var t=this.getSelectionRangeEx(),n=[],o=this.getCore().contentDiv;return t.ranges.forEach((function(t){n.push.apply(n,(0,r.__spreadArray)([],(0,r.__read)(t?(0,i.getRegionsFromRange)(o,t,e):[]),!1))})),n.filter((function(e,t,n){return n.indexOf(e)===t}))},e.prototype.addDomEventHandler=function(e,t){var n,r="string"==typeof e?((n={})[e]=t,n):e,o=this.getCore();return o.api.attachDomEvent(o,r)},e.prototype.triggerPluginEvent=function(e,t,n){void 0===n&&(n=!1);var o=this.getCore(),i=(0,r.__assign)({eventType:e},t);return o.api.triggerEvent(o,i,n),i},e.prototype.triggerContentChangedEvent=function(e,t){void 0===e&&(e="SetContent"),this.triggerPluginEvent(7,{source:e,data:t})},e.prototype.undo=function(){this.focus();var e=this.getCore();e.api.restoreUndoSnapshot(e,-1)},e.prototype.redo=function(){this.focus();var e=this.getCore();e.api.restoreUndoSnapshot(e,1)},e.prototype.addUndoSnapshot=function(e,t,n,r){var o=this.getCore();o.api.addUndoSnapshot(o,null!=e?e:null,null!=t?t:null,null!=n&&n,r)},e.prototype.getUndoState=function(){var e=this.getCore().undo,t=e.hasNewContent,n=e.snapshotsService;return{canUndo:t||n.canMove(-1),canRedo:n.canMove(1)}},e.prototype.getDocument=function(){return this.getCore().contentDiv.ownerDocument},e.prototype.getScrollContainer=function(){return this.getCore().domEvent.scrollContainer},e.prototype.getCustomData=function(e,t,n){var r=this.getCore();return(r.lifecycle.customData[e]=r.lifecycle.customData[e]||{value:t?t():void 0,disposer:n}).value},e.prototype.isInIME=function(){return this.getCore().domEvent.isInIME},e.prototype.getDefaultFormat=function(){var e;return null!==(e=this.getCore().lifecycle.defaultFormat)&&void 0!==e?e:{}},e.prototype.getBodyTraverser=function(e){return i.ContentTraverser.createBodyTraverser(this.getCore().contentDiv,e)},e.prototype.getSelectionTraverser=function(e){var t;return(e=null!==(t=null!=e?e:this.getSelectionRange())&&void 0!==t?t:void 0)?i.ContentTraverser.createSelectionTraverser(this.getCore().contentDiv,e):null},e.prototype.getBlockTraverser=function(e){void 0===e&&(e=3);var t=this.getSelectionRange();return t?i.ContentTraverser.createBlockTraverser(this.getCore().contentDiv,t,e):null},e.prototype.getContentSearcherOfCursor=function(e){var t=this;return(0,i.cacheGetEventData)(null!=e?e:null,"ContentSearcher",(function(){var e=t.getSelectionRange();return e&&new i.PositionContentSearcher(t.getCore().contentDiv,i.Position.getStart(e))}))},e.prototype.runAsync=function(e){var t=this,n=this.getCore().contentDiv.ownerDocument.defaultView||window,r=n.requestAnimationFrame((function(){!t.isDisposed()&&e&&e(t)}));return function(){n.cancelAnimationFrame(r)}},e.prototype.setEditorDomAttribute=function(e,t){null===t?this.getCore().contentDiv.removeAttribute(e):this.getCore().contentDiv.setAttribute(e,t)},e.prototype.getEditorDomAttribute=function(e){return this.getCore().contentDiv.getAttribute(e)},e.prototype.getRelativeDistanceToEditor=function(e,t){if(this.contains(e)){var n=this.getCore().contentDiv,r=n.getBoundingClientRect(),o=e.getBoundingClientRect();if(r&&o){var i=o.left-(null==r?void 0:r.left),a=o.top-(null==r?void 0:r.top);return t&&(i+=n.scrollLeft,a+=n.scrollTop),[i,a]}}return null},e.prototype.addContentEditFeature=function(e){var t=this.getCore();null==e||e.keys.forEach((function(n){var r=t.edit.features[n]||[];r.push(e),t.edit.features[n]=r}))},e.prototype.removeContentEditFeature=function(e){var t=this.getCore();null==e||e.keys.forEach((function(n){var r,o=t.edit.features[n],i=null!==(r=null==o?void 0:o.indexOf(e))&&void 0!==r?r:-1;i>=0&&(t.edit.features[n].splice(i,1),t.edit.features[n].length<1&&delete t.edit.features[n])}))},e.prototype.getStyleBasedFormatState=function(e){var t;if(!e){var n=this.getSelectionRange();e=null!==(t=n&&i.Position.getStart(n).normalize().node)&&void 0!==t?t:void 0}var r=this.getCore();return r.api.getStyleBasedFormatState(r,null!=e?e:null)},e.prototype.getPendableFormatState=function(e){void 0===e&&(e=!1);var t=this.getCore();return t.api.getPendableFormatState(t,e)},e.prototype.ensureTypeInContainer=function(e,t){var n=this.getCore();n.api.ensureTypeInContainer(n,e,t)},e.prototype.setDarkModeState=function(e){var t=this.isDarkMode();if(t!=!!e){var n=this.getCore();n.api.transformColor(n,n.contentDiv,!1,null,e?0:1,!0,t),this.triggerContentChangedEvent(e?"SwitchToDarkMode":"SwitchToLightMode")}},e.prototype.isDarkMode=function(){return this.getCore().lifecycle.isDarkMode},e.prototype.transformToDarkColor=function(e){var t=this.getCore();t.api.transformColor(t,e,!0,null,0)},e.prototype.getDarkColorHandler=function(){return this.getCore().darkColorHandler},e.prototype.startShadowEdit=function(){var e=this.getCore();e.api.switchShadowEdit(e,!0)},e.prototype.stopShadowEdit=function(){var e=this.getCore();e.api.switchShadowEdit(e,!1)},e.prototype.isInShadowEdit=function(){return!!this.getCore().lifecycle.shadowEditFragment},e.prototype.isFeatureEnabled=function(e){return(0,o.isFeatureEnabled)(this.getCore().lifecycle.experimentalFeatures,e)},e.prototype.getTrustedHTMLHandler=function(){return this.getCore().trustedHTMLHandler},e.prototype.getSizeTransformer=function(){return this.getCore().sizeTransformer},e.prototype.getZoomScale=function(){return this.getCore().zoomScale},e.prototype.setZoomScale=function(e){var t=this.getCore();if(e>0&&e<=10){var n=t.zoomScale;t.zoomScale=e,n!=e&&this.triggerPluginEvent(21,{oldZoomScale:n,newZoomScale:e},!0)}},e.prototype.getVisibleViewport=function(){return this.getCore().getVisibleViewport()},e.prototype.getCore=function(){if(!this.core)throw new Error("Editor is already disposed");return this.core},e}();t.EditorBase=a},9602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorCore=void 0;var r=n(7582),o=n(8376),i=n(2842),a=n(6344),l=n(6447);t.createEditorCore=function(e,t){var n,s=(0,o.default)(e,t),u=[];(0,a.getObjectKeys)(s).forEach((function(e){"_placeholder"==e?t.plugins&&(0,a.arrayPush)(u,t.plugins):u.push(s[e])}));var d=(0,o.getPluginState)(s),c=(null!==(n=t.zoomScale)&&void 0!==n?n:-1)>0?t.zoomScale:1,f=t.getVisibleViewport||function(){var e=d.domEvent.scrollContainer;return(0,a.getIntersectedRect)(e==p.contentDiv?[e]:[e,p.contentDiv])},p=(0,r.__assign)((0,r.__assign)({contentDiv:e,api:(0,r.__assign)((0,r.__assign)({},l.coreApiMap),t.coreApiOverride||{}),originalApi:l.coreApiMap,plugins:u.filter((function(e){return!!e}))},d),{trustedHTMLHandler:t.trustedHTMLHandler||function(e){return e},zoomScale:c,sizeTransformer:t.sizeTransformer||function(e){return e/c},getVisibleViewport:f,imageSelectionBorderColor:t.imageSelectionBorderColor,darkColorHandler:new i.default(e,d.lifecycle.getDarkColor)});return p}},3441:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFeatureEnabled=void 0,t.isFeatureEnabled=function(e,t){return(e||[]).indexOf(t)>=0}},6630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorCore=t.isFeatureEnabled=t.EditorBase=t.Editor=void 0;var r=n(3386);Object.defineProperty(t,"Editor",{enumerable:!0,get:function(){return r.default}});var o=n(5075);Object.defineProperty(t,"EditorBase",{enumerable:!0,get:function(){return o.EditorBase}});var i=n(3441);Object.defineProperty(t,"isFeatureEnabled",{enumerable:!0,get:function(){return i.isFeatureEnabled}});var a=n(9602);Object.defineProperty(t,"createEditorCore",{enumerable:!0,get:function(){return a.createEditorCore}})},8715:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(6997),i=function(){function e(e){this.element=e}return e.prototype.collapseToSingleElement=function(){return this.element},e.prototype.getStartNode=function(){return this.element},e.prototype.getEndNode=function(){return this.element},e.prototype.equals=function(e){return this.element==e.getStartNode()},e.prototype.isAfter=function(e){return(0,o.default)(this.element,e.getEndNode())},e.prototype.contains=function(e){return(0,r.default)(this.element,e,!0)},e.prototype.getTextContent=function(){var e;return(null===(e=this.element)||void 0===e?void 0:e.textContent)||""},e}();t.default=i},461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8053),o=n(8655),i=n(8831),a=n(3408),l=n(5499),s=n(6997),u=n(4251),d=n(9381),c=["TD","TH","LI","BLOCKQUOTE"],f=function(){function e(e,t,n){this.rootNode=e,this.startNode=t,this.endNode=n}return e.getBlockContext=function(e){for(var t=e;t&&!(0,l.default)(t);)t=t.parentNode;return t},e.prototype.collapseToSingleElement=function(){for(var t=e.getBlockContext(this.startNode),n=t?(0,r.default)(t,this.startNode,this.endNode,!0):[],o=e.getBlockContext(this.startNode);n[0]&&n[0]!=o&&n[0].parentNode!=this.rootNode&&c.indexOf((0,a.default)(n[0].parentNode))<0;){var i=(0,d.splitBalancedNodeRange)(n);if(!i)break;n=[i]}return 1==n.length&&(0,l.default)(n[0])?n[0]:(0,u.default)(n)},e.prototype.getStartNode=function(){return this.startNode},e.prototype.getEndNode=function(){return this.endNode},e.prototype.equals=function(e){return this.startNode==e.getStartNode()&&this.endNode==e.getEndNode()},e.prototype.isAfter=function(e){return(0,s.default)(this.getStartNode(),e.getEndNode())},e.prototype.contains=function(e){return(0,o.default)(this.startNode,e,!0)||(0,o.default)(this.endNode,e,!0)||(0,s.default)(e,this.startNode)&&(0,s.default)(this.endNode,e)},e.prototype.getTextContent=function(){var e=(0,i.default)(this.getStartNode(),this.getEndNode());return e?e.toString():""},e}();t.default=f},7070:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8053),o=n(8655),i=n(3408),a=n(5499),l=n(8715),s=n(461);function u(e,t,n){var r=e;if("BR"==(0,i.default)(r)&&n)return r;for(;r;){for(var o=e;e.parentNode&&!(o=n?e.nextSibling:e.previousSibling);)if((e=e.parentNode)==t)return r;for(;o;){if((0,a.default)(o))return r;if("BR"==(0,i.default)(o))return n?o:r;e=o,o=n?e.firstChild:e.lastChild}r=e}return r}t.default=function(e,t){if(!(0,o.default)(e,t))return null;var n=s.default.getBlockContext(t);if(!n)return null;if(n==t)return new l.default(n);var i=u(t,n,!1),d=u(t,n,!0);if(!i||!d)return null;var c=(0,r.default)(e,i,d,!1);if(0===c.length)return null;if(i=c[0],d=c[c.length-1],i.parentNode!=d.parentNode)return new s.default(e,i,d);for(;!i.previousSibling&&!d.nextSibling;){var f=i.parentNode;if(f==n){n!=e&&(i=d=f);break}if(!f||f==e)break;i=d=f}return i==d&&(0,a.default)(i)?new l.default(i):new s.default(e,i,d)}},1306:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7070);t.default=function(e,t){var n=e;do{n=n&&(t?n.firstChild:n.lastChild)}while(n&&n.firstChild);return n&&(0,r.default)(e,n)||null}},1851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5400),o=n(140),i=n(8736),a=n(2543),l=n(1473),s=n(5673),u=n(5216);t.default=function(e,t,n,d,c,f,p){var v=p.fragment,h=t.rawHtml,g=t.text,m=t.imageDataUri,y=h?(new DOMParser).parseFromString(e.trustedHTMLHandler(h),"text/html"):void 0;if((0,s.default)(y,p,e.trustedHTMLHandler),f&&m||!d&&!g&&m)(0,i.default)(m,v);else if(!d&&h&&y&&y.body){if((0,l.default)(v,null==y?void 0:y.body),c&&n){var b=function(e,t){var n=e.api.getPendableFormatState(e,!0),r=e.api.getStyleBasedFormatState(e,t);return{fontFamily:r.fontName,fontSize:r.fontSize,textColor:r.textColor,backgroundColor:r.backgroundColor,textColors:r.textColors,backgroundColors:r.backgroundColors,bold:n.isBold,italic:n.isItalic,underline:n.isUnderline}}(e,n.node);(0,o.default)(v,(function(e){return(0,r.default)(e,b)}))}}else g&&(0,a.default)(g,n,v);return e.api.triggerEvent(e,p,!0),(0,u.default)(p,n),v}},1545:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3877),o=n(6960),i=n(8375),a=n(246);t.default=function(e,t,n,l){var s,u=e.clipboardData||(null===(s=e.target.ownerDocument)||void 0===s?void 0:s.defaultView).clipboardData;u.items?(e.preventDefault(),(0,r.default)((0,i.default)(u.items),n).then((function(e){var n;n=l,a.Browser.isAndroid&&n&&n.deleteContents(),t(e)}))):(0,o.default)(u,t,n)}},3877:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3126),i=n(246),a=/^Version:[0-9\.]+\s+StartHTML:\s*([0-9]+)\s+EndHTML:\s*([0-9]+)\s+/i,l="text/*",s="link-preview",u=((r={})["text/html"]=function(e,t){return e.rawHtml=i.Browser.isEdge?function(e){var t=a.exec(e);if(3==(null==t?void 0:t.length)){var n=parseInt(t[1]),r=parseInt(t[2]);n>0&&r>n&&(e=e.substring(n,r))}return e}(t):t},r["text/plain"]=function(e,t){return e.text=t},r[l]=function(e,t,n){return!!n&&(e.customValues[n]=t)},r["text/"+s]=function(e,t){try{e.customValues[s]=t,e.linkPreview=JSON.parse(t)}catch(e){}},r);t.default=function(e,t){var n={types:[],text:"",image:null,files:[],rawHtml:null,customValues:{}};return Promise.all((e||[]).map((function(e){var r=e.type;if(0!=r.indexOf("image/")||n.image||"file"!=e.kind){if("file"==e.kind)return new Promise((function(t){var o=e.getAsFile();o&&(n.types.push(r),n.files.push(o)),t()}));var i=function(e,t){var n=0==e.indexOf("text/")?e.substring(5):null,r=t&&n?t.indexOf(n):-1;return n&&r>=0?n:void 0}(r,null==t?void 0:t.allowedCustomPasteType),a=u[r]||(i?u[l]:null);return new Promise((function(t){return a?e.getAsString((function(e){n.types.push(r),a(n,e,i),t()})):t()}))}return n.types.push(r),n.image=e.getAsFile(),new Promise((function(e){n.image?(0,o.default)(n.image,(function(t){n.imageDataUri=t,e()})):e()}))}))).then((function(){return n}))}},6960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3126),o=n(8375);t.default=function(e,t,n){for(var i,a,l,s={types:e.types?(0,o.default)(e.types):[],text:e.getData("text"),image:null,files:[],rawHtml:null,customValues:{}},u=0;u<(e.files?e.files.length:0);u++){var d=e.files.item(u);if(0==(null===(i=null==d?void 0:d.type)||void 0===i?void 0:i.indexOf("image/"))){s.image=d;break}}var c=function(){s.image?(0,r.default)(s.image,(function(e){s.imageDataUri=e,t(s)})):t(s)};if((null==n?void 0:n.getTempDiv)&&(null==n?void 0:n.removeTempDiv)){var f=n.getTempDiv();f.contentEditable="true",f.innerHTML="",f.focus(),null===(l=null===(a=f.ownerDocument)||void 0===a?void 0:a.defaultView)||void 0===l||l.setTimeout((function(){var e;s.rawHtml=f.innerHTML,null===(e=n.removeTempDiv)||void 0===e||e.call(n,f),c()}),0)}else s.rawHtml=void 0,c()}},351:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return e?1:t?2:n?3:0}},8736:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.ownerDocument.createElement("img");n.style.maxWidth="100%",n.src=e,t.appendChild(n)}},2543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformTabCharacters=void 0;var r=n(4251);function o(e,t){void 0===t&&(t=0);for(var n,r=e;-1!=(n=r.indexOf("\t"));){var o=r.slice(0,n),i=r.slice(n+1),a=6-(o.length+t)%6;r=o+Array(a).fill(" ").join("")+i}return r}t.default=function(e,t,n){var i=n.ownerDocument;e.split("\n").forEach((function(e,a,l){(e=e.replace(/^ /g," ").replace(/\r/g,"").replace(/ {2}/g,"  ")).includes("\t")&&(e=o(e,0===a?null==t?void 0:t.offset:0));var s=i.createTextNode(e);2==l.length&&0==a?(n.appendChild(s),n.appendChild(i.createElement("br"))):a>0&&a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=n(8375);function i(e,t){(0,o.default)(e.querySelectorAll("style")).forEach(t)}t.default=function(e,t,n){var a,l,s=t.clipboardData,u=t.sanitizingOption,d=s.rawHtml;if(d&&(null==e?void 0:e.body)){var c=null===(a=e.querySelector("html"))||void 0===a?void 0:a.attributes;(c?(0,o.default)(c):[]).reduce((function(e,t){return e[t.name]=t.value,e}),t.htmlAttributes),(0,o.default)(e.querySelectorAll("meta")).reduce((function(e,t){return e[t.name]=t.content,e}),t.htmlAttributes),s.htmlFirstLevelChildTags=[],null==e||e.body.normalize();for(var f=0;f<(null==e?void 0:e.body.childNodes.length);f++){var p=null==e?void 0:e.body.childNodes.item(f);if(p.nodeType!=Node.TEXT_NODE||(null===(l=p.nodeValue)||void 0===l?void 0:l.replace(/(\r\n|\r|\n)/gm,"").trim())){var v=(0,r.default)(p);p.nodeType!=Node.COMMENT_NODE&&s.htmlFirstLevelChildTags.push(v)}}i(e,(function(t){null==e||e.head.appendChild(t),u.additionalGlobalStyleNodes.push(t)}));var h=d.indexOf("\x3c!--StartFragment--\x3e"),g=d.lastIndexOf("\x3c!--EndFragment--\x3e");h>=0&&g>=h+20&&(t.htmlBefore=d.substr(0,h),t.htmlAfter=d.substr(g+18),s.html=d.substring(h+20,g),e.body.innerHTML=n(s.html),i(e.body,(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})))}}},5216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(623),o=n(8488);t.default=function(e,t){var n=e.fragment,i=new o.default(e.sanitizingOption);i.convertGlobalCssToInlineCss(n),i.sanitize(n,t?(0,r.default)(t.element):void 0)}},7676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(7070),i=n(1306),a=n(8153),l=n(7229),s=function(){function e(e,t){this.rootNode=e,this.startNode=(0,r.default)(e,t)?t:null}return e.prototype.getStartBlockElement=function(){return this.startNode?(0,o.default)(this.rootNode,this.startNode):(0,i.default)(this.rootNode,!0)},e.prototype.getStartInlineElement=function(){return this.startNode?(0,a.default)(this.rootNode,this.startNode):(0,l.getFirstInlineElement)(this.rootNode)},e.prototype.isBlockInScope=function(e){return(0,r.default)(this.rootNode,e.getStartNode())},e.prototype.trimInlineElement=function(e){return e},e}();t.default=s},6754:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7676),o=n(8251),i=n(7070),a=n(8153),l=n(5269),s=n(9984),u=n(3526),d=n(2571),c=n(2513),f=function(){function e(e,t){this.scoper=e,this.skipTags=t,this.currentInline=null,this.currentBlock=null}return e.createBodyTraverser=function(t,n,o){return new e(new r.default(t,n))},e.createSelectionTraverser=function(t,n,r){return new e(new u.default(t,n),r)},e.createBlockTraverser=function(t,n,r,o){return void 0===r&&(r=3),new e(new s.default(t,n,r))},Object.defineProperty(e.prototype,"currentBlockElement",{get:function(){return this.currentBlock||(this.currentBlock=this.scoper.getStartBlockElement()),this.currentBlock},enumerable:!1,configurable:!0}),e.prototype.getNextBlockElement=function(){return this.getPreviousNextBlockElement(!0)},e.prototype.getPreviousBlockElement=function(){return this.getPreviousNextBlockElement(!1)},e.prototype.getPreviousNextBlockElement=function(e){var t=this.currentBlockElement;if(!t)return null;var n=(0,c.getLeafSibling)(this.scoper.rootNode,e?t.getEndNode():t.getStartNode(),e,this.skipTags),r=n?(0,i.default)(this.scoper.rootNode,n):null;return r&&this.scoper.isBlockInScope(r)&&(e&&r.isAfter(t)||!e&&t.isAfter(r))?(this.currentBlock=r,this.currentBlock):null},Object.defineProperty(e.prototype,"currentInlineElement",{get:function(){return this.currentInline||(this.currentInline=this.scoper.getStartInlineElement()),this.currentInline instanceof o.default?null:this.currentInline},enumerable:!1,configurable:!0}),e.prototype.getNextInlineElement=function(){return this.getPreviousNextInlineElement(!0)},e.prototype.getPreviousInlineElement=function(){return this.getPreviousNextInlineElement(!1)},e.prototype.getPreviousNextInlineElement=function(e){var t,n=this.currentInlineElement||this.currentInline;return n?(n instanceof o.default?(t=(0,d.getInlineElementBeforeAfter)(this.scoper.rootNode,n.getStartPosition(),e))&&!n.getParentBlock().contains(t.getContainerNode())&&(t=null):(t=function(e,t,n){if(!t)return null;if(t instanceof l.default){var r=n?t.nextInlineElement:t.previousInlineElement;if(r)return r}var o=t.getContainerNode();return o=(0,c.getLeafSibling)(e,o,n),(0,a.default)(e,o)}(this.scoper.rootNode,n,e),t=t&&n&&(e&&t.isAfter(n)||!e&&n.isAfter(t))?t:null),t&&(t=this.scoper.trimInlineElement(t))?(this.currentInline=t,this.currentInline):null):null},e}();t.default=f},6091:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754),o=n(8831),i=/[\s\u00A0\u200B\u3000]+([^\s\u00A0\u200B\u3000]*)$/i,a=function(){function e(e,t){this.rootNode=e,this.position=t,this.text="",this.word="",this.inlineBefore=null,this.inlineAfter=null,this.traverser=null,this.traversingComplete=!1,this.inlineElements=[],this.nearestNonTextInlineElement=null}return e.prototype.getWordBefore=function(){var e=this;return this.word||this.traverse((function(){return e.word})),this.word||""},e.prototype.getInlineElementBefore=function(){return this.inlineBefore||this.traverse(null),this.inlineBefore},e.prototype.getInlineElementAfter=function(){return this.inlineAfter||(this.inlineAfter=r.default.createBlockTraverser(this.rootNode,this.position).currentInlineElement),this.inlineAfter},e.prototype.getSubStringBefore=function(e){var t=this;return this.text.length=e})),this.text.substr(Math.max(0,this.text.length-e))},e.prototype.getRangeFromText=function(e,t){if(!e)return null;var n=null,r=null,i=e.length-1;return this.forEachTextInlineElement((function(o){for(var a=o.getTextContent()||"",l=a.length-1;l>=0&&i>=0;l--)if(e.charCodeAt(i)==a.charCodeAt(l))i--,r||(r=o.getStartPosition().move(l+1));else if(t||r)return!0;return-1==i&&(n=o.getStartPosition().move(l+1),!0)})),n&&r&&(0,o.default)(n,r)},e.prototype.forEachTextInlineElement=function(e){this.inlineElements.some(e)||this.traverse(e)},e.prototype.getNearestNonTextInlineElement=function(){var e=this;return this.nearestNonTextInlineElement||this.traverse((function(){return e.nearestNonTextInlineElement})),this.nearestNonTextInlineElement},e.prototype.traverse=function(e){if(this.traverser=this.traverser||r.default.createBlockTraverser(this.rootNode,this.position),this.traverser&&!this.traversingComplete)for(var t=this.traverser.getPreviousInlineElement();!this.traversingComplete;){if(this.inlineBefore=this.inlineBefore||t,!t||!t.isTextualInlineElement()){this.nearestNonTextInlineElement=t,this.traversingComplete=!0,this.word||(this.word=this.text);break}var n=t.getTextContent();if(!this.word){var o=i.exec(n);o&&2==o.length&&(this.word=o[1]+this.text)}if(this.text=n+this.text,this.inlineElements.push(t),e&&e(t))break;t=this.traverser.getPreviousInlineElement()}},e}();t.default=a},9984:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8251),o=n(7070),i=n(8153),a=n(8715),l=n(4630),s=n(5924),u=n(2571),d=n(7229),c=function(){function e(e,t,n){this.rootNode=e,this.startFrom=n,(0,s.default)(t,"Range")&&(t=l.default.getStart(t)),this.position=t.normalize(),this.block=(0,o.default)(this.rootNode,this.position.node)}return e.prototype.getStartBlockElement=function(){return this.block},e.prototype.getStartInlineElement=function(){if(this.block)switch(this.startFrom){case 0:case 1:case 2:return function(e,t){if(e instanceof a.default){var n=e.getStartNode();return t?(0,d.getFirstInlineElement)(n):(0,d.getLastInlineElement)(n)}return(0,i.default)(e,t?e.getStartNode():e.getEndNode())}(this.block,0==this.startFrom);case 3:var e=(0,u.getInlineElementAfter)(this.rootNode,this.position);return e&&this.block.contains(e.getContainerNode())?e:new r.default(this.position,this.block)}return null},e.prototype.isBlockInScope=function(e){return!(!this.block||!e)&&this.block.equals(e)},e.prototype.trimInlineElement=function(e){return this.block&&e&&this.block.contains(e.getContainerNode())?e:null},e}();t.default=c},3526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7070),o=n(5269),i=n(4630),a=n(2571),l=function(){function e(e,t){this.rootNode=e,this.startBlock=null,this.startInline=null,this.start=i.default.getStart(t).normalize(),this.end=i.default.getEnd(t).normalize()}return e.prototype.getStartBlockElement=function(){return this.startBlock||(this.startBlock=(0,r.default)(this.rootNode,this.start.node)),this.startBlock},e.prototype.getStartInlineElement=function(){return this.startInline||(this.startInline=this.trimInlineElement((0,a.getInlineElementAfter)(this.rootNode,this.start))),this.startInline},e.prototype.isBlockInScope=function(e){if(!e)return!1;var t=!1,n=this.getStartBlockElement();if(this.start.equalTo(this.end))t=!!n&&n.equals(e);else{var o=(0,r.default)(this.rootNode,this.end.node);t=!!n&&!!o&&(e.equals(n)||e.equals(o)||e.isAfter(n)&&o.isAfter(e))}return t},e.prototype.trimInlineElement=function(e){if(!e||this.start.equalTo(this.end))return null;var t=e.getStartPosition(),n=e.getEndPosition();if(t.isAfter(this.end)||this.start.isAfter(n))return null;var r=!1,i=!1;return this.start.isAfter(t)&&(t=this.start,r=!0),n.isAfter(this.end)&&(n=this.end,i=!0),t.isAfter(n)||t.equalTo(n)?null:r||i?new o.default(e,r?t:void 0,i?n:void 0):e},e}();t.default=l},8937:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDelimiterBefore=t.addDelimiterAfter=void 0;var r=n(7582),o=n(6935),i=n(3765),a="​";function l(e){return d(e,"entityDelimiterAfter")}function s(e){return d(e,"entityDelimiterBefore")}function u(e,t){return e&&(0,i.default)(e)&&e.classList.contains(t)?e:void 0}function d(e,t){var n=(0,o.default)({tag:"span",className:t,children:[a]},e.ownerDocument);if(n){var r="entityDelimiterAfter"==t?"afterend":"beforebegin";e.insertAdjacentElement(r,n)}return n}t.default=function(e){var t,n,o,i,a=(0,r.__read)((n=[],o=(t=e).nextElementSibling,i=t.previousElementSibling,n.push(u(o,"entityDelimiterAfter"),u(i,"entityDelimiterBefore")),n),2),d=a[0],c=a[1];return d||(d=l(e)),c||(c=s(e)),[d,c]},t.addDelimiterAfter=l,t.addDelimiterBefore=s},3765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e){return e&&(0,r.default)(e,"HTMLSpanElement")&&(e.classList.contains("entityDelimiterAfter")||e.classList.contains("entityDelimiterBefore"))&&"​"===e.textContent?e:null}},2738:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4984),o=n(8655),i=n(6754),a=n(8831),l=n(3598),s=n(7070),u=n(3408),d=n(1657),c=n(1431),f=n(8235),p=n(5672),v=n(1473),h=n(4731),g=n(4630),m=n(6091),y=n(8471),b=n(7409),C=n(8375),E=n(82),S=n(4251),T=n(9381),P="[contenteditable=false]",w=[function(e,t,n,r){var i,l,u=(0,s.default)(e,n.node);if(u){var c=(0,y.default)(e,"a[href]",null,1,(0,a.default)(n)).filter((function(e){return u.contains(e)}))[0];if(c&&(0,d.default)(c)&&(n=new g.default(c,-2),_(c),c=null),c&&(null===(i=t)||void 0===i?void 0:i.querySelector)&&(null===(l=t)||void 0===l?void 0:l.querySelector("a[href]"))){var f=n.normalize(),p=f.node.parentNode,v=3==f.node.nodeType?(0,b.default)(f.node,f.offset,!1):f.isAtEnd?f.node.nextSibling:f.node,h=e.ownerDocument.createTextNode("");for(p.insertBefore(h,v);h&&(0,o.default)(c,h);)h=(0,T.splitBalancedNodeRange)(h);h&&(n=new g.default(h,-2),_(h))}}return n},function(e,t,n,r){var o=t,i=!1;if(11==o.nodeType){i=!0;var a=(0,C.default)(o.childNodes).filter((function(e){return"BR"!=(0,u.default)(e)}));o=1==a.length?a[0]:null}var s=(0,u.default)(o),d=s&&o&&"BR"==(0,u.default)(o.nextSibling),f=(0,l.default)(n.node,e,"LI"),p=f&&(0,l.default)(f,e,"OL,UL"),m=(0,l.default)(n.node,e,"TD,TH");if("LI"==s&&(s=p?(0,u.default)(p):"UL",o=(0,S.default)(o,s)),("OL"==s||"UL"==s)&&o&&"LI"==(0,u.default)(o.firstChild)){var y=!o.firstChild.nextSibling&&!d;d&&o.parentNode&&_(o.nextSibling),y?((0,E.default)(o.firstChild),(0,E.default)(o)):(0,u.default)(p)==s&&((0,E.default)(o),n=new g.default(f,(0,c.default)(n,f)?-2:-3))}return i&&"TABLE"==s&&m&&((0,h.default)(m,o,n,r),n=new g.default(o,0),(0,v.default)(t)),n},function(e,t,n,o){if("P"==(0,u.default)(n.node)){var i=n.normalize(),a=(0,r.default)(n.node,"div");i.node!=a&&(n=i)}return n},function(e,t,n,r){return(0,f.default)(n.node)&&(n=new g.default(n.node,n.isAtEnd?-3:-2)),n},function(e,t,n,r){if(r&&r.collapsed){var o=new m.default(e,g.default.getStart(r)),i=o.getInlineElementBefore(),a=o.getInlineElementAfter();i instanceof p.default?n=new g.default(i.getContainerNode(),-3):a instanceof p.default&&(n=new g.default(a.getContainerNode(),-2))}return n},function e(t,n,r,o){var i;if(!(null===(i=r.element)||void 0===i?void 0:i.isContentEditable)){for(var a=void 0,s=(0,l.default)(r.node,t,P);s;)s=(null==(a=s)?void 0:a.parentElement)?(0,l.default)(a.parentElement,t,P):null;if(a)return e(t,n,r=new g.default(a,-3),o)}return r},function(e,t,n,r){if(1==t.childNodes.length&&"TABLE"==(0,u.default)(t.childNodes[0])||"TABLE"==(0,u.default)(t)){var o=n.element,s=new g.default(o,-2),d=(0,a.default)(s,n),c=i.default.createSelectionTraverser(e,d),f=c&&c.currentBlockElement;if(f){for(var p=f;!p;)(p=c.getNextBlockElement())&&(f=p);var v=null==f?void 0:f.getEndNode();if(v&&(0,l.default)(v,e,"TABLE")){var h=(0,a.default)(n);h.collapse(!1);var m=e.ownerDocument.createElement("br");h.insertNode(m),h=(0,a.default)(m),n=g.default.getEnd(h)}}}return n}];function _(e){var t;null===(t=null==e?void 0:e.parentNode)||void 0===t||t.removeChild(e)}t.default=function(e,t,n,r){return w.forEach((function(o){n=o(e,t,n,r)})),n}},3030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(8605),i=n(6688),a=n(8394),l=n(4539),s=n(2799),u=n(4630),d=n(8471),c=n(5924),f=n(7409);function p(e,t,n){var r,o;if((0,c.default)(e,"Text")){var i=(0,f.default)(e,t,n);return n?[i,e]:[e,i]}var a=e.childNodes[t-1],l=e.childNodes[t];if(a||l||(n?a=(l=e).previousSibling:l=(a=e).nextSibling),(a||l)&&(!a||!l)){var s=e.ownerDocument.createTextNode("");null===(o=null===(r=a||l)||void 0===r?void 0:r.parentNode)||void 0===o||o.insertBefore(s,l),a?l=s:a=s}return[a,l]}t.default=function(e,t){var n=null,f=(0,d.default)(e,"table,tr",null,2,t),v=(0,a.default)(e,t,0).map((function(e){var t=(0,l.default)(e);if(!t)return null;var a=t.startContainer,s=t.endContainer,u=t.startOffset,d=t.endOffset,v=t.commonAncestorContainer;if((0,c.default)(v,"HTMLElement")&&!v.isContentEditable)return null;var h=(0,r.__read)(p(s,d,!1),2),g=h[0],m=h[1],y=(0,r.__read)(p(a,u,!0),2),b=y[0],C=y[1];n=n||b;var E=(0,i.default)(e,[C,g]);return(0,o.default)(f,E),{region:e,beforeStart:b,afterEnd:m}})).filter((function(e){return!!e}));return f.forEach((function(e){var t;return(null===(t=e.parentElement)||void 0===t?void 0:t.isContentEditable)&&e.parentElement.removeChild(e)})),v.forEach((function(e){e&&(0,s.default)(e.region,e.beforeStart,e.afterEnd)})),n&&new u.default(n,-1)}},8606:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754);t.default=function(e){for(var t=r.default.createBodyTraverser(e),n=t&&t.currentBlockElement,o=[];n;)o.push(n.getTextContent()),n=t.getNextBlockElement();return o.join("\n")}},8839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="contenteditable";t.default=function(e,t,r,o){e&&(e.className="_Entity _EType_"+t+" "+(o?"_EId_"+o+" ":"")+"_EReadonly_"+(r?"1":"0"),r?e.contentEditable="false":e.getAttribute(n)&&e.removeAttribute(n))}},3032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreContentWithEntityPlaceholder=t.moveContentWithEntityPlaceholders=t.createEntityPlaceholder=void 0;var r=n(3726),o=n(4965),i=n(5924);function a(e,t){for(var n;e&&(!t||e!=t);){var r=e;e=e.nextSibling,null===(n=r.parentNode)||void 0===n||n.removeChild(r)}return e}function l(e,t){var n,o=(0,i.default)(t,"HTMLElement")&&t.classList.contains("_Entity")&&(null===(n=(0,r.default)(t))||void 0===n?void 0:n.id),a=o?null==e?void 0:e[o]:null;return a?(0,i.default)(a,"HTMLElement")?a:(null==a?void 0:a.canPersist)?a.element:null:null}function s(e,t){return t[e.id]=e.wrapper,e.wrapper.cloneNode(!0)}t.createEntityPlaceholder=function(e){var t=e.wrapper.ownerDocument.createElement("ENTITY-PLACEHOLDER");return t.id=e.id,t},t.moveContentWithEntityPlaceholders=function(e,t){for(var n=(0,o.default)(),a=e.ownerDocument.createDocumentFragment(),l=null,u=function(e){var o,u=e;l=e.nextSibling,(0,i.default)(e,"HTMLElement")&&((o=(0,r.default)(e))?u=s(o,t):e.querySelectorAll(n).forEach((function(e){var n;if(o=(0,r.default)(e)){var i=s(o,t);null===(n=e.parentNode)||void 0===n||n.replaceChild(i,e)}}))),a.appendChild(u)},d=e.firstChild;d;d=l)u(d);return a.normalize(),a},t.restoreContentWithEntityPlaceholder=function(e,t,n,r){for(var s=t.firstChild,u=(0,o.default)(),d=e.firstChild;d;){var c=d.nextSibling,f=l(n,d);if(f)(s=a(s,f))?s=s.nextSibling:t.appendChild(f);else{var p=r?d.cloneNode(!0):d;t.insertBefore(p,s),(0,i.default)(p,"HTMLElement")&&p.querySelectorAll(u).forEach((function(e){var t,r=l(n,e);r&&(null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e))}))}d=c}a(s)}},3726:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=!1,r="",o="",i=!1;return null===(t=null==e?void 0:e.className)||void 0===t||t.split(" ").forEach((function(e){"_Entity"==e?n=!0:0==e.indexOf("_EType_")?r=e.substr(7):0==e.indexOf("_EId_")?o=e.substr(5):0==e.indexOf("_EReadonly_")&&(i="1"==e.substr(11))})),n?{wrapper:e,id:o,type:r,isReadonly:i}:null}},4965:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return"._Entity"+(e?"._EType_"+e:"")+(t?"._EId_"+t:"")}},996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e&&e.eventDataCache&&e.eventDataCache.hasOwnProperty(t)?e.eventDataCache[t]:n();return e&&(e.eventDataCache=e.eventDataCache||{},e.eventDataCache[t]=r),r}},2924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e&&e.eventDataCache&&(t&&e.eventDataCache.hasOwnProperty(t)?delete e.eventDataCache[t]:t||(e.eventDataCache={}))}},7254:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1045);t.default=function(e){return!(0,r.default)(e)&&!!e.key&&1==e.key.length}},5188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(246).Browser.isMac?function(e){return e.metaKey}:function(e){return e.ctrlKey};t.default=function(e){return r(e)}},1045:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.ctrlKey||"Control"===e.key,n=e.altKey||"Alt"===e.key,r=e.metaKey||"Meta"===e.key;return t||n||r}},8488:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4984),i=n(623),a=n(4709),l=n(4869),s=n(359),u=n(3408),d=n(5924),c=n(6092),f=n(8375),p=n(9420),v=n(5097),h=n(2374),g=function(){function e(e){e=e||{},this.elementCallbacks=(0,p.cloneObject)(e.elementCallbacks),this.styleCallbacks=(0,h.getStyleCallbacks)(e.cssStyleCallbacks),this.attributeCallbacks=(0,p.cloneObject)(e.attributeCallbacks),this.tagReplacements=(0,h.getTagReplacement)(e.additionalTagReplacements),this.allowedAttributes=(0,h.getAllowedAttributes)(e.additionalAllowedAttributes),this.allowedCssClassesRegex=(0,h.getAllowedCssClassesRegex)(e.additionalAllowedCssClasses),this.defaultStyleValues=(0,h.getDefaultStyleValues)(e.additionalDefaultStyleValues),this.additionalPredefinedCssForElement=e.additionalPredefinedCssForElement||null,this.additionalGlobalStyleNodes=e.additionalGlobalStyleNodes||[],this.preserveHtmlComments=e.preserveHtmlComments||!1,this.unknownTagReplacement=e.unknownTagReplacement||null}return e.convertInlineCss=function(t,n){return new e({additionalGlobalStyleNodes:n}).exec(t,!0)},e.sanitizeHtml=function(t,n){var r=new e(n=n||{}),o=(0,d.default)(n.currentElementOrStyle,"HTMLElement")?(0,i.default)(n.currentElementOrStyle):n.currentElementOrStyle;return r.exec(t,n.convertCssOnly,o)},e.prototype.exec=function(e,t,n){var r=(new DOMParser).parseFromString(e||"","text/html");return r&&r.body&&r.body.firstChild&&(this.convertGlobalCssToInlineCss(r),t||this.sanitize(r.body,n)),r&&r.body&&r.body.innerHTML||""},e.prototype.sanitize=function(e,t){if(!e)return"";t=(0,p.cloneObject)(t,(0,i.default)(null)),this.processNode(e,t,{})},e.prototype.convertGlobalCssToInlineCss=function(e){var t,n,o=(0,f.default)(e.querySelectorAll("style")),i=this.additionalGlobalStyleNodes.reverse().map((function(e){return e.sheet})).concat(o.map((function(e){return e.sheet})).reverse()).filter((function(e){return e}));try{for(var a=(0,r.__values)(i),l=a.next();!l.done;l=a.next())for(var s=l.value,u=function(t){var n,o,i=s.cssRules[t],a=i&&i.style?i.style.cssText:null;if(i.type!=CSSRule.STYLE_RULE||!a||!i.selectorText)return"continue";try{for(var l=(n=void 0,(0,r.__values)(i.selectorText.split(","))),u=l.next();!u.done;u=l.next()){var d=u.value;!d||!d.trim()||d.indexOf(":")>=0||(0,f.default)(e.querySelectorAll(d)).forEach((function(e){return e.setAttribute("style",a+(e.getAttribute("style")||""))}))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}},d=s.cssRules.length-1;d>=0;d--)u(d)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}o.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},e.prototype.processNode=function(e,t,n){var r,i=e.nodeType,a=1==i,l=3==i,s=11==i,d=8==i,c=!1;if(a){var f=(0,u.default)(e),v=this.elementCallbacks[f],h=this.tagReplacements[f.toLowerCase()];void 0===h&&(h=this.unknownTagReplacement),v?c=v(e,n):f.indexOf(":")>0||f==h||"*"==h?c=!0:h&&/^[a-zA-Z][\w\-]*$/.test(h)&&(e=(0,o.default)(e,h),c=!0)}else if(l){var g=t["white-space"];c="pre"==g||"pre-line"==g||"pre-wrap"==g||!/^[\r\n]*$/g.test(e.nodeValue||"")}else c=!!s||!!d&&this.preserveHtmlComments;if(c)if(!l||"pre"!=t["white-space"]&&"pre-wrap"!=t["white-space"]){if(a||s){var m=(0,p.cloneObject)(t),y=e;a&&(this.processAttributes(y,n),this.preprocessCss(y,m),this.processCss(y,m,n));for(var b=y.firstChild,C=void 0;b;b=C)C=b.nextSibling,this.processNode(b,m,n)}}else e.nodeValue=(e.nodeValue||"").replace(/^ /gm," ").replace(/ {2}/g,"  ");else null===(r=e.parentNode)||void 0===r||r.removeChild(e)},e.prototype.preprocessCss=function(e,t){var n=(0,l.default)(e,this.additionalPredefinedCssForElement);n&&(0,a.default)(n).forEach((function(e){t[e]=n[e]}))},e.prototype.processCss=function(e,t,n){var r=this,o=(0,s.default)(e);(0,a.default)(o).forEach((function(i){var a=o[i],l=r.styleCallbacks[i],s=null!=t[i],u=!0;u&&l&&(u=l(a,e,t,n)),u&&(0,v.isCssVariable)(a)&&(u=!!(a=(0,v.processCssVariable)(a))),(u=u&&"inherit"!=a&&a.indexOf("expression")<0&&"-"!=i.substr(0,1)&&r.defaultStyleValues[i]!=a&&(s&&a!=t[i]||!s&&"initial"!=a&&"normal"!=a))&&s&&(t[i]=a),u?o[i]=a:delete o[i]})),(0,c.default)(e,o)},e.prototype.processAttributes=function(e,t){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n],o=r.name.toLowerCase().trim(),i=r.value,a=this.attributeCallbacks[o],l=a?a(i,e,t):this.allowedAttributes.indexOf(o)>=0||0==o.indexOf("data-")?i:null;"class"==o&&this.allowedCssClassesRegex&&(l=this.processCssClass(i,l)),null==l||l.match(/s\n*c\n*r\n*i\n*p\n*t\n*:/i)?e.removeAttribute(o):r.value=l}},e.prototype.processCssClass=function(e,t){var n=this,r=e?e.split(" "):[],o=t?t.split(" "):[];return r.forEach((function(e){var t;(null===(t=n.allowedCssClassesRegex)||void 0===t?void 0:t.test(e))&&o.indexOf(e)<0&&o.push(e)})),(null==o?void 0:o.length)>0?o.join(" "):null},e}();t.default=g},585:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);t.default=function(e,t,n){if(e[t]){var o=e[t];e[t]=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cloneObject=void 0;var r=n(7582),o=n(4709),i=Object.assign?function(e,t){return Object.assign(t||{},e)}:function(e,t){var n,i,a=t||{};if(e)try{for(var l=(0,r.__values)((0,o.default)(e)),s=l.next();!s.done;s=l.next()){var u=s.value;a[u]=e[u]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return a};t.cloneObject=function(e,t){return i(e,t)}},4834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{elementCallbacks:{},attributeCallbacks:{},cssStyleCallbacks:{},additionalTagReplacements:{},additionalAllowedAttributes:[],additionalAllowedCssClasses:[],additionalDefaultStyleValues:{},additionalGlobalStyleNodes:[],additionalPredefinedCssForElement:{},preserveHtmlComments:!1,unknownTagReplacement:null}}},2374:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStyleCallbacks=t.getDefaultStyleValues=t.getAllowedCssClassesRegex=t.getAllowedAttributes=t.getTagReplacement=void 0;var r=n(7582),o=n(4709),i=n(9420),a={a:"*",abbr:"*",address:"*",area:"*",article:"*",aside:"*",b:"*",bdi:"*",bdo:"*",blockquote:"*",body:"*",br:"*",button:"*",canvas:"*",caption:"*",center:"*",cite:"*",code:"*",col:"*",colgroup:"*",data:"*",datalist:"*",dd:"*",del:"*",details:"*",dfn:"*",dialog:"*",dir:"*",div:"*",dl:"*",dt:"*",em:"*",fieldset:"*",figcaption:"*",figure:"*",font:"*",footer:"*",h1:"*",h2:"*",h3:"*",h4:"*",h5:"*",h6:"*",head:"*",header:"*",hgroup:"*",hr:"*",html:"*",i:"*",img:"*",input:"*",ins:"*",kbd:"*",label:"*",legend:"*",li:"*",main:"*",map:"*",mark:"*",menu:"*",menuitem:"*",meter:"*",nav:"*",ol:"*",optgroup:"*",option:"*",output:"*",p:"*",picture:"*",pre:"*",progress:"*",q:"*",rp:"*",rt:"*",ruby:"*",s:"*",samp:"*",section:"*",select:"*",small:"*",span:"*",strike:"*",strong:"*",sub:"*",summary:"*",sup:"*",table:"*",tbody:"*",td:"*",textarea:"*",tfoot:"*",th:"*",thead:"*",time:"*",tr:"*",tt:"*",u:"*",ul:"*",var:"*",wbr:"*",xmp:"*",form:"SPAN",applet:null,audio:null,base:null,basefont:null,embed:null,frame:null,frameset:null,iframe:null,link:null,meta:null,noscript:null,object:null,param:null,script:null,slot:null,source:null,style:null,template:null,title:null,track:null,video:null},l="accept,align,alt,checked,cite,color,cols,colspan,contextmenu,coords,datetime,default,dir,dirname,disabled,download,face,headers,height,hidden,high,href,hreflang,ismap,kind,label,lang,list,low,max,maxlength,media,min,multiple,open,optimum,pattern,placeholder,readonly,rel,required,reversed,rows,rowspan,scope,selected,shape,size,sizes,span,spellcheck,src,srclang,srcset,start,step,style,tabindex,target,title,translate,type,usemap,valign,value,width,wrap,bgColor".split(","),s={"background-color":"transparent","border-bottom-color":"rgb(0, 0, 0)","border-bottom-style":"none","border-bottom-width":"0px","border-image-outset":"0","border-image-repeat":"stretch","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-left-color":"rgb(0, 0, 0)","border-left-style":"none","border-left-width":"0px","border-right-color":"rgb(0, 0, 0)","border-right-style":"none","border-right-width":"0px","border-top-color":"rgb(0, 0, 0)","border-top-style":"none","border-top-width":"0px","outline-color":"transparent","outline-style":"none","outline-width":"0px",overflow:"visible","-webkit-text-stroke-width":"0px","word-wrap":"break-word","margin-left":"0px","margin-right":"0px",padding:"0px","padding-top":"0px","padding-left":"0px","padding-right":"0px","padding-bottom":"0px",border:"0px","border-top":"0px","border-left":"0px","border-right":"0px","border-bottom":"0px","vertical-align":"baseline",float:"none"},u=[];function d(){return null}function c(e,t){var n=t.tagName;return!("LI"==n||"DIV"==n)}t.getTagReplacement=function(e){var t=(0,r.__assign)({},a),n=e||{};return(0,o.default)(n).forEach((function(e){e&&(t[e.toLowerCase()]=n[e])})),t},t.getAllowedAttributes=function(e){return(t=l.concat(e||[]),t.filter((function(e,t,n){return n.indexOf(e)==t}))).map((function(e){return e.toLocaleLowerCase()}));var t},t.getAllowedCssClassesRegex=function(e){var t=u.concat(e||[]);return t.length>0?new RegExp(t.join("|")):null},t.getDefaultStyleValues=function(e){var t=(0,i.cloneObject)(s);return e&&Object.keys(e).forEach((function(n){var r=e[n];null!=r?t[n]=r:delete t[n]})),t},t.getStyleCallbacks=function(e){var t=(0,i.cloneObject)(e);return t.position=t.position||d,t.width=t.width||c,t}},623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="border-spacing,caption-side,color,cursor,direction,empty-cells,font-family,font-size,font-style,font-variant,font-weight,font,letter-spacing,line-height,list-style-image,list-style-position,list-style-type,list-style,orphans,quotes,text-align,text-indent,text-transform,visibility,white-space,widows,word-spacing".split(",");t.default=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView,r=t&&e&&t.getComputedStyle(e),o={};return n.forEach((function(e){return o[e]=r&&r.getPropertyValue(e)||""})),o}},4869:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o={B:{"font-weight":"bold"},EM:{"font-style":"italic"},I:{"font-style":"italic"},U:{"text-decoration":"underline"},P:{"margin-top":"1em","margin-bottom":"1em"},PRE:{"white-space":"pre"},S:{"text-decoration":"line-through"},STRIKE:{"text-decoration":"line-through"},SUB:{"vertical-align":"sub","font-size":"smaller"},SUP:{"vertical-align":"super","font-size":"smaller"}};t.default=function(e,t){var n=(0,r.default)(e);return o[n]||(t||{})[n]}},5097:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCssVariable=t.processCssVariable=void 0;var n=/^\s*var\(\s*[a-zA-Z0-9-_]+\s*(,\s*(.*))?\)\s*$/;t.processCssVariable=function(e){var t=n.exec(e);return(null==t?void 0:t[2])||""},t.isCssVariable=function(e){return 0==e.indexOf("var(")}},6344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitTextNode=t.getLastLeafNode=t.getFirstLeafNode=t.getPreviousLeafSibling=t.getNextLeafSibling=t.wrap=t.unwrap=t.splitBalancedNodeRange=t.splitParentNode=t.queryElements=t.matchLink=t.isVoidHtmlElement=t.isNodeEmpty=t.isBlockElement=t.getTagOfNode=t.PendableFormatCommandMap=t.getPendableFormatState=t.getComputedStyle=t.getComputedStyles=t.fromHtml=t.findClosestElementAncestor=t.contains=t.collapseNodes=t.changeElementTag=t.applyFormat=t.getBrowserInfo=t.Browser=t.getPasteType=t.sanitizePasteContent=t.retrieveMetadataFromClipboard=t.handleTextPaste=t.handleImagePaste=t.createFragmentFromClipboardData=t.extractClipboardItemsForIE=t.extractClipboardItems=t.extractClipboardEvent=t.applyTextStyle=t.PartialInlineElement=t.NodeInlineElement=t.LinkInlineElement=t.ImageInlineElement=t.getInlineElementAtNode=t.getDelimiterFromElement=t.addDelimiterBefore=t.addDelimiterAfter=t.addDelimiters=t.PositionContentSearcher=t.ContentTraverser=t.getFirstLastBlockElement=t.getBlockElementAtNode=void 0,t.chainSanitizerCallback=t.createDefaultHtmlSanitizerOptions=t.getInheritableStyles=t.HtmlSanitizer=t.canUndoAutoComplete=t.createSnapshots=t.moveCurrentSnapsnot=t.moveCurrentSnapshot=t.clearProceedingSnapshotsV2=t.clearProceedingSnapshots=t.canMoveCurrentSnapshot=t.addSnapshotV2=t.addSnapshot=t.addRangeToSelection=t.extractContentMetadata=t.setHtmlWithMetadata=t.setHtmlWithSelectionPath=t.getHtmlWithSelectionPath=t.getSelectionPath=t.isPositionAtBeginningOf=t.getPositionRect=t.createRange=t.Position=t.mergeBlocksInRegion=t.getSelectionRangeInRegion=t.isNodeInRegion=t.collapseNodesInRegion=t.getSelectedBlockElementsInRegion=t.getRegionsFromRange=t.saveTableCellMetadata=t.getTableFormatInfo=t.setListItemStyle=t.VListChain=t.createVListFromRegion=t.VListItem=t.VList=t.isWholeTableSelected=t.VTable=t.parseColor=t.isNodeAfter=t.getIntersectedRect=t.moveChildNodes=t.KnownCreateElementData=t.createElement=t.matchesSelector=t.setColor=t.getInnerHTML=t.readFile=t.safeInstanceOf=t.normalizeRect=void 0,t.getPasteSource=t.toArray=t.getObjectKeys=t.arrayPush=t.removeMetadata=t.setMetadata=t.getMetadata=t.createObjectDefinition=t.createArrayDefinition=t.createStringDefinition=t.createBooleanDefinition=t.createNumberDefinition=t.validate=t.getTextContent=t.deleteSelectedContent=t.adjustInsertPosition=t.removeGlobalCssStyle=t.setGlobalCssStyles=t.removeImportantStyleRule=t.setStyles=t.getStyles=t.isCtrlOrMetaPressed=t.isCharacterValue=t.isModifierKey=t.clearEventDataCache=t.cacheGetEventData=t.restoreContentWithEntityPlaceholder=t.moveContentWithEntityPlaceholders=t.createEntityPlaceholder=t.getEntitySelector=t.getEntityFromElement=t.commitEntity=void 0;var r=n(7070);Object.defineProperty(t,"getBlockElementAtNode",{enumerable:!0,get:function(){return r.default}});var o=n(1306);Object.defineProperty(t,"getFirstLastBlockElement",{enumerable:!0,get:function(){return o.default}});var i=n(6754);Object.defineProperty(t,"ContentTraverser",{enumerable:!0,get:function(){return i.default}});var a=n(6091);Object.defineProperty(t,"PositionContentSearcher",{enumerable:!0,get:function(){return a.default}});var l=n(8937);Object.defineProperty(t,"addDelimiters",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"addDelimiterAfter",{enumerable:!0,get:function(){return l.addDelimiterAfter}}),Object.defineProperty(t,"addDelimiterBefore",{enumerable:!0,get:function(){return l.addDelimiterBefore}});var s=n(3765);Object.defineProperty(t,"getDelimiterFromElement",{enumerable:!0,get:function(){return s.default}});var u=n(8153);Object.defineProperty(t,"getInlineElementAtNode",{enumerable:!0,get:function(){return u.default}});var d=n(271);Object.defineProperty(t,"ImageInlineElement",{enumerable:!0,get:function(){return d.default}});var c=n(5672);Object.defineProperty(t,"LinkInlineElement",{enumerable:!0,get:function(){return c.default}});var f=n(8797);Object.defineProperty(t,"NodeInlineElement",{enumerable:!0,get:function(){return f.default}});var p=n(5269);Object.defineProperty(t,"PartialInlineElement",{enumerable:!0,get:function(){return p.default}});var v=n(140);Object.defineProperty(t,"applyTextStyle",{enumerable:!0,get:function(){return v.default}});var h=n(1545);Object.defineProperty(t,"extractClipboardEvent",{enumerable:!0,get:function(){return h.default}});var g=n(3877);Object.defineProperty(t,"extractClipboardItems",{enumerable:!0,get:function(){return g.default}});var m=n(6960);Object.defineProperty(t,"extractClipboardItemsForIE",{enumerable:!0,get:function(){return m.default}});var y=n(1851);Object.defineProperty(t,"createFragmentFromClipboardData",{enumerable:!0,get:function(){return y.default}});var b=n(8736);Object.defineProperty(t,"handleImagePaste",{enumerable:!0,get:function(){return b.default}});var C=n(2543);Object.defineProperty(t,"handleTextPaste",{enumerable:!0,get:function(){return C.default}});var E=n(5673);Object.defineProperty(t,"retrieveMetadataFromClipboard",{enumerable:!0,get:function(){return E.default}});var S=n(5216);Object.defineProperty(t,"sanitizePasteContent",{enumerable:!0,get:function(){return S.default}});var T=n(351);Object.defineProperty(t,"getPasteType",{enumerable:!0,get:function(){return T.default}});var P=n(246);Object.defineProperty(t,"Browser",{enumerable:!0,get:function(){return P.Browser}}),Object.defineProperty(t,"getBrowserInfo",{enumerable:!0,get:function(){return P.getBrowserInfo}});var w=n(5400);Object.defineProperty(t,"applyFormat",{enumerable:!0,get:function(){return w.default}});var _=n(4984);Object.defineProperty(t,"changeElementTag",{enumerable:!0,get:function(){return _.default}});var O=n(8053);Object.defineProperty(t,"collapseNodes",{enumerable:!0,get:function(){return O.default}});var M=n(8655);Object.defineProperty(t,"contains",{enumerable:!0,get:function(){return M.default}});var D=n(3598);Object.defineProperty(t,"findClosestElementAncestor",{enumerable:!0,get:function(){return D.default}});var L=n(5023);Object.defineProperty(t,"fromHtml",{enumerable:!0,get:function(){return L.default}});var R=n(7695);Object.defineProperty(t,"getComputedStyles",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"getComputedStyle",{enumerable:!0,get:function(){return R.getComputedStyle}});var A=n(3764);Object.defineProperty(t,"getPendableFormatState",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"PendableFormatCommandMap",{enumerable:!0,get:function(){return A.PendableFormatCommandMap}});var I=n(3408);Object.defineProperty(t,"getTagOfNode",{enumerable:!0,get:function(){return I.default}});var x=n(5499);Object.defineProperty(t,"isBlockElement",{enumerable:!0,get:function(){return x.default}});var N=n(1657);Object.defineProperty(t,"isNodeEmpty",{enumerable:!0,get:function(){return N.default}});var k=n(8235);Object.defineProperty(t,"isVoidHtmlElement",{enumerable:!0,get:function(){return k.default}});var j=n(844);Object.defineProperty(t,"matchLink",{enumerable:!0,get:function(){return j.default}});var B=n(8471);Object.defineProperty(t,"queryElements",{enumerable:!0,get:function(){return B.default}});var F=n(9381);Object.defineProperty(t,"splitParentNode",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"splitBalancedNodeRange",{enumerable:!0,get:function(){return F.splitBalancedNodeRange}});var H=n(82);Object.defineProperty(t,"unwrap",{enumerable:!0,get:function(){return H.default}});var z=n(4251);Object.defineProperty(t,"wrap",{enumerable:!0,get:function(){return z.default}});var U=n(2513);Object.defineProperty(t,"getNextLeafSibling",{enumerable:!0,get:function(){return U.getNextLeafSibling}}),Object.defineProperty(t,"getPreviousLeafSibling",{enumerable:!0,get:function(){return U.getPreviousLeafSibling}});var K=n(4061);Object.defineProperty(t,"getFirstLeafNode",{enumerable:!0,get:function(){return K.getFirstLeafNode}}),Object.defineProperty(t,"getLastLeafNode",{enumerable:!0,get:function(){return K.getLastLeafNode}});var W=n(7409);Object.defineProperty(t,"splitTextNode",{enumerable:!0,get:function(){return W.default}});var V=n(5203);Object.defineProperty(t,"normalizeRect",{enumerable:!0,get:function(){return V.default}});var q=n(5924);Object.defineProperty(t,"safeInstanceOf",{enumerable:!0,get:function(){return q.default}});var G=n(3126);Object.defineProperty(t,"readFile",{enumerable:!0,get:function(){return G.default}});var Y=n(4746);Object.defineProperty(t,"getInnerHTML",{enumerable:!0,get:function(){return Y.default}});var X=n(7727);Object.defineProperty(t,"setColor",{enumerable:!0,get:function(){return X.default}});var Z=n(5010);Object.defineProperty(t,"matchesSelector",{enumerable:!0,get:function(){return Z.default}});var $=n(6935);Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(t,"KnownCreateElementData",{enumerable:!0,get:function(){return $.KnownCreateElementData}});var Q=n(1473);Object.defineProperty(t,"moveChildNodes",{enumerable:!0,get:function(){return Q.default}});var J=n(3798);Object.defineProperty(t,"getIntersectedRect",{enumerable:!0,get:function(){return J.default}});var ee=n(6997);Object.defineProperty(t,"isNodeAfter",{enumerable:!0,get:function(){return ee.default}});var te=n(8121);Object.defineProperty(t,"parseColor",{enumerable:!0,get:function(){return te.default}});var ne=n(8094);Object.defineProperty(t,"VTable",{enumerable:!0,get:function(){return ne.default}});var re=n(8570);Object.defineProperty(t,"isWholeTableSelected",{enumerable:!0,get:function(){return re.default}});var oe=n(64);Object.defineProperty(t,"VList",{enumerable:!0,get:function(){return oe.default}});var ie=n(711);Object.defineProperty(t,"VListItem",{enumerable:!0,get:function(){return ie.default}});var ae=n(7909);Object.defineProperty(t,"createVListFromRegion",{enumerable:!0,get:function(){return ae.default}});var le=n(4327);Object.defineProperty(t,"VListChain",{enumerable:!0,get:function(){return le.default}});var se=n(3339);Object.defineProperty(t,"setListItemStyle",{enumerable:!0,get:function(){return se.default}});var ue=n(4711);Object.defineProperty(t,"getTableFormatInfo",{enumerable:!0,get:function(){return ue.getTableFormatInfo}});var de=n(3606);Object.defineProperty(t,"saveTableCellMetadata",{enumerable:!0,get:function(){return de.saveTableCellMetadata}});var ce=n(8394);Object.defineProperty(t,"getRegionsFromRange",{enumerable:!0,get:function(){return ce.default}});var fe=n(531);Object.defineProperty(t,"getSelectedBlockElementsInRegion",{enumerable:!0,get:function(){return fe.default}});var pe=n(6688);Object.defineProperty(t,"collapseNodesInRegion",{enumerable:!0,get:function(){return pe.default}});var ve=n(4794);Object.defineProperty(t,"isNodeInRegion",{enumerable:!0,get:function(){return ve.default}});var he=n(4539);Object.defineProperty(t,"getSelectionRangeInRegion",{enumerable:!0,get:function(){return he.default}});var ge=n(2799);Object.defineProperty(t,"mergeBlocksInRegion",{enumerable:!0,get:function(){return ge.default}});var me=n(4630);Object.defineProperty(t,"Position",{enumerable:!0,get:function(){return me.default}});var ye=n(8831);Object.defineProperty(t,"createRange",{enumerable:!0,get:function(){return ye.default}});var be=n(5473);Object.defineProperty(t,"getPositionRect",{enumerable:!0,get:function(){return be.default}});var Ce=n(1431);Object.defineProperty(t,"isPositionAtBeginningOf",{enumerable:!0,get:function(){return Ce.default}});var Ee=n(8805);Object.defineProperty(t,"getSelectionPath",{enumerable:!0,get:function(){return Ee.default}});var Se=n(9372);Object.defineProperty(t,"getHtmlWithSelectionPath",{enumerable:!0,get:function(){return Se.default}});var Te=n(4477);Object.defineProperty(t,"setHtmlWithSelectionPath",{enumerable:!0,get:function(){return Te.default}}),Object.defineProperty(t,"setHtmlWithMetadata",{enumerable:!0,get:function(){return Te.setHtmlWithMetadata}}),Object.defineProperty(t,"extractContentMetadata",{enumerable:!0,get:function(){return Te.extractContentMetadata}});var Pe=n(5537);Object.defineProperty(t,"addRangeToSelection",{enumerable:!0,get:function(){return Pe.default}});var we=n(3680);Object.defineProperty(t,"addSnapshot",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(t,"addSnapshotV2",{enumerable:!0,get:function(){return we.addSnapshotV2}});var _e=n(3205);Object.defineProperty(t,"canMoveCurrentSnapshot",{enumerable:!0,get:function(){return _e.default}});var Oe=n(5892);Object.defineProperty(t,"clearProceedingSnapshots",{enumerable:!0,get:function(){return Oe.default}}),Object.defineProperty(t,"clearProceedingSnapshotsV2",{enumerable:!0,get:function(){return Oe.clearProceedingSnapshotsV2}});var Me=n(5105);Object.defineProperty(t,"moveCurrentSnapshot",{enumerable:!0,get:function(){return Me.default}}),Object.defineProperty(t,"moveCurrentSnapsnot",{enumerable:!0,get:function(){return Me.moveCurrentSnapsnot}});var De=n(7424);Object.defineProperty(t,"createSnapshots",{enumerable:!0,get:function(){return De.default}});var Le=n(6687);Object.defineProperty(t,"canUndoAutoComplete",{enumerable:!0,get:function(){return Le.default}});var Re=n(8488);Object.defineProperty(t,"HtmlSanitizer",{enumerable:!0,get:function(){return Re.default}});var Ae=n(623);Object.defineProperty(t,"getInheritableStyles",{enumerable:!0,get:function(){return Ae.default}});var Ie=n(4834);Object.defineProperty(t,"createDefaultHtmlSanitizerOptions",{enumerable:!0,get:function(){return Ie.default}});var xe=n(585);Object.defineProperty(t,"chainSanitizerCallback",{enumerable:!0,get:function(){return xe.default}});var Ne=n(8839);Object.defineProperty(t,"commitEntity",{enumerable:!0,get:function(){return Ne.default}});var ke=n(3726);Object.defineProperty(t,"getEntityFromElement",{enumerable:!0,get:function(){return ke.default}});var je=n(4965);Object.defineProperty(t,"getEntitySelector",{enumerable:!0,get:function(){return je.default}});var Be=n(3032);Object.defineProperty(t,"createEntityPlaceholder",{enumerable:!0,get:function(){return Be.createEntityPlaceholder}}),Object.defineProperty(t,"moveContentWithEntityPlaceholders",{enumerable:!0,get:function(){return Be.moveContentWithEntityPlaceholders}}),Object.defineProperty(t,"restoreContentWithEntityPlaceholder",{enumerable:!0,get:function(){return Be.restoreContentWithEntityPlaceholder}});var Fe=n(996);Object.defineProperty(t,"cacheGetEventData",{enumerable:!0,get:function(){return Fe.default}});var He=n(2924);Object.defineProperty(t,"clearEventDataCache",{enumerable:!0,get:function(){return He.default}});var ze=n(1045);Object.defineProperty(t,"isModifierKey",{enumerable:!0,get:function(){return ze.default}});var Ue=n(7254);Object.defineProperty(t,"isCharacterValue",{enumerable:!0,get:function(){return Ue.default}});var Ke=n(5188);Object.defineProperty(t,"isCtrlOrMetaPressed",{enumerable:!0,get:function(){return Ke.default}});var We=n(359);Object.defineProperty(t,"getStyles",{enumerable:!0,get:function(){return We.default}});var Ve=n(6092);Object.defineProperty(t,"setStyles",{enumerable:!0,get:function(){return Ve.default}});var qe=n(9130);Object.defineProperty(t,"removeImportantStyleRule",{enumerable:!0,get:function(){return qe.default}});var Ge=n(8182);Object.defineProperty(t,"setGlobalCssStyles",{enumerable:!0,get:function(){return Ge.default}});var Ye=n(4136);Object.defineProperty(t,"removeGlobalCssStyle",{enumerable:!0,get:function(){return Ye.default}});var Xe=n(2738);Object.defineProperty(t,"adjustInsertPosition",{enumerable:!0,get:function(){return Xe.default}});var Ze=n(3030);Object.defineProperty(t,"deleteSelectedContent",{enumerable:!0,get:function(){return Ze.default}});var $e=n(8606);Object.defineProperty(t,"getTextContent",{enumerable:!0,get:function(){return $e.default}});var Qe=n(2373);Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return Qe.default}});var Je=n(681);Object.defineProperty(t,"createNumberDefinition",{enumerable:!0,get:function(){return Je.createNumberDefinition}}),Object.defineProperty(t,"createBooleanDefinition",{enumerable:!0,get:function(){return Je.createBooleanDefinition}}),Object.defineProperty(t,"createStringDefinition",{enumerable:!0,get:function(){return Je.createStringDefinition}}),Object.defineProperty(t,"createArrayDefinition",{enumerable:!0,get:function(){return Je.createArrayDefinition}}),Object.defineProperty(t,"createObjectDefinition",{enumerable:!0,get:function(){return Je.createObjectDefinition}});var et=n(7570);Object.defineProperty(t,"getMetadata",{enumerable:!0,get:function(){return et.getMetadata}}),Object.defineProperty(t,"setMetadata",{enumerable:!0,get:function(){return et.setMetadata}}),Object.defineProperty(t,"removeMetadata",{enumerable:!0,get:function(){return et.removeMetadata}});var tt=n(8605);Object.defineProperty(t,"arrayPush",{enumerable:!0,get:function(){return tt.default}});var nt=n(4709);Object.defineProperty(t,"getObjectKeys",{enumerable:!0,get:function(){return nt.default}});var rt=n(8375);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return rt.default}});var ot=n(6433);Object.defineProperty(t,"getPasteSource",{enumerable:!0,get:function(){return ot.default}})},8251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.position=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return""},e.prototype.getContainerNode=function(){return this.position.node},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return this.position},e.prototype.getEndPosition=function(){return this.position},e.prototype.isAfter=function(e){return e&&this.position.isAfter(e.getEndPosition())},e.prototype.isTextualInlineElement=function(){return!1},e.prototype.contains=function(e){return!1},e.prototype.applyStyle=function(e){},e}();t.default=n},271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e){function t(t,n){return e.call(this,t,n)||this}return(0,r.__extends)(t,e),t}(n(8797).default);t.default=o},5672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e){function t(t,n){return e.call(this,t,n)||this}return(0,r.__extends)(t,e),t}(n(8797).default);t.default=o},8797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(140),o=n(6997),i=n(4630),a=function(){function e(e,t){this.containerNode=e,this.parentBlock=t}return e.prototype.getTextContent=function(){return(3==this.containerNode.nodeType?this.containerNode.nodeValue:this.containerNode.textContent)||""},e.prototype.getContainerNode=function(){return this.containerNode},e.prototype.getParentBlock=function(){return this.parentBlock},e.prototype.getStartPosition=function(){return new i.default(this.containerNode,0).normalize()},e.prototype.getEndPosition=function(){return new i.default(this.containerNode,-1).normalize()},e.prototype.isTextualInlineElement=function(){return this.containerNode&&3==this.containerNode.nodeType},e.prototype.isAfter=function(e){return e&&(0,o.default)(this.containerNode,e.getContainerNode())},e.prototype.contains=function(e){var t=this.getStartPosition(),n=this.getEndPosition();return e&&e.isAfter(t)&&n.isAfter(e)},e.prototype.applyStyle=function(e){(0,r.default)(this.containerNode,e)},e}();t.default=a},5269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(140),o=n(8831),i=n(4630),a=n(2513),l=function(){function e(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.inlineElement=e,this.start=t,this.end=n}return e.prototype.getDecoratedInline=function(){return this.inlineElement},e.prototype.getContainerNode=function(){return this.inlineElement.getContainerNode()},e.prototype.getParentBlock=function(){return this.inlineElement.getParentBlock()},e.prototype.getTextContent=function(){return(0,o.default)(this.getStartPosition(),this.getEndPosition()).toString()},e.prototype.getStartPosition=function(){return this.start||this.inlineElement.getStartPosition()},e.prototype.getEndPosition=function(){return this.end||this.inlineElement.getEndPosition()},Object.defineProperty(e.prototype,"nextInlineElement",{get:function(){return this.end?new e(this.inlineElement,this.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousInlineElement",{get:function(){return this.start?new e(this.inlineElement,void 0,this.start):null},enumerable:!1,configurable:!0}),e.prototype.contains=function(e){return e&&e.isAfter(this.getStartPosition())&&this.getEndPosition().isAfter(e)},e.prototype.isTextualInlineElement=function(){return this.inlineElement&&this.inlineElement.isTextualInlineElement()},e.prototype.isAfter=function(e){var t=this.getStartPosition(),n=e&&e.getEndPosition();return n&&(t.isAfter(n)||t.equalTo(n))},e.prototype.applyStyle=function(e){var t=this.getStartPosition().normalize(),n=this.getEndPosition().normalize(),o=this.getContainerNode();if(t.isAtEnd){var l=(0,a.getNextLeafSibling)(o,t.node);t=l?new i.default(l,0):null}if(0==n.offset){var s=(0,a.getPreviousLeafSibling)(o,n.node);n=s?new i.default(s,-1):null}(0,r.default)(o,e,t||void 0,n||void 0)},e}();t.default=l},140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=n(4630),i=n(7409),a=n(4251),l=n(2513),s=n(9381),u=n(5924),d="SPAN,B,I,U,EM,STRONG,STRIKE,S,SMALL,SUP,SUB".split(",");function c(e,t){e&&1==e.nodeType&&t(e,!0)}t.default=function(e,t,n,f){void 0===n&&(n=new o.default(e,0).normalize()),void 0===f&&(f=new o.default(e,-1).normalize());for(var p=[],v=n,h=f;v&&h&&h.isAfter(v);){var g=v.node,m=(0,r.default)(g.parentNode),y=(0,l.getNextLeafSibling)(e,g);3==g.nodeType&&["TR","TABLE"].indexOf(m)<0&&(g!=h.node||h.isAtEnd||(g=(0,i.default)(g,h.offset,!0)),v.offset>0&&(g=(0,i.default)(g,v.offset,!1)),p.push(g)),v=y&&new o.default(y,0)}if(p.length>0){if(p.every((function(e){return e.parentNode==p[0].parentNode}))){var b=p.shift();p.forEach((function(e){var t,n=(b.nodeValue||"")+(e.nodeValue||"");b.nodeValue=n,null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),p=[b]}p.forEach((function(e){for(var n=e;n&&"SPAN"!=(0,r.default)(n)&&d.indexOf((0,r.default)(n.parentNode))>=0;)c(n,t),n=(0,s.splitBalancedNodeRange)(n);n&&"SPAN"!=(0,r.default)(n)&&(c(n,t),n=(0,a.default)(n,"SPAN")),(0,u.default)(n,"HTMLElement")&&t(n)}))}}},7229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastInlineElement=t.getFirstInlineElement=void 0;var r=n(8153),o=n(4061);t.getFirstInlineElement=function(e){var t=(0,o.getFirstLeafNode)(e);return t?(0,r.default)(e,t):null},t.getLastInlineElement=function(e){var t=(0,o.getLastLeafNode)(e);return t?(0,r.default)(e,t):null}},8153:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7070),o=n(3408),i=n(271),a=n(5672),l=n(8797),s=n(5924);t.default=function(e,t){var n=(0,s.default)(e,"Node")?(0,r.default)(e,t):e;return t&&n&&function(e,t){for(var n,r=[e],s=e.parentNode;s&&t.contains(s);s=s.parentNode)r.push(s);for(var u=r.length-1;u>=0&&!n;u--){var d=r[u],c=(0,o.default)(d);"A"==c?n=new a.default(d,t):"IMG"==c&&(n=new i.default(d,t))}return n||new l.default(e,t)}(t,n)}},2571:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInlineElementBeforeAfter=t.getInlineElementAfter=t.getInlineElementBefore=void 0;var r=n(8153),o=n(5269),i=n(1630),a=n(2513);function l(e,t,n){if(!e||!t||!t.node)return null;var l=(t=t.normalize()).offset,s=t.isAtEnd,u=t.node,d=!1;!n&&0==l&&!s||n&&s?u=(0,a.getLeafSibling)(e,u,n):3==u.nodeType&&(!n&&!s||n&&l>0)&&(d=!0),u&&(0,i.default)(u)&&(u=(0,a.getLeafSibling)(e,u,n));var c=(0,r.default)(e,u);return c&&(d||c.contains(t))&&(c=n?new o.default(c,t,void 0):new o.default(c,void 0,t)),c}t.getInlineElementBefore=function(e,t){return l(e,t,!1)},t.getInlineElementAfter=function(e,t){return l(e,t,!0)},t.getInlineElementBeforeAfter=l},8605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){Array.prototype.push.apply(e,t)}},4709:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e)}},8375:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e)}},64:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4984),i=n(2042),a=n(3408),l=n(5499),s=n(1657),u=n(4630),d=n(8471),c=n(5924),f=n(9381),p=n(8375),v=n(82),h=n(711),g=n(4251),m=n(7570),y=function(){function e(e){if(this.rootList=e,this.items=[],!e)throw new Error("rootList must not be null");b(this.rootList),(0,d.default)(this.rootList,"ol,ul",b),(0,d.default)(this.rootList,"li",C),this.populateItems(this.rootList)}return e.prototype.contains=function(e){return this.items.some((function(t){return t.contains(e)}))},e.prototype.getLastItemNumber=function(){var e=this.getStart();return void 0===e?e:e-1+this.items.filter((function(e){return 1==e.getListType()&&1==e.getLevel()&&!e.isDummy()})).length},e.prototype.writeBack=function(e,t){var n=this;if(!this.rootList)throw new Error("rootList must not be null");var r,o=this.rootList.ownerDocument,i=[o.createDocumentFragment()],a=o.createTextNode(""),l=this.getStart()||1;this.rootList.parentNode.replaceChild(a,this.rootList),this.items.forEach((function(o){var a=o.getNewListStart();a&&a!=l&&(i.splice(1,i.length-1),l=a),o.writeBack(i,n.rootList,e);var s=i[1];o.applyListStyle(n.rootList,l),(0,c.default)(s,"HTMLOListElement")&&(r!=s&&(1==l?s.removeAttribute("start"):s.start=l),1!=o.getLevel()||o.isDummy()||t||l++),r=s})),a.parentNode.replaceChild(i[0],a)},e.prototype.split=function(e,t){if(!this.rootList)throw new Error("rootList must not be null");for(var n=0;n=0?Math.min(this.items.length-1,a):a;var l=i<=a?this.items.slice(i,a+1):[];return n&&l.forEach(n),l},e.prototype.populateItems=function(e,t){var n=this;void 0===t&&(t=[]);var o=(0,i.default)(e);(0,p.default)(e.childNodes).forEach((function(e){var a=(0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(t),!1),[o],!1);(0,i.isListElement)(e)?n.populateItems(e,a):3==e.nodeType&&""==(e.nodeValue||"").trim()||n.items.push(new(h.default.bind.apply(h.default,(0,r.__spreadArray)([void 0,e],(0,r.__read)(a),!1))))}))},e}();function b(e){var t=null;(0,p.default)(e.childNodes).forEach((function(e){"LI"==(0,a.default)(e)?t=e:(0,i.isListElement)(e)?t=null:t&&!(0,s.default)(e,!0)&&t.appendChild((0,l.default)(e)?e:(0,g.default)(e))}))}function C(e){for(;!(0,i.isListElement)(e.parentNode);){(0,f.default)(e,!0);var t=(0,p.default)(e.parentNode.childNodes).slice(1);t.length>0&&((0,l.default)(t[0])||(t=[(0,g.default)(t)]),t.forEach((function(t){return e.appendChild(t)}))),(0,v.default)(e.parentNode)}}function E(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8605),o=n(6133),i=n(6997),a=n(4794),l=n(8471),s=n(64),u="listchain",d="listchainafter",c=0,f=function(){function e(e,t){this.region=e,this.name=t,this.lastNumber=0,this.lastNumberBeforeCursor=0}return e.createListChains=function(t,n,a){var s=Array.isArray(t)?t:t?[t]:[],u=[];return s.forEach((function(t){var s,d=[];(0,l.default)(t.rootNode,"ol",(function(r){var l=(0,o.default)(t,"ol",r);if(s!=l){var u=d.filter((function(e){return e.canAppendToTail(l)}))[0]||new e(t,(a||p)()),c=d.indexOf(u),f=!!n&&(0,i.default)(l,n);f?c<0&&d.push(u):(c>=0&&d.splice(c,1),d.unshift(u)),u.append(l,f),s=l}})),(0,r.default)(u,d)})),u},e.prototype.canAppendAtCursor=function(e){return e>1&&this.lastNumberBeforeCursor+1==e},e.prototype.createVListAtBlock=function(e,t){if(e&&e.parentNode){var n=e.ownerDocument.createElement("ol");n.start=t,this.applyChainName(n),e.parentNode.insertBefore(n,e);var r=new s.default(n);return r.appendItem(e,0),r}return null},e.prototype.commit=function(e,t){for(var n=this.getLists(),r=0,o=0;o1?i.start=i.start===r?r+1:i.start:i.start=r+1);var a=new s.default(i);r=a.getLastItemNumber()||0,delete i.dataset[u],delete i.dataset[d],a.writeBack(e)}},e.prototype.canAppendToTail=function(e){return this.lastNumber+1==e.start},e.prototype.append=function(e,t){this.applyChainName(e),this.lastNumber=new s.default(e).getLastItemNumber()||0,t?e.dataset[d]="true":this.lastNumberBeforeCursor=this.lastNumber},e.prototype.applyChainName=function(e){e.dataset[u]=this.name},e.prototype.getLists=function(){var e=this;return(0,l.default)(this.region.rootNode,"ol[data-"+u+"="+this.name+"]").filter((function(t){return(0,a.default)(e.region,t)}))},e}();function p(){return"__List_Chain_"+c++}t.default=f},711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListStyleDefinitionMetadata=void 0;var r=n(7582),o=n(8655),i=n(2042),a=n(359),l=n(3408),s=n(5499),u=n(1473),d=n(5924),c=n(3848),f=n(3339),p=n(8275),v=n(6092),h=n(8375),g=n(82),m=n(4251),y=n(681),b=n(7570),C=[null,"lower-alpha","lower-roman"],E=["disc","circle","square"],S="-.25in",T=["font-size","font-family","color"],P=["data-ogsc","data-ogsb","data-ogac","data-ogab"];t.ListStyleDefinitionMetadata=(0,y.createObjectDefinition)({orderedStyleType:(0,y.createNumberDefinition)(!0,void 0,1,20),unorderedStyleType:(0,y.createNumberDefinition)(!0,void 0,1,9)},!0,!0);var w=function(){function e(e){for(var t=[],n=1;nt&&this.listTypes.pop()},e.prototype.addNegativeMargins=function(){this.node.style.margin="0in 0in 0in 0.5in",this.node.style.marginLeft=S},e.prototype.changeListType=function(e){0==e?this.listTypes=[e]:(this.outdent(),this.listTypes.push(e))},e.prototype.setIsDummy=function(e){this.dummy=e},e.prototype.setNewListStart=function(e){this.newListStart=e},e.prototype.applyListStyle=function(e,n){var r=(0,b.getMetadata)(e,t.ListStyleDefinitionMetadata),o=this.listTypes.length<3;r&&(o&&2===this.listTypes[1]&&r.unorderedStyleType?(0,c.default)(this.node,r.unorderedStyleType):o&&1===this.listTypes[1]&&r.orderedStyleType?(0,p.default)(this.node,r.orderedStyleType,n):this.node.style.removeProperty("list-style-type"))},e.prototype.writeBack=function(e,t,n){var o,s=this;void 0===n&&(n=!1);var u,c,p=1;if(n){e.length>this.listTypes.length&&e.splice(this.listTypes.length);var y=e.length-1;y===this.listTypes.length-1&&(0,i.default)(e[y])!==this.listTypes[y]&&e.splice(y),p=e.length}else for(;p1&&((0,f.default)(this.node,T,!0),(0,f.default)(this.node,P,!1)),this.listTypes.length<=1){var S="LI"==(0,l.default)(this.node),w=S?{"font-family":this.node.style.fontFamily,"font-size":this.node.style.fontSize,color:this.node.style.color}:void 0,M=S?(u=this.node,c=(0,h.default)(u.childNodes),(0,g.default)(u),c):[this.node];if(w)for(var D=function(e){(0,d.default)(M[e],"Text")&&(M[e]=(0,m.default)(M[e],"span"));var t=M[e];if((0,d.default)(t,"HTMLElement")){var n=(0,r.__assign)((0,r.__assign)({},w),(0,a.default)(t));(0,v.default)(t,n),P.forEach((function(e){var n=s.node.getAttribute(e);n&&t.setAttribute(e,n)}))}},L=0;L1&&l.style.setProperty("list-style-type",C[(r-1)%C.length]),2==n&&r>1&&l.style.setProperty("list-style-type",E[(r-1)%E.length]),l}function O(e,t,n){return!(e.length>0)||t&&(0,s.default)(e[0])||n&&(0,s.default)(e[e.length])||(e=[(0,m.default)(e)]),e}t.default=w},6692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T",20:"U",21:"V",22:"W",23:"X",24:"Y",25:"Z"};t.default=function(e,t){for(var r="";e>=0;)r=n[e%26]+r,e=Math.floor(e/26)-1;return t?r.toLowerCase():r}},4321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4709),i={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1};t.default=function(e,t){var n,a,l="";try{for(var s=(0,r.__values)((0,o.default)(i)),u=s.next();!u.done;u=s.next()){var d=u.value,c=Math.floor(e/i[d]);e-=c*i[d],l+=d.repeat(c)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(n)throw n.error}}return t?l.toLocaleLowerCase():l}},7909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6935),o=n(6133),i=n(531),a=n(4794),l=n(4630),s=n(5924),u=n(1630),d=n(8375),c=n(64),f=n(4251),p=n(2513),v=n(2042),h="ol,ul";function g(e,t,n){var r=t[n?t.length-1:0];r=(0,p.getLeafSibling)(e.rootNode,r,n,e.skipTags,!0),r=(0,o.default)(e,h,r),(0,a.default)(e,r)&&(0,v.isListElement)(r)&&(n?(0,s.default)(r,"HTMLOListElement")&&1!=r.start||t.push(r):t.unshift(r))}t.default=function(e,t,n){if(!e)return null;var a=[];if(n){var p=(0,o.default)(e,h,n);p&&a.push(p)}else{if((0,i.default)(e,void 0,!0).forEach((function(n){var r=(0,o.default)(e,h,n.getStartNode());r?(a[a.length-1]!=r&&a.push(r),1==a.length&&(0,s.default)(r,"HTMLOListElement")&&r.start>1&&(t=!1)):a.push(n.collapseToSingleElement())})),0==a.length&&!e.rootNode.firstChild){var m=(0,r.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(m),a.push(m),e.fullSelectionStart=new l.default(m,0),e.fullSelectionEnd=new l.default(m,-1)}t&&(g(e,a,!1),g(e,a,!0)),a=a.filter((function(e){return!(0,u.default)(e,!0)}))}var y=null;if(a.length>0){var b=a.shift()||null;(y=(0,v.isListElement)(b)?new c.default(b):b?function(e){var t=(0,d.default)(e.childNodes),n=1==t.length?t[0]:(0,f.default)(t,"SPAN"),r=e.ownerDocument.createElement("ol");e.appendChild(r);var o=new c.default(r);return o.appendItem(n,0),o}(b):null)&&a.forEach((function(e){(0,v.isListElement)(e)?y.mergeVList(new c.default(e)):y.appendItem(e,0)}))}return y}},2042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isListElement=void 0;var r=n(3408);function o(e){switch((0,r.default)(e)){case"OL":return 1;case"UL":return 2;default:return 0}}t.default=o,t.isListElement=function(e){return 0!=o(e)}},6133:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3598);t.default=function(e,t,n){var o=e&&(0,r.default)(n,e.rootNode,t);if(o)for(var i=void 0;i=(0,r.default)(o.parentNode,e.rootNode,t);)o=i;return o}},3848:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=r[t],o=1===t;e.style.listStyleType=o?n:'"'+n+'"'};var r=((n={})[1]="disc",n[3]="∎ ",n[2]="- ",n[5]="➔ ",n[8]="➔ ",n[4]="➢ ",n[6]="➪ ",n[7]="— ",n)},3339:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754),o=n(3598),i=n(5924);t.default=function(e,t,n){void 0===n&&(n=!0);var a=function(e,t,n){for(var a,l,s=[],u=r.default.createBodyTraverser(e),d=null,c=function(){var r=(null==(d=u.currentInlineElement)?void 0:d.getContainerNode())||null,c=null;r=r?(0,o.default)(r):null;for(var f=function(){var e=r;t.forEach((function(t){var r=n?e.style.getPropertyValue(t):e.getAttribute(t);c||(c={}),r&&!c[t]&&(c[t]=r)})),r=1===(null===(l=null==r?void 0:r.parentNode)||void 0===l?void 0:l.childNodes.length)?r.parentNode:null};r&&r!==e&&(0,i.default)(r,"HTMLElement")&&(0==s.length||((null===(a=r.textContent)||void 0===a?void 0:a.trim().length)||0)>0);)f();c&&s.push(c),u.getNextInlineElement()};u.currentInlineElement!=d;)c();return s}(e,t,n);t.forEach((function(t){var r=a.map((function(e){return void 0!==e[t]?e[t]:""}));r&&(1==r.length||1==new Set(r).size)&&r[0]&&(n?e.style.setProperty(t,r[0]):e.setAttribute(t,r[0]))}))}},8275:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(6692),a=n(4321);!function(e){e[e.Decimal=0]="Decimal",e[e.Roman=1]="Roman",e[e.Alpha=2]="Alpha"}(o||(o={})),t.default=function(e,t,n){var r=l[t],s=r.markerSeparator,u=r.markerSecondSeparator,d=r.markerType,c=r.lowerCase,f=n.toString();d===o.Roman?f=(0,a.default)(n,c):d===o.Alpha&&(f=(0,i.default)(n-1,c));var p=u?u+f+s:f+s;e.style.listStyleType='"'+p+'"'};var l=((r={})[1]={markerType:o.Decimal,markerSeparator:". "},r[2]={markerType:o.Decimal,markerSeparator:"- "},r[3]={markerType:o.Decimal,markerSeparator:") "},r[4]={markerType:o.Decimal,markerSeparator:") ",markerSecondSeparator:"("},r[5]={markerType:o.Alpha,markerSeparator:". ",lowerCase:!0},r[8]={markerType:o.Alpha,markerSeparator:"- ",lowerCase:!0},r[6]={markerType:o.Alpha,markerSeparator:") ",lowerCase:!0},r[7]={markerType:o.Alpha,markerSeparator:") ",markerSecondSeparator:"(",lowerCase:!0},r[9]={markerType:o.Alpha,markerSeparator:". "},r[12]={markerType:o.Alpha,markerSeparator:"- "},r[10]={markerType:o.Alpha,markerSeparator:") "},r[11]={markerType:o.Alpha,markerSeparator:") ",markerSecondSeparator:"("},r[13]={markerType:o.Roman,markerSeparator:". ",lowerCase:!0},r[16]={markerType:o.Roman,markerSeparator:"- ",lowerCase:!0},r[14]={markerType:o.Roman,markerSeparator:") ",lowerCase:!0},r[15]={markerType:o.Roman,markerSeparator:") ",markerSecondSeparator:"(",lowerCase:!0},r[17]={markerType:o.Roman,markerSeparator:". "},r[20]={markerType:o.Roman,markerSeparator:"- "},r[18]={markerType:o.Roman,markerSeparator:") "},r[19]={markerType:o.Roman,markerSeparator:") ",markerSecondSeparator:"("},r)},681:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObjectDefinition=t.createArrayDefinition=t.createStringDefinition=t.createBooleanDefinition=t.createNumberDefinition=void 0,t.createNumberDefinition=function(e,t,n,r,o){return{type:1,isOptional:e,value:t,maxValue:r,minValue:n,allowNull:o}},t.createBooleanDefinition=function(e,t,n){return{type:0,isOptional:e,value:t,allowNull:n}},t.createStringDefinition=function(e,t,n){return{type:2,isOptional:e,value:t,allowNull:n}},t.createArrayDefinition=function(e,t,n,r,o){return{type:3,isOptional:t,itemDef:e,minLength:n,maxLength:r,allowNull:o}},t.createObjectDefinition=function(e,t,n){return{type:4,isOptional:t,propertyDef:e,allowNull:n}}},7570:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeMetadata=t.setMetadata=t.getMetadata=void 0;var r=n(2373),o="editingInfo";t.getMetadata=function(e,t,n){var i,a=e.dataset[o];try{i=a?JSON.parse(a):null}catch(e){}if(void 0!==i){if(!t)return i;if((0,r.default)(i,t))return i}return n||null},t.setMetadata=function(e,t,n){return!(n&&!(0,r.default)(t,n)||(e.dataset[o]=JSON.stringify(t),0))},t.removeMetadata=function(e){delete e.dataset[o]}},2373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4709);t.default=function e(t,n){var o,i,a=!1;if(n.isOptional&&void 0===t||n.allowNull&&null===t)a=!0;else{if(!n.isOptional&&void 0===t||!n.allowNull&&null===t)return!1;switch(n.type){case 2:a="string"==typeof t&&(void 0===n.value||t===n.value);break;case 1:a="number"==typeof t&&(void 0===n.value||(o=n.value,i=t,Math.abs(o-i)<.001))&&(void 0===n.minValue||t>=n.minValue)&&(void 0===n.maxValue||t<=n.maxValue);break;case 0:a="boolean"==typeof t&&(void 0===n.value||t===n.value);break;case 3:a=Array.isArray(t)&&(void 0===n.minLength||t.length>=n.minLength)&&(void 0===n.maxLength||t.length<=n.maxLength)&&t.every((function(t){return e(t,n.itemDef)}));break;case 4:a="object"==typeof t&&(0,r.default)(n.propertyDef).every((function(r){return e(t[r],n.propertyDef[r])}));break;case 5:a=n.validator(t)}}return a}},2881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXCEL_DESKTOP_ATTRIBUTE_NAME=t.PROG_ID_NAME=t.GOOGLE_SHEET_NODE_NAME=void 0,t.GOOGLE_SHEET_NODE_NAME="google-sheets-html-origin",t.PROG_ID_NAME="ProgId",t.EXCEL_DESKTOP_ATTRIBUTE_NAME="xmlns:x"},7477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e.fragment.querySelector('ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer')}},6433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7477),o=n(2586),i=n(4675),a=n(3810),l=n(7050),s=n(8064),u=n(8773),d=new Map([[0,s.default],[1,o.default],[2,i.default],[3,l.default],[5,r.default],[4,a.default],[7,u.default]]);t.default=function(e,t){var n=e.htmlAttributes,r=e.clipboardData,o=e.fragment,i=null,a={htmlAttributes:n,fragment:o,shouldConvertSingleImage:t,clipboardData:r};return d.forEach((function(e,t){!i&&e(a)&&(i=t)})),null!=i?i:6}},2586:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){return"urn:schemas-microsoft-com:office:excel"==e.htmlAttributes[r.EXCEL_DESKTOP_ATTRIBUTE_NAME]}},4675:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){var t=e.htmlAttributes;return"Excel.Sheet"==t[r.PROG_ID_NAME]&&null==t[r.EXCEL_DESKTOP_ATTRIBUTE_NAME]}},3810:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){return!!e.fragment.querySelector(r.GOOGLE_SHEET_NODE_NAME)}},7050:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){return"PowerPoint.Slide"==e.htmlAttributes[r.PROG_ID_NAME]}},8064:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2881);t.default=function(e){var t=e.htmlAttributes;return"urn:schemas-microsoft-com:office:word"==t["xmlns:w"]||"Word.Document"==t[r.PROG_ID_NAME]}},8773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.shouldConvertSingleImage,r=e.clipboardData;return n&&1==(null===(t=r.htmlFirstLevelChildTags)||void 0===t?void 0:t.length)&&"IMG"==r.htmlFirstLevelChildTags[0]}},6688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8053),o=n(4794),i=n(5924);t.default=function(e,t){if(!t||0==t.length)return[];var n=(0,i.default)(t[0],"Node")?t:[t[0].getStartNode(),t[t.length-1].getEndNode()],a=(n=n&&n.filter((function(t){return(0,o.default)(e,t)})))[0],l=n[n.length-1];return(0,o.default)(e,a)&&(0,o.default)(e,l)?(0,r.default)(e.rootNode,a,l,!0):[]}},8394:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getRegionCreator=void 0;var o=n(7582),i=n(8655),a=n(3598),l=n(4630),s=n(8471),u=n(2513),d=((r={})[0]={skipTags:["TABLE"],outerSelector:"table",innerSelector:"td,th"},r);function c(e,t){var n=l.default.getStart(e).normalize(),r=l.default.getEnd(e).normalize();return function(e,o,a){return function(e,t,n,r){if(e){var o=t&&(0,u.getNextLeafSibling)(e,t,r),a=n&&(0,u.getPreviousLeafSibling)(e,n,r),l=!t||(0,i.default)(e,t)&&(0,i.default)(e,o),s=!n||(0,i.default)(e,n)&&(0,i.default)(e,a),d=!(t&&n&&((0,i.default)(t,n,!0)||(0,i.default)(t,a,!0)||(0,i.default)(n,t,!0)||(0,i.default)(n,o,!0)));return l&&s&&d}return!1}(e,o,a,t)?{rootNode:e,nodeBefore:o,nodeAfter:a,skipTags:t,fullSelectionStart:n,fullSelectionEnd:r}:null}}function f(e,t,n,r,i){var a;i=i||t.innerNode==n;var l=!1,s=t.children,u=t.innerNode,d=[];if(0==s.length)(p=e(u))&&d.push(p);else for(var c=0;c<=s.length&&!l;c++){var p,v=s[c]||{},h=v.outerNode,g=v.boundaries,m=null===(a=s[c-1])||void 0===a?void 0:a.outerNode;i&&(p=e(u,m,h))&&d.push(p),null==g||g.forEach((function(t){var a,s;s=(a=(0,o.__read)(f(e,t,n,r,i),3))[0],i=a[1],l=a[2],d=d.concat(s)}))}return[d,i,l||u==r]}t.default=function(e,t,n){var r=[];if(e&&t){var l=d[n],u=l.innerSelector,p=l.skipTags,v=function(e,t,n){var r=[{innerNode:e,children:[]}],o=d[n],l=o.outerSelector,u=o.innerSelector,c=(0,s.default)(e,l,null,2,t);return(0,s.default)(e,u,(function(t){var n=(0,a.default)(t,e,l);if(n&&c.indexOf(n)<0){for(var o={innerNode:t,children:[]},s=r.length-1;s>=0;s--){var u=r[s],d=u.innerNode,f=u.children;if((0,i.default)(d,n)){var p=f.filter((function(e){return e.outerNode==n}))[0];p||(p={outerNode:n,boundaries:[]},f.push(p)),p.boundaries.push(o);break}}r.push(o)}}),1,t),r[0]}(e,t,n),h=(0,a.default)(t.startContainer,e,u)||e,g=(0,a.default)(t.endContainer,e,u)||e,m=c(t,p);r=(0,o.__read)(f(m,v,h,g),1)[0]}return r.filter((function(e){return!!e}))},t.getRegionCreator=c},531:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6754),o=n(6935),i=n(7070),a=n(4539),l=n(1630);t.default=function(e,t,n){var s=(0,a.default)(e),u=[];if(s){for(var d=e.rootNode,c=e.skipTags,f=r.default.createSelectionTraverser(d,s,c),p=null==f?void 0:f.currentBlockElement;p;p=f.getNextBlockElement())u.push(p);u=u.filter((function(e){var t,n=e.getStartNode();return n!=e.getEndNode()||!(0,l.default)(n,!0)||(null===(t=n.parentNode)||void 0===t||t.removeChild(n),!1)}))}if(0==u.length&&e&&!e.rootNode.firstChild&&t){var v=(0,o.default)(1,e.rootNode.ownerDocument);e.rootNode.appendChild(v),(p=(0,i.default)(e.rootNode,v))&&u.push(p)}return u}},4539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8831),o=n(4630),i=n(2513);t.default=function(e){if(!e)return null;var t=e.nodeBefore,n=e.nodeAfter,a=e.rootNode,l=e.skipTags,s=t?(0,i.getNextLeafSibling)(e.rootNode,t,e.skipTags):a.firstChild,u=n?(0,i.getPreviousLeafSibling)(a,n,l):a.lastChild,d=s&&u&&(0,r.default)(s,u);if(!function(e){var t=e;return!!t.fullSelectionEnd&&!!t.fullSelectionStart}(e))return d;if(d){var c=o.default.getStart(d).normalize(),f=o.default.getEnd(d).normalize(),p=e.fullSelectionEnd,v=e.fullSelectionStart;if(!v.isAfter(f)&&!c.isAfter(p)){var h=v.isAfter(c)?v:c,g=p.isAfter(f)?f:p;return(0,r.default)(h,g)}}return null}},4794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655);t.default=function(e,t){return!(!e||!(0,r.default)(e.rootNode,t)||e.nodeBefore&&4!=e.nodeBefore.compareDocumentPosition(t)||e.nodeAfter&&2!=e.nodeAfter.compareDocumentPosition(t))}},2799:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4984),i=n(8655),a=n(7070),l=n(4869),s=n(359),u=n(4794),d=n(5924),c=n(6092),f=n(8053);t.default=function(e,t,n){var p,v,h,g;if((0,u.default)(e,t)&&(0,u.default)(e,n)&&(g=(0,a.default)(e.rootNode,n))&&!g.contains(t)){for(var m=g.collapseToSingleElement(),y=(0,f.collapse)(e.rootNode,m,t,!1,!0),b=m;(0,i.default)(y,b);){var C=b.parentNode;if((0,d.default)(C,"HTMLElement")){var E=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},(0,l.default)(C)||{}),(0,s.default)(C)),(0,s.default)(m));(0,c.default)(m,E)}b=C}var S=null,T=1==m.childNodes.length&&0==m.attributes.length?m.firstChild:(0,o.default)(m,"SPAN");for(b=T;(0,i.default)(y,b)&&1==(null===(p=b.parentNode)||void 0===p?void 0:p.childNodes.length);b=b.parentNode)S=b.parentNode;null===(v=t.parentNode)||void 0===v||v.insertBefore(T,t.nextSibling),null===(h=null==S?void 0:S.parentNode)||void 0===h||h.removeChild(S)}}},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3598),o=n(6997),i=function(){function e(e,t,n){switch(void 0===t&&(t=0),this.isFromEndOfRange=n,e.node?(this.node=e.node,t=e.offset):this.node=e,t){case-2:this.offset=a(this.node),this.node=this.node.parentNode,this.isAtEnd=!1;break;case-3:this.offset=a(this.node)+1,this.isAtEnd=!this.node.nextSibling,this.node=this.node.parentNode;break;case-1:this.offset=l(this.node),this.isAtEnd=!0;break;default:var o=l(this.node);this.offset=Math.max(0,Math.min(t,o)),this.isAtEnd=t>0&&t>=o}this.element=(0,r.default)(this.node)}return e.prototype.normalize=function(){if(3==this.node.nodeType||!this.node.firstChild)return this;for(var t=this.node,n=this.isAtEnd?-1:this.offset;1==t.nodeType||11==t.nodeType;){var r=this.isFromEndOfRange?-1==n?t.lastChild:t.childNodes[n-1]:0==n?t.firstChild:-1==n?t.lastChild:t.childNodes[n];if(!r)break;t=r,n=this.isAtEnd||this.isFromEndOfRange?-1:0}return new e(t,n,this.isFromEndOfRange)},e.prototype.equalTo=function(e){return e&&(this==e||this.node==e.node&&this.offset==e.offset&&this.isAtEnd==e.isAtEnd)},e.prototype.isAfter=function(e){return this.node==e.node?this.isAtEnd&&!e.isAtEnd||this.offset>e.offset:(0,o.default)(this.node,e.node)},e.prototype.move=function(t){return new e(this.node,Math.max(this.offset+t,0))},e.getStart=function(t){return new e(t.startContainer,t.startOffset)},e.getEnd=function(t){return t.collapsed?e.getStart(t):new e(t.endContainer,t.endOffset,!0)},e}();function a(e){for(var t=0;e=(null==e?void 0:e.previousSibling)||null;)t++;return t}function l(e){var t;return 3==e.nodeType?(null===(t=e.nodeValue)||void 0===t?void 0:t.length)||0:1==e.nodeType||11==e.nodeType?e.childNodes.length:1}t.default=i},5537:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(246);t.default=function(e,t){var n,o,i,a=null===(i=null===(o=null===(n=null==e?void 0:e.commonAncestorContainer)||void 0===n?void 0:n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===i?void 0:i.getSelection();if(a){var l=!0;if(a.rangeCount>0)try{var s=null;(t||r.Browser.isEdge)&&(s=1==a.rangeCount?a.getRangeAt(0):null)&&s.startContainer==e.startContainer&&s.startOffset==e.startOffset&&s.endContainer==e.endContainer&&s.endOffset==e.endOffset?l=!1:a.removeAllRanges()}catch(e){}l&&a.addRange(e)}}},8831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8235),o=n(4630),i=n(5924);function a(e){return 1==e.node.nodeType&&(0,r.default)(e.node)?new o.default(e.node,e.isAtEnd?-3:-2):e}function l(e){return e&&e.node}function s(e,t){if(!e||!t)return null;for(var n=0,r=0;rn);r++)e=e.childNodes[n];return new o.default(e,n)}t.default=function(e,t,n,r){var u,d=null,c=null;if(l(e)?(d=e,c=l(t)?t:null):(0,i.default)(e,"Node")&&(Array.isArray(t)?(d=s(e,t),c=Array.isArray(n)?s(e,n):null):"number"==typeof t?(d=new o.default(e,t),c=(0,i.default)(n,"Node")?new o.default(n,r):null):!(0,i.default)(t,"Node")&&t||(d=new o.default(e,-2),c=new o.default(t||e,-3))),null===(u=null==d?void 0:d.node)||void 0===u?void 0:u.ownerDocument){var f=d.node.ownerDocument.createRange();return d=a(d),c=a(c||d),f.setStart(d.node,d.offset),f.setEnd(c.node,c.offset),f}return null}},9372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4746),o=n(8805);t.default=function(e,t){if(!e)return"";var n=(0,r.default)(e),i=t&&(0,o.default)(e,t);return i?n+"\x3c!--"+JSON.stringify(i)+"--\x3e":n}},5473:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6935),o=n(8831),i=n(5203);t.default=function(e){var t;if(!e)return null;var n=(0,o.default)(e),a=n.getBoundingClientRect&&(0,i.default)(n.getBoundingClientRect());if(a)return a;e=e.normalize();var l=n.getClientRects&&n.getClientRects();if(a=l&&1==l.length?(0,i.default)(l[0]):null)return a;if(3==e.node.nodeType&&e.node.ownerDocument){var s=(0,r.default)({tag:"span",children:["​"]},e.node.ownerDocument);if((n=(0,o.default)(e)).insertNode(s),a=s.getBoundingClientRect&&(0,i.default)(s.getBoundingClientRect()),null===(t=s.parentNode)||void 0===t||t.removeChild(s),a)return a}var u=e.element;return u&&u.getBoundingClientRect&&(a=(0,i.default)(u.getBoundingClientRect()))?a:null}},8805:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(4630);function i(e,t){var n,o;if(!e||!t)return[];var i,a=e.node,l=e.offset,s=[];if(!(0,r.default)(t,a,!0))return[];if(3==a.nodeType){for(i=a.parentNode;a.previousSibling&&3==a.previousSibling.nodeType;)l+=(null===(n=a.previousSibling.nodeValue)||void 0===n?void 0:n.length)||0,a=a.previousSibling;s.unshift(l)}else i=a,a=a.childNodes[l];do{l=0;for(var u=!1,d=(null==i?void 0:i.firstChild)||null;d&&d!=a;d=d.nextSibling){if(3==d.nodeType){if(0===(null===(o=d.nodeValue)||void 0===o?void 0:o.length)||u)continue;u=!0}else u=!1;l++}s.unshift(l),a=i,i=(null==i?void 0:i.parentNode)||null}while(a&&a!=t);return s}t.default=function(e,t){return t?{start:i(o.default.getStart(t),e),end:i(o.default.getEnd(t),e)}:null}},1431:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(3408),i=n(1657);function a(e){for(;e.previousSibling;)if(e=e.previousSibling,"BR"==(0,o.default)(e)||!(0,i.default)(e))return!1;return!0}t.default=function(e,t){if(e){var n=(e=e.normalize()).node;if(0==e.offset){for(;n&&(0,r.default)(t,n)&&a(n);)n=(null==n?void 0:n.parentNode)||null;return n==t}}return!1}},4477:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractContentMetadata=t.setHtmlWithMetadata=void 0;var r=n(8831),o=n(5924),i=n(2373),a=n(681),l=(0,a.createArrayDefinition)((0,a.createNumberDefinition)()),s=(0,a.createObjectDefinition)({x:(0,a.createNumberDefinition)(),y:(0,a.createNumberDefinition)()}),u=(0,a.createBooleanDefinition)(!0),d=(0,a.createObjectDefinition)({type:(0,a.createNumberDefinition)(!0,0),isDarkMode:u,start:l,end:l}),c=(0,a.createObjectDefinition)({type:(0,a.createNumberDefinition)(!1,1),isDarkMode:u,tableId:(0,a.createStringDefinition)(),firstCell:s,lastCell:s}),f=(0,a.createObjectDefinition)({type:(0,a.createNumberDefinition)(!1,2),isDarkMode:u,imageId:(0,a.createStringDefinition)()});function p(e,t,n){if(e)return t=t||"",e.innerHTML=(null==n?void 0:n(t))||t,v(e)}function v(e){var t=e.lastChild;if((0,o.default)(t,"Comment"))try{var n=JSON.parse(t.nodeValue||"");if((0,i.default)(n,d)||(0,i.default)(n,c)||(0,i.default)(n,f))return e.removeChild(t),n.type=void 0===n.type?0:n.type,n.isDarkMode=n.isDarkMode||!1,n}catch(e){}}t.default=function(e,t,n){var o=p(e,t,n);return 0==(null==o?void 0:o.type)?(0,r.default)(e,o.start,o.end):null},t.setHtmlWithMetadata=p,t.extractContentMetadata=v},3680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSnapshotV2=void 0;var r=n(5892);function o(e,t,n,o,i){o=o||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},i=i||a;var l=e.snapshots[e.currentIndex],s=l&&i(l,t);if(e.currentIndex<0||!l||!s){(0,r.default)(e,o),e.snapshots.push(t),e.currentIndex++,e.totalSize+=o(t);for(var u=0;ue.maxSize;)e.totalSize-=o(e.snapshots[u]),u++;u>0&&(e.snapshots.splice(0,u),e.currentIndex-=u,e.autoCompleteIndex-=u),n&&(e.autoCompleteIndex=e.currentIndex)}else s&&e.snapshots.splice(e.currentIndex,1,t)}function i(e,t){return e.html==t.html&&!e.entityStates&&!t.entityStates}function a(e,t){return e==t}t.default=o,t.addSnapshotV2=function(e,t,n){o(e,t,n,(function(e){var t;return(null===(t=e.html)||void 0===t?void 0:t.length)||0}),i)}},3205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.currentIndex+t;return n>=0&&n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.autoCompleteIndex>=0&&e.currentIndex-e.autoCompleteIndex==1}},5892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearProceedingSnapshotsV2=void 0;var r=n(3205);function o(e,t){if(t=t||function(e){var t;return(null===(t=e)||void 0===t?void 0:t.length)||0},(0,r.default)(e,1)){for(var n=0,o=e.currentIndex+1;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{snapshots:[],totalSize:0,currentIndex:-1,autoCompleteIndex:-1,maxSize:e}}},5105:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.moveCurrentSnapsnot=void 0;var r=n(3205);function o(e,t){return(0,r.default)(e,t)?(e.currentIndex+=t,e.autoCompleteIndex=-1,e.snapshots[e.currentIndex]):null}t.default=o,t.moveCurrentSnapsnot=o},359:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};return((null==e?void 0:e.getAttribute("style"))||"").split(";").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n),o=e.slice(n+1);r&&o&&(t[r.trim()]=o.trim())})),t}},4136:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,r=e.getElementById(t);r&&(null===(n=r.parentNode)||void 0===n||n.removeChild(r))}},9130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(359),o=n(6092);t.default=function(e,t){var n=(0,r.default)(e),i=0;t.forEach((function(e){var t;if((null===(t=n[e])||void 0===t?void 0:t.indexOf("!important"))>-1){var r=n[e].indexOf("!");n[e]=n[e].substring(0,r),i++}})),i>0&&(0,o.default)(e,n)}},8182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r;if(t){var o=e.getElementById(n);o||((o=e.createElement("style")).id=n,e.head.appendChild(o)),null===(r=o.sheet)||void 0===r||r.insertRule(t)}}},6092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4709);t.default=function(e,t){if(e){var n=(0,r.default)(t||{}).map((function(e){var n=t[e],r=e?e.trim():null,o=n?n.trim():null;return r&&o?r+":"+o:null})).filter((function(e){return e})).join(";");n?e.setAttribute("style",n):e.removeAttribute("style")}}},8094:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(6160),i=n(3408),a=n(1473),l=n(5203),s=n(5924),u=n(8375),d=n(4711),c=n(7570),f={topBorderColor:"#ABABAB",bottomBorderColor:"#ABABAB",verticalBorderColor:"#ABABAB",hasHeaderRow:!1,hasFirstColumn:!1,hasBandedRows:!1,hasBandedColumns:!1,bgColorEven:null,bgColorOdd:"#ABABAB20",headerRowColor:"#ABABAB",tableBorderFormat:0,keepCellShade:!1},p=function(){function e(e,t,n){var r=this;if(this.cells=null,this.formatInfo=null,this.trs=[],this.tableSelection=null,this.table=(0,s.default)(e,"HTMLTableElement")?e:function(e){for(var t=e;t&&"TABLE"!=t.tagName;t=t.parentElement);return t}(e),this.table){var o=(0,s.default)(e,"HTMLTableElement")?null:e,i=(0,u.default)(this.table.rows);this.cells=i.map((function(e){return[]})),i.forEach((function(e,t){var n;r.trs[t%2]=e;for(var i=0,a=0;i0,spanAbove:u>0,width:d?c.width:void 0,height:d?c.height:void 0})}}})),this.formatInfo=(0,d.getTableFormatInfo)(this.table),t&&this.normalizeSize("number"==typeof n?function(e){return e/n}:n)}}return Object.defineProperty(e.prototype,"selection",{get:function(){return this.tableSelection||null},set:function(e){if(e){var t=e.firstCell;this.row=null==t?void 0:t.y,this.col=null==t?void 0:t.x}this.tableSelection=e},enumerable:!1,configurable:!0}),e.prototype.writeBack=function(e,t){var n,r=this;this.cells?((0,a.default)(this.table),this.cells.forEach((function(e,t){var n=g(r.trs[t%2]||r.trs[0]);n&&(r.table.appendChild(n),e.forEach((function(e,o){e.td&&(r.recalculateSpans(t,o),r.recalculateCellHeight(e.td),n.appendChild(e.td))})))})),this.formatInfo&&!e&&((0,d.saveTableInfo)(this.table,this.formatInfo),(0,o.default)(this.table,this.cells,this.formatInfo,t))):this.table&&(null===(n=this.table.parentNode)||void 0===n||n.removeChild(this.table))},e.prototype.recalculateCellHeight=function(e){if(this.isEmptyCell(e)&&e.rowSpan>1)for(var t=1;t1&&o.spanAbove&&(o.td=t.td)}))},C=this,E=a;E<=l;E++)b(E);var S=this.selection?this.selection.lastCell.y-this.selection.firstCell.y:0;this.cells.splice(a,S+1),0===this.cells.length&&(this.cells=null);break;case 5:for(var T=0,P=function(e){w.forEachCellOfColumn(e,(function(t,n,o){var i=r.getCell(o,e+1);t.td&&t.td.colSpan>1&&i.spanLeft&&(i.td=t.td);var a=r.selection?e-T:r.col;n.splice(a,1)})),T++},w=this,_=s;_<=u;_++)P(_);(0===(null===(t=this.cells)||void 0===t?void 0:t.length)||(null===(n=this.cells)||void 0===n?void 0:n.every((function(e){return 0===e.length}))))&&(this.cells=null);break;case 7:case 8:var O=7==e?-1:1;for(E=this.row+O;E>=0&&E=0&&_1)this.getCell(this.row+1,this.col).td=g(i.td);else{var k=o.map((function(e){return{td:e==i?g(e.td):null,spanAbove:e!=i,spanLeft:e.spanLeft}}));this.cells.splice(this.row+1,0,k)}break;case 12:i.td&&i.td.colSpan>1?this.getCell(this.row,this.col+1).td=g(i.td):this.forEachCellOfCurrentColumn((function(e,t){t.splice(r.col+1,0,{td:t==o?g(e.td):null,spanAbove:e.spanAbove,spanLeft:t!=o})}));break;case 14:this.table.style.marginLeft="auto",this.table.style.marginRight="auto";break;case 15:this.table.style.marginLeft="",this.table.style.marginRight="auto";break;case 16:this.table.style.marginLeft="auto",this.table.style.marginRight="";break;case 18:this.setAlignmentToSelectedCells(a,l,s,u,"center");break;case 17:this.setAlignmentToSelectedCells(a,l,s,u,"left");break;case 19:this.setAlignmentToSelectedCells(a,l,s,u,"right");break;case 20:this.setAlignmentToSelectedCells(a,l,s,u,"top",!0);break;case 21:this.setAlignmentToSelectedCells(a,l,s,u,"middle",!0);break;case 22:this.setAlignmentToSelectedCells(a,l,s,u,"bottom",!0)}}},e.prototype.setAlignmentToSelectedCells=function(e,t,n,r,o,i){for(var a,l,s=e;s<=t;s++)for(var u=n;u<=r;u++)if(this.cells){var d=this.cells[s][u].td;i&&d?null===(a=d.style)||void 0===a||a.setProperty("vertical-align",o):d&&(null===(l=d.style)||void 0===l||l.setProperty("text-align",o))}},e.prototype.mergeCells=function(e,t,n){var r,o,i,a,l=n?(null===(r=e.td)||void 0===r?void 0:r.rowSpan)===(null===(o=t.td)||void 0===o?void 0:o.rowSpan)&&!e.spanLeft:(null===(i=e.td)||void 0===i?void 0:i.colSpan)===(null===(a=t.td)||void 0===a?void 0:a.colSpan)&&!e.spanAbove;e.td&&t.td&&l&&(this.mergeCellContents(e.td,t.td),t.td=null,n?t.spanLeft=!0:t.spanAbove=!0)},e.prototype.isEmptyCell=function(e){return 1===e.childElementCount&&"BR"===(0,i.default)(e.firstChild)},e.prototype.mergeCellContents=function(e,t){if(this.isEmptyCell(t))(0,a.default)(e,t,!1);else{var n=document.createElement("br");e.appendChild(n),(0,a.default)(e,t,!0)}},e.prototype.forEachCellOfCurrentColumn=function(e){this.forEachCellOfColumn(this.col,e)},e.prototype.getCellsWithBorder=function(e,t){for(var n=[],r=0;this.cells&&r=0&&t>=0;){var n=this.getCell(e,t);if(n.td)return n.td;if(n.spanLeft)t--;else{if(!n.spanAbove)break;e--}}return null},e.prototype.forEachCellOfColumn=function(e,t){if(void 0!==e)for(var n=0;this.cells&&n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4984),o=n(7727),i=n(3606),a="transparent";function l(e){var t;return!!e.td&&!!(null===(t=(0,i.getTableCellMetadata)(e.td))||void 0===t?void 0:t.bgColorOverride)}function s(e){return"solid 1px "+(e||"transparent")}t.default=function(e,t,n,i){n&&(e.style.borderCollapse="collapse",function(e,t){e.forEach((function(n,r){n.forEach((function(o,i){o.td&&function(e,t,n,r,o,i){switch(function(e,t){e.style.borderTop=s(t.topBorderColor),e.style.borderLeft=s(t.verticalBorderColor),e.style.borderRight=s(t.verticalBorderColor),e.style.borderBottom=s(t.bottomBorderColor)}(t,e),e.tableBorderFormat){case 0:return;case 1:o||(t.style.borderLeftColor=a),i||(t.style.borderRightColor=a);break;case 4:n||(t.style.borderTopColor=a),r||n||(t.style.borderBottomColor=a),o||(t.style.borderLeftColor=a),i||o||(t.style.borderRightColor=a),o&&n&&(t.style.borderRightColor=a);break;case 2:n&&(t.style.borderTopColor=a,t.style.borderRightColor=a,t.style.borderLeftColor=a),o&&(t.style.borderLeftColor=a),i&&(t.style.borderRightColor=a);break;case 3:o&&(t.style.borderLeftColor=a),i&&(t.style.borderRightColor=a);break;case 5:n&&(t.style.borderRightColor=a,t.style.borderLeftColor=a),o&&(t.style.borderBottomColor=a,t.style.borderTopColor=a),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||a,t.style.borderBottomColor=e.bottomBorderColor||a,t.style.borderTopColor=e.topBorderColor||a);break;case 6:n&&(t.style.borderRightColor=a,t.style.borderLeftColor=a),o&&(t.style.borderBottomColor=a,t.style.borderTopColor=a),n&&o&&(t.style.borderLeftColor=e.verticalBorderColor||a,t.style.borderBottomColor=e.bottomBorderColor||a,t.style.borderTopColor=e.topBorderColor||a),n||o||(t.style.borderLeftColor=a,t.style.borderBottomColor=a,t.style.borderTopColor=a,t.style.borderRightColor=a);break;case 7:n&&(t.style.borderLeftColor=a,t.style.borderTopColor=a,t.style.borderRightColor=a),o&&(t.style.borderLeftColor=a,t.style.borderTopColor=a,t.style.borderBottomColor=a),n||o||(t.style.borderLeftColor=a,t.style.borderBottomColor=a,t.style.borderTopColor=a,t.style.borderRightColor=a),n&&o&&(t.style.borderBottomColor=e.bottomBorderColor||a)}}(t,o.td,0===r,r===e.length-1,0===i,i===n.length-1)}))}))}(t,n),function(e,t,n){var r=function(e){return e%2==0?t.bgColorEven:t.bgColorOdd},i=t.hasBandedRows,s=t.hasBandedColumns,u=t.bgColorOdd,d=t.bgColorEven,c=!i&&u===d;e.forEach((function(e,s){e.forEach((function(e){if(e.td&&!l(e))if(i){var u=r(s);(0,o.default)(e.td,u||a,!0,void 0,!0,n)}else c?(0,o.default)(e.td,t.bgColorOdd||a,!0,void 0,!0,n):(0,o.default)(e.td,a,!0,void 0,!0,n)}))})),s&&e.forEach((function(e){e.forEach((function(e,t){var i=r(t);e.td&&i&&!l(e)&&(0,o.default)(e.td,i,!0,void 0,!0,n)}))}))}(t,n,i),function(e,t){t.hasFirstColumn?e.forEach((function(t,n){t.forEach((function(t,i){t.td&&0===i&&(0===n||l(t)||(t.td.style.borderTopColor=a,(0,o.default)(t.td,a,!0,void 0,!0)),n!==e.length-1&&0!==n&&(t.td.style.borderBottomColor=a),t.td=(0,r.default)(t.td,"TH"),t.td.scope="col")}))})):e.forEach((function(e){e.forEach((function(e,t){e.td&&0===t&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")}))}))}(t,n),function(e,t,n){var i,a;t.hasHeaderRow?null===(a=e[0])||void 0===a||a.forEach((function(e){e.td&&t.headerRowColor&&(l(e)||(0,o.default)(e.td,t.headerRowColor,!0,void 0,!0,n),e.td.style.borderRightColor=t.headerRowColor,e.td.style.borderLeftColor=t.headerRowColor,e.td.style.borderTopColor=t.headerRowColor,e.td=(0,r.default)(e.td,"TH"),e.td.scope="row")})):null===(i=e[0])||void 0===i||i.forEach((function(e){e.td&&(e.td=(0,r.default)(e.td,"TD"),e.td.scope="")}))}(t,n,i))}},7146:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3606);t.default=function(e,t){var n=t.getAttribute("style");n&&(e.setAttribute("style",n),(0,r.saveTableCellMetadata)(e,{bgColorOverride:!0}))}},8570:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!t||!e.cells)return!1;var n=t.firstCell,r=t.lastCell,o=e.cells.length-1,i=e.cells[o];if(!i)return!1;var a=i.length-1,l=n.x,s=n.y,u=r.x,d=r.y;return 0==l&&0==s&&u==a&&d==o}},4731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7146),o=n(1473),i=n(8094);t.default=function(e,t,n,a){var l,s,u,d,c=new i.default(t),f=new i.default(e),p=f.row,v=f.col,h=null!==(s=p+(null===(l=c.cells)||void 0===l?void 0:l.length))&&void 0!==s?s:0,g=null!==(d=v+(null===(u=c.cells)||void 0===u?void 0:u[0].length))&&void 0!==d?d:0;for(f.row=f.cells.length-1;f.cells.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saveTableCellMetadata=t.getTableCellMetadata=void 0;var r=n(681),o=n(7570),i=(0,r.createBooleanDefinition)(!1,void 0,!0),a=(0,r.createObjectDefinition)({bgColorOverride:i},!1,!0);t.getTableCellMetadata=function(e){return(0,o.getMetadata)(e,a)},t.saveTableCellMetadata=function(e,t){e&&t&&(0,o.setMetadata)(e,t,a)}},4711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saveTableInfo=t.getTableFormatInfo=void 0;var r=n(7570),o=n(681),i=(0,o.createStringDefinition)(!1,void 0,!0),a=(0,o.createBooleanDefinition)(!1),l=(0,o.createObjectDefinition)({topBorderColor:i,bottomBorderColor:i,verticalBorderColor:i,hasHeaderRow:a,headerRowColor:i,hasFirstColumn:a,hasBandedColumns:a,hasBandedRows:a,bgColorEven:i,bgColorOdd:i,tableBorderFormat:(0,o.createNumberDefinition)(!1,void 0,0,8),keepCellShade:(0,o.createBooleanDefinition)(!0)},!1,!0);t.getTableFormatInfo=function(e){return(0,r.getMetadata)(e,l)},t.saveTableInfo=function(e,t){e&&t&&(0,r.setMetadata)(e,t,l)}},246:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Browser=t.getBrowserInfo=void 0;var n=/android/i;function r(e,t,r){var o,i=-1!=e.indexOf("rv:")&&-1!=e.indexOf("Trident"),a=-1!=e.indexOf("MSIE")||i,l=!1,s=!1,u=!1,d=!1,c=-1!=e.indexOf("WebKit"),f=!1;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(o=e||r||"")||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(o.substr(0,4)))&&(f=!0),a||(l=-1!=e.indexOf("Chrome"),s=-1!=e.indexOf("Firefox"),-1!=e.indexOf("Safari")&&(u=-1==e.indexOf("Chrome")&&-1==e.indexOf("Android")),(d=-1!=e.indexOf("Edge"))&&(c=l=s=!1)),{isMac:-1!=t.indexOf("Mac"),isWin:-1!=t.indexOf("Win")||-1!=t.indexOf("NT"),isWebKit:c,isIE:a,isIE11OrGreater:i,isSafari:u,isChrome:l,isFirefox:s,isEdge:d,isIEOrEdge:a||d,isAndroid:n.test(e),isMobileOrTablet:f}}t.getBrowserInfo=r,t.Browser="undefined"!=typeof window&&window?r(window.navigator.userAgent,window.navigator.appVersion,window.navigator.vendor):{}},5400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7727);t.default=function(e,t,n,o){if(t){var i=e.style,a=t.fontFamily,l=t.fontSize,s=t.textColor,u=t.textColors,d=t.backgroundColor,c=t.backgroundColors,f=t.bold,p=t.italic,v=t.underline;a&&(i.fontFamily=a),l&&(i.fontSize=l),u?(0,r.default)(e,u,!1,n,!1,o):s&&(0,r.default)(e,s,!1,n,!1,o),c?(0,r.default)(e,c,!0,n,!1,o):d&&(0,r.default)(e,d,!0,n,!1,o),f&&(i.fontWeight="bold"),p&&(i.fontStyle="italic"),v&&(i.textDecoration="underline")}}},4984:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(7695),i=n(3408),a=n(1473);t.default=function(e,t){var n;if(!e||!t)return null;var l=(0,i.default)(e);if(l==t.toUpperCase())return e;for(var s=e.ownerDocument.createElement(t),u=0;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collapse=void 0;var r=n(8655),o=n(9381),i=n(8375);function a(e,t,n,i,a){for(;t.parentNode!=e&&!(0,r.default)(t.parentNode,n);){if(i&&t.previousSibling||!i&&t.nextSibling){if(!a)break;(0,o.default)(t,i)}if(!t.parentNode)break;t=t.parentNode}return t}t.default=function(e,t,n,o){var l;if(!(0,r.default)(e,t)||!(0,r.default)(e,n))return[];if(t=a(e,t,n,!0,o),n=a(e,n,t,!1,o),(0,r.default)(t,n,!0))return[t];if((0,r.default)(n,t))return[n];if(t.parentNode==n.parentNode){var s=t.parentNode?(0,i.default)(null===(l=t.parentNode)||void 0===l?void 0:l.childNodes):[],u=s.indexOf(t),d=s.indexOf(n);return s.slice(u,d+1)}return[t,n]},t.collapse=a},8655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e,t,n){return!(!e||!t)&&(!(!n||e!=t)||((0,r.default)(t,"Range")&&(t=t&&t.commonAncestorContainer,n=!0),t&&3==t.nodeType&&(t=t.parentNode,n=!0),1!=e.nodeType&&11!=e.nodeType?!!n&&e==t:!(!n&&e==t)&&function(e,t){if(e.contains)return e.contains(t);for(;t;){if(t==e)return!0;t=t.parentNode}return!1}(e,t)))}},6935:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementData=void 0;var o=n(4709),i=n(5924),a=n(246);t.KnownCreateElementData=((r={})[0]={tag:""},r[1]=a.Browser.isEdge?{tag:"div",children:[{tag:"span",children:[{tag:"br"}]}]}:{tag:"div",children:[{tag:"br"}]},r[2]={tag:"blockquote",style:"margin-top:0;margin-bottom:0"},r[3]={tag:"div",style:"width: 600px; height: 1px; overflow: hidden; position: fixed; top: 0; left; 0; -webkit-user-select: text",attributes:{contenteditable:"true"}},r[4]={tag:"li",style:"display:block"},r[5]={tag:"div",style:"position: fixed; width: 0; height: 0"},r[6]={tag:"span",style:"max-width:100%;position:relative",children:[{tag:"div",style:"width:100%;height:100%;position:relative;overflow:hidden"}]},r[7]={tag:"div",style:"position: fixed; cursor: row-resize; user-select: none"},r[8]={tag:"div",style:"position: fixed; cursor: col-resize; user-select: none"},r[9]={tag:"div",style:"position: fixed; cursor: nw-resize; user-select: none; border: 1px solid #808080"},r[10]={tag:"div",style:"position: fixed; cursor: ne-resize; user-select: none; border: 1px solid #808080"},r[11]={tag:"div",style:"position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080"},r[12]={tag:"div",children:[{tag:"span",children:[{tag:"br"}]}]},r),t.default=function e(n,r){if("number"==typeof n&&(n=t.KnownCreateElementData[n]),!n||!n.tag)return null;var a=n.tag,l=n.namespace,s=n.className,u=n.style,d=n.dataset,c=n.attributes,f=n.children,p=l?r.createElementNS(l,a):r.createElement(a);return u&&p.setAttribute("style",u),s&&(p.className=s),d&&(0,i.default)(p,"HTMLElement")&&(0,o.default)(d).forEach((function(e){p.dataset[e]=d[e]})),c&&(0,o.default)(c).forEach((function(e){p.setAttribute(e,c[e])})),f&&f.forEach((function(t){if("string"==typeof t)p.appendChild(r.createTextNode(t));else if(t){var n=e(t,r);n&&p.appendChild(n)}})),p}},3598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8655),o=n(5010);t.default=function(e,t,n){var i=(e=e?1==e.nodeType?e:e.parentNode:null)&&1==e.nodeType?e:null;if(i&&n)if(i.closest)i=i.closest(n);else for(;i&&i!=t&&!(0,o.default)(i,n);)i=i.parentElement;return!t||(0,r.default)(t,i)?i:null}},5023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8375);t.default=function(e,t){var n=t.createElement("DIV");return n.innerHTML=e,(0,r.default)(n.childNodes)}},7695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComputedStyle=void 0;var r=n(7582),o=n(3598);function i(e,t){var n,i;void 0===t&&(t=["font-family","font-size","color","background-color"]);var a,l=(0,o.default)(e),s=[];if(t=Array.isArray(t)?t:[t],l){var u=(l.ownerDocument.defaultView||window).getComputedStyle(l);if(u)try{for(var d=(0,r.__values)(t),c=d.next();!c.done;c=d.next()){var f=c.value,p=u.getPropertyValue(f)||"";p="font-family"!=f?p.toLowerCase():p,p="font-size"==f?(a=p)&&a.indexOf("px")==a.length-2?Math.round(75*parseFloat(a)+.05)/100+"pt":a:p,s.push(p)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}return s}t.default=i,t.getComputedStyle=function(e,t){return i(e,t)[0]||""}},4746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e){if((0,r.default)(e,"HTMLElement"))return e.innerHTML;if(e){var t=e.ownerDocument.createElement("span");return t.appendChild(e.cloneNode(!0)),t.innerHTML}return""}},3798:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(5203);t.default=function(e,t){void 0===t&&(t=[]);var n=e.map((function(e){return(0,o.default)(e.getBoundingClientRect())})).concat(t).filter((function(e){return!!e})),i={top:Math.max.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.top}))),!1)),bottom:Math.min.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.bottom}))),!1)),left:Math.max.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.left}))),!1)),right:Math.min.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(n.map((function(e){return e.right}))),!1))};return i.top{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastLeafNode=t.getFirstLeafNode=void 0;var r=n(1630),o=n(2513);function i(e,t){for(var n=function(e){return t?e.firstChild:e.lastChild},i=n(e);i&&n(i);)i=n(i);return i&&(0,r.default)(i)&&(i=(0,o.getLeafSibling)(e,i,t)),i}t.getFirstLeafNode=function(e){return i(e,!0)},t.getLastLeafNode=function(e){return i(e,!1)}},2513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPreviousLeafSibling=t.getNextLeafSibling=t.getLeafSibling=void 0;var r=n(8655),o=n(3408),i=n(1630);function a(e,t,n,a,l){var s=null,u=n?function(e){return(null==e?void 0:e.nextSibling)||null}:function(e){return(null==e?void 0:e.previousSibling)||null},d=n?function(e){return e.firstChild}:function(e){return e.lastChild};if((0,r.default)(e,t))for(var c=t,f=!0;f;){var p=(null==c?void 0:c.parentNode)||null;for(c=u(c);!c&&p!=e;)c=u(p),p=(null==p?void 0:p.parentNode)||null;for(;c&&(!a||a.indexOf((0,o.default)(c))<0)&&d(c);)c=d(c);if(!(f=!!c&&(0,i.default)(c,l))){s=c;break}}return s}t.getLeafSibling=a,t.getNextLeafSibling=function(e,t,n){return a(e,t,!0,n)},t.getPreviousLeafSibling=function(e,t,n){return a(e,t,!1,n)}},3764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendableFormatCommandMap=void 0;var r=n(4709);t.PendableFormatCommandMap={isBold:"bold",isItalic:"italic",isUnderline:"underline",isStrikeThrough:"strikeThrough",isSubscript:"subscript",isSuperscript:"superscript"},t.default=function(e){return(0,r.default)(t.PendableFormatCommandMap).reduce((function(n,r){return n[r]=e.queryCommandState(t.PendableFormatCommandMap[r]),n}),{})}},3408:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&1==e.nodeType?e.tagName.toUpperCase():""}},5499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o="ADDRESS,ARTICLE,ASIDE,BLOCKQUOTE,CANVAS,DD,DIV,DL,DT,FIELDSET,FIGCAPTION,FIGURE,FOOTER,FORM,H1,H2,H3,H4,H5,H6,HEADER,HR,LI,MAIN,NAV,NOSCRIPT,OL,OUTPUT,P,PRE,SECTION,TABLE,TD,TH,TFOOT,UL,VIDEO".split(","),i=["block","list-item","table-cell"];t.default=function(e){var t=(0,r.default)(e);return!(!t||!(i.indexOf(e.style.display)>=0||o.indexOf(t)>=0))}},6997:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!(!e||!t||4!=(4&t.compareDocumentPosition(e)))}},1657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=["IMG"],i=["TABLE","IMG","LI"].join(","),a=/\u200b/g;function l(e,t){return e=e.replace(a,""),t?e.trim():e}t.default=function(e,t,n){if(!e)return!1;if(3==e.nodeType)return""==l(e.nodeValue||"",t);if(1==e.nodeType){var a=e,s=l(a.textContent||"",t),u=n?i+",BR":i;if(""!=s||o.indexOf((0,r.default)(a))>=0||a.querySelectorAll(u)[0])return!1}return!0}},8235:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o="AREA,BASE,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,KEYGEN,LINK,META,PARAM,SOURCE,TRACK,WBR".split(",");t.default=function(e){return!!e&&o.indexOf((0,r.default)(e))>=0}},844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4709),i=/^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\/\/[^?\/]+@|^www\.[^?\/]+@/i,a="[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",l="(?:"+a+"\\.)*"+a+"(?:\\:[0-9]+)?(?:[\\/\\?]\\S*)?",s={http:{match:new RegExp("^(?:microsoft-edge:)?http:\\/\\/"+l+"|www\\."+l,"i"),except:i,normalizeUrl:function(e){return new RegExp("^(?:microsoft-edge:)?http:\\/\\/","i").test(e)?e:"http://"+e}},https:{match:new RegExp("^(?:microsoft-edge:)?https:\\/\\/"+l,"i"),except:i},mailto:{match:new RegExp("^mailto:\\S+@\\S+\\.\\S+","i")},notes:{match:new RegExp("^notes:\\/\\/\\S+","i")},file:{match:new RegExp("^file:\\/\\/\\/?\\S+","i")},unc:{match:new RegExp("^\\\\\\\\\\S+","i")},ftp:{match:new RegExp("^ftp:\\/\\/"+l+"|ftp\\."+l,"i"),normalizeUrl:function(e){return new RegExp("^ftp:\\/\\/","i").test(e)?e:"ftp://"+e}},news:{match:new RegExp("^news:(\\/\\/)?"+l,"i")},telnet:{match:new RegExp("^telnet:(\\/\\/)?"+l,"i")},gopher:{match:new RegExp("^gopher:\\/\\/"+l,"i")},wais:{match:new RegExp("^wais:(\\/\\/)?"+l,"i")}};t.default=function(e){var t,n;if(e)try{for(var i=(0,r.__values)((0,o.default)(s)),a=i.next();!a.done;a=i.next()){var l=a.value,u=s[l],d=e.match(u.match);if(d&&d[0]==e&&(!u.except||!u.except.test(e)))return{scheme:l,originalUrl:e,normalizedUrl:u.normalizeUrl?u.normalizeUrl(e):e}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return null}},5010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5924);t.default=function(e,t){return(0,r.default)(e,"HTMLElement")&&(e.matches||e.msMatchesSelector).call(e,t)}},1473:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e){for(;!n&&e.firstChild;)e.removeChild(e.firstChild);for(;null==t?void 0:t.firstChild;)e.appendChild(t.firstChild)}}},5203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e||{left:0,right:0,top:0,bottom:0},n=t.left,r=t.right,o=t.top,i=t.bottom;return 0===n&&0===r&&0===o&&0===i?null:{left:Math.round(n),right:Math.round(r),top:Math.round(o),bottom:Math.round(i)}}},8121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,r=/^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,o=/^rgb\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*\)$/,i=/^rgba\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*\)$/;t.default=function(e){var t;return(t=(e=(e||"").trim()).match(n))?[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]:(t=e.match(r))?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:(t=e.match(o)||e.match(i))?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}},8471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8375);function o(e,t){return t.some((function(t){return 0==t?0==e:(e&t)==t}))}t.default=function(e,t,n,i,a){if(void 0===i&&(i=0),!e||!t)return[];var l=(0,r.default)(e.querySelectorAll(t));if(0!=i&&a){var s=a.startContainer,u=a.startOffset,d=a.endContainer,c=a.endOffset;if(1==s.nodeType&&s.firstChild){var f=s.childNodes[u];s=f||s.lastChild}d=1==d.nodeType&&d.firstChild&&c>0?d.childNodes[c-1]:d,l=l.filter((function(e){return n=s,r=d,a=2==i,l=(t=e).compareDocumentPosition(n),u=t.compareDocumentPosition(r),c=[0,8],a||c.push(16),o(l,c)||o(u,c)||o(l,[2])&&o(u,[4])&&!o(u,[16]);var t,n,r,a,l,u,c}))}return n&&l.forEach(n),l}},3126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e){var n=new FileReader;n.onload=function(){t(n.result)},n.onerror=function(){t(null)},n.readAsDataURL(e)}}},5924:(e,t)=>{"use strict";function n(e){var t=e&&(e.ownerDocument||("[object HTMLDocument]"==Object.prototype.toString.apply(e)?e:null));return t&&(t.defaultView||window)}Object.defineProperty(t,"__esModule",{value:!0}),t.getTargetWindow=void 0,t.getTargetWindow=n,t.default=function(e,t){var r;if("Range"==t)return"[object Range]"==Object.prototype.toString.apply(e)&&!!(null===(r=e)||void 0===r?void 0:r.commonAncestorContainer);var o=n(e),i=o&&o[t],a=window,l=a&&a[t];return l&&e instanceof l||i&&e instanceof i}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(8121),i="#ffffff";!function(e){e[e.BRIGHT=0]="BRIGHT",e[e.DARK=1]="DARK",e[e.NONE=2]="NONE"}(r||(r={}));t.default=function e(t,n,r,a,l,s){var u="string"==typeof n?n.trim():"",d="string"==typeof n?null:n,c=r?"background-color":"color";if(u||d){if(s){var f=s.registerColor((null==d?void 0:d.lightModeColor)||u,!!a,null==d?void 0:d.darkModeColor);t.style.setProperty(c,f)}r&&l&&function(t,n,r,a){if(n&&"transparent"!==n)switch(function(e){var t=function(e){var t=(0,o.default)(e);if(t){var n=t[0]/255,r=t[1]/255,i=t[2]/255;return 50*(Math.max(n,r,i)+Math.min(n,r,i))}return 255}(e);return t<20?1:t>80?0:2}(n)){case 1:e(t,{lightModeColor:i,darkModeColor:"#333333"},!1,r,!1,a);break;case 0:e(t,{lightModeColor:"#000000",darkModeColor:i},!1,r,!1,a)}}(t,(null==d?void 0:d.lightModeColor)||u,a,s)}}},1630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3408),o=n(7695),i=/^[\r\n]+$/g,a=/[\t\r\n\u0020\u200B]/gm;t.default=function e(t,n){if(3==t.nodeType)return!(t.nodeValue&&""!=t.textContent&&!i.test(t.nodeValue)&&(!n||""!=t.nodeValue.replace(a,"")));if(1==t.nodeType){if("none"==(0,o.getComputedStyle)(t,"display"))return!0;var l=(0,r.default)(t);if("DIV"==l||"SPAN"==l){for(var s=t.firstChild;s;s=s.nextSibling)if(!e(s,n))return!1;return!0}return!1}return!0}},9381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitBalancedNodeRange=void 0;var r=n(6997);function o(e,t){var n;if(!e||!e.parentNode)return null;var r=e.parentNode,o=r.cloneNode(!1);if(o.removeAttribute("id"),t)for(;r.firstChild&&r.firstChild!=e;)o.appendChild(r.firstChild);else for(;e.nextSibling;)o.appendChild(e.nextSibling);return o.firstChild&&""!=o.innerHTML?null===(n=r.parentNode)||void 0===n||n.insertBefore(o,t?r:r.nextSibling):o=null,o}t.default=o,t.splitBalancedNodeRange=function(e){var t=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[e.length-1]:e,i=t&&n&&t.parentNode==n.parentNode?t.parentNode:null;if(i){if((0,r.default)(t,n)){var a=n;n=t,t=a}o(t,!0),o(n,!1)}return i}},7409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,o,i,a=(null===(r=e.nodeValue)||void 0===r?void 0:r.substring(0,t))||"",l=(null===(o=e.nodeValue)||void 0===o?void 0:o.substring(t))||"",s=e.ownerDocument.createTextNode(n?a:l);return e.nodeValue=n?l:a,null===(i=e.parentNode)||void 0===i||i.insertBefore(s,n?e:e.nextSibling),s}},82:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e?e.parentNode:null;if(!t)return null;for(;e.firstChild;)t.insertBefore(e.firstChild,e);return t.removeChild(e),t}},4251:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(6935),i=n(5023),a=n(5924);t.default=function(e,t){var n,l;if(0==(e=e?(0,a.default)(e,"Node")?[e]:e:[]).length||!e[0]||!e[0].ownerDocument)return null;if(t||(t="div"),!(0,a.default)(t,"HTMLElement")){var s=e[0].ownerDocument;t="string"==typeof t?/^\w+$/.test(t)?s.createElement(t):(0,i.default)(t,s)[0]:(0,o.default)(t,s)}var u=e[0].parentNode;u&&u.insertBefore(t,e[0]);try{for(var d=(0,r.__values)(e),c=d.next();!c.done;c=d.next()){var f=c.value;t.appendChild(f)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(n)throw n.error}}return t}},4730:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(3381),t)},1184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(9025),t)},8801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(936),t)},4165:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(7030),t)},3106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(8854),t)},7099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(5061),t)},9082:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(872),t)},2151:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(9835),t)},3775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(2184),t)},941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(8833),t)},7037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(7311),t)},2125:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(9963),t)},7019:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(2939),t)},4739:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);(0,r.__exportStar)(n(1184),t),(0,r.__exportStar)(n(8801),t),(0,r.__exportStar)(n(4165),t),(0,r.__exportStar)(n(3106),t),(0,r.__exportStar)(n(7099),t),(0,r.__exportStar)(n(9082),t),(0,r.__exportStar)(n(2151),t),(0,r.__exportStar)(n(3775),t),(0,r.__exportStar)(n(941),t),(0,r.__exportStar)(n(2125),t),(0,r.__exportStar)(n(7019),t),(0,r.__exportStar)(n(7037),t),(0,r.__exportStar)(n(4730),t)},4296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(6344),i={MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEUP:"mouseup",getPageXY:function(e){return[e.pageX,e.pageY]}},a={MOUSEDOWN:"touchstart",MOUSEMOVE:"touchmove",MOUSEUP:"touchend",getPageXY:function(e){var t=0,n=0;if(e.targetTouches&&e.targetTouches.length>0){var r=e.targetTouches[0];t=r.pageX,n=r.pageY}return[t,n]}};var l=function(){function e(e,t,n,l,s,u){var d=this;this.trigger=e,this.context=t,this.onSubmit=n,this.handler=l,this.zoomScale=s,this.initX=0,this.initY=0,this.initValue=void 0,this.onMouseDown=function(e){var t,n,o;e.preventDefault(),e.stopPropagation(),d.addDocumentEvents(),t=(0,r.__read)(d.dndMouse.getPageXY(e),2),d.initX=t[0],d.initY=t[1],d.initValue=null===(o=(n=d.handler).onDragStart)||void 0===o?void 0:o.call(n,d.context,e)},this.onMouseMove=function(e){var t,n,o;e.preventDefault();var i=(0,r.__read)(d.dndMouse.getPageXY(e),2),a=i[0],l=i[1],s=(a-d.initX)/d.zoomScale,u=(l-d.initY)/d.zoomScale;d.initValue&&(null===(n=(t=d.handler).onDragging)||void 0===n?void 0:n.call(t,d.context,e,d.initValue,s,u))&&(null===(o=d.onSubmit)||void 0===o||o.call(d,d.context,d.trigger))},this.onMouseUp=function(e){var t,n,r;e.preventDefault(),d.removeDocumentEvents(),(null===(n=(t=d.handler).onDragEnd)||void 0===n?void 0:n.call(t,d.context,e,d.initValue))&&(null===(r=d.onSubmit)||void 0===r||r.call(d,d.context,d.trigger))},this.dndMouse=u||o.Browser.isMobileOrTablet?a:i,e.addEventListener(this.dndMouse.MOUSEDOWN,this.onMouseDown)}return e.prototype.dispose=function(){this.trigger.removeEventListener(this.dndMouse.MOUSEDOWN,this.onMouseDown),this.removeDocumentEvents()},Object.defineProperty(e.prototype,"mouseType",{get:function(){return this.dndMouse==a?"touch":"mouse"},enumerable:!1,configurable:!0}),e.prototype.addDocumentEvents=function(){var e=this.trigger.ownerDocument;e.addEventListener(this.dndMouse.MOUSEMOVE,this.onMouseMove,!0),e.addEventListener(this.dndMouse.MOUSEUP,this.onMouseUp,!0)},e.prototype.removeDocumentEvents=function(){var e=this.trigger.ownerDocument;e.removeEventListener(this.dndMouse.MOUSEMOVE,this.onMouseMove,!0),e.removeEventListener(this.dndMouse.MOUSEUP,this.onMouseUp,!0)},e}();t.default=l},3904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/[`!@#$%^&*()_+\=\[\]{};':"\\|,.<>\/?~]/,r=function(){function e(){this.editor=null,this.lastKeyTyped=null}return e.prototype.getName=function(){return"AutoFormat"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null,this.lastKeyTyped=null},e.prototype.onPluginEvent=function(e){var t=this;if(this.editor&&(7!==e.eventType&&5!==e.eventType&&6!==e.eventType||(this.lastKeyTyped=""),1===e.eventType)){var r=e.rawEvent.key;if(r&&r.length>1&&(this.lastKeyTyped=""),"-"!==this.lastKeyTyped||n.test(r)||" "===r||"-"===r)this.lastKeyTyped=r;else{var o=this.editor.getContentSearcherOfCursor(e),i=null==o?void 0:o.getSubStringBefore(3),a=null==o?void 0:o.getSubStringBefore(2),l="-"===(null==i?void 0:i[0]),s=" "===(null==i?void 0:i[0]);if(l||s||"string"==typeof i&&n.test(i[0])||"--"!==a)return;var u=null==o?void 0:o.getRangeFromText(a,!0),d=document.createTextNode("—");this.editor.addUndoSnapshot((function(){u&&(u.deleteContents(),u.insertNode(d),t.editor.select(d,-1))}),"Format",!0,{formatApiName:"autoHyphen"}),this.lastKeyTyped=null}}},e}();t.default=r},3381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFormat=void 0;var r=n(3904);Object.defineProperty(t,"AutoFormat",{enumerable:!0,get:function(){return r.default}})},678:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(692),o=n(6344),i=function(){function e(e,t){this.settingsOverride=e,this.additionalFeatures=t,this.editor=void 0,this.features=[]}return e.prototype.getName=function(){return"ContentEdit"},e.prototype.initialize=function(e){var t=this;this.editor=e;var n=(0,r.default)();(0,o.getObjectKeys)(n).forEach((function(e){var r,o=n[e],i=t.settingsOverride&&void 0!==t.settingsOverride[e];(i&&(null===(r=t.settingsOverride)||void 0===r?void 0:r[e])||!i&&!o.defaultDisabled)&&t.features.push(o)})),this.features=this.features.concat(this.additionalFeatures||[]),this.features.forEach((function(e){var n;return null===(n=t.editor)||void 0===n?void 0:n.addContentEditFeature(e)}))},e.prototype.disposeFeatures=function(){var e=this;this.editor&&this.features.forEach((function(t){return e.editor.removeContentEditFeature(t)})),this.features=[]},e.prototype.dispose=function(){this.disposeFeatures(),this.editor=void 0},e}();t.default=i},7539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoLinkFeatures=void 0;var r=n(4548),o=n(6344),i=/[.+=\s:;"',>]+$/i,a={keys:[13,32,257],shouldHandleEvent:s,handleEvent:function(e,t){var n=s(e,t);if(n){var i=t.getDocument().createElement("a"),a=t.getContentSearcherOfCursor();i.textContent=n.originalUrl,i.href=n.normalizedUrl,t.runAsync((function(t){t.addUndoSnapshot((function(){return(0,r.replaceWithNode)(t,n.originalUrl,i,!1,null!=a?a:void 0),(0,o.clearEventDataCache)(e),i}),"AutoLink",!0)}))}}},l={keys:[8],shouldHandleEvent:function(e,t){var n=t.getContentSearcherOfCursor(e);return(null==n?void 0:n.getInlineElementBefore())instanceof o.LinkInlineElement},handleEvent:function(e,t){e.rawEvent.preventDefault(),(0,r.removeLink)(t)},defaultDisabled:!0};function s(e,t){return 0==e.eventType||7==e.eventType&&"Paste"==e.source?(0,o.cacheGetEventData)(e,"LINK_DATA",(function(){var n=7==e.eventType&&"Paste"==e.source&&e.data||null,r=(0,o.matchLink)(((null==n?void 0:n.text)||"").trim()),a=t.getContentSearcherOfCursor(e);if(r&&(null==a?void 0:a.getRangeFromText(r.originalUrl,!1)))return r;var l=a&&a.getWordBefore();if(l&&l.length>5){var s=(l.match(i)||[])[0]||"",u=l.substring(0,l.length-s.length);return["()","{}","[]"].forEach((function(e){u[u.length-1]==e[1]&&u.indexOf(e[0])<0&&(u=u.substr(0,u.length-1))})),(0,o.matchLink)(u)}return null})):null}t.AutoLinkFeatures={autoLink:a,unlinkWhenBackspaceAfterLink:l}},2056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeFeatures=void 0;var r=n(6344),o={keys:[13],shouldHandleEvent:function(e,t){var n=a(e,t);return n&&(0,r.isNodeEmpty)(n)},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){l(e,t)}),void 0,!0)}},i={keys:[8],shouldHandleEvent:function(e,t){var n=a(e,t);return n&&(0,r.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){return l(e,t)}))}};function a(e,t){return(0,r.cacheGetEventData)(e,"CODE_CHILD",(function(){var e,n=null!==(e=t.getElementAtCursor("code"))&&void 0!==e?e:t.queryElements("code",1)[0];if(n){var o=t.getFocusedPosition(),i=o&&t.getBlockElementAtNode(o.normalize().node);if(i){var a=i.getStartNode()==n.parentNode?i.getStartNode():i.collapseToSingleElement();return(0,r.isNodeEmpty)(a)?a:null}}return null}))}function l(e,t){var n=a(e,t);if((0,r.safeInstanceOf)(n,"HTMLElement")){var o=n.querySelector("code");if(o)(0,r.unwrap)(o);else{var i=(0,r.splitBalancedNodeRange)(n);if(i&&(0,r.unwrap)(i),(0,r.safeInstanceOf)(n.parentElement,"HTMLPreElement")){var l=(0,r.splitBalancedNodeRange)(n);l&&(0,r.unwrap)(l)}}t.select(n,0)}}t.CodeFeatures={removeCodeWhenEnterOnEmptyLine:o,removeCodeWhenBackspaceOnEmptyFirstLine:i}},7167:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CursorFeatures=void 0;var r=n(6344),o={keys:[37,39],allowFunctionKeys:!0,shouldHandleEvent:function(e,t,n){var o,i=null;if(!(n&&(i=t.getSelectionRange())&&i.collapsed&&(o=r.Position.getStart(i))&&t.isPositionAtBeginning(o)))return!1;var a="rtl"==(0,r.getComputedStyle)(o.element,"direction"),l=e.rawEvent;return!a&&37==l.which||a&&39==l.which},handleEvent:function(e){e.rawEvent.preventDefault()},defaultDisabled:!r.Browser.isChrome};t.CursorFeatures={noCycleCursorMove:o}},4397:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntityFeatures=void 0;var r=n(7582),o=n(6344),i=n(6344),a={keys:[13],shouldHandleEvent:function(e,t){return s(e,t)},handleEvent:function(e,t){s(e,t,1)}},l={keys:[27],shouldHandleEvent:function(e,t){return s(e,t)},handleEvent:function(e,t){s(e,t,3)}};function s(e,t,n){var r=(0,i.cacheGetEventData)(e,"READONLY_ENTITY_ELEMENT",(function(){var n=e.rawEvent.target,r=n&&t.getElementAtCursor((0,i.getEntitySelector)(),n);return r&&!r.isContentEditable?r:null}));if(r&&void 0!==n){var o=(0,i.getEntityFromElement)(r);o&&t.triggerPluginEvent(15,{operation:n,rawEvent:e.rawEvent,entity:o})}return r}var u={keys:[13],shouldHandleEvent:function(e,t){return f(e,t,!0,!1)},handleEvent:function(e,t){var n,r,o;e.rawEvent.preventDefault();var a=t.getSelectionRange();if(a){var l=i.Position.getEnd(a).normalize().node,s=t.getDocument().createElement("BR");null===(n=l.parentNode)||void 0===n||n.insertBefore(s,l.nextSibling);var u,d=t.getBlockElementAtNode(l);d&&(u=d.collapseToSingleElement(),null===(r=s.parentNode)||void 0===r||r.removeChild(s)),null===(o=t.getSelectionRange())||void 0===o||o.deleteContents(),(null==u?void 0:u.nextSibling)&&t.select(u.nextSibling,0)}}},d={keys:[8],shouldHandleEvent:function(e,t){return f(e,t,!1,!0)},handleEvent:function(e,t){f(e,t,!1,!0,5)}},c={keys:[46],shouldHandleEvent:function(e,t){return f(e,t,!0,!0)},handleEvent:function(e,t){f(e,t,!0,!0,4)}};function f(e,t,n,r,a){var l=(0,i.cacheGetEventData)(e,"NEIGHBOR_ENTITY_ELEMENT_"+n+"_"+r,(function(){var e,a=t.getSelectionRange();if(!a||r&&!a.collapsed)return null;var l=null===(e=t.getSelectedRegions()[0])||void 0===e?void 0:e.rootNode;a.commonAncestorContainer.normalize();var s=i.Position.getEnd(a).normalize(),u=null;if((0==s.offset||s.isAtEnd)&&l){var d=o.ContentTraverser.createBodyTraverser(l,s.node),c=n?0==s.offset?d.currentInlineElement:d.getNextInlineElement():s.isAtEnd?d.currentInlineElement:d.getPreviousInlineElement(),f=c&&c.getContainerNode();if(!r){var p=t.getBlockElementAtNode(s.node);(!p||f&&!p.contains(f))&&(f=null)}u=f&&t.getElementAtCursor((0,i.getEntitySelector)(),f)}return u}));if(l&&void 0!==a){var s=(0,i.getEntityFromElement)(l);s&&b(s,t,a,e)}return l}var p={keys:[39,37],allowFunctionKeys:!0,shouldHandleEvent:function(e,t){if(e.rawEvent.altKey||!t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))return!1;var n=t.getElementAtCursor();return!!n&&h(e,t,"rtl"===(0,i.getComputedStyle)(n,"direction")==(37===e.rawEvent.which))},handleEvent:function(e,t){var n=C(e),r=m(e,n);if(r){var o=E(r,n,t),a=o.delimiterPair,l=o.entity;a&&l&&(0,i.matchesSelector)(l,(0,i.getEntitySelector)())&&(e.rawEvent.preventDefault(),t.runAsync((function(){var r=n?e.rawEvent.shiftKey?-3:-1:-2,o=new i.Position(a,r);if(e.rawEvent.shiftKey){var l=a.ownerDocument.getSelection();null==l||l.extend(o.node,o.offset)}else t.select(o)})))}}},v={keys:[8,46],shouldHandleEvent:function(e,t){if(!t.isFeatureEnabled("InlineEntityReadOnlyDelimiters"))return!1;var n=t.getSelectionRange();if(!(null==n?void 0:n.collapsed))return!1;var r=46===e.rawEvent.which;if(h(e,t,r)){var o=m(e,r);return!!y(e,t,r,r?null==o?void 0:o.nextElementSibling:null==o?void 0:o.previousElementSibling)}return!1},handleEvent:function(e,t){var n=46===e.rawEvent.which;y(e,t,n,null,n?4:5)}};function h(e,t,n){var r,o=null===(r=t.getFocusedPosition())||void 0===r?void 0:r.normalize();if(C(e,n),!o)return!1;var i=3==o.node.nodeType?o.node:o.node==o.element?o.element.childNodes.item(o.offset):o.element,a=n?{class:"entityDelimiterBefore",pairClass:"entityDelimiterAfter",isAtEndOrBeginning:o.isAtEnd}:{class:"entityDelimiterAfter",pairClass:"entityDelimiterBefore",isAtEndOrBeginning:0==o.offset},l=function(e,t,n){var r=g(e,t);if(r){for(var o,i=r.currentInlineElement;i&&i.getContainerNode()===t;)o=r,i=n?o.getNextInlineElement():o.getPreviousInlineElement();return null==i?void 0:i.getContainerNode()}}(t,i,n);if(a.isAtEndOrBeginning&&l){var s=t.getElementAtCursor("."+a.class,l);if(s&&u(s))return!0}return!!u(i&&t.getElementAtCursor("."+a.class,i));function u(r){if(!r)return!1;var o=E(r,n,t).delimiterPair;return o&&(o.className||"").indexOf(a.pairClass)>-1&&m(e,n,r)}}function g(e,t){var n;if(t){var r=null===(n=e.getBlockElementAtNode(t))||void 0===n?void 0:n.getStartNode();if(r&&(0,i.isBlockElement)(r))return o.ContentTraverser.createBodyTraverser(r,t)}}function m(e,t,n){return(0,i.cacheGetEventData)(e,"delimiter_cache_key_"+t,(function(){return n}))}function y(e,t,n,r,o){var a=(0,i.cacheGetEventData)(e,"entity_delimiter_cache_key_"+n,(function(){return r&&t.getElementAtCursor((0,i.getEntitySelector)(),r)}));if(a&&void 0!==o){var l=(0,i.getEntityFromElement)(a);l&&b(l,t,o,e)}return a}function b(e,t,n,o){var a=e.wrapper,l=a.nextElementSibling,s=a.previousElementSibling;t.triggerPluginEvent(15,{operation:n,rawEvent:o.rawEvent,entity:e}),e.isReadonly&&!(0,i.isBlockElement)(e.wrapper)&&t.isFeatureEnabled("InlineEntityReadOnlyDelimiters")&&(o.rawEvent.defaultPrevented?t.runAsync((function(){if(t.contains(e.wrapper)){var n=(0,r.__read)((0,i.addDelimiters)(e.wrapper),1)[0];n&&t.select(n,-3)}else!function(e,t){[e,t].forEach((function(e){var t;(0,i.getDelimiterFromElement)(e)&&(null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(e))}))}(l,s)})):(0,i.getDelimiterFromElement)(l)&&(0,i.getDelimiterFromElement)(s)&&t.select((0,i.createRange)(s,l)))}function C(e,t){return!!(0,i.cacheGetEventData)(e,"Check_Before",(function(){return t}))}function E(e,t,n){var r=null,o=null,a=g(n,e);if(!a)return{delimiterPair:o,entity:r};for(var l,s="."+(t?"entityDelimiterAfter":"entityDelimiterBefore"),u=function(e,t){var r,o=null==e?void 0:e.getContainerNode();return null!==(r=o&&n.getElementAtCursor(t,o))&&void 0!==r?r:null},d=(0,i.getEntitySelector)(),c=a.currentInlineElement;c&&(!r||!o);){if(r=r||u(c,d),o=o||u(c,s),r&&!o&&!u(c,d)){o=null;break}l=a,c=t?l.getNextInlineElement():l.getPreviousInlineElement()}return{entity:r,delimiterPair:o}}t.EntityFeatures={clickOnEntity:a,escapeFromEntity:l,enterBeforeReadonlyEntity:u,backspaceAfterEntity:d,deleteBeforeEntity:c,moveBetweenDelimitersFeature:p,removeEntityBetweenDelimiters:v}},7018:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListFeatures=void 0;var r=n(3279),o=n(1892),i=n(4548),a=n(6344),l="previousBlock",s="nextBlock",u=(0,a.createObjectDefinition)({orderedStyleType:(0,a.createNumberDefinition)(!0,void 0,1,20),unorderedStyleType:(0,a.createNumberDefinition)(!0,void 0,1,9)},!0,!0),d=function(e){return function(t,n){var r=t.rawEvent,o=r.keyCode,i=r.altKey,a=r.shiftKey,l=r.ctrlKey,s=r.metaKey;return!l&&!s&&(9===o?!i&&a===!e:a&&i&&o===(e?39:37))&&R(t,n)}},c=function(e){return function(t,n){var r=null,o=9!==t.rawEvent.keyCode&&(r=n.getElementAtCursor())&&"rtl"==(0,a.getComputedStyle)(r,"direction");(0,i.setIndentation)(n,o==e?1:0),t.rawEvent.preventDefault()}},f={keys:[9],shouldHandleEvent:d(!0),handleEvent:c(!0)},p={keys:[9],shouldHandleEvent:d(!1),handleEvent:c(!1),allowFunctionKeys:!0},v={keys:[39],shouldHandleEvent:d(!0),handleEvent:c(!0),allowFunctionKeys:!0,defaultDisabled:a.Browser.isMac},h={keys:[37],shouldHandleEvent:d(!1),handleEvent:c(!1),allowFunctionKeys:!0,defaultDisabled:a.Browser.isMac},g={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e),r=t.getSelectionRange();return n&&(null==r?void 0:r.collapsed)&&(0,a.isPositionAtBeginningOf)(a.Position.getStart(r),n)},handleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e);(null==n?void 0:n.previousSibling)?(0,i.blockFormat)(t,(function(r,o,i){var l=(0,a.createVListFromRegion)(r,!1,null!=n?n:void 0);l&&o&&i&&(l.setIndentation(o,i,1,!0),l.writeBack(t.isFeatureEnabled("ReuseAllAncestorListElements"),t.isFeatureEnabled("DisableListChain")),e.rawEvent.preventDefault())})):L(e,t)},defaultDisabled:!0},m={keys:[8],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e);return n&&(0,a.isNodeEmpty)(n)&&!n.previousSibling&&!n.getElementsByTagName("blockquote").length},handleEvent:L},y={keys:[46],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e),r=t.getSelectionRange();if(n||!r)return!1;var o=a.Position.getEnd(r).isAtEnd?function(e,t){var n=(0,a.cacheGetEventData)(e,"nextSibling",(function(){var e,n=t.getSelectionRange(),r=n&&a.Position.getEnd(n).normalize(),o=r&&t.getBodyTraverser(r.node);return null===(e=null==o?void 0:o.getNextBlockElement())||void 0===e?void 0:e.getStartNode()}));return n}(e,t):void 0;return t.getElementAtCursor("LI",o,e)},handleEvent:function(e,t){var n=M(t);t.runAsync((function(e){return(0,i.commitListChains)(e,n)}))}},b={keys:[13],shouldHandleEvent:function(e,t){var n=t.getElementAtCursor("LI",void 0,e);return!e.rawEvent.shiftKey&&n&&(0,a.isNodeEmpty)(n)},handleEvent:function(e,t){t.addUndoSnapshot((function(){return L(e,t,!1)}),void 0,!0)},defaultDisabled:!a.Browser.isIE&&!a.Browser.isChrome};function C(e){return/^(\*|-|[0-9]{1,2}\.|[0-9]{1,2}\>|[0-9]{1,2}\)|[0-9]{1,2}\-|\([0-9]{1,2}\))$/.test(e)}var E={keys:[32],shouldHandleEvent:function(e,t){var n;return!(R(e,t)||t.isFeatureEnabled("AutoFormatList")||!(n=t.getContentSearcherOfCursor(e)))&&C(n.getSubStringBefore(4))&&!n.getNearestNonTextInlineElement()},handleEvent:function(e,t){t.insertContent(" "),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n,r=t.getContentSearcherOfCursor();if(r){var o=r.getSubStringBefore(4),a=r.getRangeFromText(o,!0);if(a)if(0==o.indexOf("*")||0==o.indexOf("-"))D(t,a),(0,i.toggleBullet)(t);else if(C(o))D(t,a),(0,i.toggleNumbering)(t);else if((n=t.getSelectedRegions())&&1==n.length){var l=parseInt(o);D(t,a),(0,i.toggleNumbering)(t,l)}null===(e=r.getRangeFromText(o,!0))||void 0===e||e.deleteContents()}}),void 0,!0)}},S={keys:[32],shouldHandleEvent:function(e,t){return!(R(e,t)||!t.isFeatureEnabled("AutoFormatList"))&&A(e,t,r.default,2)},handleEvent:function(e,t){t.insertContent(" "),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n=t.getContentSearcherOfCursor();if(n){var o=n.getSubStringBefore(5),a=n.getRangeFromText(o,!0),l=(0,r.default)(o);a&&(D(t,a),(0,i.toggleBullet)(t,null!=l?l:void 0,"autoToggleList")),null===(e=n.getRangeFromText(o,!0))||void 0===e||e.deleteContents()}}),void 0,!0)}},T={keys:[32],shouldHandleEvent:function(e,t){return!(R(e,t)||!t.isFeatureEnabled("AutoFormatList"))&&A(e,t,o.default,1)},handleEvent:function(e,t){t.insertContent(" "),e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var e,n,r=t.getContentSearcherOfCursor();if(r){var a=r.getSubStringBefore(5),l=r.getRangeFromText(a,!0);if(l){var s=_(a)?1:parseInt(a),u=P(t,l),d=null!==(e=(0,o.default)(a))&&void 0!==e?e:void 0;D(t,l),(0,i.toggleNumbering)(t,u&&1!==s?void 0:s,d,"autoToggleList")}null===(n=r.getRangeFromText(a,!0))||void 0===n||n.deleteContents()}}),void 0,!0)}},P=function(e,t){var n,r=e.getBodyTraverser(null==t?void 0:t.startContainer).getPreviousBlockElement(),o=null!==(n=null==r?void 0:r.getEndNode())&&void 0!==n?n:null;return"LI"===(0,a.getTagOfNode)(o)?o:void 0},w=function(e,t,n){var r=1===n?"orderedStyleType":"unorderedStyleType",o=P(e,t),i=o?(0,a.findClosestElementAncestor)(o,void 0,1===n?"ol":"ul"):null,l=i?(0,a.getMetadata)(i,u):null;return l?l[r]:null},_=function(e){var t=parseInt(e);if(t&&1===t)return 1;var n=e.replace(/\(|\)|\-|\./g,"").trim();return 1===n.length&&["i","a","I","A"].indexOf(n)>-1?1:void 0},O={keys:[13,9,46,8,258],shouldHandleEvent:function(e,t){return t.queryElements("li",1).filter((function(e){return!e.getElementsByTagName("blockquote").length})).length>0},handleEvent:function(e,t){var n=M(t);t.runAsync((function(e){return(0,i.commitListChains)(e,n)}))}};function M(e){return a.VListChain.createListChains(e.getSelectedRegions())}function D(e,t){var n,r=e.getBlockElementAtNode(t.startContainer),o=null==r?void 0:r.getEndNode();if(o&&"BR"!=(0,a.getTagOfNode)(o)){var i=e.getDocument().createElement("BR");(0,a.isBlockElement)(o)?o.appendChild(i):null===(n=o.parentNode)||void 0===n||n.insertBefore(i,o.nextSibling),e.select(t.startContainer,t.startOffset)}}function L(e,t,n){void 0===n&&(n=!0);var r=R(e,t);if(r){var o=r[0],l=(0,a.getTagOfNode)(o);"UL"!=l&&"OL"!=l||(0,i.toggleListType)(t,"UL"==l?2:1,void 0,n),t.focus(),e.rawEvent.preventDefault()}}function R(e,t){var n=t.getElementAtCursor("LI,TABLE",void 0,e),r=n&&"LI"==(0,a.getTagOfNode)(n)&&t.getElementAtCursor("UL,OL",n);return r?[r,n]:null}function A(e,t,n,r){var o=t.getContentSearcherOfCursor(e);if(!o)return!1;var i=o.getSubStringBefore(4),a=t.getBlockTraverser(),l=a&&a.currentBlockElement?a.currentBlockElement.getTextContent().slice(0,i.length):null,s=l&&l===i,u=M(t),d=o.getRangeFromText(i,!0),c=d&&w(t,d,r),f=_(i),p=n(i,u,null!=c?c:void 0),v=f||!c||c===p||2===r;return s&&!o.getNearestNonTextInlineElement()&&p&&v}var I={keys:[8],shouldHandleEvent:function(e,t){var n,r,o=t.getElementAtCursor();if(o){var i=null===(n=t.getBlockElementAtNode(o))||void 0===n?void 0:n.getStartNode(),u=null!==(r=null==i?void 0:i.previousElementSibling)&&void 0!==r?r:null;if(x(u)){var d=t.getSelectionRange(),c=t.getContentSearcherOfCursor(e),f=null==c?void 0:c.getSubStringBefore(4),p=null==c?void 0:c.getNearestNonTextInlineElement();if(d&&d.collapsed&&""===f&&!p){var v=null==i?void 0:i.nextElementSibling,h=x(v)?v:null==v?void 0:v.firstChild;if(x(h)&&(0,a.getTagOfNode)(u)==(0,a.getTagOfNode)(h)){var g=(0,a.cacheGetEventData)(e,l,(function(){return u})),m=(0,a.cacheGetEventData)(e,s,(function(){return h}));return!!g&&!!m}}}}return!1},handleEvent:function(e,t){t.runAsync((function(t){var n=(0,a.cacheGetEventData)(e,l,(function(){return null})),r=(0,a.cacheGetEventData)(e,s,(function(){return null})),o=t.getSelectionRange();if(n&&r&&o){var i=new a.VList(n);i.mergeVList(new a.VList(r));var u=t.getDocument().createElement("span");u.id="restoreRange",o.insertNode(u),i.writeBack(),(u=t.queryElements("#restoreRange")[0]).parentElement&&(t.select(new a.Position(u,-3)),u.parentElement.removeChild(u))}}))}};function x(e){return!!e&&((0,a.safeInstanceOf)(e,"HTMLOListElement")||(0,a.safeInstanceOf)(e,"HTMLUListElement"))}t.ListFeatures={autoBullet:E,indentWhenTab:f,outdentWhenShiftTab:p,outdentWhenBackspaceOnEmptyFirstLine:m,outdentWhenEnterOnEmptyLine:b,mergeInNewLineWhenBackspaceOnFirstChar:g,maintainListChain:O,maintainListChainWhenDelete:y,autoNumberingList:T,autoBulletList:S,mergeListOnBackspaceAfterList:I,outdentWhenAltShiftLeft:h,indentWhenAltShiftRight:v}},57:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownFeatures=void 0;var r=n(6344);function o(e,t,n,o){return{keys:[e],shouldHandleEvent:function(e,n){return e.rawEvent.shiftKey===o&&!!i(e,n,t)},handleEvent:function(e,o){o.runAsync((function(o){!function(e,t,n,o){t.addUndoSnapshot((function(){var a=i(e,t,n);if(a){var l=new r.Position(a.endContainer,-1),s=a.endOffset+1<=l.offset;if(a&&s){var u=a.cloneRange();u.setStart(u.startContainer,u.startOffset+1);var d=u.extractContents().textContent,c=t.getDocument().createTextNode(null!=d?d:""),f=(0,r.wrap)(c,o);a.setEnd(a.endContainer,a.endOffset+1),a.deleteContents();var p=t.getDocument().createTextNode("​");a.insertNode(p),a.insertNode(f),t.select(p,-1)}}}),"Format",!0)}(e,o,t,n)}))}}}function i(e,t,n){return(0,r.cacheGetEventData)(e,"MARKDOWN_RANGE",(function(){var o=t.getContentSearcherOfCursor(e),i=null,a=null;return null==o||o.forEachTextInlineElement((function(e){if(a&&i)return!0;var t=e.getTextContent();if(0==t[t.length-1].trim().length)return!1;var r=e.getParentBlock().getTextContent();if(r[r.length-1].trim()===n)return!1;if(a||(a=e.getStartPosition().move(t.length)),t[0]==n)i=e.getStartPosition();else for(var o=t.length-1;o>0;o--){if(i)return!0;if(t[o]==n&&0==t[o-1].trim().length)return i=e.getStartPosition().move(o),!0}})),i&&a&&(0,r.createRange)(i,a)}))}var a=o(56,"*","b",!0),l=o(189,"_","i",!0),s=o(192,"~","s",!0),u=o(192,"`","code",!1);t.MarkdownFeatures={markdownBold:a,markdownItalic:l,markdownStrikethru:s,markdownInlineCode:u}},1495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteFeatures=void 0;var r=n(4548),o=n(6344),i="BLOCKQUOTE",a=[i,"LI","TD","TH"].join(","),l={keys:[8],shouldHandleEvent:function(e,t){var n=u(e,t);return n&&(0,o.isNodeEmpty)(n)&&!n.previousSibling},handleEvent:d},s={keys:[13],shouldHandleEvent:function(e,t){var n=u(e,t);return!e.rawEvent.shiftKey&&n&&(0,o.isNodeEmpty)(n)},handleEvent:function(e,t){return t.addUndoSnapshot((function(){return d(e,t)}),void 0,!0)}};function u(e,t){return(0,o.cacheGetEventData)(e,"QUOTE_CHILD",(function(){var e=t.getElementAtCursor(a);if(e&&(0,o.getTagOfNode)(e)==i){var n=t.getFocusedPosition(),r=n&&t.getBlockElementAtNode(n.normalize().node);if(r){var l=r.getStartNode()==e?r.getStartNode():r.collapseToSingleElement();return(0,o.isNodeEmpty)(l)?l:null}}return null}))}function d(e,t){t.addUndoSnapshot((function(){var n=u(e,t);if(n){(0,o.getTagOfNode)(n)==i&&(n=(0,o.wrap)((0,o.toArray)(n.childNodes)));var a=(0,o.splitBalancedNodeRange)(n),l=!!a&&c(a),s=a&&(0,o.unwrap)(a);t.select(n,0),l&&((0,o.safeInstanceOf)(s,"HTMLLIElement")&&s.style.removeProperty("color"),(0,r.clearFormat)(t))}})),e.rawEvent.preventDefault()}var c=function(e){return!!(e&&(0,o.safeInstanceOf)(e,"HTMLQuoteElement")&&e.style.borderLeft&&e.style.borderColor&&e.style.paddingLeft&&e.style.color)};t.QuoteFeatures={unquoteWhenBackspaceOnEmptyFirstLine:l,unquoteWhenEnterOnEmptyLine:s}},9187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShortcutFeatures=void 0;var r=n(6344),o=n(4548);function i(e,t,n,r){return void 0===r&&(r=!1),r?null:{winKey:e,macKey:t,action:n}}var a=[i(4162,8258,o.toggleBold),i(4169,8265,o.toggleItalic),i(4181,8277,o.toggleUnderline),i(4128,8224,o.clearFormat),i(4186,8282,(function(e){return e.undo()})),i(26,26,(function(e){return e.undo()}),r.Browser.isMac),i(4185,24666,(function(e){return e.redo()})),i(4286,8382,o.toggleBullet),i(4287,8383,o.toggleNumbering),i(20670,24766,(function(e){return(0,o.changeFontSize)(e,0)})),i(20668,24764,(function(e){return(0,o.changeFontSize)(e,1)}))].filter((function(e){return!!e})),l={allowFunctionKeys:!0,keys:[66,73,85,89,90,188,190,191,32,8],shouldHandleEvent:s,handleEvent:function(e,t){var n=s(e);n&&(n.action(t),e.rawEvent.preventDefault(),e.rawEvent.stopPropagation())}};function s(e){return(0,r.cacheGetEventData)(e,"DEFAULT_SHORT_COMMAND",(function(){var t=e.rawEvent,n=0!=e.eventType||t.getModifierState("AltGraph")?0:t.which|(t.metaKey&&8192)|(t.shiftKey&&16384)|(t.ctrlKey&&4096)|(t.altKey&&18);return n&&a.filter((function(e){return(r.Browser.isMac?e.macKey:e.winKey)==n}))[0]}))}t.ShortcutFeatures={defaultShortcut:l}},2828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructuredNodeFeatures=void 0;var r=n(6344),o={TD:"TABLE",TH:"TABLE",LI:"OL,UL"},i=(0,r.getObjectKeys)(o).join(","),a={keys:[13],shouldHandleEvent:l,handleEvent:function(e,t){var n=l(e,t),o=(0,r.createElement)(1,t.getDocument());t.addUndoSnapshot((function(){var e;null===(e=null==n?void 0:n.parentNode)||void 0===e||e.insertBefore(o,n),"TABLE"==(0,r.getTagOfNode)(n)&&t.select(new r.Position(o,0).normalize())})),e.rawEvent.preventDefault()},defaultDisabled:!0};function l(e,t){return(0,r.cacheGetEventData)(e,"FIRST_STRUCTURE",(function(){var n=e.rawEvent.shiftKey?null:t.getElementAtCursor(i);if(n){var a=t.getSelectionRange();if(a&&a.collapsed&&(0,r.isPositionAtBeginningOf)(r.Position.getStart(a),n)&&!t.getBodyTraverser(n).getPreviousBlockElement())return t.getElementAtCursor(o[(0,r.getTagOfNode)(n)])}return null}))}t.StructuredNodeFeatures={insertLineBeforeStructuredNodeFeature:a}},4683:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableFeatures=void 0;var r=n(4548),o=n(6344),i={keys:[9],shouldHandleEvent:function(e,t){return u(e,t)&&!d(e,t)},handleEvent:function(e,t){var n,i,a,l=e.rawEvent.shiftKey,s=u(e,t);if(s){for(var d=c(e,s),f=l?-1:1,p=null!==(n=d.row)&&void 0!==n?n:0,v=(null!==(i=d.col)&&void 0!==i?i:0)+f;;v+=f){var h=null!==(a=d.cells)&&void 0!==a?a:[];if(v<0||v>=h[p].length){if((p+=f)<0){t.select(d.table,-2);break}if(p>=h.length){(0,r.editTable)(t,1);break}v=l?h[p].length-1:0}var g=d.getCell(p,v);if(g.td){var m=new o.Position(g.td,0).normalize();t.select(m);break}}e.rawEvent.preventDefault()}}},a={keys:[9],shouldHandleEvent:function(e,t){return u(e,t)&&d(e,t)},handleEvent:function(e,t){e.rawEvent.preventDefault(),t.addUndoSnapshot((function(){var n=e.rawEvent.shiftKey,o=t.getSelectionRangeEx(),i=u(e,t);if(i){var a=c(e,i);n&&t.getElementAtCursor("blockquote",a.table,e)?(0,r.setIndentation)(t,1):n||(0,r.setIndentation)(t,0),o.coordinates&&t.select(o.table,o.coordinates)}}))}},l={keys:[38,40],shouldHandleEvent:function(e,t){return u(e,t)&&!d(e,t)},handleEvent:function(e,t){var n,r,i,a=u(e,t);if(a){var l=new o.VTable(a),s=38==e.rawEvent.which,d=s?-1:1,c=e.rawEvent.shiftKey,f=null===(n=t.getDocument().defaultView)||void 0===n?void 0:n.getSelection(),p=null;if(f){for(var v=f.anchorNode,h=f.anchorOffset,g=null!==(r=l.row)&&void 0!==r?r:0;g>=0&&l.cells&&g{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextFeatures=void 0;var r=n(4548),o=n(6344),i={keys:[9],shouldHandleEvent:function(e,t){if(t.isFeatureEnabled("TabKeyTextFeatures")&&!e.rawEvent.shiftKey){var n=t.getDocument().activeElement,r=t.getElementAtCursor("LI,TABLE",void 0,e),i=t.getElementAtCursor((0,o.getEntitySelector)(),void 0,e);return!r&&(i?i.isContentEditable:n.isContentEditable)}return!1},handleEvent:function(e,t){var n=t.getSelectionRangeEx();0==n.type&&(t.addUndoSnapshot((function(){if(n.areAllCollapsed)u(t,e);else{var i=n.ranges,a=i[0];if(l(t,a))(0,r.setIndentation)(t,0);else{var s=(0,o.createRange)(a.startContainer,a.startOffset);i.forEach((function(e){return e.deleteContents()})),t.select(s),u(t,e)}}})),e.rawEvent.preventDefault())}},a={keys:[9],shouldHandleEvent:function(e,t){if(e.rawEvent.shiftKey&&t.isFeatureEnabled("TabKeyTextFeatures")){var n=t.getSelectionRangeEx();return 0==n.type&&!n.areAllCollapsed&&t.getElementAtCursor("blockquote",void 0,e)&&!t.getElementAtCursor("LI,TABLE",void 0,e)&&l(t,n.ranges[0])}return!1},handleEvent:function(e,t){t.addUndoSnapshot((function(){return(0,r.setIndentation)(t,1)})),e.rawEvent.preventDefault()}};function l(e,t){var n=!1,r=o.Position.getStart(t),i=o.Position.getEnd(t),a=e.getBlockElementAtNode(r.node),l=e.getBlockElementAtNode(i.node);if(!a||!l)return!1;if(a.equals(l)){var u=new o.Position(a.getStartNode(),0),d=new o.Position(a.getEndNode(),-1),c=(0,o.createRange)(u,o.Position.getStart(t)),f=(0,o.createRange)(o.Position.getEnd(t),d);return!n&&s(c)&&s(f)&&(n=!0),n}return!0}function s(e){return""==e.toString()&&0==(0,o.queryElements)(e.commonAncestorContainer,"img,table,ul,ol",null,2,e).length}function u(e,t){var n=e.getDocument().createElement("span"),r=e.getContentSearcherOfCursor(t);if(r){for(var i=6-r.getSubStringBefore(Number.MAX_SAFE_INTEGER).length%6,a=null,l="",s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(7539),i=n(7167),a=n(4397),l=n(7018),s=n(57),u=n(1495),d=n(9187),c=n(2828),f=n(4683),p=n(3171),v=n(2056),h=(0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)({},l.ListFeatures),u.QuoteFeatures),f.TableFeatures),c.StructuredNodeFeatures),o.AutoLinkFeatures),d.ShortcutFeatures),i.CursorFeatures),s.MarkdownFeatures),a.EntityFeatures),p.TextFeatures),v.CodeFeatures);t.default=function(){return h}},9025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllFeatures=t.ContentEdit=void 0;var r=n(678);Object.defineProperty(t,"ContentEdit",{enumerable:!0,get:function(){return r.default}});var o=n(692);Object.defineProperty(t,"getAllFeatures",{enumerable:!0,get:function(){return o.default}})},4239:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.toLocaleLowerCase();if(t){var n=t.length-1;return 26*n+t.charCodeAt(n)-96}return null}},3279:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={"*":1,"-":2,"--":3,"->":5,"--\x3e":8,"=>":6,">":4,"—":7};t.default=function(e){var t=e.trim();return n[t]||null}},1892:(e,t,n)=>{"use strict";var r,o,i,a,l,s;Object.defineProperty(t,"__esModule",{value:!0});var u,d,c=n(4239);!function(e){e[e.Decimal=1]="Decimal",e[e.LowerAlpha=2]="LowerAlpha",e[e.UpperAlpha=3]="UpperAlpha",e[e.LowerRoman=4]="LowerRoman",e[e.UpperRoman=5]="UpperRoman"}(u||(u={})),function(e){e[e.Dot=1]="Dot",e[e.Dash=2]="Dash",e[e.Parenthesis=3]="Parenthesis",e[e.DoubleParenthesis=4]="DoubleParenthesis"}(d||(d={}));var f={".":1,"-":2,")":3},p=[13,16,15,14],v=[17,20,19,18],h=["1","a","A","I","i"],g=["i","v","x","l","c","d","m"],m=["I","V","X","L","C","D","M"],y=((r={})[1]=function(e){return T[e]||null},r[2]=function(e){return S[e]||null},r[3]=function(e){return E[e]||null},r[4]=function(e){return C[e]||null},r[5]=function(e){return b[e]||null},r),b=((o={})[1]=17,o[2]=20,o[3]=18,o[4]=19,o),C=((i={})[1]=13,i[2]=16,i[3]=14,i[4]=15,i),E=((a={})[1]=9,a[2]=12,a[3]=10,a[4]=11,a),S=((l={})[1]=5,l[2]=8,l[3]=6,l[4]=7,l),T=((s={})[1]=1,s[2]=2,s[3]=3,s[4]=4,s);t.default=function(e,t,n){var r,o=e.trim(),i="("===o[0]&&")"===o[o.length-1],a=i?o.slice(1,-1):o.slice(0,-1),l=parseInt(a),s=isNaN(l)?(0,c.default)(a):l;return!s||s<1||t&&s>1&&(t.length<1&&h.indexOf(a)<0||(null==t?void 0:t.length)>0&&!(null===(r=t[t.length-1])||void 0===r?void 0:r.canAppendAtCursor(s)))?null:function(e){return Number(e)||/^[A-Za-z\s]*$/.test(e)}(a)?function(e,t,n){var r=t?4:f[e[e.length-1]];if(r){var o=function(e,t){if(!isNaN(parseInt(e)))return 1;if(/[a-z]+/g.test(e)){if(null!=t&&p.indexOf(t)>-1&&g.indexOf(e[0])>-1||!t&&"i"===e)return 4;if(t||!t&&"a"===e)return 2}else if(/[A-Z]+/g.test(e)){if(null!=t&&v.indexOf(t)>-1&&m.indexOf(e[0])>-1||!t&&"I"===e)return 5;if(t||!t&&"A"===e)return 3}}(t?e.slice(1,-1):e.slice(0,-1),n);return o?y[o](r):null}return null}(o,i,n):null}},5713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e){var t=this;this.options=e,this.container=null,this.editor=null,this.isMenuShowing=!1,this.onDismiss=function(){var e,n;t.container&&t.isMenuShowing&&(null===(n=(e=t.options).dismiss)||void 0===n||n.call(e,t.container),t.isMenuShowing=!1)}}return e.prototype.getName=function(){return"ContextMenu"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){var e;this.onDismiss(),(null===(e=this.container)||void 0===e?void 0:e.parentNode)&&(this.container.parentNode.removeChild(this.container),this.container=null),this.editor=null},e.prototype.onPluginEvent=function(e){if(16==e.eventType&&e.items.length>0){var t=e.rawEvent,n=e.items;this.onDismiss(),this.options.allowDefaultMenu||t.preventDefault(),this.initContainer(t.pageX,t.pageY)&&(this.options.render(this.container,n,this.onDismiss),this.isMenuShowing=!0)}},e.prototype.initContainer=function(e,t){var n,o;return!this.container&&this.editor&&(this.container=(0,r.createElement)(5,this.editor.getDocument()),this.editor.getDocument().body.appendChild(this.container)),null===(n=this.container)||void 0===n||n.style.setProperty("left",e+"px"),null===(o=this.container)||void 0===o||o.style.setProperty("top",t+"px"),!!this.container},e}();t.default=o},936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenu=void 0;var r=n(5713);Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return r.default}})},2522:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e,t,n,r){return{sourceString:e,replacementHTML:t,matchSourceCaseSensitive:n,shouldReplace:r}},i=[o(":)","🙂",!0),o(";)","😉",!0),o(":O","😲",!0),o(":o","😯",!0),o("<3","❤️",!0)],a=function(){function e(e){void 0===e&&(e=i),this.longestReplacementLength=null,this.editor=null,this.replacements=null,this.replacementEndCharacters=null,this.updateReplacements(e)}return e.prototype.updateReplacements=function(e){var t;this.replacements=e,this.longestReplacementLength=(t=this.replacements,Math.max.apply(null,t.map((function(e){return e.sourceString.length})))),this.replacementEndCharacters=function(e){var t,n,o=new Set;try{for(var i=(0,r.__values)(e),a=i.next();!a.done;a=i.next()){var l=a.value,s=l.sourceString;if(0!=s.length){var u=s[s.length-1];l.matchSourceCaseSensitive?o.add(u):(o.add(u.toLocaleLowerCase()),o.add(u.toLocaleUpperCase()))}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o}(this.replacements)},e.prototype.getName=function(){return"CustomReplace"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){var t,n=this;if(3==e.eventType&&this.editor&&!this.editor.isInIME()&&e.rawEvent.data&&(null===(t=this.replacementEndCharacters)||void 0===t?void 0:t.has(e.rawEvent.data))){var r=this.editor.getContentSearcherOfCursor(e);if(r&&null!=this.longestReplacementLength){var o=r.getSubStringBefore(this.longestReplacementLength),i=this.getMatchingReplacement(o);if(i&&(!i.shouldReplace||!r||i.shouldReplace(i,r.getWordBefore(),this.editor))){var a=r.getSubStringBefore(i.sourceString.length),l=r.getRangeFromText(a,!0),s=this.editor.getDocument().createElement("span");s.innerHTML=this.editor.getTrustedHTMLHandler()(i.replacementHTML);var u=1==s.childNodes.length?s.childNodes[0]:s;l&&this.editor.addUndoSnapshot((function(){var e;l.deleteContents(),l.insertNode(u),null===(e=n.editor)||void 0===e||e.select(u,-1)}),void 0,!0)}}}},e.prototype.getMatchingReplacement=function(e){var t,n;if(0==e.length||!this.replacements)return null;var o=e.replace(/\s/g," "),i=o.toLocaleLowerCase();try{for(var a=(0,r.__values)(this.replacements),l=a.next();!l.done;l=a.next()){var s=l.value,u=(0,r.__read)(s.matchSourceCaseSensitive?[o,s.sourceString]:[i,s.sourceString.toLocaleLowerCase()],2),d=u[0],c=u[1];if(d.substring(d.length-c.length)==c)return s}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return null},e}();t.default=a},7030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomReplace=void 0;var r=n(2522);Object.defineProperty(t,"CustomReplace",{enumerable:!0,get:function(){return r.default}})},7578:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4548),o=n(6344),i=function(){function e(){var e=this;this.chains=null,this.expectedChangeSource=null,this.editor=null,this.disposer=null,this.onDrop=function(){e.cacheListChains("Drop")}}return e.prototype.getName=function(){return"CutPasteListChain"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler("drop",this.onDrop)},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 9:e.isCut&&this.cacheListChains("Cut");break;case 10:this.cacheListChains("Paste");break;case 7:this.chains&&this.chains.length>0&&this.expectedChangeSource==e.source&&this.editor&&((0,r.commitListChains)(this.editor,this.chains),this.chains=null,this.expectedChangeSource=null)}},e.prototype.cacheListChains=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getSelectedRegions();n&&(this.chains=o.VListChain.createListChains(n),this.expectedChangeSource=e)},e}();t.default=i},8854:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CutPasteListChain=void 0;var r=n(7578);Object.defineProperty(t,"CutPasteListChain",{enumerable:!0,get:function(){return r.default}})},4039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=function(){function e(e,t,n){var r=this;void 0===e&&(e=function(e){return e}),this.getTooltipCallback=e,this.target=t,this.onLinkClick=n,this.originalHref=null,this.trackedLink=null,this.editor=null,this.disposer=null,this.onMouse=function(e){var t,n,o=null===(t=r.editor)||void 0===t?void 0:t.getElementAtCursor("a[href]",e.target),i=o&&r.tryGetHref(o);i&&(null===(n=r.editor)||void 0===n||n.setEditorDomAttribute("title","mouseover"==e.type?r.getTooltipCallback(i,o):null))},this.onBlur=function(e){r.trackedLink&&r.updateLinkHrefIfShouldUpdate(),r.resetLinkTracking()}}return e.prototype.getName=function(){return"Hyperlink"},e.prototype.initialize=function(e){this.editor=e,this.disposer=e.addDomEventHandler({mouseover:this.onMouse,mouseout:this.onMouse,blur:this.onBlur})},e.prototype.dispose=function(){this.disposer&&(this.disposer(),this.disposer=null),this.editor=null},e.prototype.onPluginEvent=function(e){var t,n,o;if(6==e.eventType||2==e.eventType&&(!this.isContentEditValue(e.rawEvent)||32==e.rawEvent.which)||7==e.eventType){var i,a=(i=null===(t=this.editor)||void 0===t?void 0:t.getElementAtCursor("A[href]",void 0,e))&&i!==this.trackedLink||2==e.eventType||7==e.eventType;7==e.eventType&&"Keyboard"==e.source&&this.trackedLink!=i&&i&&(this.trackedLink=i),this.trackedLink&&(a||this.tryGetHref(this.trackedLink)!==this.originalHref)&&(a&&this.updateLinkHrefIfShouldUpdate(),this.resetLinkTracking()),!this.trackedLink&&i&&this.doesLinkDisplayMatchHref(i)&&(this.trackedLink=i,this.originalHref=this.tryGetHref(i))}if(6==e.eventType&&(i=null===(n=this.editor)||void 0===n?void 0:n.getElementAtCursor("A",e.rawEvent.srcElement))){if(this.onLinkClick&&!1!==this.onLinkClick(i,e.rawEvent))return;var l;if((l=this.tryGetHref(i))&&(0,r.isCtrlOrMetaPressed)(e.rawEvent)&&0===e.rawEvent.button){e.rawEvent.preventDefault();try{var s=this.target||"_blank",u=null===(o=this.editor)||void 0===o?void 0:o.getDocument().defaultView;null==u||u.open(l,s)}catch(e){}}}},e.prototype.tryGetHref=function(e){try{return e?e.href:null}catch(e){return null}},e.prototype.isContentEditValue=function(e){return(0,r.isCharacterValue)(e)||8==e.which||46==e.which},e.prototype.updateLinkHrefIfShouldUpdate=function(){this.trackedLink&&!this.doesLinkDisplayMatchHref(this.trackedLink)&&this.updateLinkHref()},e.prototype.resetLinkTracking=function(){this.trackedLink=null,this.originalHref=""},e.prototype.doesLinkDisplayMatchHref=function(e){if(e){var t=e.innerText.trim().replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),n=new RegExp("^(?:https?:\\/\\/)?"+t+"\\/?","i"),r=this.tryGetHref(e);if(null!==r)return n.test(r)}return!1},e.prototype.updateLinkHref=function(){var e,t=this;if(this.trackedLink){var n=(0,r.matchLink)(this.trackedLink.innerText.trim());null!==n&&(null===(e=this.editor)||void 0===e||e.addUndoSnapshot((function(){t.trackedLink.href=n.normalizedUrl})))}},e}();t.default=o},5061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HyperLink=void 0;var r=n(4039);Object.defineProperty(t,"HyperLink",{enumerable:!0,get:function(){return r.default}})},9770:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o=n(7582),i=n(7058),a=n(971),l=n(4296),s=n(2448),u=n(2627),d=n(8755),c=n(330),f=n(6147),p=n(6344),v=n(1400),h=Math.PI,g=8,m=2*h/g,y=["nw","n","ne","e","se","s","sw","w"],b={borderColor:"#DB626C",minWidth:10,minHeight:10,preserveRatio:!1,minRotateDeg:5,imageSelector:"img",rotateIconHTML:"",disableCrop:!1,disableRotate:!1,disableSideResize:!1,onSelectState:7},C=((r={})[1]=v.getCornerResizeHTML,r[2]=v.getSideResizeHTML,r[4]=c.getRotateHTML,r[8]=u.getCropHTML,r),E=function(){function e(e,t){var n=this;this.onShowResizeHandle=t,this.editor=null,this.disposer=null,this.image=null,this.clonedImage=null,this.wrapper=null,this.editInfo=null,this.lastSrc=null,this.dndHelpers=[],this.wasResized=!1,this.shadowSpan=null,this.isCropping=!1,this.pngSource=null,this.onBlur=function(){n.setEditingImage(null,!1)},this.removeWrapper=function(){n.shadowSpan&&(0,p.unwrap)(n.shadowSpan),n.wrapper=null,n.shadowSpan=null},this.updateWrapper=function(e){var t,r,o,i=n.wrapper;if(i&&n.editInfo&&n.image&&n.clonedImage&&n.options&&(null===(t=n.shadowSpan)||void 0===t?void 0:t.parentElement)){var a=P(i,"r_cropC"),l=P(i,"r_cropO"),u=P(i,"r_resizeH"),d=P(i,"r_rotateC")[0],f=P(i,"r_rotateH")[0],h=P(i,"r_cropH");n.isCropping=1==a.length&&4==l.length;var g=n.editInfo,m=g.angleRad,y=g.bottomPercent,b=g.leftPercent,C=g.rightPercent,E=g.topPercent,_=(0,s.default)(n.editInfo,n.isCropping),O=_.targetWidth,M=_.targetHeight,D=_.originalWidth,L=_.originalHeight,R=_.visibleWidth,A=_.visibleHeight,I=(O-R)/2,x=(M-A)/2,N=D*b,k=D*C,j=L*E,B=L*y;if(i.style.margin=x+"px "+I+"px",i.style.transform="rotate("+m+"rad)",function(e,t,n,r){if(t.style.borderStyle){var o=t.style.borderWidth?2*parseInt(t.style.borderWidth):2;return e.style.width=T(n+o),void(e.style.height=T(r+o))}e.style.width=T(n),e.style.height=T(r)}(i,n.image,R,A),i.style.textAlign=(o=n.shadowSpan.parentElement,(0,p.safeInstanceOf)(o,"HTMLElement")&&"rtl"==(0,p.getComputedStyle)(o,"direction")?"right":"left"),n.clonedImage.style.width=T(D),n.clonedImage.style.height=T(L),n.isCropping)S(a[0],N,j,k,B,void 0,void 0),S(l[0],0,0,k,void 0,void 0,j),S(l[1],void 0,0,0,B,k,void 0),S(l[2],N,void 0,0,0,void 0,B),S(l[3],0,j,void 0,0,N,void 0),w(h,m);else{if(n.clonedImage.style.margin=-j+"px 0 0 "+-N+"px","r_resizeH"==(null==e?void 0:e.elementClass)){var F=i.clientWidth,H=i.clientHeight;n.wasResized=!0,(0,v.doubleCheckResize)(n.editInfo,n.options.preserveRatio||!1,F,H),n.updateWrapper()}var z=null===(r=n.editor)||void 0===r?void 0:r.getVisibleViewport();f&&d&&z&&(0,c.updateRotateHandlePosition)(z,d,f),w(u,m)}}},this.options=(0,o.__assign)((0,o.__assign)({},b),e||{}),this.allowedOperations=1|(this.options.disableCrop?0:8)|(this.options.disableRotate?0:4)|(this.options.disableSideResize?0:2)}return e.prototype.getName=function(){return"ImageEdit"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.disposer=e.addDomEventHandler({blur:function(){return t.onBlur()},dragstart:function(e){t.image&&e.preventDefault()}})},e.prototype.dispose=function(){var e;this.clearDndHelpers(),null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 22:e.selectionRangeEx&&2===e.selectionRangeEx.type&&this.options&&void 0!==this.options.onSelectState&&this.setEditingImage(e.selectionRangeEx.image,this.options.onSelectState);break;case 5:var n=e.rawEvent.target,r=e.rawEvent.button;(this.shadowSpan!==n||this.shadowSpan===n&&0!==r||this.isCropping)&&this.setEditingImage(null);break;case 0:this.setEditingImage(null);break;case 7:case 12:this.removeWrapper();break;case 8:(null===(t=this.options)||void 0===t?void 0:t.imageSelector)&&(0,p.toArray)(e.clonedRoot.querySelectorAll(this.options.imageSelector)).forEach((function(e){(0,d.deleteEditInfo)(e)}))}},e.prototype.isOperationAllowed=function(e){return!!(this.allowedOperations&e)},e.prototype.setEditingImage=function(e,t){var n=this,r="number"==typeof t?t:0,l="number"!=typeof t&&!!t;!e&&this.image&&this.editor&&this.editInfo&&this.lastSrc&&this.clonedImage&&(this.clearDndHelpers(),this.pngSource&&(this.clonedImage.src=this.editInfo.src),(0,i.default)(this.editor,this.image,this.editInfo,this.lastSrc,this.wasResized||this.isCropping,this.clonedImage),this.removeWrapper(),this.editor.addUndoSnapshot((function(){return n.image}),"ImageResize"),l&&this.editor.select(this.image),this.pngSource=null,this.image=null,this.editInfo=null,this.lastSrc=null,this.clonedImage=null,this.isCropping=!1),!this.image&&(null==e?void 0:e.isContentEditable)&&this.editor&&(this.editor.addUndoSnapshot(),this.image=e,this.editInfo=(0,d.getEditInfoFromImage)(e),this.pngSource=(0,f.tryToConvertGifToPng)(this.editInfo),this.wasResized=function(e){var t=e.width,n=e.height,r=e.style;return!(""!==r.maxWidth&&"initial"!==r.maxWidth&&"auto"!==r.maxWidth||!(_(r.height)||_(r.width)||_(t)||_(n)))}(this.image),r=((0,a.default)(e)?r:3)&this.allowedOperations,this.createWrapper(r),this.updateWrapper(),this.dndHelpers=(0,o.__spreadArray)((0,o.__spreadArray)((0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(this.createDndHelpers("r_resizeH",v.Resizer)),!1),(0,o.__read)(this.createDndHelpers("r_rotateH",c.Rotator)),!1),(0,o.__read)(this.createDndHelpers("r_cropH",u.Cropper)),!1),(0,o.__read)(this.createDndHelpers("r_cropC",u.Cropper)),!1),this.editor.select(this.image))},e.prototype.flipImage=function(e,t){var n;this.image=e,this.editInfo=(0,d.getEditInfoFromImage)(e);var r=this.editInfo.angleRad;r>=Math.PI/2&&r<3*Math.PI/4||r<=-Math.PI/2&&r>-3*Math.PI/4?"horizontal"===t?this.editInfo.flippedVertical=!this.editInfo.flippedVertical:this.editInfo.flippedHorizontal=!this.editInfo.flippedHorizontal:"vertical"===t?this.editInfo.flippedVertical=!this.editInfo.flippedVertical:this.editInfo.flippedHorizontal=!this.editInfo.flippedHorizontal,this.createWrapper(4),this.updateWrapper(),this.setEditingImage(null),null===(n=this.editor)||void 0===n||n.select(e)},e.prototype.rotateImage=function(e,t){var n;this.image=e,this.editInfo=(0,d.getEditInfoFromImage)(e),this.editInfo.angleRad=this.editInfo.angleRad+t,this.createWrapper(4),this.updateWrapper(),this.setEditingImage(null),null===(n=this.editor)||void 0===n||n.select(e)},e.prototype.createWrapper=function(e){var t,n,r,o,i,a,l,s,u,d,c,f=this;if(this.image&&this.editor&&this.options&&this.editInfo){this.clonedImage=this.image.cloneNode(!0),this.clonedImage.removeAttribute("id"),this.clonedImage.style.removeProperty("max-width"),this.clonedImage.style.width=this.editInfo.widthPx+"px",this.clonedImage.style.height=this.editInfo.heightPx+"px",this.wrapper=(0,p.createElement)(6,this.image.ownerDocument),null===(n=null===(t=this.wrapper)||void 0===t?void 0:t.firstChild)||void 0===n||n.appendChild(this.clonedImage),this.wrapper.style.display=p.Browser.isSafari?"inline-block":"inline-flex",this.lastSrc=this.image.getAttribute("src"),this.clonedImage&&(this.clonedImage.src=null!==(r=this.pngSource)&&void 0!==r?r:this.editInfo.src,l=this.clonedImage,s=this.editInfo.flippedHorizontal,u=this.editInfo.flippedVertical,l.style.transform="scale("+(s?"-1":"1")+", "+(u?"-1":"1")+")",this.clonedImage.style.position="absolute");var h={borderColor:(d=this.options.borderColor,c=this.editor.isDarkMode(),"string"==typeof d?d.trim():c?d.darkModeColor.trim():d.lightModeColor.trim()),rotateIconHTML:this.options.rotateIconHTML,rotateHandleBackColor:this.editor.isDarkMode()?"#333":"white",isSmallImage:(o=this.editInfo,i=o.widthPx,a=o.heightPx,!!(i&&a&&i*i<1e4))},g=[(0,v.getResizeBordersHTML)(h)];(0,p.getObjectKeys)(C).forEach((function(t){var n=C[t](h,f.onShowResizeHandle);(e&t)==t&&n&&(0,p.arrayPush)(g,n)})),g.forEach((function(e){var t=(0,p.createElement)(e,f.image.ownerDocument);t&&f.wrapper&&f.wrapper.appendChild(t)})),this.insertImageWrapper(this.wrapper)}},e.prototype.insertImageWrapper=function(e){if(this.image){this.shadowSpan=(0,p.wrap)(this.image,"span");var t=this.shadowSpan.attachShadow({mode:"open"});this.shadowSpan.style.verticalAlign="bottom",this.shadowSpan.style.fontSize="24px",t.appendChild(e)}},e.prototype.createDndHelpers=function(e,t){var n=this,r=this.wrapper;return r&&this.editInfo?P(r,e).map((function(r){return new l.default(r,{editInfo:n.editInfo,options:n.options,elementClass:e,x:r.dataset.x,y:r.dataset.y},n.updateWrapper,t,n.editor?n.editor.getZoomScale():1)})):[]},e.prototype.clearDndHelpers=function(){var e;null===(e=this.dndHelpers)||void 0===e||e.forEach((function(e){return e.dispose()})),this.dndHelpers=[]},e}();function S(e,t,n,r,o,i,a){e.style.left=void 0!==t?T(t):e.style.left,e.style.top=void 0!==n?T(n):e.style.top,e.style.right=void 0!==r?T(r):e.style.right,e.style.bottom=void 0!==o?T(o):e.style.bottom,e.style.width=void 0!==i?T(i):e.style.width,e.style.height=void 0!==a?T(a):e.style.height}function T(e){return e+"px"}function P(e,t){return(0,p.toArray)(e.querySelectorAll("."+t))}function w(e,t){e.map((function(e){var n=e.dataset.y,r=e.dataset.x;e.style.cursor=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n="");var r=function(e){var t=Math.round(e/m)%g;return t<0?t+g:t}(e),o=t+n,i=y.indexOf(o),a=i>=0&&i+r;return a?y[a%g]:""}(t,n,r)+"-resize"}))}function _(e){var t="string"==typeof e?parseInt(e):e;return!isNaN(t)}t.default=E},971:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return!1;try{var t=e.ownerDocument.createElement("canvas");t.width=10,t.height=10;var n=t.getContext("2d");return!!n&&(n.drawImage(e,0,0),n.getImageData(0,0,1,1),!0)}catch(e){return!1}}},8318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2463),o=n(8755);t.default=function(e,t){var n=(0,o.getEditInfoFromImage)(e);if(n){var i=(0,r.default)(n,t),a=i.width,l=i.height;return Math.round(a)==Math.round(n.widthPx)&&Math.round(l)==Math.round(n.heightPx)}return!1}},5801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8755);t.default=function(e,t){e.addUndoSnapshot((function(){t.style.width="",t.style.height="",t.style.maxWidth="100%",t.removeAttribute("width"),t.removeAttribute("height"),(0,r.deleteEditInfo)(t)}),"ImageResize")}},470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7058),o=n(2463),i=n(8318),a=n(8755);t.default=function(e,t,n,l,s){var u,d,c,f=(0,a.getEditInfoFromImage)(t);(0,i.default)(t,n)||(u=t,d=t.src,c=function(){if(!e.isDisposed()&&e.contains(t)&&f){var i=t.getAttribute("src"),a=(0,o.default)(f,n),u=a.width,d=a.height;f.widthPx=Math.max(u,l),f.heightPx=Math.max(d,s),e.addUndoSnapshot((function(){(0,r.default)(e,t,f,i||"",!0)}),"ImageResize"),e.select(t)}},u.onload=function(){u.onload=null,u.onerror=null,c()},u.onerror=function(){u.onload=null,u.onerror=null,c()},u.src=d)}},7058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6249),o=n(4081),i=n(2448),a=n(8755);t.default=function(e,t,n,l,s,u){var d="",c=(0,a.getEditInfoFromImage)(null!=u?u:t),f=(0,r.default)(n,c);switch(f){case 1:d=n.src;break;case 2:d=l;break;case 3:d=(0,o.default)(null!=u?u:t,n)}d!=l&&(d=e.triggerPluginEvent(19,{image:t,originalSrc:n.src,previousSrc:l,newSrc:d}).newSrc),d==n.src?(0,a.deleteEditInfo)(t):(0,a.saveEditInfo)(t,n);var p=(0,i.default)(n),v=p.targetWidth,h=p.targetHeight;t.src=d,(s||3==f)&&(t.width=v,t.height=h)}},6249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditInfoState=void 0;var r,o=n(7582),i=["angleRad"],a=["leftPercent","rightPercent","topPercent","bottomPercent"],l=(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(i),!1),(0,o.__read)(a),!1),s=(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(l),!1),(0,o.__read)(["widthPx","heightPx"]),!1);function u(e,t){return Math.abs(e-t)<.001}(r=t.ImageEditInfoState||(t.ImageEditInfoState={}))[r.Invalid=0]="Invalid",r[r.ResizeOnly=1]="ResizeOnly",r[r.SameWithLast=2]="SameWithLast",r[r.FullyChanged=3]="FullyChanged",t.default=function(e,t){return e&&e.src&&!s.some((function(t){return!("number"==typeof e[t])}))?!l.every((function(t){return u(e[t],0)}))||e.flippedHorizontal||e.flippedVertical||t&&(!t||e.angleRad!==t.angleRad)?t&&i.every((function(t){return u(e[t],0)}))&&i.every((function(e){return u(t[e],0)}))&&a.every((function(n){return u(e[n],t[n])}))&&t.flippedHorizontal===e.flippedHorizontal&&t.flippedVertical===e.flippedVertical?2:3:1:0}},8755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEditInfoFromImage=t.deleteEditInfo=t.saveEditInfo=void 0;var r=n(6249),o=n(6344);t.saveEditInfo=function(e,t){e&&(0,o.setMetadata)(e,t)},t.deleteEditInfo=function(e){e&&(0,o.removeMetadata)(e)},t.getEditInfoFromImage=function(e){var t=(0,o.getMetadata)(e);return t&&0!=(0,r.default)(t)?t:function(e){return{src:e.getAttribute("src")||"",widthPx:e.clientWidth,heightPx:e.clientHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight,leftPercent:0,rightPercent:0,topPercent:0,bottomPercent:0,angleRad:0}}(e)}},4081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2448);t.default=function(e,t){var n=t.angleRad,o=t.widthPx,i=t.heightPx,a=t.bottomPercent,l=t.leftPercent,s=t.rightPercent,u=t.topPercent,d=t.naturalWidth,c=t.naturalHeight,f=d*(1-l-s),p=c*(1-u-a),v=window.devicePixelRatio||1,h=document.createElement("canvas"),g=(0,r.default)(t),m=g.targetWidth,y=g.targetHeight;h.width=m*v,h.height=y*v;var b=h.getContext("2d");return b&&(b.scale(v,v),b.translate(m/2,y/2),b.rotate(n),b.scale(t.flippedHorizontal?-1:1,t.flippedVertical?-1:1),b.drawImage(e,d*l,c*u,f,p,-o/2,-i/2,o,i)),h.toDataURL("image/png",1)}},2448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.widthPx,r=e.heightPx,o=e.angleRad,i=n/(1-e.leftPercent-e.rightPercent),a=r/(1-e.topPercent-e.bottomPercent),l=t?i:n,s=t?a:r;return{targetWidth:Math.abs(l*Math.cos(o))+Math.abs(s*Math.sin(o)),targetHeight:Math.abs(l*Math.sin(o))+Math.abs(s*Math.cos(o)),originalWidth:i,originalHeight:a,visibleWidth:l,visibleHeight:s}}},2463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.naturalWidth,r=e.naturalHeight,o=e.leftPercent,i=e.topPercent;return{width:n*(1-o-e.rightPercent)*t,height:r*(1-i-e.bottomPercent)*t}}},6147:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryToConvertGifToPng=void 0;var r=n(4081);t.tryToConvertGifToPng=function(e){var t=e.src,n=e.widthPx,o=e.heightPx,i=e.naturalHeight,a=e.naturalWidth;if(t.indexOf(".gif")>-1||t.indexOf("image/gif")>-1)try{var l=document.createElement("img");l.src=t;var s={src:t,widthPx:n,heightPx:o,naturalWidth:a,naturalHeight:i,leftPercent:0,rightPercent:0,topPercent:0,bottomPercent:0,angleRad:0};return(0,r.default)(l,s)}catch(e){return null}return null}},2627:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCropHTML=t.Cropper=void 0;var r=n(7582),o=n(1400),i=["w","e"],a=["s","n"],l={sw:0,nw:90,ne:180,se:270};function s(e,t,n,r,o){var i=n*(1-r)-o,a=n*e+t;return Math.max(Math.min(a,i),0)/n}t.Cropper={onDragStart:function(e){var t=e.editInfo;return(0,r.__assign)({},t)},onDragging:function(e,t,n,i,a){var l,u=e.editInfo,d=e.x,c=e.y,f=e.options;i=(l=(0,r.__read)((0,o.rotateCoordinate)(i,a,u.angleRad),2))[0],a=l[1];var p=u.widthPx,v=u.heightPx,h=u.leftPercent,g=u.rightPercent,m=u.topPercent,y=u.bottomPercent,b=f.minWidth,C=f.minHeight,E=1-h-g,S=1-m-y;if(E>0&&S>0&&void 0!==b&&void 0!==C){var T=p/E,P=v/S,w="e"!=d?s(n.leftPercent,i,T,g,b):h,_="w"!=d?s(n.rightPercent,-i,T,h,b):g,O="s"!=c?s(n.topPercent,a,P,y,C):m,M="n"!=c?s(n.bottomPercent,-a,P,m,C):y;return u.leftPercent=w,u.rightPercent=_,u.topPercent=O,u.bottomPercent=M,u.widthPx=T*(1-w-_),u.heightPx=P*(1-O-M),!0}return!1}},t.getCropHTML=function(){var e={tag:"div",style:"position:absolute;background-color:rgb(0,0,0,0.5);pointer-events:none",className:"r_cropO"},t={tag:"div",style:"position:absolute;overflow:hidden",className:"r_cropC",children:[]};return t&&i.forEach((function(e){return a.forEach((function(n){var r;return null===(r=t.children)||void 0===r?void 0:r.push(function(e,t){var n;return{tag:"div",className:"r_cropH",style:"position:absolute;pointer-events:auto;cursor:"+t+e+"-resize;"+("w"==e?"left":"right")+":0;"+("n"==t?"top":"bottom")+":0;width:22px;height:22px;transform:rotate("+l[t+e]+"deg)",dataset:{x:e,y:t},children:(n=[],[0,1].forEach((function(e){return[0,1].forEach((function(t){n.push(function(e,t){return{tag:"div",style:"position:absolute;left:"+e+"px;bottom:"+e+"px;"+(0==t?"right:"+e+"px;height:"+(7-2*e)+"px;":"top:"+e+"px;width:"+(7-2*e)+"px;")+";background-color:"+(0==e?"white":"black")}}(e,t))}))})),n)}}(e,n))}))})),[t,e,e,e,e]}},1400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getResizeBordersHTML=t.getSideResizeHTML=t.getCornerResizeHTML=t.doubleCheckResize=t.rotateCoordinate=t.Resizer=void 0;var r,o=n(7582);!function(e){e[e.SquareHandles=0]="SquareHandles",e[e.CircularHandlesCorner=1]="CircularHandlesCorner"}(r||(r={}));var i=["w","","e"],a=["s","","n"];function l(e,t,n){if(0==e&&0==t)return[0,0];var r=Math.sqrt(e*e+t*t);return n=Math.atan2(t,e)-n,[r*Math.cos(n),r*Math.sin(n)]}function s(e,t,n,r){var o="w"==e?"left":"right",i="n"==t?"top":"bottom",a=t+e;return""==e&&""==t?null:{tag:"div",style:"position:absolute;"+o+":"+(""==e?"50%":"0px")+";"+i+":"+(""==t?"50%":"0px"),children:[{tag:"div",style:u[r](a,i,o,n),className:"r_resizeH",dataset:{x:e,y:t}}]}}t.Resizer={onDragStart:function(e){var t=e.editInfo;return(0,o.__assign)({},t)},onDragging:function(e,t,n,r,i){var a,s=e.x,u=e.y,d=e.editInfo,c=e.options,f=n.widthPx>0&&n.heightPx>0?1*n.widthPx/n.heightPx:0;if(r=(a=(0,o.__read)(l(r,i,d.angleRad),2))[0],i=a[1],void 0!==c.minWidth&&void 0!==c.minHeight){var p=""==s,v=""==u,h=!(p||v)&&(c.preserveRatio||t.shiftKey),g=p?n.widthPx:Math.max(n.widthPx+r*("w"==s?-1:1),c.minWidth),m=v?n.heightPx:Math.max(n.heightPx+i*("n"==u?-1:1),c.minHeight);return h&&f>0&&(f>1?(g=m*f)0?o/i:0;n=Math.floor(n),r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),e.widthPx=n,e.heightPx=r,t&&a>0&&(o!==n||i!==r)&&(n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRotateHTML=t.updateRotateHandlePosition=t.Rotator=void 0;var r=n(7582),o=180/Math.PI;function i(e){var t;return{tag:"svg",namespace:"http://www.w3.org/2000/svg",style:"width:16px;height:16px;margin: 8px 8px",children:[{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:(t={d:"M 10.5,10.0 A 3.8,3.8 0 1 1 6.7,6.3",transform:"matrix(1.1 1.1 -1.1 1.1 11.6 -10.8)"},t["fill-opacity"]="0",t.stroke=e,t)},{tag:"path",namespace:"http://www.w3.org/2000/svg",attributes:{d:"M12.0 3.648l.884-.884.53 2.298-2.298-.53z",stroke:e}}]}}t.Rotator={onDragStart:function(e){var t=e.editInfo;return(0,r.__assign)({},t)},onDragging:function(e,t,n,r,i){var a=e.editInfo,l=e.options,s=a.heightPx/2+31,u=s*Math.sin(n.angleRad)+r,d=s*Math.cos(n.angleRad)-i,c=Math.atan2(u,d);if(!t.altKey&&l&&void 0!==l.minRotateDeg){var f=c*o;c=Math.round(f/l.minRotateDeg)*l.minRotateDeg/o}return a.angleRad!=c&&(a.angleRad=c,!0)}},t.updateRotateHandlePosition=function(e,t,n){var r=n.getBoundingClientRect();if(r){var o=r.top-e.top,i=r.left-e.left,a=r.right-e.right,l=r.bottom-e.bottom,s=Number.MAX_SAFE_INTEGER;o<=0?s=o:i<=0?s=i:a>=0?s=a:l>=0&&(s=l);var u=Math.max(Math.min(15,s),0),d=Math.max(Math.min(32,s-u),0);t.style.top=-u+"px",t.style.height=u+"px",n.style.top=-d+"px"}},t.getRotateHTML=function(e){var t=e.borderColor;return[{tag:"div",className:"r_rotateC",style:"position:absolute;left:50%;width:1px;background-color:"+t+";top:-15px;height:15px;",children:[{tag:"div",className:"r_rotateH",style:"position:absolute;background-color:"+e.rotateHandleBackColor+";border:solid 1px "+t+";border-radius:50%;width:32px;height:32px;left:-16px;cursor:move;top:-32px;",children:[i(t)]}]}]}},872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetImage=t.isResizedTo=t.resizeByPercentage=t.canRegenerateImage=t.ImageEdit=void 0;var r=n(9770);Object.defineProperty(t,"ImageEdit",{enumerable:!0,get:function(){return r.default}});var o=n(971);Object.defineProperty(t,"canRegenerateImage",{enumerable:!0,get:function(){return o.default}});var i=n(470);Object.defineProperty(t,"resizeByPercentage",{enumerable:!0,get:function(){return i.default}});var a=n(8318);Object.defineProperty(t,"isResizedTo",{enumerable:!0,get:function(){return a.default}});var l=n(5801);Object.defineProperty(t,"resetImage",{enumerable:!0,get:function(){return l.default}})},8099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=function(e){function t(t,n,r,o,i){return void 0===t&&(t=10),void 0===n&&(n=10),void 0===r&&(r="#DB626C"),void 0===o&&(o=!1),void 0===i&&(i="img"),e.call(this,{minHeight:n,minWidth:t,borderColor:r,preserveRatio:o,imageSelector:i})||this}return(0,r.__extends)(t,e),t.prototype.showResizeHandle=function(e){this.setEditingImage(e,3)},t.prototype.hideResizeHandle=function(e){this.setEditingImage(null,e)},t}(n(9770).default);t.default=o},9835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageResize=void 0;var r=n(8099);Object.defineProperty(t,"ImageResize",{enumerable:!0,get:function(){return r.default}})},3835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7401),o=n(9474),i=n(8373),a=n(1820),l=n(2621),s=n(8149),u=n(5155),d=n(9053),c=n(5323),f=n(6344),p=function(){function e(e,t){void 0===e&&(e="SPAN"),void 0===t&&(t=!1),this.unknownTagReplacement=e,this.convertSingleImageBody=t,this.editor=null}return e.prototype.getName=function(){return"Paste"},e.prototype.initialize=function(e){this.editor=e},e.prototype.dispose=function(){this.editor=null},e.prototype.onPluginEvent=function(e){if(this.editor&&10==e.eventType){var t=e.fragment,n=e.sanitizingOption,p=this.editor.getTrustedHTMLHandler();switch((0,f.getPasteSource)(e,this.convertSingleImageBody)){case 0:(0,s.default)(e);break;case 1:case 2:0!==e.pasteType&&2!==e.pasteType||(0,i.default)(e,p);break;case 3:(0,l.default)(e,p);break;case 5:(0,a.default)(t,n);break;case 4:n.additionalTagReplacements["google-sheets-html-origin"]="*";break;case 7:(0,r.default)(e,p);break;case 6:(0,o.default)(t),(0,u.default)(t)}(0,c.default)(n),(0,d.default)(n),n.unknownTagReplacement=this.unknownTagReplacement}},e}();t.default=p},9474:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);function o(e){if(e&&!e.nextSibling&&["OL","UL","MENU"].indexOf((0,r.getTagOfNode)(e))<0){var t=!1;if((0,r.toArray)(e.childNodes).every((function(e){var n;return!(!(0,r.safeInstanceOf)(e,"Text")||(null===(n=e.nodeValue)||void 0===n?void 0:n.trim()))||"LI"==(0,r.getTagOfNode)(e)&&(t=!0,!0)}))&&t)return!0}return!1}t.default=function(e){o(e)?(0,r.wrap)((0,r.toArray)(e.childNodes),"UL"):(0,r.safeInstanceOf)(e.firstChild,"HTMLElement")&&o(e.firstChild)&&(0,r.changeElementTag)(e.firstChild,"UL")}},8373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.excelHandler=void 0;var r=n(6344),o=/<\/\s*td\s*>((?!<\/\s*tr\s*>)[\s\S])*$/i,i=/<\/\s*tr\s*>((?!<\/\s*table\s*>)[\s\S])*$/i,a=/]*>[^<]*/i,l=/]*>[^<]*/i;function s(e,t){if(e.match(o)){var n=t.match(a);e=(n?n[0]:"

    ")+e+"
    "}return e}t.default=function(e,t){var n=e.fragment,o=e.sanitizingOption,i=e.htmlBefore,a=e.clipboardData,l=a.html?s(a.html,i):void 0;if(l&&a.html!=l){var u=(new DOMParser).parseFromString(t(l),"text/html");(0,r.moveChildNodes)(n,null==u?void 0:u.body)}var d=n.firstChild;d&&d.childNodes.length>0&&"DIV"==(0,r.getTagOfNode)(d)&&Array.from(d.childNodes).every((function(e){return"META"==(0,r.getTagOfNode)(e)||"TABLE"==(0,r.getTagOfNode)(e)&&e==d.lastChild}))&&d.lastChild&&e.fragment.replaceChildren(d.lastChild),(0,r.chainSanitizerCallback)(o.elementCallbacks,"TD",(function(e){return"none"==e.style.borderStyle&&(e.style.border="solid 1px #d4d4d4"),!0}))},t.excelHandler=s},7401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t){var n=e.fragment,o=e.clipboardData,i=o.html,a=o.image;if(i&&a){var l=(new DOMParser).parseFromString(t(i),"text/html");(0,r.moveChildNodes)(n,null==l?void 0:l.body)}}},2184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Paste=void 0;var r=n(3835);Object.defineProperty(t,"Paste",{enumerable:!0,get:function(){return r.default}})},5155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);function o(e){var t,n,o,i=e.start,a=e.end;if(i==a&&"DIV"==(0,r.getTagOfNode)(i)){var l=(0,r.changeElementTag)(i,"SPAN");e.start=l,e.end=l,l&&l.lastChild&&"BR"==(0,r.getTagOfNode)(l.lastChild)&&l.removeChild(l.lastChild)}else"BR"==(0,r.getTagOfNode)(a)&&(l=null===(t=a.ownerDocument)||void 0===t?void 0:t.createTextNode(""))&&(null===(n=a.parentNode)||void 0===n||n.insertBefore(l,a),e.end=l,null===(o=a.parentNode)||void 0===o||o.removeChild(a))}function i(e,t,n,o){var i,a,l,s,u=(0,r.getBlockElementAtNode)(e,t.start),d=n?(0,r.getNextLeafSibling)(e,t.end):(0,r.getPreviousLeafSibling)(e,t.start);if(d)if(null==u?void 0:u.contains(d))(c=null===(i=t.start.ownerDocument)||void 0===i?void 0:i.createElement("br"))&&(null===(a=(n?t.end:t.start).parentNode)||void 0===a||a.insertBefore(c,n?t.end.nextSibling:t.start));else if(o&&o.end==o.start&&"SPAN"==(0,r.getTagOfNode)(o.end)){var c,f=(0,r.getPreviousLeafSibling)(e,t.start);o.end.contains(f)&&!(0,r.findClosestElementAncestor)(t.start,e,"li")&&(c=null===(l=t.start.ownerDocument)||void 0===l?void 0:l.createElement("br"))&&(null===(s=t.start.parentNode)||void 0===s||s.insertBefore(c,t.start))}}t.default=function(e){for(var t=r.ContentTraverser.createBodyTraverser(e),n=[],a=null==t?void 0:t.currentBlockElement;a;a=t.getNextBlockElement())n.push({start:a.getStartNode(),end:a.getEndNode()});if(n.length>0){var l=n.length-1;o(n[0]),o(n[l]),i(e,n[0],!0),i(e,n[l],!1,n[0])}}},6728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createListItemBlock=void 0,t.createListItemBlock=function(e){return void 0===e&&(e=null),{startElement:e,endElement:e,insertPositionNode:null,listItemContainers:e?[e]:[]}}},1820:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=n(8979),i=["TableInsertRowGapBlank","TableColumnResizeHandle","TableCellTopBorderHandle","TableCellLeftBorderHandle","TableHoverColumnHandle","TableHoverRowHandle"].map((function(e){return"."+e})).join(",");t.default=function(e,t){e.querySelectorAll('ul[class^="BulletListStyle"]>.OutlineElement,ol[class^="NumberListStyle"]>.OutlineElement,span.WACImageContainer').forEach((function(e){var t=e;t.style.removeProperty("display"),t.style.removeProperty("margin")})),(0,o.isWordOnlineWithList)(e)&&(0,o.default)(e),(0,r.chainSanitizerCallback)(t.cssStyleCallbacks,"border",(function(e,t){return"IMG"!=t.tagName||"none"!=e})),e.querySelectorAll(i).forEach((function(e){var t;return null===(t=e.parentElement)||void 0===t?void 0:t.removeChild(e)}))}},8979:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWordOnlineWithList=void 0;var r=n(6728),o=n(6344),i='div.ListContainerWrapper>ul[class^="BulletListStyle"],div.ListContainerWrapper>ol[class^="NumberListStyle"],span.WACImageContainer > img',a="ListContainerWrapper",l=["111","9643","9830"];function s(e,t,n){var r,o=t.createElement(n),i=null===(r=e.firstElementChild)||void 0===r?void 0:r.getAttribute("start");return i&&o.setAttribute("start",i),o}function u(e,t,n){var r;if(e){var o,i=n.insertPositionNode;i?(o=i.parentNode)&&o.insertBefore(e,i):(o=null===(r=n.startElement)||void 0===r?void 0:r.parentNode)?o.appendChild(e):t.appendChild(e)}}t.isWordOnlineWithList=function(e){return!(!e||!e.querySelector(i))},t.default=function(e){!function(e){(0,o.toArray)(e.querySelectorAll(i)).forEach((function(e){var t=new RegExp("\\b"+a+"\\b","g");if(e.previousSibling){var n=(0,o.splitParentNode)(e,!0);n.className=n.className.replace(t,"")}if(e.nextSibling){var r=(0,o.splitParentNode)(e,!1);r.className=r.className.replace(t,"")}}))}(e),function(e){for(var t=e.querySelectorAll("."+a),n=[],i=null,l=0;l0&&n.push(i),n}(e).forEach((function(t){var n,r,i;!function(e,t){t.startElement&&t.endElement&&(0,o.collapseNodes)(e,t.startElement,t.endElement,!0).forEach((function(e){"DIV"==(0,o.getTagOfNode)(e.firstChild)&&(0,o.unwrap)(e)}))}(e,t),t.insertPositionNode=null!==(r=null===(n=t.endElement)||void 0===n?void 0:n.nextSibling)&&void 0!==r?r:null;var a=void 0,d=e.ownerDocument;t.listItemContainers.forEach((function(n){var r=function(e){var t=(0,o.getTagOfNode)(e.firstChild);return"UL"==t||"OL"==t?t:null}(n);r&&(a||(a=s(n,d,r)),(0,o.toArray)(n.querySelectorAll("li")).forEach((function(i){var c,f=parseInt(null!==(c=i.getAttribute("data-aria-level"))&&void 0!==c?c:"");a&&(0,o.getTagOfNode)(a)!=r&&1==f&&r&&(u(a,e,t),a=s(n,d,r)),a&&r&&function(e,t,n,r){var i;if(n){var a=parseInt(null!==(i=t.getAttribute("data-aria-level"))&&void 0!==i?i:""),s=t.getAttribute("data-leveltext");"UL"==n&&s&&l.indexOf(s.charCodeAt(0).toString())>-1&&(t.style.listStyleType='"'+s+' "');for(var u=e;a>1;){if(u.firstChild){var d=u.lastElementChild,c=(0,o.getTagOfNode)(d);!d||"UL"!=c&&"OL"!=c?(u.appendChild(r.createElement(n)),u.lastElementChild&&(u=u.lastElementChild)):u=d}else u.appendChild(r.createElement(n)),u.firstElementChild&&(u=u.firstElementChild);a--}u.appendChild(t)}}(a,i,r,d)})))})),a&&u(a,e,t);var c=null===(i=t.startElement)||void 0===i?void 0:i.parentNode;c&&t.listItemContainers.forEach((function(e){c.removeChild(e)}))})),function(e){return e.querySelectorAll(".WACImageContainer")}(e).forEach((function(e){(0,o.safeInstanceOf)(e,"HTMLSpanElement")&&e.childNodes.forEach((function(e){var t;"IMG"!=(0,o.getTagOfNode)(e)&&(null===(t=e.parentElement)||void 0===t||t.removeChild(e))}))}))}},2621:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t){var n=e.fragment,o=e.clipboardData;if(o.html&&!o.text&&o.image){var i=(new DOMParser).parseFromString(t(o.html),"text/html");(0,r.moveChildNodes)(n,null==i?void 0:i.body)}}},4726:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecatedColorList=void 0,t.DeprecatedColorList=["activeborder","activecaption","appworkspace","background","buttonhighlight","buttonshadow","captiontext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedfhadow","window","windowframe","windowtext"]},9053:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=n(4726);t.default=function(e){["color","background-color"].forEach((function(t){(0,r.chainSanitizerCallback)(e.cssStyleCallbacks,t,(function(e){return o.DeprecatedColorList.indexOf(e)<0}))}))}},5323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=["http:","https:","notes:","mailto:","onenote:"];t.default=function(e){(0,r.chainSanitizerCallback)(e.attributeCallbacks,"href",(function(e,t){return function(e,t){var n;try{n=new URL(e)}catch(e){n=void 0}return n&&o.indexOf(n.protocol)>-1?e:(t.removeAttribute("href"),"")}(e,t)}))}},3825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLevelLists=void 0,t.createLevelLists=function(){return{listsMetadata:{},currentUniqueListId:-1}}},6482:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverterArguments=void 0;var r=n(3825);t.createWordConverterArguments=function(e){return{nodes:e,currentIndex:0,lists:{},listItems:[],currentListIdsByLevels:[(0,r.createLevelLists)()],lastProcessedItem:null}}},9873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getObject=t.setObject=t.createCustomData=void 0;var n="NodeId";function r(e,t){var r=t.getAttribute(n);return r||(r=e.nextNodeId.toString(),e.nextNodeId++,t.setAttribute(n,r)),r}t.createCustomData=function(){return{dict:{},nextNodeId:1}},t.setObject=function(e,t,n,o){if(1==t.nodeType){var i=r(e,t);""!=i&&(e.dict[i]||(e.dict[i]={}),e.dict[i][n]=o)}},t.getObject=function(e,t,n){if(1==t.nodeType){var o=r(e,t);if(""!=o)return e.dict[o]&&e.dict[o][n]}return null}},7921:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o="mso-comment-parent",i="mso-comment-reference",a="mso-comment-date",l=/#_msocom_/,s="mso-comment-continuation",u="mso-comment-done";t.default=function(e,t){(0,r.chainSanitizerCallback)(e,"SPAN",(function(e){var t;return"comment"==(0,r.getStyles)(e)["mso-special-character"]&&(null===(t=e.parentElement)||void 0===t||t.removeChild(e)),!0})),(0,r.chainSanitizerCallback)(e,"A",(function(e){var t;return(0,r.safeInstanceOf)(e,"HTMLAnchorElement")&&l.test(e.href)&&(null===(t=e.parentElement)||void 0===t||t.removeChild(e)),!0})),(0,r.chainSanitizerCallback)(e,"DIV",(function(e){return"comment-list"==(0,r.getStyles)(e)["mso-element"]&&(0,r.moveChildNodes)(e),!0})),[i,a,o,s,u].forEach((function(e){return(0,r.chainSanitizerCallback)(t,e,(function(){return!1}))}))}},8149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7921),o=n(6344),i=n(4704),a=n(6482),l=n(1101),s=/%/;t.default=function(e){var t=e.sanitizingOption,n=e.fragment;(0,o.chainSanitizerCallback)(t.elementCallbacks,"O:P",(function(e){return(0,o.moveChildNodes)(e),e.appendChild(e.ownerDocument.createTextNode(" ")),!0}));var u=(0,i.createWordConverter)(),d=n.querySelectorAll("p,h1,h2,h3,h4,h5,h6");d.length>0&&(u.wordConverterArgs=(0,a.createWordConverterArguments)(d),(0,l.processNodesDiscovery)(u)&&(0,l.processNodeConvert)(u)),["OL","UL"].forEach((function(e){(0,o.chainSanitizerCallback)(t.elementCallbacks,e,(function(e){return"0in"==e.style.marginBottom&&(e.style.marginBottom=""),!0}))})),(0,o.chainSanitizerCallback)(t.cssStyleCallbacks,"line-height",(function(e){var t;return!(s.test(e)&&!isNaN(t=parseInt(e))&&t<120)})),(0,r.default)(t.elementCallbacks,t.cssStyleCallbacks)}},1101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processNodeConvert=t.processNodesDiscovery=void 0;var r=n(3825),o=n(9873),i=n(6344),a="UniqueListId",l="mso-list",s=/[\n|\r]/gi;function u(e,t,n,r){var l,s=d(t,n.level,r),u=(0,o.getObject)(e.wordCustomData,s,a);if(u&&u!=n.uniqueListId||!u&&s.firstChild){var c=t.ownerDocument.createElement(r.tagName);null===(l=s.parentNode)||void 0===l||l.insertBefore(c,s.nextSibling),s=c}return(0,o.setObject)(e.wordCustomData,s,a,n.uniqueListId),function(e,t,n){var r,l,s;if(n.tagName!=(0,i.getTagOfNode)(t)){var u=null===(r=t.ownerDocument)||void 0===r?void 0:r.createElement(n.tagName);u&&((0,o.setObject)(e.wordCustomData,u,a,(0,o.getObject)(e.wordCustomData,t,a)),(0,i.moveChildNodes)(u,t),null===(l=t.parentNode)||void 0===l||l.insertBefore(u,t),null===(s=t.parentNode)||void 0===s||s.removeChild(t),t=u)}return t}(e,s,r)}function d(e,t,n){var r,o,a=null,l=null;if(1==t?l=g(e):(a=d(e,t-1,null)).lastChild&&(l=a.lastChild),l&&1==l.nodeType){var s=(0,i.getTagOfNode)(l);if("UL"==s||"OL"==s)return l}var u=null===(r=e.ownerDocument)||void 0===r?void 0:r.createElement(n?n.tagName:"UL");return 1==t?null===(o=e.parentNode)||void 0===o||o.insertBefore(u,e):null==a||a.appendChild(u),u}function c(e,t){for(var n=[],r=e.firstChild;r;r=r.nextSibling)r&&(r&&1==r.nodeType&&t>1&&c(r,t-1),(b(r=h(r,!0))||y(r))&&n.push(r));n.forEach((function(t){return e.removeChild(t)}))}function f(e){if(1==e.nodeType){var t=C(e,l);if(t&&t.length>0)try{var n=t.split(" ");if(3==n.length)return{level:parseInt(n[1].substr(5)),wordListId:t,originalNode:e,uniqueListId:0}}catch(e){}}return null}function p(e){return["o","·","§","-"].indexOf(e)>=0}function v(e,t){for(var n,r,o="",i=e.firstChild;!o&&i;)y(i=h(i,!0))?0==(o=null!==(r=null===(n=i.textContent)||void 0===n?void 0:n.trim())&&void 0!==r?r:"").length&&(o="o"):1==i.nodeType&&t>1&&(o=v(i,t-1)),i=i.nextSibling;return o}function h(e,t){var n,r,o,i;if(8==e.nodeType){var a=e.data;if(a&&"[if !supportlists]"==a.trim().toLowerCase()){for(var l=e,s=null,u=0;u<4&&(l=m(l));u++)if(8==l.nodeType&&(a=l.data)&&"[endif]"==a.trim().toLowerCase()){s=l;break}if(s){var d=null===(n=e.ownerDocument)||void 0===n?void 0:n.createElement("span");for(null==d||d.setAttribute("style","mso-list: ignore"),l=m(e);l!=s;)(l=null==l?void 0:l.nextSibling).previousSibling&&(null==d||d.appendChild(l.previousSibling));d&&(null===(r=s.parentNode)||void 0===r||r.insertBefore(d,s)),t&&(null===(o=e.parentNode)||void 0===o||o.removeChild(e),null===(i=s.parentNode)||void 0===i||i.removeChild(s)),d&&(e=d)}}}return e}function g(e){var t=e;do{t=t.previousSibling}while(t&&E(t));return t}function m(e){var t=e;do{t=t.nextSibling}while(t&&E(t));return t}function y(e){if(1==e.nodeType){var t=C(e,l);if(t&&t.length>0&&"ignore"==t.trim().toLowerCase())return!0}return!1}function b(e){return"SPAN"==(0,i.getTagOfNode)(e)&&!e.firstChild}function C(e,t){return(0,i.getStyles)(e)[t]||null}function E(e){var t;if(!e)return!0;if(3==e.nodeType){var n=e.nodeValue;return 0==(null==(n=null!==(t=null==n?void 0:n.replace(s,""))&&void 0!==t?t:"")?void 0:n.trim().length)}var r=(0,i.getTagOfNode)(e);return!(!e.firstChild||e.firstChild!=e.lastChild||"SPAN"!=r&&"FONT"!=r)&&E(e.firstChild)}function S(e){for(var t=0;t0&&s.currentUniqueListId!=l.uniqueListId?(u.ignore=!0,o.currentListIdsByLevels[0].currentUniqueListId=-1,o.currentListIdsByLevels=o.currentListIdsByLevels.slice(0,1)):(o.currentListIdsByLevels.length>l.level&&(o.currentListIdsByLevels=o.currentListIdsByLevels.slice(0,l.level)),s.currentUniqueListId=l.uniqueListId,o.listItems.push(l),u.numberOfItems++),o.lastProcessedItem=a}else{var h=o.lastProcessedItem;h&&g(a)==h&&a.tagName==h.tagName&&a.className==h.className&&(h.appendChild(h.ownerDocument.createElement("br")),h.appendChild(h.ownerDocument.createElement("br")),(0,i.moveChildNodes)(h,a,!0),null===(t=a.parentNode)||void 0===t||t.removeChild(a))}o.currentIndex++}return o.listItems.length>0},t.processNodeConvert=function(e){var t,n=e.wordConverterArgs;if(n)for(n.currentIndex=0;n.currentIndex0||e.numNumberedConverted>0}},4704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWordConverter=void 0;var r=n(9873);t.createWordConverter=function(){return{nextUniqueId:1,numBulletsConverted:0,numNumberedConverted:0,wordConverterArgs:null,wordCustomData:(0,r.createCustomData)()}}},6575:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4548),o=n(6344),i="Backspace",a=o.Browser.isIE?"Esc":"Escape",l=o.Browser.isIE?"Left":"ArrowLeft",s=o.Browser.isIE?"Up":"ArrowUp",u=o.Browser.isIE?"Right":"ArrowRight",d=o.Browser.isIE?"Down":"ArrowDown",c=o.Browser.isIE?"Del":"Delete",f=[0,229],p=function(){function e(e,t){this.dataProvider=e,this.pickerOptions=t,this.editor=null,this.eventHandledOnKeyDown=!1,this.blockSuggestions=!1,this.isSuggesting=!1,this.lastKnownRange=null,this.isPendingInputEventHandling=!1,this.currentInputLength=0,this.newInputLength=0}return e.prototype.getName=function(){return"Picker"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.dataProvider.onInitalize((function(e){if(t.editor){t.editor.focus();var n=t.getWord(null);n&&0!=n.length||!t.lastKnownRange||(t.editor.select(t.lastKnownRange),n=t.getWord(null)),t.editor.addUndoSnapshot((function(){var o;n&&t.editor?(0,r.replaceWithNode)(t.editor,n,e,!0):null===(o=t.editor)||void 0===o||o.insertNode(e),t.setIsSuggesting(!1)}),t.pickerOptions.changeSource,t.pickerOptions.handleAutoComplete)}}),(function(e){t.setIsSuggesting(e)}),e)},e.prototype.dispose=function(){this.editor=null,this.isSuggesting=!1,this.blockSuggestions=!1,this.eventHandledOnKeyDown=!1,this.lastKnownRange=null,this.isPendingInputEventHandling=!1,this.currentInputLength=0,this.newInputLength=0,this.dataProvider.onDispose()},e.prototype.willHandleEventExclusively=function(e){return this.isSuggesting&&(0==e.eventType||2==e.eventType||3==e.eventType)},e.prototype.onPluginEvent=function(e){var t;switch(e.eventType){case 7:if("SetContent"==e.source&&this.dataProvider.onContentChanged){this.isSuggesting&&this.setIsSuggesting(!1);var n=[];null===(t=this.editor)||void 0===t||t.queryElements("[id^='"+this.pickerOptions.elementIdPrefix+"']",(function(e){e.id&&n.push(e.id)})),this.dataProvider.onContentChanged(n)}break;case 0:this.eventHandledOnKeyDown=!1,this.isAndroidKeyboardEvent(e)?(this.currentInputLength=this.calcInputLength(e),this.isPendingInputEventHandling=!0):(this.onKeyDownEvent(e),this.isPendingInputEventHandling=!1);break;case 3:this.isPendingInputEventHandling&&this.onAndroidInputEvent(e);break;case 2:!this.eventHandledOnKeyDown&&this.shouldHandleKeyUpEvent(e)&&(this.onKeyUpDomEvent(e),this.isPendingInputEventHandling=!1);break;case 6:this.isSuggesting&&this.setIsSuggesting(!1);break;case 14:this.dataProvider.onScroll&&this.dataProvider.onScroll(e.scrollContainer)}},e.prototype.setLastKnownRange=function(e){this.lastKnownRange=e},e.prototype.setIsSuggesting=function(e){this.isSuggesting=e,e||this.setLastKnownRange(null),this.dataProvider.onIsSuggestingChanged(e),this.setAriaOwns(e),this.setAriaActiveDescendant(e?0:null)},e.prototype.cancelDefaultKeyDownEvent=function(e){this.eventHandledOnKeyDown=!0,e.rawEvent.preventDefault(),e.rawEvent.stopImmediatePropagation()},e.prototype.getIdValue=function(e){if((0,o.safeInstanceOf)(e,"HTMLElement")){var t=e.attributes.getNamedItem("id");return t?t.value:null}return null},e.prototype.getWordBeforeCursor=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e);return n?n.getWordBefore():null},e.prototype.replaceNode=function(e,t){var n,r;e&&(null===(n=this.editor)||void 0===n||n.deleteNode(e)),t&&(null===(r=this.editor)||void 0===r||r.insertNode(t))},e.prototype.getRangeUntilAt=function(e){var t,n,r,i=this,a=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e),l=void 0,s=void 0;return null==a||a.forEachTextInlineElement((function(e){for(var t=!1,n=e.getTextContent(),r=n?n.length:-1;r>=0;){if(n[r]==i.pickerOptions.triggerCharacter){l=e.getStartPosition().move(r),t=!0;break}r--}return t&&(s=e.getEndPosition()),t})),l?(0,o.createRange)(l,s):null!==(r=null===(n=this.editor)||void 0===n?void 0:n.getDocument().createRange())&&void 0!==r?r:null},e.prototype.shouldHandleKeyUpEvent=function(e){return this.isAndroidKeyboardEvent(e)||(0,o.isCharacterValue)(e.rawEvent)||this.isSuggesting&&!(0,o.isModifierKey)(e.rawEvent)},e.prototype.onKeyUpDomEvent=function(e){var t,n,r,o,i;if(this.editor)if(this.isSuggesting){if(null!==(l=this.getWord(e))){var a=(s=l.substring(1)).trim();l==this.pickerOptions.triggerCharacter||a&&a.length>0&&a.split(" ").length<=4?(this.dataProvider.queryStringUpdated(a,s==a),this.setLastKnownRange(null!==(t=this.editor.getSelectionRange())&&void 0!==t?t:null)):this.setIsSuggesting(!1)}}else{var l=this.getWordBeforeCursor(e);if(this.blockSuggestions)null!=l&&l[0]!=this.pickerOptions.triggerCharacter&&(this.blockSuggestions=!1);else if(null!=l&&l.split(" ").length<=4&&l[0]==this.pickerOptions.triggerCharacter){var s;if(this.setIsSuggesting(!0),a=(s=l.substring(1)).trim(),this.dataProvider.queryStringUpdated(a,s==a),this.setLastKnownRange(null!==(n=this.editor.getSelectionRange())&&void 0!==n?n:null),this.dataProvider.setCursorPoint){var u=this.editor.getContentSearcherOfCursor(e),d=this.editor.getDocument().createRange();if(d){var c=null!==(o=null===(r=null==u?void 0:u.getInlineElementBefore())||void 0===r?void 0:r.getContainerNode())&&void 0!==o?o:null;if(!this.setRangeStart(d,c,l)){var f=null!==(i=null==c?void 0:c.previousSibling)&&void 0!==i?i:null;this.setRangeStart(d,f,this.pickerOptions.triggerCharacter)}var p=d.getBoundingClientRect();if(0==p.left&&0==p.bottom&&0==p.top&&(p=d.getClientRects()[0]),p){d.detach();var v={x:p.left,y:(p.bottom+p.top)/2},h=(p.bottom-p.top)/2;this.dataProvider.setCursorPoint(v,h)}}}}}},e.prototype.onKeyDownEvent=function(e){var t,n,r=e.rawEvent;if(this.isSuggesting)r.key==a?(this.setIsSuggesting(!1),this.blockSuggestions=!0,this.cancelDefaultKeyDownEvent(e)):r.key==i?this.getWord(e)==this.pickerOptions.triggerCharacter&&this.setIsSuggesting(!1):this.dataProvider.shiftHighlight&&(this.pickerOptions.isHorizontal?r.key==l||r.key==u:r.key==s||r.key==d)?(this.dataProvider.shiftHighlight(this.pickerOptions.isHorizontal?r.key==u:r.key==d),this.dataProvider.getSelectedIndex&&this.setAriaActiveDescendant(this.dataProvider.getSelectedIndex()),this.cancelDefaultKeyDownEvent(e)):!this.dataProvider.selectOption||"Enter"!=r.key&&"Tab"!=r.key||(this.dataProvider.selectOption(),this.cancelDefaultKeyDownEvent(e));else if(r.key==i)this.tryRemoveNode(e)&&this.cancelDefaultKeyDownEvent(e);else if(r.key==c){var o=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e);if(o){var f=o.getInlineElementAfter()?null===(n=o.getInlineElementAfter())||void 0===n?void 0:n.getContainerNode():null,p=f?this.getIdValue(f):null;if(p&&0==p.indexOf(this.pickerOptions.elementIdPrefix)&&f){var v=this.dataProvider.onRemove(f,!1);this.replaceNode(f,v),this.cancelDefaultKeyDownEvent(e)}}}},e.prototype.onAndroidInputEvent=function(e){this.newInputLength=this.calcInputLength(e),(this.newInputLength-1)&&(e.setStart(t,r),!0)},e.prototype.setAriaOwns=function(e){var t;null===(t=this.editor)||void 0===t||t.setEditorDomAttribute("aria-owns",e&&this.pickerOptions.suggestionsLabel?this.pickerOptions.suggestionsLabel:null)},e.prototype.setAriaActiveDescendant=function(e){var t;null===(t=this.editor)||void 0===t||t.setEditorDomAttribute("aria-activedescendant",null!=e&&this.pickerOptions.suggestionLabelPrefix?this.pickerOptions.suggestionLabelPrefix+e.toString():null)},e.prototype.getInlineElementBeforeCursor=function(e){var t,n=null===(t=this.editor)||void 0===t?void 0:t.getContentSearcherOfCursor(e),r=n?n.getInlineElementBefore():null;return r?r.getTextContent():null},e.prototype.isAndroidKeyboardEvent=function(e){return"Unidentified"==e.rawEvent.key||null==e.rawEvent.key&&f.indexOf(e.rawEvent.charCode)>-1},e}();t.default=p},8833:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PickerPlugin=void 0;var r=n(6575);Object.defineProperty(t,"PickerPlugin",{enumerable:!0,get:function(){return r.default}})},9467:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7905),o=n(191),i=n(4199),a=n(6817),l=n(9905),s=n(1679),u=function(){function e(){this.editor=null,this.shadowEditCoordinatesBackup=null,this.state={firstTable:null,lastTarget:null,firstTarget:null,preventKeyUp:!1,startedSelection:!1,tableSelection:!1,targetTable:null,vTable:null,mouseMoveDisposer:null}}return e.prototype.getName=function(){return"TableCellSelection"},e.prototype.initialize=function(e){this.editor=e,this.editor.addContentEditFeature(o.DeleteTableContents)},e.prototype.dispose=function(){(0,r.clearState)(this.state,this.editor),this.state=null,this.editor=null},e.prototype.onPluginEvent=function(e){if(this.editor&&this.state)switch(e.eventType){case 17:this.handleEnteredShadowEdit(this.state,this.editor);break;case 18:this.handleLeavingShadowEdit(this.state,this.editor);break;case 5:this.state.startedSelection||(0,l.handleMouseDownEvent)(e,this.state,this.editor);break;case 0:this.state.startedSelection?e.rawEvent.preventDefault():(0,i.handleKeyDownEvent)(e,this.state,this.editor);break;case 2:this.state.startedSelection?e.rawEvent.preventDefault():(0,a.handleKeyUpEvent)(e,this.state,this.editor);break;case 14:this.state.startedSelection&&(0,s.handleScrollEvent)(this.state,this.editor);break;case 20:this.state.firstTable=null,this.state.tableSelection=!1,this.editor.select(null)}},e.prototype.handleLeavingShadowEdit=function(e,t){if(e.firstTable&&e.tableSelection&&e.firstTable){var n=t.queryElements("#"+e.firstTable.id);1==n.length&&(e.firstTable=n[0],t.select(e.firstTable,this.shadowEditCoordinatesBackup),this.shadowEditCoordinatesBackup=null)}},e.prototype.handleEnteredShadowEdit=function(e,t){var n,r=t.getSelectionRangeEx();1==r.type&&(this.shadowEditCoordinatesBackup=null!==(n=r.coordinates)&&void 0!==n?n:null,e.firstTable=r.table,e.tableSelection=!0,t.select(r.table,null))},e}();t.default=u},4332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TABLE_CELL_SELECTOR=void 0,t.TABLE_CELL_SELECTOR="td,th"},191:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteTableContents=void 0;var r=n(6344),o=n(4332);function i(e,t){if((0,r.safeInstanceOf)(e,"HTMLTableCellElement")){var n=new Range;n.selectNodeContents(e),n.deleteContents(),e.appendChild(t.getDocument().createElement("br"))}}t.DeleteTableContents={keys:[46,8],shouldHandleEvent:function(e,t){return 1==t.getSelectionRangeEx().type},handleEvent:function(e,t){var n=t.getSelectionRangeEx();1==n.type&&t.addUndoSnapshot((function(){n.isWholeTableSelected?n.table.querySelectorAll(o.TABLE_CELL_SELECTOR).forEach((function(e){return i(e,t)})):t.getSelectedRegions().forEach((function(e){return i(e.rootNode,t)}))}))}}},7311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableCellSelection=void 0;var r=n(9467);Object.defineProperty(t,"TableCellSelection",{enumerable:!0,get:function(){return r.default}})},4199:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleKeyDownEvent=void 0;var r=n(4192),o=n(8098),i=n(4846),a=n(8533),l=n(4550),s=n(7463),u=n(4332),d=n(1648),c=n(6344);t.handleKeyDownEvent=function(e,t,n){var f,p=e.rawEvent,v=p.shiftKey,h=p.ctrlKey,g=p.metaKey,m=p.which,y=p.defaultPrevented;if(v&&(h||g)||16==m||y)t.preventKeyUp=y;else if(v){if(!t.firstTarget){var b=n.getFocusedPosition(),C=b&&(0,r.getCellAtCursor)(n,b.node);t.firstTarget=C}if(!(0,c.safeInstanceOf)(t.firstTarget,"HTMLTableCellElement"))return;n.runAsync((function(n){var f=n.getFocusedPosition(),p=t.tableSelection?t.lastTarget:null==f?void 0:f.node;if(p&&(0,s.setData)(p,t,n),t.firstTable==t.targetTable){if(!function(e,t){if(!e.firstTable||!t)return!1;var n=t.getSelectedRegions();if(1==n.length)return!1;var r=!0;return n.forEach((function(t){(0,c.contains)(e.firstTable,t.rootNode)||(r=!1)})),r}(t,n)&&!t.tableSelection)return;!function(e,t,n){var s,f;t.firstTarget=(0,r.getCellAtCursor)(n,t.firstTarget),t.lastTarget=(0,r.getCellAtCursor)(n,t.lastTarget),(0,d.updateSelection)(n,t.firstTarget,0),t.vTable=t.vTable||new c.VTable(t.firstTable);var p=(0,o.getCellCoordinates)(t.vTable,t.firstTarget),v=function(e,t,n){var r;if(n.lastTarget=n.lastTarget&&t.getElementAtCursor(u.TABLE_CELL_SELECTOR,n.lastTarget),(0,c.safeInstanceOf)(n.lastTarget,"HTMLTableCellElement")&&(null===(r=n.vTable)||void 0===r?void 0:r.cells)){var i=(0,o.getCellCoordinates)(n.vTable,n.lastTarget);if(n.tableSelection&&i)switch(e.rawEvent.which){case 39:i.x+=n.lastTarget.colSpan,null==n.vTable.cells[i.y][i.x]&&(i.x=n.vTable.cells[i.y].length-1,i.y++);break;case 37:0==i.x?i.y--:i.x--;break;case 38:i.y--;break;case 40:i.y++}return i&&i.y>=0&&i.x>=0&&(n.lastTarget=n.vTable.getTd(i.y,i.x)),i}}(e,n,t);if(p&&v){t.vTable.selection={firstCell:p,lastCell:v};var h=t.vTable.selection;if(!h.lastCell||t.vTable.cells&&h.lastCell.y>t.vTable.cells.length-1||-1==h.lastCell.y)if(t.lastTarget=n.getElementAtCursor(u.TABLE_CELL_SELECTOR+",div",null!==(s=t.firstTable)&&void 0!==s?s:void 0),(0,c.safeInstanceOf)(t.lastTarget,"HTMLTableCellElement"))(0,a.prepareSelection)(t,n);else{var g=t.targetTable&&new c.Position(t.targetTable,null==h.lastCell.y||-1==h.lastCell.y?-2:-3),m=null===(f=n.getDocument().defaultView)||void 0===f?void 0:f.getSelection(),y=m||{},b=y.anchorNode,C=y.anchorOffset;if(m&&b&&null!=C&&null!=C&&g)return n.select(m.getRangeAt(0)),m.setBaseAndExtent(b,C,g.node,g.offset),t.lastTarget=g.node,void e.rawEvent.preventDefault()}(0,l.selectTable)(n,t);var E=(0,i.isAfter)(t.firstTarget,t.lastTarget);if(t.lastTarget){var S=new c.Position(t.lastTarget,E?0:-1);(0,d.updateSelection)(n,S.node,S.offset)}t.tableSelection=!0,e.rawEvent.preventDefault()}}(e,t,n)}else t.tableSelection&&(t.firstTable&&n.select(t.firstTable,null),t.tableSelection=!1)}))}else 1!=(null===(f=n.getSelectionRangeEx())||void 0===f?void 0:f.type)||(0,c.isCtrlOrMetaPressed)(e.rawEvent)&&36!=m&&35!=m||n.select(null)}},6817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleKeyUpEvent=void 0;var r=n(7905),o=[16,18,91,17,44];t.handleKeyUpEvent=function(e,t,n){var i=e.rawEvent,a=i.shiftKey,l=i.which,s=i.ctrlKey;a||s||!t.firstTarget||t.preventKeyUp||-1!=o.indexOf(l)||(0,r.clearState)(t,n),t.preventKeyUp=!1}},9905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectionInsideTableMouseMove=t.handleMouseDownEvent=void 0;var r=n(8616),o=n(7905),i=n(6344),a=n(4192),l=n(8098),s=n(9878),u=n(8533),d=n(9991),c=n(4550),f=n(7463),p=n(4332),v=n(1648);function h(e,t,n){var r;if(t.firstTarget&&t.firstTable&&t.lastTarget!=t.firstTarget&&t.lastTarget){if((0,v.updateSelection)(n,t.firstTarget,0),t.firstTable!=t.targetTable&&(null===(r=t.targetTable)||void 0===r?void 0:r.contains(t.firstTable))&&(t.firstTarget=n.getElementAtCursor(p.TABLE_CELL_SELECTOR,t.lastTarget)),t.firstTable&&t.firstTarget){t.tableSelection=!0,t.vTable=t.vTable||new i.VTable(t.firstTable);var o=(0,l.getCellCoordinates)(t.vTable,t.firstTarget),a=(0,l.getCellCoordinates)(t.vTable,t.lastTarget);if(!o||!a)return;t.vTable.selection={firstCell:o,lastCell:a},(0,c.selectTable)(n,t)}e.preventDefault()}else if(t.lastTarget==t.firstTarget&&t.tableSelection&&t.firstTable&&t.firstTarget){t.vTable=new i.VTable(t.firstTable);var s=(0,l.getCellCoordinates)(t.vTable,t.firstTarget);s&&(t.vTable.selection={firstCell:s,lastCell:s}),(0,c.selectTable)(n,t)}}t.handleMouseDownEvent=function(e,t,n){var g,m=e.rawEvent,y=m.which,b=m.shiftKey,C=n.getElementAtCursor(p.TABLE_CELL_SELECTOR);if(3==y&&t.tableSelection&&t.vTable&&C){var E=(0,l.getCellCoordinates)(t.vTable,C);if(E){var S=(0,r.default)(t.vTable)||{},T=S.firstCell,P=S.lastCell;if(T&&P&&E.y>=T.y&&E.y<=P.y&&E.x>=T.x&&E.x<=P.x){if(t.firstTarget=t.vTable.getCell(T.y,T.x).td,t.lastTarget=t.vTable.getCell(P.y,P.x).td,t.firstTarget&&t.lastTarget){var w=null===(g=n.getDocument().defaultView)||void 0===g?void 0:g.getSelection();null==w||w.setBaseAndExtent(t.firstTarget,0,t.lastTarget,0),(0,c.selectTable)(n,t)}return}}}if(1==y&&!b&&((0,o.clearState)(t,n),(0,s.getTableAtCursor)(n,e.rawEvent.target))){var _=n.getDocument()||document,O=function(e){return function(){!function(e){var t;e.startedSelection&&(e.startedSelection=!1,null===(t=e.mouseMoveDisposer)||void 0===t||t.call(e))}(e)}}(t),M=function(e,t){return function(n){if(t.contains(n.target)){if(e.tableSelection&&e.firstTarget&&(0,i.contains)(e.lastTarget,n.target,!0))return(0,v.updateSelection)(t,e.firstTarget,0),void n.preventDefault();if("TABLE"!=(0,i.getTagOfNode)(n.target)){if((0,f.setData)(n.target,e,t),!e.firstTarget||e.firstTable)if(!e.lastTarget||(e.lastTarget.lastChild!=e.lastTarget.firstChild||"TABLE"!=(0,i.getTagOfNode)(e.lastTarget.lastChild)||"DIV"!=(0,i.getTagOfNode)(e.lastTarget))&&t.contains(e.lastTarget)){(0,u.prepareSelection)(e,t);var r=!!(0,i.safeInstanceOf)(e.lastTarget,"HTMLTableCellElement")&&(0,i.contains)(e.lastTarget,e.firstTable);e.firstTable&&e.firstTable==e.targetTable||r?h(n,e,t):e.tableSelection&&(0,d.restoreSelection)(e,t),e.tableSelection&&e.firstTarget&&((0,v.updateSelection)(t,e.firstTarget,0),n.preventDefault())}else n.preventDefault()}else n.preventDefault()}}}(t,n);_.addEventListener("mouseup",O,!0),_.addEventListener("mousemove",M,!0),t.mouseMoveDisposer=function(){_.removeEventListener("mouseup",O,!0),_.removeEventListener("mousemove",M,!0)},t.startedSelection=!0}1==y&&b&&n.runAsync((function(e){var n,r=null===(n=e.getDocument().defaultView)||void 0===n?void 0:n.getSelection(),o=(0,a.getCellAtCursor)(e,null==r?void 0:r.anchorNode),u=(0,a.getCellAtCursor)(e,null==r?void 0:r.focusNode),d=(0,s.getTableAtCursor)(e,o),f=(0,s.getTableAtCursor)(e,o);if(d==f&&(0,i.safeInstanceOf)(o,"HTMLTableCellElement")&&(0,i.safeInstanceOf)(u,"HTMLTableCellElement")){t.vTable=new i.VTable(o);var p=(0,l.getCellCoordinates)(t.vTable,o),h=(0,l.getCellCoordinates)(t.vTable,u);if(!p||!h)return;t.vTable.selection={firstCell:p,lastCell:h},t.firstTarget=o,t.lastTarget=u,(0,c.selectTable)(e,t),t.tableSelection=!0,t.firstTable=d,t.targetTable=f,(0,v.updateSelection)(e,o,0)}}))},t.selectionInsideTableMouseMove=h},1679:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleScrollEvent=void 0;var r=n(8098),o=n(9991),i=n(4550),a=n(7463),l=n(1648);t.handleScrollEvent=function(e,t){var n,s=t.getElementAtCursor();if(s)if((0,a.setData)(s,e,t),e.firstTable==e.targetTable&&e.firstTarget&&(null===(n=e.vTable)||void 0===n?void 0:n.selection)&&e.lastTarget&&e.tableSelection){var u=(0,r.getCellCoordinates)(e.vTable,e.lastTarget);u&&(e.vTable.selection.lastCell=u,(0,i.selectTable)(t,e),(0,l.updateSelection)(t,e.firstTarget,0))}else e.tableSelection&&(0,o.restoreSelection)(e,t)}},7905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearState=void 0,t.clearState=function(e,t){var n;null==t||t.select(null),e&&(e.vTable=null,e.firstTarget=null,e.lastTarget=null,e.tableSelection=!1,e.firstTable=null,e.targetTable=null,null===(n=e.mouseMoveDisposer)||void 0===n||n.call(e),e.mouseMoveDisposer=null)}},4192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCellAtCursor=void 0;var r=n(4332);t.getCellAtCursor=function(e,t){return e&&e.getElementAtCursor(r.TABLE_CELL_SELECTOR,null!=t?t:void 0)||t}},8098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCellCoordinates=void 0,t.getCellCoordinates=function(e,t){var n;if(null==e?void 0:e.cells)for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTableAtCursor=void 0,t.getTableAtCursor=function(e,t){return e?e.getElementAtCursor("table",t):null}},4846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAfter=void 0;var r=n(6344);t.isAfter=function(e,t){var n,o,i,a;if(e&&t){if(t.contains(e)){var l=null===(o=(n=e).getBoundingClientRect)||void 0===o?void 0:o.call(n),s=null===(a=(i=t).getBoundingClientRect)||void 0===a?void 0:a.call(i);if(l&&s)return l.top>s.top&&l.bottom{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(null==e?void 0:e.selection)||{},n=t.firstCell,r=t.lastCell;if(!((null==e?void 0:e.cells)&&e.selection&&n&&r))return null;var o=e.cells,i={x:Math.min(n.x,r.x),y:Math.min(n.y,r.y)},a={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},l=function(e){e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.y>=o.length&&(e.y=o.length-1);var t=o[e.y].length;e.x>=t&&(e.x=t-1)};return l(i),l(a),{firstCell:i,lastCell:a}}},8533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareSelection=void 0;var r=n(6344),o=n(9878),i=n(4332);t.prepareSelection=function(e,t){var n,a,l,s;if(e.firstTable&&e.targetTable){var u=e.lastTarget!=e.firstTarget&&(null===(n=e.firstTable)||void 0===n?void 0:n.contains((0,r.findClosestElementAncestor)(e.targetTable,e.firstTable,i.TABLE_CELL_SELECTOR)));if(u&&e.tableSelection)for(;u;)e.lastTarget=(0,r.findClosestElementAncestor)(e.targetTable,e.firstTable,i.TABLE_CELL_SELECTOR),e.targetTable=(0,o.getTableAtCursor)(t,e.lastTarget),u=e.lastTarget!=e.firstTarget&&(null===(a=e.firstTable)||void 0===a?void 0:a.contains((0,r.findClosestElementAncestor)(e.targetTable,e.firstTable,i.TABLE_CELL_SELECTOR)));var d=e.lastTarget!=e.firstTarget&&(null===(l=e.targetTable)||void 0===l?void 0:l.contains((0,r.findClosestElementAncestor)(e.firstTable,e.targetTable,i.TABLE_CELL_SELECTOR)));if(d&&e.tableSelection&&e.targetTable)for(;d;){if(e.firstTarget=(0,r.findClosestElementAncestor)(e.firstTable,e.targetTable,i.TABLE_CELL_SELECTOR),!e.firstTarget)return;e.firstTable=(0,o.getTableAtCursor)(t,e.firstTarget),d=e.lastTarget!=e.firstTarget&&(null===(s=e.targetTable)||void 0===s?void 0:s.contains((0,r.findClosestElementAncestor)(e.firstTable,e.targetTable,i.TABLE_CELL_SELECTOR)))}}}},9991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.restoreSelection=void 0;var r=n(4846),o=n(6344),i=n(1648);t.restoreSelection=function(e,t){if(e.lastTarget&&e.firstTarget){e.firstTable&&t.select(e.firstTable,null),e.tableSelection=!1;var n=(0,r.isAfter)(e.firstTarget,e.lastTarget),a=new o.Position(e.lastTarget,n?-1:0),l=new Range;e.firstTarget&&l.selectNodeContents(e.firstTarget),(0,i.updateSelection)(t,e.firstTarget,n?o.Position.getEnd(l).offset:o.Position.getStart(l).offset,a.element,a.offset)}}},4550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectTable=void 0;var r=n(8616);t.selectTable=function(e,t){e&&t.vTable&&(null==e||e.select(t.vTable.table,(0,r.default)(t.vTable)))}},7463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setData=void 0;var r=n(4192),o=n(9878),i=n(4332);t.setData=function(e,t,n){var a=n.getFocusedPosition();a&&(t.firstTarget=t.firstTarget||(0,r.getCellAtCursor)(n,a.node),t.firstTarget.nodeType==Node.TEXT_NODE&&(t.firstTarget=n.getElementAtCursor(i.TABLE_CELL_SELECTOR,t.firstTarget)),!n.contains(t.firstTarget)&&t.lastTarget&&(t.firstTarget=t.lastTarget)),t.firstTable=(0,o.getTableAtCursor)(n,t.firstTarget),t.lastTarget=(0,r.getCellAtCursor)(n,e),t.targetTable=(0,o.getTableAtCursor)(n,t.lastTarget)}},1648:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSelection=void 0,t.updateSelection=function(e,t,n,r,o){var i,a=null===(i=e.getDocument().defaultView)||void 0===i?void 0:i.getSelection();a&&(r=r||t,o=o||n,a.setBaseAndExtent(t,n,r,o))}},12:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3087),o=n(6344),i=function(){function e(e){var t=this;this.onShowHelperElement=e,this.editor=null,this.onMouseMoveDisposer=null,this.tableRectMap=null,this.tableEditor=null,this.onMouseOut=function(e){var n;e.pageX&&(0,o.safeInstanceOf)(e.relatedTarget,"HTMLElement")&&t.tableEditor&&!t.tableEditor.isOwnedElement(e.relatedTarget)&&!(null===(n=t.editor)||void 0===n?void 0:n.contains(e.relatedTarget))&&t.setTableEditor(null)},this.onMouseMove=function(e){var n,r=e;if(!(r.buttons>0)&&t.editor){t.ensureTableRects();var o=t.editor.getDocument().defaultView||window,i=r.pageX-o.scrollX,a=r.pageY-o.scrollY,l=null;if(t.tableRectMap)for(var s=t.tableRectMap.length-1;s>=0;s--){var u=t.tableRectMap[s],d=u.table,c=u.rect;if(i>=c.left-12&&i<=c.right+12&&a>=c.top-12&&a<=c.bottom+12){l=d;break}}t.setTableEditor(l,r),null===(n=t.tableEditor)||void 0===n||n.onMouseMove(i,a)}},this.invalidateTableRects=function(){t.tableRectMap=null}}return e.prototype.getName=function(){return"TableResize"},e.prototype.initialize=function(e){var t=this;this.editor=e,this.onMouseMoveDisposer=this.editor.addDomEventHandler({mousemove:this.onMouseMove,mouseout:function(e){return t.onMouseOut(e)}})},e.prototype.dispose=function(){var e;null===(e=this.onMouseMoveDisposer)||void 0===e||e.call(this),this.invalidateTableRects(),this.disposeTableEditor(),this.editor=null,this.onMouseMoveDisposer=null},e.prototype.onPluginEvent=function(e){switch(e.eventType){case 3:case 7:case 14:case 21:this.setTableEditor(null),this.invalidateTableRects()}},e.prototype.setTableEditor=function(e,t){this.tableEditor&&!this.tableEditor.isEditing()&&e!=this.tableEditor.table&&this.disposeTableEditor(),!this.tableEditor&&e&&this.editor&&e.rows.length>0&&(this.tableEditor=new r.default(this.editor,e,this.invalidateTableRects,this.onShowHelperElement,null==t?void 0:t.currentTarget))},e.prototype.disposeTableEditor=function(){var e;null===(e=this.tableEditor)||void 0===e||e.dispose(),this.tableEditor=null},e.prototype.ensureTableRects=function(){var e=this;!this.tableRectMap&&this.editor&&(this.tableRectMap=[],this.editor.queryElements("table",(function(t){if(t.isContentEditable){var n=(0,o.normalizeRect)(t.getBoundingClientRect());n&&e.tableRectMap&&e.tableRectMap.push({table:t,rect:n})}})))},e}();t.default=i},1565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4296),o=n(6344);function i(e,t){var n=e.td,r=e.isRTL,i=e.zoomScale,a=e.onStart,l=new o.VTable(n,!0,i),s=(0,o.normalizeRect)(n.getBoundingClientRect());if(s){a();var u=l.getCellsWithBorder(r?s.left:s.right,!r),d=l.getCellsWithBorder(r?s.left:s.right,r);return{vTable:l,currentCells:u,nextCells:d,initialX:t.pageX}}return{vTable:l,currentCells:[],nextCells:[],initialX:0}}function a(e,t,n,r,o){var i=e.td,a=e.zoomScale,l=n.vTable;return l.table.removeAttribute("height"),l.table.style.setProperty("height",null),l.forEachCellOfCurrentRow((function(e){var t;e.td&&e.td.style.setProperty("height",e.td==i?(null!==(t=e.height)&&void 0!==t?t:0)/a+o+"px":null)})),l.writeBack(!0),!0}function l(e,t,n,r){var i=e.isRTL,a=e.zoomScale,l=n.vTable,u=n.nextCells,d=n.currentCells,c=n.initialX;if(!function(e,t,n,r,i){for(var a=0;a1?0:e.getBoundingClientRect().right-c;e.style.wordBreak="break-word",e.style.whiteSpace="normal",e.style.boxSizing="border-box",e.style.width=e.rowSpan>1?"":t/a-r+"px"})),l.writeBack(!0),!0}function s(e,t,n){return n?t-e.left:e.right-t}function u(e,t){var n=e.td,r=(0,o.normalizeRect)(n.getBoundingClientRect());r&&(t.style.top=r.bottom-4+"px",t.style.left=r.left+"px",t.style.width=r.right-r.left+"px",t.style.height="4px")}function d(e,t){var n=e.td,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.top+"px",t.style.left=(r?i.left:i.right)-4+1+"px",t.style.width="4px",t.style.height=i.bottom-i.top+"px")}t.default=function(e,t,n,s,c,f,p){var v=e.ownerDocument,h={tag:"div",style:"position: fixed; cursor: "+(s?"row":"col")+"-resize; user-select: none"};null==p||p(h,"CellResizer");var g=(0,o.createElement)(h,v);v.body.appendChild(g);var m={td:e,isRTL:n,zoomScale:t,onStart:c},y=s?u:d;y(m,g);var b={onDragStart:i,onDragging:s?a:l,onDragEnd:f};return{node:e,div:g,featureHandler:new r.default(g,m,y,b,t)}}},3087:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(1565),i=n(669),a=n(255),l=n(6034),s=n(6080),u=n(6344);!function(e){e[e.top=0]="top",e[e.side=1]="side"}(r||(r={}));var d=function(){function e(e,t,n,r,o){var i=this;this.editor=e,this.table=t,this.onChanged=n,this.onShowHelperElement=r,this.contentDiv=o,this.horizontalInserter=null,this.verticalInserter=null,this.horizontalResizer=null,this.verticalResizer=null,this.tableResizer=null,this.tableSelector=null,this.start=null,this.end=null,this.onFinishEditing=function(){return i.editor.focus(),i.start&&i.end&&i.editor.select(i.start,i.end),i.editor.addUndoSnapshot(void 0,"Format"),i.onChanged(),i.isCurrentlyEditing=!1,!1},this.onStartTableResize=function(){i.isCurrentlyEditing=!0,i.onStartResize()},this.onStartCellResize=function(){i.isCurrentlyEditing=!0,i.disposeTableResizer(),i.onStartResize()},this.onInserted=function(e){i.editor.transformToDarkColor(e),i.disposeTableResizer(),i.onFinishEditing()},this.onSelect=function(e){if(i.editor.focus(),e){var t=new u.VTable(e);if(t.cells){var n=t.cells.length-1,r=0;t.cells[n].forEach((function(e,t){r=t}));var o={firstCell:{x:0,y:0},lastCell:{y:n,x:r}};i.editor.select(e,o)}}},this.getOnMouseOut=function(e){return function(t){e&&t.relatedTarget!=e&&(0,u.safeInstanceOf)(i.contentDiv,"HTMLElement")&&(0,u.safeInstanceOf)(t.relatedTarget,"HTMLElement")&&!(0,u.contains)(i.contentDiv,t.relatedTarget,!0)&&i.dispose()}},this.isRTL="rtl"==(0,u.getComputedStyle)(t,"direction"),this.setEditorFeatures(),this.isCurrentlyEditing=!1}return e.prototype.dispose=function(){this.disposeTableResizer(),this.disposeCellResizers(),this.disposeTableInserter(),this.disposeTableSelector()},e.prototype.isEditing=function(){return this.isCurrentlyEditing},e.prototype.isOwnedElement=function(e){return[this.tableResizer,this.tableSelector,this.horizontalInserter,this.verticalInserter,this.horizontalResizer,this.verticalResizer].filter((function(e){return!!(null==e?void 0:e.div)})).some((function(t){return(0,u.contains)(null==t?void 0:t.div,e,!0)}))},e.prototype.onMouseMove=function(e,t){var n,r,o=null===(n=this.table.rows[0])||void 0===n?void 0:n.cells[0];if(o){var i=(0,u.normalizeRect)(o.getBoundingClientRect());if(i){for(var a=t<=i.top+6?0:this.isRTL?e>=i.right-6?1:void 0:e<=i.left+6?1:void 0,l=0;l=p.left:e>=p.left-6;if(v&&h&&g){var m=this.isRTL?p.right<=f.right&&p.right>=f.right-1:p.left>=f.left&&p.left<=f.left+1;if(0===l&&0==a){var y=(p.left+p.right)/2,b=this.isRTL?ey;this.setInserterTd(b?c:s.cells[d-1],!1)}else if(0===d&&1==a&&m){var C=null===(r=this.table.rows[l-1])||void 0===r?void 0:r.cells[0],E=C?(0,u.normalizeRect)(C.getBoundingClientRect()):null,S=E?this.isRTL?E.right===p.right:E.left===p.left:null;this.setInserterTd(t<(p.top+p.bottom)/2&&S?C:c,!0)}else this.setInserterTd(null);this.setResizingTd(c);break}}}if(d{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disposeTableEditFeature=void 0,t.disposeTableEditFeature=function(e){var t,n,r;e&&(null===(n=null===(t=e.div)||void 0===t?void 0:t.parentNode)||void 0===n||n.removeChild(e.div),e.div=null,null===(r=e.featureHandler)||void 0===r||r.dispose(),e.featureHandler=null)}},669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344);t.default=function(e,t,n,i,a,l,s){var u=e.getElementAtCursor("table",t),d=(0,r.normalizeRect)(t.getBoundingClientRect()),c=e.getVisibleViewport(),f=u&&c?(0,r.getIntersectedRect)([u],[c]):null;if(d&&f){var p=t.ownerDocument,v=function(e,t,n,r){var o=t?"white":"#4A4A4A";return{tag:"div",style:"position: fixed; width: 12px; height: 12px; font-size: 16px; color: black; line-height: 8px; vertical-align: middle; text-align: center; cursor: pointer; border: solid 1px "+o+"; border-radius: 50%; background-color: "+r,children:[{tag:"div",style:"position: absolute; box-sizing: border-box; background-color: "+r+";"+(e?(n?"right":"left")+": 12px; top: 5px; height: 3px; border-top: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-right: 1px solid "+o+"; border-left: 0px;":"left: 5px; top: 12px; width: 3px; border-left: 1px solid "+o+"; border-right: 1px solid "+o+"; border-bottom: 1px solid "+o+"; border-top: 0px;")},"+"]}}(i,e.isDarkMode(),n,e.getDefaultFormat().backgroundColor||"white");null==s||s(v,"TableInserter");var h=(0,r.createElement)(v,p);return i?(h.style.left=(n?f.right:f.left-13)+"px",h.style.top=d.bottom-8+"px",h.firstChild.style.width=f.right-f.left+"px"):(h.style.left=(n?d.left-8:d.right-8)+"px",h.style.top=f.top-13+"px",h.firstChild.style.height=f.bottom-f.top+"px"),p.body.appendChild(h),{div:h,featureHandler:new o(h,t,i,e,a,l),node:t}}return null};var o=function(){function e(e,t,n,o,i,a){var l=this;this.div=e,this.td=t,this.isHorizontal=n,this.editor=o,this.onInsert=i,this.insertTd=function(){var e=new r.VTable(l.td);l.isHorizontal||(e.normalizeTableCellSize(l.editor.getZoomScale()),e.table.removeAttribute("width"),e.table.style.setProperty("width",null)),e.edit(l.isHorizontal?1:3),e.writeBack(),l.onInsert(e.table)},this.div.addEventListener("click",this.insertTd),this.onMouseOutEvent=a(e),this.div.addEventListener("mouseout",this.onMouseOutEvent)}return e.prototype.dispose=function(){this.div.removeEventListener("click",this.insertTd),this.onMouseOutEvent&&this.div.removeEventListener("mouseout",this.onMouseOutEvent),this.onMouseOutEvent=null},e}()},255:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4296),o=n(6344);function i(e){return e.onStart(),{originalRect:e.table.getBoundingClientRect(),vTable:new o.VTable(e.table,!0,e.zoomScale)}}function a(e,t,n,r,o){var i,a,l=e.isRTL,s=e.zoomScale,u=n.originalRect,d=n.vTable,c=1+r/u.width*s*(l?-1:1),f=1+o/u.height*s,p=Math.abs(c-1)>.001,v=Math.abs(f-1)>.001;if(d.cells&&(p||v)){for(var h=0;h=30&&(m.td.style.wordBreak="break-word",m.td.style.whiteSpace="normal",m.td.style.width=y+"px")}if(v)if(d.table.style.setProperty("height",null),0==g){var b=(null!==(a=m.height)&&void 0!==a?a:0)*f/s;b>=20&&(m.td.style.height=b+"px")}else m.td.style.setProperty("height",null)}}return d.writeBack(!0),!0}return!1}function l(e,t){var n=e.table,r=e.isRTL,i=(0,o.normalizeRect)(n.getBoundingClientRect());i&&(t.style.top=i.bottom+"px",t.style.left=r?i.left-12-2+"px":i.right+"px")}t.default=function(e,t,n,s,u,d){var c=e.ownerDocument,f={tag:"div",style:"position: fixed; cursor: "+(n?"ne":"nw")+"-resize; user-select: none; border: 1px solid #808080"};null==d||d(f,"TableResizer");var p=(0,o.createElement)(f,c);p.style.width="12px",p.style.height="12px",c.body.appendChild(p);var v={isRTL:n,table:e,zoomScale:t,onStart:s};return l(v,p),{node:e,div:p,featureHandler:new r.default(p,v,l,{onDragStart:i,onDragging:a,onDragEnd:u},t)}}},6034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582),o=n(4296),i=n(6344);t.default=function(e,t,n,r,o,s,u){var d=(0,i.normalizeRect)(e.getBoundingClientRect());if(!function(e,t,n){var r=e.getVisibleViewport();if(n&&(0,i.safeInstanceOf)(n,"HTMLElement")&&r&&t){var o=(0,i.normalizeRect)(n.getBoundingClientRect());return!!o&&o.top<=t.top&&r.top<=t.top}return!0}(n,d,u))return null;var c=e.ownerDocument,f={tag:"div",style:"position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080"};null==s||s(f,"TableSelector");var p=(0,i.createElement)(f,c);p.id="_Table_Selector",p.style.width="12px",p.style.height="12px",c.body.appendChild(p);var v={table:e,zoomScale:t,rect:d};l(v,p);var h=new a(p,v,l,{onDragEnd:function(e,t){return t.target==p&&r(e.table),!1}},t,o);return{div:p,featureHandler:h,node:e}};var a=function(e){function t(t,n,r,o,i,a,l){var s=e.call(this,t,n,r,o,i,l)||this;return s.div=t,s.onMouseOut=a(t),t.addEventListener("mouseout",s.onMouseOut),s}return(0,r.__extends)(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.onMouseOut&&this.div.removeEventListener("mouseout",this.onMouseOut),this.onMouseOut=null},t}(o.default);function l(e,t){var n=e.rect;n&&(t.style.top=n.top-12+"px",t.style.left=n.left-12-2+"px")}},9963:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TableResize=void 0;var r=n(12);Object.defineProperty(t,"TableResize",{enumerable:!0,get:function(){return r.default}})},909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6344),o=n(4548),i="WATERMARK_WRAPPER",a=function(){function e(e,t,n){var a=this;this.watermark=e,this.customClass=n,this.editor=null,this.disposer=null,this.showHideWatermark=function(){if(a.editor){var e=a.editor.hasFocus(),t=a.editor.queryElements((0,r.getEntitySelector)(i)),n=t.length>0;if(e&&n)t.forEach(a.removeWatermark),a.editor.focus();else if(!e&&!n&&a.editor.isEmpty()){var l=(0,o.insertEntity)(a.editor,i,a.editor.getDocument().createTextNode(a.watermark),!1,!1,0);a.customClass&&l.wrapper.classList.add(a.customClass)}}},this.removeWatermark=function(e){var t,n=e.parentNode;null==n||n.removeChild(e),n&&(null===(t=a.editor)||void 0===t?void 0:t.contains(n))&&"DIV"==(0,r.getTagOfNode)(n)&&!n.firstChild&&n.appendChild(a.editor.getDocument().createElement("BR"))},this.format=t||{fontSize:"14px",textColors:{lightModeColor:"#AAAAAA",darkModeColor:"#6B6B6B"}}}return e.prototype.getName=function(){return"Watermark"},e.prototype.initialize=function(e){this.editor=e,this.disposer=this.editor.addDomEventHandler({focus:this.showHideWatermark,blur:this.showHideWatermark})},e.prototype.dispose=function(){var e;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=null,this.editor=null},e.prototype.onPluginEvent=function(e){var t;if(11==e.eventType||7==e.eventType&&(null===(t=e.data)||void 0===t?void 0:t.type)!=i)this.showHideWatermark();else if(15==e.eventType&&e.entity.type==i&&this.editor){var n=e.operation,o=e.entity.wrapper;8==n?this.removeWatermark(o):0==e.operation&&((0,r.applyFormat)(o,this.format,this.editor.isDarkMode(),this.editor.getDarkColorHandler()),o.spellcheck=!1)}},e}();t.default=a},2939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watermark=void 0;var r=n(909);Object.defineProperty(t,"Watermark",{enumerable:!0,get:function(){return r.default}})},1286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(7582).__exportStar)(n(7246),t)},2091:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5160:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleAlignment=void 0,(n=t.CompatibleAlignment||(t.CompatibleAlignment={}))[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"},8411:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleBulletListType=void 0,(n=t.CompatibleBulletListType||(t.CompatibleBulletListType={}))[n.Min=1]="Min",n[n.Disc=1]="Disc",n[n.Dash=2]="Dash",n[n.Square=3]="Square",n[n.ShortArrow=4]="ShortArrow",n[n.LongArrow=5]="LongArrow",n[n.UnfilledArrow=6]="UnfilledArrow",n[n.Hyphen=7]="Hyphen",n[n.DoubleLongArrow=8]="DoubleLongArrow",n[n.Circle=9]="Circle",n[n.Max=9]="Max"},5412:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleCapitalization=void 0,(n=t.CompatibleCapitalization||(t.CompatibleCapitalization={})).Sentence="sentence",n.Lowercase="lowercase",n.Uppercase="uppercase",n.CapitalizeEachWord="capitalize"},5588:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleChangeSource=void 0,(n=t.CompatibleChangeSource||(t.CompatibleChangeSource={})).AutoLink="AutoLink",n.CreateLink="CreateLink",n.Format="Format",n.ImageResize="ImageResize",n.Paste="Paste",n.SetContent="SetContent",n.Cut="Cut",n.Drop="Drop",n.InsertEntity="InsertEntity",n.SwitchToDarkMode="SwitchToDarkMode",n.SwitchToLightMode="SwitchToLightMode",n.ListChain="ListChain",n.Keyboard="Keyboard"},6627:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleClearFormatMode=void 0,(n=t.CompatibleClearFormatMode||(t.CompatibleClearFormatMode={}))[n.Inline=0]="Inline",n[n.Block=1]="Block",n[n.AutoDetect=2]="AutoDetect"},2874:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleColorTransformDirection=void 0,(n=t.CompatibleColorTransformDirection||(t.CompatibleColorTransformDirection={}))[n.LightToDark=0]="LightToDark",n[n.DarkToLight=1]="DarkToLight"},1109:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleContentPosition=void 0,(n=t.CompatibleContentPosition||(t.CompatibleContentPosition={}))[n.Begin=0]="Begin",n[n.End=1]="End",n[n.DomEnd=2]="DomEnd",n[n.SelectionStart=3]="SelectionStart",n[n.Outside=4]="Outside",n[n.Range=5]="Range"},695:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleContentType=t.CompatibleContentTypePrefix=void 0,(r=t.CompatibleContentTypePrefix||(t.CompatibleContentTypePrefix={})).Text="text/",r.Image="image/",(n=t.CompatibleContentType||(t.CompatibleContentType={})).PlainText="text/plain",n.HTML="text/html"},7838:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDarkModeDatasetNames=void 0,(n=t.CompatibleDarkModeDatasetNames||(t.CompatibleDarkModeDatasetNames={})).OriginalStyleColor="ogsc",n.OriginalStyleBackgroundColor="ogsb",n.OriginalAttributeColor="ogac",n.OriginalAttributeBackgroundColor="ogab"},35:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDefinitionType=void 0,(n=t.CompatibleDefinitionType||(t.CompatibleDefinitionType={}))[n.Boolean=0]="Boolean",n[n.Number=1]="Number",n[n.String=2]="String",n[n.Array=3]="Array",n[n.Object=4]="Object",n[n.Customize=5]="Customize"},7028:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDelimiterClasses=void 0,(n=t.CompatibleDelimiterClasses||(t.CompatibleDelimiterClasses={})).DELIMITER_BEFORE="entityDelimiterBefore",n.DELIMITER_AFTER="entityDelimiterAfter"},6234:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDirection=void 0,(n=t.CompatibleDirection||(t.CompatibleDirection={}))[n.LeftToRight=0]="LeftToRight",n[n.RightToLeft=1]="RightToLeft"},2805:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDocumentCommand=void 0,(n=t.CompatibleDocumentCommand||(t.CompatibleDocumentCommand={})).AutoUrlDetect="AutoUrlDetect",n.BackColor="backColor",n.Bold="bold",n.ClearAuthenticationCache="ClearAuthenticationCache",n.ContentReadOnly="contentReadOnly",n.Copy="copy",n.CreateLink="createLink",n.Cut="cut",n.DecreaseFontSize="decreaseFontSize",n.DefaultParagraphSeparator="defaultParagraphSeparator",n.Delete="delete",n.EnableInlineTableEditing="enableInlineTableEditing",n.EnableObjectResizing="enableObjectResizing",n.FontName="fontName",n.FontSize="fontSize",n.ForeColor="foreColor",n.FormatBlock="formatBlock",n.ForwardDelete="forwardDelete",n.Heading="heading",n.HiliteColor="hiliteColor",n.IncreaseFontSize="increaseFontSize",n.Indent="indent",n.InsertBrOnReturn="insertBrOnReturn",n.InsertHorizontalRule="insertHorizontalRule",n.InsertHTML="insertHTML",n.InsertImage="insertImage",n.InsertOrderedList="insertOrderedList",n.InsertUnorderedList="insertUnorderedList",n.InsertParagraph="insertParagraph",n.InsertText="insertText",n.Italic="italic",n.JustifyCenter="justifyCenter",n.JustifyFull="justifyFull",n.JustifyLeft="justifyLeft",n.JustifyRight="justifyRight",n.Outdent="outdent",n.Paste="paste",n.Redo="redo",n.RemoveFormat="removeFormat",n.SelectAll="selectAll",n.StrikeThrough="strikeThrough",n.Subscript="subscript",n.Superscript="superscript",n.Underline="underline",n.Undo="undo",n.Unlink="unlink",n.StyleWithCSS="styleWithCSS"},6550:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleDocumentPosition=void 0,(n=t.CompatibleDocumentPosition||(t.CompatibleDocumentPosition={}))[n.Same=0]="Same",n[n.Disconnected=1]="Disconnected",n[n.Preceding=2]="Preceding",n[n.Following=4]="Following",n[n.Contains=8]="Contains",n[n.ContainedBy=16]="ContainedBy"},3779:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleEntityClasses=void 0,(n=t.CompatibleEntityClasses||(t.CompatibleEntityClasses={})).ENTITY_INFO_NAME="_Entity",n.ENTITY_TYPE_PREFIX="_EType_",n.ENTITY_ID_PREFIX="_EId_",n.ENTITY_READONLY_PREFIX="_EReadonly_"},8206:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleEntityOperation=void 0,(n=t.CompatibleEntityOperation||(t.CompatibleEntityOperation={}))[n.NewEntity=0]="NewEntity",n[n.Click=1]="Click",n[n.ContextMenu=2]="ContextMenu",n[n.Escape=3]="Escape",n[n.RemoveFromStart=4]="RemoveFromStart",n[n.RemoveFromEnd=5]="RemoveFromEnd",n[n.Overwrite=6]="Overwrite",n[n.PartialOverwrite=7]="PartialOverwrite",n[n.ReplaceTemporaryContent=8]="ReplaceTemporaryContent",n[n.AddShadowRoot=9]="AddShadowRoot",n[n.RemoveShadowRoot=10]="RemoveShadowRoot",n[n.UpdateEntityState=11]="UpdateEntityState"},2322:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleExperimentalFeatures=void 0,(n=t.CompatibleExperimentalFeatures||(t.CompatibleExperimentalFeatures={})).NewIndentation="NewIndentation",n.NewBullet="NewBullet",n.NewNumbering="NewNumbering",n.ListChain="ListChain",n.MergePastedLine="MergePastedLine",n.SingleDirectionResize="SingleDirectionResize",n.PasteWithLinkPreview="PasteWithLinkPreview",n.ImageRotate="ImageRotate",n.ImageCrop="ImageCrop",n.AlwaysApplyDefaultFormat="AlwaysApplyDefaultFormat",n.ConvertSingleImageBody="ConvertSingleImageBody",n.TableAlignment="TableAlignment",n.AdaptiveHandlesResizer="AdaptiveHandlesResizer",n.AutoHyphen="AutoHyphen",n.PendingStyleBasedFormat="PendingStyleBasedFormat",n.NormalizeList="NormalizeList",n.ImageSelection="ImageSelection",n.VariableBasedDarkColor="VariableBasedDarkColor",n.ListItemAlignment="ListItemAlignment",n.DefaultFormatInSpan="DefaultFormatInSpan",n.DefaultFormatOnContainer="DefaultFormatOnContainer",n.TabKeyTextFeatures="TabKeyTextFeatures",n.AutoFormatList="AutoFormatList",n.ReuseAllAncestorListElements="ReuseAllAncestorListElements",n.ReusableContentModel="ReusableContentModel",n.EditWithContentModel="EditWithContentModel",n.DeleteTableWithBackspace="DeleteTableWithBackspace",n.InlineEntityReadOnlyDelimiters="InlineEntityReadOnlyDelimiters",n.ContentModelPaste="ContentModelPaste",n.DisableListChain="DisableListChain"},3271:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleFontSizeChange=void 0,(n=t.CompatibleFontSizeChange||(t.CompatibleFontSizeChange={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},2776:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleGetContentMode=void 0,(n=t.CompatibleGetContentMode||(t.CompatibleGetContentMode={}))[n.CleanHTML=0]="CleanHTML",n[n.RawHTMLOnly=1]="RawHTMLOnly",n[n.RawHTMLWithSelection=2]="RawHTMLWithSelection",n[n.PlainText=3]="PlainText",n[n.PlainTextFast=4]="PlainTextFast"},7705:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleImageEditOperation=void 0,(n=t.CompatibleImageEditOperation||(t.CompatibleImageEditOperation={}))[n.None=0]="None",n[n.CornerResize=1]="CornerResize",n[n.SideResize=2]="SideResize",n[n.Resize=3]="Resize",n[n.Rotate=4]="Rotate",n[n.ResizeAndRotate=7]="ResizeAndRotate",n[n.Crop=8]="Crop",n[n.All=15]="All"},6020:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleIndentation=void 0,(n=t.CompatibleIndentation||(t.CompatibleIndentation={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},2693:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleKeys=void 0,(n=t.CompatibleKeys||(t.CompatibleKeys={}))[n.NULL=0]="NULL",n[n.BACKSPACE=8]="BACKSPACE",n[n.TAB=9]="TAB",n[n.ENTER=13]="ENTER",n[n.SHIFT=16]="SHIFT",n[n.CTRL_LEFT=17]="CTRL_LEFT",n[n.ALT=18]="ALT",n[n.ESCAPE=27]="ESCAPE",n[n.SPACE=32]="SPACE",n[n.PAGEUP=33]="PAGEUP",n[n.END=35]="END",n[n.HOME=36]="HOME",n[n.LEFT=37]="LEFT",n[n.UP=38]="UP",n[n.RIGHT=39]="RIGHT",n[n.DOWN=40]="DOWN",n[n.PRINT_SCREEN=44]="PRINT_SCREEN",n[n.DELETE=46]="DELETE",n[n.EIGHT_ASTIRISK=56]="EIGHT_ASTIRISK",n[n.EIGHT_ASTERISK=56]="EIGHT_ASTERISK",n[n.B=66]="B",n[n.I=73]="I",n[n.U=85]="U",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.META_LEFT=91]="META_LEFT",n[n.COMMA=188]="COMMA",n[n.DASH_UNDERSCORE=189]="DASH_UNDERSCORE",n[n.PERIOD=190]="PERIOD",n[n.FORWARDSLASH=191]="FORWARDSLASH",n[n.FORWARD_SLASH=191]="FORWARD_SLASH",n[n.GRAVE_TILDE=192]="GRAVE_TILDE",n[n.CONTENTCHANGED=257]="CONTENTCHANGED",n[n.RANGE=258]="RANGE",n[n.Ctrl=4096]="Ctrl",n[n.Meta=8192]="Meta",n[n.Shift=16384]="Shift"},4845:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleKnownCreateElementDataIndex=void 0,(n=t.CompatibleKnownCreateElementDataIndex||(t.CompatibleKnownCreateElementDataIndex={}))[n.None=0]="None",n[n.EmptyLine=1]="EmptyLine",n[n.BlockquoteWrapper=2]="BlockquoteWrapper",n[n.CopyPasteTempDiv=3]="CopyPasteTempDiv",n[n.BlockListItem=4]="BlockListItem",n[n.ContextMenuWrapper=5]="ContextMenuWrapper",n[n.ImageEditWrapper=6]="ImageEditWrapper",n[n.TableHorizontalResizer=7]="TableHorizontalResizer",n[n.TableVerticalResizer=8]="TableVerticalResizer",n[n.TableResizerLTR=9]="TableResizerLTR",n[n.TableResizerRTL=10]="TableResizerRTL",n[n.TableSelector=11]="TableSelector",n[n.EmptyLineFormatInSpan=12]="EmptyLineFormatInSpan"},9603:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleKnownPasteSourceType=void 0,(n=t.CompatibleKnownPasteSourceType||(t.CompatibleKnownPasteSourceType={}))[n.WordDesktop=0]="WordDesktop",n[n.ExcelDesktop=1]="ExcelDesktop",n[n.ExcelOnline=2]="ExcelOnline",n[n.PowerPointDesktop=3]="PowerPointDesktop",n[n.GoogleSheets=4]="GoogleSheets",n[n.WacComponents=5]="WacComponents",n[n.Default=6]="Default",n[n.SingleImage=7]="SingleImage"},3115:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleListType=void 0,(n=t.CompatibleListType||(t.CompatibleListType={}))[n.None=0]="None",n[n.Ordered=1]="Ordered",n[n.Unordered=2]="Unordered"},6993:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleNodeType=void 0,(n=t.CompatibleNodeType||(t.CompatibleNodeType={}))[n.Element=1]="Element",n[n.Attribute=2]="Attribute",n[n.Text=3]="Text",n[n.ProcessingInstruction=7]="ProcessingInstruction",n[n.Comment=8]="Comment",n[n.Document=9]="Document",n[n.DocumentType=10]="DocumentType",n[n.DocumentFragment=11]="DocumentFragment"},1040:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleNumberingListType=void 0,(n=t.CompatibleNumberingListType||(t.CompatibleNumberingListType={}))[n.Min=1]="Min",n[n.Decimal=1]="Decimal",n[n.DecimalDash=2]="DecimalDash",n[n.DecimalParenthesis=3]="DecimalParenthesis",n[n.DecimalDoubleParenthesis=4]="DecimalDoubleParenthesis",n[n.LowerAlpha=5]="LowerAlpha",n[n.LowerAlphaParenthesis=6]="LowerAlphaParenthesis",n[n.LowerAlphaDoubleParenthesis=7]="LowerAlphaDoubleParenthesis",n[n.LowerAlphaDash=8]="LowerAlphaDash",n[n.UpperAlpha=9]="UpperAlpha",n[n.UpperAlphaParenthesis=10]="UpperAlphaParenthesis",n[n.UpperAlphaDoubleParenthesis=11]="UpperAlphaDoubleParenthesis",n[n.UpperAlphaDash=12]="UpperAlphaDash",n[n.LowerRoman=13]="LowerRoman",n[n.LowerRomanParenthesis=14]="LowerRomanParenthesis",n[n.LowerRomanDoubleParenthesis=15]="LowerRomanDoubleParenthesis",n[n.LowerRomanDash=16]="LowerRomanDash",n[n.UpperRoman=17]="UpperRoman",n[n.UpperRomanParenthesis=18]="UpperRomanParenthesis",n[n.UpperRomanDoubleParenthesis=19]="UpperRomanDoubleParenthesis",n[n.UpperRomanDash=20]="UpperRomanDash",n[n.Max=20]="Max"},610:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatiblePasteType=void 0,(n=t.CompatiblePasteType||(t.CompatiblePasteType={}))[n.Normal=0]="Normal",n[n.AsPlainText=1]="AsPlainText",n[n.MergeFormat=2]="MergeFormat",n[n.AsImage=3]="AsImage"},5912:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatiblePluginEventType=void 0,(n=t.CompatiblePluginEventType||(t.CompatiblePluginEventType={}))[n.KeyDown=0]="KeyDown",n[n.KeyPress=1]="KeyPress",n[n.KeyUp=2]="KeyUp",n[n.Input=3]="Input",n[n.CompositionEnd=4]="CompositionEnd",n[n.MouseDown=5]="MouseDown",n[n.MouseUp=6]="MouseUp",n[n.ContentChanged=7]="ContentChanged",n[n.ExtractContentWithDom=8]="ExtractContentWithDom",n[n.BeforeCutCopy=9]="BeforeCutCopy",n[n.BeforePaste=10]="BeforePaste",n[n.EditorReady=11]="EditorReady",n[n.BeforeDispose=12]="BeforeDispose",n[n.PendingFormatStateChanged=13]="PendingFormatStateChanged",n[n.Scroll=14]="Scroll",n[n.EntityOperation=15]="EntityOperation",n[n.ContextMenu=16]="ContextMenu",n[n.EnteredShadowEdit=17]="EnteredShadowEdit",n[n.LeavingShadowEdit=18]="LeavingShadowEdit",n[n.EditImage=19]="EditImage",n[n.BeforeSetContent=20]="BeforeSetContent",n[n.ZoomChanged=21]="ZoomChanged",n[n.SelectionChanged=22]="SelectionChanged",n[n.BeforeKeyboardEditing=23]="BeforeKeyboardEditing"},685:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatiblePositionType=void 0,(n=t.CompatiblePositionType||(t.CompatiblePositionType={}))[n.Begin=0]="Begin",n[n.End=-1]="End",n[n.Before=-2]="Before",n[n.After=-3]="After"},8465:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleQueryScope=void 0,(n=t.CompatibleQueryScope||(t.CompatibleQueryScope={}))[n.Body=0]="Body",n[n.OnSelection=1]="OnSelection",n[n.InSelection=2]="InSelection"},2906:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleRegionType=void 0,(n=t.CompatibleRegionType||(t.CompatibleRegionType={}))[n.Table=0]="Table"},895:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleSelectionRangeTypes=void 0,(n=t.CompatibleSelectionRangeTypes||(t.CompatibleSelectionRangeTypes={}))[n.Normal=0]="Normal",n[n.TableSelection=1]="TableSelection",n[n.ImageSelection=2]="ImageSelection"},3088:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleTableBorderFormat=void 0,(n=t.CompatibleTableBorderFormat||(t.CompatibleTableBorderFormat={}))[n.DEFAULT=0]="DEFAULT",n[n.LIST_WITH_SIDE_BORDERS=1]="LIST_WITH_SIDE_BORDERS",n[n.NO_HEADER_BORDERS=2]="NO_HEADER_BORDERS",n[n.NO_SIDE_BORDERS=3]="NO_SIDE_BORDERS",n[n.FIRST_COLUMN_HEADER_EXTERNAL=4]="FIRST_COLUMN_HEADER_EXTERNAL",n[n.ESPECIAL_TYPE_1=5]="ESPECIAL_TYPE_1",n[n.ESPECIAL_TYPE_2=6]="ESPECIAL_TYPE_2",n[n.ESPECIAL_TYPE_3=7]="ESPECIAL_TYPE_3",n[n.CLEAR=8]="CLEAR"},6011:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleTableOperation=void 0,(n=t.CompatibleTableOperation||(t.CompatibleTableOperation={}))[n.InsertAbove=0]="InsertAbove",n[n.InsertBelow=1]="InsertBelow",n[n.InsertLeft=2]="InsertLeft",n[n.InsertRight=3]="InsertRight",n[n.DeleteTable=4]="DeleteTable",n[n.DeleteColumn=5]="DeleteColumn",n[n.DeleteRow=6]="DeleteRow",n[n.MergeAbove=7]="MergeAbove",n[n.MergeBelow=8]="MergeBelow",n[n.MergeLeft=9]="MergeLeft",n[n.MergeRight=10]="MergeRight",n[n.MergeCells=11]="MergeCells",n[n.SplitHorizontally=12]="SplitHorizontally",n[n.SplitVertically=13]="SplitVertically",n[n.AlignCenter=14]="AlignCenter",n[n.AlignLeft=15]="AlignLeft",n[n.AlignRight=16]="AlignRight",n[n.AlignCellLeft=17]="AlignCellLeft",n[n.AlignCellCenter=18]="AlignCellCenter",n[n.AlignCellRight=19]="AlignCellRight",n[n.AlignCellTop=20]="AlignCellTop",n[n.AlignCellMiddle=21]="AlignCellMiddle",n[n.AlignCellBottom=22]="AlignCellBottom"},5414:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompatibleTableOperation=t.CompatibleTableBorderFormat=t.CompatibleSelectionRangeTypes=t.CompatibleRegionType=t.CompatibleQueryScope=t.CompatiblePositionType=t.CompatiblePluginEventType=t.CompatiblePasteType=t.CompatibleNumberingListType=t.CompatibleNodeType=t.CompatibleListType=t.CompatibleKnownPasteSourceType=t.CompatibleKnownCreateElementDataIndex=t.CompatibleKeys=t.CompatibleIndentation=t.CompatibleImageEditOperation=t.CompatibleGetContentMode=t.CompatibleFontSizeChange=t.CompatibleExperimentalFeatures=t.CompatibleEntityOperation=t.CompatibleEntityClasses=t.CompatibleDocumentPosition=t.CompatibleDocumentCommand=t.CompatibleDirection=t.CompatibleDelimiterClasses=t.CompatibleDefinitionType=t.CompatibleDarkModeDatasetNames=t.CompatibleContentType=t.CompatibleContentTypePrefix=t.CompatibleContentPosition=t.CompatibleColorTransformDirection=t.CompatibleClearFormatMode=t.CompatibleChangeSource=t.CompatibleCapitalization=t.CompatibleBulletListType=t.CompatibleAlignment=void 0;var r=n(5160);Object.defineProperty(t,"CompatibleAlignment",{enumerable:!0,get:function(){return r.CompatibleAlignment}});var o=n(8411);Object.defineProperty(t,"CompatibleBulletListType",{enumerable:!0,get:function(){return o.CompatibleBulletListType}});var i=n(5412);Object.defineProperty(t,"CompatibleCapitalization",{enumerable:!0,get:function(){return i.CompatibleCapitalization}});var a=n(5588);Object.defineProperty(t,"CompatibleChangeSource",{enumerable:!0,get:function(){return a.CompatibleChangeSource}});var l=n(6627);Object.defineProperty(t,"CompatibleClearFormatMode",{enumerable:!0,get:function(){return l.CompatibleClearFormatMode}});var s=n(2874);Object.defineProperty(t,"CompatibleColorTransformDirection",{enumerable:!0,get:function(){return s.CompatibleColorTransformDirection}});var u=n(1109);Object.defineProperty(t,"CompatibleContentPosition",{enumerable:!0,get:function(){return u.CompatibleContentPosition}});var d=n(695);Object.defineProperty(t,"CompatibleContentTypePrefix",{enumerable:!0,get:function(){return d.CompatibleContentTypePrefix}}),Object.defineProperty(t,"CompatibleContentType",{enumerable:!0,get:function(){return d.CompatibleContentType}});var c=n(7838);Object.defineProperty(t,"CompatibleDarkModeDatasetNames",{enumerable:!0,get:function(){return c.CompatibleDarkModeDatasetNames}});var f=n(35);Object.defineProperty(t,"CompatibleDefinitionType",{enumerable:!0,get:function(){return f.CompatibleDefinitionType}});var p=n(7028);Object.defineProperty(t,"CompatibleDelimiterClasses",{enumerable:!0,get:function(){return p.CompatibleDelimiterClasses}});var v=n(6234);Object.defineProperty(t,"CompatibleDirection",{enumerable:!0,get:function(){return v.CompatibleDirection}});var h=n(2805);Object.defineProperty(t,"CompatibleDocumentCommand",{enumerable:!0,get:function(){return h.CompatibleDocumentCommand}});var g=n(6550);Object.defineProperty(t,"CompatibleDocumentPosition",{enumerable:!0,get:function(){return g.CompatibleDocumentPosition}});var m=n(3779);Object.defineProperty(t,"CompatibleEntityClasses",{enumerable:!0,get:function(){return m.CompatibleEntityClasses}});var y=n(8206);Object.defineProperty(t,"CompatibleEntityOperation",{enumerable:!0,get:function(){return y.CompatibleEntityOperation}});var b=n(2322);Object.defineProperty(t,"CompatibleExperimentalFeatures",{enumerable:!0,get:function(){return b.CompatibleExperimentalFeatures}});var C=n(3271);Object.defineProperty(t,"CompatibleFontSizeChange",{enumerable:!0,get:function(){return C.CompatibleFontSizeChange}});var E=n(2776);Object.defineProperty(t,"CompatibleGetContentMode",{enumerable:!0,get:function(){return E.CompatibleGetContentMode}});var S=n(7705);Object.defineProperty(t,"CompatibleImageEditOperation",{enumerable:!0,get:function(){return S.CompatibleImageEditOperation}});var T=n(6020);Object.defineProperty(t,"CompatibleIndentation",{enumerable:!0,get:function(){return T.CompatibleIndentation}});var P=n(2693);Object.defineProperty(t,"CompatibleKeys",{enumerable:!0,get:function(){return P.CompatibleKeys}});var w=n(4845);Object.defineProperty(t,"CompatibleKnownCreateElementDataIndex",{enumerable:!0,get:function(){return w.CompatibleKnownCreateElementDataIndex}});var _=n(9603);Object.defineProperty(t,"CompatibleKnownPasteSourceType",{enumerable:!0,get:function(){return _.CompatibleKnownPasteSourceType}});var O=n(3115);Object.defineProperty(t,"CompatibleListType",{enumerable:!0,get:function(){return O.CompatibleListType}});var M=n(6993);Object.defineProperty(t,"CompatibleNodeType",{enumerable:!0,get:function(){return M.CompatibleNodeType}});var D=n(1040);Object.defineProperty(t,"CompatibleNumberingListType",{enumerable:!0,get:function(){return D.CompatibleNumberingListType}});var L=n(610);Object.defineProperty(t,"CompatiblePasteType",{enumerable:!0,get:function(){return L.CompatiblePasteType}});var R=n(5912);Object.defineProperty(t,"CompatiblePluginEventType",{enumerable:!0,get:function(){return R.CompatiblePluginEventType}});var A=n(685);Object.defineProperty(t,"CompatiblePositionType",{enumerable:!0,get:function(){return A.CompatiblePositionType}});var I=n(8465);Object.defineProperty(t,"CompatibleQueryScope",{enumerable:!0,get:function(){return I.CompatibleQueryScope}});var x=n(2906);Object.defineProperty(t,"CompatibleRegionType",{enumerable:!0,get:function(){return x.CompatibleRegionType}});var N=n(895);Object.defineProperty(t,"CompatibleSelectionRangeTypes",{enumerable:!0,get:function(){return N.CompatibleSelectionRangeTypes}});var k=n(3088);Object.defineProperty(t,"CompatibleTableBorderFormat",{enumerable:!0,get:function(){return k.CompatibleTableBorderFormat}});var j=n(6011);Object.defineProperty(t,"CompatibleTableOperation",{enumerable:!0,get:function(){return j.CompatibleTableOperation}})},7246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);(0,r.__exportStar)(n(2091),t),(0,r.__exportStar)(n(3424),t),(0,r.__exportStar)(n(5414),t),(0,r.__exportStar)(n(796),t),(0,r.__exportStar)(n(7882),t),(0,r.__exportStar)(n(8568),t)},3424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4625:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Alignment=void 0,(n=t.Alignment||(t.Alignment={}))[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"},8982:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BulletListType=void 0,(n=t.BulletListType||(t.BulletListType={}))[n.Min=1]="Min",n[n.Disc=1]="Disc",n[n.Dash=2]="Dash",n[n.Square=3]="Square",n[n.ShortArrow=4]="ShortArrow",n[n.LongArrow=5]="LongArrow",n[n.UnfilledArrow=6]="UnfilledArrow",n[n.Hyphen=7]="Hyphen",n[n.DoubleLongArrow=8]="DoubleLongArrow",n[n.Circle=9]="Circle",n[n.Max=9]="Max"},9003:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Capitalization=void 0,(n=t.Capitalization||(t.Capitalization={})).Sentence="sentence",n.Lowercase="lowercase",n.Uppercase="uppercase",n.CapitalizeEachWord="capitalize"},8591:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeSource=void 0,(n=t.ChangeSource||(t.ChangeSource={})).AutoLink="AutoLink",n.CreateLink="CreateLink",n.Format="Format",n.ImageResize="ImageResize",n.Paste="Paste",n.SetContent="SetContent",n.Cut="Cut",n.Drop="Drop",n.InsertEntity="InsertEntity",n.SwitchToDarkMode="SwitchToDarkMode",n.SwitchToLightMode="SwitchToLightMode",n.ListChain="ListChain",n.Keyboard="Keyboard"},2101:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ClearFormatMode=void 0,(n=t.ClearFormatMode||(t.ClearFormatMode={}))[n.Inline=0]="Inline",n[n.Block=1]="Block",n[n.AutoDetect=2]="AutoDetect"},4471:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorTransformDirection=void 0,(n=t.ColorTransformDirection||(t.ColorTransformDirection={}))[n.LightToDark=0]="LightToDark",n[n.DarkToLight=1]="DarkToLight"},8983:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentPosition=void 0,(n=t.ContentPosition||(t.ContentPosition={}))[n.Begin=0]="Begin",n[n.End=1]="End",n[n.DomEnd=2]="DomEnd",n[n.SelectionStart=3]="SelectionStart",n[n.Outside=4]="Outside",n[n.Range=5]="Range"},7157:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentType=t.ContentTypePrefix=void 0,(r=t.ContentTypePrefix||(t.ContentTypePrefix={})).Text="text/",r.Image="image/",(n=t.ContentType||(t.ContentType={})).PlainText="text/plain",n.HTML="text/html"},4490:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DarkModeDatasetNames=void 0,(n=t.DarkModeDatasetNames||(t.DarkModeDatasetNames={})).OriginalStyleColor="ogsc",n.OriginalStyleBackgroundColor="ogsb",n.OriginalAttributeColor="ogac",n.OriginalAttributeBackgroundColor="ogab"},9097:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionType=void 0,(n=t.DefinitionType||(t.DefinitionType={}))[n.Boolean=0]="Boolean",n[n.Number=1]="Number",n[n.String=2]="String",n[n.Array=3]="Array",n[n.Object=4]="Object",n[n.Customize=5]="Customize"},2910:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DelimiterClasses=void 0,(n=t.DelimiterClasses||(t.DelimiterClasses={})).DELIMITER_BEFORE="entityDelimiterBefore",n.DELIMITER_AFTER="entityDelimiterAfter"},265:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,(n=t.Direction||(t.Direction={}))[n.LeftToRight=0]="LeftToRight",n[n.RightToLeft=1]="RightToLeft"},6386:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentCommand=void 0,(n=t.DocumentCommand||(t.DocumentCommand={})).AutoUrlDetect="AutoUrlDetect",n.BackColor="backColor",n.Bold="bold",n.ClearAuthenticationCache="ClearAuthenticationCache",n.ContentReadOnly="contentReadOnly",n.Copy="copy",n.CreateLink="createLink",n.Cut="cut",n.DecreaseFontSize="decreaseFontSize",n.DefaultParagraphSeparator="defaultParagraphSeparator",n.Delete="delete",n.EnableInlineTableEditing="enableInlineTableEditing",n.EnableObjectResizing="enableObjectResizing",n.FontName="fontName",n.FontSize="fontSize",n.ForeColor="foreColor",n.FormatBlock="formatBlock",n.ForwardDelete="forwardDelete",n.Heading="heading",n.HiliteColor="hiliteColor",n.IncreaseFontSize="increaseFontSize",n.Indent="indent",n.InsertBrOnReturn="insertBrOnReturn",n.InsertHorizontalRule="insertHorizontalRule",n.InsertHTML="insertHTML",n.InsertImage="insertImage",n.InsertOrderedList="insertOrderedList",n.InsertUnorderedList="insertUnorderedList",n.InsertParagraph="insertParagraph",n.InsertText="insertText",n.Italic="italic",n.JustifyCenter="justifyCenter",n.JustifyFull="justifyFull",n.JustifyLeft="justifyLeft",n.JustifyRight="justifyRight",n.Outdent="outdent",n.Paste="paste",n.Redo="redo",n.RemoveFormat="removeFormat",n.SelectAll="selectAll",n.StrikeThrough="strikeThrough",n.Subscript="subscript",n.Superscript="superscript",n.Underline="underline",n.Undo="undo",n.Unlink="unlink",n.StyleWithCSS="styleWithCSS"},565:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentPosition=void 0,(n=t.DocumentPosition||(t.DocumentPosition={}))[n.Same=0]="Same",n[n.Disconnected=1]="Disconnected",n[n.Preceding=2]="Preceding",n[n.Following=4]="Following",n[n.Contains=8]="Contains",n[n.ContainedBy=16]="ContainedBy"},2372:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EntityClasses=void 0,(n=t.EntityClasses||(t.EntityClasses={})).ENTITY_INFO_NAME="_Entity",n.ENTITY_TYPE_PREFIX="_EType_",n.ENTITY_ID_PREFIX="_EId_",n.ENTITY_READONLY_PREFIX="_EReadonly_"},9468:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EntityOperation=void 0,(n=t.EntityOperation||(t.EntityOperation={}))[n.NewEntity=0]="NewEntity",n[n.Click=1]="Click",n[n.ContextMenu=2]="ContextMenu",n[n.Escape=3]="Escape",n[n.RemoveFromStart=4]="RemoveFromStart",n[n.RemoveFromEnd=5]="RemoveFromEnd",n[n.Overwrite=6]="Overwrite",n[n.PartialOverwrite=7]="PartialOverwrite",n[n.ReplaceTemporaryContent=8]="ReplaceTemporaryContent",n[n.AddShadowRoot=9]="AddShadowRoot",n[n.RemoveShadowRoot=10]="RemoveShadowRoot",n[n.UpdateEntityState=11]="UpdateEntityState"},9084:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentalFeatures=void 0,(n=t.ExperimentalFeatures||(t.ExperimentalFeatures={})).NewIndentation="NewIndentation",n.NewBullet="NewBullet",n.NewNumbering="NewNumbering",n.ListChain="ListChain",n.MergePastedLine="MergePastedLine",n.SingleDirectionResize="SingleDirectionResize",n.PasteWithLinkPreview="PasteWithLinkPreview",n.ImageRotate="ImageRotate",n.ImageCrop="ImageCrop",n.AlwaysApplyDefaultFormat="AlwaysApplyDefaultFormat",n.ConvertSingleImageBody="ConvertSingleImageBody",n.TableAlignment="TableAlignment",n.AdaptiveHandlesResizer="AdaptiveHandlesResizer",n.AutoHyphen="AutoHyphen",n.PendingStyleBasedFormat="PendingStyleBasedFormat",n.NormalizeList="NormalizeList",n.ImageSelection="ImageSelection",n.VariableBasedDarkColor="VariableBasedDarkColor",n.ListItemAlignment="ListItemAlignment",n.DefaultFormatInSpan="DefaultFormatInSpan",n.DefaultFormatOnContainer="DefaultFormatOnContainer",n.TabKeyTextFeatures="TabKeyTextFeatures",n.AutoFormatList="AutoFormatList",n.ReuseAllAncestorListElements="ReuseAllAncestorListElements",n.ReusableContentModel="ReusableContentModel",n.EditWithContentModel="EditWithContentModel",n.DeleteTableWithBackspace="DeleteTableWithBackspace",n.InlineEntityReadOnlyDelimiters="InlineEntityReadOnlyDelimiters",n.ContentModelPaste="ContentModelPaste",n.DisableListChain="DisableListChain"},5397:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FontSizeChange=void 0,(n=t.FontSizeChange||(t.FontSizeChange={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},4051:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GetContentMode=void 0,(n=t.GetContentMode||(t.GetContentMode={}))[n.CleanHTML=0]="CleanHTML",n[n.RawHTMLOnly=1]="RawHTMLOnly",n[n.RawHTMLWithSelection=2]="RawHTMLWithSelection",n[n.PlainText=3]="PlainText",n[n.PlainTextFast=4]="PlainTextFast"},2681:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditOperation=void 0,(n=t.ImageEditOperation||(t.ImageEditOperation={}))[n.None=0]="None",n[n.CornerResize=1]="CornerResize",n[n.SideResize=2]="SideResize",n[n.Resize=3]="Resize",n[n.Rotate=4]="Rotate",n[n.ResizeAndRotate=7]="ResizeAndRotate",n[n.Crop=8]="Crop",n[n.All=15]="All"},6039:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Indentation=void 0,(n=t.Indentation||(t.Indentation={}))[n.Increase=0]="Increase",n[n.Decrease=1]="Decrease"},3692:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Keys=void 0,(n=t.Keys||(t.Keys={}))[n.NULL=0]="NULL",n[n.BACKSPACE=8]="BACKSPACE",n[n.TAB=9]="TAB",n[n.ENTER=13]="ENTER",n[n.SHIFT=16]="SHIFT",n[n.CTRL_LEFT=17]="CTRL_LEFT",n[n.ALT=18]="ALT",n[n.ESCAPE=27]="ESCAPE",n[n.SPACE=32]="SPACE",n[n.PAGEUP=33]="PAGEUP",n[n.END=35]="END",n[n.HOME=36]="HOME",n[n.LEFT=37]="LEFT",n[n.UP=38]="UP",n[n.RIGHT=39]="RIGHT",n[n.DOWN=40]="DOWN",n[n.PRINT_SCREEN=44]="PRINT_SCREEN",n[n.DELETE=46]="DELETE",n[n.EIGHT_ASTIRISK=56]="EIGHT_ASTIRISK",n[n.EIGHT_ASTERISK=56]="EIGHT_ASTERISK",n[n.B=66]="B",n[n.I=73]="I",n[n.U=85]="U",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.META_LEFT=91]="META_LEFT",n[n.COMMA=188]="COMMA",n[n.DASH_UNDERSCORE=189]="DASH_UNDERSCORE",n[n.PERIOD=190]="PERIOD",n[n.FORWARDSLASH=191]="FORWARDSLASH",n[n.FORWARD_SLASH=191]="FORWARD_SLASH",n[n.GRAVE_TILDE=192]="GRAVE_TILDE",n[n.CONTENTCHANGED=257]="CONTENTCHANGED",n[n.RANGE=258]="RANGE",n[n.Ctrl=4096]="Ctrl",n[n.Meta=8192]="Meta",n[n.Shift=16384]="Shift"},9278:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownCreateElementDataIndex=void 0,(n=t.KnownCreateElementDataIndex||(t.KnownCreateElementDataIndex={}))[n.None=0]="None",n[n.EmptyLine=1]="EmptyLine",n[n.BlockquoteWrapper=2]="BlockquoteWrapper",n[n.CopyPasteTempDiv=3]="CopyPasteTempDiv",n[n.BlockListItem=4]="BlockListItem",n[n.ContextMenuWrapper=5]="ContextMenuWrapper",n[n.ImageEditWrapper=6]="ImageEditWrapper",n[n.TableHorizontalResizer=7]="TableHorizontalResizer",n[n.TableVerticalResizer=8]="TableVerticalResizer",n[n.TableResizerLTR=9]="TableResizerLTR",n[n.TableResizerRTL=10]="TableResizerRTL",n[n.TableSelector=11]="TableSelector",n[n.EmptyLineFormatInSpan=12]="EmptyLineFormatInSpan"},2342:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KnownPasteSourceType=void 0,(n=t.KnownPasteSourceType||(t.KnownPasteSourceType={}))[n.WordDesktop=0]="WordDesktop",n[n.ExcelDesktop=1]="ExcelDesktop",n[n.ExcelOnline=2]="ExcelOnline",n[n.PowerPointDesktop=3]="PowerPointDesktop",n[n.GoogleSheets=4]="GoogleSheets",n[n.WacComponents=5]="WacComponents",n[n.Default=6]="Default",n[n.SingleImage=7]="SingleImage"},8185:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ListType=void 0,(n=t.ListType||(t.ListType={}))[n.None=0]="None",n[n.Ordered=1]="Ordered",n[n.Unordered=2]="Unordered"},9883:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,(n=t.NodeType||(t.NodeType={}))[n.Element=1]="Element",n[n.Attribute=2]="Attribute",n[n.Text=3]="Text",n[n.ProcessingInstruction=7]="ProcessingInstruction",n[n.Comment=8]="Comment",n[n.Document=9]="Document",n[n.DocumentType=10]="DocumentType",n[n.DocumentFragment=11]="DocumentFragment"},7821:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NumberingListType=void 0,(n=t.NumberingListType||(t.NumberingListType={}))[n.Min=1]="Min",n[n.Decimal=1]="Decimal",n[n.DecimalDash=2]="DecimalDash",n[n.DecimalParenthesis=3]="DecimalParenthesis",n[n.DecimalDoubleParenthesis=4]="DecimalDoubleParenthesis",n[n.LowerAlpha=5]="LowerAlpha",n[n.LowerAlphaParenthesis=6]="LowerAlphaParenthesis",n[n.LowerAlphaDoubleParenthesis=7]="LowerAlphaDoubleParenthesis",n[n.LowerAlphaDash=8]="LowerAlphaDash",n[n.UpperAlpha=9]="UpperAlpha",n[n.UpperAlphaParenthesis=10]="UpperAlphaParenthesis",n[n.UpperAlphaDoubleParenthesis=11]="UpperAlphaDoubleParenthesis",n[n.UpperAlphaDash=12]="UpperAlphaDash",n[n.LowerRoman=13]="LowerRoman",n[n.LowerRomanParenthesis=14]="LowerRomanParenthesis",n[n.LowerRomanDoubleParenthesis=15]="LowerRomanDoubleParenthesis",n[n.LowerRomanDash=16]="LowerRomanDash",n[n.UpperRoman=17]="UpperRoman",n[n.UpperRomanParenthesis=18]="UpperRomanParenthesis",n[n.UpperRomanDoubleParenthesis=19]="UpperRomanDoubleParenthesis",n[n.UpperRomanDash=20]="UpperRomanDash",n[n.Max=20]="Max"},2368:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PasteType=void 0,(n=t.PasteType||(t.PasteType={}))[n.Normal=0]="Normal",n[n.AsPlainText=1]="AsPlainText",n[n.MergeFormat=2]="MergeFormat",n[n.AsImage=3]="AsImage"},2688:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PluginEventType=void 0,(n=t.PluginEventType||(t.PluginEventType={}))[n.KeyDown=0]="KeyDown",n[n.KeyPress=1]="KeyPress",n[n.KeyUp=2]="KeyUp",n[n.Input=3]="Input",n[n.CompositionEnd=4]="CompositionEnd",n[n.MouseDown=5]="MouseDown",n[n.MouseUp=6]="MouseUp",n[n.ContentChanged=7]="ContentChanged",n[n.ExtractContentWithDom=8]="ExtractContentWithDom",n[n.BeforeCutCopy=9]="BeforeCutCopy",n[n.BeforePaste=10]="BeforePaste",n[n.EditorReady=11]="EditorReady",n[n.BeforeDispose=12]="BeforeDispose",n[n.PendingFormatStateChanged=13]="PendingFormatStateChanged",n[n.Scroll=14]="Scroll",n[n.EntityOperation=15]="EntityOperation",n[n.ContextMenu=16]="ContextMenu",n[n.EnteredShadowEdit=17]="EnteredShadowEdit",n[n.LeavingShadowEdit=18]="LeavingShadowEdit",n[n.EditImage=19]="EditImage",n[n.BeforeSetContent=20]="BeforeSetContent",n[n.ZoomChanged=21]="ZoomChanged",n[n.SelectionChanged=22]="SelectionChanged",n[n.BeforeKeyboardEditing=23]="BeforeKeyboardEditing"},758:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PositionType=void 0,(n=t.PositionType||(t.PositionType={}))[n.Begin=0]="Begin",n[n.End=-1]="End",n[n.Before=-2]="Before",n[n.After=-3]="After"},8827:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.QueryScope=void 0,(n=t.QueryScope||(t.QueryScope={}))[n.Body=0]="Body",n[n.OnSelection=1]="OnSelection",n[n.InSelection=2]="InSelection"},2025:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.RegionType=void 0,(n=t.RegionType||(t.RegionType={}))[n.Table=0]="Table"},3852:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeTypes=void 0,(n=t.SelectionRangeTypes||(t.SelectionRangeTypes={}))[n.Normal=0]="Normal",n[n.TableSelection=1]="TableSelection",n[n.ImageSelection=2]="ImageSelection"},372:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TableBorderFormat=void 0,(n=t.TableBorderFormat||(t.TableBorderFormat={}))[n.DEFAULT=0]="DEFAULT",n[n.LIST_WITH_SIDE_BORDERS=1]="LIST_WITH_SIDE_BORDERS",n[n.NO_HEADER_BORDERS=2]="NO_HEADER_BORDERS",n[n.NO_SIDE_BORDERS=3]="NO_SIDE_BORDERS",n[n.FIRST_COLUMN_HEADER_EXTERNAL=4]="FIRST_COLUMN_HEADER_EXTERNAL",n[n.ESPECIAL_TYPE_1=5]="ESPECIAL_TYPE_1",n[n.ESPECIAL_TYPE_2=6]="ESPECIAL_TYPE_2",n[n.ESPECIAL_TYPE_3=7]="ESPECIAL_TYPE_3",n[n.CLEAR=8]="CLEAR"},6841:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TableOperation=void 0,(n=t.TableOperation||(t.TableOperation={}))[n.InsertAbove=0]="InsertAbove",n[n.InsertBelow=1]="InsertBelow",n[n.InsertLeft=2]="InsertLeft",n[n.InsertRight=3]="InsertRight",n[n.DeleteTable=4]="DeleteTable",n[n.DeleteColumn=5]="DeleteColumn",n[n.DeleteRow=6]="DeleteRow",n[n.MergeAbove=7]="MergeAbove",n[n.MergeBelow=8]="MergeBelow",n[n.MergeLeft=9]="MergeLeft",n[n.MergeRight=10]="MergeRight",n[n.MergeCells=11]="MergeCells",n[n.SplitHorizontally=12]="SplitHorizontally",n[n.SplitVertically=13]="SplitVertically",n[n.AlignCenter=14]="AlignCenter",n[n.AlignLeft=15]="AlignLeft",n[n.AlignRight=16]="AlignRight",n[n.AlignCellLeft=17]="AlignCellLeft",n[n.AlignCellCenter=18]="AlignCellCenter",n[n.AlignCellRight=19]="AlignCellRight",n[n.AlignCellTop=20]="AlignCellTop",n[n.AlignCellMiddle=21]="AlignCellMiddle",n[n.AlignCellBottom=22]="AlignCellBottom"},6395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasteType=t.DefinitionType=t.BulletListType=t.NumberingListType=t.SelectionRangeTypes=t.PluginEventType=t.TableBorderFormat=t.KnownPasteSourceType=t.KnownCreateElementDataIndex=t.ClearFormatMode=t.ImageEditOperation=t.TableOperation=t.RegionType=t.QueryScope=t.PositionType=t.ListType=t.Capitalization=t.Indentation=t.GetContentMode=t.FontSizeChange=t.ExperimentalFeatures=t.EntityOperation=t.EntityClasses=t.Direction=t.DelimiterClasses=t.DarkModeDatasetNames=t.ContentPosition=t.ColorTransformDirection=t.ChangeSource=t.Alignment=t.ContentType=t.ContentTypePrefix=t.NodeType=t.Keys=t.DocumentPosition=t.DocumentCommand=void 0;var r=n(6386);Object.defineProperty(t,"DocumentCommand",{enumerable:!0,get:function(){return r.DocumentCommand}});var o=n(565);Object.defineProperty(t,"DocumentPosition",{enumerable:!0,get:function(){return o.DocumentPosition}});var i=n(3692);Object.defineProperty(t,"Keys",{enumerable:!0,get:function(){return i.Keys}});var a=n(9883);Object.defineProperty(t,"NodeType",{enumerable:!0,get:function(){return a.NodeType}});var l=n(7157);Object.defineProperty(t,"ContentTypePrefix",{enumerable:!0,get:function(){return l.ContentTypePrefix}}),Object.defineProperty(t,"ContentType",{enumerable:!0,get:function(){return l.ContentType}});var s=n(4625);Object.defineProperty(t,"Alignment",{enumerable:!0,get:function(){return s.Alignment}});var u=n(8591);Object.defineProperty(t,"ChangeSource",{enumerable:!0,get:function(){return u.ChangeSource}});var d=n(4471);Object.defineProperty(t,"ColorTransformDirection",{enumerable:!0,get:function(){return d.ColorTransformDirection}});var c=n(8983);Object.defineProperty(t,"ContentPosition",{enumerable:!0,get:function(){return c.ContentPosition}});var f=n(4490);Object.defineProperty(t,"DarkModeDatasetNames",{enumerable:!0,get:function(){return f.DarkModeDatasetNames}});var p=n(2910);Object.defineProperty(t,"DelimiterClasses",{enumerable:!0,get:function(){return p.DelimiterClasses}});var v=n(265);Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return v.Direction}});var h=n(2372);Object.defineProperty(t,"EntityClasses",{enumerable:!0,get:function(){return h.EntityClasses}});var g=n(9468);Object.defineProperty(t,"EntityOperation",{enumerable:!0,get:function(){return g.EntityOperation}});var m=n(9084);Object.defineProperty(t,"ExperimentalFeatures",{enumerable:!0,get:function(){return m.ExperimentalFeatures}});var y=n(5397);Object.defineProperty(t,"FontSizeChange",{enumerable:!0,get:function(){return y.FontSizeChange}});var b=n(4051);Object.defineProperty(t,"GetContentMode",{enumerable:!0,get:function(){return b.GetContentMode}});var C=n(6039);Object.defineProperty(t,"Indentation",{enumerable:!0,get:function(){return C.Indentation}});var E=n(9003);Object.defineProperty(t,"Capitalization",{enumerable:!0,get:function(){return E.Capitalization}});var S=n(8185);Object.defineProperty(t,"ListType",{enumerable:!0,get:function(){return S.ListType}});var T=n(758);Object.defineProperty(t,"PositionType",{enumerable:!0,get:function(){return T.PositionType}});var P=n(8827);Object.defineProperty(t,"QueryScope",{enumerable:!0,get:function(){return P.QueryScope}});var w=n(2025);Object.defineProperty(t,"RegionType",{enumerable:!0,get:function(){return w.RegionType}});var _=n(6841);Object.defineProperty(t,"TableOperation",{enumerable:!0,get:function(){return _.TableOperation}});var O=n(2681);Object.defineProperty(t,"ImageEditOperation",{enumerable:!0,get:function(){return O.ImageEditOperation}});var M=n(2101);Object.defineProperty(t,"ClearFormatMode",{enumerable:!0,get:function(){return M.ClearFormatMode}});var D=n(9278);Object.defineProperty(t,"KnownCreateElementDataIndex",{enumerable:!0,get:function(){return D.KnownCreateElementDataIndex}});var L=n(2342);Object.defineProperty(t,"KnownPasteSourceType",{enumerable:!0,get:function(){return L.KnownPasteSourceType}});var R=n(372);Object.defineProperty(t,"TableBorderFormat",{enumerable:!0,get:function(){return R.TableBorderFormat}});var A=n(2688);Object.defineProperty(t,"PluginEventType",{enumerable:!0,get:function(){return A.PluginEventType}});var I=n(3852);Object.defineProperty(t,"SelectionRangeTypes",{enumerable:!0,get:function(){return I.SelectionRangeTypes}});var x=n(7821);Object.defineProperty(t,"NumberingListType",{enumerable:!0,get:function(){return x.NumberingListType}});var N=n(8982);Object.defineProperty(t,"BulletListType",{enumerable:!0,get:function(){return N.BulletListType}});var k=n(9097);Object.defineProperty(t,"DefinitionType",{enumerable:!0,get:function(){return k.DefinitionType}});var j=n(2368);Object.defineProperty(t,"PasteType",{enumerable:!0,get:function(){return j.PasteType}})},796:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7582);(0,r.__exportStar)(n(2091),t),(0,r.__exportStar)(n(3424),t),(0,r.__exportStar)(n(6395),t),(0,r.__exportStar)(n(796),t),(0,r.__exportStar)(n(7882),t),(0,r.__exportStar)(n(8568),t)},7882:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8568:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5115:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6630),o=n(1660),i=n(4739);t.default=function(e,t,n){var a=[new i.HyperLink,new i.Paste,new i.ContentEdit];t&&(a=a.concat(t));var l={plugins:a,initialContent:n,getDarkColor:o.getDarkColor,defaultFormat:{fontFamily:"Calibri,Arial,Helvetica,sans-serif",fontSize:"11pt",textColor:"#000000"}};return new r.Editor(e,l)}},8608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditor=void 0;var r=n(7582),o=n(5115);Object.defineProperty(t,"createEditor",{enumerable:!0,get:function(){return o.default}}),(0,r.__exportStar)(n(8075),t),(0,r.__exportStar)(n(1286),t),(0,r.__exportStar)(n(6344),t),(0,r.__exportStar)(n(6630),t),(0,r.__exportStar)(n(4548),t),(0,r.__exportStar)(n(4739),t),(0,r.__exportStar)(n(1660),t)},7582:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>w,__asyncGenerator:()=>P,__asyncValues:()=>_,__await:()=>T,__awaiter:()=>v,__classPrivateFieldGet:()=>R,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>A,__createBinding:()=>g,__decorate:()=>l,__esDecorate:()=>u,__exportStar:()=>m,__extends:()=>o,__generator:()=>h,__importDefault:()=>L,__importStar:()=>D,__makeTemplateObject:()=>O,__metadata:()=>p,__param:()=>s,__propKey:()=>c,__read:()=>b,__rest:()=>a,__runInitializers:()=>d,__setFunctionName:()=>f,__spread:()=>C,__spreadArray:()=>S,__spreadArrays:()=>E,__values:()=>y,default:()=>x});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,u="getter"===s?"get":"setter"===s?"set":"value",d=!t&&e?r.static?e:e.prototype:null,c=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var v={};for(var h in r)v[h]="access"===h?{}:r[h];for(var h in r.access)v.access[h]=r.access[h];v.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var g=(0,n[p])("accessor"===s?{get:c.get,set:c.set}:c[u],v);if("accessor"===s){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(l=a(g.get))&&(c.get=l),(l=a(g.set))&&(c.set=l),(l=a(g.init))&&o.unshift(l)}else(l=a(g))&&("field"===s?o.unshift(l):c[u]=l)}d&&Object.defineProperty(d,r.name,c),f=!0}function d(e,t,n){for(var r=arguments.length>2,o=0;o0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function C(){for(var e=[],t=0;t1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof T?Promise.resolve(n.value.v).then(s,u):d(i[0][2],n)}catch(e){d(i[0][3],e)}var n}function s(e){l("next",e)}function u(e){l("throw",e)}function d(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:T(e[r](t)),done:!1}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var M=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&g(t,e,n);return M(t,e),t}function L(e){return e&&e.__esModule?e:{default:e}}function R(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}const x={__extends:o,__assign:i,__rest:a,__decorate:l,__param:s,__metadata:p,__awaiter:v,__generator:h,__createBinding:g,__exportStar:m,__values:y,__read:b,__spread:C,__spreadArrays:E,__spreadArray:S,__await:T,__asyncGenerator:P,__asyncDelegator:w,__asyncValues:_,__makeTemplateObject:O,__importStar:D,__importDefault:L,__classPrivateFieldGet:R,__classPrivateFieldSet:A,__classPrivateFieldIn:I}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(8608);roosterjs=r})(); //# sourceMappingURL=rooster-min.js.map \ No newline at end of file di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EAAK1B,IACH,oBAAX2oG,QAA0BA,OAAO4C,aAC1ClqG,OAAOC,eAAetB,EAAS2oG,OAAO4C,YAAa,CAAEhqG,MAAO,WAE7DF,OAAOC,eAAetB,EAAS,aAAc,CAAEuB,OAAO,GAAO,ECF9D,IAAIiqG,EAAsBN,EAAoB,M","sources":["webpack://roosterjs/./node_modules/color-convert/conversions.js","webpack://roosterjs/./node_modules/color-convert/index.js","webpack://roosterjs/./node_modules/color-convert/route.js","webpack://roosterjs/./node_modules/color-name/index.js","webpack://roosterjs/./node_modules/color-string/index.js","webpack://roosterjs/./node_modules/color/index.js","webpack://roosterjs/./node_modules/is-arrayish/index.js","webpack://roosterjs/./node_modules/simple-swizzle/index.js","webpack://roosterjs/./packages/roosterjs-color-utils/lib/index.ts","webpack://roosterjs/./packages/roosterjs-color-utils/lib/utils/getDarkColor.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/changeCapitalization.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/changeFontSize.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/clearBlockFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/clearFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/createLink.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/getFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/insertEntity.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/insertImage.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/removeLink.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/replaceWithNode.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/rotateElement.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setAlignment.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setBackgroundColor.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setDirection.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setFontName.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setFontSize.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setImageAltText.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setIndentation.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setOrderedListNumbering.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setTextColor.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleBlockQuote.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleBold.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleBullet.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleCodeBlock.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleHeader.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleItalic.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleNumbering.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleStrikethrough.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleSubscript.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleSuperscript.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleUnderline.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/applyCellShading.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/editTable.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/formatTable.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/insertTable.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/applyInlineStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/applyListItemWrap.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/blockFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/blockWrap.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/collapseSelectedBlocks.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/commitListChains.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/execCommand.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/formatUndoSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/normalizeBlockquote.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/toggleListType.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/addUndoSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/attachDomEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/coreApiMap.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/createPasteFragment.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/ensureTypeInContainer.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/focus.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getContent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getPendableFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getSelectionRange.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getSelectionRangeEx.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getStyleBasedFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/hasFocus.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/insertNode.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/restoreUndoSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/select.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/selectImage.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/selectRange.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/selectTable.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/setContent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/switchShadowEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/transformColor.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/triggerEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/utils/addUniqueId.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/CopyPastePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/DOMEventPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/EditPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/EntityPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/ImageSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/LifecyclePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/MouseUpPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/NormalizeTablePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/PendingFormatStatePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/UndoPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/createCorePlugins.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/utils/forEachSelectedCell.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/utils/inlineEntityOnPluginEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/utils/removeCellsOutsideSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/DarkColorHandlerImpl.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/Editor.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/EditorBase.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/createEditorCore.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/isFeatureEnabled.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/NodeBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/StartEndBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/getBlockElementAtNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/getFirstLastBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/createFragmentFromClipboardData.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/extractClipboardEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItems.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItemsForIE.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/getPasteType.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/handleImagePaste.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/handleTextPaste.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/retrieveMetadataFromClipboard.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/sanitizePasteContent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/BodyScoper.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/ContentTraverser.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/PositionContentSearcher.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/SelectionBlockScoper.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/SelectionScoper.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/delimiter/addDelimiters.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/delimiter/getDelimiterFromElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/edit/adjustInsertPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/edit/deleteSelectedContent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/edit/getTextContent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/commitEntity.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/entityPlaceholderUtils.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/getEntityFromElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/getEntitySelector.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/cacheGetEventData.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/clearEventDataCache.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/isCharacterValue.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/isCtrlOrMetaPressed.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/isModifierKey.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/HtmlSanitizer.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/chainSanitizerCallback.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/cloneObject.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/createDefaultHtmlSanitizerOptions.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/getAllowedValues.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/getInheritableStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/getPredefinedCssForElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/processCssVariable.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/EmptyInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/ImageInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/LinkInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/NodeInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/PartialInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/applyTextStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/getFirstLastInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementAtNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementBeforeAfter.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/jsUtils/arrayPush.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/jsUtils/getObjectKeys.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/jsUtils/toArray.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/VList.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/VListChain.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/VListItem.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/convertDecimalsToAlpha.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/convertDecimalsToRomans.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/createVListFromRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/getListTypeFromNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/getRootListNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/setBulletListMarkers.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/setListItemStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/setNumberingListMarkers.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/metadata/definitionCreators.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/metadata/metadata.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/metadata/validate.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/constants.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/documentContainWacElements.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/getPasteSource.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelDesktopDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelOnlineDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isGoogleSheetDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isPowerPointDesktopDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isWordDesktopDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/shouldConvertToSingleImage.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/collapseNodesInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/getRegionsFromRange.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/getSelectedBlockElementsInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/getSelectionRangeInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/isNodeInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/mergeBlocksInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/Position.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/addRangeToSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/createRange.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/getHtmlWithSelectionPath.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/getPositionRect.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/getSelectionPath.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/isPositionAtBeginningOf.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/setHtmlWithSelectionPath.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/addSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/canMoveCurrentSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/canUndoAutoComplete.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/clearProceedingSnapshots.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/createSnapshots.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/moveCurrentSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/getStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/removeGlobalCssStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/removeImportantStyleRule.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/setGlobalCssStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/setStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/VTable.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/applyTableFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/cloneCellStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/isWholeTableSelected.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/pasteTable.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/tableCellInfo.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/tableFormatInfo.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/Browser.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/applyFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/changeElementTag.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/collapseNodes.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/contains.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/createElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/findClosestElementAncestor.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/fromHtml.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getComputedStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getInnerHTML.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getIntersectedRect.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getLeafNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getLeafSibling.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getPendableFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getTagOfNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isNodeAfter.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isNodeEmpty.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isVoidHtmlElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/matchLink.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/matchesSelector.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/moveChildNodes.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/normalizeRect.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/parseColor.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/queryElements.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/readFile.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/safeInstanceOf.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/setColor.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/shouldSkipNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/splitParentNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/splitTextNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/unwrap.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/wrap.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/AutoFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ContentEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ContextMenu.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/CustomReplace.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/CutPasteListChain.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/HyperLink.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ImageEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ImageResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/Paste.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/Picker.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/TableCellSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/TableResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/Watermark.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/pluginUtils/DragAndDropHelper.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/AutoFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/ContentEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/autoLinkFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/codeFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/cursorFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/entityFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/listFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/markdownFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/quoteFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/shortcutFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/structuredNodeFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/tableFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/textFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/getAllFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/convertAlphaToDecimals.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoBulletListStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoNumberingListStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/ContextMenu.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/CustomReplace.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/CutPasteListChain.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/HyperLink/HyperLink.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/ImageEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/canRegenerateImage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/isResizedTo.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resetImage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resizeByPercentage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/applyChange.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/checkEditInfoState.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/editInfo.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/generateDataURL.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getGeneratedImageSize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getTargetSizeByPercentage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/tryToConvertGifToPng.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Cropper.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Resizer.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Rotator.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageResize/ImageResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/Paste.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/convertPastedContentForLI.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/convertPastedContentFromExcel.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/convertPasteContentForSingleImage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/handleLineMerge.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/ListItemBlock.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromOfficeOnline.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromWordOnline.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/convertPastedContentFromPowerPoint.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/deprecatedColorList.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/LevelLists.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordConverterArguments.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordCustomData.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/commentsRemoval.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/convertPastedContentFromWord.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/converterUtils.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/wordConverter.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Picker/PickerPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Picker/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/TableCellSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/constants.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/DeleteTableContents.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyDownEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyUpEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleMouseDownEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleScrollEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/clearState.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellAtCursor.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellCoordinates.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getTableAtCursor.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/isAfter.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/normalizeTableSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/prepareSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/restoreSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/selectTable.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/setData.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/updateSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/TableResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/CellResizer.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditor.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditorFeature.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableInserter.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableResizer.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableSelector.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Watermark/Watermark.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types-compatible/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Alignment.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/BulletListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Capitalization.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ChangeSource.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ClearFormatMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ColorTransformDirection.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ContentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ContentType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DarkModeDatasetNames.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DefinitionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DelimiterClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Direction.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DocumentCommand.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DocumentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/EntityClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/EntityOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ExperimentalFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/FontSizeChange.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/GetContentMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ImageEditOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Indentation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Keys.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/KnownCreateElementDataIndex.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/KnownPasteSourceType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/NodeType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/NumberingListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/PasteType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/PluginEventType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/PositionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/QueryScope.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/RegionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/SelectionRangeTypes.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/TableBorderFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/TableOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleTypes.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Alignment.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/BulletListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Capitalization.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ChangeSource.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ClearFormatMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ColorTransformDirection.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ContentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ContentType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DarkModeDatasetNames.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DefinitionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DelimiterClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Direction.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DocumentCommand.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DocumentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/EntityClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/EntityOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ExperimentalFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/FontSizeChange.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/GetContentMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ImageEditOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Indentation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Keys.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/KnownCreateElementDataIndex.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/KnownPasteSourceType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/NodeType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/NumberingListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/PasteType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/PluginEventType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/PositionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/QueryScope.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/RegionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/SelectionRangeTypes.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/TableBorderFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/TableOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/index.ts","webpack://roosterjs/./packages/roosterjs/lib/createEditor.ts","webpack://roosterjs/./packages/roosterjs/lib/index.ts","webpack://roosterjs/./node_modules/tslib/tslib.es6.mjs","webpack://roosterjs/webpack/bootstrap","webpack://roosterjs/webpack/runtime/define property getters","webpack://roosterjs/webpack/runtime/hasOwnProperty shorthand","webpack://roosterjs/webpack/runtime/make namespace object","webpack://roosterjs/webpack/startup"],"sourcesContent":["/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\n\nvar reverseNames = {};\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (colorNames.hasOwnProperty(name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar keyword = /(\\D+)/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\n\t\tif (!rgb) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = (parseFloat(match[1]) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = num.toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (obj == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","export { default as getDarkColor } from './utils/getDarkColor';\n","import * as Color from 'color';\n\nconst DefaultBaseLValue = 21.247; // L-value of #333333\n\n/**\n * Get dark mode color for a given color\n * @param color The color to calculate from\n * @param baseLValue The Light value for base dark color in LAB format. @default the Light value for #333333\n */\nexport default function getDarkColor(\n color: string,\n baseLValue: number = DefaultBaseLValue\n): string {\n try {\n const computedColor = Color(color || undefined);\n const colorLab = computedColor.lab().array();\n const newLValue = (100 - colorLab[0]) * ((100 - baseLValue) / 100) + baseLValue;\n color = Color.lab(newLValue, colorLab[1], colorLab[2])\n .rgb()\n .alpha(computedColor.alpha())\n .toString();\n } catch {}\n\n return color;\n}\n","import applyInlineStyle from '../utils/applyInlineStyle';\nimport { Capitalization, IEditor, NodeType } from 'roosterjs-editor-types';\nimport { getFirstLeafNode, getNextLeafSibling } from 'roosterjs-editor-dom';\nimport type { CompatibleCapitalization } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Change the capitalization of text in the selection\n * @param editor The editor instance\n * @param capitalization The case option\n * @param language Optional parameter for language string that should comply to \"IETF BCP 47 Tags for\n * Identifying Languages\". For example: 'en' or 'en-US' for English, 'tr' for Turkish.\n * Default is the host environment’s current locale.\n */\nexport default function changeCapitalization(\n editor: IEditor,\n capitalization: Capitalization | CompatibleCapitalization,\n language?: string\n) {\n applyInlineStyle(\n editor,\n element => {\n for (\n let node = getFirstLeafNode(element);\n node;\n node = getNextLeafSibling(element, node)\n ) {\n if (node.nodeType == NodeType.Text) {\n try {\n node.textContent = getCapitalizedText(node.textContent, language);\n } catch {\n node.textContent = getCapitalizedText(node.textContent, undefined);\n }\n }\n }\n },\n 'changeCapitalization'\n );\n\n function getCapitalizedText(\n originalText: string | null,\n language: string | undefined\n ): string | null {\n if (originalText === null) {\n return originalText;\n }\n switch (capitalization) {\n case Capitalization.Lowercase:\n return originalText.toLocaleLowerCase(language);\n case Capitalization.Uppercase:\n return originalText.toLocaleUpperCase(language);\n case Capitalization.CapitalizeEachWord:\n const wordArray = originalText.toLocaleLowerCase(language).split(' ');\n for (let i = 0; i < wordArray.length; i++) {\n wordArray[i] =\n wordArray[i].charAt(0).toLocaleUpperCase(language) + wordArray[i].slice(1);\n }\n return wordArray.join(' ');\n case Capitalization.Sentence:\n // TODO: Add rules on punctuation for internationalization - TASK 104769\n const punctuationMarks = '[\\\\.\\\\!\\\\?]';\n // Find a match of a word character either:\n // - At the beginning of a string with or without preceding whitespace, for\n // example: ' hello world' and 'hello world' strings would both match 'h'.\n // - Or preceded by a punctuation mark and at least one whitespace, for\n // example 'yes. hello world' would match 'y' and 'h'.\n const regex = new RegExp('^\\\\s*\\\\w|' + punctuationMarks + '\\\\s+\\\\w', 'g');\n return originalText.toLocaleLowerCase(language).replace(regex, match => {\n return match.toLocaleUpperCase(language);\n });\n default:\n return originalText;\n }\n }\n}\n","import applyInlineStyle from '../utils/applyInlineStyle';\r\nimport { FontSizeChange, IEditor } from 'roosterjs-editor-types';\r\nimport { getComputedStyle } from 'roosterjs-editor-dom';\r\nimport type { CompatibleFontSizeChange } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Default font size sequence, in pt. Suggest editor UI use this sequence as your font size list,\r\n * So that when increase/decrease font size, the font size can match the sequence of your font size picker\r\n */\r\nexport const FONT_SIZES = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];\r\nconst MIN_FONT_SIZE = 1;\r\nconst MAX_FONT_SIZE = 1000;\r\n\r\n/**\r\n * Increase or decrease font size in selection\r\n * @param editor The editor instance\r\n * @param change Whether increase or decrease font size\r\n * @param fontSizes A sorted font size array, in pt. Default value is FONT_SIZES\r\n */\r\nexport default function changeFontSize(\r\n editor: IEditor,\r\n change: FontSizeChange | CompatibleFontSizeChange,\r\n fontSizes: number[] = FONT_SIZES\r\n) {\r\n let changeBase: 1 | -1 = change == FontSizeChange.Increase ? 1 : -1;\r\n applyInlineStyle(\r\n editor,\r\n element => {\r\n let pt = parseFloat(getComputedStyle(element, 'font-size') || element.style.fontSize);\r\n element.style.fontSize = getNewFontSize(pt, changeBase, fontSizes) + 'pt';\r\n let lineHeight = getComputedStyle(element, 'line-height');\r\n if (lineHeight && lineHeight != 'normal') {\r\n element.style.lineHeight = 'normal';\r\n }\r\n },\r\n 'changeFontSize'\r\n );\r\n}\r\n\r\n/**\r\n * @internal\r\n * Get new font size after increase/decrease. This is exported for test only\r\n * @param pt Original font size, in Point\r\n * @param changeBase Changed value, 1 means increase, -1 means decrease\r\n * @param fontSizes Known font size array\r\n */\r\nexport function getNewFontSize(pt: number, changeBase: 1 | -1, fontSizes: number[]): number {\r\n pt = changeBase == 1 ? Math.floor(pt) : Math.ceil(pt);\r\n let last = fontSizes[fontSizes.length - 1];\r\n if (pt <= fontSizes[0]) {\r\n pt = Math.max(pt + changeBase, MIN_FONT_SIZE);\r\n } else if (pt > last || (pt == last && changeBase == 1)) {\r\n pt = pt / 10;\r\n pt = changeBase == 1 ? Math.floor(pt) : Math.ceil(pt);\r\n pt = Math.min(Math.max((pt + changeBase) * 10, last), MAX_FONT_SIZE);\r\n } else if (changeBase == 1) {\r\n for (let i = 0; i < fontSizes.length; i++) {\r\n if (pt < fontSizes[i]) {\r\n pt = fontSizes[i];\r\n break;\r\n }\r\n }\r\n } else {\r\n for (let i = fontSizes.length - 1; i >= 0; i--) {\r\n if (pt > fontSizes[i]) {\r\n pt = fontSizes[i];\r\n break;\r\n }\r\n }\r\n }\r\n return pt;\r\n}\r\n","import clearFormat from './clearFormat';\r\nimport { ClearFormatMode, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @deprecated Use clearFormat instead and pass the ClearFormatMode.Block as parameter\r\n * @param editor The editor instance\r\n */\r\nexport default function clearBlockFormat(editor: IEditor) {\r\n clearFormat(editor, ClearFormatMode.Block);\r\n}\r\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport blockFormat from '../utils/blockFormat';\r\nimport execCommand from '../utils/execCommand';\r\nimport formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport setBackgroundColor from './setBackgroundColor';\r\nimport setFontName from './setFontName';\r\nimport setFontSize from './setFontSize';\r\nimport setTextColor from './setTextColor';\r\nimport toggleBold from './toggleBold';\r\nimport toggleItalic from './toggleItalic';\r\nimport toggleUnderline from './toggleUnderline';\r\nimport {\r\n ChangeSource,\r\n ClearFormatMode,\r\n DocumentCommand,\r\n IEditor,\r\n QueryScope,\r\n} from 'roosterjs-editor-types';\r\nimport {\r\n collapseNodesInRegion,\r\n getObjectKeys,\r\n getSelectedBlockElementsInRegion,\r\n getStyles,\r\n getTagOfNode,\r\n isBlockElement,\r\n isNodeInRegion,\r\n isVoidHtmlElement,\r\n PartialInlineElement,\r\n NodeInlineElement,\r\n safeInstanceOf,\r\n setStyles,\r\n splitBalancedNodeRange,\r\n toArray,\r\n unwrap,\r\n wrap,\r\n} from 'roosterjs-editor-dom';\r\nimport type { CompatibleClearFormatMode } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\nconst STYLES_TO_REMOVE = ['font', 'text-decoration', 'color', 'background'];\r\nconst TAGS_TO_UNWRAP = 'B,I,U,STRONG,EM,SUB,SUP,STRIKE,FONT,CENTER,H1,H2,H3,H4,H5,H6,UL,OL,LI,SPAN,P,BLOCKQUOTE,CODE,S,PRE'.split(\r\n ','\r\n);\r\nconst ATTRIBUTES_TO_PRESERVE = ['href', 'src', 'cellpadding', 'cellspacing'];\r\nconst TAGS_TO_STOP_UNWRAP = ['TD', 'TH', 'TR', 'TABLE', 'TBODY', 'THEAD'];\r\n\r\n/**\r\n * @param editor The editor instance\r\n * @returns if the current selection is composed of two or more block elements\r\n */\r\nfunction isMultiBlockSelection(editor: IEditor): boolean {\r\n let transverser = editor.getSelectionTraverser();\r\n let blockElement = transverser?.currentBlockElement;\r\n if (!blockElement) {\r\n return false;\r\n }\r\n\r\n let nextBlockElement = transverser?.getNextBlockElement();\r\n\r\n //At least two blocks are selected\r\n return !!nextBlockElement;\r\n}\r\n\r\nfunction clearNodeFormat(node: Node): boolean {\r\n // 1. Recursively clear format of all its child nodes\r\n const areBlockElements = toArray(node.childNodes).map(clearNodeFormat);\r\n let areAllChildrenBlock = areBlockElements.every(b => b);\r\n let returnBlockElement = isBlockElement(node);\r\n\r\n // 2. Unwrap the tag if necessary\r\n const tag = getTagOfNode(node);\r\n if (tag) {\r\n if (\r\n TAGS_TO_UNWRAP.indexOf(tag) >= 0 ||\r\n (areAllChildrenBlock &&\r\n !isVoidHtmlElement(node) &&\r\n TAGS_TO_STOP_UNWRAP.indexOf(tag) < 0)\r\n ) {\r\n if (returnBlockElement && !areAllChildrenBlock) {\r\n wrap(node);\r\n }\r\n unwrap(node);\r\n } else {\r\n // 3. Otherwise, remove all attributes\r\n clearAttribute(node as HTMLElement);\r\n }\r\n }\r\n\r\n return returnBlockElement;\r\n}\r\n\r\nfunction clearAttribute(element: HTMLElement) {\r\n const isTableCell = safeInstanceOf(element, 'HTMLTableCellElement');\r\n const isTable = safeInstanceOf(element, 'HTMLTableElement');\r\n\r\n for (let attr of toArray(element.attributes)) {\r\n if (isTableCell && attr.name == 'style') {\r\n removeNonBorderStyles(element);\r\n } else if (isTable && attr.name == 'style') {\r\n removeNotTableDefaultStyles(element);\r\n } else if (\r\n ATTRIBUTES_TO_PRESERVE.indexOf(attr.name.toLowerCase()) < 0 &&\r\n attr.name.indexOf('data-') != 0\r\n ) {\r\n element.removeAttribute(attr.name);\r\n }\r\n }\r\n}\r\n\r\nfunction updateStyles(\r\n element: HTMLElement,\r\n callbackfn: (\r\n value: string,\r\n styles: Record,\r\n result: Record\r\n ) => void\r\n) {\r\n const styles = getStyles(element);\r\n const result: Record = {};\r\n\r\n getObjectKeys(styles).forEach(style => callbackfn(style, styles, result));\r\n\r\n setStyles(element, styles);\r\n\r\n return result;\r\n}\r\n\r\nfunction removeNonBorderStyles(element: HTMLElement): Record {\r\n return updateStyles(element, (name, styles, result) => {\r\n if (name.indexOf('border') < 0) {\r\n result[name] = styles[name];\r\n delete styles[name];\r\n }\r\n });\r\n}\r\n\r\nfunction removeNotTableDefaultStyles(element: HTMLTableElement) {\r\n return updateStyles(element, (name, styles, result) => {\r\n if (name != 'border-collapse') {\r\n result[name] = styles[name];\r\n delete styles[name];\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Verifies recursively if a node and its parents have any siblings with text content\r\n * Ignoring the children of contentDiv and returning true if any node is LI\r\n * @returns `true` if this node, and its parents (minus the children of the contentDiv) have no siblings with text content\r\n */\r\nfunction isNodeWholeBlock(node: Node, editor: IEditor) {\r\n let currentNode: ParentNode | Node | null = node;\r\n while (currentNode && editor.contains(currentNode.parentNode)) {\r\n if (currentNode.nextSibling || currentNode.previousSibling) {\r\n if (safeInstanceOf(currentNode, 'HTMLLIElement')) {\r\n return true;\r\n }\r\n let isOnlySiblingWithContent = true;\r\n currentNode.parentNode?.childNodes.forEach(node => {\r\n if (node != currentNode && node.textContent?.length) {\r\n isOnlySiblingWithContent = false;\r\n }\r\n });\r\n return isOnlySiblingWithContent;\r\n }\r\n currentNode = currentNode.parentNode;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Clear the format of the selected text or list of blocks\r\n * If the current selection is compose of multiple block elements then remove the text and struture format for all the selected blocks\r\n * If the current selection is compose of a partial inline element then only the text format is removed from the current selection\r\n * @param editor The editor instance\r\n */\r\nfunction clearAutoDetectFormat(editor: IEditor) {\r\n const isMultiBlock = isMultiBlockSelection(editor);\r\n if (!isMultiBlock) {\r\n const transverser = editor.getSelectionTraverser();\r\n const inlineElement = transverser?.currentInlineElement;\r\n const isPartial =\r\n inlineElement instanceof PartialInlineElement ||\r\n (inlineElement instanceof NodeInlineElement &&\r\n !isNodeWholeBlock(inlineElement.getContainerNode(), editor));\r\n if (isPartial) {\r\n clearFormat(editor);\r\n return;\r\n }\r\n }\r\n clearBlockFormat(editor);\r\n}\r\n\r\n/**\r\n * Clear all formats of selected blocks.\r\n * When selection is collapsed, only clear format of current block.\r\n * @param editor The editor instance\r\n */\r\nfunction clearBlockFormat(editor: IEditor) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n blockFormat(editor, region => {\r\n const blocks = getSelectedBlockElementsInRegion(region);\r\n let nodes = collapseNodesInRegion(region, blocks);\r\n\r\n if (editor.contains(region.rootNode)) {\r\n // If there are styles on table cell, wrap all its children and move down all non-border styles.\r\n // So that we can preserve styles for unselected blocks as well as border styles for table\r\n const nonborderStyles = removeNonBorderStyles(region.rootNode);\r\n if (getObjectKeys(nonborderStyles).length > 0) {\r\n const wrapper = wrap(toArray(region.rootNode.childNodes));\r\n setStyles(wrapper, nonborderStyles);\r\n }\r\n }\r\n\r\n while (\r\n nodes.length > 0 &&\r\n nodes[0].parentNode &&\r\n isNodeInRegion(region, nodes[0].parentNode)\r\n ) {\r\n const balancedNodes = splitBalancedNodeRange(nodes);\r\n nodes = balancedNodes ? [balancedNodes] : [];\r\n }\r\n\r\n nodes.forEach(clearNodeFormat);\r\n });\r\n setDefaultFormat(editor);\r\n },\r\n 'clearBlockFormat'\r\n );\r\n}\r\n\r\nfunction clearInlineFormat(editor: IEditor) {\r\n editor.focus();\r\n editor.addUndoSnapshot(() => {\r\n execCommand(editor, DocumentCommand.RemoveFormat);\r\n editor.queryElements('[class]', QueryScope.OnSelection, node =>\r\n node.removeAttribute('class')\r\n );\r\n\r\n setDefaultFormat(editor);\r\n\r\n return 'clearInlineFormat';\r\n }, ChangeSource.Format);\r\n}\r\n\r\nfunction setDefaultFontWeight(editor: IEditor, fontWeight: string = '400') {\r\n applyListItemStyleWrap(\r\n editor,\r\n 'font-weight',\r\n element => (element.style.fontWeight = fontWeight),\r\n 'setDefaultFontWeight'\r\n );\r\n}\r\n\r\nfunction setDefaultFormat(editor: IEditor) {\r\n const defaultFormat = editor.getDefaultFormat();\r\n const isDefaultFormatEmpty = getObjectKeys(defaultFormat).length === 0;\r\n editor.queryElements('[style]', QueryScope.InSelection, node => {\r\n const tag = getTagOfNode(node);\r\n if (TAGS_TO_STOP_UNWRAP.indexOf(tag) == -1) {\r\n removeStyles(tag, node, isDefaultFormatEmpty);\r\n } else {\r\n node.childNodes.forEach(node => {\r\n node.childNodes.forEach(cNode => {\r\n const tag = getTagOfNode(cNode);\r\n if (safeInstanceOf(cNode, 'HTMLElement')) {\r\n removeStyles(tag, cNode, isDefaultFormatEmpty);\r\n }\r\n });\r\n });\r\n }\r\n });\r\n\r\n if (!isDefaultFormatEmpty) {\r\n if (defaultFormat.fontFamily) {\r\n setFontName(editor, defaultFormat.fontFamily);\r\n }\r\n if (defaultFormat.fontSize) {\r\n setFontSize(editor, defaultFormat.fontSize);\r\n }\r\n if (defaultFormat.textColor) {\r\n const setColorIgnoredElements = editor.queryElements(\r\n 'a *, a',\r\n QueryScope.OnSelection\r\n );\r\n\r\n let shouldApplyInlineStyle =\r\n setColorIgnoredElements.length > 0\r\n ? (element: HTMLElement) => setColorIgnoredElements.indexOf(element) == -1\r\n : undefined;\r\n\r\n if (defaultFormat.textColors) {\r\n setTextColor(editor, defaultFormat.textColors, shouldApplyInlineStyle);\r\n } else {\r\n setTextColor(editor, defaultFormat.textColor, shouldApplyInlineStyle);\r\n }\r\n }\r\n if (defaultFormat.backgroundColor) {\r\n if (defaultFormat.backgroundColors) {\r\n setBackgroundColor(editor, defaultFormat.backgroundColors);\r\n } else {\r\n setBackgroundColor(editor, defaultFormat.backgroundColor);\r\n }\r\n }\r\n if (defaultFormat.bold) {\r\n toggleBold(editor);\r\n } else {\r\n setDefaultFontWeight(editor);\r\n }\r\n if (defaultFormat.italic) {\r\n toggleItalic(editor);\r\n }\r\n if (defaultFormat.underline) {\r\n toggleUnderline(editor);\r\n }\r\n }\r\n}\r\n\r\nfunction removeStyles(tag: string, node: HTMLElement, isDefaultFormatEmpty: boolean) {\r\n if (TAGS_TO_STOP_UNWRAP.indexOf(tag) == -1) {\r\n STYLES_TO_REMOVE.forEach(style => node.style.removeProperty(style));\r\n\r\n // when default format is empty, keep the HTML minimum by removing style attribute if there's no style\r\n // (note: because default format is empty, we're not adding style back in)\r\n if (isDefaultFormatEmpty && node.getAttribute('style') === '') {\r\n node.removeAttribute('style');\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Clear the format in current selection, after cleaning, the format will be\r\n * changed to default format. The format that get cleaned include B/I/U/font name/\r\n * font size/text color/background color/align left/align right/align center/superscript/subscript\r\n * @param editor The editor instance\r\n * @param formatType type of format to apply\r\n */\r\nexport default function clearFormat(\r\n editor: IEditor,\r\n formatType: ClearFormatMode | CompatibleClearFormatMode = ClearFormatMode.Inline\r\n) {\r\n switch (formatType) {\r\n case ClearFormatMode.Inline:\r\n clearInlineFormat(editor);\r\n break;\r\n case ClearFormatMode.Block:\r\n clearBlockFormat(editor);\r\n break;\r\n default:\r\n clearAutoDetectFormat(editor);\r\n }\r\n}\r\n","import { HtmlSanitizer, matchLink, wrap } from 'roosterjs-editor-dom';\r\nimport {\r\n ChangeSource,\r\n DocumentCommand,\r\n IEditor,\r\n QueryScope,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\n\r\n// Regex matching Uri scheme\r\nconst URI_REGEX = /^[a-zA-Z]+:/i;\r\n// Regex matching begin of email address\r\nconst MAILTO_REGEX = /^[\\w.%+-]+@/i;\r\n// Regex matching begin of ftp, i.e. ftp.microsoft.com\r\nconst FTP_REGEX = /^ftp\\./i;\r\n\r\nfunction applyLinkPrefix(url: string): string {\r\n if (!url) {\r\n return url;\r\n }\r\n\r\n // Add link prefix per rule:\r\n // (a) if the url always starts with a URI scheme, leave it as it is\r\n // (b) if the url is an email address, xxx@... add mailto: prefix\r\n // (c) if the url starts with ftp., add ftp:// prefix\r\n // (d) rest, add http:// prefix\r\n let prefix = '';\r\n if (url.search(URI_REGEX) < 0) {\r\n if (url.search(MAILTO_REGEX) == 0) {\r\n prefix = 'mailto:';\r\n } else if (url.search(FTP_REGEX) == 0) {\r\n prefix = 'ftp://';\r\n } else {\r\n // fallback to http://\r\n prefix = 'http://';\r\n }\r\n }\r\n\r\n return prefix + url;\r\n}\r\n\r\n/**\r\n * Insert a hyperlink at cursor.\r\n * When there is a selection, hyperlink will be applied to the selection,\r\n * otherwise a hyperlink will be inserted to the cursor position.\r\n * @param editor Editor object\r\n * @param link Link address, can be http(s), mailto, notes, file, unc, ftp, news, telnet, gopher, wais.\r\n * When protocol is not specified, a best matched protocol will be predicted.\r\n * @param altText Optional alt text of the link, will be shown when hover on the link\r\n * @param displayText Optional display text for the link.\r\n * @param target Optional display target for the link (\"_blank\"|\"_self\"|\"_parent\"|\"_top\"|\"{framename}\")\r\n * If specified, the display text of link will be replaced with this text.\r\n * If not specified and there wasn't a link, the link url will be used as display text.\r\n */\r\nexport default function createLink(\r\n editor: IEditor,\r\n link: string,\r\n altText?: string,\r\n displayText?: string,\r\n target?: string\r\n) {\r\n editor.focus();\r\n let url = (checkXss(link) || '').trim();\r\n if (url) {\r\n let linkData = matchLink(url);\r\n // matchLink can match most links, but not all, i.e. if you pass link a link as \"abc\", it won't match\r\n // we know in that case, users will want to insert a link like http://abc\r\n // so we have separate logic in applyLinkPrefix to add link prefix depending on the format of the link\r\n // i.e. if the link starts with something like abc@xxx, we will add mailto: prefix\r\n // if the link starts with ftp.xxx, we will add ftp:// link. For more, see applyLinkPrefix\r\n let normalizedUrl = linkData ? linkData.normalizedUrl : applyLinkPrefix(url);\r\n let originalUrl = linkData ? linkData.originalUrl : url;\r\n\r\n editor.addUndoSnapshot(() => {\r\n const selection = editor.getSelectionRangeEx();\r\n let anchor: HTMLAnchorElement | null = null;\r\n if (selection.type === SelectionRangeTypes.Normal) {\r\n const range = selection.ranges[0];\r\n if (range && range.collapsed) {\r\n anchor = getAnchorNodeAtCursor(editor);\r\n\r\n // If there is already a link, just change its href\r\n if (anchor) {\r\n anchor.href = normalizedUrl;\r\n // Change text content if it is specified\r\n updateAnchorDisplayText(anchor, displayText);\r\n } else {\r\n anchor = editor.getDocument().createElement('A') as HTMLAnchorElement;\r\n anchor.textContent = displayText || originalUrl;\r\n anchor.href = normalizedUrl;\r\n editor.insertNode(anchor);\r\n }\r\n } else {\r\n // the selection is not collapsed, use browser execCommand\r\n editor\r\n .getDocument()\r\n .execCommand(DocumentCommand.CreateLink, false, normalizedUrl);\r\n const traverser = editor.getSelectionTraverser();\r\n\r\n let currentInline = traverser?.getNextInlineElement();\r\n\r\n // list for removing unwanted lines\r\n let deletionInlineList: Node[] = [];\r\n\r\n while (currentInline) {\r\n deletionInlineList.push(currentInline.getContainerNode());\r\n currentInline = traverser?.getNextInlineElement();\r\n }\r\n\r\n deletionInlineList.forEach(node => editor.deleteNode(node));\r\n\r\n anchor = getAnchorNodeAtCursor(editor);\r\n updateAnchorDisplayText(anchor, displayText);\r\n }\r\n } else if (selection.type === SelectionRangeTypes.ImageSelection) {\r\n anchor = wrap(selection.image, 'A') as HTMLAnchorElement;\r\n anchor.href = normalizedUrl;\r\n }\r\n\r\n if (altText && anchor) {\r\n anchor.title = altText;\r\n }\r\n if (anchor) {\r\n updateAnchorTarget(anchor, target);\r\n }\r\n return anchor;\r\n }, ChangeSource.CreateLink);\r\n }\r\n}\r\n\r\nfunction getAnchorNodeAtCursor(editor: IEditor): HTMLAnchorElement {\r\n return editor.queryElements('a[href]', QueryScope.OnSelection)[0] as HTMLAnchorElement;\r\n}\r\n\r\nfunction updateAnchorDisplayText(anchor: HTMLAnchorElement, displayText?: string) {\r\n if (displayText && anchor.textContent != displayText) {\r\n anchor.textContent = displayText;\r\n }\r\n}\r\n\r\nfunction updateAnchorTarget(anchor: HTMLAnchorElement, target?: string) {\r\n if (target) {\r\n anchor.target = target;\r\n } else if (!target && anchor.getAttribute('target')) {\r\n anchor.removeAttribute('target');\r\n }\r\n}\r\n\r\nfunction checkXss(link: string): string | null {\r\n const sanitizer = new HtmlSanitizer();\r\n const a = document.createElement('a');\r\n\r\n a.href = link || '';\r\n sanitizer.sanitize(a);\r\n // We use getAttribute because some browsers will try to make the href property a valid link.\r\n // This has unintended side effects when the link lacks a protocol.\r\n return a.getAttribute('href');\r\n}\r\n","import { getTableFormatInfo, getTagOfNode, toArray } from 'roosterjs-editor-dom';\r\nimport {\r\n ElementBasedFormatState,\r\n FormatState,\r\n IEditor,\r\n PluginEvent,\r\n QueryScope,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get element based Format State at cursor\r\n * @param editor The editor instance\r\n * @param event (Optional) The plugin event, it stores the event cached data for looking up.\r\n * In this function the event cache is used to get list state and header level. If not passed,\r\n * it will query the node within selection to get the info\r\n * @returns An ElementBasedFormatState object\r\n */\r\nexport function getElementBasedFormatState(\r\n editor: IEditor,\r\n event?: PluginEvent\r\n): ElementBasedFormatState {\r\n const listTag = getTagOfNode(\r\n editor.getElementAtCursor('OL,UL', undefined /*startFrom*/, event)\r\n );\r\n\r\n // Check if selection is multiline, spans more than one block\r\n const range = editor.getSelectionRange();\r\n let multiline = false;\r\n\r\n if (range && !range.collapsed) {\r\n let startingBlock = editor.getBlockElementAtNode(range.startContainer);\r\n let endingBlock = editor.getBlockElementAtNode(range.endContainer);\r\n multiline = endingBlock && startingBlock ? !endingBlock.equals(startingBlock) : false;\r\n }\r\n\r\n const headerTag = getTagOfNode(\r\n editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)\r\n );\r\n\r\n const table = editor.queryElements('table', QueryScope.OnSelection)[0];\r\n const tableFormat = table ? getTableFormatInfo(table) : undefined;\r\n const hasHeader = table?.rows[0]\r\n ? toArray(table.rows[0].cells).every(cell => getTagOfNode(cell) == 'TH')\r\n : undefined;\r\n\r\n return {\r\n isBullet: listTag == 'UL',\r\n isNumbering: listTag == 'OL',\r\n isMultilineSelection: multiline,\r\n headerLevel: (headerTag && parseInt(headerTag[1])) || 0,\r\n canUnlink: !!editor.queryElements('a[href]', QueryScope.OnSelection)[0],\r\n canAddImageAltText: !!editor.queryElements('img', QueryScope.OnSelection)[0],\r\n isBlockQuote: !!editor.queryElements('blockquote', QueryScope.OnSelection)[0],\r\n isCodeInline: !!editor.queryElements('code', QueryScope.OnSelection)[0],\r\n isCodeBlock: !!editor.queryElements('pre>code', QueryScope.OnSelection)[0],\r\n isInTable: !!table,\r\n tableFormat: tableFormat || {},\r\n tableHasHeader: hasHeader,\r\n canMergeTableCell: canMergeTableCell(editor),\r\n };\r\n}\r\n\r\n/**\r\n * Get format state at cursor\r\n * A format state is a collection of all format related states, e.g.,\r\n * bold, italic, underline, font name, font size, etc.\r\n * @param editor The editor instance\r\n * @param event (Optional) The plugin event, it stores the event cached data for looking up.\r\n * In this function the event cache is used to get list state and header level. If not passed,\r\n * it will query the node within selection to get the info\r\n * @returns The format state at cursor\r\n */\r\nexport default function getFormatState(editor: IEditor, event?: PluginEvent): FormatState {\r\n return {\r\n ...editor.getPendableFormatState(false /* forceGetStateFromDom */),\r\n ...getElementBasedFormatState(editor, event),\r\n ...editor.getStyleBasedFormatState(),\r\n ...editor.getUndoState(),\r\n isDarkMode: editor.isDarkMode(),\r\n zoomScale: editor.getZoomScale(),\r\n };\r\n}\r\n\r\n/**\r\n * Checks whether the editor selection range is starting and ending at a table element.\r\n * @param editor Editor Instance\r\n * @returns\r\n */\r\n\r\nconst canMergeTableCell = (editor: IEditor): boolean => {\r\n const selection = editor.getSelectionRangeEx();\r\n const isATable = selection && selection.type === SelectionRangeTypes.TableSelection;\r\n if (isATable && selection.coordinates) {\r\n const { firstCell, lastCell } = selection.coordinates;\r\n if (firstCell.x !== lastCell.x || firstCell.y !== lastCell.y) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n return false;\r\n};\r\n","import commitListChains from '../utils/commitListChains';\nimport {\n addDelimiters,\n applyFormat,\n commitEntity,\n createElement,\n getEntityFromElement,\n getEntitySelector,\n Position,\n VListChain,\n wrap,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ContentPosition,\n Entity,\n ExperimentalFeatures,\n IEditor,\n KnownCreateElementDataIndex,\n NodePosition,\n PositionType,\n} from 'roosterjs-editor-types';\nimport type { CompatibleContentPosition } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Insert an entity into editor.\n * @param editor The editor to insert entity into.\n * @param type Type of the entity\n * @param contentNode Root element of the entity\n * @param isBlock Whether the entity will be shown as a block\n * @param isReadonly Whether the entity will be a readonly entity\n * @param position @optional The position to insert into. If not specified, current position will be used.\n * If isBlock is true, entity will be insert below this position\n * @param insertToRegionRoot @optional When pass true, insert the entity at the root level of current region.\n * Parent nodes will be split if need\n * @param focusAfterEntity @optional When pass true, focus will be moved next to the entity. For inline entity,\n * focus will be after right after the entity (and the delimiter if exist). For block entity, focus will be in\n * the new empty line below the entity\n */\nexport default function insertEntity(\n editor: IEditor,\n type: string,\n contentNode: Node,\n isBlock: boolean,\n isReadonly: boolean,\n position?:\n | NodePosition\n | ContentPosition.Begin\n | ContentPosition.End\n | ContentPosition.DomEnd\n | CompatibleContentPosition.Begin\n | CompatibleContentPosition.End\n | CompatibleContentPosition.DomEnd,\n insertToRegionRoot?: boolean,\n focusAfterEntity?: boolean\n): Entity {\n const wrapper = wrap(contentNode, isBlock ? 'div' : 'span');\n\n // For inline & readonly entity, we need to set display to \"inline-block\" otherwise\n // there will be some weird behavior when move cursor around the entity node.\n // And we should only do this for readonly entity since \"inline-block\" has some side effect\n // in IE that there will be a resize border around the inline-block element. We made some\n // workaround for readonly entity for this issue but for editable entity, keep it as \"inline\"\n // will just work fine.\n if (!isBlock && isReadonly) {\n wrapper.style.display = 'inline-block';\n }\n\n commitEntity(wrapper, type, isReadonly);\n\n if (!editor.contains(wrapper)) {\n let currentRange: Range | null = null;\n let contentPosition:\n | ContentPosition.Begin\n | ContentPosition.End\n | ContentPosition.DomEnd\n | ContentPosition.SelectionStart\n | CompatibleContentPosition.Begin\n | CompatibleContentPosition.End\n | CompatibleContentPosition.DomEnd\n | CompatibleContentPosition.SelectionStart;\n\n if (typeof position == 'number') {\n contentPosition = position;\n } else if (position) {\n currentRange = editor.getSelectionRange();\n const node = position.normalize().node;\n const existingEntity = node && editor.getElementAtCursor(getEntitySelector(), node);\n\n // Do not insert entity into another entity\n if (existingEntity) {\n position = new Position(existingEntity, PositionType.After);\n }\n\n editor.select(position);\n contentPosition = ContentPosition.SelectionStart;\n } else {\n editor.focus();\n contentPosition = ContentPosition.SelectionStart;\n }\n\n const regions = insertToRegionRoot && editor.getSelectedRegions();\n const chains = regions && VListChain.createListChains(regions);\n\n editor.insertNode(wrapper, {\n updateCursor: false,\n insertOnNewLine: isBlock,\n replaceSelection: true,\n position: contentPosition,\n insertToRegionRoot: insertToRegionRoot,\n });\n\n if (chains) {\n commitListChains(editor, chains);\n }\n\n if (contentPosition == ContentPosition.SelectionStart) {\n if (currentRange) {\n editor.select(currentRange);\n } else if (!isBlock) {\n editor.select(wrapper, PositionType.After);\n }\n }\n }\n\n const entity = getEntityFromElement(wrapper)!;\n\n if (isBlock) {\n // Insert an extra empty line for block entity to make sure\n // user can still put cursor below the entity.\n const newLine = createElement(KnownCreateElementDataIndex.EmptyLine, editor.getDocument());\n\n wrapper.parentNode?.insertBefore(newLine!, wrapper.nextSibling);\n\n if (newLine) {\n applyFormat(\n newLine as HTMLElement,\n editor.getDefaultFormat(),\n editor.isDarkMode(),\n editor.getDarkColorHandler()\n );\n }\n\n if (focusAfterEntity) {\n const br = newLine?.querySelector('br');\n const pos = br && new Position(br, PositionType.Before);\n\n if (pos) {\n editor.select(pos);\n }\n }\n } else if (\n isReadonly &&\n editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n addDelimiters(entity.wrapper);\n if (entity.wrapper.nextElementSibling) {\n editor.select(new Position(entity.wrapper.nextElementSibling, PositionType.After));\n }\n }\n\n editor.triggerContentChangedEvent(ChangeSource.InsertEntity, entity);\n\n return entity;\n}\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { getObjectKeys, readFile } from 'roosterjs-editor-dom';\r\nimport { IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Insert an image to editor at current selection\r\n * @param editor The editor instance\r\n * @param imageFileOrSrc Either the image file blob or source string of the image.\r\n * @param attributes Optional image element attributes\r\n */\r\nexport default function insertImage(\r\n editor: IEditor,\r\n imageFileOrSrc: File | string,\r\n attributes?: Record\r\n): void {\r\n if (typeof imageFileOrSrc == 'string') {\r\n insertImageWithSrc(editor, imageFileOrSrc, attributes);\r\n } else {\r\n readFile(imageFileOrSrc, dataUrl => {\r\n if (dataUrl && !editor.isDisposed()) {\r\n insertImageWithSrc(editor, dataUrl, attributes);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction insertImageWithSrc(editor: IEditor, src: string, attributes?: Record) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n const image = editor.getDocument().createElement('img');\r\n image.src = src;\r\n\r\n if (attributes) {\r\n getObjectKeys(attributes).forEach(attribute =>\r\n image.setAttribute(attribute, attributes[attribute])\r\n );\r\n }\r\n editor.insertNode(image);\r\n },\r\n 'insertImage'\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { unwrap } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Remove link at selection. If no links at selection, do nothing.\r\n * If selection contains multiple links, all of the link styles will be removed.\r\n * If only part of a link is selected, the whole link style will be removed.\r\n * @param editor The editor instance\r\n */\r\nexport default function removeLink(editor: IEditor) {\r\n editor.focus();\r\n formatUndoSnapshot(\r\n editor,\r\n (start, end) => {\r\n editor.queryElements('a[href]', QueryScope.OnSelection, unwrap);\r\n if (start && end) {\r\n editor.select(start, end);\r\n }\r\n },\r\n 'removeLink'\r\n );\r\n}\r\n","import { ContentPosition, IEditor, IPositionContentSearcher } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Replace text before current selection with a node, current selection will be kept if possible\r\n * @param editor The editor instance\r\n * @param text The text for matching. We will try to match the text with the text before cursor\r\n * @param node The node to replace the text with\r\n * @param exactMatch True if the text must appear exactly before selection,\r\n * otherwise there can be some text between the target text and selection\r\n * @param searcher Optional PositionContentSearcher of current selection to help search text\r\n */\r\nexport default function replaceWithNode(\r\n editor: IEditor,\r\n text: string,\r\n node: Node,\r\n exactMatch: boolean,\r\n searcher?: IPositionContentSearcher\r\n): boolean;\r\n\r\n/**\r\n * Replace a given range with a node, current selection will be kept if possible\r\n * @param editor The editor instance\r\n * @param range The range to replace from\r\n * @param node The node to replace the text with\r\n * @param exactMatch True if the text must appear exactly before selection,\r\n * otherwise there can be some text between the target text and selection\r\n */\r\nexport default function replaceWithNode(\r\n editor: IEditor,\r\n range: Range,\r\n node: Node,\r\n exactMatch: boolean\r\n): boolean;\r\n\r\nexport default function replaceWithNode(\r\n editor: IEditor,\r\n textOrRange: string | Range,\r\n node: Node,\r\n exactMatch: boolean,\r\n searcher?: IPositionContentSearcher\r\n): boolean {\r\n // Make sure the text and node is valid\r\n if (!textOrRange || !node) {\r\n return false;\r\n }\r\n\r\n let range: Range | null;\r\n\r\n if (typeof textOrRange == 'string') {\r\n searcher = (searcher || editor.getContentSearcherOfCursor()) ?? undefined;\r\n range = searcher?.getRangeFromText(textOrRange, exactMatch) ?? null;\r\n } else {\r\n range = textOrRange;\r\n }\r\n\r\n if (range) {\r\n const backupRange = editor.getSelectionRange();\r\n\r\n // If the range to replace is right before current cursor, it is actually an exact match\r\n if (\r\n backupRange?.collapsed &&\r\n range.endContainer == backupRange.startContainer &&\r\n range.endOffset == backupRange.startOffset\r\n ) {\r\n exactMatch = true;\r\n }\r\n\r\n editor.insertNode(node, {\r\n position: ContentPosition.Range,\r\n updateCursor: exactMatch,\r\n replaceSelection: true,\r\n insertOnNewLine: false,\r\n range: range,\r\n });\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\nimport { IEditor } from 'roosterjs-editor-types';\n\n/**\n * Rotate an element visually\n * @param editor The editor instance\n * @param element The element that should be rotated\n * @param angle The degree at which to rotate the element from it's center\n */\nexport default function rotateElement(editor: IEditor, element: HTMLElement, angle: number): void {\n if (element) {\n formatUndoSnapshot(\n editor,\n () => {\n element.style.transform = `rotate(${angle}deg)`;\n },\n 'rotateElement'\n );\n }\n}\n","import blockFormat from '../utils/blockFormat';\r\nimport execCommand from '../utils/execCommand';\r\nimport formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport normalizeBlockquote from '../utils/normalizeBlockquote';\r\nimport {\r\n createVListFromRegion,\r\n findClosestElementAncestor,\r\n getSelectedBlockElementsInRegion,\r\n isWholeTableSelected,\r\n VTable,\r\n} from 'roosterjs-editor-dom';\r\nimport {\r\n Alignment,\r\n DocumentCommand,\r\n IEditor,\r\n QueryScope,\r\n SelectionRangeTypes,\r\n TableSelectionRange,\r\n} from 'roosterjs-editor-types';\r\nimport type { CompatibleAlignment } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Set content alignment\r\n * @param editor The editor instance\r\n * @param alignment The alignment option:\r\n * Alignment.Center, Alignment.Left, Alignment.Right\r\n */\r\nexport default function setAlignment(editor: IEditor, alignment: Alignment | CompatibleAlignment) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n const selection = editor.getSelectionRangeEx();\r\n const isATable = selection && selection.type === SelectionRangeTypes.TableSelection;\r\n const elementAtCursor = editor.getElementAtCursor();\r\n\r\n if (\r\n isATable &&\r\n selection.coordinates &&\r\n isWholeTableSelected(new VTable(selection.table), selection.coordinates)\r\n ) {\r\n alignTable(selection, alignment);\r\n } else if (elementAtCursor && isList(elementAtCursor)) {\r\n alignList(editor, alignment);\r\n } else {\r\n alignText(editor, alignment);\r\n }\r\n },\r\n 'setAlignment'\r\n );\r\n}\r\n\r\n/**\r\n * Align text using the margins\r\n * @param editor\r\n * @param element\r\n * @param alignment\r\n * @param addUndoSnapshot\r\n * @returns\r\n */\r\nfunction alignTable(selection: TableSelectionRange, alignment: Alignment | CompatibleAlignment) {\r\n const table = selection.table;\r\n if (alignment == Alignment.Center) {\r\n table.style.marginLeft = 'auto';\r\n table.style.marginRight = 'auto';\r\n } else if (alignment == Alignment.Right) {\r\n table.style.marginLeft = 'auto';\r\n table.style.marginRight = '';\r\n } else {\r\n table.style.marginLeft = '';\r\n table.style.marginRight = 'auto';\r\n }\r\n}\r\n\r\n/**\r\n * Align text using the text-align\r\n * @param editor\r\n * @param alignment\r\n * @returns\r\n */\r\nfunction alignText(editor: IEditor, alignment: Alignment | CompatibleAlignment) {\r\n let align = 'left';\r\n let command = DocumentCommand.JustifyLeft;\r\n if (alignment == Alignment.Center) {\r\n command = DocumentCommand.JustifyCenter;\r\n align = 'center';\r\n } else if (alignment == Alignment.Right) {\r\n command = DocumentCommand.JustifyRight;\r\n align = 'right';\r\n }\r\n execCommand(editor, command);\r\n const elements = editor.queryElements('[align]', QueryScope.OnSelection, node => {\r\n node.style.textAlign = align;\r\n normalizeBlockquote(node);\r\n });\r\n\r\n if (elements.length == 0) {\r\n const node = editor.getElementAtCursor();\r\n if (node) {\r\n normalizeBlockquote(node);\r\n }\r\n }\r\n}\r\n\r\nfunction isList(element: HTMLElement) {\r\n return findClosestElementAncestor(element, undefined /** root */, 'LI');\r\n}\r\n\r\nfunction alignList(editor: IEditor, alignment: Alignment | CompatibleAlignment) {\r\n blockFormat(\r\n editor,\r\n (region, start, end) => {\r\n const blocks = getSelectedBlockElementsInRegion(region);\r\n const startNode = blocks[0].getStartNode();\r\n const vList = createVListFromRegion(region, true /*includeSiblingLists*/, startNode);\r\n if (start && end) {\r\n vList?.setAlignment(start, end, alignment);\r\n }\r\n },\r\n undefined /* beforeRunCallback */,\r\n 'alignList'\r\n );\r\n}\r\n","import applyInlineStyle from '../utils/applyInlineStyle';\r\nimport { IEditor, ModeIndependentColor } from 'roosterjs-editor-types';\r\nimport { setColor } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Set background color at current selection\r\n * @param editor The editor instance\r\n * @param color One of two options:\r\n * The color string, can be any of the predefined color names (e.g, 'red')\r\n * or hexadecimal color string (e.g, '#FF0000') or rgb value (e.g, 'rgb(255, 0, 0)') supported by browser.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take effect\r\n * Alternatively, you can pass a @typedef ModeIndependentColor. If in light mode, the lightModeColor property will be used.\r\n * If in dark mode, the darkModeColor will be used and the lightModeColor will be used when converting back to light mode.\r\n **/\r\nexport default function setBackgroundColor(editor: IEditor, color: string | ModeIndependentColor) {\r\n applyInlineStyle(\r\n editor,\r\n (element, isInnerNode) => {\r\n setColor(\r\n element,\r\n isInnerNode ? '' : color,\r\n true /*isBackground*/,\r\n editor.isDarkMode(),\r\n false /*shouldAdaptFontColor*/,\r\n editor.getDarkColorHandler()\r\n );\r\n },\r\n 'setBackgroundColor'\r\n );\r\n}\r\n","import collapseSelectedBlocks from '../utils/collapseSelectedBlocks';\r\nimport formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { Direction, IEditor } from 'roosterjs-editor-types';\r\nimport type { CompatibleDirection } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Change direction for the blocks/paragraph at selection\r\n * @param editor The editor instance\r\n * @param direction The direction option:\r\n * Direction.LeftToRight refers to 'ltr', Direction.RightToLeft refers to 'rtl'\r\n */\r\nexport default function setDirection(editor: IEditor, direction: Direction | CompatibleDirection) {\r\n editor.focus();\r\n\r\n formatUndoSnapshot(\r\n editor,\r\n (start, end) => {\r\n collapseSelectedBlocks(editor, element => {\r\n element.setAttribute('dir', direction == Direction.LeftToRight ? 'ltr' : 'rtl');\r\n element.style.textAlign = direction == Direction.LeftToRight ? 'left' : 'right';\r\n });\r\n if (start && end) {\r\n editor.select(start, end);\r\n }\r\n },\r\n 'setDirection'\r\n );\r\n}\r\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport { IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Set font name at selection\r\n * @param editor The editor instance\r\n * @param fontName The fontName string, should be a valid CSS font-family style.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take affect\r\n */\r\nexport default function setFontName(editor: IEditor, fontName: string) {\r\n // The browser provided execCommand creates a HTML tag with face attribute. is not HTML5 standard\r\n // (http://www.w3schools.com/tags/tag_font.asp).\r\n applyListItemStyleWrap(\r\n editor,\r\n 'font-family',\r\n (element, isInnerNode) => {\r\n element.style.fontFamily = isInnerNode ? '' : fontName;\r\n },\r\n 'setFontName'\r\n );\r\n}\r\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport { getComputedStyle } from 'roosterjs-editor-dom';\r\nimport { IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Set font size at selection\r\n * @param editor The editor instance\r\n * @param fontSize The fontSize string, should be a valid CSS font-size style.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take affect\r\n */\r\nexport default function setFontSize(editor: IEditor, fontSize: string) {\r\n // The browser provided execCommand only accepts 1-7 point value. In addition, it uses HTML tag with size attribute.\r\n // is not HTML5 standard (http://www.w3schools.com/tags/tag_font.asp).\r\n applyListItemStyleWrap(\r\n editor,\r\n 'font-size',\r\n (element, isInnerNode) => {\r\n element.style.fontSize = isInnerNode ? '' : fontSize;\r\n let lineHeight = getComputedStyle(element, 'line-height');\r\n if (lineHeight && lineHeight != 'normal') {\r\n element.style.lineHeight = 'normal';\r\n }\r\n },\r\n 'setFontSize'\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Set image alt text for all selected images at selection. If no images is contained\r\n * in selection, do nothing.\r\n * The alt attribute provides alternative information for an image if a user for some reason\r\n * cannot view it (because of slow connection, an error in the src attribute, or if the user\r\n * uses a screen reader). See https://www.w3schools.com/tags/att_img_alt.asp\r\n * @param editor The editor instance\r\n * @param altText The image alt text\r\n */\r\nexport default function setImageAltText(editor: IEditor, altText: string) {\r\n editor.focus();\r\n\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n editor.queryElements('img', QueryScope.OnSelection, node =>\r\n node.setAttribute('alt', altText)\r\n );\r\n },\r\n 'setImageAltText'\r\n );\r\n}\r\n","import blockFormat from '../utils/blockFormat';\r\nimport normalizeBlockquote from '../utils/normalizeBlockquote';\r\nimport {\r\n BlockElement,\r\n ExperimentalFeatures,\r\n IEditor,\r\n Indentation,\r\n KnownCreateElementDataIndex,\r\n RegionBase,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\nimport {\r\n collapseNodesInRegion,\r\n createVListFromRegion,\r\n findClosestElementAncestor,\r\n getSelectedBlockElementsInRegion,\r\n getTagOfNode,\r\n isNodeInRegion,\r\n isWholeTableSelected,\r\n splitBalancedNodeRange,\r\n toArray,\r\n unwrap,\r\n VList,\r\n VTable,\r\n wrap,\r\n} from 'roosterjs-editor-dom';\r\nimport type { CompatibleIndentation } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Set indentation at selection\r\n * If selection contains bullet/numbering list, increase/decrease indentation will\r\n * increase/decrease the list level by one.\r\n * @param editor The editor instance\r\n * @param indentation The indentation option:\r\n * Indentation.Increase to increase indentation or Indentation.Decrease to decrease indentation\r\n */\r\nexport default function setIndentation(\r\n editor: IEditor,\r\n indentation: Indentation | CompatibleIndentation\r\n) {\r\n const handler = indentation == Indentation.Increase ? indent : outdent;\r\n\r\n blockFormat(\r\n editor,\r\n (region, start, end) => {\r\n const blocks = getSelectedBlockElementsInRegion(region, true /*createBlockIfEmpty*/);\r\n const blockGroups: BlockElement[][] = [[]];\r\n\r\n for (let i = 0; i < blocks.length; i++) {\r\n const startNode = blocks[i].getStartNode();\r\n const vList = createVListFromRegion(\r\n region,\r\n true /*includeSiblingLists*/,\r\n startNode\r\n );\r\n\r\n if (vList) {\r\n while (blocks[i + 1] && vList.contains(blocks[i + 1].getStartNode())) {\r\n i++;\r\n }\r\n\r\n const isTabKeyTextFeaturesEnabled = editor.isFeatureEnabled(\r\n ExperimentalFeatures.TabKeyTextFeatures\r\n );\r\n\r\n if (\r\n isTabKeyTextFeaturesEnabled &&\r\n isFirstItem(vList, startNode) &&\r\n shouldHandleWithBlockquotes(indentation, editor, startNode)\r\n ) {\r\n const block = editor.getBlockElementAtNode(vList.rootList);\r\n if (block) {\r\n blockGroups.push([block]);\r\n }\r\n } else {\r\n if (start && end) {\r\n indentation == Indentation.Decrease\r\n ? vList.setIndentation(\r\n start,\r\n end,\r\n indentation,\r\n false /* softOutdent */,\r\n isTabKeyTextFeaturesEnabled /* preventItemRemoval */\r\n )\r\n : vList.setIndentation(start, end, indentation);\r\n vList.writeBack(\r\n editor.isFeatureEnabled(\r\n ExperimentalFeatures.ReuseAllAncestorListElements\r\n ),\r\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\r\n );\r\n blockGroups.push([]);\r\n }\r\n }\r\n } else {\r\n blockGroups[blockGroups.length - 1].push(blocks[i]);\r\n }\r\n }\r\n\r\n blockGroups.forEach(group => handler(region, group));\r\n },\r\n () => {\r\n const selection = editor.getSelectionRangeEx();\r\n if (\r\n selection.type == SelectionRangeTypes.TableSelection &&\r\n selection.coordinates &&\r\n isWholeTableSelected(new VTable(selection.table), selection.coordinates)\r\n ) {\r\n if (indentation == Indentation.Decrease) {\r\n const quote = editor.getElementAtCursor('blockquote', selection.table);\r\n if (quote) {\r\n unwrap(quote);\r\n }\r\n } else if (indentation == Indentation.Increase) {\r\n wrap(selection.table, KnownCreateElementDataIndex.BlockquoteWrapper);\r\n }\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n 'setIndentation'\r\n );\r\n\r\n function indent(region: RegionBase, blocks: BlockElement[]) {\r\n const nodes = collapseNodesInRegion(region, blocks);\r\n wrap(nodes, KnownCreateElementDataIndex.BlockquoteWrapper);\r\n const quotesHandled: Node[] = [];\r\n nodes.forEach(node => normalizeBlockquote(node, quotesHandled));\r\n }\r\n}\r\n\r\nfunction outdent(region: RegionBase, blocks: BlockElement[]) {\r\n blocks.forEach(blockElement => {\r\n let node: Node | null = blockElement.collapseToSingleElement();\r\n const quote = findClosestElementAncestor(node, region.rootNode, 'blockquote');\r\n if (quote) {\r\n if (node == quote) {\r\n node = wrap(toArray(node.childNodes));\r\n }\r\n\r\n while (node && isNodeInRegion(region, node) && getTagOfNode(node) != 'BLOCKQUOTE') {\r\n node = splitBalancedNodeRange(node);\r\n }\r\n\r\n if (node && isNodeInRegion(region, node)) {\r\n unwrap(node);\r\n }\r\n }\r\n });\r\n}\r\n\r\nfunction isFirstItem(vList: VList, startNode: Node) {\r\n return (\r\n vList.items[0]?.getNode() == startNode &&\r\n vList.getListItemIndex(startNode) == (vList.getStart() || 1)\r\n );\r\n}\r\n\r\nfunction shouldHandleWithBlockquotes(\r\n indentation: Indentation | CompatibleIndentation,\r\n editor: IEditor,\r\n startNode: Node\r\n) {\r\n return (\r\n indentation == Indentation.Increase || editor.getElementAtCursor('blockquote', startNode)\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\nimport { createVListFromRegion } from 'roosterjs-editor-dom';\nimport { ExperimentalFeatures, IEditor } from 'roosterjs-editor-types';\n\n/**\n * Resets Ordered List Numbering back to the value of the parameter startNumber\n * @param editor The editor instance\n * @param separator The HTML element that indicates when to split the VList\n * @param startNumber The number of that the splitted list should start\n */\nexport default function setOrderedListNumbering(\n editor: IEditor,\n separator: HTMLLIElement,\n startNumber: number = 1\n) {\n formatUndoSnapshot(\n editor,\n () => {\n editor.focus();\n const regions = editor.getSelectedRegions();\n if (regions[0]) {\n const vList = createVListFromRegion(\n regions[0],\n false /*includeSiblingLists*/,\n separator\n );\n if (vList) {\n vList.split(separator, startNumber);\n vList.writeBack(\n editor.isFeatureEnabled(ExperimentalFeatures.ReuseAllAncestorListElements),\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\n );\n }\n }\n },\n 'setOrderedListNumbering'\n );\n}\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport { IEditor, ModeIndependentColor } from 'roosterjs-editor-types';\r\nimport { setColor } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Set text color at selection\r\n * @param editor The editor instance\r\n * @param color One of two options:\r\n * The color string, can be any of the predefined color names (e.g, 'red')\r\n * or hexadecimal color string (e.g, '#FF0000') or rgb value (e.g, 'rgb(255, 0, 0)') supported by browser.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take affect\r\n * Alternatively, you can pass a @typedef ModeIndependentColor. If in light mode, the lightModeColor property will be used.\r\n * If in dark mode, the darkModeColor will be used and the lightModeColor will be used when converting back to light mode.\r\n * @param shouldApplyInlineStyle Optional callback function to be invoked to verify if the current element should have the inline Style applied\r\n */\r\nexport default function setTextColor(\r\n editor: IEditor,\r\n color: string | ModeIndependentColor,\r\n shouldApplyInlineStyle?: (element: HTMLElement) => boolean\r\n) {\r\n applyListItemStyleWrap(\r\n editor,\r\n 'color',\r\n (element, isInnerNode) => {\r\n if (!shouldApplyInlineStyle || shouldApplyInlineStyle(element)) {\r\n setColor(\r\n element,\r\n isInnerNode ? '' : color,\r\n false /*isBackground*/,\r\n editor.isDarkMode(),\r\n false /*shouldAdaptFontColor*/,\r\n editor.getDarkColorHandler()\r\n );\r\n }\r\n },\r\n 'setTextColor'\r\n );\r\n}\r\n","import blockWrap from '../utils/blockWrap';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { unwrap, wrap } from 'roosterjs-editor-dom';\r\n\r\nconst BLOCKQUOTE_TAG = 'blockquote';\r\nconst DEFAULT_STYLER = (element: HTMLElement): void => {\r\n element.style.borderLeft = '3px solid';\r\n element.style.borderColor = '#C8C8C8';\r\n element.style.paddingLeft = '10px';\r\n element.style.color = '#666666';\r\n};\r\n\r\n/**\r\n * Toggle blockquote at selection, if selection already contains any blockquote elements,\r\n * the blockquote elements will be unquote and other elements will take no effect\r\n * @param editor The editor instance\r\n * @param styler (Optional) The custom styler for setting the style for the blockquote element\r\n */\r\nexport default function toggleBlockQuote(editor: IEditor, styler?: (element: HTMLElement) => void) {\r\n blockWrap(\r\n editor,\r\n nodes => {\r\n const wrapper = wrap(nodes, BLOCKQUOTE_TAG);\r\n (styler || DEFAULT_STYLER)(wrapper);\r\n },\r\n () => editor.queryElements('blockquote', QueryScope.OnSelection, unwrap).length == 0,\r\n 'toggleBlockQuote'\r\n );\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle bold at selection\r\n * If selection is collapsed, it will only affect the following input after caret\r\n * If selection contains only bold text, the bold style will be removed\r\n * If selection contains only normal text, bold style will be added to the whole selected text\r\n * If selection contains both bold and normal text, bold style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleBold(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Bold, 'toggleBold');\r\n}\r\n","import toggleListType from '../utils/toggleListType';\r\nimport { BulletListType, IEditor, ListType } from 'roosterjs-editor-types';\r\nimport type { CompatibleBulletListType } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Toggle bullet at selection\r\n * If selection contains bullet in deep level, toggle bullet will decrease the bullet level by one\r\n * If selection contains number list, toggle bullet will convert the number list into bullet list\r\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\r\n * browser execCommand API\r\n * @param editor The editor instance\r\n * @param listStyle (Optional) the style of the bullet list. If not defined, the style will be set to disc.\r\n * @param apiNameOverride (Optional) Set a new api name, if empty the api name will be 'toggleListType'.\r\n */\r\nexport default function toggleBullet(\r\n editor: IEditor,\r\n listStyle?: BulletListType | CompatibleBulletListType,\r\n apiNameOverride?: string\r\n) {\r\n toggleListType(\r\n editor,\r\n ListType.Unordered,\r\n undefined /* startNumber */,\r\n false /* includeSiblingLists */,\r\n undefined /** orderedStyle */,\r\n listStyle,\r\n apiNameOverride\r\n );\r\n}\r\n","import blockWrap from '../utils/blockWrap';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { unwrap, wrap } from 'roosterjs-editor-dom';\r\n\r\nconst PRE_TAG = 'pre';\r\nconst CODE_TAG = 'code';\r\nconst SELECTOR = `${PRE_TAG}>${CODE_TAG}`;\r\n\r\n/**\r\n * Toggle code block at selection, if selection already contains any code blocked elements,\r\n * the code block elements will be no longer be code blocked and other elements will take no affect\r\n * @param editor The editor instance\r\n * @param styler (Optional) The custom styler for setting the style for the code block element\r\n */\r\nexport default function toggleCodeBlock(\r\n editor: IEditor,\r\n styler?: (element: HTMLElement) => void\r\n): void {\r\n blockWrap(\r\n editor,\r\n nodes => {\r\n const code = wrap(nodes, CODE_TAG);\r\n const pre = wrap(code, PRE_TAG);\r\n styler?.(pre);\r\n },\r\n () =>\r\n editor.queryElements(SELECTOR, QueryScope.OnSelection, code => {\r\n if (!code.previousSibling && !code.nextSibling) {\r\n const parent = code.parentNode;\r\n unwrap(code);\r\n if (parent) {\r\n unwrap(parent);\r\n }\r\n }\r\n }).length == 0,\r\n 'toggleCodeBlock'\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { DocumentCommand, IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { HtmlSanitizer, moveChildNodes } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Toggle header at selection\r\n * @param editor The editor instance\r\n * @param level The header level, can be a number from 0 to 6, in which 1 ~ 6 refers to\r\n * the HTML header element <H1> to <H6>, 0 means no header\r\n * if passed in param is outside the range, will be rounded to nearest number in the range\r\n */\r\nexport default function toggleHeader(editor: IEditor, level: number) {\r\n level = Math.min(Math.max(Math.round(level), 0), 6);\r\n\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n editor.focus();\r\n\r\n let wrapped = false;\r\n editor.queryElements('H1,H2,H3,H4,H5,H6', QueryScope.OnSelection, header => {\r\n if (!wrapped) {\r\n editor.getDocument().execCommand(DocumentCommand.FormatBlock, false, '
    ');\r\n wrapped = true;\r\n }\r\n\r\n const div = editor.getDocument().createElement('div');\r\n moveChildNodes(div, header);\r\n editor.replaceNode(header, div);\r\n });\r\n\r\n if (level > 0) {\r\n let traverser = editor.getSelectionTraverser();\r\n let blockElement = traverser?.currentBlockElement;\r\n let sanitizer = new HtmlSanitizer({\r\n cssStyleCallbacks: {\r\n 'font-size': () => false,\r\n },\r\n });\r\n while (blockElement) {\r\n let element = blockElement.collapseToSingleElement();\r\n sanitizer.sanitize(element);\r\n blockElement = traverser?.getNextBlockElement();\r\n }\r\n editor.getDocument().execCommand(DocumentCommand.FormatBlock, false, ``);\r\n }\r\n },\r\n 'toggleHeader'\r\n );\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle italic at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only italic text, the italic style will be removed\r\n * If selection contains only normal text, italic style will be added to the whole selected text\r\n * If selection contains both italic and normal text, italic style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleItalic(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Italic, 'toggleItalic');\r\n}\r\n","import toggleListType from '../utils/toggleListType';\r\nimport { IEditor, ListType, NumberingListType } from 'roosterjs-editor-types';\r\nimport type { CompatibleNumberingListType } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Toggle numbering at selection\r\n * If selection contains numbering in deep level, toggle numbering will decrease the numbering level by one\r\n * If selection contains bullet list, toggle numbering will convert the bullet list into number list\r\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\r\n * realization of browser execCommand API\r\n * @param editor The editor instance\r\n * @param startNumber (Optional) Start number of the list\r\n * @param listStyle (Optional) The style of the numbering list. If not defined, the style will be set to decimal.\r\n * @param apiNameOverride (Optional) Set a new api name, if empty the api name will be 'toggleListType'.\r\n */\r\nexport default function toggleNumbering(\r\n editor: IEditor,\r\n startNumber?: number,\r\n listStyle?: NumberingListType | CompatibleNumberingListType,\r\n apiNameOverride?: string\r\n) {\r\n toggleListType(\r\n editor,\r\n ListType.Ordered,\r\n startNumber,\r\n undefined /* includeSiblingLists */,\r\n listStyle,\r\n undefined /* unorderedStyle */,\r\n apiNameOverride\r\n );\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle strikethrough at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only strikethrough text, the strikethrough style will be removed\r\n * If selection contains only normal text, strikethrough style will be added to the whole selected text\r\n * If selection contains both strikethrough and normal text, strikethrough style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleStrikethrough(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.StrikeThrough, 'toggleStrikethrough');\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle subscript at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only subscript text, the subscript style will be removed\r\n * If selection contains only normal text, subscript style will be added to the whole selected text\r\n * If selection contains both subscript and normal text, the subscript style will be removed from whole selected text\r\n * If selection contains any superscript text, the behavior is determined by corresponding realization of browser\r\n * execCommand API\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleSubscript(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Subscript, 'toggleSubscript');\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle superscript at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only superscript text, the superscript style will be removed\r\n * If selection contains only normal text, superscript style will be added to the whole selected text\r\n * If selection contains both superscript and normal text, the superscript style will be removed from whole selected text\r\n * If selection contains any subscript text, the behavior is determined by corresponding realization of browser\r\n * execCommand API\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleSuperscript(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Superscript, 'toggleSuperscript');\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle underline at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only underlined text, the underline style will be removed\r\n * If selection contains only normal text, underline style will be added to the whole selected text\r\n * If selection contains both underlined and normal text, the underline style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleUnderline(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Underline, 'toggleUnderline');\r\n}\r\n","export { default as changeFontSize, FONT_SIZES } from './format/changeFontSize';\r\nexport { default as clearBlockFormat } from './format/clearBlockFormat';\r\nexport { default as clearFormat } from './format/clearFormat';\r\nexport { default as createLink } from './format/createLink';\r\nexport { default as getFormatState, getElementBasedFormatState } from './format/getFormatState';\r\nexport { default as insertEntity } from './format/insertEntity';\r\nexport { default as insertImage } from './format/insertImage';\r\nexport { default as insertTable } from './table/insertTable';\r\nexport { default as editTable } from './table/editTable';\r\nexport { default as formatTable } from './table/formatTable';\r\nexport { default as removeLink } from './format/removeLink';\r\nexport { default as replaceWithNode } from './format/replaceWithNode';\r\nexport { default as rotateElement } from './format/rotateElement';\r\nexport { default as setAlignment } from './format/setAlignment';\r\nexport { default as setBackgroundColor } from './format/setBackgroundColor';\r\nexport { default as setTextColor } from './format/setTextColor';\r\nexport { default as setDirection } from './format/setDirection';\r\nexport { default as setFontName } from './format/setFontName';\r\nexport { default as setFontSize } from './format/setFontSize';\r\nexport { default as setImageAltText } from './format/setImageAltText';\r\nexport { default as setIndentation } from './format/setIndentation';\r\nexport { default as changeCapitalization } from './format/changeCapitalization';\r\nexport { default as toggleBold } from './format/toggleBold';\r\nexport { default as toggleBullet } from './format/toggleBullet';\r\nexport { default as toggleItalic } from './format/toggleItalic';\r\nexport { default as toggleNumbering } from './format/toggleNumbering';\r\nexport { default as setOrderedListNumbering } from './format/setOrderedListNumbering';\r\nexport { default as toggleBlockQuote } from './format/toggleBlockQuote';\r\nexport { default as toggleCodeBlock } from './format/toggleCodeBlock';\r\nexport { default as toggleStrikethrough } from './format/toggleStrikethrough';\r\nexport { default as toggleSubscript } from './format/toggleSubscript';\r\nexport { default as toggleSuperscript } from './format/toggleSuperscript';\r\nexport { default as toggleUnderline } from './format/toggleUnderline';\r\nexport { default as toggleHeader } from './format/toggleHeader';\r\nexport { default as applyCellShading } from './table/applyCellShading';\r\n\r\nexport { default as toggleListType } from './utils/toggleListType';\r\nexport { default as blockFormat } from './utils/blockFormat';\r\nexport { default as commitListChains, experimentCommitListChains } from './utils/commitListChains';\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\nimport { IEditor, ModeIndependentColor } from 'roosterjs-editor-types';\nimport { safeInstanceOf, saveTableCellMetadata, setColor } from 'roosterjs-editor-dom';\n\n/**\n * Set background color of cells.\n * @param editor The editor instance\n * @param color One of two options:\n **/\nexport default function applyCellShading(editor: IEditor, color: string | ModeIndependentColor) {\n editor.focus();\n formatUndoSnapshot(\n editor,\n () => {\n const regions = editor.getSelectedRegions();\n regions.forEach(region => {\n if (safeInstanceOf(region.rootNode, 'HTMLTableCellElement')) {\n setColor(\n region.rootNode,\n color,\n true /* isBackgroundColor */,\n editor.isDarkMode(),\n true /** shouldAdaptFontColor */,\n editor.getDarkColorHandler()\n );\n saveTableCellMetadata(region.rootNode, { bgColorOverride: true });\n }\n });\n },\n 'applyCellShading'\n );\n}\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, PositionType, SelectionRangeTypes, TableOperation } from 'roosterjs-editor-types';\r\nimport { VTable } from 'roosterjs-editor-dom';\r\nimport type { CompatibleTableOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Edit table with given operation. If there is no table at cursor then no op.\r\n * @param editor The editor instance\r\n * @param operation Table operation\r\n */\r\nexport default function editTable(\r\n editor: IEditor,\r\n operation: TableOperation | CompatibleTableOperation\r\n) {\r\n let td = editor.getElementAtCursor('TD,TH') as HTMLTableCellElement;\r\n if (td) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n let vtable = new VTable(td);\r\n\r\n saveTableSelection(editor, vtable);\r\n vtable.edit(operation);\r\n vtable.writeBack(false /** skipApplyFormat */, editor.getDarkColorHandler());\r\n editor.transformToDarkColor(vtable.table);\r\n\r\n editor.focus();\r\n if (isUndefined(vtable.row) || isUndefined(vtable.col)) {\r\n return;\r\n }\r\n let { newCol, newRow } = calculateCellToSelect(operation, vtable.row, vtable.col);\r\n const newTd = vtable.getCell(newRow, newCol).td;\r\n if (newTd) {\r\n editor.select(newTd, PositionType.Begin);\r\n }\r\n },\r\n 'editTable'\r\n );\r\n }\r\n}\r\n\r\nfunction isUndefined(n: number | undefined): n is undefined {\r\n return n == undefined;\r\n}\r\n\r\nfunction calculateCellToSelect(\r\n operation: TableOperation | CompatibleTableOperation,\r\n currentRow: number,\r\n currentCol: number\r\n) {\r\n let newRow = currentRow;\r\n let newCol = currentCol;\r\n switch (operation) {\r\n case TableOperation.InsertAbove:\r\n newCol = 0;\r\n break;\r\n case TableOperation.InsertBelow:\r\n newRow += 1;\r\n newCol = 0;\r\n break;\r\n case TableOperation.InsertLeft:\r\n newRow = 0;\r\n break;\r\n case TableOperation.InsertRight:\r\n newRow = 0;\r\n newCol += 1;\r\n break;\r\n }\r\n\r\n return {\r\n newRow,\r\n newCol,\r\n };\r\n}\r\n\r\nfunction saveTableSelection(editor: IEditor, vtable: VTable) {\r\n const selection = editor.getSelectionRangeEx();\r\n if (selection && selection.type === SelectionRangeTypes.TableSelection) {\r\n vtable.selection = selection.coordinates ?? null;\r\n }\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, TableFormat } from 'roosterjs-editor-types';\r\nimport { VTable } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Format table\r\n * @param editor The editor which contains the table to format\r\n * @param format A TableFormat object contains format information we want to apply to the table\r\n * @param table The table to format. This is optional. When not passed, the current table (if any) will be formatted\r\n */\r\nexport default function formatTable(\r\n editor: IEditor,\r\n format: TableFormat,\r\n table?: HTMLTableElement\r\n) {\r\n table = table || (editor.getElementAtCursor('TABLE') as HTMLTableElement);\r\n if (table) {\r\n formatUndoSnapshot(\r\n editor,\r\n (start, end) => {\r\n if (!table) {\r\n return;\r\n }\r\n\r\n let vtable = new VTable(table);\r\n vtable.applyFormat(format);\r\n vtable.writeBack(false /** skipApplyFormat */, editor.getDarkColorHandler());\r\n editor.transformToDarkColor(vtable.table);\r\n editor.focus();\r\n if (start && end) {\r\n editor.select(start, end);\r\n }\r\n },\r\n 'formatTable'\r\n );\r\n }\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport setBackgroundColor from '../format/setBackgroundColor';\r\nimport { IEditor, PositionType, TableFormat } from 'roosterjs-editor-types';\r\nimport { Position, VTable } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Insert table into editor at current selection\r\n * @param editor The editor instance\r\n * @param columns Number of columns in table, it also controls the default table cell width:\r\n * if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px\r\n * @param rows Number of rows in table\r\n * @param format (Optional) The table format. If not passed, the default format will be applied:\r\n * background color: #FFF; border color: #ABABAB\r\n */\r\nexport default function insertTable(\r\n editor: IEditor,\r\n columns: number,\r\n rows: number,\r\n format?: TableFormat\r\n) {\r\n let document = editor.getDocument();\r\n let table = document.createElement('table') as HTMLTableElement;\r\n table.cellSpacing = '0';\r\n table.cellPadding = '1';\r\n for (let i = 0; i < rows; i++) {\r\n let tr = document.createElement('tr') as HTMLTableRowElement;\r\n table.appendChild(tr);\r\n for (let j = 0; j < columns; j++) {\r\n let td = document.createElement('td') as HTMLTableCellElement;\r\n tr.appendChild(td);\r\n td.appendChild(document.createElement('br'));\r\n td.style.width = getTableCellWidth(columns);\r\n }\r\n }\r\n\r\n editor.focus();\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n const element = editor.getElementAtCursor();\r\n if (element?.style.backgroundColor) {\r\n setBackgroundColor(editor, 'transparent');\r\n }\r\n let vtable = new VTable(table);\r\n vtable.applyFormat(format || {});\r\n vtable.writeBack();\r\n editor.insertNode(table);\r\n editor.runAsync(editor =>\r\n editor.select(new Position(table, PositionType.Begin).normalize())\r\n );\r\n },\r\n 'insertTable'\r\n );\r\n}\r\n\r\nfunction getTableCellWidth(columns: number): string {\r\n if (columns <= 4) {\r\n return '120px';\r\n } else if (columns <= 6) {\r\n return '100px';\r\n } else {\r\n return '70px';\r\n }\r\n}\r\n","import formatUndoSnapshot from './formatUndoSnapshot';\r\nimport { getTagOfNode } from 'roosterjs-editor-dom';\r\nimport {\r\n ChangeSource,\r\n IEditor,\r\n PluginEventType,\r\n PositionType,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Apply inline style to current selection\r\n * @param editor The editor instance\r\n * @param callback The callback function to apply style\r\n */\r\nexport default function applyInlineStyle(\r\n editor: IEditor,\r\n callback: (element: HTMLElement, isInnerNode?: boolean) => any,\r\n apiName: string\r\n) {\r\n editor.focus();\r\n let selection = editor.getSelectionRangeEx();\r\n\r\n const safeCallback = (element: HTMLElement, isInnerNode?: boolean) =>\r\n element.isContentEditable && callback(element, isInnerNode);\r\n\r\n if (selection && selection.areAllCollapsed) {\r\n const range = selection.ranges[0];\r\n let node = range.startContainer;\r\n let isEmptySpan =\r\n getTagOfNode(node) == 'SPAN' &&\r\n (!node.firstChild ||\r\n (getTagOfNode(node.firstChild) == 'BR' && !node.firstChild.nextSibling));\r\n if (isEmptySpan) {\r\n editor.addUndoSnapshot();\r\n safeCallback(node as HTMLElement);\r\n } else {\r\n editor.triggerPluginEvent(PluginEventType.PendingFormatStateChanged, {\r\n formatState: {},\r\n // Here we use callback instead of safeCallback because we know it's contentEditable.\r\n // In addition, for elements that are not added to the DOM tree, isContentEditable always returns false on Safari.\r\n formatCallback: callback,\r\n });\r\n editor.triggerContentChangedEvent(ChangeSource.Format);\r\n }\r\n } else {\r\n // This is start and end node that get the style. The start and end needs to be recorded so that selection\r\n // can be re-applied post-applying style\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n let firstNode: Node | undefined;\r\n let lastNode: Node | undefined;\r\n selection.ranges.forEach(range => {\r\n let contentTraverser = editor.getSelectionTraverser(range);\r\n if (!contentTraverser) {\r\n return;\r\n }\r\n let inlineElement = contentTraverser && contentTraverser.currentInlineElement;\r\n while (inlineElement) {\r\n let nextInlineElement = contentTraverser.getNextInlineElement();\r\n inlineElement.applyStyle((element, isInnerNode) => {\r\n safeCallback(element, isInnerNode);\r\n firstNode = firstNode || element;\r\n lastNode = element;\r\n });\r\n inlineElement = nextInlineElement;\r\n }\r\n });\r\n\r\n if (firstNode && lastNode && selection.type == SelectionRangeTypes.Normal) {\r\n editor.select(firstNode, PositionType.Before, lastNode, PositionType.After);\r\n }\r\n },\r\n apiName\r\n );\r\n }\r\n}\r\n","import applyInlineStyle from '../utils/applyInlineStyle';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { safeInstanceOf, setListItemStyle } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Set the List Item Style when all inner inline element have the same style\n * @param editor The editor instance\n * @param styleName Name of the style to apply to the list item\n * @param formatCallback callback to apply the style to each element\n */\nexport default function applyListItemStyleWrap(\n editor: IEditor,\n styleName: string,\n formatCallback: (element: HTMLElement, isInnerNode?: boolean) => any,\n apiName: string\n) {\n const parentNodes: Node[] = [];\n applyInlineStyle(\n editor,\n (element, isInnerNode) => {\n formatCallback(element, isInnerNode);\n\n let parent = editor.getElementAtCursor('LI', element);\n if (parent && parentNodes.indexOf(parent) === -1) {\n parentNodes.push(parent);\n }\n },\n apiName\n );\n\n applyStyleToListItems(parentNodes, [styleName]);\n}\n\n/**\n * @internal\n * Checks if the parent element is a List Item, if it is, apply the style elements to the list item\n * @param parentNodes parentNodes to apply the style\n * @param styles styles to apply to the List Item Element\n */\nfunction applyStyleToListItems(parentNodes: Node[], styles: string[]) {\n parentNodes.forEach(node => {\n if (safeInstanceOf(node, 'HTMLLIElement')) {\n setListItemStyle(node, styles);\n }\n });\n}\n","import commitListChains from '../utils/commitListChains';\nimport formatUndoSnapshot from './formatUndoSnapshot';\nimport { IEditor, NodePosition, Region, SelectionRangeTypes } from 'roosterjs-editor-types';\nimport { VListChain } from 'roosterjs-editor-dom';\n\n/**\n * Split selection into regions, and perform a block-wise formatting action for each region.\n */\nexport default function blockFormat(\n editor: IEditor,\n callback: (\n region: Region,\n start: NodePosition | null,\n end: NodePosition | null,\n chains: VListChain[]\n ) => void,\n beforeRunCallback?: () => boolean,\n apiName?: string\n) {\n editor.focus();\n const selection = editor.getSelectionRangeEx();\n\n formatUndoSnapshot(\n editor,\n (start, end) => {\n if (!beforeRunCallback || beforeRunCallback()) {\n const regions = editor.getSelectedRegions();\n if (regions.length > 0) {\n const chains = VListChain.createListChains(regions, start?.node);\n regions.forEach(region => callback(region, start, end, chains));\n commitListChains(editor, chains);\n }\n }\n if (selection.type == SelectionRangeTypes.Normal && start && end) {\n editor.select(start, end);\n } else {\n editor.select(selection);\n }\n },\n apiName\n );\n}\n","import blockFormat from './blockFormat';\nimport { IEditor } from 'roosterjs-editor-types';\nimport {\n collapseNodesInRegion,\n getSelectedBlockElementsInRegion,\n getTagOfNode,\n isNodeInRegion,\n splitBalancedNodeRange,\n toArray,\n wrap,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Toggle a tag at selection, if selection already contains elements of such tag,\n * the elements will be untagged and other elements will take no effect\n * @param editor The editor instance\n * @param wrapFunction The wrap function\n * @param beforeRunCallback A callback function to run before looping all regions. If it returns false,\n * the loop for regions will be skipped\n */\nexport default function blockWrap(\n editor: IEditor,\n wrapFunction: (nodes: Node[]) => void,\n beforeRunCallback: () => boolean,\n apiName?: string\n): void {\n blockFormat(\n editor,\n region => {\n const blocks = getSelectedBlockElementsInRegion(region, true /*createBlockIfEmpty*/);\n let nodes = collapseNodesInRegion(region, blocks);\n if (nodes.length > 0) {\n if (nodes.length == 1) {\n const NodeTag = getTagOfNode(nodes[0]);\n if (NodeTag == 'BR') {\n nodes = [wrap(nodes[0])];\n } else if (NodeTag == 'LI' || NodeTag == 'TD') {\n nodes = toArray(nodes[0].childNodes);\n }\n }\n\n while (\n nodes[0] &&\n nodes[0].parentNode &&\n isNodeInRegion(region, nodes[0].parentNode) &&\n nodes.some(node => getTagOfNode(node) == 'LI')\n ) {\n const result = splitBalancedNodeRange(nodes);\n nodes = result ? [result] : [];\n }\n\n wrapFunction(nodes);\n }\n },\n beforeRunCallback,\n apiName\n );\n}\n","import { BlockElement, IEditor, NodeType } from 'roosterjs-editor-types';\r\nimport { getTagOfNode } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * @internal\r\n * Collapse all selected blocks, return single HTML elements for each block\r\n * @param editor The editor instance\r\n * @param forEachCallback A callback function to invoke for each of the collapsed element\r\n */\r\nexport default function collapseSelectedBlocks(\r\n editor: IEditor,\r\n forEachCallback: (element: HTMLElement) => any\r\n) {\r\n let traverser = editor.getSelectionTraverser();\r\n if (!traverser) {\r\n return;\r\n }\r\n let block = traverser.currentBlockElement;\r\n let blocks: BlockElement[] = [];\r\n while (block) {\r\n if (!isEmptyBlockUnderTR(block)) {\r\n blocks.push(block);\r\n }\r\n block = traverser.getNextBlockElement();\r\n }\r\n\r\n blocks.forEach(block => {\r\n let element = block.collapseToSingleElement();\r\n forEachCallback(element);\r\n });\r\n}\r\n\r\nfunction isEmptyBlockUnderTR(block: BlockElement): boolean {\r\n let startNode = block.getStartNode();\r\n\r\n return (\r\n startNode == block.getEndNode() &&\r\n startNode.nodeType == NodeType.Text &&\r\n ['TR', 'TABLE'].indexOf(getTagOfNode(startNode.parentNode)) >= 0\r\n );\r\n}\r\n","import { ExperimentalFeatures, IEditor } from 'roosterjs-editor-types';\nimport { Position, VListChain } from 'roosterjs-editor-dom';\n\n/**\n * Commit changes of all list changes when experiment features are allowed\n * @param editor The Editor object\n * @param chains List chains to commit\n */\nexport default function commitListChains(editor: IEditor, chains: VListChain[]) {\n if (chains?.length > 0) {\n const range = editor.getSelectionRange();\n const start = range && Position.getStart(range);\n const end = range && Position.getEnd(range);\n const shouldReuseAllAncestorListElements = editor.isFeatureEnabled(\n ExperimentalFeatures.ReuseAllAncestorListElements\n );\n const shouldDisableListChain = editor.isFeatureEnabled(\n ExperimentalFeatures.DisableListChain\n );\n\n chains.forEach(chain =>\n chain.commit(shouldReuseAllAncestorListElements, shouldDisableListChain)\n );\n\n if (start && end) {\n editor.select(start, end);\n }\n }\n}\n\n/**\n * @deprecated\n * Same with commitListChains, keep this export just for backward compatibility\n */\nexport const experimentCommitListChains = commitListChains;\n","import formatUndoSnapshot from './formatUndoSnapshot';\nimport { getObjectKeys, PendableFormatCommandMap, PendableFormatNames } from 'roosterjs-editor-dom';\nimport {\n DocumentCommand,\n IEditor,\n PluginEventType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\nimport type { CompatibleDocumentCommand } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Execute a document command\n * @param editor The editor instance\n * @param command The command to execute\n * @param addUndoSnapshotWhenCollapsed Optional, set to true to always add undo snapshot even current selection is collapsed.\n * Default value is false.\n * @param doWorkaroundForList Optional, set to true to do workaround for list in order to keep current format.\n * Default value is false.\n */\nexport default function execCommand(\n editor: IEditor,\n command: DocumentCommand | CompatibleDocumentCommand,\n apiName?: string\n) {\n editor.focus();\n\n let formatter = () => editor.getDocument().execCommand(command, false, undefined);\n\n let selection = editor.getSelectionRangeEx();\n if (selection && selection.areAllCollapsed) {\n editor.addUndoSnapshot();\n const formatState = editor.getPendableFormatState(false /* forceGetStateFromDom */);\n formatter();\n const formatName = getObjectKeys(PendableFormatCommandMap).filter(\n x => PendableFormatCommandMap[x] == command\n )[0] as PendableFormatNames;\n\n if (formatName) {\n formatState[formatName] = !formatState[formatName];\n editor.triggerPluginEvent(PluginEventType.PendingFormatStateChanged, {\n formatState: formatState,\n });\n }\n } else {\n formatUndoSnapshot(\n editor,\n () => {\n const needToSwitchSelection = selection.type != SelectionRangeTypes.Normal;\n\n selection.ranges.forEach(range => {\n if (needToSwitchSelection) {\n editor.select(range);\n }\n formatter();\n });\n\n if (needToSwitchSelection) {\n editor.select(selection);\n }\n },\n apiName\n );\n }\n}\n","import { ChangeSource, IEditor, NodePosition } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Execute add undo snapshot for the Format APIs\n * @param editor The editor instance\n * @param command Optional, The callback function to perform formatting, returns a data object which will be used as the data field in ContentChangedEvent if changeSource is not null.\n * @param apiName Optional, name of the API that was is going to be executed.\n * Default value is false.\n */\nexport default function formatUndoSnapshot(\n editor: IEditor,\n callback?: (start: NodePosition | null, end: NodePosition | null) => any,\n apiName?: string\n) {\n editor.addUndoSnapshot(\n callback,\n ChangeSource.Format,\n undefined /* canUndoByBackspace */,\n apiName && apiName != ''\n ? {\n formatApiName: apiName,\n }\n : undefined\n );\n}\n","import { findClosestElementAncestor, getComputedStyle, safeInstanceOf } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * @param node start node to normalize\n * @param quotesHandled Optional parameter to prevent already modified quotes to be rechecked.\n * @returns\n */\nexport default function normalizeBlockquote(node: Node, quotesHandled?: Node[]): void {\n if (safeInstanceOf(node, 'HTMLElement')) {\n const alignment = node.style.textAlign;\n\n let quote = findClosestElementAncestor(node, undefined /* root */, 'blockquote');\n if (!quote) {\n return;\n }\n const isNodeRTL = isRTL(node);\n\n if (quotesHandled) {\n if (quotesHandled.indexOf(quote) > -1) {\n return;\n }\n quotesHandled.push(quote);\n }\n\n while (quote) {\n if (alignment == 'center') {\n if (isNodeRTL) {\n quote.style.removeProperty('marginInlineEnd');\n quote.style.marginInlineStart = 'auto';\n } else {\n quote.style.removeProperty('marginInlineStart');\n quote.style.marginInlineEnd = 'auto';\n }\n } else {\n quote.style.removeProperty('marginInlineEnd');\n quote.style.removeProperty('marginInlineStart');\n }\n\n quote = findClosestElementAncestor(\n quote.parentElement,\n undefined /* root */,\n 'blockquote'\n );\n }\n }\n}\n\nfunction isRTL(el: Element) {\n return getComputedStyle(el, 'direction') == 'rtl' || el.getAttribute('dir') == 'rtl';\n}\n","import blockFormat from '../utils/blockFormat';\nimport { createVListFromRegion, getBlockElementAtNode } from 'roosterjs-editor-dom';\nimport {\n BulletListType,\n ExperimentalFeatures,\n IEditor,\n ListType,\n NumberingListType,\n} from 'roosterjs-editor-types';\nimport type {\n CompatibleBulletListType,\n CompatibleListType,\n CompatibleNumberingListType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Toggle List Type at selection\n * If ListType Provided is Ordered:\n * If selection contains numbering in deep level, toggle numbering will decrease the numbering level by one\n * If selection contains bullet list, toggle numbering will convert the bullet list into number list\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\n * realization of browser execCommand API\n * If ListType Provided is Unordered:\n * If selection contains bullet in deep level, toggle bullet will decrease the bullet level by one\n * If selection contains number list, toggle bullet will convert the number list into bullet list\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\n * browser execCommand API\n * @param editor The editor instance\n * @param listType The list type to toggle\n * @param startNumber (Optional) Start number of the list\n * @param includeSiblingLists Sets wether the operation should include Sibling Lists, by default true\n * @param orderedStyle (Optional) the style of an ordered. If not defined, the style will be set to decimal.\n * @param unorderedStyle (Optional) the style of an unordered list. If not defined, the style will be set to disc.\n * @param apiNameOverride (Optional) Set a new api name, if empty the api name will be 'toggleListType'.\n */\nexport default function toggleListType(\n editor: IEditor,\n listType: ListType | CompatibleListType,\n startNumber: number = 0,\n includeSiblingLists: boolean = true,\n orderedStyle?: NumberingListType | CompatibleNumberingListType,\n unorderedStyle?: BulletListType | CompatibleBulletListType,\n apiNameOverride?: string\n) {\n blockFormat(\n editor,\n (region, start, end, chains) => {\n const chain =\n startNumber > 0 && chains.filter(chain => chain.canAppendAtCursor(startNumber))[0];\n const block = getBlockElementAtNode(\n region.rootNode,\n start?.node ?? null\n )?.collapseToSingleElement();\n if (!block) {\n return;\n }\n const vList =\n chain && end && start?.equalTo(end)\n ? chain.createVListAtBlock(block, startNumber)\n : createVListFromRegion(\n region,\n startNumber === 1 ? false : includeSiblingLists\n );\n\n if (vList && start && end) {\n vList.changeListType(start, end, listType);\n if (editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList)) {\n vList.setListStyleType(orderedStyle, unorderedStyle);\n }\n vList.writeBack(\n editor.isFeatureEnabled(ExperimentalFeatures.ReuseAllAncestorListElements),\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\n );\n }\n },\n undefined /* beforeRunCallback */,\n apiNameOverride || 'toggleListType'\n );\n}\n","import { EntityState } from 'roosterjs-editor-types';\nimport { getSelectionPath, Position } from 'roosterjs-editor-dom';\nimport {\n AddUndoSnapshot,\n ChangeSource,\n ContentChangedData,\n ContentChangedEvent,\n ContentMetadata,\n EditorCore,\n NodePosition,\n PluginEventType,\n SelectionRangeEx,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\nimport type { CompatibleChangeSource } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Call an editing callback with adding undo snapshots around, and trigger a ContentChanged event if change source is specified.\n * Undo snapshot will not be added if this call is nested inside another addUndoSnapshot() call.\n * @param core The EditorCore object\n * @param callback The editing callback, accepting current selection start and end position, returns an optional object used as the data field of ContentChangedEvent.\n * @param changeSource The ChangeSource string of ContentChangedEvent. @default ChangeSource.Format. Set to null to avoid triggering ContentChangedEvent\n * @param canUndoByBackspace True if this action can be undone when user press Backspace key (aka Auto Complete).\n * @param additionalData @optional parameter to provide additional data related to the ContentChanged Event.\n */\nexport const addUndoSnapshot: AddUndoSnapshot = (\n core: EditorCore,\n callback: ((start: NodePosition | null, end: NodePosition | null) => any) | null,\n changeSource: ChangeSource | CompatibleChangeSource | string | null,\n canUndoByBackspace: boolean,\n additionalData?: ContentChangedData\n) => {\n const undoState = core.undo;\n const isNested = undoState.isNested;\n let data: any;\n\n if (!isNested) {\n undoState.isNested = true;\n\n // When there is getEntityState, it means this is triggered by an entity change.\n // So if HTML content is not changed (hasNewContent is false), no need to add another snapshot before change\n if (core.undo.hasNewContent || !additionalData?.getEntityState || !callback) {\n addUndoSnapshotInternal(core, canUndoByBackspace, additionalData?.getEntityState?.());\n }\n }\n\n try {\n if (callback) {\n let range = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n data = callback(\n range && Position.getStart(range).normalize(),\n range && Position.getEnd(range).normalize()\n );\n\n if (!isNested) {\n const entityStates = additionalData?.getEntityState?.();\n addUndoSnapshotInternal(core, false /*isAutoCompleteSnapshot*/, entityStates);\n }\n }\n } finally {\n if (!isNested) {\n undoState.isNested = false;\n }\n }\n\n if (callback && changeSource) {\n let event: ContentChangedEvent = {\n eventType: PluginEventType.ContentChanged,\n source: changeSource,\n data: data,\n additionalData,\n };\n core.api.triggerEvent(core, event, true /*broadcast*/);\n }\n\n if (canUndoByBackspace) {\n const range = core.api.getSelectionRange(core, false /*tryGetFromCache*/);\n\n if (range) {\n core.undo.hasNewContent = false;\n core.undo.autoCompletePosition = Position.getStart(range);\n }\n }\n};\n\nfunction addUndoSnapshotInternal(\n core: EditorCore,\n canUndoByBackspace: boolean,\n entityStates?: EntityState[]\n) {\n if (!core.lifecycle.shadowEditFragment) {\n const rangeEx = core.api.getSelectionRangeEx(core);\n const isDarkMode = core.lifecycle.isDarkMode;\n const metadata = createContentMetadata(core.contentDiv, rangeEx, isDarkMode) || null;\n\n core.undo.snapshotsService.addSnapshot(\n {\n html: core.contentDiv.innerHTML,\n metadata,\n knownColors: core.darkColorHandler?.getKnownColorsCopy() || [],\n entityStates,\n },\n canUndoByBackspace\n );\n core.undo.hasNewContent = false;\n }\n}\n\nfunction createContentMetadata(\n root: HTMLElement,\n rangeEx: SelectionRangeEx,\n isDarkMode: boolean\n): ContentMetadata | undefined {\n switch (rangeEx?.type) {\n case SelectionRangeTypes.TableSelection:\n return {\n type: SelectionRangeTypes.TableSelection,\n tableId: rangeEx.table.id,\n isDarkMode: !!isDarkMode,\n ...rangeEx.coordinates!,\n };\n case SelectionRangeTypes.ImageSelection:\n return {\n type: SelectionRangeTypes.ImageSelection,\n imageId: rangeEx.image.id,\n isDarkMode: !!isDarkMode,\n };\n case SelectionRangeTypes.Normal:\n return {\n type: SelectionRangeTypes.Normal,\n isDarkMode: !!isDarkMode,\n start: [],\n end: [],\n ...(getSelectionPath(root, rangeEx.ranges[0]) || {}),\n };\n }\n}\n","import { getObjectKeys } from 'roosterjs-editor-dom';\nimport {\n AttachDomEvent,\n DOMEventHandler,\n DOMEventHandlerObject,\n EditorCore,\n PluginDomEvent,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Attach a DOM event to the editor content DIV\n * @param core The EditorCore object\n * @param eventName The DOM event name\n * @param pluginEventType Optional event type. When specified, editor will trigger a plugin event with this name when the DOM event is triggered\n * @param beforeDispatch Optional callback function to be invoked when the DOM event is triggered before trigger plugin event\n */\nexport const attachDomEvent: AttachDomEvent = (\n core: EditorCore,\n eventMap: Record\n) => {\n const disposers = getObjectKeys(eventMap || {}).map(key => {\n const { pluginEventType, beforeDispatch } = extractHandler(eventMap[key]);\n const eventName = key as keyof HTMLElementEventMap;\n let onEvent = (event: HTMLElementEventMap[typeof eventName]) => {\n if (beforeDispatch) {\n beforeDispatch(event);\n }\n if (pluginEventType != null) {\n core.api.triggerEvent(\n core,\n {\n eventType: pluginEventType,\n rawEvent: event,\n },\n false /*broadcast*/\n );\n }\n };\n\n core.contentDiv.addEventListener(eventName, onEvent);\n\n return () => {\n core.contentDiv.removeEventListener(eventName, onEvent);\n };\n });\n return () => disposers.forEach(disposers => disposers());\n};\n\nfunction extractHandler(handlerObj: DOMEventHandler): DOMEventHandlerObject {\n let result: DOMEventHandlerObject = {\n pluginEventType: null,\n beforeDispatch: null,\n };\n\n if (typeof handlerObj === 'number') {\n result.pluginEventType = handlerObj;\n } else if (typeof handlerObj === 'function') {\n result.beforeDispatch = handlerObj;\n } else if (typeof handlerObj === 'object') {\n result = handlerObj;\n }\n return result;\n}\n","import { addUndoSnapshot } from './addUndoSnapshot';\nimport { attachDomEvent } from './attachDomEvent';\nimport { CoreApiMap } from 'roosterjs-editor-types';\nimport { createPasteFragment } from './createPasteFragment';\nimport { ensureTypeInContainer } from './ensureTypeInContainer';\nimport { focus } from './focus';\nimport { getContent } from './getContent';\nimport { getPendableFormatState } from './getPendableFormatState';\nimport { getSelectionRange } from './getSelectionRange';\nimport { getSelectionRangeEx } from './getSelectionRangeEx';\nimport { getStyleBasedFormatState } from './getStyleBasedFormatState';\nimport { hasFocus } from './hasFocus';\nimport { insertNode } from './insertNode';\nimport { restoreUndoSnapshot } from './restoreUndoSnapshot';\nimport { select } from './select';\nimport { selectImage } from './selectImage';\nimport { selectRange } from './selectRange';\nimport { selectTable } from './selectTable';\nimport { setContent } from './setContent';\nimport { switchShadowEdit } from './switchShadowEdit';\nimport { transformColor } from './transformColor';\nimport { triggerEvent } from './triggerEvent';\n\n/**\n * @internal\n */\nexport const coreApiMap: CoreApiMap = {\n attachDomEvent,\n addUndoSnapshot,\n createPasteFragment,\n ensureTypeInContainer,\n focus,\n getContent,\n getSelectionRange,\n getSelectionRangeEx,\n getStyleBasedFormatState,\n getPendableFormatState,\n hasFocus,\n insertNode,\n restoreUndoSnapshot,\n select,\n selectRange,\n setContent,\n switchShadowEdit,\n transformColor,\n triggerEvent,\n selectTable,\n selectImage,\n};\n","import {\n createDefaultHtmlSanitizerOptions,\n createFragmentFromClipboardData,\n getPasteType,\n} from 'roosterjs-editor-dom';\nimport {\n BeforePasteEvent,\n ClipboardData,\n CreatePasteFragment,\n EditorCore,\n PluginEventType,\n NodePosition,\n PasteType,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Create a DocumentFragment for paste from a ClipboardData\n * @param core The EditorCore object.\n * @param clipboardData Clipboard data retrieved from clipboard\n * @param position The position to paste to\n * @param pasteAsText True to force use plain text as the content to paste, false to choose HTML or Image if any\n * @param applyCurrentStyle True if apply format of current selection to the pasted content,\n * false to keep original format\n */\nexport const createPasteFragment: CreatePasteFragment = (\n core: EditorCore,\n clipboardData: ClipboardData,\n position: NodePosition | null,\n pasteAsText: boolean,\n applyCurrentStyle: boolean,\n pasteAsImage: boolean = false\n) => {\n if (!clipboardData) {\n return null;\n }\n\n const pasteType = getPasteType(pasteAsText, applyCurrentStyle, pasteAsImage);\n\n // Step 1: Prepare BeforePasteEvent object\n const event = createBeforePasteEvent(core, clipboardData, pasteType);\n return createFragmentFromClipboardData(\n core,\n clipboardData,\n position,\n pasteAsText,\n applyCurrentStyle,\n pasteAsImage,\n event\n );\n};\n\nfunction createBeforePasteEvent(\n core: EditorCore,\n clipboardData: ClipboardData,\n pasteType: PasteType\n): BeforePasteEvent {\n const options = createDefaultHtmlSanitizerOptions();\n\n // Remove \"caret-color\" style generated by Safari to make sure caret shows in right color after paste\n options.cssStyleCallbacks['caret-color'] = () => false;\n\n return {\n eventType: PluginEventType.BeforePaste,\n clipboardData,\n fragment: core.contentDiv.ownerDocument.createDocumentFragment(),\n sanitizingOption: options,\n htmlBefore: '',\n htmlAfter: '',\n htmlAttributes: {},\n pasteType: pasteType,\n };\n}\n","import {\n ContentPosition,\n EditorCore,\n EnsureTypeInContainer,\n KnownCreateElementDataIndex,\n NodePosition,\n PositionType,\n} from 'roosterjs-editor-types';\nimport {\n applyFormat,\n createElement,\n createRange,\n findClosestElementAncestor,\n getBlockElementAtNode,\n isNodeEmpty,\n Position,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * When typing goes directly under content div, many things can go wrong\n * We fix it by wrapping it with a div and reposition cursor within the div\n */\nexport const ensureTypeInContainer: EnsureTypeInContainer = (\n core: EditorCore,\n position: NodePosition,\n keyboardEvent?: KeyboardEvent\n) => {\n const table = findClosestElementAncestor(position.node, core.contentDiv, 'table');\n let td: HTMLElement | null;\n\n if (table && (td = table.querySelector('td,th'))) {\n position = new Position(td, PositionType.Begin);\n }\n position = position.normalize();\n\n const block = getBlockElementAtNode(core.contentDiv, position.node);\n let formatNode: HTMLElement | null;\n\n if (block) {\n formatNode = block.collapseToSingleElement();\n if (isNodeEmpty(formatNode, false /* trimContent */, true /* shouldCountBrAsVisible */)) {\n const brEl = formatNode.ownerDocument.createElement('br');\n formatNode.append(brEl);\n }\n // if the block is empty, apply default format\n // Otherwise, leave it as it is as we don't want to change the style for existing data\n // unless the block was just created by the keyboard event (e.g. ctrl+a & start typing)\n const shouldSetNodeStyles =\n isNodeEmpty(formatNode) ||\n (keyboardEvent && wasNodeJustCreatedByKeyboardEvent(keyboardEvent, formatNode));\n formatNode = formatNode && shouldSetNodeStyles ? formatNode : null;\n } else {\n // Only reason we don't get the selection block is that we have an empty content div\n // which can happen when users removes everything (i.e. select all and DEL, or backspace from very end to begin)\n // The fix is to add a DIV wrapping, apply default format and move cursor over\n formatNode = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n core.contentDiv.ownerDocument\n ) as HTMLElement;\n core.api.insertNode(core, formatNode, {\n position: ContentPosition.End,\n updateCursor: false,\n replaceSelection: false,\n insertOnNewLine: false,\n });\n\n // element points to a wrapping node we added \"

    \". We should move the selection left to
    \n position = new Position(formatNode, PositionType.Begin);\n }\n\n if (formatNode && core.lifecycle.defaultFormat) {\n applyFormat(\n formatNode,\n core.lifecycle.defaultFormat,\n core.lifecycle.isDarkMode,\n core.darkColorHandler\n );\n }\n\n // If this is triggered by a keyboard event, let's select the new position\n if (keyboardEvent) {\n core.api.selectRange(core, createRange(new Position(position)));\n }\n};\n\nfunction wasNodeJustCreatedByKeyboardEvent(event: KeyboardEvent, formatNode: HTMLElement) {\n return (\n safeInstanceOf(event.target, 'Node') &&\n event.target.contains(formatNode) &&\n event.key === formatNode.innerText\n );\n}\n","import { createRange, getFirstLeafNode } from 'roosterjs-editor-dom';\nimport { EditorCore, Focus, PositionType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Focus to editor. If there is a cached selection range, use it as current selection\n * @param core The EditorCore object\n */\nexport const focus: Focus = (core: EditorCore) => {\n if (!core.lifecycle.shadowEditFragment) {\n if (\n !core.api.hasFocus(core) ||\n !core.api.getSelectionRange(core, false /*tryGetFromCache*/)\n ) {\n // Focus (document.activeElement indicates) and selection are mostly in sync, but could be out of sync in some extreme cases.\n // i.e. if you programmatically change window selection to point to a non-focusable DOM element (i.e. tabindex=-1 etc.).\n // On Chrome/Firefox, it does not change document.activeElement. On Edge/IE, it change document.activeElement to be body\n // Although on Chrome/Firefox, document.activeElement points to editor, you cannot really type which we don't want (no cursor).\n // So here we always do a live selection pull on DOM and make it point in Editor. The pitfall is, the cursor could be reset\n // to very begin to of editor since we don't really have last saved selection (created on blur which does not fire in this case).\n // It should be better than the case you cannot type\n if (\n !core.domEvent.selectionRange ||\n !core.api.selectRange(core, core.domEvent.selectionRange, true /*skipSameRange*/)\n ) {\n let node = getFirstLeafNode(core.contentDiv) || core.contentDiv;\n core.api.selectRange(\n core,\n createRange(node, PositionType.Begin),\n true /*skipSameRange*/\n );\n }\n }\n\n // remember to clear cached selection range\n core.domEvent.selectionRange = null;\n\n // This is more a fallback to ensure editor gets focus if it didn't manage to move focus to editor\n if (!core.api.hasFocus(core)) {\n core.contentDiv.focus();\n }\n }\n};\n","import {\n ColorTransformDirection,\n EditorCore,\n GetContent,\n GetContentMode,\n PluginEventType,\n} from 'roosterjs-editor-types';\nimport {\n createRange,\n getHtmlWithSelectionPath,\n getSelectionPath,\n getTextContent,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\nimport type { CompatibleGetContentMode } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Get current editor content as HTML string\n * @param core The EditorCore object\n * @param mode specify what kind of HTML content to retrieve\n * @returns HTML string representing current editor content\n */\nexport const getContent: GetContent = (\n core: EditorCore,\n mode: GetContentMode | CompatibleGetContentMode\n): string => {\n let content: string | null = '';\n const triggerExtractContentEvent = mode == GetContentMode.CleanHTML;\n const includeSelectionMarker = mode == GetContentMode.RawHTMLWithSelection;\n\n // When there is fragment for shadow edit, always use the cached fragment as document since HTML node in editor\n // has been changed by uncommitted shadow edit which should be ignored.\n const root = core.lifecycle.shadowEditFragment || core.contentDiv;\n\n if (mode == GetContentMode.PlainTextFast) {\n content = root.textContent;\n } else if (mode == GetContentMode.PlainText) {\n content = getTextContent(root);\n } else {\n const clonedRoot = cloneNode(root);\n clonedRoot.normalize();\n\n const originalRange = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n const path = !includeSelectionMarker\n ? null\n : core.lifecycle.shadowEditFragment\n ? core.lifecycle.shadowEditSelectionPath\n : originalRange\n ? getSelectionPath(core.contentDiv, originalRange)\n : null;\n const range = path && createRange(clonedRoot, path.start, path.end);\n\n core.api.transformColor(\n core,\n clonedRoot,\n false /*includeSelf*/,\n null /*callback*/,\n ColorTransformDirection.DarkToLight,\n true /*forceTransform*/,\n core.lifecycle.isDarkMode\n );\n\n if (triggerExtractContentEvent) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.ExtractContentWithDom,\n clonedRoot,\n },\n true /*broadcast*/\n );\n\n content = clonedRoot.innerHTML;\n } else if (range) {\n // range is not null, which means we want to include a selection path in the content\n content = getHtmlWithSelectionPath(clonedRoot, range);\n } else {\n content = clonedRoot.innerHTML;\n }\n }\n\n return content ?? '';\n};\n\nfunction cloneNode(node: HTMLElement | DocumentFragment): HTMLElement {\n let clonedNode: HTMLElement;\n if (safeInstanceOf(node, 'DocumentFragment')) {\n clonedNode = node.ownerDocument.createElement('div');\n clonedNode.appendChild(node.cloneNode(true /*deep*/));\n } else {\n clonedNode = node.cloneNode(true /*deep*/) as HTMLElement;\n }\n\n return clonedNode;\n}\n","import {\n contains,\n getObjectKeys,\n getTagOfNode,\n PendableFormatNames,\n Position,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n GetPendableFormatState,\n NodePosition,\n NodeType,\n PendableFormatState,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * @param core The EditorCore object\n * @param forceGetStateFromDOM If set to true, will force get the format state from DOM tree.\n * @returns The cached format state if it exists. If the cached position do not exist, search for pendable elements in the DOM tree and return the pendable format state.\n */\nexport const getPendableFormatState: GetPendableFormatState = (\n core: EditorCore,\n forceGetStateFromDOM: boolean\n): PendableFormatState => {\n const range = core.api.getSelectionRange(core, true /* tryGetFromCache*/);\n const cachedPendableFormatState = core.pendingFormatState.pendableFormatState;\n const cachedPosition = core.pendingFormatState.pendableFormatPosition?.normalize();\n const currentPosition = range && Position.getStart(range).normalize();\n const isSamePosition =\n currentPosition &&\n cachedPosition &&\n range.collapsed &&\n currentPosition.equalTo(cachedPosition);\n\n if (range && cachedPendableFormatState && isSamePosition && !forceGetStateFromDOM) {\n return cachedPendableFormatState;\n } else {\n return currentPosition ? queryCommandStateFromDOM(core, currentPosition) : {};\n }\n};\n\nconst PendableStyleCheckers: Record<\n PendableFormatNames,\n (tagName: string, style: CSSStyleDeclaration) => boolean\n> = {\n isBold: (tag, style) =>\n tag == 'B' ||\n tag == 'STRONG' ||\n tag == 'H1' ||\n tag == 'H2' ||\n tag == 'H3' ||\n tag == 'H4' ||\n tag == 'H5' ||\n tag == 'H6' ||\n parseInt(style.fontWeight) >= 700 ||\n ['bold', 'bolder'].indexOf(style.fontWeight) >= 0,\n isUnderline: (tag, style) => tag == 'U' || style.textDecoration.indexOf('underline') >= 0,\n isItalic: (tag, style) => tag == 'I' || tag == 'EM' || style.fontStyle === 'italic',\n isSubscript: (tag, style) => tag == 'SUB' || style.verticalAlign === 'sub',\n isSuperscript: (tag, style) => tag == 'SUP' || style.verticalAlign === 'super',\n isStrikeThrough: (tag, style) =>\n tag == 'S' || tag == 'STRIKE' || style.textDecoration.indexOf('line-through') >= 0,\n};\n\n/**\n * CssFalsyCheckers checks for non pendable format that might overlay a pendable format, then it can prevent getPendableFormatState return falsy pendable format states.\n */\n\nconst CssFalsyCheckers: Record boolean> = {\n isBold: style =>\n (style.fontWeight !== '' && parseInt(style.fontWeight) < 700) ||\n style.fontWeight === 'normal',\n isUnderline: style =>\n style.textDecoration !== '' && style.textDecoration.indexOf('underline') < 0,\n isItalic: style => style.fontStyle !== '' && style.fontStyle !== 'italic',\n isSubscript: style => style.verticalAlign !== '' && style.verticalAlign !== 'sub',\n isSuperscript: style => style.verticalAlign !== '' && style.verticalAlign !== 'super',\n isStrikeThrough: style =>\n style.textDecoration !== '' && style.textDecoration.indexOf('line-through') < 0,\n};\n\nfunction queryCommandStateFromDOM(\n core: EditorCore,\n currentPosition: NodePosition\n): PendableFormatState {\n let node: Node | null = currentPosition.node;\n let formatState: PendableFormatState = {};\n let pendableKeys: PendableFormatNames[] = [];\n while (node && contains(core.contentDiv, node)) {\n const tag = getTagOfNode(node);\n const style = node.nodeType == NodeType.Element && (node as HTMLElement).style;\n if (tag && style) {\n getObjectKeys(PendableStyleCheckers).forEach(key => {\n if (!(pendableKeys.indexOf(key) >= 0)) {\n formatState[key] = formatState[key] || PendableStyleCheckers[key](tag, style);\n if (CssFalsyCheckers[key](style)) {\n pendableKeys.push(key);\n }\n }\n });\n }\n node = node.parentNode;\n }\n return formatState;\n}\n","import { contains, createRange } from 'roosterjs-editor-dom';\nimport { EditorCore, GetSelectionRange } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Get current or cached selection range\n * @param core The EditorCore object\n * @param tryGetFromCache Set to true to retrieve the selection range from cache if editor doesn't own the focus now\n * @returns A Range object of the selection range\n */\nexport const getSelectionRange: GetSelectionRange = (\n core: EditorCore,\n tryGetFromCache: boolean\n) => {\n let result: Range | null = null;\n\n if (core.lifecycle.shadowEditFragment) {\n result =\n core.lifecycle.shadowEditSelectionPath &&\n createRange(\n core.contentDiv,\n core.lifecycle.shadowEditSelectionPath.start,\n core.lifecycle.shadowEditSelectionPath.end\n );\n\n return result;\n } else {\n if (!tryGetFromCache || core.api.hasFocus(core)) {\n let selection = core.contentDiv.ownerDocument.defaultView?.getSelection();\n if (selection && selection.rangeCount > 0) {\n let range = selection.getRangeAt(0);\n if (contains(core.contentDiv, range)) {\n result = range;\n }\n }\n }\n\n if (!result && tryGetFromCache) {\n result = core.domEvent.selectionRange;\n }\n\n return result;\n }\n};\n","import { contains, createRange, findClosestElementAncestor } from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n GetSelectionRangeEx,\n SelectionRangeEx,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Get current or cached selection range\n * @param core The EditorCore object\n * @returns A Range object of the selection range\n */\nexport const getSelectionRangeEx: GetSelectionRangeEx = (core: EditorCore) => {\n let result: SelectionRangeEx | null = null;\n if (core.lifecycle.shadowEditFragment) {\n const {\n shadowEditTableSelectionPath,\n shadowEditSelectionPath,\n shadowEditImageSelectionPath,\n } = core.lifecycle;\n\n if ((shadowEditTableSelectionPath?.length || 0) > 0) {\n const ranges = core.lifecycle.shadowEditTableSelectionPath!.map(path =>\n createRange(core.contentDiv, path.start, path.end)\n );\n\n return {\n type: SelectionRangeTypes.TableSelection,\n ranges,\n areAllCollapsed: checkAllCollapsed(ranges),\n table: findClosestElementAncestor(\n ranges[0].startContainer,\n core.contentDiv,\n 'table'\n ) as HTMLTableElement,\n coordinates: undefined,\n };\n } else if ((shadowEditImageSelectionPath?.length || 0) > 0) {\n const ranges = core.lifecycle.shadowEditImageSelectionPath!.map(path =>\n createRange(core.contentDiv, path.start, path.end)\n );\n return {\n type: SelectionRangeTypes.ImageSelection,\n ranges,\n areAllCollapsed: checkAllCollapsed(ranges),\n image: findClosestElementAncestor(\n ranges[0].startContainer,\n core.contentDiv,\n 'img'\n ) as HTMLImageElement,\n imageId: undefined,\n };\n } else {\n const shadowRange =\n shadowEditSelectionPath &&\n createRange(\n core.contentDiv,\n shadowEditSelectionPath.start,\n shadowEditSelectionPath.end\n );\n\n return createNormalSelectionEx(shadowRange ? [shadowRange] : []);\n }\n } else {\n if (core.api.hasFocus(core)) {\n if (core.domEvent.tableSelectionRange) {\n return core.domEvent.tableSelectionRange;\n }\n\n if (core.domEvent.imageSelectionRange) {\n return core.domEvent.imageSelectionRange;\n }\n\n let selection = core.contentDiv.ownerDocument.defaultView?.getSelection();\n if (!result && selection && selection.rangeCount > 0) {\n let range = selection.getRangeAt(0);\n if (contains(core.contentDiv, range)) {\n return createNormalSelectionEx([range]);\n }\n }\n }\n\n return (\n core.domEvent.tableSelectionRange ??\n core.domEvent.imageSelectionRange ??\n createNormalSelectionEx(\n core.domEvent.selectionRange ? [core.domEvent.selectionRange] : []\n )\n );\n }\n};\n\nfunction createNormalSelectionEx(ranges: Range[]): SelectionRangeEx {\n return {\n type: SelectionRangeTypes.Normal,\n ranges: ranges,\n areAllCollapsed: checkAllCollapsed(ranges),\n };\n}\n\nfunction checkAllCollapsed(ranges: Range[]): boolean {\n return ranges.filter(range => range?.collapsed).length == ranges.length;\n}\n","import { contains, getComputedStyles } from 'roosterjs-editor-dom';\r\nimport { EditorCore, GetStyleBasedFormatState, NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Get style based format state from current selection, including font name/size and colors\r\n * @param core The EditorCore objects\r\n * @param node The node to get style from\r\n */\r\nexport const getStyleBasedFormatState: GetStyleBasedFormatState = (\r\n core: EditorCore,\r\n node: Node | null\r\n) => {\r\n if (!node) {\r\n return {};\r\n }\r\n\r\n let override: string[] = [];\r\n const pendableFormatSpan = core.pendingFormatState.pendableFormatSpan;\r\n\r\n if (pendableFormatSpan) {\r\n override = [\r\n pendableFormatSpan.style.fontFamily,\r\n pendableFormatSpan.style.fontSize,\r\n pendableFormatSpan.style.color,\r\n pendableFormatSpan.style.backgroundColor,\r\n ];\r\n }\r\n\r\n const styles = node\r\n ? getComputedStyles(node, [\r\n 'font-family',\r\n 'font-size',\r\n 'color',\r\n 'background-color',\r\n 'line-height',\r\n 'margin-top',\r\n 'margin-bottom',\r\n 'text-align',\r\n 'direction',\r\n ])\r\n : [];\r\n const { contentDiv, darkColorHandler } = core;\r\n\r\n let styleTextColor: string | undefined;\r\n let styleBackColor: string | undefined;\r\n\r\n while (\r\n node &&\r\n contains(contentDiv, node, true /*treatSameNodeAsContain*/) &&\r\n !(styleTextColor && styleBackColor)\r\n ) {\r\n if (node.nodeType == NodeType.Element) {\r\n const element = node as HTMLElement;\r\n\r\n styleTextColor = styleTextColor || element.style.getPropertyValue('color');\r\n styleBackColor = styleBackColor || element.style.getPropertyValue('background-color');\r\n }\r\n node = node.parentNode;\r\n }\r\n\r\n if (!core.lifecycle.isDarkMode && node == core.contentDiv) {\r\n styleTextColor = styleTextColor || styles[2];\r\n styleBackColor = styleBackColor || styles[3];\r\n }\r\n\r\n const textColor = darkColorHandler.parseColorValue(override[2] || styleTextColor);\r\n const backColor = darkColorHandler.parseColorValue(override[3] || styleBackColor);\r\n\r\n return {\r\n fontName: override[0] || styles[0],\r\n fontSize: override[1] || styles[1],\r\n textColor: textColor.lightModeColor,\r\n backgroundColor: backColor.lightModeColor,\r\n textColors: textColor.darkModeColor\r\n ? {\r\n lightModeColor: textColor.lightModeColor,\r\n darkModeColor: textColor.darkModeColor,\r\n }\r\n : undefined,\r\n backgroundColors: backColor.darkModeColor\r\n ? {\r\n lightModeColor: backColor.lightModeColor,\r\n darkModeColor: backColor.darkModeColor,\r\n }\r\n : undefined,\r\n lineHeight: styles[4],\r\n marginTop: styles[5],\r\n marginBottom: styles[6],\r\n textAlign: styles[7],\r\n direction: styles[8],\r\n };\r\n};\r\n","import { contains } from 'roosterjs-editor-dom';\nimport { EditorCore, HasFocus } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Check if the editor has focus now\n * @param core The EditorCore object\n * @returns True if the editor has focus, otherwise false\n */\nexport const hasFocus: HasFocus = (core: EditorCore) => {\n let activeElement = core.contentDiv.ownerDocument.activeElement;\n return !!(\n activeElement && contains(core.contentDiv, activeElement, true /*treatSameNodeAsContain*/)\n );\n};\n","import {\n BlockElement,\n ContentPosition,\n ColorTransformDirection,\n EditorCore,\n InsertNode,\n InsertOption,\n NodeType,\n PositionType,\n NodePosition,\n RegionType,\n} from 'roosterjs-editor-types';\nimport {\n createRange,\n getBlockElementAtNode,\n getFirstLastBlockElement,\n isBlockElement,\n isVoidHtmlElement,\n Position,\n safeInstanceOf,\n toArray,\n wrap,\n adjustInsertPosition,\n getRegionsFromRange,\n splitTextNode,\n splitParentNode,\n} from 'roosterjs-editor-dom';\n\nfunction getInitialRange(\n core: EditorCore,\n option: InsertOption\n): { range: Range | null; rangeToRestore: Range | null } {\n // Selection start replaces based on the current selection.\n // Range inserts based on a provided range.\n // Both have the potential to use the current selection to restore cursor position\n // So in both cases we need to store the selection state.\n let range = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n let rangeToRestore = null;\n if (option.position == ContentPosition.Range) {\n rangeToRestore = range;\n range = option.range;\n } else if (range) {\n rangeToRestore = range.cloneRange();\n }\n\n return { range, rangeToRestore };\n}\n\n/**\n * @internal\n * Insert a DOM node into editor content\n * @param core The EditorCore object. No op if null.\n * @param option An insert option object to specify how to insert the node\n */\nexport const insertNode: InsertNode = (\n core: EditorCore,\n node: Node,\n option: InsertOption | null\n) => {\n option = option || {\n position: ContentPosition.SelectionStart,\n insertOnNewLine: false,\n updateCursor: true,\n replaceSelection: true,\n insertToRegionRoot: false,\n };\n let contentDiv = core.contentDiv;\n\n if (option.updateCursor) {\n core.api.focus(core);\n }\n\n if (option.position == ContentPosition.Outside) {\n contentDiv.parentNode?.insertBefore(node, contentDiv.nextSibling);\n return true;\n }\n\n core.api.transformColor(\n core,\n node,\n true /*includeSelf*/,\n () => {\n if (!option) {\n return;\n }\n switch (option.position) {\n case ContentPosition.Begin:\n case ContentPosition.End: {\n let isBegin = option.position == ContentPosition.Begin;\n let block = getFirstLastBlockElement(contentDiv, isBegin);\n let insertedNode: Node | Node[] | undefined;\n if (block) {\n let refNode = isBegin ? block.getStartNode() : block.getEndNode();\n if (\n option.insertOnNewLine ||\n refNode.nodeType == NodeType.Text ||\n isVoidHtmlElement(refNode)\n ) {\n // For insert on new line, or refNode is text or void html element (HR, BR etc.)\n // which cannot have children, i.e.
    hello
    world
    . 'hello', 'world' are the\n // first and last node. Insert before 'hello' or after 'world', but still inside DIV\n if (safeInstanceOf(node, 'DocumentFragment')) {\n // if the node to be inserted is DocumentFragment, use its childNodes as insertedNode\n // because insertBefore() returns an empty DocumentFragment\n insertedNode = toArray(node.childNodes);\n refNode.parentNode?.insertBefore(\n node,\n isBegin ? refNode : refNode.nextSibling\n );\n } else {\n insertedNode = refNode.parentNode?.insertBefore(\n node,\n isBegin ? refNode : refNode.nextSibling\n );\n }\n } else {\n // if the refNode can have child, use appendChild (which is like to insert as first/last child)\n // i.e.
    hello
    , the content will be inserted before/after hello\n insertedNode = refNode.insertBefore(\n node,\n isBegin ? refNode.firstChild : null\n );\n }\n } else {\n // No first block, this can happen when editor is empty. Use appendChild to insert the content in contentDiv\n insertedNode = contentDiv.appendChild(node);\n }\n\n // Final check to see if the inserted node is a block. If not block and the ask is to insert on new line,\n // add a DIV wrapping\n if (insertedNode && option.insertOnNewLine) {\n const nodes = Array.isArray(insertedNode) ? insertedNode : [insertedNode];\n if (!isBlockElement(nodes[0]) || !isBlockElement(nodes[nodes.length - 1])) {\n wrap(nodes);\n }\n }\n\n break;\n }\n case ContentPosition.DomEnd:\n // Use appendChild to insert the node at the end of the content div.\n let insertedNode = contentDiv.appendChild(node);\n // Final check to see if the inserted node is a block. If not block and the ask is to insert on new line,\n // add a DIV wrapping\n if (insertedNode && option.insertOnNewLine && !isBlockElement(insertedNode)) {\n wrap(insertedNode);\n }\n break;\n case ContentPosition.Range:\n case ContentPosition.SelectionStart:\n let { range, rangeToRestore } = getInitialRange(core, option);\n if (!range) {\n return;\n }\n\n // if to replace the selection and the selection is not collapsed, remove the the content at selection first\n if (option.replaceSelection && !range.collapsed) {\n range.deleteContents();\n }\n\n let pos: NodePosition = Position.getStart(range);\n let blockElement: BlockElement | null;\n\n if (option.insertOnNewLine && option.insertToRegionRoot) {\n pos = adjustInsertPositionRegionRoot(core, range, pos);\n } else if (\n option.insertOnNewLine &&\n (blockElement = getBlockElementAtNode(contentDiv, pos.normalize().node))\n ) {\n pos = adjustInsertPositionNewLine(blockElement, core, pos);\n } else {\n pos = adjustInsertPosition(contentDiv, node, pos, range);\n }\n\n let nodeForCursor =\n node.nodeType == NodeType.DocumentFragment ? node.lastChild : node;\n\n range = createRange(pos);\n range.insertNode(node);\n\n if (option.updateCursor && nodeForCursor) {\n rangeToRestore = createRange(\n new Position(nodeForCursor, PositionType.After).normalize()\n );\n }\n\n if (rangeToRestore) {\n core.api.selectRange(core, rangeToRestore);\n }\n\n break;\n }\n },\n ColorTransformDirection.LightToDark\n );\n\n return true;\n};\n\nfunction adjustInsertPositionRegionRoot(core: EditorCore, range: Range, position: NodePosition) {\n const region = getRegionsFromRange(core.contentDiv, range, RegionType.Table)[0];\n let node: Node | null = position.node;\n\n if (region) {\n if (node.nodeType == NodeType.Text && !position.isAtEnd) {\n node = splitTextNode(node as Text, position.offset, true /*returnFirstPart*/);\n }\n\n if (node != region.rootNode) {\n while (node && node.parentNode != region.rootNode) {\n splitParentNode(node, false /*splitBefore*/);\n node = node.parentNode;\n }\n }\n\n if (node) {\n position = new Position(node, PositionType.After);\n }\n }\n\n return position;\n}\n\nfunction adjustInsertPositionNewLine(blockElement: BlockElement, core: EditorCore, pos: Position) {\n let tempPos = new Position(blockElement.getEndNode(), PositionType.After);\n if (safeInstanceOf(tempPos.node, 'HTMLTableRowElement')) {\n const div = core.contentDiv.ownerDocument.createElement('div');\n const range = createRange(pos);\n range.insertNode(div);\n tempPos = new Position(div, PositionType.Begin);\n }\n return tempPos;\n}\n","import { getEntityFromElement, getEntitySelector, queryElements } from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n EntityOperation,\n PluginEventType,\n RestoreUndoSnapshot,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Restore an undo snapshot into editor\n * @param core The editor core object\n * @param step Steps to move, can be 0, positive or negative\n */\nexport const restoreUndoSnapshot: RestoreUndoSnapshot = (core: EditorCore, step: number) => {\n if (core.undo.hasNewContent && step < 0) {\n core.api.addUndoSnapshot(\n core,\n null /*callback*/,\n null /*changeSource*/,\n false /*canUndoByBackspace*/\n );\n }\n\n const snapshot = core.undo.snapshotsService.move(step);\n\n if (snapshot && snapshot.html != null) {\n try {\n core.undo.isRestoring = true;\n core.api.setContent(\n core,\n snapshot.html,\n true /*triggerContentChangedEvent*/,\n snapshot.metadata ?? undefined\n );\n\n const darkColorHandler = core.darkColorHandler;\n const isDarkModel = core.lifecycle.isDarkMode;\n\n snapshot.knownColors.forEach(color => {\n darkColorHandler.registerColor(\n color.lightModeColor,\n isDarkModel,\n color.darkModeColor\n );\n });\n\n snapshot.entityStates?.forEach(entityState => {\n const { type, id, state } = entityState;\n const wrapper = queryElements(\n core.contentDiv,\n getEntitySelector(type, id)\n )[0] as HTMLElement;\n const entity = wrapper && getEntityFromElement(wrapper);\n\n if (entity) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.EntityOperation,\n operation: EntityOperation.UpdateEntityState,\n entity: entity,\n state,\n },\n false\n );\n }\n });\n } finally {\n core.undo.isRestoring = false;\n }\n }\n};\n","import { contains, createRange, safeInstanceOf } from 'roosterjs-editor-dom';\nimport {\n NodePosition,\n PluginEventType,\n PositionType,\n Select,\n SelectionPath,\n SelectionRangeEx,\n SelectionRangeTypes,\n TableSelection,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Select content according to the given information.\n * There are a bunch of allowed combination of parameters. See IEditor.select for more details\n * @param core The editor core object\n * @param arg1 A DOM Range, or SelectionRangeEx, or NodePosition, or Node, or Selection Path\n * @param arg2 (optional) A NodePosition, or an offset number, or a PositionType, or a TableSelection\n * @param arg3 (optional) A Node\n * @param arg4 (optional) An offset number, or a PositionType\n */\nexport const select: Select = (core, arg1, arg2, arg3, arg4) => {\n let rangeEx: SelectionRangeEx | null = null;\n\n if (isSelectionRangeEx(arg1)) {\n rangeEx = arg1;\n } else if (safeInstanceOf(arg1, 'HTMLTableElement') && isTableSelectionOrNull(arg2)) {\n rangeEx = {\n type: SelectionRangeTypes.TableSelection,\n ranges: [],\n areAllCollapsed: false,\n table: arg1,\n coordinates: arg2 ?? undefined,\n };\n } else if (safeInstanceOf(arg1, 'HTMLImageElement') && typeof arg2 == 'undefined') {\n rangeEx = {\n type: SelectionRangeTypes.ImageSelection,\n ranges: [],\n areAllCollapsed: false,\n image: arg1,\n };\n } else {\n let range = !arg1\n ? null\n : safeInstanceOf(arg1, 'Range')\n ? arg1\n : isSelectionPath(arg1)\n ? createRange(core.contentDiv, arg1.start, arg1.end)\n : isNodePosition(arg1) || safeInstanceOf(arg1, 'Node')\n ? createRange(\n arg1,\n arg2,\n arg3,\n arg4\n )\n : null;\n\n rangeEx = range\n ? {\n type: SelectionRangeTypes.Normal,\n ranges: [range],\n areAllCollapsed: range.collapsed,\n }\n : null;\n }\n\n if (rangeEx) {\n switch (rangeEx.type) {\n case SelectionRangeTypes.TableSelection:\n if (contains(core.contentDiv, rangeEx.table)) {\n core.domEvent.imageSelectionRange = core.api.selectImage(core, null);\n core.domEvent.tableSelectionRange = core.api.selectTable(\n core,\n rangeEx.table,\n rangeEx.coordinates\n );\n rangeEx = core.domEvent.tableSelectionRange;\n }\n break;\n case SelectionRangeTypes.ImageSelection:\n if (contains(core.contentDiv, rangeEx.image)) {\n core.domEvent.tableSelectionRange = core.api.selectTable(core, null);\n core.domEvent.imageSelectionRange = core.api.selectImage(core, rangeEx.image);\n rangeEx = core.domEvent.imageSelectionRange;\n }\n break;\n case SelectionRangeTypes.Normal:\n core.domEvent.tableSelectionRange = core.api.selectTable(core, null);\n core.domEvent.imageSelectionRange = core.api.selectImage(core, null);\n\n if (contains(core.contentDiv, rangeEx.ranges[0])) {\n core.api.selectRange(core, rangeEx.ranges[0]);\n } else {\n rangeEx = null;\n }\n break;\n }\n\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.SelectionChanged,\n selectionRangeEx: rangeEx,\n },\n true /** broadcast **/\n );\n } else {\n core.domEvent.tableSelectionRange = core.api.selectTable(core, null);\n core.domEvent.imageSelectionRange = core.api.selectImage(core, null);\n }\n\n return !!rangeEx;\n};\n\nfunction isSelectionRangeEx(obj: any): obj is SelectionRangeEx {\n const rangeEx = obj as SelectionRangeEx;\n return (\n rangeEx &&\n typeof rangeEx == 'object' &&\n typeof rangeEx.type == 'number' &&\n Array.isArray(rangeEx.ranges)\n );\n}\n\nfunction isTableSelectionOrNull(obj: any): obj is TableSelection | null {\n const selection = obj as TableSelection | null;\n\n return (\n selection === null ||\n (selection &&\n typeof selection == 'object' &&\n typeof selection.firstCell == 'object' &&\n typeof selection.lastCell == 'object')\n );\n}\n\nfunction isSelectionPath(obj: any): obj is SelectionPath {\n const path = obj as SelectionPath;\n\n return path && typeof path == 'object' && Array.isArray(path.start) && Array.isArray(path.end);\n}\n\nfunction isNodePosition(obj: any): obj is NodePosition {\n const pos = obj as NodePosition;\n\n return (\n pos &&\n typeof pos == 'object' &&\n typeof pos.node == 'object' &&\n typeof pos.offset == 'number'\n );\n}\n","import addUniqueId from './utils/addUniqueId';\nimport {\n createRange,\n Position,\n removeGlobalCssStyle,\n removeImportantStyleRule,\n setGlobalCssStyles,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n ImageSelectionRange,\n PositionType,\n SelectImage,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\nconst IMAGE_ID = 'imageSelected';\nconst CONTENT_DIV_ID = 'contentDiv_';\nconst STYLE_ID = 'imageStyle';\nconst DEFAULT_SELECTION_BORDER_COLOR = '#DB626C';\n\n/**\n * @internal\n * Select a image and save data of the selected range\n * @param image Image to select\n * @returns Selected image information\n */\nexport const selectImage: SelectImage = (core: EditorCore, image: HTMLImageElement | null) => {\n unselect(core);\n\n let selection: ImageSelectionRange | null = null;\n\n if (image) {\n const range = createRange(image);\n\n addUniqueId(image, IMAGE_ID);\n addUniqueId(core.contentDiv, CONTENT_DIV_ID);\n\n core.api.selectRange(core, createRange(new Position(image, PositionType.After)));\n\n select(core, image);\n\n selection = {\n type: SelectionRangeTypes.ImageSelection,\n ranges: [range],\n image: image,\n areAllCollapsed: range.collapsed,\n };\n }\n\n return selection;\n};\n\nconst select = (core: EditorCore, image: HTMLImageElement) => {\n removeImportantStyleRule(image, ['border', 'margin']);\n const borderCSS = buildBorderCSS(core, image.id);\n setGlobalCssStyles(core.contentDiv.ownerDocument, borderCSS, STYLE_ID + core.contentDiv.id);\n};\n\nconst buildBorderCSS = (core: EditorCore, imageId: string): string => {\n const divId = core.contentDiv.id;\n const color = core.imageSelectionBorderColor || DEFAULT_SELECTION_BORDER_COLOR;\n\n return `#${divId} #${imageId} {outline-style: auto!important;outline-color: ${color}!important;caret-color: transparent!important;}`;\n};\n\nconst unselect = (core: EditorCore) => {\n const doc = core.contentDiv.ownerDocument;\n removeGlobalCssStyle(doc, STYLE_ID + core.contentDiv.id);\n};\n","import { EditorCore, SelectRange } from 'roosterjs-editor-types';\nimport { hasFocus } from './hasFocus';\nimport {\n contains,\n getPendableFormatState,\n Position,\n PendableFormatCommandMap,\n addRangeToSelection,\n getObjectKeys,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Change the editor selection to the given range\n * @param core The EditorCore object\n * @param range The range to select\n * @param skipSameRange When set to true, do nothing if the given range is the same with current selection\n * in editor, otherwise it will always remove current selection range and set to the given one.\n * This parameter is always treat as true in Edge to avoid some weird runtime exception.\n */\nexport const selectRange: SelectRange = (\n core: EditorCore,\n range: Range,\n skipSameRange?: boolean\n) => {\n if (!core.lifecycle.shadowEditSelectionPath && contains(core.contentDiv, range)) {\n addRangeToSelection(range, skipSameRange);\n\n if (!hasFocus(core)) {\n core.domEvent.selectionRange = range;\n }\n\n if (range.collapsed) {\n // If selected, and current selection is collapsed,\n // need to restore pending format state if exists.\n restorePendingFormatState(core);\n }\n\n return true;\n } else {\n return false;\n }\n};\n\n/**\n * Restore cached pending format state (if exist) to current selection\n */\nfunction restorePendingFormatState(core: EditorCore) {\n const {\n contentDiv,\n pendingFormatState,\n api: { getSelectionRange },\n } = core;\n\n if (pendingFormatState.pendableFormatState) {\n const document = contentDiv.ownerDocument;\n let formatState = getPendableFormatState(document);\n getObjectKeys(PendableFormatCommandMap).forEach(key => {\n if (!!pendingFormatState.pendableFormatState?.[key] != formatState[key]) {\n document.execCommand(\n PendableFormatCommandMap[key],\n false /* showUI */,\n undefined /* value */\n );\n }\n });\n\n const range = getSelectionRange(core, true /*tryGetFromCache*/);\n let position: Position | null = range && Position.getStart(range);\n if (position) {\n pendingFormatState.pendableFormatPosition = position;\n }\n }\n}\n","import addUniqueId from './utils/addUniqueId';\nimport {\n createRange,\n getTagOfNode,\n isWholeTableSelected,\n Position,\n removeGlobalCssStyle,\n removeImportantStyleRule,\n setGlobalCssStyles,\n toArray,\n VTable,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n SelectionRangeTypes,\n TableSelection,\n SelectTable,\n PositionType,\n Coordinates,\n} from 'roosterjs-editor-types';\n\nconst TABLE_ID = 'tableSelected';\nconst CONTENT_DIV_ID = 'contentDiv_';\nconst STYLE_ID = 'tableStyle';\nconst SELECTED_CSS_RULE =\n '{background-color: rgb(198,198,198) !important; caret-color: transparent}';\nconst MAX_RULE_SELECTOR_LENGTH = 9000;\n\n/**\n * @internal\n * Select a table and save data of the selected range\n * @param core The EditorCore object\n * @param table table to select\n * @param coordinates first and last cell of the selection, if this parameter is null, instead of\n * selecting, will unselect the table.\n * @returns true if successful\n */\nexport const selectTable: SelectTable = (\n core: EditorCore,\n table: HTMLTableElement | null,\n coordinates?: TableSelection\n) => {\n unselect(core);\n\n if (areValidCoordinates(coordinates) && table) {\n addUniqueId(table, TABLE_ID);\n addUniqueId(core.contentDiv, CONTENT_DIV_ID);\n\n const { ranges, isWholeTableSelected } = select(core, table, coordinates);\n if (!isMergedCell(table, coordinates)) {\n const cellToSelect = table.rows\n .item(coordinates.firstCell.y)\n ?.cells.item(coordinates.firstCell.x);\n\n if (cellToSelect) {\n core.api.selectRange(\n core,\n createRange(new Position(cellToSelect, PositionType.Begin))\n );\n }\n }\n\n return {\n type: SelectionRangeTypes.TableSelection,\n ranges,\n table,\n areAllCollapsed: ranges.filter(range => range?.collapsed).length == ranges.length,\n coordinates,\n isWholeTableSelected,\n };\n }\n\n return null;\n};\n\nfunction buildCss(\n table: HTMLTableElement,\n coordinates: TableSelection,\n contentDivSelector: string\n): { cssRules: string[]; ranges: Range[]; isWholeTableSelected: boolean } {\n const ranges: Range[] = [];\n const selectors: string[] = [];\n\n const vTable = new VTable(table);\n const isAllTableSelected = isWholeTableSelected(vTable, coordinates);\n if (isAllTableSelected) {\n handleAllTableSelected(contentDivSelector, vTable, selectors, ranges);\n } else {\n handleTableSelected(coordinates, vTable, contentDivSelector, selectors, ranges);\n }\n\n const cssRules: string[] = [];\n let currentRules: string = '';\n while (selectors.length > 0) {\n currentRules += (currentRules.length > 0 ? ',' : '') + selectors.shift() || '';\n if (\n currentRules.length + (selectors[0]?.length || 0) > MAX_RULE_SELECTOR_LENGTH ||\n selectors.length == 0\n ) {\n cssRules.push(currentRules + ' ' + SELECTED_CSS_RULE);\n currentRules = '';\n }\n }\n\n return { cssRules, ranges, isWholeTableSelected: isAllTableSelected };\n}\n\nfunction handleAllTableSelected(\n contentDivSelector: string,\n vTable: VTable,\n selectors: string[],\n ranges: Range[]\n) {\n const table = vTable.table;\n const tableSelector = contentDivSelector + ' #' + table.id;\n selectors.push(tableSelector, `${tableSelector} *`);\n\n const tableRange = new Range();\n tableRange.selectNode(table);\n ranges.push(tableRange);\n}\n\nfunction handleTableSelected(\n coordinates: TableSelection,\n vTable: VTable,\n contentDivSelector: string,\n selectors: string[],\n ranges: Range[]\n) {\n const tr1 = coordinates.firstCell.y;\n const td1 = coordinates.firstCell.x;\n const tr2 = coordinates.lastCell.y;\n const td2 = coordinates.lastCell.x;\n const table = vTable.table;\n\n let firstSelected: HTMLTableCellElement | null = null;\n let lastSelected: HTMLTableCellElement | null = null;\n // Get whether table has thead, tbody or tfoot.\n const tableChildren = toArray(table.childNodes).filter(\n node => ['THEAD', 'TBODY', 'TFOOT'].indexOf(getTagOfNode(node)) > -1\n );\n // Set the start and end of each of the table children, so we can build the selector according the element between the table and the row.\n let cont = 0;\n const indexes = tableChildren.map(node => {\n const result = {\n el: getTagOfNode(node),\n start: cont,\n end: node.childNodes.length + cont,\n };\n\n cont = result.end;\n return result;\n });\n\n vTable.cells?.forEach((row, rowIndex) => {\n let tdCount = 0;\n firstSelected = null;\n lastSelected = null;\n\n //Get current TBODY/THEAD/TFOOT\n const midElement = indexes.filter(ind => ind.start <= rowIndex && ind.end > rowIndex)[0];\n\n const middleElSelector = midElement ? '>' + midElement.el + '>' : '>';\n const currentRow =\n midElement && rowIndex + 1 >= midElement.start\n ? rowIndex + 1 - midElement.start\n : rowIndex + 1;\n\n for (let cellIndex = 0; cellIndex < row.length; cellIndex++) {\n const cell = row[cellIndex].td;\n if (cell) {\n tdCount++;\n if (rowIndex >= tr1 && rowIndex <= tr2 && cellIndex >= td1 && cellIndex <= td2) {\n removeImportant(cell);\n\n const selector = generateCssFromCell(\n contentDivSelector,\n table.id,\n middleElSelector,\n currentRow,\n getTagOfNode(cell),\n tdCount\n );\n const elementsSelector = selector + ' *';\n\n selectors.push(selector, elementsSelector);\n firstSelected = firstSelected || table.querySelector(selector);\n lastSelected = table.querySelector(selector);\n }\n }\n }\n\n if (firstSelected && lastSelected) {\n const rowRange = new Range();\n rowRange.setStartBefore(firstSelected);\n rowRange.setEndAfter(lastSelected);\n ranges.push(rowRange);\n }\n });\n}\n\nfunction select(\n core: EditorCore,\n table: HTMLTableElement,\n coordinates: TableSelection\n): { ranges: Range[]; isWholeTableSelected: boolean } {\n const contentDivSelector = '#' + core.contentDiv.id;\n let { cssRules, ranges, isWholeTableSelected } = buildCss(\n table,\n coordinates,\n contentDivSelector\n );\n cssRules.forEach(css =>\n setGlobalCssStyles(core.contentDiv.ownerDocument, css, STYLE_ID + core.contentDiv.id)\n );\n\n return { ranges, isWholeTableSelected };\n}\n\nconst unselect = (core: EditorCore) => {\n const doc = core.contentDiv.ownerDocument;\n removeGlobalCssStyle(doc, STYLE_ID + core.contentDiv.id);\n};\n\nfunction generateCssFromCell(\n contentDivSelector: string,\n tableId: string,\n middleElSelector: string,\n rowIndex: number,\n cellTag: string,\n index: number\n): string {\n return (\n contentDivSelector +\n ' #' +\n tableId +\n middleElSelector +\n ' tr:nth-child(' +\n rowIndex +\n ')>' +\n cellTag +\n ':nth-child(' +\n index +\n ')'\n );\n}\n\nfunction removeImportant(cell: HTMLTableCellElement) {\n if (cell) {\n removeImportantStyleRule(cell, ['background-color', 'background']);\n }\n}\n\nfunction areValidCoordinates(input?: TableSelection): input is TableSelection {\n if (input) {\n const { firstCell, lastCell } = input || {};\n if (firstCell && lastCell) {\n const handler = (coordinate: Coordinates) =>\n isValidCoordinate(coordinate.x) && isValidCoordinate(coordinate.y);\n return handler(firstCell) && handler(lastCell);\n }\n }\n\n return false;\n}\n\nfunction isValidCoordinate(input: number): boolean {\n return (!!input || input == 0) && input > -1;\n}\n\nfunction isMergedCell(table: HTMLTableElement, coordinates: TableSelection): boolean {\n const { firstCell } = coordinates;\n return !(table.rows.item(firstCell.y) && table.rows.item(firstCell.y)?.cells.item(firstCell.x));\n}\n","import {\n createRange,\n extractContentMetadata,\n queryElements,\n restoreContentWithEntityPlaceholder,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ColorTransformDirection,\n ContentMetadata,\n EditorCore,\n PluginEventType,\n SelectionRangeTypes,\n SetContent,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Set HTML content to this editor. All existing content will be replaced. A ContentChanged event will be triggered\n * if triggerContentChangedEvent is set to true\n * @param core The EditorCore object\n * @param content HTML content to set in\n * @param triggerContentChangedEvent True to trigger a ContentChanged event. Default value is true\n * @param metadata @optional Metadata of the content that helps editor know the selection and color mode.\n * If not passed, we will treat content as in light mode without selection\n */\nexport const setContent: SetContent = (\n core: EditorCore,\n content: string,\n triggerContentChangedEvent: boolean,\n metadata?: ContentMetadata\n) => {\n let contentChanged = false;\n if (core.contentDiv.innerHTML != content) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.BeforeSetContent,\n newContent: content,\n },\n true /*broadcast*/\n );\n\n const entities = core.entity.entityMap;\n const html = content || '';\n const body = new DOMParser().parseFromString(\n core.trustedHTMLHandler?.(html) ?? html,\n 'text/html'\n ).body;\n\n restoreContentWithEntityPlaceholder(body, core.contentDiv, entities);\n\n const metadataFromContent = extractContentMetadata(core.contentDiv);\n metadata = metadata || metadataFromContent;\n selectContentMetadata(core, metadata);\n contentChanged = true;\n }\n\n const isDarkMode = core.lifecycle.isDarkMode;\n\n if ((!metadata && isDarkMode) || (metadata && !!metadata.isDarkMode != !!isDarkMode)) {\n core.api.transformColor(\n core,\n core.contentDiv,\n false /*includeSelf*/,\n null /*callback*/,\n isDarkMode ? ColorTransformDirection.LightToDark : ColorTransformDirection.DarkToLight,\n true /*forceTransform*/,\n metadata?.isDarkMode\n );\n contentChanged = true;\n }\n\n if (triggerContentChangedEvent && contentChanged) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.ContentChanged,\n source: ChangeSource.SetContent,\n },\n false /*broadcast*/\n );\n }\n};\n\nfunction selectContentMetadata(core: EditorCore, metadata: ContentMetadata | undefined) {\n if (!core.lifecycle.shadowEditSelectionPath && metadata) {\n core.domEvent.tableSelectionRange = null;\n core.domEvent.imageSelectionRange = null;\n core.domEvent.selectionRange = null;\n\n switch (metadata.type) {\n case SelectionRangeTypes.Normal:\n core.api.selectTable(core, null);\n core.api.selectImage(core, null);\n\n const range = createRange(core.contentDiv, metadata.start, metadata.end);\n core.api.selectRange(core, range);\n break;\n case SelectionRangeTypes.TableSelection:\n const table = queryElements(\n core.contentDiv,\n '#' + metadata.tableId\n )[0] as HTMLTableElement;\n\n if (table) {\n core.domEvent.tableSelectionRange = core.api.selectTable(core, table, metadata);\n }\n break;\n case SelectionRangeTypes.ImageSelection:\n const image = queryElements(\n core.contentDiv,\n '#' + metadata.imageId\n )[0] as HTMLImageElement;\n\n if (image) {\n core.domEvent.imageSelectionRange = core.api.selectImage(core, image);\n }\n break;\n }\n }\n}\n","import {\n createRange,\n getSelectionPath,\n moveContentWithEntityPlaceholders,\n restoreContentWithEntityPlaceholder,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n PluginEventType,\n SelectionRangeEx,\n SelectionRangeTypes,\n SwitchShadowEdit,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport const switchShadowEdit: SwitchShadowEdit = (core: EditorCore, isOn: boolean): void => {\n const { lifecycle, contentDiv } = core;\n let {\n shadowEditEntities,\n shadowEditFragment,\n shadowEditSelectionPath,\n shadowEditTableSelectionPath,\n shadowEditImageSelectionPath,\n } = lifecycle;\n const wasInShadowEdit = !!shadowEditFragment;\n\n const getShadowEditSelectionPath = (\n selectionType: SelectionRangeTypes,\n shadowEditSelection?: SelectionRangeEx\n ) => {\n return (\n (shadowEditSelection?.type == selectionType &&\n shadowEditSelection.ranges\n .map(range => getSelectionPath(contentDiv, range))\n .map(w => w!!)) ||\n null\n );\n };\n\n if (isOn) {\n if (!wasInShadowEdit) {\n const selection = core.api.getSelectionRangeEx(core);\n const range = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n\n shadowEditSelectionPath = range && getSelectionPath(contentDiv, range);\n shadowEditTableSelectionPath = getShadowEditSelectionPath(\n SelectionRangeTypes.TableSelection,\n selection\n );\n shadowEditImageSelectionPath = getShadowEditSelectionPath(\n SelectionRangeTypes.ImageSelection,\n selection\n );\n\n shadowEditEntities = {};\n shadowEditFragment = moveContentWithEntityPlaceholders(contentDiv, shadowEditEntities);\n\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.EnteredShadowEdit,\n fragment: shadowEditFragment,\n selectionPath: shadowEditSelectionPath,\n },\n false /*broadcast*/\n );\n\n lifecycle.shadowEditFragment = shadowEditFragment;\n lifecycle.shadowEditSelectionPath = shadowEditSelectionPath;\n lifecycle.shadowEditTableSelectionPath = shadowEditTableSelectionPath;\n lifecycle.shadowEditImageSelectionPath = shadowEditImageSelectionPath;\n lifecycle.shadowEditEntities = shadowEditEntities;\n }\n\n if (lifecycle.shadowEditFragment) {\n restoreContentWithEntityPlaceholder(\n lifecycle.shadowEditFragment,\n contentDiv,\n lifecycle.shadowEditEntities,\n true /*insertClonedNode*/\n );\n }\n } else {\n lifecycle.shadowEditFragment = null;\n lifecycle.shadowEditSelectionPath = null;\n lifecycle.shadowEditEntities = null;\n\n if (wasInShadowEdit) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.LeavingShadowEdit,\n },\n false /*broadcast*/\n );\n\n if (shadowEditFragment) {\n restoreContentWithEntityPlaceholder(\n shadowEditFragment,\n contentDiv,\n shadowEditEntities\n );\n }\n core.api.focus(core);\n\n if (shadowEditSelectionPath) {\n core.api.selectRange(\n core,\n createRange(\n contentDiv,\n shadowEditSelectionPath.start,\n shadowEditSelectionPath.end\n )\n );\n }\n\n if (core.domEvent.imageSelectionRange) {\n const { image } = core.domEvent.imageSelectionRange;\n const imageElement = core.contentDiv.querySelector('#' + image.id);\n if (imageElement) {\n core.api.selectImage(core, image);\n }\n }\n\n if (core.domEvent.tableSelectionRange) {\n const { table, coordinates } = core.domEvent.tableSelectionRange;\n const tableId = table.id;\n const tableElement = core.contentDiv.querySelector('#' + tableId);\n if (table) {\n core.domEvent.tableSelectionRange = core.api.selectTable(\n core,\n tableElement as HTMLTableElement,\n coordinates\n );\n }\n }\n }\n }\n};\n","import { ColorTransformDirection, EditorCore, TransformColor } from 'roosterjs-editor-types';\nimport type { CompatibleColorTransformDirection } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Edit and transform color of elements between light mode and dark mode\n * @param core The EditorCore object\n * @param rootNode The root HTML elements to transform\n * @param includeSelf True to transform the root node as well, otherwise false\n * @param callback The callback function to invoke before do color transformation\n * @param direction To specify the transform direction, light to dark, or dark to light\n * @param forceTransform By default this function will only work when editor core is in dark mode.\n * Pass true to this value to force do color transformation even editor core is in light mode\n */\nexport const transformColor: TransformColor = (\n core: EditorCore,\n rootNode: Node | null,\n includeSelf: boolean,\n callback: (() => void) | null,\n direction: ColorTransformDirection | CompatibleColorTransformDirection,\n forceTransform?: boolean,\n fromDarkMode: boolean = false\n) => {\n const {\n darkColorHandler,\n lifecycle: { onExternalContentTransform },\n } = core;\n const toDarkMode = direction == ColorTransformDirection.LightToDark;\n if (rootNode && (forceTransform || core.lifecycle.isDarkMode)) {\n const transformer = onExternalContentTransform\n ? (element: HTMLElement) => {\n onExternalContentTransform(element, fromDarkMode, toDarkMode, darkColorHandler);\n }\n : (element: HTMLElement) => {\n darkColorHandler.transformElementColor(element, fromDarkMode, toDarkMode);\n };\n\n iterateElements(rootNode, transformer, includeSelf);\n }\n\n callback?.();\n};\n\nfunction iterateElements(\n root: Node,\n transformer: (element: HTMLElement) => void,\n includeSelf?: boolean\n) {\n if (includeSelf && isHTMLElement(root)) {\n transformer(root);\n }\n\n for (let child = root.firstChild; child; child = child.nextSibling) {\n if (isHTMLElement(child)) {\n transformer(child);\n }\n\n iterateElements(child, transformer);\n }\n}\n\n// This is not a strict check, we just need to make sure this element has style so that we can set style to it\n// We don't use safeInstanceOf() here since this function will be called very frequently when extract html content\n// in dark mode, so we need to make sure this check is fast enough\nfunction isHTMLElement(node: Node): node is HTMLElement {\n const htmlElement = node;\n return node.nodeType == Node.ELEMENT_NODE && !!htmlElement.style;\n}\n","import {\n EditorCore,\n EditorPlugin,\n PluginEvent,\n PluginEventType,\n TriggerEvent,\n} from 'roosterjs-editor-types';\nimport type { CompatiblePluginEventType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst allowedEventsInShadowEdit: (PluginEventType | CompatiblePluginEventType)[] = [\n PluginEventType.EditorReady,\n PluginEventType.BeforeDispose,\n PluginEventType.ExtractContentWithDom,\n PluginEventType.ZoomChanged,\n];\n\n/**\n * @internal\n * Trigger a plugin event\n * @param core The EditorCore object\n * @param pluginEvent The event object to trigger\n * @param broadcast Set to true to skip the shouldHandleEventExclusively check\n */\nexport const triggerEvent: TriggerEvent = (\n core: EditorCore,\n pluginEvent: PluginEvent,\n broadcast: boolean\n) => {\n if (\n (!core.lifecycle.shadowEditFragment ||\n allowedEventsInShadowEdit.indexOf(pluginEvent.eventType) >= 0) &&\n (broadcast || !core.plugins.some(plugin => handledExclusively(pluginEvent, plugin)))\n ) {\n core.plugins.forEach(plugin => {\n if (plugin.onPluginEvent) {\n plugin.onPluginEvent(pluginEvent);\n }\n });\n }\n};\n\nfunction handledExclusively(event: PluginEvent, plugin: EditorPlugin): boolean {\n if (plugin.onPluginEvent && plugin.willHandleEventExclusively?.(event)) {\n plugin.onPluginEvent(event);\n return true;\n }\n\n return false;\n}\n","/**\n * Add an unique id to element and ensure that is unique\n * @param el The HTMLElement that will receive the id\n * @param idPrefix The prefix that will antecede the id (Ex: tableSelected01)\n */\nexport default function addUniqueId(el: HTMLElement, idPrefix: string) {\n const doc = el.ownerDocument;\n if (!el.id) {\n applyId(el, idPrefix, doc);\n } else {\n const elements = doc.querySelectorAll(`#${el.id}`);\n if (elements.length > 1) {\n el.removeAttribute('id');\n applyId(el, idPrefix, doc);\n }\n }\n}\n\nfunction applyId(el: HTMLElement, idPrefix: string, doc: Document) {\n let cont = 0;\n const getElement = () => doc.getElementById(idPrefix + cont);\n //Ensure that there are no elements with the same ID\n let element = getElement();\n while (element) {\n cont++;\n element = getElement();\n }\n\n el.id = idPrefix + cont;\n}\n","import { forEachSelectedCell } from './utils/forEachSelectedCell';\nimport { removeCellsOutsideSelection } from './utils/removeCellsOutsideSelection';\nimport {\n addRangeToSelection,\n createElement,\n extractClipboardEvent,\n moveChildNodes,\n Browser,\n setHtmlWithMetadata,\n createRange,\n VTable,\n isWholeTableSelected,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n CopyPastePluginState,\n EditorOptions,\n GetContentMode,\n IEditor,\n PluginEventType,\n PluginWithState,\n KnownCreateElementDataIndex,\n SelectionRangeEx,\n SelectionRangeTypes,\n TableSelection,\n TableOperation,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Copy and paste plugin for handling onCopy and onPaste event\n */\nexport default class CopyPastePlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n private state: CopyPastePluginState;\n\n /**\n * Construct a new instance of CopyPastePlugin\n * @param options The editor options\n */\n constructor(options: EditorOptions) {\n this.state = {\n allowedCustomPasteType: options.allowedCustomPasteType || [],\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'CopyPaste';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler({\n paste: e => this.onPaste(e),\n copy: e => this.onCutCopy(e, false /*isCut*/),\n cut: e => this.onCutCopy(e, true /*isCut*/),\n });\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n if (this.disposer) {\n this.disposer();\n }\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n private onCutCopy(event: Event, isCut: boolean) {\n if (this.editor) {\n const selection = this.editor.getSelectionRangeEx();\n if (selection && !selection.areAllCollapsed) {\n const html = this.editor.getContent(GetContentMode.RawHTMLWithSelection);\n const tempDiv = this.getTempDiv(this.editor, true /*forceInLightMode*/);\n const metadata = setHtmlWithMetadata(\n tempDiv,\n html,\n this.editor.getTrustedHTMLHandler()\n );\n let newRange: Range | null = null;\n\n if (\n selection.type === SelectionRangeTypes.TableSelection &&\n selection.coordinates\n ) {\n const table = tempDiv.querySelector(\n `#${selection.table.id}`\n ) as HTMLTableElement;\n newRange = this.createTableRange(table, selection.coordinates);\n if (isCut) {\n this.deleteTableContent(\n this.editor,\n selection.table,\n selection.coordinates\n );\n }\n } else if (selection.type === SelectionRangeTypes.ImageSelection) {\n const image = tempDiv.querySelector('#' + selection.image.id);\n\n if (image) {\n newRange = createRange(image);\n if (isCut) {\n this.deleteImage(this.editor, selection.image.id);\n }\n }\n } else {\n newRange =\n metadata?.type === SelectionRangeTypes.Normal\n ? createRange(tempDiv, metadata.start, metadata.end)\n : null;\n }\n if (newRange) {\n const cutCopyEvent = this.editor.triggerPluginEvent(\n PluginEventType.BeforeCutCopy,\n {\n clonedRoot: tempDiv,\n range: newRange,\n rawEvent: event as ClipboardEvent,\n isCut,\n }\n );\n\n if (cutCopyEvent.range) {\n addRangeToSelection(newRange);\n }\n\n this.editor.runAsync(editor => {\n this.cleanUpAndRestoreSelection(tempDiv, selection, !isCut /* isCopy */);\n\n if (isCut) {\n editor.addUndoSnapshot(() => {\n const position = editor.deleteSelectedContent();\n editor.focus();\n editor.select(position);\n }, ChangeSource.Cut);\n }\n });\n }\n }\n }\n }\n\n private onPaste = (event: Event) => {\n let range: Range | null = null;\n if (this.editor) {\n const editor = this.editor;\n extractClipboardEvent(\n event as ClipboardEvent,\n clipboardData => {\n if (editor && !editor.isDisposed()) {\n editor.paste(clipboardData);\n }\n },\n {\n allowedCustomPasteType: this.state.allowedCustomPasteType,\n getTempDiv: () => {\n range = editor.getSelectionRange() ?? null;\n return this.getTempDiv(editor);\n },\n removeTempDiv: div => {\n if (range) {\n this.cleanUpAndRestoreSelection(div, range, false /* isCopy */);\n }\n },\n },\n this.editor.getSelectionRange() ?? undefined\n );\n }\n };\n\n private getTempDiv(editor: IEditor, forceInLightMode?: boolean) {\n const div = editor.getCustomData(\n 'CopyPasteTempDiv',\n () => {\n const tempDiv = createElement(\n KnownCreateElementDataIndex.CopyPasteTempDiv,\n editor.getDocument()\n ) as HTMLDivElement;\n\n editor.getDocument().body.appendChild(tempDiv);\n\n return tempDiv;\n },\n tempDiv => tempDiv.parentNode?.removeChild(tempDiv)\n );\n\n if (forceInLightMode) {\n div.style.backgroundColor = 'white';\n div.style.color = 'black';\n }\n\n div.style.display = '';\n div.focus();\n\n return div;\n }\n\n private cleanUpAndRestoreSelection(\n tempDiv: HTMLDivElement,\n range: Range | SelectionRangeEx,\n isCopy: boolean\n ) {\n if (!!(range)?.type || (range).type == 0) {\n const selection = range;\n switch (selection.type) {\n case SelectionRangeTypes.TableSelection:\n case SelectionRangeTypes.ImageSelection:\n this.editor?.select(selection);\n break;\n case SelectionRangeTypes.Normal:\n const range = selection.ranges?.[0];\n this.restoreRange(range, isCopy);\n break;\n }\n } else {\n this.restoreRange(range, isCopy);\n }\n\n tempDiv.style.backgroundColor = '';\n tempDiv.style.color = '';\n tempDiv.style.display = 'none';\n moveChildNodes(tempDiv);\n }\n\n private restoreRange(range: Range, isCopy: boolean) {\n if (range && this.editor) {\n if (isCopy && Browser.isAndroid) {\n range.collapse();\n }\n this.editor.select(range);\n }\n }\n\n private createTableRange(table: HTMLTableElement, selection: TableSelection) {\n const clonedVTable = new VTable(table as HTMLTableElement);\n clonedVTable.selection = selection;\n removeCellsOutsideSelection(clonedVTable);\n clonedVTable.writeBack();\n return createRange(clonedVTable.table);\n }\n\n private deleteTableContent(\n editor: IEditor,\n table: HTMLTableElement,\n selection: TableSelection\n ) {\n const selectedVTable = new VTable(table);\n selectedVTable.selection = selection;\n\n forEachSelectedCell(selectedVTable, cell => {\n if (cell?.td) {\n cell.td.innerHTML = editor.getTrustedHTMLHandler()('
    ');\n }\n });\n\n const wholeTableSelected = isWholeTableSelected(selectedVTable, selection);\n const isWholeColumnSelected =\n table.rows.length - 1 === selection.lastCell.y && selection.firstCell.y === 0;\n if (wholeTableSelected) {\n selectedVTable.edit(TableOperation.DeleteTable);\n selectedVTable.writeBack();\n } else if (isWholeColumnSelected) {\n selectedVTable.edit(TableOperation.DeleteColumn);\n selectedVTable.writeBack();\n }\n if (wholeTableSelected || isWholeColumnSelected) {\n table.style.removeProperty('width');\n table.style.removeProperty('height');\n }\n }\n\n private deleteImage(editor: IEditor, imageId: string) {\n editor.queryElements('#' + imageId, node => {\n editor.deleteNode(node);\n });\n }\n}\n","import { arrayPush, Browser, isCharacterValue } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ContextMenuProvider,\n DOMEventHandler,\n DOMEventPluginState,\n EditorOptions,\n EditorPlugin,\n IEditor,\n Keys,\n PluginEventType,\n PluginWithState,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * DOMEventPlugin handles customized DOM events, including:\n * 1. Keyboard event\n * 2. Mouse event\n * 3. IME state\n * 4. Drop event\n * 5. Focus and blur event\n * 6. Input event\n * 7. Scroll event\n * It contains special handling for Safari since Safari cannot get correct selection when onBlur event is triggered in editor.\n */\nexport default class DOMEventPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n private state: DOMEventPluginState;\n\n /**\n * Construct a new instance of DOMEventPlugin\n * @param options The editor options\n * @param contentDiv The editor content DIV\n */\n constructor(options: EditorOptions, contentDiv: HTMLDivElement) {\n this.state = {\n isInIME: false,\n scrollContainer: options.scrollContainer || contentDiv,\n selectionRange: null,\n stopPrintableKeyboardEventPropagation: !options.allowKeyboardEventPropagation,\n contextMenuProviders:\n options.plugins?.filter>(isContextMenuProvider) || [],\n tableSelectionRange: null,\n imageSelectionRange: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'DOMEvent';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n\n const document = this.editor.getDocument();\n //Record\n const eventHandlers: Partial<\n { [P in keyof HTMLElementEventMap]: DOMEventHandler }\n > = {\n // 1. Keyboard event\n keypress: this.getEventHandler(PluginEventType.KeyPress),\n keydown: this.getEventHandler(PluginEventType.KeyDown),\n keyup: this.getEventHandler(PluginEventType.KeyUp),\n\n // 2. Mouse event\n mousedown: PluginEventType.MouseDown,\n contextmenu: this.onContextMenuEvent,\n\n // 3. IME state management\n compositionstart: () => (this.state.isInIME = true),\n compositionend: (rawEvent: CompositionEvent) => {\n this.state.isInIME = false;\n editor.triggerPluginEvent(PluginEventType.CompositionEnd, {\n rawEvent,\n });\n },\n\n // 4. Drop event\n drop: this.onDrop,\n\n // 5. Focus management\n focus: this.onFocus,\n\n // 6. Input event\n [Browser.isIE ? 'textinput' : 'input']: this.getEventHandler(PluginEventType.Input),\n };\n\n // 7. onBlur handlers\n if (Browser.isSafari) {\n document.addEventListener('mousedown', this.onMouseDownDocument, true /*useCapture*/);\n document.addEventListener('keydown', this.onKeyDownDocument);\n document.defaultView?.addEventListener('blur', this.cacheSelection);\n } else if (Browser.isIEOrEdge) {\n type EventHandlersIE = {\n beforedeactivate: DOMEventHandler;\n };\n (eventHandlers as EventHandlersIE).beforedeactivate = this.cacheSelection;\n } else {\n eventHandlers.blur = this.cacheSelection;\n }\n\n this.disposer = editor.addDomEventHandler(>eventHandlers);\n\n // 8. Scroll event\n this.state.scrollContainer.addEventListener('scroll', this.onScroll);\n document.defaultView?.addEventListener('scroll', this.onScroll);\n document.defaultView?.addEventListener('resize', this.onScroll);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n const document = this.editor?.getDocument();\n if (document && Browser.isSafari) {\n document.removeEventListener(\n 'mousedown',\n this.onMouseDownDocument,\n true /*useCapture*/\n );\n document.removeEventListener('keydown', this.onKeyDownDocument);\n document.defaultView?.removeEventListener('blur', this.cacheSelection);\n }\n\n document?.defaultView?.removeEventListener('resize', this.onScroll);\n document?.defaultView?.removeEventListener('scroll', this.onScroll);\n this.state.scrollContainer.removeEventListener('scroll', this.onScroll);\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n private onDrop = () => {\n this.editor?.runAsync(editor => {\n editor.addUndoSnapshot(() => {}, ChangeSource.Drop);\n });\n };\n\n private onFocus = () => {\n const { table, coordinates } = this.state.tableSelectionRange || {};\n const { image } = this.state.imageSelectionRange || {};\n\n if (table && coordinates) {\n this.editor?.select(table, coordinates);\n } else if (image) {\n this.editor?.select(image);\n } else if (this.state.selectionRange) {\n this.editor?.select(this.state.selectionRange);\n }\n\n this.state.selectionRange = null;\n };\n private onKeyDownDocument = (event: KeyboardEvent) => {\n if (event.which == Keys.TAB && !event.defaultPrevented) {\n this.cacheSelection();\n }\n };\n\n private onMouseDownDocument = (event: MouseEvent) => {\n if (\n this.editor &&\n !this.state.selectionRange &&\n !this.editor.contains(event.target as Node)\n ) {\n this.cacheSelection();\n }\n };\n\n private cacheSelection = () => {\n if (!this.state.selectionRange && this.editor) {\n this.state.selectionRange = this.editor.getSelectionRange(false /*tryGetFromCache*/);\n }\n };\n private onScroll = (e: Event) => {\n this.editor?.triggerPluginEvent(PluginEventType.Scroll, {\n rawEvent: e,\n scrollContainer: this.state.scrollContainer,\n });\n };\n\n private getEventHandler(eventType: PluginEventType): DOMEventHandler {\n const beforeDispatch = (event: Event) =>\n eventType == PluginEventType.Input\n ? this.onInputEvent(event)\n : this.onKeyboardEvent(event);\n\n return this.state.stopPrintableKeyboardEventPropagation\n ? {\n pluginEventType: eventType,\n beforeDispatch,\n }\n : eventType;\n }\n\n private onKeyboardEvent = (event: KeyboardEvent) => {\n if (isCharacterValue(event) || (event.which >= Keys.PAGEUP && event.which <= Keys.DOWN)) {\n // Stop propagation for Character keys and Up/Down/Left/Right/Home/End/PageUp/PageDown\n // since editor already handles these keys and no need to propagate to parents\n event.stopPropagation();\n }\n };\n\n private onInputEvent = (event: InputEvent) => {\n event.stopPropagation();\n };\n\n private onContextMenuEvent = (event: MouseEvent) => {\n const allItems: any[] = [];\n const searcher = this.editor?.getContentSearcherOfCursor();\n const elementBeforeCursor = searcher?.getInlineElementBefore();\n\n let eventTargetNode = event.target as Node;\n if (event.button != 2 && elementBeforeCursor) {\n eventTargetNode = elementBeforeCursor.getContainerNode();\n }\n this.state.contextMenuProviders.forEach(provider => {\n const items = provider.getContextMenuItems(eventTargetNode) ?? [];\n if (items?.length > 0) {\n if (allItems.length > 0) {\n allItems.push(null);\n }\n arrayPush(allItems, items);\n }\n });\n this.editor?.triggerPluginEvent(PluginEventType.ContextMenu, {\n rawEvent: event,\n items: allItems,\n });\n };\n}\n\nfunction isContextMenuProvider(source: EditorPlugin): source is ContextMenuProvider {\n return !!(>source)?.getContextMenuItems;\n}\n","import { isCtrlOrMetaPressed } from 'roosterjs-editor-dom';\nimport {\n EditPluginState,\n GenericContentEditFeature,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n PluginWithState,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Edit Component helps handle Content edit features\n */\nexport default class EditPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private state: EditPluginState;\n\n /**\n * Construct a new instance of EditPlugin\n * @param options The editor options\n */\n constructor() {\n this.state = {\n features: {},\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Edit';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n let hasFunctionKey = false;\n let features: GenericContentEditFeature[] | null = null;\n let ctrlOrMeta = false;\n\n if (event.eventType == PluginEventType.KeyDown) {\n const rawEvent = event.rawEvent;\n const range = this.editor?.getSelectionRange();\n\n ctrlOrMeta = isCtrlOrMetaPressed(rawEvent);\n hasFunctionKey = ctrlOrMeta || rawEvent.altKey;\n features =\n this.state.features[rawEvent.which] ||\n (range && !range.collapsed && this.state.features[Keys.RANGE]);\n } else if (event.eventType == PluginEventType.ContentChanged) {\n features = this.state.features[Keys.CONTENTCHANGED];\n }\n\n for (let i = 0; features && i < features?.length; i++) {\n const feature = features[i];\n if (\n (feature.allowFunctionKeys || !hasFunctionKey) &&\n this.editor &&\n feature.shouldHandleEvent(event, this.editor, ctrlOrMeta)\n ) {\n feature.handleEvent(event, this.editor);\n break;\n }\n }\n }\n}\n","import {\n inlineEntityOnPluginEvent,\n normalizeDelimitersInEditor,\n} from './utils/inlineEntityOnPluginEvent';\nimport {\n Browser,\n commitEntity,\n getEntityFromElement,\n getEntitySelector,\n isCharacterValue,\n toArray,\n arrayPush,\n createElement,\n addRangeToSelection,\n createRange,\n isBlockElement,\n getObjectKeys,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ContentChangedEvent,\n ContentPosition,\n Entity,\n EntityClasses,\n EntityOperation,\n EntityOperationEvent,\n EntityPluginState,\n KnownEntityItem,\n ExperimentalFeatures,\n HtmlSanitizerOptions,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n PluginMouseUpEvent,\n PluginWithState,\n QueryScope,\n} from 'roosterjs-editor-types';\nimport type { CompatibleEntityOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst ENTITY_ID_REGEX = /_(\\d{1,8})$/;\n\nconst ENTITY_CSS_REGEX = '^' + EntityClasses.ENTITY_INFO_NAME + '$';\nconst ENTITY_ID_CSS_REGEX = '^' + EntityClasses.ENTITY_ID_PREFIX;\nconst ENTITY_TYPE_CSS_REGEX = '^' + EntityClasses.ENTITY_TYPE_PREFIX;\nconst ENTITY_READONLY_CSS_REGEX = '^' + EntityClasses.ENTITY_READONLY_PREFIX;\nconst ALLOWED_CSS_CLASSES = [\n ENTITY_CSS_REGEX,\n ENTITY_ID_CSS_REGEX,\n ENTITY_TYPE_CSS_REGEX,\n ENTITY_READONLY_CSS_REGEX,\n];\nconst REMOVE_ENTITY_OPERATIONS: (EntityOperation | CompatibleEntityOperation)[] = [\n EntityOperation.Overwrite,\n EntityOperation.PartialOverwrite,\n EntityOperation.RemoveFromStart,\n EntityOperation.RemoveFromEnd,\n];\n\n/**\n * @internal\n * Entity Plugin helps handle all operations related to an entity and generate entity specified events\n */\nexport default class EntityPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private state: EntityPluginState;\n private disposer: (() => void) | null = null;\n\n /**\n * Construct a new instance of EntityPlugin\n */\n constructor() {\n this.state = {\n entityMap: {},\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Entity';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler('dragstart', this.onDragStart);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n this.state.entityMap = {};\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.MouseUp:\n this.handleMouseUpEvent(event);\n break;\n case PluginEventType.KeyDown:\n this.handleKeyDownEvent(event.rawEvent);\n break;\n case PluginEventType.BeforeCutCopy:\n if (event.isCut) {\n this.handleCutEvent(event.rawEvent);\n }\n break;\n case PluginEventType.BeforePaste:\n this.handleBeforePasteEvent(event.sanitizingOption);\n break;\n case PluginEventType.ContentChanged:\n this.handleContentChangedEvent(event);\n break;\n case PluginEventType.EditorReady:\n this.handleContentChangedEvent();\n break;\n case PluginEventType.ExtractContentWithDom:\n this.handleExtractContentWithDomEvent(event.clonedRoot);\n break;\n case PluginEventType.ContextMenu:\n this.handleContextMenuEvent(event.rawEvent);\n break;\n case PluginEventType.EntityOperation:\n this.handleEntityOperationEvent(event);\n break;\n }\n\n if (this.editor?.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)) {\n inlineEntityOnPluginEvent(event, this.editor);\n }\n }\n\n private handleContextMenuEvent(event: UIEvent) {\n const node = event.target as Node;\n const entityElement = node && this.editor?.getElementAtCursor(getEntitySelector(), node);\n\n if (entityElement) {\n event.preventDefault();\n this.triggerEvent(entityElement, EntityOperation.ContextMenu, event);\n }\n }\n\n private handleCutEvent = (event: ClipboardEvent) => {\n const range = this.editor?.getSelectionRange();\n if (range && !range.collapsed) {\n this.checkRemoveEntityForRange(event);\n }\n };\n\n private handleMouseUpEvent(event: PluginMouseUpEvent) {\n const { rawEvent, isClicking } = event;\n const node = rawEvent.target as Node;\n let entityElement: HTMLElement | null;\n\n if (\n this.editor &&\n isClicking &&\n node &&\n !!(entityElement = this.editor.getElementAtCursor(getEntitySelector(), node))\n ) {\n this.triggerEvent(entityElement, EntityOperation.Click, rawEvent);\n\n workaroundSelectionIssueForIE(this.editor);\n }\n }\n\n private handleKeyDownEvent(event: KeyboardEvent) {\n if (\n isCharacterValue(event) ||\n event.which == Keys.BACKSPACE ||\n event.which == Keys.DELETE ||\n event.which == Keys.ENTER\n ) {\n const range = this.editor?.getSelectionRange();\n if (range && !range.collapsed) {\n this.checkRemoveEntityForRange(event);\n }\n }\n }\n\n private handleBeforePasteEvent(sanitizingOption: HtmlSanitizerOptions) {\n const range = this.editor?.getSelectionRange();\n\n if (range && !range.collapsed) {\n this.checkRemoveEntityForRange(null! /*rawEvent*/);\n }\n\n if (sanitizingOption.additionalAllowedCssClasses) {\n arrayPush(sanitizingOption.additionalAllowedCssClasses, ALLOWED_CSS_CLASSES);\n }\n }\n\n private handleContentChangedEvent(event?: ContentChangedEvent) {\n let shouldNormalizeDelimiters: boolean = false;\n // 1. find removed entities\n getObjectKeys(this.state.entityMap).forEach(id => {\n const item = this.state.entityMap[id];\n const element = item.element;\n\n if (this.editor && !item.isDeleted && !this.editor.contains(element)) {\n item.isDeleted = true;\n\n this.triggerEvent(element, EntityOperation.Overwrite);\n\n if (\n !shouldNormalizeDelimiters &&\n !element.isContentEditable &&\n !isBlockElement(element)\n ) {\n shouldNormalizeDelimiters = true;\n }\n }\n });\n\n // 2. collect all new entities\n const newEntities =\n event?.source == ChangeSource.InsertEntity && event.data\n ? [event.data as Entity]\n : this.getExistingEntities().filter(entity => {\n const item = this.state.entityMap[entity.id];\n\n return !item || item.element != entity.wrapper || item.isDeleted;\n });\n\n // 3. Add new entities to known entity list, and hydrate\n newEntities.forEach(entity => {\n const { wrapper, type, id, isReadonly } = entity;\n\n entity.id = this.ensureUniqueId(type, id, wrapper);\n commitEntity(wrapper, type, isReadonly, entity.id); // Use entity.id here because it is newly updated\n this.handleNewEntity(entity);\n });\n\n if (\n shouldNormalizeDelimiters &&\n this.editor?.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n normalizeDelimitersInEditor(this.editor);\n }\n }\n\n private handleEntityOperationEvent(event: EntityOperationEvent) {\n if (this.editor && REMOVE_ENTITY_OPERATIONS.indexOf(event.operation) >= 0) {\n const item = this.state.entityMap[event.entity.id];\n\n if (item) {\n item.isDeleted = true;\n }\n }\n }\n\n private handleExtractContentWithDomEvent(root: HTMLElement) {\n toArray(root.querySelectorAll(getEntitySelector())).forEach(element => {\n element.removeAttribute('contentEditable');\n\n this.triggerEvent(element as HTMLElement, EntityOperation.ReplaceTemporaryContent);\n });\n }\n\n private onDragStart = (e: Event) => {\n const dragEvent = e as DragEvent;\n const entityWrapper = this.editor?.getElementAtCursor(\n getEntitySelector(),\n dragEvent.target as Node\n );\n\n if (entityWrapper && getEntityFromElement(entityWrapper)?.isReadonly) {\n dragEvent.preventDefault();\n }\n };\n\n private checkRemoveEntityForRange(event: Event) {\n const editableEntityElements: HTMLElement[] = [];\n const selector = getEntitySelector();\n this.editor?.queryElements(selector, QueryScope.OnSelection, element => {\n if (element.isContentEditable) {\n editableEntityElements.push(element);\n } else {\n this.triggerEvent(element, EntityOperation.Overwrite, event);\n }\n });\n\n // For editable entities, we need to check if it is fully or partially covered by current selection,\n // and trigger different events;\n if (this.editor && editableEntityElements.length > 0) {\n const inSelectionEntityElements = this.editor.queryElements(\n selector,\n QueryScope.InSelection\n );\n editableEntityElements.forEach(element => {\n const isFullyCovered = inSelectionEntityElements.indexOf(element) >= 0;\n this.triggerEvent(\n element,\n isFullyCovered ? EntityOperation.Overwrite : EntityOperation.PartialOverwrite,\n event\n );\n });\n }\n }\n\n private triggerEvent(element: HTMLElement, operation: EntityOperation, rawEvent?: Event) {\n const entity = element && getEntityFromElement(element);\n\n return entity\n ? this.editor?.triggerPluginEvent(PluginEventType.EntityOperation, {\n operation,\n rawEvent,\n entity,\n })\n : null;\n }\n\n private handleNewEntity(entity: Entity) {\n const { wrapper } = entity;\n const event = this.triggerEvent(wrapper, EntityOperation.NewEntity);\n\n const newItem: KnownEntityItem = {\n element: entity.wrapper,\n };\n\n if (event?.shouldPersist) {\n newItem.canPersist = true;\n }\n\n this.state.entityMap[entity.id] = newItem;\n }\n\n private getExistingEntities(): Entity[] {\n return (\n this.editor\n ?.queryElements(getEntitySelector())\n .map(getEntityFromElement)\n .filter((x): x is Entity => !!x) ?? []\n );\n }\n\n private ensureUniqueId(type: string, id: string, wrapper: HTMLElement) {\n const match = ENTITY_ID_REGEX.exec(id);\n const baseId = (match ? id.substr(0, id.length - match[0].length) : id) || type;\n\n // Make sure entity id is unique\n let newId = '';\n\n for (let num = (match && parseInt(match[1])) || 0; ; num++) {\n newId = num > 0 ? `${baseId}_${num}` : baseId;\n\n const item = this.state.entityMap[newId];\n\n if (!item || item.element == wrapper) {\n break;\n }\n }\n\n return newId;\n }\n}\n\n/**\n * IE will show a resize border around the readonly content within content editable DIV\n * This is a workaround to remove it by temporarily move focus out of editor\n */\nconst workaroundSelectionIssueForIE = Browser.isIE\n ? (editor: IEditor) => {\n editor.runAsync(editor => {\n const workaroundButton = editor.getCustomData('ENTITY_IE_FOCUS_BUTTON', () => {\n const button = createElement(\n {\n tag: 'button',\n style: 'overflow:hidden;position:fixed;width:0;height:0;top:-1000px',\n },\n editor.getDocument()\n ) as HTMLElement;\n button.onblur = () => {\n button.style.display = 'none';\n };\n\n editor.insertNode(button, {\n position: ContentPosition.Outside,\n });\n\n return button;\n });\n\n workaroundButton.style.display = '';\n addRangeToSelection(createRange(workaroundButton, 0));\n });\n }\n : () => {};\n","import { safeInstanceOf } from 'roosterjs-editor-dom';\n\nimport {\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n PositionType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\nconst Escape = 'Escape';\nconst Delete = 'Delete';\nconst mouseLeftButton = 0;\n\n/**\n * Detect image selection and help highlight the image\n */\nexport default class ImageSelection implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ImageSelection';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor?.select(null);\n this.editor = null;\n }\n\n onPluginEvent(event: PluginEvent) {\n if (this.editor) {\n switch (event.eventType) {\n case PluginEventType.EnteredShadowEdit:\n case PluginEventType.LeavingShadowEdit:\n const selection = this.editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.ImageSelection) {\n this.editor.select(selection.image);\n }\n break;\n\n case PluginEventType.MouseUp:\n const target = event.rawEvent.target;\n if (\n safeInstanceOf(target, 'HTMLImageElement') &&\n event.rawEvent.button === mouseLeftButton\n ) {\n this.editor.select(target);\n }\n break;\n case PluginEventType.MouseDown:\n const mouseTarget = event.rawEvent.target;\n const mouseSelection = this.editor.getSelectionRangeEx();\n if (\n mouseSelection &&\n mouseSelection.type === SelectionRangeTypes.ImageSelection &&\n mouseSelection.image !== mouseTarget\n ) {\n this.editor.select(null);\n }\n break;\n case PluginEventType.KeyUp:\n const key = event.rawEvent.key;\n const keyDownSelection = this.editor.getSelectionRangeEx();\n if (keyDownSelection.type === SelectionRangeTypes.ImageSelection) {\n if (key === Escape) {\n this.editor.select(keyDownSelection.image, PositionType.Before);\n this.editor.getSelectionRange()?.collapse();\n event.rawEvent.stopPropagation();\n } else if (key === Delete) {\n this.editor.deleteNode(keyDownSelection.image);\n event.rawEvent.preventDefault();\n } else {\n this.editor.select(keyDownSelection.ranges[0]);\n }\n }\n break;\n case PluginEventType.ContextMenu:\n const contextMenuTarget = event.rawEvent.target;\n const actualSelection = this.editor.getSelectionRangeEx();\n if (\n safeInstanceOf(contextMenuTarget, 'HTMLImageElement') &&\n (actualSelection.type !== SelectionRangeTypes.ImageSelection ||\n actualSelection.image !== contextMenuTarget)\n ) {\n this.editor.select(contextMenuTarget);\n }\n }\n }\n }\n}\n","import { Browser, getObjectKeys, setColor } from 'roosterjs-editor-dom';\nimport {\n DocumentCommand,\n EditorOptions,\n IEditor,\n LifecyclePluginState,\n PluginEventType,\n PluginWithState,\n PluginEvent,\n ChangeSource,\n} from 'roosterjs-editor-types';\n\nconst CONTENT_EDITABLE_ATTRIBUTE_NAME = 'contenteditable';\nconst COMMANDS: Record = Browser.isFirefox\n ? {\n /**\n * Disable these object resizing for firefox since other browsers don't have these behaviors\n */\n [DocumentCommand.EnableObjectResizing]: (false as any) as string,\n [DocumentCommand.EnableInlineTableEditing]: (false as any) as string,\n }\n : Browser.isIE\n ? {\n /**\n * Change the default paragraph separator to DIV. This is mainly for IE since its default setting is P\n */\n [DocumentCommand.DefaultParagraphSeparator]: 'div',\n\n /**\n * Disable auto link feature in IE since we have our own implementation\n */\n [DocumentCommand.AutoUrlDetect]: (false as any) as string,\n }\n : {};\n\nconst DARK_MODE_DEFAULT_FORMAT = {\n backgroundColors: {\n darkModeColor: 'rgb(51,51,51)',\n lightModeColor: 'rgb(255,255,255)',\n },\n textColors: {\n darkModeColor: 'rgb(255,255,255)',\n lightModeColor: 'rgb(0,0,0)',\n },\n};\n\n/**\n * @internal\n * Lifecycle plugin handles editor initialization and disposing\n */\nexport default class LifecyclePlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private state: LifecyclePluginState;\n private initialContent: string;\n private initializer: (() => void) | null = null;\n private disposer: (() => void) | null = null;\n private adjustColor: () => void;\n\n /**\n * Construct a new instance of LifecyclePlugin\n * @param options The editor options\n * @param contentDiv The editor content DIV\n */\n constructor(options: EditorOptions, contentDiv: HTMLDivElement) {\n this.initialContent = options.initialContent || contentDiv.innerHTML || '';\n\n // Make the container editable and set its selection styles\n if (contentDiv.getAttribute(CONTENT_EDITABLE_ATTRIBUTE_NAME) === null) {\n this.initializer = () => {\n contentDiv.contentEditable = 'true';\n contentDiv.style.userSelect = 'text';\n contentDiv.style.webkitUserSelect = 'text';\n };\n this.disposer = () => {\n contentDiv.style.userSelect = '';\n contentDiv.style.webkitUserSelect = '';\n contentDiv.removeAttribute(CONTENT_EDITABLE_ATTRIBUTE_NAME);\n };\n }\n this.adjustColor = options.doNotAdjustEditorColor\n ? () => {}\n : () => {\n const { textColors, backgroundColors } = DARK_MODE_DEFAULT_FORMAT;\n const { isDarkMode } = this.state;\n const darkColorHandler = this.editor?.getDarkColorHandler();\n setColor(\n contentDiv,\n textColors,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n setColor(\n contentDiv,\n backgroundColors,\n true /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n };\n\n const getDarkColor = options.getDarkColor ?? ((color: string) => color);\n const defaultFormat = options.defaultFormat ? { ...options.defaultFormat } : null;\n\n if (defaultFormat) {\n if (defaultFormat.textColor && !defaultFormat.textColors) {\n defaultFormat.textColors = {\n lightModeColor: defaultFormat.textColor,\n darkModeColor: getDarkColor(defaultFormat.textColor),\n };\n delete defaultFormat.textColor;\n }\n\n if (defaultFormat.backgroundColor && !defaultFormat.backgroundColors) {\n defaultFormat.backgroundColors = {\n lightModeColor: defaultFormat.backgroundColor,\n darkModeColor: getDarkColor(defaultFormat.backgroundColor),\n };\n delete defaultFormat.backgroundColor;\n }\n }\n\n this.state = {\n customData: {},\n defaultFormat,\n isDarkMode: !!options.inDarkMode,\n getDarkColor,\n onExternalContentTransform: options.onExternalContentTransform ?? null,\n experimentalFeatures: options.experimentalFeatures || [],\n shadowEditFragment: null,\n shadowEditEntities: null,\n shadowEditSelectionPath: null,\n shadowEditTableSelectionPath: null,\n shadowEditImageSelectionPath: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Lifecycle';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n\n // Ensure initial content and its format\n this.editor.setContent(this.initialContent, false /*triggerContentChangedEvent*/);\n\n // Set content DIV to be editable\n this.initializer?.();\n\n // Set editor background color for dark mode\n this.adjustColor();\n\n // Do proper change for browsers to disable some browser-specified behaviors.\n this.adjustBrowserBehavior();\n\n // Let other plugins know that we are ready\n this.editor.triggerPluginEvent(PluginEventType.EditorReady, {}, true /*broadcast*/);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor?.triggerPluginEvent(PluginEventType.BeforeDispose, {}, true /*broadcast*/);\n\n getObjectKeys(this.state.customData).forEach(key => {\n const data = this.state.customData[key];\n\n if (data && data.disposer) {\n data.disposer(data.value);\n }\n\n delete this.state.customData[key];\n });\n\n if (this.disposer) {\n this.disposer();\n this.disposer = null;\n this.initializer = null;\n }\n\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (\n event.eventType == PluginEventType.ContentChanged &&\n (event.source == ChangeSource.SwitchToDarkMode ||\n event.source == ChangeSource.SwitchToLightMode)\n ) {\n this.state.isDarkMode = event.source == ChangeSource.SwitchToDarkMode;\n this.adjustColor();\n }\n }\n\n private adjustBrowserBehavior() {\n getObjectKeys(COMMANDS).forEach(command => {\n // Catch any possible exception since this should not block the initialization of editor\n try {\n this.editor?.getDocument().execCommand(command, false, COMMANDS[command]);\n } catch {}\n });\n }\n}\n","import { EditorPlugin, IEditor, PluginEvent, PluginEventType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * MouseUpPlugin help trigger MouseUp event even when mouse up happens outside editor\n * as long as the mouse was pressed within Editor before\n */\nexport default class MouseUpPlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n private mouseUpEventListerAdded: boolean = false;\n private mouseDownX: number | null = null;\n private mouseDownY: number | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'MouseUp';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.removeMouseUpEventListener();\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (\n this.editor &&\n event.eventType == PluginEventType.MouseDown &&\n !this.mouseUpEventListerAdded\n ) {\n this.editor\n .getDocument()\n .addEventListener('mouseup', this.onMouseUp, true /*setCapture*/);\n this.mouseUpEventListerAdded = true;\n this.mouseDownX = event.rawEvent.pageX;\n this.mouseDownY = event.rawEvent.pageY;\n }\n }\n private removeMouseUpEventListener() {\n if (this.editor && this.mouseUpEventListerAdded) {\n this.mouseUpEventListerAdded = false;\n this.editor.getDocument().removeEventListener('mouseup', this.onMouseUp, true);\n }\n }\n\n private onMouseUp = (rawEvent: MouseEvent) => {\n if (this.editor) {\n this.removeMouseUpEventListener();\n this.editor.triggerPluginEvent(PluginEventType.MouseUp, {\n rawEvent,\n isClicking: this.mouseDownX == rawEvent.pageX && this.mouseDownY == rawEvent.pageY,\n });\n }\n };\n}\n","import {\n changeElementTag,\n getTagOfNode,\n moveChildNodes,\n safeInstanceOf,\n toArray,\n} from 'roosterjs-editor-dom';\nimport {\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * TODO: Rename this plugin since it is not only for table now\n *\n * NormalizeTable plugin makes sure each table in editor has TBODY/THEAD/TFOOT tag around TR tags\n *\n * When we retrieve HTML content using innerHTML, browser will always add TBODY around TR nodes if there is not.\n * This causes some issue when we restore the HTML content with selection path since the selection path is\n * deeply coupled with DOM structure. So we need to always make sure there is already TBODY tag whenever\n * new table is inserted, to make sure the selection path we created is correct.\n */\nexport default class NormalizeTablePlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'NormalizeTable';\n }\n\n /**\n * The first method that editor will call to a plugin when editor is initializing.\n * It will pass in the editor instance, plugin should take this chance to save the\n * editor reference so that it can call to any editor method or format API later.\n * @param editor The editor object\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * The last method that editor will call to a plugin before it is disposed.\n * Plugin can take this chance to clear the reference to editor. After this method is\n * called, plugin should not call to any editor method since it will result in error.\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Core method for a plugin. Once an event happens in editor, editor will call this\n * method of each plugin to handle the event as long as the event is not handled\n * exclusively by another plugin.\n * @param event The event to handle:\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.EditorReady:\n case PluginEventType.ContentChanged:\n if (this.editor) {\n this.normalizeTables(this.editor.queryElements('table'));\n }\n break;\n\n case PluginEventType.BeforePaste:\n this.normalizeTables(toArray(event.fragment.querySelectorAll('table')));\n break;\n\n case PluginEventType.MouseDown:\n this.normalizeTableFromEvent(event.rawEvent);\n break;\n\n case PluginEventType.KeyDown:\n if (event.rawEvent.shiftKey) {\n this.normalizeTableFromEvent(event.rawEvent);\n }\n break;\n\n case PluginEventType.ExtractContentWithDom:\n normalizeListsForExport(event.clonedRoot);\n break;\n }\n }\n\n private normalizeTableFromEvent(event: KeyboardEvent | MouseEvent) {\n const table = this.editor?.getElementAtCursor('table', event.target as Node);\n\n if (table) {\n this.normalizeTables([table]);\n }\n }\n\n private normalizeTables(tables: HTMLTableElement[]) {\n if (this.editor && tables.length > 0) {\n const rangeEx = this.editor.getSelectionRangeEx();\n const { startContainer, endContainer, startOffset, endOffset } =\n (rangeEx?.type == SelectionRangeTypes.Normal && rangeEx.ranges[0]) || {};\n\n const isChanged = normalizeTables(tables);\n\n if (isChanged) {\n if (\n startContainer &&\n endContainer &&\n typeof startOffset === 'number' &&\n typeof endOffset === 'number'\n ) {\n this.editor.select(startContainer, startOffset, endContainer, endOffset);\n } else if (\n rangeEx?.type == SelectionRangeTypes.TableSelection &&\n rangeEx.coordinates\n ) {\n this.editor.select(rangeEx.table, rangeEx.coordinates);\n }\n }\n }\n }\n}\n\nfunction normalizeTables(tables: HTMLTableElement[]) {\n let isDOMChanged = false;\n tables.forEach(table => {\n let tbody: HTMLTableSectionElement | null = null;\n\n for (let child = table.firstChild; child; child = child.nextSibling) {\n const tag = getTagOfNode(child);\n switch (tag) {\n case 'TR':\n if (!tbody) {\n tbody = table.ownerDocument.createElement('tbody');\n table.insertBefore(tbody, child);\n }\n\n tbody.appendChild(child);\n child = tbody;\n isDOMChanged = true;\n\n break;\n case 'TBODY':\n if (tbody) {\n moveChildNodes(tbody, child, true /*keepExistingChildren*/);\n child.parentNode?.removeChild(child);\n child = tbody;\n isDOMChanged = true;\n } else {\n tbody = child as HTMLTableSectionElement;\n }\n break;\n default:\n tbody = null;\n break;\n }\n }\n\n const colgroups = table.querySelectorAll('colgroup');\n const thead = table.querySelector('thead');\n if (thead) {\n colgroups.forEach(colgroup => {\n if (!thead.contains(colgroup)) {\n thead.appendChild(colgroup);\n }\n });\n }\n });\n\n return isDOMChanged;\n}\n\nfunction normalizeListsForExport(root: ParentNode) {\n toArray(root.querySelectorAll('li')).forEach(li => {\n const prevElement = li.previousSibling;\n\n if (li.style.display == 'block' && safeInstanceOf(prevElement, 'HTMLLIElement')) {\n li.style.removeProperty('display');\n\n prevElement.appendChild(changeElementTag(li, 'div'));\n }\n });\n}\n","import { isCharacterValue, Position, setColor } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n IEditor,\n Keys,\n NodePosition,\n PendingFormatStatePluginState,\n PluginEvent,\n PluginEventType,\n PluginWithState,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\n/**\n * @internal\n * PendingFormatStatePlugin handles pending format state management\n */\nexport default class PendingFormatStatePlugin\n implements PluginWithState {\n private editor: IEditor | null = null;\n private state: PendingFormatStatePluginState;\n\n /**\n * Construct a new instance of PendingFormatStatePlugin\n * @param options The editor options\n * @param contentDiv The editor content DIV\n */\n constructor() {\n this.state = {\n pendableFormatPosition: null,\n pendableFormatState: null,\n pendableFormatSpan: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'PendingFormatState';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n this.clear();\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.PendingFormatStateChanged:\n // Got PendingFormatStateChanged event, cache current position and pending format if a format is passed in\n // otherwise clear existing pending format.\n if (event.formatState) {\n this.state.pendableFormatPosition = this.getCurrentPosition();\n this.state.pendableFormatState = event.formatState;\n this.state.pendableFormatSpan = event.formatCallback\n ? this.createPendingFormatSpan(event.formatCallback)\n : null;\n } else {\n this.clear();\n }\n\n break;\n case PluginEventType.KeyDown:\n case PluginEventType.MouseDown:\n case PluginEventType.ContentChanged:\n let currentPosition: NodePosition | null = null;\n if (\n this.editor &&\n event.eventType == PluginEventType.KeyDown &&\n isCharacterValue(event.rawEvent) &&\n this.state.pendableFormatSpan\n ) {\n this.state.pendableFormatSpan.removeAttribute('contentEditable');\n this.editor.insertNode(this.state.pendableFormatSpan);\n this.editor.select(\n this.state.pendableFormatSpan,\n PositionType.Begin,\n this.state.pendableFormatSpan,\n PositionType.End\n );\n this.clear();\n } else if (\n (event.eventType == PluginEventType.KeyDown &&\n event.rawEvent.which >= Keys.PAGEUP &&\n event.rawEvent.which <= Keys.DOWN) ||\n (this.state.pendableFormatPosition &&\n (currentPosition = this.getCurrentPosition()) &&\n !this.state.pendableFormatPosition.equalTo(currentPosition)) ||\n (event.eventType == PluginEventType.ContentChanged &&\n (event.source == ChangeSource.SwitchToDarkMode ||\n event.source == ChangeSource.SwitchToLightMode))\n ) {\n // If content or position is changed (by keyboard, mouse, or code),\n // check if current position is still the same with the cached one (if exist),\n // and clear cached format if position is changed since it is out-of-date now\n this.clear();\n }\n\n break;\n }\n }\n\n private clear() {\n this.state.pendableFormatPosition = null;\n this.state.pendableFormatState = null;\n this.state.pendableFormatSpan = null;\n }\n\n private getCurrentPosition() {\n let range = this.editor?.getSelectionRange();\n return (range && Position.getStart(range).normalize()) ?? null;\n }\n\n private createPendingFormatSpan(\n callback: (element: HTMLElement, isInnerNode?: boolean) => any\n ) {\n let span = this.state.pendableFormatSpan;\n\n if (!span && this.editor) {\n const currentStyle = this.editor.getStyleBasedFormatState();\n const doc = this.editor.getDocument();\n const isDarkMode = this.editor.isDarkMode();\n\n span = doc.createElement('span');\n span.contentEditable = 'true';\n span.appendChild(doc.createTextNode(ZERO_WIDTH_SPACE));\n\n span.style.setProperty('font-family', currentStyle.fontName ?? null);\n span.style.setProperty('font-size', currentStyle.fontSize ?? null);\n\n const darkColorHandler = this.editor.getDarkColorHandler();\n\n if (currentStyle.textColors || currentStyle.textColor) {\n setColor(\n span,\n (currentStyle.textColors || currentStyle.textColor)!,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n }\n\n if (currentStyle.backgroundColors || currentStyle.backgroundColor) {\n setColor(\n span,\n (currentStyle.backgroundColors || currentStyle.backgroundColor)!,\n true /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n }\n }\n\n if (span) {\n callback(span);\n }\n\n return span;\n }\n}\n","import { EditorPlugin, IEditor, PluginEvent, PluginEventType } from 'roosterjs-editor-types';\nimport {\n Browser,\n findClosestElementAncestor,\n getTagOfNode,\n isCtrlOrMetaPressed,\n Position,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Typing Component helps to ensure typing is always happening under a DOM container\n */\nexport default class TypeInContainerPlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'TypeInContainer';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n private isRangeEmpty(range: Range) {\n if (\n range.collapsed &&\n range.startContainer.nodeType === Node.ELEMENT_NODE &&\n getTagOfNode(range.startContainer) == 'DIV' &&\n !range.startContainer.firstChild\n ) {\n return true;\n }\n return false;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n // We need to check if the ctrl key or the meta key is pressed,\n // browsers like Safari fire the \"keypress\" event when the meta key is pressed.\n if (\n event.eventType == PluginEventType.KeyPress &&\n this.editor &&\n !(event.rawEvent && isCtrlOrMetaPressed(event.rawEvent))\n ) {\n // If normalization was not possible before the keypress,\n // check again after the keyboard event has been processed by browser native behavior.\n //\n // This handles the case where the keyboard event that first inserts content happens when\n // there is already content under the selection (e.g. Ctrl+a -> type new content).\n //\n // Only schedule when the range is not collapsed to catch this edge case.\n let range = this.editor.getSelectionRange();\n\n const styledAncestor =\n range &&\n findClosestElementAncestor(range.startContainer, undefined /* root */, '[style]');\n\n if (!range || (!this.isRangeEmpty(range) && this.editor.contains(styledAncestor))) {\n return;\n }\n\n if (range.collapsed) {\n this.editor.ensureTypeInContainer(Position.getStart(range), event.rawEvent);\n } else {\n const callback = () => {\n const focusedPosition = this.editor?.getFocusedPosition();\n if (focusedPosition) {\n this.editor?.ensureTypeInContainer(focusedPosition, event.rawEvent);\n }\n };\n\n if (Browser.isMobileOrTablet) {\n this.editor.getDocument().defaultView?.setTimeout(callback, 100);\n } else {\n this.editor.runAsync(callback);\n }\n }\n }\n }\n}\n","import {\n ChangeSource,\n ContentChangedEvent,\n EditorOptions,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n PluginWithState,\n Snapshot,\n UndoPluginState,\n UndoSnapshotsService,\n} from 'roosterjs-editor-types';\nimport {\n addSnapshotV2,\n canMoveCurrentSnapshot,\n clearProceedingSnapshotsV2,\n createSnapshots,\n isCtrlOrMetaPressed,\n moveCurrentSnapshot,\n canUndoAutoComplete,\n} from 'roosterjs-editor-dom';\n\n// Max stack size that cannot be exceeded. When exceeded, old undo history will be dropped\n// to keep size under limit. This is kept at 10MB\nconst MAX_SIZE_LIMIT = 1e7;\n\n/**\n * @internal\n * Provides snapshot based undo service for Editor\n */\nexport default class UndoPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private lastKeyPress: number | null = null;\n private state: UndoPluginState;\n\n /**\n * Construct a new instance of UndoPlugin\n * @param options The wrapper of the state object\n */\n constructor(options: EditorOptions) {\n this.state = {\n snapshotsService:\n options.undoMetadataSnapshotService ||\n createUndoSnapshotServiceBridge(options.undoSnapshotService) ||\n createUndoSnapshots(),\n isRestoring: false,\n hasNewContent: false,\n isNested: false,\n autoCompletePosition: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Undo';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor): void {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Check if the plugin should handle the given event exclusively.\n * @param event The event to check\n */\n willHandleEventExclusively(event: PluginEvent) {\n return (\n event.eventType == PluginEventType.KeyDown &&\n event.rawEvent.which == Keys.BACKSPACE &&\n !event.rawEvent.ctrlKey &&\n this.canUndoAutoComplete()\n );\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent): void {\n // if editor is in IME, don't do anything\n if (!this.editor || this.editor.isInIME()) {\n return;\n }\n\n switch (event.eventType) {\n case PluginEventType.EditorReady:\n const undoState = this.editor.getUndoState();\n if (!undoState.canUndo && !undoState.canRedo) {\n // Only add initial snapshot when there is no existing snapshot\n // Otherwise preserved undo/redo state may be ruined\n this.addUndoSnapshot();\n }\n break;\n case PluginEventType.KeyDown:\n this.onKeyDown(event.rawEvent);\n break;\n case PluginEventType.KeyPress:\n this.onKeyPress(event.rawEvent);\n break;\n case PluginEventType.CompositionEnd:\n this.clearRedoForInput();\n this.addUndoSnapshot();\n break;\n case PluginEventType.ContentChanged:\n this.onContentChanged(event);\n break;\n case PluginEventType.BeforeKeyboardEditing:\n this.onBeforeKeyboardEditing(event.rawEvent);\n break;\n }\n }\n\n private onKeyDown(evt: KeyboardEvent): void {\n // Handle backspace/delete when there is a selection to take a snapshot\n // since we want the state prior to deletion restorable\n // Ignore if keycombo is ALT+BACKSPACE\n if ((evt.which == Keys.BACKSPACE && !evt.altKey) || evt.which == Keys.DELETE) {\n if (evt.which == Keys.BACKSPACE && !evt.ctrlKey && this.canUndoAutoComplete()) {\n evt.preventDefault();\n this.editor?.undo();\n this.state.autoCompletePosition = null;\n this.lastKeyPress = evt.which;\n } else if (!evt.defaultPrevented) {\n let selectionRange = this.editor?.getSelectionRange();\n\n // Add snapshot when\n // 1. Something has been selected (not collapsed), or\n // 2. It has a different key code from the last keyDown event (to prevent adding too many snapshot when keeping press the same key), or\n // 3. Ctrl/Meta key is pressed so that a whole word will be deleted\n if (\n selectionRange &&\n (!selectionRange.collapsed ||\n this.lastKeyPress != evt.which ||\n isCtrlOrMetaPressed(evt))\n ) {\n this.addUndoSnapshot();\n }\n\n // Since some content is deleted, always set hasNewContent to true so that we will take undo snapshot next time\n this.state.hasNewContent = true;\n this.lastKeyPress = evt.which;\n }\n } else if (evt.which >= Keys.PAGEUP && evt.which <= Keys.DOWN) {\n // PageUp, PageDown, Home, End, Left, Right, Up, Down\n if (this.state.hasNewContent) {\n this.addUndoSnapshot();\n }\n this.lastKeyPress = 0;\n } else if (this.lastKeyPress == Keys.BACKSPACE || this.lastKeyPress == Keys.DELETE) {\n if (this.state.hasNewContent) {\n this.addUndoSnapshot();\n }\n }\n }\n\n private onKeyPress(evt: KeyboardEvent): void {\n if (evt.metaKey) {\n // if metaKey is pressed, simply return since no actual effect will be taken on the editor.\n // this is to prevent changing hasNewContent to true when meta + v to paste on Safari.\n return;\n }\n\n let range = this.editor?.getSelectionRange();\n if (\n (range && !range.collapsed) ||\n (evt.which == Keys.SPACE && this.lastKeyPress != Keys.SPACE) ||\n evt.which == Keys.ENTER\n ) {\n this.addUndoSnapshot();\n if (evt.which == Keys.ENTER) {\n // Treat ENTER as new content so if there is no input after ENTER and undo,\n // we restore the snapshot before ENTER\n this.state.hasNewContent = true;\n }\n } else {\n this.clearRedoForInput();\n }\n\n this.lastKeyPress = evt.which;\n }\n\n private onBeforeKeyboardEditing(event: KeyboardEvent) {\n // For keyboard event (triggered from Content Model), we can get its keycode from event.data\n // And when user is keep pressing the same key, mark editor with \"hasNewContent\" so that next time user\n // do some other action or press a different key, we will add undo snapshot\n if (event.which != this.lastKeyPress) {\n this.addUndoSnapshot();\n }\n\n this.lastKeyPress = event.which;\n this.state.hasNewContent = true;\n }\n\n private onContentChanged(event: ContentChangedEvent) {\n if (\n !(\n this.state.isRestoring ||\n event.source == ChangeSource.SwitchToDarkMode ||\n event.source == ChangeSource.SwitchToLightMode ||\n event.source == ChangeSource.Keyboard\n )\n ) {\n this.clearRedoForInput();\n }\n }\n\n private clearRedoForInput() {\n this.state.snapshotsService.clearRedo();\n this.lastKeyPress = 0;\n this.state.hasNewContent = true;\n }\n\n private canUndoAutoComplete() {\n const focusedPosition = this.editor?.getFocusedPosition();\n return (\n this.state.snapshotsService.canUndoAutoComplete() &&\n !!focusedPosition &&\n !!this.state.autoCompletePosition?.equalTo(focusedPosition)\n );\n }\n\n private addUndoSnapshot() {\n this.editor?.addUndoSnapshot();\n this.state.autoCompletePosition = null;\n }\n}\n\nfunction createUndoSnapshots(): UndoSnapshotsService {\n const snapshots = createSnapshots(MAX_SIZE_LIMIT);\n\n return {\n canMove: (delta: number): boolean => canMoveCurrentSnapshot(snapshots, delta),\n move: (delta: number): Snapshot | null => moveCurrentSnapshot(snapshots, delta),\n addSnapshot: (snapshot: Snapshot, isAutoCompleteSnapshot: boolean) =>\n addSnapshotV2(snapshots, snapshot, isAutoCompleteSnapshot),\n clearRedo: () => clearProceedingSnapshotsV2(snapshots),\n canUndoAutoComplete: () => canUndoAutoComplete(snapshots),\n };\n}\n\nfunction createUndoSnapshotServiceBridge(\n service: UndoSnapshotsService | undefined\n): UndoSnapshotsService | undefined {\n let html: string | null;\n return service\n ? {\n canMove: (delta: number) => service.canMove(delta),\n move: (delta: number): Snapshot | null =>\n (html = service.move(delta)) ? { html, metadata: null, knownColors: [] } : null,\n addSnapshot: (snapshot: Snapshot, isAutoCompleteSnapshot: boolean) =>\n service.addSnapshot(\n snapshot.html +\n (snapshot.metadata ? `` : ''),\n isAutoCompleteSnapshot\n ),\n clearRedo: () => service.clearRedo(),\n canUndoAutoComplete: () => service.canUndoAutoComplete(),\n }\n : undefined;\n}\n","import CopyPastePlugin from './CopyPastePlugin';\nimport DOMEventPlugin from './DOMEventPlugin';\nimport EditPlugin from './EditPlugin';\nimport EntityPlugin from './EntityPlugin';\nimport ImageSelection from './ImageSelection';\nimport LifecyclePlugin from './LifecyclePlugin';\nimport MouseUpPlugin from './MouseUpPlugin';\nimport NormalizeTablePlugin from './NormalizeTablePlugin';\nimport PendingFormatStatePlugin from './PendingFormatStatePlugin';\nimport TypeInContainerPlugin from './TypeInContainerPlugin';\nimport UndoPlugin from './UndoPlugin';\nimport { CorePlugins, EditorOptions, PluginState } from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport interface CreateCorePluginResponse extends CorePlugins {\n _placeholder: null;\n}\n\n/**\n * @internal\n * Create Core Plugins\n * @param contentDiv Content DIV of editor\n * @param options Editor options\n */\nexport default function createCorePlugins(\n contentDiv: HTMLDivElement,\n options: EditorOptions\n): CreateCorePluginResponse {\n const map = options.corePluginOverride || {};\n // The order matters, some plugin needs to be put before/after others to make sure event\n // can be handled in right order\n return {\n typeInContainer: map.typeInContainer || new TypeInContainerPlugin(),\n edit: map.edit || new EditPlugin(),\n pendingFormatState: map.pendingFormatState || new PendingFormatStatePlugin(),\n _placeholder: null,\n typeAfterLink: null!, //deprecated after firefox update\n undo: map.undo || new UndoPlugin(options),\n domEvent: map.domEvent || new DOMEventPlugin(options, contentDiv),\n mouseUp: map.mouseUp || new MouseUpPlugin(),\n copyPaste: map.copyPaste || new CopyPastePlugin(options),\n entity: map.entity || new EntityPlugin(),\n imageSelection: map.imageSelection || new ImageSelection(),\n normalizeTable: map.normalizeTable || new NormalizeTablePlugin(),\n lifecycle: map.lifecycle || new LifecyclePlugin(options, contentDiv),\n };\n}\n\n/**\n * @internal\n * Get plugin state of core plugins\n * @param corePlugins CorePlugins object\n */\nexport function getPluginState(corePlugins: CorePlugins): PluginState {\n return {\n domEvent: corePlugins.domEvent.getState(),\n pendingFormatState: corePlugins.pendingFormatState.getState(),\n edit: corePlugins.edit.getState(),\n lifecycle: corePlugins.lifecycle.getState(),\n undo: corePlugins.undo.getState(),\n entity: corePlugins.entity.getState(),\n copyPaste: corePlugins.copyPaste.getState(),\n };\n}\n","import { VCell } from 'roosterjs-editor-types';\nimport { VTable } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Executes an action to all the cells within the selection range.\n * @param callback action to apply on each selected cell\n * @returns the amount of cells modified\n */\nexport const forEachSelectedCell = (vTable: VTable, callback: (cell: VCell) => void): void => {\n if (vTable.selection) {\n const { lastCell, firstCell } = vTable.selection;\n\n for (let y = firstCell.y; y <= lastCell.y; y++) {\n for (let x = firstCell.x; x <= lastCell.x; x++) {\n if (vTable.cells && vTable.cells[y][x]?.td) {\n callback(vTable.cells[y][x]);\n }\n }\n }\n }\n};\n","import {\n addDelimiters,\n arrayPush,\n createRange,\n getDelimiterFromElement,\n getEntityFromElement,\n getEntitySelector,\n isBlockElement,\n isCharacterValue,\n matchesSelector,\n Position,\n safeInstanceOf,\n splitTextNode,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n DelimiterClasses,\n Entity,\n IEditor,\n Keys,\n NodeType,\n PluginEvent,\n PluginEventType,\n PluginKeyDownEvent,\n PositionType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\nconst DELIMITER_SELECTOR =\n '.' + DelimiterClasses.DELIMITER_AFTER + ',.' + DelimiterClasses.DELIMITER_BEFORE;\nconst ZERO_WIDTH_SPACE = '\\u200B';\nconst INLINE_ENTITY_SELECTOR = 'span' + getEntitySelector();\n\nexport function inlineEntityOnPluginEvent(event: PluginEvent, editor: IEditor) {\n switch (event.eventType) {\n case PluginEventType.ContentChanged:\n if (event.source === ChangeSource.SetContent) {\n normalizeDelimitersInEditor(editor);\n }\n break;\n case PluginEventType.EditorReady:\n normalizeDelimitersInEditor(editor);\n break;\n\n case PluginEventType.BeforePaste:\n const { fragment, sanitizingOption } = event;\n addDelimitersIfNeeded(fragment.querySelectorAll(INLINE_ENTITY_SELECTOR));\n\n if (sanitizingOption.additionalAllowedCssClasses) {\n arrayPush(sanitizingOption.additionalAllowedCssClasses, [\n DelimiterClasses.DELIMITER_AFTER,\n DelimiterClasses.DELIMITER_BEFORE,\n ]);\n }\n break;\n\n case PluginEventType.ExtractContentWithDom:\n case PluginEventType.BeforeCutCopy:\n event.clonedRoot.querySelectorAll(DELIMITER_SELECTOR).forEach(node => {\n if (getDelimiterFromElement(node)) {\n removeNode(node);\n } else {\n removeDelimiterAttr(node);\n }\n });\n break;\n\n case PluginEventType.KeyDown:\n handleKeyDownEvent(editor, event);\n break;\n }\n}\n\nfunction preventTypeInDelimiter(delimiter: HTMLElement) {\n delimiter.normalize();\n const textNode = delimiter.firstChild as Node;\n const index = textNode.nodeValue?.indexOf(ZERO_WIDTH_SPACE) ?? -1;\n if (index >= 0) {\n splitTextNode(textNode, index == 0 ? 1 : index, false /* returnFirstPart */);\n let nodeToMove: Node | undefined;\n delimiter.childNodes.forEach(node => {\n if (node.nodeValue !== ZERO_WIDTH_SPACE) {\n nodeToMove = node;\n }\n });\n if (nodeToMove) {\n delimiter.parentElement?.insertBefore(\n nodeToMove,\n delimiter.className == DelimiterClasses.DELIMITER_BEFORE\n ? delimiter\n : delimiter.nextSibling\n );\n const selection = nodeToMove.ownerDocument?.getSelection();\n\n if (selection) {\n selection.setPosition(\n nodeToMove,\n new Position(nodeToMove, PositionType.End).offset\n );\n }\n }\n }\n}\n\n/**\n * @internal\n */\nexport function normalizeDelimitersInEditor(editor: IEditor) {\n removeInvalidDelimiters(editor.queryElements(DELIMITER_SELECTOR));\n addDelimitersIfNeeded(editor.queryElements(INLINE_ENTITY_SELECTOR));\n}\n\nfunction addDelimitersIfNeeded(nodes: Element[] | NodeListOf) {\n nodes.forEach(node => {\n if (isEntityElement(node)) {\n addDelimiters(node);\n }\n });\n}\n\nfunction isEntityElement(node: Node | null): node is HTMLElement {\n return !!(\n node &&\n safeInstanceOf(node, 'HTMLElement') &&\n isReadOnly(getEntityFromElement(node))\n );\n}\n\nfunction removeNode(el: Node | undefined | null) {\n el?.parentElement?.removeChild(el);\n}\n\nfunction isReadOnly(entity: Entity | null) {\n return (\n entity?.isReadonly &&\n !isBlockElement(entity.wrapper) &&\n safeInstanceOf(entity.wrapper, 'HTMLElement')\n );\n}\n\nfunction removeInvalidDelimiters(nodes: Element[] | NodeListOf) {\n nodes.forEach(node => {\n if (getDelimiterFromElement(node)) {\n const sibling = node.classList.contains(DelimiterClasses.DELIMITER_BEFORE)\n ? node.nextElementSibling\n : node.previousElementSibling;\n if (!(safeInstanceOf(sibling, 'HTMLElement') && getEntityFromElement(sibling))) {\n removeNode(node);\n }\n } else {\n removeDelimiterAttr(node);\n }\n });\n}\n\nfunction removeDelimiterAttr(node: Element | undefined | null, checkEntity: boolean = true) {\n if (!node) {\n return;\n }\n\n const isAfter = node.classList.contains(DelimiterClasses.DELIMITER_AFTER);\n const entitySibling = isAfter ? node.previousElementSibling : node.nextElementSibling;\n if (checkEntity && entitySibling && isEntityElement(entitySibling)) {\n return;\n }\n\n node.classList.remove(DelimiterClasses.DELIMITER_AFTER, DelimiterClasses.DELIMITER_BEFORE);\n\n node.normalize();\n node.childNodes.forEach(cn => {\n const index = cn.textContent?.indexOf(ZERO_WIDTH_SPACE) ?? -1;\n if (index >= 0) {\n createRange(cn, index, cn, index + 1)?.deleteContents();\n }\n });\n}\n\nfunction handleCollapsedEnter(editor: IEditor, delimiter: HTMLElement) {\n const isAfter = delimiter.classList.contains(DelimiterClasses.DELIMITER_AFTER);\n const entity = !isAfter ? delimiter.nextSibling : delimiter.previousSibling;\n const block = getBlock(editor, delimiter);\n\n editor.runAsync(() => {\n if (!block) {\n return;\n }\n const blockToCheck = isAfter ? block.nextSibling : block.previousSibling;\n if (blockToCheck && safeInstanceOf(blockToCheck, 'HTMLElement')) {\n const delimiters = blockToCheck.querySelectorAll(DELIMITER_SELECTOR);\n // Check if the last or first delimiter still contain the delimiter class and remove it.\n const delimiterToCheck = delimiters.item(isAfter ? 0 : delimiters.length - 1);\n removeDelimiterAttr(delimiterToCheck);\n }\n\n if (isEntityElement(entity)) {\n const { nextElementSibling, previousElementSibling } = entity;\n [nextElementSibling, previousElementSibling].forEach(el => {\n // Check if after Enter the ZWS got removed but we still have a element with the class\n // Remove the attributes of the element if it is invalid now.\n if (el && matchesSelector(el, DELIMITER_SELECTOR) && !getDelimiterFromElement(el)) {\n removeDelimiterAttr(el, false /* checkEntity */);\n }\n });\n // Add delimiters to the entity if needed because on Enter we can sometimes lose the ZWS of the element.\n addDelimiters(entity);\n }\n });\n}\n\nconst getPosition = (container: HTMLElement | null) => {\n if (container && getDelimiterFromElement(container)) {\n const isAfter = container.classList.contains(DelimiterClasses.DELIMITER_AFTER);\n return new Position(container, isAfter ? PositionType.After : PositionType.Before);\n }\n return undefined;\n};\n\nfunction getBlock(editor: IEditor, element: Node | undefined) {\n if (!element) {\n return undefined;\n }\n\n let block = editor.getBlockElementAtNode(element)?.getStartNode();\n\n while (block && !isBlockElement(block)) {\n block = editor.contains(block.parentElement) ? block.parentElement! : undefined;\n }\n\n return block;\n}\n\nfunction handleSelectionNotCollapsed(editor: IEditor, range: Range, event: KeyboardEvent) {\n const { startContainer, endContainer, startOffset, endOffset } = range;\n\n const startElement = editor.getElementAtCursor(DELIMITER_SELECTOR, startContainer);\n const endElement = editor.getElementAtCursor(DELIMITER_SELECTOR, endContainer);\n\n const startUpdate = getPosition(startElement);\n const endUpdate = getPosition(endElement);\n\n if (startUpdate || endUpdate) {\n editor.select(\n startUpdate ?? new Position(startContainer, startOffset),\n endUpdate ?? new Position(endContainer, endOffset)\n );\n }\n editor.runAsync(aEditor => {\n const delimiter = aEditor.getElementAtCursor(DELIMITER_SELECTOR);\n if (delimiter) {\n preventTypeInDelimiter(delimiter);\n if (event.which === Keys.ENTER) {\n removeDelimiterAttr(delimiter);\n }\n }\n });\n}\n\nfunction handleKeyDownEvent(editor: IEditor, event: PluginKeyDownEvent) {\n const range = editor.getSelectionRangeEx();\n const { rawEvent } = event;\n if (range.type != SelectionRangeTypes.Normal) {\n return;\n }\n\n if (range.areAllCollapsed && (isCharacterValue(rawEvent) || rawEvent.which === Keys.ENTER)) {\n const position = editor.getFocusedPosition()?.normalize();\n if (!position) {\n return;\n }\n\n const { element, node } = position;\n const refNode = element == node ? element.childNodes.item(position.offset) : element;\n\n const delimiter = editor.getElementAtCursor(DELIMITER_SELECTOR, refNode);\n if (!delimiter) {\n return;\n }\n\n if (rawEvent.which === Keys.ENTER) {\n handleCollapsedEnter(editor, delimiter);\n } else if (delimiter.firstChild?.nodeType == NodeType.Text) {\n editor.runAsync(() => preventTypeInDelimiter(delimiter));\n }\n } else if (!range.areAllCollapsed && !rawEvent.shiftKey && rawEvent.which != Keys.SHIFT) {\n const currentRange = range.ranges[0];\n if (!currentRange) {\n return;\n }\n handleSelectionNotCollapsed(editor, currentRange, rawEvent);\n }\n}\n","import { isWholeTableSelected, VTable } from 'roosterjs-editor-dom';\nimport { VCell } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Remove the cells outside of the selection.\n * @param vTable VTable to remove selection\n */\nexport const removeCellsOutsideSelection = (vTable: VTable) => {\n if (vTable.selection) {\n if (isWholeTableSelected(vTable, vTable.selection)) {\n return;\n }\n\n vTable.table.style.removeProperty('width');\n vTable.table.style.removeProperty('height');\n\n const { firstCell, lastCell } = vTable.selection;\n const resultCells: VCell[][] = [];\n\n const firstX = firstCell.x;\n const firstY = firstCell.y;\n const lastX = lastCell.x;\n const lastY = lastCell.y;\n\n if (vTable.cells) {\n vTable.cells.forEach((row, y) => {\n row = row.filter((_, x) => y >= firstY && y <= lastY && x >= firstX && x <= lastX);\n if (row.length > 0) {\n resultCells.push(row);\n }\n });\n vTable.cells = resultCells;\n }\n }\n};\n","import { ColorKeyAndValue, DarkColorHandler, ModeIndependentColor } from 'roosterjs-editor-types';\nimport { getObjectKeys, parseColor, setColor } from 'roosterjs-editor-dom';\n\nconst VARIABLE_REGEX = /^\\s*var\\(\\s*(\\-\\-[a-zA-Z0-9\\-_]+)\\s*(?:,\\s*(.*))?\\)\\s*$/;\nconst VARIABLE_PREFIX = 'var(';\nconst COLOR_VAR_PREFIX = 'darkColor';\nconst enum ColorAttributeEnum {\n CssColor = 0,\n HtmlColor = 1,\n}\nconst ColorAttributeName: { [key in ColorAttributeEnum]: string }[] = [\n {\n [ColorAttributeEnum.CssColor]: 'color',\n [ColorAttributeEnum.HtmlColor]: 'color',\n },\n {\n [ColorAttributeEnum.CssColor]: 'background-color',\n [ColorAttributeEnum.HtmlColor]: 'bgcolor',\n },\n];\n\n/**\n * @internal\n */\nexport default class DarkColorHandlerImpl implements DarkColorHandler {\n private knownColors: Record> = {};\n\n constructor(private contentDiv: HTMLElement, private getDarkColor: (color: string) => string) {}\n\n /**\n * Get a copy of known colors\n * @returns\n */\n getKnownColorsCopy() {\n return Object.values(this.knownColors);\n }\n\n /**\n * Given a light mode color value and an optional dark mode color value, register this color\n * so that editor can handle it, then return the CSS color value for current color mode.\n * @param lightModeColor Light mode color value\n * @param isDarkMode Whether current color mode is dark mode\n * @param darkModeColor Optional dark mode color value. If not passed, we will calculate one.\n */\n registerColor(lightModeColor: string, isDarkMode: boolean, darkModeColor?: string): string {\n const parsedColor = this.parseColorValue(lightModeColor);\n let colorKey: string | undefined;\n\n if (parsedColor) {\n lightModeColor = parsedColor.lightModeColor;\n darkModeColor = parsedColor.darkModeColor || darkModeColor;\n colorKey = parsedColor.key;\n }\n\n if (isDarkMode && lightModeColor) {\n colorKey =\n colorKey || `--${COLOR_VAR_PREFIX}_${lightModeColor.replace(/[^\\d\\w]/g, '_')}`;\n\n if (!this.knownColors[colorKey]) {\n darkModeColor = darkModeColor || this.getDarkColor(lightModeColor);\n\n this.knownColors[colorKey] = { lightModeColor, darkModeColor };\n this.contentDiv.style.setProperty(colorKey, darkModeColor);\n }\n\n return `var(${colorKey}, ${lightModeColor})`;\n } else {\n return lightModeColor;\n }\n }\n\n /**\n * Reset known color record, clean up registered color variables.\n */\n reset(): void {\n getObjectKeys(this.knownColors).forEach(key => this.contentDiv.style.removeProperty(key));\n this.knownColors = {};\n }\n\n /**\n * Parse an existing color value, if it is in variable-based color format, extract color key,\n * light color and query related dark color if any\n * @param color The color string to parse\n * @param isInDarkMode Whether current content is in dark mode. When set to true, if the color value is not in dark var format,\n * we will treat is as a dark mode color and try to find a matched dark mode color.\n */\n parseColorValue(color: string | undefined | null, isInDarkMode?: boolean): ColorKeyAndValue {\n let key: string | undefined;\n let lightModeColor = '';\n let darkModeColor: string | undefined;\n\n if (color) {\n const match = color.startsWith(VARIABLE_PREFIX) ? VARIABLE_REGEX.exec(color) : null;\n\n if (match) {\n if (match[2]) {\n key = match[1];\n lightModeColor = match[2];\n darkModeColor = this.knownColors[key]?.darkModeColor;\n } else {\n lightModeColor = '';\n }\n } else if (isInDarkMode) {\n // If editor is in dark mode but the color is not in dark color format, it is possible the color was inserted from external code\n // without any light color info. So we first try to see if there is a known dark color can match this color, and use its related\n // light color as light mode color. Otherwise we need to drop this color to avoid show \"white on white\" content.\n lightModeColor = this.findLightColorFromDarkColor(color) || '';\n\n if (lightModeColor) {\n darkModeColor = color;\n }\n } else {\n lightModeColor = color;\n }\n }\n\n return { key, lightModeColor, darkModeColor };\n }\n\n /**\n * Find related light mode color from dark mode color.\n * @param darkColor The existing dark color\n */\n findLightColorFromDarkColor(darkColor: string): string | null {\n const rgbSearch = parseColor(darkColor);\n\n if (rgbSearch) {\n const key = getObjectKeys(this.knownColors).find(key => {\n const rgbCurrent = parseColor(this.knownColors[key].darkModeColor);\n\n return (\n rgbCurrent &&\n rgbCurrent[0] == rgbSearch[0] &&\n rgbCurrent[1] == rgbSearch[1] &&\n rgbCurrent[2] == rgbSearch[2]\n );\n });\n\n if (key) {\n return this.knownColors[key].lightModeColor;\n }\n }\n\n return null;\n }\n\n /**\n * Transform element color, from dark to light or from light to dark\n * @param element The element to transform color\n * @param fromDarkMode Whether this is transforming color from dark mode\n * @param toDarkMode Whether this is transforming color to dark mode\n */\n transformElementColor(element: HTMLElement, fromDarkMode: boolean, toDarkMode: boolean): void {\n ColorAttributeName.forEach((names, i) => {\n const color = this.parseColorValue(\n element.style.getPropertyValue(names[ColorAttributeEnum.CssColor]) ||\n element.getAttribute(names[ColorAttributeEnum.HtmlColor]),\n !!fromDarkMode\n ).lightModeColor;\n\n element.style.setProperty(names[ColorAttributeEnum.CssColor], null);\n element.removeAttribute(names[ColorAttributeEnum.HtmlColor]);\n\n if (color && color != 'inherit') {\n setColor(element, color, i != 0, toDarkMode, false /*shouldAdaptFontColor*/, this);\n }\n });\n }\n}\n","import { createEditorCore } from './createEditorCore';\r\nimport { EditorBase } from './EditorBase';\r\nimport { EditorCore, EditorOptions } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * RoosterJs core editor class\r\n */\r\nexport default class Editor extends EditorBase {\r\n /**\r\n * Creates an instance of EditorBase\r\n * @param contentDiv The DIV HTML element which will be the container element of editor\r\n * @param options An optional options object to customize the editor\r\n */\r\n constructor(contentDiv: HTMLDivElement, options: EditorOptions = {}) {\r\n super(contentDiv, options, createEditorCore);\r\n }\r\n}\r\n","import { isFeatureEnabled } from './isFeatureEnabled';\nimport {\n BlockElement,\n ChangeSource,\n ClipboardData,\n ColorTransformDirection,\n ContentChangedData,\n ContentPosition,\n CoreCreator,\n DarkColorHandler,\n DefaultFormat,\n DOMEventHandler,\n EditorCore,\n EditorOptions,\n EditorUndoState,\n ExperimentalFeatures,\n GenericContentEditFeature,\n GetContentMode,\n IContentTraverser,\n IEditor,\n InsertOption,\n IPositionContentSearcher,\n NodePosition,\n PendableFormatState,\n PluginEvent,\n PluginEventData,\n PluginEventFromType,\n PluginEventType,\n PositionType,\n QueryScope,\n Rect,\n Region,\n RegionType,\n SelectionPath,\n SelectionRangeEx,\n SizeTransformer,\n StyleBasedFormatState,\n TableSelection,\n TrustedHTMLHandler,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n collapseNodes,\n contains,\n ContentTraverser,\n deleteSelectedContent,\n getRegionsFromRange,\n findClosestElementAncestor,\n getBlockElementAtNode,\n getSelectionPath,\n getTagOfNode,\n isNodeEmpty,\n Position,\n PositionContentSearcher,\n queryElements,\n wrap,\n isPositionAtBeginningOf,\n toArray,\n} from 'roosterjs-editor-dom';\nimport type {\n CompatibleChangeSource,\n CompatibleContentPosition,\n CompatibleExperimentalFeatures,\n CompatibleGetContentMode,\n CompatiblePluginEventType,\n CompatibleQueryScope,\n CompatibleRegionType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Base class of editor\n */\nexport class EditorBase\n implements IEditor {\n private core: TEditorCore | null = null;\n\n //#region Lifecycle\n\n /**\n * Creates an instance of EditorBase\n * @param contentDiv The DIV HTML element which will be the container element of editor\n * @param options An optional options object to customize the editor\n */\n constructor(\n contentDiv: HTMLDivElement,\n options: TEditorOptions,\n coreCreator: CoreCreator\n ) {\n // 1. Make sure all parameters are valid\n if (getTagOfNode(contentDiv) != 'DIV') {\n throw new Error('contentDiv must be an HTML DIV element');\n }\n\n // 2. Create editor core\n this.core = coreCreator(contentDiv, options);\n\n // 3. Initialize plugins\n this.core.plugins.forEach(plugin => plugin.initialize(this));\n\n // 4. Ensure user will type in a container node, not the editor content DIV\n this.ensureTypeInContainer(\n new Position(this.core.contentDiv, PositionType.Begin).normalize()\n );\n }\n\n /**\n * Dispose this editor, dispose all plugins and custom data\n */\n public dispose(): void {\n const core = this.getCore();\n for (let i = core.plugins.length - 1; i >= 0; i--) {\n core.plugins[i].dispose();\n }\n\n core.darkColorHandler.reset();\n\n this.core = null;\n }\n\n /**\n * Get whether this editor is disposed\n * @returns True if editor is disposed, otherwise false\n */\n public isDisposed(): boolean {\n return !this.core;\n }\n\n //#endregion\n\n //#region Node API\n\n /**\n * Insert node into editor\n * @param node The node to insert\n * @param option Insert options. Default value is:\n * position: ContentPosition.SelectionStart\n * updateCursor: true\n * replaceSelection: true\n * insertOnNewLine: false\n * @returns true if node is inserted. Otherwise false\n */\n public insertNode(node: Node, option?: InsertOption): boolean {\n const core = this.getCore();\n return node ? core.api.insertNode(core, node, option ?? null) : false;\n }\n\n /**\n * Delete a node from editor content\n * @param node The node to delete\n * @returns true if node is deleted. Otherwise false\n */\n public deleteNode(node: Node): boolean {\n // Only remove the node when it falls within editor\n if (node && this.contains(node) && node.parentNode) {\n node.parentNode.removeChild(node);\n return true;\n }\n\n return false;\n }\n\n /**\n * Replace a node in editor content with another node\n * @param existingNode The existing node to be replaced\n * @param toNode node to replace to\n * @param transformColorForDarkMode (optional) Whether to transform new node to dark mode. Default is false\n * @returns true if node is replaced. Otherwise false\n */\n public replaceNode(\n existingNode: Node,\n toNode: Node,\n transformColorForDarkMode?: boolean\n ): boolean {\n const core = this.getCore();\n // Only replace the node when it falls within editor\n if (this.contains(existingNode) && toNode) {\n core.api.transformColor(\n core,\n transformColorForDarkMode ? toNode : null,\n true /*includeSelf*/,\n () => existingNode.parentNode?.replaceChild(toNode, existingNode),\n ColorTransformDirection.LightToDark\n );\n\n return true;\n }\n\n return false;\n }\n\n /**\n * Get BlockElement at given node\n * @param node The node to create InlineElement\n * @returns The BlockElement result\n */\n public getBlockElementAtNode(node: Node): BlockElement | null {\n return getBlockElementAtNode(this.getCore().contentDiv, node);\n }\n\n public contains(arg: Node | Range | null): boolean {\n if (!arg) {\n return false;\n }\n return contains(this.getCore().contentDiv, arg);\n }\n\n public queryElements(\n selector: string,\n scopeOrCallback:\n | QueryScope\n | CompatibleQueryScope\n | ((node: Node) => any) = QueryScope.Body,\n callback?: (node: Node) => any\n ) {\n const core = this.getCore();\n const result: HTMLElement[] = [];\n let scope = scopeOrCallback instanceof Function ? QueryScope.Body : scopeOrCallback;\n callback = scopeOrCallback instanceof Function ? scopeOrCallback : callback;\n\n let selectionEx = scope == QueryScope.Body ? null : this.getSelectionRangeEx();\n if (selectionEx) {\n selectionEx.ranges.forEach(range => {\n result.push(...queryElements(core.contentDiv, selector, callback, scope, range));\n });\n } else {\n return queryElements(core.contentDiv, selector, callback, scope, undefined /* range */);\n }\n\n return result;\n }\n\n /**\n * Collapse nodes within the given start and end nodes to their common ancestor node,\n * split parent nodes if necessary\n * @param start The start node\n * @param end The end node\n * @param canSplitParent True to allow split parent node there are nodes before start or after end under the same parent\n * and the returned nodes will be all nodes from start through end after splitting\n * False to disallow split parent\n * @returns When canSplitParent is true, returns all node from start through end after splitting,\n * otherwise just return start and end\n */\n public collapseNodes(start: Node, end: Node, canSplitParent: boolean): Node[] {\n return collapseNodes(this.getCore().contentDiv, start, end, canSplitParent);\n }\n\n //#endregion\n\n //#region Content API\n\n /**\n * Check whether the editor contains any visible content\n * @param trim Whether trim the content string before check. Default is false\n * @returns True if there's no visible content, otherwise false\n */\n public isEmpty(trim?: boolean): boolean {\n return isNodeEmpty(this.getCore().contentDiv, trim);\n }\n\n /**\n * Get current editor content as HTML string\n * @param mode specify what kind of HTML content to retrieve\n * @returns HTML string representing current editor content\n */\n public getContent(\n mode: GetContentMode | CompatibleGetContentMode = GetContentMode.CleanHTML\n ): string {\n const core = this.getCore();\n return core.api.getContent(core, mode);\n }\n\n /**\n * Set HTML content to this editor. All existing content will be replaced. A ContentChanged event will be triggered\n * @param content HTML content to set in\n * @param triggerContentChangedEvent True to trigger a ContentChanged event. Default value is true\n */\n public setContent(content: string, triggerContentChangedEvent: boolean = true) {\n const core = this.getCore();\n core.api.setContent(core, content, triggerContentChangedEvent);\n }\n\n /**\n * Insert HTML content into editor\n * @param HTML content to insert\n * @param option Insert options. Default value is:\n * position: ContentPosition.SelectionStart\n * updateCursor: true\n * replaceSelection: true\n * insertOnNewLine: false\n */\n public insertContent(content: string, option?: InsertOption) {\n if (content) {\n const doc = this.getDocument();\n const body = new DOMParser().parseFromString(\n this.getCore().trustedHTMLHandler(content),\n 'text/html'\n )?.body;\n let allNodes = body?.childNodes ? toArray(body.childNodes) : [];\n\n // If it is to insert on new line, and there are more than one node in the collection, wrap all nodes with\n // a parent DIV before calling insertNode on each top level sub node. Otherwise, every sub node may get wrapped\n // separately to show up on its own line\n if (option && option.insertOnNewLine && allNodes.length > 1) {\n allNodes = [wrap(allNodes)];\n }\n\n let fragment = doc.createDocumentFragment();\n allNodes.forEach(node => fragment.appendChild(node));\n\n this.insertNode(fragment, option);\n }\n }\n\n /**\n * Delete selected content\n */\n public deleteSelectedContent(): NodePosition | null {\n const range = this.getSelectionRange();\n if (range && !range.collapsed) {\n return deleteSelectedContent(this.getCore().contentDiv, range);\n }\n return null;\n }\n\n /**\n * Paste into editor using a clipboardData object\n * @param clipboardData Clipboard data retrieved from clipboard\n * @param pasteAsText Force pasting as plain text. Default value is false\n * @param applyCurrentStyle True if apply format of current selection to the pasted content,\n * false to keep original format. Default value is false. When pasteAsText is true, this parameter is ignored\n * @param pasteAsImage: When set to true, if the clipboardData contains a imageDataUri will paste the image to the editor\n */\n public paste(\n clipboardData: ClipboardData,\n pasteAsText: boolean = false,\n applyCurrentFormat: boolean = false,\n pasteAsImage: boolean = false\n ) {\n const core = this.getCore();\n if (!clipboardData) {\n return;\n }\n\n if (clipboardData.snapshotBeforePaste) {\n // Restore original content before paste a new one\n this.setContent(clipboardData.snapshotBeforePaste);\n } else {\n clipboardData.snapshotBeforePaste = this.getContent(\n GetContentMode.RawHTMLWithSelection\n );\n }\n\n const range = this.getSelectionRange();\n const pos = range && Position.getStart(range);\n const fragment = core.api.createPasteFragment(\n core,\n clipboardData,\n pos,\n pasteAsText,\n applyCurrentFormat,\n pasteAsImage\n );\n if (fragment) {\n this.addUndoSnapshot(() => {\n this.insertNode(fragment);\n return clipboardData;\n }, ChangeSource.Paste);\n }\n }\n\n //#endregion\n\n //#region Focus and Selection\n\n /**\n * Get current selection range from Editor.\n * It does a live pull on the selection, if nothing retrieved, return whatever we have in cache.\n * @param tryGetFromCache Set to true to retrieve the selection range from cache if editor doesn't own the focus now.\n * Default value is true\n * @returns current selection range, or null if editor never got focus before\n */\n public getSelectionRange(tryGetFromCache: boolean = true): Range | null {\n const core = this.getCore();\n return core.api.getSelectionRange(core, tryGetFromCache);\n }\n\n /**\n * Get current selection range from Editor.\n * It does a live pull on the selection, if nothing retrieved, return whatever we have in cache.\n * @param tryGetFromCache Set to true to retrieve the selection range from cache if editor doesn't own the focus now.\n * Default value is true\n * @returns current selection range, or null if editor never got focus before\n */\n public getSelectionRangeEx(): SelectionRangeEx {\n const core = this.getCore();\n return core.api.getSelectionRangeEx(core);\n }\n\n /**\n * Get current selection in a serializable format\n * It does a live pull on the selection, if nothing retrieved, return whatever we have in cache.\n * @returns current selection path, or null if editor never got focus before\n */\n public getSelectionPath(): SelectionPath | null {\n const range = this.getSelectionRange();\n return range && getSelectionPath(this.getCore().contentDiv, range);\n }\n\n /**\n * Check if focus is in editor now\n * @returns true if focus is in editor, otherwise false\n */\n public hasFocus(): boolean {\n const core = this.getCore();\n return core.api.hasFocus(core);\n }\n\n /**\n * Focus to this editor, the selection was restored to where it was before, no unexpected scroll.\n */\n public focus() {\n const core = this.getCore();\n core.api.focus(core);\n }\n\n public select(\n arg1: Range | SelectionRangeEx | NodePosition | Node | SelectionPath | null,\n arg2?: NodePosition | number | PositionType | TableSelection | null,\n arg3?: Node,\n arg4?: number | PositionType\n ): boolean {\n const core = this.getCore();\n\n return core.api.select(core, arg1, arg2, arg3, arg4);\n }\n\n /**\n * Get current focused position. Return null if editor doesn't have focus at this time.\n */\n public getFocusedPosition(): NodePosition | null {\n let sel = this.getDocument().defaultView?.getSelection();\n if (sel?.focusNode && this.contains(sel.focusNode)) {\n return new Position(sel.focusNode, sel.focusOffset);\n }\n\n let range = this.getSelectionRange();\n if (range) {\n return Position.getStart(range);\n }\n\n return null;\n }\n\n /**\n * Get an HTML element from current cursor position.\n * When expectedTags is not specified, return value is the current node (if it is HTML element)\n * or its parent node (if current node is a Text node).\n * When expectedTags is specified, return value is the first ancestor of current node which has\n * one of the expected tags.\n * If no element found within editor by the given tag, return null.\n * @param selector Optional, an HTML selector to find HTML element with.\n * @param startFrom Start search from this node. If not specified, start from current focused position\n * @param event Optional, if specified, editor will try to get cached result from the event object first.\n * If it is not cached before, query from DOM and cache the result into the event object\n */\n public getElementAtCursor(\n selector?: string,\n startFrom?: Node,\n event?: PluginEvent\n ): HTMLElement | null {\n event = startFrom ? undefined : event; // Only use cache when startFrom is not specified, for different start position can have different result\n\n return (\n cacheGetEventData(event ?? null, 'GET_ELEMENT_AT_CURSOR_' + selector, () => {\n if (!startFrom) {\n let position = this.getFocusedPosition();\n startFrom = position?.node;\n }\n return (\n startFrom &&\n findClosestElementAncestor(startFrom, this.getCore().contentDiv, selector)\n );\n }) ?? null\n );\n }\n\n /**\n * Check if this position is at beginning of the editor.\n * This will return true if all nodes between the beginning of target node and the position are empty.\n * @param position The position to check\n * @returns True if position is at beginning of the editor, otherwise false\n */\n public isPositionAtBeginning(position: NodePosition): boolean {\n return isPositionAtBeginningOf(position, this.getCore().contentDiv);\n }\n\n /**\n * Get impacted regions from selection\n */\n public getSelectedRegions(\n type: RegionType | CompatibleRegionType = RegionType.Table\n ): Region[] {\n const selection = this.getSelectionRangeEx();\n const result: Region[] = [];\n const contentDiv = this.getCore().contentDiv;\n selection.ranges.forEach(range => {\n result.push(...(range ? getRegionsFromRange(contentDiv, range, type) : []));\n });\n return result.filter((value, index, self) => {\n return self.indexOf(value) === index;\n });\n }\n\n //#endregion\n\n //#region EVENT API\n\n public addDomEventHandler(\n nameOrMap: string | Record,\n handler?: DOMEventHandler\n ): () => void {\n const eventsToMap = typeof nameOrMap == 'string' ? { [nameOrMap]: handler! } : nameOrMap;\n const core = this.getCore();\n return core.api.attachDomEvent(core, eventsToMap);\n }\n\n /**\n * Trigger an event to be dispatched to all plugins\n * @param eventType Type of the event\n * @param data data of the event with given type, this is the rest part of PluginEvent with the given type\n * @param broadcast indicates if the event needs to be dispatched to all plugins\n * True means to all, false means to allow exclusive handling from one plugin unless no one wants that\n * @returns the event object which is really passed into plugins. Some plugin may modify the event object so\n * the result of this function provides a chance to read the modified result\n */\n public triggerPluginEvent(\n eventType: T,\n data: PluginEventData,\n broadcast: boolean = false\n ): PluginEventFromType {\n const core = this.getCore();\n let event = ({\n eventType,\n ...data,\n } as any) as PluginEventFromType;\n core.api.triggerEvent(core, event, broadcast);\n\n return event;\n }\n\n /**\n * Trigger a ContentChangedEvent\n * @param source Source of this event, by default is 'SetContent'\n * @param data additional data for this event\n */\n public triggerContentChangedEvent(\n source: ChangeSource | CompatibleChangeSource | string = ChangeSource.SetContent,\n data?: any\n ) {\n this.triggerPluginEvent(PluginEventType.ContentChanged, {\n source,\n data,\n });\n }\n\n //#endregion\n\n //#region Undo API\n\n /**\n * Undo last edit operation\n */\n public undo() {\n this.focus();\n const core = this.getCore();\n core.api.restoreUndoSnapshot(core, -1 /*step*/);\n }\n\n /**\n * Redo next edit operation\n */\n public redo() {\n this.focus();\n const core = this.getCore();\n core.api.restoreUndoSnapshot(core, 1 /*step*/);\n }\n\n /**\n * Add undo snapshot, and execute a format callback function, then add another undo snapshot, then trigger\n * ContentChangedEvent with given change source.\n * If this function is called nested, undo snapshot will only be added in the outside one\n * @param callback The callback function to perform formatting, returns a data object which will be used as\n * the data field in ContentChangedEvent if changeSource is not null.\n * @param changeSource The change source to use when fire ContentChangedEvent. When the value is not null,\n * a ContentChangedEvent will be fired with change source equal to this value\n * @param canUndoByBackspace True if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n public addUndoSnapshot(\n callback?: (start: NodePosition | null, end: NodePosition | null) => any,\n changeSource?: ChangeSource | CompatibleChangeSource | string,\n canUndoByBackspace?: boolean,\n additionalData?: ContentChangedData\n ) {\n const core = this.getCore();\n core.api.addUndoSnapshot(\n core,\n callback ?? null,\n changeSource ?? null,\n canUndoByBackspace ?? false,\n additionalData\n );\n }\n\n /**\n * Whether there is an available undo/redo snapshot\n */\n public getUndoState(): EditorUndoState {\n const { hasNewContent, snapshotsService } = this.getCore().undo;\n return {\n canUndo: hasNewContent || snapshotsService.canMove(-1 /*previousSnapshot*/),\n canRedo: snapshotsService.canMove(1 /*nextSnapshot*/),\n };\n }\n\n //#endregion\n\n //#region Misc\n\n /**\n * Get document which contains this editor\n * @returns The HTML document which contains this editor\n */\n public getDocument(): Document {\n return this.getCore().contentDiv.ownerDocument;\n }\n\n /**\n * Get the scroll container of the editor\n */\n public getScrollContainer(): HTMLElement {\n return this.getCore().domEvent.scrollContainer;\n }\n\n /**\n * Get custom data related to this editor\n * @param key Key of the custom data\n * @param getter Getter function. If custom data for the given key doesn't exist,\n * call this function to get one and store it if it is specified. Otherwise return undefined\n * @param disposer An optional disposer function to dispose this custom data when\n * dispose editor.\n */\n public getCustomData(key: string, getter?: () => T, disposer?: (value: T) => void): T {\n const core = this.getCore();\n return (core.lifecycle.customData[key] = core.lifecycle.customData[key] || {\n value: getter ? getter() : undefined,\n disposer,\n }).value as T;\n }\n\n /**\n * Check if editor is in IME input sequence\n * @returns True if editor is in IME input sequence, otherwise false\n */\n public isInIME(): boolean {\n return this.getCore().domEvent.isInIME;\n }\n\n /**\n * Get default format of this editor\n * @returns Default format object of this editor\n */\n public getDefaultFormat(): DefaultFormat {\n return this.getCore().lifecycle.defaultFormat ?? {};\n }\n\n /**\n * Get a content traverser for the whole editor\n * @param startNode The node to start from. If not passed, it will start from the beginning of the body\n */\n public getBodyTraverser(startNode?: Node): IContentTraverser {\n return ContentTraverser.createBodyTraverser(this.getCore().contentDiv, startNode);\n }\n\n /**\n * Get a content traverser for current selection\n * @returns A content traverser, or null if editor never got focus before\n */\n public getSelectionTraverser(range?: Range): IContentTraverser | null {\n range = range ?? this.getSelectionRange() ?? undefined;\n return range\n ? ContentTraverser.createSelectionTraverser(this.getCore().contentDiv, range)\n : null;\n }\n\n /**\n * Get a content traverser for current block element start from specified position\n * @param startFrom Start position of the traverser. Default value is ContentPosition.SelectionStart\n * @returns A content traverser, or null if editor never got focus before\n */\n public getBlockTraverser(\n startFrom: ContentPosition | CompatibleContentPosition = ContentPosition.SelectionStart\n ): IContentTraverser | null {\n let range = this.getSelectionRange();\n return range\n ? ContentTraverser.createBlockTraverser(this.getCore().contentDiv, range, startFrom)\n : null;\n }\n\n /**\n * Get a text traverser of current selection\n * @param event Optional, if specified, editor will try to get cached result from the event object first.\n * If it is not cached before, query from DOM and cache the result into the event object\n * @returns A content traverser, or null if editor never got focus before\n */\n public getContentSearcherOfCursor(event?: PluginEvent): IPositionContentSearcher | null {\n return cacheGetEventData(event ?? null, 'ContentSearcher', () => {\n let range = this.getSelectionRange();\n return (\n range &&\n new PositionContentSearcher(this.getCore().contentDiv, Position.getStart(range))\n );\n });\n }\n\n /**\n * Run a callback function asynchronously\n * @param callback The callback function to run\n * @returns a function to cancel this async run\n */\n public runAsync(callback: (editor: IEditor) => void) {\n let win = this.getCore().contentDiv.ownerDocument.defaultView || window;\n const handle = win.requestAnimationFrame(() => {\n if (!this.isDisposed() && callback) {\n callback(this);\n }\n });\n\n return () => {\n win.cancelAnimationFrame(handle);\n };\n }\n\n /**\n * Set DOM attribute of editor content DIV\n * @param name Name of the attribute\n * @param value Value of the attribute\n */\n public setEditorDomAttribute(name: string, value: string | null) {\n if (value === null) {\n this.getCore().contentDiv.removeAttribute(name);\n } else {\n this.getCore().contentDiv.setAttribute(name, value);\n }\n }\n\n /**\n * Get DOM attribute of editor content DIV, null if there is no such attribute.\n * @param name Name of the attribute\n */\n public getEditorDomAttribute(name: string): string | null {\n return this.getCore().contentDiv.getAttribute(name);\n }\n\n /**\n * @deprecated Use getVisibleViewport() instead.\n *\n * Get current relative distance from top-left corner of the given element to top-left corner of editor content DIV.\n * @param element The element to calculate from. If the given element is not in editor, return value will be null\n * @param addScroll When pass true, The return value will also add scrollLeft and scrollTop if any. So the value\n * may be different than what user is seeing from the view. When pass false, scroll position will be ignored.\n * @returns An [x, y] array which contains the left and top distances, or null if the given element is not in editor.\n */\n getRelativeDistanceToEditor(element: HTMLElement, addScroll?: boolean): number[] | null {\n if (this.contains(element)) {\n const contentDiv = this.getCore().contentDiv;\n const editorRect = contentDiv.getBoundingClientRect();\n const elementRect = element.getBoundingClientRect();\n\n if (editorRect && elementRect) {\n let x = elementRect.left - editorRect?.left;\n let y = elementRect.top - editorRect?.top;\n\n if (addScroll) {\n x += contentDiv.scrollLeft;\n y += contentDiv.scrollTop;\n }\n\n return [x, y];\n }\n }\n\n return null;\n }\n\n /**\n * Add a Content Edit feature.\n * @param feature The feature to add\n */\n public addContentEditFeature(feature: GenericContentEditFeature) {\n const core = this.getCore();\n feature?.keys.forEach(key => {\n let array = core.edit.features[key] || [];\n array.push(feature);\n core.edit.features[key] = array;\n });\n }\n\n /**\n * Remove a Content Edit feature.\n * @param feature The feature to remove\n */\n public removeContentEditFeature(feature: GenericContentEditFeature) {\n const core = this.getCore();\n feature?.keys.forEach(key => {\n const featureSet = core.edit.features[key];\n const index = featureSet?.indexOf(feature) ?? -1;\n if (index >= 0) {\n core.edit.features[key].splice(index, 1);\n if (core.edit.features[key].length < 1) {\n delete core.edit.features[key];\n }\n }\n });\n }\n\n /**\n * Get style based format state from current selection, including font name/size and colors\n */\n public getStyleBasedFormatState(node?: Node): StyleBasedFormatState {\n if (!node) {\n const range = this.getSelectionRange();\n node = (range && Position.getStart(range).normalize().node) ?? undefined;\n }\n const core = this.getCore();\n return core.api.getStyleBasedFormatState(core, node ?? null);\n }\n\n /**\n * Get the pendable format such as underline and bold\n * @param forceGetStateFromDOM If set to true, will force get the format state from DOM tree.\n * @returns The pending format state\n */\n public getPendableFormatState(forceGetStateFromDOM: boolean = false): PendableFormatState {\n const core = this.getCore();\n return core.api.getPendableFormatState(core, forceGetStateFromDOM);\n }\n\n /**\n * Ensure user will type into a container element rather than into the editor content DIV directly\n * @param position The position that user is about to type to\n * @param keyboardEvent Optional keyboard event object\n */\n public ensureTypeInContainer(position: NodePosition, keyboardEvent?: KeyboardEvent) {\n const core = this.getCore();\n core.api.ensureTypeInContainer(core, position, keyboardEvent);\n }\n\n //#endregion\n\n //#region Dark mode APIs\n\n /**\n * Set the dark mode state and transforms the content to match the new state.\n * @param nextDarkMode The next status of dark mode. True if the editor should be in dark mode, false if not.\n */\n public setDarkModeState(nextDarkMode?: boolean) {\n const isDarkMode = this.isDarkMode();\n\n if (isDarkMode == !!nextDarkMode) {\n return;\n }\n const core = this.getCore();\n\n core.api.transformColor(\n core,\n core.contentDiv,\n false /*includeSelf*/,\n null /*callback*/,\n nextDarkMode\n ? ColorTransformDirection.LightToDark\n : ColorTransformDirection.DarkToLight,\n true /*forceTransform*/,\n isDarkMode\n );\n\n this.triggerContentChangedEvent(\n nextDarkMode ? ChangeSource.SwitchToDarkMode : ChangeSource.SwitchToLightMode\n );\n }\n\n /**\n * Check if the editor is in dark mode\n * @returns True if the editor is in dark mode, otherwise false\n */\n public isDarkMode(): boolean {\n return this.getCore().lifecycle.isDarkMode;\n }\n\n /**\n * Transform the given node and all its child nodes to dark mode color if editor is in dark mode\n * @param node The node to transform\n */\n public transformToDarkColor(node: Node) {\n const core = this.getCore();\n core.api.transformColor(\n core,\n node,\n true /*includeSelf*/,\n null /*callback*/,\n ColorTransformDirection.LightToDark\n );\n }\n\n /**\n * Get a darkColorHandler object for this editor.\n */\n public getDarkColorHandler(): DarkColorHandler {\n return this.getCore().darkColorHandler;\n }\n\n /**\n * Make the editor in \"Shadow Edit\" mode.\n * In Shadow Edit mode, all format change will finally be ignored.\n * This can be used for building a live preview feature for format button, to allow user\n * see format result without really apply it.\n * This function can be called repeated. If editor is already in shadow edit mode, we can still\n * use this function to do more shadow edit operation.\n */\n public startShadowEdit() {\n const core = this.getCore();\n core.api.switchShadowEdit(core, true /*isOn*/);\n }\n\n /**\n * Leave \"Shadow Edit\" mode, all changes made during shadow edit will be discarded\n */\n public stopShadowEdit() {\n const core = this.getCore();\n core.api.switchShadowEdit(core, false /*isOn*/);\n }\n\n /**\n * Check if editor is in Shadow Edit mode\n */\n public isInShadowEdit() {\n return !!this.getCore().lifecycle.shadowEditFragment;\n }\n\n /**\n * Check if the given experimental feature is enabled\n * @param feature The feature to check\n */\n public isFeatureEnabled(\n feature: ExperimentalFeatures | CompatibleExperimentalFeatures\n ): boolean {\n return isFeatureEnabled(this.getCore().lifecycle.experimentalFeatures, feature);\n }\n\n /**\n * Get a function to convert HTML string to trusted HTML string.\n * By default it will just return the input HTML directly. To override this behavior,\n * pass your own trusted HTML handler to EditorOptions.trustedHTMLHandler\n * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types\n */\n getTrustedHTMLHandler(): TrustedHTMLHandler {\n return this.getCore().trustedHTMLHandler;\n }\n\n /**\n * @deprecated Use getZoomScale() instead\n */\n getSizeTransformer(): SizeTransformer {\n return this.getCore().sizeTransformer;\n }\n\n /**\n * Get current zoom scale, default value is 1\n * When editor is put under a zoomed container, need to pass the zoom scale number using EditorOptions.zoomScale\n * to let editor behave correctly especially for those mouse drag/drop behaviors\n * @returns current zoom scale number\n */\n getZoomScale(): number {\n return this.getCore().zoomScale;\n }\n\n /**\n * Set current zoom scale, default value is 1\n * When editor is put under a zoomed container, need to pass the zoom scale number using EditorOptions.zoomScale\n * to let editor behave correctly especially for those mouse drag/drop behaviors\n * @param scale The new scale number to set. It should be positive number and no greater than 10, otherwise it will be ignored.\n */\n setZoomScale(scale: number): void {\n const core = this.getCore();\n if (scale > 0 && scale <= 10) {\n const oldValue = core.zoomScale;\n core.zoomScale = scale;\n\n if (oldValue != scale) {\n this.triggerPluginEvent(\n PluginEventType.ZoomChanged,\n {\n oldZoomScale: oldValue,\n newZoomScale: scale,\n },\n true /*broadcast*/\n );\n }\n }\n }\n\n /**\n * Retrieves the rect of the visible viewport of the editor.\n */\n getVisibleViewport(): Rect | null {\n return this.getCore().getVisibleViewport();\n }\n\n /**\n * @returns the current EditorCore object\n * @throws a standard Error if there's no core object\n */\n protected getCore(): TEditorCore {\n if (!this.core) {\n throw new Error('Editor is already disposed');\n }\n return this.core;\n }\n\n //#endregion\n}\n","import createCorePlugins, { getPluginState } from '../corePlugins/createCorePlugins';\nimport DarkColorHandlerImpl from './DarkColorHandlerImpl';\nimport { arrayPush, getIntersectedRect, getObjectKeys } from 'roosterjs-editor-dom';\nimport { coreApiMap } from '../coreApi/coreApiMap';\nimport { CoreCreator, EditorCore, EditorOptions, EditorPlugin } from 'roosterjs-editor-types';\n\n/**\n * Create a new instance of Editor Core\n * @param contentDiv The DIV HTML element which will be the container element of editor\n * @param options An optional options object to customize the editor\n */\nexport const createEditorCore: CoreCreator = (contentDiv, options) => {\n const corePlugins = createCorePlugins(contentDiv, options);\n const plugins: EditorPlugin[] = [];\n\n getObjectKeys(corePlugins).forEach(name => {\n if (name == '_placeholder') {\n if (options.plugins) {\n arrayPush(plugins, options.plugins);\n }\n } else {\n plugins.push(corePlugins[name]);\n }\n });\n\n const pluginState = getPluginState(corePlugins);\n const zoomScale: number = (options.zoomScale ?? -1) > 0 ? options.zoomScale! : 1;\n const getVisibleViewport =\n options.getVisibleViewport ||\n (() => {\n const scrollContainer = pluginState.domEvent.scrollContainer;\n\n return getIntersectedRect(\n scrollContainer == core.contentDiv\n ? [scrollContainer]\n : [scrollContainer, core.contentDiv]\n );\n });\n\n const core: EditorCore = {\n contentDiv,\n api: {\n ...coreApiMap,\n ...(options.coreApiOverride || {}),\n },\n originalApi: coreApiMap,\n plugins: plugins.filter(x => !!x),\n ...pluginState,\n trustedHTMLHandler: options.trustedHTMLHandler || ((html: string) => html),\n zoomScale: zoomScale,\n sizeTransformer: options.sizeTransformer || ((size: number) => size / zoomScale),\n getVisibleViewport,\n imageSelectionBorderColor: options.imageSelectionBorderColor,\n darkColorHandler: new DarkColorHandlerImpl(contentDiv, pluginState.lifecycle.getDarkColor),\n };\n\n return core;\n};\n","import { ExperimentalFeatures } from 'roosterjs-editor-types';\nimport type { CompatibleExperimentalFeatures } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Check if the given experimental feature is enabled\n * @param featureSet All enabled features\n * @param feature The feature to check\n * @returns True if the given feature is enabled, otherwise false\n */\nexport function isFeatureEnabled(\n featureSet: (ExperimentalFeatures | CompatibleExperimentalFeatures)[] | undefined,\n feature: ExperimentalFeatures | CompatibleExperimentalFeatures\n) {\n return (featureSet || []).indexOf(feature) >= 0;\n}\n","// Classes\r\nexport { default as Editor } from './editor/Editor';\r\nexport { EditorBase } from './editor/EditorBase';\r\nexport { isFeatureEnabled } from './editor/isFeatureEnabled';\r\nexport { createEditorCore } from './editor/createEditorCore';\r\n","import contains from '../utils/contains';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * This presents a content block that can be represented by a single html block type element.\r\n * In most cases, it corresponds to an HTML block level element, i.e. P, DIV, LI, TD etc.\r\n */\r\nexport default class NodeBlockElement implements BlockElement {\r\n constructor(private element: HTMLElement) {}\r\n\r\n /**\r\n * Collapse this element to a single DOM element.\r\n * If the content nodes are separated in different root nodes, wrap them to a single node\r\n * If the content nodes are included in root node with other nodes, split root node\r\n */\r\n public collapseToSingleElement(): HTMLElement {\r\n return this.element;\r\n }\r\n\r\n /**\r\n * Get the start node of the block\r\n * For NodeBlockElement, start and end essentially refers to same node\r\n */\r\n public getStartNode(): Node {\r\n return this.element;\r\n }\r\n\r\n /**\r\n * Get the end node of the block\r\n * For NodeBlockElement, start and end essentially refers to same node\r\n */\r\n public getEndNode(): Node {\r\n return this.element;\r\n }\r\n\r\n /**\r\n * Checks if it refers to same block\r\n */\r\n public equals(blockElement: BlockElement): boolean {\r\n // Ideally there is only one unique way to generate a block so we only need to compare the startNode\r\n return this.element == blockElement.getStartNode();\r\n }\r\n\r\n /**\r\n * Checks if a block is after the current block\r\n */\r\n public isAfter(blockElement: BlockElement): boolean {\r\n // if the block's startNode is after current node endEnd, we say it is after\r\n return isNodeAfter(this.element, blockElement.getEndNode());\r\n }\r\n\r\n /**\r\n * Checks if a certain html node is within the block\r\n */\r\n public contains(node: Node): boolean {\r\n return contains(this.element, node, true /*treatSameNodeAsContain*/);\r\n }\r\n\r\n /**\r\n * Get the text content of this block element\r\n */\r\n public getTextContent(): string {\r\n return this.element?.textContent || '';\r\n }\r\n}\r\n","import collapseNodes from '../utils/collapseNodes';\r\nimport contains from '../utils/contains';\r\nimport createRange from '../selection/createRange';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport isBlockElement from '../utils/isBlockElement';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport wrap from '../utils/wrap';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\nimport { splitBalancedNodeRange } from '../utils/splitParentNode';\r\n\r\nconst STRUCTURE_NODE_TAGS = ['TD', 'TH', 'LI', 'BLOCKQUOTE'];\r\n\r\n/**\r\n * @internal\r\n * This represents a block that is identified by a start and end node\r\n * This is for cases like <root>Hello<BR>World</root>\r\n * in that case, Hello<BR> is a block, World is another block\r\n * Such block cannot be represented by a NodeBlockElement since they don't chained up\r\n * to a single parent node, instead they have a start and end\r\n * This start and end must be in same sibling level and have same parent in DOM tree\r\n */\r\nexport default class StartEndBlockElement implements BlockElement {\r\n constructor(private rootNode: Node, private startNode: Node, private endNode: Node) {}\r\n\r\n static getBlockContext(node: Node): HTMLElement | null {\r\n let currentNode: Node | null = node;\r\n while (currentNode && !isBlockElement(currentNode)) {\r\n currentNode = currentNode.parentNode;\r\n }\r\n return currentNode as HTMLElement;\r\n }\r\n\r\n /**\r\n * Collapse this element to a single DOM element.\r\n * If the content nodes are separated in different root nodes, wrap them to a single node\r\n * If the content nodes are included in root node with other nodes, split root node\r\n */\r\n public collapseToSingleElement(): HTMLElement {\r\n const nodeContext = StartEndBlockElement.getBlockContext(this.startNode);\r\n let nodes = nodeContext\r\n ? collapseNodes(nodeContext, this.startNode, this.endNode, true /*canSplitParent*/)\r\n : [];\r\n let blockContext = StartEndBlockElement.getBlockContext(this.startNode);\r\n while (\r\n nodes[0] &&\r\n nodes[0] != blockContext &&\r\n nodes[0].parentNode != this.rootNode &&\r\n STRUCTURE_NODE_TAGS.indexOf(getTagOfNode(nodes[0].parentNode)) < 0\r\n ) {\r\n const newNode = splitBalancedNodeRange(nodes);\r\n if (newNode) {\r\n nodes = [newNode];\r\n } else {\r\n break;\r\n }\r\n }\r\n return nodes.length == 1 && isBlockElement(nodes[0])\r\n ? (nodes[0] as HTMLElement)\r\n : wrap(nodes);\r\n }\r\n\r\n /**\r\n * Gets the start node\r\n */\r\n public getStartNode(): Node {\r\n return this.startNode;\r\n }\r\n\r\n /**\r\n * Gets the end node\r\n */\r\n public getEndNode(): Node {\r\n return this.endNode;\r\n }\r\n\r\n /**\r\n * Checks equals of two blocks\r\n */\r\n public equals(blockElement: BlockElement): boolean {\r\n return (\r\n this.startNode == blockElement.getStartNode() &&\r\n this.endNode == blockElement.getEndNode()\r\n );\r\n }\r\n\r\n /**\r\n * Checks if another block is after this current\r\n */\r\n public isAfter(blockElement: BlockElement): boolean {\r\n return isNodeAfter(this.getStartNode(), blockElement.getEndNode());\r\n }\r\n\r\n /**\r\n * Checks if an Html node is contained within the block\r\n */\r\n public contains(node: Node): boolean {\r\n return (\r\n contains(this.startNode, node, true /*treatSameNodeAsContain*/) ||\r\n contains(this.endNode, node, true /*treatSameNodeAsContain*/) ||\r\n (isNodeAfter(node, this.startNode) && isNodeAfter(this.endNode, node))\r\n );\r\n }\r\n\r\n /**\r\n * Get the text content of this block element\r\n */\r\n public getTextContent(): string {\r\n const range = createRange(this.getStartNode(), this.getEndNode());\r\n return range ? range.toString() : '';\r\n }\r\n}\r\n","import collapseNodes from '../utils/collapseNodes';\r\nimport contains from '../utils/contains';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport isBlockElement from '../utils/isBlockElement';\r\nimport NodeBlockElement from './NodeBlockElement';\r\nimport StartEndBlockElement from './StartEndBlockElement';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This produces a block element from a a node\r\n * It needs to account for various HTML structure. Examples:\r\n * 1) <root><div>abc</div></root>\r\n * This is most common the case, user passes in a node pointing to abc, and get back a block representing <div>abc</div>\r\n * 2) <root><p><br></p></root>\r\n * Common content for empty block, user passes node pointing to <br>, and get back a block representing <p><br></p>\r\n * 3) <root>abc</root>\r\n * Not common, but does happen. It is still a block in user's view. User passes in abc, and get back a start-end block representing abc\r\n * NOTE: abc could be just one node. However, since it is not a html block, it is more appropriate to use start-end block although they point to same node\r\n * 4) <root><div>abc<br>123</div></root>\r\n * A bit tricky, but can happen when user use Ctrl+Enter which simply inserts a <BR> to create a link break. There're two blocks:\r\n * block1: 1) abc<br> block2: 123\r\n * 5) <root><div>abc<div>123</div></div></root>\r\n * Nesting div and there is text node in same level as a DIV. Two blocks: 1) abc 2) <div>123</div>\r\n * 6) <root><div>abc<span>123<br>456</span></div></root>\r\n * This is really tricky. Essentially there is a <BR> in middle of a span breaking the span into two blocks;\r\n * block1: abc<span>123<br> block2: 456\r\n * In summary, given any arbitrary node (leaf), to identify the head and tail of the block, following rules need to be followed:\r\n * 1) to identify the head, it needs to crawl DOM tre left/up till a block node or BR is encountered\r\n * 2) same for identifying tail\r\n * 3) should also apply a block ceiling, meaning as it crawls up, it should stop at a block node\r\n * @param rootNode Root node of the scope, the block element will be inside of this node\r\n * @param node The node to get BlockElement start from\r\n */\r\nexport default function getBlockElementAtNode(\r\n rootNode: Node,\r\n node: Node | null\r\n): BlockElement | null {\r\n if (!contains(rootNode, node)) {\r\n return null;\r\n }\r\n\r\n // Identify the containing block. This serves as ceiling for traversing down below\r\n // NOTE: this container block could be just the rootNode,\r\n // which cannot be used to create block element. We will special case handle it later on\r\n let containerBlockNode = StartEndBlockElement.getBlockContext(node!);\r\n if (!containerBlockNode) {\r\n return null;\r\n } else if (containerBlockNode == node) {\r\n return new NodeBlockElement(containerBlockNode);\r\n }\r\n\r\n // Find the head and leaf node in the block\r\n let headNode = findHeadTailLeafNode(node!, containerBlockNode, false /*isTail*/);\r\n let tailNode = findHeadTailLeafNode(node!, containerBlockNode, true /*isTail*/);\r\n\r\n if (!headNode || !tailNode) {\r\n return null;\r\n }\r\n\r\n // At this point, we have the head and tail of a block, here are some examples and where head and tail point to\r\n // 1) <root><div>hello<br></div></root>, head: hello, tail: <br>\r\n // 2) <root><div>hello<span style=\"font-family: Arial\">world</span></div></root>, head: hello, tail: world\r\n // Both are actually completely and exclusively wrapped in a parent div, and can be represented with a Node block\r\n // So we shall try to collapse as much as we can to the nearest common ancestor\r\n let nodes = collapseNodes(rootNode, headNode, tailNode, false /*canSplitParent*/);\r\n\r\n if (nodes.length === 0) {\r\n return null;\r\n }\r\n\r\n headNode = nodes[0];\r\n tailNode = nodes[nodes.length - 1];\r\n\r\n if (headNode.parentNode != tailNode.parentNode) {\r\n // Un-Balanced start and end, create a start-end block\r\n return new StartEndBlockElement(rootNode, headNode, tailNode);\r\n } else {\r\n // Balanced start and end (point to same parent), need to see if further collapsing can be done\r\n while (!headNode.previousSibling && !tailNode.nextSibling) {\r\n let parentNode = headNode.parentNode;\r\n if (parentNode == containerBlockNode) {\r\n // Has reached the container block\r\n if (containerBlockNode != rootNode) {\r\n // If the container block is not the root, use the container block\r\n headNode = tailNode = parentNode;\r\n }\r\n break;\r\n } else if (parentNode && parentNode != rootNode) {\r\n // Continue collapsing to parent\r\n headNode = tailNode = parentNode;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // If head and tail are same and it is a block element, create NodeBlock, otherwise start-end block\r\n return headNode == tailNode && isBlockElement(headNode)\r\n ? new NodeBlockElement(headNode as HTMLElement)\r\n : new StartEndBlockElement(rootNode, headNode, tailNode);\r\n }\r\n}\r\n\r\n/**\r\n * Given a node and container block, identify the first/last leaf node\r\n * A leaf node is defined as deepest first/last node in a block\r\n * i.e. <div><span style=\"font-family: Arial\">abc</span></div>, abc is the head leaf of the block\r\n * Often <br> or a child <div> is used to create a block. In that case, the leaf after the sibling div or br should be the head leaf\r\n * i.e. <div>123<br>abc</div>, abc is the head of a block because of a previous sibling <br>\r\n * i.e. <div><div>123</div>abc</div>, abc is also the head of a block because of a previous sibling <div>\r\n */\r\nfunction findHeadTailLeafNode(node: Node, containerBlockNode: Node, isTail: boolean): Node {\r\n let result = node;\r\n\r\n if (getTagOfNode(result) == 'BR' && isTail) {\r\n return result;\r\n }\r\n\r\n while (result) {\r\n let sibling: Node | null = node;\r\n while (node.parentNode && !(sibling = isTail ? node.nextSibling : node.previousSibling)) {\r\n node = node.parentNode;\r\n if (node == containerBlockNode) {\r\n return result;\r\n }\r\n }\r\n\r\n while (sibling) {\r\n if (isBlockElement(sibling)) {\r\n return result;\r\n } else if (getTagOfNode(sibling) == 'BR') {\r\n return isTail ? sibling : result;\r\n }\r\n\r\n node = sibling;\r\n sibling = isTail ? node.firstChild : node.lastChild;\r\n }\r\n\r\n result = node;\r\n }\r\n return result;\r\n}\r\n","import getBlockElementAtNode from './getBlockElementAtNode';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get the first/last BlockElement of under the root node.\r\n * If no suitable BlockElement found, returns null\r\n * @param rootNode The root node to get BlockElement from\r\n * @param isFirst True to get first BlockElement, false to get last BlockElement\r\n */\r\nexport default function getFirstLastBlockElement(\r\n rootNode: Node,\r\n isFirst: boolean\r\n): BlockElement | null {\r\n let node: Node | null = rootNode;\r\n do {\r\n node = node && (isFirst ? node.firstChild : node.lastChild);\r\n } while (node && node.firstChild);\r\n return (node && getBlockElementAtNode(rootNode, node)) || null;\r\n}\r\n","import applyFormat from '../utils/applyFormat';\nimport applyTextStyle from '../inlineElements/applyTextStyle';\nimport handleImagePaste from './handleImagePaste';\nimport handleTextPaste from './handleTextPaste';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport retrieveMetadataFromClipboard from './retrieveMetadataFromClipboard';\nimport sanitizeContent from './sanitizePasteContent';\nimport {\n BeforePasteEvent,\n ClipboardData,\n DefaultFormat,\n EditorCore,\n NodePosition,\n} from 'roosterjs-editor-types';\n\n/**\n * Create a DocumentFragment for paste from a ClipboardData\n * @param core The EditorCore object.\n * @param clipboardData Clipboard data retrieved from clipboard\n * @param position The position to paste to\n * @param pasteAsText True to force use plain text as the content to paste, false to choose HTML or Image if any\n * @param applyCurrentStyle True if apply format of current selection to the pasted content,\n * @param pasteAsImage Whether to force paste as image\n * @param event Event to trigger.\n * false to keep original format\n */\nexport default function createFragmentFromClipboardData(\n core: EditorCore,\n clipboardData: ClipboardData,\n position: NodePosition | null,\n pasteAsText: boolean,\n applyCurrentStyle: boolean,\n pasteAsImage: boolean,\n event: BeforePasteEvent\n) {\n const { fragment } = event;\n const { rawHtml, text, imageDataUri } = clipboardData;\n let doc: Document | undefined = rawHtml\n ? new DOMParser().parseFromString(core.trustedHTMLHandler(rawHtml), 'text/html')\n : undefined;\n\n // Step 2: Retrieve Metadata from Html and the Html that was copied.\n retrieveMetadataFromClipboard(doc, event, core.trustedHTMLHandler);\n\n // Step 3: Fill the BeforePasteEvent object, especially the fragment for paste\n if ((pasteAsImage && imageDataUri) || (!pasteAsText && !text && imageDataUri)) {\n // Paste image\n handleImagePaste(imageDataUri, fragment);\n } else if (!pasteAsText && rawHtml && doc ? doc.body : false) {\n moveChildNodes(fragment, doc?.body);\n\n if (applyCurrentStyle && position) {\n const format = getCurrentFormat(core, position.node);\n applyTextStyle(fragment, node => applyFormat(node, format));\n }\n } else if (text) {\n // Paste text\n handleTextPaste(text, position, fragment);\n }\n\n // Step 4: Trigger BeforePasteEvent so that plugins can do proper change before paste\n core.api.triggerEvent(core, event, true /*broadcast*/);\n\n // Step 5. Sanitize the fragment before paste to make sure the content is safe\n sanitizeContent(event, position);\n\n return fragment;\n}\n\nfunction getCurrentFormat(core: EditorCore, node: Node): DefaultFormat {\n const pendableFormat = core.api.getPendableFormatState(core, true /** forceGetStateFromDOM*/);\n const styleBasedFormat = core.api.getStyleBasedFormatState(core, node);\n return {\n fontFamily: styleBasedFormat.fontName,\n fontSize: styleBasedFormat.fontSize,\n textColor: styleBasedFormat.textColor,\n backgroundColor: styleBasedFormat.backgroundColor,\n textColors: styleBasedFormat.textColors,\n backgroundColors: styleBasedFormat.backgroundColors,\n bold: pendableFormat.isBold,\n italic: pendableFormat.isItalic,\n underline: pendableFormat.isUnderline,\n };\n}\n","import extractClipboardItems from './extractClipboardItems';\nimport extractClipboardItemsForIE from './extractClipboardItemsForIE';\nimport toArray from '../jsUtils/toArray';\nimport { Browser } from '../utils/Browser';\nimport { ClipboardData, ExtractClipboardEventOption } from 'roosterjs-editor-types';\n\ninterface WindowForIE extends Window {\n clipboardData: DataTransfer;\n}\n\n/**\n * @deprecated Use extractClipboardItems and extractClipboardItemsForIE instead\n * Extract a Clipboard event\n * @param event The paste event\n * @param callback Callback function when data is ready\n * @param options Options to retrieve more items from the event, including HTML string and other customized items\n * @param rangeBeforePaste Optional range to be removed when pasting in Android\n * @returns An object with the following properties:\n * types: Available types from the clipboard event\n * text: Plain text from the clipboard event\n * image: Image file from the clipboard event\n * html: Html string from the clipboard event. When set to null, it means there's no HTML found from the event.\n * When set to undefined, it means can't retrieve HTML string, there may be HTML string but direct retrieving is\n * not supported by browser.\n */\nexport default function extractClipboardEvent(\n event: ClipboardEvent,\n callback: (clipboardData: ClipboardData) => void,\n options?: ExtractClipboardEventOption,\n rangeBeforePaste?: Range\n) {\n const dataTransfer =\n event.clipboardData ||\n (((event.target).ownerDocument?.defaultView)).clipboardData;\n\n if (dataTransfer.items) {\n event.preventDefault();\n extractClipboardItems(toArray(dataTransfer.items), options).then(\n (clipboardData: ClipboardData) => {\n removeContents(rangeBeforePaste);\n callback(clipboardData);\n }\n );\n } else {\n extractClipboardItemsForIE(dataTransfer, callback, options);\n }\n}\n\nfunction removeContents(range?: Range) {\n if (Browser.isAndroid && range) {\n range.deleteContents();\n }\n}\n","import readFile from '../utils/readFile';\r\nimport { Browser } from '../utils/Browser';\r\nimport {\r\n ClipboardData,\r\n ContentType,\r\n ContentTypePrefix,\r\n EdgeLinkPreview,\r\n ExtractClipboardItemsOption,\r\n} from 'roosterjs-editor-types';\r\n\r\n// HTML header to indicate where is the HTML content started from.\r\n// Sample header:\r\n// Version:0.9\r\n// StartHTML:71\r\n// EndHTML:170\r\n// StartFragment:140\r\n// EndFragment:160\r\n// StartSelection:140\r\n// EndSelection:160\r\nconst CLIPBOARD_HTML_HEADER_REGEX = /^Version:[0-9\\.]+\\s+StartHTML:\\s*([0-9]+)\\s+EndHTML:\\s*([0-9]+)\\s+/i;\r\nconst OTHER_TEXT_TYPE = ContentTypePrefix.Text + '*';\r\nconst EDGE_LINK_PREVIEW = 'link-preview';\r\nconst ContentHandlers: {\r\n [contentType: string]: (data: ClipboardData, value: string, type?: string) => void;\r\n} = {\r\n [ContentType.HTML]: (data, value) =>\r\n (data.rawHtml = Browser.isEdge ? workaroundForEdge(value) : value),\r\n [ContentType.PlainText]: (data, value) => (data.text = value),\r\n [OTHER_TEXT_TYPE]: (data, value, type?) => !!type && (data.customValues[type] = value),\r\n [ContentTypePrefix.Text + EDGE_LINK_PREVIEW]: tryParseLinkPreview,\r\n};\r\n\r\n/**\r\n * Extract clipboard items to be a ClipboardData object for IE\r\n * @param items The clipboard items retrieve from a DataTransfer object\r\n * @param callback Callback function when data is ready\r\n * @returns An object with the following properties:\r\n * types: Available types from the clipboard event\r\n * text: Plain text from the clipboard event\r\n * image: Image file from the clipboard event\r\n * html: Html string from the clipboard event. When set to null, it means there's no HTML found from the event.\r\n * When set to undefined, it means can't retrieve HTML string, there may be HTML string but direct retrieving is\r\n * not supported by browser.\r\n */\r\nexport default function extractClipboardItems(\r\n items: DataTransferItem[],\r\n options?: ExtractClipboardItemsOption\r\n): Promise {\r\n const data: ClipboardData = {\r\n types: [],\r\n text: '',\r\n image: null,\r\n files: [],\r\n rawHtml: null,\r\n customValues: {},\r\n };\r\n\r\n return Promise.all(\r\n (items || []).map(item => {\r\n const type = item.type;\r\n\r\n if (type.indexOf(ContentTypePrefix.Image) == 0 && !data.image && item.kind == 'file') {\r\n data.types.push(type);\r\n data.image = item.getAsFile();\r\n return new Promise(resolve => {\r\n if (data.image) {\r\n readFile(data.image, dataUrl => {\r\n data.imageDataUri = dataUrl;\r\n resolve();\r\n });\r\n } else {\r\n resolve();\r\n }\r\n });\r\n } else if (item.kind == 'file') {\r\n return new Promise(resolve => {\r\n const file = item.getAsFile();\r\n if (!!file) {\r\n data.types.push(type);\r\n data.files!.push(file);\r\n }\r\n resolve();\r\n });\r\n } else {\r\n const customType = getAllowedCustomType(type, options?.allowedCustomPasteType);\r\n const handler =\r\n ContentHandlers[type] || (customType ? ContentHandlers[OTHER_TEXT_TYPE] : null);\r\n return new Promise(resolve =>\r\n handler\r\n ? item.getAsString(value => {\r\n data.types.push(type);\r\n handler(data, value, customType);\r\n resolve();\r\n })\r\n : resolve()\r\n );\r\n }\r\n })\r\n ).then(() => data);\r\n}\r\n\r\n/**\r\n * Edge sometimes doesn't remove the headers, which cause we paste more things then expected.\r\n * So we need to remove it in our code\r\n * @param html The HTML string got from clipboard\r\n */\r\nfunction workaroundForEdge(html: string) {\r\n const headerValues = CLIPBOARD_HTML_HEADER_REGEX.exec(html);\r\n\r\n if (headerValues?.length == 3) {\r\n const start = parseInt(headerValues[1]);\r\n const end = parseInt(headerValues[2]);\r\n if (start > 0 && end > start) {\r\n html = html.substring(start, end);\r\n }\r\n }\r\n\r\n return html;\r\n}\r\n\r\nfunction tryParseLinkPreview(data: ClipboardData, value: string) {\r\n try {\r\n data.customValues[EDGE_LINK_PREVIEW] = value;\r\n data.linkPreview = JSON.parse(value) as EdgeLinkPreview;\r\n } catch {}\r\n}\r\n\r\nfunction getAllowedCustomType(type: string, allowedCustomPasteType?: string[]) {\r\n const textType =\r\n type.indexOf(ContentTypePrefix.Text) == 0\r\n ? type.substring(ContentTypePrefix.Text.length)\r\n : null;\r\n const index =\r\n allowedCustomPasteType && textType ? allowedCustomPasteType.indexOf(textType) : -1;\r\n return textType && index >= 0 ? textType : undefined;\r\n}\r\n","import readFile from '../utils/readFile';\r\nimport toArray from '../jsUtils/toArray';\r\nimport {\r\n ClipboardData,\r\n ContentTypePrefix,\r\n ExtractClipboardItemsForIEOptions,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Extract clipboard items to be a ClipboardData object for IE\r\n * @param dataTransfer The clipboard items retrieve from a DataTransfer object\r\n * @param callback Callback function when data is ready\r\n * @returns An object with the following properties:\r\n * types: Available types from the clipboard event\r\n * text: Plain text from the clipboard event\r\n * image: Image file from the clipboard event\r\n * html: Html string from the clipboard event. When set to null, it means there's no HTML found from the event.\r\n * When set to undefined, it means can't retrieve HTML string, there may be HTML string but direct retrieving is\r\n * not supported by browser.\r\n */\r\nexport default function extractClipboardItemsForIE(\r\n dataTransfer: DataTransfer,\r\n callback: (data: ClipboardData) => void,\r\n options?: ExtractClipboardItemsForIEOptions\r\n) {\r\n const clipboardData: ClipboardData = {\r\n types: dataTransfer.types ? toArray(dataTransfer.types) : [],\r\n text: dataTransfer.getData('text'),\r\n image: null,\r\n files: [],\r\n rawHtml: null,\r\n customValues: {},\r\n };\r\n\r\n for (let i = 0; i < (dataTransfer.files ? dataTransfer.files.length : 0); i++) {\r\n let file = dataTransfer.files.item(i);\r\n if (file?.type?.indexOf(ContentTypePrefix.Image) == 0) {\r\n clipboardData.image = file;\r\n break;\r\n }\r\n }\r\n\r\n const nextStep = () => {\r\n if (clipboardData.image) {\r\n readFile(clipboardData.image, dataUrl => {\r\n clipboardData.imageDataUri = dataUrl;\r\n callback(clipboardData);\r\n });\r\n } else {\r\n callback(clipboardData);\r\n }\r\n };\r\n\r\n if (options?.getTempDiv && options?.removeTempDiv) {\r\n const div = options.getTempDiv();\r\n div.contentEditable = 'true';\r\n div.innerHTML = '';\r\n div.focus();\r\n div.ownerDocument?.defaultView?.setTimeout(() => {\r\n clipboardData.rawHtml = div.innerHTML;\r\n options.removeTempDiv?.(div);\r\n nextStep();\r\n }, 0);\r\n } else {\r\n clipboardData.rawHtml = undefined;\r\n nextStep();\r\n }\r\n}\r\n","import { PasteType } from 'roosterjs-editor-types';\n\n/**\n * Get the paste type that will be used corresponding to the configuration\n * @param pasteAsText Whether to paste as Text\n * @param applyCurrentStyle Whether to apply the current format to the content\n * @param pasteAsImage Whether to only paste the image\n * @returns\n */\nexport default function getPasteType(\n pasteAsText: boolean,\n applyCurrentStyle: boolean,\n pasteAsImage: boolean\n) {\n if (pasteAsText) {\n return PasteType.AsPlainText;\n } else if (applyCurrentStyle) {\n return PasteType.MergeFormat;\n } else if (pasteAsImage) {\n return PasteType.AsImage;\n } else {\n return PasteType.Normal;\n }\n}\n","/**\n * Handles the content when using the Image Paste Option\n * @param imageDataUri the image uri to use for the image\n * @param fragment fragment that will contain the content to paste.\n */\nexport default function handleImagePaste(imageDataUri: string, fragment: DocumentFragment) {\n const img = fragment.ownerDocument.createElement('img');\n img.style.maxWidth = '100%';\n img.src = imageDataUri;\n fragment.appendChild(img);\n}\n","import wrap from '../utils/wrap';\nimport { NodePosition } from 'roosterjs-editor-types';\n\nconst NBSP_HTML = '\\u00A0';\nconst ENSP_HTML = '\\u2002';\nconst TAB_SPACES = 6;\n\n/**\n * handle the content when using the text only option\n * @param text Text from clipboard\n * @param position current position of the clipboard\n * @param fragment fragment that contains the paste content.\n */\nexport default function handleTextPaste(\n text: string,\n position: NodePosition | null,\n fragment: DocumentFragment\n) {\n const document = fragment.ownerDocument;\n text.split('\\n').forEach((line, index, lines) => {\n line = line\n .replace(/^ /g, NBSP_HTML)\n .replace(/\\r/g, '')\n .replace(/ {2}/g, ' ' + NBSP_HTML);\n\n if (line.includes('\\t')) {\n line = transformTabCharacters(line, index === 0 ? position?.offset : 0);\n }\n\n const textNode = document.createTextNode(line);\n\n // There are 3 scenarios:\n // 1. Single line: Paste as it is\n // 2. Two lines: Add
    between the lines\n // 3. 3 or More lines, For first and last line, paste as it is. For middle lines, wrap with DIV, and add BR if it is empty line\n if (lines.length == 2 && index == 0) {\n // 1 of 2 lines scenario, add BR\n fragment.appendChild(textNode);\n fragment.appendChild(document.createElement('br'));\n } else if (index > 0 && index < lines.length - 1) {\n // Middle line of >=3 lines scenario, wrap with DIV\n fragment.appendChild(wrap(line == '' ? document.createElement('br') : textNode));\n } else {\n // All others, paste as it is\n fragment.appendChild(textNode);\n }\n });\n}\n\n/**\n * @internal\n * Transform \\t characters into EN SPACE characters\n * @param input string NOT containing \\n characters\n * @example t(\"\\thello\", 2) => \"    hello\"\n */\n\nexport function transformTabCharacters(input: string, initialOffset: number = 0) {\n let line = input;\n let tIndex: number;\n while ((tIndex = line.indexOf('\\t')) != -1) {\n const lineBefore = line.slice(0, tIndex);\n const lineAfter = line.slice(tIndex + 1);\n const tabCount = TAB_SPACES - ((lineBefore.length + initialOffset) % TAB_SPACES);\n const tabStr = Array(tabCount).fill(ENSP_HTML).join('');\n line = lineBefore + tabStr + lineAfter;\n }\n return line;\n}\n","import getTagOfNode from '../utils/getTagOfNode';\nimport toArray from '../jsUtils/toArray';\nimport { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\n\nconst START_FRAGMENT = '';\nconst END_FRAGMENT = '';\n\n/**\n * Retrieves the metadata from the content inside of the clipboard\n * @param doc Document parsed from the clipboard\n * @param event Before Paste event\n * @param trustedHTMLHandler the trusted html handler to sanitize the content.\n */\nexport default function retrieveMetadataFromClipboard(\n doc: Document | undefined,\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { clipboardData, sanitizingOption } = event;\n const { rawHtml } = clipboardData;\n if (rawHtml && doc?.body) {\n const attributes = doc.querySelector('html')?.attributes;\n (attributes ? toArray(attributes) : []).reduce((attrs, attr) => {\n attrs[attr.name] = attr.value;\n return attrs;\n }, event.htmlAttributes);\n toArray(doc.querySelectorAll('meta')).reduce((attrs, meta) => {\n attrs[meta.name] = meta.content;\n return attrs;\n }, event.htmlAttributes);\n\n clipboardData.htmlFirstLevelChildTags = [];\n doc?.body.normalize();\n\n for (let i = 0; i < doc?.body.childNodes.length; i++) {\n const node = doc?.body.childNodes.item(i);\n if (node.nodeType == Node.TEXT_NODE) {\n const trimmedString = node.nodeValue?.replace(/(\\r\\n|\\r|\\n)/gm, '').trim();\n if (!trimmedString) {\n continue;\n }\n }\n const nodeTag = getTagOfNode(node);\n if (node.nodeType != Node.COMMENT_NODE) {\n clipboardData.htmlFirstLevelChildTags.push(nodeTag);\n }\n }\n // Move all STYLE nodes into header, and save them into sanitizing options.\n // Because if we directly move them into a fragment, all sheets under STYLE will be lost.\n processStyles(doc, style => {\n doc?.head.appendChild(style);\n sanitizingOption.additionalGlobalStyleNodes.push(style);\n });\n\n const startIndex = rawHtml.indexOf(START_FRAGMENT);\n const endIndex = rawHtml.lastIndexOf(END_FRAGMENT);\n\n if (startIndex >= 0 && endIndex >= startIndex + START_FRAGMENT.length) {\n event.htmlBefore = rawHtml.substr(0, startIndex);\n event.htmlAfter = rawHtml.substr(endIndex + END_FRAGMENT.length);\n clipboardData.html = rawHtml.substring(startIndex + START_FRAGMENT.length, endIndex);\n doc.body.innerHTML = trustedHTMLHandler(clipboardData.html);\n\n // Remove style nodes just added by setting innerHTML of body since we already have all\n // style nodes in header.\n // Here we use doc.body instead of doc because we only want to remove STYLE nodes under BODY\n // and the nodes under HEAD are still used when convert global CSS to inline\n processStyles(doc.body, style => style.parentNode?.removeChild(style));\n }\n }\n}\n\nfunction processStyles(node: ParentNode, callback: (style: HTMLStyleElement) => void) {\n toArray(node.querySelectorAll('style')).forEach(callback);\n}\n","import getInheritableStyles from '../htmlSanitizer/getInheritableStyles';\nimport HtmlSanitizer from '../htmlSanitizer/HtmlSanitizer';\nimport { BeforePasteEvent, NodePosition } from 'roosterjs-editor-types';\n\n/**\n * Sanitize the content from the pasted content\n * @param event The before paste event\n * @param position the position of the cursor\n */\nexport default function sanitizePasteContent(\n event: BeforePasteEvent,\n position: NodePosition | null\n) {\n const { fragment } = event;\n const sanitizer = new HtmlSanitizer(event.sanitizingOption);\n sanitizer.convertGlobalCssToInlineCss(fragment);\n sanitizer.sanitize(fragment, position ? getInheritableStyles(position.element) : undefined);\n}\n","import contains from '../utils/contains';\r\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getFirstLastBlockElement from '../blockElements/getFirstLastBlockElement';\r\nimport getInlineElementAtNode from '../inlineElements/getInlineElementAtNode';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { BlockElement, InlineElement } from 'roosterjs-editor-types';\r\nimport { getFirstInlineElement } from '../inlineElements/getFirstLastInlineElement';\r\n\r\n/**\r\n * @internal\r\n * provides a scope object for traversing the entire editor body starting from the beginning\r\n */\r\nexport default class BodyScoper implements TraversingScoper {\r\n private startNode: Node | null;\r\n\r\n /**\r\n * Construct a new instance of BodyScoper class\r\n * @param rootNode Root node of the body\r\n * @param startNode The node to start from. If not passed, it will start from the beginning of the body\r\n */\r\n constructor(public rootNode: Node, startNode?: Node) {\r\n this.startNode = contains(rootNode, startNode) ? startNode! : null;\r\n }\r\n\r\n /**\r\n * Get the start block element\r\n */\r\n public getStartBlockElement(): BlockElement | null {\r\n return this.startNode\r\n ? getBlockElementAtNode(this.rootNode, this.startNode)\r\n : getFirstLastBlockElement(this.rootNode, true /*isFirst*/);\r\n }\r\n\r\n /**\r\n * Get the start inline element\r\n */\r\n public getStartInlineElement(): InlineElement | null {\r\n return this.startNode\r\n ? getInlineElementAtNode(this.rootNode, this.startNode)\r\n : getFirstInlineElement(this.rootNode);\r\n }\r\n\r\n /**\r\n * Since the scope is global, all blocks under the root node are in scope\r\n */\r\n public isBlockInScope(blockElement: BlockElement): boolean {\r\n return contains(this.rootNode, blockElement.getStartNode());\r\n }\r\n\r\n /**\r\n * Since we're at body scope, inline elements never need to be trimmed\r\n */\r\n public trimInlineElement(inlineElement: InlineElement): InlineElement {\r\n return inlineElement;\r\n }\r\n}\r\n","import BodyScoper from './BodyScoper';\r\nimport EmptyInlineElement from '../inlineElements/EmptyInlineElement';\r\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getInlineElementAtNode from '../inlineElements/getInlineElementAtNode';\r\nimport PartialInlineElement from '../inlineElements/PartialInlineElement';\r\nimport SelectionBlockScoper from './SelectionBlockScoper';\r\nimport SelectionScoper from './SelectionScoper';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { getInlineElementBeforeAfter } from '../inlineElements/getInlineElementBeforeAfter';\r\nimport { getLeafSibling } from '../utils/getLeafSibling';\r\nimport type { CompatibleContentPosition } from 'roosterjs-editor-types/lib/compatibleTypes';\r\nimport {\r\n BlockElement,\r\n ContentPosition,\r\n IContentTraverser,\r\n InlineElement,\r\n NodePosition,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * The provides traversing of content inside editor.\r\n * There are two ways to traverse, block by block, or inline element by inline element\r\n * Block and inline traversing is independent from each other, meaning if you traverse block by block, it does not change\r\n * the current inline element position\r\n */\r\nexport default class ContentTraverser implements IContentTraverser {\r\n private currentInline: InlineElement | null = null;\r\n private currentBlock: BlockElement | null = null;\r\n\r\n /**\r\n * Create a content traverser for the whole body of given root node\r\n * @param scoper Traversing scoper object to help scope the traversing\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n private constructor(private scoper: TraversingScoper, private skipTags?: string[]) {}\r\n\r\n /**\r\n * Create a content traverser for the whole body of given root node\r\n * @param rootNode The root node to traverse in\r\n * @param startNode The node to start from. If not passed, it will start from the beginning of the body\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n public static createBodyTraverser(\r\n rootNode: Node,\r\n startNode?: Node,\r\n skipTags?: string[]\r\n ): IContentTraverser {\r\n return new ContentTraverser(new BodyScoper(rootNode, startNode));\r\n }\r\n\r\n /**\r\n * Create a content traverser for the given selection\r\n * @param rootNode The root node to traverse in\r\n * @param range The selection range to scope the traversing\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n public static createSelectionTraverser(\r\n rootNode: Node,\r\n range: Range,\r\n skipTags?: string[]\r\n ): IContentTraverser {\r\n return new ContentTraverser(new SelectionScoper(rootNode, range), skipTags);\r\n }\r\n\r\n /**\r\n * Create a content traverser for a block element which contains the given position\r\n * @param rootNode The root node to traverse in\r\n * @param position A position inside a block, traversing will be scoped within this block.\r\n * If passing a range, the start position of this range will be used\r\n * @param startFrom Start position of traversing. The value can be Begin, End, SelectionStart\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n public static createBlockTraverser(\r\n rootNode: Node,\r\n position: NodePosition | Range,\r\n start: ContentPosition | CompatibleContentPosition = ContentPosition.SelectionStart,\r\n skipTags?: string[]\r\n ): IContentTraverser {\r\n return new ContentTraverser(new SelectionBlockScoper(rootNode, position, start));\r\n }\r\n\r\n /**\r\n * Get current block\r\n */\r\n public get currentBlockElement(): BlockElement | null {\r\n // Prepare currentBlock from the scoper\r\n if (!this.currentBlock) {\r\n this.currentBlock = this.scoper.getStartBlockElement();\r\n }\r\n\r\n return this.currentBlock;\r\n }\r\n\r\n /**\r\n * Get next block element\r\n */\r\n public getNextBlockElement(): BlockElement | null {\r\n return this.getPreviousNextBlockElement(true /*isNext*/);\r\n }\r\n\r\n /**\r\n * Get previous block element\r\n */\r\n public getPreviousBlockElement(): BlockElement | null {\r\n return this.getPreviousNextBlockElement(false /*isNext*/);\r\n }\r\n\r\n private getPreviousNextBlockElement(isNext: boolean): BlockElement | null {\r\n let current = this.currentBlockElement;\r\n\r\n if (!current) {\r\n return null;\r\n }\r\n\r\n let leaf = getLeafSibling(\r\n this.scoper.rootNode,\r\n isNext ? current.getEndNode() : current.getStartNode(),\r\n isNext,\r\n this.skipTags\r\n );\r\n let newBlock = leaf ? getBlockElementAtNode(this.scoper.rootNode, leaf) : null;\r\n\r\n // Make sure this is right block:\r\n // 1) the block is in scope per scoper\r\n // 2) the block is after (for next) or before (for previous) the current block\r\n // Then:\r\n // 1) Re-position current block to newly found block\r\n if (\r\n newBlock &&\r\n this.scoper.isBlockInScope(newBlock) &&\r\n ((isNext && newBlock.isAfter(current)) || (!isNext && current.isAfter(newBlock)))\r\n ) {\r\n this.currentBlock = newBlock;\r\n return this.currentBlock;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Current inline element getter\r\n */\r\n public get currentInlineElement(): InlineElement | null {\r\n // Retrieve a start inline from scoper\r\n if (!this.currentInline) {\r\n this.currentInline = this.scoper.getStartInlineElement();\r\n }\r\n\r\n return this.currentInline instanceof EmptyInlineElement ? null : this.currentInline;\r\n }\r\n\r\n /**\r\n * Get next inline element\r\n */\r\n public getNextInlineElement(): InlineElement | null {\r\n return this.getPreviousNextInlineElement(true /*isNext*/);\r\n }\r\n\r\n /**\r\n * Get previous inline element\r\n */\r\n public getPreviousInlineElement(): InlineElement | null {\r\n return this.getPreviousNextInlineElement(false /*isNext*/);\r\n }\r\n\r\n private getPreviousNextInlineElement(isNext: boolean): InlineElement | null {\r\n let current = this.currentInlineElement || this.currentInline;\r\n let newInline: InlineElement | null;\r\n\r\n if (!current) {\r\n return null;\r\n }\r\n\r\n if (current instanceof EmptyInlineElement) {\r\n newInline = getInlineElementBeforeAfter(\r\n this.scoper.rootNode,\r\n current.getStartPosition(),\r\n isNext\r\n );\r\n if (newInline && !current.getParentBlock().contains(newInline.getContainerNode())) {\r\n newInline = null;\r\n }\r\n } else {\r\n newInline = getNextPreviousInlineElement(this.scoper.rootNode, current, isNext);\r\n newInline =\r\n newInline &&\r\n current &&\r\n ((isNext && newInline.isAfter(current)) || (!isNext && current.isAfter(newInline)))\r\n ? newInline\r\n : null;\r\n }\r\n\r\n // For inline, we need to make sure:\r\n // 1) it is really next/previous to current\r\n // 2) pass on the new inline to this.scoper to do the trimming and we still get back an inline\r\n // Then\r\n // 1) re-position current inline\r\n if (newInline && (newInline = this.scoper.trimInlineElement(newInline))) {\r\n this.currentInline = newInline;\r\n return this.currentInline;\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n\r\nfunction getNextPreviousInlineElement(\r\n rootNode: Node,\r\n current: InlineElement,\r\n isNext: boolean\r\n): InlineElement | null {\r\n if (!current) {\r\n return null;\r\n }\r\n if (current instanceof PartialInlineElement) {\r\n // if current is partial, get the other half of the inline unless it is no more\r\n let result = isNext ? current.nextInlineElement : current.previousInlineElement;\r\n\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n\r\n // Get a leaf node after startNode and use that base to find next inline\r\n let startNode: Node | null = current.getContainerNode();\r\n startNode = getLeafSibling(rootNode, startNode, isNext);\r\n return getInlineElementAtNode(rootNode, startNode);\r\n}\r\n","import ContentTraverser from './ContentTraverser';\r\nimport createRange from '../selection/createRange';\r\nimport {\r\n IContentTraverser,\r\n InlineElement,\r\n IPositionContentSearcher,\r\n NodePosition,\r\n} from 'roosterjs-editor-types';\r\n\r\n// White space matching regex. It matches following chars:\r\n// \\s: white space\r\n// \\u00A0: no-breaking white space\r\n// \\u200B: zero width space\r\n// \\u3000: full width space (which can come from JPN IME)\r\nconst WHITESPACE_REGEX = /[\\s\\u00A0\\u200B\\u3000]+([^\\s\\u00A0\\u200B\\u3000]*)$/i;\r\n\r\n/**\r\n * The class that helps search content around a position\r\n */\r\nexport default class PositionContentSearcher implements IPositionContentSearcher {\r\n // The cached text before position that has been read so far\r\n private text = '';\r\n\r\n // The cached word before position\r\n private word: string = '';\r\n\r\n // The inline element before position\r\n private inlineBefore: InlineElement | null = null;\r\n\r\n // The inline element after position\r\n private inlineAfter: InlineElement | null = null;\r\n\r\n // The content traverser used to traverse backwards\r\n private traverser: IContentTraverser | null = null;\r\n\r\n // Backward parsing has completed\r\n private traversingComplete: boolean = false;\r\n\r\n // All inline elements before position that have been read so far\r\n private inlineElements: InlineElement[] = [];\r\n\r\n // First non-text inline before position\r\n private nearestNonTextInlineElement: InlineElement | null = null;\r\n\r\n /**\r\n * Create a new CursorData instance\r\n * @param rootNode Root node of the whole scope\r\n * @param position Start position\r\n */\r\n constructor(private rootNode: Node, private position: NodePosition) {}\r\n\r\n /**\r\n * Get the word before position. The word is determined by scanning backwards till the first white space, the portion\r\n * between position and the white space is the word before position\r\n * @returns The word before position\r\n */\r\n public getWordBefore(): string {\r\n if (!this.word) {\r\n this.traverse(() => this.word);\r\n }\r\n\r\n return this.word || '';\r\n }\r\n\r\n /**\r\n * Get the inline element before position\r\n * @returns The inlineElement before position\r\n */\r\n public getInlineElementBefore(): InlineElement | null {\r\n if (!this.inlineBefore) {\r\n this.traverse(null);\r\n }\r\n\r\n return this.inlineBefore;\r\n }\r\n\r\n /**\r\n * Get the inline element after position\r\n * @returns The inline element after position\r\n */\r\n public getInlineElementAfter(): InlineElement | null {\r\n if (!this.inlineAfter) {\r\n this.inlineAfter = ContentTraverser.createBlockTraverser(\r\n this.rootNode,\r\n this.position\r\n ).currentInlineElement;\r\n }\r\n\r\n return this.inlineAfter;\r\n }\r\n\r\n /**\r\n * Get X number of chars before position\r\n * The actual returned chars may be less than what is requested.\r\n * @param length The length of string user want to get, the string always ends at the position,\r\n * so this length determines the start position of the string\r\n * @returns The actual string we get as a sub string, or the whole string before position when\r\n * there is not enough chars in the string\r\n */\r\n public getSubStringBefore(length: number): string {\r\n if (this.text.length < length) {\r\n this.traverse(() => this.text.length >= length);\r\n }\r\n\r\n return this.text.substr(Math.max(0, this.text.length - length));\r\n }\r\n\r\n /**\r\n * Try to get a range matches the given text before the position\r\n * @param text The text to match against\r\n * @param exactMatch Whether it is an exact match\r\n * @returns The range for the matched text, null if unable to find a match\r\n */\r\n public getRangeFromText(text: string, exactMatch: boolean): Range | null {\r\n if (!text) {\r\n return null;\r\n }\r\n\r\n let startPosition: NodePosition | null = null;\r\n let endPosition: NodePosition | null = null;\r\n let textIndex = text.length - 1;\r\n\r\n this.forEachTextInlineElement(textInline => {\r\n let nodeContent = textInline.getTextContent() || '';\r\n let nodeIndex = nodeContent.length - 1;\r\n for (; nodeIndex >= 0 && textIndex >= 0; nodeIndex--) {\r\n if (text.charCodeAt(textIndex) == nodeContent.charCodeAt(nodeIndex)) {\r\n textIndex--;\r\n\r\n // on first time when end is matched, set the end of range\r\n if (!endPosition) {\r\n endPosition = textInline.getStartPosition().move(nodeIndex + 1);\r\n }\r\n } else if (exactMatch || endPosition) {\r\n // Mismatch found when exact match or end already match, so return since matching failed\r\n return true;\r\n }\r\n }\r\n\r\n // when textIndex == -1, we have a successful complete match\r\n if (textIndex == -1) {\r\n startPosition = textInline.getStartPosition().move(nodeIndex + 1);\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n return startPosition && endPosition && createRange(startPosition, endPosition);\r\n }\r\n\r\n /**\r\n * Get text section before position till stop condition is met.\r\n * This offers consumers to retrieve text section by section\r\n * The section essentially is just an inline element which has Container element\r\n * so that the consumer can remember it for anchoring popup or verification purpose\r\n * when position moves out of context etc.\r\n * @param stopFunc The callback stop function\r\n */\r\n public forEachTextInlineElement(callback: (textInlineElement: InlineElement) => any) {\r\n // We cache all text sections read so far\r\n // Every time when you ask for textSection, we start with the cached first\r\n // and resort to further reading once we exhausted with the cache\r\n if (!this.inlineElements.some(callback)) {\r\n this.traverse(callback);\r\n }\r\n }\r\n\r\n /**\r\n * Get first non textual inline element before position\r\n * @returns First non textual inline element before position or null if no such element exists\r\n */\r\n public getNearestNonTextInlineElement(): InlineElement | null {\r\n if (!this.nearestNonTextInlineElement) {\r\n this.traverse(() => this.nearestNonTextInlineElement);\r\n }\r\n\r\n return this.nearestNonTextInlineElement;\r\n }\r\n\r\n /**\r\n * Continue traversing backward till stop condition is met or begin of block is reached\r\n */\r\n private traverse(callback: null | ((inlineElement: InlineElement) => any)) {\r\n this.traverser =\r\n this.traverser || ContentTraverser.createBlockTraverser(this.rootNode, this.position);\r\n\r\n if (!this.traverser || this.traversingComplete) {\r\n return;\r\n }\r\n\r\n let previousInline = this.traverser.getPreviousInlineElement();\r\n while (!this.traversingComplete) {\r\n this.inlineBefore = this.inlineBefore || previousInline;\r\n\r\n if (previousInline && previousInline.isTextualInlineElement()) {\r\n let textContent = previousInline.getTextContent();\r\n\r\n // build the word before position if it is not built yet\r\n if (!this.word) {\r\n // Match on the white space, the portion after space is on the index of 1 of the matched result\r\n // (index at 0 is whole match result, index at 1 is the word)\r\n let matches = WHITESPACE_REGEX.exec(textContent);\r\n if (matches && matches.length == 2) {\r\n this.word = matches[1] + this.text;\r\n }\r\n }\r\n\r\n this.text = textContent + this.text;\r\n this.inlineElements.push(previousInline);\r\n\r\n // Check if stop condition is met\r\n if (callback && callback(previousInline)) {\r\n break;\r\n }\r\n } else {\r\n this.nearestNonTextInlineElement = previousInline;\r\n this.traversingComplete = true;\r\n if (!this.word) {\r\n // if parsing is done, whatever we get so far in this.cachedText should also be in this.cachedWordBeforeCursor\r\n this.word = this.text;\r\n }\r\n\r\n // When a non-textual inline element, or null is seen, we consider parsing complete\r\n // TODO: we may need to change this if there is a future need to parse beyond text, i.e.\r\n // we have aaa @someone bbb, and we want to read the text before @someone\r\n break;\r\n }\r\n\r\n previousInline = this.traverser.getPreviousInlineElement();\r\n }\r\n }\r\n}\r\n","import EmptyInlineElement from '../inlineElements/EmptyInlineElement';\r\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getInlineElementAtNode from '../inlineElements/getInlineElementAtNode';\r\nimport NodeBlockElement from '../blockElements/NodeBlockElement';\r\nimport Position from '../selection/Position';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { BlockElement, ContentPosition, InlineElement, NodePosition } from 'roosterjs-editor-types';\r\nimport { getInlineElementAfter } from '../inlineElements/getInlineElementBeforeAfter';\r\nimport {\r\n getFirstInlineElement,\r\n getLastInlineElement,\r\n} from '../inlineElements/getFirstLastInlineElement';\r\nimport type { CompatibleContentPosition } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * @internal\r\n * This provides traversing content in a selection start block\r\n * This is commonly used for those cursor context sensitive plugin,\r\n * they want to know text being typed at cursor\r\n * This provides a scope for parsing from cursor position up to begin of the selection block\r\n */\r\nexport default class SelectionBlockScoper implements TraversingScoper {\r\n private block: BlockElement | null;\r\n private position: NodePosition;\r\n\r\n /**\r\n * Create a new instance of SelectionBlockScoper class\r\n * @param rootNode The root node of the whole scope\r\n * @param position Position of the selection start\r\n * @param startFrom Where to start, can be Begin, End, SelectionStart\r\n */\r\n constructor(\r\n public rootNode: Node,\r\n position: NodePosition | Range,\r\n private startFrom: ContentPosition | CompatibleContentPosition\r\n ) {\r\n if (safeInstanceOf(position, 'Range')) {\r\n position = Position.getStart(position);\r\n }\r\n\r\n this.position = position.normalize();\r\n this.block = getBlockElementAtNode(this.rootNode, this.position.node);\r\n }\r\n\r\n /**\r\n * Get the start block element\r\n */\r\n public getStartBlockElement(): BlockElement | null {\r\n return this.block;\r\n }\r\n\r\n /**\r\n * Get the start inline element\r\n * The start inline refers to inline before the selection start\r\n * The reason why we choose the one before rather after is, when cursor is at the end of a paragraph,\r\n * the one after likely will point to inline in next paragraph which may be null if the cursor is at bottom of editor\r\n */\r\n public getStartInlineElement(): InlineElement | null {\r\n if (this.block) {\r\n switch (this.startFrom) {\r\n case ContentPosition.Begin:\r\n case ContentPosition.End:\r\n case ContentPosition.DomEnd:\r\n return getFirstLastInlineElementFromBlockElement(\r\n this.block,\r\n this.startFrom == ContentPosition.Begin\r\n );\r\n case ContentPosition.SelectionStart:\r\n // Get the inline before selection start point, and ensure it falls in the selection block\r\n let startInline = getInlineElementAfter(this.rootNode, this.position);\r\n return startInline && this.block.contains(startInline.getContainerNode())\r\n ? startInline\r\n : new EmptyInlineElement(this.position, this.block);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Check if the given block element is in current scope\r\n * @param blockElement The block element to check\r\n */\r\n public isBlockInScope(blockElement: BlockElement): boolean {\r\n return this.block && blockElement ? this.block.equals(blockElement) : false;\r\n }\r\n\r\n /**\r\n * Trim the incoming inline element, and return an inline element\r\n * This just tests and return the inline element if it is in block\r\n * This is a block scoper, which is not like selection scoper where it may cut an inline element in half\r\n * A block scoper does not cut an inline in half\r\n */\r\n public trimInlineElement(inlineElement: InlineElement): InlineElement | null {\r\n return this.block && inlineElement && this.block.contains(inlineElement.getContainerNode())\r\n ? inlineElement\r\n : null;\r\n }\r\n}\r\n\r\n/**\r\n * Get first/last InlineElement of the given BlockElement\r\n * @param block The BlockElement to get InlineElement from\r\n * @param isFirst True to get first InlineElement, false to get last InlineElement\r\n */\r\nfunction getFirstLastInlineElementFromBlockElement(\r\n block: BlockElement,\r\n isFirst: boolean\r\n): InlineElement | null {\r\n if (block instanceof NodeBlockElement) {\r\n let blockNode = block.getStartNode();\r\n return isFirst ? getFirstInlineElement(blockNode) : getLastInlineElement(blockNode);\r\n } else {\r\n return getInlineElementAtNode(block, isFirst ? block.getStartNode() : block.getEndNode());\r\n }\r\n}\r\n","import getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport PartialInlineElement from '../inlineElements/PartialInlineElement';\r\nimport Position from '../selection/Position';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { BlockElement, InlineElement, NodePosition } from 'roosterjs-editor-types';\r\nimport { getInlineElementAfter } from '../inlineElements/getInlineElementBeforeAfter';\r\n\r\n/**\r\n * @internal\r\n * This is selection scoper that provide a start inline as the start of the selection\r\n * and checks if a block falls in the selection (isBlockInScope)\r\n * last trimInlineElement to trim any inline element to return a partial that falls in the selection\r\n */\r\nexport default class SelectionScoper implements TraversingScoper {\r\n private start: NodePosition;\r\n private end: NodePosition;\r\n private startBlock: BlockElement | null = null;\r\n private startInline: InlineElement | null = null;\r\n\r\n /**\r\n * Create a new instance of SelectionScoper class\r\n * @param rootNode The root node of the content\r\n * @param range The selection range to scope to\r\n */\r\n constructor(public rootNode: Node, range: Range) {\r\n this.start = Position.getStart(range).normalize();\r\n this.end = Position.getEnd(range).normalize();\r\n }\r\n\r\n /**\r\n * Provide a start block as the first block after the cursor\r\n */\r\n public getStartBlockElement(): BlockElement | null {\r\n if (!this.startBlock) {\r\n this.startBlock = getBlockElementAtNode(this.rootNode, this.start.node);\r\n }\r\n\r\n return this.startBlock;\r\n }\r\n\r\n /**\r\n * Provide a start inline as the first inline after the cursor\r\n */\r\n public getStartInlineElement(): InlineElement | null {\r\n if (!this.startInline) {\r\n this.startInline = this.trimInlineElement(\r\n getInlineElementAfter(this.rootNode, this.start)\r\n );\r\n }\r\n\r\n return this.startInline;\r\n }\r\n\r\n /**\r\n * Checks if a block completely falls in the selection\r\n * @param block The BlockElement to check\r\n */\r\n public isBlockInScope(block: BlockElement): boolean {\r\n if (!block) {\r\n return false;\r\n }\r\n let inScope = false;\r\n let selStartBlock = this.getStartBlockElement();\r\n if (this.start.equalTo(this.end)) {\r\n inScope = !!selStartBlock && selStartBlock.equals(block);\r\n } else {\r\n let selEndBlock = getBlockElementAtNode(this.rootNode, this.end.node);\r\n\r\n // There are three cases that are considered as \"block in scope\"\r\n // 1) The start of selection falls on the block\r\n // 2) The end of selection falls on the block\r\n // 3) the block falls in-between selection start and end\r\n inScope =\r\n !!selStartBlock &&\r\n !!selEndBlock &&\r\n (block.equals(selStartBlock) ||\r\n block.equals(selEndBlock) ||\r\n (block.isAfter(selStartBlock) && selEndBlock.isAfter(block)));\r\n }\r\n\r\n return inScope;\r\n }\r\n\r\n /**\r\n * Trim an incoming inline. If it falls completely outside selection, return null\r\n * otherwise return a partial that represents the portion that falls in the selection\r\n * @param inline The InlineElement to check\r\n */\r\n public trimInlineElement(inline: InlineElement | null): InlineElement | null {\r\n if (!inline || this.start.equalTo(this.end)) {\r\n return null;\r\n }\r\n\r\n // Temp code. Will be changed to using InlineElement.getStart/EndPosition() soon\r\n let start = inline.getStartPosition();\r\n let end = inline.getEndPosition();\r\n\r\n if (start.isAfter(this.end) || this.start.isAfter(end)) {\r\n return null;\r\n }\r\n\r\n let startPartial = false;\r\n let endPartial = false;\r\n\r\n if (this.start.isAfter(start)) {\r\n start = this.start;\r\n startPartial = true;\r\n }\r\n\r\n if (end.isAfter(this.end)) {\r\n end = this.end;\r\n endPartial = true;\r\n }\r\n\r\n return start.isAfter(end) || start.equalTo(end)\r\n ? null\r\n : startPartial || endPartial\r\n ? new PartialInlineElement(\r\n inline,\r\n startPartial ? start : undefined,\r\n endPartial ? end : undefined\r\n )\r\n : inline;\r\n }\r\n}\r\n","import createElement from '../utils/createElement';\nimport getDelimiterFromElement from './getDelimiterFromElement';\nimport { DelimiterClasses } from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\n/**\n * Adds delimiters to the element provided. If the delimiters already exists, will not be added\n * @param node the node to add the delimiters\n */\nexport default function addDelimiters(node: Element): Element[] {\n let [delimiterAfter, delimiterBefore] = getDelimiters(node);\n\n if (!delimiterAfter) {\n delimiterAfter = addDelimiterAfter(node);\n }\n if (!delimiterBefore) {\n delimiterBefore = addDelimiterBefore(node);\n }\n return [delimiterAfter, delimiterBefore];\n}\n\n/**\n * Adds delimiter after the element provided.\n * @param element element to use\n */\nexport function addDelimiterAfter(element: Element) {\n return insertDelimiter(element, DelimiterClasses.DELIMITER_AFTER);\n}\n\n/**\n * Adds delimiter before the element provided.\n * @param element element to use\n */\nexport function addDelimiterBefore(element: Element) {\n return insertDelimiter(element, DelimiterClasses.DELIMITER_BEFORE);\n}\n\nfunction getDelimiters(entityWrapper: Element): (Element | undefined)[] {\n const result: (Element | undefined)[] = [];\n const { nextElementSibling, previousElementSibling } = entityWrapper;\n result.push(\n isDelimiter(nextElementSibling, DelimiterClasses.DELIMITER_AFTER),\n isDelimiter(previousElementSibling, DelimiterClasses.DELIMITER_BEFORE)\n );\n\n return result;\n}\n\nfunction isDelimiter(el: Element | null, className: string): Element | undefined {\n return el && getDelimiterFromElement(el) && el.classList.contains(className) ? el : undefined;\n}\n\nfunction insertDelimiter(element: Element, delimiterClass: DelimiterClasses) {\n const span = createElement(\n {\n tag: 'span',\n className: delimiterClass,\n children: [ZERO_WIDTH_SPACE],\n },\n element.ownerDocument\n ) as HTMLElement;\n if (span) {\n const insertPosition: InsertPosition =\n delimiterClass == DelimiterClasses.DELIMITER_AFTER ? 'afterend' : 'beforebegin';\n element.insertAdjacentElement(insertPosition, span);\n }\n\n return span;\n}\n","import safeInstanceOf from '../utils/safeInstanceOf';\nimport { DelimiterClasses } from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\n/**\n * Retrieves Delimiter information from a provided element.\n * @param element element to try to retrieve a delimiter\n * @returns delimiter info if it is a Delimiter, else null\n */\nexport default function getDelimiterFromElement(element: Node | null | undefined): Element | null {\n if (!element) {\n return null;\n }\n if (\n safeInstanceOf(element, 'HTMLSpanElement') &&\n (element.classList.contains(DelimiterClasses.DELIMITER_AFTER) ||\n element.classList.contains(DelimiterClasses.DELIMITER_BEFORE)) &&\n element.textContent === ZERO_WIDTH_SPACE\n ) {\n return element;\n }\n\n return null;\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport contains from '../utils/contains';\nimport ContentTraverser from '../contentTraverser/ContentTraverser';\nimport createRange from '../selection/createRange';\nimport findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport isNodeEmpty from '../utils/isNodeEmpty';\nimport isPositionAtBeginningOf from '../selection/isPositionAtBeginningOf';\nimport isVoidHtmlElement from '../utils/isVoidHtmlElement';\nimport LinkInlineElement from '../inlineElements/LinkInlineElement';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport pasteTable from '../table/pasteTable';\nimport Position from '../selection/Position';\nimport PositionContentSearcher from '../contentTraverser/PositionContentSearcher';\nimport queryElements from '../utils/queryElements';\nimport splitTextNode from '../utils/splitTextNode';\nimport toArray from '../jsUtils/toArray';\nimport unwrap from '../utils/unwrap';\nimport wrap from '../utils/wrap';\nimport { splitBalancedNodeRange } from '../utils/splitParentNode';\nimport {\n BlockElement,\n NodePosition,\n NodeType,\n PositionType,\n QueryScope,\n} from 'roosterjs-editor-types';\n\nconst NOT_EDITABLE_SELECTOR = '[contenteditable=false]';\n\nconst adjustSteps: ((\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n) => NodePosition)[] = [\n adjustInsertPositionForHyperLink,\n adjustInsertPositionForStructuredNode,\n adjustInsertPositionForParagraph,\n adjustInsertPositionForVoidElement,\n adjustInsertPositionForMoveCursorOutOfALink,\n adjustInsertPositionForNotEditableNode,\n adjustInsertPositionForTable,\n];\n\n/**\n * Adjust position for A tag don't be nested inside another A tag.\n */\nfunction adjustInsertPositionForHyperLink(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n let blockElement = getBlockElementAtNode(root, position.node);\n\n if (blockElement) {\n // Find the first
    tag within current block which covers current selection\n // If there are more than one nested, let's handle the first one only since that is not a common scenario.\n let anchor: HTMLElement | null = queryElements(\n root,\n 'a[href]',\n null /*forEachCallback*/,\n QueryScope.OnSelection,\n createRange(position)\n ).filter((a: HTMLElement) => blockElement!.contains(a))[0];\n\n // If this is about to insert node to an empty A tag, clear the A tag and reset position\n if (anchor && isNodeEmpty(anchor)) {\n position = new Position(anchor, PositionType.Before);\n safeRemove(anchor);\n anchor = null;\n }\n\n // If this is about to insert nodes which contains A tag into another A tag, need to break current A tag\n // otherwise we will have nested A tags which is a wrong HTML structure\n if (\n anchor &&\n ((nodeToInsert as HTMLElement))?.querySelector &&\n ((nodeToInsert as HTMLElement))?.querySelector('a[href]')\n ) {\n let normalizedPosition = position.normalize();\n let parentNode = normalizedPosition.node.parentNode!;\n let nextNode =\n normalizedPosition.node.nodeType == NodeType.Text\n ? splitTextNode(\n normalizedPosition.node,\n normalizedPosition.offset,\n false /*returnFirstPart*/\n )\n : normalizedPosition.isAtEnd\n ? normalizedPosition.node.nextSibling\n : normalizedPosition.node;\n let splitter: Node | null = root.ownerDocument.createTextNode('');\n parentNode.insertBefore(splitter, nextNode);\n\n while (splitter && contains(anchor, splitter)) {\n splitter = splitBalancedNodeRange(splitter);\n }\n\n if (splitter) {\n position = new Position(splitter, PositionType.Before);\n safeRemove(splitter);\n }\n }\n }\n\n return position;\n}\n\n/**\n * Adjust position for a node don't be nested inside tags like BR, LI, TD.\n */\nfunction adjustInsertPositionForStructuredNode(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n let rootNodeToInsert: Node | null = nodeToInsert;\n let isFragment: boolean = false;\n\n if (rootNodeToInsert.nodeType == NodeType.DocumentFragment) {\n isFragment = true;\n let rootNodes = toArray(rootNodeToInsert.childNodes).filter(\n (n: ChildNode) => getTagOfNode(n) != 'BR'\n );\n rootNodeToInsert = rootNodes.length == 1 ? rootNodes[0] : null;\n }\n\n let tag = getTagOfNode(rootNodeToInsert);\n let hasBrNextToRoot =\n tag && rootNodeToInsert && getTagOfNode(rootNodeToInsert.nextSibling) == 'BR';\n let listItem = findClosestElementAncestor(position.node, root, 'LI');\n let listNode = listItem && findClosestElementAncestor(listItem, root, 'OL,UL');\n let tdNode = findClosestElementAncestor(position.node, root, 'TD,TH');\n\n if (tag == 'LI') {\n tag = listNode ? getTagOfNode(listNode) : 'UL';\n rootNodeToInsert = wrap(rootNodeToInsert!, tag);\n }\n\n if (\n (tag == 'OL' || tag == 'UL') &&\n rootNodeToInsert &&\n getTagOfNode(rootNodeToInsert.firstChild) == 'LI'\n ) {\n let shouldInsertListAsText = !rootNodeToInsert.firstChild!.nextSibling && !hasBrNextToRoot;\n\n if (hasBrNextToRoot && rootNodeToInsert.parentNode) {\n safeRemove(rootNodeToInsert.nextSibling!);\n }\n\n if (shouldInsertListAsText) {\n unwrap(rootNodeToInsert.firstChild!);\n unwrap(rootNodeToInsert);\n } else if (getTagOfNode(listNode) == tag) {\n unwrap(rootNodeToInsert);\n position = new Position(\n listItem!,\n isPositionAtBeginningOf(position, listItem!)\n ? PositionType.Before\n : PositionType.After\n );\n }\n }\n\n if (isFragment && tag == 'TABLE' && tdNode) {\n pasteTable(\n tdNode,\n rootNodeToInsert,\n position,\n range\n );\n position = new Position(rootNodeToInsert!, 0);\n moveChildNodes(nodeToInsert);\n }\n\n return position;\n}\n\n/**\n * Change P tag to DIV, when a new node when insert node.\n */\n\nfunction adjustInsertPositionForParagraph(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (getTagOfNode(position.node) == 'P') {\n // Insert into a P tag may cause issues when the inserted content contains any block element.\n // Change P tag to DIV to make sure it works well\n let pos = position.normalize();\n let div = changeElementTag(position.node, 'div');\n if (pos.node != div) {\n position = pos;\n }\n }\n\n return position;\n}\n\n/**\n * Adjust position for a node that can have children.\n */\n\nfunction adjustInsertPositionForVoidElement(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (isVoidHtmlElement(position.node)) {\n position = new Position(\n position.node,\n position.isAtEnd ? PositionType.After : PositionType.Before\n );\n }\n return position;\n}\n\n/**\n * Adjust the position cursor out of link when a new node is inserted.\n */\n\nfunction adjustInsertPositionForMoveCursorOutOfALink(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (range && range.collapsed) {\n const searcher = new PositionContentSearcher(root, Position.getStart(range));\n const inlineElementBefore = searcher.getInlineElementBefore();\n const inlineElementAfter = searcher.getInlineElementAfter();\n if (inlineElementBefore instanceof LinkInlineElement) {\n position = new Position(inlineElementBefore.getContainerNode(), PositionType.After);\n } else if (inlineElementAfter instanceof LinkInlineElement) {\n position = new Position(inlineElementAfter.getContainerNode(), PositionType.Before);\n }\n }\n return position;\n}\n\n/**\n * Adjust the position cursor out of a not contenteditable element.\n */\nfunction adjustInsertPositionForNotEditableNode(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (!position.element?.isContentEditable) {\n let nonEditableElement: HTMLElement | undefined;\n let lastNonEditableElement: HTMLElement | null = findClosestElementAncestor(\n position.node,\n root,\n NOT_EDITABLE_SELECTOR\n );\n\n while (lastNonEditableElement) {\n nonEditableElement = lastNonEditableElement;\n lastNonEditableElement = nonEditableElement?.parentElement\n ? findClosestElementAncestor(\n nonEditableElement.parentElement,\n root,\n NOT_EDITABLE_SELECTOR\n )\n : null;\n }\n\n if (nonEditableElement) {\n position = new Position(nonEditableElement, PositionType.After);\n return adjustInsertPositionForNotEditableNode(root, nodeToInsert, position, range);\n }\n }\n\n return position;\n}\n\n/**\n * Adjust the position of a table to be one line after another table.\n */\nfunction adjustInsertPositionForTable(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (\n (nodeToInsert.childNodes.length == 1 &&\n getTagOfNode(nodeToInsert.childNodes[0]) == 'TABLE') ||\n getTagOfNode(nodeToInsert) == 'TABLE'\n ) {\n const { element } = position;\n\n const posBefore = new Position(element, PositionType.Before);\n const rangeToTraverse = createRange(posBefore, position);\n const contentTraverser = ContentTraverser.createSelectionTraverser(root, rangeToTraverse);\n\n let blockElement = contentTraverser && contentTraverser.currentBlockElement;\n\n if (blockElement) {\n let nextBlockElement: BlockElement | null = blockElement;\n\n while (!nextBlockElement) {\n nextBlockElement = contentTraverser.getNextBlockElement();\n if (nextBlockElement) {\n blockElement = nextBlockElement;\n }\n }\n\n const prevElement = blockElement?.getEndNode();\n\n if (prevElement && findClosestElementAncestor(prevElement, root, 'TABLE')) {\n let tempRange = createRange(position);\n tempRange.collapse(false /* toStart */);\n const br = root.ownerDocument.createElement('br');\n tempRange.insertNode(br);\n\n tempRange = createRange(br);\n position = Position.getEnd(tempRange);\n }\n }\n }\n return position;\n}\n\n/**\n *\n * @param root the contentDiv of the ditor\n * @param nodeToInsert the node to be inserted\n * @param position the position of the node to be inserted\n * @param range the range current or cached range of the editor\n * @returns the adjusted position of the inserted node\n */\n\nexport default function adjustInsertPositionBySteps(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n adjustSteps.forEach(handler => {\n position = handler(root, nodeToInsert, position, range);\n });\n return position;\n}\n\nfunction safeRemove(node: Node) {\n node?.parentNode?.removeChild(node);\n}\n","import arrayPush from '../jsUtils/arrayPush';\nimport collapseNodesInRegion from '../region/collapseNodesInRegion';\nimport getRegionsFromRange from '../region/getRegionsFromRange';\nimport getSelectionRangeInRegion from '../region/getSelectionRangeInRegion';\nimport mergeBlocksInRegion from '../region/mergeBlocksInRegion';\nimport Position from '../selection/Position';\nimport queryElements from '../utils/queryElements';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport splitTextNode from '../utils/splitTextNode';\nimport { NodePosition, PositionType, QueryScope, RegionType } from 'roosterjs-editor-types';\n\n/**\n * Delete selected content, and return the new position to select\n * @param core The EditorCore object.\n * @param range The range to delete\n */\nexport default function deleteSelectedContent(\n root: HTMLElement,\n range: Range\n): NodePosition | null {\n let nodeBefore: Node | null = null;\n\n // 1. TABLE and TR node in selected should be deleted. It is possible we don't detect them from step 2\n // since table cells will fall in to different regions\n const nodesToDelete: Node[] = queryElements(\n root,\n 'table,tr',\n null /*callback*/,\n QueryScope.InSelection,\n range\n );\n\n // 2. Loop all selected regions, find out those nodes need to be deleted and merged.\n // We don't delete them directly here because delete node from one region may cause selection range\n // another region becomes invalid. So we delay the process of deletion.\n const regions = getRegionsFromRange(root, range, RegionType.Table);\n const nodesPairToMerge = regions\n .map(region => {\n const regionRange = getSelectionRangeInRegion(region);\n if (!regionRange) {\n return null;\n }\n\n const {\n startContainer,\n endContainer,\n startOffset,\n endOffset,\n commonAncestorContainer,\n } = regionRange;\n\n // Disallow merging of readonly elements\n if (\n safeInstanceOf(commonAncestorContainer, 'HTMLElement') &&\n !commonAncestorContainer.isContentEditable\n ) {\n return null;\n }\n\n // Make sure there are node before and after the merging point.\n // This is required by mergeBlocksInRegion API.\n // This may create some empty text node as anchor\n let [beforeEnd, afterEnd] = ensureBeforeAndAfter(\n endContainer,\n endOffset,\n false /*isStart*/\n );\n let [beforeStart, afterStart] = ensureBeforeAndAfter(\n startContainer,\n startOffset,\n true /*isStart*/\n );\n nodeBefore = nodeBefore || beforeStart;\n\n // Find out all nodes to be deleted\n const nodes = collapseNodesInRegion(region, [afterStart, beforeEnd]);\n arrayPush(nodesToDelete, nodes);\n return { region, beforeStart, afterEnd };\n })\n .filter(x => !!x);\n\n // 3. Delete all nodes that we found, whose parent is editable\n nodesToDelete.forEach(\n node => node.parentElement?.isContentEditable && node.parentElement.removeChild(node)\n );\n\n // 4. Merge lines for each region, so that after we don't see extra line breaks\n nodesPairToMerge.forEach(nodes => {\n if (nodes) {\n mergeBlocksInRegion(nodes.region, nodes.beforeStart, nodes.afterEnd);\n }\n });\n\n return nodeBefore && new Position(nodeBefore, PositionType.End);\n}\n\nfunction ensureBeforeAndAfter(node: Node, offset: number, isStart: boolean) {\n if (safeInstanceOf(node, 'Text')) {\n const newNode = splitTextNode(node, offset, isStart);\n return isStart ? [newNode, node] : [node, newNode];\n } else {\n let nodeBefore: Node | null = node.childNodes[offset - 1];\n let nodeAfter: Node | null = node.childNodes[offset];\n\n // Condition 1: node child nodes\n // (\"I\" means cursor; \"o\" means a DOM node, \"[ ]\" means a parent node)\n // [ I ]\n // need to use parent node instead to convert to condition 2\n if (!nodeBefore && !nodeAfter) {\n if (isStart) {\n nodeAfter = node;\n nodeBefore = nodeAfter.previousSibling;\n } else {\n nodeBefore = node;\n nodeAfter = nodeBefore.nextSibling;\n }\n }\n\n // Condition 2: Either nodeBefore or nodeAfter is null (XOR case)\n // [ o I ] or [ I o]\n // need to add empty text node to convert to condition 3\n if ((nodeBefore || nodeAfter) && (!nodeBefore || !nodeAfter)) {\n const emptyNode = node.ownerDocument!.createTextNode('');\n (nodeBefore || nodeAfter)?.parentNode?.insertBefore(emptyNode, nodeAfter);\n if (nodeBefore) {\n nodeAfter = emptyNode;\n } else {\n nodeBefore = emptyNode;\n }\n }\n\n // Condition 3: Both nodeBefore and nodeAfter are not null\n // [o I o]\n // return the nodes\n return [nodeBefore!, nodeAfter!];\n }\n}\n","import ContentTraverser from '../contentTraverser/ContentTraverser';\n\n/**\n * get block element's text content.\n * @param rootNode Root node that the get the textContent of.\n * @returns text content of given text content.\n */\nexport default function getTextContent(rootNode: Node): string {\n const traverser = ContentTraverser.createBodyTraverser(rootNode);\n let block = traverser && traverser.currentBlockElement;\n let textContent: string[] = [];\n\n while (block) {\n textContent.push(block.getTextContent());\n block = traverser.getNextBlockElement();\n }\n\n return textContent.join('\\n');\n}\n","import { EntityClasses } from 'roosterjs-editor-types';\n\nconst CONTENT_EDITABLE = 'contenteditable';\n\n/**\n * Commit information of an entity (type, isReadonly, id) into the wrapper node as CSS Classes\n * @param wrapper The entity wrapper element\n * @param type Entity type\n * @param isReadonly Whether this is a readonly entity\n * @param id Optional Id of the entity\n */\nexport default function commitEntity(\n wrapper: HTMLElement,\n type: string,\n isReadonly: boolean,\n id?: string\n) {\n if (wrapper) {\n wrapper.className = `${EntityClasses.ENTITY_INFO_NAME} ${\n EntityClasses.ENTITY_TYPE_PREFIX\n }${type} ${id ? `${EntityClasses.ENTITY_ID_PREFIX}${id} ` : ''}${\n EntityClasses.ENTITY_READONLY_PREFIX\n }${isReadonly ? '1' : '0'}`;\n\n if (isReadonly) {\n wrapper.contentEditable = 'false';\n } else if (wrapper.getAttribute(CONTENT_EDITABLE)) {\n wrapper.removeAttribute(CONTENT_EDITABLE);\n }\n }\n}\n","import getEntityFromElement from './getEntityFromElement';\nimport getEntitySelector from './getEntitySelector';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport { Entity, EntityClasses, KnownEntityItem } from 'roosterjs-editor-types';\n\nconst EntityPlaceHolderTagName = 'ENTITY-PLACEHOLDER';\n\n/**\n * @deprecated\n * Create a placeholder comment node for entity\n * @param entity The entity to create placeholder from\n * @returns A placeholder comment node as\n */\nexport function createEntityPlaceholder(entity: Entity): HTMLElement {\n const placeholder = entity.wrapper.ownerDocument.createElement(EntityPlaceHolderTagName);\n placeholder.id = entity.id;\n\n return placeholder;\n}\n\n/**\n * Move content from a container into a new Document fragment, and try keep entities to be reusable by creating placeholder\n * for them in the document fragment.\n * If an entity is directly under root container, the whole entity can be reused and no need to move it at all.\n * If an entity is not directly under root container, it is still reusable, but it may need some movement.\n * In any case, entities will be replaced with a placeholder in the target document fragment.\n * We will use an entity map (the \"entities\" parameter) to save the map from entity id to its wrapper element.\n * @param root The root element\n * @param entities A map from entity id to entity wrapper element\n * @returns A new document fragment contains all the content and entity placeholders\n */\nexport function moveContentWithEntityPlaceholders(\n root: HTMLDivElement,\n entities: Record\n) {\n const entitySelector = getEntitySelector();\n const fragment = root.ownerDocument.createDocumentFragment();\n let next: Node | null = null;\n\n for (let child: Node | null = root.firstChild; child; child = next) {\n let entity: Entity | null;\n let nodeToAppend = child;\n\n next = child.nextSibling;\n\n if (safeInstanceOf(child, 'HTMLElement')) {\n if ((entity = getEntityFromElement(child))) {\n nodeToAppend = getPlaceholder(entity, entities);\n } else {\n child.querySelectorAll(entitySelector).forEach(wrapper => {\n if ((entity = getEntityFromElement(wrapper))) {\n const placeholder = getPlaceholder(entity, entities);\n\n wrapper.parentNode?.replaceChild(placeholder, wrapper);\n }\n });\n }\n }\n\n fragment.appendChild(nodeToAppend);\n }\n\n fragment.normalize();\n\n return fragment;\n}\n\n/**\n * Restore HTML content from a document fragment that may contain entity placeholders.\n * @param source Source document fragment that contains HTML content and entity placeholders\n * @param target Target container, usually to be editor root container\n * @param entities A map from entity id to entity wrapper, used for reusing existing DOM structure for entity\n * @param insertClonedNode When pass true, merge with a cloned copy of the nodes from source fragment rather than the nodes themselves @default false\n */\nexport function restoreContentWithEntityPlaceholder(\n source: ParentNode,\n target: HTMLElement,\n entities: Record | null,\n insertClonedNode?: boolean\n) {\n let anchor = target.firstChild;\n\n const entitySelector = getEntitySelector();\n\n for (let current = source.firstChild; current; ) {\n const next = current.nextSibling;\n const wrapper = tryGetWrapperFromEntityPlaceholder(entities, current);\n\n if (wrapper) {\n anchor = removeUntil(anchor, wrapper);\n\n if (anchor) {\n anchor = anchor.nextSibling;\n } else {\n target.appendChild(wrapper);\n }\n } else {\n const nodeToInsert = insertClonedNode ? current.cloneNode(true /*deep*/) : current;\n target.insertBefore(nodeToInsert, anchor);\n\n if (safeInstanceOf(nodeToInsert, 'HTMLElement')) {\n nodeToInsert.querySelectorAll(entitySelector).forEach(placeholder => {\n const wrapper = tryGetWrapperFromEntityPlaceholder(entities, placeholder);\n\n if (wrapper) {\n placeholder.parentNode?.replaceChild(wrapper, placeholder);\n }\n });\n }\n }\n\n current = next;\n }\n\n removeUntil(anchor);\n}\n\nfunction removeUntil(anchor: ChildNode | null, nodeToStop?: HTMLElement) {\n while (anchor && (!nodeToStop || anchor != nodeToStop)) {\n const nodeToRemove = anchor;\n anchor = anchor.nextSibling;\n nodeToRemove.parentNode?.removeChild(nodeToRemove);\n }\n return anchor;\n}\n\nfunction tryGetWrapperFromEntityPlaceholder(\n entities: Record | null,\n node: Node\n): HTMLElement | null {\n const id =\n safeInstanceOf(node, 'HTMLElement') &&\n node.classList.contains(EntityClasses.ENTITY_INFO_NAME) &&\n getEntityFromElement(node as HTMLElement)?.id;\n const item = id ? entities?.[id] : null;\n\n return !item\n ? null\n : safeInstanceOf(item, 'HTMLElement')\n ? item\n : item?.canPersist\n ? item.element\n : null;\n}\n\nfunction getPlaceholder(entity: Entity, entities: Record) {\n entities[entity.id] = entity.wrapper;\n\n return entity.wrapper.cloneNode(true /*deep*/);\n}\n","import { Entity, EntityClasses } from 'roosterjs-editor-types';\n\n/**\n * Get Entity object from an entity root element\n * @param element The entity root element. If this element is not an entity root element,\n * it will return null\n */\nexport default function getEntityFromElement(element: HTMLElement): Entity | null {\n let isEntity = false;\n let type = '';\n let id = '';\n let isReadonly = false;\n\n element?.className?.split(' ').forEach(name => {\n if (name == EntityClasses.ENTITY_INFO_NAME) {\n isEntity = true;\n } else if (name.indexOf(EntityClasses.ENTITY_TYPE_PREFIX) == 0) {\n type = name.substr(EntityClasses.ENTITY_TYPE_PREFIX.length);\n } else if (name.indexOf(EntityClasses.ENTITY_ID_PREFIX) == 0) {\n id = name.substr(EntityClasses.ENTITY_ID_PREFIX.length);\n } else if (name.indexOf(EntityClasses.ENTITY_READONLY_PREFIX) == 0) {\n isReadonly = name.substr(EntityClasses.ENTITY_READONLY_PREFIX.length) == '1';\n }\n });\n\n return isEntity\n ? {\n wrapper: element,\n id,\n type,\n isReadonly,\n }\n : null;\n}\n","import { EntityClasses } from 'roosterjs-editor-types';\n\n/**\n * Get a selector string for specified entity type and id\n * @param type (Optional) Type of entity\n * @param id (Optional) Id of entity\n */\nexport default function getEntitySelector(type?: string, id?: string): string {\n const typeSelector = type ? `.${EntityClasses.ENTITY_TYPE_PREFIX}${type}` : '';\n const idSelector = id ? `.${EntityClasses.ENTITY_ID_PREFIX}${id}` : '';\n return '.' + EntityClasses.ENTITY_INFO_NAME + typeSelector + idSelector;\n}\n","import { PluginEvent } from 'roosterjs-editor-types';\n\n/**\n * Gets the cached event data by cache key from event object if there is already one.\n * Otherwise, call getter function to create one, and cache it.\n * @param event The event object\n * @param key Cache key string, need to be unique\n * @param getter Getter function to get the object when it is not in cache yet\n */\nexport default function cacheGetEventData(\n event: PluginEvent | null,\n key: string,\n getter: () => T\n): T {\n let result =\n event && event.eventDataCache && event.eventDataCache.hasOwnProperty(key)\n ? event.eventDataCache[key]\n : getter();\n if (event) {\n event.eventDataCache = event.eventDataCache || {};\n event.eventDataCache[key] = result;\n }\n\n return result;\n}\n","import { PluginEvent } from 'roosterjs-editor-types';\n\n/**\n * Clear a cached object by its key from an event object\n * @param event The event object\n * @param key The cache key\n */\nexport default function clearEventDataCache(event: PluginEvent, key?: string): void {\n if (event && event.eventDataCache) {\n if (key && event.eventDataCache.hasOwnProperty(key)) {\n delete event.eventDataCache[key];\n } else if (!key) {\n event.eventDataCache = {};\n }\n }\n}\n","import isModifierKey from './isModifierKey';\n\n/**\n * Returns true when the event was fired from a key that produces a character value, otherwise false\n * This detection is not 100% accurate. event.key is not fully supported by all browsers, and in some browsers (e.g. IE),\n * event.key is longer than 1 for num pad input. But here we just want to improve performance as much as possible.\n * So if we missed some case here it is still acceptable.\n * @param event The keyboard event object\n */\nexport default function isCharacterValue(event: KeyboardEvent): boolean {\n return !isModifierKey(event) && !!event.key && event.key.length == 1;\n}\n","import { Browser } from '../utils/Browser';\n\nconst isCtrlOrMetaPressedImpl: (event: KeyboardEvent | MouseEvent) => boolean = Browser.isMac\n ? event => event.metaKey\n : event => event.ctrlKey;\n\n/**\n * Check if Ctrl key (Windows) or Meta key (Mac) is pressed for the given Event\n * @param event A Keyboard event or Mouse event object\n * @returns True if Ctrl key is pressed on Windows or Meta key is pressed on Mac\n */\nexport default function isCtrlOrMetaPressed(event: KeyboardEvent | MouseEvent): boolean {\n return isCtrlOrMetaPressedImpl(event);\n}\n","const CTRL_CHAR_CODE = 'Control';\nconst ALT_CHAR_CODE = 'Alt';\nconst META_CHAR_CODE = 'Meta';\n\n/**\n * Returns true when the event was fired from a modifier key, otherwise false\n * @param event The keyboard event object\n */\nexport default function isModifierKey(event: KeyboardEvent): boolean {\n const isCtrlKey = event.ctrlKey || event.key === CTRL_CHAR_CODE;\n const isAltKey = event.altKey || event.key === ALT_CHAR_CODE;\n const isMetaKey = event.metaKey || event.key === META_CHAR_CODE;\n\n return isCtrlKey || isAltKey || isMetaKey;\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport getInheritableStyles from './getInheritableStyles';\nimport getObjectKeys from '../jsUtils/getObjectKeys';\nimport getPredefinedCssForElement from './getPredefinedCssForElement';\nimport getStyles from '../style/getStyles';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport setStyles from '../style/setStyles';\nimport toArray from '../jsUtils/toArray';\nimport { cloneObject } from './cloneObject';\nimport { isCssVariable, processCssVariable } from './processCssVariable';\nimport {\n getAllowedAttributes,\n getAllowedCssClassesRegex,\n getTagReplacement,\n getDefaultStyleValues,\n getStyleCallbacks,\n} from './getAllowedValues';\nimport {\n AttributeCallbackMap,\n CssStyleCallbackMap,\n ElementCallbackMap,\n HtmlSanitizerOptions,\n NodeType,\n PredefinedCssMap,\n SanitizeHtmlOptions,\n StringMap,\n} from 'roosterjs-editor-types';\n\n/**\n * HTML sanitizer class provides two features:\n * 1. Convert global CSS to inline CSS\n * 2. Sanitize an HTML document, remove unnecessary/dangerous attribute/nodes\n */\nexport default class HtmlSanitizer {\n /**\n * @deprecated Use new HtmlSanitizer().convertGlobalCssToInlineCss() instead\n * Convert global CSS to inline CSS if any\n * @param html HTML source\n * @param additionalStyleNodes (Optional) additional HTML STYLE elements used as global CSS\n */\n static convertInlineCss(html: string, additionalStyleNodes?: HTMLStyleElement[]) {\n let sanitizer = new HtmlSanitizer({\n additionalGlobalStyleNodes: additionalStyleNodes,\n });\n return sanitizer.exec(html, true /*convertCssOnly*/);\n }\n\n /**\n * @deprecated Use new HtmlSanitizer().sanitize() instead\n * Sanitize HTML string, remove any unused HTML node/attribute/CSS.\n * @param html HTML source string\n * @param options Options used for this sanitizing process\n */\n static sanitizeHtml(html: string, options?: SanitizeHtmlOptions) {\n options = options || {};\n let sanitizer = new HtmlSanitizer(options);\n let currentStyles = safeInstanceOf(options.currentElementOrStyle, 'HTMLElement')\n ? getInheritableStyles(options.currentElementOrStyle)\n : options.currentElementOrStyle;\n return sanitizer.exec(html, options.convertCssOnly, currentStyles);\n }\n\n private elementCallbacks: ElementCallbackMap;\n private styleCallbacks: CssStyleCallbackMap;\n private attributeCallbacks: AttributeCallbackMap;\n private tagReplacements: Record;\n private allowedAttributes: string[];\n private allowedCssClassesRegex: RegExp | null;\n private defaultStyleValues: StringMap;\n private additionalPredefinedCssForElement: PredefinedCssMap | null;\n private additionalGlobalStyleNodes: HTMLStyleElement[];\n private preserveHtmlComments: boolean;\n private unknownTagReplacement: string | null;\n\n /**\n * Construct a new instance of HtmlSanitizer\n * @param options Options for HtmlSanitizer\n */\n constructor(options?: HtmlSanitizerOptions) {\n options = options || {};\n this.elementCallbacks = cloneObject(options.elementCallbacks);\n this.styleCallbacks = getStyleCallbacks(options.cssStyleCallbacks);\n this.attributeCallbacks = cloneObject(options.attributeCallbacks);\n this.tagReplacements = getTagReplacement(options.additionalTagReplacements);\n this.allowedAttributes = getAllowedAttributes(options.additionalAllowedAttributes);\n this.allowedCssClassesRegex = getAllowedCssClassesRegex(\n options.additionalAllowedCssClasses\n );\n this.defaultStyleValues = getDefaultStyleValues(options.additionalDefaultStyleValues);\n this.additionalPredefinedCssForElement = options.additionalPredefinedCssForElement || null;\n this.additionalGlobalStyleNodes = options.additionalGlobalStyleNodes || [];\n this.preserveHtmlComments = options.preserveHtmlComments || false;\n this.unknownTagReplacement = options.unknownTagReplacement || null;\n }\n\n /**\n * @deprecated Use HtmlSanitizer.convertGlobalCssToInlineCss() and HtmlSanitizer.sanitize() instead\n * Sanitize HTML string\n * This function will do the following work:\n * 1. Convert global CSS into inline CSS\n * 2. Remove dangerous HTML tags and attributes\n * 3. Remove useless CSS properties\n * @param html The input HTML\n * @param convertInlineCssOnly Whether only convert inline css and skip html content sanitizing\n * @param currentStyles Current inheritable CSS styles\n */\n exec(html: string, convertCssOnly?: boolean, currentStyles?: StringMap): string {\n const parser = new DOMParser();\n const doc = parser.parseFromString(html || '', 'text/html');\n\n if (doc && doc.body && doc.body.firstChild) {\n this.convertGlobalCssToInlineCss(doc);\n if (!convertCssOnly) {\n this.sanitize(doc.body, currentStyles);\n }\n }\n return (doc && doc.body && doc.body.innerHTML) || '';\n }\n\n /**\n * Sanitize an HTML element, remove unnecessary or dangerous elements/attribute/CSS rules\n * @param rootNode Root node to sanitize\n * @param currentStyles Current CSS styles. Inheritable styles in the given node which has\n * the same value with current styles will be ignored.\n */\n sanitize(rootNode: Node, currentStyles?: StringMap) {\n if (!rootNode) {\n return '';\n }\n currentStyles = cloneObject(currentStyles, getInheritableStyles(null));\n this.processNode(rootNode, currentStyles, {});\n }\n\n /**\n * Convert global CSS into inline CSS\n * @param rootNode The HTML Document\n */\n convertGlobalCssToInlineCss(rootNode: ParentNode) {\n let styleNodes = toArray(rootNode.querySelectorAll('style'));\n let styleSheets = this.additionalGlobalStyleNodes\n .reverse()\n .map(node => node.sheet as CSSStyleSheet)\n .concat(styleNodes.map(node => node.sheet as CSSStyleSheet).reverse())\n .filter(sheet => sheet);\n for (let styleSheet of styleSheets) {\n for (let j = styleSheet.cssRules.length - 1; j >= 0; j--) {\n // Skip any none-style rule, i.e. @page\n let styleRule = styleSheet.cssRules[j] as CSSStyleRule;\n let text = styleRule && styleRule.style ? styleRule.style.cssText : null;\n if (styleRule.type != CSSRule.STYLE_RULE || !text || !styleRule.selectorText) {\n continue;\n }\n // Make sure the selector is not empty\n for (let selector of styleRule.selectorText.split(',')) {\n if (!selector || !selector.trim() || selector.indexOf(':') >= 0) {\n continue;\n }\n let nodes = toArray(rootNode.querySelectorAll(selector));\n // Always put existing styles after so that they have higher priority\n // Which means if both global style and inline style apply to the same element,\n // inline style will have higher priority\n nodes.forEach(node =>\n node.setAttribute('style', text + (node.getAttribute('style') || ''))\n );\n }\n }\n }\n\n styleNodes.forEach(node => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }\n\n private processNode(node: Node, currentStyle: StringMap, context: Object) {\n const nodeType = node.nodeType;\n const isElement = nodeType == NodeType.Element;\n const isText = nodeType == NodeType.Text;\n const isFragment = nodeType == NodeType.DocumentFragment;\n const isComment = nodeType == NodeType.Comment;\n\n let shouldKeep = false;\n\n if (isElement) {\n const tag = getTagOfNode(node);\n const callback = this.elementCallbacks[tag];\n let replacement: string | null | undefined = this.tagReplacements[tag.toLowerCase()];\n\n if (replacement === undefined) {\n replacement = this.unknownTagReplacement;\n }\n\n if (callback) {\n shouldKeep = callback(node as HTMLElement, context);\n } else if (tag.indexOf(':') > 0) {\n shouldKeep = true;\n } else if (tag == replacement || replacement == '*') {\n shouldKeep = true;\n } else if (replacement && /^[a-zA-Z][\\w\\-]*$/.test(replacement)) {\n node = changeElementTag(node as HTMLElement, replacement)!;\n shouldKeep = true;\n }\n } else if (isText) {\n const whiteSpace = currentStyle['white-space'];\n shouldKeep =\n whiteSpace == 'pre' ||\n whiteSpace == 'pre-line' ||\n whiteSpace == 'pre-wrap' ||\n !/^[\\r\\n]*$/g.test(node.nodeValue || '');\n } else if (isFragment) {\n shouldKeep = true;\n } else if (isComment) {\n shouldKeep = this.preserveHtmlComments;\n } else {\n shouldKeep = false;\n }\n\n if (!shouldKeep) {\n node.parentNode?.removeChild(node);\n } else if (\n isText &&\n (currentStyle['white-space'] == 'pre' || currentStyle['white-space'] == 'pre-wrap')\n ) {\n node.nodeValue = (node.nodeValue || '')\n .replace(/^ /gm, '\\u00A0')\n .replace(/ {2}/g, ' \\u00A0');\n } else if (isElement || isFragment) {\n let thisStyle = cloneObject(currentStyle);\n let element = node;\n if (isElement) {\n this.processAttributes(element, context);\n this.preprocessCss(element, thisStyle);\n this.processCss(element, thisStyle, context);\n }\n\n let child: Node | null = element.firstChild;\n let next: Node | null;\n for (; child; child = next) {\n next = child.nextSibling;\n this.processNode(child, thisStyle, context);\n }\n }\n }\n\n private preprocessCss(element: HTMLElement, thisStyle: StringMap) {\n const predefinedStyles = getPredefinedCssForElement(\n element,\n this.additionalPredefinedCssForElement\n );\n if (predefinedStyles) {\n getObjectKeys(predefinedStyles).forEach(name => {\n thisStyle[name] = predefinedStyles[name];\n });\n }\n }\n\n private processCss(element: HTMLElement, thisStyle: StringMap, context: Object) {\n const styles = getStyles(element);\n getObjectKeys(styles).forEach(name => {\n let value = styles[name];\n let callback = this.styleCallbacks[name];\n let isInheritable = thisStyle[name] != undefined;\n let keep = true;\n\n if (keep && !!callback) {\n keep = callback(value, element, thisStyle, context);\n }\n\n if (keep && isCssVariable(value)) {\n value = processCssVariable(value);\n keep = !!value;\n }\n\n keep =\n keep &&\n value != 'inherit' &&\n value.indexOf('expression') < 0 &&\n name.substr(0, 1) != '-' &&\n this.defaultStyleValues[name] != value &&\n ((isInheritable && value != thisStyle[name]) ||\n (!isInheritable && value != 'initial' && value != 'normal'));\n if (keep && isInheritable) {\n thisStyle[name] = value;\n }\n\n if (keep) {\n styles[name] = value;\n } else {\n delete styles[name];\n }\n });\n\n setStyles(element, styles);\n }\n\n private processAttributes(element: HTMLElement, context: Object) {\n for (let i = element.attributes.length - 1; i >= 0; i--) {\n let attribute = element.attributes[i];\n let name = attribute.name.toLowerCase().trim();\n let value = attribute.value;\n let callback = this.attributeCallbacks[name];\n\n let newValue = callback\n ? callback(value, element, context)\n : this.allowedAttributes.indexOf(name) >= 0 || name.indexOf('data-') == 0\n ? value\n : null;\n\n if (name == 'class' && this.allowedCssClassesRegex) {\n newValue = this.processCssClass(value, newValue);\n }\n\n if (\n newValue === null ||\n newValue === undefined ||\n newValue.match(/s\\n*c\\n*r\\n*i\\n*p\\n*t\\n*:/i) // match script: with any NewLine inside. Browser will ignore those NewLine char and still treat it as script prefix\n ) {\n element.removeAttribute(name);\n } else {\n attribute.value = newValue;\n }\n }\n }\n\n private processCssClass(originalValue: string, calculatedValue: string | null): string | null {\n const originalClasses = originalValue ? originalValue.split(' ') : [];\n const calculatedClasses = calculatedValue ? calculatedValue.split(' ') : [];\n\n originalClasses.forEach(className => {\n if (\n this.allowedCssClassesRegex?.test(className) &&\n calculatedClasses.indexOf(className) < 0\n ) {\n calculatedClasses.push(className);\n }\n });\n\n return calculatedClasses?.length > 0 ? calculatedClasses.join(' ') : null;\n }\n}\n","/**\n * Chain all callback for an attribute together\n * @param map The source callback map\n * @param name Name of the property to chain\n * @param newCallback A new callback to process the given name on the given map.\n * If the same property got multiple callbacks, the final return value will be the return\n * value of the latest callback\n */\nexport default function chainSanitizerCallback R, R>(\n map: Record R>,\n name: string,\n newCallback: TChainedFn\n) {\n if (!map[name]) {\n map[name] = newCallback;\n } else {\n const originalCallback = map[name];\n map[name] = (...args: TOriginalArgs) => {\n originalCallback(...args);\n return newCallback(...args);\n };\n }\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\n\nfunction nativeClone(\n source: Record | null | undefined,\n existingObj?: Record\n): Record {\n return Object.assign(existingObj || {}, source);\n}\n\nfunction customClone(\n source: Record | null | undefined,\n existingObj?: Record\n): Record {\n let result: Record = existingObj || {};\n if (source) {\n for (let key of getObjectKeys(source)) {\n result[key] = source[key];\n }\n }\n return result;\n}\n\n// @ts-ignore Ignore this error for IE compatibility\nconst cloneObjectImpl = Object.assign ? nativeClone : customClone;\n\n/**\n * @internal\n */\nexport function cloneObject(\n source: Record | null | undefined,\n existingObj?: Record\n): Record {\n return cloneObjectImpl(source, existingObj);\n}\n","import { HtmlSanitizerOptions } from 'roosterjs-editor-types';\n\n/**\n * Create default value of HtmlSanitizerOptions with every property set\n */\nexport default function createDefaultHtmlSanitizerOptions(): Required {\n return {\n elementCallbacks: {},\n attributeCallbacks: {},\n cssStyleCallbacks: {},\n additionalTagReplacements: {},\n additionalAllowedAttributes: [],\n additionalAllowedCssClasses: [],\n additionalDefaultStyleValues: {},\n additionalGlobalStyleNodes: [],\n additionalPredefinedCssForElement: {},\n preserveHtmlComments: false,\n unknownTagReplacement: null,\n };\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\nimport { cloneObject } from './cloneObject';\nimport { CssStyleCallbackMap, StringMap } from 'roosterjs-editor-types';\n\nconst HTML_TAG_REPLACEMENT: Record = {\n // Allowed tags\n a: '*',\n abbr: '*',\n address: '*',\n area: '*',\n article: '*',\n aside: '*',\n b: '*',\n bdi: '*',\n bdo: '*',\n blockquote: '*',\n body: '*',\n br: '*',\n button: '*',\n canvas: '*',\n caption: '*',\n center: '*',\n cite: '*',\n code: '*',\n col: '*',\n colgroup: '*',\n data: '*',\n datalist: '*',\n dd: '*',\n del: '*',\n details: '*',\n dfn: '*',\n dialog: '*',\n dir: '*',\n div: '*',\n dl: '*',\n dt: '*',\n em: '*',\n fieldset: '*',\n figcaption: '*',\n figure: '*',\n font: '*',\n footer: '*',\n h1: '*',\n h2: '*',\n h3: '*',\n h4: '*',\n h5: '*',\n h6: '*',\n head: '*',\n header: '*',\n hgroup: '*',\n hr: '*',\n html: '*',\n i: '*',\n img: '*',\n input: '*',\n ins: '*',\n kbd: '*',\n label: '*',\n legend: '*',\n li: '*',\n main: '*',\n map: '*',\n mark: '*',\n menu: '*',\n menuitem: '*',\n meter: '*',\n nav: '*',\n ol: '*',\n optgroup: '*',\n option: '*',\n output: '*',\n p: '*',\n picture: '*',\n pre: '*',\n progress: '*',\n q: '*',\n rp: '*',\n rt: '*',\n ruby: '*',\n s: '*',\n samp: '*',\n section: '*',\n select: '*',\n small: '*',\n span: '*',\n strike: '*',\n strong: '*',\n sub: '*',\n summary: '*',\n sup: '*',\n table: '*',\n tbody: '*',\n td: '*',\n textarea: '*',\n tfoot: '*',\n th: '*',\n thead: '*',\n time: '*',\n tr: '*',\n tt: '*',\n u: '*',\n ul: '*',\n var: '*',\n wbr: '*',\n xmp: '*',\n\n // Replaced tags:\n form: 'SPAN',\n\n // Disallowed tags\n applet: null,\n audio: null,\n base: null,\n basefont: null,\n embed: null,\n frame: null,\n frameset: null,\n iframe: null,\n link: null,\n meta: null,\n noscript: null,\n object: null,\n param: null,\n script: null,\n slot: null,\n source: null,\n style: null,\n template: null,\n title: null,\n track: null,\n video: null,\n};\n\nconst ALLOWED_HTML_ATTRIBUTES = (\n 'accept,align,alt,checked,cite,color,cols,colspan,contextmenu,' +\n 'coords,datetime,default,dir,dirname,disabled,download,face,headers,height,hidden,high,href,' +\n 'hreflang,ismap,kind,label,lang,list,low,max,maxlength,media,min,multiple,open,optimum,pattern,' +\n 'placeholder,readonly,rel,required,reversed,rows,rowspan,scope,selected,shape,size,sizes,span,' +\n 'spellcheck,src,srclang,srcset,start,step,style,tabindex,target,title,translate,type,usemap,valign,value,' +\n 'width,wrap'\n).split(',');\n\nconst DEFAULT_STYLE_VALUES: { [name: string]: string } = {\n 'background-color': 'transparent',\n 'border-bottom-color': 'rgb(0, 0, 0)',\n 'border-bottom-style': 'none',\n 'border-bottom-width': '0px',\n 'border-image-outset': '0',\n 'border-image-repeat': 'stretch',\n 'border-image-slice': '100%',\n 'border-image-source': 'none',\n 'border-image-width': '1',\n 'border-left-color': 'rgb(0, 0, 0)',\n 'border-left-style': 'none',\n 'border-left-width': '0px',\n 'border-right-color': 'rgb(0, 0, 0)',\n 'border-right-style': 'none',\n 'border-right-width': '0px',\n 'border-top-color': 'rgb(0, 0, 0)',\n 'border-top-style': 'none',\n 'border-top-width': '0px',\n 'outline-color': 'transparent',\n 'outline-style': 'none',\n 'outline-width': '0px',\n overflow: 'visible',\n '-webkit-text-stroke-width': '0px',\n 'word-wrap': 'break-word',\n 'margin-left': '0px',\n 'margin-right': '0px',\n padding: '0px',\n 'padding-top': '0px',\n 'padding-left': '0px',\n 'padding-right': '0px',\n 'padding-bottom': '0px',\n border: '0px',\n 'border-top': '0px',\n 'border-left': '0px',\n 'border-right': '0px',\n 'border-bottom': '0px',\n 'vertical-align': 'baseline',\n float: 'none',\n};\n\n// This is to preserve entity related CSS classes when paste.\nconst ALLOWED_CSS_CLASSES: string[] = [];\n\n/**\n * @internal\n */\nexport function getTagReplacement(\n additionalReplacements: Record | undefined\n): Record {\n const result = { ...HTML_TAG_REPLACEMENT };\n const replacements = additionalReplacements || {};\n getObjectKeys(replacements).forEach(key => {\n if (key) {\n result[key.toLowerCase()] = replacements[key];\n }\n });\n\n return result;\n}\n\n/**\n * @internal\n */\nexport function getAllowedAttributes(additionalAttributes: string[] | undefined): string[] {\n return unique(ALLOWED_HTML_ATTRIBUTES.concat(additionalAttributes || [])).map(attr =>\n attr.toLocaleLowerCase()\n );\n}\n\n/**\n * @internal\n */\nexport function getAllowedCssClassesRegex(\n additionalCssClasses: string[] | undefined\n): RegExp | null {\n const patterns = ALLOWED_CSS_CLASSES.concat(additionalCssClasses || []);\n return patterns.length > 0 ? new RegExp(patterns.join('|')) : null;\n}\n\n/**\n * @internal\n */\nexport function getDefaultStyleValues(additionalDefaultStyles: StringMap | undefined): StringMap {\n let result = cloneObject(DEFAULT_STYLE_VALUES);\n if (additionalDefaultStyles) {\n Object.keys(additionalDefaultStyles).forEach(name => {\n let value = additionalDefaultStyles[name];\n if (value !== null && value !== undefined) {\n result[name] = value;\n } else {\n delete result[name];\n }\n });\n }\n\n return result;\n}\n\n/**\n * @internal\n */\nexport function getStyleCallbacks(\n callbacks: CssStyleCallbackMap | null | undefined\n): CssStyleCallbackMap {\n let result = cloneObject(callbacks);\n result.position = result.position || removeValue;\n result.width = result.width || removeWidthForLiAndDiv;\n return result;\n}\n\nfunction removeValue(): null {\n return null;\n}\n\nfunction removeWidthForLiAndDiv(value: string, element: HTMLElement) {\n let tag = element.tagName;\n return !(tag == 'LI' || tag == 'DIV');\n}\n\nfunction unique(array: T[]): T[] {\n return array.filter((value, index, self) => self.indexOf(value) == index);\n}\n","import { StringMap } from 'roosterjs-editor-types';\n\n// Inheritable CSS properties\n// Ref: https://www.w3.org/TR/CSS21/propidx.html\nconst INHERITABLE_PROPERTIES = (\n 'border-spacing,caption-side,color,' +\n 'cursor,direction,empty-cells,font-family,font-size,font-style,font-variant,font-weight,' +\n 'font,letter-spacing,line-height,list-style-image,list-style-position,list-style-type,' +\n 'list-style,orphans,quotes,text-align,text-indent,text-transform,visibility,white-space,' +\n 'widows,word-spacing'\n).split(',');\n\n/**\n * Get inheritable CSS style values from the given element\n * @param element The element to get style from\n */\nexport default function getInheritableStyles(element: HTMLElement | null): StringMap {\n let win = element && element.ownerDocument && element.ownerDocument.defaultView;\n let styles = win && element && win.getComputedStyle(element);\n let result: StringMap = {};\n INHERITABLE_PROPERTIES.forEach(\n name => (result[name] = (styles && styles.getPropertyValue(name)) || '')\n );\n return result;\n}\n","import getTagOfNode from '../utils/getTagOfNode';\nimport { PredefinedCssMap, StringMap } from 'roosterjs-editor-types';\n\nconst PREDEFINED_CSS_FOR_ELEMENT: PredefinedCssMap = {\n B: {\n 'font-weight': 'bold',\n },\n EM: {\n 'font-style': 'italic',\n },\n I: {\n 'font-style': 'italic',\n },\n U: {\n 'text-decoration': 'underline',\n },\n P: {\n 'margin-top': '1em',\n 'margin-bottom': '1em',\n },\n PRE: {\n 'white-space': 'pre',\n },\n S: {\n 'text-decoration': 'line-through',\n },\n STRIKE: {\n 'text-decoration': 'line-through',\n },\n SUB: {\n 'vertical-align': 'sub',\n 'font-size': 'smaller',\n },\n SUP: {\n 'vertical-align': 'super',\n 'font-size': 'smaller',\n },\n};\n\n/**\n * @internal\n * Get a map for browser built-in CSS definitions of elements\n */\nexport default function getPredefinedCssForElement(\n element: HTMLElement,\n additionalPredefinedCssForElement?: PredefinedCssMap | null\n): StringMap {\n const tag = getTagOfNode(element);\n return PREDEFINED_CSS_FOR_ELEMENT[tag] || (additionalPredefinedCssForElement || {})[tag];\n}\n","const VARIABLE_REGEX = /^\\s*var\\(\\s*[a-zA-Z0-9-_]+\\s*(,\\s*(.*))?\\)\\s*$/;\nconst VARIABLE_PREFIX = 'var(';\n\n/**\n * @internal\n * Handle CSS variable format. e.g.: var(--name, fallbackValue)\n */\nexport function processCssVariable(value: string): string {\n const match = VARIABLE_REGEX.exec(value);\n return match?.[2] || ''; // Without fallback value, we don't know what does the original value mean, so ignore it\n}\n\n/**\n * @internal\n */\nexport function isCssVariable(value: string): boolean {\n return value.indexOf(VARIABLE_PREFIX) == 0;\n}\n","export { default as getBlockElementAtNode } from './blockElements/getBlockElementAtNode';\nexport { default as getFirstLastBlockElement } from './blockElements/getFirstLastBlockElement';\n\nexport { default as ContentTraverser } from './contentTraverser/ContentTraverser';\nexport { default as PositionContentSearcher } from './contentTraverser/PositionContentSearcher';\n\nexport {\n default as addDelimiters,\n addDelimiterAfter,\n addDelimiterBefore,\n} from './delimiter/addDelimiters';\nexport { default as getDelimiterFromElement } from './delimiter/getDelimiterFromElement';\n\nexport { default as getInlineElementAtNode } from './inlineElements/getInlineElementAtNode';\nexport { default as ImageInlineElement } from './inlineElements/ImageInlineElement';\nexport { default as LinkInlineElement } from './inlineElements/LinkInlineElement';\nexport { default as NodeInlineElement } from './inlineElements/NodeInlineElement';\nexport { default as PartialInlineElement } from './inlineElements/PartialInlineElement';\nexport { default as applyTextStyle } from './inlineElements/applyTextStyle';\n\nexport { default as extractClipboardEvent } from './clipboard/extractClipboardEvent';\nexport { default as extractClipboardItems } from './clipboard/extractClipboardItems';\nexport { default as extractClipboardItemsForIE } from './clipboard/extractClipboardItemsForIE';\nexport { default as createFragmentFromClipboardData } from './clipboard/createFragmentFromClipboardData';\nexport { default as handleImagePaste } from './clipboard/handleImagePaste';\nexport { default as handleTextPaste } from './clipboard/handleTextPaste';\nexport { default as retrieveMetadataFromClipboard } from './clipboard/retrieveMetadataFromClipboard';\nexport { default as sanitizePasteContent } from './clipboard/sanitizePasteContent';\nexport { default as getPasteType } from './clipboard/getPasteType';\n\nexport { Browser, getBrowserInfo } from './utils/Browser';\nexport { default as applyFormat } from './utils/applyFormat';\nexport { default as changeElementTag } from './utils/changeElementTag';\nexport { default as collapseNodes } from './utils/collapseNodes';\nexport { default as contains } from './utils/contains';\nexport { default as findClosestElementAncestor } from './utils/findClosestElementAncestor';\nexport { default as fromHtml } from './utils/fromHtml';\nexport { default as getComputedStyles, getComputedStyle } from './utils/getComputedStyles';\nexport {\n default as getPendableFormatState,\n PendableFormatCommandMap,\n PendableFormatNames,\n} from './utils/getPendableFormatState';\nexport { default as getTagOfNode } from './utils/getTagOfNode';\nexport { default as isBlockElement } from './utils/isBlockElement';\nexport { default as isNodeEmpty } from './utils/isNodeEmpty';\nexport { default as isVoidHtmlElement } from './utils/isVoidHtmlElement';\nexport { default as matchLink } from './utils/matchLink';\nexport { default as queryElements } from './utils/queryElements';\nexport { default as splitParentNode, splitBalancedNodeRange } from './utils/splitParentNode';\nexport { default as unwrap } from './utils/unwrap';\nexport { default as wrap } from './utils/wrap';\nexport { getNextLeafSibling, getPreviousLeafSibling } from './utils/getLeafSibling';\nexport { getFirstLeafNode, getLastLeafNode } from './utils/getLeafNode';\nexport { default as splitTextNode } from './utils/splitTextNode';\nexport { default as normalizeRect } from './utils/normalizeRect';\nexport { default as safeInstanceOf } from './utils/safeInstanceOf';\nexport { default as readFile } from './utils/readFile';\nexport { default as getInnerHTML } from './utils/getInnerHTML';\nexport { default as setColor } from './utils/setColor';\nexport { default as matchesSelector } from './utils/matchesSelector';\nexport { default as createElement, KnownCreateElementData } from './utils/createElement';\nexport { default as moveChildNodes } from './utils/moveChildNodes';\nexport { default as getIntersectedRect } from './utils/getIntersectedRect';\nexport { default as isNodeAfter } from './utils/isNodeAfter';\nexport { default as parseColor } from './utils/parseColor';\n\nexport { default as VTable } from './table/VTable';\nexport { default as isWholeTableSelected } from './table/isWholeTableSelected';\n\nexport { default as VList } from './list/VList';\nexport { default as VListItem } from './list/VListItem';\nexport { default as createVListFromRegion } from './list/createVListFromRegion';\nexport { default as VListChain } from './list/VListChain';\nexport { default as setListItemStyle } from './list/setListItemStyle';\nexport { getTableFormatInfo } from './table/tableFormatInfo';\nexport { saveTableCellMetadata } from './table/tableCellInfo';\n\nexport { default as getRegionsFromRange } from './region/getRegionsFromRange';\nexport { default as getSelectedBlockElementsInRegion } from './region/getSelectedBlockElementsInRegion';\nexport { default as collapseNodesInRegion } from './region/collapseNodesInRegion';\nexport { default as isNodeInRegion } from './region/isNodeInRegion';\nexport { default as getSelectionRangeInRegion } from './region/getSelectionRangeInRegion';\nexport { default as mergeBlocksInRegion } from './region/mergeBlocksInRegion';\n\nexport { default as Position } from './selection/Position';\nexport { default as createRange } from './selection/createRange';\nexport { default as getPositionRect } from './selection/getPositionRect';\nexport { default as isPositionAtBeginningOf } from './selection/isPositionAtBeginningOf';\nexport { default as getSelectionPath } from './selection/getSelectionPath';\nexport { default as getHtmlWithSelectionPath } from './selection/getHtmlWithSelectionPath';\nexport {\n default as setHtmlWithSelectionPath,\n setHtmlWithMetadata,\n extractContentMetadata,\n} from './selection/setHtmlWithSelectionPath';\nexport { default as addRangeToSelection } from './selection/addRangeToSelection';\n\nexport { default as addSnapshot, addSnapshotV2 } from './snapshots/addSnapshot';\nexport { default as canMoveCurrentSnapshot } from './snapshots/canMoveCurrentSnapshot';\nexport {\n default as clearProceedingSnapshots,\n clearProceedingSnapshotsV2,\n} from './snapshots/clearProceedingSnapshots';\nexport {\n default as moveCurrentSnapshot,\n moveCurrentSnapsnot,\n} from './snapshots/moveCurrentSnapshot';\nexport { default as createSnapshots } from './snapshots/createSnapshots';\nexport { default as canUndoAutoComplete } from './snapshots/canUndoAutoComplete';\n\nexport { default as HtmlSanitizer } from './htmlSanitizer/HtmlSanitizer';\nexport { default as getInheritableStyles } from './htmlSanitizer/getInheritableStyles';\nexport { default as createDefaultHtmlSanitizerOptions } from './htmlSanitizer/createDefaultHtmlSanitizerOptions';\nexport { default as chainSanitizerCallback } from './htmlSanitizer/chainSanitizerCallback';\n\nexport { default as commitEntity } from './entity/commitEntity';\nexport { default as getEntityFromElement } from './entity/getEntityFromElement';\nexport { default as getEntitySelector } from './entity/getEntitySelector';\nexport {\n createEntityPlaceholder,\n moveContentWithEntityPlaceholders,\n restoreContentWithEntityPlaceholder,\n} from './entity/entityPlaceholderUtils';\n\nexport { default as cacheGetEventData } from './event/cacheGetEventData';\nexport { default as clearEventDataCache } from './event/clearEventDataCache';\nexport { default as isModifierKey } from './event/isModifierKey';\nexport { default as isCharacterValue } from './event/isCharacterValue';\nexport { default as isCtrlOrMetaPressed } from './event/isCtrlOrMetaPressed';\n\nexport { default as getStyles } from './style/getStyles';\nexport { default as setStyles } from './style/setStyles';\nexport { default as removeImportantStyleRule } from './style/removeImportantStyleRule';\nexport { default as setGlobalCssStyles } from './style/setGlobalCssStyles';\nexport { default as removeGlobalCssStyle } from './style/removeGlobalCssStyle';\n\nexport { default as adjustInsertPosition } from './edit/adjustInsertPosition';\nexport { default as deleteSelectedContent } from './edit/deleteSelectedContent';\nexport { default as getTextContent } from './edit/getTextContent';\n\nexport { default as validate } from './metadata/validate';\nexport {\n createNumberDefinition,\n createBooleanDefinition,\n createStringDefinition,\n createArrayDefinition,\n createObjectDefinition,\n} from './metadata/definitionCreators';\nexport { getMetadata, setMetadata, removeMetadata } from './metadata/metadata';\n\nexport { default as arrayPush } from './jsUtils/arrayPush';\nexport { default as getObjectKeys } from './jsUtils/getObjectKeys';\nexport { default as toArray } from './jsUtils/toArray';\n\nexport { default as getPasteSource } from './pasteSourceValidations/getPasteSource';\n","import { BlockElement, InlineElement, NodePosition } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Represents an empty InlineElement.\r\n * This is used for ContentTraverser internally only.\r\n * An empty InlineElement means current position is at the end of a tag so nothing is included inside this element\r\n */\r\nexport default class EmptyInlineElement implements InlineElement {\r\n constructor(private position: NodePosition, private parentBlock: BlockElement) {}\r\n\r\n /**\r\n * Get the text content of this inline element\r\n */\r\n getTextContent(): string {\r\n return '';\r\n }\r\n\r\n /**\r\n * Get the container node of this inline element\r\n */\r\n getContainerNode(): Node {\r\n return this.position.node;\r\n }\r\n\r\n /**\r\n * Get the parent block element of this inline element\r\n */\r\n getParentBlock(): BlockElement {\r\n return this.parentBlock;\r\n }\r\n\r\n /**\r\n * Get the start position of this inline element\r\n */\r\n getStartPosition(): NodePosition {\r\n return this.position;\r\n }\r\n\r\n /**\r\n * Get the end position of this inline element\r\n */\r\n getEndPosition(): NodePosition {\r\n return this.position;\r\n }\r\n\r\n /**\r\n * Checks if the given inline element is after this inline element\r\n */\r\n isAfter(inlineElement: InlineElement): boolean {\r\n return inlineElement && this.position.isAfter(inlineElement.getEndPosition());\r\n }\r\n\r\n /**\r\n * Checks if this inline element is a textual inline element\r\n */\r\n isTextualInlineElement(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if the given editor position is contained in this inline element\r\n */\r\n contains(position: NodePosition): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Apply inline style to a region of an inline element.\r\n */\r\n applyStyle(styler: (element: HTMLElement) => any): void {}\r\n}\r\n","import NodeInlineElement from './NodeInlineElement';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This is an inline element representing an Html image\r\n */\r\nexport default class ImageInlineElement extends NodeInlineElement {\r\n constructor(containerNode: Node, parentBlock: BlockElement) {\r\n super(containerNode, parentBlock);\r\n }\r\n}\r\n","import NodeInlineElement from './NodeInlineElement';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This is inline element presenting an html hyperlink\r\n */\r\nexport default class LinkInlineElement extends NodeInlineElement {\r\n constructor(containerNode: Node, parentBlock: BlockElement) {\r\n super(containerNode, parentBlock);\r\n }\r\n}\r\n","import applyTextStyle from './applyTextStyle';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport Position from '../selection/Position';\r\nimport {\r\n BlockElement,\r\n InlineElement,\r\n NodePosition,\r\n NodeType,\r\n PositionType,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This presents an inline element that can be represented by a single html node.\r\n * This serves as base for most inline element as it contains most implementation\r\n * of all operations that can happen on an inline element. Other sub inline elements mostly\r\n * just identify themselves for a certain type\r\n */\r\nexport default class NodeInlineElement implements InlineElement {\r\n constructor(private containerNode: Node, private parentBlock: BlockElement) {}\r\n\r\n /**\r\n * The text content for this inline element\r\n */\r\n public getTextContent(): string {\r\n // nodeValue is better way to retrieve content for a text. Others, just use textContent\r\n return (\r\n (this.containerNode.nodeType == NodeType.Text\r\n ? this.containerNode.nodeValue\r\n : this.containerNode.textContent) || ''\r\n );\r\n }\r\n\r\n /**\r\n * Get the container node\r\n */\r\n public getContainerNode(): Node {\r\n return this.containerNode;\r\n }\r\n\r\n // Get the parent block\r\n public getParentBlock(): BlockElement {\r\n return this.parentBlock;\r\n }\r\n\r\n /**\r\n * Get the start position of the inline element\r\n */\r\n public getStartPosition(): NodePosition {\r\n // For a position, we always want it to point to a leaf node\r\n // We should try to go get the lowest first child node from the container\r\n return new Position(this.containerNode, 0).normalize();\r\n }\r\n\r\n /**\r\n * Get the end position of the inline element\r\n */\r\n public getEndPosition(): NodePosition {\r\n // For a position, we always want it to point to a leaf node\r\n // We should try to go get the lowest last child node from the container\r\n return new Position(this.containerNode, PositionType.End).normalize();\r\n }\r\n\r\n /**\r\n * Checks if this inline element is a textual inline element\r\n */\r\n public isTextualInlineElement(): boolean {\r\n return this.containerNode && this.containerNode.nodeType == NodeType.Text;\r\n }\r\n\r\n /**\r\n * Checks if an inline element is after the current inline element\r\n */\r\n public isAfter(inlineElement: InlineElement): boolean {\r\n return inlineElement && isNodeAfter(this.containerNode, inlineElement.getContainerNode());\r\n }\r\n\r\n /**\r\n * Checks if the given position is contained in the inline element\r\n */\r\n public contains(pos: NodePosition): boolean {\r\n let start = this.getStartPosition();\r\n let end = this.getEndPosition();\r\n return pos && pos.isAfter(start) && end.isAfter(pos);\r\n }\r\n\r\n /**\r\n * Apply inline style to an inline element\r\n */\r\n public applyStyle(styler: (element: HTMLElement, isInnerNode?: boolean) => any): void {\r\n applyTextStyle(this.containerNode, styler);\r\n }\r\n}\r\n","import applyTextStyle from './applyTextStyle';\r\nimport createRange from '../selection/createRange';\r\nimport Position from '../selection/Position';\r\nimport { BlockElement, InlineElement, NodePosition, PositionType } from 'roosterjs-editor-types';\r\nimport { getNextLeafSibling, getPreviousLeafSibling } from '../utils/getLeafSibling';\r\n\r\n/**\r\n * This is a special version of inline element that identifies a section of an inline element\r\n * We often have the need to cut an inline element in half and perform some operation only on half of an inline element\r\n * i.e. users select only some text of a text node and apply format, in that case, format has to happen on partial of an inline element\r\n * PartialInlineElement is implemented in a way that decorate another full inline element with its own override on methods like isAfter\r\n * It also offers some special methods that others don't have, i.e. nextInlineElement etc.\r\n */\r\nexport default class PartialInlineElement implements InlineElement {\r\n constructor(\r\n private inlineElement: InlineElement,\r\n private start: NodePosition | null = null,\r\n private end: NodePosition | null = null\r\n ) {}\r\n\r\n /**\r\n * Get the full inline element that this partial inline decorates\r\n */\r\n public getDecoratedInline(): InlineElement {\r\n return this.inlineElement;\r\n }\r\n\r\n /**\r\n * Gets the container node\r\n */\r\n public getContainerNode(): Node {\r\n return this.inlineElement.getContainerNode();\r\n }\r\n\r\n /**\r\n * Gets the parent block\r\n */\r\n public getParentBlock(): BlockElement {\r\n return this.inlineElement.getParentBlock();\r\n }\r\n\r\n /**\r\n * Gets the text content\r\n */\r\n public getTextContent(): string {\r\n let range = createRange(this.getStartPosition(), this.getEndPosition());\r\n\r\n return range.toString();\r\n }\r\n\r\n /**\r\n * Get start position of this inline element.\r\n */\r\n public getStartPosition(): NodePosition {\r\n return this.start || this.inlineElement.getStartPosition();\r\n }\r\n\r\n /**\r\n * Get end position of this inline element.\r\n */\r\n public getEndPosition(): NodePosition {\r\n return this.end || this.inlineElement.getEndPosition();\r\n }\r\n\r\n /**\r\n * Get next partial inline element if it is not at the end boundary yet\r\n */\r\n public get nextInlineElement(): PartialInlineElement | null {\r\n return this.end ? new PartialInlineElement(this.inlineElement, this.end) : null;\r\n }\r\n\r\n /**\r\n * Get previous partial inline element if it is not at the begin boundary yet\r\n */\r\n public get previousInlineElement(): PartialInlineElement | null {\r\n return this.start\r\n ? new PartialInlineElement(this.inlineElement, undefined, this.start)\r\n : null;\r\n }\r\n\r\n /**\r\n * Checks if it contains a position\r\n */\r\n public contains(pos: NodePosition): boolean {\r\n return pos && pos.isAfter(this.getStartPosition()) && this.getEndPosition().isAfter(pos);\r\n }\r\n\r\n /**\r\n * Checks if this inline element is a textual inline element\r\n */\r\n public isTextualInlineElement(): boolean {\r\n return this.inlineElement && this.inlineElement.isTextualInlineElement();\r\n }\r\n\r\n /**\r\n * Check if this inline element is after the other inline element\r\n */\r\n public isAfter(inlineElement: InlineElement): boolean {\r\n let thisStart = this.getStartPosition();\r\n let otherEnd = inlineElement && inlineElement.getEndPosition();\r\n return otherEnd && (thisStart.isAfter(otherEnd) || thisStart.equalTo(otherEnd));\r\n }\r\n\r\n /**\r\n * apply style\r\n */\r\n public applyStyle(styler: (element: HTMLElement, isInnerNode?: boolean) => any) {\r\n let from: NodePosition | null = this.getStartPosition().normalize();\r\n let to: NodePosition | null = this.getEndPosition().normalize();\r\n let container = this.getContainerNode();\r\n\r\n if (from.isAtEnd) {\r\n let nextNode = getNextLeafSibling(container, from.node);\r\n from = nextNode ? new Position(nextNode, PositionType.Begin) : null;\r\n }\r\n if (to.offset == 0) {\r\n let previousNode = getPreviousLeafSibling(container, to.node);\r\n to = previousNode ? new Position(previousNode, PositionType.End) : null;\r\n }\r\n\r\n applyTextStyle(container, styler, from || undefined, to || undefined);\r\n }\r\n}\r\n","import getTagOfNode from '../utils/getTagOfNode';\nimport Position from '../selection/Position';\nimport splitTextNode from '../utils/splitTextNode';\nimport wrap from '../utils/wrap';\nimport { getNextLeafSibling } from '../utils/getLeafSibling';\nimport { NodePosition, NodeType, PositionType } from 'roosterjs-editor-types';\nimport { splitBalancedNodeRange } from '../utils/splitParentNode';\nimport safeInstanceOf from '../utils/safeInstanceOf';\n\nconst STYLET_AGS = 'SPAN,B,I,U,EM,STRONG,STRIKE,S,SMALL,SUP,SUB'.split(',');\n\n/**\n * Apply style using a styler function to the given container node in the given range\n * @param container The container node to apply style to\n * @param styler The styler function\n * @param fromPosition From position\n * @param toPosition To position\n */\nexport default function applyTextStyle(\n container: Node,\n styler: (node: HTMLElement, isInnerNode?: boolean) => any,\n from: NodePosition = new Position(container, PositionType.Begin).normalize(),\n to: NodePosition = new Position(container, PositionType.End).normalize()\n) {\n let formatNodes: Node[] = [];\n let fromPosition: NodePosition | null = from;\n let toPosition: NodePosition | null = to;\n\n while (fromPosition && toPosition && toPosition.isAfter(fromPosition)) {\n let formatNode = fromPosition.node;\n let parentTag = getTagOfNode(formatNode.parentNode);\n\n // The code below modifies DOM. Need to get the next sibling first otherwise you won't be able to reliably get a good next sibling node\n let nextNode = getNextLeafSibling(container, formatNode);\n\n if (formatNode.nodeType == NodeType.Text && ['TR', 'TABLE'].indexOf(parentTag) < 0) {\n if (formatNode == toPosition.node && !toPosition.isAtEnd) {\n formatNode = splitTextNode(\n formatNode,\n toPosition.offset,\n true /*returnFirstPart*/\n );\n }\n\n if (fromPosition.offset > 0) {\n formatNode = splitTextNode(\n formatNode,\n fromPosition.offset,\n false /*returnFirstPart*/\n );\n }\n\n formatNodes.push(formatNode);\n }\n\n fromPosition = nextNode && new Position(nextNode, PositionType.Begin);\n }\n\n if (formatNodes.length > 0) {\n if (formatNodes.every(node => node.parentNode == formatNodes[0].parentNode)) {\n let newNode = formatNodes.shift()!;\n formatNodes.forEach(node => {\n const newNodeValue = (newNode.nodeValue || '') + (node.nodeValue || '');\n newNode.nodeValue = newNodeValue;\n node.parentNode?.removeChild(node);\n });\n formatNodes = [newNode];\n }\n\n formatNodes.forEach(startingNode => {\n // When apply style within style tags like B/I/U/..., we split the tag and apply outside them\n // So that the inner style tag such as U, STRIKE can inherit the style we added\n let node: Node | null = startingNode;\n while (\n node &&\n getTagOfNode(node) != 'SPAN' &&\n STYLET_AGS.indexOf(getTagOfNode(node.parentNode)) >= 0\n ) {\n callStylerWithInnerNode(node, styler);\n node = splitBalancedNodeRange(node);\n }\n\n if (node && getTagOfNode(node) != 'SPAN') {\n callStylerWithInnerNode(node, styler);\n node = wrap(node, 'SPAN');\n }\n\n if (safeInstanceOf(node, 'HTMLElement')) {\n styler(node);\n }\n });\n }\n}\n\nfunction callStylerWithInnerNode(\n node: Node,\n styler: (node: HTMLElement, isInnerNode?: boolean) => any\n) {\n if (node && node.nodeType == NodeType.Element) {\n styler(node as HTMLElement, true /*isInnerNode*/);\n }\n}\n","import getInlineElementAtNode from './getInlineElementAtNode';\r\nimport { getFirstLeafNode, getLastLeafNode } from '../utils/getLeafNode';\r\nimport { InlineElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Get the first inline element inside the given node\r\n */\r\nexport function getFirstInlineElement(rootNode: Node): InlineElement | null {\r\n // getFirstLeafNode can return null for empty container\r\n // do check null before passing on to get inline from the node\r\n let node = getFirstLeafNode(rootNode);\r\n return node ? getInlineElementAtNode(rootNode, node) : null;\r\n}\r\n\r\n/**\r\n * @internal\r\n * Get the last inline element inside the given node\r\n */\r\nexport function getLastInlineElement(rootNode: Node): InlineElement | null {\r\n // getLastLeafNode can return null for empty container\r\n // do check null before passing on to get inline from the node\r\n let node = getLastLeafNode(rootNode);\r\n return node ? getInlineElementAtNode(rootNode, node) : null;\r\n}\r\n","import getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport ImageInlineElement from './ImageInlineElement';\r\nimport LinkInlineElement from './LinkInlineElement';\r\nimport NodeInlineElement from './NodeInlineElement';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport { BlockElement, InlineElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get the inline element at a node\r\n * @param rootNode The root node of current scope\r\n * @param node The node to get InlineElement from\r\n */\r\nexport default function getInlineElementAtNode(rootNode: Node, node: Node | null): InlineElement;\r\n\r\n/**\r\n * Get the inline element at a node\r\n * @param parentBlock Parent BlockElement of this node\r\n * @param node The node to get InlineElement from\r\n */\r\nexport default function getInlineElementAtNode(\r\n parentBlock: BlockElement,\r\n node: Node | null\r\n): InlineElement;\r\n\r\nexport default function getInlineElementAtNode(\r\n parent: Node | BlockElement,\r\n node: Node | null\r\n): InlineElement | null {\r\n // An inline element has to be in a block element, get the block first and then resolve through the factory\r\n let parentBlock = safeInstanceOf(parent, 'Node') ? getBlockElementAtNode(parent, node) : parent;\r\n return node && parentBlock && resolveInlineElement(node, parentBlock);\r\n}\r\n\r\n/**\r\n * Resolve an inline element by a leaf node\r\n * @param node The node to resolve from\r\n * @param parentBlock The parent block element\r\n */\r\nfunction resolveInlineElement(node: Node, parentBlock: BlockElement): InlineElement {\r\n let nodeChain = [node];\r\n for (\r\n let parent = node.parentNode;\r\n parent && parentBlock.contains(parent);\r\n parent = parent.parentNode\r\n ) {\r\n nodeChain.push(parent);\r\n }\r\n\r\n let inlineElement: InlineElement | undefined;\r\n\r\n for (let i = nodeChain.length - 1; i >= 0 && !inlineElement; i--) {\r\n let currentNode = nodeChain[i];\r\n let tag = getTagOfNode(currentNode);\r\n if (tag == 'A') {\r\n inlineElement = new LinkInlineElement(currentNode, parentBlock);\r\n } else if (tag == 'IMG') {\r\n inlineElement = new ImageInlineElement(currentNode, parentBlock);\r\n }\r\n }\r\n\r\n return inlineElement || new NodeInlineElement(node, parentBlock);\r\n}\r\n","import getInlineElementAtNode from './getInlineElementAtNode';\r\nimport PartialInlineElement from './PartialInlineElement';\r\nimport shouldSkipNode from '../utils/shouldSkipNode';\r\nimport { getLeafSibling } from '../utils/getLeafSibling';\r\nimport { InlineElement, NodePosition, NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Get inline element before a position\r\n * This is mostly used when we want to get the inline element before selection/cursor\r\n * There is a possible that the cursor is in middle of an inline element (i.e. mid of a text node)\r\n * in this case, we only want to return what is before cursor (a partial of an inline) to indicate\r\n * that we're in middle.\r\n * @param root Root node of current scope, use for create InlineElement\r\n * @param position The position to get InlineElement before\r\n */\r\nexport function getInlineElementBefore(root: Node, position: NodePosition): InlineElement | null {\r\n return getInlineElementBeforeAfter(root, position, false /*isAfter*/);\r\n}\r\n\r\n/**\r\n * @internal\r\n * Get inline element after a position\r\n * This is mostly used when we want to get the inline element after selection/cursor\r\n * There is a possible that the cursor is in middle of an inline element (i.e. mid of a text node)\r\n * in this case, we only want to return what is before cursor (a partial of an inline) to indicate\r\n * that we're in middle.\r\n * @param root Root node of current scope, use for create InlineElement\r\n * @param position The position to get InlineElement after\r\n */\r\nexport function getInlineElementAfter(root: Node, position: NodePosition): InlineElement | null {\r\n return getInlineElementBeforeAfter(root, position, true /*isAfter*/);\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function getInlineElementBeforeAfter(root: Node, position: NodePosition, isAfter: boolean) {\r\n if (!root || !position || !position.node) {\r\n return null;\r\n }\r\n\r\n position = position.normalize();\r\n let { offset, isAtEnd } = position;\r\n let node: Node | null = position.node;\r\n let isPartial = false;\r\n\r\n if ((!isAfter && offset == 0 && !isAtEnd) || (isAfter && isAtEnd)) {\r\n node = getLeafSibling(root, node, isAfter);\r\n } else if (\r\n node.nodeType == NodeType.Text &&\r\n ((!isAfter && !isAtEnd) || (isAfter && offset > 0))\r\n ) {\r\n isPartial = true;\r\n }\r\n\r\n if (node && shouldSkipNode(node)) {\r\n node = getLeafSibling(root, node, isAfter);\r\n }\r\n\r\n let inlineElement = getInlineElementAtNode(root, node);\r\n\r\n if (inlineElement && (isPartial || inlineElement.contains(position))) {\r\n inlineElement = isAfter\r\n ? new PartialInlineElement(inlineElement, position, undefined)\r\n : new PartialInlineElement(inlineElement, undefined, position);\r\n }\r\n\r\n return inlineElement;\r\n}\r\n","/**\n * A type-safe wrapper for Array.prototype.push.apply()\n * @param mainArray The main array to push items into\n * @param itemsArray The items to push to main array\n */\nexport default function arrayPush(mainArray: T[], itemsArray: T[]) {\n Array.prototype.push.apply(mainArray, itemsArray);\n}\n","/**\n * Provide a strong-typed version of Object.keys()\n * @param obj The source object\n * @returns Array of keys\n */\nexport default function getObjectKeys(\n obj: Record | Partial>\n): T[] {\n return Object.keys(obj) as T[];\n}\n","/**\n * Convert a named node map to an array\n * @param collection The map to convert\n */\nexport default function toArray(collection: NamedNodeMap): Attr[];\n\n/**\n * Convert a named node map to an array\n * @param collection The map to convert\n */\nexport default function toArray(collection: DataTransferItemList): DataTransferItem[];\n\n/**\n * Convert a collection to an array\n * @param collection The collection to convert\n */\nexport default function toArray(collection: NodeListOf): T[];\n\n/**\n * Convert a collection to an array\n * @param collection The collection to convert\n */\nexport default function toArray(collection: HTMLCollectionOf): T[];\n\n/**\n * Convert an array to an array.\n * This is to satisfy typescript compiler. For some cases the object can be a collection at runtime,\n * but the declaration is an array. e.g. ClipboardData.types\n * @param array The array to convert\n */\nexport default function toArray(array: readonly T[]): T[];\n\nexport default function toArray(collection: any): any[] {\n return [].slice.call(collection);\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport getListTypeFromNode, { isListElement } from './getListTypeFromNode';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport isBlockElement from '../utils/isBlockElement';\nimport isNodeEmpty from '../utils/isNodeEmpty';\nimport Position from '../selection/Position';\nimport queryElements from '../utils/queryElements';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport splitParentNode from '../utils/splitParentNode';\nimport toArray from '../jsUtils/toArray';\nimport unwrap from '../utils/unwrap';\nimport VListItem, { ListStyleDefinitionMetadata, ListStyleMetadata } from './VListItem';\nimport wrap from '../utils/wrap';\nimport { getMetadata, setMetadata } from '../metadata/metadata';\nimport {\n Indentation,\n ListType,\n NodePosition,\n PositionType,\n NodeType,\n Alignment,\n NumberingListType,\n BulletListType,\n} from 'roosterjs-editor-types';\nimport type {\n CompatibleAlignment,\n CompatibleBulletListType,\n CompatibleIndentation,\n CompatibleListType,\n CompatibleNumberingListType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Represent a bullet or a numbering list\n *\n * @example\n * A VList is a logical representation of list items, it contains an item array with node and list type stack.\n * e.g. We have a list like this\n * ```html\n *
      \n *
    1. item 1
    2. \n *
    3. item 2
    4. \n *
        \n *
      • item 2.1
      • \n *
      • item 2.2
      • \n *
          \n *
    \n * ```\n *\n * A VList of this list will be like this:\n * ```javascript\n * {\n * rootList: (OL node),\n * items: [{\n * node: (LI node with 'item 1'),\n * listTypes: [null, OL],\n * }, {\n * node: (LI node with 'item 2'),\n * listTypes: [null, OL],\n * }, {\n * node: (LI node with 'item 2.1),\n * listTypes: [null, OL, UL],\n * }, {\n * node: (LI node with 'item 2.2'),\n * listTypes: [null, OL, UL],\n * }\n * ]\n * }\n * ```\n *\n * When we want to outdent item 2.1, we just need to remove the last \"UL\" from listTypes of item 2.1, then\n * the writeBack() function will handle everything related to DOM change\n */\nexport default class VList {\n public readonly items: VListItem[] = [];\n\n /**\n * Create a new instance of VList class\n * @param rootList The root list element, can be either OL or UL tag\n */\n constructor(public rootList: HTMLOListElement | HTMLUListElement) {\n if (!rootList) {\n throw new Error('rootList must not be null');\n }\n\n // Before populate items, we need to normalize the list to make sure it is in a correct format\n // otherwise further action may mass thing up.\n //\n // There are two kinds of normalization to perform.\n // 1. Move nodes directly under OL/UL into a LI node, unless it is an orphan node\n // Please see comment for VListItem.isOrphanItem() for more information about orphan node\n // e.g.:\n // ```HTML\n //
      \n //
    1. item 1
    2. \n //
      item 2
      \n //
    \n // ```\n // After this step, it should become:\n // ```html\n //
      \n //
    1. item 1\n //
      item 2
      \n //
    2. \n //
    \n // ```\n moveChildNodesToLi(this.rootList);\n queryElements(this.rootList, 'ol,ul', moveChildNodesToLi);\n\n // 2. Move LI node embedded into another LI node out to directly under OL/UL node\n // Ideally browser we do this for us automatically when out the HTML into DOM. However after\n // step 1, it is possible that we move some LI node into another one. e.g:\n // ```HTML\n //
      \n //
    1. item 1
    2. \n //
      \n // item 1.1\n //
    3. item 3
    4. \n //
      \n //
    \n // ```\n // See that the second LI tag is not directly under OL, so after step 1, this will become:\n // ```html\n //
      \n //
    1. item 1\n //
      \n // item 1.1\n //
    2. item 2
    3. \n //
    \n //
  • \n // \n // ```\n // Now we have a LI tag embedded into another LI tag. So we need step 2 to move the inner LI tag out to be:\n // ```html\n //
      \n //
    1. item1\n //
      item 1.1
      \n //
    2. \n //
    3. item2
    4. \n //
    \n // ```\n queryElements(this.rootList, 'li', moveLiToList);\n\n this.populateItems(this.rootList);\n }\n\n /**\n * Check if this list contains the given node\n * @param node The node to check\n */\n contains(node: Node) {\n // We don't check if the node is contained by this.rootList here, because after some operation,\n // it is possible a node is logically contained by this list but the container list item hasn't\n // been put under this.rootList in DOM tree yet.\n return this.items.some(item => item.contains(node));\n }\n\n /**\n * Get list number of the last item in this VList.\n * If there is no order list item, result will be undefined\n */\n getLastItemNumber(): number | undefined {\n const start = this.getStart();\n\n return start === undefined\n ? start\n : start -\n 1 +\n this.items.filter(\n item =>\n item.getListType() == ListType.Ordered &&\n item.getLevel() == 1 &&\n !item.isDummy()\n ).length;\n }\n\n /**\n * Write the result back into DOM tree\n * After that, this VList becomes unavailable because we set this.rootList to null\n *\n * @param shouldReuseAllAncestorListElements Optional - defaults to false.\n * @param disableListChain Whether we want to disable list chain functionality. @default false\n */\n writeBack(shouldReuseAllAncestorListElements?: boolean, disableListChain?: boolean) {\n if (!this.rootList) {\n throw new Error('rootList must not be null');\n }\n\n const doc = this.rootList.ownerDocument;\n const listStack: Node[] = [doc.createDocumentFragment()];\n const placeholder = doc.createTextNode('');\n let start = this.getStart() || 1;\n let lastList: Node;\n\n // Use a placeholder to hold the position since the root list may be moved into document fragment later\n this.rootList.parentNode!.replaceChild(placeholder, this.rootList);\n\n this.items.forEach(item => {\n const newListStart = item.getNewListStart();\n\n if (newListStart && newListStart != start) {\n listStack.splice(1, listStack.length - 1);\n start = newListStart;\n }\n\n item.writeBack(listStack, this.rootList, shouldReuseAllAncestorListElements);\n const topList = listStack[1];\n\n item.applyListStyle(this.rootList, start);\n\n if (safeInstanceOf(topList, 'HTMLOListElement')) {\n if (lastList != topList) {\n if (start == 1) {\n topList.removeAttribute('start');\n } else {\n topList.start = start;\n }\n }\n\n if (item.getLevel() == 1 && !item.isDummy() && !disableListChain) {\n start++;\n }\n }\n\n lastList = topList;\n });\n\n // Restore the content to the position of placeholder\n placeholder.parentNode!.replaceChild(listStack[0], placeholder);\n }\n\n /**\n * Sets the New List Start Property, that is going to be used to create a new List in the WriteBack function\n * @param separator The HTML element that indicates when to split the VList\n * @param startNumber The start number of the new List\n */\n split(separator: HTMLElement, startNumber: number) {\n if (!this.rootList) {\n throw new Error('rootList must not be null');\n }\n\n //Traverse the items of the VList, when the separator is found, set the New List Start Property\n for (let index = 0; index < this.items.length; index++) {\n if (this.items[index].getNode() == separator) {\n this.items[index].setNewListStart(startNumber);\n return;\n }\n }\n }\n\n /**\n * Set indentation of the given range of this list\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param indentation Indent or outdent\n */\n setIndentation(\n start: NodePosition,\n end: NodePosition,\n indentation: Indentation | CompatibleIndentation\n ): void;\n\n /**\n * Outdent the give range of this list\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param indentation Specify to outdent\n * @param softOutdent (Optional) True to make the item to by dummy (no bullet or number) if the item is not dummy,\n * otherwise outdent the item\n * @param preventItemRemoval (Optional) True to prevent the indentation to remove the bullet when outdenting a first\n * level list item, by default is false\n */\n setIndentation(\n start: NodePosition,\n end: NodePosition,\n indentation: Indentation.Decrease | CompatibleIndentation.Decrease,\n softOutdent?: boolean,\n preventItemRemoval?: boolean\n ): void;\n\n setIndentation(\n start: NodePosition,\n end: NodePosition,\n indentation: Indentation | CompatibleIndentation,\n softOutdent?: boolean,\n preventItemRemoval: boolean = false\n ) {\n let shouldAddMargin = false;\n this.findListItems(start, end, item => {\n shouldAddMargin = shouldAddMargin || this.items.indexOf(item) == 0;\n indentation == Indentation.Decrease\n ? softOutdent && !item.isDummy()\n ? item.setIsDummy(true /*isDummy*/)\n : item.outdent(preventItemRemoval)\n : item.indent();\n });\n\n if (shouldAddMargin && preventItemRemoval) {\n for (let index = 0; index < this.items.length; index++) {\n this.items[index].addNegativeMargins();\n }\n }\n }\n\n /**\n * Set alignment of the given range of this list\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param alignment Align items left, center or right\n */\n\n setAlignment(\n start: NodePosition,\n end: NodePosition,\n alignment: Alignment | CompatibleAlignment\n ) {\n this.rootList.style.display = 'flex';\n this.rootList.style.flexDirection = 'column';\n this.findListItems(start, end, item => {\n let align = 'start';\n if (alignment == Alignment.Center) {\n align = 'center';\n } else if (alignment == Alignment.Right) {\n align = 'end';\n }\n item.getNode().style.alignSelf = align;\n });\n }\n\n /**\n * Change list type of the given range of this list.\n * If some of the items are not real list item yet, this will make them to be list item with given type\n * If all items in the given range are already in the type to change to, this becomes an outdent operation\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param targetType Target list type\n */\n changeListType(\n start: NodePosition,\n end: NodePosition,\n targetType: ListType | CompatibleListType\n ) {\n let needChangeType = false;\n\n this.findListItems(start, end, item => {\n needChangeType = needChangeType || item.getListType() != targetType;\n });\n this.findListItems(start, end, item =>\n needChangeType ? item.changeListType(targetType) : item.outdent()\n );\n }\n\n /**\n * Change list style of the given range of this list.\n * If some of the items are not real list item yet, this will make them to be list item with given style\n * @param orderedStyle The style of ordered list\n * @param unorderedStyle The style of unordered list\n */\n setListStyleType(\n orderedStyle?: NumberingListType | CompatibleNumberingListType,\n unorderedStyle?: BulletListType | CompatibleBulletListType\n ) {\n const style = getMetadata(this.rootList, ListStyleDefinitionMetadata);\n const styleMetadata = createListStyleMetadata(\n style,\n orderedStyle as NumberingListType,\n unorderedStyle as BulletListType\n );\n setMetadata(this.rootList, styleMetadata, ListStyleDefinitionMetadata);\n }\n\n /**\n * Append a new item to this VList\n * @param node node of the item to append. If it is not wrapped with LI tag, it will be wrapped\n * @param type Type of this list item, can be ListType.None\n */\n appendItem(node: Node, type: ListType | CompatibleListType) {\n const nodeTag = getTagOfNode(node);\n\n // Change DIV tag to SPAN. Otherwise we cannot create new list item by Enter key in Safari\n if (nodeTag == 'DIV') {\n node = changeElementTag(node, 'LI')!;\n } else if (nodeTag != 'LI') {\n node = wrap(node, 'LI');\n }\n\n this.items.push(\n type == ListType.None\n ? new VListItem(node)\n : new VListItem(node, (type))\n );\n }\n\n /**\n * Merge the given VList into current VList.\n * - All list items will be removed from the given VList and added into this list.\n * - The root node of the given VList will be removed from DOM tree\n * - If there are orphan items in the given VList, they will be merged into the last item\n * of this list if any.\n * @param list The vList to merge from\n */\n mergeVList(list: VList) {\n if (list && list != this) {\n list.items.forEach(item => this.items.push(item));\n list.items.splice(0, list.items.length);\n list.rootList.parentNode?.removeChild(list.rootList);\n }\n }\n\n /**\n * Get the index of the List Item in the current List\n * If the root list is:\n * Ordered list, the listIndex start count is going to be the start property of the OL - 1,\n * @example For example if we want to find the index of Item 2 in the list below, the returned index is going to be 6\n * * ```html\n *
      \n *
    1. item 1
    2. \n *
    3. item 2
    4. \n *
    5. item 3
    6. \n *
    \n * ```\n * Unordered list, the listIndex start count starts from 0\n * @example For example if we want to find the index of Item 2 in the list below, the returned index is going to be 2\n * ```html\n *
      \n *
    • item 1
    • \n *
    • item 2
    • \n *
    • item 3
    • \n *
    \n * ```\n * @param input List item to find in the root list\n */\n getListItemIndex(input: Node) {\n if (this.items) {\n let listIndex = (this.getStart() || 1) - 1;\n\n for (let index = 0; index < this.items.length; index++) {\n const child = this.items[index];\n if (child.getLevel() == 1 && !child.isDummy()) {\n listIndex++;\n }\n\n if (child.getNode() == input) {\n return listIndex;\n }\n }\n }\n return -1;\n }\n\n /**\n * Get the Start property of the root list of this VList\n * @returns Start number of the list\n */\n getStart(): number | undefined {\n return safeInstanceOf(this.rootList, 'HTMLOListElement') ? this.rootList.start : undefined;\n }\n\n private findListItems(\n start: NodePosition,\n end: NodePosition,\n callback?: (item: VListItem) => any\n ): VListItem[] {\n if (this.items.length == 0) {\n return [];\n }\n\n const listStartPos = new Position(this.items[0].getNode(), PositionType.Begin);\n const listEndPos = new Position(\n this.items[this.items.length - 1].getNode(),\n PositionType.End\n );\n\n let startIndex = listStartPos.isAfter(start) ? 0 : -1;\n let endIndex = this.items.length - (end.isAfter(listEndPos) ? 1 : 0);\n\n this.items.forEach((item, index) => {\n startIndex = item.contains(start.node) ? index : startIndex;\n endIndex = item.contains(end.node) ? index : endIndex;\n });\n\n startIndex = endIndex < this.items.length ? Math.max(0, startIndex) : startIndex;\n endIndex = startIndex >= 0 ? Math.min(this.items.length - 1, endIndex) : endIndex;\n\n const result = startIndex <= endIndex ? this.items.slice(startIndex, endIndex + 1) : [];\n\n if (callback) {\n result.forEach(callback);\n }\n\n return result;\n }\n\n private populateItems(\n list: HTMLOListElement | HTMLUListElement,\n listTypes: (\n | ListType.Ordered\n | ListType.Unordered\n | CompatibleListType.Ordered\n | CompatibleListType.Unordered\n )[] = []\n ) {\n const type = getListTypeFromNode(list);\n const items = toArray(list.childNodes);\n\n items.forEach(item => {\n const newListTypes = [...listTypes, type];\n\n if (isListElement(item)) {\n this.populateItems(item, newListTypes);\n } else if (item.nodeType != NodeType.Text || (item.nodeValue || '').trim() != '') {\n this.items.push(new VListItem(item, ...newListTypes));\n }\n });\n }\n}\n\n//Normalization\n\n// Step 1: Move all non-LI direct children under list into LI\n// e.g.\n// From:
    • line 1
    • line 2
    \n// To:
    • line 1
      line 2
    \nfunction moveChildNodesToLi(list: HTMLElement) {\n let currentItem: HTMLLIElement | null = null;\n\n toArray(list.childNodes).forEach(child => {\n if (getTagOfNode(child) == 'LI') {\n currentItem = child as HTMLLIElement;\n } else if (isListElement(child)) {\n currentItem = null;\n } else if (currentItem && !isNodeEmpty(child, true /*trimContent*/)) {\n currentItem.appendChild(isBlockElement(child) ? child : wrap(child));\n }\n });\n}\n\n// Step 2: Move nested LI up to under list directly\n// e.g.\n// From:
    • line 1
    • line 2
    • line 3
    \n// To:
    • line 1
    • line 2
      line 3
    \nfunction moveLiToList(li: HTMLElement) {\n while (!isListElement(li.parentNode)) {\n splitParentNode(li, true /*splitBefore*/);\n let furtherNodes: Node[] = toArray(li.parentNode!.childNodes).slice(1);\n\n if (furtherNodes.length > 0) {\n if (!isBlockElement(furtherNodes[0])) {\n furtherNodes = [wrap(furtherNodes)];\n }\n furtherNodes.forEach(node => li.appendChild(node));\n }\n\n unwrap(li.parentNode!);\n }\n}\n\nfunction getValidValue(...values: (T | undefined)[]): T | undefined {\n return values.filter(x => x !== undefined)[0];\n}\n\nfunction createListStyleMetadata(\n style: ListStyleMetadata | null,\n orderedStyle?: NumberingListType | CompatibleNumberingListType,\n unorderedStyle?: BulletListType | CompatibleBulletListType\n): ListStyleMetadata {\n return {\n orderedStyleType: getValidValue(\n orderedStyle,\n style?.orderedStyleType,\n NumberingListType.Decimal\n ),\n unorderedStyleType: getValidValue(\n unorderedStyle,\n style?.unorderedStyleType,\n BulletListType.Disc\n ),\n };\n}\n","import arrayPush from '../jsUtils/arrayPush';\nimport getRootListNode from './getRootListNode';\nimport isNodeAfter from '../utils/isNodeAfter';\nimport isNodeInRegion from '../region/isNodeInRegion';\nimport queryElements from '../utils/queryElements';\nimport VList from './VList';\nimport { ListType, RegionBase } from 'roosterjs-editor-types';\n\nconst CHAIN_NAME_PREFIX = '__List_Chain_';\nconst CHAIN_DATASET_NAME = 'listchain';\nconst AFTER_CURSOR_DATASET_NAME = 'listchainafter';\nlet lastChainIndex = 0;\n\n/**\n * Represent a chain of list nodes.\n * A chain of lists is a virtual link of lists that have continuous numbers, when editor one of them,\n * all others should also be updated in order to main the list number to be continuous.\n */\nexport default class VListChain {\n private lastNumber = 0;\n private lastNumberBeforeCursor = 0;\n\n /**\n * Create an array of VListChain from current region in editor\n * @param region The region to create VListChain from\n * @param currentNode Optional current node, used for mark lists that are after this node\n * @param nameGenerator Used by test code only\n */\n static createListChains(\n region: RegionBase | RegionBase[],\n currentNode?: Node,\n nameGenerator?: () => string\n ): VListChain[] {\n const regions = Array.isArray(region) ? region : region ? [region] : [];\n const result: VListChain[] = [];\n regions.forEach(region => {\n const chains: VListChain[] = [];\n let lastList: HTMLOListElement;\n\n queryElements(region.rootNode, 'ol', ol => {\n const list = getRootListNode(region, 'ol', ol);\n\n if (lastList != list) {\n const chain =\n chains.filter(c => c.canAppendToTail(list))[0] ||\n new VListChain(region, (nameGenerator || createListChainName)());\n const index = chains.indexOf(chain);\n const afterCurrentNode = !!currentNode && isNodeAfter(list, currentNode);\n\n if (!afterCurrentNode) {\n // Make sure current one is at the front if current block has not been met, so that\n // the first chain is always the nearest one from current node\n if (index >= 0) {\n chains.splice(index, 1);\n }\n\n chains.unshift(chain);\n } else if (index < 0) {\n chains.push(chain);\n }\n\n chain.append(list, afterCurrentNode);\n lastList = list;\n }\n });\n\n arrayPush(result, chains);\n });\n\n return result;\n }\n\n /**\n * Check if a list with the given start number can be appended next to the last list before cursor\n * @param startNumber The start number of the new list\n */\n canAppendAtCursor(startNumber: number): boolean {\n return startNumber > 1 && this.lastNumberBeforeCursor + 1 == startNumber;\n }\n\n /**\n * Create a VList to wrap the block of the given node, and append to current chain\n * @param container The container node to create list at\n * @param startNumber Start number of the new list\n */\n createVListAtBlock(container: Node, startNumber: number): VList | null {\n if (container && container.parentNode) {\n const list = container.ownerDocument!.createElement('ol');\n\n list.start = startNumber;\n this.applyChainName(list);\n container.parentNode.insertBefore(list, container);\n\n const vList = new VList(list);\n\n vList.appendItem(container, ListType.None);\n return vList;\n } else {\n return null;\n }\n }\n\n /**\n * After change the lists, commit the change to all lists in this chain to update the list number,\n * and clear the temporary dataset values added to list node\n * @param shouldReuseAllAncestorListElements Whether we can parent list item (OL/UL) even if its list type does not match the previous one. @default false\n * @param disableListChain Whether we want to disable list chain functionality, so splitted list will always restart its number from 1 @default false\n */\n commit(shouldReuseAllAncestorListElements?: boolean, disableListChain?: boolean) {\n const lists = this.getLists();\n let lastNumber = 0;\n\n for (let i = 0; i < lists.length; i++) {\n const list = lists[i];\n\n if (!disableListChain) {\n //If there is a list chain sequence, ensure the list chain keep increasing correctly\n if (list.start > 1) {\n list.start = list.start === lastNumber ? lastNumber + 1 : list.start;\n } else {\n list.start = lastNumber + 1;\n }\n }\n\n const vlist = new VList(list);\n lastNumber = vlist.getLastItemNumber() || 0;\n\n delete list.dataset[CHAIN_DATASET_NAME];\n delete list.dataset[AFTER_CURSOR_DATASET_NAME];\n\n vlist.writeBack(shouldReuseAllAncestorListElements);\n }\n }\n\n /**\n * Construct a new instance of VListChain class\n * @param editor Editor object\n */\n private constructor(private region: RegionBase, private name: string) {}\n\n /**\n * Check if the given list node is can be appended into current list chain\n * @param list The list node to check\n */\n private canAppendToTail(list: HTMLOListElement) {\n return this.lastNumber + 1 == list.start;\n }\n\n /**\n * Append the given list node into this VListChain\n * @param list The list node to append\n * @param isAfterCurrentNode Whether this list is after current node\n */\n private append(list: HTMLOListElement, isAfterCurrentNode: boolean) {\n this.applyChainName(list);\n this.lastNumber = new VList(list).getLastItemNumber() || 0;\n\n if (isAfterCurrentNode) {\n list.dataset[AFTER_CURSOR_DATASET_NAME] = 'true';\n } else {\n this.lastNumberBeforeCursor = this.lastNumber;\n }\n }\n\n private applyChainName(list: HTMLOListElement) {\n list.dataset[CHAIN_DATASET_NAME] = this.name;\n }\n\n private getLists() {\n return queryElements(\n this.region.rootNode,\n `ol[data-${CHAIN_DATASET_NAME}=${this.name}]`\n ).filter(node => isNodeInRegion(this.region, node)) as HTMLOListElement[];\n }\n}\n\nfunction createListChainName() {\n return CHAIN_NAME_PREFIX + lastChainIndex++;\n}\n","import contains from '../utils/contains';\nimport getListTypeFromNode from './getListTypeFromNode';\nimport getStyles from '../style/getStyles';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport isBlockElement from '../utils/isBlockElement';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport setBulletListMarkers from './setBulletListMarkers';\nimport setListItemStyle from './setListItemStyle';\nimport setNumberingListMarkers from './setNumberingListMarkers';\nimport setStyles from '../style/setStyles';\nimport toArray from '../jsUtils/toArray';\nimport unwrap from '../utils/unwrap';\nimport wrap from '../utils/wrap';\nimport { createNumberDefinition, createObjectDefinition } from '../metadata/definitionCreators';\nimport { getMetadata, setMetadata } from '../metadata/metadata';\nimport {\n BulletListType,\n KnownCreateElementDataIndex,\n ListType,\n NumberingListType,\n} from 'roosterjs-editor-types';\nimport type {\n CompatibleBulletListType,\n CompatibleListType,\n CompatibleNumberingListType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst orderListStyles = [null, 'lower-alpha', 'lower-roman'];\nconst unorderedListStyles = ['disc', 'circle', 'square'];\n\nconst MARGIN_BASE = '0in 0in 0in 0.5in';\nconst NEGATIVE_MARGIN = '-.25in';\n\nconst stylesToInherit = ['font-size', 'font-family', 'color'];\nconst attrsToInherit = ['data-ogsc', 'data-ogsb', 'data-ogac', 'data-ogab'];\n\n/**\n * @internal\n * The definition for the number of BulletListType or NumberingListType\n */\nexport const ListStyleDefinitionMetadata = createObjectDefinition(\n {\n orderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n NumberingListType.Min,\n NumberingListType.Max\n ),\n unorderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n BulletListType.Min,\n BulletListType.Max\n ),\n },\n true /** isOptional */,\n true /** allowNull */\n);\n\n/**\n * @internal\n * Represents the metadata of the style of a list element\n */\nexport interface ListStyleMetadata {\n orderedStyleType?: NumberingListType | CompatibleNumberingListType;\n unorderedStyleType?: BulletListType | CompatibleBulletListType;\n}\n\n/**\n * !!! Never directly create instance of this class. It should be created within VList class !!!\n *\n * Represent a list item.\n *\n * A list item is normally wrapped using a LI tag. But this class is only a logical item,\n * it can be a LI tag, or another other type of node which means it is actually not a list item.\n * That can happen after we do \"outdent\" on a 1-level list item, then it becomes not a list item.\n */\nexport default class VListItem {\n private listTypes: (ListType | CompatibleListType)[];\n private node: HTMLLIElement;\n private dummy: boolean;\n private newListStart: number | undefined = undefined;\n\n /**\n * Construct a new instance of VListItem class\n * @param node The DOM node for this item\n * @param listTypes An array represents list types of all parent and current level.\n * Skip this parameter for a non-list item.\n */\n constructor(\n node: Node,\n ...listTypes: (\n | ListType.Ordered\n | ListType.Unordered\n | CompatibleListType.Ordered\n | CompatibleListType.Unordered\n )[]\n ) {\n if (!node) {\n throw new Error('node must not be null');\n }\n\n this.node = safeInstanceOf(node, 'HTMLLIElement')\n ? node\n : (wrap(node, KnownCreateElementDataIndex.BlockListItem) as HTMLLIElement);\n const display = this.node.style.display;\n\n this.dummy = display != 'list-item' && display != '';\n\n // Always add a None list type in front of all other types to represent non-list scenario.\n this.listTypes = [ListType.None, ...listTypes];\n }\n\n /**\n * Get type of current list item\n */\n getListType(): ListType | CompatibleListType {\n return this.listTypes[this.listTypes.length - 1];\n }\n\n /**\n * Get the levels of this list item.\n */\n getLevel(): number {\n return this.listTypes.length - 1;\n }\n\n /**\n * Get DOM node of this list item\n */\n getNode(): HTMLLIElement {\n return this.node;\n }\n\n /**\n * Get the Start Number of the new List\n */\n getNewListStart(): number | undefined {\n return this.newListStart;\n }\n\n /**\n * Check if a given node is contained by this list item\n * @param node The node to check\n */\n contains(node: Node): boolean {\n return contains(this.node, node, true /*treatSameNodeAsContain*/);\n }\n\n /**\n * Check if this item is a dummy item.\n * A dummy item is also represented by LI tag, but it won't render a bullet (for Unordered list) or a number (for Ordered list)\n * normally it has CSS style display set to a value other than \"list-item\"\n */\n isDummy() {\n return this.dummy;\n }\n\n /**\n * @deprecated Always return false\n */\n isOrphanItem(): boolean {\n return false;\n }\n\n /**\n * @deprecated\n */\n canMerge(item: VListItem): boolean {\n if (!item?.isOrphanItem() || this.listTypes.length != item.listTypes.length) {\n return false;\n }\n\n return this.listTypes.every((type, index) => item.listTypes[index] == type);\n }\n\n /**\n * @deprecated\n */\n mergeItems(items: VListItem[]) {\n const nodesToWrap = items?.map(item => item.node) || [];\n const targetNodes = wrapIfNotBlockNode(\n nodesToWrap,\n true /*checkFirst*/,\n false /*checkLast*/\n );\n targetNodes.forEach(node => this.node.appendChild(node));\n }\n\n /**\n * Indent this item\n * If this is not an list item, it will be no op\n */\n indent() {\n if (this.node.style.marginLeft == NEGATIVE_MARGIN) {\n this.node.style.margin = '';\n this.node.style.marginLeft = '';\n return;\n }\n\n const listType = this.getListType();\n if (listType != ListType.None) {\n this.listTypes.push(listType);\n }\n }\n\n /**\n * Outdent this item\n * If this item is already not an list item, it will be no op\n * @param preventItemRemoval Whether prevent the list item to be removed for the listItem by default false\n */\n outdent(preventItemRemoval: boolean = false) {\n const expectedLength = preventItemRemoval ? 2 : 1;\n if (this.listTypes.length > expectedLength) {\n this.listTypes.pop();\n }\n }\n\n /**\n * Add negative margin to the List item\n */\n addNegativeMargins() {\n this.node.style.margin = MARGIN_BASE;\n this.node.style.marginLeft = NEGATIVE_MARGIN;\n }\n\n /**\n * Change list type of this item\n * @param targetType The target list type to change to\n */\n changeListType(targetType: ListType | CompatibleListType) {\n if (targetType == ListType.None) {\n this.listTypes = [targetType];\n } else {\n this.outdent();\n this.listTypes.push(targetType);\n }\n }\n\n /**\n * Set whether the item is a dummy item\n * @param isDummy Whether the item is a dummy item\n */\n setIsDummy(isDummy: boolean) {\n this.dummy = isDummy;\n }\n\n /**\n * Set the start Number of the new list\n * @param isDummy Whether the item is a dummy item\n */\n setNewListStart(startNumber: number) {\n this.newListStart = startNumber;\n }\n\n /**\n * Apply the list style type\n * @param rootList the vList that receives the style\n * @param index the list item index\n */\n applyListStyle(rootList: HTMLOListElement | HTMLUListElement, index: number) {\n const style = getMetadata(rootList, ListStyleDefinitionMetadata);\n // The list just need to be styled if it is at top level, so the listType length for this Vlist must be 2.\n const isFirstLevel = this.listTypes.length < 3;\n if (style) {\n if (\n isFirstLevel &&\n this.listTypes[1] === ListType.Unordered &&\n style.unorderedStyleType\n ) {\n setBulletListMarkers(this.node, style.unorderedStyleType);\n } else if (\n isFirstLevel &&\n this.listTypes[1] === ListType.Ordered &&\n style.orderedStyleType\n ) {\n setNumberingListMarkers(this.node, style.orderedStyleType, index);\n } else {\n this.node.style.removeProperty('list-style-type');\n }\n }\n }\n\n /**\n * Write the change result back into DOM\n * @param listStack current stack of list elements\n * @param originalRoot Original list root element. It will be reused when write back if possible\n * @param shouldReuseAllAncestorListElements Optional - defaults to false. If true, only make\n * sure the direct parent of this list matches the list types when writing back.\n */\n writeBack(\n listStack: Node[],\n originalRoot?: HTMLOListElement | HTMLUListElement,\n shouldReuseAllAncestorListElements: boolean = false\n ) {\n let nextLevel = 1;\n\n if (shouldReuseAllAncestorListElements) {\n // Remove any un-needed lists from the stack.\n if (listStack.length > this.listTypes.length) {\n listStack.splice(this.listTypes.length);\n }\n\n // 1. If the listStack is the same length as the listTypes for this item, check\n // if the last item needs to change, and remove it if needed. We can always re-use\n // the other lists even if the type doesn't match - since the display is the same\n // as long as the list immediately surrounding the item is correct.\n const listStackEndIndex = listStack.length - 1;\n if (\n listStackEndIndex === this.listTypes.length - 1 && // they are the same length\n getListTypeFromNode(listStack[listStackEndIndex]) !==\n this.listTypes[listStackEndIndex]\n ) {\n listStack.splice(listStackEndIndex);\n }\n\n nextLevel = listStack.length;\n } else {\n // 1. Determine list elements that we can reuse\n // e.g.:\n // passed in listStack: Fragment > OL > UL > OL\n // local listTypes: null > OL > UL > UL > OL\n // then Fragment > OL > UL can be reused\n for (; nextLevel < listStack.length; nextLevel++) {\n if (getListTypeFromNode(listStack[nextLevel]) !== this.listTypes[nextLevel]) {\n listStack.splice(nextLevel);\n break;\n }\n }\n }\n\n // 2. Add new list elements\n // e.g.:\n // passed in listStack: Fragment > OL > UL\n // local listTypes: null > OL > UL > UL > OL\n // then we need to create a UL and a OL tag\n for (; nextLevel < this.listTypes.length; nextLevel++) {\n const stackLength = listStack.length - 1;\n const newList = createListElement(\n listStack[0],\n this.listTypes[nextLevel],\n nextLevel,\n originalRoot\n );\n\n listStack[stackLength].appendChild(newList);\n listStack.push(newList);\n\n //If the current node parent is in the same deep child index,\n //apply the styles of the current parent list to the new list\n if (this.getDeepChildIndex(originalRoot) == stackLength) {\n const listStyleType = this.node.parentElement?.style.listStyleType;\n if (\n listStyleType &&\n getTagOfNode(this.node.parentElement) === getTagOfNode(newList)\n ) {\n newList.style.listStyleType = listStyleType;\n }\n }\n }\n // 3. Add current node into deepest list element\n listStack[listStack.length - 1].appendChild(this.node);\n this.node.style.setProperty('display', this.dummy ? 'block' : null);\n\n // 4. Inherit styles of the child element to the li, so we are able to apply the styles to the ::marker\n if (this.listTypes.length > 1) {\n setListItemStyle(this.node, stylesToInherit, true /*isCssStyle*/);\n setListItemStyle(this.node, attrsToInherit, false /*isCssStyle*/);\n }\n\n // 5. If this is not a list item now, need to unwrap the LI node and do proper handling\n if (this.listTypes.length <= 1) {\n // If original
  • node has styles for font and color, we need to apply it to new parent\n const isLi = getTagOfNode(this.node) == 'LI';\n const stylesToApply = isLi\n ? {\n 'font-family': this.node.style.fontFamily,\n 'font-size': this.node.style.fontSize,\n color: this.node.style.color,\n }\n : undefined;\n\n const childNodes = isLi ? getChildrenAndUnwrap(this.node) : [this.node];\n\n if (stylesToApply) {\n for (let i = 0; i < childNodes.length; i++) {\n if (safeInstanceOf(childNodes[i], 'Text')) {\n childNodes[i] = wrap(childNodes[i], 'span');\n }\n\n const node = childNodes[i];\n\n if (safeInstanceOf(node, 'HTMLElement')) {\n const styles = {\n ...stylesToApply,\n ...getStyles(node),\n };\n setStyles(node, styles);\n\n attrsToInherit.forEach(attr => {\n const attrValue = this.node.getAttribute(attr);\n\n if (attrValue) {\n node.setAttribute(attr, attrValue);\n }\n });\n }\n }\n }\n\n wrapIfNotBlockNode(childNodes, true /*checkFirst*/, true /*checkLast*/);\n }\n }\n\n /**\n * Get the index of how deep is the current node parent list inside of the original root list.\n * @example In the following structure this function would return 2\n * ```html\n *
      \n *
        \n *
          \n *
        1. \n *
        \n *
      \n *
    \n * ```\n * @param originalRoot The root list\n * @returns -1 if the node does not have parent element or if original root was not provided,\n * else, how deep is the parent element inside of the original root.\n */\n private getDeepChildIndex(originalRoot: HTMLOListElement | HTMLUListElement | undefined) {\n let parentElement = this.node.parentElement;\n if (originalRoot && parentElement) {\n let deepIndex = 0;\n while (parentElement && parentElement != originalRoot) {\n deepIndex++;\n parentElement = parentElement?.parentElement || null;\n }\n return deepIndex;\n }\n return -1;\n }\n}\n\nfunction createListElement(\n newRoot: Node,\n listType: ListType | CompatibleListType,\n nextLevel: number,\n originalRoot?: HTMLOListElement | HTMLUListElement\n): HTMLOListElement | HTMLUListElement {\n const doc = newRoot.ownerDocument!;\n let result: HTMLOListElement | HTMLUListElement;\n\n // Try to reuse the existing root element\n // It can be reused when\n // 1. Current list item is level 1 (top level), AND\n // 2. Original root exists, AND\n // 3. They have the same list type AND\n // 4. The original root is not used yet\n if (nextLevel == 1 && originalRoot && listType == getListTypeFromNode(originalRoot)) {\n if (contains(newRoot, originalRoot)) {\n // If it is already used, let's clone one and remove ID to avoid duplicating ID\n result = originalRoot.cloneNode(false /*deep*/) as HTMLOListElement | HTMLUListElement;\n (result).removeAttribute('id');\n } else {\n // Remove all child nodes, they will be added back later when write back other items\n moveChildNodes(originalRoot);\n result = originalRoot;\n }\n } else {\n // Can't be reused, can't clone, let's create a new one\n result = doc.createElement(listType == ListType.Ordered ? 'ol' : 'ul');\n }\n\n // Always maintain the metadata saved in the list\n if (originalRoot && nextLevel == 1 && listType != getListTypeFromNode(originalRoot)) {\n const style = getMetadata(originalRoot, ListStyleDefinitionMetadata);\n if (style) {\n setMetadata(result, style, ListStyleDefinitionMetadata);\n }\n }\n\n if (listType == ListType.Ordered && nextLevel > 1) {\n result.style.setProperty(\n 'list-style-type',\n orderListStyles[(nextLevel - 1) % orderListStyles.length]\n );\n }\n\n if (listType == ListType.Unordered && nextLevel > 1) {\n result.style.setProperty(\n 'list-style-type',\n unorderedListStyles[(nextLevel - 1) % unorderedListStyles.length]\n );\n }\n\n return result;\n}\n\nfunction wrapIfNotBlockNode(nodes: Node[], checkFirst: boolean, checkLast: boolean): Node[] {\n if (\n nodes.length > 0 &&\n (!checkFirst || !isBlockElement(nodes[0])) &&\n (!checkLast || !isBlockElement(nodes[nodes.length]))\n ) {\n nodes = [wrap(nodes)];\n }\n\n return nodes;\n}\n\nfunction getChildrenAndUnwrap(node: Node): Node[] {\n const result = toArray(node.childNodes);\n unwrap(node);\n return result;\n}\n","const ALPHABET: Record = {\n 0: 'A',\n 1: 'B',\n 2: 'C',\n 3: 'D',\n 4: 'E',\n 5: 'F',\n 6: 'G',\n 7: 'H',\n 8: 'I',\n 9: 'J',\n 10: 'K',\n 11: 'L',\n 12: 'M',\n 13: 'N',\n 14: 'O',\n 15: 'P',\n 16: 'Q',\n 17: 'R',\n 18: 'S',\n 19: 'T',\n 20: 'U',\n 21: 'V',\n 22: 'W',\n 23: 'X',\n 24: 'Y',\n 25: 'Z',\n};\n\n/**\n * @internal\n * Convert decimal numbers into english alphabet letters\n * @param decimal The decimal number that needs to be converted\n * @param isLowerCase if true the roman value will appear in lower case\n * @returns\n */\nexport default function convertDecimalsToAlpha(decimal: number, isLowerCase?: boolean): string {\n let alpha = '';\n while (decimal >= 0) {\n alpha = ALPHABET[decimal % 26] + alpha;\n decimal = Math.floor(decimal / 26) - 1;\n }\n return isLowerCase ? alpha.toLowerCase() : alpha;\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\n\nconst RomanValues: Record = {\n M: 1000,\n CM: 900,\n D: 500,\n CD: 400,\n C: 100,\n XC: 90,\n L: 50,\n XL: 40,\n X: 10,\n IX: 9,\n V: 5,\n IV: 4,\n I: 1,\n};\n\n/**\n * @internal\n * Convert decimal numbers into roman numbers\n * @param decimal The decimal number that needs to be converted\n * @param isLowerCase if true the roman value will appear in lower case\n * @returns\n */\nexport default function convertDecimalsToRoman(decimal: number, isLowerCase?: boolean) {\n let romanValue = '';\n for (let i of getObjectKeys(RomanValues)) {\n let timesRomanCharAppear = Math.floor(decimal / RomanValues[i]);\n decimal = decimal - timesRomanCharAppear * RomanValues[i];\n romanValue = romanValue + i.repeat(timesRomanCharAppear);\n }\n return isLowerCase ? romanValue.toLocaleLowerCase() : romanValue;\n}\n","import createElement from '../utils/createElement';\nimport getRootListNode from './getRootListNode';\nimport getSelectedBlockElementsInRegion from '../region/getSelectedBlockElementsInRegion';\nimport isNodeInRegion from '../region/isNodeInRegion';\nimport Position from '../selection/Position';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport shouldSkipNode from '../utils/shouldSkipNode';\nimport toArray from '../jsUtils/toArray';\nimport VList from './VList';\nimport wrap from '../utils/wrap';\nimport { getLeafSibling } from '../utils/getLeafSibling';\nimport { isListElement } from './getListTypeFromNode';\nimport {\n KnownCreateElementDataIndex,\n ListType,\n Region,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst ListSelector = 'ol,ul';\n\n/**\n * Create a VList object from the given region.\n * @param region The region to get VList from\n * @param includeSiblingLists True to also try get lists before and after the selection and merge them together,\n * false to only include the list for the selected blocks\n * @param startNode (Optional) When specified, try get VList which will contain this node.\n * If not specified, get VList from selection of this region\n */\nexport default function createVListFromRegion(\n region: Region,\n includeSiblingLists?: boolean,\n startNode?: Node\n): VList | null {\n if (!region) {\n return null;\n }\n\n let nodes: Node[] = [];\n\n if (startNode) {\n const list = getRootListNode(region, ListSelector, startNode);\n if (list) {\n nodes.push(list);\n }\n } else {\n const blocks = getSelectedBlockElementsInRegion(\n region,\n undefined,\n true /* shouldApplyFormatToSpan */\n );\n blocks.forEach(block => {\n const list = getRootListNode(region, ListSelector, block.getStartNode());\n\n if (list) {\n if (nodes[nodes.length - 1] != list) {\n nodes.push(list);\n }\n if (\n nodes.length == 1 &&\n safeInstanceOf(list, 'HTMLOListElement') &&\n list.start > 1\n ) {\n // Do not include sibling lists if this list is not start from 1\n includeSiblingLists = false;\n }\n } else {\n nodes.push(block.collapseToSingleElement());\n }\n });\n\n if (nodes.length == 0 && !region.rootNode.firstChild) {\n const newNode = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n region.rootNode.ownerDocument\n )!;\n region.rootNode.appendChild(newNode);\n nodes.push(newNode);\n region.fullSelectionStart = new Position(newNode, PositionType.Begin);\n region.fullSelectionEnd = new Position(newNode, PositionType.End);\n }\n\n if (includeSiblingLists) {\n tryIncludeSiblingNode(region, nodes, false /*isNext*/);\n tryIncludeSiblingNode(region, nodes, true /*isNext*/);\n }\n\n nodes = nodes.filter(node => !shouldSkipNode(node, true /*ignoreSpace*/));\n }\n\n let vList: VList | null = null;\n\n if (nodes.length > 0) {\n const firstNode = nodes.shift() || null;\n vList = isListElement(firstNode)\n ? new VList(firstNode)\n : firstNode\n ? createVListFromItemNode(firstNode)\n : null;\n\n if (vList) {\n nodes.forEach(node => {\n if (isListElement(node)) {\n vList!.mergeVList(new VList(node));\n } else {\n vList!.appendItem(node, ListType.None);\n }\n });\n }\n }\n\n return vList;\n}\n\nfunction tryIncludeSiblingNode(region: Region, nodes: Node[], isNext: boolean) {\n let node: Node | null = nodes[isNext ? nodes.length - 1 : 0];\n node = getLeafSibling(region.rootNode, node, isNext, region.skipTags, true /*ignoreSpace*/);\n node = getRootListNode(region, ListSelector, node);\n if (isNodeInRegion(region, node) && isListElement(node)) {\n if (isNext) {\n if (!safeInstanceOf(node, 'HTMLOListElement') || node.start == 1) {\n // Only include sibling list when\n // 1. This is a unordered list, OR\n // 2. This list starts from 1\n nodes.push(node);\n }\n } else {\n nodes.unshift(node);\n }\n }\n}\n\nfunction createVListFromItemNode(node: Node): VList {\n // Wrap all child nodes under a single one, and put the new list under original root node\n // so that the list can carry over styles under the root node.\n const childNodes = toArray(node.childNodes);\n const nodeForItem = childNodes.length == 1 ? childNodes[0] : wrap(childNodes, 'SPAN');\n\n // Create a temporary OL root element for this list.\n const listNode = node.ownerDocument!.createElement('ol'); // Either OL or UL is ok here\n node.appendChild(listNode);\n\n // Create the VList and append items\n const vList = new VList(listNode);\n vList.appendItem(nodeForItem, ListType.None);\n\n return vList;\n}\n","import getTagOfNode from '../utils/getTagOfNode';\nimport { ListType } from 'roosterjs-editor-types';\nimport type { CompatibleListType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Get list type from a list element. The result will be either Ordered or Unordered ListType\n * @param listElement the element to get list type from\n */\nexport default function getListTypeFromNode(\n listElement: HTMLOListElement | HTMLUListElement\n):\n | ListType.Ordered\n | ListType.Unordered\n | CompatibleListType.Ordered\n | CompatibleListType.Unordered;\n\n/**\n * @internal\n * Get list type from a DOM node. It is possible to return ListType.None\n * @param node the node to get list type from\n */\nexport default function getListTypeFromNode(node: Node | null): ListType | CompatibleListType;\n\nexport default function getListTypeFromNode(node: Node | null): ListType | CompatibleListType {\n switch (getTagOfNode(node)) {\n case 'OL':\n return ListType.Ordered;\n case 'UL':\n return ListType.Unordered;\n default:\n return ListType.None;\n }\n}\n\n/**\n * @internal\n * Check if the given DOM node is a list element (OL or UL)\n * @param node The node to check\n */\nexport function isListElement(node: Node | null): node is HTMLUListElement | HTMLOListElement {\n return getListTypeFromNode(node) != ListType.None;\n}\n","import findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport { RegionBase } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * A type map from selector string to HTML element type\n */\nexport interface SelectorToTypeMap {\n ol: HTMLOListElement;\n ul: HTMLUListElement;\n 'ol,ul': HTMLOListElement | HTMLUListElement;\n}\n\n/**\n * @internal\n * Get Root list node from the given node within the given region\n * @param region Region to scope the search into\n * @param selector The selector to search\n * @param node The start node\n */\nexport default function getRootListNode(\n region: RegionBase,\n selector: TSelector,\n node: Node | null\n): SelectorToTypeMap[TSelector] {\n let list =\n region &&\n (findClosestElementAncestor(\n node,\n region.rootNode,\n selector\n ) as SelectorToTypeMap[TSelector]);\n\n if (list) {\n let ancestor: SelectorToTypeMap[TSelector];\n while (\n (ancestor = findClosestElementAncestor(\n list.parentNode,\n region.rootNode,\n selector\n ) as SelectorToTypeMap[TSelector])\n ) {\n list = ancestor;\n }\n }\n\n return list;\n}\n","import { BulletListType } from 'roosterjs-editor-types';\nimport type { CompatibleBulletListType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Set the marker of a bullet list\n * @param li\n * @param listStyleType\n */\nexport default function setBulletListMarkers(\n li: HTMLLIElement,\n listStyleType: BulletListType | CompatibleBulletListType\n) {\n const marker = bulletListStyle[listStyleType];\n const isDisc = listStyleType === BulletListType.Disc;\n li.style.listStyleType = isDisc ? marker : `\"${marker}\"`;\n}\n\nconst bulletListStyle: Record = {\n [BulletListType.Disc]: 'disc',\n [BulletListType.Square]: '∎ ',\n [BulletListType.Dash]: '- ',\n [BulletListType.LongArrow]: '➔ ',\n [BulletListType.DoubleLongArrow]: '➔ ',\n [BulletListType.ShortArrow]: '➢ ',\n [BulletListType.UnfilledArrow]: '➪ ',\n [BulletListType.Hyphen]: '— ',\n};\n","import ContentTraverser from '../contentTraverser/ContentTraverser';\nimport findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport { InlineElement } from 'roosterjs-editor-types';\n\n/**\n * Set the Style of a List Item provided, with the styles that the inline child elements have\n * If the child inline elements have different styles, it will not modify the styles of the list item\n * @param element the LI Element to set the styles\n * @param styles The styles that should be applied to the element.\n * @param isCssStyle True means the given styles are CSS style names, false means they are HTML attributes @default true\n */\nexport default function setListItemStyle(\n element: HTMLLIElement,\n styles: string[],\n isCssStyle: boolean = true\n) {\n const elementsStyles = getInlineChildElementsStyle(element, styles, isCssStyle);\n\n styles.forEach(styleName => {\n const styleValues = elementsStyles.map(style =>\n style[styleName] !== undefined ? style[styleName] : ''\n );\n\n if (\n styleValues &&\n (styleValues.length == 1 || new Set(styleValues).size == 1) &&\n styleValues[0]\n ) {\n if (isCssStyle) {\n element.style.setProperty(styleName, styleValues[0]);\n } else {\n element.setAttribute(styleName, styleValues[0]);\n }\n }\n });\n}\n\nfunction getInlineChildElementsStyle(element: HTMLElement, styles: string[], isCssStyle: boolean) {\n const result: Record[] = [];\n const contentTraverser = ContentTraverser.createBodyTraverser(element);\n let currentInlineElement: InlineElement | null = null;\n\n while (contentTraverser.currentInlineElement != currentInlineElement) {\n currentInlineElement = contentTraverser.currentInlineElement;\n let currentNode = currentInlineElement?.getContainerNode() || null;\n let currentStyle: Record | null = null;\n\n currentNode = currentNode ? findClosestElementAncestor(currentNode) : null;\n\n // we should consider of when it is the single child node of element, the parentNode's style should add\n // such as the \"i\", \"b\", \"span\" node in
  • aa
  • \n while (\n currentNode &&\n currentNode !== element &&\n safeInstanceOf(currentNode, 'HTMLElement') &&\n (result.length == 0 || (currentNode.textContent?.trim().length || 0) > 0)\n ) {\n const element: HTMLElement = currentNode;\n\n styles.forEach(styleName => {\n const styleValue = isCssStyle\n ? element.style.getPropertyValue(styleName)\n : element.getAttribute(styleName);\n\n if (!currentStyle) {\n currentStyle = {};\n }\n\n if (styleValue && !currentStyle[styleName]) {\n currentStyle[styleName] = styleValue;\n }\n });\n\n if (currentNode?.parentNode?.childNodes.length === 1) {\n currentNode = currentNode.parentNode;\n } else {\n currentNode = null;\n }\n }\n\n if (currentStyle) {\n result.push(currentStyle);\n }\n\n contentTraverser.getNextInlineElement();\n }\n\n return result;\n}\n","import convertDecimalsToAlpha from './convertDecimalsToAlpha';\nimport convertDecimalsToRoman from './convertDecimalsToRomans';\nimport { NumberingListType } from 'roosterjs-editor-types';\nimport type { CompatibleNumberingListType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\ninterface MarkerStyle {\n markerType: number;\n markerSeparator: string;\n markerSecondSeparator?: string;\n lowerCase?: boolean;\n}\n\nenum MarkerTypes {\n Decimal,\n Roman,\n Alpha,\n}\n\n/**\n * @internal\n * Set marker style of a numbering list\n * @param listStyleType\n * @param li\n */\nexport default function setNumberingListMarkers(\n li: HTMLLIElement,\n listStyleType: NumberingListType | CompatibleNumberingListType,\n level: number\n) {\n const { markerSeparator, markerSecondSeparator, markerType, lowerCase } = numberingListStyle[\n listStyleType\n ];\n\n let markerNumber = level.toString();\n if (markerType === MarkerTypes.Roman) {\n markerNumber = convertDecimalsToRoman(level, lowerCase);\n } else if (markerType === MarkerTypes.Alpha) {\n markerNumber = convertDecimalsToAlpha(level - 1, lowerCase);\n }\n\n const marker = markerSecondSeparator\n ? markerSecondSeparator + markerNumber + markerSeparator\n : markerNumber + markerSeparator;\n\n li.style.listStyleType = `\"${marker}\"`;\n}\n\nconst numberingListStyle: Record = {\n [NumberingListType.Decimal]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: '. ',\n },\n [NumberingListType.DecimalDash]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: '- ',\n },\n [NumberingListType.DecimalParenthesis]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: ') ',\n },\n [NumberingListType.DecimalDoubleParenthesis]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n },\n [NumberingListType.LowerAlpha]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '. ',\n lowerCase: true,\n },\n [NumberingListType.LowerAlphaDash]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '- ',\n lowerCase: true,\n },\n [NumberingListType.LowerAlphaParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n lowerCase: true,\n },\n [NumberingListType.LowerAlphaDoubleParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n lowerCase: true,\n },\n [NumberingListType.UpperAlpha]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '. ',\n },\n [NumberingListType.UpperAlphaDash]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '- ',\n },\n [NumberingListType.UpperAlphaParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n },\n [NumberingListType.UpperAlphaDoubleParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n },\n [NumberingListType.LowerRoman]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '. ',\n lowerCase: true,\n },\n [NumberingListType.LowerRomanDash]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '- ',\n lowerCase: true,\n },\n [NumberingListType.LowerRomanParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n lowerCase: true,\n },\n [NumberingListType.LowerRomanDoubleParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n lowerCase: true,\n },\n [NumberingListType.UpperRoman]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '. ',\n },\n [NumberingListType.UpperRomanDash]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '- ',\n },\n [NumberingListType.UpperRomanParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n },\n [NumberingListType.UpperRomanDoubleParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n },\n};\n","import {\n Definition,\n DefinitionType,\n NumberDefinition,\n ArrayDefinition,\n BooleanDefinition,\n StringDefinition,\n ObjectDefinition,\n ObjectPropertyDefinition,\n} from 'roosterjs-editor-types';\n\n/**\n * Create a number definition\n * @param isOptional Whether this property is optional\n * @param value Optional value of the number\n * @param minValue Optional minimum value\n * @param maxValue Optional maximum value\n * @param allowNull Allow the property to be null\n * @returns The number definition object\n */\nexport function createNumberDefinition(\n isOptional?: boolean,\n value?: number,\n minValue?: number,\n maxValue?: number,\n allowNull?: boolean\n): NumberDefinition {\n return {\n type: DefinitionType.Number,\n isOptional,\n value,\n maxValue,\n minValue,\n allowNull,\n };\n}\n\n/**\n * Create a boolean definition\n * @param isOptional Whether this property is optional\n * @param value Optional expected boolean value\n * @param allowNull Allow the property to be null\n * @returns The boolean definition object\n */\nexport function createBooleanDefinition(\n isOptional?: boolean,\n value?: boolean,\n allowNull?: boolean\n): BooleanDefinition {\n return {\n type: DefinitionType.Boolean,\n isOptional,\n value,\n allowNull,\n };\n}\n\n/**\n * Create a string definition\n * @param isOptional Whether this property is optional\n * @param value Optional expected string value\n * @param allowNull Allow the property to be null\n * @returns The string definition object\n */\nexport function createStringDefinition(\n isOptional?: boolean,\n value?: string,\n allowNull?: boolean\n): StringDefinition {\n return {\n type: DefinitionType.String,\n isOptional,\n value,\n allowNull,\n };\n}\n\n/**\n * Create an array definition\n * @param itemDef Definition of each item of the related array\n * @param isOptional Whether this property is optional\n * @param allowNull Allow the property to be null\n * @returns The array definition object\n */\nexport function createArrayDefinition(\n itemDef: Definition,\n isOptional?: boolean,\n minLength?: number,\n maxLength?: number,\n allowNull?: boolean\n): ArrayDefinition {\n return {\n type: DefinitionType.Array,\n isOptional,\n itemDef,\n minLength,\n maxLength,\n allowNull,\n };\n}\n\n/**\n * Create an object definition\n * @param propertyDef Definition of each property of the related object\n * @param isOptional Whether this property is optional\n * @param allowNull Allow the property to be null\n * @returns The object definition object\n */\nexport function createObjectDefinition(\n propertyDef: ObjectPropertyDefinition,\n isOptional?: boolean,\n allowNull?: boolean\n): ObjectDefinition {\n return {\n type: DefinitionType.Object,\n isOptional,\n propertyDef,\n allowNull,\n };\n}\n","import validate from './validate';\nimport { Definition } from 'roosterjs-editor-types';\n\nconst MetadataDataSetName = 'editingInfo';\n\n/**\n * Get metadata object from an HTML element\n * @param element The HTML element to get metadata object from\n * @param definition The type definition of this metadata used for validate this metadata object.\n * If not specified, no validation will be performed and always return whatever we get from the element\n * @param defaultValue The default value to return if the retrieved object cannot pass the validation,\n * or there is no metadata object at all\n * @returns The strong-type metadata object if it can be validated, or null\n */\nexport function getMetadata(\n element: HTMLElement,\n definition?: Definition,\n defaultValue?: T\n): T | null {\n const str = element.dataset[MetadataDataSetName];\n let obj: any;\n\n try {\n obj = str ? JSON.parse(str) : null;\n } catch {}\n\n if (typeof obj !== 'undefined') {\n if (!definition) {\n return obj as T;\n } else if (validate(obj, definition)) {\n return obj;\n }\n }\n\n if (defaultValue) {\n return defaultValue;\n } else {\n return null;\n }\n}\n\n/**\n * Set metadata object into an HTML element\n * @param element The HTML element to set metadata object to\n * @param metadata The metadata object to set\n * @param def An optional type definition object used for validate this metadata object.\n * If not specified, metadata will be set without validation\n * @returns True if metadata is set, otherwise false\n */\nexport function setMetadata(element: HTMLElement, metadata: T, def?: Definition): boolean {\n if (!def || validate(metadata, def)) {\n element.dataset[MetadataDataSetName] = JSON.stringify(metadata);\n return true;\n } else {\n return false;\n }\n}\n\n/**\n * Remove metadata from the given element if any\n * @param element The element to remove metadata from\n */\nexport function removeMetadata(element: HTMLElement) {\n delete element.dataset[MetadataDataSetName];\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\nimport { Definition, DefinitionType } from 'roosterjs-editor-types';\n\n/**\n * Validate the given object with a type definition object\n * @param input The object to validate\n * @param def The type definition object used for validation\n * @returns True if the object passed the validation, otherwise false\n */\nexport default function validate(input: any, def: Definition): input is T {\n let result = false;\n if ((def.isOptional && typeof input === 'undefined') || (def.allowNull && input === null)) {\n result = true;\n } else if (\n (!def.isOptional && typeof input === 'undefined') ||\n (!def.allowNull && input === null)\n ) {\n return false;\n } else {\n switch (def.type) {\n case DefinitionType.String:\n result =\n typeof input === 'string' &&\n (typeof def.value === 'undefined' || input === def.value);\n break;\n\n case DefinitionType.Number:\n result =\n typeof input === 'number' &&\n (typeof def.value === 'undefined' || areSameNumbers(def.value, input)) &&\n (typeof def.minValue === 'undefined' || input >= def.minValue) &&\n (typeof def.maxValue === 'undefined' || input <= def.maxValue);\n break;\n\n case DefinitionType.Boolean:\n result =\n typeof input === 'boolean' &&\n (typeof def.value === 'undefined' || input === def.value);\n break;\n\n case DefinitionType.Array:\n result =\n Array.isArray(input) &&\n (typeof def.minLength === 'undefined' || input.length >= def.minLength) &&\n (typeof def.maxLength === 'undefined' || input.length <= def.maxLength) &&\n input.every(x => validate(x, def.itemDef));\n break;\n\n case DefinitionType.Object:\n result =\n typeof input === 'object' &&\n getObjectKeys(def.propertyDef).every(x =>\n validate(input[x], def.propertyDef[x])\n );\n break;\n\n case DefinitionType.Customize:\n result = def.validator(input);\n break;\n }\n }\n\n return result;\n}\n\nfunction areSameNumbers(n1: number, n2: number) {\n return Math.abs(n1 - n2) < 1e-3;\n}\n","/**\n * @internal\n * Node attribute used to identify if the content is from Google Sheets.\n */\nexport const GOOGLE_SHEET_NODE_NAME = 'google-sheets-html-origin';\n/**\n * @internal\n * Name of the HTMLMeta Property that provides the Office App Source of the pasted content\n */\nexport const PROG_ID_NAME = 'ProgId';\n/**\n * @internal\n * Name of the HTMLMeta Property that identifies pated content as from Excel Desktop\n */\nexport const EXCEL_DESKTOP_ATTRIBUTE_NAME = 'xmlns:x';\n","import type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst WAC_IDENTIFY_SELECTOR =\n 'ul[class^=\"BulletListStyle\"]>.OutlineElement,ol[class^=\"NumberListStyle\"]>.OutlineElement,span.WACImageContainer';\n\n/**\n * @internal\n * Check whether the fragment provided contain Wac Elements\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst documentContainWacElements: getSourceFunction = (props: getSourceInputParams) => {\n const { fragment } = props;\n return !!fragment.querySelector(WAC_IDENTIFY_SELECTOR);\n};\nexport default documentContainWacElements;\n","import documentContainWacElements from './documentContainWacElements';\nimport isExcelDesktopDocument from './isExcelDesktopDocument';\nimport isExcelOnlineDocument from './isExcelOnlineDocument';\nimport isGoogleSheetDocument from './isGoogleSheetDocument';\nimport isPowerPointDesktopDocument from './isPowerPointDesktopDocument';\nimport isWordDesktopDocument from './isWordDesktopDocument';\nimport shouldConvertToSingleImage from './shouldConvertToSingleImage';\nimport { BeforePasteEvent, ClipboardData, KnownPasteSourceType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport type getSourceInputParams = {\n htmlAttributes: Record;\n fragment: DocumentFragment;\n shouldConvertSingleImage: boolean;\n clipboardData: ClipboardData;\n};\n\n/**\n * @internal\n */\nexport type getSourceFunction = (props: getSourceInputParams) => boolean;\n\nconst getSourceFunctions = new Map([\n [KnownPasteSourceType.WordDesktop, isWordDesktopDocument],\n [KnownPasteSourceType.ExcelDesktop, isExcelDesktopDocument],\n [KnownPasteSourceType.ExcelOnline, isExcelOnlineDocument],\n [KnownPasteSourceType.PowerPointDesktop, isPowerPointDesktopDocument],\n [KnownPasteSourceType.WacComponents, documentContainWacElements],\n [KnownPasteSourceType.GoogleSheets, isGoogleSheetDocument],\n [KnownPasteSourceType.SingleImage, shouldConvertToSingleImage],\n]);\n\n/**\n * This function tries to get the source of the Pasted content\n * @param event the before paste event\n * @param shouldConvertSingleImage Whether convert single image is enabled.\n * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}\n */\nexport default function getPasteSource(\n event: BeforePasteEvent,\n shouldConvertSingleImage: boolean\n): KnownPasteSourceType {\n const { htmlAttributes, clipboardData, fragment } = event;\n\n let result: KnownPasteSourceType | null = null;\n const param: getSourceInputParams = {\n htmlAttributes,\n fragment,\n shouldConvertSingleImage,\n clipboardData,\n };\n\n getSourceFunctions.forEach((func, key) => {\n if (!result && func(param)) {\n result = key;\n }\n });\n\n return result ?? KnownPasteSourceType.Default;\n}\n","import { EXCEL_DESKTOP_ATTRIBUTE_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isExcelDesktopDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { htmlAttributes } = props;\n // The presence of this attribute confirms its origin from Excel Desktop\n return htmlAttributes[EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;\n};\nexport default isExcelDesktopDocument;\n","import { EXCEL_DESKTOP_ATTRIBUTE_NAME, PROG_ID_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\n// Excel Desktop also has this attribute\nconst EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Online documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isExcelOnlineDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { htmlAttributes } = props;\n // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version\n return (\n htmlAttributes[PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&\n htmlAttributes[EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined\n );\n};\nexport default isExcelOnlineDocument;\n","import { GOOGLE_SHEET_NODE_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment provided contain elements from Google sheets\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isGoogleSheetDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { fragment } = props;\n return !!fragment.querySelector(GOOGLE_SHEET_NODE_NAME);\n};\n\nexport default isGoogleSheetDocument;\n","import { PROG_ID_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isPowerPointDesktopDocument: getSourceFunction = (props: getSourceInputParams) => {\n return props.htmlAttributes[PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\n};\nexport default isPowerPointDesktopDocument;\n","import { PROG_ID_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\nconst WORD_PROG_ID = 'Word.Document';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Word Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isWordDesktopDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { htmlAttributes } = props;\n return (\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\n htmlAttributes[PROG_ID_NAME] == WORD_PROG_ID\n );\n};\n\nexport default isWordDesktopDocument;\n","import type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment only contains a single image to paste\n * and the editor have the ConvertSingleImageBody Experimental feature\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst shouldConvertToSingleImage: getSourceFunction = (props: getSourceInputParams) => {\n const { shouldConvertSingleImage, clipboardData } = props;\n return (\n shouldConvertSingleImage &&\n clipboardData.htmlFirstLevelChildTags?.length == 1 &&\n clipboardData.htmlFirstLevelChildTags[0] == 'IMG'\n );\n};\n\nexport default shouldConvertToSingleImage;\n","import collapseNode from '../utils/collapseNodes';\nimport isNodeInRegion from './isNodeInRegion';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport { BlockElement, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Collapse nodes within this region to their common ancestor node under this region\n * @param region The region to collapse nodes in.\n * @param nodesOrBlockElements Nodes or block elements to collapse. When take BlockElement[] as input,\n * start node of the first BlockElement and end node of the last BlockElement will be used as the nodes.\n * All nodes not contained by the given region will be ignored.\n */\nexport default function collapseNodesInRegion(\n region: RegionBase,\n nodesOrBlockElements: Node[] | BlockElement[]\n): Node[] {\n if (!nodesOrBlockElements || nodesOrBlockElements.length == 0) {\n return [];\n }\n\n let nodes = safeInstanceOf(nodesOrBlockElements[0], 'Node')\n ? nodesOrBlockElements\n : [\n nodesOrBlockElements[0].getStartNode(),\n (nodesOrBlockElements[nodesOrBlockElements.length - 1]).getEndNode(),\n ];\n\n nodes = nodes && nodes.filter(node => isNodeInRegion(region, node));\n\n const firstNode = nodes[0];\n const lastNode = nodes[nodes.length - 1];\n\n if (isNodeInRegion(region, firstNode) && isNodeInRegion(region, lastNode)) {\n return collapseNode(region.rootNode, firstNode, lastNode, true /*canSplitParent*/);\n } else {\n return [];\n }\n}\n","import contains from '../utils/contains';\nimport findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport Position from '../selection/Position';\nimport queryElements from '../utils/queryElements';\nimport { getNextLeafSibling, getPreviousLeafSibling } from '../utils/getLeafSibling';\nimport { QueryScope, Region, RegionType } from 'roosterjs-editor-types';\nimport type { CompatibleRegionType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\ninterface RegionTypeData {\n /**\n * Tags that child elements will be skipped\n */\n skipTags: string[];\n\n /**\n * Selector of outer node of a region\n */\n outerSelector: string;\n\n /**\n * Selector of inner node of a region\n */\n innerSelector: string;\n}\n\nconst regionTypeData: Record = {\n [RegionType.Table]: {\n skipTags: ['TABLE'],\n outerSelector: 'table',\n innerSelector: 'td,th',\n },\n};\n\n/**\n * Get regions impacted by the given range under the root node\n * @param root Root node to get regions from\n * @param range A selection range. Regions will be created according to this range. Each region will be\n * fully or partially covered by this range.\n * @param type Type of region. Currently we only support TABLE region.\n */\nexport default function getRegionsFromRange(\n root: HTMLElement,\n range: Range,\n type: RegionType | CompatibleRegionType\n): Region[] {\n let regions: Region[] = [];\n if (root && range) {\n const { innerSelector, skipTags } = regionTypeData[type];\n const boundaryTree = buildBoundaryTree(root, range, type);\n const start = findClosestElementAncestor(range.startContainer, root, innerSelector) || root;\n const end = findClosestElementAncestor(range.endContainer, root, innerSelector) || root;\n const creator = getRegionCreator(range, skipTags);\n [regions] = iterateNodes(creator, boundaryTree, start, end);\n }\n\n return regions.filter(r => !!r);\n}\n\n/**\n * @internal export for test only\n */\nexport function getRegionCreator(\n fullRange: Range,\n skipTags: string[]\n): (rootNode: HTMLElement, nodeBefore?: Node, nodeAfter?: Node) => Region | null {\n const fullSelectionStart = Position.getStart(fullRange).normalize();\n const fullSelectionEnd = Position.getEnd(fullRange).normalize();\n return (rootNode: HTMLElement, nodeBefore?: Node, nodeAfter?: Node) => {\n return areNodesValid(rootNode, nodeBefore, nodeAfter, skipTags)\n ? {\n rootNode,\n nodeBefore,\n nodeAfter,\n skipTags,\n fullSelectionStart,\n fullSelectionEnd,\n }\n : null;\n };\n}\n\n/**\n * This is a internal data structure used for build regions.\n * We firstly split the selection by some boundaries, then we can build region from these boundaries.\n */\ninterface Boundary {\n /**\n * inner node of this boundary\n */\n innerNode: HTMLElement;\n\n /**\n * Children of this boundary\n */\n children: {\n /**\n * Outer node of a boundary child\n */\n outerNode: Node;\n\n /**\n * Child boundaries\n */\n boundaries: Boundary[];\n }[];\n}\n\n/**\n * Step 1: Build boundary tree\n * @param root Root node of the whole scope, normally this will be the root of editable scope\n * @param range Existing selected full range\n * @param type Type of region to create\n */\nfunction buildBoundaryTree(\n root: HTMLElement,\n range: Range,\n type: RegionType | CompatibleRegionType\n): Boundary {\n const allBoundaries: Boundary[] = [{ innerNode: root, children: [] }];\n const { outerSelector, innerSelector } = regionTypeData[type];\n const inSelectionOuterNode = queryElements(\n root,\n outerSelector,\n null /*callback*/,\n QueryScope.InSelection,\n range\n );\n\n // According to https://www.w3.org/TR/selectors-api/#queryselectorall, the result of querySelectorAll\n // is in document order, which is what we expect. So we don't need to sort the result here.\n queryElements(\n root,\n innerSelector,\n thisInnerNode => {\n const thisOuterNode = findClosestElementAncestor(thisInnerNode, root, outerSelector);\n if (thisOuterNode && inSelectionOuterNode.indexOf(thisOuterNode) < 0) {\n const boundary: Boundary = { innerNode: thisInnerNode, children: [] };\n\n for (let i = allBoundaries.length - 1; i >= 0; i--) {\n const { innerNode, children } = allBoundaries[i];\n if (contains(innerNode, thisOuterNode)) {\n let child = children.filter(c => c.outerNode == thisOuterNode)[0];\n\n if (!child) {\n child = { outerNode: thisOuterNode, boundaries: [] };\n children.push(child);\n }\n\n child.boundaries.push(boundary);\n break;\n }\n }\n allBoundaries.push(boundary);\n }\n },\n QueryScope.OnSelection,\n range\n );\n\n return allBoundaries[0];\n}\n\n/**\n * Step 2: Recursively iterate all boundaries and create regions\n * @param creator A region creator function to help create region\n * @param boundary Current root boundary\n * @param start A node where full range start from. This may not be the direct node container of range.startContainer.\n * It is the nearest ancestor which satisfies the InnerSelector of the given region type\n * @param end A node where full range end from. This may not be the direct node container of range.endContainer.\n * It is the nearest ancestor which satisfies the InnerSelector of the given region type\n * @param started Whether we have already hit the start node\n */\nfunction iterateNodes(\n creator: (rootNode: HTMLElement, nodeBefore?: Node, nodeAfter?: Node) => Region | null,\n boundary: Boundary,\n start: Node,\n end: Node,\n started?: boolean\n): [Region[], boolean, boolean] {\n started = started || boundary.innerNode == start;\n let ended = false;\n const { children, innerNode } = boundary;\n let regions: Region[] = [];\n\n if (children.length == 0) {\n const region = creator(innerNode);\n if (region) {\n regions.push(region);\n }\n } else {\n // Need to run one more time to add region after all children\n for (let i = 0; i <= children.length && !ended; i++) {\n const { outerNode, boundaries } = children[i] || {};\n const previousOuterNode = children[i - 1]?.outerNode;\n if (started) {\n const region = creator(innerNode, previousOuterNode, outerNode);\n if (region) {\n regions.push(region);\n }\n }\n\n boundaries?.forEach(child => {\n let newRegions: Region[];\n [newRegions, started, ended] = iterateNodes(creator, child, start, end, started);\n regions = regions.concat(newRegions);\n });\n }\n }\n\n return [regions, started, ended || innerNode == end];\n}\n\n/**\n * Check if the given nodes combination is valid to create a region.\n * A combination is valid when:\n * 1. Root node is not null and is not empty. And\n * 2. For nodeBefore and nodeAfter, each of them should be either null or contained by root node. And\n * 3. If none of nodeBefore and nodeAfter is null, the should not contain each other, and there should be\n * node between them.\n * @param root Root node of region\n * @param nodeBefore The boundary node before the region under root\n * @param nodeAfter The boundary node after the region under root\n * @param skipTags Tags to skip\n */\nfunction areNodesValid(\n root: Node,\n nodeBefore: Node | undefined,\n nodeAfter: Node | undefined,\n skipTags: string[]\n) {\n if (!root) {\n return false;\n } else {\n const firstNodeOfRegion = nodeBefore && getNextLeafSibling(root, nodeBefore, skipTags);\n const lastNodeOfRegion = nodeAfter && getPreviousLeafSibling(root, nodeAfter, skipTags);\n const firstNodeValid =\n !nodeBefore || (contains(root, nodeBefore) && contains(root, firstNodeOfRegion));\n const lastNodeValid =\n !nodeAfter || (contains(root, nodeAfter) && contains(root, lastNodeOfRegion));\n const bothValid =\n !nodeBefore ||\n !nodeAfter ||\n (!contains(nodeBefore, nodeAfter, true /*treatSameAsContain*/) &&\n !contains(nodeBefore, lastNodeOfRegion, true /*treatSameAsContain*/) &&\n !contains(nodeAfter, nodeBefore, true /*treatSameAsContain*/) &&\n !contains(nodeAfter, firstNodeOfRegion, true /*treatSameAsContain*/));\n return firstNodeValid && lastNodeValid && bothValid;\n }\n}\n","import ContentTraverser from '../contentTraverser/ContentTraverser';\nimport createElement from '../utils/createElement';\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\nimport getSelectionRangeInRegion from './getSelectionRangeInRegion';\nimport shouldSkipNode from '../utils/shouldSkipNode';\nimport { BlockElement, KnownCreateElementDataIndex, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Get all block elements covered by the selection under this region\n * @param regionBase The region to get block elements from\n * @param createBlockIfEmpty When set to true, a new empty block element will be created if there is not\n * any blocks in the region. Default value is false\n * @param deprecated Deprecated parameter, not used\n */\nexport default function getSelectedBlockElementsInRegion(\n regionBase: RegionBase,\n createBlockIfEmpty?: boolean,\n deprecated?: boolean\n): BlockElement[] {\n const range = getSelectionRangeInRegion(regionBase);\n let blocks: BlockElement[] = [];\n\n if (range) {\n const { rootNode, skipTags } = regionBase;\n const traverser = ContentTraverser.createSelectionTraverser(rootNode, range, skipTags);\n\n for (\n let block = traverser?.currentBlockElement;\n !!block;\n block = traverser.getNextBlockElement()\n ) {\n blocks.push(block);\n }\n\n // Remove meaningless nodes\n blocks = blocks.filter(block => {\n const startNode = block.getStartNode();\n const endNode = block.getEndNode();\n\n if (startNode == endNode && shouldSkipNode(startNode, true /*ignoreSpace*/)) {\n startNode.parentNode?.removeChild(startNode);\n return false;\n } else {\n return true;\n }\n });\n }\n\n if (blocks.length == 0 && regionBase && !regionBase.rootNode.firstChild && createBlockIfEmpty) {\n const newNode = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n regionBase.rootNode.ownerDocument\n );\n regionBase.rootNode.appendChild(newNode!);\n\n const block = getBlockElementAtNode(regionBase.rootNode, newNode);\n\n if (block) {\n blocks.push(block);\n }\n }\n\n return blocks;\n}\n","import createRange from '../selection/createRange';\nimport Position from '../selection/Position';\nimport { getNextLeafSibling, getPreviousLeafSibling } from '../utils/getLeafSibling';\nimport { Region, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Get the selection range in the given region.\n * The original range can cover multiple regions, this function will narrow the original selection\n * of a region into current region\n * @param regionBase The region to get range from\n */\nexport default function getSelectionRangeInRegion(regionBase: RegionBase): Range | null {\n if (!regionBase) {\n return null;\n }\n\n const { nodeBefore, nodeAfter, rootNode, skipTags } = regionBase;\n const startNode = nodeBefore\n ? getNextLeafSibling(regionBase.rootNode, nodeBefore, regionBase.skipTags)\n : rootNode.firstChild;\n const endNode = nodeAfter\n ? getPreviousLeafSibling(rootNode, nodeAfter, skipTags)\n : rootNode.lastChild;\n const regionRange = startNode && endNode && createRange(startNode, endNode);\n\n if (!isRegion(regionBase)) {\n return regionRange;\n } else if (regionRange) {\n const regionStart = Position.getStart(regionRange).normalize();\n const regionEnd = Position.getEnd(regionRange).normalize();\n const { fullSelectionEnd, fullSelectionStart } = regionBase;\n\n if (!fullSelectionStart.isAfter(regionEnd) && !regionStart.isAfter(fullSelectionEnd)) {\n const start = fullSelectionStart.isAfter(regionStart)\n ? fullSelectionStart\n : regionStart;\n const end = fullSelectionEnd.isAfter(regionEnd) ? regionEnd : fullSelectionEnd;\n\n return createRange(start, end);\n }\n }\n\n return null;\n}\n\nfunction isRegion(regionBase: RegionBase): regionBase is Region {\n const region = regionBase as Region;\n return !!region.fullSelectionEnd && !!region.fullSelectionStart;\n}\n","import contains from '../utils/contains';\nimport { DocumentPosition, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Check if a given node is contained by the given region\n * @param region The region to check from\n * @param node The node or block element to check\n */\nexport default function isNodeInRegion(region: RegionBase, node: Node): boolean {\n return !!(\n region &&\n contains(region.rootNode, node) &&\n (!region.nodeBefore ||\n region.nodeBefore.compareDocumentPosition(node) == DocumentPosition.Following) &&\n (!region.nodeAfter ||\n region.nodeAfter.compareDocumentPosition(node) == DocumentPosition.Preceding)\n );\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport contains from '../utils/contains';\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\nimport getPredefinedCssForElement from '../htmlSanitizer/getPredefinedCssForElement';\nimport getStyles from '../style/getStyles';\nimport isNodeInRegion from './isNodeInRegion';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport setStyles from '../style/setStyles';\nimport { BlockElement, RegionBase } from 'roosterjs-editor-types';\nimport { collapse } from '../utils/collapseNodes';\n\n/**\n * Merge a BlockElement of given node after another node\n * @param region Region to operate in\n * @param refNode The node to merge after\n * @param targetNode The node of target block element\n */\nexport default function mergeBlocksInRegion(region: RegionBase, refNode: Node, targetNode: Node) {\n let block: BlockElement | null;\n\n if (\n !isNodeInRegion(region, refNode) ||\n !isNodeInRegion(region, targetNode) ||\n !(block = getBlockElementAtNode(region.rootNode, targetNode)) ||\n block.contains(refNode)\n ) {\n return;\n }\n\n const blockRoot = block.collapseToSingleElement();\n const commonContainer = collapse(\n region.rootNode,\n blockRoot,\n refNode,\n false /*isStart*/,\n true /*canSplitParent*/\n );\n\n // Copy styles of parent nodes into blockRoot\n for (let node: Node | null = blockRoot; contains(commonContainer, node); ) {\n const parent: Node | null = node!.parentNode;\n if (safeInstanceOf(parent, 'HTMLElement')) {\n const styles = {\n ...(getPredefinedCssForElement(parent) || {}),\n ...getStyles(parent),\n ...getStyles(blockRoot),\n };\n setStyles(blockRoot, styles);\n }\n node = parent;\n }\n\n let nodeToRemove: Node | null = null;\n let nodeToMerge =\n blockRoot.childNodes.length == 1 && blockRoot.attributes.length == 0\n ? blockRoot.firstChild!\n : changeElementTag(blockRoot, 'SPAN')!;\n\n // Remove empty node\n for (\n let node: Node | null = nodeToMerge;\n contains(commonContainer, node) && node.parentNode?.childNodes.length == 1;\n node = node!.parentNode\n ) {\n // If the only child is the one which is about to be removed, this node should also be removed\n nodeToRemove = node.parentNode;\n }\n\n // Finally, merge blocks, and remove empty nodes\n refNode.parentNode?.insertBefore(nodeToMerge, refNode.nextSibling);\n nodeToRemove?.parentNode?.removeChild(nodeToRemove);\n}\n","import findClosestElementAncestor from '../utils/findClosestElementAncestor';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport { NodePosition, NodeType, PositionType } from 'roosterjs-editor-types';\r\nimport type { CompatiblePositionType } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Represent a position in DOM tree by the node and its offset index\r\n */\r\nexport default class Position implements NodePosition {\r\n readonly node: Node;\r\n readonly element: HTMLElement;\r\n readonly offset: number;\r\n readonly isAtEnd: boolean;\r\n\r\n /**\r\n * Clone and validate a position from existing position.\r\n * If the given position has invalid offset, this function will return a corrected value.\r\n * @param position The original position to clone from\r\n */\r\n constructor(position: NodePosition);\r\n\r\n /**\r\n * Create a Position from node and an offset number\r\n * @param node The node of this position\r\n * @param offset Offset of this position\r\n * @param isFromEndOfRange Whether this position is created from end of a range. An position\r\n * created from end of range has different behavior when normalize, it will use the child node\r\n * before current position if any as a deeper level node and set isAtEnd to true.\r\n */\r\n constructor(node: Node, offset: number, isFromEndOfRange?: boolean);\r\n\r\n /**\r\n * Create a Position from node and a type of position\r\n * @param node The node of this position\r\n * @param positionType Type of the position, can be Begin, End, Before, After\r\n */\r\n constructor(node: Node, positionType: PositionType | CompatiblePositionType);\r\n\r\n constructor(\r\n nodeOrPosition: Node | NodePosition,\r\n offsetOrPosType: number = 0,\r\n private readonly isFromEndOfRange?: boolean\r\n ) {\r\n if ((nodeOrPosition).node) {\r\n this.node = (nodeOrPosition).node;\r\n offsetOrPosType = (nodeOrPosition).offset;\r\n } else {\r\n this.node = nodeOrPosition;\r\n }\r\n\r\n switch (offsetOrPosType) {\r\n case PositionType.Before:\r\n this.offset = getIndexOfNode(this.node);\r\n this.node = this.node.parentNode!; // TODO: how to handle parentNode is null?\r\n this.isAtEnd = false;\r\n break;\r\n\r\n case PositionType.After:\r\n this.offset = getIndexOfNode(this.node) + 1;\r\n this.isAtEnd = !this.node.nextSibling;\r\n this.node = this.node.parentNode!; // TODO: how to handle parentNode is null?\r\n break;\r\n\r\n case PositionType.End:\r\n this.offset = getEndOffset(this.node);\r\n this.isAtEnd = true;\r\n break;\r\n\r\n default:\r\n let endOffset = getEndOffset(this.node);\r\n this.offset = Math.max(0, Math.min(offsetOrPosType, endOffset));\r\n this.isAtEnd = offsetOrPosType > 0 && offsetOrPosType >= endOffset;\r\n break;\r\n }\r\n\r\n this.element = findClosestElementAncestor(this.node)!; // TODO: how to handle parent element is null?\r\n }\r\n\r\n /**\r\n * Normalize this position to the leaf node, return the normalize result.\r\n * If current position is already using leaf node, return this position object itself\r\n */\r\n normalize(): NodePosition {\r\n if (this.node.nodeType == NodeType.Text || !this.node.firstChild) {\r\n return this;\r\n }\r\n\r\n let node = this.node;\r\n let newOffset: number | PositionType.Begin | PositionType.End = this.isAtEnd\r\n ? PositionType.End\r\n : this.offset;\r\n while (node.nodeType == NodeType.Element || node.nodeType == NodeType.DocumentFragment) {\r\n const nextNode = this.isFromEndOfRange\r\n ? newOffset == PositionType.End\r\n ? node.lastChild\r\n : node.childNodes[newOffset - 1]\r\n : newOffset == PositionType.Begin\r\n ? node.firstChild\r\n : newOffset == PositionType.End\r\n ? node.lastChild\r\n : node.childNodes[newOffset];\r\n\r\n if (nextNode) {\r\n node = nextNode;\r\n newOffset =\r\n this.isAtEnd || this.isFromEndOfRange ? PositionType.End : PositionType.Begin;\r\n } else {\r\n break;\r\n }\r\n }\r\n return new Position(node, newOffset, this.isFromEndOfRange);\r\n }\r\n\r\n /**\r\n * Check if this position is equal to the given position\r\n * @param position The position to check\r\n */\r\n equalTo(position: NodePosition): boolean {\r\n return (\r\n position &&\r\n (this == position ||\r\n (this.node == position.node &&\r\n this.offset == position.offset &&\r\n this.isAtEnd == position.isAtEnd))\r\n );\r\n }\r\n\r\n /**\r\n * Checks if this position is after the given position\r\n */\r\n isAfter(position: NodePosition): boolean {\r\n return this.node == position.node\r\n ? (this.isAtEnd && !position.isAtEnd) || this.offset > position.offset\r\n : isNodeAfter(this.node, position.node);\r\n }\r\n\r\n /**\r\n * Move this position with offset, returns a new position with a valid offset in the same node\r\n * @param offset Offset to move with\r\n */\r\n move(offset: number) {\r\n return new Position(this.node, Math.max(this.offset + offset, 0));\r\n }\r\n\r\n /**\r\n * Get start position of the given Range\r\n * @param range The range to get position from\r\n */\r\n static getStart(range: Range) {\r\n return new Position(range.startContainer, range.startOffset);\r\n }\r\n\r\n /**\r\n * Get end position of the given Range\r\n * @param range The range to get position from\r\n */\r\n static getEnd(range: Range) {\r\n // For collapsed range, always return the same value of start container to make sure\r\n // end position is not before start position\r\n return range.collapsed\r\n ? Position.getStart(range)\r\n : new Position(range.endContainer, range.endOffset, true /*isFromEndOfRange*/);\r\n }\r\n}\r\n\r\nfunction getIndexOfNode(node: Node | null): number {\r\n let i = 0;\r\n while ((node = node?.previousSibling || null)) {\r\n i++;\r\n }\r\n return i;\r\n}\r\n\r\nfunction getEndOffset(node: Node): number {\r\n if (node.nodeType == NodeType.Text) {\r\n return node.nodeValue?.length || 0;\r\n } else if (node.nodeType == NodeType.Element || node.nodeType == NodeType.DocumentFragment) {\r\n return node.childNodes.length;\r\n } else {\r\n return 1;\r\n }\r\n}\r\n","import { Browser } from '../utils/Browser';\n\n/**\n * Add the given range into selection of the given document\n * @param range The range to select\n * @param skipSameRange When set to true, do nothing if the given range is the same with current selection,\n * otherwise it will always remove current selection range and set to the given one.\n * This parameter is always treat as true in Edge to avoid some weird runtime exception.\n */\nexport default function addRangeToSelection(range: Range, skipSameRange?: boolean) {\n const selection = range?.commonAncestorContainer?.ownerDocument?.defaultView?.getSelection();\n if (selection) {\n let needAddRange = true;\n\n if (selection.rangeCount > 0) {\n // Workaround IE exception 800a025e\n try {\n let currentRange: Range | null = null;\n // Do not remove/add range if current selection is the same with target range\n // Without this check, execCommand() may fail in Edge since we changed the selection\n if (\n (skipSameRange || Browser.isEdge) &&\n (currentRange = selection.rangeCount == 1 ? selection.getRangeAt(0) : null) &&\n currentRange.startContainer == range.startContainer &&\n currentRange.startOffset == range.startOffset &&\n currentRange.endContainer == range.endContainer &&\n currentRange.endOffset == range.endOffset\n ) {\n needAddRange = false;\n } else {\n selection.removeAllRanges();\n }\n } catch (e) {}\n }\n\n if (needAddRange) {\n selection.addRange(range);\n }\n }\n}\n","import isVoidHtmlElement from '../utils/isVoidHtmlElement';\r\nimport Position from './Position';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport { NodePosition, NodeType, PositionType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Create a range around the given node(s)\r\n * @param startNode The start node to create range from\r\n * @param endNode The end node to create range from. If specified, the range will start before startNode and\r\n * end after endNode, otherwise, the range will start before and end after the start node\r\n * @returns A range start before the given node and end after the given node\r\n */\r\nexport default function createRange(startNode: Node, endNode?: Node): Range;\r\n\r\n/**\r\n * Create a collapsed range at the given node and offset\r\n * @param node The container node of the range\r\n * @param offset The offset of the range, can be a number or value of PositionType\r\n * @returns A range at the given node and offset\r\n */\r\nexport default function createRange(node: Node, offset: number | PositionType): Range;\r\n\r\n/**\r\n * Create a range with the given start/end container node and offset\r\n * @param startNode The start container node of the range\r\n * @param startOffset The start offset of the range\r\n * @param endNode The end container node of the range\r\n * @param endOffset The end offset of the range\r\n * @returns A range at the given start/end container node and offset\r\n */\r\nexport default function createRange(\r\n startNode: Node,\r\n startOffset: number | PositionType,\r\n endNode: Node,\r\n endOffset: number | PositionType\r\n): Range;\r\n\r\n/**\r\n * Create a range under the given rootNode with start and end selection paths\r\n * @param rootNode The root node that the selection paths start from\r\n * @param startPath The selection path of the start position of the range\r\n * @param endPath The selection path of the end position of the range\r\n * @returns A range with the given start and end selection paths\r\n */\r\nexport default function createRange(rootNode: Node, startPath: number[], endPath?: number[]): Range;\r\n\r\n/**\r\n * Create a range with the start and end position\r\n * @param startPosition The start position of the range\r\n * @param endPosition The end position of the range, if not specified, the range will be collapsed at start position\r\n * @returns A range start at startPosition, end at endPosition, or startPosition when endPosition is not specified\r\n */\r\nexport default function createRange(startPosition: NodePosition, endPosition?: NodePosition): Range;\r\n\r\nexport default function createRange(\r\n arg1: Node | NodePosition,\r\n arg2?: number | number[] | Node | NodePosition,\r\n arg3?: Node | number[],\r\n arg4?: number\r\n): Range | null {\r\n let start: NodePosition | null = null;\r\n let end: NodePosition | null = null;\r\n\r\n if (isNodePosition(arg1)) {\r\n // function createRange(startPosition: NodePosition, endPosition?: NodePosition): Range;\r\n start = arg1;\r\n end = isNodePosition(arg2) ? arg2 : null;\r\n } else if (safeInstanceOf(arg1, 'Node')) {\r\n if (Array.isArray(arg2)) {\r\n // function createRange(rootNode: Node, startPath: number[], endPath?: number[]): Range;\r\n start = getPositionFromPath(arg1, arg2);\r\n end = Array.isArray(arg3) ? getPositionFromPath(arg1, arg3) : null;\r\n } else if (typeof arg2 == 'number') {\r\n // function createRange(node: Node, offset: number | PositionType): Range;\r\n // function createRange(startNode: Node, startOffset: number | PositionType, endNode: Node, endOffset: number | PositionType): Range;\r\n start = new Position(arg1, arg2);\r\n end = safeInstanceOf(arg3, 'Node') ? new Position(arg3, arg4!) : null;\r\n } else if (safeInstanceOf(arg2, 'Node') || !arg2) {\r\n // function createRange(startNode: Node, endNode?: Node): Range;\r\n start = new Position(arg1, PositionType.Before);\r\n end = new Position(arg2 || arg1, PositionType.After);\r\n }\r\n }\r\n\r\n if (start?.node?.ownerDocument) {\r\n let range = start.node.ownerDocument.createRange();\r\n start = getFocusablePosition(start);\r\n end = getFocusablePosition(end || start);\r\n range.setStart(start.node, start.offset);\r\n range.setEnd(end.node, end.offset);\r\n\r\n return range;\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Convert to focusable position\r\n * If current node is a void element, we need to move up one level to put cursor outside void element\r\n */\r\nfunction getFocusablePosition(position: NodePosition) {\r\n return position.node.nodeType == NodeType.Element && isVoidHtmlElement(position.node)\r\n ? new Position(position.node, position.isAtEnd ? PositionType.After : PositionType.Before)\r\n : position;\r\n}\r\n\r\nfunction isNodePosition(arg: any): arg is NodePosition {\r\n return arg && arg.node;\r\n}\r\n\r\nfunction getPositionFromPath(node: Node, path: number[]): NodePosition | null {\r\n if (!node || !path) {\r\n return null;\r\n }\r\n\r\n // Iterate with a for loop to avoid mutating the passed in element path stack\r\n // or needing to copy it.\r\n let offset: number = 0;\r\n\r\n for (let i = 0; i < path.length; i++) {\r\n offset = path[i];\r\n if (\r\n i < path.length - 1 &&\r\n node &&\r\n node.nodeType == NodeType.Element &&\r\n node.childNodes.length > offset\r\n ) {\r\n node = node.childNodes[offset];\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return new Position(node, offset);\r\n}\r\n","import getInnerHTML from '../utils/getInnerHTML';\nimport getSelectionPath from './getSelectionPath';\n\n/**\n * Get inner Html of a root node with a selection path which can be used for restore selection.\n * The result string can be used by setHtmlWithSelectionPath() to restore the HTML and selection.\n * @param rootNode Root node to get inner Html from\n * @param range The range of selection. If pass null, no selection path will be added\n * @returns Inner HTML of the root node, followed by HTML comment contains selection path if the given range is valid\n */\nexport default function getHtmlWithSelectionPath(\n rootNode: HTMLElement | DocumentFragment,\n range: Range | null\n): string {\n if (!rootNode) {\n return '';\n }\n\n const content = getInnerHTML(rootNode);\n const selectionPath = range && getSelectionPath(rootNode, range);\n\n return selectionPath ? `${content}` : content;\n}\n","import createElement from '../utils/createElement';\r\nimport createRange from './createRange';\r\nimport normalizeRect from '../utils/normalizeRect';\r\nimport { NodePosition, NodeType, Rect } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get bounding rect of this position\r\n * @param position The position to get rect from\r\n */\r\nexport default function getPositionRect(position: NodePosition): Rect | null {\r\n if (!position) {\r\n return null;\r\n }\r\n\r\n let range = createRange(position);\r\n\r\n // 1) try to get rect using range.getBoundingClientRect()\r\n let rect: Rect | null =\r\n range.getBoundingClientRect && normalizeRect(range.getBoundingClientRect());\r\n\r\n if (rect) {\r\n return rect;\r\n }\r\n\r\n // 2) try to get rect using range.getClientRects\r\n position = position.normalize();\r\n const rects = range.getClientRects && range.getClientRects();\r\n rect = rects && rects.length == 1 ? normalizeRect(rects[0]) : null;\r\n if (rect) {\r\n return rect;\r\n }\r\n\r\n // 3) if node is text node, try inserting a SPAN and get the rect of SPAN for others\r\n if (position.node.nodeType == NodeType.Text && position.node.ownerDocument) {\r\n const span = createElement(\r\n { tag: 'span', children: ['\\u200b'] },\r\n position.node.ownerDocument\r\n );\r\n range = createRange(position);\r\n range.insertNode(span!);\r\n rect = span!.getBoundingClientRect && normalizeRect(span!.getBoundingClientRect());\r\n span!.parentNode?.removeChild(span!);\r\n if (rect) {\r\n return rect;\r\n }\r\n }\r\n\r\n // 4) try getBoundingClientRect on element\r\n let element = position.element;\r\n if (element && element.getBoundingClientRect) {\r\n rect = normalizeRect(element.getBoundingClientRect());\r\n if (rect) {\r\n return rect;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","import contains from '../utils/contains';\r\nimport Position from './Position';\r\nimport { NodePosition, NodeType, SelectionPath } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get path of the given selection range related to the given rootNode\r\n * @param rootNode The root node where the path start from\r\n * @param range The range of selection\r\n */\r\nexport default function getSelectionPath(\r\n rootNode: Node,\r\n range: Range | null\r\n): SelectionPath | null {\r\n if (!range) {\r\n return null;\r\n }\r\n\r\n let selectionPath: SelectionPath = {\r\n start: getPositionPath(Position.getStart(range), rootNode),\r\n end: getPositionPath(Position.getEnd(range), rootNode),\r\n };\r\n\r\n return selectionPath;\r\n}\r\n\r\n/**\r\n * Get the path of the node relative to rootNode.\r\n * The path of the node is an array of integer indices into the childNodes of the given node.\r\n *\r\n * The node path will be what the node path will be on a _normalized_ dom\r\n * (e.g. empty text nodes will be ignored and adjacent text nodes will be concatenated)\r\n *\r\n * @param rootNode the node the path will be relative to\r\n * @param position the position to get indexes from. Follows the same semantics\r\n * as selectionRange (if node is of type Text, it is an offset into the text of that node.\r\n * If node is of type Element, it is the index of a child in that Element node.)\r\n */\r\nfunction getPositionPath(position: NodePosition, rootNode: Node): number[] {\r\n if (!position || !rootNode) {\r\n return [];\r\n }\r\n\r\n let node: Node | null = position.node;\r\n let offset = position.offset;\r\n let result: number[] = [];\r\n let parent: Node | null;\r\n\r\n if (!contains(rootNode, node, true)) {\r\n return [];\r\n }\r\n\r\n if (node.nodeType == NodeType.Text) {\r\n parent = node.parentNode;\r\n while (node.previousSibling && node.previousSibling.nodeType == NodeType.Text) {\r\n offset += node.previousSibling.nodeValue?.length || 0;\r\n node = node.previousSibling;\r\n }\r\n result.unshift(offset);\r\n } else {\r\n parent = node;\r\n node = node.childNodes[offset];\r\n }\r\n\r\n do {\r\n offset = 0;\r\n let isPreviousText = false;\r\n\r\n for (let c: Node | null = parent?.firstChild || null; c && c != node; c = c.nextSibling) {\r\n if (c.nodeType == NodeType.Text) {\r\n if (c.nodeValue?.length === 0 || isPreviousText) {\r\n continue;\r\n }\r\n\r\n isPreviousText = true;\r\n } else {\r\n isPreviousText = false;\r\n }\r\n\r\n offset++;\r\n }\r\n\r\n result.unshift(offset);\r\n node = parent;\r\n parent = parent?.parentNode || null;\r\n } while (node && node != rootNode);\r\n\r\n return result;\r\n}\r\n","import contains from '../utils/contains';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport isNodeEmpty from '../utils/isNodeEmpty';\r\nimport { NodePosition } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Check if this position is at beginning of the given node.\r\n * This will return true if all nodes between the beginning of target node and the position are empty.\r\n * @param position The position to check\r\n * @param targetNode The node to check\r\n * @returns True if position is at beginning of the node, otherwise false\r\n */\r\nexport default function isPositionAtBeginningOf(position: NodePosition, targetNode: Node | null) {\r\n if (position) {\r\n position = position.normalize();\r\n let node: Node | null = position.node;\r\n const offset = position.offset;\r\n if (offset == 0) {\r\n while (node && contains(targetNode, node) && areAllPreviousNodesEmpty(node)) {\r\n node = node?.parentNode || null;\r\n }\r\n\r\n return node == targetNode;\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\nfunction areAllPreviousNodesEmpty(node: Node): boolean {\r\n while (node.previousSibling) {\r\n node = node.previousSibling;\r\n if (getTagOfNode(node) == 'BR' || !isNodeEmpty(node)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n","import createRange from './createRange';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport validate from '../metadata/validate';\r\nimport {\r\n createArrayDefinition,\r\n createBooleanDefinition,\r\n createNumberDefinition,\r\n createObjectDefinition,\r\n createStringDefinition,\r\n} from '../metadata/definitionCreators';\r\nimport {\r\n ContentMetadata,\r\n SelectionRangeTypes,\r\n TrustedHTMLHandler,\r\n ImageContentMetadata,\r\n NormalContentMetadata,\r\n TableContentMetadata,\r\n Coordinates,\r\n} from 'roosterjs-editor-types';\r\nconst NumberArrayDefinition = createArrayDefinition(createNumberDefinition());\r\n\r\nconst CoordinatesDefinition = createObjectDefinition({\r\n x: createNumberDefinition(),\r\n y: createNumberDefinition(),\r\n});\r\n\r\nconst IsDarkModeDefinition = createBooleanDefinition(true /*isOptional*/);\r\n\r\nconst NormalContentMetadataDefinition = createObjectDefinition({\r\n type: createNumberDefinition(true /*isOptional*/, SelectionRangeTypes.Normal),\r\n isDarkMode: IsDarkModeDefinition,\r\n start: NumberArrayDefinition,\r\n end: NumberArrayDefinition,\r\n});\r\n\r\nconst TableContentMetadataDefinition = createObjectDefinition({\r\n type: createNumberDefinition(false /*isOptional*/, SelectionRangeTypes.TableSelection),\r\n isDarkMode: IsDarkModeDefinition,\r\n tableId: createStringDefinition(),\r\n firstCell: CoordinatesDefinition,\r\n lastCell: CoordinatesDefinition,\r\n});\r\n\r\nconst ImageContentMetadataDefinition = createObjectDefinition({\r\n type: createNumberDefinition(false /*isOptional*/, SelectionRangeTypes.ImageSelection),\r\n isDarkMode: IsDarkModeDefinition,\r\n imageId: createStringDefinition(),\r\n});\r\n\r\n/**\r\n * @deprecated Use setHtmlWithMetadata instead\r\n * Restore inner HTML of a root element from given html string. If the string contains selection path,\r\n * remove the selection path and return a range represented by the path\r\n * @param root The root element\r\n * @param html The HTML to restore\r\n * @param trustedHTMLHandler An optional trusted HTML handler to convert HTML string to security string\r\n * @returns A selection range if the html contains a valid selection path, otherwise null\r\n */\r\nexport default function setHtmlWithSelectionPath(\r\n rootNode: HTMLElement,\r\n html: string,\r\n trustedHTMLHandler?: TrustedHTMLHandler\r\n): Range | null {\r\n const metadata = setHtmlWithMetadata(rootNode, html, trustedHTMLHandler);\r\n return metadata?.type == SelectionRangeTypes.Normal\r\n ? createRange(rootNode, metadata.start, metadata.end)\r\n : null;\r\n}\r\n\r\n/**\r\n * Restore inner HTML of a root element from given html string. If the string contains metadata,\r\n * remove it from DOM tree and return the metadata\r\n * @param root The root element\r\n * @param html The HTML to restore\r\n * @param trustedHTMLHandler An optional trusted HTML handler to convert HTML string to security string\r\n * @returns Content metadata if any, or undefined\r\n */\r\nexport function setHtmlWithMetadata(\r\n rootNode: HTMLElement,\r\n html: string,\r\n trustedHTMLHandler?: TrustedHTMLHandler\r\n): ContentMetadata | undefined {\r\n if (!rootNode) {\r\n return undefined;\r\n }\r\n\r\n html = html || '';\r\n rootNode.innerHTML = trustedHTMLHandler?.(html) || html;\r\n\r\n return extractContentMetadata(rootNode);\r\n}\r\n\r\n/**\r\n * Extract content metadata from DOM tree\r\n * @param rootNode Root of the DOM tree\r\n * @returns If there is a valid content metadata node in the give DOM tree, return this metadata object, otherwise undefined\r\n */\r\nexport function extractContentMetadata(rootNode: HTMLElement): ContentMetadata | undefined {\r\n const potentialMetadataComment = rootNode.lastChild;\r\n\r\n if (safeInstanceOf(potentialMetadataComment, 'Comment')) {\r\n try {\r\n const obj = JSON.parse(potentialMetadataComment.nodeValue || '');\r\n\r\n if (\r\n validate(obj, NormalContentMetadataDefinition) ||\r\n validate(obj, TableContentMetadataDefinition) ||\r\n validate(obj, ImageContentMetadataDefinition)\r\n ) {\r\n rootNode.removeChild(potentialMetadataComment);\r\n obj.type = typeof obj.type === 'undefined' ? SelectionRangeTypes.Normal : obj.type;\r\n obj.isDarkMode = obj.isDarkMode || false;\r\n\r\n return obj;\r\n }\r\n } catch {}\r\n }\r\n\r\n return undefined;\r\n}\r\n","import clearProceedingSnapshots from './clearProceedingSnapshots';\r\nimport { Snapshot, Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Add a new snapshot to the given snapshots data structure\r\n * @param snapshots The snapshots data structure to add new snapshot into\r\n * @param html The snapshot HTML to add\r\n * @param isAutoCompleteSnapshot Whether this is a snapshot before auto complete action\r\n */\r\nexport default function addSnapshot(\r\n snapshots: Snapshots,\r\n html: string,\r\n isAutoCompleteSnapshot: boolean\r\n): void;\r\n\r\n/**\r\n * Add a new snapshot to the given snapshots data structure\r\n * @param snapshots The snapshots data structure to add new snapshot into\r\n * @param snapshot The generic snapshot object to add\r\n * @param isAutoCompleteSnapshot Whether this is a snapshot before auto complete action\r\n * @param getLength A callback function to calculate length of the snapshot\r\n * @param isSame A callback function to check if the given snapshots are the same\r\n */\r\nexport default function addSnapshot(\r\n snapshots: Snapshots,\r\n snapshot: T,\r\n isAutoCompleteSnapshot: boolean,\r\n getLength: (snapshot: T) => number,\r\n isSame: (snapshot1: T, snapshot2: T) => boolean\r\n): void;\r\n\r\nexport default function addSnapshot(\r\n snapshots: Snapshots,\r\n snapshot: T,\r\n isAutoCompleteSnapshot: boolean,\r\n getLength?: (snapshot: T) => number,\r\n compare?: (snapshot1: T, snapshot2: T) => boolean\r\n) {\r\n getLength = getLength || (str => ((str))?.length || 0);\r\n compare = compare || defaultCompare;\r\n\r\n const currentSnapshot = snapshots.snapshots[snapshots.currentIndex];\r\n const isSameSnapshot = currentSnapshot && compare(currentSnapshot, snapshot);\r\n\r\n if (snapshots.currentIndex < 0 || !currentSnapshot || !isSameSnapshot) {\r\n clearProceedingSnapshots(snapshots, getLength);\r\n snapshots.snapshots.push(snapshot);\r\n snapshots.currentIndex++;\r\n snapshots.totalSize += getLength(snapshot);\r\n\r\n let removeCount = 0;\r\n while (\r\n removeCount < snapshots.snapshots.length &&\r\n snapshots.totalSize > snapshots.maxSize\r\n ) {\r\n snapshots.totalSize -= getLength(snapshots.snapshots[removeCount]);\r\n removeCount++;\r\n }\r\n\r\n if (removeCount > 0) {\r\n snapshots.snapshots.splice(0, removeCount);\r\n snapshots.currentIndex -= removeCount;\r\n snapshots.autoCompleteIndex -= removeCount;\r\n }\r\n\r\n if (isAutoCompleteSnapshot) {\r\n snapshots.autoCompleteIndex = snapshots.currentIndex;\r\n }\r\n } else if (isSameSnapshot) {\r\n // replace the currentSnapshot's metadata so the selection is updated\r\n snapshots.snapshots.splice(snapshots.currentIndex, 1, snapshot);\r\n }\r\n}\r\n\r\n/**\r\n * Add a new snapshot to the given snapshots data structure\r\n * @param snapshots The snapshots data structure to add new snapshot into\r\n * @param snapshot The snapshot object to add\r\n * @param isAutoCompleteSnapshot Whether this is a snapshot before auto complete action\r\n */\r\nexport function addSnapshotV2(\r\n snapshots: Snapshots,\r\n snapshot: Snapshot,\r\n isAutoCompleteSnapshot: boolean\r\n) {\r\n addSnapshot(\r\n snapshots,\r\n snapshot,\r\n isAutoCompleteSnapshot,\r\n s => s.html?.length || 0,\r\n compareSnapshots\r\n );\r\n}\r\n\r\nfunction compareSnapshots(s1: Snapshot, s2: Snapshot) {\r\n return s1.html == s2.html && !s1.entityStates && !s2.entityStates;\r\n}\r\n\r\nfunction defaultCompare(s1: T, s2: T) {\r\n return s1 == s2;\r\n}\r\n","import { Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Check whether can move current snapshot with the given step\r\n * @param snapshots The snapshots data structure to check\r\n * @param step The step to check, can be positive, negative or 0\r\n * @returns True if can move current snapshot with the given step, otherwise false\r\n */\r\nexport default function canMoveCurrentSnapshot(\r\n snapshots: Snapshots,\r\n step: number\r\n): boolean {\r\n let newIndex = snapshots.currentIndex + step;\r\n return newIndex >= 0 && newIndex < snapshots.snapshots.length;\r\n}\r\n","import { Snapshots } from 'roosterjs-editor-types';\n\n/**\n * Whether there is a snapshot added before auto complete and it can be undone now\n */\nexport default function canUndoAutoComplete(snapshots: Snapshots): boolean {\n return (\n snapshots.autoCompleteIndex >= 0 &&\n snapshots.currentIndex - snapshots.autoCompleteIndex == 1\n );\n}\n","import canMoveCurrentSnapshot from './canMoveCurrentSnapshot';\r\nimport { Snapshot, Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport default function clearProceedingSnapshots(snapshots: Snapshots): void;\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport default function clearProceedingSnapshots(\r\n snapshots: Snapshots,\r\n getLength: (snapshot: T) => number\r\n): void;\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport default function clearProceedingSnapshots(\r\n snapshots: Snapshots,\r\n getLength?: (snapshot: T) => number\r\n) {\r\n getLength = getLength || (str => ((str))?.length || 0);\r\n if (canMoveCurrentSnapshot(snapshots, 1)) {\r\n let removedSize = 0;\r\n for (let i = snapshots.currentIndex + 1; i < snapshots.snapshots.length; i++) {\r\n removedSize += getLength(snapshots.snapshots[i]);\r\n }\r\n snapshots.snapshots.splice(snapshots.currentIndex + 1);\r\n snapshots.totalSize -= removedSize;\r\n snapshots.autoCompleteIndex = -1;\r\n }\r\n}\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport function clearProceedingSnapshotsV2(snapshots: Snapshots) {\r\n clearProceedingSnapshots(snapshots, s => s.html?.length || 0);\r\n}\r\n","import { Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Create initial snapshots\r\n * @param maxSize max size of all snapshots\r\n */\r\nexport default function createSnapshots(maxSize: number): Snapshots {\r\n return {\r\n snapshots: [],\r\n totalSize: 0,\r\n currentIndex: -1,\r\n autoCompleteIndex: -1,\r\n maxSize,\r\n };\r\n}\r\n","import canMoveCurrentSnapshot from './canMoveCurrentSnapshot';\nimport { Snapshots } from 'roosterjs-editor-types';\n\n/**\n * Move current snapshot with the given step if can move this step. Otherwise no action and return null\n * @param snapshots The snapshots data structure to move\n * @param step The step to move\n * @returns If can move with the given step, returns the snapshot after move, otherwise null\n */\nexport default function moveCurrentSnapshot(\n snapshots: Snapshots,\n step: number\n): T | null {\n if (canMoveCurrentSnapshot(snapshots, step)) {\n snapshots.currentIndex += step;\n snapshots.autoCompleteIndex = -1;\n return snapshots.snapshots[snapshots.currentIndex];\n } else {\n return null;\n }\n}\n\n/**\n * @deprecated\n * For backward compatibility only\n */\nexport const moveCurrentSnapsnot = moveCurrentSnapshot;\n","/**\n * Get CSS styles of a given element in name-value pair format\n * @param element The element to get styles from\n */\nexport default function getStyles(element: HTMLElement): Record {\n const result: Record = {};\n const style = element?.getAttribute('style') || '';\n style.split(';').forEach(pair => {\n const valueIndex = pair.indexOf(':');\n const name = pair.slice(0, valueIndex);\n const value = pair.slice(valueIndex + 1);\n if (name && value) {\n result[name.trim()] = value.trim();\n }\n });\n return result;\n}\n","/**\n * Remove a css rule style from a style sheet\n * @param doc The document object\n * @param styleId the ID of the style tag\n */\n\nexport default function removeGlobalCssStyle(doc: Document, styleId: string) {\n const styleTag = doc.getElementById(styleId) as HTMLStyleElement;\n if (styleTag) {\n styleTag.parentNode?.removeChild(styleTag);\n }\n}\n","import getStyles from './getStyles';\nimport setStyles from './setStyles';\n\n/**\n * Removes the css important rule from some css properties\n * @param element The HTMLElement\n * @param styleProperties The css properties that important must be removed. Ex: ['background-color', 'background']\n */\n\nexport default function removeImportantStyleRule(element: HTMLElement, styleProperties: string[]) {\n const styles = getStyles(element);\n let modifiedStyles = 0;\n styleProperties.forEach(style => {\n if (styles[style]?.indexOf('!important') > -1) {\n const index = styles[style].indexOf('!');\n styles[style] = styles[style].substring(0, index);\n modifiedStyles++;\n }\n });\n if (modifiedStyles > 0) {\n setStyles(element, styles);\n }\n}\n","/**\n * Add global css styles\n * @param doc The document object\n * @param cssRule The css rule that must added to the selection\n * @param styleId The id of the style tag\n */\n\nexport default function setGlobalCssStyles(doc: Document, cssRule: string, styleId: string) {\n if (cssRule) {\n let styleTag = doc.getElementById(styleId) as HTMLStyleElement;\n if (!styleTag) {\n styleTag = doc.createElement('style');\n styleTag.id = styleId;\n doc.head.appendChild(styleTag);\n }\n styleTag.sheet?.insertRule(cssRule);\n }\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\n\n/**\n * Set styles to an HTML element. If styles are empty, remove 'style' attribute\n * @param element The element to set styles\n * @param styles The styles to set, in name-value pair format\n */\nexport default function setStyles(element: HTMLElement, styles: Record) {\n if (element) {\n const style = getObjectKeys(styles || {})\n .map(name => {\n const value: string | null = styles[name];\n const trimmedName = name ? name.trim() : null;\n const trimmedValue = value ? value.trim() : null;\n return trimmedName && trimmedValue ? `${trimmedName}:${trimmedValue}` : null;\n })\n .filter(x => x)\n .join(';');\n if (style) {\n element.setAttribute('style', style);\n } else {\n element.removeAttribute('style');\n }\n }\n}\n","import applyTableFormat from './applyTableFormat';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport moveChildNodes from '../utils/moveChildNodes';\r\nimport normalizeRect from '../utils/normalizeRect';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport toArray from '../jsUtils/toArray';\r\nimport { getTableFormatInfo, saveTableInfo } from './tableFormatInfo';\r\nimport { removeMetadata } from '../metadata/metadata';\r\nimport {\r\n SizeTransformer,\r\n TableBorderFormat,\r\n TableFormat,\r\n TableOperation,\r\n TableSelection,\r\n VCell,\r\n DarkColorHandler,\r\n} from 'roosterjs-editor-types';\r\nimport type { CompatibleTableOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\nconst DEFAULT_FORMAT: Required = {\r\n topBorderColor: '#ABABAB',\r\n bottomBorderColor: '#ABABAB',\r\n verticalBorderColor: '#ABABAB',\r\n hasHeaderRow: false,\r\n hasFirstColumn: false,\r\n hasBandedRows: false,\r\n hasBandedColumns: false,\r\n bgColorEven: null,\r\n bgColorOdd: '#ABABAB20',\r\n headerRowColor: '#ABABAB',\r\n tableBorderFormat: TableBorderFormat.DEFAULT,\r\n keepCellShade: false,\r\n};\r\n\r\n/**\r\n * A virtual table class, represent an HTML table, by expand all merged cells to each separated cells\r\n */\r\nexport default class VTable {\r\n /**\r\n * The HTML table object\r\n */\r\n table: HTMLTableElement;\r\n\r\n /**\r\n * Virtual cells\r\n */\r\n cells: VCell[][] | null = null;\r\n\r\n /**\r\n * Current row index\r\n */\r\n row: number | undefined;\r\n\r\n /**\r\n * Current column index\r\n */\r\n col: number | undefined;\r\n\r\n /**\r\n * Current format of the table\r\n */\r\n formatInfo: Required | null = null;\r\n\r\n private trs: HTMLTableRowElement[] = [];\r\n\r\n private tableSelection: TableSelection | null = null;\r\n\r\n /**\r\n * Create a new instance of VTable object using HTML TABLE or TD node\r\n * @param node The HTML Table or TD node\r\n * @param normalizeSize Whether table size needs to be normalized\r\n * @param zoomScale When the table is under a zoomed container, pass in the zoom scale here\r\n */\r\n constructor(\r\n node: HTMLTableElement | HTMLTableCellElement,\r\n normalizeSize?: boolean,\r\n zoomScale?: number | SizeTransformer\r\n ) {\r\n this.table = safeInstanceOf(node, 'HTMLTableElement') ? node : getTableFromTd(node);\r\n if (this.table) {\r\n let currentTd = safeInstanceOf(node, 'HTMLTableElement') ? null : node;\r\n let trs = toArray(this.table.rows);\r\n this.cells = trs.map(row => []);\r\n trs.forEach((tr, rowIndex) => {\r\n this.trs[rowIndex % 2] = tr;\r\n for (let sourceCol = 0, targetCol = 0; sourceCol < tr.cells.length; sourceCol++) {\r\n // Skip the cells which already initialized\r\n for (; this.cells![rowIndex][targetCol]; targetCol++) {}\r\n let td = tr.cells[sourceCol];\r\n\r\n if (td == currentTd) {\r\n this.col = targetCol;\r\n this.row = rowIndex;\r\n }\r\n\r\n for (let colSpan = 0; colSpan < td.colSpan; colSpan++, targetCol++) {\r\n for (let rowSpan = 0; rowSpan < td.rowSpan; rowSpan++) {\r\n const hasTd: boolean = colSpan + rowSpan == 0;\r\n const rect = td.getBoundingClientRect();\r\n if (this.cells?.[rowIndex + rowSpan]) {\r\n this.cells[rowIndex + rowSpan][targetCol] = {\r\n td: hasTd ? td : null,\r\n spanLeft: colSpan > 0,\r\n spanAbove: rowSpan > 0,\r\n width: hasTd ? rect.width : undefined,\r\n height: hasTd ? rect.height : undefined,\r\n };\r\n }\r\n }\r\n }\r\n }\r\n });\r\n this.formatInfo = getTableFormatInfo(this.table);\r\n if (normalizeSize) {\r\n this.normalizeSize(typeof zoomScale == 'number' ? n => n / zoomScale : zoomScale);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Selected range of cells with the coordinates of the first and last cell selected.\r\n */\r\n public get selection(): TableSelection | null {\r\n return this.tableSelection || null;\r\n }\r\n\r\n public set selection(value: TableSelection | null) {\r\n if (value) {\r\n const { firstCell } = value;\r\n this.row = firstCell?.y;\r\n this.col = firstCell?.x;\r\n }\r\n this.tableSelection = value;\r\n }\r\n\r\n /**\r\n * Write the virtual table back to DOM tree to represent the change of VTable\r\n * @param skipApplyFormat Do not reapply table format when write back. Only use this parameter when you are pretty sure there is no format or table structure change during the process.\r\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\r\n */\r\n writeBack(skipApplyFormat?: boolean, darkColorHandler?: DarkColorHandler | null) {\r\n if (this.cells) {\r\n moveChildNodes(this.table);\r\n this.cells.forEach((row, r) => {\r\n let tr = cloneNode(this.trs[r % 2] || this.trs[0]);\r\n\r\n if (tr) {\r\n this.table.appendChild(tr);\r\n row.forEach((cell, c) => {\r\n if (cell.td) {\r\n this.recalculateSpans(r, c);\r\n this.recalculateCellHeight(cell.td);\r\n tr!.appendChild(cell.td);\r\n }\r\n });\r\n }\r\n });\r\n if (this.formatInfo && !skipApplyFormat) {\r\n saveTableInfo(this.table, this.formatInfo);\r\n applyTableFormat(this.table, this.cells, this.formatInfo, darkColorHandler);\r\n }\r\n } else if (this.table) {\r\n this.table.parentNode?.removeChild(this.table);\r\n }\r\n }\r\n\r\n private recalculateCellHeight(td: HTMLTableCellElement) {\r\n if (this.isEmptyCell(td) && td.rowSpan > 1) {\r\n for (let i = 1; i < td.rowSpan; i++) {\r\n const br = document.createElement('br');\r\n td.appendChild(br);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Apply the given table format to this virtual table\r\n * @param format Table format to apply\r\n */\r\n applyFormat(format: Partial) {\r\n if (!this.table) {\r\n return;\r\n }\r\n this.formatInfo = {\r\n ...DEFAULT_FORMAT,\r\n ...(this.formatInfo || {}),\r\n ...(format || {}),\r\n };\r\n if (!this.formatInfo.keepCellShade) {\r\n this.deleteCellShadeDataset(this.cells);\r\n }\r\n }\r\n\r\n /**\r\n * Remove the cellShade dataset to apply a new style format at the cell.\r\n * @param cells\r\n */\r\n private deleteCellShadeDataset(cells: VCell[][] | null) {\r\n cells?.forEach(row => {\r\n row.forEach(cell => {\r\n if (cell.td) {\r\n removeMetadata(cell.td);\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Edit table with given operation.\r\n * @param operation Table operation\r\n */\r\n edit(operation: TableOperation | CompatibleTableOperation) {\r\n if (!this.table || !this.cells || this.row === undefined || this.col == undefined) {\r\n return;\r\n }\r\n\r\n let currentRow = this.cells[this.row];\r\n let currentCell = currentRow[this.col];\r\n const firstRow = this.selection ? this.selection.firstCell.y : this.row;\r\n const lastRow = this.selection ? this.selection.lastCell.y : this.row;\r\n const firstColumn = this.selection ? this.selection.firstCell.x : this.col;\r\n const lastColumn = this.selection ? this.selection.lastCell.x : this.col;\r\n switch (operation) {\r\n case TableOperation.InsertAbove:\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n this.cells.splice(firstRow, 0, currentRow.map(cloneCell));\r\n }\r\n break;\r\n case TableOperation.InsertBelow:\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n let newRow = lastRow + this.countSpanAbove(lastRow, this.col);\r\n this.cells.splice(\r\n newRow,\r\n 0,\r\n this.cells[newRow - 1].map((cell, colIndex) => {\r\n let nextCell = this.getCell(newRow, colIndex);\r\n\r\n if (nextCell.spanAbove) {\r\n return cloneCell(nextCell);\r\n } else if (cell.spanLeft) {\r\n let newCell = cloneCell(cell);\r\n newCell.spanAbove = false;\r\n return newCell;\r\n } else {\r\n return {\r\n td: cloneNode(this.getTd(this.row!, colIndex)),\r\n };\r\n }\r\n })\r\n );\r\n }\r\n\r\n break;\r\n\r\n case TableOperation.InsertLeft:\r\n for (let i = firstColumn; i <= lastColumn; i++) {\r\n this.forEachCellOfCurrentColumn((cell, row) => {\r\n row.splice(i, 0, cloneCell(cell));\r\n });\r\n }\r\n\r\n break;\r\n case TableOperation.InsertRight:\r\n for (let i = firstColumn; i <= lastColumn; i++) {\r\n let newCol = lastColumn + this.countSpanLeft(this.row, lastColumn);\r\n this.forEachCellOfColumn(newCol - 1, (cell, row, i) => {\r\n let nextCell = this.getCell(i, newCol);\r\n let newCell: VCell;\r\n if (nextCell.spanLeft) {\r\n newCell = cloneCell(nextCell);\r\n } else if (cell.spanAbove) {\r\n newCell = cloneCell(cell);\r\n newCell.spanLeft = false;\r\n } else {\r\n newCell = {\r\n td: cloneNode(this.getTd(i, this.col!)),\r\n };\r\n }\r\n\r\n row.splice(newCol, 0, newCell);\r\n });\r\n }\r\n\r\n break;\r\n\r\n case TableOperation.DeleteRow:\r\n for (let rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) {\r\n this.forEachCellOfRow(rowIndex, (cell: VCell, i: number) => {\r\n let nextCell = this.getCell(rowIndex + 1, i);\r\n if (cell.td && cell.td.rowSpan > 1 && nextCell.spanAbove) {\r\n nextCell.td = cell.td;\r\n }\r\n });\r\n }\r\n const removedRows = this.selection\r\n ? this.selection.lastCell.y - this.selection.firstCell.y\r\n : 0;\r\n this.cells.splice(firstRow, removedRows + 1);\r\n if (this.cells.length === 0) {\r\n this.cells = null;\r\n }\r\n\r\n break;\r\n case TableOperation.DeleteColumn:\r\n let deletedColumns = 0;\r\n for (let colIndex = firstColumn; colIndex <= lastColumn; colIndex++) {\r\n this.forEachCellOfColumn(colIndex, (cell, row, i) => {\r\n let nextCell = this.getCell(i, colIndex + 1);\r\n if (cell.td && cell.td.colSpan > 1 && nextCell.spanLeft) {\r\n nextCell.td = cell.td;\r\n }\r\n const removedColumns = this.selection\r\n ? colIndex - deletedColumns\r\n : this.col!;\r\n row.splice(removedColumns, 1);\r\n });\r\n deletedColumns++;\r\n }\r\n if (this.cells?.length === 0 || this.cells?.every(row => row.length === 0)) {\r\n this.cells = null;\r\n }\r\n break;\r\n\r\n case TableOperation.MergeAbove:\r\n case TableOperation.MergeBelow:\r\n let rowStep = operation == TableOperation.MergeAbove ? -1 : 1;\r\n for (\r\n let rowIndex = this.row + rowStep;\r\n rowIndex >= 0 && rowIndex < this.cells.length;\r\n rowIndex += rowStep\r\n ) {\r\n let cell = this.getCell(rowIndex, this.col);\r\n if (cell.td && !cell.spanAbove) {\r\n let aboveCell = rowIndex < this.row ? cell : currentCell;\r\n let belowCell = rowIndex < this.row ? currentCell : cell;\r\n this.mergeCells(aboveCell, belowCell);\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case TableOperation.MergeLeft:\r\n case TableOperation.MergeRight:\r\n let colStep = operation == TableOperation.MergeLeft ? -1 : 1;\r\n for (\r\n let colIndex = this.col + colStep;\r\n colIndex >= 0 && colIndex < this.cells[this.row].length;\r\n colIndex += colStep\r\n ) {\r\n let cell = this.getCell(this.row, colIndex);\r\n if (cell.td && !cell.spanLeft) {\r\n let leftCell = colIndex < this.col ? cell : currentCell;\r\n let rightCell = colIndex < this.col ? currentCell : cell;\r\n this.mergeCells(leftCell, rightCell, true /** horizontally */);\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case TableOperation.MergeCells:\r\n for (let colIndex = firstColumn; colIndex <= lastColumn; colIndex++) {\r\n for (let rowIndex = firstRow + 1; rowIndex <= lastRow; rowIndex++) {\r\n let cell = this.getCell(firstRow, colIndex);\r\n let nextCellBelow = this.getCell(rowIndex, colIndex);\r\n this.mergeCells(cell, nextCellBelow);\r\n }\r\n }\r\n for (let colIndex = firstColumn + 1; colIndex <= lastColumn; colIndex++) {\r\n let cell = this.getCell(firstRow, firstColumn);\r\n let nextCellRight = this.getCell(firstRow, colIndex);\r\n this.mergeCells(cell, nextCellRight, true /** horizontally */);\r\n }\r\n\r\n break;\r\n case TableOperation.DeleteTable:\r\n this.cells = null;\r\n break;\r\n\r\n case TableOperation.SplitVertically:\r\n if (currentCell.td && currentCell.td.rowSpan > 1) {\r\n this.getCell(this.row + 1, this.col).td = cloneNode(currentCell.td);\r\n } else {\r\n let splitRow = currentRow.map(cell => {\r\n return {\r\n td: cell == currentCell ? cloneNode(cell.td) : null,\r\n spanAbove: cell != currentCell,\r\n spanLeft: cell.spanLeft,\r\n };\r\n });\r\n this.cells.splice(this.row + 1, 0, splitRow);\r\n }\r\n break;\r\n\r\n case TableOperation.SplitHorizontally:\r\n if (currentCell.td && currentCell.td.colSpan > 1) {\r\n this.getCell(this.row, this.col + 1).td = cloneNode(currentCell.td);\r\n } else {\r\n this.forEachCellOfCurrentColumn((cell, row) => {\r\n row.splice(this.col! + 1, 0, {\r\n td: row == currentRow ? cloneNode(cell.td) : null,\r\n spanAbove: cell.spanAbove,\r\n spanLeft: row != currentRow,\r\n });\r\n });\r\n }\r\n break;\r\n case TableOperation.AlignCenter:\r\n this.table.style.marginLeft = 'auto';\r\n this.table.style.marginRight = 'auto';\r\n break;\r\n case TableOperation.AlignLeft:\r\n this.table.style.marginLeft = '';\r\n this.table.style.marginRight = 'auto';\r\n break;\r\n case TableOperation.AlignRight:\r\n this.table.style.marginLeft = 'auto';\r\n this.table.style.marginRight = '';\r\n break;\r\n case TableOperation.AlignCellCenter:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'center'\r\n );\r\n break;\r\n case TableOperation.AlignCellLeft:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'left'\r\n );\r\n break;\r\n case TableOperation.AlignCellRight:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'right'\r\n );\r\n break;\r\n case TableOperation.AlignCellTop:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'top',\r\n true /** isVertical */\r\n );\r\n break;\r\n case TableOperation.AlignCellMiddle:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'middle',\r\n true /** isVertical */\r\n );\r\n break;\r\n case TableOperation.AlignCellBottom:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'bottom',\r\n true /** isVertical */\r\n );\r\n break;\r\n }\r\n }\r\n\r\n setAlignmentToSelectedCells(\r\n firstRow: number,\r\n lastRow: number,\r\n firstColumn: number,\r\n lastColumn: number,\r\n alignmentType: string,\r\n isVertical?: boolean\r\n ) {\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n for (let j = firstColumn; j <= lastColumn; j++) {\r\n if (this.cells) {\r\n const cell = this.cells[i][j].td;\r\n if (isVertical && cell) {\r\n cell.style?.setProperty('vertical-align', alignmentType);\r\n } else if (cell) {\r\n cell.style?.setProperty('text-align', alignmentType);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private mergeCells(cell: VCell, nextCell: VCell, horizontally?: boolean) {\r\n const checkSpans = horizontally\r\n ? cell.td?.rowSpan === nextCell.td?.rowSpan && !cell.spanLeft\r\n : cell.td?.colSpan === nextCell.td?.colSpan && !cell.spanAbove;\r\n if (cell.td && nextCell.td && checkSpans) {\r\n this.mergeCellContents(cell.td, nextCell.td);\r\n nextCell.td = null;\r\n if (horizontally) {\r\n nextCell.spanLeft = true;\r\n } else {\r\n nextCell.spanAbove = true;\r\n }\r\n }\r\n }\r\n\r\n private isEmptyCell(td: HTMLTableCellElement) {\r\n return td.childElementCount === 1 && getTagOfNode(td.firstChild) === 'BR';\r\n }\r\n\r\n private mergeCellContents(cellTd: HTMLTableCellElement, nextCellTd: HTMLTableCellElement) {\r\n if (this.isEmptyCell(nextCellTd)) {\r\n moveChildNodes(cellTd, nextCellTd, false /*keepExistingChildren*/);\r\n } else {\r\n const br = document.createElement('br');\r\n cellTd.appendChild(br);\r\n moveChildNodes(cellTd, nextCellTd, true /*keepExistingChildren*/);\r\n }\r\n }\r\n\r\n /**\r\n * Loop each cell of current column and invoke a callback function\r\n * @param callback The callback function to invoke\r\n */\r\n forEachCellOfCurrentColumn(callback: (cell: VCell, row: VCell[], i: number) => any) {\r\n this.forEachCellOfColumn(this.col, callback);\r\n }\r\n\r\n /**\r\n * Loop each table cell and get all the cells that share the same border from one side\r\n * The result is an array of table cell elements\r\n * @param borderPos The position of the border\r\n * @param getLeftCells Get left-hand-side or right-hand-side cells of the border\r\n *\r\n * Example, consider having a 3 by 4 table as below with merged and split cells\r\n *\r\n * | 1 | 4 | 7 | 8 |\r\n * | 5 | 9 |\r\n * | 3 | 10 |\r\n *\r\n * input => borderPos: the 3rd border, getLeftCells: true\r\n * output => [4, 5, 3]\r\n *\r\n * input => borderPos: the 3rd border, getLeftCells: false\r\n * output => [7, 9, 10]\r\n *\r\n * input => borderPos: the 2nd border, getLeftCells: true\r\n * output => [1]\r\n *\r\n * input => borderPos: the 2nd border, getLeftCells: false\r\n * output => [4]\r\n */\r\n getCellsWithBorder(borderPos: number, getLeftCells: boolean): HTMLTableCellElement[] {\r\n const cells: HTMLTableCellElement[] = [];\r\n for (let i = 0; this.cells && i < this.cells.length; i++) {\r\n for (let j = 0; j < this.cells[i].length; j++) {\r\n const cell = this.getCell(i, j);\r\n if (cell.td) {\r\n const cellRect = normalizeRect(cell.td.getBoundingClientRect());\r\n\r\n if (cellRect) {\r\n let found: boolean = false;\r\n if (getLeftCells) {\r\n if (cellRect.right == borderPos) {\r\n found = true;\r\n cells.push(cell.td);\r\n } else if (found) {\r\n break;\r\n }\r\n } else {\r\n if (cellRect.left == borderPos) {\r\n found = true;\r\n cells.push(cell.td);\r\n } else if (found) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return cells;\r\n }\r\n\r\n /**\r\n * Loop each cell of current row and invoke a callback function\r\n * @param callback The callback function to invoke\r\n */\r\n forEachCellOfCurrentRow(callback: (cell: VCell, i: number) => any) {\r\n this.forEachCellOfRow(this.row, callback);\r\n }\r\n\r\n /**\r\n * Get a table cell using its row and column index. This function will always return an object\r\n * even if the given indexes don't exist in table.\r\n * @param row The row index\r\n * @param col The column index\r\n */\r\n getCell(row: number, col: number): VCell {\r\n return (this.cells && this.cells[row] && this.cells[row][col]) || {};\r\n }\r\n\r\n /**\r\n * Get current HTML table cell object. If the current table cell is a virtual expanded cell, return its root cell\r\n */\r\n getCurrentTd(): HTMLTableCellElement | null {\r\n return this.getTd(this.row, this.col);\r\n }\r\n\r\n /**\r\n * Get the Table Cell in a provided coordinate\r\n * @param row row of the cell\r\n * @param col column of the cell\r\n */\r\n getTd(row: number | undefined, col: number | undefined) {\r\n if (this.cells && row !== undefined && col !== undefined) {\r\n row = Math.min(this.cells.length - 1, row);\r\n col = this.cells[row] ? Math.min(this.cells[row].length - 1, col) : col;\r\n if (!isNaN(row) && !isNaN(col)) {\r\n while (row >= 0 && col >= 0) {\r\n let cell = this.getCell(row, col);\r\n if (cell.td) {\r\n return cell.td;\r\n } else if (cell.spanLeft) {\r\n col--;\r\n } else if (cell.spanAbove) {\r\n row--;\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private forEachCellOfColumn(\r\n col: number | undefined,\r\n callback: (cell: VCell, row: VCell[], i: number) => any\r\n ) {\r\n if (col !== undefined) {\r\n for (let i = 0; this.cells && i < this.cells.length; i++) {\r\n callback(this.getCell(i, col), this.cells[i], i);\r\n }\r\n }\r\n }\r\n\r\n private forEachCellOfRow(row: number | undefined, callback: (cell: VCell, i: number) => any) {\r\n if (row !== undefined) {\r\n for (let i = 0; this.cells && i < this.cells[row].length; i++) {\r\n callback(this.getCell(row, i), i);\r\n }\r\n }\r\n }\r\n\r\n private recalculateSpans(row: number, col: number) {\r\n let td = this.getCell(row, col).td;\r\n if (td) {\r\n td.colSpan = this.countSpanLeft(row, col);\r\n td.rowSpan = this.countSpanAbove(row, col);\r\n if (td.colSpan == 1) {\r\n td.removeAttribute('colSpan');\r\n }\r\n if (td.rowSpan == 1) {\r\n td.removeAttribute('rowSpan');\r\n }\r\n }\r\n }\r\n\r\n private countSpanLeft(row: number, col: number) {\r\n let result = 1;\r\n for (let i = col + 1; this.cells && i < this.cells[row].length; i++) {\r\n let cell = this.getCell(row, i);\r\n if (cell.td || !cell.spanLeft) {\r\n break;\r\n }\r\n result++;\r\n }\r\n return result;\r\n }\r\n\r\n private countSpanAbove(row: number, col: number) {\r\n let result = 1;\r\n for (let i = row + 1; this.cells && i < this.cells.length; i++) {\r\n let cell = this.getCell(i, col);\r\n if (cell.td || !cell.spanAbove) {\r\n break;\r\n }\r\n result++;\r\n }\r\n return result;\r\n }\r\n\r\n private normalizeEmptyTableCells() {\r\n for (let i = 0, row; (row = this.table.rows[i]); i++) {\r\n for (let j = 0, cell; (cell = row.cells[j]); j++) {\r\n if (cell) {\r\n if (!cell.innerHTML || !cell.innerHTML.trim()) {\r\n cell.appendChild(document.createElement('br'));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /* normalize width/height for each cell in the table */\r\n public normalizeTableCellSize(zoomScale?: number | SizeTransformer) {\r\n // remove width/height for each row\r\n for (let i = 0, row; (row = this.table.rows[i]); i++) {\r\n row.removeAttribute('width');\r\n row.style.setProperty('width', null);\r\n row.removeAttribute('height');\r\n row.style.setProperty('height', null);\r\n }\r\n\r\n // set width/height for each cell\r\n for (let i = 0; this.cells && i < this.cells.length; i++) {\r\n for (let j = 0; j < this.cells[i].length; j++) {\r\n const cell = this.cells[i][j];\r\n if (cell) {\r\n const func =\r\n typeof zoomScale == 'number' ? (n: number) => n / zoomScale : zoomScale;\r\n const width = cell.width || 0;\r\n const height = cell.height || 0;\r\n\r\n setHTMLElementSizeInPx(\r\n cell.td,\r\n func?.(width) || width,\r\n func?.(height) || height\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n private normalizeSize(sizeTransformer: SizeTransformer | undefined) {\r\n this.normalizeEmptyTableCells();\r\n this.normalizeTableCellSize(sizeTransformer);\r\n\r\n const rect = this.table.getBoundingClientRect();\r\n\r\n // Make sure table width/height is fixed to avoid shifting effect\r\n setHTMLElementSizeInPx(\r\n this.table,\r\n sizeTransformer?.(rect.width) || rect.width,\r\n sizeTransformer?.(rect.height) || rect.height\r\n );\r\n }\r\n}\r\n\r\nfunction setHTMLElementSizeInPx(\r\n element: HTMLElement | null | undefined,\r\n newWidth: number,\r\n newHeight: number\r\n) {\r\n if (!!element) {\r\n element.removeAttribute('width');\r\n element.removeAttribute('height');\r\n element.style.boxSizing = 'border-box';\r\n element.style.width = `${newWidth}px`;\r\n element.style.height = `${newHeight}px`;\r\n }\r\n}\r\n\r\nfunction getTableFromTd(td: HTMLTableCellElement) {\r\n let result: Element | null = td;\r\n for (; result && result.tagName != 'TABLE'; result = result.parentElement) {}\r\n return result;\r\n}\r\n\r\n/**\r\n * Clone a table cell\r\n * @param cell The cell to clone\r\n */\r\nfunction cloneCell(cell: VCell): VCell {\r\n return {\r\n td: cloneNode(cell.td),\r\n spanAbove: cell.spanAbove,\r\n spanLeft: cell.spanLeft,\r\n };\r\n}\r\n\r\n/**\r\n * Clone a node without its children.\r\n * @param node The node to clone\r\n */\r\nfunction cloneNode(node: T | null | undefined): T | null {\r\n let newNode = node ? node.cloneNode(false /*deep*/) : null;\r\n if (safeInstanceOf(newNode, 'HTMLTableCellElement')) {\r\n newNode.removeAttribute('id');\r\n if (!newNode.firstChild) {\r\n newNode.appendChild(node!.ownerDocument!.createElement('br'));\r\n }\r\n }\r\n return newNode;\r\n}\r\n","import changeElementTag from '../utils/changeElementTag';\nimport setColor from '../utils/setColor';\nimport { DarkColorHandler, TableBorderFormat, TableFormat, VCell } from 'roosterjs-editor-types';\nimport { getTableCellMetadata } from './tableCellInfo';\nconst TRANSPARENT = 'transparent';\nconst TABLE_CELL_TAG_NAME = 'TD';\nconst TABLE_HEADER_TAG_NAME = 'TH';\n\n/**\n * @internal\n * Apply the given table format to this virtual table\n * @param format Table format to apply\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\n */\nexport default function applyTableFormat(\n table: HTMLTableElement,\n cells: VCell[][],\n format: Required,\n darkColorHandler?: DarkColorHandler | null\n) {\n if (!format) {\n return;\n }\n table.style.borderCollapse = 'collapse';\n setBordersType(cells, format);\n setCellColor(cells, format, darkColorHandler);\n setFirstColumnFormat(cells, format);\n setHeaderRowFormat(cells, format, darkColorHandler);\n}\n\n/**\n * Check if the cell has shade\n * @param cell\n * @returns\n */\nfunction hasCellShade(cell: VCell) {\n if (!cell.td) {\n return false;\n }\n\n return !!getTableCellMetadata(cell.td)?.bgColorOverride;\n}\n\n/**\n * Set color to the table\n * @param format the format that must be applied\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\n */\nfunction setCellColor(\n cells: VCell[][],\n format: TableFormat,\n darkColorHandler?: DarkColorHandler | null\n) {\n const color = (index: number) => (index % 2 === 0 ? format.bgColorEven : format.bgColorOdd);\n const { hasBandedRows, hasBandedColumns, bgColorOdd, bgColorEven } = format;\n const shouldColorWholeTable = !hasBandedRows && bgColorOdd === bgColorEven ? true : false;\n cells.forEach((row, index) => {\n row.forEach(cell => {\n if (cell.td && !hasCellShade(cell)) {\n if (hasBandedRows) {\n const backgroundColor = color(index);\n setColor(\n cell.td,\n backgroundColor || TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n } else if (shouldColorWholeTable) {\n setColor(\n cell.td,\n format.bgColorOdd || TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n } else {\n setColor(\n cell.td,\n TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n }\n }\n });\n });\n if (hasBandedColumns) {\n cells.forEach(row => {\n row.forEach((cell, index) => {\n const backgroundColor = color(index);\n if (cell.td && backgroundColor && !hasCellShade(cell)) {\n setColor(\n cell.td,\n backgroundColor,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n }\n });\n });\n }\n}\n\n/**\n * Set color to borders of an table\n * @param format\n * @returns\n */\nfunction setBorderColors(td: HTMLTableCellElement, format: Partial) {\n td.style.borderTop = getBorderStyle(format.topBorderColor);\n td.style.borderLeft = getBorderStyle(format.verticalBorderColor);\n td.style.borderRight = getBorderStyle(format.verticalBorderColor);\n td.style.borderBottom = getBorderStyle(format.bottomBorderColor);\n}\n\n/**\n * Format the border type\n * @returns\n */\nfunction formatBorders(\n format: TableFormat,\n td: HTMLTableCellElement,\n isFirstRow: boolean,\n isLastRow: boolean,\n isFirstColumn: boolean,\n isLastColumn: boolean\n) {\n setBorderColors(td, format);\n switch (format.tableBorderFormat) {\n case TableBorderFormat.DEFAULT:\n return;\n case TableBorderFormat.LIST_WITH_SIDE_BORDERS:\n if (!isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (!isLastColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n\n break;\n case TableBorderFormat.FIRST_COLUMN_HEADER_EXTERNAL:\n if (!isFirstRow) {\n td.style.borderTopColor = TRANSPARENT;\n }\n\n if (!isLastRow && !isFirstRow) {\n td.style.borderBottomColor = TRANSPARENT;\n }\n if (!isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (!isLastColumn && !isFirstColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n if (isFirstColumn && isFirstRow) {\n td.style.borderRightColor = TRANSPARENT;\n }\n\n break;\n case TableBorderFormat.NO_HEADER_BORDERS:\n if (isFirstRow) {\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isLastColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n break;\n case TableBorderFormat.NO_SIDE_BORDERS:\n if (isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isLastColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n break;\n case TableBorderFormat.ESPECIAL_TYPE_1:\n if (isFirstRow) {\n td.style.borderRightColor = TRANSPARENT;\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n }\n if (isFirstRow && isFirstColumn) {\n td.style.borderLeftColor = format.verticalBorderColor || TRANSPARENT;\n td.style.borderBottomColor = format.bottomBorderColor || TRANSPARENT;\n td.style.borderTopColor = format.topBorderColor || TRANSPARENT;\n }\n break;\n case TableBorderFormat.ESPECIAL_TYPE_2:\n if (isFirstRow) {\n td.style.borderRightColor = TRANSPARENT;\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n }\n if (isFirstRow && isFirstColumn) {\n td.style.borderLeftColor = format.verticalBorderColor || TRANSPARENT;\n td.style.borderBottomColor = format.bottomBorderColor || TRANSPARENT;\n td.style.borderTopColor = format.topBorderColor || TRANSPARENT;\n }\n if (!isFirstRow && !isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n }\n\n break;\n case TableBorderFormat.ESPECIAL_TYPE_3:\n if (isFirstRow) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderBottomColor = TRANSPARENT;\n }\n if (!isFirstRow && !isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n }\n if (isFirstRow && isFirstColumn) {\n td.style.borderBottomColor = format.bottomBorderColor || TRANSPARENT;\n }\n break;\n }\n}\n\n/**\n * Organize the borders of table according to a border type\n * @param format\n * @returns\n */\nfunction setBordersType(cells: VCell[][], format: TableFormat) {\n cells.forEach((row, rowIndex) => {\n row.forEach((cell, cellIndex) => {\n if (cell.td) {\n formatBorders(\n format,\n cell.td,\n rowIndex === 0,\n rowIndex === cells.length - 1,\n cellIndex === 0,\n cellIndex === row.length - 1\n );\n }\n });\n });\n}\n\n/**\n * Apply custom design to the first table column\n * @param format\n * @returns\n */\nfunction setFirstColumnFormat(cells: VCell[][], format: Partial) {\n if (!format.hasFirstColumn) {\n cells.forEach(row => {\n row.forEach((cell, cellIndex) => {\n if (cell.td && cellIndex === 0) {\n cell.td = changeElementTag(\n cell.td,\n TABLE_CELL_TAG_NAME\n ) as HTMLTableCellElement;\n cell.td.scope = '';\n }\n });\n });\n return;\n }\n cells.forEach((row, rowIndex) => {\n row.forEach((cell, cellIndex) => {\n if (cell.td && cellIndex === 0) {\n if (rowIndex !== 0 && !hasCellShade(cell)) {\n cell.td.style.borderTopColor = TRANSPARENT;\n setColor(\n cell.td,\n TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */\n );\n }\n if (rowIndex !== cells.length - 1 && rowIndex !== 0) {\n cell.td.style.borderBottomColor = TRANSPARENT;\n }\n cell.td = changeElementTag(cell.td, TABLE_HEADER_TAG_NAME) as HTMLTableCellElement;\n cell.td.scope = 'col';\n }\n });\n });\n}\n\n/**\n * Apply custom design to the Header Row\n * @param format\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\n * @returns\n */\nfunction setHeaderRowFormat(\n cells: VCell[][],\n format: TableFormat,\n darkColorHandler?: DarkColorHandler | null\n) {\n if (!format.hasHeaderRow) {\n cells[0]?.forEach(cell => {\n if (cell.td) {\n cell.td = changeElementTag(cell.td, TABLE_CELL_TAG_NAME) as HTMLTableCellElement;\n cell.td.scope = '';\n }\n });\n return;\n }\n cells[0]?.forEach(cell => {\n if (cell.td && format.headerRowColor) {\n if (!hasCellShade(cell)) {\n setColor(\n cell.td,\n format.headerRowColor,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n }\n cell.td.style.borderRightColor = format.headerRowColor;\n cell.td.style.borderLeftColor = format.headerRowColor;\n cell.td.style.borderTopColor = format.headerRowColor;\n cell.td = changeElementTag(cell.td, TABLE_HEADER_TAG_NAME) as HTMLTableCellElement;\n cell.td.scope = 'row';\n }\n });\n}\n\nfunction getBorderStyle(style?: string | null) {\n const color = style ? style : 'transparent';\n return 'solid 1px ' + color;\n}\n","import { saveTableCellMetadata } from './tableCellInfo';\n/**\n * Clone css styles from a element an set to another.\n * @param cell cell that will receive the styles\n * @param styledCell cell where the styles will be clone\n */\n\nexport default function cloneCellStyles(\n cell: HTMLTableCellElement,\n styledCell: HTMLTableCellElement\n) {\n const styles = styledCell.getAttribute('style');\n if (styles) {\n cell.setAttribute('style', styles);\n saveTableCellMetadata(cell, {\n bgColorOverride: true,\n });\n }\n}\n","import VTable from './VTable';\nimport { TableSelection } from 'roosterjs-editor-types';\n\n/**\n * Check if the whole table is selected\n * @param vTable VTable to check whether all cells are selected\n * @param selection Table selection with first cell selected and last cell selected coordinates.\n * @returns\n */\nexport default function isWholeTableSelected(vTable: VTable, selection: TableSelection) {\n if (!selection || !vTable.cells) {\n return false;\n }\n const { firstCell, lastCell } = selection;\n const rowsLength = vTable.cells.length - 1;\n const rowCells = vTable.cells[rowsLength];\n if (!rowCells) {\n return false;\n }\n const colIndex = rowCells.length - 1;\n const firstX = firstCell.x;\n const firstY = firstCell.y;\n const lastX = lastCell.x;\n const lastY = lastCell.y;\n return firstX == 0 && firstY == 0 && lastX == colIndex && lastY == rowsLength;\n}\n","import cloneCellStyles from './cloneCellStyles';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport VTable from './VTable';\nimport { NodePosition, TableOperation } from 'roosterjs-editor-types';\n\n/**\n *\n * Pastes a table inside another, modifying the original to create a merged one\n * @param currentTd The cell where the cursor is in the table to paste into\n * @param rootNodeToInsert A Node containing the table to be inserted\n * @param position The position to paste the table\n * @param range The selected range of the table\n *\n * Position and range are here for when table selection allows to move pivot point\n */\nexport default function pasteTable(\n currentTd: HTMLTableCellElement,\n rootNodeToInsert: HTMLTableElement,\n position?: NodePosition,\n range?: Range\n) {\n // This is the table on the clipboard\n let newTable = new VTable(rootNodeToInsert);\n // This table is already on the editor\n let currentTable = new VTable(currentTd);\n\n // Which cell in the currentTable is the cursor placed\n let cursorRow = currentTable.row!;\n let cursorCol = currentTable.col!;\n\n // Total rows and columns of the final table\n let rows = cursorRow + newTable.cells?.length! ?? 0;\n let columns = cursorCol + newTable.cells?.[0].length! ?? 0;\n\n // Add new rows\n currentTable.row = currentTable.cells!.length! - 1;\n while (currentTable.cells!.length! < rows) {\n currentTable.edit(TableOperation.InsertBelow);\n }\n\n // Add new columns\n currentTable.col = currentTable.cells![0].length! - 1;\n while (currentTable.cells![0].length! < columns) {\n currentTable.edit(TableOperation.InsertRight);\n }\n\n // Create final table\n for (let i = cursorRow; i < rows; i++) {\n for (let j = cursorCol; j < columns; j++) {\n let cell = currentTable.getCell(i, j);\n let newCell = newTable.getTd(i - cursorRow, j - cursorCol);\n if (cell.td && newCell) {\n moveChildNodes(cell.td, newCell);\n cloneCellStyles(cell.td, newCell);\n } else {\n cell.td = document.createElement('td');\n }\n }\n }\n\n currentTable.writeBack();\n}\n","import { createBooleanDefinition, createObjectDefinition } from '../metadata/definitionCreators';\nimport { getMetadata, setMetadata } from '../metadata/metadata';\nimport { TableCellMetadataFormat } from 'roosterjs-editor-types';\n\nconst BooleanDefinition = createBooleanDefinition(\n false /** isOptional */,\n undefined /** value */,\n true /** allowNull */\n);\n\nconst TableCellFormatMetadata = createObjectDefinition>(\n {\n bgColorOverride: BooleanDefinition,\n },\n false /* isOptional */,\n true /** allowNull */\n);\n\n/**\n * @internal\n * Get the format info of a table cell\n * @param cell The table cell to use\n */\nexport function getTableCellMetadata(cell: HTMLTableCellElement) {\n return getMetadata(cell, TableCellFormatMetadata);\n}\n\n/**\n * Add metadata to a cell\n * @param cell The table cell to add the metadata\n * @param format The format of the table\n */\nexport function saveTableCellMetadata(cell: HTMLTableCellElement, format: TableCellMetadataFormat) {\n if (cell && format) {\n setMetadata(cell, format, TableCellFormatMetadata);\n }\n}\n","import { getMetadata, setMetadata } from '../metadata/metadata';\nimport { TableBorderFormat, TableFormat } from 'roosterjs-editor-types';\nimport {\n createBooleanDefinition,\n createNumberDefinition,\n createObjectDefinition,\n createStringDefinition,\n} from '../metadata/definitionCreators';\n\nconst NullStringDefinition = createStringDefinition(\n false /** isOptional */,\n undefined /** value */,\n true /** allowNull */\n);\n\nconst BooleanDefinition = createBooleanDefinition(false /** isOptional */);\n\nconst TableFormatMetadata = createObjectDefinition>(\n {\n topBorderColor: NullStringDefinition,\n bottomBorderColor: NullStringDefinition,\n verticalBorderColor: NullStringDefinition,\n hasHeaderRow: BooleanDefinition,\n headerRowColor: NullStringDefinition,\n hasFirstColumn: BooleanDefinition,\n hasBandedColumns: BooleanDefinition,\n hasBandedRows: BooleanDefinition,\n bgColorEven: NullStringDefinition,\n bgColorOdd: NullStringDefinition,\n tableBorderFormat: createNumberDefinition(\n false /** isOptional */,\n undefined /* value */,\n TableBorderFormat.DEFAULT /* first table border format, TODO: Use Min/Max to specify valid values */,\n TableBorderFormat.CLEAR /* last table border format, , TODO: Use Min/Max to specify valid values */\n ),\n keepCellShade: createBooleanDefinition(true /** isOptional */),\n },\n false /* isOptional */,\n true /** allowNull */\n);\n\n/**\n * Get the format info of a table\n * If the table does not have a info saved, it will be retrieved from the css styles\n * @param table The table that has the info\n */\nexport function getTableFormatInfo(table: HTMLTableElement) {\n return getMetadata(table, TableFormatMetadata);\n}\n\n/**\n * @internal\n * Save the format info of a table\n * @param table The table the info will be saved\n * @param format The format of the table\n */\nexport function saveTableInfo(table: HTMLTableElement, format: TableFormat) {\n if (table && format) {\n setMetadata(table, format, TableFormatMetadata);\n }\n}\n","import { BrowserInfo } from 'roosterjs-editor-types';\r\n\r\nconst isAndroidRegex = /android/i;\r\n\r\n/**\r\n * Get current browser information from user agent string\r\n * @param userAgent The userAgent string of a browser\r\n * @param appVersion The appVersion string of a browser\r\n * @param vendor The vendor string of a browser\r\n * @returns The BrowserInfo object calculated from the given userAgent and appVersion\r\n */\r\nexport function getBrowserInfo(\r\n userAgent: string,\r\n appVersion: string,\r\n vendor?: string\r\n): BrowserInfo {\r\n // checks whether the browser is running in IE\r\n // IE11 will use rv in UA instead of MSIE. Unfortunately Firefox also uses this. We should also look for \"Trident\" to confirm this.\r\n // There have been cases where companies using older version of IE and custom UserAgents have broken this logic (e.g. IE 10 and KellyServices)\r\n // therefore we should check that the Trident/rv combo is not just from an older IE browser\r\n let isIE11OrGreater = userAgent.indexOf('rv:') != -1 && userAgent.indexOf('Trident') != -1;\r\n let isIE = userAgent.indexOf('MSIE') != -1 || isIE11OrGreater;\r\n\r\n // IE11+ may also have 'Chrome', 'Firefox' and 'Safari' in user agent. But it will have 'trident' as well\r\n let isChrome = false;\r\n let isFirefox = false;\r\n let isSafari = false;\r\n let isEdge = false;\r\n let isWebKit = userAgent.indexOf('WebKit') != -1;\r\n let isMobileOrTablet = false;\r\n\r\n // Reference: http://detectmobilebrowsers.com/\r\n // The default regex on the website doesn't consider tablet.\r\n // To support tablet, add |android|ipad|playbook|silk to the first regex according to the info in /about page\r\n ((userAgentOrVendor: string) => {\r\n if (\r\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(\r\n userAgentOrVendor\r\n ) ||\r\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\r\n userAgentOrVendor.substr(0, 4)\r\n )\r\n ) {\r\n isMobileOrTablet = true;\r\n }\r\n })(userAgent || vendor || '');\r\n\r\n if (!isIE) {\r\n isChrome = userAgent.indexOf('Chrome') != -1;\r\n isFirefox = userAgent.indexOf('Firefox') != -1;\r\n if (userAgent.indexOf('Safari') != -1) {\r\n // Android and Chrome have Safari in the user string\r\n isSafari = userAgent.indexOf('Chrome') == -1 && userAgent.indexOf('Android') == -1;\r\n }\r\n\r\n // Sample Edge UA: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10121\r\n isEdge = userAgent.indexOf('Edge') != -1;\r\n\r\n // When it is edge, it should not be chrome or firefox. and it is also not webkit\r\n if (isEdge) {\r\n isWebKit = isChrome = isFirefox = false;\r\n }\r\n }\r\n\r\n let isMac = appVersion.indexOf('Mac') != -1;\r\n let isWin = appVersion.indexOf('Win') != -1 || appVersion.indexOf('NT') != -1;\r\n let isAndroid = isAndroidRegex.test(userAgent);\r\n\r\n return {\r\n isMac,\r\n isWin,\r\n isWebKit,\r\n isIE,\r\n isIE11OrGreater,\r\n isSafari,\r\n isChrome,\r\n isFirefox,\r\n isEdge,\r\n isIEOrEdge: isIE || isEdge,\r\n isAndroid,\r\n isMobileOrTablet,\r\n };\r\n}\r\n\r\n/**\r\n * Browser object contains browser and operating system information of current environment\r\n */\r\nexport const Browser =\r\n typeof window !== 'undefined' && window\r\n ? getBrowserInfo(\r\n window.navigator.userAgent,\r\n window.navigator.appVersion,\r\n window.navigator.vendor\r\n )\r\n : {};\r\n","import setColor from './setColor';\r\nimport { DarkColorHandler, DefaultFormat } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Apply format to an HTML element\r\n * @param element The HTML element to apply format to\r\n * @param format The format to apply\r\n * @param isDarkMode Whether the content should be formatted in dark mode\r\n * @param darkColorHandler An optional dark color handler object. When it is passed, we will use this handler to do variable-based dark color instead of original dataset base dark color\r\n */\r\nexport default function applyFormat(\r\n element: HTMLElement,\r\n format: DefaultFormat,\r\n isDarkMode?: boolean,\r\n darkColorHandler?: DarkColorHandler | null\r\n) {\r\n if (format) {\r\n let elementStyle = element.style;\r\n let {\r\n fontFamily,\r\n fontSize,\r\n textColor,\r\n textColors,\r\n backgroundColor,\r\n backgroundColors,\r\n bold,\r\n italic,\r\n underline,\r\n } = format;\r\n\r\n if (fontFamily) {\r\n elementStyle.fontFamily = fontFamily;\r\n }\r\n if (fontSize) {\r\n elementStyle.fontSize = fontSize;\r\n }\r\n\r\n if (textColors) {\r\n setColor(\r\n element,\r\n textColors,\r\n false /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n } else if (textColor) {\r\n setColor(\r\n element,\r\n textColor,\r\n false /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n }\r\n\r\n if (backgroundColors) {\r\n setColor(\r\n element,\r\n backgroundColors,\r\n true /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n } else if (backgroundColor) {\r\n setColor(\r\n element,\r\n backgroundColor,\r\n true /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n }\r\n\r\n if (bold) {\r\n elementStyle.fontWeight = 'bold';\r\n }\r\n if (italic) {\r\n elementStyle.fontStyle = 'italic';\r\n }\r\n if (underline) {\r\n elementStyle.textDecoration = 'underline';\r\n }\r\n }\r\n}\r\n","import getComputedStyles from './getComputedStyles';\r\nimport getTagOfNode from './getTagOfNode';\r\nimport moveChildNodes from './moveChildNodes';\r\n\r\n/**\r\n * Change tag of an HTML Element to a new one, and replace it from DOM tree\r\n * @param element The element to change tag\r\n * @param newTag New tag to change to\r\n * @returns The new element with new tag\r\n */\r\nexport default function changeElementTag(\r\n element: HTMLElement,\r\n newTag: K\r\n): HTMLElementTagNameMap[K];\r\n\r\n/**\r\n * Change tag of an HTML Element to a new one, and replace it from DOM tree\r\n * @param element The element to change tag\r\n * @param newTag New tag to change to\r\n * @returns The new element with new tag\r\n */\r\nexport default function changeElementTag(element: HTMLElement, newTag: string): HTMLElement | null;\r\n\r\nexport default function changeElementTag(element: HTMLElement, newTag: string): HTMLElement | null {\r\n if (!element || !newTag) {\r\n return null;\r\n }\r\n\r\n const origianlTag = getTagOfNode(element);\r\n\r\n if (origianlTag == newTag.toUpperCase()) {\r\n // Already in the target tag, no need to change\r\n return element;\r\n }\r\n\r\n let newElement = element.ownerDocument.createElement(newTag);\r\n\r\n for (let i = 0; i < element.attributes.length; i++) {\r\n let attr = element.attributes[i];\r\n newElement.setAttribute(attr.name, attr.value);\r\n }\r\n\r\n moveChildNodes(newElement, element);\r\n\r\n if (origianlTag == 'P' || getTagOfNode(newElement) == 'P') {\r\n [newElement.style.marginTop, newElement.style.marginBottom] = getComputedStyles(element, [\r\n 'margin-top',\r\n 'margin-bottom',\r\n ]);\r\n }\r\n\r\n if (element.parentNode) {\r\n element.parentNode.replaceChild(newElement, element);\r\n }\r\n\r\n return newElement;\r\n}\r\n","import contains from './contains';\r\nimport splitParentNode from './splitParentNode';\r\nimport toArray from '../jsUtils/toArray';\r\n\r\n/**\r\n * Collapse nodes within the given start and end nodes to their common ancestor node,\r\n * split parent nodes if necessary\r\n * @param root The root node of the scope\r\n * @param start The start node\r\n * @param end The end node\r\n * @param canSplitParent True to allow split parent node there are nodes before start or after end under the same parent\r\n * and the returned nodes will be all nodes from start through end after splitting\r\n * False to disallow split parent\r\n * @returns When canSplitParent is true, returns all node from start through end after splitting,\r\n * otherwise just return start and end\r\n */\r\nexport default function collapseNodes(\r\n root: Node,\r\n start: Node,\r\n end: Node,\r\n canSplitParent: boolean\r\n): Node[] {\r\n if (!contains(root, start) || !contains(root, end)) {\r\n return [];\r\n }\r\n\r\n start = collapse(root, start, end, true /*isStart*/, canSplitParent);\r\n end = collapse(root, end, start, false /*isStart*/, canSplitParent);\r\n\r\n if (contains(start, end, true /*treatSameNodeAsContain*/)) {\r\n return [start];\r\n } else if (contains(end, start)) {\r\n return [end];\r\n } else if (start.parentNode == end.parentNode) {\r\n let nodes: Node[] = start.parentNode ? toArray(start.parentNode?.childNodes) : [];\r\n let startIndex = nodes.indexOf(start);\r\n let endIndex = nodes.indexOf(end);\r\n return nodes.slice(startIndex, endIndex + 1);\r\n } else {\r\n return [start, end];\r\n }\r\n}\r\n\r\n/**\r\n * @internal\r\n * Collapse a node by traversing its parent nodes until we get the common ancestor node of node and ref node\r\n * @param root Root node, traversing will be limited under this scope\r\n * @param node The node to collapse\r\n * @param ref Ref node. The result will be the nearest common ancestor node of the given node and this ref node\r\n * @param isStart Whether the given node is start of the sequence of nodes to collapse\r\n * @param canSplitParent Whether splitting parent node is allowed\r\n * @returns The common ancestor node of the given node ref node\r\n */\r\nexport function collapse(\r\n root: Node,\r\n node: Node,\r\n ref: Node,\r\n isStart: boolean,\r\n canSplitParent: boolean\r\n): Node {\r\n while (node.parentNode != root && !contains(node.parentNode, ref)) {\r\n if ((isStart && node.previousSibling) || (!isStart && node.nextSibling)) {\r\n if (!canSplitParent) {\r\n break;\r\n }\r\n splitParentNode(node, isStart);\r\n }\r\n\r\n if (!node.parentNode) {\r\n break;\r\n }\r\n\r\n node = node.parentNode;\r\n }\r\n return node;\r\n}\r\n","import safeInstanceOf from './safeInstanceOf';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Test if a node contains another node\r\n * @param container The container node\r\n * @param contained The node to check if it is inside container\r\n * @param treatSameNodeAsContain When container and contained are the same node,\r\n * return true if this param is set to true, otherwise return false. Default value is false\r\n * @returns True if contained is inside container, or they are the same node when treatSameNodeAsContain is true.\r\n * Otherwise false.\r\n */\r\nexport default function contains(\r\n container: Node | null | undefined,\r\n contained: Node | null | undefined,\r\n treatSameNodeAsContain?: boolean\r\n): boolean;\r\n\r\n/**\r\n * Test if a node contains a given range\r\n * @param container The container node\r\n * @param contained The range to check if it is inside container\r\n * @returns True if contained is inside container, otherwise false\r\n */\r\nexport default function contains(\r\n container: Node | null | undefined,\r\n contained: Range | null | undefined\r\n): boolean;\r\n\r\nexport default function contains(\r\n container: Node | null | undefined,\r\n contained: Node | Range | null | undefined,\r\n treatSameNodeAsContain?: boolean\r\n): boolean {\r\n if (!container || !contained) {\r\n return false;\r\n }\r\n\r\n if (treatSameNodeAsContain && container == contained) {\r\n return true;\r\n }\r\n\r\n if (safeInstanceOf(contained, 'Range')) {\r\n contained = contained && contained.commonAncestorContainer;\r\n treatSameNodeAsContain = true;\r\n }\r\n\r\n if (contained && contained.nodeType == NodeType.Text) {\r\n contained = contained.parentNode;\r\n treatSameNodeAsContain = true;\r\n }\r\n\r\n if (container.nodeType != NodeType.Element && container.nodeType != NodeType.DocumentFragment) {\r\n return !!treatSameNodeAsContain && container == contained;\r\n }\r\n\r\n return (\r\n !!(treatSameNodeAsContain || container != contained) &&\r\n internalContains(container, contained)\r\n );\r\n}\r\n\r\nfunction internalContains(container: Node, contained: Node | null): boolean {\r\n if (container.contains) {\r\n return container.contains(contained);\r\n } else {\r\n while (contained) {\r\n if (contained == container) {\r\n return true;\r\n }\r\n\r\n contained = contained.parentNode;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","import getObjectKeys from '../jsUtils/getObjectKeys';\nimport safeInstanceOf from './safeInstanceOf';\nimport { Browser } from './Browser';\nimport { CreateElementData, KnownCreateElementDataIndex } from 'roosterjs-editor-types';\nimport type { CompatibleKnownCreateElementDataIndex } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * All known CreateElementData used by roosterjs to create elements\n */\nexport const KnownCreateElementData: Record = {\n [KnownCreateElementDataIndex.None]: { tag: '' },\n\n // Edge can sometimes lose current format when Enter to new line.\n // So here we add an extra SPAN for Edge to workaround this bug\n [KnownCreateElementDataIndex.EmptyLine]: Browser.isEdge\n ? { tag: 'div', children: [{ tag: 'span', children: [{ tag: 'br' }] }] }\n : { tag: 'div', children: [{ tag: 'br' }] },\n [KnownCreateElementDataIndex.BlockquoteWrapper]: {\n tag: 'blockquote',\n style: 'margin-top:0;margin-bottom:0',\n },\n [KnownCreateElementDataIndex.CopyPasteTempDiv]: {\n tag: 'div',\n style:\n 'width: 600px; height: 1px; overflow: hidden; position: fixed; top: 0; left; 0; -webkit-user-select: text',\n attributes: {\n contenteditable: 'true',\n },\n },\n [KnownCreateElementDataIndex.BlockListItem]: { tag: 'li', style: 'display:block' },\n [KnownCreateElementDataIndex.ContextMenuWrapper]: {\n tag: 'div',\n style: 'position: fixed; width: 0; height: 0',\n },\n [KnownCreateElementDataIndex.ImageEditWrapper]: {\n tag: 'span',\n style: 'max-width:100%;position:relative',\n children: [\n {\n tag: 'div',\n style: 'width:100%;height:100%;position:relative;overflow:hidden',\n },\n ],\n },\n [KnownCreateElementDataIndex.TableHorizontalResizer]: {\n tag: 'div',\n style: 'position: fixed; cursor: row-resize; user-select: none',\n },\n [KnownCreateElementDataIndex.TableVerticalResizer]: {\n tag: 'div',\n style: 'position: fixed; cursor: col-resize; user-select: none',\n },\n [KnownCreateElementDataIndex.TableResizerLTR]: {\n tag: 'div',\n style: 'position: fixed; cursor: nw-resize; user-select: none; border: 1px solid #808080',\n },\n [KnownCreateElementDataIndex.TableResizerRTL]: {\n tag: 'div',\n style: 'position: fixed; cursor: ne-resize; user-select: none; border: 1px solid #808080',\n },\n [KnownCreateElementDataIndex.TableSelector]: {\n tag: 'div',\n style: 'position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080',\n },\n [KnownCreateElementDataIndex.EmptyLineFormatInSpan]: {\n tag: 'div',\n children: [{ tag: 'span', children: [{ tag: 'br' }] }],\n },\n};\n\n/**\n * Create DOM element from the given CreateElementData\n * @param elementData The CreateElementData or an index of a known CreateElementData used for creating this element\n * @param document The document to create the element from\n * @returns The root DOM element just created\n */\nexport default function createElement(\n elementData:\n | CreateElementData\n | KnownCreateElementDataIndex\n | CompatibleKnownCreateElementDataIndex,\n document: Document\n): Element | null {\n if (typeof elementData == 'number') {\n elementData = KnownCreateElementData[elementData];\n }\n\n if (!elementData || !elementData.tag) {\n return null;\n }\n\n const { tag, namespace, className, style, dataset, attributes, children } = elementData;\n const result = namespace\n ? document.createElementNS(namespace, tag)\n : document.createElement(tag);\n\n if (style) {\n result.setAttribute('style', style);\n }\n\n if (className) {\n result.className = className;\n }\n\n if (dataset && safeInstanceOf(result, 'HTMLElement')) {\n getObjectKeys(dataset).forEach(datasetName => {\n result.dataset[datasetName] = dataset[datasetName];\n });\n }\n\n if (attributes) {\n getObjectKeys(attributes).forEach(attrName => {\n result.setAttribute(attrName, attributes[attrName]);\n });\n }\n\n if (children) {\n children.forEach(child => {\n if (typeof child === 'string') {\n result.appendChild(document.createTextNode(child));\n } else if (child) {\n const childElement = createElement(child, document);\n if (childElement) {\n result.appendChild(childElement);\n }\n }\n });\n }\n\n return result;\n}\n","import contains from './contains';\r\nimport matchesSelector from './matchesSelector';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Find closest element ancestor start from the given node which matches the given selector\r\n * @param node Find ancestor start from this node\r\n * @param root Root node where the search should stop at. The return value can never be this node\r\n * @param selector The expected selector. If null, return the first HTML Element found from start node\r\n * @returns An HTML element which matches the given selector. If the given start node matches the selector,\r\n * returns the given node\r\n */\r\nexport default function findClosestElementAncestor(\r\n node: Node | null,\r\n root?: Node,\r\n selector?: string\r\n): HTMLElement | null {\r\n node = !node ? null : node.nodeType == NodeType.Element ? node : node.parentNode;\r\n let element = node && node.nodeType == NodeType.Element ? node : null;\r\n\r\n if (element && selector) {\r\n if (element.closest) {\r\n element = element.closest(selector) as HTMLElement;\r\n } else {\r\n while (element && element != root && !matchesSelector(element, selector)) {\r\n element = element.parentElement;\r\n }\r\n }\r\n }\r\n\r\n return !root || contains(root, element) ? element : null;\r\n}\r\n","import toArray from '../jsUtils/toArray';\r\n\r\n/**\r\n * @deprecated\r\n * Creates an HTML node array from html\r\n * @param html the html string to create HTML elements from\r\n * @param ownerDocument Owner document of the result HTML elements\r\n * @returns An HTML node array to represent the given html string\r\n */\r\nexport default function fromHtml(html: string, ownerDocument: HTMLDocument): Node[] {\r\n let element = ownerDocument.createElement('DIV');\r\n element.innerHTML = html;\r\n\r\n return toArray(element.childNodes);\r\n}\r\n","import findClosestElementAncestor from './findClosestElementAncestor';\r\n\r\n/**\r\n * Get computed styles of a node\r\n * @param node The node to get computed styles from\r\n * @param styleNames Names of style to get, can be a single name or an array.\r\n * Default value is font-family, font-size, color, background-color\r\n * @returns An array of the computed styles\r\n */\r\nexport default function getComputedStyles(\r\n node: Node,\r\n styleNames: string | string[] = ['font-family', 'font-size', 'color', 'background-color']\r\n): string[] {\r\n let element = findClosestElementAncestor(node);\r\n let result: string[] = [];\r\n styleNames = Array.isArray(styleNames) ? styleNames : [styleNames];\r\n if (element) {\r\n let win = element.ownerDocument.defaultView || window;\r\n let styles = win.getComputedStyle(element);\r\n\r\n if (styles) {\r\n for (let style of styleNames) {\r\n let value = styles.getPropertyValue(style) || '';\r\n value = style != 'font-family' ? value.toLowerCase() : value;\r\n value = style == 'font-size' ? px2Pt(value) : value;\r\n result.push(value);\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * A shortcut for getComputedStyles() when only one style is to be retrieved\r\n * @param node The node to get style from\r\n * @param styleName The style name\r\n * @returns The style value\r\n */\r\nexport function getComputedStyle(node: Node, styleName: string): string {\r\n return getComputedStyles(node, styleName)[0] || '';\r\n}\r\n\r\nfunction px2Pt(px: string) {\r\n if (px && px.indexOf('px') == px.length - 2) {\r\n // Edge may not handle the floating computing well which causes the calculated value is a little less than actual value\r\n // So add 0.05 to fix it\r\n return Math.round(parseFloat(px) * 75 + 0.05) / 100 + 'pt';\r\n }\r\n return px;\r\n}\r\n","import safeInstanceOf from './safeInstanceOf';\n\n/**\n * Get innerHTML of the given node\n * @param node The DOM node to get innerHTML from\n */\nexport default function getInnerHTML(node: HTMLElement | DocumentFragment) {\n if (safeInstanceOf(node, 'HTMLElement')) {\n return node.innerHTML;\n } else if (node) {\n const tempNode = node.ownerDocument.createElement('span');\n tempNode.appendChild(node.cloneNode(true /*deep*/));\n return tempNode.innerHTML;\n } else {\n return '';\n }\n}\n","import normalizeRect from './normalizeRect';\nimport { Rect } from 'roosterjs-editor-types';\n\n/**\n * Get the intersected Rect of elements provided\n *\n * @example\n * The result of the following Elements Rects would be:\n {\n top: Element2.top,\n bottom: Element1.bottom,\n left: Element2.left,\n right: Element2.right\n }\n +-------------------------+\n | Element 1 |\n | +-----------------+ |\n | | Element2 | |\n | | | |\n | | | |\n +-------------------------+\n | |\n +-----------------+\n\n * @param elements Elements to use.\n * @param additionalRects additional rects to use\n * @returns If the Rect is valid return the rect, if not, return null.\n */\nexport default function getIntersectedRect(\n elements: HTMLElement[],\n additionalRects: Rect[] = []\n): Rect | null {\n const rects = elements\n .map(element => normalizeRect(element.getBoundingClientRect()))\n .concat(additionalRects)\n .filter(element => !!element) as Rect[];\n\n const result: Rect = {\n top: Math.max(...rects.map(r => r.top)),\n bottom: Math.min(...rects.map(r => r.bottom)),\n left: Math.max(...rects.map(r => r.left)),\n right: Math.min(...rects.map(r => r.right)),\n };\n\n return result.top < result.bottom && result.left < result.right ? result : null;\n}\n","import shouldSkipNode from './shouldSkipNode';\r\nimport { getLeafSibling } from './getLeafSibling';\r\n\r\n/**\r\n * Get first/last leaf node of the given root node.\r\n * @param rootNode Root node to get leaf node from\r\n * @param isFirst True to get first leaf node, false to get last leaf node\r\n */\r\nfunction getLeafNode(rootNode: Node, isFirst: boolean): Node | null {\r\n let getChild = (node: Node): Node | null => (isFirst ? node.firstChild : node.lastChild);\r\n let result = getChild(rootNode);\r\n while (result && getChild(result)) {\r\n result = getChild(result);\r\n }\r\n\r\n if (result && shouldSkipNode(result)) {\r\n result = getLeafSibling(rootNode, result, isFirst);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Get the first meaningful leaf node\r\n * @param rootNode Root node to get leaf node from\r\n */\r\nexport function getFirstLeafNode(rootNode: Node): Node | null {\r\n return getLeafNode(rootNode, true /*isFirst*/);\r\n}\r\n\r\n/**\r\n * Get the last meaningful leaf node\r\n * @param rootNode Root node to get leaf node from\r\n */\r\nexport function getLastLeafNode(rootNode: Node): Node | null {\r\n return getLeafNode(rootNode, false /*isFirst*/);\r\n}\r\n","import contains from './contains';\r\nimport getTagOfNode from './getTagOfNode';\r\nimport shouldSkipNode from './shouldSkipNode';\r\n\r\n/**\r\n * @internal\r\n * This walks forwards/backwards DOM tree to get next meaningful node\r\n * @param rootNode Root node to scope the leaf sibling node\r\n * @param startNode current node to get sibling node from\r\n * @param isNext True to get next leaf sibling node, false to get previous leaf sibling node\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n * @param ignoreSpace (Optional) Ignore pure space text node when check if the node should be skipped\r\n */\r\nexport function getLeafSibling(\r\n rootNode: Node,\r\n startNode: Node,\r\n isNext: boolean,\r\n skipTags?: string[],\r\n ignoreSpace?: boolean\r\n): Node | null {\r\n let result = null;\r\n let getSibling = isNext\r\n ? (node: Node | null) => node?.nextSibling || null\r\n : (node: Node | null) => node?.previousSibling || null;\r\n let getChild = isNext ? (node: Node) => node.firstChild : (node: Node) => node.lastChild;\r\n if (contains(rootNode, startNode)) {\r\n let curNode: Node | null = startNode;\r\n let shouldContinue: boolean = true;\r\n\r\n while (shouldContinue) {\r\n // Find next/previous node, starting from next/previous sibling, then one level up to find next/previous sibling from parent\r\n // till a non-null nextSibling/previousSibling is found or the ceiling is encountered (rootNode)\r\n let parentNode = curNode?.parentNode || null;\r\n curNode = getSibling(curNode);\r\n while (!curNode && parentNode != rootNode) {\r\n curNode = getSibling(parentNode);\r\n parentNode = parentNode?.parentNode || null;\r\n }\r\n\r\n // Now traverse down to get first/last child\r\n while (\r\n curNode &&\r\n (!skipTags || skipTags.indexOf(getTagOfNode(curNode)) < 0) &&\r\n getChild(curNode)\r\n ) {\r\n curNode = getChild(curNode);\r\n }\r\n\r\n // Check special nodes (i.e. node that has a display:none etc.) and continue looping if so\r\n shouldContinue = !!curNode && shouldSkipNode(curNode, ignoreSpace);\r\n if (!shouldContinue) {\r\n // Found a good leaf node, assign and exit\r\n result = curNode;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * This walks forwards DOM tree to get next meaningful node\r\n * @param rootNode Root node to scope the leaf sibling node\r\n * @param startNode current node to get sibling node from\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\nexport function getNextLeafSibling(\r\n rootNode: Node,\r\n startNode: Node,\r\n skipTags?: string[]\r\n): Node | null {\r\n return getLeafSibling(rootNode, startNode, true /*isNext*/, skipTags);\r\n}\r\n\r\n/**\r\n * This walks backwards DOM tree to get next meaningful node\r\n * @param rootNode Root node to scope the leaf sibling node\r\n * @param startNode current node to get sibling node from\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\nexport function getPreviousLeafSibling(\r\n rootNode: Node,\r\n startNode: Node,\r\n skipTags?: string[]\r\n): Node | null {\r\n return getLeafSibling(rootNode, startNode, false /*isNext*/, skipTags);\r\n}\r\n","import getObjectKeys from '../jsUtils/getObjectKeys';\r\nimport { DocumentCommand, PendableFormatState } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Names of Pendable formats\r\n */\r\nexport type PendableFormatNames = keyof PendableFormatState;\r\n\r\n/**\r\n * A map from pendable format name to document command\r\n */\r\nexport const PendableFormatCommandMap: { [key in PendableFormatNames]: DocumentCommand } = {\r\n /**\r\n * Bold\r\n */\r\n isBold: DocumentCommand.Bold,\r\n\r\n /**\r\n * Italic\r\n */\r\n isItalic: DocumentCommand.Italic,\r\n\r\n /**\r\n * Underline\r\n */\r\n isUnderline: DocumentCommand.Underline,\r\n\r\n /**\r\n * StrikeThrough\r\n */\r\n isStrikeThrough: DocumentCommand.StrikeThrough,\r\n\r\n /**\r\n * Subscript\r\n */\r\n isSubscript: DocumentCommand.Subscript,\r\n\r\n /**\r\n * Superscript\r\n */\r\n isSuperscript: DocumentCommand.Superscript,\r\n};\r\n\r\n/**\r\n * Get Pendable Format State at cursor.\r\n * @param document The HTML Document to get format state from\r\n * @returns A PendableFormatState object which contains the values of pendable format states\r\n */\r\nexport default function getPendableFormatState(document: Document): PendableFormatState {\r\n let keys = getObjectKeys(PendableFormatCommandMap);\r\n\r\n return keys.reduce((state, key) => {\r\n state[key] = document.queryCommandState(PendableFormatCommandMap[key]);\r\n return state;\r\n }, {});\r\n}\r\n","import { NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get the html tag of a node, or empty if it is not an element\r\n * @param node The node to get tag of\r\n * @returns Tag name in upper case if the given node is an Element, or empty string otherwise\r\n */\r\nexport default function getTagOfNode(node: Node | null): string {\r\n return node && node.nodeType == NodeType.Element ? (node).tagName.toUpperCase() : '';\r\n}\r\n","import getTagOfNode from './getTagOfNode';\r\n\r\nconst BLOCK_ELEMENT_TAGS = 'ADDRESS,ARTICLE,ASIDE,BLOCKQUOTE,CANVAS,DD,DIV,DL,DT,FIELDSET,FIGCAPTION,FIGURE,FOOTER,FORM,H1,H2,H3,H4,H5,H6,HEADER,HR,LI,MAIN,NAV,NOSCRIPT,OL,OUTPUT,P,PRE,SECTION,TABLE,TD,TH,TFOOT,UL,VIDEO'.split(\r\n ','\r\n);\r\nconst BLOCK_DISPLAY_STYLES = ['block', 'list-item', 'table-cell'];\r\n\r\n/**\r\n * Checks if the node is a block like element. Block like element are usually those P, DIV, LI, TD etc.\r\n * @param node The node to check\r\n * @returns True if the node is a block element, otherwise false\r\n */\r\nexport default function isBlockElement(node: Node): node is HTMLElement {\r\n let tag = getTagOfNode(node);\r\n return !!(\r\n tag &&\r\n (BLOCK_DISPLAY_STYLES.indexOf((node).style.display) >= 0 ||\r\n BLOCK_ELEMENT_TAGS.indexOf(tag) >= 0)\r\n );\r\n}\r\n","import { DocumentPosition } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Checks if node1 is after node2\r\n * @param node1 The node to check if it is after another node\r\n * @param node2 The node to check if another node is after this one\r\n * @returns True if node1 is after node2, otherwise false\r\n */\r\nexport default function isNodeAfter(node1: Node, node2: Node): boolean {\r\n return !!(\r\n node1 &&\r\n node2 &&\r\n (node2.compareDocumentPosition(node1) & DocumentPosition.Following) ==\r\n DocumentPosition.Following\r\n );\r\n}\r\n","import getTagOfNode from './getTagOfNode';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\nconst VISIBLE_ELEMENT_TAGS = ['IMG'];\r\nconst VISIBLE_CHILD_ELEMENT_SELECTOR = ['TABLE', 'IMG', 'LI'].join(',');\r\nconst ZERO_WIDTH_SPACE = /\\u200b/g;\r\n\r\n/**\r\n * Check if a given node has no visible content\r\n * @param node The node to check\r\n * @param trimContent Whether trim the text content so that spaces will be treated as empty.\r\n * Default value is false\r\n * @returns True if there isn't any visible element inside node, otherwise false\r\n */\r\nexport default function isNodeEmpty(\r\n node: Node,\r\n trimContent?: boolean,\r\n shouldCountBrAsVisible?: boolean\r\n) {\r\n if (!node) {\r\n return false;\r\n } else if (node.nodeType == NodeType.Text) {\r\n return trim(node.nodeValue || '', trimContent) == '';\r\n } else if (node.nodeType == NodeType.Element) {\r\n let element = node as Element;\r\n let textContent = trim(element.textContent || '', trimContent);\r\n const visibleSelector = shouldCountBrAsVisible\r\n ? `${VISIBLE_CHILD_ELEMENT_SELECTOR},BR`\r\n : VISIBLE_CHILD_ELEMENT_SELECTOR;\r\n if (\r\n textContent != '' ||\r\n VISIBLE_ELEMENT_TAGS.indexOf(getTagOfNode(element)) >= 0 ||\r\n element.querySelectorAll(visibleSelector)[0]\r\n ) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\nfunction trim(s: string, trim: boolean | undefined) {\r\n s = s.replace(ZERO_WIDTH_SPACE, '');\r\n return trim ? s.trim() : s;\r\n}\r\n","import getTagOfNode from './getTagOfNode';\r\n\r\n/**\r\n * HTML void elements\r\n * Per https://www.w3.org/TR/html/syntax.html#syntax-elements, cannot have child nodes\r\n * This regex is used when we move focus to very begin of editor. We should avoid putting focus inside\r\n * void elements so users don't accidentally create child nodes in them\r\n */\r\nconst HTML_VOID_ELEMENTS = 'AREA,BASE,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,KEYGEN,LINK,META,PARAM,SOURCE,TRACK,WBR'.split(\r\n ','\r\n);\r\n\r\n/**\r\n * Check if the given node is html void element. Void element cannot have children\r\n * @param node The node to check\r\n */\r\nexport default function isVoidHtmlElement(node: Node): boolean {\r\n return !!node && HTML_VOID_ELEMENTS.indexOf(getTagOfNode(node)) >= 0;\r\n}\r\n","import getObjectKeys from '../jsUtils/getObjectKeys';\r\nimport { LinkData } from 'roosterjs-editor-types';\r\n\r\ninterface LinkMatchRule {\r\n match: RegExp;\r\n except?: RegExp;\r\n normalizeUrl?: (url: string) => string;\r\n}\r\n\r\n// http exclude matching regex\r\n// invalid URL example (in particular on IE and Edge):\r\n// - http://www.bing.com%00, %00 before ? (question mark) is considered invalid. IE/Edge throws invalid argument exception\r\n// - http://www.bing.com%1, %1 is invalid\r\n// - http://www.bing.com%g, %g is invalid (IE and Edge expects a two hex value after a %)\r\n// - http://www.bing.com%, % as ending is invalid (IE and Edge expects a two hex value after a %)\r\n// All above % cases if they're after ? (question mark) is then considered valid again\r\n// Similar for @, it needs to be after / (forward slash), or ? (question mark). Otherwise IE/Edge will throw security exception\r\n// - http://www.bing.com@name, @name before ? (question mark) is considered invalid\r\n// - http://www.bing.com/@name, is valid sine it is after / (forward slash)\r\n// - http://www.bing.com?@name, is also valid since it is after ? (question mark)\r\n// The regex below is essentially a break down of:\r\n// ^[^?]+%[^0-9a-f]+ => to exclude URL like www.bing.com%%\r\n// ^[^?]+%[0-9a-f][^0-9a-f]+ => to exclude URL like www.bing.com%1\r\n// ^[^?]+%00 => to exclude URL like www.bing.com%00\r\n// ^[^?]+%$ => to exclude URL like www.bing.com%\r\n// ^https?:\\/\\/[^?\\/]+@ => to exclude URL like http://www.bing.com@name\r\n// ^www\\.[^?\\/]+@ => to exclude URL like www.bing.com@name\r\n// , => to exclude url like www.bing,,com\r\nconst httpExcludeRegEx = /^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\\/\\/[^?\\/]+@|^www\\.[^?\\/]+@/i;\r\n\r\n// via https://tools.ietf.org/html/rfc1035 Page 7\r\nconst labelRegEx = '[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'; // We're using case insensitive regexps below so don't bother including A-Z\r\nconst domainNameRegEx = `(?:${labelRegEx}\\\\.)*${labelRegEx}`;\r\nconst domainPortRegEx = `${domainNameRegEx}(?:\\\\:[0-9]+)?`;\r\nconst domainPortWithUrlRegEx = `${domainPortRegEx}(?:[\\\\/\\\\?]\\\\S*)?`;\r\n\r\nconst linkMatchRules: Record = {\r\n http: {\r\n match: new RegExp(\r\n `^(?:microsoft-edge:)?http:\\\\/\\\\/${domainPortWithUrlRegEx}|www\\\\.${domainPortWithUrlRegEx}`,\r\n 'i'\r\n ),\r\n except: httpExcludeRegEx,\r\n normalizeUrl: url =>\r\n new RegExp('^(?:microsoft-edge:)?http:\\\\/\\\\/', 'i').test(url) ? url : 'http://' + url,\r\n },\r\n https: {\r\n match: new RegExp(`^(?:microsoft-edge:)?https:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i'),\r\n except: httpExcludeRegEx,\r\n },\r\n mailto: { match: new RegExp('^mailto:\\\\S+@\\\\S+\\\\.\\\\S+', 'i') },\r\n notes: { match: new RegExp('^notes:\\\\/\\\\/\\\\S+', 'i') },\r\n file: { match: new RegExp('^file:\\\\/\\\\/\\\\/?\\\\S+', 'i') },\r\n unc: { match: new RegExp('^\\\\\\\\\\\\\\\\\\\\S+', 'i') },\r\n ftp: {\r\n match: new RegExp(\r\n `^ftp:\\\\/\\\\/${domainPortWithUrlRegEx}|ftp\\\\.${domainPortWithUrlRegEx}`,\r\n 'i'\r\n ),\r\n normalizeUrl: url => (new RegExp('^ftp:\\\\/\\\\/', 'i').test(url) ? url : 'ftp://' + url),\r\n },\r\n news: { match: new RegExp(`^news:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n telnet: { match: new RegExp(`^telnet:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n gopher: { match: new RegExp(`^gopher:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i') },\r\n wais: { match: new RegExp(`^wais:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n};\r\n\r\n/**\r\n * Try to match a given string with link match rules, return matched link\r\n * @param url Input url to match\r\n * @param option Link match option, exact or partial. If it is exact match, we need\r\n * to check the length of matched link and url\r\n * @param rules Optional link match rules, if not passed, only the default link match\r\n * rules will be applied\r\n * @returns The matched link data, or null if no match found.\r\n * The link data includes an original url and a normalized url\r\n */\r\nexport default function matchLink(url: string): LinkData | null {\r\n if (url) {\r\n for (let schema of getObjectKeys(linkMatchRules)) {\r\n let rule = linkMatchRules[schema];\r\n let matches = url.match(rule.match);\r\n if (matches && matches[0] == url && (!rule.except || !rule.except.test(url))) {\r\n return {\r\n scheme: schema,\r\n originalUrl: url,\r\n normalizedUrl: rule.normalizeUrl ? rule.normalizeUrl(url) : url,\r\n };\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","import safeInstanceOf from './safeInstanceOf';\n\n/**\n * Type definition of HTMLElement interface for IE\n */\ninterface HTMLElementForIE extends HTMLElement {\n /**\n * IE implementation of Element.matches() function\n *\n */\n msMatchesSelector: (selector: string) => boolean;\n}\n\n/**\n * A wrapper function of Element.matches\n * @param element The element to match\n * @param selector The selector to match\n */\nexport default function matchesSelector(element: Node, selector: string): boolean {\n return (\n safeInstanceOf(element, 'HTMLElement') &&\n (element.matches || (element).msMatchesSelector).call(element, selector)\n );\n}\n","/**\n * Replace all child nodes of the given target node to the child nodes of source node.\n * @param target Target node, all child nodes of this node will be removed if keepExistingChildren is not set to true\n * @param source (Optional) source node, all child nodes of this node will be move to target node\n * @param keepExistingChildren (Optional) When set to true, all existing child nodes of target will be kept\n */\nexport default function moveChildNodes(\n target: Node,\n source?: Node,\n keepExistingChildren?: boolean\n) {\n if (!target) {\n return;\n }\n\n while (!keepExistingChildren && target.firstChild) {\n target.removeChild(target.firstChild);\n }\n\n while (source?.firstChild) {\n target.appendChild(source.firstChild);\n }\n}\n","import { Rect } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * A ClientRect of all 0 is possible. i.e. chrome returns a ClientRect of 0 when the cursor is on an empty p\r\n * We validate that and only return a rect when the passed in ClientRect is valid\r\n */\r\nexport default function normalizeRect(clientRect: DOMRect): Rect | null {\r\n let { left, right, top, bottom } =\r\n clientRect || { left: 0, right: 0, top: 0, bottom: 0 };\r\n return left === 0 && right === 0 && top === 0 && bottom === 0\r\n ? null\r\n : {\r\n left: Math.round(left),\r\n right: Math.round(right),\r\n top: Math.round(top),\r\n bottom: Math.round(bottom),\r\n };\r\n}\r\n","const HEX3_REGEX = /^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/;\nconst HEX6_REGEX = /^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/;\nconst RGB_REGEX = /^rgb\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*\\)$/;\nconst RGBA_REGEX = /^rgba\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*\\)$/;\n\n/**\n * Parse color string to r/g/b value.\n * If the given color is not in a recognized format, return null\n */\nexport default function parseColor(color: string): [number, number, number] | null {\n color = (color || '').trim();\n\n let match: RegExpMatchArray | null;\n if ((match = color.match(HEX3_REGEX))) {\n return [\n parseInt(match[1] + match[1], 16),\n parseInt(match[2] + match[2], 16),\n parseInt(match[3] + match[3], 16),\n ];\n } else if ((match = color.match(HEX6_REGEX))) {\n return [parseInt(match[1], 16), parseInt(match[2], 16), parseInt(match[3], 16)];\n } else if ((match = color.match(RGB_REGEX) || color.match(RGBA_REGEX))) {\n return [parseInt(match[1]), parseInt(match[2]), parseInt(match[3])];\n } else {\n // CSS color names such as red, green is not included for now.\n // If need, we can add those colors from https://www.w3.org/wiki/CSS/Properties/color/keywords\n return null;\n }\n}\n","import toArray from '../jsUtils/toArray';\r\nimport { DocumentPosition, NodeType, QueryScope } from 'roosterjs-editor-types';\r\nimport type { CompatibleQueryScope } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Query HTML elements in the container by a selector string\r\n * @param container Container element to query from\r\n * @param selector Selector string to query\r\n * @param forEachCallback An optional callback to be invoked on each node in query result\r\n * @param scope The scope of the query, default value is QueryScope.Body\r\n * @param range The selection range to query with. This is required when scope is not Body\r\n * @returns HTML Element array of the query result\r\n */\r\nexport default function queryElements(\r\n container: ParentNode,\r\n selector: string,\r\n forEachCallback?: ((node: HTMLElement) => any) | null,\r\n scope: QueryScope | CompatibleQueryScope = QueryScope.Body,\r\n range?: Range\r\n): HTMLElement[] {\r\n if (!container || !selector) {\r\n return [];\r\n }\r\n\r\n let elements = toArray(container.querySelectorAll(selector));\r\n\r\n if (scope != QueryScope.Body && range) {\r\n let { startContainer, startOffset, endContainer, endOffset } = range;\r\n if (startContainer.nodeType == NodeType.Element && startContainer.firstChild) {\r\n const child = startContainer.childNodes[startOffset];\r\n\r\n // range.startOffset can give a value of child.length+1 when selection is after the last child\r\n // In that case we will use the last child instead\r\n startContainer = child || startContainer.lastChild;\r\n }\r\n\r\n endContainer =\r\n endContainer.nodeType == NodeType.Element && endContainer.firstChild && endOffset > 0\r\n ? endContainer.childNodes[endOffset - 1]\r\n : endContainer;\r\n\r\n elements = elements.filter(element =>\r\n isIntersectWithNodeRange(\r\n element,\r\n startContainer,\r\n endContainer,\r\n scope == QueryScope.InSelection\r\n )\r\n );\r\n }\r\n\r\n if (forEachCallback) {\r\n elements.forEach(forEachCallback);\r\n }\r\n return elements;\r\n}\r\n\r\nfunction isIntersectWithNodeRange(\r\n node: Node,\r\n startNode: Node,\r\n endNode: Node,\r\n nodeContainedByRangeOnly: boolean\r\n): boolean {\r\n let startPosition = node.compareDocumentPosition(startNode);\r\n let endPosition = node.compareDocumentPosition(endNode);\r\n let targetPositions = [DocumentPosition.Same, DocumentPosition.Contains];\r\n\r\n if (!nodeContainedByRangeOnly) {\r\n targetPositions.push(DocumentPosition.ContainedBy);\r\n }\r\n\r\n return (\r\n checkPosition(startPosition, targetPositions) || // intersectStart\r\n checkPosition(endPosition, targetPositions) || // intersectEnd\r\n (checkPosition(startPosition, [DocumentPosition.Preceding]) && // Contains\r\n checkPosition(endPosition, [DocumentPosition.Following]) &&\r\n !checkPosition(endPosition, [DocumentPosition.ContainedBy]))\r\n );\r\n}\r\n\r\nfunction checkPosition(position: DocumentPosition, targets: DocumentPosition[]): boolean {\r\n return targets.some(target =>\r\n target == DocumentPosition.Same\r\n ? position == DocumentPosition.Same\r\n : (position & target) == target\r\n );\r\n}\r\n","/**\n * Read a file object and invoke a callback function with the data url of this file\n * @param file The file to read\n * @param callback the callback to invoke with data url of the file.\n * If fail to read, dataUrl will be null\n */\nexport default function readFile(file: File, callback: (dataUrl: string | null) => void) {\n if (file) {\n const reader = new FileReader();\n reader.onload = () => {\n callback(reader.result as string);\n };\n reader.onerror = () => {\n callback(null);\n };\n reader.readAsDataURL(file);\n }\n}\n","import { TargetWindow } from 'roosterjs-editor-types';\n\n// NOTE: Type TargetWindow is an auto-generated type.\n// Run node ./tools/generateTargetWindow.js to generate it.\n\n/**\n * @internal Export for test only\n * Try get window from the given node or range\n * @param node Source node to get window from\n */\nexport function getTargetWindow(node: Node): T {\n const document =\n node &&\n (node.ownerDocument ||\n (Object.prototype.toString.apply(node) == '[object HTMLDocument]'\n ? node\n : null));\n\n // If document exists but document.defaultView doesn't exist, it is a detached object, just use current window instead\n const targetWindow = document && ((document.defaultView || window) as any);\n return targetWindow as T;\n}\n\n/**\n * Check if the given object is instance of the target type\n * @param obj Object to check\n * @param typeName Target type name\n */\nexport default function safeInstanceOf(\n obj: any,\n typeName: T\n): obj is W[T] {\n if (typeName == 'Range') {\n return (\n Object.prototype.toString.apply(obj) == '[object Range]' &&\n !!(obj)?.commonAncestorContainer\n );\n }\n\n const targetWindow = getTargetWindow(obj);\n const targetType = targetWindow && (targetWindow[typeName] as any);\n const mainWindow = (window as any) as W;\n const mainWindowType = mainWindow && (mainWindow[typeName] as any);\n return (\n (mainWindowType && obj instanceof mainWindowType) ||\n (targetType && obj instanceof targetType)\n );\n}\n","import parseColor from './parseColor';\nimport { DarkColorHandler, ModeIndependentColor } from 'roosterjs-editor-types';\n\nconst WHITE = '#ffffff';\nconst GRAY = '#333333';\nconst BLACK = '#000000';\nconst TRANSPARENT = 'transparent';\nconst enum ColorTones {\n BRIGHT,\n DARK,\n NONE,\n}\n\n//Using the HSL (hue, saturation and lightness) representation for RGB color values, if the value of the lightness is less than 20, the color is dark\nconst DARK_COLORS_LIGHTNESS = 20;\n//If the value of the lightness is more than 80, the color is bright\nconst BRIGHT_COLORS_LIGHTNESS = 80;\n\n/**\n * Set text color or background color to the given element\n * @param element The element to set color to\n * @param color The color to set, it can be a string of color name/value or a ModeIndependentColor object\n * @param isBackgroundColor Whether set background color or text color\n * @param isDarkMode Whether current mode is dark mode. @default false\n * @param shouldAdaptTheFontColor Whether the font color needs to be adapted to be visible in a dark or bright background color. @default false\n * @param darkColorHandler A dark color handler object. This is now required.\n * We keep it optional only for backward compatibility. If it is not passed, color will not be set.\n */\nexport default function setColor(\n element: HTMLElement,\n color: string | ModeIndependentColor,\n isBackgroundColor: boolean,\n isDarkMode?: boolean,\n shouldAdaptTheFontColor?: boolean,\n darkColorHandler?: DarkColorHandler | null\n) {\n const colorString = typeof color === 'string' ? color.trim() : '';\n const modeIndependentColor = typeof color === 'string' ? null : color;\n const cssName = isBackgroundColor ? 'background-color' : 'color';\n\n if (colorString || modeIndependentColor) {\n if (darkColorHandler) {\n const colorValue = darkColorHandler.registerColor(\n modeIndependentColor?.lightModeColor || colorString,\n !!isDarkMode,\n modeIndependentColor?.darkModeColor\n );\n\n element.style.setProperty(cssName, colorValue);\n }\n\n if (isBackgroundColor && shouldAdaptTheFontColor) {\n adaptFontColorToBackgroundColor(\n element,\n modeIndependentColor?.lightModeColor || colorString,\n isDarkMode,\n darkColorHandler\n );\n }\n }\n}\n\n/**\n * Change the font color to white or some other color, so the text can be visible with a darker background\n * @param element The element that contains text.\n * @param lightModeBackgroundColor Existing background color in light mode\n * @param isDarkMode Whether the content is in dark mode\n * @param darkColorHandler A dark color handler object. This is now required.\n * We keep it optional only for backward compatibility. If it is not passed, color will not be set.\n */\nfunction adaptFontColorToBackgroundColor(\n element: HTMLElement,\n lightModeBackgroundColor: string,\n isDarkMode?: boolean,\n darkColorHandler?: DarkColorHandler | null\n) {\n if (!lightModeBackgroundColor || lightModeBackgroundColor === TRANSPARENT) {\n return;\n }\n\n const isADarkOrBrightOrNone = isADarkOrBrightColor(lightModeBackgroundColor!);\n\n switch (isADarkOrBrightOrNone) {\n case ColorTones.DARK:\n const fontForDark: ModeIndependentColor = {\n lightModeColor: WHITE,\n darkModeColor: GRAY,\n };\n setColor(\n element,\n fontForDark,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n break;\n case ColorTones.BRIGHT:\n const fontForLight: ModeIndependentColor = {\n lightModeColor: BLACK,\n darkModeColor: WHITE,\n };\n setColor(\n element,\n fontForLight,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n break;\n }\n}\n\nfunction isADarkOrBrightColor(color: string): ColorTones {\n let lightness = calculateLightness(color);\n if (lightness < DARK_COLORS_LIGHTNESS) {\n return ColorTones.DARK;\n } else if (lightness > BRIGHT_COLORS_LIGHTNESS) {\n return ColorTones.BRIGHT;\n }\n\n return ColorTones.NONE;\n}\n\n/**\n * Calculate the lightness of HSL (hue, saturation and lightness) representation\n * @param color a RBG or RGBA COLOR\n * @returns\n */\nfunction calculateLightness(color: string) {\n const colorValues = parseColor(color);\n\n // Use the values of r,g,b to calculate the lightness in the HSl representation\n //First calculate the fraction of the light in each color, since in css the value of r,g,b is in the interval of [0,255], we have\n if (colorValues) {\n const red = colorValues[0] / 255;\n const green = colorValues[1] / 255;\n const blue = colorValues[2] / 255;\n\n //Then the lightness in the HSL representation is the average between maximum fraction of r,g,b and the minimum fraction\n return (Math.max(red, green, blue) + Math.min(red, green, blue)) * 50;\n } else {\n return 255;\n }\n}\n","import getTagOfNode from './getTagOfNode';\r\nimport { getComputedStyle } from './getComputedStyles';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\nconst CRLF = /^[\\r\\n]+$/g;\r\nconst CRLF_SPACE = /[\\t\\r\\n\\u0020\\u200B]/gm; // We should only find new line, real space or ZeroWidthSpace (TAB, %20, but not  )\r\n\r\n/**\r\n * @internal\r\n * Skip a node when any of following conditions are true\r\n * - it is neither Element nor Text\r\n * - it is a text node but is empty\r\n * - it is a text node but contains just CRLF (noisy text node that often comes in-between elements)\r\n * - has a display:none\r\n * - it is just
    \r\n * @param node The node to check\r\n * @param ignoreSpace (Optional) True to ignore pure space text node of the node when check.\r\n * If the value of a node value is only space, set this to true will treat this node can be skipped.\r\n * Default value is false\r\n */\r\nexport default function shouldSkipNode(node: Node, ignoreSpace?: boolean): boolean {\r\n if (node.nodeType == NodeType.Text) {\r\n if (!node.nodeValue || node.textContent == '' || CRLF.test(node.nodeValue)) {\r\n return true;\r\n } else if (ignoreSpace && node.nodeValue.replace(CRLF_SPACE, '') == '') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } else if (node.nodeType == NodeType.Element) {\r\n if (getComputedStyle(node, 'display') == 'none') {\r\n return true;\r\n }\r\n\r\n const tag = getTagOfNode(node);\r\n\r\n if (tag == 'DIV' || tag == 'SPAN') {\r\n // Empty SPAN/DIV or SPAN/DIV with only meaningless children is meaningless,\r\n // because it can render nothing. If we keep them here, there may be unexpected\r\n // LI elements added for those meaningless nodes.\r\n for (let child = node.firstChild; !!child; child = child.nextSibling) {\r\n if (!shouldSkipNode(child, ignoreSpace)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else {\r\n // There may still be other cases that the node is not meaningful.\r\n // We can add those cases here once we hit them.\r\n return false;\r\n }\r\n } else {\r\n return true;\r\n }\r\n}\r\n","import isNodeAfter from './isNodeAfter';\r\n\r\n/**\r\n * Split parent node of the given node before/after the given node.\r\n * When a parent node contains [A,B,C] and pass B as the given node,\r\n * If split before, the new nodes will be [A][B,C] and returns [A];\r\n * otherwise, it will be [A,B][C] and returns [C].\r\n * @param node The node to split before/after\r\n * @param splitBefore Whether split before or after\r\n * @param removeEmptyNewNode If the new node is empty (even then only child is space or ZER_WIDTH_SPACE),\r\n * we remove it. @default false\r\n * @returns The new parent node\r\n */\r\nexport default function splitParentNode(node: Node, splitBefore: boolean): Node | null {\r\n if (!node || !node.parentNode) {\r\n return null;\r\n }\r\n\r\n let parentNode = node.parentNode;\r\n let newParent: HTMLElement | null = parentNode.cloneNode(false /*deep*/) as HTMLElement;\r\n newParent.removeAttribute('id');\r\n if (splitBefore) {\r\n while (parentNode.firstChild && parentNode.firstChild != node) {\r\n newParent.appendChild(parentNode.firstChild);\r\n }\r\n } else {\r\n while (node.nextSibling) {\r\n newParent.appendChild(node.nextSibling);\r\n }\r\n }\r\n\r\n // When the only child of new parent is ZERO_WIDTH_SPACE, we can still prevent keeping it by set removeEmptyNewNode to true\r\n if (newParent.firstChild && newParent.innerHTML != '') {\r\n parentNode.parentNode?.insertBefore(\r\n newParent,\r\n splitBefore ? parentNode : parentNode.nextSibling\r\n );\r\n } else {\r\n newParent = null;\r\n }\r\n\r\n return newParent;\r\n}\r\n\r\n/**\r\n * Split parent node by a balanced node range\r\n * @param nodes The nodes to split from. If only one node is passed, split it from all its siblings.\r\n * If two or nodes are passed, will split before the first one and after the last one, all other nodes will be ignored\r\n * @returns The parent node of the given node range if the given nodes are balanced, otherwise null\r\n */\r\nexport function splitBalancedNodeRange(nodes: Node | Node[]): Node | null {\r\n let start = Array.isArray(nodes) ? nodes[0] : nodes;\r\n let end = Array.isArray(nodes) ? nodes[nodes.length - 1] : nodes;\r\n const parentNode = start && end && start.parentNode == end.parentNode ? start.parentNode : null;\r\n if (parentNode) {\r\n if (isNodeAfter(start, end)) {\r\n let temp = end;\r\n end = start;\r\n start = temp;\r\n }\r\n splitParentNode(start, true /*splitBefore*/);\r\n splitParentNode(end, false /*splitBefore*/);\r\n }\r\n\r\n return parentNode;\r\n}\r\n","/**\r\n * Split a text node into two parts by an offset number, and return one of them\r\n * @param textNode The text node to split\r\n * @param offset The offset number to split at\r\n * @param returnFirstPart True to return the first part, then the passed in textNode will become the second part.\r\n * Otherwise return the second part, and the passed in textNode will become the first part\r\n */\r\nexport default function splitTextNode(textNode: Text, offset: number, returnFirstPart: boolean) {\r\n const firstPart = textNode.nodeValue?.substring(0, offset) || '';\r\n const secondPart = textNode.nodeValue?.substring(offset) || '';\r\n const newNode = textNode.ownerDocument.createTextNode(returnFirstPart ? firstPart : secondPart);\r\n textNode.nodeValue = returnFirstPart ? secondPart : firstPart;\r\n textNode.parentNode?.insertBefore(newNode, returnFirstPart ? textNode : textNode.nextSibling);\r\n return newNode;\r\n}\r\n","/**\r\n * Removes the node and keep all children in place, return the parentNode where the children are attached\r\n * @param node the node to remove\r\n */\r\nexport default function unwrap(node: Node): Node | null {\r\n // Unwrap requires a parentNode\r\n let parentNode = node ? node.parentNode : null;\r\n if (!parentNode) {\r\n return null;\r\n }\r\n\r\n while (node.firstChild) {\r\n parentNode.insertBefore(node.firstChild, node);\r\n }\r\n\r\n parentNode.removeChild(node);\r\n return parentNode;\r\n}\r\n","import createElement from './createElement';\r\nimport fromHtml from './fromHtml';\r\nimport safeInstanceOf from './safeInstanceOf';\r\nimport { CreateElementData, KnownCreateElementDataIndex } from 'roosterjs-editor-types';\r\nimport type { CompatibleKnownCreateElementDataIndex } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Wrap all the node with html and return the wrapped node, and put the wrapper node under the parent of the first node\r\n * @param nodes The node or node array to wrap\r\n * @param wrapper The wrapper HTML tag name\r\n * @returns The wrapper element\r\n */\r\nexport default function wrap(\r\n nodes: Node | Node[],\r\n wrapper?: T\r\n): HTMLElementTagNameMap[T];\r\n\r\n/**\r\n * @deprecated\r\n * Wrap all the nodes with html and return the wrapped node, and put the wrapper node under the parent of the first node\r\n * @param nodes The node or node array to wrap\r\n * @param wrapper The wrapper HTML string, default value is DIV\r\n * @returns The wrapper element\r\n */\r\nexport default function wrap(nodes: Node | Node[], wrapper?: string): HTMLElement;\r\n\r\n/**\r\n * Wrap all the nodes with html and return the wrapped node, and put the wrapper node under the parent of the first node\r\n * @param nodes The node or node array to wrap\r\n * @param wrapper The wrapper HTML element, default value is a new DIV element\r\n * @returns The wrapper element\r\n */\r\nexport default function wrap(nodes: Node | Node[], wrapper?: HTMLElement): HTMLElement;\r\n\r\n/**\r\n * Wraps all the nodes with CreateElementData or an index of a known CreateElementData\r\n * @param nodes The nodes to wrap\r\n * @param wrapper The CreateElementData or an index of a known CreateElementData\r\n */\r\nexport default function wrap(\r\n nodes: Node | Node[],\r\n wrapper?:\r\n | CreateElementData\r\n | KnownCreateElementDataIndex\r\n | CompatibleKnownCreateElementDataIndex\r\n): HTMLElement;\r\n\r\nexport default function wrap(\r\n nodes: Node | Node[],\r\n wrapper?:\r\n | string\r\n | HTMLElement\r\n | CreateElementData\r\n | KnownCreateElementDataIndex\r\n | CompatibleKnownCreateElementDataIndex\r\n): HTMLElement | null {\r\n nodes = !nodes ? [] : safeInstanceOf(nodes, 'Node') ? [nodes] : nodes;\r\n if (nodes.length == 0 || !nodes[0] || !nodes[0].ownerDocument) {\r\n return null;\r\n }\r\n\r\n if (!wrapper) {\r\n wrapper = 'div';\r\n }\r\n\r\n if (!safeInstanceOf(wrapper, 'HTMLElement')) {\r\n let document = nodes[0].ownerDocument;\r\n\r\n if (typeof wrapper === 'string') {\r\n wrapper = /^\\w+$/.test(wrapper)\r\n ? document.createElement(wrapper)\r\n : (fromHtml(wrapper, document)[0] as HTMLElement); // This will be removed in next major release\r\n } else {\r\n wrapper = createElement(wrapper, document) as HTMLElement;\r\n }\r\n }\r\n\r\n let parentNode = nodes[0].parentNode;\r\n\r\n if (parentNode) {\r\n parentNode.insertBefore(wrapper, nodes[0]);\r\n }\r\n\r\n for (let node of nodes) {\r\n wrapper.appendChild(node);\r\n }\r\n\r\n return wrapper;\r\n}\r\n","export * from './plugins/AutoFormat/index';\n","export * from './plugins/ContentEdit/index';\n","export * from './plugins/ContextMenu/index';\n","export * from './plugins/CustomReplace/index';\n","export * from './plugins/CutPasteListChain/index';\n","export * from './plugins/HyperLink/index';\n","export * from './plugins/ImageEdit/index';\n","export * from './plugins/ImageResize/index';\n","export * from './plugins/Paste/index';\n","export * from './plugins/Picker/index';\n","export * from './plugins/TableCellSelection/index';\n","export * from './plugins/TableResize/index';\n","export * from './plugins/Watermark/index';\n","export * from './ContentEdit';\r\nexport * from './ContextMenu';\r\nexport * from './CustomReplace';\r\nexport * from './CutPasteListChain';\r\nexport * from './HyperLink';\r\nexport * from './ImageEdit';\r\nexport * from './ImageResize';\r\nexport * from './Paste';\r\nexport * from './Picker';\r\nexport * from './TableResize';\r\nexport * from './Watermark';\r\nexport * from './TableCellSelection';\r\nexport * from './AutoFormat';\r\n","import Disposable from './Disposable';\nimport DragAndDropHandler from './DragAndDropHandler';\nimport { Browser } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n */\ninterface MouseEventMoves {\n MOUSEDOWN: string;\n MOUSEMOVE: string;\n MOUSEUP: string;\n}\n\n/**\n * @internal\n */\ninterface MouseEventInfo extends MouseEventMoves {\n getPageXY: (e: MouseEvent) => number[];\n}\n\n/**\n * @internal\n * Compatible mouse event names for different platform\n */\ninterface TouchEventInfo extends MouseEventMoves {\n getPageXY: (e: TouchEvent) => number[];\n}\n\n/**\n * Generate event names and getXY function based on different platforms to be compatible with desktop and mobile browsers\n */\nconst MOUSE_EVENT_INFO_DESKTOP: MouseEventInfo = (() => {\n return {\n MOUSEDOWN: 'mousedown',\n MOUSEMOVE: 'mousemove',\n MOUSEUP: 'mouseup',\n getPageXY: getMouseEventPageXY,\n };\n})();\n\nconst MOUSE_EVENT_INFO_MOBILE: TouchEventInfo = (() => {\n return {\n MOUSEDOWN: 'touchstart',\n MOUSEMOVE: 'touchmove',\n MOUSEUP: 'touchend',\n getPageXY: getTouchEventPageXY,\n };\n})();\n\nfunction getMouseEventPageXY(e: MouseEvent): [number, number] {\n return [e.pageX, e.pageY];\n}\n\nfunction getTouchEventPageXY(e: TouchEvent): [number, number] {\n let pageX = 0;\n let pageY = 0;\n if (e.targetTouches && e.targetTouches.length > 0) {\n const touch = e.targetTouches[0];\n pageX = touch.pageX;\n pageY = touch.pageY;\n }\n return [pageX, pageY];\n}\n\n/**\n * @internal\n * A helper class to help manage drag and drop to an HTML element\n */\nexport default class DragAndDropHelper implements Disposable {\n private initX: number = 0;\n private initY: number = 0;\n private initValue: TInitValue | undefined = undefined;\n private dndMouse: MouseEventInfo | TouchEventInfo;\n\n /**\n * Create a new instance of DragAndDropHelper class\n * @param trigger The trigger element. When user start drag on this element,\n * events will be fired to the handler object\n * @param context Context object that will be passed to handler function when event is fired,\n * so that the handler object knows which element it is triggered from.\n * @param onSubmit A callback that will be invoked when event handler in handler object returns true\n * @param handler The event handler object, see DragAndDropHandler interface for more information\n * @param zoomScale The zoom scale of the editor\n * @param forceMobile A boolean to force the use of touch controls for the helper\n */\n constructor(\n private trigger: HTMLElement,\n private context: TContext,\n private onSubmit: (context: TContext, trigger: HTMLElement) => void,\n private handler: DragAndDropHandler,\n private zoomScale: number,\n forceMobile?: boolean\n ) {\n this.dndMouse =\n forceMobile || Browser.isMobileOrTablet\n ? MOUSE_EVENT_INFO_MOBILE\n : MOUSE_EVENT_INFO_DESKTOP;\n trigger.addEventListener(this.dndMouse.MOUSEDOWN, this.onMouseDown);\n }\n\n /**\n * Dispose this object, remove all event listeners that has been attached\n */\n dispose() {\n this.trigger.removeEventListener(this.dndMouse.MOUSEDOWN, this.onMouseDown);\n this.removeDocumentEvents();\n }\n\n public get mouseType(): string {\n return this.dndMouse == MOUSE_EVENT_INFO_MOBILE ? 'touch' : 'mouse';\n }\n\n private addDocumentEvents() {\n const doc = this.trigger.ownerDocument;\n doc.addEventListener(this.dndMouse.MOUSEMOVE, this.onMouseMove, true /*useCapture*/);\n doc.addEventListener(this.dndMouse.MOUSEUP, this.onMouseUp, true /*useCapture*/);\n }\n\n private removeDocumentEvents() {\n const doc = this.trigger.ownerDocument;\n doc.removeEventListener(this.dndMouse.MOUSEMOVE, this.onMouseMove, true /*useCapture*/);\n doc.removeEventListener(this.dndMouse.MOUSEUP, this.onMouseUp, true /*useCapture*/);\n }\n\n private onMouseDown = (e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n this.addDocumentEvents();\n [this.initX, this.initY] = this.dndMouse.getPageXY(e as MouseEvent & TouchEvent);\n this.initValue = this.handler.onDragStart?.(this.context, e as MouseEvent);\n };\n\n private onMouseMove = (e: Event) => {\n e.preventDefault();\n const [pageX, pageY] = this.dndMouse.getPageXY(e as MouseEvent & TouchEvent);\n const deltaX = (pageX - this.initX) / this.zoomScale;\n const deltaY = (pageY - this.initY) / this.zoomScale;\n if (\n this.initValue &&\n this.handler.onDragging?.(this.context, e as MouseEvent, this.initValue, deltaX, deltaY)\n ) {\n this.onSubmit?.(this.context, this.trigger);\n }\n };\n\n private onMouseUp = (e: Event) => {\n e.preventDefault();\n this.removeDocumentEvents();\n if (this.handler.onDragEnd?.(this.context, e as MouseEvent, this.initValue)) {\n this.onSubmit?.(this.context, this.trigger);\n }\n };\n}\n","import {\n ChangeSource,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst specialCharacters = /[`!@#$%^&*()_+\\=\\[\\]{};':\"\\\\|,.<>\\/?~]/;\n\n/**\n * Automatically transform -- into hyphen, if typed between two words.\n */\nexport default class AutoFormat implements EditorPlugin {\n private editor: IEditor | null = null;\n private lastKeyTyped: string | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'AutoFormat';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n this.lastKeyTyped = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (!this.editor) {\n return;\n }\n if (\n event.eventType === PluginEventType.ContentChanged ||\n event.eventType === PluginEventType.MouseDown ||\n event.eventType === PluginEventType.MouseUp\n ) {\n this.lastKeyTyped = '';\n }\n\n if (event.eventType === PluginEventType.KeyPress) {\n const keyTyped = event.rawEvent.key;\n\n if (keyTyped && keyTyped.length > 1) {\n this.lastKeyTyped = '';\n }\n\n if (\n this.lastKeyTyped === '-' &&\n !specialCharacters.test(keyTyped) &&\n keyTyped !== ' ' &&\n keyTyped !== '-'\n ) {\n const searcher = this.editor.getContentSearcherOfCursor(event);\n const textBeforeCursor = searcher?.getSubStringBefore(3);\n const dashes = searcher?.getSubStringBefore(2);\n const isPrecededByADash = textBeforeCursor?.[0] === '-';\n const isPrecededByASpace = textBeforeCursor?.[0] === ' ';\n if (\n isPrecededByADash ||\n isPrecededByASpace ||\n (typeof textBeforeCursor === 'string' &&\n specialCharacters.test(textBeforeCursor[0])) ||\n dashes !== '--'\n ) {\n return;\n }\n\n const textRange = searcher?.getRangeFromText(dashes, true /* exactMatch */);\n const nodeHyphen = document.createTextNode('—');\n this.editor.addUndoSnapshot(\n () => {\n if (textRange) {\n textRange.deleteContents();\n textRange.insertNode(nodeHyphen);\n this.editor!.select(nodeHyphen, PositionType.End);\n }\n },\n ChangeSource.Format /*changeSource*/,\n true /*canUndoByBackspace*/,\n { formatApiName: 'autoHyphen' }\n );\n\n //After the substitution the last key typed needs to be cleaned\n this.lastKeyTyped = null;\n } else {\n this.lastKeyTyped = keyTyped;\n }\n }\n }\n}\n","export { default as AutoFormat } from './AutoFormat';\n","import getAllFeatures from './getAllFeatures';\nimport { getObjectKeys } from 'roosterjs-editor-dom';\nimport {\n ContentEditFeatureSettings,\n EditorPlugin,\n GenericContentEditFeature,\n IEditor,\n PluginEvent,\n} from 'roosterjs-editor-types';\n\n/**\n * An editor plugin to handle content edit event.\n * The following cases are included:\n * 1. Auto increase/decrease indentation on Tab, Shift+tab\n * 2. Enter, Backspace on empty list item\n * 3. Enter, Backspace on empty blockquote line\n * 4. Auto bullet/numbering\n * 5. Auto link\n * 6. Tab in table\n * 7. Up/Down in table\n * 8. Manage list style\n */\nexport default class ContentEdit implements EditorPlugin {\n private editor: IEditor | undefined = undefined;\n private features: GenericContentEditFeature[] = [];\n /**\n * Create instance of ContentEdit plugin\n * @param settingsOverride An optional feature set to override default feature settings\n * @param additionalFeatures Optional. More features to add\n */\n constructor(\n private settingsOverride?: Partial,\n private additionalFeatures?: GenericContentEditFeature[]\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ContentEdit';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor): void {\n this.editor = editor;\n const allFeatures = getAllFeatures();\n getObjectKeys(allFeatures).forEach(key => {\n const feature = allFeatures[key];\n const hasSettingForKey =\n this.settingsOverride && this.settingsOverride[key] !== undefined;\n\n if (\n (hasSettingForKey && this.settingsOverride?.[key]) ||\n (!hasSettingForKey && !feature.defaultDisabled)\n ) {\n this.features.push(feature);\n }\n });\n this.features = this.features.concat(this.additionalFeatures || []);\n this.features.forEach(feature => this.editor?.addContentEditFeature(feature));\n }\n\n private disposeFeatures() {\n if (this.editor) {\n this.features.forEach(feature => this.editor!.removeContentEditFeature(feature));\n }\n this.features = [];\n }\n\n /**\n * Dispose this plugin\n */\n dispose(): void {\n this.disposeFeatures();\n this.editor = undefined;\n }\n}\n","import { removeLink, replaceWithNode } from 'roosterjs-editor-api';\nimport {\n AutoLinkFeatureSettings,\n BuildInEditFeature,\n ChangeSource,\n ClipboardData,\n IEditor,\n Keys,\n LinkData,\n PluginEvent,\n PluginEventType,\n PluginKeyboardEvent,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n clearEventDataCache,\n LinkInlineElement,\n matchLink,\n} from 'roosterjs-editor-dom';\n\n/**\n * When user type, they may end a link with a punctuation, i.e. www.bing.com;\n * we need to trim off the trailing punctuation before turning it to link match\n */\nconst TRAILING_PUNCTUATION_REGEX = /[.+=\\s:;\"',>]+$/i;\nconst MINIMUM_LENGTH = 5;\n\n/**\n * AutoLink edit feature, provides the ability to automatically convert text user typed or pasted\n * in hyperlink format into a real hyperlink\n */\nconst AutoLink: BuildInEditFeature = {\n keys: [Keys.ENTER, Keys.SPACE, Keys.CONTENTCHANGED],\n shouldHandleEvent: cacheGetLinkData,\n handleEvent: autoLink,\n};\n\n/**\n * UnlinkWhenBackspaceAfterLink edit feature, provides the ability to convert a hyperlink back into text\n * if user presses BACKSPACE right after a hyperlink\n */\nconst UnlinkWhenBackspaceAfterLink: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: hasLinkBeforeCursor,\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n removeLink(editor);\n },\n defaultDisabled: true,\n};\n\nfunction cacheGetLinkData(event: PluginEvent, editor: IEditor): LinkData | null {\n return event.eventType == PluginEventType.KeyDown ||\n (event.eventType == PluginEventType.ContentChanged && event.source == ChangeSource.Paste)\n ? cacheGetEventData(event, 'LINK_DATA', () => {\n // First try to match link from the whole paste string from the plain text in clipboard.\n // This helps when we paste a link next to some existing character, and the text we got\n // from clipboard will only contain what we pasted, any existing characters will not\n // be included.\n let clipboardData =\n (event.eventType == PluginEventType.ContentChanged &&\n event.source == ChangeSource.Paste &&\n (event.data as ClipboardData)) ||\n null;\n let link = matchLink((clipboardData?.text || '').trim());\n let searcher = editor.getContentSearcherOfCursor(event);\n\n // In case the matched link is already inside a
    tag, we do a range search.\n // getRangeFromText will return null if the given text is already in a LinkInlineElement\n if (link && searcher?.getRangeFromText(link.originalUrl, false /*exactMatch*/)) {\n return link;\n }\n\n let word = searcher && searcher.getWordBefore();\n if (word && word.length > MINIMUM_LENGTH) {\n // Check for trailing punctuation\n let trailingPunctuations = word.match(TRAILING_PUNCTUATION_REGEX);\n let trailingPunctuation = (trailingPunctuations || [])[0] || '';\n let candidate = word.substring(0, word.length - trailingPunctuation.length);\n\n // Do special handling for ')', '}', ']'\n ['()', '{}', '[]'].forEach(str => {\n if (\n candidate[candidate.length - 1] == str[1] &&\n candidate.indexOf(str[0]) < 0\n ) {\n candidate = candidate.substr(0, candidate.length - 1);\n }\n });\n\n // Match and replace in editor\n return matchLink(candidate);\n }\n return null;\n })\n : null;\n}\n\nfunction hasLinkBeforeCursor(event: PluginKeyboardEvent, editor: IEditor): boolean {\n let contentSearcher = editor.getContentSearcherOfCursor(event);\n let inline = contentSearcher?.getInlineElementBefore();\n return inline instanceof LinkInlineElement;\n}\n\nfunction autoLink(event: PluginEvent, editor: IEditor) {\n const linkData = cacheGetLinkData(event, editor);\n if (!linkData) {\n return;\n }\n let anchor = editor.getDocument().createElement('a');\n // Need to get searcher before we enter the async callback since the callback can happen when cursor is moved to next line\n // and at that time a new searcher won't be able to find the link text to replace\n let searcher = editor.getContentSearcherOfCursor();\n anchor.textContent = linkData.originalUrl;\n anchor.href = linkData.normalizedUrl;\n\n editor.runAsync(editor => {\n editor.addUndoSnapshot(\n () => {\n replaceWithNode(\n editor,\n linkData.originalUrl,\n anchor,\n false /* exactMatch */,\n searcher ?? undefined\n );\n\n // The content at cursor has changed. Should also clear the cursor data cache\n clearEventDataCache(event);\n return anchor;\n },\n ChangeSource.AutoLink,\n true /*canUndoByBackspace*/\n );\n });\n}\n\n/**\n * @internal\n */\nexport const AutoLinkFeatures: Record<\n keyof AutoLinkFeatureSettings,\n BuildInEditFeature\n> = {\n autoLink: AutoLink,\n unlinkWhenBackspaceAfterLink: UnlinkWhenBackspaceAfterLink as BuildInEditFeature,\n};\n","import {\n isNodeEmpty,\n cacheGetEventData,\n safeInstanceOf,\n splitBalancedNodeRange,\n unwrap,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n PluginKeyboardEvent,\n Keys,\n IEditor,\n PositionType,\n CodeFeatureSettings,\n QueryScope,\n} from 'roosterjs-editor-types';\n\nconst RemoveCodeWhenEnterOnEmptyLine: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => {\n const childOfCode = cacheGetCodeChild(event, editor);\n return childOfCode && isNodeEmpty(childOfCode);\n },\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n splitCode(event, editor);\n },\n undefined /* changeSource */,\n true /* canUndoByBackspace */\n );\n },\n};\n\nconst RemoveCodeWhenBackspaceOnEmptyFirstLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n const childOfCode = cacheGetCodeChild(event, editor);\n return childOfCode && isNodeEmpty(childOfCode) && !childOfCode.previousSibling;\n },\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(() => splitCode(event, editor));\n },\n};\n\nfunction cacheGetCodeChild(event: PluginKeyboardEvent, editor: IEditor): Node | null {\n return cacheGetEventData(event, 'CODE_CHILD', () => {\n const codeElement =\n editor.getElementAtCursor('code') ??\n editor.queryElements('code', QueryScope.OnSelection)[0];\n if (codeElement) {\n const pos = editor.getFocusedPosition();\n const block = pos && editor.getBlockElementAtNode(pos.normalize().node);\n if (block) {\n const node =\n block.getStartNode() == codeElement.parentNode\n ? block.getStartNode()\n : block.collapseToSingleElement();\n return isNodeEmpty(node) ? node : null;\n }\n }\n\n return null;\n });\n}\n\nfunction splitCode(event: PluginKeyboardEvent, editor: IEditor) {\n const currentContainer = cacheGetCodeChild(event, editor);\n if (!safeInstanceOf(currentContainer, 'HTMLElement')) {\n return;\n }\n const codeChild = currentContainer.querySelector('code');\n if (!codeChild) {\n const codeParent = splitBalancedNodeRange(currentContainer);\n if (codeParent) {\n unwrap(codeParent);\n }\n if (safeInstanceOf(currentContainer.parentElement, 'HTMLPreElement')) {\n const preParent = splitBalancedNodeRange(currentContainer);\n if (preParent) {\n unwrap(preParent);\n }\n }\n } else {\n //Content model\n unwrap(codeChild);\n }\n editor.select(currentContainer, PositionType.Begin);\n}\n\nexport const CodeFeatures: Record<\n keyof CodeFeatureSettings,\n BuildInEditFeature\n> = {\n removeCodeWhenEnterOnEmptyLine: RemoveCodeWhenEnterOnEmptyLine,\n removeCodeWhenBackspaceOnEmptyFirstLine: RemoveCodeWhenBackspaceOnEmptyFirstLine,\n};\n","import { Browser, getComputedStyle, Position } from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n CursorFeatureSettings,\n Keys,\n PluginKeyboardEvent,\n} from 'roosterjs-editor-types';\n\nconst NoCycleCursorMove: BuildInEditFeature = {\n keys: [Keys.LEFT, Keys.RIGHT],\n allowFunctionKeys: true,\n shouldHandleEvent: (event, editor, ctrlOrMeta) => {\n let range: Range | null = null;\n let position: Position;\n\n if (\n !ctrlOrMeta ||\n !(range = editor.getSelectionRange()) ||\n !range.collapsed ||\n !(position = Position.getStart(range)) ||\n !editor.isPositionAtBeginning(position)\n ) {\n return false;\n }\n\n let rtl = getComputedStyle(position.element, 'direction') == 'rtl';\n let rawEvent = event.rawEvent;\n\n return (!rtl && rawEvent.which == Keys.LEFT) || (rtl && rawEvent.which == Keys.RIGHT);\n },\n handleEvent: event => {\n event.rawEvent.preventDefault();\n },\n defaultDisabled: !Browser.isChrome,\n};\n\n/**\n * @internal\n */\nexport const CursorFeatures: Record<\n keyof CursorFeatureSettings,\n BuildInEditFeature\n> = {\n noCycleCursorMove: NoCycleCursorMove,\n};\n","import { ContentTraverser } from 'roosterjs-editor-dom';\nimport {\n addDelimiters,\n cacheGetEventData,\n createRange,\n getComputedStyle,\n getDelimiterFromElement,\n getEntityFromElement,\n getEntitySelector,\n isBlockElement,\n matchesSelector,\n Position,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n EntityFeatureSettings,\n EntityOperation,\n IEditor,\n Keys,\n PluginKeyboardEvent,\n PositionType,\n PluginEventType,\n DelimiterClasses,\n PluginEvent,\n NodeType,\n ExperimentalFeatures,\n Entity,\n IContentTraverser,\n InlineElement,\n} from 'roosterjs-editor-types';\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"Click\" when user\n * clicks on a readonly entity.\n */\nconst ClickOnEntityFeature: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => cacheGetReadonlyEntityElement(event, editor),\n handleEvent: (event, editor) => {\n cacheGetReadonlyEntityElement(event, editor, EntityOperation.Click);\n },\n};\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"Escape\" when user\n * presses ESC on a readonly entity.\n */\nconst EscapeFromEntityFeature: BuildInEditFeature = {\n keys: [Keys.ESCAPE],\n shouldHandleEvent: (event, editor) => cacheGetReadonlyEntityElement(event, editor),\n handleEvent: (event, editor) => {\n cacheGetReadonlyEntityElement(event, editor, EntityOperation.Escape);\n },\n};\n\nfunction cacheGetReadonlyEntityElement(\n event: PluginKeyboardEvent,\n editor: IEditor,\n operation?: EntityOperation\n) {\n const element = cacheGetEventData(event, 'READONLY_ENTITY_ELEMENT', () => {\n const node = event.rawEvent.target as Node;\n const entityElement = node && editor.getElementAtCursor(getEntitySelector(), node);\n return entityElement && !entityElement.isContentEditable ? entityElement : null;\n });\n\n if (element && operation !== undefined) {\n const entity = getEntityFromElement(element);\n if (entity) {\n editor.triggerPluginEvent(PluginEventType.EntityOperation, {\n operation,\n rawEvent: event.rawEvent,\n entity,\n });\n }\n }\n\n return element;\n}\n\n/**\n * A content edit feature to split current line into two lines at the cursor when user presses\n * ENTER right before a readonly entity.\n * Browser's default behavior will insert an extra BR tag before the entity which causes an extra\n * empty line. So we override the default behavior here.\n */\nconst EnterBeforeReadonlyEntityFeature: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) =>\n cacheGetNeighborEntityElement(event, editor, true /*isNext*/, false /*collapseOnly*/),\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n\n const range = editor.getSelectionRange();\n if (!range) {\n return;\n }\n\n const node = Position.getEnd(range).normalize().node;\n const br = editor.getDocument().createElement('BR');\n node.parentNode?.insertBefore(br, node.nextSibling);\n\n const block = editor.getBlockElementAtNode(node);\n let newContainer: HTMLElement | undefined;\n\n if (block) {\n newContainer = block.collapseToSingleElement();\n br.parentNode?.removeChild(br);\n }\n\n editor.getSelectionRange()?.deleteContents();\n\n if (newContainer?.nextSibling) {\n editor.select(newContainer.nextSibling, PositionType.Begin);\n }\n },\n};\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"RemoveFromEnd\" when user\n * press BACKSPACE right after an entity\n */\nconst BackspaceAfterEntityFeature: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) =>\n cacheGetNeighborEntityElement(event, editor, false /*isNext*/, true /*collapseOnly*/),\n handleEvent: (event, editor) => {\n cacheGetNeighborEntityElement(\n event,\n editor,\n false /*isNext*/,\n true /*collapseOnly*/,\n EntityOperation.RemoveFromEnd\n );\n },\n};\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"RemoveFromStart\" when user\n * press DELETE right after an entity\n */\nconst DeleteBeforeEntityFeature: BuildInEditFeature = {\n keys: [Keys.DELETE],\n shouldHandleEvent: (event, editor) =>\n cacheGetNeighborEntityElement(event, editor, true /*isNext*/, true /*collapseOnly*/),\n handleEvent: (event, editor) => {\n cacheGetNeighborEntityElement(\n event,\n editor,\n true /*isNext*/,\n true /*collapseOnly*/,\n EntityOperation.RemoveFromStart\n );\n },\n};\n\nfunction cacheGetNeighborEntityElement(\n event: PluginKeyboardEvent,\n editor: IEditor,\n isNext: boolean,\n collapseOnly: boolean,\n operation?: EntityOperation\n): HTMLElement | null {\n const element = cacheGetEventData(\n event,\n 'NEIGHBOR_ENTITY_ELEMENT_' + isNext + '_' + collapseOnly,\n () => {\n const range = editor.getSelectionRange();\n\n if (!range || (collapseOnly && !range.collapsed)) {\n return null;\n }\n\n const regions = editor.getSelectedRegions();\n const regionRoot = regions[0]?.rootNode;\n\n range.commonAncestorContainer.normalize();\n const pos = Position.getEnd(range).normalize();\n const isAtBeginOrEnd = pos.offset == 0 || pos.isAtEnd;\n let entityNode: HTMLElement | null = null;\n\n if (isAtBeginOrEnd && regionRoot) {\n const traverser = ContentTraverser.createBodyTraverser(regionRoot, pos.node);\n const sibling = isNext\n ? pos.offset == 0\n ? traverser.currentInlineElement\n : traverser.getNextInlineElement()\n : pos.isAtEnd\n ? traverser.currentInlineElement\n : traverser.getPreviousInlineElement();\n let node = sibling && sibling.getContainerNode();\n\n if (!collapseOnly) {\n const block = editor.getBlockElementAtNode(pos.node);\n if (!block || (node && !block.contains(node))) {\n node = null;\n }\n }\n\n entityNode = node && editor.getElementAtCursor(getEntitySelector(), node);\n }\n\n return entityNode;\n }\n );\n\n if (element && operation !== undefined) {\n const entity = getEntityFromElement(element);\n if (entity) {\n triggerOperation(entity, editor, operation, event);\n }\n }\n\n return element;\n}\n\n/**\n * @requires ExperimentalFeatures.InlineEntityReadOnlyDelimiters to be enabled\n * Content edit feature to move the cursor from Delimiters around Entities when using Right or Left Arrow Keys\n */\nconst MoveBetweenDelimitersFeature: BuildInEditFeature = {\n keys: [Keys.RIGHT, Keys.LEFT],\n allowFunctionKeys: true,\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) => {\n if (\n event.rawEvent.altKey ||\n !editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n return false;\n }\n\n const element = editor.getElementAtCursor();\n if (!element) {\n return false;\n }\n\n const isRTL = getComputedStyle(element, 'direction') === 'rtl';\n const shouldCheckBefore = isRTL == (event.rawEvent.which === Keys.LEFT);\n\n return getIsDelimiterAtCursor(event, editor, shouldCheckBefore);\n },\n handleEvent(event: PluginKeyboardEvent, editor: IEditor) {\n const checkBefore = cacheGetCheckBefore(event);\n const delimiter = cacheDelimiter(event, checkBefore);\n\n if (!delimiter) {\n return;\n }\n\n const { delimiterPair, entity } = getRelatedElements(delimiter, checkBefore, editor);\n\n if (delimiterPair && entity && matchesSelector(entity, getEntitySelector())) {\n event.rawEvent.preventDefault();\n editor.runAsync(() => {\n const positionType = checkBefore\n ? event.rawEvent.shiftKey\n ? PositionType.After\n : PositionType.End\n : PositionType.Before;\n const position = new Position(delimiterPair, positionType);\n if (event.rawEvent.shiftKey) {\n const selection = delimiterPair.ownerDocument.getSelection();\n selection?.extend(position.node, position.offset);\n } else {\n editor.select(position);\n }\n });\n }\n },\n};\n\n/**\n * @requires ExperimentalFeatures.InlineEntityReadOnlyDelimiters to be enabled\n * Content edit Feature to trigger a Delete Entity Operation when one of the Delimiter is about to be removed with DELETE or Backspace\n */\nconst RemoveEntityBetweenDelimitersFeature: BuildInEditFeature = {\n keys: [Keys.BACKSPACE, Keys.DELETE],\n shouldHandleEvent(event: PluginKeyboardEvent, editor: IEditor) {\n if (!editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)) {\n return false;\n }\n\n const range = editor.getSelectionRange();\n if (!range?.collapsed) {\n return false;\n }\n const checkBefore = event.rawEvent.which === Keys.DELETE;\n const isDelimiter = getIsDelimiterAtCursor(event, editor, checkBefore);\n\n if (isDelimiter) {\n const delimiter = cacheDelimiter(event, checkBefore);\n const entityElement = checkBefore\n ? delimiter?.nextElementSibling\n : delimiter?.previousElementSibling;\n\n return !!cacheEntityBetweenDelimiter(event, editor, checkBefore, entityElement);\n }\n\n return false;\n },\n handleEvent(event: PluginKeyboardEvent, editor: IEditor) {\n const checkBefore = event.rawEvent.which === Keys.DELETE;\n cacheEntityBetweenDelimiter(\n event,\n editor,\n checkBefore,\n null,\n checkBefore ? EntityOperation.RemoveFromStart : EntityOperation.RemoveFromEnd\n );\n },\n};\n\nfunction getIsDelimiterAtCursor(event: PluginKeyboardEvent, editor: IEditor, checkBefore: boolean) {\n const position = editor.getFocusedPosition()?.normalize();\n cacheGetCheckBefore(event, checkBefore);\n\n if (!position) {\n return false;\n }\n\n const focusedElement =\n position.node.nodeType == NodeType.Text\n ? position.node\n : position.node == position.element\n ? position.element.childNodes.item(position.offset)\n : position.element;\n\n const data = checkBefore\n ? {\n class: DelimiterClasses.DELIMITER_BEFORE,\n pairClass: DelimiterClasses.DELIMITER_AFTER,\n isAtEndOrBeginning: position.isAtEnd,\n }\n : {\n class: DelimiterClasses.DELIMITER_AFTER,\n pairClass: DelimiterClasses.DELIMITER_BEFORE,\n isAtEndOrBeginning: position.offset == 0,\n };\n\n const sibling = getNextSibling(editor, focusedElement, checkBefore);\n if (data.isAtEndOrBeginning && sibling) {\n const elAtCursor = editor.getElementAtCursor('.' + data.class, sibling);\n\n if (elAtCursor && !!shouldHandle(elAtCursor)) {\n return true;\n }\n }\n\n const entityAtCursor =\n focusedElement && editor.getElementAtCursor('.' + data.class, focusedElement);\n return !!shouldHandle(entityAtCursor);\n\n function shouldHandle(element: HTMLElement | null | undefined) {\n if (!element) {\n return false;\n }\n\n const { delimiterPair } = getRelatedElements(element, checkBefore, editor);\n\n return (\n delimiterPair &&\n (delimiterPair.className || '').indexOf(data.pairClass) > -1 &&\n cacheDelimiter(event, checkBefore, element)\n );\n }\n}\n\nfunction getNextSibling(editor: IEditor, element: Node, checkBefore: boolean) {\n const traverser = getBlockTraverser(editor, element);\n if (!traverser) {\n return undefined;\n }\n\n const traverseFn = (t: IContentTraverser) =>\n checkBefore ? t.getNextInlineElement() : t.getPreviousInlineElement();\n\n let currentInline = traverser.currentInlineElement;\n while (currentInline && currentInline.getContainerNode() === element) {\n currentInline = traverseFn(traverser);\n }\n return currentInline?.getContainerNode();\n}\n\nfunction getBlockTraverser(editor: IEditor, element: Node | null | undefined) {\n if (!element) {\n return undefined;\n }\n const blockElement = editor.getBlockElementAtNode(element)?.getStartNode();\n if (!blockElement || !isBlockElement(blockElement)) {\n return undefined;\n }\n return ContentTraverser.createBodyTraverser(blockElement, element);\n}\n\nfunction cacheDelimiter(event: PluginEvent, checkBefore: boolean, delimiter?: HTMLElement | null) {\n return cacheGetEventData(event, 'delimiter_cache_key_' + checkBefore, () => delimiter);\n}\n\nfunction cacheEntityBetweenDelimiter(\n event: PluginKeyboardEvent,\n editor: IEditor,\n checkBefore: boolean,\n entity?: Element | null,\n operation?: EntityOperation\n) {\n const element = cacheGetEventData(\n event,\n 'entity_delimiter_cache_key_' + checkBefore,\n () => entity && editor.getElementAtCursor(getEntitySelector(), entity)\n );\n\n if (element && operation !== undefined) {\n const entity = getEntityFromElement(element);\n\n if (entity) {\n triggerOperation(entity, editor, operation, event);\n }\n }\n\n return element;\n}\n\nfunction triggerOperation(\n entity: Entity,\n editor: IEditor,\n operation: EntityOperation,\n event: PluginKeyboardEvent\n) {\n const { nextElementSibling, previousElementSibling } = entity.wrapper;\n editor.triggerPluginEvent(PluginEventType.EntityOperation, {\n operation,\n rawEvent: event.rawEvent,\n entity,\n });\n\n if (\n entity.isReadonly &&\n !isBlockElement(entity.wrapper) &&\n editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n if (event.rawEvent.defaultPrevented) {\n editor.runAsync(() => {\n if (!editor.contains(entity.wrapper)) {\n removeDelimiters(nextElementSibling, previousElementSibling);\n } else {\n const [delimiterAfter] = addDelimiters(entity.wrapper);\n if (delimiterAfter) {\n editor.select(delimiterAfter, PositionType.After);\n }\n }\n });\n } else if (\n getDelimiterFromElement(nextElementSibling) &&\n getDelimiterFromElement(previousElementSibling)\n ) {\n editor.select(createRange(previousElementSibling, nextElementSibling));\n }\n }\n}\n\nfunction removeDelimiters(\n nextElementSibling: Element | null,\n previousElementSibling: Element | null\n) {\n [nextElementSibling, previousElementSibling].forEach(sibling => {\n if (getDelimiterFromElement(sibling)) {\n sibling?.parentElement?.removeChild(sibling);\n }\n });\n}\n\nfunction cacheGetCheckBefore(event: PluginKeyboardEvent, checkBefore?: boolean): boolean {\n return !!cacheGetEventData(event, 'Check_Before', () => checkBefore);\n}\n\nfunction getRelatedElements(delimiter: HTMLElement, checkBefore: boolean, editor: IEditor) {\n let entity: Element | null = null;\n let delimiterPair: Element | null = null;\n const traverser = getBlockTraverser(editor, delimiter);\n if (!traverser) {\n return { delimiterPair, entity };\n }\n\n const selector = `.${\n checkBefore ? DelimiterClasses.DELIMITER_AFTER : DelimiterClasses.DELIMITER_BEFORE\n }`;\n const traverseFn = (t: IContentTraverser) =>\n checkBefore ? t.getNextInlineElement() : t.getPreviousInlineElement();\n const getElementFromInline = (element: InlineElement, selector: string) => {\n const node = element?.getContainerNode();\n return (node && editor.getElementAtCursor(selector, node)) ?? null;\n };\n const entitySelector = getEntitySelector();\n\n let current = traverser.currentInlineElement;\n while (current && (!entity || !delimiterPair)) {\n entity = entity || getElementFromInline(current, entitySelector);\n delimiterPair = delimiterPair || getElementFromInline(current, selector);\n\n // If we found the entity but the next inline after the entity is not a delimiter,\n // it means that the delimiter pair got removed or is invalid, return null instead.\n if (entity && !delimiterPair && !getElementFromInline(current, entitySelector)) {\n delimiterPair = null;\n break;\n }\n current = traverseFn(traverser);\n }\n\n return { entity, delimiterPair };\n}\n\n/**\n * @internal\n */\nexport const EntityFeatures: Record<\n keyof EntityFeatureSettings,\n BuildInEditFeature\n> = {\n clickOnEntity: ClickOnEntityFeature,\n escapeFromEntity: EscapeFromEntityFeature,\n enterBeforeReadonlyEntity: EnterBeforeReadonlyEntityFeature,\n backspaceAfterEntity: BackspaceAfterEntityFeature,\n deleteBeforeEntity: DeleteBeforeEntityFeature,\n moveBetweenDelimitersFeature: MoveBetweenDelimitersFeature,\n removeEntityBetweenDelimiters: RemoveEntityBetweenDelimitersFeature,\n};\n","import getAutoBulletListStyle from '../utils/getAutoBulletListStyle';\nimport getAutoNumberingListStyle from '../utils/getAutoNumberingListStyle';\nimport {\n blockFormat,\n commitListChains,\n setIndentation,\n toggleBullet,\n toggleNumbering,\n toggleListType,\n} from 'roosterjs-editor-api';\nimport {\n Browser,\n getTagOfNode,\n isNodeEmpty,\n isPositionAtBeginningOf,\n Position,\n VListChain,\n createVListFromRegion,\n isBlockElement,\n cacheGetEventData,\n safeInstanceOf,\n VList,\n createObjectDefinition,\n createNumberDefinition,\n getMetadata,\n findClosestElementAncestor,\n getComputedStyle,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n IEditor,\n Indentation,\n ListFeatureSettings,\n Keys,\n PluginKeyboardEvent,\n QueryScope,\n RegionBase,\n ListType,\n ExperimentalFeatures,\n PositionType,\n NumberingListType,\n BulletListType,\n IPositionContentSearcher,\n} from 'roosterjs-editor-types';\n\nconst PREVIOUS_BLOCK_CACHE_KEY = 'previousBlock';\nconst NEXT_BLOCK_CACHE_KEY = 'nextBlock';\n\ninterface ListStyleMetadata {\n orderedStyleType?: NumberingListType;\n unorderedStyleType?: BulletListType;\n}\n\nconst ListStyleDefinitionMetadata = createObjectDefinition(\n {\n orderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n NumberingListType.Min,\n NumberingListType.Max\n ),\n unorderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n BulletListType.Min,\n BulletListType.Max\n ),\n },\n true /** isOptional */,\n true /** allowNull */\n);\n\nconst shouldHandleIndentationEvent = (indenting: boolean) => (\n event: PluginKeyboardEvent,\n editor: IEditor\n) => {\n const { keyCode, altKey, shiftKey, ctrlKey, metaKey } = event.rawEvent;\n return (\n !ctrlKey &&\n !metaKey &&\n (keyCode === Keys.TAB\n ? !altKey && shiftKey === !indenting\n : shiftKey && altKey && keyCode === (indenting ? Keys.RIGHT : Keys.LEFT)) &&\n cacheGetListElement(event, editor)\n );\n};\n\nconst handleIndentationEvent = (indenting: boolean) => (\n event: PluginKeyboardEvent,\n editor: IEditor\n) => {\n let currentElement: Node | null = null;\n const isRTL =\n event.rawEvent.keyCode !== Keys.TAB &&\n (currentElement = editor.getElementAtCursor()) &&\n getComputedStyle(currentElement, 'direction') == 'rtl';\n setIndentation(editor, isRTL == indenting ? Indentation.Decrease : Indentation.Increase);\n event.rawEvent.preventDefault();\n};\n\n/**\n * IndentWhenTab edit feature, provides the ability to indent current list when user press TAB\n */\nconst IndentWhenTab: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: shouldHandleIndentationEvent(true),\n handleEvent: handleIndentationEvent(true),\n};\n\n/**\n * OutdentWhenShiftTab edit feature, provides the ability to outdent current list when user press Shift+TAB\n */\nconst OutdentWhenShiftTab: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: shouldHandleIndentationEvent(false),\n handleEvent: handleIndentationEvent(false),\n allowFunctionKeys: true,\n};\n\n/**\n * indentWhenAltShiftRight edit feature, provides the ability to indent or outdent current list when user press Alt+shift+Right\n */\nconst IndentWhenAltShiftRight: BuildInEditFeature = {\n keys: [Keys.RIGHT],\n shouldHandleEvent: shouldHandleIndentationEvent(true),\n handleEvent: handleIndentationEvent(true),\n allowFunctionKeys: true,\n defaultDisabled: Browser.isMac,\n};\n\n/**\n * outdentWhenAltShiftLeft edit feature, provides the ability to indent or outdent current list when user press Alt+shift+Left\n */\nconst OutdentWhenAltShiftLeft: BuildInEditFeature = {\n keys: [Keys.LEFT],\n shouldHandleEvent: shouldHandleIndentationEvent(false),\n handleEvent: handleIndentationEvent(false),\n allowFunctionKeys: true,\n defaultDisabled: Browser.isMac,\n};\n\n/**\n * MergeInNewLine edit feature, provides the ability to merge current line into a new line when user press\n * BACKSPACE at beginning of a list item\n */\nconst MergeInNewLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n let range = editor.getSelectionRange();\n return li && range?.collapsed && isPositionAtBeginningOf(Position.getStart(range), li);\n },\n handleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n if (li?.previousSibling) {\n blockFormat(editor, (region, start, end) => {\n const vList = createVListFromRegion(\n region,\n false /*includeSiblingList*/,\n li ?? undefined\n );\n if (vList && start && end) {\n vList.setIndentation(start, end, Indentation.Decrease, true /*softOutdent*/);\n vList.writeBack(\n editor.isFeatureEnabled(ExperimentalFeatures.ReuseAllAncestorListElements),\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\n );\n event.rawEvent.preventDefault();\n }\n });\n } else {\n toggleListAndPreventDefault(event, editor);\n }\n },\n defaultDisabled: true,\n};\n\n/**\n * OutdentWhenBackOn1stEmptyLine edit feature, provides the ability to outdent current item if user press\n * BACKSPACE at the first and empty line of a list\n */\nconst OutdentWhenBackOn1stEmptyLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n return (\n li &&\n isNodeEmpty(li) &&\n !li.previousSibling &&\n !li.getElementsByTagName('blockquote').length\n );\n },\n handleEvent: toggleListAndPreventDefault,\n};\n\n/**\n * MaintainListChainWhenDelete edit feature, provides the ability to indent the list if user press\n * DELETE before the first item of a list\n */\nconst MaintainListChainWhenDelete: BuildInEditFeature = {\n keys: [Keys.DELETE],\n shouldHandleEvent: (event, editor) => {\n const li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n const range = editor.getSelectionRange();\n if (li || !range) {\n return false;\n }\n const isAtEnd = Position.getEnd(range).isAtEnd;\n const nextSibling = isAtEnd ? getCacheNextSibling(event, editor) : undefined;\n const isAtEndAndBeforeLI = editor.getElementAtCursor('LI', nextSibling, event);\n return isAtEndAndBeforeLI;\n },\n handleEvent: (event, editor) => {\n const chains = getListChains(editor);\n editor.runAsync(editor => commitListChains(editor, chains));\n },\n};\n\n/**\n * OutdentWhenEnterOnEmptyLine edit feature, provides the ability to outdent current item if user press\n * ENTER at the beginning of an empty line of a list\n */\nconst OutdentWhenEnterOnEmptyLine: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n return !event.rawEvent.shiftKey && li && isNodeEmpty(li);\n },\n handleEvent: (event, editor) => {\n editor.addUndoSnapshot(\n () => toggleListAndPreventDefault(event, editor, false /* includeSiblingLists */),\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n defaultDisabled: !Browser.isIE && !Browser.isChrome,\n};\n\n/**\n * Validate if a block of text is considered a list pattern\n * The regex expression will look for patterns of the form:\n * 1. 1> 1) 1- (1)\n * @returns if a text is considered a list pattern\n */\nfunction isAListPattern(textBeforeCursor: string) {\n const REGEX: RegExp = /^(\\*|-|[0-9]{1,2}\\.|[0-9]{1,2}\\>|[0-9]{1,2}\\)|[0-9]{1,2}\\-|\\([0-9]{1,2}\\))$/;\n return REGEX.test(textBeforeCursor);\n}\n\n/**\n * AutoBullet edit feature, provides the ability to automatically convert current line into a list.\n * When user input \"1. \", convert into a numbering list\n * When user input \"- \" or \"* \", convert into a bullet list\n */\nconst AutoBullet: BuildInEditFeature = {\n keys: [Keys.SPACE],\n shouldHandleEvent: (event, editor) => {\n let searcher: IPositionContentSearcher | null;\n if (\n !cacheGetListElement(event, editor) &&\n !editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList) &&\n (searcher = editor.getContentSearcherOfCursor(event))\n ) {\n let textBeforeCursor = searcher.getSubStringBefore(4);\n\n // Auto list is triggered if:\n // 1. Text before cursor exactly matches '*', '-' or '1.'\n // 2. There's no non-text inline entities before cursor\n return isAListPattern(textBeforeCursor) && !searcher.getNearestNonTextInlineElement();\n }\n return false;\n },\n handleEvent: (event, editor) => {\n editor.insertContent(' ');\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n let regions: RegionBase[];\n let searcher = editor.getContentSearcherOfCursor();\n if (!searcher) {\n return;\n }\n let textBeforeCursor = searcher.getSubStringBefore(4);\n let textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n\n if (!textRange) {\n // no op if the range can't be found\n } else if (\n textBeforeCursor.indexOf('*') == 0 ||\n textBeforeCursor.indexOf('-') == 0\n ) {\n prepareAutoBullet(editor, textRange);\n toggleBullet(editor);\n } else if (isAListPattern(textBeforeCursor)) {\n prepareAutoBullet(editor, textRange);\n toggleNumbering(editor);\n } else if ((regions = editor.getSelectedRegions()) && regions.length == 1) {\n const num = parseInt(textBeforeCursor);\n prepareAutoBullet(editor, textRange);\n toggleNumbering(editor, num);\n }\n searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/)?.deleteContents();\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.AutoFormatList to be enabled\n * AutoBulletList edit feature, provides the ability to automatically convert current line into a bullet list.\n */\nconst AutoBulletList: BuildInEditFeature = {\n keys: [Keys.SPACE],\n shouldHandleEvent: (event, editor) => {\n if (\n !cacheGetListElement(event, editor) &&\n editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList)\n ) {\n return shouldTriggerList(event, editor, getAutoBulletListStyle, ListType.Unordered);\n }\n return false;\n },\n handleEvent: (event, editor) => {\n editor.insertContent(' ');\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n let searcher = editor.getContentSearcherOfCursor();\n if (!searcher) {\n return;\n }\n let textBeforeCursor = searcher.getSubStringBefore(5);\n let textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n const listStyle = getAutoBulletListStyle(textBeforeCursor);\n\n if (textRange) {\n prepareAutoBullet(editor, textRange);\n toggleBullet(\n editor,\n listStyle ?? undefined,\n 'autoToggleList' /** apiNameOverride */\n );\n }\n searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/)?.deleteContents();\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.AutoFormatList to be enabled\n * AutoNumberingList edit feature, provides the ability to automatically convert current line into a numbering list.\n */\nconst AutoNumberingList: BuildInEditFeature = {\n keys: [Keys.SPACE],\n shouldHandleEvent: (event, editor) => {\n if (\n !cacheGetListElement(event, editor) &&\n editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList)\n ) {\n return shouldTriggerList(event, editor, getAutoNumberingListStyle, ListType.Ordered);\n }\n return false;\n },\n handleEvent: (event, editor) => {\n editor.insertContent(' ');\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n const searcher = editor.getContentSearcherOfCursor();\n if (!searcher) {\n return;\n }\n const textBeforeCursor = searcher.getSubStringBefore(5);\n const textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n\n if (textRange) {\n const number = isFirstItemOfAList(textBeforeCursor)\n ? 1\n : parseInt(textBeforeCursor);\n\n const isLi = getPreviousListItem(editor, textRange);\n const listStyle = getAutoNumberingListStyle(textBeforeCursor) ?? undefined;\n prepareAutoBullet(editor, textRange);\n toggleNumbering(\n editor,\n isLi && number !== 1 ? undefined : number /** startNumber */,\n listStyle,\n 'autoToggleList' /** apiNameOverride */\n );\n }\n searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/)?.deleteContents();\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n};\n\nconst getPreviousListItem = (editor: IEditor, textRange: Range) => {\n const blockElement = editor\n .getBodyTraverser(textRange?.startContainer)\n .getPreviousBlockElement();\n const previousNode = blockElement?.getEndNode() ?? null;\n return getTagOfNode(previousNode) === 'LI' ? previousNode : undefined;\n};\n\nconst getPreviousListType = (editor: IEditor, textRange: Range, listType: ListType) => {\n const type = listType === ListType.Ordered ? 'orderedStyleType' : 'unorderedStyleType';\n const listItem = getPreviousListItem(editor, textRange);\n const list = listItem\n ? findClosestElementAncestor(\n listItem,\n undefined /** root*/,\n listType === ListType.Ordered ? 'ol' : 'ul'\n )\n : null;\n const metadata = list ? getMetadata(list, ListStyleDefinitionMetadata) : null;\n return metadata ? metadata[type] : null;\n};\n\nconst isFirstItemOfAList = (item: string) => {\n const number = parseInt(item);\n if (number && number === 1) {\n return 1;\n } else {\n const letter = item.replace(/\\(|\\)|\\-|\\./g, '').trim();\n return letter.length === 1 && ['i', 'a', 'I', 'A'].indexOf(letter) > -1 ? 1 : undefined;\n }\n};\n\n/**\n * Maintain the list numbers in list chain\n * e.g. we have two lists:\n * 1, 2, 3 and 4, 5, 6\n * Now we delete list item 2, so the first one becomes \"1, 2\".\n * This edit feature can maintain the list number of the second list to become \"3, 4, 5\"\n */\nconst MaintainListChain: BuildInEditFeature = {\n keys: [Keys.ENTER, Keys.TAB, Keys.DELETE, Keys.BACKSPACE, Keys.RANGE],\n shouldHandleEvent: (event, editor) =>\n editor\n .queryElements('li', QueryScope.OnSelection)\n .filter(li => !li.getElementsByTagName('blockquote').length).length > 0,\n handleEvent: (event, editor) => {\n const chains = getListChains(editor);\n editor.runAsync(editor => commitListChains(editor, chains));\n },\n};\n\nfunction getListChains(editor: IEditor) {\n return VListChain.createListChains(editor.getSelectedRegions());\n}\n\nfunction getCacheNextSibling(event: PluginKeyboardEvent, editor: IEditor): Node | undefined {\n const element = cacheGetEventData(event, 'nextSibling', () => {\n const range = editor.getSelectionRange();\n const pos = range && Position.getEnd(range).normalize();\n const traverser = pos && editor.getBodyTraverser(pos.node);\n return traverser?.getNextBlockElement()?.getStartNode();\n });\n return element;\n}\n\nfunction prepareAutoBullet(editor: IEditor, range: Range) {\n const block = editor.getBlockElementAtNode(range.startContainer);\n const endNode = block?.getEndNode();\n if (endNode && getTagOfNode(endNode) != 'BR') {\n const br = editor.getDocument().createElement('BR');\n if (isBlockElement(endNode)) {\n endNode.appendChild(br);\n } else {\n endNode.parentNode?.insertBefore(br, endNode.nextSibling);\n }\n editor.select(range.startContainer, range.startOffset);\n }\n}\n\nfunction toggleListAndPreventDefault(\n event: PluginKeyboardEvent,\n editor: IEditor,\n includeSiblingLists: boolean = true\n) {\n let listInfo = cacheGetListElement(event, editor);\n if (listInfo) {\n let listElement = listInfo[0];\n let tag = getTagOfNode(listElement);\n\n if (tag == 'UL' || tag == 'OL') {\n toggleListType(\n editor,\n tag == 'UL' ? ListType.Unordered : ListType.Ordered,\n undefined /* startNumber */,\n includeSiblingLists\n );\n }\n\n editor.focus();\n event.rawEvent.preventDefault();\n }\n}\n\nfunction cacheGetListElement(event: PluginKeyboardEvent, editor: IEditor) {\n let li = editor.getElementAtCursor('LI,TABLE', undefined /*startFrom*/, event);\n let listElement = li && getTagOfNode(li) == 'LI' && editor.getElementAtCursor('UL,OL', li);\n return listElement ? [listElement, li] : null;\n}\n\nfunction shouldTriggerList<\n T extends ListType,\n K extends T extends ListType.Ordered ? NumberingListType : BulletListType\n>(\n event: PluginKeyboardEvent,\n editor: IEditor,\n getListStyle: (\n text: string,\n previousListChain?: VListChain[],\n previousListStyle?: K\n ) => K | null,\n listType: T\n) {\n const searcher = editor.getContentSearcherOfCursor(event);\n if (!searcher) {\n return false;\n }\n const textBeforeCursor = searcher.getSubStringBefore(4);\n const traverser = editor.getBlockTraverser();\n const text =\n traverser && traverser.currentBlockElement\n ? traverser.currentBlockElement.getTextContent().slice(0, textBeforeCursor.length)\n : null;\n const isATheBeginning = text && text === textBeforeCursor;\n const listChains = getListChains(editor);\n const textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n const previousListType =\n textRange && getPreviousListType(editor, textRange, listType);\n const isFirstItem = isFirstItemOfAList(textBeforeCursor);\n const listStyle = getListStyle(textBeforeCursor, listChains, previousListType ?? undefined);\n const shouldTriggerNewListStyle =\n isFirstItem ||\n !previousListType ||\n previousListType === listStyle ||\n listType === ListType.Unordered;\n\n return (\n isATheBeginning &&\n !searcher.getNearestNonTextInlineElement() &&\n listStyle &&\n shouldTriggerNewListStyle\n );\n}\n\n/**\n * MergeListOnBackspaceAfterList edit feature, provides the ability to merge list on backspace on block after a list.\n */\nconst MergeListOnBackspaceAfterList: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n const target = editor.getElementAtCursor();\n if (target) {\n const cursorBlock = editor.getBlockElementAtNode(target)?.getStartNode() as HTMLElement;\n const previousBlock = cursorBlock?.previousElementSibling ?? null;\n\n if (isList(previousBlock)) {\n const range = editor.getSelectionRange();\n const searcher = editor.getContentSearcherOfCursor(event);\n const textBeforeCursor = searcher?.getSubStringBefore(4);\n const nearestInline = searcher?.getNearestNonTextInlineElement();\n\n if (range && range.collapsed && textBeforeCursor === '' && !nearestInline) {\n const tempBlock = cursorBlock?.nextElementSibling;\n const nextBlock = isList(tempBlock) ? tempBlock : tempBlock?.firstChild;\n\n if (\n isList(nextBlock) &&\n getTagOfNode(previousBlock) == getTagOfNode(nextBlock)\n ) {\n const element = cacheGetEventData(\n event,\n PREVIOUS_BLOCK_CACHE_KEY,\n () => previousBlock\n );\n const nextElement = cacheGetEventData(\n event,\n NEXT_BLOCK_CACHE_KEY,\n () => nextBlock\n );\n\n return !!element && !!nextElement;\n }\n }\n }\n }\n\n return false;\n },\n handleEvent: (event, editor) => {\n editor.runAsync(editor => {\n const previousList = cacheGetEventData(\n event,\n PREVIOUS_BLOCK_CACHE_KEY,\n () => null\n );\n const targetBlock = cacheGetEventData(\n event,\n NEXT_BLOCK_CACHE_KEY,\n () => null\n );\n\n const rangeBeforeWriteBack = editor.getSelectionRange();\n\n if (previousList && targetBlock && rangeBeforeWriteBack) {\n const fvList = new VList(previousList);\n fvList.mergeVList(new VList(targetBlock));\n\n let span = editor.getDocument().createElement('span');\n span.id = 'restoreRange';\n rangeBeforeWriteBack.insertNode(span);\n\n fvList.writeBack();\n\n span = editor.queryElements('#restoreRange')[0];\n\n if (span.parentElement) {\n editor.select(new Position(span, PositionType.After));\n span.parentElement.removeChild(span);\n }\n }\n });\n },\n};\n\n/**\n * @internal\n */\nexport const ListFeatures: Record<\n keyof ListFeatureSettings,\n BuildInEditFeature\n> = {\n autoBullet: AutoBullet,\n indentWhenTab: IndentWhenTab,\n outdentWhenShiftTab: OutdentWhenShiftTab,\n outdentWhenBackspaceOnEmptyFirstLine: OutdentWhenBackOn1stEmptyLine,\n outdentWhenEnterOnEmptyLine: OutdentWhenEnterOnEmptyLine,\n mergeInNewLineWhenBackspaceOnFirstChar: MergeInNewLine,\n maintainListChain: MaintainListChain,\n maintainListChainWhenDelete: MaintainListChainWhenDelete,\n autoNumberingList: AutoNumberingList,\n autoBulletList: AutoBulletList,\n mergeListOnBackspaceAfterList: MergeListOnBackspaceAfterList,\n outdentWhenAltShiftLeft: OutdentWhenAltShiftLeft,\n indentWhenAltShiftRight: IndentWhenAltShiftRight,\n};\n\nfunction isList(element: Node | null | undefined): element is HTMLOListElement | HTMLOListElement {\n return (\n !!element &&\n (safeInstanceOf(element, 'HTMLOListElement') || safeInstanceOf(element, 'HTMLUListElement'))\n );\n}\n","import { cacheGetEventData, createRange, Position, wrap } from 'roosterjs-editor-dom';\nimport type { CompatibleKeys } from 'roosterjs-editor-types/lib/compatibleTypes';\nimport {\n BuildInEditFeature,\n ChangeSource,\n IEditor,\n Keys,\n MarkdownFeatureSettings,\n NodePosition,\n PluginKeyboardEvent,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\nfunction generateBasicMarkdownFeature(\n key: Keys | CompatibleKeys,\n triggerCharacter: string,\n elementTag: string,\n useShiftKey: boolean\n): BuildInEditFeature {\n return {\n keys: [key],\n shouldHandleEvent: (event, editor) =>\n event.rawEvent.shiftKey === useShiftKey &&\n !!cacheGetRangeForMarkdownOperation(event, editor, triggerCharacter),\n handleEvent: (event, editor) => {\n // runAsync is here to allow the event to complete so autocomplete will present the trigger character.\n editor.runAsync(editor => {\n handleMarkdownEvent(event, editor, triggerCharacter, elementTag);\n });\n },\n };\n}\n\nfunction cacheGetRangeForMarkdownOperation(\n event: PluginKeyboardEvent,\n editor: IEditor,\n triggerCharacter: string\n): Range | null {\n return cacheGetEventData(event, 'MARKDOWN_RANGE', (): Range | null => {\n const searcher = editor.getContentSearcherOfCursor(event);\n\n let startPosition: NodePosition | null = null;\n let endPosition: NodePosition | null = null;\n searcher?.forEachTextInlineElement(textInlineElement => {\n if (endPosition && startPosition) {\n return true;\n }\n const inlineTextContent = textInlineElement.getTextContent();\n\n // special case for immediately preceding character being whitespace\n if (inlineTextContent[inlineTextContent.length - 1].trim().length == 0) {\n return false;\n }\n\n //if the text is pasted, it might create a inner element inside the text element,\n // then is necessary to check the parent block to get whole text\n const parentBlockText = textInlineElement.getParentBlock().getTextContent();\n\n // special case for consecutive trigger characters\n // check parent block in case of pasted text\n if (parentBlockText[parentBlockText.length - 1].trim() === triggerCharacter) {\n return false;\n }\n\n if (!endPosition) {\n endPosition = textInlineElement.getStartPosition().move(inlineTextContent.length);\n }\n if (inlineTextContent[0] == triggerCharacter) {\n startPosition = textInlineElement.getStartPosition();\n } else {\n let contentIndex = inlineTextContent.length - 1;\n for (; contentIndex > 0; contentIndex--) {\n if (startPosition) {\n return true;\n }\n if (\n inlineTextContent[contentIndex] == triggerCharacter &&\n inlineTextContent[contentIndex - 1].trim().length == 0\n ) {\n startPosition = textInlineElement.getStartPosition().move(contentIndex);\n return true;\n }\n }\n }\n });\n return startPosition && endPosition && createRange(startPosition, endPosition);\n });\n}\n\nfunction handleMarkdownEvent(\n event: PluginKeyboardEvent,\n editor: IEditor,\n triggerCharacter: string,\n elementTag: string\n) {\n editor.addUndoSnapshot(\n () => {\n const range = cacheGetRangeForMarkdownOperation(event, editor, triggerCharacter);\n if (!range) {\n return;\n }\n const lastTypedTriggerPosition = new Position(range.endContainer, PositionType.End);\n const hasLastTypedTrigger = range.endOffset + 1 <= lastTypedTriggerPosition.offset;\n if (!!range && hasLastTypedTrigger) {\n // get the text content range\n const textContentRange = range.cloneRange();\n textContentRange.setStart(\n textContentRange.startContainer,\n textContentRange.startOffset + 1\n );\n\n const text = textContentRange.extractContents().textContent;\n const textNode = editor.getDocument().createTextNode(text ?? '');\n\n // extract content and put it into a new element.\n const elementToWrap = wrap(textNode, elementTag);\n //include last typed character\n range.setEnd(range.endContainer, range.endOffset + 1);\n range.deleteContents();\n\n // ZWS here ensures we don't end up inside the newly created node.\n const nonPrintedSpaceTextNode = editor\n .getDocument()\n .createTextNode(ZERO_WIDTH_SPACE);\n range.insertNode(nonPrintedSpaceTextNode);\n range.insertNode(elementToWrap);\n\n editor.select(nonPrintedSpaceTextNode, PositionType.End);\n }\n },\n ChangeSource.Format,\n true /*canUndoByBackspace*/\n );\n}\n\n/**\n * Markdown bold feature. Make bold text with markdown shortcuts.\n */\nconst MarkdownBold: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.EIGHT_ASTERISK,\n '*',\n 'b',\n true /* useShiftKey */\n);\n\n/**\n * Markdown italics feature. Make italic text with markdown shortcuts.\n */\nconst MarkdownItalic: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.DASH_UNDERSCORE,\n '_',\n 'i',\n true /* useShiftKey */\n);\n\n/**\n * Markdown strikethrough feature. MAke strikethrough text with markdown shortcuts.\n */\nconst MarkdownStrikethrough: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.GRAVE_TILDE,\n '~',\n 's',\n true /* useShiftKey */\n);\n\n/**\n * Markdown inline code feature. Marks specific text as inline code with markdown shortcuts.\n */\nconst MarkdownInlineCode: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.GRAVE_TILDE,\n '`',\n 'code',\n false /* useShiftKey */\n);\n\n/**\n * @internal\n */\nexport const MarkdownFeatures: Record<\n keyof MarkdownFeatureSettings,\n BuildInEditFeature\n> = {\n markdownBold: MarkdownBold,\n markdownItalic: MarkdownItalic,\n markdownStrikethru: MarkdownStrikethrough,\n markdownInlineCode: MarkdownInlineCode,\n};\n","import { clearFormat } from 'roosterjs-editor-api';\nimport {\n BuildInEditFeature,\n IEditor,\n Keys,\n PluginKeyboardEvent,\n PositionType,\n QuoteFeatureSettings,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n getTagOfNode,\n isNodeEmpty,\n safeInstanceOf,\n splitBalancedNodeRange,\n toArray,\n unwrap,\n wrap,\n} from 'roosterjs-editor-dom';\n\nconst QUOTE_TAG = 'BLOCKQUOTE';\nconst STRUCTURED_TAGS = [QUOTE_TAG, 'LI', 'TD', 'TH'].join(',');\n\n/**\n * UnquoteWhenBackOnEmpty1stLine edit feature, provides the ability to Unquote current line when\n * user press BACKSPACE on first and empty line of a BLOCKQUOTE\n */\nconst UnquoteWhenBackOnEmpty1stLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n let childOfQuote = cacheGetQuoteChild(event, editor);\n return childOfQuote && isNodeEmpty(childOfQuote) && !childOfQuote.previousSibling;\n },\n handleEvent: splitQuote,\n};\n\n/**\n * UnquoteWhenEnterOnEmptyLine edit feature, provides the ability to Unquote current line when\n * user press ENTER on an empty line of a BLOCKQUOTE\n */\nconst UnquoteWhenEnterOnEmptyLine: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => {\n let childOfQuote = cacheGetQuoteChild(event, editor);\n let shift = event.rawEvent.shiftKey;\n return !shift && childOfQuote && isNodeEmpty(childOfQuote);\n },\n handleEvent: (event, editor) =>\n editor.addUndoSnapshot(\n () => splitQuote(event, editor),\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n ),\n};\n\nfunction cacheGetQuoteChild(event: PluginKeyboardEvent, editor: IEditor): Node | null {\n return cacheGetEventData(event, 'QUOTE_CHILD', () => {\n let quote = editor.getElementAtCursor(STRUCTURED_TAGS);\n if (quote && getTagOfNode(quote) == QUOTE_TAG) {\n let pos = editor.getFocusedPosition();\n let block = pos && editor.getBlockElementAtNode(pos.normalize().node);\n if (block) {\n let node =\n block.getStartNode() == quote\n ? block.getStartNode()\n : block.collapseToSingleElement();\n return isNodeEmpty(node) ? node : null;\n }\n }\n\n return null;\n });\n}\n\nfunction splitQuote(event: PluginKeyboardEvent, editor: IEditor) {\n editor.addUndoSnapshot(() => {\n let childOfQuote = cacheGetQuoteChild(event, editor);\n if (!childOfQuote) {\n return;\n }\n if (getTagOfNode(childOfQuote) == QUOTE_TAG) {\n childOfQuote = wrap(toArray(childOfQuote.childNodes));\n }\n const parent = splitBalancedNodeRange(childOfQuote);\n const shouldClearFormat = !!parent && isStyledBlockquote(parent);\n const newParent = parent && unwrap(parent);\n editor.select(childOfQuote, PositionType.Begin);\n\n if (shouldClearFormat) {\n if (safeInstanceOf(newParent, 'HTMLLIElement')) {\n newParent.style.removeProperty('color');\n }\n clearFormat(editor);\n }\n });\n event.rawEvent.preventDefault();\n}\n\nconst isStyledBlockquote = (element: Node) => {\n if (\n element &&\n safeInstanceOf(element, 'HTMLQuoteElement') &&\n element.style.borderLeft &&\n element.style.borderColor &&\n element.style.paddingLeft &&\n element.style.color\n ) {\n return true;\n }\n return false;\n};\n\n/**\n * @internal\n */\nexport const QuoteFeatures: Record<\n keyof QuoteFeatureSettings,\n BuildInEditFeature\n> = {\n unquoteWhenBackspaceOnEmptyFirstLine: UnquoteWhenBackOnEmpty1stLine,\n unquoteWhenEnterOnEmptyLine: UnquoteWhenEnterOnEmptyLine,\n};\n","import { Browser, cacheGetEventData } from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n FontSizeChange,\n IEditor,\n Keys,\n PluginEventType,\n PluginKeyboardEvent,\n ShortcutFeatureSettings,\n} from 'roosterjs-editor-types';\nimport {\n changeFontSize,\n toggleBold,\n toggleItalic,\n toggleUnderline,\n toggleBullet,\n toggleNumbering,\n clearFormat,\n} from 'roosterjs-editor-api';\n\ninterface ShortcutCommand {\n winKey: number;\n macKey: number;\n action: (editor: IEditor) => any;\n}\n\nfunction createCommand(\n winKey: number,\n macKey: number,\n action: (editor: IEditor) => any,\n disabled: boolean = false\n) {\n if (disabled) {\n return null;\n }\n return {\n winKey,\n macKey,\n action,\n };\n}\n\nconst commands: ShortcutCommand[] = [\n createCommand(Keys.Ctrl | Keys.B, Keys.Meta | Keys.B, toggleBold),\n createCommand(Keys.Ctrl | Keys.I, Keys.Meta | Keys.I, toggleItalic),\n createCommand(Keys.Ctrl | Keys.U, Keys.Meta | Keys.U, toggleUnderline),\n createCommand(Keys.Ctrl | Keys.SPACE, Keys.Meta | Keys.SPACE, clearFormat),\n createCommand(Keys.Ctrl | Keys.Z, Keys.Meta | Keys.Z, editor => editor.undo()),\n createCommand(\n Keys.ALT | Keys.BACKSPACE,\n Keys.ALT | Keys.BACKSPACE,\n editor => editor.undo(),\n Browser.isMac /* Option+Backspace to be handled by browsers on Mac */\n ),\n createCommand(Keys.Ctrl | Keys.Y, Keys.Meta | Keys.Shift | Keys.Z, editor => editor.redo()),\n createCommand(Keys.Ctrl | Keys.PERIOD, Keys.Meta | Keys.PERIOD, toggleBullet),\n createCommand(Keys.Ctrl | Keys.FORWARD_SLASH, Keys.Meta | Keys.FORWARD_SLASH, toggleNumbering),\n createCommand(\n Keys.Ctrl | Keys.Shift | Keys.PERIOD,\n Keys.Meta | Keys.Shift | Keys.PERIOD,\n editor => changeFontSize(editor, FontSizeChange.Increase)\n ),\n createCommand(\n Keys.Ctrl | Keys.Shift | Keys.COMMA,\n Keys.Meta | Keys.Shift | Keys.COMMA,\n editor => changeFontSize(editor, FontSizeChange.Decrease)\n ),\n].filter((command): command is ShortcutCommand => !!command);\n\n/**\n * DefaultShortcut edit feature, provides shortcuts for the following features:\n * Ctrl/Meta+B: toggle bold style\n * Ctrl/Meta+I: toggle italic style\n * Ctrl/Meta+U: toggle underline style\n * Ctrl/Meta+Space: clear formatting\n * Alt+Backspace: undo\n * Ctrl/Meta+Z: undo\n * Ctrl+Y/Meta+Shift+Z: redo\n * Ctrl/Meta+PERIOD: toggle bullet list\n * Ctrl/Meta+/: toggle numbering list\n * Ctrl/Meta+Shift+>: increase font size\n * Ctrl/Meta+Shift+<: decrease font size\n */\nconst DefaultShortcut: BuildInEditFeature = {\n allowFunctionKeys: true,\n keys: [\n Keys.B,\n Keys.I,\n Keys.U,\n Keys.Y,\n Keys.Z,\n Keys.COMMA,\n Keys.PERIOD,\n Keys.FORWARD_SLASH,\n Keys.SPACE,\n Keys.BACKSPACE,\n ],\n shouldHandleEvent: cacheGetCommand,\n handleEvent: (event, editor) => {\n let command = cacheGetCommand(event);\n if (command) {\n command.action(editor);\n event.rawEvent.preventDefault();\n event.rawEvent.stopPropagation();\n }\n },\n};\n\nfunction cacheGetCommand(event: PluginKeyboardEvent) {\n return cacheGetEventData(event, 'DEFAULT_SHORT_COMMAND', () => {\n let e = event.rawEvent;\n let key =\n // Need to check AltGraph isn't being pressed since some languages (e.g. Polski) use AltGr\n // to input some special characters. In that case, ctrlKey and altKey are both true in Edge,\n // but we should not trigger any shortcut function here. However, we still want to capture\n // the ALT+BACKSPACE combination.\n event.eventType == PluginEventType.KeyDown && !e.getModifierState('AltGraph')\n ? e.which |\n ((e.metaKey && Keys.Meta)) |\n ((e.shiftKey && Keys.Shift)) |\n ((e.ctrlKey && Keys.Ctrl)) |\n ((e.altKey && Keys.ALT))\n : 0;\n return key && commands.filter(cmd => (Browser.isMac ? cmd.macKey : cmd.winKey) == key)[0];\n });\n}\n\n/**\n * @internal\n */\nexport const ShortcutFeatures: Record<\n keyof ShortcutFeatureSettings,\n BuildInEditFeature\n> = {\n defaultShortcut: DefaultShortcut,\n};\n","import {\n BuildInEditFeature,\n IEditor,\n Keys,\n KnownCreateElementDataIndex,\n PluginKeyboardEvent,\n PositionType,\n StructuredNodeFeatureSettings,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n isPositionAtBeginningOf,\n Position,\n getTagOfNode,\n createElement,\n getObjectKeys,\n} from 'roosterjs-editor-dom';\n\nconst CHILD_PARENT_TAG_MAP: { [childTag: string]: string } = {\n TD: 'TABLE',\n TH: 'TABLE',\n LI: 'OL,UL',\n};\nconst CHILD_SELECTOR = getObjectKeys(CHILD_PARENT_TAG_MAP).join(',');\n\n/**\n * InsertLineBeforeStructuredNode edit feature, provides the ability to insert an empty line before\n * a structured element (bullet/numbering list, blockquote, table) if the element is at beginning of\n * document\n */\nconst InsertLineBeforeStructuredNodeFeature: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: cacheGetStructuredElement,\n handleEvent: (event, editor) => {\n let element = cacheGetStructuredElement(event, editor);\n let div = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n editor.getDocument()\n ) as HTMLElement;\n editor.addUndoSnapshot(() => {\n element?.parentNode?.insertBefore(div, element);\n // Select the new line when we are in table. This is the same behavior with Word\n if (getTagOfNode(element) == 'TABLE') {\n editor.select(new Position(div, PositionType.Begin).normalize());\n }\n });\n event.rawEvent.preventDefault();\n },\n defaultDisabled: true,\n};\n\nfunction cacheGetStructuredElement(event: PluginKeyboardEvent, editor: IEditor) {\n return cacheGetEventData(event, 'FIRST_STRUCTURE', () => {\n // Provide a chance to keep browser default behavior by pressing SHIFT\n let element = event.rawEvent.shiftKey ? null : editor.getElementAtCursor(CHILD_SELECTOR);\n\n if (element) {\n let range = editor.getSelectionRange();\n if (\n range &&\n range.collapsed &&\n isPositionAtBeginningOf(Position.getStart(range), element) &&\n !editor.getBodyTraverser(element).getPreviousBlockElement()\n ) {\n return editor.getElementAtCursor(CHILD_PARENT_TAG_MAP[getTagOfNode(element)]);\n }\n }\n\n return null;\n });\n}\n\n/**\n * @internal\n */\nexport const StructuredNodeFeatures: Record<\n keyof StructuredNodeFeatureSettings,\n BuildInEditFeature\n> = {\n insertLineBeforeStructuredNodeFeature: InsertLineBeforeStructuredNodeFeature,\n};\n","import { editTable, setIndentation } from 'roosterjs-editor-api';\nimport {\n BuildInEditFeature,\n IEditor,\n Keys,\n NodeType,\n PluginEvent,\n PositionType,\n TableFeatureSettings,\n TableOperation,\n PluginKeyboardEvent,\n SelectionRangeTypes,\n TableSelectionRange,\n Indentation,\n ExperimentalFeatures,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n contains,\n getTagOfNode,\n isVoidHtmlElement,\n isWholeTableSelected,\n Position,\n VTable,\n} from 'roosterjs-editor-dom';\n\n/**\n * TabInTable edit feature, provides the ability to jump between cells when user press TAB in table\n */\nconst TabInTable: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n cacheGetTableCell(event, editor) && !cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n let shift = event.rawEvent.shiftKey;\n let td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n let vtable = cacheVTable(event, td);\n\n for (\n let step = shift ? -1 : 1, row = vtable.row ?? 0, col = (vtable.col ?? 0) + step;\n ;\n col += step\n ) {\n const tableCells = vtable.cells ?? [];\n if (col < 0 || col >= tableCells[row].length) {\n row += step;\n if (row < 0) {\n editor.select(vtable.table, PositionType.Before);\n break;\n } else if (row >= tableCells.length) {\n editTable(editor, TableOperation.InsertBelow);\n break;\n }\n col = shift ? tableCells[row].length - 1 : 0;\n }\n let cell = vtable.getCell(row, col);\n if (cell.td) {\n const newPos = new Position(cell.td, PositionType.Begin).normalize();\n editor.select(newPos);\n break;\n }\n }\n event.rawEvent.preventDefault();\n },\n};\n\n/**\n * IndentTableOnTab edit feature, provides the ability to indent the table if it is all cells are selected.\n */\nconst IndentTableOnTab: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n cacheGetTableCell(event, editor) && cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n\n editor.addUndoSnapshot(() => {\n let shift = event.rawEvent.shiftKey;\n let selection = editor.getSelectionRangeEx() as TableSelectionRange;\n let td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n let vtable = cacheVTable(event, td);\n\n if (shift && editor.getElementAtCursor('blockquote', vtable.table, event)) {\n setIndentation(editor, Indentation.Decrease);\n } else if (!shift) {\n setIndentation(editor, Indentation.Increase);\n }\n\n if (selection.coordinates) {\n editor.select(selection.table, selection.coordinates);\n }\n });\n },\n};\n\n/**\n * UpDownInTable edit feature, provides the ability to jump to cell above/below when user press UP/DOWN\n * in table\n */\nconst UpDownInTable: BuildInEditFeature = {\n keys: [Keys.UP, Keys.DOWN],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n cacheGetTableCell(event, editor) && !cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n const td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n const vtable = new VTable(td);\n const isUp = event.rawEvent.which == Keys.UP;\n const step = isUp ? -1 : 1;\n const hasShiftKey = event.rawEvent.shiftKey;\n const selection = editor.getDocument().defaultView?.getSelection();\n let targetTd: HTMLTableCellElement | null = null;\n\n if (selection) {\n let { anchorNode, anchorOffset } = selection;\n\n for (\n let row = vtable.row ?? 0;\n row >= 0 && vtable.cells && row < vtable.cells.length;\n row += step\n ) {\n let cell = vtable.getCell(row, vtable.col ?? 0);\n if (cell.td && cell.td != td) {\n targetTd = cell.td;\n break;\n }\n }\n\n editor.runAsync(editor => {\n let newContainer = editor.getElementAtCursor();\n if (\n contains(vtable.table, newContainer) &&\n !contains(td, newContainer, true /*treatSameNodeAsContain*/)\n ) {\n let newPos = targetTd\n ? new Position(targetTd, PositionType.Begin)\n : new Position(\n vtable.table,\n isUp ? PositionType.Before : PositionType.After\n );\n if (hasShiftKey) {\n newPos =\n newPos.node.nodeType == NodeType.Element &&\n isVoidHtmlElement(newPos.node)\n ? new Position(\n newPos.node,\n newPos.isAtEnd ? PositionType.After : PositionType.Before\n )\n : newPos;\n const selection = editor.getDocument().defaultView?.getSelection();\n if (anchorNode) {\n selection?.setBaseAndExtent(\n anchorNode,\n anchorOffset,\n newPos.node,\n newPos.offset\n );\n }\n } else {\n editor.select(newPos.normalize());\n }\n }\n });\n }\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.DeleteTableWithBackspace\n * Delete a table selected with the table selector pressing Backspace key\n */\nconst DeleteTableWithBackspace: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n editor.isFeatureEnabled(ExperimentalFeatures.DeleteTableWithBackspace) &&\n cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n const td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n const vtable = new VTable(td);\n vtable.edit(TableOperation.DeleteTable);\n vtable.writeBack();\n },\n};\n\nfunction cacheGetTableCell(event: PluginEvent, editor: IEditor): HTMLTableCellElement | null {\n return cacheGetEventData(event, 'TABLE_CELL_FOR_TABLE_FEATURES', () => {\n let pos = editor.getFocusedPosition();\n let firstTd = pos && editor.getElementAtCursor('TD,TH,LI', pos.node);\n return (\n firstTd && (getTagOfNode(firstTd) == 'LI' ? null : (firstTd as HTMLTableCellElement))\n );\n });\n}\n\nfunction cacheIsWholeTableSelected(event: PluginEvent, editor: IEditor) {\n return cacheGetEventData(event, 'WHOLE_TABLE_SELECTED_FOR_FEATURES', () => {\n const td = cacheGetTableCell(event, editor);\n if (!td) {\n return false;\n }\n let vtable = cacheVTable(event, td);\n let selection = editor.getSelectionRangeEx();\n return (\n selection.type == SelectionRangeTypes.TableSelection &&\n selection.coordinates &&\n isWholeTableSelected(vtable, selection.coordinates)\n );\n });\n}\n\nfunction cacheVTable(event: PluginEvent, td: HTMLTableCellElement) {\n return cacheGetEventData(event, 'VTABLE_FOR_TABLE_FEATURES', () => {\n return new VTable(td);\n });\n}\n\n/**\n * @internal\n */\nexport const TableFeatures: Record<\n keyof TableFeatureSettings,\n BuildInEditFeature\n> = {\n tabInTable: TabInTable,\n upDownInTable: UpDownInTable,\n indentTableOnTab: IndentTableOnTab,\n deleteTableWithBackspace: DeleteTableWithBackspace,\n};\n","import { setIndentation } from 'roosterjs-editor-api';\nimport {\n createRange,\n getEntitySelector,\n getTagOfNode,\n Position,\n queryElements,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n IEditor,\n Indentation,\n TextFeatureSettings,\n Keys,\n PluginKeyboardEvent,\n SelectionRangeTypes,\n ContentPosition,\n PositionType,\n ExperimentalFeatures,\n NodePosition,\n QueryScope,\n} from 'roosterjs-editor-types';\n\nconst TAB_SPACES = 6;\n\n/**\n * Requires @see ExperimentalFeatures.TabKeyTextFeatures to be enabled\n * Provides additional functionality when press Tab:\n * If Whole Paragraph selected, indent paragraph,\n * If range is collapsed, add tab spaces\n * If range is not collapsed but not all the paragraph is selected, replace selection with Tab spaces\n * If there are more than one block in the selection, indent all selection\n */\nconst IndentWhenTabText: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event, editor) => {\n if (\n editor.isFeatureEnabled(ExperimentalFeatures.TabKeyTextFeatures) &&\n !event.rawEvent.shiftKey\n ) {\n let activeElement = editor.getDocument().activeElement as HTMLElement;\n const listOrTable = editor.getElementAtCursor(\n 'LI,TABLE',\n undefined /*startFrom*/,\n event\n );\n const entity = editor.getElementAtCursor(\n getEntitySelector(),\n undefined /*startFrom*/,\n event\n );\n\n return (\n !listOrTable &&\n (entity ? entity.isContentEditable : activeElement.isContentEditable)\n );\n }\n\n return false;\n },\n handleEvent: (event, editor) => {\n const selection = editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.Normal) {\n editor.addUndoSnapshot(() => {\n if (selection.areAllCollapsed) {\n insertTab(editor, event);\n } else {\n const { ranges } = selection;\n const range = ranges[0];\n if (shouldSetIndentation(editor, range)) {\n setIndentation(editor, Indentation.Increase);\n } else {\n const tempRange = createRange(range.startContainer, range.startOffset);\n ranges.forEach(range => range.deleteContents());\n editor.select(tempRange);\n insertTab(editor, event);\n }\n }\n });\n\n event.rawEvent.preventDefault();\n }\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.TabKeyTextFeatures to be enabled\n * If Whole Paragraph selected, outdent paragraph on Tab press\n */\nconst OutdentWhenTabText: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event, editor) => {\n if (\n event.rawEvent.shiftKey &&\n editor.isFeatureEnabled(ExperimentalFeatures.TabKeyTextFeatures)\n ) {\n const selection = editor.getSelectionRangeEx();\n\n return (\n selection.type == SelectionRangeTypes.Normal &&\n !selection.areAllCollapsed &&\n editor.getElementAtCursor('blockquote', undefined, event) &&\n !editor.getElementAtCursor('LI,TABLE', undefined /*startFrom*/, event) &&\n shouldSetIndentation(editor, selection.ranges[0])\n );\n }\n\n return false;\n },\n handleEvent: (event, editor) => {\n editor.addUndoSnapshot(() => setIndentation(editor, Indentation.Decrease));\n\n event.rawEvent.preventDefault();\n },\n};\n\n/**\n * @deprecated\n * Automatically transform -- into hyphen, if typed between two words.\n */\nconst AutoHyphen: BuildInEditFeature = {\n keys: [],\n shouldHandleEvent: (event, editor) => {\n return false;\n },\n handleEvent: (event, editor) => {\n return false;\n },\n defaultDisabled: true,\n};\n\n/**\n * @internal\n */\nexport const TextFeatures: Record<\n keyof TextFeatureSettings,\n BuildInEditFeature\n> = {\n indentWhenTabText: IndentWhenTabText,\n outdentWhenTabText: OutdentWhenTabText,\n autoHyphen: AutoHyphen,\n};\n\nfunction shouldSetIndentation(editor: IEditor, range: Range): boolean {\n let result: boolean = false;\n\n const startPosition: NodePosition = Position.getStart(range);\n const endPosition: NodePosition = Position.getEnd(range);\n const firstBlock = editor.getBlockElementAtNode(startPosition.node);\n const lastBlock = editor.getBlockElementAtNode(endPosition.node);\n\n if (!firstBlock || !lastBlock) {\n return false;\n }\n\n if (!firstBlock.equals(lastBlock)) {\n //If the selections has more than one block, we indent all the blocks in the selection\n return true;\n } else {\n //We only indent a single block if all the block is selected.\n const blockStart = new Position(firstBlock.getStartNode(), PositionType.Begin);\n const blockEnd = new Position(firstBlock.getEndNode(), PositionType.End);\n\n const rangeBefore = createRange(blockStart, Position.getStart(range));\n const rangeAfter = createRange(Position.getEnd(range), blockEnd);\n\n if (!result && isRangeEmpty(rangeBefore) && isRangeEmpty(rangeAfter)) {\n result = true;\n }\n\n return result;\n }\n}\n\nfunction isRangeEmpty(range: Range) {\n return (\n range.toString() == '' &&\n queryElements(\n range.commonAncestorContainer as ParentNode,\n 'img,table,ul,ol',\n null,\n QueryScope.InSelection,\n range\n ).length == 0\n );\n}\n\nfunction insertTab(editor: IEditor, event: PluginKeyboardEvent) {\n const span = editor.getDocument().createElement('span');\n let searcher = editor.getContentSearcherOfCursor(event);\n if (!searcher) {\n return;\n }\n const charsBefore = searcher.getSubStringBefore(Number.MAX_SAFE_INTEGER);\n const numberOfChars = TAB_SPACES - (charsBefore.length % TAB_SPACES);\n let span2: HTMLSpanElement | null = null;\n\n let textContent = '';\n for (let index = 0; index < numberOfChars; index++) {\n textContent += ' ';\n }\n editor.insertNode(span);\n if (span.nextElementSibling && getTagOfNode(span.nextElementSibling) == 'A') {\n span2 = editor.getDocument().createElement('span');\n span2.textContent = ' ';\n editor.insertNode(span2);\n editor.select(createRange(span2, PositionType.Before));\n }\n editor.insertContent(textContent, {\n position: ContentPosition.Range,\n range: createRange(span, PositionType.Begin),\n updateCursor: false,\n });\n editor.select(createRange(span, PositionType.After));\n if (span2) {\n editor.deleteNode(span2);\n }\n}\n","import { AutoLinkFeatures } from './features/autoLinkFeatures';\nimport { CursorFeatures } from './features/cursorFeatures';\nimport { EntityFeatures } from './features/entityFeatures';\nimport { ListFeatures } from './features/listFeatures';\nimport { MarkdownFeatures } from './features/markdownFeatures';\nimport { QuoteFeatures } from './features/quoteFeatures';\nimport { ShortcutFeatures } from './features/shortcutFeatures';\nimport { StructuredNodeFeatures } from './features/structuredNodeFeatures';\nimport { TableFeatures } from './features/tableFeatures';\nimport { TextFeatures } from './features/textFeatures';\nimport { CodeFeatures } from './features/codeFeatures';\nimport {\n BuildInEditFeature,\n ContentEditFeatureSettings,\n PluginEvent,\n} from 'roosterjs-editor-types';\n\nconst allFeatures = {\n ...ListFeatures,\n ...QuoteFeatures,\n ...TableFeatures,\n ...StructuredNodeFeatures,\n ...AutoLinkFeatures,\n ...ShortcutFeatures,\n ...CursorFeatures,\n ...MarkdownFeatures,\n ...EntityFeatures,\n ...TextFeatures,\n ...CodeFeatures,\n};\n\n/**\n * Get all content edit features provided by roosterjs\n */\nexport default function getAllFeatures() {\n return allFeatures as Record>;\n}\n","export { default as ContentEdit } from './ContentEdit';\nexport { default as getAllFeatures } from './getAllFeatures';\n","/**\n * @internal\n * Convert english alphabet numbers into decimal numbers\n * @param letter The letter that needs to be converted\n * @returns\n */\nexport default function convertAlphaToDecimals(letter: string): number | null {\n const alpha = letter.toLocaleLowerCase();\n if (alpha) {\n const size = alpha.length - 1;\n const number = 26 * size + alpha.charCodeAt(size) - 96;\n return number;\n }\n return null;\n}\n","import { BulletListType } from 'roosterjs-editor-types';\n\nconst bulletListType: Record = {\n '*': BulletListType.Disc,\n '-': BulletListType.Dash,\n '--': BulletListType.Square,\n '->': BulletListType.LongArrow,\n '-->': BulletListType.DoubleLongArrow,\n '=>': BulletListType.UnfilledArrow,\n '>': BulletListType.ShortArrow,\n '—': BulletListType.Hyphen,\n};\n\nconst identifyBulletListType = (bullet: string): BulletListType | null => {\n return bulletListType[bullet] || null;\n};\n\n/**\n * @internal\n * @param textBeforeCursor The trigger character\n * @returns The style of a bullet list triggered by a string\n */\nexport default function getAutoBulletListStyle(textBeforeCursor: string): BulletListType | null {\n const trigger = textBeforeCursor.trim();\n const bulletType = identifyBulletListType(trigger);\n return bulletType;\n}\n","import convertAlphaToDecimals from './convertAlphaToDecimals';\nimport { NumberingListType } from 'roosterjs-editor-types';\nimport { VListChain } from 'roosterjs-editor-dom';\n\nconst enum NumberingTypes {\n Decimal = 1,\n LowerAlpha = 2,\n UpperAlpha = 3,\n LowerRoman = 4,\n UpperRoman = 5,\n}\n\nconst enum Character {\n Dot = 1,\n Dash = 2,\n Parenthesis = 3,\n DoubleParenthesis = 4,\n}\n\nconst characters: Record = {\n '.': Character.Dot,\n '-': Character.Dash,\n ')': Character.Parenthesis,\n};\n\nconst lowerRomanTypes = [\n NumberingListType.LowerRoman,\n NumberingListType.LowerRomanDash,\n NumberingListType.LowerRomanDoubleParenthesis,\n NumberingListType.LowerRomanParenthesis,\n];\nconst upperRomanTypes = [\n NumberingListType.UpperRoman,\n NumberingListType.UpperRomanDash,\n NumberingListType.UpperRomanDoubleParenthesis,\n NumberingListType.UpperRomanParenthesis,\n];\nconst numberingTriggers = ['1', 'a', 'A', 'I', 'i'];\nconst lowerRomanNumbers = ['i', 'v', 'x', 'l', 'c', 'd', 'm'];\nconst upperRomanNumbers = ['I', 'V', 'X', 'L', 'C', 'D', 'M'];\n\nconst identifyNumberingType = (text: string, previousListStyle?: NumberingListType) => {\n if (!isNaN(parseInt(text))) {\n return NumberingTypes.Decimal;\n } else if (/[a-z]+/g.test(text)) {\n if (\n (previousListStyle != undefined &&\n lowerRomanTypes.indexOf(previousListStyle) > -1 &&\n lowerRomanNumbers.indexOf(text[0]) > -1) ||\n (!previousListStyle && text === 'i')\n ) {\n return NumberingTypes.LowerRoman;\n } else if (previousListStyle || (!previousListStyle && text === 'a')) {\n return NumberingTypes.LowerAlpha;\n }\n } else if (/[A-Z]+/g.test(text)) {\n if (\n (previousListStyle != undefined &&\n upperRomanTypes.indexOf(previousListStyle) > -1 &&\n upperRomanNumbers.indexOf(text[0]) > -1) ||\n (!previousListStyle && text === 'I')\n ) {\n return NumberingTypes.UpperRoman;\n } else if (previousListStyle || (!previousListStyle && text === 'A')) {\n return NumberingTypes.UpperAlpha;\n }\n }\n};\n\nconst numberingListTypes: Record number | null> = {\n [NumberingTypes.Decimal]: char => DecimalsTypes[char] || null,\n [NumberingTypes.LowerAlpha]: char => LowerAlphaTypes[char] || null,\n [NumberingTypes.UpperAlpha]: char => UpperAlphaTypes[char] || null,\n [NumberingTypes.LowerRoman]: char => LowerRomanTypes[char] || null,\n [NumberingTypes.UpperRoman]: char => UpperRomanTypes[char] || null,\n};\n\nconst UpperRomanTypes: Record = {\n [Character.Dot]: NumberingListType.UpperRoman,\n [Character.Dash]: NumberingListType.UpperRomanDash,\n [Character.Parenthesis]: NumberingListType.UpperRomanParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.UpperRomanDoubleParenthesis,\n};\n\nconst LowerRomanTypes: Record = {\n [Character.Dot]: NumberingListType.LowerRoman,\n [Character.Dash]: NumberingListType.LowerRomanDash,\n [Character.Parenthesis]: NumberingListType.LowerRomanParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.LowerRomanDoubleParenthesis,\n};\n\nconst UpperAlphaTypes: Record = {\n [Character.Dot]: NumberingListType.UpperAlpha,\n [Character.Dash]: NumberingListType.UpperAlphaDash,\n [Character.Parenthesis]: NumberingListType.UpperAlphaParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.UpperAlphaDoubleParenthesis,\n};\n\nconst LowerAlphaTypes: Record = {\n [Character.Dot]: NumberingListType.LowerAlpha,\n [Character.Dash]: NumberingListType.LowerAlphaDash,\n [Character.Parenthesis]: NumberingListType.LowerAlphaParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.LowerAlphaDoubleParenthesis,\n};\n\nconst DecimalsTypes: Record = {\n [Character.Dot]: NumberingListType.Decimal,\n [Character.Dash]: NumberingListType.DecimalDash,\n [Character.Parenthesis]: NumberingListType.DecimalParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.DecimalDoubleParenthesis,\n};\n\nconst identifyNumberingListType = (\n numbering: string,\n isDoubleParenthesis: boolean,\n previousListStyle?: NumberingListType\n): NumberingListType | null => {\n const separatorCharacter = isDoubleParenthesis\n ? Character.DoubleParenthesis\n : characters[numbering[numbering.length - 1]];\n // if separator is not valid, no need to check if the number is valid.\n if (separatorCharacter) {\n const number = isDoubleParenthesis ? numbering.slice(1, -1) : numbering.slice(0, -1);\n const numberingType = identifyNumberingType(number, previousListStyle);\n return numberingType ? numberingListTypes[numberingType](separatorCharacter) : null;\n }\n return null;\n};\n\n/**\n * @internal\n * @param textBeforeCursor The trigger character\n * @param previousListChain @optional This parameters is used to keep the list chain, if the is not a new list\n * @param previousListStyle @optional The list style of the previous list\n * @returns The style of a numbering list triggered by a string\n */\nexport default function getAutoNumberingListStyle(\n textBeforeCursor: string,\n previousListChain?: VListChain[],\n previousListStyle?: NumberingListType\n): NumberingListType | null {\n const trigger = textBeforeCursor.trim();\n const isDoubleParenthesis = trigger[0] === '(' && trigger[trigger.length - 1] === ')';\n //Only the staring items ['1', 'a', 'A', 'I', 'i'] must trigger a new list. All the other triggers is used to keep the list chain.\n //The index is always the characters before the last character\n const listIndex = isDoubleParenthesis ? trigger.slice(1, -1) : trigger.slice(0, -1);\n\n const indexNumber = parseInt(listIndex);\n let index = !isNaN(indexNumber) ? indexNumber : convertAlphaToDecimals(listIndex);\n\n if (!index || index < 1) {\n return null;\n }\n\n if (previousListChain && index > 1) {\n if (\n (previousListChain.length < 1 && numberingTriggers.indexOf(listIndex) < 0) ||\n (previousListChain?.length > 0 &&\n !previousListChain[previousListChain.length - 1]?.canAppendAtCursor(index))\n ) {\n return null;\n }\n }\n\n const numberingType = isValidNumbering(listIndex)\n ? identifyNumberingListType(trigger, isDoubleParenthesis, previousListStyle)\n : null;\n return numberingType;\n}\n\n/**\n * Check if index has only numbers or only letters to avoid sequence of character such 1:1. trigger a list.\n * @param index\n * @returns\n */\nfunction isValidNumbering(index: string) {\n return Number(index) || /^[A-Za-z\\s]*$/.test(index);\n}\n","import { createElement } from 'roosterjs-editor-dom';\nimport {\n EditorPlugin,\n IEditor,\n KnownCreateElementDataIndex,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\n\n/**\n * Context Menu options for ContextMenu plugin\n */\nexport interface ContextMenuOptions {\n /**\n * Render function for the context menu\n * @param container The container HTML element, it will be located at the mouse click position,\n * so the callback just need to render menu content into this container\n * @param onDismiss The onDismiss callback, some menu render need to know this callback so that\n * it can handle the dismiss event\n */\n render: (container: HTMLElement, items: (T | null)[], onDismiss: () => void) => void;\n\n /**\n * Dismiss function for the context menu, it will be called when user wants to dismiss this context menu\n * e.g. user click away so the menu should be dismissed\n * @param container The container HTML element\n */\n dismiss?: (container: HTMLElement) => void;\n\n /**\n * Whether the default context menu is allowed. @default false\n */\n allowDefaultMenu?: boolean;\n}\n\n/**\n * An editor plugin that support showing a context menu using render() function from options parameter\n */\nexport default class ContextMenu implements EditorPlugin {\n private container: HTMLElement | null = null;\n private editor: IEditor | null = null;\n private isMenuShowing: boolean = false;\n\n /**\n * Create a new instance of ContextMenu class\n * @param options An options object to determine how to show/hide the context menu\n */\n constructor(private options: ContextMenuOptions) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ContextMenu';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.onDismiss();\n\n if (this.container?.parentNode) {\n this.container.parentNode.removeChild(this.container);\n this.container = null;\n }\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (event.eventType == PluginEventType.ContextMenu && event.items.length > 0) {\n const { rawEvent, items } = event;\n\n this.onDismiss();\n\n if (!this.options.allowDefaultMenu) {\n rawEvent.preventDefault();\n }\n\n if (this.initContainer(rawEvent.pageX, rawEvent.pageY)) {\n this.options.render(this.container!, items as T[], this.onDismiss);\n this.isMenuShowing = true;\n }\n }\n }\n\n private initContainer(x: number, y: number) {\n if (!this.container && this.editor) {\n this.container = createElement(\n KnownCreateElementDataIndex.ContextMenuWrapper,\n this.editor.getDocument()\n ) as HTMLElement;\n this.editor.getDocument().body.appendChild(this.container);\n }\n this.container?.style.setProperty('left', x + 'px');\n this.container?.style.setProperty('top', y + 'px');\n return !!this.container;\n }\n\n private onDismiss = () => {\n if (this.container && this.isMenuShowing) {\n this.options.dismiss?.(this.container);\n this.isMenuShowing = false;\n }\n };\n}\n","export { default as ContextMenu, ContextMenuOptions } from './ContextMenu';\n","import {\n CustomReplacement,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst makeReplacement = (\n sourceString: string,\n replacementHTML: string,\n matchSourceCaseSensitive: boolean,\n shouldReplace?: (\n replacement: CustomReplacement,\n content: string,\n sourceEditor?: IEditor\n ) => boolean\n): CustomReplacement => ({\n sourceString,\n replacementHTML,\n matchSourceCaseSensitive,\n shouldReplace,\n});\n\nconst defaultReplacements: CustomReplacement[] = [\n makeReplacement(':)', '🙂', true),\n makeReplacement(';)', '😉', true),\n makeReplacement(':O', '😲', true),\n makeReplacement(':o', '😯', true),\n makeReplacement('<3', '❤️', true),\n];\n\n/**\n * Wrapper for CustomReplaceContentEditFeature that provides an API for updating the\n * content edit feature\n */\nexport default class CustomReplacePlugin implements EditorPlugin {\n private longestReplacementLength: number | null = null;\n private editor: IEditor | null = null;\n private replacements: CustomReplacement[] | null = null;\n private replacementEndCharacters: Set | null = null;\n\n /**\n * Create instance of CustomReplace plugin\n * @param replacements Replacement rules. If not passed, a default replacement rule set will be applied\n */\n constructor(replacements: CustomReplacement[] = defaultReplacements) {\n this.updateReplacements(replacements);\n }\n\n /**\n * Set the replacements that this plugin is looking for.\n * @param newReplacements new set of replacements for this plugin\n */\n updateReplacements(newReplacements: CustomReplacement[]) {\n this.replacements = newReplacements;\n this.longestReplacementLength = getLongestReplacementSourceLength(this.replacements);\n this.replacementEndCharacters = getReplacementEndCharacters(this.replacements);\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'CustomReplace';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n public initialize(editor: IEditor): void {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n public dispose(): void {\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n public onPluginEvent(event: PluginEvent) {\n if (event.eventType != PluginEventType.Input || !this.editor || this.editor.isInIME()) {\n return;\n }\n\n // Exit early on input events that do not insert a replacement's final character.\n if (!event.rawEvent.data || !this.replacementEndCharacters?.has(event.rawEvent.data)) {\n return;\n }\n\n // Get the matching replacement\n const searcher = this.editor.getContentSearcherOfCursor(event);\n if (!searcher || this.longestReplacementLength == null) {\n return;\n }\n const stringToSearch = searcher.getSubStringBefore(this.longestReplacementLength);\n\n const replacement = this.getMatchingReplacement(stringToSearch);\n\n if (\n !replacement ||\n (replacement.shouldReplace &&\n searcher &&\n !replacement.shouldReplace(replacement, searcher.getWordBefore(), this.editor))\n ) {\n return;\n }\n\n // Reconstruct a selection of the text on the document that matches the\n // replacement we selected.\n const matchingText = searcher.getSubStringBefore(replacement.sourceString.length);\n const matchingRange = searcher.getRangeFromText(matchingText, true /* exactMatch */);\n\n // parse the html string off the dom and inline the resulting element.\n const document = this.editor.getDocument();\n const parsingSpan = document.createElement('span');\n parsingSpan.innerHTML = this.editor.getTrustedHTMLHandler()(replacement.replacementHTML);\n const nodeToInsert =\n parsingSpan.childNodes.length == 1 ? parsingSpan.childNodes[0] : parsingSpan;\n\n // Switch the node for the selection range\n if (matchingRange) {\n this.editor.addUndoSnapshot(\n () => {\n matchingRange.deleteContents();\n matchingRange.insertNode(nodeToInsert);\n this.editor?.select(nodeToInsert, PositionType.End);\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n }\n }\n\n private getMatchingReplacement(stringToSearch: string): CustomReplacement | null {\n if (stringToSearch.length == 0 || !this.replacements) {\n return null;\n }\n const originalStringToSearch = stringToSearch.replace(/\\s/g, ' ');\n const lowerCaseStringToSearch = originalStringToSearch.toLocaleLowerCase();\n for (const replacement of this.replacements) {\n const [sourceMatch, replacementMatch] = replacement.matchSourceCaseSensitive\n ? [originalStringToSearch, replacement.sourceString]\n : [lowerCaseStringToSearch, replacement.sourceString.toLocaleLowerCase()];\n\n if (\n sourceMatch.substring(sourceMatch.length - replacementMatch.length) ==\n replacementMatch\n ) {\n return replacement;\n }\n }\n return null;\n }\n}\n\nfunction getLongestReplacementSourceLength(replacements: CustomReplacement[]): number {\n return Math.max.apply(\n null,\n replacements.map(replacement => replacement.sourceString.length)\n );\n}\n\nfunction getReplacementEndCharacters(replacements: CustomReplacement[]): Set {\n const endChars = new Set();\n for (let replacement of replacements) {\n const sourceString = replacement.sourceString;\n if (sourceString.length == 0) {\n continue;\n }\n const lastChar = sourceString[sourceString.length - 1];\n if (!replacement.matchSourceCaseSensitive) {\n endChars.add(lastChar.toLocaleLowerCase());\n endChars.add(lastChar.toLocaleUpperCase());\n } else {\n endChars.add(lastChar);\n }\n }\n return endChars;\n}\n","export { default as CustomReplace } from './CustomReplace';\n","import { commitListChains } from 'roosterjs-editor-api';\nimport { VListChain } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\nimport type { CompatibleChangeSource } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Maintain list numbers of list chain when content is modified by cut/paste/drag&drop\n */\nexport default class CutPasteListChain implements EditorPlugin {\n private chains: VListChain[] | null = null;\n private expectedChangeSource: ChangeSource | CompatibleChangeSource | null = null;\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'CutPasteListChain';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler('drop', this.onDrop);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.BeforeCutCopy:\n if (event.isCut) {\n this.cacheListChains(ChangeSource.Cut);\n }\n break;\n\n case PluginEventType.BeforePaste:\n this.cacheListChains(ChangeSource.Paste);\n break;\n\n case PluginEventType.ContentChanged:\n if (\n this.chains &&\n this.chains.length > 0 &&\n this.expectedChangeSource == event.source &&\n this.editor\n ) {\n commitListChains(this.editor, this.chains);\n this.chains = null;\n this.expectedChangeSource = null;\n }\n break;\n }\n }\n\n private onDrop = () => {\n this.cacheListChains(ChangeSource.Drop);\n };\n\n private cacheListChains(source: ChangeSource) {\n const selectedRegions = this.editor?.getSelectedRegions();\n if (selectedRegions) {\n this.chains = VListChain.createListChains(selectedRegions);\n this.expectedChangeSource = source;\n }\n }\n}\n","export { default as CutPasteListChain } from './CutPasteListChain';\n","import { isCharacterValue, isCtrlOrMetaPressed, matchLink } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n DOMEventHandler,\n EditorPlugin,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\n\n/**\n * An editor plugin that show a tooltip for existing link\n */\nexport default class HyperLink implements EditorPlugin {\n private originalHref: string | null = null;\n private trackedLink: HTMLAnchorElement | null = null;\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n\n /**\n * Create a new instance of HyperLink class\n * @param getTooltipCallback A callback function to get tooltip text for an existing hyperlink.\n * Default value is to return the href itself. If null, there will be no tooltip text.\n * @param target (Optional) Target window name for hyperlink. If null, will use \"_blank\"\n * @param onLinkClick (Optional) Open link callback (return false to use default behavior)\n */\n constructor(\n private getTooltipCallback: (href: string, a: HTMLAnchorElement) => string = href => href,\n private target?: string,\n private onLinkClick?: (anchor: HTMLAnchorElement, mouseEvent: MouseEvent) => boolean | void\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Hyperlink';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n public initialize(editor: IEditor): void {\n this.editor = editor;\n this.disposer = editor.addDomEventHandler({\n mouseover: this.onMouse,\n mouseout: this.onMouse,\n blur: this.onBlur,\n });\n }\n\n protected onMouse = (e: MouseEvent) => {\n const a = this.editor?.getElementAtCursor(\n 'a[href]',\n e.target\n ) as HTMLAnchorElement | null;\n const href = a && this.tryGetHref(a);\n\n if (href) {\n this.editor?.setEditorDomAttribute(\n 'title',\n e.type == 'mouseover' ? this.getTooltipCallback(href, a) : null\n );\n }\n };\n\n protected onBlur = (e: FocusEvent) => {\n if (this.trackedLink) {\n this.updateLinkHrefIfShouldUpdate();\n }\n\n this.resetLinkTracking();\n };\n\n /**\n * Dispose this plugin\n */\n public dispose(): void {\n if (this.disposer) {\n this.disposer();\n this.disposer = null;\n }\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n public onPluginEvent(event: PluginEvent): void {\n if (\n event.eventType == PluginEventType.MouseUp ||\n (event.eventType == PluginEventType.KeyUp &&\n (!this.isContentEditValue(event.rawEvent) || event.rawEvent.which == Keys.SPACE)) ||\n event.eventType == PluginEventType.ContentChanged\n ) {\n const anchor = this.editor?.getElementAtCursor(\n 'A[href]',\n undefined /*startFrom*/,\n event\n ) as HTMLAnchorElement | null;\n\n const shouldCheckUpdateLink =\n (anchor && anchor !== this.trackedLink) ||\n event.eventType == PluginEventType.KeyUp ||\n event.eventType == PluginEventType.ContentChanged;\n\n if (\n event.eventType == PluginEventType.ContentChanged &&\n event.source == ChangeSource.Keyboard &&\n this.trackedLink != anchor &&\n anchor\n ) {\n // For Keyboard event that causes content change (mostly come from Content Model), this tracked list may be staled.\n // So we need to get an up-to-date link element\n // TODO: This is a temporary solution. Later when Content Model can fully take over this behavior, we can remove this code.\n this.trackedLink = anchor;\n }\n\n if (\n this.trackedLink &&\n (shouldCheckUpdateLink || this.tryGetHref(this.trackedLink) !== this.originalHref)\n ) {\n // If cursor has moved out of previously tracked link\n // update link href if display text doesn't match href anymore.\n if (shouldCheckUpdateLink) {\n this.updateLinkHrefIfShouldUpdate();\n }\n\n // If the link's href value was edited, or the cursor has moved out of the\n // previously tracked link, stop tracking the link.\n this.resetLinkTracking();\n }\n\n // Cache link and href value if its href attribute currently matches its display text\n if (!this.trackedLink && anchor && this.doesLinkDisplayMatchHref(anchor)) {\n this.trackedLink = anchor;\n this.originalHref = this.tryGetHref(anchor);\n }\n }\n\n if (event.eventType == PluginEventType.MouseUp) {\n const anchor = this.editor?.getElementAtCursor(\n 'A',\n event.rawEvent.srcElement\n ) as HTMLAnchorElement | null;\n\n if (anchor) {\n if (this.onLinkClick && this.onLinkClick(anchor, event.rawEvent) !== false) {\n return;\n }\n\n let href: string | null;\n if (\n (href = this.tryGetHref(anchor)) &&\n isCtrlOrMetaPressed(event.rawEvent) &&\n event.rawEvent.button === 0\n ) {\n event.rawEvent.preventDefault();\n try {\n const target = this.target || '_blank';\n const window = this.editor?.getDocument().defaultView;\n window?.open(href, target);\n } catch {}\n }\n }\n }\n }\n\n /**\n * Try get href from an anchor element\n * The reason this is put in a try-catch is that\n * it has been seen that accessing href may throw an exception, in particular on IE/Edge\n */\n private tryGetHref(anchor: HTMLAnchorElement): string | null {\n try {\n return anchor ? anchor.href : null;\n } catch {\n return null;\n }\n }\n\n /**\n * Determines if KeyboardEvent is meant to edit content\n */\n private isContentEditValue(event: KeyboardEvent): boolean {\n return (\n isCharacterValue(event) || event.which == Keys.BACKSPACE || event.which == Keys.DELETE\n );\n }\n\n /**\n * Updates the href of the tracked link if the display text doesn't match href anymore\n */\n private updateLinkHrefIfShouldUpdate() {\n if (this.trackedLink && !this.doesLinkDisplayMatchHref(this.trackedLink)) {\n this.updateLinkHref();\n }\n }\n\n /**\n * Clears the tracked link and its original href value so that it's back to default state\n */\n private resetLinkTracking() {\n this.trackedLink = null;\n this.originalHref = '';\n }\n\n /**\n * Compares the normalized URL of inner text of element to its href to see if they match.\n */\n private doesLinkDisplayMatchHref(element: HTMLAnchorElement): boolean {\n if (element) {\n let display = element.innerText.trim();\n\n // We first escape the display text so that any text passed into the regex is not\n // treated as a special character.\n let escapedDisplay = display.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n let rule = new RegExp(`^(?:https?:\\\\/\\\\/)?${escapedDisplay}\\\\/?`, 'i');\n let href = this.tryGetHref(element);\n if (href !== null) {\n return rule.test(href);\n }\n }\n\n return false;\n }\n\n /**\n * Update href of an element in place to new display text if it's a valid URL\n */\n private updateLinkHref() {\n if (this.trackedLink) {\n let linkData = matchLink(this.trackedLink.innerText.trim());\n if (linkData !== null) {\n this.editor?.addUndoSnapshot(() => {\n this.trackedLink!.href = linkData!.normalizedUrl;\n });\n }\n }\n }\n}\n","export { default as HyperLink } from './HyperLink';\n","import applyChange from './editInfoUtils/applyChange';\nimport canRegenerateImage from './api/canRegenerateImage';\nimport DragAndDropContext, { DNDDirectionX, DnDDirectionY } from './types/DragAndDropContext';\nimport DragAndDropHandler from '../../pluginUtils/DragAndDropHandler';\nimport DragAndDropHelper from '../../pluginUtils/DragAndDropHelper';\nimport getGeneratedImageSize from './editInfoUtils/getGeneratedImageSize';\nimport ImageEditInfo from './types/ImageEditInfo';\nimport ImageHtmlOptions from './types/ImageHtmlOptions';\nimport { Cropper, getCropHTML } from './imageEditors/Cropper';\nimport { deleteEditInfo, getEditInfoFromImage } from './editInfoUtils/editInfo';\nimport { getRotateHTML, Rotator, updateRotateHandlePosition } from './imageEditors/Rotator';\nimport { ImageEditElementClass } from './types/ImageEditElementClass';\nimport { tryToConvertGifToPng } from './editInfoUtils/tryToConvertGifToPng';\nimport {\n arrayPush,\n Browser,\n createElement,\n getComputedStyle,\n getObjectKeys,\n safeInstanceOf,\n toArray,\n unwrap,\n wrap,\n} from 'roosterjs-editor-dom';\nimport {\n Resizer,\n doubleCheckResize,\n getSideResizeHTML,\n getCornerResizeHTML,\n OnShowResizeHandle,\n getResizeBordersHTML,\n} from './imageEditors/Resizer';\nimport {\n ImageEditOperation,\n ImageEditOptions,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n CreateElementData,\n KnownCreateElementDataIndex,\n ModeIndependentColor,\n SelectionRangeTypes,\n ChangeSource,\n} from 'roosterjs-editor-types';\nimport type { CompatibleImageEditOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst PI = Math.PI;\nconst DIRECTIONS = 8;\nconst DirectionRad = (PI * 2) / DIRECTIONS;\nconst DirectionOrder = ['nw', 'n', 'ne', 'e', 'se', 's', 'sw', 'w'];\n\n/**\n * Default image edit options\n */\nconst DefaultOptions: Required = {\n borderColor: '#DB626C',\n minWidth: 10,\n minHeight: 10,\n preserveRatio: false,\n minRotateDeg: 5,\n imageSelector: 'img',\n rotateIconHTML: '',\n disableCrop: false,\n disableRotate: false,\n disableSideResize: false,\n onSelectState: ImageEditOperation.ResizeAndRotate,\n};\n\n/**\n * Map the image edit operation to a function that returns editing elements HTML to help\n * build image editing UI\n */\nconst ImageEditHTMLMap = {\n [ImageEditOperation.CornerResize]: getCornerResizeHTML,\n [ImageEditOperation.SideResize]: getSideResizeHTML,\n [ImageEditOperation.Rotate]: getRotateHTML,\n [ImageEditOperation.Crop]: getCropHTML,\n};\n\n/**\n * Default background colors for rotate handle\n */\nconst LIGHT_MODE_BGCOLOR = 'white';\nconst DARK_MODE_BGCOLOR = '#333';\n\n/**\n * The biggest area of image with 4 handles\n */\nconst MAX_SMALL_SIZE_IMAGE = 10000;\n\n/**\n * ImageEdit plugin provides the ability to edit an inline image in editor, including image resizing, rotation and cropping\n */\nexport default class ImageEdit implements EditorPlugin {\n protected editor: IEditor | null = null;\n protected options: ImageEditOptions;\n private disposer: (() => void) | null = null;\n\n // Allowed editing operations\n private allowedOperations: ImageEditOperation;\n\n // Current editing image\n private image: HTMLImageElement | null = null;\n\n // Image cloned from the current editing image\n private clonedImage: HTMLImageElement | null = null;\n\n // The image wrapper\n private wrapper: HTMLSpanElement | null = null;\n\n // Current edit info of the image. All changes user made will be stored in this object.\n // We use this object to update the editing UI, and finally we will use this object to generate\n // the new image if necessary\n private editInfo: ImageEditInfo | null = null;\n\n // Src of the image before current editing\n private lastSrc: string | null = null;\n\n // Drag and drop helper objects\n private dndHelpers: DragAndDropHelper[] = [];\n\n /**\n * Identify if the image was resized by the user.\n */\n private wasResized: boolean = false;\n\n /**\n * The span element that wraps the image and opens shadow dom\n */\n private shadowSpan: HTMLSpanElement | null = null;\n\n /**\n * The span element that wraps the image and opens shadow dom\n */\n private isCropping: boolean = false;\n\n /**\n * If the image is a gif, this is the png source of the gif image\n */\n private pngSource: string | null = null;\n\n /**\n * Create a new instance of ImageEdit\n * @param options Image editing options\n * @param onShowResizeHandle An optional callback to allow customize resize handle element of image resizing.\n * To customize the resize handle element, add this callback and change the attributes of elementData then it\n * will be picked up by ImageEdit code\n */\n constructor(options?: ImageEditOptions, private onShowResizeHandle?: OnShowResizeHandle) {\n this.options = {\n ...DefaultOptions,\n ...(options || {}),\n };\n\n this.allowedOperations =\n ImageEditOperation.CornerResize |\n (this.options.disableCrop ? 0 : ImageEditOperation.Crop) |\n (this.options.disableRotate ? 0 : ImageEditOperation.Rotate) |\n (this.options.disableSideResize ? 0 : ImageEditOperation.SideResize);\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ImageEdit';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = editor.addDomEventHandler({\n blur: () => this.onBlur(),\n dragstart: e => {\n if (this.image) {\n e.preventDefault();\n }\n },\n });\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.clearDndHelpers();\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param e PluginEvent object\n */\n onPluginEvent(e: PluginEvent) {\n switch (e.eventType) {\n case PluginEventType.SelectionChanged:\n if (\n e.selectionRangeEx &&\n e.selectionRangeEx.type === SelectionRangeTypes.ImageSelection &&\n this.options &&\n this.options.onSelectState !== undefined\n ) {\n this.setEditingImage(e.selectionRangeEx.image, this.options.onSelectState);\n }\n\n break;\n case PluginEventType.MouseDown:\n // When left click in a image that already in editing mode, do not quit edit mode\n const mouseTarget = e.rawEvent.target;\n const button = e.rawEvent.button;\n if (\n this.shadowSpan !== mouseTarget ||\n (this.shadowSpan === mouseTarget && button !== 0) ||\n this.isCropping\n ) {\n this.setEditingImage(null);\n }\n break;\n case PluginEventType.KeyDown:\n this.setEditingImage(null);\n break;\n case PluginEventType.ContentChanged:\n //After contentChanged event, the current image wrapper may not be valid any more, remove all of them if any\n this.removeWrapper();\n break;\n\n case PluginEventType.ExtractContentWithDom:\n // When extract content, remove all image info since they may not be valid when load the content again\n if (this.options?.imageSelector) {\n toArray(e.clonedRoot.querySelectorAll(this.options.imageSelector)).forEach(\n img => {\n deleteEditInfo(img as HTMLImageElement);\n }\n );\n }\n break;\n case PluginEventType.BeforeDispose:\n this.removeWrapper();\n break;\n }\n }\n\n /**\n * Check if the given image edit operation is allowed by this plugin\n * @param operation The image edit operation to check\n * @returns True means it is allowed, otherwise false\n */\n isOperationAllowed(operation: ImageEditOperation): boolean {\n return !!(this.allowedOperations & operation);\n }\n\n /**\n * Set current image for edit. If there is already image in editing, it will quit editing mode and any pending editing\n * operation will be submitted\n * @param image The image to edit\n * @param operation The editing operation\n */\n setEditingImage(\n image: HTMLImageElement,\n operation: ImageEditOperation | CompatibleImageEditOperation\n ): void;\n\n /**\n * Stop editing image. If there is already image in editing, it will quit editing mode and any pending editing\n * operation will be submitted\n * @param image The image to edit\n * @param selectImage True to select this image after quit editing mode\n */\n setEditingImage(image: null, selectImage?: boolean): void;\n\n setEditingImage(\n image: HTMLImageElement | null,\n operationOrSelect?: ImageEditOperation | CompatibleImageEditOperation | boolean\n ) {\n let operation =\n typeof operationOrSelect === 'number' ? operationOrSelect : ImageEditOperation.None;\n const selectImage = typeof operationOrSelect === 'number' ? false : !!operationOrSelect;\n\n if (\n !image &&\n this.image &&\n this.editor &&\n this.editInfo &&\n this.lastSrc &&\n this.clonedImage\n ) {\n // When there is image in editing, clean up any cached objects and elements\n this.clearDndHelpers();\n\n // If the image is a gif we change the editing image to a new png image, then we need to change the\n // image source to the original gif image\n if (this.pngSource) {\n this.clonedImage.src = this.editInfo.src;\n }\n\n // Apply the changes, and add undo snapshot if necessary\n applyChange(\n this.editor,\n this.image,\n this.editInfo,\n this.lastSrc,\n this.wasResized || this.isCropping,\n this.clonedImage\n );\n\n // Remove editing wrapper\n this.removeWrapper();\n\n this.editor.addUndoSnapshot(() => this.image, ChangeSource.ImageResize);\n\n if (selectImage) {\n this.editor.select(this.image);\n }\n\n this.pngSource = null;\n this.image = null;\n this.editInfo = null;\n this.lastSrc = null;\n this.clonedImage = null;\n this.isCropping = false;\n }\n\n if (!this.image && image?.isContentEditable && this.editor) {\n // If there is new image to edit, enter editing mode for this image\n this.editor.addUndoSnapshot();\n this.image = image;\n\n // Get initial edit info\n this.editInfo = getEditInfoFromImage(image);\n\n //Check if the image is a gif and convert it to a png\n this.pngSource = tryToConvertGifToPng(this.editInfo);\n\n //Check if the image was resized by the user\n this.wasResized = checkIfImageWasResized(this.image);\n\n operation =\n (canRegenerateImage(image) ? operation : ImageEditOperation.Resize) &\n this.allowedOperations;\n\n // Create and update editing wrapper and elements\n this.createWrapper(operation);\n this.updateWrapper();\n\n // Init drag and drop\n this.dndHelpers = [\n ...this.createDndHelpers(ImageEditElementClass.ResizeHandle, Resizer),\n ...this.createDndHelpers(ImageEditElementClass.RotateHandle, Rotator),\n ...this.createDndHelpers(ImageEditElementClass.CropHandle, Cropper),\n ...this.createDndHelpers(ImageEditElementClass.CropContainer, Cropper),\n ];\n\n this.editor.select(this.image);\n }\n }\n\n /**\n * Flip the image.\n * @param image The image to be flipped\n * @param direction\n */\n public flipImage(image: HTMLImageElement, direction: 'vertical' | 'horizontal') {\n this.image = image;\n this.editInfo = getEditInfoFromImage(image);\n const { angleRad } = this.editInfo;\n const isInVerticalPostion =\n (angleRad >= Math.PI / 2 && angleRad < (3 * Math.PI) / 4) ||\n (angleRad <= -Math.PI / 2 && angleRad > (-3 * Math.PI) / 4);\n if (isInVerticalPostion) {\n if (direction === 'horizontal') {\n this.editInfo.flippedVertical = !this.editInfo.flippedVertical;\n } else {\n this.editInfo.flippedHorizontal = !this.editInfo.flippedHorizontal;\n }\n } else {\n if (direction === 'vertical') {\n this.editInfo.flippedVertical = !this.editInfo.flippedVertical;\n } else {\n this.editInfo.flippedHorizontal = !this.editInfo.flippedHorizontal;\n }\n }\n this.createWrapper(ImageEditOperation.Rotate);\n this.updateWrapper();\n this.setEditingImage(null);\n this.editor?.select(image);\n }\n\n /**\n * Rotate the image in radian angle.\n * @param image The image to be rotated\n * @param angleRad The angle in radian that the image must be rotated.\n */\n public rotateImage(image: HTMLImageElement, angleRad: number) {\n this.image = image;\n this.editInfo = getEditInfoFromImage(image);\n this.editInfo.angleRad = this.editInfo.angleRad + angleRad;\n this.createWrapper(ImageEditOperation.Rotate);\n this.updateWrapper();\n this.setEditingImage(null);\n this.editor?.select(image);\n }\n\n /**\n * quit editing mode when editor lose focus\n */\n private onBlur = () => {\n this.setEditingImage(null, false /* selectImage */);\n };\n /**\n * Create editing wrapper for the image\n */\n private createWrapper(operation: ImageEditOperation | CompatibleImageEditOperation) {\n if (this.image && this.editor && this.options && this.editInfo) {\n //Clone the image and insert the clone in a entity\n this.clonedImage = this.image.cloneNode(true) as HTMLImageElement;\n this.clonedImage.removeAttribute('id');\n this.clonedImage.style.removeProperty('max-width');\n this.clonedImage.style.width = this.editInfo.widthPx + 'px';\n this.clonedImage.style.height = this.editInfo.heightPx + 'px';\n this.wrapper = createElement(\n KnownCreateElementDataIndex.ImageEditWrapper,\n this.image.ownerDocument\n ) as HTMLSpanElement;\n this.wrapper?.firstChild?.appendChild(this.clonedImage);\n this.wrapper.style.display = Browser.isSafari ? 'inline-block' : 'inline-flex';\n\n // Cache current src so that we can compare it after edit see if src is changed\n this.lastSrc = this.image.getAttribute('src');\n\n // Set image src to original src to help show editing UI, also it will be used when regenerate image dataURL after editing\n if (this.clonedImage) {\n this.clonedImage.src = this.pngSource ?? this.editInfo.src;\n setFlipped(\n this.clonedImage,\n this.editInfo.flippedHorizontal,\n this.editInfo.flippedVertical\n );\n this.clonedImage.style.position = 'absolute';\n }\n\n // Get HTML for all edit elements (resize handle, rotate handle, crop handle and overlay, ...) and create HTML element\n const options: ImageHtmlOptions = {\n borderColor: getColorString(this.options.borderColor!, this.editor.isDarkMode()),\n rotateIconHTML: this.options.rotateIconHTML!,\n rotateHandleBackColor: this.editor.isDarkMode()\n ? DARK_MODE_BGCOLOR\n : LIGHT_MODE_BGCOLOR,\n isSmallImage: isASmallImage(this.editInfo!),\n };\n const htmlData: CreateElementData[] = [getResizeBordersHTML(options)];\n\n getObjectKeys(ImageEditHTMLMap).forEach(thisOperation => {\n const element = ImageEditHTMLMap[thisOperation](options, this.onShowResizeHandle);\n if ((operation & thisOperation) == thisOperation && element) {\n arrayPush(htmlData, element);\n }\n });\n\n htmlData.forEach(data => {\n const element = createElement(data, this.image!.ownerDocument);\n if (element && this.wrapper) {\n this.wrapper.appendChild(element);\n }\n });\n this.insertImageWrapper(this.wrapper);\n }\n }\n\n private insertImageWrapper(wrapper: HTMLSpanElement) {\n if (this.image) {\n this.shadowSpan = wrap(this.image, 'span');\n const shadowRoot = this.shadowSpan.attachShadow({\n mode: 'open',\n });\n\n this.shadowSpan.style.verticalAlign = 'bottom';\n this.shadowSpan.style.fontSize = '24px';\n\n shadowRoot.appendChild(wrapper);\n }\n }\n\n /**\n * Remove the temp wrapper of the image\n */\n private removeWrapper = () => {\n if (this.shadowSpan) {\n unwrap(this.shadowSpan);\n }\n this.wrapper = null;\n this.shadowSpan = null;\n };\n\n /**\n * Update image edit elements to reflect current editing result\n * @param context\n */\n private updateWrapper = (context?: DragAndDropContext) => {\n const wrapper = this.wrapper;\n if (\n wrapper &&\n this.editInfo &&\n this.image &&\n this.clonedImage &&\n this.options &&\n this.shadowSpan?.parentElement\n ) {\n // Prepare: get related editing elements\n const cropContainers = getEditElements(wrapper, ImageEditElementClass.CropContainer);\n const cropOverlays = getEditElements(wrapper, ImageEditElementClass.CropOverlay);\n const resizeHandles = getEditElements(wrapper, ImageEditElementClass.ResizeHandle);\n const rotateCenter = getEditElements(wrapper, ImageEditElementClass.RotateCenter)[0];\n const rotateHandle = getEditElements(wrapper, ImageEditElementClass.RotateHandle)[0];\n const cropHandles = getEditElements(wrapper, ImageEditElementClass.CropHandle);\n\n // Cropping and resizing will show different UI, so check if it is cropping here first\n this.isCropping = cropContainers.length == 1 && cropOverlays.length == 4;\n const {\n angleRad,\n bottomPercent,\n leftPercent,\n rightPercent,\n topPercent,\n } = this.editInfo;\n\n // Width/height of the image\n const {\n targetWidth,\n targetHeight,\n originalWidth,\n originalHeight,\n visibleWidth,\n visibleHeight,\n } = getGeneratedImageSize(this.editInfo, this.isCropping);\n\n const marginHorizontal = (targetWidth - visibleWidth) / 2;\n const marginVertical = (targetHeight - visibleHeight) / 2;\n const cropLeftPx = originalWidth * leftPercent;\n const cropRightPx = originalWidth * rightPercent;\n const cropTopPx = originalHeight * topPercent;\n const cropBottomPx = originalHeight * bottomPercent;\n\n // Update size and margin of the wrapper\n wrapper.style.margin = `${marginVertical}px ${marginHorizontal}px`;\n wrapper.style.transform = `rotate(${angleRad}rad)`;\n setWrapperSizeDimensions(wrapper, this.image, visibleWidth, visibleHeight);\n\n // Update the text-alignment to avoid the image to overflow if the parent element have align center or right\n // or if the direction is Right To Left\n wrapper.style.textAlign = isRtl(this.shadowSpan.parentElement) ? 'right' : 'left';\n\n // Update size of the image\n this.clonedImage.style.width = getPx(originalWidth);\n this.clonedImage.style.height = getPx(originalHeight);\n\n if (this.isCropping) {\n // For crop, we also need to set position of the overlays\n setSize(\n cropContainers[0],\n cropLeftPx,\n cropTopPx,\n cropRightPx,\n cropBottomPx,\n undefined,\n undefined\n );\n setSize(cropOverlays[0], 0, 0, cropRightPx, undefined, undefined, cropTopPx);\n setSize(cropOverlays[1], undefined, 0, 0, cropBottomPx, cropRightPx, undefined);\n setSize(cropOverlays[2], cropLeftPx, undefined, 0, 0, undefined, cropBottomPx);\n setSize(cropOverlays[3], 0, cropTopPx, undefined, 0, cropLeftPx, undefined);\n\n updateHandleCursor(cropHandles, angleRad);\n } else {\n // For rotate/resize, set the margin of the image so that cropped part won't be visible\n this.clonedImage.style.margin = `${-cropTopPx}px 0 0 ${-cropLeftPx}px`;\n\n // Double check resize\n if (context?.elementClass == ImageEditElementClass.ResizeHandle) {\n const clientWidth = wrapper.clientWidth;\n const clientHeight = wrapper.clientHeight;\n this.wasResized = true;\n doubleCheckResize(\n this.editInfo,\n this.options.preserveRatio || false,\n clientWidth,\n clientHeight\n );\n\n this.updateWrapper();\n }\n\n const viewport = this.editor?.getVisibleViewport();\n if (rotateHandle && rotateCenter && viewport) {\n updateRotateHandlePosition(viewport, rotateCenter, rotateHandle);\n }\n\n updateHandleCursor(resizeHandles, angleRad);\n }\n }\n };\n\n /**\n * Create drag and drop helpers\n * @param wrapper\n * @param elementClass\n * @param dragAndDrop\n */\n private createDndHelpers(\n elementClass: ImageEditElementClass,\n dragAndDrop: DragAndDropHandler\n ): DragAndDropHelper[] {\n const wrapper = this.wrapper;\n return wrapper && this.editInfo\n ? getEditElements(wrapper, elementClass).map(\n element =>\n new DragAndDropHelper(\n element,\n {\n editInfo: this.editInfo!,\n options: this.options,\n elementClass,\n x: element.dataset.x as DNDDirectionX,\n y: element.dataset.y as DnDDirectionY,\n },\n this.updateWrapper,\n dragAndDrop,\n this.editor ? this.editor.getZoomScale() : 1\n )\n )\n : [];\n }\n\n /**\n * Clean up drag and drop helpers\n */\n private clearDndHelpers() {\n this.dndHelpers?.forEach(helper => helper.dispose());\n this.dndHelpers = [];\n }\n}\n\nfunction setSize(\n element: HTMLElement,\n left: number | undefined,\n top: number | undefined,\n right: number | undefined,\n bottom: number | undefined,\n width: number | undefined,\n height: number | undefined\n) {\n element.style.left = left !== undefined ? getPx(left) : element.style.left;\n element.style.top = top !== undefined ? getPx(top) : element.style.top;\n element.style.right = right !== undefined ? getPx(right) : element.style.right;\n element.style.bottom = bottom !== undefined ? getPx(bottom) : element.style.bottom;\n element.style.width = width !== undefined ? getPx(width) : element.style.width;\n element.style.height = height !== undefined ? getPx(height) : element.style.height;\n}\n\nfunction setWrapperSizeDimensions(\n wrapper: HTMLElement,\n image: HTMLImageElement,\n width: number,\n height: number\n) {\n const hasBorder = image.style.borderStyle;\n if (hasBorder) {\n const borderWidth = image.style.borderWidth ? 2 * parseInt(image.style.borderWidth) : 2;\n wrapper.style.width = getPx(width + borderWidth);\n wrapper.style.height = getPx(height + borderWidth);\n return;\n }\n wrapper.style.width = getPx(width);\n wrapper.style.height = getPx(height);\n}\n\nfunction getPx(value: number): string {\n return value + 'px';\n}\n\nfunction getEditElements(wrapper: HTMLElement, elementClass: ImageEditElementClass): HTMLElement[] {\n return toArray(wrapper.querySelectorAll('.' + elementClass)) as HTMLElement[];\n}\n\nfunction isRtl(element: Node): boolean {\n return safeInstanceOf(element, 'HTMLElement')\n ? getComputedStyle(element, 'direction') == 'rtl'\n : false;\n}\n\nfunction handleRadIndexCalculator(angleRad: number): number {\n let idx = Math.round(angleRad / DirectionRad) % DIRECTIONS;\n return idx < 0 ? idx + DIRECTIONS : idx;\n}\n\nfunction rotateHandles(angleRad: number, y: string = '', x: string = ''): string {\n const radIndex = handleRadIndexCalculator(angleRad);\n const originalDirection = y + x;\n const originalIndex = DirectionOrder.indexOf(originalDirection);\n const rotatedIndex = originalIndex >= 0 && originalIndex + radIndex;\n return rotatedIndex ? DirectionOrder[rotatedIndex % DIRECTIONS] : '';\n}\n\n/**\n * Rotate the resizer and cropper handles according to the image position.\n * @param handles The resizer handles.\n * @param angleRad The angle that the image was rotated.\n */\nfunction updateHandleCursor(handles: HTMLElement[], angleRad: number) {\n handles.map(handle => {\n const y = handle.dataset.y;\n const x = handle.dataset.x;\n handle.style.cursor = `${rotateHandles(angleRad, y, x)}-resize`;\n });\n}\n\n/**\n * Check if the current image was resized by the user\n * @param image the current image\n * @returns if the user resized the image, returns true, otherwise, returns false\n */\nfunction checkIfImageWasResized(image: HTMLImageElement): boolean {\n const { width, height, style } = image;\n const isMaxWidthInitial =\n style.maxWidth === '' || style.maxWidth === 'initial' || style.maxWidth === 'auto';\n if (\n isMaxWidthInitial &&\n (isFixedNumberValue(style.height) ||\n isFixedNumberValue(style.width) ||\n isFixedNumberValue(width) ||\n isFixedNumberValue(height))\n ) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction isFixedNumberValue(value: string | number) {\n const numberValue = typeof value === 'string' ? parseInt(value) : value;\n return !isNaN(numberValue);\n}\n\nfunction isASmallImage(editInfo: ImageEditInfo): boolean {\n const { widthPx, heightPx } = editInfo;\n return widthPx && heightPx && widthPx * widthPx < MAX_SMALL_SIZE_IMAGE ? true : false;\n}\n\nfunction getColorString(color: string | ModeIndependentColor, isDarkMode: boolean): string {\n if (typeof color === 'string') {\n return color.trim();\n }\n return isDarkMode ? color.darkModeColor.trim() : color.lightModeColor.trim();\n}\n\nfunction setFlipped(\n element: HTMLImageElement,\n flippedHorizontally?: boolean,\n flippedVertically?: boolean\n) {\n element.style.transform = `scale(${flippedHorizontally ? '-1' : '1'}, ${\n flippedVertically ? '-1' : '1'\n })`;\n}\n","/**\n * Check if we can regenerate edited image from the source image.\n * An image can't regenerate result when there is CORS issue of the source content.\n * @param img The image element to test\n * @returns True when we can regenerate the edited image, otherwise false\n */\nexport default function canRegenerateImage(img: HTMLImageElement): boolean {\n if (!img) {\n return false;\n }\n\n try {\n const canvas = img.ownerDocument.createElement('canvas');\n canvas.width = 10;\n canvas.height = 10;\n const context = canvas.getContext('2d');\n if (context) {\n context.drawImage(img, 0, 0);\n context.getImageData(0, 0, 1, 1);\n return true;\n }\n\n return false;\n } catch {\n return false;\n }\n}\n","import getTargetSizeByPercentage from '../editInfoUtils/getTargetSizeByPercentage';\nimport { getEditInfoFromImage } from '../editInfoUtils/editInfo';\n\n/**\n * Check if the image is already resized to the given percentage\n * @param image The image to check\n * @param percentage The percentage to check\n */\nexport default function isResizedTo(image: HTMLImageElement, percentage: number): boolean {\n const editInfo = getEditInfoFromImage(image);\n if (editInfo) {\n const { width, height } = getTargetSizeByPercentage(editInfo, percentage);\n return (\n Math.round(width) == Math.round(editInfo.widthPx) &&\n Math.round(height) == Math.round(editInfo.heightPx)\n );\n }\n return false;\n}\n","import { ChangeSource, IEditor } from 'roosterjs-editor-types';\nimport { deleteEditInfo } from '../editInfoUtils/editInfo';\n\n/**\n * Remove explicit width & height attributes on the image element.\n * @param editor The editor that contains the image\n * @param image The image to remove w/h from\n */\nexport default function resetImage(editor: IEditor, image: HTMLImageElement) {\n editor.addUndoSnapshot(() => {\n image.style.width = '';\n image.style.height = '';\n image.style.maxWidth = '100%';\n image.removeAttribute('width');\n image.removeAttribute('height');\n deleteEditInfo(image);\n }, ChangeSource.ImageResize);\n}\n","import applyChange from '../editInfoUtils/applyChange';\nimport getTargetSizeByPercentage from '../editInfoUtils/getTargetSizeByPercentage';\nimport isResizedTo from './isResizedTo';\nimport { ChangeSource, IEditor } from 'roosterjs-editor-types';\nimport { getEditInfoFromImage } from '../editInfoUtils/editInfo';\n\n/**\n * Resize the image by percentage of its natural size. If the image is cropped or rotated,\n * the final size will also calculated with crop and rotate info.\n * @param editor The editor that contains the image\n * @param image The image to resize\n * @param percentage Percentage to resize to\n * @param minWidth Minimum width\n * @param minHeight Minimum height\n */\nexport default function resizeByPercentage(\n editor: IEditor,\n image: HTMLImageElement,\n percentage: number,\n minWidth: number,\n minHeight: number\n) {\n const editInfo = getEditInfoFromImage(image);\n\n if (!isResizedTo(image, percentage)) {\n loadImage(image, image.src, () => {\n if (!editor.isDisposed() && editor.contains(image) && editInfo) {\n const lastSrc = image.getAttribute('src');\n const { width, height } = getTargetSizeByPercentage(editInfo, percentage);\n editInfo.widthPx = Math.max(width, minWidth);\n editInfo.heightPx = Math.max(height, minHeight);\n\n editor.addUndoSnapshot(() => {\n applyChange(editor, image, editInfo, lastSrc || '', true /*wasResized*/);\n }, ChangeSource.ImageResize);\n editor.select(image);\n }\n });\n }\n}\n\nfunction loadImage(img: HTMLImageElement, src: string, callback: () => void) {\n img.onload = () => {\n img.onload = null;\n img.onerror = null;\n callback();\n };\n img.onerror = () => {\n img.onload = null;\n img.onerror = null;\n callback();\n };\n img.src = src;\n}\n","import checkEditInfoState, { ImageEditInfoState } from './checkEditInfoState';\nimport generateDataURL from './generateDataURL';\nimport getGeneratedImageSize from './getGeneratedImageSize';\nimport ImageEditInfo from '../types/ImageEditInfo';\nimport { deleteEditInfo, getEditInfoFromImage, saveEditInfo } from './editInfo';\nimport { IEditor, PluginEventType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Apply changes from the edit info of an image, write result to the image\n * @param editor The editor object that contains the image\n * @param image The image to apply the change\n * @param editInfo Edit info that contains the changed information of the image\n * @param previousSrc Last src value of the image before the change was made\n * @param wasResizedOrCropped if the image was resized or cropped apply the new image dimensions\n * @param editingImage (optional) Image in editing state\n */\nexport default function applyChange(\n editor: IEditor,\n image: HTMLImageElement,\n editInfo: ImageEditInfo,\n previousSrc: string,\n wasResizedOrCropped: boolean,\n editingImage?: HTMLImageElement\n) {\n let newSrc = '';\n\n const initEditInfo = getEditInfoFromImage(editingImage ?? image);\n const state = checkEditInfoState(editInfo, initEditInfo);\n\n switch (state) {\n case ImageEditInfoState.ResizeOnly:\n // For resize only case, no need to generate a new image, just reuse the original one\n newSrc = editInfo.src;\n break;\n case ImageEditInfoState.SameWithLast:\n // For SameWithLast case, image may be resized but the content is still the same with last one,\n // so no need to create a new image, but just reuse last one\n newSrc = previousSrc;\n break;\n case ImageEditInfoState.FullyChanged:\n // For other cases (cropped, rotated, ...) we need to create a new image to reflect the change\n newSrc = generateDataURL(editingImage ?? image, editInfo);\n break;\n }\n\n const srcChanged = newSrc != previousSrc;\n\n if (srcChanged) {\n // If the src is changed, fire an EditImage event so that plugins knows that a new image is used, and can\n // replace the new src with some other string and it will be used and set to the image\n const event = editor.triggerPluginEvent(PluginEventType.EditImage, {\n image: image,\n originalSrc: editInfo.src,\n previousSrc,\n newSrc,\n });\n newSrc = event.newSrc;\n }\n\n if (newSrc == editInfo.src) {\n // If newSrc is the same with original one, it means there is only size change, but no rotation, no cropping,\n // so we don't need to keep edit info, we can delete it\n deleteEditInfo(image);\n } else {\n // Otherwise, save the new edit info to the image so that next time when we edit the same image, we know\n // the edit info\n saveEditInfo(image, editInfo);\n }\n\n // Write back the change to image, and set its new size\n const { targetWidth, targetHeight } = getGeneratedImageSize(editInfo);\n image.src = newSrc;\n\n if (wasResizedOrCropped || state == ImageEditInfoState.FullyChanged) {\n image.width = targetWidth;\n image.height = targetHeight;\n }\n}\n","import ImageEditInfo, { CropInfo, ResizeInfo, RotateInfo } from '../types/ImageEditInfo';\n\nconst RESIZE_KEYS: (keyof ResizeInfo)[] = ['widthPx', 'heightPx'];\nconst ROTATE_KEYS: (keyof RotateInfo)[] = ['angleRad'];\nconst CROP_KEYS: (keyof CropInfo)[] = [\n 'leftPercent',\n 'rightPercent',\n 'topPercent',\n 'bottomPercent',\n];\nconst ROTATE_CROP_KEYS: (keyof RotateInfo | keyof CropInfo)[] = [...ROTATE_KEYS, ...CROP_KEYS];\nconst ALL_KEYS = [...ROTATE_CROP_KEYS, ...RESIZE_KEYS];\n\n/**\n * @internal\n * State of an edit info object for image editing.\n * It is returned by checkEditInfoState() function\n */\nexport const enum ImageEditInfoState {\n /**\n * Invalid edit info. It means the given edit info object is either null,\n * or not all its member are of correct type\n */\n Invalid,\n\n /**\n * The edit info shows that it is only potentially edited by resizing action.\n * Image is not rotated or cropped, or event not changed at all.\n */\n ResizeOnly,\n\n /**\n * When compare with another edit info, this value can be returned when both current\n * edit info and the other one are not been rotated, and they have same cropping\n * percentages. So that they can share the same image src, only width and height\n * need to be adjusted.\n */\n SameWithLast,\n\n /**\n * When this value is returned, it means the image is edited by either cropping or\n * rotation, or both. Image source can't be reused, need to generate a new image src\n * data uri.\n */\n FullyChanged,\n}\n\n/**\n * @internal\n * Check the state of an edit info\n * @param editInfo The edit info to check\n * @param compareTo An optional edit info to compare to\n * @returns If the source edit info is not valid (wrong type, missing field, ...), returns Invalid.\n * If the source edit info doesn't contain any rotation or cropping, returns ResizeOnly\n * If the compare edit info exists, and both of them don't contain rotation, and the have same cropping values,\n * returns SameWithLast. Otherwise, returns FullyChanged\n */\nexport default function checkEditInfoState(\n editInfo: ImageEditInfo,\n compareTo?: ImageEditInfo\n): ImageEditInfoState {\n if (!editInfo || !editInfo.src || ALL_KEYS.some(key => !isNumber(editInfo[key]))) {\n return ImageEditInfoState.Invalid;\n } else if (\n ROTATE_CROP_KEYS.every(key => areSameNumber(editInfo[key], 0)) &&\n !editInfo.flippedHorizontal &&\n !editInfo.flippedVertical &&\n (!compareTo || (compareTo && editInfo.angleRad === compareTo.angleRad))\n ) {\n return ImageEditInfoState.ResizeOnly;\n } else if (\n compareTo &&\n ROTATE_KEYS.every(key => areSameNumber(editInfo[key], 0)) &&\n ROTATE_KEYS.every(key => areSameNumber(compareTo[key], 0)) &&\n CROP_KEYS.every(key => areSameNumber(editInfo[key], compareTo[key])) &&\n compareTo.flippedHorizontal === editInfo.flippedHorizontal &&\n compareTo.flippedVertical === editInfo.flippedVertical\n ) {\n return ImageEditInfoState.SameWithLast;\n } else {\n return ImageEditInfoState.FullyChanged;\n }\n}\n\nfunction isNumber(o: any): o is number {\n return typeof o === 'number';\n}\n\nfunction areSameNumber(n1: number, n2: number) {\n return Math.abs(n1 - n2) < 1e-3;\n}\n","import checkEditInfoState, { ImageEditInfoState } from './checkEditInfoState';\nimport ImageEditInfo from '../types/ImageEditInfo';\nimport { getMetadata, removeMetadata, setMetadata } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Save edit info to image\n * @param image The image to save edit info to\n * @param editInfo The edit info to save\n */\nexport function saveEditInfo(image: HTMLImageElement, editInfo: ImageEditInfo) {\n if (image) {\n setMetadata(image, editInfo);\n }\n}\n\n/**\n * @internal\n * Delete edit info of an image if any\n * @param image The image to delete edit info from\n */\nexport function deleteEditInfo(image: HTMLImageElement) {\n if (image) {\n removeMetadata(image);\n }\n}\n\n/**\n * @internal\n * Get image edit info from an image. If the image doesn't have edit info, create one from this image.\n * When create new edit info, it will have width/height set to the image's current client width/height, and\n * natural width/height set to the image's natural width/height, src set to its current src, and all\n * other fields set to 0.\n * @param image The image to get edit info from\n */\nexport function getEditInfoFromImage(image: HTMLImageElement): ImageEditInfo {\n const obj = getMetadata(image);\n return !obj || checkEditInfoState(obj) == ImageEditInfoState.Invalid\n ? getInitialEditInfo(image)\n : obj;\n}\n\nfunction getInitialEditInfo(image: HTMLImageElement): ImageEditInfo {\n return {\n src: image.getAttribute('src') || '',\n widthPx: image.clientWidth,\n heightPx: image.clientHeight,\n naturalWidth: image.naturalWidth,\n naturalHeight: image.naturalHeight,\n leftPercent: 0,\n rightPercent: 0,\n topPercent: 0,\n bottomPercent: 0,\n angleRad: 0,\n };\n}\n","import getGeneratedImageSize from './getGeneratedImageSize';\nimport ImageEditInfo from '../types/ImageEditInfo';\n\n/**\n * @internal\n * Generate new dataURL from an image and edit info\n * @param image The image to generate data URL from. It is supposed to have original src loaded\n * @param editInfo Edit info of the image\n * @returns A BASE64 encoded string with image prefix that represents the content of the generated image.\n * If there are rotate/crop/resize info in the edit info, the generated image will also reflect the result.\n * It is possible to throw exception since the original image may not be able to read its content from\n * the code, so better check canRegenerateImage() of the image first.\n * @throws Exception when fail to generate dataURL from canvas\n */\nexport default function generateDataURL(image: HTMLImageElement, editInfo: ImageEditInfo): string {\n const {\n angleRad: angle,\n widthPx: width,\n heightPx: height,\n bottomPercent: bottom,\n leftPercent: left,\n rightPercent: right,\n topPercent: top,\n naturalWidth,\n naturalHeight,\n } = editInfo;\n const imageWidth = naturalWidth * (1 - left - right);\n const imageHeight = naturalHeight * (1 - top - bottom);\n\n // Adjust the canvas size and scaling for high display resolution\n const devicePixelRatio = window.devicePixelRatio || 1;\n const canvas = document.createElement('canvas');\n const { targetWidth, targetHeight } = getGeneratedImageSize(editInfo);\n canvas.width = targetWidth * devicePixelRatio;\n canvas.height = targetHeight * devicePixelRatio;\n\n const context = canvas.getContext('2d');\n if (context) {\n context.scale(devicePixelRatio, devicePixelRatio);\n context.translate(targetWidth / 2, targetHeight / 2);\n context.rotate(angle);\n context.scale(editInfo.flippedHorizontal ? -1 : 1, editInfo.flippedVertical ? -1 : 1);\n context.drawImage(\n image,\n naturalWidth * left,\n naturalHeight * top,\n imageWidth,\n imageHeight,\n -width / 2,\n -height / 2,\n width,\n height\n );\n }\n\n return canvas.toDataURL('image/png', 1.0);\n}\n","import GeneratedImageSize from '../types/GeneratedImageSize';\nimport ImageEditInfo from '../types/ImageEditInfo';\n\n/**\n * @internal\n * Calculate the target size of an image.\n * For image that is not rotated, target size is the same with resizing/cropping size.\n * For image that is rotated, target size is calculated from resizing/cropping size and its rotate angle\n * Say an image is resized to 100w*100h, cropped 25% on each side, then rotated 45deg, so that cropped size\n * will be (both height and width) 100*(1-0.25-0,25) = 50px, then final image size will be 50*sqrt(2) = 71px\n * @param editInfo The edit info to calculate size from\n * @param beforeCrop True to calculate the full size of original image before crop, false to calculate the size\n * after crop\n * @returns A GeneratedImageSize object which contains original, visible and target target width and height of the image\n */\nexport default function getGeneratedImageSize(\n editInfo: ImageEditInfo,\n beforeCrop?: boolean\n): GeneratedImageSize {\n const {\n widthPx: width,\n heightPx: height,\n angleRad: angle,\n leftPercent: left,\n rightPercent: right,\n topPercent: top,\n bottomPercent: bottom,\n } = editInfo;\n\n // Original image size before crop and rotate\n const originalWidth = width / (1 - left - right);\n const originalHeight = height / (1 - top - bottom);\n\n // Visible size\n const visibleWidth = beforeCrop ? originalWidth : width;\n const visibleHeight = beforeCrop ? originalHeight : height;\n\n // Target size after crop and rotate\n const targetWidth =\n Math.abs(visibleWidth * Math.cos(angle)) + Math.abs(visibleHeight * Math.sin(angle));\n const targetHeight =\n Math.abs(visibleWidth * Math.sin(angle)) + Math.abs(visibleHeight * Math.cos(angle));\n\n return {\n targetWidth,\n targetHeight,\n originalWidth,\n originalHeight,\n visibleWidth,\n visibleHeight,\n };\n}\n","import ImageEditInfo from '../types/ImageEditInfo';\nimport ImageSize from '../types/ImageSize';\n\n/**\n * @internal\n * Get target size of an image with a percentage\n * @param editInfo\n * @param percentage\n * @returns [width, height] array\n */\nexport default function getTargetSizeByPercentage(\n editInfo: ImageEditInfo,\n percentage: number\n): ImageSize {\n const {\n naturalWidth,\n naturalHeight,\n leftPercent: left,\n topPercent: top,\n rightPercent: right,\n bottomPercent: bottom,\n } = editInfo;\n const width = naturalWidth * (1 - left - right) * percentage;\n const height = naturalHeight * (1 - top - bottom) * percentage;\n return { width, height };\n}\n","import generateDataURL from './generateDataURL';\nimport ImageEditInfo from '../types/ImageEditInfo';\n\n/**\n * @internal\n * Check if the image is a gif, if true, use canvas to convert it to a png.\n * If the image is not a gif, return null.\n * @param image to be converted\n * @returns the converted image data url or null, if the image is not a gif\n */\nexport function tryToConvertGifToPng(editInfo: ImageEditInfo) {\n const { src, widthPx, heightPx, naturalHeight, naturalWidth } = editInfo;\n if (src.indexOf('.gif') > -1 || src.indexOf('image/gif') > -1) {\n try {\n const image = document.createElement('img');\n image.src = src;\n const newEditInfo = {\n src: src,\n widthPx: widthPx,\n heightPx: heightPx,\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n leftPercent: 0,\n rightPercent: 0,\n topPercent: 0,\n bottomPercent: 0,\n angleRad: 0,\n };\n return generateDataURL(image, newEditInfo);\n } catch {\n return null;\n }\n }\n return null;\n}\n","import DragAndDropContext, { DNDDirectionX, DnDDirectionY } from '../types/DragAndDropContext';\nimport DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport { CreateElementData } from 'roosterjs-editor-types';\nimport { CropInfo } from '../types/ImageEditInfo';\nimport { ImageEditElementClass } from '../types/ImageEditElementClass';\nimport { rotateCoordinate } from './Resizer';\n\nconst CROP_HANDLE_SIZE = 22;\nconst CROP_HANDLE_WIDTH = 7;\nconst Xs: DNDDirectionX[] = ['w', 'e'];\nconst Ys: DnDDirectionY[] = ['s', 'n'];\nconst ROTATION: Record = {\n sw: 0,\n nw: 90,\n ne: 180,\n se: 270,\n};\n\n/**\n * @internal\n * Crop handle for DragAndDropHelper\n */\nexport const Cropper: DragAndDropHandler = {\n onDragStart: ({ editInfo }) => ({ ...editInfo }),\n onDragging: ({ editInfo, x, y, options }, e, base, dx, dy) => {\n [dx, dy] = rotateCoordinate(dx, dy, editInfo.angleRad);\n\n const {\n widthPx,\n heightPx,\n leftPercent,\n rightPercent,\n topPercent,\n bottomPercent,\n } = editInfo;\n const { minWidth, minHeight } = options;\n const widthPercent = 1 - leftPercent - rightPercent;\n const heightPercent = 1 - topPercent - bottomPercent;\n\n if (\n widthPercent > 0 &&\n heightPercent > 0 &&\n minWidth !== undefined &&\n minHeight !== undefined\n ) {\n const fullWidth = widthPx / widthPercent;\n const fullHeight = heightPx / heightPercent;\n const newLeft =\n x != 'e'\n ? crop(base.leftPercent, dx, fullWidth, rightPercent, minWidth)\n : leftPercent;\n const newRight =\n x != 'w'\n ? crop(base.rightPercent, -dx, fullWidth, leftPercent, minWidth)\n : rightPercent;\n const newTop =\n y != 's'\n ? crop(base.topPercent, dy, fullHeight, bottomPercent, minHeight)\n : topPercent;\n const newBottom =\n y != 'n'\n ? crop(base.bottomPercent, -dy, fullHeight, topPercent, minHeight)\n : bottomPercent;\n\n editInfo.leftPercent = newLeft;\n editInfo.rightPercent = newRight;\n editInfo.topPercent = newTop;\n editInfo.bottomPercent = newBottom;\n editInfo.widthPx = fullWidth * (1 - newLeft - newRight);\n editInfo.heightPx = fullHeight * (1 - newTop - newBottom);\n\n return true;\n } else {\n return false;\n }\n },\n};\n\nfunction crop(\n basePercentage: number,\n deltaValue: number,\n fullValue: number,\n currentPercentage: number,\n minValue: number\n): number {\n const maxValue = fullValue * (1 - currentPercentage) - minValue;\n const newValue = fullValue * basePercentage + deltaValue;\n const validValue = Math.max(Math.min(newValue, maxValue), 0);\n return validValue / fullValue;\n}\n\n/**\n * @internal\n * Get HTML for crop elements, including 4 overlays (to show dark shadow), 1 container and 4 crop handles\n */\nexport function getCropHTML(): CreateElementData[] {\n const overlayHTML: CreateElementData = {\n tag: 'div',\n style: 'position:absolute;background-color:rgb(0,0,0,0.5);pointer-events:none',\n className: ImageEditElementClass.CropOverlay,\n };\n const containerHTML: CreateElementData = {\n tag: 'div',\n style: 'position:absolute;overflow:hidden',\n className: ImageEditElementClass.CropContainer,\n children: [],\n };\n if (containerHTML) {\n Xs.forEach(x => Ys.forEach(y => containerHTML.children?.push(getCropHTMLInternal(x, y))));\n }\n return [containerHTML, overlayHTML, overlayHTML, overlayHTML, overlayHTML];\n}\n\nfunction getCropHTMLInternal(x: DNDDirectionX, y: DnDDirectionY): CreateElementData {\n const leftOrRight = x == 'w' ? 'left' : 'right';\n const topOrBottom = y == 'n' ? 'top' : 'bottom';\n const rotation = ROTATION[y + x];\n\n return {\n tag: 'div',\n className: ImageEditElementClass.CropHandle,\n style: `position:absolute;pointer-events:auto;cursor:${y}${x}-resize;${leftOrRight}:0;${topOrBottom}:0;width:${CROP_HANDLE_SIZE}px;height:${CROP_HANDLE_SIZE}px;transform:rotate(${rotation}deg)`,\n dataset: { x, y },\n children: getCropHandleHTML(),\n };\n}\n\nfunction getCropHandleHTML(): CreateElementData[] {\n const result: CreateElementData[] = [];\n [0, 1].forEach(layer =>\n [0, 1].forEach(dir => {\n result.push(getCropHandleHTMLInternal(layer, dir));\n })\n );\n return result;\n}\n\nfunction getCropHandleHTMLInternal(layer: number, dir: number): CreateElementData {\n const position =\n dir == 0\n ? `right:${layer}px;height:${CROP_HANDLE_WIDTH - layer * 2}px;`\n : `top:${layer}px;width:${CROP_HANDLE_WIDTH - layer * 2}px;`;\n const bgColor = layer == 0 ? 'white' : 'black';\n\n return {\n tag: 'div',\n style: `position:absolute;left:${layer}px;bottom:${layer}px;${position};background-color:${bgColor}`,\n };\n}\n","import DragAndDropContext, { DNDDirectionX, DnDDirectionY } from '../types/DragAndDropContext';\nimport DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport ImageEditInfo, { ResizeInfo } from '../types/ImageEditInfo';\nimport ImageHtmlOptions from '../types/ImageHtmlOptions';\nimport { CreateElementData } from 'roosterjs-editor-types';\nimport { ImageEditElementClass } from '../types/ImageEditElementClass';\n\n/**\n * An optional callback to allow customize resize handle element of image resizing.\n * To customize the resize handle element, add this callback and change the attributes of elementData then it\n * will be picked up by ImageEdit code\n */\nexport interface OnShowResizeHandle {\n (elementData: CreateElementData, x: DNDDirectionX, y: DnDDirectionY): void;\n}\n\nconst enum HandleTypes {\n SquareHandles,\n CircularHandlesCorner,\n}\nconst RESIZE_HANDLE_SIZE = 10;\nconst RESIZE_HANDLE_MARGIN = 3;\nconst Xs: DNDDirectionX[] = ['w', '', 'e'];\nconst Ys: DnDDirectionY[] = ['s', '', 'n'];\n\n/**\n * @internal\n * The resize drag and drop handler\n */\nexport const Resizer: DragAndDropHandler = {\n onDragStart: ({ editInfo }) => ({ ...editInfo }),\n onDragging: ({ x, y, editInfo, options }, e, base, deltaX, deltaY) => {\n const ratio =\n base.widthPx > 0 && base.heightPx > 0 ? (base.widthPx * 1.0) / base.heightPx : 0;\n\n [deltaX, deltaY] = rotateCoordinate(deltaX, deltaY, editInfo.angleRad);\n if (options.minWidth !== undefined && options.minHeight !== undefined) {\n const horizontalOnly = x == '';\n const verticalOnly = y == '';\n const shouldPreserveRatio =\n !(horizontalOnly || verticalOnly) && (options.preserveRatio || e.shiftKey);\n let newWidth = horizontalOnly\n ? base.widthPx\n : Math.max(base.widthPx + deltaX * (x == 'w' ? -1 : 1), options.minWidth);\n let newHeight = verticalOnly\n ? base.heightPx\n : Math.max(base.heightPx + deltaY * (y == 'n' ? -1 : 1), options.minHeight);\n\n if (shouldPreserveRatio && ratio > 0) {\n if (ratio > 1) {\n // first sure newHeight is right,calculate newWidth\n newWidth = newHeight * ratio;\n if (newWidth < options.minWidth) {\n newWidth = options.minWidth;\n newHeight = newWidth / ratio;\n }\n } else {\n // first sure newWidth is right,calculate newHeight\n newHeight = newWidth / ratio;\n if (newHeight < options.minHeight) {\n newHeight = options.minHeight;\n newWidth = newHeight * ratio;\n }\n }\n }\n editInfo.widthPx = newWidth;\n editInfo.heightPx = newHeight;\n return true;\n } else {\n return false;\n }\n },\n};\n\n/**\n * @internal Calculate the rotated x and y distance for mouse moving\n * @param x Original x distance\n * @param y Original y distance\n * @param angle Rotated angle, in radian\n * @returns rotated x and y distances\n */\nexport function rotateCoordinate(x: number, y: number, angle: number): [number, number] {\n if (x == 0 && y == 0) {\n return [0, 0];\n }\n const hypotenuse = Math.sqrt(x * x + y * y);\n angle = Math.atan2(y, x) - angle;\n return [hypotenuse * Math.cos(angle), hypotenuse * Math.sin(angle)];\n}\n\n/**\n * @internal\n * Double check if the changed size can satisfy current width of container.\n * When resize an image and preserve ratio, its size can be limited by the size of container.\n * So we need to check the actual size and calculate the size again\n * @param editInfo Edit info of the image\n * @param preserveRatio Whether w/h ratio need to be preserved\n * @param actualWidth Actual width of the image after resize\n * @param actualHeight Actual height of the image after resize\n */\nexport function doubleCheckResize(\n editInfo: ImageEditInfo,\n preserveRatio: boolean,\n actualWidth: number,\n actualHeight: number\n) {\n let { widthPx, heightPx } = editInfo;\n const ratio = heightPx > 0 ? widthPx / heightPx : 0;\n\n actualWidth = Math.floor(actualWidth);\n actualHeight = Math.floor(actualHeight);\n widthPx = Math.floor(widthPx);\n heightPx = Math.floor(heightPx);\n\n editInfo.widthPx = actualWidth;\n editInfo.heightPx = actualHeight;\n\n if (preserveRatio && ratio > 0 && (widthPx !== actualWidth || heightPx !== actualHeight)) {\n if (actualWidth < widthPx) {\n editInfo.heightPx = actualWidth / ratio;\n } else {\n editInfo.widthPx = actualHeight * ratio;\n }\n }\n}\n\n/**\n * @internal\n * Get HTML for resize handles at the corners\n */\nexport function getCornerResizeHTML(\n { borderColor: resizeBorderColor }: ImageHtmlOptions,\n onShowResizeHandle?: OnShowResizeHandle\n): CreateElementData[] {\n const result: CreateElementData[] = [];\n\n Xs.forEach(x =>\n Ys.forEach(y => {\n let elementData =\n (x == '') == (y == '')\n ? getResizeHandleHTML(\n x,\n y,\n resizeBorderColor,\n HandleTypes.CircularHandlesCorner\n )\n : null;\n if (onShowResizeHandle && elementData) {\n onShowResizeHandle(elementData, x, y);\n }\n if (elementData) {\n result.push(elementData);\n }\n })\n );\n return result;\n}\n\n/**\n * @internal\n * Get HTML for resize handles on the sides\n */\nexport function getSideResizeHTML(\n { borderColor: resizeBorderColor, isSmallImage: isSmallImage }: ImageHtmlOptions,\n onShowResizeHandle?: OnShowResizeHandle\n): CreateElementData[] | null {\n if (isSmallImage) {\n return null;\n }\n const result: CreateElementData[] = [];\n Xs.forEach(x =>\n Ys.forEach(y => {\n let elementData =\n (x == '') != (y == '')\n ? getResizeHandleHTML(\n x,\n y,\n resizeBorderColor,\n HandleTypes.CircularHandlesCorner\n )\n : null;\n if (onShowResizeHandle && elementData) {\n onShowResizeHandle(elementData, x, y);\n }\n if (elementData) {\n result.push(elementData);\n }\n })\n );\n return result;\n}\n\n/**\n * @internal\n * Get HTML for resize borders\n */\nexport function getResizeBordersHTML({\n borderColor: resizeBorderColor,\n}: ImageHtmlOptions): CreateElementData {\n return {\n tag: 'div',\n style: `position:absolute;left:0;right:0;top:0;bottom:0;border:solid 2px ${resizeBorderColor};pointer-events:none;`,\n };\n}\n\nfunction getResizeHandleHTML(\n x: DNDDirectionX,\n y: DnDDirectionY,\n borderColor: string,\n handleTypes: HandleTypes\n): CreateElementData | null {\n const leftOrRight = x == 'w' ? 'left' : 'right';\n const topOrBottom = y == 'n' ? 'top' : 'bottom';\n const leftOrRightValue = x == '' ? '50%' : '0px';\n const topOrBottomValue = y == '' ? '50%' : '0px';\n const direction = y + x;\n return x == '' && y == ''\n ? null\n : {\n tag: 'div',\n style: `position:absolute;${leftOrRight}:${leftOrRightValue};${topOrBottom}:${topOrBottomValue}`,\n children: [\n {\n tag: 'div',\n style: setHandleStyle[handleTypes](\n direction,\n topOrBottom,\n leftOrRight,\n borderColor\n ),\n className: ImageEditElementClass.ResizeHandle,\n dataset: { x, y },\n },\n ],\n };\n}\n\nconst setHandleStyle: Record<\n HandleTypes,\n (direction: string, topOrBottom: string, leftOrRight: string, borderColor: string) => string\n> = {\n 0: (direction, leftOrRight, topOrBottom, borderColor) =>\n `position:relative;width:${RESIZE_HANDLE_SIZE}px;height:${RESIZE_HANDLE_SIZE}px;background-color: ${borderColor};cursor:${direction}-resize;${topOrBottom}:-${RESIZE_HANDLE_MARGIN}px;${leftOrRight}:-${RESIZE_HANDLE_MARGIN}px;`,\n 1: (direction, leftOrRight, topOrBottom) =>\n `position:relative;width:${RESIZE_HANDLE_SIZE}px;height:${RESIZE_HANDLE_SIZE}px;background-color: #FFFFFF;cursor:${direction}-resize;${topOrBottom}:-${RESIZE_HANDLE_MARGIN}px;${leftOrRight}:-${RESIZE_HANDLE_MARGIN}px;border-radius:100%;border: 2px solid #bfbfbf;box-shadow: 0px 0.36316px 1.36185px rgba(100, 100, 100, 0.25);`,\n};\n","import DragAndDropContext from '../types/DragAndDropContext';\nimport DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport ImageHtmlOptions from '../types/ImageHtmlOptions';\nimport { CreateElementData, Rect } from 'roosterjs-editor-types';\nimport { ImageEditElementClass } from '../types/ImageEditElementClass';\nimport { RotateInfo } from '../types/ImageEditInfo';\n\nconst ROTATE_SIZE = 32;\nconst ROTATE_GAP = 15;\nconst DEG_PER_RAD = 180 / Math.PI;\nconst DEFAULT_ROTATE_HANDLE_HEIGHT = ROTATE_SIZE / 2 + ROTATE_GAP;\nconst ROTATE_ICON_MARGIN = 8;\n\n/**\n * @internal\n * The rotate drag and drop handler\n */\nexport const Rotator: DragAndDropHandler = {\n onDragStart: ({ editInfo }) => ({ ...editInfo }),\n onDragging: ({ editInfo, options }, e, base, deltaX, deltaY) => {\n const distance = editInfo.heightPx / 2 + DEFAULT_ROTATE_HANDLE_HEIGHT;\n const newX = distance * Math.sin(base.angleRad) + deltaX;\n const newY = distance * Math.cos(base.angleRad) - deltaY;\n let angleInRad = Math.atan2(newX, newY);\n\n if (!e.altKey && options && options.minRotateDeg !== undefined) {\n const angleInDeg = angleInRad * DEG_PER_RAD;\n const adjustedAngleInDeg =\n Math.round(angleInDeg / options.minRotateDeg) * options.minRotateDeg;\n angleInRad = adjustedAngleInDeg / DEG_PER_RAD;\n }\n\n if (editInfo.angleRad != angleInRad) {\n editInfo.angleRad = angleInRad;\n return true;\n } else {\n return false;\n }\n },\n};\n\n/**\n * @internal\n * Move rotate handle. When image is very close to the border of editor, rotate handle may not be visible.\n * Fix it by reduce the distance from image to rotate handle\n */\nexport function updateRotateHandlePosition(\n editorRect: Rect,\n rotateCenter: HTMLElement,\n rotateHandle: HTMLElement\n) {\n const rotateHandleRect = rotateHandle.getBoundingClientRect();\n\n if (rotateHandleRect) {\n const top = rotateHandleRect.top - editorRect.top;\n const left = rotateHandleRect.left - editorRect.left;\n const right = rotateHandleRect.right - editorRect.right;\n const bottom = rotateHandleRect.bottom - editorRect.bottom;\n let adjustedDistance = Number.MAX_SAFE_INTEGER;\n if (top <= 0) {\n adjustedDistance = top;\n } else if (left <= 0) {\n adjustedDistance = left;\n } else if (right >= 0) {\n adjustedDistance = right;\n } else if (bottom >= 0) {\n adjustedDistance = bottom;\n }\n\n const rotateGap = Math.max(Math.min(ROTATE_GAP, adjustedDistance), 0);\n const rotateTop = Math.max(Math.min(ROTATE_SIZE, adjustedDistance - rotateGap), 0);\n rotateCenter.style.top = -rotateGap + 'px';\n rotateCenter.style.height = rotateGap + 'px';\n rotateHandle.style.top = -rotateTop + 'px';\n }\n}\n\n/**\n * @internal\n * Get HTML for rotate elements, including the rotate handle with icon, and a line between the handle and the image\n */\nexport function getRotateHTML({\n borderColor,\n rotateHandleBackColor,\n}: ImageHtmlOptions): CreateElementData[] {\n const handleLeft = ROTATE_SIZE / 2;\n return [\n {\n tag: 'div',\n className: ImageEditElementClass.RotateCenter,\n style: `position:absolute;left:50%;width:1px;background-color:${borderColor};top:${-ROTATE_GAP}px;height:${ROTATE_GAP}px;`,\n children: [\n {\n tag: 'div',\n className: ImageEditElementClass.RotateHandle,\n style: `position:absolute;background-color:${rotateHandleBackColor};border:solid 1px ${borderColor};border-radius:50%;width:${ROTATE_SIZE}px;height:${ROTATE_SIZE}px;left:-${handleLeft}px;cursor:move;top:${-ROTATE_SIZE}px;`,\n children: [getRotateIconHTML(borderColor)],\n },\n ],\n },\n ];\n}\n\nfunction getRotateIconHTML(borderColor: string): CreateElementData {\n return {\n tag: 'svg',\n namespace: 'http://www.w3.org/2000/svg',\n style: `width:16px;height:16px;margin: ${ROTATE_ICON_MARGIN}px ${ROTATE_ICON_MARGIN}px`,\n children: [\n {\n tag: 'path',\n namespace: 'http://www.w3.org/2000/svg',\n attributes: {\n d: 'M 10.5,10.0 A 3.8,3.8 0 1 1 6.7,6.3',\n transform: 'matrix(1.1 1.1 -1.1 1.1 11.6 -10.8)',\n ['fill-opacity']: '0',\n stroke: borderColor,\n },\n },\n {\n tag: 'path',\n namespace: 'http://www.w3.org/2000/svg',\n attributes: {\n d: 'M12.0 3.648l.884-.884.53 2.298-2.298-.53z',\n stroke: borderColor,\n },\n },\n ],\n };\n}\n","export { default as ImageEdit } from './ImageEdit';\nexport { default as canRegenerateImage } from './api/canRegenerateImage';\nexport { default as resizeByPercentage } from './api/resizeByPercentage';\nexport { default as isResizedTo } from './api/isResizedTo';\nexport { default as resetImage } from './api/resetImage';\nexport { OnShowResizeHandle } from './imageEditors/Resizer';\nexport { DNDDirectionX, DnDDirectionY } from './types/DragAndDropContext';\n","import ImageEdit from '../ImageEdit/ImageEdit';\nimport { ImageEditOperation } from 'roosterjs-editor-types';\n\n/**\n * @deprecated Use ImageEdit plugin instead\n */\nexport default class ImageResize extends ImageEdit {\n /**\n * Create a new instance of ImageResize\n * @param minWidth Minimum width of image when resize in pixel, default value is 10\n * @param minHeight Minimum height of image when resize in pixel, default value is 10\n * @param selectionBorderColor Color of resize border and handles, default value is #DB626C\n * @param forcePreserveRatio Whether always preserve width/height ratio when resize, default value is false\n * @param resizableImageSelector Selector for picking which image is resizable (e.g. for all images not placeholders), note\n * that the tag must be IMG regardless what the selector is\n */\n constructor(\n minWidth: number = 10,\n minHeight: number = 10,\n selectionBorderColor: string = '#DB626C',\n forcePreserveRatio: boolean = false,\n resizableImageSelector: string = 'img'\n ) {\n super({\n minHeight,\n minWidth,\n borderColor: selectionBorderColor,\n preserveRatio: forcePreserveRatio,\n imageSelector: resizableImageSelector,\n });\n }\n\n /**\n * @deprecated\n */\n showResizeHandle(img: HTMLImageElement) {\n this.setEditingImage(img, ImageEditOperation.Resize);\n }\n\n /**\n * @deprecated\n */\n hideResizeHandle(selectImageAfterUnSelect?: boolean) {\n this.setEditingImage(null /*image*/, selectImageAfterUnSelect);\n }\n}\n","export { default as ImageResize } from './ImageResize';\n","import convertPasteContentForSingleImage from './imageConverter/convertPasteContentForSingleImage';\nimport convertPastedContentForLI from './commonConverter/convertPastedContentForLI';\nimport convertPastedContentFromExcel from './excelConverter/convertPastedContentFromExcel';\nimport convertPastedContentFromOfficeOnline from './officeOnlineConverter/convertPastedContentFromOfficeOnline';\nimport convertPastedContentFromPowerPoint from './pptConverter/convertPastedContentFromPowerPoint';\nimport convertPastedContentFromWord from './wordConverter/convertPastedContentFromWord';\nimport handleLineMerge from './lineMerge/handleLineMerge';\nimport sanitizeHtmlColorsFromPastedContent from './sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent';\nimport sanitizeLinks from './sanitizeLinks/sanitizeLinks';\nimport { getPasteSource } from 'roosterjs-editor-dom';\nimport { KnownPasteSourceType } from 'roosterjs-editor-types';\nimport {\n EditorPlugin,\n IEditor,\n PasteType,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\n\nconst GOOGLE_SHEET_NODE_NAME = 'google-sheets-html-origin';\n\n/**\n * Paste plugin, handles BeforePaste event and reformat some special content, including:\n * 1. Content copied from Word\n * 2. Content copied from Excel\n * 3. Content copied from Word Online or OneNote Online\n */\nexport default class Paste implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Construct a new instance of Paste class\n * @param unknownTagReplacement Replace solution of unknown tags, default behavior is to replace with SPAN\n * @param convertSingleImageBody When enabled, if clipboard HTML contains a single image, we reuse the image without modifying the src attribute.\n * When disabled, pasted image src attribute will use the dataUri from clipboard data -- By Default disabled.\n */\n constructor(\n private unknownTagReplacement: string = 'SPAN',\n private convertSingleImageBody: boolean = false\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Paste';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (this.editor && event.eventType == PluginEventType.BeforePaste) {\n const { fragment, sanitizingOption } = event;\n const trustedHTMLHandler = this.editor.getTrustedHTMLHandler();\n\n switch (getPasteSource(event, this.convertSingleImageBody)) {\n case KnownPasteSourceType.WordDesktop:\n // Handle HTML copied from Word\n convertPastedContentFromWord(event);\n break;\n case KnownPasteSourceType.ExcelDesktop:\n case KnownPasteSourceType.ExcelOnline:\n if (\n event.pasteType === PasteType.Normal ||\n event.pasteType === PasteType.MergeFormat\n ) {\n // Handle HTML copied from Excel\n convertPastedContentFromExcel(event, trustedHTMLHandler);\n }\n break;\n case KnownPasteSourceType.PowerPointDesktop:\n convertPastedContentFromPowerPoint(event, trustedHTMLHandler);\n break;\n case KnownPasteSourceType.WacComponents:\n convertPastedContentFromOfficeOnline(fragment, sanitizingOption);\n break;\n case KnownPasteSourceType.GoogleSheets:\n sanitizingOption.additionalTagReplacements[GOOGLE_SHEET_NODE_NAME] = '*';\n break;\n case KnownPasteSourceType.SingleImage:\n convertPasteContentForSingleImage(event, trustedHTMLHandler);\n break;\n case KnownPasteSourceType.Default:\n convertPastedContentForLI(fragment);\n handleLineMerge(fragment);\n break;\n }\n sanitizeLinks(sanitizingOption);\n sanitizeHtmlColorsFromPastedContent(sanitizingOption);\n\n // Replace unknown tags with SPAN\n sanitizingOption.unknownTagReplacement = this.unknownTagReplacement;\n }\n }\n}\n","import {\n changeElementTag,\n getTagOfNode,\n toArray,\n wrap,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Convert content copied from Teams to be well-formed\n */\nexport default function convertPastedContentForLI(fragment: DocumentFragment) {\n // Sometimes it is possible that we get LI nodes directly under DIV.\n // In that case we need to convert DIV to UL. It is also possible to be OL, but we don't know it.\n // So always assume it is UL here, and later user can change it.\n if (isPureLiNode(fragment)) {\n wrap(toArray(fragment.childNodes), 'UL');\n } else if (\n safeInstanceOf(fragment.firstChild, 'HTMLElement') &&\n isPureLiNode(fragment.firstChild)\n ) {\n changeElementTag(fragment.firstChild as HTMLElement, 'UL');\n }\n}\n\nfunction isPureLiNode(node: ParentNode & Node) {\n if (node && !node.nextSibling && ['OL', 'UL', 'MENU'].indexOf(getTagOfNode(node)) < 0) {\n let hasLi = false;\n if (\n toArray(node.childNodes).every(childNode => {\n if (safeInstanceOf(childNode, 'Text') && !childNode.nodeValue?.trim()) {\n return true;\n } else if (getTagOfNode(childNode) == 'LI') {\n hasLi = true;\n return true;\n } else {\n return false;\n }\n }) &&\n hasLi\n ) {\n return true;\n }\n }\n return false;\n}\n","import { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\nimport { chainSanitizerCallback, getTagOfNode, moveChildNodes } from 'roosterjs-editor-dom';\n\nconst LAST_TD_END_REGEX = /<\\/\\s*td\\s*>((?!<\\/\\s*tr\\s*>)[\\s\\S])*$/i;\nconst LAST_TR_END_REGEX = /<\\/\\s*tr\\s*>((?!<\\/\\s*table\\s*>)[\\s\\S])*$/i;\nconst LAST_TR_REGEX = /]*>[^<]*/i;\nconst LAST_TABLE_REGEX = /]*>[^<]*/i;\nconst DEFAULT_BORDER_STYLE = 'solid 1px #d4d4d4';\n\n/**\n * @internal\n * Convert pasted content from Excel, add borders when source doc doesn't have a border\n * @param event The BeforePaste event\n */\nexport default function convertPastedContentFromExcel(\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { fragment, sanitizingOption, htmlBefore, clipboardData } = event;\n const html = clipboardData.html ? excelHandler(clipboardData.html, htmlBefore) : undefined;\n\n if (html && clipboardData.html != html) {\n const doc = new DOMParser().parseFromString(trustedHTMLHandler(html), 'text/html');\n moveChildNodes(fragment, doc?.body);\n }\n\n // For Excel Online\n const firstChild = fragment.firstChild;\n if (firstChild && firstChild.childNodes.length > 0 && getTagOfNode(firstChild) == 'DIV') {\n const tableFound = Array.from(firstChild.childNodes).every((child: Node) => {\n // Tables pasted from Excel Online should be of the format: 0 to N META tags and 1 TABLE tag\n return getTagOfNode(child) == 'META'\n ? true\n : getTagOfNode(child) == 'TABLE' && child == firstChild.lastChild;\n });\n\n // Extract Table from Div\n if (tableFound && firstChild.lastChild) {\n event.fragment.replaceChildren(firstChild.lastChild);\n }\n }\n\n chainSanitizerCallback(sanitizingOption.elementCallbacks, 'TD', element => {\n if (element.style.borderStyle == 'none') {\n element.style.border = DEFAULT_BORDER_STYLE;\n }\n return true;\n });\n}\n\n/**\n * @internal Export for test only\n * @param html Source html\n */\nexport function excelHandler(html: string, htmlBefore: string): string {\n if (html.match(LAST_TD_END_REGEX)) {\n const trMatch = htmlBefore.match(LAST_TR_REGEX);\n const tr = trMatch ? trMatch[0] : '

    ';\n html = table + html + '
    ';\n }\n\n return html;\n}\n","import { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\nimport { moveChildNodes } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Convert pasted content if there are HTML and Image data in the Clipboard\n * @param event The BeforePaste event\n */\nexport default function convertPasteContentForSingleImage(\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { fragment, clipboardData } = event;\n const { html, image } = clipboardData;\n\n if (html && image) {\n //If there are Html in the clipboard, and the html body only have one img children, use the HTML\n const doc = new DOMParser().parseFromString(trustedHTMLHandler(html), 'text/html');\n moveChildNodes(fragment, doc?.body);\n }\n}\n","export { default as Paste } from './Paste';\n","import {\n changeElementTag,\n ContentTraverser,\n findClosestElementAncestor,\n getBlockElementAtNode,\n getNextLeafSibling,\n getPreviousLeafSibling,\n getTagOfNode,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Process pasted content, if there are multiple blocks that are not wrapped by a shared ancestor node,\n * change the tag of first and last node to be SPAN so that it will be merged into current block\n * @param root Root node of content to process\n */\nexport default function handleLineMerge(root: Node) {\n const traverser = ContentTraverser.createBodyTraverser(root);\n const blocks: { start: Node; end: Node }[] = [];\n\n for (\n let block = traverser?.currentBlockElement;\n block;\n block = traverser.getNextBlockElement()\n ) {\n blocks.push({\n start: block.getStartNode(),\n end: block.getEndNode(),\n });\n }\n\n if (blocks.length > 0) {\n const blocksLength = blocks.length - 1;\n processBlock(blocks[0]);\n processBlock(blocks[blocksLength]);\n checkAndAddBr(root, blocks[0], true /*isFirst*/);\n checkAndAddBr(root, blocks[blocksLength], false /*isFirst*/, blocks[0]);\n }\n}\n\nfunction processBlock(block: { start: Node; end: Node }) {\n const { start, end } = block;\n\n if (start == end && getTagOfNode(start) == 'DIV') {\n const node = changeElementTag(start as HTMLElement, 'SPAN') as Node;\n block.start = node;\n block.end = node;\n\n if (node && node.lastChild && getTagOfNode(node.lastChild) == 'BR') {\n node.removeChild(node.lastChild);\n }\n } else if (getTagOfNode(end) == 'BR') {\n const node = end.ownerDocument?.createTextNode('');\n if (node) {\n end.parentNode?.insertBefore(node, end);\n block.end = node;\n end.parentNode?.removeChild(end);\n }\n }\n}\n\nfunction checkAndAddBr(\n root: Node,\n block: { start: Node; end: Node },\n isFirst: boolean,\n firstBlock?: { start: Node; end: Node }\n) {\n const blockElement = getBlockElementAtNode(root, block.start);\n const sibling = isFirst\n ? getNextLeafSibling(root, block.end)\n : getPreviousLeafSibling(root, block.start);\n\n if (!sibling) {\n return;\n }\n\n if (blockElement?.contains(sibling)) {\n const br = block.start.ownerDocument?.createElement('br');\n if (br) {\n const blockToUse = isFirst ? block.end : block.start;\n blockToUse.parentNode?.insertBefore(br, isFirst ? block.end.nextSibling : block.start);\n }\n } else if (\n firstBlock &&\n firstBlock.end == firstBlock.start &&\n getTagOfNode(firstBlock.end) == 'SPAN'\n ) {\n // If the first block and the last block are Siblings, add a BR before so the only two\n // lines that are being pasted are not merged.\n const previousSibling = getPreviousLeafSibling(root, block.start);\n if (\n firstBlock.end.contains(previousSibling) &&\n !findClosestElementAncestor(block.start, root, 'li')\n ) {\n const br = block.start.ownerDocument?.createElement('br');\n if (br) {\n block.start.parentNode?.insertBefore(br, block.start);\n }\n }\n }\n}\n","/**\n * @internal\n * Type that holds all the info of a consecutive list item block.\n */\nexport default interface ListItemBlock {\n /**\n * The first element in block of list item from pasted word online document.\n */\n startElement: Element | null;\n\n /**\n * The last element in block of list item from pasted word online document.\n */\n endElement: Element | null;\n\n /**\n * The position where the processed bulleted list should be inserted.\n */\n insertPositionNode: Node | null;\n\n /**\n * The list of containers that wraps each list item.\n */\n listItemContainers: Element[];\n}\n\n/**\n * @internal\n * Initialize an empty ListItemBlock\n */\nexport function createListItemBlock(listItem: Element | null = null): ListItemBlock {\n return {\n startElement: listItem,\n endElement: listItem,\n insertPositionNode: null,\n listItemContainers: listItem ? [listItem] : [],\n };\n}\n","import { chainSanitizerCallback } from 'roosterjs-editor-dom';\nimport { HtmlSanitizerOptions } from 'roosterjs-editor-types';\nimport convertPastedContentFromWordOnline, {\n isWordOnlineWithList,\n} from './convertPastedContentFromWordOnline';\n\nconst WAC_IDENTIFY_SELECTOR =\n 'ul[class^=\"BulletListStyle\"]>.OutlineElement,ol[class^=\"NumberListStyle\"]>.OutlineElement,span.WACImageContainer';\nconst TABLE_TEMP_ELEMENTS_QUERY = [\n 'TableInsertRowGapBlank',\n 'TableColumnResizeHandle',\n 'TableCellTopBorderHandle',\n 'TableCellLeftBorderHandle',\n 'TableHoverColumnHandle',\n 'TableHoverRowHandle',\n]\n .map(className => `.${className}`)\n .join(',');\n/**\n * @internal\n * Convert pasted content from Office Online\n * Once it is known that the document is from WAC\n * We need to remove the display property and margin from all the list item\n * @param event The BeforePaste event\n */\nexport default function convertPastedContentFromOfficeOnline(\n fragment: DocumentFragment,\n sanitizingOption: Required\n) {\n fragment.querySelectorAll(WAC_IDENTIFY_SELECTOR).forEach((el: Element) => {\n const element = el as HTMLElement;\n element.style.removeProperty('display');\n element.style.removeProperty('margin');\n });\n // call conversion function if the pasted content is from word online and\n // has list element in the pasted content.\n if (isWordOnlineWithList(fragment)) {\n convertPastedContentFromWordOnline(fragment);\n }\n\n // Remove \"border:none\" for image to fix image resize behavior\n // We found a problem that when paste an image with \"border:none\" then the resize border will be\n // displayed incorrectly when resize it. So we need to drop this style\n chainSanitizerCallback(\n sanitizingOption.cssStyleCallbacks,\n 'border',\n (value, element) => element.tagName != 'IMG' || value != 'none'\n );\n\n fragment\n .querySelectorAll(TABLE_TEMP_ELEMENTS_QUERY)\n .forEach(node => node.parentElement?.removeChild(node));\n}\n","import ListItemBlock, { createListItemBlock } from './ListItemBlock';\n\nimport {\n splitParentNode,\n getNextLeafSibling,\n getFirstLeafNode,\n getTagOfNode,\n collapseNodes,\n unwrap,\n toArray,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\nconst WORD_ONLINE_IDENTIFYING_SELECTOR =\n 'div.ListContainerWrapper>ul[class^=\"BulletListStyle\"],div.ListContainerWrapper>ol[class^=\"NumberListStyle\"],span.WACImageContainer > img';\nconst LIST_CONTAINER_ELEMENT_CLASS_NAME = 'ListContainerWrapper';\nconst IMAGE_CONTAINER_ELEMENT_CLASS_NAME = 'WACImageContainer';\n\n//When the list style is a symbol and the value is not in the clipboard, WordOnline\nconst VALID_LIST_STYLE_CHAR_CODES = [\n '111', //'o'\n '9643', //'▫'\n '9830', //'♦'\n];\n\n/**\n * @internal\n */\nexport function isWordOnlineWithList(fragment: DocumentFragment): boolean {\n return !!(fragment && fragment.querySelector(WORD_ONLINE_IDENTIFYING_SELECTOR));\n}\n\n// Word Online pasted content DOM structure as of July 12th 2019\n//\n// \n//
    ----------> this layer may exist depend on the content user paste\n//
    ----------> text content\n//

    \n//
    \n//
    ----------> list items: for unordered list, all the items on the same level is under the same wrapper\n//
      list items in the same list can be divided into different ListItemWrapper\n//
    • list items in the same list can also be divided into different Outline Group;\n//
    • \n//
    \n//
    \n//
    \n//
    \n//
    ----------> list items: for ordered list, each items has it's own wrapper\n//
      \n//
    1. \n//
    \n//
    \n//
    \n//
      \n//
    1. \n//
    \n//
    \n//
    \n// \n//\n//\n\n/**\n * @internal\n * Convert text copied from word online into text that's workable with rooster editor\n * @param fragment Document fragment that is being pasted into editor.\n */\nexport default function convertPastedContentFromWordOnline(fragment: DocumentFragment) {\n sanitizeListItemContainer(fragment);\n const listItemBlocks: ListItemBlock[] = getListItemBlocks(fragment);\n\n listItemBlocks.forEach(itemBlock => {\n // There are cases where consecutive List Elements are separated into different nodes:\n //
    \n //
    \n //
      \n //
      \n //
      \n //
        \n //
        \n //
        \n //
        \n //
        \n //
          \n //
          \n //
          \n // in the above case we want to collapse the two root level div into one and unwrap the list item nodes.\n // after the following flattening the list will become following:\n //\n //
          \n //
            \n //
            \n //
            \n //
              \n //
              \n //
              \n //
                \n //
                \n // Then we are start processing.\n flattenListBlock(fragment, itemBlock);\n\n // Find the node to insertBefore, which is next sibling node of the end of a listItemBlock.\n itemBlock.insertPositionNode = itemBlock.endElement?.nextSibling ?? null;\n\n let convertedListElement: Element | undefined = undefined;\n const doc = fragment.ownerDocument;\n\n itemBlock.listItemContainers.forEach(listItemContainer => {\n let listType: 'OL' | 'UL' | null = getContainerListType(listItemContainer); // list type that is contained by iterator.\n if (listType) {\n // Initialize processed element with proper listType if this is the first element\n if (!convertedListElement) {\n convertedListElement = createNewList(listItemContainer, doc, listType);\n }\n\n // Get all list items(
              1. ) in the current iterator element.\n const currentListItems = toArray(listItemContainer.querySelectorAll('li'));\n currentListItems.forEach(item => {\n // If item is in root level and the type of list changes then\n // insert the current list into body and then reinitialize the convertedListElement\n // Word Online is using data-aria-level to determine the the depth of the list item.\n const itemLevel = parseInt(item.getAttribute('data-aria-level') ?? '');\n // In first level list, there are cases where a consecutive list item DIV may have different list type\n // When that happens we need to insert the processed elements into the document, then change the list type\n // and keep the processing going.\n if (\n convertedListElement &&\n getTagOfNode(convertedListElement) != listType &&\n itemLevel == 1 &&\n listType\n ) {\n insertConvertedListToDoc(convertedListElement, fragment, itemBlock);\n convertedListElement = createNewList(listItemContainer, doc, listType);\n }\n if (convertedListElement && listType) {\n insertListItem(convertedListElement, item, listType, doc);\n }\n });\n }\n });\n if (convertedListElement) {\n insertConvertedListToDoc(convertedListElement, fragment, itemBlock);\n }\n\n // Once we finish the process the list items and put them into a list.\n // After inserting the processed element,\n // we need to remove all the non processed node from the parent node.\n const parentContainer = itemBlock.startElement?.parentNode;\n if (parentContainer) {\n itemBlock.listItemContainers.forEach(listItemContainer => {\n parentContainer.removeChild(listItemContainer);\n });\n }\n });\n\n const imageNodes = getImageNodes(fragment);\n imageNodes.forEach(node => {\n // Structure when pasting Word Wac Image as of 10/22/2021\n // \n // \n // \n // \n // \n //\n // Since the second span inside of WACImageContainer have style display block it displays an additional space at the bottom of the image.\n // Removing the nodes that are not img will resolve the additional space\n if (safeInstanceOf(node, 'HTMLSpanElement')) {\n node.childNodes.forEach(childNode => {\n if (getTagOfNode(childNode) != 'IMG') {\n childNode.parentElement?.removeChild(childNode);\n }\n });\n }\n });\n}\n\nfunction createNewList(listItemContainer: Element, doc: Document, tag: 'OL' | 'UL') {\n const newList = doc.createElement(tag);\n const startAttribute = listItemContainer.firstElementChild?.getAttribute('start');\n if (startAttribute) {\n newList.setAttribute('start', startAttribute);\n }\n return newList;\n}\n\n/**\n * The node processing is based on the premise of only ol/ul is in ListContainerWrapper class\n * However the html might be malformed, this function is to split all the other elements out of ListContainerWrapper\n * @param fragment pasted document that contains all the list element.\n */\nfunction sanitizeListItemContainer(fragment: DocumentFragment) {\n const listItemContainerListEl = toArray(\n fragment.querySelectorAll(WORD_ONLINE_IDENTIFYING_SELECTOR)\n );\n listItemContainerListEl.forEach(el => {\n const replaceRegex = new RegExp(`\\\\b${LIST_CONTAINER_ELEMENT_CLASS_NAME}\\\\b`, 'g');\n if (el.previousSibling) {\n const prevParent = splitParentNode(el, true) as HTMLElement;\n prevParent.className = prevParent.className.replace(replaceRegex, '');\n }\n if (el.nextSibling) {\n const nextParent = splitParentNode(el, false) as HTMLElement;\n nextParent.className = nextParent.className.replace(replaceRegex, '');\n }\n });\n}\n\n/**\n * Take all the list items in the document, and group the consecutive list times in a list block;\n * @param fragment pasted document that contains all the list element.\n */\nfunction getListItemBlocks(fragment: DocumentFragment): ListItemBlock[] {\n const listElements = fragment.querySelectorAll('.' + LIST_CONTAINER_ELEMENT_CLASS_NAME);\n const result: ListItemBlock[] = [];\n let curListItemBlock: ListItemBlock | null = null;\n for (let i = 0; i < listElements.length; i++) {\n let curItem = listElements[i];\n if (!curListItemBlock) {\n curListItemBlock = createListItemBlock(curItem);\n } else {\n const { listItemContainers } = curListItemBlock;\n const lastItemInCurBlock = listItemContainers[listItemContainers.length - 1];\n if (\n curItem == lastItemInCurBlock.nextSibling ||\n (lastItemInCurBlock.parentNode &&\n getFirstLeafNode(curItem) ==\n getNextLeafSibling(lastItemInCurBlock.parentNode, lastItemInCurBlock))\n ) {\n listItemContainers.push(curItem);\n curListItemBlock.endElement = curItem;\n } else {\n curListItemBlock.endElement = lastItemInCurBlock;\n result.push(curListItemBlock);\n curListItemBlock = createListItemBlock(curItem);\n }\n }\n }\n\n if (curListItemBlock && curListItemBlock.listItemContainers.length > 0) {\n result.push(curListItemBlock);\n }\n\n return result;\n}\n\n/**\n * Flatten the list items, so that all the consecutive list items are under the same parent.\n * @param fragment Root element of that contains the element.\n * @param listItemBlock The list item block needed to be flattened.\n */\nfunction flattenListBlock(fragment: DocumentFragment, listItemBlock: ListItemBlock) {\n if (listItemBlock.startElement && listItemBlock.endElement) {\n const collapsedListItemSections = collapseNodes(\n fragment,\n listItemBlock.startElement,\n listItemBlock.endElement,\n true\n );\n collapsedListItemSections.forEach(section => {\n if (getTagOfNode(section.firstChild) == 'DIV') {\n unwrap(section);\n }\n });\n }\n}\n\n/**\n * Get the list type that the container contains. If there is no list in the container\n * return null;\n * @param listItemContainer Container that contains a list\n */\nfunction getContainerListType(listItemContainer: Element): 'OL' | 'UL' | null {\n const tag = getTagOfNode(listItemContainer.firstChild);\n return tag == 'UL' || tag == 'OL' ? tag : null;\n}\n\n/**\n * Insert list item into the correct position of a list\n * @param listRootElement Root element of the list that is accepting a coming element.\n * @param itemToInsert List item that needed to be inserted.\n * @param listType Type of list(ul/ol)\n */\nfunction insertListItem(\n listRootElement: Element,\n itemToInsert: HTMLElement,\n listType: 'UL' | 'OL',\n doc: HTMLDocument\n): void {\n if (!listType) {\n return;\n }\n // Get item level from 'data-aria-level' attribute\n let itemLevel = parseInt(itemToInsert.getAttribute('data-aria-level') ?? '');\n\n // Try to reuse the List Marker\n let style = itemToInsert.getAttribute('data-leveltext');\n if (\n listType == 'UL' &&\n style &&\n VALID_LIST_STYLE_CHAR_CODES.indexOf(style.charCodeAt(0).toString()) > -1\n ) {\n itemToInsert.style.listStyleType = `\"${style} \"`;\n }\n\n let curListLevel = listRootElement; // Level iterator to find the correct place for the current element.\n // if the itemLevel is 1 it means the level iterator is at the correct place.\n while (itemLevel > 1) {\n if (!curListLevel.firstChild) {\n // If the current level is empty, create empty list within the current level\n // then move the level iterator into the next level.\n curListLevel.appendChild(doc.createElement(listType));\n if (curListLevel.firstElementChild) {\n curListLevel = curListLevel.firstElementChild;\n }\n } else {\n // If the current level is not empty, the last item in the needs to be a UL or OL\n // and the level iterator should move to the UL/OL at the last position.\n let lastChild = curListLevel.lastElementChild;\n let lastChildTag = getTagOfNode(lastChild);\n if (lastChild && (lastChildTag == 'UL' || lastChildTag == 'OL')) {\n // If the last child is a list(UL/OL), then move the level iterator to last child.\n curListLevel = lastChild;\n } else {\n // If the last child is not a list, then append a new list to the level\n // and move the level iterator to the new level.\n curListLevel.appendChild(doc.createElement(listType));\n if (curListLevel.lastElementChild) {\n curListLevel = curListLevel.lastElementChild;\n }\n }\n }\n itemLevel--;\n }\n\n // Once the level iterator is at the right place, then append the list item in the level.\n curListLevel.appendChild(itemToInsert);\n}\n\n/**\n * Insert the converted list item into the correct place.\n * @param convertedListElement List element that is converted from list item block\n * @param fragment Root element of that contains the converted listItemBlock\n * @param listItemBlock List item block that was converted.\n */\nfunction insertConvertedListToDoc(\n convertedListElement: Element,\n fragment: DocumentFragment,\n listItemBlock: ListItemBlock\n) {\n if (!convertedListElement) {\n return;\n }\n\n const { insertPositionNode } = listItemBlock;\n if (insertPositionNode) {\n const parentNode = insertPositionNode.parentNode;\n if (parentNode) {\n parentNode.insertBefore(convertedListElement, insertPositionNode);\n }\n } else {\n const parentNode = listItemBlock.startElement?.parentNode;\n if (parentNode) {\n parentNode.appendChild(convertedListElement);\n } else {\n fragment.appendChild(convertedListElement);\n }\n }\n}\n\nfunction getImageNodes(fragment: DocumentFragment) {\n return fragment.querySelectorAll('.' + IMAGE_CONTAINER_ELEMENT_CLASS_NAME);\n}\n","import { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\nimport { moveChildNodes } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Convert pasted content from PowerPoint\n * @param event The BeforePaste event\n */\nexport default function convertPastedContentFromPowerPoint(\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { fragment, clipboardData } = event;\n\n if (clipboardData.html && !clipboardData.text && clipboardData.image) {\n // It is possible that PowerPoint copied both image and HTML but not plain text.\n // We always prefer HTML if any.\n const doc = new DOMParser().parseFromString(\n trustedHTMLHandler(clipboardData.html),\n 'text/html'\n );\n\n moveChildNodes(fragment, doc?.body);\n }\n}\n","/**\n * @internal\n * List of deprecated colors that should be removed\n */\n\nexport const DeprecatedColorList: string[] = [\n 'activeborder',\n 'activecaption',\n 'appworkspace',\n 'background',\n 'buttonhighlight',\n 'buttonshadow',\n 'captiontext',\n 'inactiveborder',\n 'inactivecaption',\n 'inactivecaptiontext',\n 'infobackground',\n 'infotext',\n 'menu',\n 'menutext',\n 'scrollbar',\n 'threeddarkshadow',\n 'threedface',\n 'threedhighlight',\n 'threedlightshadow',\n 'threedfhadow',\n 'window',\n 'windowframe',\n 'windowtext',\n];\n","import { chainSanitizerCallback } from 'roosterjs-editor-dom';\nimport { DeprecatedColorList } from './deprecatedColorList';\nimport { HtmlSanitizerOptions } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Remove the deprecated colors from pasted content\n * @param sanitizingOption the sanitizingOption of BeforePasteEvent\n * */\nexport default function sanitizeHtmlColorsFromPastedContent(\n sanitizingOption: Required\n) {\n ['color', 'background-color'].forEach(property => {\n chainSanitizerCallback(\n sanitizingOption.cssStyleCallbacks,\n property,\n (value: string) => DeprecatedColorList.indexOf(value) < 0\n );\n });\n}\n","import { chainSanitizerCallback } from 'roosterjs-editor-dom';\nimport { HtmlSanitizerOptions } from 'roosterjs-editor-types';\n\nconst SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];\n\n/**\n * @internal\n * Clear local paths and remove link\n * @param sanitizingOption the sanitizingOption of BeforePasteEvent\n * */\nexport default function sanitizeLinks(sanitizingOption: Required) {\n chainSanitizerCallback(\n sanitizingOption.attributeCallbacks,\n 'href',\n (value: string, element: HTMLElement) => validateLink(value, element)\n );\n}\n\nfunction validateLink(link: string, htmlElement: HTMLElement) {\n let url;\n try {\n url = new URL(link);\n } catch {\n url = undefined;\n }\n\n /* whitelist supported protocols */\n if (url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) > -1) {\n return link;\n }\n htmlElement.removeAttribute('href');\n return '';\n}\n","import ListMetadata from './ListMetadata';\n\n/**\n * @internal\n * Holds the ids for the lists already seen for a specified level\n */\nexport default interface LevelLists {\n /**\n * The metadata for the lists seen at this level\n * key: word list id, value: list metadata\n */\n listsMetadata: { [key: string]: ListMetadata };\n\n /** Unique id of the list currently at this level */\n currentUniqueListId: number;\n}\n\n/**\n * @internal\n * create an empty LevelLists\n */\nexport function createLevelLists(): LevelLists {\n return {\n listsMetadata: {},\n currentUniqueListId: -1,\n };\n}\n","import LevelLists, { createLevelLists } from './LevelLists';\nimport ListItemMetadata from './ListItemMetadata';\nimport ListMetadata from './ListMetadata';\n\n/**\n * @internal\n * Contains the state of the WordConverter when called back after yielding\n */\nexport default interface WordConverterArguments {\n /** The list of element nodes being processed */\n nodes: NodeListOf;\n\n /** The index of the element currently being processed */\n currentIndex: number;\n\n /**\n * Holds the metadata for all the lists we have found\n * key: unique list id, value: list metadata\n */\n lists: { [key: string]: ListMetadata };\n\n /**\n * Stores the list item meta data of the items we\n * have found that need to be converted\n */\n listItems: ListItemMetadata[];\n\n /**\n * This array holds the list id of the lists we are processing\n * that are next to each other.. This list will be used to determine\n * if list items are next to each other or if they are separated...\n * Separated items are ignored from the conversion\n */\n\n currentListIdsByLevels: LevelLists[];\n\n /** Remembers the item that was last processed */\n lastProcessedItem: HTMLElement | null;\n}\n\n/**\n * @internal\n * create an empty WordConverterArguments\n */\nexport function createWordConverterArguments(\n nodes: NodeListOf\n): WordConverterArguments {\n return {\n nodes: nodes,\n currentIndex: 0,\n lists: {},\n listItems: [],\n currentListIdsByLevels: [createLevelLists()],\n lastProcessedItem: null,\n };\n}\n","import { NodeType } from 'roosterjs-editor-types';\n\n/** NodeId attribute */\nconst NODE_ID_ATTRIBUTE_NAME = 'NodeId';\n\n/**\n * @internal\n * Custom data for dom elements\n */\nexport default interface WordCustomData {\n /** The dict storing custom data, key is element Id, value is dictionary */\n dict: { [key: string]: { [key: string]: number } };\n\n /** Next node Id to use */\n nextNodeId: number;\n}\n\n/**\n * @internal\n * Create an empty WordCustomData\n */\nexport function createCustomData(): WordCustomData {\n return {\n dict: {},\n nextNodeId: 1,\n };\n}\n\n/**\n * @internal\n * Sets the specified object data\n */\nexport function setObject(wordCustomData: WordCustomData, element: Node, key: string, value: any) {\n // Get the id for the element\n if (element.nodeType == NodeType.Element) {\n let id = getAndSetNodeId(wordCustomData, element as HTMLElement);\n if (id != '') {\n // Get the values for the element\n if (!wordCustomData.dict[id]) {\n // First time dictionary creation\n wordCustomData.dict[id] = {};\n }\n wordCustomData.dict[id][key] = value;\n }\n }\n}\n\n/**\n * @internal\n * Reads the specified object data\n */\nexport function getObject(wordCustomData: WordCustomData, element: Node, key: string): any {\n if (element.nodeType == NodeType.Element) {\n let id = getAndSetNodeId(wordCustomData, element as HTMLElement);\n if (id != '') {\n return wordCustomData.dict[id] && wordCustomData.dict[id][key];\n }\n }\n\n return null;\n}\n\n/**\n * Get the unique id for the specified node...\n */\nfunction getAndSetNodeId(wordCustomData: WordCustomData, element: HTMLElement): string {\n let id = element.getAttribute(NODE_ID_ATTRIBUTE_NAME);\n if (!id) {\n id = wordCustomData.nextNodeId.toString();\n wordCustomData.nextNodeId++;\n element.setAttribute(NODE_ID_ATTRIBUTE_NAME, id);\n }\n return id;\n}\n","import { CssStyleCallbackMap, ElementCallbackMap } from 'roosterjs-editor-types';\nimport {\n chainSanitizerCallback,\n getStyles,\n moveChildNodes,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\nconst MSO_COMMENT_PARENT = 'mso-comment-parent';\nconst MSO_COMMENT_REFERENCE = 'mso-comment-reference';\nconst MSO_COMMENT_DATE = 'mso-comment-date';\nconst MSO_COMMENT_ANCHOR_HREF_REGEX = /#_msocom_/;\nconst MSO_SPECIAL_CHARACTER = 'mso-special-character';\nconst MSO_SPECIAL_CHARACTER_COMMENT = 'comment';\nconst MSO_COMMENT_CONTINUATION = 'mso-comment-continuation';\nconst MSO_ELEMENT = 'mso-element';\nconst MSO_ELEMENT_COMMENT_LIST = 'comment-list';\nconst MSO_COMMENT_DONE = 'mso-comment-done';\n\n/**\n * @internal\n * Removes comments when pasting Word content.\n */\nexport default function commentsRemoval(\n elementCallbacks: ElementCallbackMap,\n styleCallbacks: CssStyleCallbackMap\n) {\n // 1st Step, Remove SPAN elements added after each comment.\n // Word adds multiple elements for comments as SPAN elements.\n // In this step we remove these elements:\n // Structure as of 4/18/2022\n // 1.  \n // 2. \n // \n // \n // [RS2]\n //  \n // \n // \n // \n chainSanitizerCallback(elementCallbacks, 'SPAN', element => {\n const styles = getStyles(element);\n if (styles[MSO_SPECIAL_CHARACTER] == MSO_SPECIAL_CHARACTER_COMMENT) {\n element.parentElement?.removeChild(element);\n }\n return true;\n });\n\n // 2nd Step, Modify Anchor elements.\n // 1. When the element was selected to add a comment in Word, the selection is converted to\n // an anchor element, so we change the tag to span.\n // 2. Word also adds some Anchor elements with the following structure:\n // Structure as of 4/18/2022\n // [SS3]\n // In this step we remove this Anchor elements.\n chainSanitizerCallback(elementCallbacks, 'A', element => {\n if (\n safeInstanceOf(element, 'HTMLAnchorElement') &&\n MSO_COMMENT_ANCHOR_HREF_REGEX.test(element.href)\n ) {\n element.parentElement?.removeChild(element);\n }\n return true;\n });\n\n // 3rd Step, remove List of comments.\n // When the document have a long thread of comments, these comments are appended\n // at the end of the copied fragment, we also need to remove it.\n // Structure as of 4/18/2022\n //\n //
                \n //
                \n //
                ...
                \n //
                ...
                \n //
                ...
                \n //
                \n // \n chainSanitizerCallback(elementCallbacks, 'DIV', element => {\n const styles = getStyles(element);\n if (styles[MSO_ELEMENT] == MSO_ELEMENT_COMMENT_LIST) {\n moveChildNodes(element);\n }\n return true;\n });\n\n /**\n * Remove styles related to Office Comments that can cause unwanted behaviors\n * depending on the user client\n */\n [\n MSO_COMMENT_REFERENCE,\n MSO_COMMENT_DATE,\n MSO_COMMENT_PARENT,\n MSO_COMMENT_CONTINUATION,\n MSO_COMMENT_DONE,\n ].forEach(style => chainSanitizerCallback(styleCallbacks, style, () => false));\n}\n","import commentsRemoval from './commentsRemoval';\nimport { BeforePasteEvent } from 'roosterjs-editor-types';\nimport { chainSanitizerCallback, moveChildNodes } from 'roosterjs-editor-dom';\nimport { createWordConverter } from './wordConverter';\nimport { createWordConverterArguments } from './WordConverterArguments';\nimport { processNodeConvert, processNodesDiscovery } from './converterUtils';\n\nconst PERCENTAGE_REGEX = /%/;\nconst DEFAULT_BROWSER_LINE_HEIGHT_PERCENTAGE = 120;\nconst LIST_ELEMENTS_SELECTOR = 'p,h1,h2,h3,h4,h5,h6';\n\n/**\n * @internal\n * Converts all the Word generated list items in the specified node into standard HTML UL and OL tags\n */\nexport default function convertPastedContentFromWord(event: BeforePasteEvent) {\n const { sanitizingOption, fragment } = event;\n\n // Preserve when its innerHTML is \" \" to avoid dropping an empty line\n chainSanitizerCallback(sanitizingOption.elementCallbacks, 'O:P', element => {\n moveChildNodes(element);\n element.appendChild(element.ownerDocument.createTextNode('\\u00A0')); //  \n return true;\n });\n\n let wordConverter = createWordConverter();\n\n // First find all the nodes that we need to check for list item information\n // This call will return all the p and header elements under the root node.. These are the elements that\n // Word uses a list items, so we'll only process them and avoid walking the whole tree.\n let elements = fragment.querySelectorAll(LIST_ELEMENTS_SELECTOR) as NodeListOf;\n if (elements.length > 0) {\n wordConverter.wordConverterArgs = createWordConverterArguments(elements);\n if (processNodesDiscovery(wordConverter)) {\n processNodeConvert(wordConverter);\n }\n }\n\n // If the List style contains marginBottom = 0in, the space after the list is going to be too narrow.\n // Remove this style so the list displays correctly.\n ['OL', 'UL'].forEach(tag => {\n chainSanitizerCallback(sanitizingOption.elementCallbacks, tag, element => {\n if (element.style.marginBottom == '0in') {\n element.style.marginBottom = '';\n }\n\n return true;\n });\n });\n\n //If the line height is less than the browser default line height, line between the text is going to be too narrow\n chainSanitizerCallback(sanitizingOption.cssStyleCallbacks, 'line-height', (value: string) => {\n let parsedLineHeight: number;\n if (\n PERCENTAGE_REGEX.test(value) &&\n !isNaN((parsedLineHeight = parseInt(value))) &&\n parsedLineHeight < DEFAULT_BROWSER_LINE_HEIGHT_PERCENTAGE\n ) {\n return false;\n }\n return true;\n });\n\n commentsRemoval(sanitizingOption.elementCallbacks, sanitizingOption.cssStyleCallbacks);\n}\n","import ListItemMetadata from './ListItemMetadata';\nimport ListMetadata from './ListMetadata';\nimport WordConverter from './wordConverter';\nimport WordConverterArguments from './WordConverterArguments';\nimport { createLevelLists } from './LevelLists';\nimport { getObject, setObject } from './WordCustomData';\nimport { getStyles, getTagOfNode, moveChildNodes } from 'roosterjs-editor-dom';\nimport { NodeType } from 'roosterjs-editor-types';\n\n/** Word list metadata style name */\nconst LOOKUP_DEPTH = 5;\n\n/** Name for the word list id property in the custom data */\nconst UNIQUE_LIST_ID_CUSTOM_DATA = 'UniqueListId';\n\n/** Word list metadata style name */\nconst MSO_LIST_STYLE_NAME = 'mso-list';\n\n/** Regular expression to match line breaks */\nconst LINE_BREAKS = /[\\n|\\r]/gi;\n\n/**\n * @internal\n * Handles the pass 1: Discovery\n * During discovery, we'll parse the metadata out of the elements and store it in the list items dictionary.\n * We'll detect cases where the list items for a particular ordered list are not next to each other. Word does these\n * for numbered headers, and we don't want to convert those, because the numbering would be completely wrong.\n */\nexport function processNodesDiscovery(wordConverter: WordConverter): boolean {\n let args = wordConverter.wordConverterArgs;\n if (!args) {\n return false;\n }\n while (args.currentIndex < args.nodes.length) {\n let node = args.nodes.item(args.currentIndex);\n\n // Try to get the list metadata for the specified node\n let itemMetadata = getListItemMetadata(node);\n if (itemMetadata) {\n let levelInfo =\n args.currentListIdsByLevels[itemMetadata.level - 1] || createLevelLists();\n args.currentListIdsByLevels[itemMetadata.level - 1] = levelInfo;\n\n // We need to drop some list information if this is not an item next to another\n if (args.lastProcessedItem && getRealPreviousSibling(node) != args.lastProcessedItem) {\n // This list item is not next to the previous one. This means that there is some content in between them\n // so we need to reset our list of list ids per level\n resetCurrentLists(args);\n }\n\n // Get the list metadata for the list that will hold this item\n let listMetadata = levelInfo.listsMetadata[itemMetadata.wordListId];\n if (!listMetadata) {\n // Get the first item fake bullet.. This will be used later to check what is the right type of list\n let firstFakeBullet = getFakeBulletText(node, LOOKUP_DEPTH);\n\n // This is a the first item of a list.. We'll create the list metadata using the information\n // we already have from this first item\n listMetadata = {\n numberOfItems: 0,\n uniqueListId: wordConverter.nextUniqueId++,\n firstFakeBullet: firstFakeBullet,\n\n // If the bullet we got is empty or not found, we ignore the list out.. this means\n // that this is not an item we need to convert of that the format doesn't match what\n // we are expecting\n ignore: !firstFakeBullet || firstFakeBullet.length == 0,\n\n // We'll use the first fake bullet to try to figure out which type of list we create. If this list has a second\n // item, we'll perform a better comparison, but for one item lists, this will be check that will determine the list type\n tagName: getFakeBulletTagName(firstFakeBullet),\n };\n levelInfo.listsMetadata[itemMetadata.wordListId] = listMetadata;\n args.lists[listMetadata.uniqueListId.toString()] = listMetadata;\n } else if (!listMetadata.ignore && listMetadata.numberOfItems == 1) {\n // This is the second item we've seen for this list.. we'll compare the 2 fake bullet\n // items we have an decide if we create ordered or unordered lists based on this.\n // This is the best way we can do this since we cannot read the metadata that Word\n // puts in the head of the HTML...\n let secondFakeBullet = getFakeBulletText(node, LOOKUP_DEPTH);\n listMetadata.tagName =\n listMetadata.firstFakeBullet == secondFakeBullet ? 'UL' : 'OL';\n }\n\n // Set the unique id to the list\n itemMetadata.uniqueListId = listMetadata.uniqueListId;\n\n // Check if we need to ignore this list... we'll either know already that we need to ignore\n // it, or we'll know it because the previous list items are not next to this one\n if (\n listMetadata.ignore ||\n (listMetadata.tagName == 'OL' &&\n listMetadata.numberOfItems > 0 &&\n levelInfo.currentUniqueListId != itemMetadata.uniqueListId)\n ) {\n // We need to ignore this item... and we also need to forget about the lists that\n // are not at the root level\n listMetadata.ignore = true;\n args.currentListIdsByLevels[0].currentUniqueListId = -1;\n args.currentListIdsByLevels = args.currentListIdsByLevels.slice(0, 1);\n } else {\n // This is an item we don't need to ignore... If added lists deep under this one before\n // we'll drop their ids from the list of ids per level.. this is because this list item\n // breaks the deeper lists.\n if (args.currentListIdsByLevels.length > itemMetadata.level) {\n args.currentListIdsByLevels = args.currentListIdsByLevels.slice(\n 0,\n itemMetadata.level\n );\n }\n\n levelInfo.currentUniqueListId = itemMetadata.uniqueListId;\n\n // Add the list item into the list of items to be processed\n args.listItems.push(itemMetadata);\n listMetadata.numberOfItems++;\n }\n\n args.lastProcessedItem = node;\n } else {\n // Here, we know that this is not a list item, but we'll want to check if it is one \"no bullet\" list items...\n // these can be created by creating a bullet and hitting delete on it it... The content will continue to be indented, but there will\n // be no bullet and the list will continue correctly after that. Visually, it looks like the previous item has multiple lines, but\n // the HTML generated has multiple paragraphs with the same class. We'll merge these when we find them, so the logic doesn't skips\n // the list conversion thinking that the list items are not together...\n let last = args.lastProcessedItem;\n if (\n last &&\n getRealPreviousSibling(node) == last &&\n node.tagName == last.tagName &&\n node.className == last.className\n ) {\n // Add 2 line breaks and move all the nodes to the last item\n last.appendChild(last.ownerDocument.createElement('br'));\n last.appendChild(last.ownerDocument.createElement('br'));\n moveChildNodes(last, node, true /*keepExistingChildren*/);\n\n // Remove the item that we don't need anymore\n node.parentNode?.removeChild(node);\n }\n }\n\n // Move to the next element are return true if more elements need to be processed\n args.currentIndex++;\n }\n return args.listItems.length > 0;\n}\n\n/**\n * @internal\n * Handles the pass 2: Conversion\n * During conversion, we'll go over the elements that belong to a list that we've marked as a list to convert, and we'll perform the\n * conversion needed\n */\nexport function processNodeConvert(wordConverter: WordConverter): boolean {\n let args = wordConverter.wordConverterArgs;\n if (args) {\n args.currentIndex = 0;\n\n while (args.currentIndex < args.listItems.length) {\n let metadata = args.listItems[args.currentIndex];\n let node = metadata.originalNode;\n let listMetadata = args.lists[metadata.uniqueListId.toString()];\n if (!listMetadata.ignore) {\n // We have a list item that we need to convert, get or create the list\n // that hold this item out\n let list = getOrCreateListForNode(wordConverter, node, metadata, listMetadata);\n if (list) {\n // Clean the element out.. this call gets rid of the fake bullet and unneeded nodes\n cleanupListIgnore(node, LOOKUP_DEPTH);\n\n // Create a new list item and transfer the children\n let li = node.ownerDocument.createElement('LI');\n if (getTagOfNode(node).startsWith('H')) {\n const clone = node.cloneNode(true /* deep */) as HTMLHeadingElement;\n clone.style.textIndent = '';\n clone.style.marginLeft = '';\n clone.style.marginRight = '';\n li.appendChild(clone);\n } else {\n moveChildNodes(li, node);\n }\n\n // Append the list item into the list\n list.appendChild(li);\n\n // Remove the node we just converted\n node.parentNode?.removeChild(node);\n\n if (listMetadata.tagName == 'UL') {\n wordConverter.numBulletsConverted++;\n } else {\n wordConverter.numNumberedConverted++;\n }\n }\n }\n args.currentIndex++;\n }\n }\n return wordConverter.numBulletsConverted > 0 || wordConverter.numNumberedConverted > 0;\n}\n\n/**\n * Gets or creates the list (UL or OL) that holds this item out based on the\n * items content and the specified metadata\n */\nfunction getOrCreateListForNode(\n wordConverter: WordConverter,\n node: HTMLElement,\n metadata: ListItemMetadata,\n listMetadata: ListMetadata\n): Node {\n // First get the last list next to this node under the specified level. This code\n // path will return the list or will create lists if needed\n let list = recurringGetOrCreateListAtNode(node, metadata.level, listMetadata);\n\n // Here use the unique list ID to detect if we have the right list...\n // it is possible to have 2 different lists next to each other with different formats, so\n // we want to detect this an create separate lists for those cases\n let listId = getObject(wordConverter.wordCustomData, list, UNIQUE_LIST_ID_CUSTOM_DATA);\n\n // If we have a list with and ID, but the ID is different than the ID for this list item, this\n // is a completely new list, so we'll append a new list for that\n if ((listId && listId != metadata.uniqueListId) || (!listId && list.firstChild)) {\n let newList = node.ownerDocument.createElement(listMetadata.tagName);\n list.parentNode?.insertBefore(newList, list.nextSibling);\n list = newList;\n }\n\n // Set the list id into the custom data\n setObject(\n wordConverter.wordCustomData,\n list,\n UNIQUE_LIST_ID_CUSTOM_DATA,\n metadata.uniqueListId\n );\n\n // This call will convert the list if needed to the right type of list required. This can happen\n // on the cases where the first list item for this list is located after a deeper list. for that\n // case, we will have created a UL for it, and we may need to convert it\n return convertListIfNeeded(wordConverter, list, listMetadata);\n}\n\n/**\n * Converts the list between UL and OL if needed, by using the fake bullet and\n * information already stored in the list itself\n */\nfunction convertListIfNeeded(\n wordConverter: WordConverter,\n list: Node,\n listMetadata: ListMetadata\n): Node {\n // Check if we need to convert the list out\n if (listMetadata.tagName != getTagOfNode(list)) {\n // We have the wrong list type.. convert it, set the id again and transfer all the children\n let newList = list.ownerDocument?.createElement(listMetadata.tagName);\n if (newList) {\n setObject(\n wordConverter.wordCustomData,\n newList,\n UNIQUE_LIST_ID_CUSTOM_DATA,\n getObject(wordConverter.wordCustomData, list, UNIQUE_LIST_ID_CUSTOM_DATA)\n );\n moveChildNodes(newList, list);\n\n list.parentNode?.insertBefore(newList, list);\n list.parentNode?.removeChild(list);\n list = newList;\n }\n }\n\n return list;\n}\n\n/**\n * Gets or creates the specified list\n */\nfunction recurringGetOrCreateListAtNode(\n node: HTMLElement,\n level: number,\n listMetadata: ListMetadata | null\n): Node {\n let parent: Node | null = null;\n let possibleList: Node | null = null;\n if (level == 1) {\n // Root case, we'll check if the list is the previous sibling of the node\n possibleList = getRealPreviousSibling(node);\n } else {\n // If we get here, we are looking for level 2 or deeper... get the upper list\n // and check if the last element is a list\n parent = recurringGetOrCreateListAtNode(node, level - 1, null);\n if (parent.lastChild) {\n possibleList = parent.lastChild;\n }\n }\n\n // Check the element that we got and verify that it is a list\n if (possibleList && possibleList.nodeType == NodeType.Element) {\n let tag = getTagOfNode(possibleList);\n if (tag == 'UL' || tag == 'OL') {\n // We have a list.. use it\n return possibleList;\n }\n }\n\n // If we get here, it means we don't have a list and we need to create one\n // this code path will always create new lists as UL lists\n let newList = node.ownerDocument?.createElement(listMetadata ? listMetadata.tagName : 'UL');\n if (level == 1) {\n // For level 1, we'll insert the list before the node\n node.parentNode?.insertBefore(newList, node);\n } else {\n // Any level 2 or above, we insert the list as the last\n // child of the upper level list\n parent?.appendChild(newList);\n }\n\n return newList;\n}\n\n/**\n * Cleans up the node children by removing the children marked as mso-list: Ignore.\n * This nodes hold the fake bullet information that Word puts in and when\n * conversion is happening, we want to get rid of these elements\n */\nfunction cleanupListIgnore(node: Node, levels: number) {\n let nodesToRemove: Node[] = [];\n\n for (let child: Node | null = node.firstChild; child; child = child.nextSibling) {\n if (child) {\n // Clean up the item internally first if we need to based on the number of levels\n if (child && child.nodeType == NodeType.Element && levels > 1) {\n cleanupListIgnore(child, levels - 1);\n }\n\n // Try to convert word comments into ignore elements if we haven't done so for this element\n child = fixWordListComments(child, true /*removeComments*/);\n\n // Check if we can remove this item out\n if (isEmptySpan(child) || isIgnoreNode(child)) {\n nodesToRemove.push(child);\n }\n }\n }\n\n nodesToRemove.forEach(child => node.removeChild(child));\n}\n\n/**\n * Reads the word list meta dada out of the specified node. If the node\n * is not a Word list item, it returns null.\n */\nfunction getListItemMetadata(node: HTMLElement): ListItemMetadata | null {\n if (node.nodeType == NodeType.Element) {\n let listAttribute = getStyleValue(node, MSO_LIST_STYLE_NAME);\n if (listAttribute && listAttribute.length > 0) {\n try {\n // Word mso-list property holds 3 space separated values in the following format: lst1 level1 lfo0\n // Where:\n // (0) List identified for the metadata in the <head> of the document. We cannot read the <head> meta data\n // (1) Level of the list. This also maps to the <head> metadata that we cannot read, but\n // for almost all cases, it maps to the list indentation (or level). We'll use it as the\n // list indentation value\n // (2) Contains a specific list identifier.\n // Example value: \"l0 level1 lfo1\"\n let listProps = listAttribute.split(' ');\n if (listProps.length == 3) {\n return {\n level: parseInt(listProps[1].substr('level'.length)),\n wordListId: listAttribute,\n originalNode: node,\n uniqueListId: 0,\n };\n }\n } catch (e) {}\n }\n }\n return null;\n}\n\nfunction isFakeBullet(fakeBullet: string): boolean {\n return ['o', '·', '§', '-'].indexOf(fakeBullet) >= 0;\n}\n\n/** Given a fake bullet text, returns the type of list that should be used for it */\nfunction getFakeBulletTagName(fakeBullet: string): string {\n return isFakeBullet(fakeBullet) ? 'UL' : 'OL';\n}\n\n/**\n * Finds the fake bullet text out of the specified node and returns it. For images, it will return\n * a bullet string. If not found, it returns null...\n */\nfunction getFakeBulletText(node: Node, levels: number): string {\n // Word uses the following format for their bullets:\n // <p style=\"mso-list:l1 level1 lfo2\">\n // <span style=\"...\">\n // <span style=\"mso-list:Ignore\">1.<span style=\"...\">      </span></span>\n // </span>\n // Content here...\n // </p>\n //\n // Basically, we need to locate the mso-list:Ignore SPAN, which holds either one text or image node. That\n // text or image node will be the fake bullet we are looking for\n let result: string = '';\n let child: Node | null = node.firstChild;\n while (!result && child) {\n // First, check if we need to convert the Word list comments into real elements\n child = fixWordListComments(child, true /*removeComments*/);\n\n // Check if this is the node that holds the fake bullets (mso-list: Ignore)\n if (isIgnoreNode(child)) {\n // Yes... this is the node that holds either the text or image data\n result = child.textContent?.trim() ?? '';\n\n // This is the case for image case\n if (result.length == 0) {\n result = 'o';\n }\n } else if (child.nodeType == NodeType.Element && levels > 1) {\n // If this is an element and we are not in the last level, try to get the fake bullet\n // out of the child\n result = getFakeBulletText(child, levels - 1);\n }\n\n child = child.nextSibling;\n }\n\n return result;\n}\n\n/**\n * If the specified element is a Word List comments, this code verifies and fixes\n * the markup when needed to ensure that Chrome bullet conversions work as expected\n * -----\n * We'll convert <!--[if !supportLists]--> and <!--[endif]--> comments into\n * <span style=\"mso-list:Ignore\"></span>... Chrome has a bug where it drops the\n * styles of the span, but we'll use these comments to recreate them out\n */\nfunction fixWordListComments(child: Node, removeComments: boolean): Node {\n if (child.nodeType == NodeType.Comment) {\n let value = (child as Comment).data;\n if (value && value.trim().toLowerCase() == '[if !supportlists]') {\n // We have a list ignore start, find the end.. We know is not more than\n // 3 nodes away, so we'll optimize our checks\n let nextElement: Node | null = child;\n let endComment: Node | null = null;\n for (let j = 0; j < 4; j++) {\n nextElement = getRealNextSibling(nextElement);\n if (!nextElement) {\n break;\n }\n if (nextElement.nodeType == NodeType.Comment) {\n value = (nextElement as Comment).data;\n if (value && value.trim().toLowerCase() == '[endif]') {\n endComment = nextElement;\n break;\n }\n }\n }\n\n // if we found the end node, wrap everything out\n if (endComment) {\n let newSpan = child.ownerDocument?.createElement('span');\n newSpan?.setAttribute('style', 'mso-list: ignore');\n\n nextElement = getRealNextSibling(child);\n while (nextElement != endComment) {\n nextElement = nextElement?.nextSibling as HTMLElement;\n if (nextElement.previousSibling) {\n newSpan?.appendChild(nextElement.previousSibling);\n }\n }\n\n // Insert the element out and use that one as the current child\n if (newSpan) {\n endComment.parentNode?.insertBefore(newSpan, endComment);\n }\n\n // Remove the comments out if the call specified it out\n if (removeComments) {\n child.parentNode?.removeChild(child);\n endComment.parentNode?.removeChild(endComment);\n }\n\n // Last, make sure we return the new element out instead of the comment\n if (newSpan) {\n child = newSpan;\n }\n }\n }\n }\n\n return child;\n}\n\n/** Finds the real previous sibling, ignoring empty text nodes */\nfunction getRealPreviousSibling(node: Node): Node | null {\n let prevSibling: Node | null = node;\n do {\n prevSibling = prevSibling.previousSibling;\n } while (prevSibling && isEmptyTextNode(prevSibling));\n return prevSibling;\n}\n\n/** Finds the real next sibling, ignoring empty text nodes */\nfunction getRealNextSibling(node: Node): Node | null {\n let nextSibling: Node | null = node;\n do {\n nextSibling = nextSibling.nextSibling;\n } while (nextSibling && isEmptyTextNode(nextSibling));\n\n return nextSibling;\n}\n\n/**\n * Checks if the specified node is marked as a mso-list: Ignore. These\n * nodes need to be ignored when a list item is converted into standard\n * HTML lists\n */\nfunction isIgnoreNode(node: Node): boolean {\n if (node.nodeType == NodeType.Element) {\n let listAttribute = getStyleValue(node as HTMLElement, MSO_LIST_STYLE_NAME);\n if (\n listAttribute &&\n listAttribute.length > 0 &&\n listAttribute.trim().toLowerCase() == 'ignore'\n ) {\n return true;\n }\n }\n\n return false;\n}\n\n/** Checks if the specified node is an empty span. */\nfunction isEmptySpan(node: Node): boolean {\n return getTagOfNode(node) == 'SPAN' && !node.firstChild;\n}\n\n/** Reads the specified style value from the node */\nfunction getStyleValue(node: HTMLElement, styleName: string): string | null {\n // Word uses non-standard names for the metadata that puts in the style of the element...\n // Most browsers will not provide the information for those nonstandard values through the node.style\n // property, so the only reliable way to read them is to get the attribute directly and do\n // the required parsing..\n return getStyles(node)[styleName] || null;\n}\n\n/** Checks if the node is an empty text node that can be ignored */\nfunction isEmptyTextNode(node: Node): boolean {\n // No node is empty\n if (!node) {\n return true;\n }\n\n // Empty text node is empty\n if (node.nodeType == NodeType.Text) {\n let value = node.nodeValue;\n value = value?.replace(LINE_BREAKS, '') ?? '';\n return value?.trim().length == 0;\n }\n\n // Span or Font with an empty child node is empty\n let tagName = getTagOfNode(node);\n if (\n node.firstChild &&\n node.firstChild == node.lastChild &&\n (tagName == 'SPAN' || tagName == 'FONT')\n ) {\n return isEmptyTextNode(node.firstChild);\n }\n\n // If not found, then this is not empty\n return false;\n}\n\n/** Resets the list */\nfunction resetCurrentLists(args: WordConverterArguments) {\n for (let i = 0; i < args.currentListIdsByLevels.length; i++) {\n let ll = args.currentListIdsByLevels[i];\n if (ll) {\n ll.currentUniqueListId = -1;\n }\n }\n}\n","import WordConverterArguments from './WordConverterArguments';\nimport WordCustomData, { createCustomData } from './WordCustomData';\n\n/**\n * @internal\n * Processes HTML generated by Word, converting Word Lists into standard HTML UL and OL tags\n */\nexport default interface WordConverter {\n /** Next unique id to be assigned to a list */\n nextUniqueId: number;\n\n /** Number of bullets converted */\n numBulletsConverted: number;\n\n /** Number of numbering converted */\n numNumberedConverted: number;\n\n /** The structure that records the status of the conversion */\n wordConverterArgs: WordConverterArguments | null;\n\n /** Custom data storage for list items */\n wordCustomData: WordCustomData;\n}\n\n/**\n * @internal\n * create an empty WordConverter\n */\nexport function createWordConverter(): WordConverter {\n return {\n nextUniqueId: 1,\n numBulletsConverted: 0,\n numNumberedConverted: 0,\n wordConverterArgs: null,\n wordCustomData: createCustomData(),\n };\n}\n","import { replaceWithNode } from 'roosterjs-editor-api';\nimport {\n Browser,\n createRange,\n isCharacterValue,\n isModifierKey,\n PartialInlineElement,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n EditorPlugin,\n IEditor,\n NodePosition,\n PickerDataProvider,\n PickerPluginOptions,\n PluginDomEvent,\n PluginEvent,\n PluginEventType,\n PluginInputEvent,\n PluginKeyboardEvent,\n PositionType,\n} from 'roosterjs-editor-types';\n\n// Character codes.\n// IE11 uses different character codes. which are noted below.\n// If adding a new key, test in IE to figure out what the code is.\nconst BACKSPACE_CHAR_CODE = 'Backspace';\nconst TAB_CHAR_CODE = 'Tab';\nconst ENTER_CHAR_CODE = 'Enter';\nconst ESC_CHAR_CODE = !Browser.isIE ? 'Escape' : 'Esc';\nconst LEFT_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowLeft' : 'Left';\nconst UP_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowUp' : 'Up';\nconst RIGHT_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowRight' : 'Right';\nconst DOWN_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowDown' : 'Down';\nconst DELETE_CHAR_CODE = !Browser.isIE ? 'Delete' : 'Del';\n\n// Input event input types.\nconst DELETE_CONTENT_BACKWARDS_INPUT_TYPE = 'deleteContentBackwards';\n\n// Unidentified key, the code for Android keyboard events.\nconst UNIDENTIFIED_KEY = 'Unidentified';\n// the char code for Android keyboard events on Webview below 51.\nconst UNIDENTIFIED_CODE = [0, 229];\n\n/**\n * PickerPlugin represents a plugin of editor which can handle picker related behaviors, including\n * - Show picker when special trigger key is pressed\n * - Hide picker\n * - Change selection in picker by Up/Down/Left/Right\n * - Apply selected item in picker\n *\n * PickerPlugin doesn't provide any UI, it just wraps related DOM events and invoke callback functions.\n */\nexport default class PickerPlugin\n implements EditorPlugin {\n private editor: IEditor | null = null;\n private eventHandledOnKeyDown: boolean = false;\n private blockSuggestions: boolean = false;\n private isSuggesting: boolean = false;\n private lastKnownRange: Range | null = null;\n\n // For detecting backspace in Android\n private isPendingInputEventHandling: boolean = false;\n private currentInputLength: number = 0;\n private newInputLength: number = 0;\n\n constructor(public readonly dataProvider: T, private pickerOptions: PickerPluginOptions) {}\n\n /**\n * Get a friendly name\n */\n getName() {\n return 'Picker';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n public initialize(editor: IEditor) {\n this.editor = editor;\n this.dataProvider.onInitalize(\n (htmlNode: Node) => {\n if (this.editor) {\n this.editor.focus();\n\n let wordToReplace = this.getWord(null);\n\n // Safari drops our focus out so we get an empty word to replace when we call getWord.\n // We fall back to using the lastKnownRange to try to get around this.\n if ((!wordToReplace || wordToReplace.length == 0) && this.lastKnownRange) {\n this.editor.select(this.lastKnownRange);\n wordToReplace = this.getWord(null);\n }\n\n let insertNode = () => {\n if (wordToReplace && this.editor) {\n replaceWithNode(\n this.editor,\n wordToReplace,\n htmlNode,\n true /* exactMatch */\n );\n } else {\n this.editor?.insertNode(htmlNode);\n }\n this.setIsSuggesting(false);\n };\n\n this.editor.addUndoSnapshot(\n insertNode,\n this.pickerOptions.changeSource,\n this.pickerOptions.handleAutoComplete\n );\n }\n },\n (isSuggesting: boolean) => {\n this.setIsSuggesting(isSuggesting);\n },\n editor\n );\n }\n\n /**\n * Dispose this plugin\n */\n public dispose() {\n this.editor = null;\n this.isSuggesting = false;\n this.blockSuggestions = false;\n this.eventHandledOnKeyDown = false;\n this.lastKnownRange = null;\n this.isPendingInputEventHandling = false;\n this.currentInputLength = 0;\n this.newInputLength = 0;\n this.dataProvider.onDispose();\n }\n\n /**\n * Check if the plugin should handle the given event exclusively.\n * Handle an event exclusively means other plugin will not receive this event in\n * onPluginEvent method.\n * If two plugins will return true in willHandleEventExclusively() for the same event,\n * the final result depends on the order of the plugins are added into editor\n * @param event The event to check\n */\n public willHandleEventExclusively(event: PluginEvent) {\n return (\n this.isSuggesting &&\n (event.eventType == PluginEventType.KeyDown ||\n event.eventType == PluginEventType.KeyUp ||\n event.eventType == PluginEventType.Input)\n );\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n public onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.ContentChanged:\n if (event.source == ChangeSource.SetContent && this.dataProvider.onContentChanged) {\n // Stop suggesting since content is fully changed\n if (this.isSuggesting) {\n this.setIsSuggesting(false);\n }\n\n // Undo and other major changes to document content fire this type of event.\n // Inform the data provider of the current picker placed elements in the body.\n let elementIds: string[] = [];\n this.editor?.queryElements(\n \"[id^='\" + this.pickerOptions.elementIdPrefix + \"']\",\n element => {\n if (element.id) {\n elementIds.push(element.id);\n }\n }\n );\n this.dataProvider.onContentChanged(elementIds);\n }\n break;\n\n case PluginEventType.KeyDown:\n this.eventHandledOnKeyDown = false;\n if (this.isAndroidKeyboardEvent(event)) {\n // On Android, the key for KeyboardEvent is \"Unidentified\" or undefined,\n // so handling should be done using the input rather than key down event\n // Since the key down event happens right before the input event, calculate the input\n // length here in preparation for onAndroidInputEvent\n this.currentInputLength = this.calcInputLength(event);\n this.isPendingInputEventHandling = true;\n } else {\n this.onKeyDownEvent(event);\n this.isPendingInputEventHandling = false;\n }\n break;\n\n case PluginEventType.Input:\n if (this.isPendingInputEventHandling) {\n this.onAndroidInputEvent(event);\n }\n break;\n\n case PluginEventType.KeyUp:\n if (!this.eventHandledOnKeyDown && this.shouldHandleKeyUpEvent(event)) {\n this.onKeyUpDomEvent(event);\n this.isPendingInputEventHandling = false;\n }\n break;\n\n case PluginEventType.MouseUp:\n if (this.isSuggesting) {\n this.setIsSuggesting(false);\n }\n break;\n\n case PluginEventType.Scroll:\n if (this.dataProvider.onScroll) {\n // Dispatch scroll event to data provider\n this.dataProvider.onScroll(event.scrollContainer);\n }\n break;\n }\n }\n\n private setLastKnownRange(range: Range | null) {\n this.lastKnownRange = range;\n }\n\n private setIsSuggesting(isSuggesting: boolean) {\n this.isSuggesting = isSuggesting;\n\n if (!isSuggesting) {\n this.setLastKnownRange(null);\n }\n this.dataProvider.onIsSuggestingChanged(isSuggesting);\n\n this.setAriaOwns(isSuggesting);\n this.setAriaActiveDescendant(isSuggesting ? 0 : null);\n }\n\n private cancelDefaultKeyDownEvent(event: PluginKeyboardEvent) {\n this.eventHandledOnKeyDown = true;\n event.rawEvent.preventDefault();\n event.rawEvent.stopImmediatePropagation();\n }\n\n private getIdValue(node: Node): string | null {\n if (safeInstanceOf(node, 'HTMLElement')) {\n const attribute = node.attributes.getNamedItem('id');\n return attribute ? (attribute.value as string) : null;\n } else {\n return null;\n }\n }\n\n private getWordBeforeCursor(event: PluginKeyboardEvent | null): string | null {\n let searcher = this.editor?.getContentSearcherOfCursor(event);\n return searcher ? searcher.getWordBefore() : null;\n }\n\n private replaceNode(currentNode: Node | null, replacementNode: Node | null) {\n if (currentNode) {\n this.editor?.deleteNode(currentNode);\n }\n if (replacementNode) {\n this.editor?.insertNode(replacementNode);\n }\n }\n\n private getRangeUntilAt(event: PluginKeyboardEvent | null): Range | null {\n let positionContentSearcher = this.editor?.getContentSearcherOfCursor(event);\n let startPos: NodePosition | undefined = undefined;\n let endPos: NodePosition | undefined = undefined;\n positionContentSearcher?.forEachTextInlineElement(textInline => {\n let hasMatched = false;\n let nodeContent = textInline.getTextContent();\n let nodeIndex = nodeContent ? nodeContent.length : -1;\n while (nodeIndex >= 0) {\n if (nodeContent[nodeIndex] == this.pickerOptions.triggerCharacter) {\n startPos = textInline.getStartPosition().move(nodeIndex);\n hasMatched = true;\n break;\n }\n nodeIndex--;\n }\n\n if (hasMatched) {\n endPos = textInline.getEndPosition();\n }\n\n return hasMatched;\n });\n return startPos\n ? createRange(startPos, endPos)\n : this.editor?.getDocument().createRange() ?? null;\n }\n\n private shouldHandleKeyUpEvent(event: PluginKeyboardEvent) {\n // onKeyUpDomEvent should only be called when a key that produces a character value is pressed\n // This check will always fail on Android since the KeyboardEvent's key is \"Unidentified\" or undefined\n // However, we don't need to check for modifier events on mobile, so can ignore this check\n return (\n this.isAndroidKeyboardEvent(event) ||\n isCharacterValue(event.rawEvent) ||\n (this.isSuggesting && !isModifierKey(event.rawEvent))\n );\n }\n\n private onKeyUpDomEvent(event: PluginKeyboardEvent) {\n if (this.editor) {\n if (this.isSuggesting) {\n // Word before cursor represents the text prior to the cursor, up to and including the trigger symbol.\n const wordBeforeCursor = this.getWord(event);\n if (wordBeforeCursor !== null) {\n const wordBeforeCursorWithoutTriggerChar = wordBeforeCursor.substring(1);\n const trimmedWordBeforeCursor = wordBeforeCursorWithoutTriggerChar.trim();\n\n // If we hit a case where wordBeforeCursor is just the trigger character,\n // that means we've gotten a onKeyUp event right after it's been typed.\n // Otherwise, update the query string when:\n // 1. There's an actual value\n // 2. That actual value isn't just pure whitespace\n // 3. That actual value isn't more than 4 words long (at which point we assume the person kept typing)\n // Otherwise, we want to dismiss the picker plugin's UX.\n if (\n wordBeforeCursor == this.pickerOptions.triggerCharacter ||\n (trimmedWordBeforeCursor &&\n trimmedWordBeforeCursor.length > 0 &&\n trimmedWordBeforeCursor.split(' ').length <= 4)\n ) {\n this.dataProvider.queryStringUpdated(\n trimmedWordBeforeCursor,\n wordBeforeCursorWithoutTriggerChar == trimmedWordBeforeCursor\n );\n this.setLastKnownRange(this.editor.getSelectionRange() ?? null);\n } else {\n this.setIsSuggesting(false);\n }\n }\n } else {\n let wordBeforeCursor = this.getWordBeforeCursor(event);\n if (!this.blockSuggestions) {\n if (\n wordBeforeCursor != null &&\n wordBeforeCursor.split(' ').length <= 4 &&\n wordBeforeCursor[0] == this.pickerOptions.triggerCharacter\n ) {\n this.setIsSuggesting(true);\n const wordBeforeCursorWithoutTriggerChar = wordBeforeCursor.substring(1);\n let trimmedWordBeforeCursor = wordBeforeCursorWithoutTriggerChar.trim();\n this.dataProvider.queryStringUpdated(\n trimmedWordBeforeCursor,\n wordBeforeCursorWithoutTriggerChar == trimmedWordBeforeCursor\n );\n this.setLastKnownRange(this.editor.getSelectionRange() ?? null);\n if (this.dataProvider.setCursorPoint) {\n // Determine the bounding rectangle for the @mention\n let searcher = this.editor.getContentSearcherOfCursor(event);\n let rangeNode = this.editor.getDocument().createRange();\n\n if (rangeNode) {\n let nodeBeforeCursor =\n searcher?.getInlineElementBefore()?.getContainerNode() ?? null;\n\n let rangeStartSuccessfullySet = this.setRangeStart(\n rangeNode,\n nodeBeforeCursor,\n wordBeforeCursor\n );\n if (!rangeStartSuccessfullySet) {\n // VSO 24891: Out of range error is occurring because nodeBeforeCursor\n // is not including the trigger character. In this case, the node before\n // the node before cursor is the trigger character, and this is where the range should start.\n let nodeBeforeNodeBeforeCursor =\n nodeBeforeCursor?.previousSibling ?? null;\n this.setRangeStart(\n rangeNode,\n nodeBeforeNodeBeforeCursor,\n this.pickerOptions.triggerCharacter\n );\n }\n let rect = rangeNode.getBoundingClientRect();\n\n // Safari's support for range.getBoundingClientRect is incomplete.\n // We perform this check to fall back to getClientRects in case it's at the page origin.\n if (rect.left == 0 && rect.bottom == 0 && rect.top == 0) {\n rect = rangeNode.getClientRects()[0];\n }\n\n if (rect) {\n rangeNode.detach();\n\n // Display the @mention popup in the correct place\n let targetPoint = {\n x: rect.left,\n y: (rect.bottom + rect.top) / 2,\n };\n let bufferZone = (rect.bottom - rect.top) / 2;\n this.dataProvider.setCursorPoint(targetPoint, bufferZone);\n }\n }\n }\n }\n } else {\n if (\n wordBeforeCursor != null &&\n wordBeforeCursor[0] != this.pickerOptions.triggerCharacter\n ) {\n this.blockSuggestions = false;\n }\n }\n }\n }\n }\n\n private onKeyDownEvent(event: PluginKeyboardEvent) {\n let keyboardEvent = event.rawEvent;\n if (this.isSuggesting) {\n if (keyboardEvent.key == ESC_CHAR_CODE) {\n this.setIsSuggesting(false);\n this.blockSuggestions = true;\n this.cancelDefaultKeyDownEvent(event);\n } else if (keyboardEvent.key == BACKSPACE_CHAR_CODE) {\n // #483: If we are backspacing over the trigger character that triggered this Picker\n // then we need to hide the Picker\n const wordBeforeCursor = this.getWord(event);\n if (wordBeforeCursor == this.pickerOptions.triggerCharacter) {\n this.setIsSuggesting(false);\n }\n } else if (\n this.dataProvider.shiftHighlight &&\n (this.pickerOptions.isHorizontal\n ? keyboardEvent.key == LEFT_ARROW_CHAR_CODE ||\n keyboardEvent.key == RIGHT_ARROW_CHAR_CODE\n : keyboardEvent.key == UP_ARROW_CHAR_CODE ||\n keyboardEvent.key == DOWN_ARROW_CHAR_CODE)\n ) {\n this.dataProvider.shiftHighlight(\n this.pickerOptions.isHorizontal\n ? keyboardEvent.key == RIGHT_ARROW_CHAR_CODE\n : keyboardEvent.key == DOWN_ARROW_CHAR_CODE\n );\n\n if (this.dataProvider.getSelectedIndex) {\n this.setAriaActiveDescendant(this.dataProvider.getSelectedIndex());\n }\n\n this.cancelDefaultKeyDownEvent(event);\n } else if (\n this.dataProvider.selectOption &&\n (keyboardEvent.key == ENTER_CHAR_CODE || keyboardEvent.key == TAB_CHAR_CODE)\n ) {\n this.dataProvider.selectOption();\n this.cancelDefaultKeyDownEvent(event);\n } else {\n // Currently no op.\n }\n } else {\n if (keyboardEvent.key == BACKSPACE_CHAR_CODE) {\n const nodeRemoved = this.tryRemoveNode(event);\n if (nodeRemoved) {\n this.cancelDefaultKeyDownEvent(event);\n }\n } else if (keyboardEvent.key == DELETE_CHAR_CODE) {\n let searcher = this.editor?.getContentSearcherOfCursor(event);\n if (searcher) {\n let nodeAfterCursor = searcher.getInlineElementAfter()\n ? searcher.getInlineElementAfter()?.getContainerNode()\n : null;\n let nodeId = nodeAfterCursor ? this.getIdValue(nodeAfterCursor) : null;\n if (\n nodeId &&\n nodeId.indexOf(this.pickerOptions.elementIdPrefix) == 0 &&\n nodeAfterCursor\n ) {\n let replacementNode = this.dataProvider.onRemove(nodeAfterCursor, false);\n this.replaceNode(nodeAfterCursor, replacementNode);\n this.cancelDefaultKeyDownEvent(event);\n }\n }\n }\n }\n }\n\n private onAndroidInputEvent(event: PluginInputEvent) {\n this.newInputLength = this.calcInputLength(event);\n\n if (\n this.newInputLength < this.currentInputLength ||\n (event.rawEvent as any).inputType === DELETE_CONTENT_BACKWARDS_INPUT_TYPE\n ) {\n const nodeRemoved = this.tryRemoveNode(event);\n if (nodeRemoved) {\n this.eventHandledOnKeyDown = true;\n }\n }\n }\n\n private calcInputLength(event: PluginEvent) {\n const wordBeforeCursor = this.getInlineElementBeforeCursor(event);\n return wordBeforeCursor ? wordBeforeCursor.length : 0;\n }\n\n private tryRemoveNode(event: PluginDomEvent): boolean {\n if (!this.editor) {\n return false;\n }\n\n const searcher = this.editor.getContentSearcherOfCursor(event);\n if (!searcher) {\n return false;\n }\n\n const inlineElementBefore = searcher.getInlineElementBefore();\n const nodeBeforeCursor = inlineElementBefore\n ? inlineElementBefore.getContainerNode()\n : null;\n const nodeId = nodeBeforeCursor ? this.getIdValue(nodeBeforeCursor) : null;\n const inlineElementAfter = searcher.getInlineElementAfter();\n\n if (\n nodeBeforeCursor &&\n nodeId &&\n nodeId.indexOf(this.pickerOptions.elementIdPrefix) == 0 &&\n (inlineElementAfter == null || !(inlineElementAfter instanceof PartialInlineElement))\n ) {\n const replacementNode = this.dataProvider.onRemove(nodeBeforeCursor, true);\n if (replacementNode) {\n this.replaceNode(nodeBeforeCursor, replacementNode);\n if (this.isPendingInputEventHandling) {\n this.editor.runAsync(editor => {\n editor.select(replacementNode, PositionType.After);\n });\n } else {\n this.editor.select(replacementNode, PositionType.After);\n }\n\n return true;\n } else {\n // Select the node then let browser delete it\n this.editor.select(nodeBeforeCursor);\n return false;\n }\n }\n return false;\n }\n\n private getWord(event: PluginKeyboardEvent | null) {\n let wordFromRange = this.getRangeUntilAt(event)?.toString() ?? '';\n let wordFromCache = this.getWordBeforeCursor(event);\n // VSO 24891: In picker, trigger and mention are separated into two nodes.\n // In this case, wordFromRange is the trigger character while wordFromCache is the whole string,\n // so wordFromCache is what we want to return.\n if (\n wordFromRange == this.pickerOptions.triggerCharacter &&\n wordFromRange != wordFromCache\n ) {\n return wordFromCache;\n }\n return wordFromRange;\n }\n\n private setRangeStart(rangeNode: Range, node: Node | null, target: string) {\n let nodeOffset = node?.textContent ? node.textContent.lastIndexOf(target) : -1;\n if (node && nodeOffset > -1) {\n rangeNode.setStart(node, nodeOffset);\n return true;\n }\n return false;\n }\n\n private setAriaOwns(isSuggesting: boolean) {\n this.editor?.setEditorDomAttribute(\n 'aria-owns',\n isSuggesting && this.pickerOptions.suggestionsLabel\n ? this.pickerOptions.suggestionsLabel\n : null\n );\n }\n\n private setAriaActiveDescendant(selectedIndex: number | null) {\n this.editor?.setEditorDomAttribute(\n 'aria-activedescendant',\n selectedIndex != null && this.pickerOptions.suggestionLabelPrefix\n ? this.pickerOptions.suggestionLabelPrefix + selectedIndex.toString()\n : null\n );\n }\n\n private getInlineElementBeforeCursor(event: PluginEvent): string | null {\n const searcher = this.editor?.getContentSearcherOfCursor(event);\n const element = searcher ? searcher.getInlineElementBefore() : null;\n return element ? element.getTextContent() : null;\n }\n\n private isAndroidKeyboardEvent(event: PluginKeyboardEvent): boolean {\n // Check keyboard events on Android for further handling.\n // On Android Webview later 51, the KeyboardEvent's key is \"Unidentified\".\n // On Android Webview below 51, the KeyboardEvent's key is not supported and always returns undefined,\n // so using the charCode property, which is 0 or 229.\n return (\n event.rawEvent.key == UNIDENTIFIED_KEY ||\n (event.rawEvent.key == undefined &&\n UNIDENTIFIED_CODE.indexOf(event.rawEvent.charCode) > -1)\n );\n }\n}\n","export { default as PickerPlugin } from './PickerPlugin';\n","import { clearState } from './utils/clearState';\nimport { DeleteTableContents } from './features/DeleteTableContents';\nimport { handleKeyDownEvent } from './keyUtils/handleKeyDownEvent';\nimport { handleKeyUpEvent } from './keyUtils/handleKeyUpEvent';\nimport { handleMouseDownEvent } from './mouseUtils/handleMouseDownEvent';\nimport { handleScrollEvent } from './mouseUtils/handleScrollEvent';\nimport { TableCellSelectionState } from './TableCellSelectionState';\nimport {\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n SelectionRangeTypes,\n TableSelection,\n} from 'roosterjs-editor-types';\n\n/**\n * TableCellSelectionPlugin help highlight table cells\n */\nexport default class TableCellSelection implements EditorPlugin {\n private editor: IEditor | null = null;\n private state: TableCellSelectionState | null;\n private shadowEditCoordinatesBackup: TableSelection | null = null;\n\n constructor() {\n this.state = {\n firstTable: null,\n lastTarget: null,\n firstTarget: null,\n preventKeyUp: false,\n startedSelection: false,\n tableSelection: false,\n targetTable: null,\n vTable: null,\n mouseMoveDisposer: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'TableCellSelection';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.editor.addContentEditFeature(DeleteTableContents);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n clearState(this.state, this.editor);\n this.state = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (this.editor && this.state) {\n switch (event.eventType) {\n case PluginEventType.EnteredShadowEdit:\n this.handleEnteredShadowEdit(this.state, this.editor);\n break;\n case PluginEventType.LeavingShadowEdit:\n this.handleLeavingShadowEdit(this.state, this.editor);\n break;\n case PluginEventType.MouseDown:\n if (!this.state.startedSelection) {\n handleMouseDownEvent(event, this.state, this.editor);\n }\n break;\n case PluginEventType.KeyDown:\n if (!this.state.startedSelection) {\n handleKeyDownEvent(event, this.state, this.editor);\n } else {\n event.rawEvent.preventDefault();\n }\n break;\n case PluginEventType.KeyUp:\n if (!this.state.startedSelection) {\n handleKeyUpEvent(event, this.state, this.editor);\n } else {\n event.rawEvent.preventDefault();\n }\n break;\n case PluginEventType.Scroll:\n if (this.state.startedSelection) {\n handleScrollEvent(this.state, this.editor);\n }\n break;\n case PluginEventType.BeforeSetContent:\n this.state.firstTable = null;\n this.state.tableSelection = false;\n this.editor.select(null);\n break;\n }\n }\n }\n\n private handleLeavingShadowEdit(state: TableCellSelectionState, editor: IEditor) {\n if (state.firstTable && state.tableSelection && state.firstTable) {\n const table = editor.queryElements('#' + state.firstTable.id);\n if (table.length == 1) {\n state.firstTable = table[0] as HTMLTableElement;\n editor.select(state.firstTable, this.shadowEditCoordinatesBackup);\n this.shadowEditCoordinatesBackup = null;\n }\n }\n }\n\n private handleEnteredShadowEdit(state: TableCellSelectionState, editor: IEditor) {\n const selection = editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.TableSelection) {\n this.shadowEditCoordinatesBackup = selection.coordinates ?? null;\n state.firstTable = selection.table;\n state.tableSelection = true;\n editor.select(selection.table, null);\n }\n }\n}\n","/**\n * @internal\n * Table cell query selector\n */\nexport const TABLE_CELL_SELECTOR = 'td,th';\n","import { safeInstanceOf } from 'roosterjs-editor-dom';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport {\n GenericContentEditFeature,\n IEditor,\n Keys,\n PluginEvent,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Feature that when Backspace is pressed and there is Table Selection, delete the contents inside of the selection\n */\nexport const DeleteTableContents: GenericContentEditFeature = {\n keys: [Keys.DELETE, Keys.BACKSPACE],\n shouldHandleEvent: (_, editor: IEditor) => {\n const selection = editor.getSelectionRangeEx();\n return selection.type == SelectionRangeTypes.TableSelection;\n },\n handleEvent: (_, editor) => {\n const selection = editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.TableSelection) {\n editor.addUndoSnapshot(() => {\n if (selection.isWholeTableSelected) {\n selection.table\n .querySelectorAll(TABLE_CELL_SELECTOR)\n .forEach(td => deleteNodeContents(td, editor));\n } else {\n editor\n .getSelectedRegions()\n .forEach(region => deleteNodeContents(region.rootNode, editor));\n }\n });\n }\n },\n};\n\nfunction deleteNodeContents(element: Node, editor: IEditor) {\n if (safeInstanceOf(element, 'HTMLTableCellElement')) {\n const range = new Range();\n range.selectNodeContents(element);\n range.deleteContents();\n element.appendChild(editor.getDocument().createElement('br'));\n }\n}\n","export { default as TableCellSelection } from './TableCellSelection';\n","import { getCellAtCursor } from '../utils/getCellAtCursor';\nimport { getCellCoordinates } from '../utils/getCellCoordinates';\nimport { isAfter } from '../utils/isAfter';\nimport { prepareSelection } from '../utils/prepareSelection';\nimport { selectTable } from '../utils/selectTable';\nimport { setData } from '../utils/setData';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from '../utils/updateSelection';\nimport {\n contains,\n isCtrlOrMetaPressed,\n Position,\n safeInstanceOf,\n VTable,\n} from 'roosterjs-editor-dom';\nimport {\n Coordinates,\n IEditor,\n Keys,\n PluginKeyDownEvent,\n PositionType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport function handleKeyDownEvent(\n event: PluginKeyDownEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n const { shiftKey, ctrlKey, metaKey, which, defaultPrevented } = event.rawEvent;\n if ((shiftKey && (ctrlKey || metaKey)) || which == Keys.SHIFT || defaultPrevented) {\n state.preventKeyUp = defaultPrevented;\n return;\n }\n\n if (shiftKey) {\n if (!state.firstTarget) {\n const pos = editor.getFocusedPosition();\n const cell = pos && getCellAtCursor(editor, pos.node);\n\n state.firstTarget = cell;\n }\n\n //If first target is not a table cell, we should ignore this plugin\n if (!safeInstanceOf(state.firstTarget, 'HTMLTableCellElement')) {\n return;\n }\n editor.runAsync(editor => {\n const pos = editor.getFocusedPosition();\n const newTarget = state.tableSelection ? state.lastTarget : pos?.node;\n if (newTarget) {\n setData(newTarget, state, editor);\n }\n\n if (state.firstTable! == state.targetTable!) {\n if (!shouldConvertToTableSelection(state, editor) && !state.tableSelection) {\n return;\n }\n //When selection start and end is inside of the same table\n handleKeySelectionInsideTable(event, state, editor);\n } else if (state.tableSelection) {\n if (state.firstTable) {\n editor.select(state.firstTable, null /* coordinates */);\n }\n state.tableSelection = false;\n }\n });\n } else if (\n editor.getSelectionRangeEx()?.type == SelectionRangeTypes.TableSelection &&\n (!isCtrlOrMetaPressed(event.rawEvent) || which == Keys.HOME || which == Keys.END)\n ) {\n editor.select(null);\n }\n}\n\n/**\n * @internal\n */\nfunction handleKeySelectionInsideTable(\n event: PluginKeyDownEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n state.firstTarget = getCellAtCursor(editor, state.firstTarget);\n state.lastTarget = getCellAtCursor(editor, state.lastTarget);\n\n updateSelection(editor, state.firstTarget, 0);\n state.vTable = state.vTable || new VTable(state.firstTable as HTMLTableElement);\n\n const firstCell = getCellCoordinates(state.vTable, state.firstTarget as Element);\n const lastCell = getNextTD(event, editor, state);\n\n if (!firstCell || !lastCell) {\n return;\n }\n state.vTable.selection = {\n firstCell,\n lastCell,\n };\n\n const { selection } = state.vTable;\n\n if (\n !selection.lastCell ||\n (state.vTable.cells && selection.lastCell.y > state.vTable.cells.length - 1) ||\n selection.lastCell.y == -1\n ) {\n //When selection is moving from inside of a table to outside\n state.lastTarget = editor.getElementAtCursor(\n TABLE_CELL_SELECTOR + ',div',\n state.firstTable ?? undefined\n );\n if (safeInstanceOf(state.lastTarget, 'HTMLTableCellElement')) {\n prepareSelection(state, editor);\n } else {\n const position =\n state.targetTable &&\n new Position(\n state.targetTable,\n selection.lastCell.y == null || selection.lastCell.y == -1\n ? PositionType.Before\n : PositionType.After\n );\n\n const sel = editor.getDocument().defaultView?.getSelection();\n const { anchorNode, anchorOffset } = sel || {};\n if (\n sel &&\n anchorNode &&\n anchorOffset != undefined &&\n anchorOffset != null &&\n position\n ) {\n editor.select(sel.getRangeAt(0));\n sel.setBaseAndExtent(anchorNode, anchorOffset, position.node, position.offset);\n state.lastTarget = position.node;\n event.rawEvent.preventDefault();\n return;\n }\n }\n }\n\n selectTable(editor, state);\n\n const isBeginAboveEnd = isAfter(state.firstTarget, state.lastTarget);\n if (state.lastTarget) {\n const targetPosition = new Position(\n state.lastTarget,\n isBeginAboveEnd ? PositionType.Begin : PositionType.End\n );\n updateSelection(editor, targetPosition.node, targetPosition.offset);\n }\n\n state.tableSelection = true;\n event.rawEvent.preventDefault();\n}\n\nfunction getNextTD(\n event: PluginKeyDownEvent,\n editor: IEditor,\n state: TableCellSelectionState\n): Coordinates | undefined {\n state.lastTarget =\n state.lastTarget && editor.getElementAtCursor(TABLE_CELL_SELECTOR, state.lastTarget);\n\n if (safeInstanceOf(state.lastTarget, 'HTMLTableCellElement') && state.vTable?.cells) {\n let coordinates = getCellCoordinates(state.vTable, state.lastTarget);\n\n if (state.tableSelection && coordinates) {\n switch (event.rawEvent.which) {\n case Keys.RIGHT:\n coordinates.x += state.lastTarget.colSpan;\n if (state.vTable.cells[coordinates.y][coordinates.x] == null) {\n coordinates.x = state.vTable.cells[coordinates.y].length - 1;\n coordinates.y++;\n }\n break;\n case Keys.LEFT:\n if (coordinates.x == 0) {\n coordinates.y--;\n } else {\n coordinates.x--;\n }\n break;\n case Keys.UP:\n coordinates.y--;\n break;\n case Keys.DOWN:\n coordinates.y++;\n break;\n }\n }\n\n if (coordinates && coordinates.y >= 0 && coordinates.x >= 0) {\n state.lastTarget = state.vTable.getTd(coordinates.y, coordinates.x);\n }\n return coordinates;\n }\n return undefined;\n}\n\nfunction shouldConvertToTableSelection(state: TableCellSelectionState, editor: IEditor) {\n if (!state.firstTable || !editor) {\n return false;\n }\n const regions = editor.getSelectedRegions();\n if (regions.length == 1) {\n return false;\n }\n\n let result = true;\n\n regions.forEach(value => {\n if (!contains(state.firstTable, value.rootNode)) {\n result = false;\n }\n });\n\n return result;\n}\n","import { clearState } from '../utils/clearState';\nimport { IEditor, Keys, PluginKeyUpEvent } from 'roosterjs-editor-types';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\nconst IGNORE_KEY_UP_KEYS = [\n Keys.SHIFT,\n Keys.ALT,\n Keys.META_LEFT,\n Keys.CTRL_LEFT,\n Keys.PRINT_SCREEN,\n];\n\n/**\n * @internal\n */\nexport function handleKeyUpEvent(\n event: PluginKeyUpEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n const { shiftKey, which, ctrlKey } = event.rawEvent;\n if (\n !shiftKey &&\n !ctrlKey &&\n state.firstTarget &&\n !state.preventKeyUp &&\n IGNORE_KEY_UP_KEYS.indexOf(which) == -1\n ) {\n clearState(state, editor);\n }\n state.preventKeyUp = false;\n}\n","import normalizeTableSelection from '../utils/normalizeTableSelection';\nimport { clearState } from '../utils/clearState';\nimport { contains, getTagOfNode, safeInstanceOf, VTable } from 'roosterjs-editor-dom';\nimport { getCellAtCursor } from '../utils/getCellAtCursor';\nimport { getCellCoordinates } from '../utils/getCellCoordinates';\nimport { getTableAtCursor } from '../utils/getTableAtCursor';\nimport { IEditor, PluginMouseDownEvent } from 'roosterjs-editor-types';\nimport { prepareSelection } from '../utils/prepareSelection';\nimport { restoreSelection } from '../utils/restoreSelection';\nimport { selectTable } from '../utils/selectTable';\nimport { setData } from '../utils/setData';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from '../utils/updateSelection';\n\nconst LEFT_CLICK = 1;\nconst RIGHT_CLICK = 3;\n\n/**\n * @internal\n */\nexport function handleMouseDownEvent(\n event: PluginMouseDownEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n const { which, shiftKey } = event.rawEvent;\n\n const td = editor.getElementAtCursor(TABLE_CELL_SELECTOR);\n if (which == RIGHT_CLICK && state.tableSelection && state.vTable && td) {\n //If the user is right clicking To open context menu\n const coord = getCellCoordinates(state.vTable, td);\n if (coord) {\n const { firstCell, lastCell } = normalizeTableSelection(state.vTable) || {};\n if (\n firstCell &&\n lastCell &&\n coord.y >= firstCell.y &&\n coord.y <= lastCell.y &&\n coord.x >= firstCell.x &&\n coord.x <= lastCell.x\n ) {\n state.firstTarget = state.vTable.getCell(firstCell.y, firstCell.x).td;\n state.lastTarget = state.vTable.getCell(lastCell.y, lastCell.x).td;\n\n if (state.firstTarget && state.lastTarget) {\n const selection = editor.getDocument().defaultView?.getSelection();\n selection?.setBaseAndExtent(state.firstTarget, 0, state.lastTarget, 0);\n selectTable(editor, state);\n }\n\n return;\n }\n }\n }\n if (which == LEFT_CLICK && !shiftKey) {\n clearState(state, editor);\n\n if (getTableAtCursor(editor, event.rawEvent.target)) {\n const doc = editor.getDocument() || document;\n\n const mouseUpListener = getOnMouseUp(state);\n const mouseMoveListener = onMouseMove(state, editor);\n doc.addEventListener('mouseup', mouseUpListener, true /*setCapture*/);\n doc.addEventListener('mousemove', mouseMoveListener, true /*setCapture*/);\n\n state.mouseMoveDisposer = () => {\n doc.removeEventListener('mouseup', mouseUpListener, true /*setCapture*/);\n doc.removeEventListener('mousemove', mouseMoveListener, true /*setCapture*/);\n };\n\n state.startedSelection = true;\n }\n }\n\n if (which == LEFT_CLICK && shiftKey) {\n editor.runAsync(editor => {\n const sel = editor.getDocument().defaultView?.getSelection();\n const first = getCellAtCursor(editor, sel?.anchorNode);\n const last = getCellAtCursor(editor, sel?.focusNode);\n const firstTable = getTableAtCursor(editor, first);\n const targetTable = getTableAtCursor(editor, first);\n if (\n firstTable! == targetTable! &&\n safeInstanceOf(first, 'HTMLTableCellElement') &&\n safeInstanceOf(last, 'HTMLTableCellElement')\n ) {\n state.vTable = new VTable(first);\n const firstCord = getCellCoordinates(state.vTable, first);\n const lastCord = getCellCoordinates(state.vTable, last);\n\n if (!firstCord || !lastCord) {\n return;\n }\n state.vTable.selection = {\n firstCell: firstCord,\n lastCell: lastCord,\n };\n\n state.firstTarget = first;\n state.lastTarget = last;\n selectTable(editor, state);\n\n state.tableSelection = true;\n state.firstTable = firstTable as HTMLTableElement;\n state.targetTable = targetTable;\n updateSelection(editor, first, 0);\n }\n });\n }\n}\n\nfunction getOnMouseUp(state: TableCellSelectionState) {\n return () => {\n removeMouseUpEventListener(state);\n };\n}\n\nfunction onMouseMove(state: TableCellSelectionState, editor: IEditor) {\n return (event: MouseEvent) => {\n if (!editor.contains(event.target as Node)) {\n return;\n }\n\n //If already in table selection and the new target is contained in the last target cell, no need to\n //Apply selection styles again.\n if (\n state.tableSelection &&\n state.firstTarget &&\n contains(state.lastTarget, event.target as Node, true)\n ) {\n updateSelection(editor, state.firstTarget, 0);\n event.preventDefault();\n return;\n }\n\n if (getTagOfNode(event.target as Node) == 'TABLE') {\n event.preventDefault();\n return;\n }\n\n setData(event.target as Node, state, editor);\n\n // If there is a first target, but is not inside a table, no more actions to perform.\n if (state.firstTarget && !state.firstTable) {\n return;\n }\n\n //Ignore if\n // Is a DIV that only contains a Table\n // If the event target is not contained in the editor.\n if (\n state.lastTarget &&\n ((state.lastTarget.lastChild == state.lastTarget.firstChild &&\n getTagOfNode(state.lastTarget.lastChild) == 'TABLE' &&\n getTagOfNode(state.lastTarget) == 'DIV') ||\n !editor.contains(state.lastTarget))\n ) {\n event.preventDefault();\n return;\n }\n\n prepareSelection(state, editor);\n const isNewTDContainingFirstTable = safeInstanceOf(state.lastTarget, 'HTMLTableCellElement')\n ? contains(state.lastTarget, state.firstTable)\n : false;\n\n if (\n (state.firstTable && state.firstTable == state.targetTable) ||\n isNewTDContainingFirstTable\n ) {\n //When starting selection inside of a table and ends inside of the same table.\n selectionInsideTableMouseMove(event, state, editor);\n } else if (state.tableSelection) {\n restoreSelection(state, editor);\n }\n\n if (state.tableSelection && state.firstTarget) {\n updateSelection(editor, state.firstTarget, 0);\n event.preventDefault();\n }\n };\n}\n\n/**\n * @internal\n */\nexport function selectionInsideTableMouseMove(\n event: MouseEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n if (\n state.firstTarget &&\n state.firstTable &&\n state.lastTarget != state.firstTarget &&\n state.lastTarget\n ) {\n updateSelection(editor, state.firstTarget, 0);\n if (\n state.firstTable != state.targetTable &&\n state.targetTable?.contains(state.firstTable)\n ) {\n //If selection started in a table that is inside of another table and moves to parent table\n //Make the firstTarget the TD of the parent table.\n state.firstTarget = editor.getElementAtCursor(TABLE_CELL_SELECTOR, state.lastTarget);\n }\n\n if (state.firstTable && state.firstTarget) {\n state.tableSelection = true;\n\n state.vTable = state.vTable || new VTable(state.firstTable);\n\n const firstCell = getCellCoordinates(state.vTable, state.firstTarget);\n const lastCell = getCellCoordinates(state.vTable, state.lastTarget);\n\n if (!firstCell || !lastCell) {\n return;\n }\n\n state.vTable.selection = {\n firstCell,\n lastCell,\n };\n selectTable(editor, state);\n }\n\n event.preventDefault();\n } else if (\n state.lastTarget == state.firstTarget &&\n state.tableSelection &&\n state.firstTable &&\n state.firstTarget\n ) {\n state.vTable = new VTable(state.firstTable);\n const cell = getCellCoordinates(state.vTable, state.firstTarget);\n if (cell) {\n state.vTable.selection = {\n firstCell: cell,\n lastCell: cell,\n };\n }\n\n selectTable(editor, state);\n }\n}\n\nfunction removeMouseUpEventListener(state: TableCellSelectionState): void {\n if (state.startedSelection) {\n state.startedSelection = false;\n state.mouseMoveDisposer?.();\n }\n}\n","import { getCellCoordinates } from '../utils/getCellCoordinates';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { restoreSelection } from '../utils/restoreSelection';\nimport { selectTable } from '../utils/selectTable';\nimport { setData } from '../utils/setData';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from '../utils/updateSelection';\n\n/**\n * Handle Scroll Event and mantains the selection range,\n * Since when we scroll the cursor does not trigger the on Mouse Move event\n * The table selection gets removed.\n */\nexport function handleScrollEvent(state: TableCellSelectionState, editor: IEditor) {\n const eventTarget = editor.getElementAtCursor();\n if (!eventTarget) {\n return;\n }\n setData(eventTarget, state, editor);\n if (\n state.firstTable == state.targetTable &&\n state.firstTarget &&\n state.vTable?.selection &&\n state.lastTarget &&\n state.tableSelection\n ) {\n const newCell = getCellCoordinates(state.vTable, state.lastTarget);\n if (newCell) {\n state.vTable.selection.lastCell = newCell;\n selectTable(editor, state);\n updateSelection(editor, state.firstTarget, 0);\n }\n } else if (state.tableSelection) {\n restoreSelection(state, editor);\n }\n}\n","import { IEditor } from 'roosterjs-editor-types';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function clearState(state: TableCellSelectionState | null, editor: IEditor | null): void {\n editor?.select(null);\n if (state) {\n state.vTable = null;\n state.firstTarget = null;\n state.lastTarget = null;\n state.tableSelection = false;\n state.firstTable = null;\n state.targetTable = null;\n state.mouseMoveDisposer?.();\n state.mouseMoveDisposer = null;\n }\n}\n","import { IEditor } from 'roosterjs-editor-types';\nimport { Nullable } from '../TableCellSelectionState';\nimport { TABLE_CELL_SELECTOR } from '../constants';\n\n/**\n * @internal\n */\nexport function getCellAtCursor(editor: IEditor, node: Nullable): HTMLElement {\n if (editor) {\n return (\n editor.getElementAtCursor(TABLE_CELL_SELECTOR, node ?? undefined) ||\n (node as HTMLElement)\n );\n }\n return node as HTMLElement;\n}\n","import { Coordinates } from 'roosterjs-editor-types';\nimport { VTable } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Gets the coordinates of a cell\n * @param cellInput The cell the to find the coordinates\n * @returns Coordinates of the cell, null if not found\n */\nexport function getCellCoordinates(vTable: VTable, cellInput: Node): Coordinates | undefined {\n let result: Coordinates | undefined;\n if (vTable?.cells) {\n for (let indexY = 0; indexY < vTable.cells.length; indexY++) {\n for (let indexX = 0; indexX < vTable.cells[indexY].length; indexX++) {\n if (cellInput == vTable.cells[indexY][indexX].td) {\n result = {\n x: indexX,\n y: indexY,\n };\n }\n }\n }\n }\n\n return result;\n}\n","import { IEditor } from 'roosterjs-editor-types';\nimport { Nullable } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function getTableAtCursor(\n editor: IEditor,\n node: Nullable\n): HTMLTableElement | null {\n if (editor) {\n return editor.getElementAtCursor('table', node as Node) as HTMLTableElement;\n }\n return null;\n}\n","import { Nullable } from '../TableCellSelectionState';\nimport { Position } from 'roosterjs-editor-dom';\nimport { PositionType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport function isAfter(node1: Nullable, node2: Nullable) {\n if (node1 && node2) {\n if (node2.contains(node1)) {\n const r1 = (node1 as Element).getBoundingClientRect?.();\n const r2 = (node2 as Element).getBoundingClientRect?.();\n if (r1 && r2) {\n return r1.top > r2.top && r1.bottom < r2.bottom;\n }\n }\n\n const position = new Position(node1, PositionType.End);\n return position.isAfter(new Position(node2, PositionType.End));\n }\n return false;\n}\n","import { Coordinates, TableSelection } from 'roosterjs-editor-types';\nimport { VTable } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Make the first Cell of a table selection always be on top of the last cell.\n * @param input Table selection\n * @returns Table Selection where the first cell is always going to be first selected in the table\n * and the last cell always going to be last selected in the table.\n */\nexport default function normalizeTableSelection(vTable: VTable): TableSelection | null {\n const { firstCell, lastCell } = vTable?.selection || {};\n if (!vTable?.cells || !vTable.selection || !firstCell || !lastCell) {\n return null;\n }\n\n const cells = vTable.cells;\n\n let newFirst = {\n x: Math.min(firstCell.x, lastCell.x),\n y: Math.min(firstCell.y, lastCell.y),\n };\n let newLast = {\n x: Math.max(firstCell.x, lastCell.x),\n y: Math.max(firstCell.y, lastCell.y),\n };\n\n const fixCoordinates = (coord: Coordinates) => {\n if (coord.x < 0) {\n coord.x = 0;\n }\n if (coord.y < 0) {\n coord.y = 0;\n }\n\n if (coord.y >= cells.length) {\n coord.y = cells.length - 1;\n }\n\n const rowsCells = cells[coord.y].length;\n if (coord.x >= rowsCells) {\n coord.x = rowsCells - 1;\n }\n };\n\n fixCoordinates(newFirst);\n fixCoordinates(newLast);\n\n return { firstCell: newFirst, lastCell: newLast };\n}\n","import { findClosestElementAncestor } from 'roosterjs-editor-dom';\nimport { getTableAtCursor } from './getTableAtCursor';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n * Check if the selection started in a inner table.\n */\nexport function prepareSelection(state: TableCellSelectionState, editor: IEditor) {\n if (!state.firstTable || !state.targetTable) {\n return;\n }\n let isNewTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.firstTable?.contains(\n findClosestElementAncestor(state.targetTable, state.firstTable, TABLE_CELL_SELECTOR)\n );\n\n if (isNewTargetTableContained && state.tableSelection) {\n while (isNewTargetTableContained) {\n state.lastTarget = findClosestElementAncestor(\n state.targetTable,\n state.firstTable,\n TABLE_CELL_SELECTOR\n );\n state.targetTable = getTableAtCursor(editor, state.lastTarget);\n isNewTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.firstTable?.contains(\n findClosestElementAncestor(\n state.targetTable,\n state.firstTable,\n TABLE_CELL_SELECTOR\n )\n );\n }\n }\n\n let isFirstTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.targetTable?.contains(\n findClosestElementAncestor(state.firstTable, state.targetTable, TABLE_CELL_SELECTOR)\n );\n\n if (isFirstTargetTableContained && state.tableSelection && state.targetTable) {\n while (isFirstTargetTableContained) {\n state.firstTarget = findClosestElementAncestor(\n state.firstTable,\n state.targetTable,\n TABLE_CELL_SELECTOR\n );\n if (!state.firstTarget) {\n return;\n }\n state.firstTable = getTableAtCursor(editor, state.firstTarget);\n isFirstTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.targetTable?.contains(\n findClosestElementAncestor(\n state.firstTable,\n state.targetTable,\n TABLE_CELL_SELECTOR\n )\n );\n }\n }\n}\n","import { IEditor, PositionType } from 'roosterjs-editor-types';\nimport { isAfter } from './isAfter';\nimport { Position } from 'roosterjs-editor-dom';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from './updateSelection';\n\n/**\n * @internal\n */\nexport function restoreSelection(state: TableCellSelectionState, editor: IEditor) {\n if (!state.lastTarget || !state.firstTarget) {\n return;\n }\n\n if (state.firstTable) {\n editor.select(state.firstTable, null /* coordinates */);\n }\n state.tableSelection = false;\n const isBeginAboveEnd = isAfter(state.firstTarget, state.lastTarget);\n const targetPosition = new Position(\n state.lastTarget,\n isBeginAboveEnd ? PositionType.End : PositionType.Begin\n );\n\n const firstTargetRange = new Range();\n if (state.firstTarget) {\n firstTargetRange.selectNodeContents(state.firstTarget);\n }\n updateSelection(\n editor,\n state.firstTarget,\n isBeginAboveEnd\n ? Position.getEnd(firstTargetRange).offset\n : Position.getStart(firstTargetRange).offset,\n targetPosition.element,\n targetPosition.offset\n );\n}\n","import normalizeTableSelection from './normalizeTableSelection';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function selectTable(editor: IEditor, state: TableCellSelectionState) {\n if (editor && state.vTable) {\n editor?.select(state.vTable.table, normalizeTableSelection(state.vTable));\n }\n}\n","import { getCellAtCursor } from './getCellAtCursor';\nimport { getTableAtCursor } from './getTableAtCursor';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function setData(eventTarget: Node, state: TableCellSelectionState, editor: IEditor) {\n const pos = editor.getFocusedPosition();\n if (pos) {\n state.firstTarget = state.firstTarget || getCellAtCursor(editor, pos.node);\n\n if (state.firstTarget.nodeType == Node.TEXT_NODE) {\n state.firstTarget = editor.getElementAtCursor(TABLE_CELL_SELECTOR, state.firstTarget);\n }\n if (!editor.contains(state.firstTarget) && state.lastTarget) {\n state.firstTarget = state.lastTarget;\n }\n }\n\n state.firstTable = getTableAtCursor(editor, state.firstTarget) as HTMLTableElement;\n state.lastTarget = getCellAtCursor(editor, eventTarget as Node);\n state.targetTable = getTableAtCursor(editor, state.lastTarget);\n}\n","import { IEditor } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Use SetBaseAndExtend to update the selection without losing the order that was used in the selection.\n * Using editor.select may lose the order of the selection if the start of the selection is After\n * the end container of the selection.\n */\nexport function updateSelection(\n editor: IEditor,\n start: Node,\n offset: number,\n end?: Node,\n endOffset?: number\n) {\n const selection = editor.getDocument().defaultView?.getSelection();\n if (selection) {\n end = end || start;\n endOffset = endOffset || offset;\n selection.setBaseAndExtent(start, offset, end, endOffset);\n }\n}\n","import TableEditor from './editors/TableEditor';\nimport { normalizeRect, safeInstanceOf } from 'roosterjs-editor-dom';\nimport {\n CreateElementData,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n Rect,\n} from 'roosterjs-editor-types';\n\nconst TABLE_RESIZER_LENGTH = 12;\n\n/**\n * TableResize plugin, provides the ability to resize a table by drag-and-drop\n */\nexport default class TableResize implements EditorPlugin {\n private editor: IEditor | null = null;\n private onMouseMoveDisposer: (() => void) | null = null;\n private tableRectMap: { table: HTMLTableElement; rect: Rect }[] | null = null;\n private tableEditor: TableEditor | null = null;\n\n /**\n * Construct a new instance of TableResize plugin\n * @param onShowHelperElement An optional callback to allow customize helper element of table resizing.\n * To customize the helper element, add this callback and change the attributes of elementData then it\n * will be picked up by TableResize code\n */\n constructor(\n private onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'TableResize';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.onMouseMoveDisposer = this.editor.addDomEventHandler({\n mousemove: this.onMouseMove,\n mouseout: e => this.onMouseOut(e),\n });\n }\n\n private onMouseOut = (ev: Event) => {\n if (\n isMouseEvent(ev) &&\n safeInstanceOf(ev.relatedTarget, 'HTMLElement') &&\n this.tableEditor &&\n !this.tableEditor.isOwnedElement(ev.relatedTarget) &&\n !this.editor?.contains(ev.relatedTarget)\n ) {\n this.setTableEditor(null);\n }\n };\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.onMouseMoveDisposer?.();\n this.invalidateTableRects();\n this.disposeTableEditor();\n this.editor = null;\n this.onMouseMoveDisposer = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(e: PluginEvent) {\n switch (e.eventType) {\n case PluginEventType.Input:\n case PluginEventType.ContentChanged:\n case PluginEventType.Scroll:\n case PluginEventType.ZoomChanged:\n this.setTableEditor(null);\n this.invalidateTableRects();\n break;\n }\n }\n\n private onMouseMove = (event: Event) => {\n const e = event as MouseEvent;\n\n if (e.buttons > 0 || !this.editor) {\n return;\n }\n\n this.ensureTableRects();\n\n const editorWindow = this.editor.getDocument().defaultView || window;\n const x = e.pageX - editorWindow.scrollX;\n const y = e.pageY - editorWindow.scrollY;\n let currentTable: HTMLTableElement | null = null;\n\n if (this.tableRectMap) {\n for (let i = this.tableRectMap.length - 1; i >= 0; i--) {\n const { table, rect } = this.tableRectMap[i];\n\n if (\n x >= rect.left - TABLE_RESIZER_LENGTH &&\n x <= rect.right + TABLE_RESIZER_LENGTH &&\n y >= rect.top - TABLE_RESIZER_LENGTH &&\n y <= rect.bottom + TABLE_RESIZER_LENGTH\n ) {\n currentTable = table;\n break;\n }\n }\n }\n\n this.setTableEditor(currentTable, e);\n this.tableEditor?.onMouseMove(x, y);\n };\n\n private setTableEditor(table: HTMLTableElement | null, e?: MouseEvent) {\n if (this.tableEditor && !this.tableEditor.isEditing() && table != this.tableEditor.table) {\n this.disposeTableEditor();\n }\n\n if (!this.tableEditor && table && this.editor && table.rows.length > 0) {\n this.tableEditor = new TableEditor(\n this.editor,\n table,\n this.invalidateTableRects,\n this.onShowHelperElement,\n e?.currentTarget\n );\n }\n }\n\n private invalidateTableRects = () => {\n this.tableRectMap = null;\n };\n\n private disposeTableEditor() {\n this.tableEditor?.dispose();\n this.tableEditor = null;\n }\n\n private ensureTableRects() {\n if (!this.tableRectMap && this.editor) {\n this.tableRectMap = [];\n this.editor.queryElements('table', table => {\n if (table.isContentEditable) {\n const rect = normalizeRect(table.getBoundingClientRect());\n if (rect && this.tableRectMap) {\n this.tableRectMap.push({\n table,\n rect,\n });\n }\n }\n });\n }\n }\n}\n\nfunction isMouseEvent(e: Event): e is MouseEvent {\n return !!(e as MouseEvent).pageX;\n}\n","import DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport DragAndDropHelper from '../../../pluginUtils/DragAndDropHelper';\nimport TableEditFeature from './TableEditorFeature';\nimport { createElement, normalizeRect, VTable } from 'roosterjs-editor-dom';\nimport { CreateElementData, Rect } from 'roosterjs-editor-types';\n\nconst CELL_RESIZER_WIDTH = 4;\nconst MIN_CELL_WIDTH = 30;\n\n/**\n * @internal\n */\nexport default function createCellResizer(\n td: HTMLTableCellElement,\n zoomScale: number,\n isRTL: boolean,\n isHorizontal: boolean,\n onStart: () => void,\n onEnd: () => false,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n): TableEditFeature | null {\n const document = td.ownerDocument;\n const createElementData = {\n tag: 'div',\n style: `position: fixed; cursor: ${isHorizontal ? 'row' : 'col'}-resize; user-select: none`,\n };\n\n onShowHelperElement?.(createElementData, 'CellResizer');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n document.body.appendChild(div);\n\n const context: DragAndDropContext = { td, isRTL, zoomScale, onStart };\n const setPosition = isHorizontal ? setHorizontalPosition : setVerticalPosition;\n setPosition(context, div);\n\n const handler: DragAndDropHandler = {\n onDragStart,\n onDragging: isHorizontal ? onDraggingHorizontal : onDraggingVertical,\n onDragEnd: onEnd,\n };\n\n const featureHandler = new DragAndDropHelper(\n div,\n context,\n setPosition,\n handler,\n zoomScale\n );\n\n return { node: td, div, featureHandler };\n}\n\ninterface DragAndDropContext {\n td: HTMLTableCellElement;\n isRTL: boolean;\n zoomScale: number;\n onStart: () => void;\n}\n\ninterface DragAndDropInitValue {\n vTable: VTable;\n currentCells: HTMLTableCellElement[];\n nextCells: HTMLTableCellElement[];\n initialX: number;\n}\n\nfunction onDragStart(context: DragAndDropContext, event: MouseEvent): DragAndDropInitValue {\n const { td, isRTL, zoomScale, onStart } = context;\n const vTable = new VTable(td, true /*normalizeSize*/, zoomScale);\n const rect = normalizeRect(td.getBoundingClientRect());\n\n if (rect) {\n onStart();\n\n // calculate and retrieve the cells of the two columns shared by the current vertical resizer\n const currentCells = vTable.getCellsWithBorder(isRTL ? rect.left : rect.right, !isRTL);\n const nextCells = vTable.getCellsWithBorder(isRTL ? rect.left : rect.right, isRTL);\n\n return {\n vTable,\n currentCells,\n nextCells,\n initialX: event.pageX,\n };\n } else {\n return { vTable, currentCells: [], nextCells: [], initialX: 0 }; // Just a fallback\n }\n}\n\nfunction onDraggingHorizontal(\n context: DragAndDropContext,\n event: MouseEvent,\n initValue: DragAndDropInitValue,\n deltaX: number,\n deltaY: number\n) {\n const { td, zoomScale } = context;\n const { vTable } = initValue;\n\n vTable.table.removeAttribute('height');\n vTable.table.style.setProperty('height', null);\n vTable.forEachCellOfCurrentRow(cell => {\n if (cell.td) {\n cell.td.style.setProperty(\n 'height',\n cell.td == td ? `${(cell.height ?? 0) / zoomScale + deltaY}px` : null\n );\n }\n });\n\n // To avoid apply format styles when the table is being resizing, the skipApplyFormat is set to true.\n vTable.writeBack(true /**skipApplyFormat*/);\n return true;\n}\n\nfunction onDraggingVertical(\n context: DragAndDropContext,\n event: MouseEvent,\n initValue: DragAndDropInitValue,\n deltaX: number\n) {\n const { isRTL, zoomScale } = context;\n const { vTable, nextCells, currentCells, initialX } = initValue;\n\n if (!canResizeColumns(event.pageX, currentCells, nextCells, isRTL, zoomScale)) {\n return false;\n }\n\n // Since we allow the user to resize the table width on adjusting the border of the last cell,\n // we need to make the table width resizable by setting it as null;\n // We also allow the user to resize the table width if Shift key is pressed\n const isLastCell = nextCells.length == 0;\n const isShiftPressed = event.shiftKey;\n\n if (isLastCell || isShiftPressed) {\n vTable.table.style.setProperty('width', null);\n }\n\n const newWidthList = new Map();\n currentCells.forEach(td => {\n const rect = normalizeRect(td.getBoundingClientRect());\n\n if (rect) {\n td.style.wordBreak = 'break-word';\n td.style.whiteSpace = 'normal';\n td.style.boxSizing = 'border-box';\n const newWidth = getHorizontalDistance(rect, event.pageX, !isRTL) / zoomScale;\n newWidthList.set(td, newWidth);\n }\n });\n newWidthList.forEach((newWidth, td) => {\n td.style.width = `${newWidth}px`;\n });\n if (!isShiftPressed) {\n nextCells.forEach(td => {\n const width = td.rowSpan > 1 ? 0 : td.getBoundingClientRect().right - initialX;\n td.style.wordBreak = 'break-word';\n td.style.whiteSpace = 'normal';\n td.style.boxSizing = 'border-box';\n td.style.width = td.rowSpan > 1 ? '' : width / zoomScale - deltaX + 'px';\n });\n }\n\n // To avoid apply format styles when the table is being resizing, the skipApplyFormat is set to true.\n vTable.writeBack(true /**skipApplyFormat*/);\n return true;\n}\n\nfunction getHorizontalDistance(rect: Rect, pos: number, toLeft: boolean): number {\n return toLeft ? pos - rect.left : rect.right - pos;\n}\n\nfunction setHorizontalPosition(context: DragAndDropContext, trigger: HTMLElement) {\n const { td } = context;\n const rect = normalizeRect(td.getBoundingClientRect());\n if (rect) {\n trigger.style.top = rect.bottom - CELL_RESIZER_WIDTH + 'px';\n trigger.style.left = rect.left + 'px';\n trigger.style.width = rect.right - rect.left + 'px';\n trigger.style.height = CELL_RESIZER_WIDTH + 'px';\n }\n}\n\nfunction setVerticalPosition(context: DragAndDropContext, trigger: HTMLElement) {\n const { td, isRTL } = context;\n const rect = normalizeRect(td.getBoundingClientRect());\n if (rect) {\n trigger.style.top = rect.top + 'px';\n trigger.style.left = (isRTL ? rect.left : rect.right) - CELL_RESIZER_WIDTH + 1 + 'px';\n trigger.style.width = CELL_RESIZER_WIDTH + 'px';\n trigger.style.height = rect.bottom - rect.top + 'px';\n }\n}\n\n/**\n *\n * @param newPos The position to where we want to move the vertical border\n * @returns if the move is allowed, or, if any of the cells on either side of the vertical border is smaller than\n * the minimum width, such move is not allowed\n */\nfunction canResizeColumns(\n newPos: number,\n currentCells: HTMLTableCellElement[],\n nextCells: HTMLTableCellElement[],\n isRTL: boolean,\n zoomScale: number\n) {\n for (let i = 0; i < currentCells.length; i++) {\n const td = currentCells[i];\n const rect = normalizeRect(td.getBoundingClientRect());\n if (rect) {\n const width = getHorizontalDistance(rect, newPos, !isRTL) / zoomScale;\n if (width < MIN_CELL_WIDTH) {\n return false;\n }\n }\n }\n\n for (let i = 0; i < nextCells.length; i++) {\n const td = nextCells[i];\n let width: number = Number.MAX_SAFE_INTEGER;\n if (td) {\n const rect = normalizeRect(td.getBoundingClientRect());\n\n if (rect) {\n width = getHorizontalDistance(rect, newPos, isRTL) / zoomScale;\n }\n }\n\n if (width < MIN_CELL_WIDTH) {\n return false;\n }\n }\n\n return true;\n}\n","import createCellResizer from './CellResizer';\nimport createTableInserter from './TableInserter';\nimport createTableResizer from './TableResizer';\nimport createTableSelector from './TableSelector';\nimport TableEditFeature, { disposeTableEditFeature } from './TableEditorFeature';\nimport {\n contains,\n getComputedStyle,\n normalizeRect,\n Position,\n safeInstanceOf,\n VTable,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n IEditor,\n NodePosition,\n TableSelection,\n CreateElementData,\n} from 'roosterjs-editor-types';\n\nconst INSERTER_HOVER_OFFSET = 6;\nconst enum TOP_OR_SIDE {\n top = 0,\n side = 1,\n}\n/**\n * @internal\n *\n * A table has 6 hot areas to be resized/edited (take LTR example):\n *\n * [6] [ ]\n * +[ 1 ]+--------------------+\n * |[ ]| |\n * [ ] [ ] |\n * [ ] [ ] |\n * [2] [3] |\n * [ ] [ ] |\n * [ ][ 4 ]| |\n * +------------------+--------------------+\n * | | |\n * | | |\n * | | |\n * +------------------+--------------------+\n * [5]\n *\n * 1 - Hover area to show insert column button\n * 2 - Hover area to show insert row button\n * 3 - Hover area to show vertical resizing bar\n * 4 - Hover area to show horizontal resizing bar\n * 5 - Hover area to show whole table resize button\n * 6 - Hover area to show whole table selector button\n *\n * When set a different current table or change current TD, we need to update these areas\n */\nexport default class TableEditor {\n // 1, 2 - Insert a column or a row\n private horizontalInserter: TableEditFeature | null = null;\n private verticalInserter: TableEditFeature | null = null;\n\n // 3, 4 - Resize a column or a row from a cell\n private horizontalResizer: TableEditFeature | null = null;\n private verticalResizer: TableEditFeature | null = null;\n\n // 5 - Resize whole table\n private tableResizer: TableEditFeature | null = null;\n\n // 6 - Select whole table\n private tableSelector: TableEditFeature | null = null;\n\n private isRTL: boolean;\n private start: NodePosition | null = null;\n private end: NodePosition | null = null;\n private isCurrentlyEditing: boolean;\n\n constructor(\n private editor: IEditor,\n public readonly table: HTMLTableElement,\n private onChanged: () => void,\n private onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void,\n private contentDiv?: EventTarget | null\n ) {\n this.isRTL = getComputedStyle(table, 'direction') == 'rtl';\n this.setEditorFeatures();\n this.isCurrentlyEditing = false;\n }\n\n dispose() {\n this.disposeTableResizer();\n this.disposeCellResizers();\n this.disposeTableInserter();\n this.disposeTableSelector();\n }\n\n isEditing(): boolean {\n return this.isCurrentlyEditing;\n }\n\n isOwnedElement(node: Node) {\n return [\n this.tableResizer,\n this.tableSelector,\n this.horizontalInserter,\n this.verticalInserter,\n this.horizontalResizer,\n this.verticalResizer,\n ]\n .filter(feature => !!feature?.div)\n .some(feature => contains(feature?.div, node, true /* treatSameNodeAsContain */));\n }\n\n onMouseMove(x: number, y: number) {\n //Get Cell [0,0]\n const firstCell = this.table.rows[0]?.cells[0];\n\n if (!firstCell) {\n return;\n }\n\n const firstCellRect = normalizeRect(firstCell.getBoundingClientRect());\n\n if (!firstCellRect) {\n return;\n }\n\n //Determine if cursor is on top or side\n const topOrSide =\n y <= firstCellRect.top + INSERTER_HOVER_OFFSET\n ? TOP_OR_SIDE.top\n : this.isRTL\n ? x >= firstCellRect.right - INSERTER_HOVER_OFFSET\n ? TOP_OR_SIDE.side\n : undefined\n : x <= firstCellRect.left + INSERTER_HOVER_OFFSET\n ? TOP_OR_SIDE.side\n : undefined;\n\n // i is row index, j is column index\n for (let i = 0; i < this.table.rows.length; i++) {\n const tr = this.table.rows[i];\n let j = 0;\n for (; j < tr.cells.length; j++) {\n const td = tr.cells[j];\n const tableRect = normalizeRect(this.table.getBoundingClientRect());\n const tdRect = normalizeRect(td.getBoundingClientRect());\n\n if (!tdRect || !tableRect) {\n continue;\n }\n\n // Determine the cell the cursor is in range of\n const lessThanBottom = y <= tdRect.bottom;\n const lessThanRight = this.isRTL\n ? x <= tdRect.right + INSERTER_HOVER_OFFSET\n : x <= tdRect.right;\n const moreThanLeft = this.isRTL\n ? x >= tdRect.left\n : x >= tdRect.left - INSERTER_HOVER_OFFSET;\n\n if (lessThanBottom && lessThanRight && moreThanLeft) {\n const isOnLeftOrRight = this.isRTL\n ? tdRect.right <= tableRect.right && tdRect.right >= tableRect.right - 1\n : tdRect.left >= tableRect.left && tdRect.left <= tableRect.left + 1;\n if (i === 0 && topOrSide == TOP_OR_SIDE.top) {\n const center = (tdRect.left + tdRect.right) / 2;\n const isOnRightHalf = this.isRTL ? x < center : x > center;\n this.setInserterTd(\n isOnRightHalf ? td : tr.cells[j - 1],\n false /*isHorizontal*/\n );\n } else if (j === 0 && topOrSide == TOP_OR_SIDE.side && isOnLeftOrRight) {\n const tdAbove = this.table.rows[i - 1]?.cells[0];\n const tdAboveRect = tdAbove\n ? normalizeRect(tdAbove.getBoundingClientRect())\n : null;\n\n const isTdNotAboveMerged = !tdAboveRect\n ? null\n : this.isRTL\n ? tdAboveRect.right === tdRect.right\n : tdAboveRect.left === tdRect.left;\n\n this.setInserterTd(\n y < (tdRect.top + tdRect.bottom) / 2 && isTdNotAboveMerged\n ? tdAbove\n : td,\n true /*isHorizontal*/\n );\n } else {\n this.setInserterTd(null);\n }\n\n this.setResizingTd(td);\n\n break;\n }\n }\n\n if (j < tr.cells.length) {\n break;\n }\n }\n\n this.setEditorFeatures();\n }\n\n private setEditorFeatures() {\n if (!this.tableSelector) {\n this.tableSelector = createTableSelector(\n this.table,\n this.editor.getZoomScale(),\n this.editor,\n this.onSelect,\n this.getOnMouseOut,\n this.onShowHelperElement,\n this.contentDiv\n );\n }\n\n if (!this.tableResizer) {\n this.tableResizer = createTableResizer(\n this.table,\n this.editor.getZoomScale(),\n this.isRTL,\n this.onStartTableResize,\n this.onFinishEditing,\n this.onShowHelperElement\n );\n }\n }\n\n private setResizingTd(td: HTMLTableCellElement) {\n if (this.horizontalResizer && this.horizontalResizer.node != td) {\n this.disposeCellResizers();\n }\n\n if (!this.horizontalResizer && td) {\n const zoomScale = this.editor.getZoomScale();\n this.horizontalResizer = createCellResizer(\n td,\n zoomScale,\n this.isRTL,\n true /*isHorizontal*/,\n this.onStartCellResize,\n this.onFinishEditing,\n this.onShowHelperElement\n );\n this.verticalResizer = createCellResizer(\n td,\n zoomScale,\n this.isRTL,\n false /*isHorizontal*/,\n this.onStartCellResize,\n this.onFinishEditing,\n this.onShowHelperElement\n );\n }\n }\n\n /**\n * create or remove TableInserter\n * @param td td to attach to, set this to null to remove inserters (both horizontal and vertical)\n */\n private setInserterTd(td: HTMLTableCellElement | null, isHorizontal?: boolean) {\n const inserter = isHorizontal ? this.horizontalInserter : this.verticalInserter;\n if (td === null || (inserter && inserter.node != td)) {\n this.disposeTableInserter();\n }\n\n if (!this.horizontalInserter && !this.verticalInserter && td) {\n const newInserter = createTableInserter(\n this.editor,\n td,\n this.isRTL,\n !!isHorizontal,\n this.onInserted,\n this.getOnMouseOut,\n this.onShowHelperElement\n );\n if (isHorizontal) {\n this.horizontalInserter = newInserter;\n } else {\n this.verticalInserter = newInserter;\n }\n }\n }\n\n private disposeTableResizer() {\n if (this.tableResizer) {\n disposeTableEditFeature(this.tableResizer);\n this.tableResizer = null;\n }\n }\n\n private disposeTableInserter() {\n if (this.horizontalInserter) {\n disposeTableEditFeature(this.horizontalInserter);\n this.horizontalInserter = null;\n }\n if (this.verticalInserter) {\n disposeTableEditFeature(this.verticalInserter);\n this.verticalInserter = null;\n }\n }\n\n private disposeCellResizers() {\n if (this.horizontalResizer) {\n disposeTableEditFeature(this.horizontalResizer);\n this.horizontalResizer = null;\n }\n if (this.verticalResizer) {\n disposeTableEditFeature(this.verticalResizer);\n this.verticalResizer = null;\n }\n }\n\n private disposeTableSelector() {\n if (this.tableSelector) {\n disposeTableEditFeature(this.tableSelector);\n this.tableSelector = null;\n }\n }\n\n private onFinishEditing = (): false => {\n this.editor.focus();\n\n if (this.start && this.end) {\n this.editor.select(this.start, this.end);\n }\n\n this.editor.addUndoSnapshot(undefined /*callback*/, ChangeSource.Format);\n this.onChanged();\n this.isCurrentlyEditing = false;\n\n return false;\n };\n\n private onStartTableResize = () => {\n this.isCurrentlyEditing = true;\n this.onStartResize();\n };\n\n private onStartCellResize = () => {\n this.isCurrentlyEditing = true;\n this.disposeTableResizer();\n this.onStartResize();\n };\n\n private onStartResize() {\n this.isCurrentlyEditing = true;\n const range = this.editor.getSelectionRange();\n\n if (range) {\n this.start = Position.getStart(range);\n this.end = Position.getEnd(range);\n }\n\n this.editor.addUndoSnapshot();\n }\n\n private onInserted = (table: HTMLTableElement) => {\n this.editor.transformToDarkColor(table);\n this.disposeTableResizer();\n this.onFinishEditing();\n };\n\n /**\n * Public only for testing purposes\n * @param table the table to select\n */\n public onSelect = (table: HTMLTableElement) => {\n this.editor.focus();\n if (table) {\n const vTable = new VTable(table);\n if (vTable.cells) {\n const rows = vTable.cells.length - 1;\n let lastCellIndex: number = 0;\n vTable.cells[rows].forEach((cell, index) => {\n lastCellIndex = index;\n });\n\n const selection: TableSelection = {\n firstCell: {\n x: 0,\n y: 0,\n },\n lastCell: {\n y: rows,\n x: lastCellIndex,\n },\n };\n this.editor.select(table, selection);\n }\n }\n };\n\n private getOnMouseOut = (feature: HTMLElement) => {\n return (ev: MouseEvent) => {\n if (\n feature &&\n ev.relatedTarget != feature &&\n safeInstanceOf(this.contentDiv, 'HTMLElement') &&\n safeInstanceOf(ev.relatedTarget, 'HTMLElement') &&\n !contains(this.contentDiv, ev.relatedTarget, true /* treatSameNodeAsContain */)\n ) {\n this.dispose();\n }\n };\n };\n}\n","import Disposable from '../../../pluginUtils/Disposable';\n\n/**\n * @internal\n */\nexport default interface TableEditFeature {\n node: Node;\n div: HTMLDivElement | null;\n featureHandler: Disposable | null;\n}\n\n/**\n * @internal\n */\nexport function disposeTableEditFeature(resizer: TableEditFeature | null) {\n if (resizer) {\n resizer.div?.parentNode?.removeChild(resizer.div);\n resizer.div = null;\n resizer.featureHandler?.dispose();\n resizer.featureHandler = null;\n }\n}\n","import Disposable from '../../../pluginUtils/Disposable';\nimport TableEditFeature from './TableEditorFeature';\nimport { createElement, getIntersectedRect, normalizeRect, VTable } from 'roosterjs-editor-dom';\nimport { CreateElementData, IEditor, TableOperation } from 'roosterjs-editor-types';\n\nconst INSERTER_COLOR = '#4A4A4A';\nconst INSERTER_COLOR_DARK_MODE = 'white';\nconst INSERTER_SIDE_LENGTH = 12;\nconst INSERTER_BORDER_SIZE = 1;\n\n/**\n * @internal\n */\nexport default function createTableInserter(\n editor: IEditor,\n td: HTMLTableCellElement,\n isRTL: boolean,\n isHorizontal: boolean,\n onInsert: (table: HTMLTableElement) => void,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n): TableEditFeature | null {\n const table = editor.getElementAtCursor('table', td);\n\n const tdRect = normalizeRect(td.getBoundingClientRect());\n const viewPort = editor.getVisibleViewport();\n const tableRect = table && viewPort ? getIntersectedRect([table], [viewPort]) : null;\n\n // set inserter position\n if (tdRect && tableRect) {\n const document = td.ownerDocument;\n const createElementData = getInsertElementData(\n isHorizontal,\n editor.isDarkMode(),\n isRTL,\n editor.getDefaultFormat().backgroundColor || 'white'\n );\n\n onShowHelperElement?.(createElementData, 'TableInserter');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n if (isHorizontal) {\n // tableRect.left/right is used because the Inserter is always intended to be on the side\n div.style.left = `${\n isRTL\n ? tableRect.right\n : tableRect.left - (INSERTER_SIDE_LENGTH - 1 + 2 * INSERTER_BORDER_SIZE)\n }px`;\n div.style.top = `${tdRect.bottom - 8}px`;\n (div.firstChild as HTMLElement).style.width = `${tableRect.right - tableRect.left}px`;\n } else {\n div.style.left = `${isRTL ? tdRect.left - 8 : tdRect.right - 8}px`;\n // tableRect.top is used because the Inserter is always intended to be on top\n div.style.top = `${\n tableRect.top - (INSERTER_SIDE_LENGTH - 1 + 2 * INSERTER_BORDER_SIZE)\n }px`;\n (div.firstChild as HTMLElement).style.height = `${tableRect.bottom - tableRect.top}px`;\n }\n\n document.body.appendChild(div);\n\n const handler = new TableInsertHandler(\n div,\n td,\n isHorizontal,\n editor,\n onInsert,\n getOnMouseOut\n );\n\n return { div, featureHandler: handler, node: td };\n }\n\n return null;\n}\n\nclass TableInsertHandler implements Disposable {\n private onMouseOutEvent: null | ((ev: MouseEvent) => void);\n constructor(\n private div: HTMLDivElement,\n private td: HTMLTableCellElement,\n private isHorizontal: boolean,\n private editor: IEditor,\n private onInsert: (table: HTMLTableElement) => void,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void\n ) {\n this.div.addEventListener('click', this.insertTd);\n this.onMouseOutEvent = getOnMouseOut(div);\n this.div.addEventListener('mouseout', this.onMouseOutEvent);\n }\n\n dispose() {\n this.div.removeEventListener('click', this.insertTd);\n\n if (this.onMouseOutEvent) {\n this.div.removeEventListener('mouseout', this.onMouseOutEvent);\n }\n\n this.onMouseOutEvent = null;\n }\n\n private insertTd = () => {\n let vtable = new VTable(this.td);\n if (!this.isHorizontal) {\n vtable.normalizeTableCellSize(this.editor.getZoomScale());\n\n // Since adding new column will cause table width to change, we need to remove width properties\n vtable.table.removeAttribute('width');\n vtable.table.style.setProperty('width', null);\n }\n\n vtable.edit(this.isHorizontal ? TableOperation.InsertBelow : TableOperation.InsertRight);\n vtable.writeBack();\n\n this.onInsert(vtable.table);\n };\n}\n\nfunction getInsertElementData(\n isHorizontal: boolean,\n isDark: boolean,\n isRTL: boolean,\n backgroundColor: string\n): CreateElementData {\n const inserterColor = isDark ? INSERTER_COLOR_DARK_MODE : INSERTER_COLOR;\n const outerDivStyle = `position: fixed; width: ${INSERTER_SIDE_LENGTH}px; height: ${INSERTER_SIDE_LENGTH}px; font-size: 16px; color: black; line-height: 8px; vertical-align: middle; text-align: center; cursor: pointer; border: solid ${INSERTER_BORDER_SIZE}px ${inserterColor}; border-radius: 50%; background-color: ${backgroundColor}`;\n const leftOrRight = isRTL ? 'right' : 'left';\n const childBaseStyles = `position: absolute; box-sizing: border-box; background-color: ${backgroundColor};`;\n const childInfo: CreateElementData = {\n tag: 'div',\n style:\n childBaseStyles +\n (isHorizontal\n ? `${leftOrRight}: 12px; top: 5px; height: 3px; border-top: 1px solid ${inserterColor}; border-bottom: 1px solid ${inserterColor}; border-right: 1px solid ${inserterColor}; border-left: 0px;`\n : `left: 5px; top: 12px; width: 3px; border-left: 1px solid ${inserterColor}; border-right: 1px solid ${inserterColor}; border-bottom: 1px solid ${inserterColor}; border-top: 0px;`),\n };\n\n return {\n tag: 'div',\n style: outerDivStyle,\n children: [childInfo, '+'],\n };\n}\n","import DragAndDropHelper from '../../../pluginUtils/DragAndDropHelper';\nimport TableEditFeature from './TableEditorFeature';\nimport { createElement, normalizeRect, VTable } from 'roosterjs-editor-dom';\nimport { CreateElementData } from 'roosterjs-editor-types';\n\nconst TABLE_RESIZER_LENGTH = 12;\nconst MIN_CELL_WIDTH = 30;\nconst MIN_CELL_HEIGHT = 20;\n\n/**\n * @internal\n */\nexport default function createTableResizer(\n table: HTMLTableElement,\n zoomScale: number,\n isRTL: boolean,\n onStart: () => void,\n onDragEnd: () => false,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n): TableEditFeature | null {\n const document = table.ownerDocument;\n const createElementData = {\n tag: 'div',\n style: `position: fixed; cursor: ${\n isRTL ? 'ne' : 'nw'\n }-resize; user-select: none; border: 1px solid #808080`,\n };\n\n onShowHelperElement?.(createElementData, 'TableResizer');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n div.style.width = `${TABLE_RESIZER_LENGTH}px`;\n div.style.height = `${TABLE_RESIZER_LENGTH}px`;\n document.body.appendChild(div);\n\n const context: DragAndDropContext = {\n isRTL,\n table,\n zoomScale,\n onStart,\n };\n\n setResizeDivPosition(context, div);\n\n const featureHandler = new DragAndDropHelper(\n div,\n context,\n setResizeDivPosition,\n {\n onDragStart,\n onDragging,\n onDragEnd,\n },\n zoomScale\n );\n\n return { node: table, div, featureHandler };\n}\n\ninterface DragAndDropContext {\n table: HTMLTableElement;\n isRTL: boolean;\n zoomScale: number;\n onStart: () => void;\n}\n\ninterface DragAndDropInitValue {\n originalRect: DOMRect;\n vTable: VTable;\n}\n\nfunction onDragStart(context: DragAndDropContext) {\n context.onStart();\n\n return {\n originalRect: context.table.getBoundingClientRect(),\n vTable: new VTable(context.table, true /*normalizeTable*/, context.zoomScale),\n };\n}\n\nfunction onDragging(\n context: DragAndDropContext,\n event: MouseEvent,\n initValue: DragAndDropInitValue,\n deltaX: number,\n deltaY: number\n) {\n const { isRTL, zoomScale } = context;\n const { originalRect, vTable } = initValue;\n const ratioX = 1.0 + (deltaX / originalRect.width) * zoomScale * (isRTL ? -1 : 1);\n const ratioY = 1.0 + (deltaY / originalRect.height) * zoomScale;\n const shouldResizeX = Math.abs(ratioX - 1.0) > 1e-3;\n const shouldResizeY = Math.abs(ratioY - 1.0) > 1e-3;\n\n if (vTable.cells && (shouldResizeX || shouldResizeY)) {\n for (let i = 0; i < vTable.cells.length; i++) {\n for (let j = 0; j < vTable.cells[i].length; j++) {\n const cell = vTable.cells[i][j];\n if (cell.td) {\n if (shouldResizeX) {\n // the width of some external table is fixed, we need to make it resizable\n vTable.table.style.setProperty('width', null);\n const newWidth = ((cell.width ?? 0) * ratioX) / zoomScale;\n cell.td.style.boxSizing = 'border-box';\n if (newWidth >= MIN_CELL_WIDTH) {\n cell.td.style.wordBreak = 'break-word';\n cell.td.style.whiteSpace = 'normal';\n cell.td.style.width = `${newWidth}px`;\n }\n }\n\n if (shouldResizeY) {\n // the height of some external table is fixed, we need to make it resizable\n vTable.table.style.setProperty('height', null);\n if (j == 0) {\n const newHeight = ((cell.height ?? 0) * ratioY) / zoomScale;\n if (newHeight >= MIN_CELL_HEIGHT) {\n cell.td.style.height = `${newHeight}px`;\n }\n } else {\n cell.td.style.setProperty('height', null);\n }\n }\n }\n }\n }\n\n // To avoid apply format styles when the table is being resizing, the skipApplyFormat is set to true.\n vTable.writeBack(true /**skipApplyFormat*/);\n return true;\n } else {\n return false;\n }\n}\n\nfunction setResizeDivPosition(context: DragAndDropContext, trigger: HTMLElement) {\n const { table, isRTL } = context;\n const rect = normalizeRect(table.getBoundingClientRect());\n\n if (rect) {\n trigger.style.top = `${rect.bottom}px`;\n trigger.style.left = isRTL\n ? `${rect.left - TABLE_RESIZER_LENGTH - 2}px`\n : `${rect.right}px`;\n }\n}\n","import DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport DragAndDropHelper from '../../../pluginUtils/DragAndDropHelper';\nimport TableEditorFeature from './TableEditorFeature';\nimport { createElement, normalizeRect, safeInstanceOf } from 'roosterjs-editor-dom';\nimport { CreateElementData, IEditor, Rect } from 'roosterjs-editor-types';\n\nconst TABLE_SELECTOR_LENGTH = 12;\nconst TABLE_SELECTOR_ID = '_Table_Selector';\n\n/**\n * @internal\n */\nexport default function createTableSelector(\n table: HTMLTableElement,\n zoomScale: number,\n editor: IEditor,\n onFinishDragging: (table: HTMLTableElement) => void,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void,\n contentDiv?: EventTarget | null\n): TableEditorFeature | null {\n const rect = normalizeRect(table.getBoundingClientRect());\n\n if (!isTableTopVisible(editor, rect, contentDiv)) {\n return null;\n }\n\n const document = table.ownerDocument;\n const createElementData = {\n tag: 'div',\n style: 'position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080',\n };\n\n onShowHelperElement?.(createElementData, 'TableSelector');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n div.id = TABLE_SELECTOR_ID;\n div.style.width = `${TABLE_SELECTOR_LENGTH}px`;\n div.style.height = `${TABLE_SELECTOR_LENGTH}px`;\n document.body.appendChild(div);\n\n const context: TableSelectorContext = {\n table,\n zoomScale,\n rect,\n };\n\n setSelectorDivPosition(context, div);\n\n const onDragEnd = (context: TableSelectorContext, event: MouseEvent): false => {\n if (event.target == div) {\n onFinishDragging(context.table);\n }\n return false;\n };\n\n const featureHandler = new TableSelectorFeature(\n div,\n context,\n setSelectorDivPosition,\n {\n onDragEnd,\n },\n zoomScale,\n getOnMouseOut\n );\n\n return { div, featureHandler, node: table };\n}\n\ninterface TableSelectorContext {\n table: HTMLTableElement;\n zoomScale: number;\n rect: Rect | null;\n}\n\ninterface TableSelectorInitValue {\n event: MouseEvent;\n}\n\nclass TableSelectorFeature extends DragAndDropHelper {\n private onMouseOut: ((ev: MouseEvent) => void) | null;\n\n constructor(\n private div: HTMLElement,\n context: TableSelectorContext,\n onSubmit: (context: TableSelectorContext, trigger: HTMLElement) => void,\n handler: DragAndDropHandler,\n zoomScale: number,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void,\n forceMobile?: boolean\n ) {\n super(div, context, onSubmit, handler, zoomScale, forceMobile);\n this.onMouseOut = getOnMouseOut(div);\n div.addEventListener('mouseout', this.onMouseOut);\n }\n\n dispose(): void {\n super.dispose();\n if (this.onMouseOut) {\n this.div.removeEventListener('mouseout', this.onMouseOut);\n }\n this.onMouseOut = null;\n }\n}\n\nfunction setSelectorDivPosition(context: TableSelectorContext, trigger: HTMLElement) {\n const { rect } = context;\n if (rect) {\n trigger.style.top = `${rect.top - TABLE_SELECTOR_LENGTH}px`;\n trigger.style.left = `${rect.left - TABLE_SELECTOR_LENGTH - 2}px`;\n }\n}\n\nfunction isTableTopVisible(\n editor: IEditor,\n rect: Rect | null,\n contentDiv?: EventTarget | null\n): boolean {\n const visibleViewport = editor.getVisibleViewport();\n if (contentDiv && safeInstanceOf(contentDiv, 'HTMLElement') && visibleViewport && rect) {\n const containerRect = normalizeRect(contentDiv.getBoundingClientRect());\n\n return !!containerRect && containerRect.top <= rect.top && visibleViewport.top <= rect.top;\n }\n\n return true;\n}\n","export { default as TableResize } from './TableResize';\n","import { applyFormat, getEntitySelector, getTagOfNode } from 'roosterjs-editor-dom';\nimport { insertEntity } from 'roosterjs-editor-api';\nimport {\n DefaultFormat,\n EditorPlugin,\n Entity,\n EntityOperation,\n IEditor,\n PluginEvent,\n PluginEventType,\n ContentPosition,\n} from 'roosterjs-editor-types';\n\nconst ENTITY_TYPE = 'WATERMARK_WRAPPER';\n\n/**\n * A watermark plugin to manage watermark string for roosterjs\n */\nexport default class Watermark implements EditorPlugin {\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n private format: DefaultFormat;\n\n /**\n * Create an instance of Watermark plugin\n * @param watermark The watermark string\n */\n constructor(private watermark: string, format?: DefaultFormat, private customClass?: string) {\n this.format = format || {\n fontSize: '14px',\n textColors: {\n lightModeColor: '#AAAAAA',\n darkModeColor: '#6B6B6B',\n },\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Watermark';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler({\n focus: this.showHideWatermark,\n blur: this.showHideWatermark,\n });\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (\n event.eventType == PluginEventType.EditorReady ||\n (event.eventType == PluginEventType.ContentChanged &&\n (event.data)?.type != ENTITY_TYPE)\n ) {\n this.showHideWatermark();\n } else if (\n event.eventType == PluginEventType.EntityOperation &&\n event.entity.type == ENTITY_TYPE &&\n this.editor\n ) {\n const {\n operation,\n entity: { wrapper },\n } = event;\n if (operation == EntityOperation.ReplaceTemporaryContent) {\n this.removeWatermark(wrapper);\n } else if (event.operation == EntityOperation.NewEntity) {\n applyFormat(\n wrapper,\n this.format,\n this.editor.isDarkMode(),\n this.editor.getDarkColorHandler()\n );\n wrapper.spellcheck = false;\n }\n }\n }\n\n private showHideWatermark = () => {\n if (!this.editor) {\n return;\n }\n const hasFocus = this.editor.hasFocus();\n const watermarks = this.editor.queryElements(getEntitySelector(ENTITY_TYPE));\n const isShowing = watermarks.length > 0;\n\n if (hasFocus && isShowing) {\n watermarks.forEach(this.removeWatermark);\n this.editor.focus();\n } else if (!hasFocus && !isShowing && this.editor.isEmpty()) {\n const newEntity = insertEntity(\n this.editor,\n ENTITY_TYPE,\n this.editor.getDocument().createTextNode(this.watermark),\n false /*isBlock*/,\n false /*isReadonly*/,\n ContentPosition.Begin\n );\n if (this.customClass) {\n newEntity.wrapper.classList.add(this.customClass);\n }\n }\n };\n\n private removeWatermark = (wrapper: HTMLElement) => {\n const parentNode = wrapper.parentNode;\n parentNode?.removeChild(wrapper);\n\n // After remove watermark node, if it leaves an empty DIV, append a BR node into it to make it a regular empty line\n if (\n parentNode &&\n this.editor?.contains(parentNode) &&\n getTagOfNode(parentNode) == 'DIV' &&\n !parentNode.firstChild\n ) {\n parentNode.appendChild(this.editor.getDocument().createElement('BR'));\n }\n };\n}\n","export { default as Watermark } from './Watermark';\n","export * from 'roosterjs-editor-types/lib/compatibleTypes';\n","/**\r\n * enum for setting block alignment, used by setAlignment API\r\n */\r\nexport enum CompatibleAlignment {\r\n\r\n /**\r\n * Align left\r\n */\r\n Left,\r\n\r\n /**\r\n * Align center\r\n */\r\n Center,\r\n\r\n /**\r\n * Align right\r\n */\r\n Right,\r\n}\r\n","/**\n * Enum used to control the different types of bullet list\n */\r\nexport enum CompatibleBulletListType {\r\n\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Bullet triggered by *\n */\n Disc = 1,\n\n /**\n * Bullet triggered by -\n */\n Dash = 2,\n\n /**\n * Bullet triggered by --\n */\n Square = 3,\n\n /**\n * Bullet triggered by >\n */\n ShortArrow = 4,\n\n /**\n * Bullet triggered by ->\n */\n LongArrow = 5,\n\n /**\n * Bullet triggered by =>\n */\n UnfilledArrow = 6,\n\n /**\n * Bullet triggered by —\n */\n Hyphen = 7,\n\n /**\n * Bullet triggered by -->\n */\n DoubleLongArrow = 8,\n\n /**\n * Bullet type circle\n */\n Circle = 9,\n\n /**\n * Maximum value of the enum\n */\n Max = 9,\n}\r\n","/**\n * The enum used for controlling the capitalization of text.\n * Used by changeCapitalization API\n */\r\nexport enum CompatibleCapitalization {\r\n\n /**\n * Transforms the first character after punctuation mark followed by space\n * to uppercase and the rest of characters to lowercase.\n */\n Sentence = 'sentence',\n\n /**\n * Transforms all characters to lowercase\n */\n Lowercase = 'lowercase',\n\n /**\n * Transforms all characters to uppercase\n */\n Uppercase = 'uppercase',\n\n /**\n * Transforms the first character of each word to uppercase\n */\n CapitalizeEachWord = 'capitalize',\n}\r\n","/**\r\n * Possible change sources. Here are the predefined sources.\r\n * It can also be other string if the change source can't fall into these sources.\r\n */\r\nexport enum CompatibleChangeSource {\r\n\r\n /**\r\n * Content changed by auto link\r\n */\r\n AutoLink = 'AutoLink',\r\n\r\n /**\r\n * Content changed by create link\r\n */\r\n CreateLink = 'CreateLink',\r\n\r\n /**\r\n * Content changed by format\r\n */\r\n Format = 'Format',\r\n\r\n /**\r\n * Content changed by image resize\r\n */\r\n ImageResize = 'ImageResize',\r\n\r\n /**\r\n * Content changed by paste\r\n */\r\n Paste = 'Paste',\r\n\r\n /**\r\n * Content changed by setContent API\r\n */\r\n SetContent = 'SetContent',\r\n\r\n /**\r\n * Content changed by cut operation\r\n */\r\n Cut = 'Cut',\r\n\r\n /**\r\n * Content changed by drag & drop operation\r\n */\r\n Drop = 'Drop',\r\n\r\n /**\r\n * Insert a new entity into editor\r\n */\r\n InsertEntity = 'InsertEntity',\r\n\r\n /**\r\n * Editor is switched to dark mode, content color is changed\r\n */\r\n SwitchToDarkMode = 'SwitchToDarkMode',\r\n\r\n /**\r\n * Editor is switched to light mode, content color is changed\r\n */\r\n SwitchToLightMode = 'SwitchToLightMode',\r\n\r\n /**\r\n * List chain reorganized numbers of lists\r\n */\r\n ListChain = 'ListChain',\r\n\r\n /**\r\n * Keyboard event, used by Content Model.\r\n * Data of this event will be the key code number\r\n */\r\n Keyboard = 'Keyboard',\r\n}\r\n","/**\n * Represents the strategy to clear the format of the current editor selection\n */\r\nexport enum CompatibleClearFormatMode {\r\n\n /**\n * Inline format. Remove text format.\n */\n Inline,\n\n /**\n * BLock format. Remove text and structure format of the block.\n */\n Block,\n\n /**\n * Detect Inline or Block format based on the current editor selector.\n */\n AutoDetect,\n}\r\n","/**\n * Represents the mode of color transformation\n */\r\nexport enum CompatibleColorTransformDirection {\r\n\n /**\n * Transform from light to dark\n */\n LightToDark = 0,\n\n /**\n * Transform from dark to light\n */\n DarkToLight = 1,\n}\r\n","/**\r\n * The position. Mostly used for content insertion and traversing\r\n * On insertion, we will need to specify where we want the content to be placed (begin, end, selection or outside)\r\n * On content traversing, we will need to specify the start position of traversing\r\n */\r\nexport enum CompatibleContentPosition {\r\n\r\n /**\r\n * Begin of the container\r\n */\r\n Begin,\r\n\r\n /**\r\n * End of the container\r\n */\r\n End,\r\n\r\n /**\r\n * End of the content div domain.\r\n */\r\n DomEnd,\r\n\r\n /**\r\n * Selection start\r\n */\r\n SelectionStart,\r\n\r\n /**\r\n * Outside of editor\r\n */\r\n Outside,\r\n\r\n /**\r\n * Manually defined range\r\n */\r\n Range,\r\n}\r\n","/**\n * Prefix of content types\n */\r\nexport enum CompatibleContentTypePrefix {\r\n\n /**\n * Text type prefix\n */\n Text = 'text/',\n\n /**\n * Image type prefix\n */\n Image = 'image/',\n}\r\n\r\n\n/**\n * Known content types\n */\r\nexport enum CompatibleContentType {\r\n\n /**\n * Plain text content type\n */\n PlainText = 'text/plain',\n\n /**\n * HTML content type\n */\n HTML = 'text/html',\n}\r\n","/**\n * @deprecated\n * Constants string for dataset names used by dark mode\n */\r\nexport enum CompatibleDarkModeDatasetNames {\r\n\n /**\n * Original style text color\n */\n OriginalStyleColor = 'ogsc',\n\n /**\n * Original style background color\n */\n OriginalStyleBackgroundColor = 'ogsb',\n\n /**\n * Original attribute text color\n */\n OriginalAttributeColor = 'ogac',\n\n /**\n * Original attribute background color\n */\n OriginalAttributeBackgroundColor = 'ogab',\n}\r\n","/**\n * Types of definitions, used by Definition type\n */\r\nexport enum CompatibleDefinitionType {\r\n\n /**\n * Boolean type definition, represents a boolean type value\n */\n Boolean,\n\n /**\n * Number type definition, represents a number type value\n */\n Number,\n\n /**\n * String type definition, represents a string type value\n */\n String,\n\n /**\n * Array type definition, represents an array with a given item type\n */\n Array,\n\n /**\n * Object type definition, represents an object with the given property types\n */\n Object,\n\n /**\n * Customize type definition, represents a customized type with a validator function\n */\n Customize,\n}\r\n","/**\n * Class names for Delimiter\n */\r\nexport enum CompatibleDelimiterClasses {\r\n\n /**\n * Class name to specify this delimiter is before an entity\n */\n DELIMITER_BEFORE = 'entityDelimiterBefore',\n\n /**\n * Class name to specify this delimiter is after an entity\n */\n DELIMITER_AFTER = 'entityDelimiterAfter',\n}\r\n","/**\r\n * enum for setting block direction, used by setDirection API\r\n */\r\nexport enum CompatibleDirection {\r\n\r\n /**\r\n * Left to right\r\n */\r\n LeftToRight,\r\n\r\n /**\r\n * Right to left\r\n */\r\n RightToLeft,\r\n}\r\n","/**\n * Command strings for Document.execCommand() API\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand\n */\r\nexport enum CompatibleDocumentCommand {\r\n\n /**\n * Changes the browser auto-link behavior (Internet Explorer only)\n */\n AutoUrlDetect = 'AutoUrlDetect',\n\n /**\n * Changes the document background color. In styleWithCss mode, it affects the background color of the containing block instead.\n * This requires a <color> value string to be passed in as a value argument. Note that Internet Explorer uses this to set the\n * text background color.\n */\n BackColor = 'backColor',\n\n /**\n * Toggles bold on/off for the selection or at the insertion point. Internet Explorer uses the <strong> tag instead of <b>.\n */\n Bold = 'bold',\n\n /**\n * Clears all authentication credentials from the cache.\n */\n ClearAuthenticationCache = 'ClearAuthenticationCache',\n\n /**\n * Makes the content document either read-only or editable. This requires a boolean true/false as the value argument.\n * (Not supported by Internet Explorer.)\n */\n ContentReadOnly = 'contentReadOnly',\n\n /**\n * Copies the current selection to the clipboard. Conditions of having this behavior enabled vary from one browser to another,\n * and have evolved over time. Check the compatibility table to determine if you can use it in your case.\n */\n Copy = 'copy',\n\n /**\n * Creates an hyperlink from the selection, but only if there is a selection. Requires a URI string as a value argument for the\n * hyperlink's href. The URI must contain at least a single character, which may be whitespace.\n * (Internet Explorer will create a link with a null value.)\n */\n CreateLink = 'createLink',\n\n /**\n * Removes the current selection and copies it to the clipboard. When this behavior is enabled varies between browsers,\n * and its conditions have evolved over time. Check the compatibility table for usage details.\n */\n Cut = 'cut',\n\n /**\n * Adds a <small> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n DecreaseFontSize = 'decreaseFontSize',\n\n /**\n * Changes the paragraph separator used when new paragraphs are created in editable text regions. See Differences in markup\n * generation for more details.\n */\n DefaultParagraphSeparator = 'defaultParagraphSeparator',\n\n /**\n * Deletes the current selection.\n */\n Delete = 'delete',\n\n /**\n * Enables or disables the table row/column insertion and deletion controls. (Not supported by Internet Explorer.)\n */\n EnableInlineTableEditing = 'enableInlineTableEditing',\n\n /**\n * Enables or disables the resize handles on images and other resizable objects. (Not supported by Internet Explorer.)\n */\n EnableObjectResizing = 'enableObjectResizing',\n\n /**\n * Changes the font name for the selection or at the insertion point. This requires a font name string (like \"Arial\")\n * as a value argument.\n */\n FontName = 'fontName',\n\n /**\n * Changes the font size for the selection or at the insertion point. This requires an integer from 1-7 as a value argument.\n */\n FontSize = 'fontSize',\n\n /**\n * Changes a font color for the selection or at the insertion point. This requires a hexadecimal color value string\n * as a value argument.\n */\n ForeColor = 'foreColor',\n\n /**\n * Adds an HTML block-level element around the line containing the current selection, replacing the block element containing\n * the line if one exists (in Firefox, <blockquote> is the exception — it will wrap any containing block element).\n * Requires a tag-name string as a value argument. Virtually all block-level elements can be used.\n * (Internet Explorer supports only heading tags H1–H6, ADDRESS, and PRE, which must be wrapped in angle brackets, such as \"<H1>\".)\n */\n FormatBlock = 'formatBlock',\n\n /**\n * Deletes the character ahead of the cursor's position, identical to hitting the Delete key on a Windows keyboard.\n */\n ForwardDelete = 'forwardDelete',\n\n /**\n * Adds a heading element around a selection or insertion point line. Requires the tag-name strings a value argument (i.e. \"H1\", \"H6\").\n * (Not supported by Internet Explorer and Safari.)\n */\n Heading = 'heading',\n\n /**\n * Changes the background color for the selection or at the insertion point. Requires a color value string as a value argument.\n * useCSS must be true for this to function. (Not supported by Internet Explorer.)\n */\n HiliteColor = 'hiliteColor',\n\n /**\n * Adds a <big> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n IncreaseFontSize = 'increaseFontSize',\n\n /**\n * Indents the line containing the selection or insertion point. In Firefox, if the selection spans multiple lines at different\n * levels of indentation, only the least indented lines in the selection will be indented.\n */\n Indent = 'indent',\n\n /**\n * Controls whether the Enter key inserts a <br> element, or splits the current block element into two.\n * (Not supported by Internet Explorer.)\n */\n InsertBrOnReturn = 'insertBrOnReturn',\n\n /**\n * Inserts a <hr> element at the insertion point, or replaces the selection with it.\n */\n InsertHorizontalRule = 'insertHorizontalRule',\n\n /**\n * Inserts an HTML string at the insertion point (deletes selection). Requires a valid HTML string as a value argument.\n * (Not supported by Internet Explorer.)\n */\n InsertHTML = 'insertHTML',\n\n /**\n * Inserts an image at the insertion point (deletes selection). Requires a URL string for the image's src as a value argument.\n * The requirements for this string are the same as createLink.\n */\n InsertImage = 'insertImage',\n\n /**\n * Creates a numbered ordered list for the selection or at the insertion point.\n */\n InsertOrderedList = 'insertOrderedList',\n\n /**\n * Creates a bulleted unordered list for the selection or at the insertion point.\n */\n InsertUnorderedList = 'insertUnorderedList',\n\n /**\n * Inserts a paragraph around the selection or the current line.\n * (Internet Explorer inserts a paragraph at the insertion point and deletes the selection.)\n */\n InsertParagraph = 'insertParagraph',\n\n /**\n * Inserts the given plain text at the insertion point (deletes selection).\n */\n InsertText = 'insertText',\n\n /**\n * Toggles italics on/off for the selection or at the insertion point.\n * (Internet Explorer uses the <em> element instead of <i>.)\n */\n Italic = 'italic',\n\n /**\n * Centers the selection or insertion point.\n */\n JustifyCenter = 'justifyCenter',\n\n /**\n * Justifies the selection or insertion point.\n */\n JustifyFull = 'justifyFull',\n\n /**\n * Justifies the selection or insertion point to the left.\n */\n JustifyLeft = 'justifyLeft',\n\n /**\n * Right-justifies the selection or the insertion point.\n */\n JustifyRight = 'justifyRight',\n\n /**\n * Outdents the line containing the selection or insertion point.\n */\n Outdent = 'outdent',\n\n /**\n * Pastes the clipboard contents at the insertion point (replaces current selection). Disabled for web content. See [1].\n */\n Paste = 'paste',\n\n /**\n * Redoes the previous undo command.\n */\n Redo = 'redo',\n\n /**\n * Removes all formatting from the current selection.\n */\n RemoveFormat = 'removeFormat',\n\n /**\n * Selects all of the content of the editable region.\n */\n SelectAll = 'selectAll',\n\n /**\n * Toggles strikethrough on/off for the selection or at the insertion point.\n */\n StrikeThrough = 'strikeThrough',\n\n /**\n * Toggles subscript on/off for the selection or at the insertion point.\n */\n Subscript = 'subscript',\n\n /**\n * Toggles superscript on/off for the selection or at the insertion point.\n */\n Superscript = 'superscript',\n\n /**\n * Toggles underline on/off for the selection or at the insertion point.\n */\n Underline = 'underline',\n\n /**\n * Undoes the last executed command.\n */\n Undo = 'undo',\n\n /**\n * Removes the anchor element from a selected hyperlink.\n */\n Unlink = 'unlink',\n\n /**\n * Replaces the useCSS command. true modifies/generates style attributes in markup, false generates presentational elements.\n */\n StyleWithCSS = 'styleWithCSS',\n}\r\n","/**\n * The is essentially an enum representing result from browser compareDocumentPosition API\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n */\r\nexport enum CompatibleDocumentPosition {\r\n\n /**\n * Same node\n */\n Same = 0,\n\n /**\n * Node is disconnected from document\n */\n Disconnected = 1,\n\n /**\n * Node is preceding the comparing node\n */\n Preceding = 2,\n\n /**\n * Node is following the comparing node\n */\n Following = 4,\n\n /**\n * Node contains the comparing node\n */\n Contains = 8,\n\n /**\n * Node is contained by the comparing node\n */\n ContainedBy = 16,\n}\r\n","/**\n * CSS Class names for Entity\n */\r\nexport enum CompatibleEntityClasses {\r\n\n /**\n * Class name to specify this is an entity\n */\n ENTITY_INFO_NAME = '_Entity',\n\n /**\n * Class name to specify the type of an entity\n */\n ENTITY_TYPE_PREFIX = '_EType_',\n\n /**\n * Class name to specify the ID of an entity\n */\n ENTITY_ID_PREFIX = '_EId_',\n\n /**\n * Class name to specify if the entity is readonly\n */\n ENTITY_READONLY_PREFIX = '_EReadonly_',\n}\r\n","/**\n * Define possible operations to an entity\n */\r\nexport enum CompatibleEntityOperation {\r\n\n /**\n * Notify plugins that there is a new plugin was added into editor.\n * Plugin can handle this event to entity hydration.\n * This event will be only fired once for each entity DOM node.\n * After undo, or copy/paste, since new DOM nodes were added, this event will be fired\n * for those entities represented by newly added nodes.\n */\n NewEntity,\n\n /**\n * Notify plugins that user is clicking target to an entity\n */\n Click,\n\n /**\n * Notify plugins that user is triggering context menu to an entity\n */\n ContextMenu,\n\n /**\n * Notify plugins that user is escaping from an entity by pressing ESC key\n */\n Escape,\n\n /**\n * Notify plugins that user is removing an entity from its start position using DELETE key\n */\n RemoveFromStart,\n\n /**\n * Notify plugins that user is remove an entity from its end position using BACKSPACE key\n */\n RemoveFromEnd,\n\n /**\n * Notify plugins that an entity is being overwritten.\n * This can be caused by key in, cut, paste, delete, backspace ... on a selection\n * which contains some entities.\n */\n Overwrite,\n\n /**\n * Notify plugins that an entity is being partially overwritten.\n * This happens when user selected part of the entity then do key press, or cut, paste, delete, backspace, ...\n */\n PartialOverwrite,\n\n /**\n * Notify plugins that editor is generating HTML content for save.\n * Plugin should use this event to remove any temporary content, and only leave DOM nodes that\n * should be saved as HTML string.\n * This event will provide a cloned DOM tree for each entity, do NOT compare the DOM nodes with cached nodes\n * because it will always return false.\n */\n ReplaceTemporaryContent,\n\n /**\n * @deprecated\n */\n AddShadowRoot,\n\n /**\n * @deprecated\n */\n RemoveShadowRoot,\n\n /**\n * Notify plugins that a new entity state need to be updated to an entity.\n * This is normally happened when user undo/redo the content with an entity snapshot added by a plugin that handles entity\n */\n UpdateEntityState,\n}\r\n","/**\n * Experimental feature flags\n */\r\nexport enum CompatibleExperimentalFeatures {\r\n\n // #region Graduated and deprecated features.\n // These features will be removed in next major release\n /**\n * @deprecated This feature is always enabled\n */\n NewIndentation = 'NewIndentation',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewBullet = 'NewBullet',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewNumbering = 'NewNumbering',\n\n /**\n * @deprecated This feature is always enabled\n */\n ListChain = 'ListChain',\n\n /**\n * @deprecated This feature is always enabled\n */\n MergePastedLine = 'MergePastedLine',\n\n /**\n * @deprecated This feature is always enabled\n */\n SingleDirectionResize = 'SingleDirectionResize',\n\n /**\n * @deprecated This feature is always enabled\n */\n PasteWithLinkPreview = 'PasteWithLinkPreview',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageRotate = 'ImageRotate',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageCrop = 'ImageCrop',\n\n /**\n * @deprecated This feature is always enabled\n * Check if the element has a style attribute, if not, apply the default format\n */\n AlwaysApplyDefaultFormat = 'AlwaysApplyDefaultFormat',\n\n /**\n * @deprecated This feature can be enabled/disabled using Paste Plugin contructor param\n * Paste the Html instead of the Img when the Html Body only have one IMG Child node\n */\n ConvertSingleImageBody = 'ConvertSingleImageBody',\n\n /**\n * @deprecated This feature is always enabled\n * Align table elements to left, center and right using setAlignment API\n */\n TableAlignment = 'TableAlignment',\n\n /**\n * @deprecated this feature is always enabled\n * Provide a circular resize handles that adaptive the number od handles to the size of the image\n */\n AdaptiveHandlesResizer = 'AdaptiveHandlesResizer',\n\n /**\n * @deprecated this feature is always disabled\n * Automatically transform -- into hyphen, if typed between two words.\n */\n AutoHyphen = 'AutoHyphen',\n\n /**\n * @deprecated this feature is always disabled\n * Use pending format strategy to do style based format, e.g. Font size, Color.\n * With this feature enabled, we don't need to insert temp ZeroWidthSpace character to hold pending format\n * when selection is collapsed. Instead, we will hold the pending format in memory and only apply it when type something\n */\n PendingStyleBasedFormat = 'PendingStyleBasedFormat',\n\n /**\n * @deprecated this feature is always disabled\n * Normalize list to make sure it can be displayed correctly in other client\n * e.g. We will move list items with \"display: block\" into previous list item and change tag to be DIV\n */\n NormalizeList = 'NormalizeList',\n\n /**\n * @deprecated this feature is always enabled\n * When a html image is selected, the selected image data will be stored by editor core.\n */\n ImageSelection = 'ImageSelection',\n\n /**\n * @deprecated this feature is always enabled\n * Use variable-based dark mode solution rather than dataset-based solution.\n * When enable this feature, need to pass in a DarkModelHandler object to each call of setColor and applyFormat\n * if you need them work for dark mode\n */\n VariableBasedDarkColor = 'VariableBasedDarkColor',\n\n /**\n * @deprecated this feature is always enabled\n * Align list elements elements to left, center and right using setAlignment API\n */\n ListItemAlignment = 'ListItemAlignment',\n\n /**\n * @deprecated\n */\n DefaultFormatInSpan = 'DefaultFormatInSpan',\n\n /**\n * @deprecated\n */\n DefaultFormatOnContainer = 'DefaultFormatOnContainer',\n\n //#endregion\n\n /**\n * Provide additional Tab Key Features. Requires Text Features Content Editable Features\n */\n TabKeyTextFeatures = 'TabKeyTextFeatures',\n\n /**\n * Trigger formatting by a especial characters. Ex: (A), 1. i).\n */\n AutoFormatList = 'AutoFormatList',\n\n /**\n * With this feature enabled, when writing back a list item we will re-use all\n * ancestor list elements, even if they don't match the types currently in the\n * listTypes array for that item. The only list that we will ensure is correct\n * is the one closest to the item.\n */\n ReuseAllAncestorListElements = 'ReuseAllAncestorListElements',\n\n /**\n * Reuse existing DOM structure if possible when convert Content Model back to DOM tree\n */\n ReusableContentModel = 'ReusableContentModel',\n\n /**\n * Handle keyboard editing event with Content Model\n */\n EditWithContentModel = 'EditWithContentModel',\n\n /**\n * Delete table with Backspace key with the whole was selected with table selector\n */\n DeleteTableWithBackspace = 'DeleteTableWithBackspace',\n\n /**\n * Add entities around a Read Only Inline entity to prevent cursor to be hidden when cursor is next of it.\n */\n InlineEntityReadOnlyDelimiters = 'InlineEntityReadOnlyDelimiters',\n\n /**\n * Paste with Content model\n */\n ContentModelPaste = 'ContentModelPaste',\n\n /**\n * Disable list chain functionality\n */\n DisableListChain = 'DisableListChain',\n}\r\n","/**\r\n * The enum used for increase or decrease font size\r\n * Used by setFontSize API\r\n */\r\nexport enum CompatibleFontSizeChange {\r\n\r\n /**\r\n * Increase font size\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease font size\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Represents a mode number to indicate what kind of content to retrieve when call Editor.getContent()\n */\r\nexport enum CompatibleGetContentMode {\r\n\n /**\n * The clean content without any temporary content only for editor.\n * This is the default value. Call to Editor.getContent() with trigger an ExtractContentWithDom event\n * so that plugins can remove their temporary content, and will return the HTML content\n * which is ready for save to storage.\n */\n CleanHTML = 0,\n\n /**\n * Retrieve the raw HTML string in current editor. Temporary content will be included.\n */\n RawHTMLOnly = 1,\n\n /**\n * Retrieve the raw HTML string in current editor with a selection marker. This can be used for\n * save current editor state and call to SetContent with this result can fully restore editor state\n * including current selection\n */\n RawHTMLWithSelection = 2,\n\n /**\n * Get plain text content only, all format will be ignored\n */\n PlainText,\n\n /**\n * A fast way to get plain text content, the line-end positions may not be exactly same with HTML content,\n * but the text content should be the same. This is used for quickly retrieve text content and check\n * text only\n */\n PlainTextFast,\n}\r\n","/**\n * Operation flags for ImageEdit plugin\n */\r\nexport enum CompatibleImageEditOperation {\r\n\n /**\n * No operation\n */\n None = 0,\n\n /**\n * Resize image from corner ( horizontal and vertical resize)\n */\n CornerResize = 1,\n\n /**\n * Resize image from side ( either horizontal or vertical resize)\n */\n SideResize = 2,\n\n /**\n * Image resize\n */\n Resize = CornerResize | SideResize,\n\n /**\n * Image rotate\n */\n Rotate = 4,\n\n /**\n * Image resize and rotate\n */\n ResizeAndRotate = Resize | Rotate,\n\n /**\n * Image crop\n */\n Crop = 8,\n\n /**\n * All operations\n */\n All = ResizeAndRotate | Crop,\n}\r\n","/**\r\n * The enum used for increase or decrease indentation of a block\r\n * Used by setIndentation API\r\n */\r\nexport enum CompatibleIndentation {\r\n\r\n /**\r\n * Increase indentation\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease indentation\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Key numbers common used keys\n */\r\nexport enum CompatibleKeys {\r\n\n NULL = 0,\n BACKSPACE = 8,\n TAB = 9,\n ENTER = 13,\n SHIFT = 16,\n CTRL_LEFT = 17,\n ALT = 18,\n ESCAPE = 27,\n SPACE = 32,\n PAGEUP = 33,\n END = 35,\n HOME = 36,\n LEFT = 37,\n UP = 38,\n RIGHT = 39,\n DOWN = 40,\n PRINT_SCREEN = 44,\n DELETE = 46,\n /**\n * @deprecated Just for backward compatibility\n */\n EIGHT_ASTIRISK = 56,\n EIGHT_ASTERISK = 56,\n B = 66,\n I = 73,\n U = 85,\n Y = 89,\n Z = 90,\n META_LEFT = 91,\n COMMA = 188,\n DASH_UNDERSCORE = 189,\n PERIOD = 190,\n /**\n * @deprecated Just for backward compatibility\n */\n FORWARDSLASH = 191,\n FORWARD_SLASH = 191,\n GRAVE_TILDE = 192,\n\n /**\n * Keys below are non-standard, and should be used in ContentEditFeatures only\n */\n CONTENTCHANGED = 0x101,\n RANGE = 0x102,\n\n Ctrl = 0x1000,\n Meta = 0x2000,\n Shift = 0x4000,\n}\r\n","/**\n * Index of known CreateElementData used by createElement function\n */\r\nexport enum CompatibleKnownCreateElementDataIndex {\r\n\n /**\n * Set a none value to help createElement function ignore falsy value\n */\n None = 0,\n\n /**\n * An empty line without format\n */\n EmptyLine = 1,\n\n /**\n * Wrapper for blockquote\n */\n BlockquoteWrapper = 2,\n\n /**\n * Temp DIV for copy/paste\n */\n CopyPasteTempDiv = 3,\n\n /**\n * ListItem with block style\n */\n BlockListItem = 4,\n\n /**\n * Wrapper element for context menu\n */\n ContextMenuWrapper = 5,\n\n /**\n * Wrapper element for image edit\n */\n ImageEditWrapper = 6,\n\n /**\n * @deprecated\n */\n TableHorizontalResizer = 7,\n\n /**\n * @deprecated\n */\n TableVerticalResizer = 8,\n\n /**\n * @deprecated\n */\n TableResizerLTR = 9,\n\n /**\n * @deprecated\n */\n TableResizerRTL = 10,\n\n /**\n * @deprecated\n */\n TableSelector = 11,\n\n /**\n * @deprecated\n */\n EmptyLineFormatInSpan = 12,\n}\r\n","/**\n * Represent the types of sources to handle in the Paste Plugin\n */\r\nexport enum CompatibleKnownPasteSourceType {\r\n\n WordDesktop,\n ExcelDesktop,\n ExcelOnline,\n PowerPointDesktop,\n GoogleSheets,\n WacComponents,\n Default,\n SingleImage,\n}\r\n","/**\n * Type of list (numbering or bullet)\n */\r\nexport enum CompatibleListType {\r\n\n /**\n * None list type\n * It means this is not a list\n */\n None = 0,\n\n /**\n * Ordered List type (numbering list)\n * Represented by \"OL\" tag\n */\n Ordered = 1,\n\n /**\n * Unordered List type (bullet list)\n * Represented by \"UL\" tag\n */\n Unordered = 2,\n}\r\n","/**\n * The is essentially an enum represents the type of the node\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n * Values not listed here are deprecated.\n */\r\nexport enum CompatibleNodeType {\r\n\n /**\n * An Element node such as <p> or <div>.\n */\n Element = 1,\n\n /**\n * An Attribute node such as name=\"value\".\n */\n Attribute = 2,\n\n /**\n * The actual Text of Element or Attr.\n */\n Text = 3,\n\n /**\n * A ProcessingInstruction of an XML document such as <?xml-stylesheet ... ?> declaration.\n */\n ProcessingInstruction = 7,\n\n /**\n * A Comment node.\n */\n Comment = 8,\n\n /**\n * A Document node.\n */\n Document = 9,\n\n /**\n * A DocumentType node e.g. <!DOCTYPE html> for HTML5 documents.\n */\n DocumentType = 10,\n\n /**\n * A DocumentFragment node.\n */\n DocumentFragment = 11,\n}\r\n","/**\n * Enum used to control the different types of numbering list\n */\r\nexport enum CompatibleNumberingListType {\r\n\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Numbering triggered by 1.\n */\n Decimal = 1,\n\n /**\n * Numbering triggered by 1-\n */\n DecimalDash = 2,\n\n /**\n * Numbering triggered by 1)\n */\n DecimalParenthesis = 3,\n\n /**\n * Numbering triggered by (1)\n */\n DecimalDoubleParenthesis = 4,\n\n /**\n * Numbering triggered by a.\n */\n LowerAlpha = 5,\n\n /**\n * Numbering triggered by a)\n */\n LowerAlphaParenthesis = 6,\n\n /**\n * Numbering triggered by (a)\n */\n LowerAlphaDoubleParenthesis = 7,\n\n /**\n * Numbering triggered by a-\n */\n LowerAlphaDash = 8,\n\n /**\n * Numbering triggered by A.\n */\n UpperAlpha = 9,\n\n /**\n * Numbering triggered by A)\n */\n UpperAlphaParenthesis = 10,\n\n /**\n * Numbering triggered by (A)\n */\n UpperAlphaDoubleParenthesis = 11,\n\n /**\n * Numbering triggered by A-\n */\n UpperAlphaDash = 12,\n\n /**\n * Numbering triggered by i.\n */\n LowerRoman = 13,\n\n /**\n * Numbering triggered by i)\n */\n LowerRomanParenthesis = 14,\n\n /**\n * Numbering triggered by (i)\n */\n LowerRomanDoubleParenthesis = 15,\n\n /**\n * Numbering triggered by i-\n */\n LowerRomanDash = 16,\n\n /**\n * Numbering triggered by I.\n */\n UpperRoman = 17,\n\n /**\n * Numbering triggered by I)\n */\n UpperRomanParenthesis = 18,\n\n /**\n * Numbering triggered by (I)\n */\n UpperRomanDoubleParenthesis = 19,\n\n /**\n * Numbering triggered by I-\n */\n UpperRomanDash = 20,\n\n /**\n * Maximum value of the enum\n */\n Max = 20,\n}\r\n","/**\n * Enum for paste options\n */\r\nexport enum CompatiblePasteType {\r\n\n /**\n * Default paste behavior\n */\n Normal,\n\n /**\n * Paste only the plain text\n */\n AsPlainText,\n\n /**\n * Apply the current style to pasted content\n */\n MergeFormat,\n\n /**\n * If there is a image uri in the clipboard, paste the content as image element\n */\n AsImage,\n}\r\n","/**\n * Editor plugin event type\n */\r\nexport enum CompatiblePluginEventType {\r\n\n /**\n * HTML KeyDown event\n */\n KeyDown = 0,\n\n /**\n * HTML KeyPress event\n */\n KeyPress = 1,\n\n /**\n * HTML KeyUp event\n */\n KeyUp = 2,\n\n /**\n * HTML Input / TextInput event\n */\n Input = 3,\n\n /**\n * HTML CompositionEnd event\n */\n CompositionEnd = 4,\n\n /**\n * HTML MouseDown event\n */\n MouseDown = 5,\n\n /**\n * HTML MouseUp event\n */\n MouseUp = 6,\n\n /**\n * Content changed event\n */\n ContentChanged = 7,\n\n /**\n * Extract Content with a DOM tree event\n * This event is triggered when getContent() is called with triggerExtractContentEvent = true\n * Plugin can handle this event to remove the UI only markups to return clean HTML\n * by operating on a cloned DOM tree\n */\n ExtractContentWithDom = 8,\n\n /**\n * Before Paste event, provide a chance to change copied content\n */\n BeforeCutCopy = 9,\n\n /**\n * Before Paste event, provide a chance to change paste content\n */\n BeforePaste = 10,\n\n /**\n * Let plugin know editor is ready now\n */\n EditorReady = 11,\n\n /**\n * Let plugin know editor is about to dispose\n */\n BeforeDispose = 12,\n\n /**\n * Pending format state (bold, italic, underline, ... with collapsed selection) is changed\n */\n PendingFormatStateChanged = 13,\n\n /**\n * Scroll event triggered by scroll container\n */\n Scroll = 14,\n\n /**\n * Operating on an entity. See enum EntityOperation for more details about each operation\n */\n EntityOperation = 15,\n\n /**\n * HTML ContextMenu event\n */\n ContextMenu = 16,\n\n /**\n * Editor has entered shadow edit mode\n */\n EnteredShadowEdit = 17,\n\n /**\n * Editor is about to leave shadow edit mode\n */\n LeavingShadowEdit = 18,\n\n /**\n * Content of image is being changed from client side\n */\n EditImage = 19,\n\n /**\n * Content of editor is about to be cleared by SetContent API, handle this event to cache anything you need\n * before it is gone\n */\n BeforeSetContent = 20,\n\n /**\n * Zoom scale value is changed, triggered by Editor.setZoomScale() when set a different scale number\n */\n ZoomChanged = 21,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor changed the selection.\n */\n SelectionChanged = 22,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor content is about to be changed by keyboard event.\n * This is only used by Content Model editing\n */\n BeforeKeyboardEditing = 23,\n}\r\n","/**\r\n * Represent the type of a position\r\n */\r\nexport enum CompatiblePositionType {\r\n\r\n /**\r\n * At the beginning of a node\r\n */\r\n Begin = 0,\r\n\r\n /**\r\n * At the end of a node\r\n */\r\n End = -1,\r\n\r\n /**\r\n * Before a node\r\n */\r\n Before = -2,\r\n\r\n /**\r\n * After a node\r\n */\r\n After = -3,\r\n}\r\n","/**\r\n * Query scope for queryElements() API\r\n */\r\nexport enum CompatibleQueryScope {\r\n\r\n /**\r\n * Query from the whole body of root node. This is default value.\r\n */\r\n Body,\r\n\r\n /**\r\n * Query elements on a given selection (intersect)\r\n * The result element can contain the selection, contain part of selection, or inside selection\r\n */\r\n OnSelection,\r\n\r\n /**\r\n * Query elements inside a given selection only\r\n */\r\n InSelection,\r\n}\r\n","/**\n * Type of all possible regions. Currently we only support region of Table\n */\r\nexport enum CompatibleRegionType {\r\n\n /**\n * Region split by Table\n */\n Table,\n}\r\n","/**\n * Types of Selection Ranges that the SelectionRangeEx can return\n */\r\nexport enum CompatibleSelectionRangeTypes {\r\n\n /**\n * Normal selection range provided by browser.\n */\n Normal,\n /**\n * Selection made inside of a single table.\n */\n TableSelection,\n /**\n * Selection made in a image.\n */\n ImageSelection,\n}\r\n","/**\n * Table format border\n */\r\nexport enum CompatibleTableBorderFormat {\r\n\n /**\n * All border of the table are displayed\n * __ __ __\n * |__|__|__|\n * |__|__|__|\n * |__|__|__|\n */\n DEFAULT,\n\n /**\n * Middle vertical border are not displayed\n * __ __ __\n * |__ __ __|\n * |__ __ __|\n * |__ __ __|\n */\n LIST_WITH_SIDE_BORDERS,\n\n /**\n * All borders except header rows borders are displayed\n * __ __ __\n * __|__|__\n * __|__|__\n */\n NO_HEADER_BORDERS,\n\n /**\n * The left and right border of the table are not displayed\n * __ __ __\n * __|__|__\n * __|__|__\n * __|__|__\n */\n NO_SIDE_BORDERS,\n\n /**\n * Only the borders that divides the header row, first column and externals are displayed\n * __ __ __\n * |__ __ __|\n * | | |\n * |__|__ __|\n */\n FIRST_COLUMN_HEADER_EXTERNAL,\n\n /**\n * The header row has no vertical border, except for the first one\n * The first column has no horizontal border, except for the first one\n * __ __ __\n * |__ __ __\n * | |__|__|\n * | |__|__|\n */\n ESPECIAL_TYPE_1,\n\n /**\n * The header row has no vertical border, except for the first one\n * The only horizontal border of the table is the top and bottom of header row\n * __ __ __\n * |__ __ __\n * | | |\n * | | |\n */\n ESPECIAL_TYPE_2,\n\n /**\n * The only borders are the bottom of header row and the right border of first column\n * __ __ __\n * |\n * |\n */\n ESPECIAL_TYPE_3,\n\n /**\n * No border\n */\n CLEAR,\n}\r\n","/**\r\n * Operations used by editTable() API\r\n */\r\nexport enum CompatibleTableOperation {\r\n\r\n /**\r\n * Insert a row above current row\r\n */\r\n InsertAbove,\r\n\r\n /**\r\n * Insert a row below current row\r\n */\r\n InsertBelow,\r\n\r\n /**\r\n * Insert a column on the left of current column\r\n */\r\n InsertLeft,\r\n\r\n /**\r\n * Insert a column on the right of current column\r\n */\r\n InsertRight,\r\n\r\n /**\r\n * Delete the whole table\r\n */\r\n DeleteTable,\r\n\r\n /**\r\n * Delete current column\r\n */\r\n DeleteColumn,\r\n\r\n /**\r\n * Delete current row\r\n */\r\n DeleteRow,\r\n\r\n /**\r\n * Merge current row with the row above\r\n */\r\n MergeAbove,\r\n\r\n /**\r\n * Merge current row with the row below\r\n */\r\n MergeBelow,\r\n\r\n /**\r\n * Merge current column with the column on the left\r\n */\r\n MergeLeft,\r\n\r\n /**\r\n * Merge current column with the column on the right\r\n */\r\n MergeRight,\r\n\r\n /**\r\n * Merge all selected cells\r\n */\r\n MergeCells,\r\n\r\n /**\r\n * Split current table cell horizontally\r\n */\r\n SplitHorizontally,\r\n\r\n /**\r\n * Split current table cell vertically\r\n */\r\n SplitVertically,\r\n\r\n /**\r\n * Align current table at the center\r\n */\r\n AlignCenter,\r\n\r\n /**\r\n * Align current table at the left\r\n */\r\n AlignLeft,\r\n\r\n /**\r\n * Align current table at the right\r\n */\r\n AlignRight,\r\n\r\n /**\r\n * Align current content table cell at the left\r\n */\r\n AlignCellLeft,\r\n\r\n /**\r\n * Align current content table cell at the center\r\n */\r\n AlignCellCenter,\r\n\r\n /**\r\n * Align current content table cell at the right\r\n */\r\n AlignCellRight,\r\n\r\n /**\r\n * Align current content table cell at the top\r\n */\r\n AlignCellTop,\r\n\r\n /**\r\n * Align current table cell at the middle\r\n */\r\n AlignCellMiddle,\r\n\r\n /**\r\n * Align current table cell at the bottom\r\n */\r\n AlignCellBottom,\r\n}\r\n","export { CompatibleAlignment } from './Alignment'\r\nexport { CompatibleBulletListType } from './BulletListType'\r\nexport { CompatibleCapitalization } from './Capitalization'\r\nexport { CompatibleChangeSource } from './ChangeSource'\r\nexport { CompatibleClearFormatMode } from './ClearFormatMode'\r\nexport { CompatibleColorTransformDirection } from './ColorTransformDirection'\r\nexport { CompatibleContentPosition } from './ContentPosition'\r\nexport { CompatibleContentTypePrefix, CompatibleContentType } from './ContentType'\r\nexport { CompatibleDarkModeDatasetNames } from './DarkModeDatasetNames'\r\nexport { CompatibleDefinitionType } from './DefinitionType'\r\nexport { CompatibleDelimiterClasses } from './DelimiterClasses'\r\nexport { CompatibleDirection } from './Direction'\r\nexport { CompatibleDocumentCommand } from './DocumentCommand'\r\nexport { CompatibleDocumentPosition } from './DocumentPosition'\r\nexport { CompatibleEntityClasses } from './EntityClasses'\r\nexport { CompatibleEntityOperation } from './EntityOperation'\r\nexport { CompatibleExperimentalFeatures } from './ExperimentalFeatures'\r\nexport { CompatibleFontSizeChange } from './FontSizeChange'\r\nexport { CompatibleGetContentMode } from './GetContentMode'\r\nexport { CompatibleImageEditOperation } from './ImageEditOperation'\r\nexport { CompatibleIndentation } from './Indentation'\r\nexport { CompatibleKeys } from './Keys'\r\nexport { CompatibleKnownCreateElementDataIndex } from './KnownCreateElementDataIndex'\r\nexport { CompatibleKnownPasteSourceType } from './KnownPasteSourceType'\r\nexport { CompatibleListType } from './ListType'\r\nexport { CompatibleNodeType } from './NodeType'\r\nexport { CompatibleNumberingListType } from './NumberingListType'\r\nexport { CompatiblePasteType } from './PasteType'\r\nexport { CompatiblePluginEventType } from './PluginEventType'\r\nexport { CompatiblePositionType } from './PositionType'\r\nexport { CompatibleQueryScope } from './QueryScope'\r\nexport { CompatibleRegionType } from './RegionType'\r\nexport { CompatibleSelectionRangeTypes } from './SelectionRangeTypes'\r\nexport { CompatibleTableBorderFormat } from './TableBorderFormat'\r\nexport { CompatibleTableOperation } from './TableOperation'\r\n","export * from './browser/index';\nexport * from './corePluginState/index';\nexport * from './compatibleEnum/index';\nexport * from './event/index';\nexport * from './interface/index';\nexport * from './type/index';\n","/**\r\n * enum for setting block alignment, used by setAlignment API\r\n */\r\nexport const enum Alignment {\r\n /**\r\n * Align left\r\n */\r\n Left,\r\n\r\n /**\r\n * Align center\r\n */\r\n Center,\r\n\r\n /**\r\n * Align right\r\n */\r\n Right,\r\n}\r\n","/**\n * Enum used to control the different types of bullet list\n */\nexport const enum BulletListType {\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Bullet triggered by *\n */\n Disc = 1,\n\n /**\n * Bullet triggered by -\n */\n Dash = 2,\n\n /**\n * Bullet triggered by --\n */\n Square = 3,\n\n /**\n * Bullet triggered by >\n */\n ShortArrow = 4,\n\n /**\n * Bullet triggered by ->\n */\n LongArrow = 5,\n\n /**\n * Bullet triggered by =>\n */\n UnfilledArrow = 6,\n\n /**\n * Bullet triggered by —\n */\n Hyphen = 7,\n\n /**\n * Bullet triggered by -->\n */\n DoubleLongArrow = 8,\n\n /**\n * Bullet type circle\n */\n Circle = 9,\n\n /**\n * Maximum value of the enum\n */\n Max = 9,\n}\n","/**\n * The enum used for controlling the capitalization of text.\n * Used by changeCapitalization API\n */\nexport const enum Capitalization {\n /**\n * Transforms the first character after punctuation mark followed by space\n * to uppercase and the rest of characters to lowercase.\n */\n Sentence = 'sentence',\n\n /**\n * Transforms all characters to lowercase\n */\n Lowercase = 'lowercase',\n\n /**\n * Transforms all characters to uppercase\n */\n Uppercase = 'uppercase',\n\n /**\n * Transforms the first character of each word to uppercase\n */\n CapitalizeEachWord = 'capitalize',\n}\n","/**\r\n * Possible change sources. Here are the predefined sources.\r\n * It can also be other string if the change source can't fall into these sources.\r\n */\r\nexport const enum ChangeSource {\r\n /**\r\n * Content changed by auto link\r\n */\r\n AutoLink = 'AutoLink',\r\n\r\n /**\r\n * Content changed by create link\r\n */\r\n CreateLink = 'CreateLink',\r\n\r\n /**\r\n * Content changed by format\r\n */\r\n Format = 'Format',\r\n\r\n /**\r\n * Content changed by image resize\r\n */\r\n ImageResize = 'ImageResize',\r\n\r\n /**\r\n * Content changed by paste\r\n */\r\n Paste = 'Paste',\r\n\r\n /**\r\n * Content changed by setContent API\r\n */\r\n SetContent = 'SetContent',\r\n\r\n /**\r\n * Content changed by cut operation\r\n */\r\n Cut = 'Cut',\r\n\r\n /**\r\n * Content changed by drag & drop operation\r\n */\r\n Drop = 'Drop',\r\n\r\n /**\r\n * Insert a new entity into editor\r\n */\r\n InsertEntity = 'InsertEntity',\r\n\r\n /**\r\n * Editor is switched to dark mode, content color is changed\r\n */\r\n SwitchToDarkMode = 'SwitchToDarkMode',\r\n\r\n /**\r\n * Editor is switched to light mode, content color is changed\r\n */\r\n SwitchToLightMode = 'SwitchToLightMode',\r\n\r\n /**\r\n * List chain reorganized numbers of lists\r\n */\r\n ListChain = 'ListChain',\r\n\r\n /**\r\n * Keyboard event, used by Content Model.\r\n * Data of this event will be the key code number\r\n */\r\n Keyboard = 'Keyboard',\r\n}\r\n","/**\n * Represents the strategy to clear the format of the current editor selection\n */\nexport const enum ClearFormatMode {\n /**\n * Inline format. Remove text format.\n */\n Inline,\n\n /**\n * BLock format. Remove text and structure format of the block.\n */\n Block,\n\n /**\n * Detect Inline or Block format based on the current editor selector.\n */\n AutoDetect,\n}\n","/**\n * Represents the mode of color transformation\n */\nexport const enum ColorTransformDirection {\n /**\n * Transform from light to dark\n */\n LightToDark = 0,\n\n /**\n * Transform from dark to light\n */\n DarkToLight = 1,\n}\n","/**\r\n * The position. Mostly used for content insertion and traversing\r\n * On insertion, we will need to specify where we want the content to be placed (begin, end, selection or outside)\r\n * On content traversing, we will need to specify the start position of traversing\r\n */\r\nexport const enum ContentPosition {\r\n /**\r\n * Begin of the container\r\n */\r\n Begin,\r\n\r\n /**\r\n * End of the container\r\n */\r\n End,\r\n\r\n /**\r\n * End of the content div domain.\r\n */\r\n DomEnd,\r\n\r\n /**\r\n * Selection start\r\n */\r\n SelectionStart,\r\n\r\n /**\r\n * Outside of editor\r\n */\r\n Outside,\r\n\r\n /**\r\n * Manually defined range\r\n */\r\n Range,\r\n}\r\n","/**\n * Prefix of content types\n */\nexport const enum ContentTypePrefix {\n /**\n * Text type prefix\n */\n Text = 'text/',\n\n /**\n * Image type prefix\n */\n Image = 'image/',\n}\n\n/**\n * Known content types\n */\nexport const enum ContentType {\n /**\n * Plain text content type\n */\n PlainText = 'text/plain',\n\n /**\n * HTML content type\n */\n HTML = 'text/html',\n}\n","/**\n * @deprecated\n * Constants string for dataset names used by dark mode\n */\nexport const enum DarkModeDatasetNames {\n /**\n * Original style text color\n */\n OriginalStyleColor = 'ogsc',\n\n /**\n * Original style background color\n */\n OriginalStyleBackgroundColor = 'ogsb',\n\n /**\n * Original attribute text color\n */\n OriginalAttributeColor = 'ogac',\n\n /**\n * Original attribute background color\n */\n OriginalAttributeBackgroundColor = 'ogab',\n}\n","/**\n * Types of definitions, used by Definition type\n */\nexport const enum DefinitionType {\n /**\n * Boolean type definition, represents a boolean type value\n */\n Boolean,\n\n /**\n * Number type definition, represents a number type value\n */\n Number,\n\n /**\n * String type definition, represents a string type value\n */\n String,\n\n /**\n * Array type definition, represents an array with a given item type\n */\n Array,\n\n /**\n * Object type definition, represents an object with the given property types\n */\n Object,\n\n /**\n * Customize type definition, represents a customized type with a validator function\n */\n Customize,\n}\n","/**\n * Class names for Delimiter\n */\nexport const enum DelimiterClasses {\n /**\n * Class name to specify this delimiter is before an entity\n */\n DELIMITER_BEFORE = 'entityDelimiterBefore',\n\n /**\n * Class name to specify this delimiter is after an entity\n */\n DELIMITER_AFTER = 'entityDelimiterAfter',\n}\n","/**\r\n * enum for setting block direction, used by setDirection API\r\n */\r\nexport const enum Direction {\r\n /**\r\n * Left to right\r\n */\r\n LeftToRight,\r\n\r\n /**\r\n * Right to left\r\n */\r\n RightToLeft,\r\n}\r\n","/**\n * Command strings for Document.execCommand() API\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand\n */\nexport const enum DocumentCommand {\n /**\n * Changes the browser auto-link behavior (Internet Explorer only)\n */\n AutoUrlDetect = 'AutoUrlDetect',\n\n /**\n * Changes the document background color. In styleWithCss mode, it affects the background color of the containing block instead.\n * This requires a <color> value string to be passed in as a value argument. Note that Internet Explorer uses this to set the\n * text background color.\n */\n BackColor = 'backColor',\n\n /**\n * Toggles bold on/off for the selection or at the insertion point. Internet Explorer uses the <strong> tag instead of <b>.\n */\n Bold = 'bold',\n\n /**\n * Clears all authentication credentials from the cache.\n */\n ClearAuthenticationCache = 'ClearAuthenticationCache',\n\n /**\n * Makes the content document either read-only or editable. This requires a boolean true/false as the value argument.\n * (Not supported by Internet Explorer.)\n */\n ContentReadOnly = 'contentReadOnly',\n\n /**\n * Copies the current selection to the clipboard. Conditions of having this behavior enabled vary from one browser to another,\n * and have evolved over time. Check the compatibility table to determine if you can use it in your case.\n */\n Copy = 'copy',\n\n /**\n * Creates an hyperlink from the selection, but only if there is a selection. Requires a URI string as a value argument for the\n * hyperlink's href. The URI must contain at least a single character, which may be whitespace.\n * (Internet Explorer will create a link with a null value.)\n */\n CreateLink = 'createLink',\n\n /**\n * Removes the current selection and copies it to the clipboard. When this behavior is enabled varies between browsers,\n * and its conditions have evolved over time. Check the compatibility table for usage details.\n */\n Cut = 'cut',\n\n /**\n * Adds a <small> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n DecreaseFontSize = 'decreaseFontSize',\n\n /**\n * Changes the paragraph separator used when new paragraphs are created in editable text regions. See Differences in markup\n * generation for more details.\n */\n DefaultParagraphSeparator = 'defaultParagraphSeparator',\n\n /**\n * Deletes the current selection.\n */\n Delete = 'delete',\n\n /**\n * Enables or disables the table row/column insertion and deletion controls. (Not supported by Internet Explorer.)\n */\n EnableInlineTableEditing = 'enableInlineTableEditing',\n\n /**\n * Enables or disables the resize handles on images and other resizable objects. (Not supported by Internet Explorer.)\n */\n EnableObjectResizing = 'enableObjectResizing',\n\n /**\n * Changes the font name for the selection or at the insertion point. This requires a font name string (like \"Arial\")\n * as a value argument.\n */\n FontName = 'fontName',\n\n /**\n * Changes the font size for the selection or at the insertion point. This requires an integer from 1-7 as a value argument.\n */\n FontSize = 'fontSize',\n\n /**\n * Changes a font color for the selection or at the insertion point. This requires a hexadecimal color value string\n * as a value argument.\n */\n ForeColor = 'foreColor',\n\n /**\n * Adds an HTML block-level element around the line containing the current selection, replacing the block element containing\n * the line if one exists (in Firefox, <blockquote> is the exception — it will wrap any containing block element).\n * Requires a tag-name string as a value argument. Virtually all block-level elements can be used.\n * (Internet Explorer supports only heading tags H1–H6, ADDRESS, and PRE, which must be wrapped in angle brackets, such as \"<H1>\".)\n */\n FormatBlock = 'formatBlock',\n\n /**\n * Deletes the character ahead of the cursor's position, identical to hitting the Delete key on a Windows keyboard.\n */\n ForwardDelete = 'forwardDelete',\n\n /**\n * Adds a heading element around a selection or insertion point line. Requires the tag-name strings a value argument (i.e. \"H1\", \"H6\").\n * (Not supported by Internet Explorer and Safari.)\n */\n Heading = 'heading',\n\n /**\n * Changes the background color for the selection or at the insertion point. Requires a color value string as a value argument.\n * useCSS must be true for this to function. (Not supported by Internet Explorer.)\n */\n HiliteColor = 'hiliteColor',\n\n /**\n * Adds a <big> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n IncreaseFontSize = 'increaseFontSize',\n\n /**\n * Indents the line containing the selection or insertion point. In Firefox, if the selection spans multiple lines at different\n * levels of indentation, only the least indented lines in the selection will be indented.\n */\n Indent = 'indent',\n\n /**\n * Controls whether the Enter key inserts a <br> element, or splits the current block element into two.\n * (Not supported by Internet Explorer.)\n */\n InsertBrOnReturn = 'insertBrOnReturn',\n\n /**\n * Inserts a <hr> element at the insertion point, or replaces the selection with it.\n */\n InsertHorizontalRule = 'insertHorizontalRule',\n\n /**\n * Inserts an HTML string at the insertion point (deletes selection). Requires a valid HTML string as a value argument.\n * (Not supported by Internet Explorer.)\n */\n InsertHTML = 'insertHTML',\n\n /**\n * Inserts an image at the insertion point (deletes selection). Requires a URL string for the image's src as a value argument.\n * The requirements for this string are the same as createLink.\n */\n InsertImage = 'insertImage',\n\n /**\n * Creates a numbered ordered list for the selection or at the insertion point.\n */\n InsertOrderedList = 'insertOrderedList',\n\n /**\n * Creates a bulleted unordered list for the selection or at the insertion point.\n */\n InsertUnorderedList = 'insertUnorderedList',\n\n /**\n * Inserts a paragraph around the selection or the current line.\n * (Internet Explorer inserts a paragraph at the insertion point and deletes the selection.)\n */\n InsertParagraph = 'insertParagraph',\n\n /**\n * Inserts the given plain text at the insertion point (deletes selection).\n */\n InsertText = 'insertText',\n\n /**\n * Toggles italics on/off for the selection or at the insertion point.\n * (Internet Explorer uses the <em> element instead of <i>.)\n */\n Italic = 'italic',\n\n /**\n * Centers the selection or insertion point.\n */\n JustifyCenter = 'justifyCenter',\n\n /**\n * Justifies the selection or insertion point.\n */\n JustifyFull = 'justifyFull',\n\n /**\n * Justifies the selection or insertion point to the left.\n */\n JustifyLeft = 'justifyLeft',\n\n /**\n * Right-justifies the selection or the insertion point.\n */\n JustifyRight = 'justifyRight',\n\n /**\n * Outdents the line containing the selection or insertion point.\n */\n Outdent = 'outdent',\n\n /**\n * Pastes the clipboard contents at the insertion point (replaces current selection). Disabled for web content. See [1].\n */\n Paste = 'paste',\n\n /**\n * Redoes the previous undo command.\n */\n Redo = 'redo',\n\n /**\n * Removes all formatting from the current selection.\n */\n RemoveFormat = 'removeFormat',\n\n /**\n * Selects all of the content of the editable region.\n */\n SelectAll = 'selectAll',\n\n /**\n * Toggles strikethrough on/off for the selection or at the insertion point.\n */\n StrikeThrough = 'strikeThrough',\n\n /**\n * Toggles subscript on/off for the selection or at the insertion point.\n */\n Subscript = 'subscript',\n\n /**\n * Toggles superscript on/off for the selection or at the insertion point.\n */\n Superscript = 'superscript',\n\n /**\n * Toggles underline on/off for the selection or at the insertion point.\n */\n Underline = 'underline',\n\n /**\n * Undoes the last executed command.\n */\n Undo = 'undo',\n\n /**\n * Removes the anchor element from a selected hyperlink.\n */\n Unlink = 'unlink',\n\n /**\n * Replaces the useCSS command. true modifies/generates style attributes in markup, false generates presentational elements.\n */\n StyleWithCSS = 'styleWithCSS',\n}\n","/**\n * The is essentially an enum representing result from browser compareDocumentPosition API\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n */\nexport const enum DocumentPosition {\n /**\n * Same node\n */\n Same = 0,\n\n /**\n * Node is disconnected from document\n */\n Disconnected = 1,\n\n /**\n * Node is preceding the comparing node\n */\n Preceding = 2,\n\n /**\n * Node is following the comparing node\n */\n Following = 4,\n\n /**\n * Node contains the comparing node\n */\n Contains = 8,\n\n /**\n * Node is contained by the comparing node\n */\n ContainedBy = 16,\n}\n","/**\n * CSS Class names for Entity\n */\nexport const enum EntityClasses {\n /**\n * Class name to specify this is an entity\n */\n ENTITY_INFO_NAME = '_Entity',\n\n /**\n * Class name to specify the type of an entity\n */\n ENTITY_TYPE_PREFIX = '_EType_',\n\n /**\n * Class name to specify the ID of an entity\n */\n ENTITY_ID_PREFIX = '_EId_',\n\n /**\n * Class name to specify if the entity is readonly\n */\n ENTITY_READONLY_PREFIX = '_EReadonly_',\n}\n","/**\n * Define possible operations to an entity\n */\nexport const enum EntityOperation {\n /**\n * Notify plugins that there is a new plugin was added into editor.\n * Plugin can handle this event to entity hydration.\n * This event will be only fired once for each entity DOM node.\n * After undo, or copy/paste, since new DOM nodes were added, this event will be fired\n * for those entities represented by newly added nodes.\n */\n NewEntity,\n\n /**\n * Notify plugins that user is clicking target to an entity\n */\n Click,\n\n /**\n * Notify plugins that user is triggering context menu to an entity\n */\n ContextMenu,\n\n /**\n * Notify plugins that user is escaping from an entity by pressing ESC key\n */\n Escape,\n\n /**\n * Notify plugins that user is removing an entity from its start position using DELETE key\n */\n RemoveFromStart,\n\n /**\n * Notify plugins that user is remove an entity from its end position using BACKSPACE key\n */\n RemoveFromEnd,\n\n /**\n * Notify plugins that an entity is being overwritten.\n * This can be caused by key in, cut, paste, delete, backspace ... on a selection\n * which contains some entities.\n */\n Overwrite,\n\n /**\n * Notify plugins that an entity is being partially overwritten.\n * This happens when user selected part of the entity then do key press, or cut, paste, delete, backspace, ...\n */\n PartialOverwrite,\n\n /**\n * Notify plugins that editor is generating HTML content for save.\n * Plugin should use this event to remove any temporary content, and only leave DOM nodes that\n * should be saved as HTML string.\n * This event will provide a cloned DOM tree for each entity, do NOT compare the DOM nodes with cached nodes\n * because it will always return false.\n */\n ReplaceTemporaryContent,\n\n /**\n * @deprecated\n */\n AddShadowRoot,\n\n /**\n * @deprecated\n */\n RemoveShadowRoot,\n\n /**\n * Notify plugins that a new entity state need to be updated to an entity.\n * This is normally happened when user undo/redo the content with an entity snapshot added by a plugin that handles entity\n */\n UpdateEntityState,\n}\n","/**\n * Experimental feature flags\n */\nexport const enum ExperimentalFeatures {\n // #region Graduated and deprecated features.\n // These features will be removed in next major release\n /**\n * @deprecated This feature is always enabled\n */\n NewIndentation = 'NewIndentation',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewBullet = 'NewBullet',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewNumbering = 'NewNumbering',\n\n /**\n * @deprecated This feature is always enabled\n */\n ListChain = 'ListChain',\n\n /**\n * @deprecated This feature is always enabled\n */\n MergePastedLine = 'MergePastedLine',\n\n /**\n * @deprecated This feature is always enabled\n */\n SingleDirectionResize = 'SingleDirectionResize',\n\n /**\n * @deprecated This feature is always enabled\n */\n PasteWithLinkPreview = 'PasteWithLinkPreview',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageRotate = 'ImageRotate',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageCrop = 'ImageCrop',\n\n /**\n * @deprecated This feature is always enabled\n * Check if the element has a style attribute, if not, apply the default format\n */\n AlwaysApplyDefaultFormat = 'AlwaysApplyDefaultFormat',\n\n /**\n * @deprecated This feature can be enabled/disabled using Paste Plugin contructor param\n * Paste the Html instead of the Img when the Html Body only have one IMG Child node\n */\n ConvertSingleImageBody = 'ConvertSingleImageBody',\n\n /**\n * @deprecated This feature is always enabled\n * Align table elements to left, center and right using setAlignment API\n */\n TableAlignment = 'TableAlignment',\n\n /**\n * @deprecated this feature is always enabled\n * Provide a circular resize handles that adaptive the number od handles to the size of the image\n */\n AdaptiveHandlesResizer = 'AdaptiveHandlesResizer',\n\n /**\n * @deprecated this feature is always disabled\n * Automatically transform -- into hyphen, if typed between two words.\n */\n AutoHyphen = 'AutoHyphen',\n\n /**\n * @deprecated this feature is always disabled\n * Use pending format strategy to do style based format, e.g. Font size, Color.\n * With this feature enabled, we don't need to insert temp ZeroWidthSpace character to hold pending format\n * when selection is collapsed. Instead, we will hold the pending format in memory and only apply it when type something\n */\n PendingStyleBasedFormat = 'PendingStyleBasedFormat',\n\n /**\n * @deprecated this feature is always disabled\n * Normalize list to make sure it can be displayed correctly in other client\n * e.g. We will move list items with \"display: block\" into previous list item and change tag to be DIV\n */\n NormalizeList = 'NormalizeList',\n\n /**\n * @deprecated this feature is always enabled\n * When a html image is selected, the selected image data will be stored by editor core.\n */\n ImageSelection = 'ImageSelection',\n\n /**\n * @deprecated this feature is always enabled\n * Use variable-based dark mode solution rather than dataset-based solution.\n * When enable this feature, need to pass in a DarkModelHandler object to each call of setColor and applyFormat\n * if you need them work for dark mode\n */\n VariableBasedDarkColor = 'VariableBasedDarkColor',\n\n /**\n * @deprecated this feature is always enabled\n * Align list elements elements to left, center and right using setAlignment API\n */\n ListItemAlignment = 'ListItemAlignment',\n\n /**\n * @deprecated\n */\n DefaultFormatInSpan = 'DefaultFormatInSpan',\n\n /**\n * @deprecated\n */\n DefaultFormatOnContainer = 'DefaultFormatOnContainer',\n\n //#endregion\n\n /**\n * Provide additional Tab Key Features. Requires Text Features Content Editable Features\n */\n TabKeyTextFeatures = 'TabKeyTextFeatures',\n\n /**\n * Trigger formatting by a especial characters. Ex: (A), 1. i).\n */\n AutoFormatList = 'AutoFormatList',\n\n /**\n * With this feature enabled, when writing back a list item we will re-use all\n * ancestor list elements, even if they don't match the types currently in the\n * listTypes array for that item. The only list that we will ensure is correct\n * is the one closest to the item.\n */\n ReuseAllAncestorListElements = 'ReuseAllAncestorListElements',\n\n /**\n * Reuse existing DOM structure if possible when convert Content Model back to DOM tree\n */\n ReusableContentModel = 'ReusableContentModel',\n\n /**\n * Handle keyboard editing event with Content Model\n */\n EditWithContentModel = 'EditWithContentModel',\n\n /**\n * Delete table with Backspace key with the whole was selected with table selector\n */\n DeleteTableWithBackspace = 'DeleteTableWithBackspace',\n\n /**\n * Add entities around a Read Only Inline entity to prevent cursor to be hidden when cursor is next of it.\n */\n InlineEntityReadOnlyDelimiters = 'InlineEntityReadOnlyDelimiters',\n\n /**\n * Paste with Content model\n */\n ContentModelPaste = 'ContentModelPaste',\n\n /**\n * Disable list chain functionality\n */\n DisableListChain = 'DisableListChain',\n}\n","/**\r\n * The enum used for increase or decrease font size\r\n * Used by setFontSize API\r\n */\r\nexport const enum FontSizeChange {\r\n /**\r\n * Increase font size\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease font size\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Represents a mode number to indicate what kind of content to retrieve when call Editor.getContent()\n */\nexport const enum GetContentMode {\n /**\n * The clean content without any temporary content only for editor.\n * This is the default value. Call to Editor.getContent() with trigger an ExtractContentWithDom event\n * so that plugins can remove their temporary content, and will return the HTML content\n * which is ready for save to storage.\n */\n CleanHTML = 0,\n\n /**\n * Retrieve the raw HTML string in current editor. Temporary content will be included.\n */\n RawHTMLOnly = 1,\n\n /**\n * Retrieve the raw HTML string in current editor with a selection marker. This can be used for\n * save current editor state and call to SetContent with this result can fully restore editor state\n * including current selection\n */\n RawHTMLWithSelection = 2,\n\n /**\n * Get plain text content only, all format will be ignored\n */\n PlainText,\n\n /**\n * A fast way to get plain text content, the line-end positions may not be exactly same with HTML content,\n * but the text content should be the same. This is used for quickly retrieve text content and check\n * text only\n */\n PlainTextFast,\n}\n","/**\n * Operation flags for ImageEdit plugin\n */\nexport const enum ImageEditOperation {\n /**\n * No operation\n */\n None = 0,\n\n /**\n * Resize image from corner ( horizontal and vertical resize)\n */\n CornerResize = 1,\n\n /**\n * Resize image from side ( either horizontal or vertical resize)\n */\n SideResize = 2,\n\n /**\n * Image resize\n */\n Resize = CornerResize | SideResize,\n\n /**\n * Image rotate\n */\n Rotate = 4,\n\n /**\n * Image resize and rotate\n */\n ResizeAndRotate = Resize | Rotate,\n\n /**\n * Image crop\n */\n Crop = 8,\n\n /**\n * All operations\n */\n All = ResizeAndRotate | Crop,\n}\n","/**\r\n * The enum used for increase or decrease indentation of a block\r\n * Used by setIndentation API\r\n */\r\nexport const enum Indentation {\r\n /**\r\n * Increase indentation\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease indentation\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Key numbers common used keys\n */\nexport const enum Keys {\n NULL = 0,\n BACKSPACE = 8,\n TAB = 9,\n ENTER = 13,\n SHIFT = 16,\n CTRL_LEFT = 17,\n ALT = 18,\n ESCAPE = 27,\n SPACE = 32,\n PAGEUP = 33,\n END = 35,\n HOME = 36,\n LEFT = 37,\n UP = 38,\n RIGHT = 39,\n DOWN = 40,\n PRINT_SCREEN = 44,\n DELETE = 46,\n /**\n * @deprecated Just for backward compatibility\n */\n EIGHT_ASTIRISK = 56,\n EIGHT_ASTERISK = 56,\n B = 66,\n I = 73,\n U = 85,\n Y = 89,\n Z = 90,\n META_LEFT = 91,\n COMMA = 188,\n DASH_UNDERSCORE = 189,\n PERIOD = 190,\n /**\n * @deprecated Just for backward compatibility\n */\n FORWARDSLASH = 191,\n FORWARD_SLASH = 191,\n GRAVE_TILDE = 192,\n\n /**\n * Keys below are non-standard, and should be used in ContentEditFeatures only\n */\n CONTENTCHANGED = 0x101,\n RANGE = 0x102,\n\n Ctrl = 0x1000,\n Meta = 0x2000,\n Shift = 0x4000,\n}\n","/**\n * Index of known CreateElementData used by createElement function\n */\nexport const enum KnownCreateElementDataIndex {\n /**\n * Set a none value to help createElement function ignore falsy value\n */\n None = 0,\n\n /**\n * An empty line without format\n */\n EmptyLine = 1,\n\n /**\n * Wrapper for blockquote\n */\n BlockquoteWrapper = 2,\n\n /**\n * Temp DIV for copy/paste\n */\n CopyPasteTempDiv = 3,\n\n /**\n * ListItem with block style\n */\n BlockListItem = 4,\n\n /**\n * Wrapper element for context menu\n */\n ContextMenuWrapper = 5,\n\n /**\n * Wrapper element for image edit\n */\n ImageEditWrapper = 6,\n\n /**\n * @deprecated\n */\n TableHorizontalResizer = 7,\n\n /**\n * @deprecated\n */\n TableVerticalResizer = 8,\n\n /**\n * @deprecated\n */\n TableResizerLTR = 9,\n\n /**\n * @deprecated\n */\n TableResizerRTL = 10,\n\n /**\n * @deprecated\n */\n TableSelector = 11,\n\n /**\n * @deprecated\n */\n EmptyLineFormatInSpan = 12,\n}\n","/**\n * Represent the types of sources to handle in the Paste Plugin\n */\nexport const enum KnownPasteSourceType {\n WordDesktop,\n ExcelDesktop,\n ExcelOnline,\n PowerPointDesktop,\n GoogleSheets,\n WacComponents,\n Default,\n SingleImage,\n}\n","/**\n * Type of list (numbering or bullet)\n */\nexport const enum ListType {\n /**\n * None list type\n * It means this is not a list\n */\n None = 0,\n\n /**\n * Ordered List type (numbering list)\n * Represented by \"OL\" tag\n */\n Ordered = 1,\n\n /**\n * Unordered List type (bullet list)\n * Represented by \"UL\" tag\n */\n Unordered = 2,\n}\n","/**\n * The is essentially an enum represents the type of the node\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n * Values not listed here are deprecated.\n */\nexport const enum NodeType {\n /**\n * An Element node such as <p> or <div>.\n */\n Element = 1,\n\n /**\n * An Attribute node such as name=\"value\".\n */\n Attribute = 2,\n\n /**\n * The actual Text of Element or Attr.\n */\n Text = 3,\n\n /**\n * A ProcessingInstruction of an XML document such as <?xml-stylesheet ... ?> declaration.\n */\n ProcessingInstruction = 7,\n\n /**\n * A Comment node.\n */\n Comment = 8,\n\n /**\n * A Document node.\n */\n Document = 9,\n\n /**\n * A DocumentType node e.g. <!DOCTYPE html> for HTML5 documents.\n */\n DocumentType = 10,\n\n /**\n * A DocumentFragment node.\n */\n DocumentFragment = 11,\n}\n","/**\n * Enum used to control the different types of numbering list\n */\nexport const enum NumberingListType {\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Numbering triggered by 1.\n */\n Decimal = 1,\n\n /**\n * Numbering triggered by 1-\n */\n DecimalDash = 2,\n\n /**\n * Numbering triggered by 1)\n */\n DecimalParenthesis = 3,\n\n /**\n * Numbering triggered by (1)\n */\n DecimalDoubleParenthesis = 4,\n\n /**\n * Numbering triggered by a.\n */\n LowerAlpha = 5,\n\n /**\n * Numbering triggered by a)\n */\n LowerAlphaParenthesis = 6,\n\n /**\n * Numbering triggered by (a)\n */\n LowerAlphaDoubleParenthesis = 7,\n\n /**\n * Numbering triggered by a-\n */\n LowerAlphaDash = 8,\n\n /**\n * Numbering triggered by A.\n */\n UpperAlpha = 9,\n\n /**\n * Numbering triggered by A)\n */\n UpperAlphaParenthesis = 10,\n\n /**\n * Numbering triggered by (A)\n */\n UpperAlphaDoubleParenthesis = 11,\n\n /**\n * Numbering triggered by A-\n */\n UpperAlphaDash = 12,\n\n /**\n * Numbering triggered by i.\n */\n LowerRoman = 13,\n\n /**\n * Numbering triggered by i)\n */\n LowerRomanParenthesis = 14,\n\n /**\n * Numbering triggered by (i)\n */\n LowerRomanDoubleParenthesis = 15,\n\n /**\n * Numbering triggered by i-\n */\n LowerRomanDash = 16,\n\n /**\n * Numbering triggered by I.\n */\n UpperRoman = 17,\n\n /**\n * Numbering triggered by I)\n */\n UpperRomanParenthesis = 18,\n\n /**\n * Numbering triggered by (I)\n */\n UpperRomanDoubleParenthesis = 19,\n\n /**\n * Numbering triggered by I-\n */\n UpperRomanDash = 20,\n\n /**\n * Maximum value of the enum\n */\n Max = 20,\n}\n","/**\n * Enum for paste options\n */\nexport const enum PasteType {\n /**\n * Default paste behavior\n */\n Normal,\n\n /**\n * Paste only the plain text\n */\n AsPlainText,\n\n /**\n * Apply the current style to pasted content\n */\n MergeFormat,\n\n /**\n * If there is a image uri in the clipboard, paste the content as image element\n */\n AsImage,\n}\n","/**\n * Editor plugin event type\n */\nexport const enum PluginEventType {\n /**\n * HTML KeyDown event\n */\n KeyDown = 0,\n\n /**\n * HTML KeyPress event\n */\n KeyPress = 1,\n\n /**\n * HTML KeyUp event\n */\n KeyUp = 2,\n\n /**\n * HTML Input / TextInput event\n */\n Input = 3,\n\n /**\n * HTML CompositionEnd event\n */\n CompositionEnd = 4,\n\n /**\n * HTML MouseDown event\n */\n MouseDown = 5,\n\n /**\n * HTML MouseUp event\n */\n MouseUp = 6,\n\n /**\n * Content changed event\n */\n ContentChanged = 7,\n\n /**\n * Extract Content with a DOM tree event\n * This event is triggered when getContent() is called with triggerExtractContentEvent = true\n * Plugin can handle this event to remove the UI only markups to return clean HTML\n * by operating on a cloned DOM tree\n */\n ExtractContentWithDom = 8,\n\n /**\n * Before Paste event, provide a chance to change copied content\n */\n BeforeCutCopy = 9,\n\n /**\n * Before Paste event, provide a chance to change paste content\n */\n BeforePaste = 10,\n\n /**\n * Let plugin know editor is ready now\n */\n EditorReady = 11,\n\n /**\n * Let plugin know editor is about to dispose\n */\n BeforeDispose = 12,\n\n /**\n * Pending format state (bold, italic, underline, ... with collapsed selection) is changed\n */\n PendingFormatStateChanged = 13,\n\n /**\n * Scroll event triggered by scroll container\n */\n Scroll = 14,\n\n /**\n * Operating on an entity. See enum EntityOperation for more details about each operation\n */\n EntityOperation = 15,\n\n /**\n * HTML ContextMenu event\n */\n ContextMenu = 16,\n\n /**\n * Editor has entered shadow edit mode\n */\n EnteredShadowEdit = 17,\n\n /**\n * Editor is about to leave shadow edit mode\n */\n LeavingShadowEdit = 18,\n\n /**\n * Content of image is being changed from client side\n */\n EditImage = 19,\n\n /**\n * Content of editor is about to be cleared by SetContent API, handle this event to cache anything you need\n * before it is gone\n */\n BeforeSetContent = 20,\n\n /**\n * Zoom scale value is changed, triggered by Editor.setZoomScale() when set a different scale number\n */\n ZoomChanged = 21,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor changed the selection.\n */\n SelectionChanged = 22,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor content is about to be changed by keyboard event.\n * This is only used by Content Model editing\n */\n BeforeKeyboardEditing = 23,\n}\n","/**\r\n * Represent the type of a position\r\n */\r\nexport const enum PositionType {\r\n /**\r\n * At the beginning of a node\r\n */\r\n Begin = 0,\r\n\r\n /**\r\n * At the end of a node\r\n */\r\n End = -1,\r\n\r\n /**\r\n * Before a node\r\n */\r\n Before = -2,\r\n\r\n /**\r\n * After a node\r\n */\r\n After = -3,\r\n}\r\n","/**\r\n * Query scope for queryElements() API\r\n */\r\nexport const enum QueryScope {\r\n /**\r\n * Query from the whole body of root node. This is default value.\r\n */\r\n Body,\r\n\r\n /**\r\n * Query elements on a given selection (intersect)\r\n * The result element can contain the selection, contain part of selection, or inside selection\r\n */\r\n OnSelection,\r\n\r\n /**\r\n * Query elements inside a given selection only\r\n */\r\n InSelection,\r\n}\r\n","/**\n * Type of all possible regions. Currently we only support region of Table\n */\nexport const enum RegionType {\n /**\n * Region split by Table\n */\n Table,\n}\n","/**\n * Types of Selection Ranges that the SelectionRangeEx can return\n */\nexport const enum SelectionRangeTypes {\n /**\n * Normal selection range provided by browser.\n */\n Normal,\n /**\n * Selection made inside of a single table.\n */\n TableSelection,\n /**\n * Selection made in a image.\n */\n ImageSelection,\n}\n","/**\n * Table format border\n */\nexport const enum TableBorderFormat {\n /**\n * All border of the table are displayed\n * __ __ __\n * |__|__|__|\n * |__|__|__|\n * |__|__|__|\n */\n DEFAULT,\n\n /**\n * Middle vertical border are not displayed\n * __ __ __\n * |__ __ __|\n * |__ __ __|\n * |__ __ __|\n */\n LIST_WITH_SIDE_BORDERS,\n\n /**\n * All borders except header rows borders are displayed\n * __ __ __\n * __|__|__\n * __|__|__\n */\n NO_HEADER_BORDERS,\n\n /**\n * The left and right border of the table are not displayed\n * __ __ __\n * __|__|__\n * __|__|__\n * __|__|__\n */\n NO_SIDE_BORDERS,\n\n /**\n * Only the borders that divides the header row, first column and externals are displayed\n * __ __ __\n * |__ __ __|\n * | | |\n * |__|__ __|\n */\n FIRST_COLUMN_HEADER_EXTERNAL,\n\n /**\n * The header row has no vertical border, except for the first one\n * The first column has no horizontal border, except for the first one\n * __ __ __\n * |__ __ __\n * | |__|__|\n * | |__|__|\n */\n ESPECIAL_TYPE_1,\n\n /**\n * The header row has no vertical border, except for the first one\n * The only horizontal border of the table is the top and bottom of header row\n * __ __ __\n * |__ __ __\n * | | |\n * | | |\n */\n ESPECIAL_TYPE_2,\n\n /**\n * The only borders are the bottom of header row and the right border of first column\n * __ __ __\n * |\n * |\n */\n ESPECIAL_TYPE_3,\n\n /**\n * No border\n */\n CLEAR,\n}\n","/**\r\n * Operations used by editTable() API\r\n */\r\nexport const enum TableOperation {\r\n /**\r\n * Insert a row above current row\r\n */\r\n InsertAbove,\r\n\r\n /**\r\n * Insert a row below current row\r\n */\r\n InsertBelow,\r\n\r\n /**\r\n * Insert a column on the left of current column\r\n */\r\n InsertLeft,\r\n\r\n /**\r\n * Insert a column on the right of current column\r\n */\r\n InsertRight,\r\n\r\n /**\r\n * Delete the whole table\r\n */\r\n DeleteTable,\r\n\r\n /**\r\n * Delete current column\r\n */\r\n DeleteColumn,\r\n\r\n /**\r\n * Delete current row\r\n */\r\n DeleteRow,\r\n\r\n /**\r\n * Merge current row with the row above\r\n */\r\n MergeAbove,\r\n\r\n /**\r\n * Merge current row with the row below\r\n */\r\n MergeBelow,\r\n\r\n /**\r\n * Merge current column with the column on the left\r\n */\r\n MergeLeft,\r\n\r\n /**\r\n * Merge current column with the column on the right\r\n */\r\n MergeRight,\r\n\r\n /**\r\n * Merge all selected cells\r\n */\r\n MergeCells,\r\n\r\n /**\r\n * Split current table cell horizontally\r\n */\r\n SplitHorizontally,\r\n\r\n /**\r\n * Split current table cell vertically\r\n */\r\n SplitVertically,\r\n\r\n /**\r\n * Align current table at the center\r\n */\r\n AlignCenter,\r\n\r\n /**\r\n * Align current table at the left\r\n */\r\n AlignLeft,\r\n\r\n /**\r\n * Align current table at the right\r\n */\r\n AlignRight,\r\n\r\n /**\r\n * Align current content table cell at the left\r\n */\r\n AlignCellLeft,\r\n\r\n /**\r\n * Align current content table cell at the center\r\n */\r\n AlignCellCenter,\r\n\r\n /**\r\n * Align current content table cell at the right\r\n */\r\n AlignCellRight,\r\n\r\n /**\r\n * Align current content table cell at the top\r\n */\r\n AlignCellTop,\r\n\r\n /**\r\n * Align current table cell at the middle\r\n */\r\n AlignCellMiddle,\r\n\r\n /**\r\n * Align current table cell at the bottom\r\n */\r\n AlignCellBottom,\r\n}\r\n","export { DocumentCommand } from './DocumentCommand';\nexport { DocumentPosition } from './DocumentPosition';\nexport { Keys } from './Keys';\nexport { NodeType } from './NodeType';\nexport { ContentTypePrefix, ContentType } from './ContentType';\nexport { Alignment } from './Alignment';\nexport { ChangeSource } from './ChangeSource';\nexport { ColorTransformDirection } from './ColorTransformDirection';\nexport { ContentPosition } from './ContentPosition';\nexport { DarkModeDatasetNames } from './DarkModeDatasetNames';\nexport { DelimiterClasses } from './DelimiterClasses';\nexport { Direction } from './Direction';\nexport { EntityClasses } from './EntityClasses';\nexport { EntityOperation } from './EntityOperation';\nexport { ExperimentalFeatures } from './ExperimentalFeatures';\nexport { FontSizeChange } from './FontSizeChange';\nexport { GetContentMode } from './GetContentMode';\nexport { Indentation } from './Indentation';\nexport { Capitalization } from './Capitalization';\nexport { ListType } from './ListType';\nexport { PositionType } from './PositionType';\nexport { QueryScope } from './QueryScope';\nexport { RegionType } from './RegionType';\nexport { TableOperation } from './TableOperation';\nexport { ImageEditOperation } from './ImageEditOperation';\nexport { ClearFormatMode } from './ClearFormatMode';\nexport { KnownCreateElementDataIndex } from './KnownCreateElementDataIndex';\nexport { KnownPasteSourceType } from './KnownPasteSourceType';\nexport { TableBorderFormat } from './TableBorderFormat';\nexport { PluginEventType } from './PluginEventType';\nexport { SelectionRangeTypes } from './SelectionRangeTypes';\nexport { NumberingListType } from './NumberingListType';\nexport { BulletListType } from './BulletListType';\nexport { DefinitionType } from './DefinitionType';\nexport { PasteType } from './PasteType';\n","export * from './browser/index';\r\nexport * from './corePluginState/index';\r\nexport * from './enum/index';\r\nexport * from './event/index';\r\nexport * from './interface/index';\r\nexport * from './type/index';\r\n","import { Editor } from 'roosterjs-editor-core';\r\nimport { EditorOptions, EditorPlugin, IEditor } from 'roosterjs-editor-types';\r\nimport { getDarkColor } from 'roosterjs-color-utils';\r\nimport { ContentEdit, HyperLink, Paste } from 'roosterjs-editor-plugins';\r\n\r\n/**\r\n * Create an editor instance with most common options\r\n * @param contentDiv The html div element needed for creating the editor\r\n * @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are\r\n * ContentEdit, HyperLink and Paste, user don't need to add those.\r\n * @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.\r\n * @returns The editor instance\r\n */\r\nexport default function createEditor(\r\n contentDiv: HTMLDivElement,\r\n additionalPlugins?: EditorPlugin[],\r\n initialContent?: string\r\n): IEditor {\r\n let plugins: EditorPlugin[] = [new HyperLink(), new Paste(), new ContentEdit()];\r\n\r\n if (additionalPlugins) {\r\n plugins = plugins.concat(additionalPlugins);\r\n }\r\n\r\n let options: EditorOptions = {\r\n plugins: plugins,\r\n initialContent: initialContent,\r\n getDarkColor: getDarkColor,\r\n defaultFormat: {\r\n fontFamily: 'Calibri,Arial,Helvetica,sans-serif',\r\n fontSize: '11pt',\r\n textColor: '#000000',\r\n },\r\n };\r\n return new Editor(contentDiv, options);\r\n}\r\n","export { default as createEditor } from './createEditor';\r\nexport * from 'roosterjs-editor-types';\r\nexport * from 'roosterjs-editor-types-compatible';\r\nexport * from 'roosterjs-editor-dom';\r\nexport * from 'roosterjs-editor-core';\r\nexport * from 'roosterjs-editor-api';\r\nexport * from 'roosterjs-editor-plugins';\r\nexport * from 'roosterjs-color-utils';\r\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(8608);\n"],"names":["cssKeywords","reverseKeywords","key","hasOwnProperty","convert","module","exports","rgb","channels","labels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","keyword","ansi16","ansi256","hcg","apple","gray","model","Error","length","Object","defineProperty","value","h","l","r","g","b","min","Math","max","delta","rdif","gdif","bdif","s","v","diff","diffc","c","k","reversed","currentClosestKeyword","x","y","currentClosestDistance","Infinity","distance","pow","z","t1","t2","t3","val","i","smin","lmin","hi","floor","f","p","q","t","sl","vmin","n","wh","bl","ratio","m","y2","x2","z2","a","atan2","PI","sqrt","hr","cos","sin","args","arguments","round","ansi","color","mult","rem","string","toString","toUpperCase","substring","match","colorString","split","map","char","join","integer","parseInt","hue","chroma","mg","pure","w","conversions","route","keys","forEach","fromModel","routes","toModel","fn","wrappedFn","Array","prototype","slice","call","result","len","conversion","wrapRounded","raw","wrapRaw","link","from","to","wrapConversion","graph","path","parent","cur","unshift","models","buildGraph","queue","current","pop","adjacents","adjacent","node","deriveBFS","colorNames","swizzle","reverseNames","name","cs","get","clamp","num","hexDouble","str","toLowerCase","hexAlpha","i2","parseFloat","alpha","isNaN","rgba","percent","hsla","hwba","_slice","skippedModels","hashedModelKeys","sort","limiters","Color","obj","this","valpha","newArr","zeroArray","splice","indexOf","hashedKeys","JSON","stringify","push","limit","freeze","getset","channel","modifier","isArray","maxfn","arr","toJSON","places","self","concat","percentString","array","object","unitArray","unitObject","Number","toFixed","roundTo","roundToPlace","red","green","blue","saturationl","lightness","saturationv","white","wblack","cyan","magenta","yellow","black","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","isDark","isLight","negate","lighten","darken","saturate","desaturate","whiten","blacken","grayscale","fade","opaquer","rotate","degrees","mix","mixinColor","weight","color1","undefined","w1","w2","newAlpha","Function","getOwnPropertyDescriptor","constructor","isArrayish","results","arg","wrap","default","baseLValue","computedColor","colorLab","newLValue","editor","capitalization","language","getCapitalizedText","originalText","toLocaleLowerCase","toLocaleUpperCase","wordArray","charAt","regex","RegExp","replace","element","getFirstLeafNode","getNextLeafSibling","nodeType","textContent","FONT_SIZES","getNewFontSize","pt","changeBase","fontSizes","ceil","last","change","getComputedStyle","style","fontSize","lineHeight","STYLES_TO_REMOVE","TAGS_TO_UNWRAP","ATTRIBUTES_TO_PRESERVE","TAGS_TO_STOP_UNWRAP","clearNodeFormat","areAllChildrenBlock","toArray","childNodes","every","returnBlockElement","isBlockElement","tag","getTagOfNode","isVoidHtmlElement","unwrap","isTableCell","safeInstanceOf","isTable","attributes","attr","removeNonBorderStyles","removeNotTableDefaultStyles","removeAttribute","clearAttribute","updateStyles","callbackfn","styles","getStyles","getObjectKeys","setStyles","clearBlockFormat","region","blocks","getSelectedBlockElementsInRegion","nodes","collapseNodesInRegion","contains","rootNode","nonborderStyles","wrapper","parentNode","isNodeInRegion","balancedNodes","splitBalancedNodeRange","setDefaultFormat","defaultFormat","getDefaultFormat","isDefaultFormatEmpty","queryElements","removeStyles","cNode","fontFamily","textColor","shouldApplyInlineStyle","textColors","backgroundColor","backgroundColors","bold","fontWeight","setDefaultFontWeight","italic","underline","removeProperty","getAttribute","clearFormat","formatType","focus","addUndoSnapshot","clearInlineFormat","isMultiBlock","transverser","getSelectionTraverser","currentBlockElement","getNextBlockElement","isMultiBlockSelection","inlineElement","currentInlineElement","isPartial","PartialInlineElement","NodeInlineElement","currentNode","nextSibling","previousSibling","isNodeWholeBlock","getContainerNode","clearAutoDetectFormat","URI_REGEX","MAILTO_REGEX","FTP_REGEX","getAnchorNodeAtCursor","updateAnchorDisplayText","anchor","displayText","altText","target","url","sanitizer","HtmlSanitizer","document","createElement","href","sanitize","checkXss","trim","linkData","matchLink","normalizedUrl","prefix","search","applyLinkPrefix","originalUrl","selection","getSelectionRangeEx","type","range","ranges","collapsed","getDocument","insertNode","execCommand","traverser","currentInline","getNextInlineElement","deletionInlineList","deleteNode","image","title","updateAnchorTarget","getElementBasedFormatState","event","listTag","getElementAtCursor","getSelectionRange","multiline","startingBlock","getBlockElementAtNode","startContainer","endingBlock","endContainer","equals","headerTag","table","tableFormat","getTableFormatInfo","hasHeader","rows","cells","cell","isBullet","isNumbering","isMultilineSelection","headerLevel","canUnlink","canAddImageAltText","isBlockQuote","isCodeInline","isCodeBlock","isInTable","tableHasHeader","canMergeTableCell","getPendableFormatState","getStyleBasedFormatState","getUndoState","isDarkMode","zoomScale","getZoomScale","coordinates","firstCell","lastCell","contentNode","isBlock","isReadonly","position","insertToRegionRoot","focusAfterEntity","display","commitEntity","currentRange","contentPosition","normalize","existingEntity","getEntitySelector","Position","select","regions","getSelectedRegions","chains","VListChain","createListChains","updateCursor","insertOnNewLine","replaceSelection","entity","getEntityFromElement","newLine","insertBefore","applyFormat","getDarkColorHandler","br","querySelector","pos","isFeatureEnabled","addDelimiters","nextElementSibling","triggerContentChangedEvent","insertImageWithSrc","src","attribute","setAttribute","imageFileOrSrc","readFile","dataUrl","isDisposed","start","end","textOrRange","exactMatch","searcher","getContentSearcherOfCursor","getRangeFromText","backupRange","endOffset","startOffset","angle","transform","alignment","isATable","elementAtCursor","isWholeTableSelected","VTable","marginLeft","marginRight","alignTable","findClosestElementAncestor","startNode","getStartNode","vList","createVListFromRegion","setAlignment","alignList","align","command","elements","textAlign","alignText","isInnerNode","setColor","direction","fontName","outdent","blockElement","collapseToSingleElement","quote","isFirstItem","items","getNode","getListItemIndex","getStart","shouldHandleWithBlockquotes","indentation","handler","quotesHandled","blockGroups","isTabKeyTextFeaturesEnabled","block","rootList","setIndentation","writeBack","group","separator","startNumber","DEFAULT_STYLER","borderLeft","borderColor","paddingLeft","styler","listStyle","apiNameOverride","CODE_TAG","SELECTOR","PRE_TAG","code","pre","wrapped","header","div","moveChildNodes","replaceNode","cssStyleCallbacks","experimentCommitListChains","saveTableCellMetadata","bgColorOverride","isUndefined","operation","td","vtable","saveTableSelection","edit","transformToDarkColor","row","col","currentRow","currentCol","newRow","newCol","calculateCellToSelect","newTd","getCell","format","getTableCellWidth","columns","cellSpacing","cellPadding","tr","appendChild","j","width","runAsync","callback","apiName","safeCallback","isContentEditable","areAllCollapsed","firstChild","triggerPluginEvent","formatState","formatCallback","firstNode","lastNode","contentTraverser","nextInlineElement","applyStyle","styleName","parentNodes","setListItemStyle","applyStyleToListItems","beforeRunCallback","wrapFunction","NodeTag","some","isEmptyBlockUnderTR","getEndNode","forEachCallback","commitListChains","getEnd","chain","commit","formatter","formatName","PendableFormatCommandMap","filter","needToSwitchSelection","formatApiName","isNodeRTL","el","marginInlineStart","marginInlineEnd","parentElement","listType","includeSiblingLists","orderedStyle","unorderedStyle","canAppendAtCursor","equalTo","createVListAtBlock","changeListType","setListStyleType","addUndoSnapshotInternal","core","canUndoByBackspace","entityStates","lifecycle","shadowEditFragment","rangeEx","api","metadata","root","tableId","id","imageId","getSelectionPath","createContentMetadata","contentDiv","undo","snapshotsService","addSnapshot","html","innerHTML","knownColors","darkColorHandler","getKnownColorsCopy","hasNewContent","changeSource","additionalData","data","undoState","isNested","getEntityState","eventType","source","triggerEvent","autoCompletePosition","attachDomEvent","eventMap","disposers","handlerObj","pluginEventType","beforeDispatch","eventName","onEvent","rawEvent","addEventListener","removeEventListener","coreApiMap","createPasteFragment","ensureTypeInContainer","getContent","hasFocus","restoreUndoSnapshot","selectRange","setContent","switchShadowEdit","transformColor","selectTable","selectImage","clipboardData","pasteAsText","applyCurrentStyle","pasteAsImage","pasteType","options","createDefaultHtmlSanitizerOptions","fragment","ownerDocument","createDocumentFragment","sanitizingOption","htmlBefore","htmlAfter","htmlAttributes","createBeforePasteEvent","getPasteType","createFragmentFromClipboardData","keyboardEvent","formatNode","isNodeEmpty","brEl","append","shouldSetNodeStyles","innerText","wasNodeJustCreatedByKeyboardEvent","createRange","domEvent","selectionRange","mode","clonedNode","content","triggerExtractContentEvent","includeSelectionMarker","getTextContent","clonedRoot","cloneNode","originalRange","shadowEditSelectionPath","getHtmlWithSelectionPath","forceGetStateFromDOM","cachedPendableFormatState","pendingFormatState","pendableFormatState","cachedPosition","pendableFormatPosition","currentPosition","isSamePosition","pendableKeys","PendableStyleCheckers","CssFalsyCheckers","queryCommandStateFromDOM","isBold","isUnderline","textDecoration","isItalic","fontStyle","isSubscript","verticalAlign","isSuperscript","isStrikeThrough","tryGetFromCache","defaultView","getSelection","rangeCount","getRangeAt","createNormalSelectionEx","checkAllCollapsed","shadowEditTableSelectionPath","shadowEditImageSelectionPath","shadowRange","tableSelectionRange","imageSelectionRange","override","pendableFormatSpan","styleTextColor","styleBackColor","getComputedStyles","getPropertyValue","parseColorValue","backColor","lightModeColor","darkModeColor","marginTop","marginBottom","activeElement","option","isBegin","getFirstLastBlockElement","refNode","insertedNode","rangeToRestore","cloneRange","getInitialRange","deleteContents","getRegionsFromRange","isAtEnd","splitTextNode","offset","splitParentNode","adjustInsertPositionRegionRoot","tempPos","adjustInsertPositionNewLine","adjustInsertPosition","nodeForCursor","lastChild","step","snapshot","move","isRestoring","registerColor","entityState","state","arg1","arg2","arg3","arg4","isSelectionRangeEx","isNodePosition","selectionRangeEx","STYLE_ID","unselect","removeImportantStyleRule","borderCSS","buildBorderCSS","setGlobalCssStyles","imageSelectionBorderColor","doc","removeGlobalCssStyle","skipSameRange","addRangeToSelection","restorePendingFormatState","input","coordinate","isValidCoordinate","areValidCoordinates","contentDivSelector","selectors","vTable","isAllTableSelected","tableSelector","tableRange","Range","selectNode","handleAllTableSelected","tr1","td1","tr2","td2","firstSelected","lastSelected","tableChildren","cont","indexes","rowIndex","tdCount","midElement","ind","middleElSelector","cellIndex","removeImportant","selector","generateCssFromCell","elementsSelector","rowRange","setStartBefore","setEndAfter","handleTableSelected","cssRules","currentRules","shift","buildCss","css","item","isMergedCell","cellToSelect","cellTag","index","contentChanged","newContent","entities","entityMap","body","DOMParser","parseFromString","trustedHTMLHandler","restoreContentWithEntityPlaceholder","metadataFromContent","extractContentMetadata","selectContentMetadata","isOn","shadowEditEntities","wasInShadowEdit","getShadowEditSelectionPath","selectionType","shadowEditSelection","moveContentWithEntityPlaceholders","selectionPath","tableElement","iterateElements","transformer","includeSelf","isHTMLElement","child","htmlElement","Node","ELEMENT_NODE","forceTransform","fromDarkMode","onExternalContentTransform","toDarkMode","transformElementColor","allowedEventsInShadowEdit","pluginEvent","broadcast","plugins","plugin","onPluginEvent","willHandleEventExclusively","handledExclusively","applyId","idPrefix","getElement","getElementById","querySelectorAll","disposer","onPaste","extractClipboardEvent","paste","allowedCustomPasteType","getTempDiv","removeTempDiv","cleanUpAndRestoreSelection","getName","initialize","addDomEventHandler","e","copy","onCutCopy","cut","dispose","getState","isCut","setHtmlWithMetadata","getTrustedHTMLHandler","newRange","createTableRange","deleteTableContent","deleteImage","deleteSelectedContent","forceInLightMode","getCustomData","tempDiv","removeChild","isCopy","restoreRange","Browser","isAndroid","collapse","clonedVTable","removeCellsOutsideSelection","selectedVTable","forEachSelectedCell","wholeTableSelected","isWholeColumnSelected","onDrop","onFocus","onKeyDownDocument","which","defaultPrevented","cacheSelection","onMouseDownDocument","onScroll","scrollContainer","onKeyboardEvent","isCharacterValue","stopPropagation","onInputEvent","onContextMenuEvent","allItems","elementBeforeCursor","getInlineElementBefore","eventTargetNode","button","contextMenuProviders","provider","getContextMenuItems","arrayPush","isInIME","stopPrintableKeyboardEventPropagation","allowKeyboardEventPropagation","isContextMenuProvider","eventHandlers","keypress","getEventHandler","keydown","keyup","mousedown","contextmenu","compositionstart","compositionend","drop","isIE","isSafari","isIEOrEdge","beforedeactivate","blur","features","hasFunctionKey","ctrlOrMeta","isCtrlOrMetaPressed","altKey","feature","allowFunctionKeys","shouldHandleEvent","handleEvent","ENTITY_ID_REGEX","ALLOWED_CSS_CLASSES","REMOVE_ENTITY_OPERATIONS","handleCutEvent","checkRemoveEntityForRange","onDragStart","dragEvent","entityWrapper","preventDefault","handleMouseUpEvent","handleKeyDownEvent","handleBeforePasteEvent","handleContentChangedEvent","handleExtractContentWithDomEvent","handleContextMenuEvent","handleEntityOperationEvent","inlineEntityOnPluginEvent","entityElement","isClicking","workaroundSelectionIssueForIE","additionalAllowedCssClasses","shouldNormalizeDelimiters","isDeleted","getExistingEntities","ensureUniqueId","handleNewEntity","normalizeDelimitersInEditor","editableEntityElements","isFullyCovered","newItem","shouldPersist","canPersist","exec","baseId","substr","newId","workaroundButton","onblur","mouseTarget","mouseSelection","keyDownSelection","contextMenuTarget","actualSelection","CONTENT_EDITABLE_ATTRIBUTE_NAME","COMMANDS","isFirefox","DARK_MODE_DEFAULT_FORMAT","initializer","initialContent","contentEditable","userSelect","webkitUserSelect","adjustColor","doNotAdjustEditorColor","getDarkColor","customData","inDarkMode","experimentalFeatures","adjustBrowserBehavior","mouseUpEventListerAdded","mouseDownX","mouseDownY","onMouseUp","removeMouseUpEventListener","pageX","pageY","normalizeTables","normalizeTableFromEvent","shiftKey","li","prevElement","changeElementTag","tables","isChanged","isDOMChanged","tbody","colgroups","thead","colgroup","clear","getCurrentPosition","createPendingFormatSpan","span","currentStyle","createTextNode","setProperty","isRangeEmpty","styledAncestor","focusedPosition","getFocusedPosition","isMobileOrTablet","setTimeout","snapshots","service","lastKeyPress","undoMetadataSnapshotService","undoSnapshotService","canMove","isAutoCompleteSnapshot","clearRedo","canUndoAutoComplete","createSnapshots","canMoveCurrentSnapshot","moveCurrentSnapshot","addSnapshotV2","clearProceedingSnapshotsV2","ctrlKey","canUndo","canRedo","onKeyDown","onKeyPress","clearRedoForInput","onContentChanged","onBeforeKeyboardEditing","evt","metaKey","corePluginOverride","typeInContainer","_placeholder","typeAfterLink","mouseUp","copyPaste","imageSelection","normalizeTable","corePlugins","DELIMITER_SELECTOR","ZERO_WIDTH_SPACE","INLINE_ENTITY_SELECTOR","preventTypeInDelimiter","delimiter","textNode","nodeValue","className","setPosition","getDelimiterFromElement","sibling","classList","previousElementSibling","removeNode","removeDelimiterAttr","addDelimitersIfNeeded","isEntityElement","checkEntity","entitySibling","remove","cn","isAfter","getBlock","blockToCheck","delimiters","matchesSelector","handleCollapsedEnter","startElement","endElement","startUpdate","getPosition","endUpdate","aEditor","handleSelectionNotCollapsed","container","_","ColorAttributeEnum","VARIABLE_REGEX","ColorAttributeName","values","colorKey","parsedColor","reset","isInDarkMode","startsWith","findLightColorFromDarkColor","darkColor","rgbSearch","parseColor","find","rgbCurrent","names","createEditorCore","Editor","EditorBase","coreCreator","getCore","existingNode","toNode","transformColorForDarkMode","replaceChild","scopeOrCallback","scope","selectionEx","collapseNodes","canSplitParent","isEmpty","insertContent","allNodes","applyCurrentFormat","snapshotBeforePaste","sel","focusNode","focusOffset","startFrom","cacheGetEventData","isPositionAtBeginning","isPositionAtBeginningOf","nameOrMap","eventsToMap","redo","getScrollContainer","getter","getBodyTraverser","ContentTraverser","createBodyTraverser","createSelectionTraverser","getBlockTraverser","createBlockTraverser","PositionContentSearcher","win","window","handle","requestAnimationFrame","cancelAnimationFrame","setEditorDomAttribute","getEditorDomAttribute","getRelativeDistanceToEditor","addScroll","editorRect","getBoundingClientRect","elementRect","left","top","scrollLeft","scrollTop","addContentEditFeature","removeContentEditFeature","featureSet","setDarkModeState","nextDarkMode","startShadowEdit","stopShadowEdit","isInShadowEdit","getSizeTransformer","sizeTransformer","setZoomScale","scale","oldValue","oldZoomScale","newZoomScale","getVisibleViewport","pluginState","getPluginState","getIntersectedRect","coreApiOverride","originalApi","size","STRUCTURE_NODE_TAGS","endNode","getBlockContext","nodeContext","StartEndBlockElement","blockContext","newNode","findHeadTailLeafNode","containerBlockNode","isTail","headNode","tailNode","isFirst","rawHtml","text","imageDataUri","pendableFormat","styleBasedFormat","getCurrentFormat","rangeBeforePaste","dataTransfer","then","CLIPBOARD_HTML_HEADER_REGEX","OTHER_TEXT_TYPE","EDGE_LINK_PREVIEW","ContentHandlers","isEdge","headerValues","workaroundForEdge","customValues","linkPreview","parse","types","files","Promise","all","kind","resolve","file","getAsFile","textType","getAllowedCustomType","getAsString","getData","nextStep","img","maxWidth","transformTabCharacters","initialOffset","tIndex","line","lineBefore","lineAfter","tabCount","fill","lines","includes","processStyles","reduce","attrs","meta","htmlFirstLevelChildTags","TEXT_NODE","nodeTag","COMMENT_NODE","head","additionalGlobalStyleNodes","startIndex","endIndex","lastIndexOf","START_FRAGMENT","END_FRAGMENT","convertGlobalCssToInlineCss","getStartBlockElement","getStartInlineElement","getFirstInlineElement","isBlockInScope","trimInlineElement","scoper","skipTags","currentBlock","getPreviousNextBlockElement","getPreviousBlockElement","isNext","leaf","getLeafSibling","newBlock","getPreviousNextInlineElement","getPreviousInlineElement","newInline","getInlineElementBeforeAfter","getStartPosition","getParentBlock","previousInlineElement","getNextPreviousInlineElement","WHITESPACE_REGEX","word","inlineBefore","inlineAfter","traversingComplete","inlineElements","nearestNonTextInlineElement","getWordBefore","traverse","getInlineElementAfter","getSubStringBefore","startPosition","endPosition","textIndex","forEachTextInlineElement","textInline","nodeContent","nodeIndex","charCodeAt","getNearestNonTextInlineElement","previousInline","isTextualInlineElement","matches","blockNode","getLastInlineElement","getFirstLastInlineElementFromBlockElement","startInline","startBlock","inScope","selStartBlock","selEndBlock","inline","getEndPosition","startPartial","endPartial","addDelimiterAfter","insertDelimiter","addDelimiterBefore","isDelimiter","delimiterClass","children","insertPosition","insertAdjacentElement","delimiterAfter","delimiterBefore","NOT_EDITABLE_SELECTOR","adjustSteps","nodeToInsert","safeRemove","normalizedPosition","nextNode","splitter","rootNodeToInsert","isFragment","rootNodes","hasBrNextToRoot","listItem","listNode","tdNode","shouldInsertListAsText","inlineElementBefore","inlineElementAfter","adjustInsertPositionForNotEditableNode","nonEditableElement","lastNonEditableElement","posBefore","rangeToTraverse","nextBlockElement","tempRange","ensureBeforeAndAfter","isStart","nodeBefore","nodeAfter","emptyNode","nodesToDelete","nodesPairToMerge","regionRange","commonAncestorContainer","beforeEnd","afterEnd","beforeStart","afterStart","CONTENT_EDITABLE","removeUntil","nodeToStop","nodeToRemove","tryGetWrapperFromEntityPlaceholder","getPlaceholder","placeholder","entitySelector","next","nodeToAppend","insertClonedNode","isEntity","eventDataCache","isCtrlOrMetaPressedImpl","isMac","isCtrlKey","isAltKey","isMetaKey","elementCallbacks","cloneObject","styleCallbacks","getStyleCallbacks","attributeCallbacks","tagReplacements","getTagReplacement","additionalTagReplacements","allowedAttributes","getAllowedAttributes","additionalAllowedAttributes","allowedCssClassesRegex","getAllowedCssClassesRegex","defaultStyleValues","getDefaultStyleValues","additionalDefaultStyleValues","additionalPredefinedCssForElement","preserveHtmlComments","unknownTagReplacement","convertInlineCss","additionalStyleNodes","sanitizeHtml","currentStyles","currentElementOrStyle","convertCssOnly","processNode","styleNodes","styleSheets","reverse","sheet","styleSheet","styleRule","cssText","CSSRule","STYLE_RULE","selectorText","context","isElement","isText","isComment","shouldKeep","replacement","test","whiteSpace","thisStyle","processAttributes","preprocessCss","processCss","predefinedStyles","isInheritable","keep","isCssVariable","processCssVariable","newValue","processCssClass","originalValue","calculatedValue","originalClasses","calculatedClasses","newCallback","cloneObjectImpl","assign","existingObj","HTML_TAG_REPLACEMENT","abbr","address","area","article","aside","bdi","bdo","blockquote","canvas","caption","center","cite","datalist","dd","del","details","dfn","dialog","dir","dl","dt","em","fieldset","figcaption","figure","font","footer","h1","h2","h3","h4","h5","h6","hgroup","ins","kbd","label","legend","main","mark","menu","menuitem","meter","nav","ol","optgroup","output","picture","progress","rp","rt","ruby","samp","section","small","strike","strong","sub","summary","sup","textarea","tfoot","th","time","tt","u","ul","var","wbr","xmp","form","applet","audio","base","basefont","embed","frame","frameset","iframe","noscript","param","script","slot","template","track","video","ALLOWED_HTML_ATTRIBUTES","DEFAULT_STYLE_VALUES","overflow","padding","border","float","removeValue","removeWidthForLiAndDiv","tagName","additionalReplacements","replacements","additionalAttributes","additionalCssClasses","patterns","additionalDefaultStyles","callbacks","INHERITABLE_PROPERTIES","PREDEFINED_CSS_FOR_ELEMENT","B","EM","I","U","P","PRE","S","STRIKE","SUB","SUP","getBrowserInfo","getPreviousLeafSibling","getLastLeafNode","KnownCreateElementData","moveCurrentSnapsnot","createEntityPlaceholder","createNumberDefinition","createBooleanDefinition","createStringDefinition","createArrayDefinition","createObjectDefinition","getMetadata","setMetadata","removeMetadata","parentBlock","containerNode","getDecoratedInline","thisStart","otherEnd","previousNode","STYLET_AGS","callStylerWithInnerNode","formatNodes","fromPosition","toPosition","parentTag","newNodeValue","startingNode","nodeChain","resolveInlineElement","mainArray","itemsArray","apply","collection","moveChildNodesToLi","moveLiToList","populateItems","getLastItemNumber","getListType","getLevel","isDummy","shouldReuseAllAncestorListElements","disableListChain","lastList","listStack","newListStart","getNewListStart","topList","applyListStyle","setNewListStart","softOutdent","preventItemRemoval","shouldAddMargin","findListItems","setIsDummy","indent","addNegativeMargins","flexDirection","alignSelf","targetType","needChangeType","styleMetadata","orderedStyleType","getValidValue","unorderedStyleType","createListStyleMetadata","ListStyleDefinitionMetadata","appendItem","mergeVList","list","listIndex","listStartPos","listEndPos","listTypes","newListTypes","isListElement","currentItem","furtherNodes","CHAIN_DATASET_NAME","AFTER_CURSOR_DATASET_NAME","lastChainIndex","lastNumber","lastNumberBeforeCursor","nameGenerator","canAppendToTail","createListChainName","afterCurrentNode","applyChainName","lists","getLists","vlist","dataset","isAfterCurrentNode","orderListStyles","unorderedListStyles","NEGATIVE_MARGIN","stylesToInherit","attrsToInherit","dummy","isOrphanItem","canMerge","mergeItems","wrapIfNotBlockNode","margin","expectedLength","isFirstLevel","originalRoot","nextLevel","listStackEndIndex","stackLength","newList","createListElement","getDeepChildIndex","listStyleType","isLi","stylesToApply","attrValue","deepIndex","newRoot","checkFirst","checkLast","ALPHABET","decimal","isLowerCase","RomanValues","M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","romanValue","timesRomanCharAppear","repeat","ListSelector","tryIncludeSiblingNode","fullSelectionStart","fullSelectionEnd","nodeForItem","createVListFromItemNode","getListTypeFromNode","ancestor","marker","bulletListStyle","isDisc","isCssStyle","elementsStyles","styleValue","getInlineChildElementsStyle","styleValues","Set","MarkerTypes","numberingListStyle","markerSeparator","markerSecondSeparator","markerType","lowerCase","markerNumber","Roman","Alpha","Decimal","isOptional","minValue","maxValue","allowNull","itemDef","minLength","maxLength","propertyDef","MetadataDataSetName","definition","defaultValue","def","validate","n1","n2","abs","validator","GOOGLE_SHEET_NODE_NAME","PROG_ID_NAME","EXCEL_DESKTOP_ATTRIBUTE_NAME","props","getSourceFunctions","Map","shouldConvertSingleImage","func","nodesOrBlockElements","regionTypeData","outerSelector","innerSelector","getRegionCreator","fullRange","firstNodeOfRegion","lastNodeOfRegion","firstNodeValid","lastNodeValid","bothValid","areNodesValid","iterateNodes","creator","boundary","started","innerNode","ended","outerNode","boundaries","previousOuterNode","newRegions","boundaryTree","allBoundaries","inSelectionOuterNode","thisInnerNode","thisOuterNode","buildBoundaryTree","regionBase","createBlockIfEmpty","deprecated","isRegion","regionStart","regionEnd","compareDocumentPosition","targetNode","blockRoot","commonContainer","nodeToMerge","nodeOrPosition","offsetOrPosType","isFromEndOfRange","getIndexOfNode","getEndOffset","newOffset","needAddRange","removeAllRanges","addRange","getFocusablePosition","getPositionFromPath","setStart","setEnd","rect","rects","getClientRects","getPositionPath","isPreviousText","areAllPreviousNodesEmpty","NumberArrayDefinition","CoordinatesDefinition","IsDarkModeDefinition","NormalContentMetadataDefinition","TableContentMetadataDefinition","ImageContentMetadataDefinition","potentialMetadataComment","getLength","compare","defaultCompare","currentSnapshot","currentIndex","isSameSnapshot","totalSize","removeCount","maxSize","autoCompleteIndex","compareSnapshots","s1","s2","newIndex","clearProceedingSnapshots","removedSize","pair","valueIndex","styleId","styleTag","styleProperties","modifiedStyles","cssRule","insertRule","trimmedName","trimmedValue","DEFAULT_FORMAT","topBorderColor","bottomBorderColor","verticalBorderColor","hasHeaderRow","hasFirstColumn","hasBandedRows","hasBandedColumns","bgColorEven","bgColorOdd","headerRowColor","tableBorderFormat","keepCellShade","normalizeSize","formatInfo","trs","tableSelection","getTableFromTd","sourceCol","targetCol","colSpan","rowSpan","hasTd","spanLeft","spanAbove","height","skipApplyFormat","recalculateSpans","recalculateCellHeight","saveTableInfo","isEmptyCell","deleteCellShadeDataset","currentCell","firstRow","lastRow","firstColumn","lastColumn","cloneCell","countSpanAbove","colIndex","nextCell","newCell","getTd","forEachCellOfCurrentColumn","countSpanLeft","forEachCellOfColumn","forEachCellOfRow","removedRows","removedColumns","rowStep","aboveCell","belowCell","mergeCells","colStep","leftCell","rightCell","nextCellBelow","nextCellRight","splitRow","setAlignmentToSelectedCells","alignmentType","isVertical","horizontally","checkSpans","mergeCellContents","childElementCount","cellTd","nextCellTd","getCellsWithBorder","borderPos","getLeftCells","cellRect","found","right","forEachCellOfCurrentRow","getCurrentTd","normalizeEmptyTableCells","normalizeTableCellSize","setHTMLElementSizeInPx","newWidth","newHeight","boxSizing","TRANSPARENT","hasCellShade","getTableCellMetadata","getBorderStyle","borderCollapse","isFirstRow","isLastRow","isFirstColumn","isLastColumn","borderTop","borderRight","borderBottom","setBorderColors","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor","formatBorders","setBordersType","shouldColorWholeTable","setCellColor","setFirstColumnFormat","setHeaderRowFormat","styledCell","rowsLength","rowCells","firstX","firstY","lastX","lastY","currentTd","newTable","currentTable","cursorRow","cursorCol","BooleanDefinition","TableCellFormatMetadata","NullStringDefinition","TableFormatMetadata","isAndroidRegex","userAgent","appVersion","vendor","userAgentOrVendor","isIE11OrGreater","isChrome","isWebKit","isWin","navigator","elementStyle","newTag","origianlTag","newElement","ref","contained","treatSameNodeAsContain","internalContains","contenteditable","elementData","namespace","createElementNS","datasetName","attrName","childElement","closest","styleNames","px","tempNode","additionalRects","bottom","getLeafNode","getChild","ignoreSpace","getSibling","curNode","shouldContinue","queryCommandState","BLOCK_ELEMENT_TAGS","BLOCK_DISPLAY_STYLES","node1","node2","VISIBLE_ELEMENT_TAGS","VISIBLE_CHILD_ELEMENT_SELECTOR","trimContent","shouldCountBrAsVisible","visibleSelector","HTML_VOID_ELEMENTS","httpExcludeRegEx","labelRegEx","domainPortWithUrlRegEx","domainPortRegEx","linkMatchRules","http","except","normalizeUrl","https","mailto","notes","unc","ftp","news","telnet","gopher","wais","schema","rule","scheme","msMatchesSelector","keepExistingChildren","clientRect","HEX3_REGEX","HEX6_REGEX","RGB_REGEX","RGBA_REGEX","checkPosition","targets","nodeContainedByRangeOnly","targetPositions","FileReader","onload","onerror","readAsDataURL","getTargetWindow","typeName","targetWindow","mainWindow","mainWindowType","ColorTones","WHITE","isBackgroundColor","shouldAdaptTheFontColor","modeIndependentColor","cssName","colorValue","lightModeBackgroundColor","colorValues","calculateLightness","isADarkOrBrightColor","adaptFontColorToBackgroundColor","CRLF","CRLF_SPACE","shouldSkipNode","splitBefore","newParent","temp","returnFirstPart","firstPart","secondPart","MOUSE_EVENT_INFO_DESKTOP","MOUSEDOWN","MOUSEMOVE","MOUSEUP","getPageXY","MOUSE_EVENT_INFO_MOBILE","targetTouches","touch","trigger","onSubmit","forceMobile","initX","initY","initValue","onMouseDown","addDocumentEvents","dndMouse","onMouseMove","deltaX","deltaY","onDragging","removeDocumentEvents","onDragEnd","specialCharacters","lastKeyTyped","keyTyped","textBeforeCursor","dashes","isPrecededByADash","isPrecededByASpace","settingsOverride","additionalFeatures","allFeatures","hasSettingForKey","defaultDisabled","disposeFeatures","TRAILING_PUNCTUATION_REGEX","AutoLink","cacheGetLinkData","replaceWithNode","clearEventDataCache","UnlinkWhenBackspaceAfterLink","contentSearcher","LinkInlineElement","removeLink","trailingPunctuation","AutoLinkFeatures","autoLink","unlinkWhenBackspaceAfterLink","RemoveCodeWhenEnterOnEmptyLine","childOfCode","cacheGetCodeChild","splitCode","RemoveCodeWhenBackspaceOnEmptyFirstLine","codeElement","currentContainer","codeChild","codeParent","preParent","CodeFeatures","removeCodeWhenEnterOnEmptyLine","removeCodeWhenBackspaceOnEmptyFirstLine","NoCycleCursorMove","rtl","CursorFeatures","noCycleCursorMove","ClickOnEntityFeature","cacheGetReadonlyEntityElement","EscapeFromEntityFeature","EnterBeforeReadonlyEntityFeature","cacheGetNeighborEntityElement","newContainer","BackspaceAfterEntityFeature","DeleteBeforeEntityFeature","collapseOnly","regionRoot","entityNode","triggerOperation","MoveBetweenDelimitersFeature","getIsDelimiterAtCursor","checkBefore","cacheGetCheckBefore","cacheDelimiter","getRelatedElements","delimiterPair","positionType","extend","RemoveEntityBetweenDelimitersFeature","cacheEntityBetweenDelimiter","focusedElement","class","pairClass","isAtEndOrBeginning","getNextSibling","elAtCursor","shouldHandle","removeDelimiters","getElementFromInline","EntityFeatures","clickOnEntity","escapeFromEntity","enterBeforeReadonlyEntity","backspaceAfterEntity","deleteBeforeEntity","moveBetweenDelimitersFeature","removeEntityBetweenDelimiters","PREVIOUS_BLOCK_CACHE_KEY","NEXT_BLOCK_CACHE_KEY","shouldHandleIndentationEvent","indenting","keyCode","cacheGetListElement","handleIndentationEvent","currentElement","isRTL","IndentWhenTab","OutdentWhenShiftTab","IndentWhenAltShiftRight","OutdentWhenAltShiftLeft","MergeInNewLine","blockFormat","toggleListAndPreventDefault","OutdentWhenBackOn1stEmptyLine","getElementsByTagName","MaintainListChainWhenDelete","getCacheNextSibling","getListChains","OutdentWhenEnterOnEmptyLine","isAListPattern","AutoBullet","textRange","prepareAutoBullet","toggleBullet","toggleNumbering","AutoBulletList","shouldTriggerList","AutoNumberingList","number","isFirstItemOfAList","getPreviousListItem","getPreviousListType","letter","MaintainListChain","listInfo","listElement","toggleListType","getListStyle","isATheBeginning","listChains","previousListType","shouldTriggerNewListStyle","MergeListOnBackspaceAfterList","cursorBlock","isList","nearestInline","tempBlock","nextElement","previousList","targetBlock","rangeBeforeWriteBack","fvList","VList","ListFeatures","autoBullet","indentWhenTab","outdentWhenShiftTab","outdentWhenBackspaceOnEmptyFirstLine","outdentWhenEnterOnEmptyLine","mergeInNewLineWhenBackspaceOnFirstChar","maintainListChain","maintainListChainWhenDelete","autoNumberingList","autoBulletList","mergeListOnBackspaceAfterList","outdentWhenAltShiftLeft","indentWhenAltShiftRight","generateBasicMarkdownFeature","triggerCharacter","elementTag","useShiftKey","cacheGetRangeForMarkdownOperation","lastTypedTriggerPosition","hasLastTypedTrigger","textContentRange","extractContents","elementToWrap","nonPrintedSpaceTextNode","handleMarkdownEvent","textInlineElement","inlineTextContent","parentBlockText","contentIndex","MarkdownBold","MarkdownItalic","MarkdownStrikethrough","MarkdownInlineCode","MarkdownFeatures","markdownBold","markdownItalic","markdownStrikethru","markdownInlineCode","QUOTE_TAG","STRUCTURED_TAGS","UnquoteWhenBackOnEmpty1stLine","childOfQuote","cacheGetQuoteChild","splitQuote","UnquoteWhenEnterOnEmptyLine","shouldClearFormat","isStyledBlockquote","QuoteFeatures","unquoteWhenBackspaceOnEmptyFirstLine","unquoteWhenEnterOnEmptyLine","createCommand","winKey","macKey","action","disabled","commands","toggleBold","toggleItalic","toggleUnderline","changeFontSize","DefaultShortcut","cacheGetCommand","getModifierState","cmd","ShortcutFeatures","defaultShortcut","CHILD_PARENT_TAG_MAP","TD","TH","LI","CHILD_SELECTOR","InsertLineBeforeStructuredNodeFeature","cacheGetStructuredElement","StructuredNodeFeatures","insertLineBeforeStructuredNodeFeature","TabInTable","cacheGetTableCell","cacheIsWholeTableSelected","cacheVTable","tableCells","editTable","newPos","IndentTableOnTab","UpDownInTable","isUp","hasShiftKey","targetTd","setBaseAndExtent","DeleteTableWithBackspace","firstTd","TableFeatures","tabInTable","upDownInTable","indentTableOnTab","deleteTableWithBackspace","IndentWhenTabText","listOrTable","insertTab","shouldSetIndentation","OutdentWhenTabText","firstBlock","lastBlock","blockStart","blockEnd","rangeBefore","rangeAfter","numberOfChars","MAX_SAFE_INTEGER","span2","TextFeatures","indentWhenTabText","outdentWhenTabText","autoHyphen","bulletListType","NumberingTypes","Character","characters","lowerRomanTypes","upperRomanTypes","numberingTriggers","lowerRomanNumbers","upperRomanNumbers","numberingListTypes","DecimalsTypes","LowerAlphaTypes","UpperAlphaTypes","LowerRomanTypes","UpperRomanTypes","previousListChain","previousListStyle","isDoubleParenthesis","indexNumber","isValidNumbering","numbering","separatorCharacter","numberingType","identifyNumberingType","identifyNumberingListType","isMenuShowing","onDismiss","dismiss","allowDefaultMenu","initContainer","render","makeReplacement","sourceString","replacementHTML","matchSourceCaseSensitive","shouldReplace","defaultReplacements","longestReplacementLength","replacementEndCharacters","updateReplacements","newReplacements","endChars","lastChar","add","getReplacementEndCharacters","has","stringToSearch","getMatchingReplacement","matchingText","matchingRange","parsingSpan","originalStringToSearch","lowerCaseStringToSearch","sourceMatch","replacementMatch","expectedChangeSource","cacheListChains","selectedRegions","getTooltipCallback","onLinkClick","originalHref","trackedLink","onMouse","tryGetHref","onBlur","updateLinkHrefIfShouldUpdate","resetLinkTracking","mouseover","mouseout","isContentEditValue","shouldCheckUpdateLink","doesLinkDisplayMatchHref","srcElement","open","updateLinkHref","escapedDisplay","DIRECTIONS","DirectionRad","DirectionOrder","DefaultOptions","minWidth","minHeight","preserveRatio","minRotateDeg","imageSelector","rotateIconHTML","disableCrop","disableRotate","disableSideResize","onSelectState","ImageEditHTMLMap","getCornerResizeHTML","getSideResizeHTML","getRotateHTML","getCropHTML","onShowResizeHandle","clonedImage","editInfo","lastSrc","dndHelpers","wasResized","shadowSpan","isCropping","pngSource","setEditingImage","removeWrapper","updateWrapper","cropContainers","getEditElements","cropOverlays","resizeHandles","rotateCenter","rotateHandle","cropHandles","angleRad","bottomPercent","leftPercent","rightPercent","topPercent","targetWidth","targetHeight","originalWidth","originalHeight","visibleWidth","visibleHeight","marginHorizontal","marginVertical","cropLeftPx","cropRightPx","cropTopPx","cropBottomPx","borderStyle","borderWidth","getPx","setWrapperSizeDimensions","setSize","updateHandleCursor","elementClass","clientWidth","clientHeight","doubleCheckResize","viewport","updateRotateHandlePosition","allowedOperations","dragstart","clearDndHelpers","deleteEditInfo","isOperationAllowed","operationOrSelect","getEditInfoFromImage","tryToConvertGifToPng","isFixedNumberValue","checkIfImageWasResized","createWrapper","createDndHelpers","Resizer","Rotator","Cropper","flipImage","flippedVertical","flippedHorizontal","rotateImage","widthPx","heightPx","flippedHorizontally","flippedVertically","rotateHandleBackColor","isSmallImage","getResizeBordersHTML","thisOperation","insertImageWrapper","shadowRoot","attachShadow","dragAndDrop","helper","handles","cursor","radIndex","idx","handleRadIndexCalculator","originalDirection","originalIndex","rotatedIndex","rotateHandles","numberValue","getContext","drawImage","getImageData","percentage","previousSrc","wasResizedOrCropped","editingImage","newSrc","initEditInfo","originalSrc","saveEditInfo","ImageEditInfoState","ROTATE_KEYS","CROP_KEYS","ROTATE_CROP_KEYS","ALL_KEYS","areSameNumber","compareTo","naturalWidth","naturalHeight","getInitialEditInfo","imageWidth","imageHeight","devicePixelRatio","translate","toDataURL","beforeCrop","newEditInfo","Xs","Ys","ROTATION","sw","nw","ne","se","crop","basePercentage","deltaValue","fullValue","currentPercentage","dx","dy","rotateCoordinate","widthPercent","heightPercent","fullWidth","fullHeight","newLeft","newRight","newTop","newBottom","overlayHTML","containerHTML","layer","getCropHandleHTMLInternal","getCropHTMLInternal","HandleTypes","hypotenuse","getResizeHandleHTML","handleTypes","leftOrRight","topOrBottom","setHandleStyle","horizontalOnly","verticalOnly","shouldPreserveRatio","actualWidth","actualHeight","resizeBorderColor","DEG_PER_RAD","getRotateIconHTML","d","stroke","ROTATE_SIZE","newX","newY","angleInRad","angleInDeg","rotateHandleRect","adjustedDistance","rotateGap","rotateTop","selectionBorderColor","forcePreserveRatio","resizableImageSelector","showResizeHandle","hideResizeHandle","selectImageAfterUnSelect","convertSingleImageBody","getPasteSource","isPureLiNode","childNode","LAST_TD_END_REGEX","LAST_TR_END_REGEX","LAST_TR_REGEX","LAST_TABLE_REGEX","excelHandler","trMatch","tableMatch","replaceChildren","chainSanitizerCallback","processBlock","checkAndAddBr","blocksLength","insertPositionNode","listItemContainers","TABLE_TEMP_ELEMENTS_QUERY","isWordOnlineWithList","WORD_ONLINE_IDENTIFYING_SELECTOR","LIST_CONTAINER_ELEMENT_CLASS_NAME","VALID_LIST_STYLE_CHAR_CODES","createNewList","listItemContainer","startAttribute","firstElementChild","insertConvertedListToDoc","convertedListElement","listItemBlock","replaceRegex","prevParent","nextParent","sanitizeListItemContainer","listElements","curListItemBlock","curItem","lastItemInCurBlock","createListItemBlock","getListItemBlocks","itemBlock","flattenListBlock","getContainerListType","itemLevel","listRootElement","itemToInsert","curListLevel","lastElementChild","lastChildTag","insertListItem","parentContainer","getImageNodes","DeprecatedColorList","property","SUPPORTED_PROTOCOLS","URL","protocol","validateLink","listsMetadata","currentUniqueListId","listItems","currentListIdsByLevels","createLevelLists","lastProcessedItem","NODE_ID_ATTRIBUTE_NAME","getAndSetNodeId","wordCustomData","nextNodeId","dict","MSO_COMMENT_PARENT","MSO_COMMENT_REFERENCE","MSO_COMMENT_DATE","MSO_COMMENT_ANCHOR_HREF_REGEX","MSO_COMMENT_CONTINUATION","MSO_COMMENT_DONE","PERCENTAGE_REGEX","wordConverter","createWordConverter","wordConverterArgs","createWordConverterArguments","processNodesDiscovery","processNodeConvert","parsedLineHeight","UNIQUE_LIST_ID_CUSTOM_DATA","MSO_LIST_STYLE_NAME","LINE_BREAKS","getOrCreateListForNode","listMetadata","recurringGetOrCreateListAtNode","listId","getObject","uniqueListId","setObject","convertListIfNeeded","possibleList","getRealPreviousSibling","cleanupListIgnore","levels","nodesToRemove","isEmptySpan","fixWordListComments","isIgnoreNode","getListItemMetadata","listAttribute","getStyleValue","listProps","wordListId","originalNode","isFakeBullet","fakeBullet","getFakeBulletText","removeComments","endComment","getRealNextSibling","newSpan","prevSibling","isEmptyTextNode","resetCurrentLists","ll","itemMetadata","levelInfo","ignore","numberOfItems","secondFakeBullet","firstFakeBullet","nextUniqueId","clone","textIndent","numBulletsConverted","numNumberedConverted","createCustomData","BACKSPACE_CHAR_CODE","ESC_CHAR_CODE","LEFT_ARROW_CHAR_CODE","UP_ARROW_CHAR_CODE","RIGHT_ARROW_CHAR_CODE","DOWN_ARROW_CHAR_CODE","DELETE_CHAR_CODE","UNIDENTIFIED_CODE","dataProvider","pickerOptions","eventHandledOnKeyDown","blockSuggestions","isSuggesting","lastKnownRange","isPendingInputEventHandling","currentInputLength","newInputLength","onInitalize","htmlNode","getWord","setIsSuggesting","handleAutoComplete","onDispose","elementIdPrefix","isAndroidKeyboardEvent","calcInputLength","onKeyDownEvent","onAndroidInputEvent","shouldHandleKeyUpEvent","onKeyUpDomEvent","setLastKnownRange","onIsSuggestingChanged","setAriaOwns","setAriaActiveDescendant","cancelDefaultKeyDownEvent","stopImmediatePropagation","getIdValue","getNamedItem","getWordBeforeCursor","replacementNode","getRangeUntilAt","positionContentSearcher","startPos","endPos","hasMatched","isModifierKey","wordBeforeCursor","trimmedWordBeforeCursor","wordBeforeCursorWithoutTriggerChar","queryStringUpdated","setCursorPoint","rangeNode","nodeBeforeCursor","setRangeStart","nodeBeforeNodeBeforeCursor","detach","targetPoint","bufferZone","shiftHighlight","isHorizontal","getSelectedIndex","selectOption","tryRemoveNode","nodeAfterCursor","nodeId","onRemove","inputType","getInlineElementBeforeCursor","wordFromRange","wordFromCache","nodeOffset","suggestionsLabel","selectedIndex","suggestionLabelPrefix","charCode","shadowEditCoordinatesBackup","firstTable","lastTarget","firstTarget","preventKeyUp","startedSelection","targetTable","mouseMoveDisposer","DeleteTableContents","clearState","handleEnteredShadowEdit","handleLeavingShadowEdit","handleMouseDownEvent","handleKeyUpEvent","handleScrollEvent","TABLE_CELL_SELECTOR","deleteNodeContents","selectNodeContents","getCellAtCursor","newTarget","setData","shouldConvertToTableSelection","updateSelection","getCellCoordinates","getNextTD","prepareSelection","anchorNode","anchorOffset","isBeginAboveEnd","targetPosition","handleKeySelectionInsideTable","IGNORE_KEY_UP_KEYS","selectionInsideTableMouseMove","coord","getTableAtCursor","getOnMouseUp","isNewTDContainingFirstTable","restoreSelection","first","firstCord","lastCord","eventTarget","cellInput","indexY","indexX","r1","r2","newFirst","newLast","fixCoordinates","rowsCells","isNewTargetTableContained","isFirstTargetTableContained","firstTargetRange","onShowHelperElement","onMouseMoveDisposer","tableRectMap","tableEditor","onMouseOut","ev","relatedTarget","isOwnedElement","setTableEditor","buttons","ensureTableRects","editorWindow","scrollX","scrollY","invalidateTableRects","mousemove","disposeTableEditor","isEditing","currentTarget","normalizeRect","onStart","currentCells","nextCells","initialX","onDraggingHorizontal","onDraggingVertical","getHorizontalDistance","canResizeColumns","isLastCell","isShiftPressed","newWidthList","wordBreak","set","toLeft","setHorizontalPosition","CELL_RESIZER_WIDTH","setVerticalPosition","onEnd","createElementData","featureHandler","TOP_OR_SIDE","onChanged","horizontalInserter","verticalInserter","horizontalResizer","verticalResizer","tableResizer","onFinishEditing","isCurrentlyEditing","onStartTableResize","onStartResize","onStartCellResize","disposeTableResizer","onInserted","onSelect","getOnMouseOut","setEditorFeatures","disposeCellResizers","disposeTableInserter","disposeTableSelector","firstCellRect","topOrSide","tableRect","tdRect","lessThanBottom","lessThanRight","moreThanLeft","isOnLeftOrRight","isOnRightHalf","setInserterTd","tdAbove","tdAboveRect","isTdNotAboveMerged","setResizingTd","inserter","newInserter","disposeTableEditFeature","resizer","onInsert","viewPort","inserterColor","getInsertElementData","TableInsertHandler","insertTd","onMouseOutEvent","originalRect","ratioX","ratioY","shouldResizeX","shouldResizeY","setResizeDivPosition","TABLE_RESIZER_LENGTH","onFinishDragging","visibleViewport","containerRect","isTableTopVisible","TABLE_SELECTOR_LENGTH","setSelectorDivPosition","TableSelectorFeature","ENTITY_TYPE","watermark","customClass","showHideWatermark","watermarks","isShowing","removeWatermark","newEntity","insertEntity","spellcheck","CompatibleAlignment","CompatibleBulletListType","CompatibleCapitalization","CompatibleChangeSource","CompatibleClearFormatMode","CompatibleColorTransformDirection","CompatibleContentPosition","CompatibleContentType","CompatibleContentTypePrefix","CompatibleDarkModeDatasetNames","CompatibleDefinitionType","CompatibleDelimiterClasses","CompatibleDirection","CompatibleDocumentCommand","CompatibleDocumentPosition","CompatibleEntityClasses","CompatibleEntityOperation","CompatibleExperimentalFeatures","CompatibleFontSizeChange","CompatibleGetContentMode","CompatibleImageEditOperation","CompatibleIndentation","CompatibleKeys","CompatibleKnownCreateElementDataIndex","CompatibleKnownPasteSourceType","CompatibleListType","CompatibleNodeType","CompatibleNumberingListType","CompatiblePasteType","CompatiblePluginEventType","CompatiblePositionType","CompatibleQueryScope","CompatibleRegionType","CompatibleSelectionRangeTypes","CompatibleTableBorderFormat","CompatibleTableOperation","Alignment","BulletListType","Capitalization","ChangeSource","ClearFormatMode","ColorTransformDirection","ContentPosition","ContentType","ContentTypePrefix","DarkModeDatasetNames","DefinitionType","DelimiterClasses","Direction","DocumentCommand","DocumentPosition","EntityClasses","EntityOperation","ExperimentalFeatures","FontSizeChange","GetContentMode","ImageEditOperation","Indentation","Keys","KnownCreateElementDataIndex","KnownPasteSourceType","ListType","NodeType","NumberingListType","PasteType","PluginEventType","PositionType","QueryScope","RegionType","SelectionRangeTypes","TableBorderFormat","TableOperation","additionalPlugins","HyperLink","Paste","ContentEdit","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","String","__","create","__assign","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","decorators","desc","Reflect","decorate","__param","paramIndex","decorator","__esDecorate","ctor","descriptorIn","contextIn","initializers","extraInitializers","accept","descriptor","done","access","addInitializer","init","__runInitializers","thisArg","useValue","__propKey","__setFunctionName","description","configurable","__metadata","metadataKey","metadataValue","__awaiter","_arguments","generator","reject","fulfilled","rejected","__generator","sent","trys","ops","verb","Symbol","iterator","op","__createBinding","o","k2","__esModule","writable","enumerable","__exportStar","__values","__read","ar","error","__spread","__spreadArrays","il","jl","__spreadArray","pack","__await","__asyncGenerator","asyncIterator","resume","fulfill","settle","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","__setModuleDefault","__importStar","mod","__importDefault","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","prop","toStringTag","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"rooster-min.js","mappings":"0CACA,IAAIA,EAAc,EAAQ,MAMtBC,EAAkB,CAAC,EACvB,IAAK,IAAIC,KAAOF,EACXA,EAAYG,eAAeD,KAC9BD,EAAgBD,EAAYE,IAAQA,GAItC,IAAIE,EAAUC,EAAOC,QAAU,CAC9BC,IAAK,CAACC,SAAU,EAAGC,OAAQ,OAC3BC,IAAK,CAACF,SAAU,EAAGC,OAAQ,OAC3BE,IAAK,CAACH,SAAU,EAAGC,OAAQ,OAC3BG,IAAK,CAACJ,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AS,aAAc,CAAEuB,OAAO,GAAO,ECF9D,IAAIiqG,EAAsBN,EAAoB,M","sources":["webpack://roosterjs/./node_modules/color-convert/conversions.js","webpack://roosterjs/./node_modules/color-convert/index.js","webpack://roosterjs/./node_modules/color-convert/route.js","webpack://roosterjs/./node_modules/color-name/index.js","webpack://roosterjs/./node_modules/color-string/index.js","webpack://roosterjs/./node_modules/color/index.js","webpack://roosterjs/./node_modules/is-arrayish/index.js","webpack://roosterjs/./node_modules/simple-swizzle/index.js","webpack://roosterjs/./packages/roosterjs-color-utils/lib/index.ts","webpack://roosterjs/./packages/roosterjs-color-utils/lib/utils/getDarkColor.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/changeCapitalization.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/changeFontSize.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/clearBlockFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/clearFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/createLink.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/getFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/insertEntity.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/insertImage.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/removeLink.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/replaceWithNode.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/rotateElement.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setAlignment.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setBackgroundColor.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setDirection.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setFontName.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setFontSize.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setImageAltText.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setIndentation.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setOrderedListNumbering.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/setTextColor.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleBlockQuote.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleBold.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleBullet.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleCodeBlock.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleHeader.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleItalic.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleNumbering.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleStrikethrough.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleSubscript.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleSuperscript.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/format/toggleUnderline.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/applyCellShading.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/editTable.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/formatTable.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/table/insertTable.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/applyInlineStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/applyListItemWrap.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/blockFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/blockWrap.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/collapseSelectedBlocks.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/commitListChains.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/execCommand.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/formatUndoSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/normalizeBlockquote.ts","webpack://roosterjs/./packages/roosterjs-editor-api/lib/utils/toggleListType.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/addUndoSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/attachDomEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/coreApiMap.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/createPasteFragment.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/ensureTypeInContainer.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/focus.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getContent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getPendableFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getSelectionRange.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getSelectionRangeEx.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/getStyleBasedFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/hasFocus.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/insertNode.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/restoreUndoSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/select.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/selectImage.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/selectRange.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/selectTable.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/setContent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/switchShadowEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/transformColor.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/triggerEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/coreApi/utils/addUniqueId.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/CopyPastePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/DOMEventPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/EditPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/EntityPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/ImageSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/LifecyclePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/MouseUpPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/NormalizeTablePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/PendingFormatStatePlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/TypeInContainerPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/UndoPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/createCorePlugins.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/utils/forEachSelectedCell.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/utils/inlineEntityOnPluginEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/corePlugins/utils/removeCellsOutsideSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/DarkColorHandlerImpl.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/Editor.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/EditorBase.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/createEditorCore.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/editor/isFeatureEnabled.ts","webpack://roosterjs/./packages/roosterjs-editor-core/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/NodeBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/StartEndBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/getBlockElementAtNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/blockElements/getFirstLastBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/createFragmentFromClipboardData.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/extractClipboardEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItems.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/extractClipboardItemsForIE.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/getPasteType.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/handleImagePaste.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/handleTextPaste.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/retrieveMetadataFromClipboard.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/clipboard/sanitizePasteContent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/BodyScoper.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/ContentTraverser.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/PositionContentSearcher.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/SelectionBlockScoper.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/contentTraverser/SelectionScoper.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/delimiter/addDelimiters.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/delimiter/getDelimiterFromElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/edit/adjustInsertPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/edit/deleteSelectedContent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/edit/getTextContent.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/commitEntity.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/entityPlaceholderUtils.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/getEntityFromElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/entity/getEntitySelector.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/cacheGetEventData.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/clearEventDataCache.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/isCharacterValue.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/isCtrlOrMetaPressed.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/event/isModifierKey.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/HtmlSanitizer.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/chainSanitizerCallback.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/cloneObject.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/createDefaultHtmlSanitizerOptions.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/getAllowedValues.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/getInheritableStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/getPredefinedCssForElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/htmlSanitizer/processCssVariable.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/EmptyInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/ImageInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/LinkInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/NodeInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/PartialInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/applyTextStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/getFirstLastInlineElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementAtNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/inlineElements/getInlineElementBeforeAfter.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/jsUtils/arrayPush.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/jsUtils/getObjectKeys.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/jsUtils/toArray.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/VList.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/VListChain.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/VListItem.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/convertDecimalsToAlpha.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/convertDecimalsToRomans.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/createVListFromRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/getListTypeFromNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/getRootListNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/setBulletListMarkers.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/setListItemStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/list/setNumberingListMarkers.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/metadata/definitionCreators.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/metadata/metadata.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/metadata/validate.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/constants.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/documentContainWacElements.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/getPasteSource.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelDesktopDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isExcelOnlineDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isGoogleSheetDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isPowerPointDesktopDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/isWordDesktopDocument.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/pasteSourceValidations/shouldConvertToSingleImage.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/collapseNodesInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/getRegionsFromRange.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/getSelectedBlockElementsInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/getSelectionRangeInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/isNodeInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/region/mergeBlocksInRegion.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/Position.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/addRangeToSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/createRange.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/getHtmlWithSelectionPath.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/getPositionRect.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/getSelectionPath.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/isPositionAtBeginningOf.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/selection/setHtmlWithSelectionPath.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/addSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/canMoveCurrentSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/canUndoAutoComplete.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/clearProceedingSnapshots.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/createSnapshots.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/snapshots/moveCurrentSnapshot.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/getStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/removeGlobalCssStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/removeImportantStyleRule.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/setGlobalCssStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/style/setStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/VTable.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/applyTableFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/cloneCellStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/isWholeTableSelected.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/pasteTable.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/tableCellInfo.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/table/tableFormatInfo.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/Browser.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/applyFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/changeElementTag.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/collapseNodes.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/contains.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/createElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/findClosestElementAncestor.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/fromHtml.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getComputedStyles.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getInnerHTML.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getIntersectedRect.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getLeafNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getLeafSibling.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getPendableFormatState.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/getTagOfNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isBlockElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isNodeAfter.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isNodeEmpty.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/isVoidHtmlElement.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/matchLink.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/matchesSelector.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/moveChildNodes.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/normalizeRect.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/parseColor.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/queryElements.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/readFile.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/safeInstanceOf.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/setColor.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/shouldSkipNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/splitParentNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/splitTextNode.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/unwrap.ts","webpack://roosterjs/./packages/roosterjs-editor-dom/lib/utils/wrap.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/AutoFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ContentEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ContextMenu.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/CustomReplace.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/CutPasteListChain.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/HyperLink.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ImageEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/ImageResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/Paste.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/Picker.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/TableCellSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/TableResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/Watermark.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/pluginUtils/DragAndDropHelper.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/AutoFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/AutoFormat/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/ContentEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/autoLinkFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/codeFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/cursorFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/entityFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/listFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/markdownFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/quoteFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/shortcutFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/structuredNodeFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/tableFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/features/textFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/getAllFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/convertAlphaToDecimals.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoBulletListStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContentEdit/utils/getAutoNumberingListStyle.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/ContextMenu.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ContextMenu/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/CustomReplace.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CustomReplace/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/CutPasteListChain.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/CutPasteListChain/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/HyperLink/HyperLink.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/HyperLink/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/ImageEdit.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/canRegenerateImage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/isResizedTo.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resetImage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/api/resizeByPercentage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/applyChange.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/checkEditInfoState.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/editInfo.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/generateDataURL.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getGeneratedImageSize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/getTargetSizeByPercentage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/editInfoUtils/tryToConvertGifToPng.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Cropper.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Resizer.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/imageEditors/Rotator.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageEdit/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageResize/ImageResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/ImageResize/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/Paste.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/commonConverter/convertPastedContentForLI.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/excelConverter/convertPastedContentFromExcel.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/imageConverter/convertPasteContentForSingleImage.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/lineMerge/handleLineMerge.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/ListItemBlock.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromOfficeOnline.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/officeOnlineConverter/convertPastedContentFromWordOnline.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/pptConverter/convertPastedContentFromPowerPoint.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/deprecatedColorList.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/LevelLists.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordConverterArguments.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/WordCustomData.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/commentsRemoval.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/convertPastedContentFromWord.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/converterUtils.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Paste/wordConverter/wordConverter.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Picker/PickerPlugin.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Picker/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/TableCellSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/constants.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/features/DeleteTableContents.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyDownEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/keyUtils/handleKeyUpEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleMouseDownEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/mouseUtils/handleScrollEvent.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/clearState.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellAtCursor.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getCellCoordinates.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/getTableAtCursor.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/isAfter.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/normalizeTableSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/prepareSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/restoreSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/selectTable.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/setData.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableCellSelection/utils/updateSelection.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/TableResize.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/CellResizer.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditor.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableEditorFeature.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableInserter.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableResizer.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/editors/TableSelector.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/TableResize/index.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Watermark/Watermark.ts","webpack://roosterjs/./packages/roosterjs-editor-plugins/lib/plugins/Watermark/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types-compatible/lib/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Alignment.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/BulletListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Capitalization.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ChangeSource.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ClearFormatMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ColorTransformDirection.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ContentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ContentType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DarkModeDatasetNames.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DefinitionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DelimiterClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Direction.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DocumentCommand.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/DocumentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/EntityClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/EntityOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ExperimentalFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/FontSizeChange.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/GetContentMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ImageEditOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Indentation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/Keys.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/KnownCreateElementDataIndex.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/KnownPasteSourceType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/ListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/NodeType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/NumberingListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/PasteType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/PluginEventType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/PositionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/QueryScope.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/RegionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/SelectionRangeTypes.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/TableBorderFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/TableOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleEnum/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/compatibleTypes.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Alignment.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/BulletListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Capitalization.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ChangeSource.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ClearFormatMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ColorTransformDirection.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ContentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ContentType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DarkModeDatasetNames.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DefinitionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DelimiterClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Direction.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DocumentCommand.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/DocumentPosition.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/EntityClasses.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/EntityOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ExperimentalFeatures.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/FontSizeChange.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/GetContentMode.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ImageEditOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Indentation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/Keys.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/KnownCreateElementDataIndex.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/KnownPasteSourceType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/ListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/NodeType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/NumberingListType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/PasteType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/PluginEventType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/PositionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/QueryScope.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/RegionType.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/SelectionRangeTypes.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/TableBorderFormat.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/TableOperation.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/enum/index.ts","webpack://roosterjs/./packages/roosterjs-editor-types/lib/index.ts","webpack://roosterjs/./packages/roosterjs/lib/createEditor.ts","webpack://roosterjs/./packages/roosterjs/lib/index.ts","webpack://roosterjs/./node_modules/tslib/tslib.es6.mjs","webpack://roosterjs/webpack/bootstrap","webpack://roosterjs/webpack/runtime/define property getters","webpack://roosterjs/webpack/runtime/hasOwnProperty shorthand","webpack://roosterjs/webpack/runtime/make namespace object","webpack://roosterjs/webpack/startup"],"sourcesContent":["/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\n\nvar reverseNames = {};\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (colorNames.hasOwnProperty(name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar keyword = /(\\D+)/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\n\t\tif (!rgb) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = (parseFloat(match[1]) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = num.toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (obj == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","export { default as getDarkColor } from './utils/getDarkColor';\n","import * as Color from 'color';\n\nconst DefaultBaseLValue = 21.247; // L-value of #333333\n\n/**\n * Get dark mode color for a given color\n * @param color The color to calculate from\n * @param baseLValue The Light value for base dark color in LAB format. @default the Light value for #333333\n */\nexport default function getDarkColor(\n color: string,\n baseLValue: number = DefaultBaseLValue\n): string {\n try {\n const computedColor = Color(color || undefined);\n const colorLab = computedColor.lab().array();\n const newLValue = (100 - colorLab[0]) * ((100 - baseLValue) / 100) + baseLValue;\n color = Color.lab(newLValue, colorLab[1], colorLab[2])\n .rgb()\n .alpha(computedColor.alpha())\n .toString();\n } catch {}\n\n return color;\n}\n","import applyInlineStyle from '../utils/applyInlineStyle';\nimport { Capitalization, IEditor, NodeType } from 'roosterjs-editor-types';\nimport { getFirstLeafNode, getNextLeafSibling } from 'roosterjs-editor-dom';\nimport type { CompatibleCapitalization } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Change the capitalization of text in the selection\n * @param editor The editor instance\n * @param capitalization The case option\n * @param language Optional parameter for language string that should comply to \"IETF BCP 47 Tags for\n * Identifying Languages\". For example: 'en' or 'en-US' for English, 'tr' for Turkish.\n * Default is the host environment’s current locale.\n */\nexport default function changeCapitalization(\n editor: IEditor,\n capitalization: Capitalization | CompatibleCapitalization,\n language?: string\n) {\n applyInlineStyle(\n editor,\n element => {\n for (\n let node = getFirstLeafNode(element);\n node;\n node = getNextLeafSibling(element, node)\n ) {\n if (node.nodeType == NodeType.Text) {\n try {\n node.textContent = getCapitalizedText(node.textContent, language);\n } catch {\n node.textContent = getCapitalizedText(node.textContent, undefined);\n }\n }\n }\n },\n 'changeCapitalization'\n );\n\n function getCapitalizedText(\n originalText: string | null,\n language: string | undefined\n ): string | null {\n if (originalText === null) {\n return originalText;\n }\n switch (capitalization) {\n case Capitalization.Lowercase:\n return originalText.toLocaleLowerCase(language);\n case Capitalization.Uppercase:\n return originalText.toLocaleUpperCase(language);\n case Capitalization.CapitalizeEachWord:\n const wordArray = originalText.toLocaleLowerCase(language).split(' ');\n for (let i = 0; i < wordArray.length; i++) {\n wordArray[i] =\n wordArray[i].charAt(0).toLocaleUpperCase(language) + wordArray[i].slice(1);\n }\n return wordArray.join(' ');\n case Capitalization.Sentence:\n // TODO: Add rules on punctuation for internationalization - TASK 104769\n const punctuationMarks = '[\\\\.\\\\!\\\\?]';\n // Find a match of a word character either:\n // - At the beginning of a string with or without preceding whitespace, for\n // example: ' hello world' and 'hello world' strings would both match 'h'.\n // - Or preceded by a punctuation mark and at least one whitespace, for\n // example 'yes. hello world' would match 'y' and 'h'.\n const regex = new RegExp('^\\\\s*\\\\w|' + punctuationMarks + '\\\\s+\\\\w', 'g');\n return originalText.toLocaleLowerCase(language).replace(regex, match => {\n return match.toLocaleUpperCase(language);\n });\n default:\n return originalText;\n }\n }\n}\n","import applyInlineStyle from '../utils/applyInlineStyle';\r\nimport { FontSizeChange, IEditor } from 'roosterjs-editor-types';\r\nimport { getComputedStyle } from 'roosterjs-editor-dom';\r\nimport type { CompatibleFontSizeChange } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Default font size sequence, in pt. Suggest editor UI use this sequence as your font size list,\r\n * So that when increase/decrease font size, the font size can match the sequence of your font size picker\r\n */\r\nexport const FONT_SIZES = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];\r\nconst MIN_FONT_SIZE = 1;\r\nconst MAX_FONT_SIZE = 1000;\r\n\r\n/**\r\n * Increase or decrease font size in selection\r\n * @param editor The editor instance\r\n * @param change Whether increase or decrease font size\r\n * @param fontSizes A sorted font size array, in pt. Default value is FONT_SIZES\r\n */\r\nexport default function changeFontSize(\r\n editor: IEditor,\r\n change: FontSizeChange | CompatibleFontSizeChange,\r\n fontSizes: number[] = FONT_SIZES\r\n) {\r\n let changeBase: 1 | -1 = change == FontSizeChange.Increase ? 1 : -1;\r\n applyInlineStyle(\r\n editor,\r\n element => {\r\n let pt = parseFloat(getComputedStyle(element, 'font-size') || element.style.fontSize);\r\n element.style.fontSize = getNewFontSize(pt, changeBase, fontSizes) + 'pt';\r\n let lineHeight = getComputedStyle(element, 'line-height');\r\n if (lineHeight && lineHeight != 'normal') {\r\n element.style.lineHeight = 'normal';\r\n }\r\n },\r\n 'changeFontSize'\r\n );\r\n}\r\n\r\n/**\r\n * @internal\r\n * Get new font size after increase/decrease. This is exported for test only\r\n * @param pt Original font size, in Point\r\n * @param changeBase Changed value, 1 means increase, -1 means decrease\r\n * @param fontSizes Known font size array\r\n */\r\nexport function getNewFontSize(pt: number, changeBase: 1 | -1, fontSizes: number[]): number {\r\n pt = changeBase == 1 ? Math.floor(pt) : Math.ceil(pt);\r\n let last = fontSizes[fontSizes.length - 1];\r\n if (pt <= fontSizes[0]) {\r\n pt = Math.max(pt + changeBase, MIN_FONT_SIZE);\r\n } else if (pt > last || (pt == last && changeBase == 1)) {\r\n pt = pt / 10;\r\n pt = changeBase == 1 ? Math.floor(pt) : Math.ceil(pt);\r\n pt = Math.min(Math.max((pt + changeBase) * 10, last), MAX_FONT_SIZE);\r\n } else if (changeBase == 1) {\r\n for (let i = 0; i < fontSizes.length; i++) {\r\n if (pt < fontSizes[i]) {\r\n pt = fontSizes[i];\r\n break;\r\n }\r\n }\r\n } else {\r\n for (let i = fontSizes.length - 1; i >= 0; i--) {\r\n if (pt > fontSizes[i]) {\r\n pt = fontSizes[i];\r\n break;\r\n }\r\n }\r\n }\r\n return pt;\r\n}\r\n","import clearFormat from './clearFormat';\r\nimport { ClearFormatMode, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @deprecated Use clearFormat instead and pass the ClearFormatMode.Block as parameter\r\n * @param editor The editor instance\r\n */\r\nexport default function clearBlockFormat(editor: IEditor) {\r\n clearFormat(editor, ClearFormatMode.Block);\r\n}\r\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport blockFormat from '../utils/blockFormat';\r\nimport execCommand from '../utils/execCommand';\r\nimport formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport setBackgroundColor from './setBackgroundColor';\r\nimport setFontName from './setFontName';\r\nimport setFontSize from './setFontSize';\r\nimport setTextColor from './setTextColor';\r\nimport toggleBold from './toggleBold';\r\nimport toggleItalic from './toggleItalic';\r\nimport toggleUnderline from './toggleUnderline';\r\nimport {\r\n ChangeSource,\r\n ClearFormatMode,\r\n DocumentCommand,\r\n IEditor,\r\n QueryScope,\r\n} from 'roosterjs-editor-types';\r\nimport {\r\n collapseNodesInRegion,\r\n getObjectKeys,\r\n getSelectedBlockElementsInRegion,\r\n getStyles,\r\n getTagOfNode,\r\n isBlockElement,\r\n isNodeInRegion,\r\n isVoidHtmlElement,\r\n PartialInlineElement,\r\n NodeInlineElement,\r\n safeInstanceOf,\r\n setStyles,\r\n splitBalancedNodeRange,\r\n toArray,\r\n unwrap,\r\n wrap,\r\n} from 'roosterjs-editor-dom';\r\nimport type { CompatibleClearFormatMode } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\nconst STYLES_TO_REMOVE = ['font', 'text-decoration', 'color', 'background'];\r\nconst TAGS_TO_UNWRAP = 'B,I,U,STRONG,EM,SUB,SUP,STRIKE,FONT,CENTER,H1,H2,H3,H4,H5,H6,UL,OL,LI,SPAN,P,BLOCKQUOTE,CODE,S,PRE'.split(\r\n ','\r\n);\r\nconst ATTRIBUTES_TO_PRESERVE = ['href', 'src', 'cellpadding', 'cellspacing'];\r\nconst TAGS_TO_STOP_UNWRAP = ['TD', 'TH', 'TR', 'TABLE', 'TBODY', 'THEAD'];\r\n\r\n/**\r\n * @param editor The editor instance\r\n * @returns if the current selection is composed of two or more block elements\r\n */\r\nfunction isMultiBlockSelection(editor: IEditor): boolean {\r\n let transverser = editor.getSelectionTraverser();\r\n let blockElement = transverser?.currentBlockElement;\r\n if (!blockElement) {\r\n return false;\r\n }\r\n\r\n let nextBlockElement = transverser?.getNextBlockElement();\r\n\r\n //At least two blocks are selected\r\n return !!nextBlockElement;\r\n}\r\n\r\nfunction clearNodeFormat(node: Node): boolean {\r\n // 1. Recursively clear format of all its child nodes\r\n const areBlockElements = toArray(node.childNodes).map(clearNodeFormat);\r\n let areAllChildrenBlock = areBlockElements.every(b => b);\r\n let returnBlockElement = isBlockElement(node);\r\n\r\n // 2. Unwrap the tag if necessary\r\n const tag = getTagOfNode(node);\r\n if (tag) {\r\n if (\r\n TAGS_TO_UNWRAP.indexOf(tag) >= 0 ||\r\n (areAllChildrenBlock &&\r\n !isVoidHtmlElement(node) &&\r\n TAGS_TO_STOP_UNWRAP.indexOf(tag) < 0)\r\n ) {\r\n if (returnBlockElement && !areAllChildrenBlock) {\r\n wrap(node);\r\n }\r\n unwrap(node);\r\n } else {\r\n // 3. Otherwise, remove all attributes\r\n clearAttribute(node as HTMLElement);\r\n }\r\n }\r\n\r\n return returnBlockElement;\r\n}\r\n\r\nfunction clearAttribute(element: HTMLElement) {\r\n const isTableCell = safeInstanceOf(element, 'HTMLTableCellElement');\r\n const isTable = safeInstanceOf(element, 'HTMLTableElement');\r\n\r\n for (let attr of toArray(element.attributes)) {\r\n if (isTableCell && attr.name == 'style') {\r\n removeNonBorderStyles(element);\r\n } else if (isTable && attr.name == 'style') {\r\n removeNotTableDefaultStyles(element);\r\n } else if (\r\n ATTRIBUTES_TO_PRESERVE.indexOf(attr.name.toLowerCase()) < 0 &&\r\n attr.name.indexOf('data-') != 0\r\n ) {\r\n element.removeAttribute(attr.name);\r\n }\r\n }\r\n}\r\n\r\nfunction updateStyles(\r\n element: HTMLElement,\r\n callbackfn: (\r\n value: string,\r\n styles: Record,\r\n result: Record\r\n ) => void\r\n) {\r\n const styles = getStyles(element);\r\n const result: Record = {};\r\n\r\n getObjectKeys(styles).forEach(style => callbackfn(style, styles, result));\r\n\r\n setStyles(element, styles);\r\n\r\n return result;\r\n}\r\n\r\nfunction removeNonBorderStyles(element: HTMLElement): Record {\r\n return updateStyles(element, (name, styles, result) => {\r\n if (name.indexOf('border') < 0) {\r\n result[name] = styles[name];\r\n delete styles[name];\r\n }\r\n });\r\n}\r\n\r\nfunction removeNotTableDefaultStyles(element: HTMLTableElement) {\r\n return updateStyles(element, (name, styles, result) => {\r\n if (name != 'border-collapse') {\r\n result[name] = styles[name];\r\n delete styles[name];\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Verifies recursively if a node and its parents have any siblings with text content\r\n * Ignoring the children of contentDiv and returning true if any node is LI\r\n * @returns `true` if this node, and its parents (minus the children of the contentDiv) have no siblings with text content\r\n */\r\nfunction isNodeWholeBlock(node: Node, editor: IEditor) {\r\n let currentNode: ParentNode | Node | null = node;\r\n while (currentNode && editor.contains(currentNode.parentNode)) {\r\n if (currentNode.nextSibling || currentNode.previousSibling) {\r\n if (safeInstanceOf(currentNode, 'HTMLLIElement')) {\r\n return true;\r\n }\r\n let isOnlySiblingWithContent = true;\r\n currentNode.parentNode?.childNodes.forEach(node => {\r\n if (node != currentNode && node.textContent?.length) {\r\n isOnlySiblingWithContent = false;\r\n }\r\n });\r\n return isOnlySiblingWithContent;\r\n }\r\n currentNode = currentNode.parentNode;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Clear the format of the selected text or list of blocks\r\n * If the current selection is compose of multiple block elements then remove the text and struture format for all the selected blocks\r\n * If the current selection is compose of a partial inline element then only the text format is removed from the current selection\r\n * @param editor The editor instance\r\n */\r\nfunction clearAutoDetectFormat(editor: IEditor) {\r\n const isMultiBlock = isMultiBlockSelection(editor);\r\n if (!isMultiBlock) {\r\n const transverser = editor.getSelectionTraverser();\r\n const inlineElement = transverser?.currentInlineElement;\r\n const isPartial =\r\n inlineElement instanceof PartialInlineElement ||\r\n (inlineElement instanceof NodeInlineElement &&\r\n !isNodeWholeBlock(inlineElement.getContainerNode(), editor));\r\n if (isPartial) {\r\n clearFormat(editor);\r\n return;\r\n }\r\n }\r\n clearBlockFormat(editor);\r\n}\r\n\r\n/**\r\n * Clear all formats of selected blocks.\r\n * When selection is collapsed, only clear format of current block.\r\n * @param editor The editor instance\r\n */\r\nfunction clearBlockFormat(editor: IEditor) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n blockFormat(editor, region => {\r\n const blocks = getSelectedBlockElementsInRegion(region);\r\n let nodes = collapseNodesInRegion(region, blocks);\r\n\r\n if (editor.contains(region.rootNode)) {\r\n // If there are styles on table cell, wrap all its children and move down all non-border styles.\r\n // So that we can preserve styles for unselected blocks as well as border styles for table\r\n const nonborderStyles = removeNonBorderStyles(region.rootNode);\r\n if (getObjectKeys(nonborderStyles).length > 0) {\r\n const wrapper = wrap(toArray(region.rootNode.childNodes));\r\n setStyles(wrapper, nonborderStyles);\r\n }\r\n }\r\n\r\n while (\r\n nodes.length > 0 &&\r\n nodes[0].parentNode &&\r\n isNodeInRegion(region, nodes[0].parentNode)\r\n ) {\r\n const balancedNodes = splitBalancedNodeRange(nodes);\r\n nodes = balancedNodes ? [balancedNodes] : [];\r\n }\r\n\r\n nodes.forEach(clearNodeFormat);\r\n });\r\n setDefaultFormat(editor);\r\n },\r\n 'clearBlockFormat'\r\n );\r\n}\r\n\r\nfunction clearInlineFormat(editor: IEditor) {\r\n editor.focus();\r\n editor.addUndoSnapshot(() => {\r\n execCommand(editor, DocumentCommand.RemoveFormat);\r\n editor.queryElements('[class]', QueryScope.OnSelection, node =>\r\n node.removeAttribute('class')\r\n );\r\n\r\n setDefaultFormat(editor);\r\n\r\n return 'clearInlineFormat';\r\n }, ChangeSource.Format);\r\n}\r\n\r\nfunction setDefaultFontWeight(editor: IEditor, fontWeight: string = '400') {\r\n applyListItemStyleWrap(\r\n editor,\r\n 'font-weight',\r\n element => (element.style.fontWeight = fontWeight),\r\n 'setDefaultFontWeight'\r\n );\r\n}\r\n\r\nfunction setDefaultFormat(editor: IEditor) {\r\n const defaultFormat = editor.getDefaultFormat();\r\n const isDefaultFormatEmpty = getObjectKeys(defaultFormat).length === 0;\r\n editor.queryElements('[style]', QueryScope.InSelection, node => {\r\n const tag = getTagOfNode(node);\r\n if (TAGS_TO_STOP_UNWRAP.indexOf(tag) == -1) {\r\n removeStyles(tag, node, isDefaultFormatEmpty);\r\n } else {\r\n node.childNodes.forEach(node => {\r\n node.childNodes.forEach(cNode => {\r\n const tag = getTagOfNode(cNode);\r\n if (safeInstanceOf(cNode, 'HTMLElement')) {\r\n removeStyles(tag, cNode, isDefaultFormatEmpty);\r\n }\r\n });\r\n });\r\n }\r\n });\r\n\r\n if (!isDefaultFormatEmpty) {\r\n if (defaultFormat.fontFamily) {\r\n setFontName(editor, defaultFormat.fontFamily);\r\n }\r\n if (defaultFormat.fontSize) {\r\n setFontSize(editor, defaultFormat.fontSize);\r\n }\r\n if (defaultFormat.textColor) {\r\n const setColorIgnoredElements = editor.queryElements(\r\n 'a *, a',\r\n QueryScope.OnSelection\r\n );\r\n\r\n let shouldApplyInlineStyle =\r\n setColorIgnoredElements.length > 0\r\n ? (element: HTMLElement) => setColorIgnoredElements.indexOf(element) == -1\r\n : undefined;\r\n\r\n if (defaultFormat.textColors) {\r\n setTextColor(editor, defaultFormat.textColors, shouldApplyInlineStyle);\r\n } else {\r\n setTextColor(editor, defaultFormat.textColor, shouldApplyInlineStyle);\r\n }\r\n }\r\n if (defaultFormat.backgroundColor) {\r\n if (defaultFormat.backgroundColors) {\r\n setBackgroundColor(editor, defaultFormat.backgroundColors);\r\n } else {\r\n setBackgroundColor(editor, defaultFormat.backgroundColor);\r\n }\r\n }\r\n if (defaultFormat.bold) {\r\n toggleBold(editor);\r\n } else {\r\n setDefaultFontWeight(editor);\r\n }\r\n if (defaultFormat.italic) {\r\n toggleItalic(editor);\r\n }\r\n if (defaultFormat.underline) {\r\n toggleUnderline(editor);\r\n }\r\n }\r\n}\r\n\r\nfunction removeStyles(tag: string, node: HTMLElement, isDefaultFormatEmpty: boolean) {\r\n if (TAGS_TO_STOP_UNWRAP.indexOf(tag) == -1) {\r\n STYLES_TO_REMOVE.forEach(style => node.style.removeProperty(style));\r\n\r\n // when default format is empty, keep the HTML minimum by removing style attribute if there's no style\r\n // (note: because default format is empty, we're not adding style back in)\r\n if (isDefaultFormatEmpty && node.getAttribute('style') === '') {\r\n node.removeAttribute('style');\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Clear the format in current selection, after cleaning, the format will be\r\n * changed to default format. The format that get cleaned include B/I/U/font name/\r\n * font size/text color/background color/align left/align right/align center/superscript/subscript\r\n * @param editor The editor instance\r\n * @param formatType type of format to apply\r\n */\r\nexport default function clearFormat(\r\n editor: IEditor,\r\n formatType: ClearFormatMode | CompatibleClearFormatMode = ClearFormatMode.Inline\r\n) {\r\n switch (formatType) {\r\n case ClearFormatMode.Inline:\r\n clearInlineFormat(editor);\r\n break;\r\n case ClearFormatMode.Block:\r\n clearBlockFormat(editor);\r\n break;\r\n default:\r\n clearAutoDetectFormat(editor);\r\n }\r\n}\r\n","import { HtmlSanitizer, matchLink, wrap } from 'roosterjs-editor-dom';\r\nimport {\r\n ChangeSource,\r\n DocumentCommand,\r\n IEditor,\r\n QueryScope,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\n\r\n// Regex matching Uri scheme\r\nconst URI_REGEX = /^[a-zA-Z]+:/i;\r\n// Regex matching begin of email address\r\nconst MAILTO_REGEX = /^[\\w.%+-]+@/i;\r\n// Regex matching begin of ftp, i.e. ftp.microsoft.com\r\nconst FTP_REGEX = /^ftp\\./i;\r\n\r\nfunction applyLinkPrefix(url: string): string {\r\n if (!url) {\r\n return url;\r\n }\r\n\r\n // Add link prefix per rule:\r\n // (a) if the url always starts with a URI scheme, leave it as it is\r\n // (b) if the url is an email address, xxx@... add mailto: prefix\r\n // (c) if the url starts with ftp., add ftp:// prefix\r\n // (d) rest, add http:// prefix\r\n let prefix = '';\r\n if (url.search(URI_REGEX) < 0) {\r\n if (url.search(MAILTO_REGEX) == 0) {\r\n prefix = 'mailto:';\r\n } else if (url.search(FTP_REGEX) == 0) {\r\n prefix = 'ftp://';\r\n } else {\r\n // fallback to http://\r\n prefix = 'http://';\r\n }\r\n }\r\n\r\n return prefix + url;\r\n}\r\n\r\n/**\r\n * Insert a hyperlink at cursor.\r\n * When there is a selection, hyperlink will be applied to the selection,\r\n * otherwise a hyperlink will be inserted to the cursor position.\r\n * @param editor Editor object\r\n * @param link Link address, can be http(s), mailto, notes, file, unc, ftp, news, telnet, gopher, wais.\r\n * When protocol is not specified, a best matched protocol will be predicted.\r\n * @param altText Optional alt text of the link, will be shown when hover on the link\r\n * @param displayText Optional display text for the link.\r\n * @param target Optional display target for the link (\"_blank\"|\"_self\"|\"_parent\"|\"_top\"|\"{framename}\")\r\n * If specified, the display text of link will be replaced with this text.\r\n * If not specified and there wasn't a link, the link url will be used as display text.\r\n */\r\nexport default function createLink(\r\n editor: IEditor,\r\n link: string,\r\n altText?: string,\r\n displayText?: string,\r\n target?: string\r\n) {\r\n editor.focus();\r\n let url = (checkXss(link) || '').trim();\r\n if (url) {\r\n let linkData = matchLink(url);\r\n // matchLink can match most links, but not all, i.e. if you pass link a link as \"abc\", it won't match\r\n // we know in that case, users will want to insert a link like http://abc\r\n // so we have separate logic in applyLinkPrefix to add link prefix depending on the format of the link\r\n // i.e. if the link starts with something like abc@xxx, we will add mailto: prefix\r\n // if the link starts with ftp.xxx, we will add ftp:// link. For more, see applyLinkPrefix\r\n let normalizedUrl = linkData ? linkData.normalizedUrl : applyLinkPrefix(url);\r\n let originalUrl = linkData ? linkData.originalUrl : url;\r\n\r\n editor.addUndoSnapshot(() => {\r\n const selection = editor.getSelectionRangeEx();\r\n let anchor: HTMLAnchorElement | null = null;\r\n if (selection.type === SelectionRangeTypes.Normal) {\r\n const range = selection.ranges[0];\r\n if (range && range.collapsed) {\r\n anchor = getAnchorNodeAtCursor(editor);\r\n\r\n // If there is already a link, just change its href\r\n if (anchor) {\r\n anchor.href = normalizedUrl;\r\n // Change text content if it is specified\r\n updateAnchorDisplayText(anchor, displayText);\r\n } else {\r\n anchor = editor.getDocument().createElement('A') as HTMLAnchorElement;\r\n anchor.textContent = displayText || originalUrl;\r\n anchor.href = normalizedUrl;\r\n editor.insertNode(anchor);\r\n }\r\n } else {\r\n // the selection is not collapsed, use browser execCommand\r\n editor\r\n .getDocument()\r\n .execCommand(DocumentCommand.CreateLink, false, normalizedUrl);\r\n const traverser = editor.getSelectionTraverser();\r\n\r\n let currentInline = traverser?.getNextInlineElement();\r\n\r\n // list for removing unwanted lines\r\n let deletionInlineList: Node[] = [];\r\n\r\n while (currentInline) {\r\n deletionInlineList.push(currentInline.getContainerNode());\r\n currentInline = traverser?.getNextInlineElement();\r\n }\r\n\r\n deletionInlineList.forEach(node => editor.deleteNode(node));\r\n\r\n anchor = getAnchorNodeAtCursor(editor);\r\n updateAnchorDisplayText(anchor, displayText);\r\n }\r\n } else if (selection.type === SelectionRangeTypes.ImageSelection) {\r\n anchor = wrap(selection.image, 'A') as HTMLAnchorElement;\r\n anchor.href = normalizedUrl;\r\n }\r\n\r\n if (altText && anchor) {\r\n anchor.title = altText;\r\n }\r\n if (anchor) {\r\n updateAnchorTarget(anchor, target);\r\n }\r\n return anchor;\r\n }, ChangeSource.CreateLink);\r\n }\r\n}\r\n\r\nfunction getAnchorNodeAtCursor(editor: IEditor): HTMLAnchorElement {\r\n return editor.queryElements('a[href]', QueryScope.OnSelection)[0] as HTMLAnchorElement;\r\n}\r\n\r\nfunction updateAnchorDisplayText(anchor: HTMLAnchorElement, displayText?: string) {\r\n if (displayText && anchor.textContent != displayText) {\r\n anchor.textContent = displayText;\r\n }\r\n}\r\n\r\nfunction updateAnchorTarget(anchor: HTMLAnchorElement, target?: string) {\r\n if (target) {\r\n anchor.target = target;\r\n } else if (!target && anchor.getAttribute('target')) {\r\n anchor.removeAttribute('target');\r\n }\r\n}\r\n\r\nfunction checkXss(link: string): string | null {\r\n const sanitizer = new HtmlSanitizer();\r\n const a = document.createElement('a');\r\n\r\n a.href = link || '';\r\n sanitizer.sanitize(a);\r\n // We use getAttribute because some browsers will try to make the href property a valid link.\r\n // This has unintended side effects when the link lacks a protocol.\r\n return a.getAttribute('href');\r\n}\r\n","import { getTableFormatInfo, getTagOfNode, toArray } from 'roosterjs-editor-dom';\r\nimport {\r\n ElementBasedFormatState,\r\n FormatState,\r\n IEditor,\r\n PluginEvent,\r\n QueryScope,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get element based Format State at cursor\r\n * @param editor The editor instance\r\n * @param event (Optional) The plugin event, it stores the event cached data for looking up.\r\n * In this function the event cache is used to get list state and header level. If not passed,\r\n * it will query the node within selection to get the info\r\n * @returns An ElementBasedFormatState object\r\n */\r\nexport function getElementBasedFormatState(\r\n editor: IEditor,\r\n event?: PluginEvent\r\n): ElementBasedFormatState {\r\n const listTag = getTagOfNode(\r\n editor.getElementAtCursor('OL,UL', undefined /*startFrom*/, event)\r\n );\r\n\r\n // Check if selection is multiline, spans more than one block\r\n const range = editor.getSelectionRange();\r\n let multiline = false;\r\n\r\n if (range && !range.collapsed) {\r\n let startingBlock = editor.getBlockElementAtNode(range.startContainer);\r\n let endingBlock = editor.getBlockElementAtNode(range.endContainer);\r\n multiline = endingBlock && startingBlock ? !endingBlock.equals(startingBlock) : false;\r\n }\r\n\r\n const headerTag = getTagOfNode(\r\n editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)\r\n );\r\n\r\n const table = editor.queryElements('table', QueryScope.OnSelection)[0];\r\n const tableFormat = table ? getTableFormatInfo(table) : undefined;\r\n const hasHeader = table?.rows[0]\r\n ? toArray(table.rows[0].cells).every(cell => getTagOfNode(cell) == 'TH')\r\n : undefined;\r\n\r\n return {\r\n isBullet: listTag == 'UL',\r\n isNumbering: listTag == 'OL',\r\n isMultilineSelection: multiline,\r\n headerLevel: (headerTag && parseInt(headerTag[1])) || 0,\r\n canUnlink: !!editor.queryElements('a[href]', QueryScope.OnSelection)[0],\r\n canAddImageAltText: !!editor.queryElements('img', QueryScope.OnSelection)[0],\r\n isBlockQuote: !!editor.queryElements('blockquote', QueryScope.OnSelection)[0],\r\n isCodeInline: !!editor.queryElements('code', QueryScope.OnSelection)[0],\r\n isCodeBlock: !!editor.queryElements('pre>code', QueryScope.OnSelection)[0],\r\n isInTable: !!table,\r\n tableFormat: tableFormat || {},\r\n tableHasHeader: hasHeader,\r\n canMergeTableCell: canMergeTableCell(editor),\r\n };\r\n}\r\n\r\n/**\r\n * Get format state at cursor\r\n * A format state is a collection of all format related states, e.g.,\r\n * bold, italic, underline, font name, font size, etc.\r\n * @param editor The editor instance\r\n * @param event (Optional) The plugin event, it stores the event cached data for looking up.\r\n * In this function the event cache is used to get list state and header level. If not passed,\r\n * it will query the node within selection to get the info\r\n * @returns The format state at cursor\r\n */\r\nexport default function getFormatState(editor: IEditor, event?: PluginEvent): FormatState {\r\n return {\r\n ...editor.getPendableFormatState(false /* forceGetStateFromDom */),\r\n ...getElementBasedFormatState(editor, event),\r\n ...editor.getStyleBasedFormatState(),\r\n ...editor.getUndoState(),\r\n isDarkMode: editor.isDarkMode(),\r\n zoomScale: editor.getZoomScale(),\r\n };\r\n}\r\n\r\n/**\r\n * Checks whether the editor selection range is starting and ending at a table element.\r\n * @param editor Editor Instance\r\n * @returns\r\n */\r\n\r\nconst canMergeTableCell = (editor: IEditor): boolean => {\r\n const selection = editor.getSelectionRangeEx();\r\n const isATable = selection && selection.type === SelectionRangeTypes.TableSelection;\r\n if (isATable && selection.coordinates) {\r\n const { firstCell, lastCell } = selection.coordinates;\r\n if (firstCell.x !== lastCell.x || firstCell.y !== lastCell.y) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n return false;\r\n};\r\n","import commitListChains from '../utils/commitListChains';\nimport {\n addDelimiters,\n applyFormat,\n commitEntity,\n createElement,\n getEntityFromElement,\n getEntitySelector,\n Position,\n VListChain,\n wrap,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ContentPosition,\n Entity,\n ExperimentalFeatures,\n IEditor,\n KnownCreateElementDataIndex,\n NodePosition,\n PositionType,\n} from 'roosterjs-editor-types';\nimport type { CompatibleContentPosition } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Insert an entity into editor.\n * @param editor The editor to insert entity into.\n * @param type Type of the entity\n * @param contentNode Root element of the entity\n * @param isBlock Whether the entity will be shown as a block\n * @param isReadonly Whether the entity will be a readonly entity\n * @param position @optional The position to insert into. If not specified, current position will be used.\n * If isBlock is true, entity will be insert below this position\n * @param insertToRegionRoot @optional When pass true, insert the entity at the root level of current region.\n * Parent nodes will be split if need\n * @param focusAfterEntity @optional When pass true, focus will be moved next to the entity. For inline entity,\n * focus will be after right after the entity (and the delimiter if exist). For block entity, focus will be in\n * the new empty line below the entity\n */\nexport default function insertEntity(\n editor: IEditor,\n type: string,\n contentNode: Node,\n isBlock: boolean,\n isReadonly: boolean,\n position?:\n | NodePosition\n | ContentPosition.Begin\n | ContentPosition.End\n | ContentPosition.DomEnd\n | CompatibleContentPosition.Begin\n | CompatibleContentPosition.End\n | CompatibleContentPosition.DomEnd,\n insertToRegionRoot?: boolean,\n focusAfterEntity?: boolean\n): Entity {\n const wrapper = wrap(contentNode, isBlock ? 'div' : 'span');\n\n // For inline & readonly entity, we need to set display to \"inline-block\" otherwise\n // there will be some weird behavior when move cursor around the entity node.\n // And we should only do this for readonly entity since \"inline-block\" has some side effect\n // in IE that there will be a resize border around the inline-block element. We made some\n // workaround for readonly entity for this issue but for editable entity, keep it as \"inline\"\n // will just work fine.\n if (!isBlock && isReadonly) {\n wrapper.style.display = 'inline-block';\n }\n\n commitEntity(wrapper, type, isReadonly);\n\n if (!editor.contains(wrapper)) {\n let currentRange: Range | null = null;\n let contentPosition:\n | ContentPosition.Begin\n | ContentPosition.End\n | ContentPosition.DomEnd\n | ContentPosition.SelectionStart\n | CompatibleContentPosition.Begin\n | CompatibleContentPosition.End\n | CompatibleContentPosition.DomEnd\n | CompatibleContentPosition.SelectionStart;\n\n if (typeof position == 'number') {\n contentPosition = position;\n } else if (position) {\n currentRange = editor.getSelectionRange();\n const node = position.normalize().node;\n const existingEntity = node && editor.getElementAtCursor(getEntitySelector(), node);\n\n // Do not insert entity into another entity\n if (existingEntity) {\n position = new Position(existingEntity, PositionType.After);\n }\n\n editor.select(position);\n contentPosition = ContentPosition.SelectionStart;\n } else {\n editor.focus();\n contentPosition = ContentPosition.SelectionStart;\n }\n\n const regions = insertToRegionRoot && editor.getSelectedRegions();\n const chains = regions && VListChain.createListChains(regions);\n\n editor.insertNode(wrapper, {\n updateCursor: false,\n insertOnNewLine: isBlock,\n replaceSelection: true,\n position: contentPosition,\n insertToRegionRoot: insertToRegionRoot,\n });\n\n if (chains) {\n commitListChains(editor, chains);\n }\n\n if (contentPosition == ContentPosition.SelectionStart) {\n if (currentRange) {\n editor.select(currentRange);\n } else if (!isBlock) {\n editor.select(wrapper, PositionType.After);\n }\n }\n }\n\n const entity = getEntityFromElement(wrapper)!;\n\n if (isBlock) {\n // Insert an extra empty line for block entity to make sure\n // user can still put cursor below the entity.\n const newLine = createElement(KnownCreateElementDataIndex.EmptyLine, editor.getDocument());\n\n wrapper.parentNode?.insertBefore(newLine!, wrapper.nextSibling);\n\n if (newLine) {\n applyFormat(\n newLine as HTMLElement,\n editor.getDefaultFormat(),\n editor.isDarkMode(),\n editor.getDarkColorHandler()\n );\n }\n\n if (focusAfterEntity) {\n const br = newLine?.querySelector('br');\n const pos = br && new Position(br, PositionType.Before);\n\n if (pos) {\n editor.select(pos);\n }\n }\n } else if (\n isReadonly &&\n editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n addDelimiters(entity.wrapper);\n if (entity.wrapper.nextElementSibling) {\n editor.select(new Position(entity.wrapper.nextElementSibling, PositionType.After));\n }\n }\n\n editor.triggerContentChangedEvent(ChangeSource.InsertEntity, entity);\n\n return entity;\n}\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { getObjectKeys, readFile } from 'roosterjs-editor-dom';\r\nimport { IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Insert an image to editor at current selection\r\n * @param editor The editor instance\r\n * @param imageFileOrSrc Either the image file blob or source string of the image.\r\n * @param attributes Optional image element attributes\r\n */\r\nexport default function insertImage(\r\n editor: IEditor,\r\n imageFileOrSrc: File | string,\r\n attributes?: Record\r\n): void {\r\n if (typeof imageFileOrSrc == 'string') {\r\n insertImageWithSrc(editor, imageFileOrSrc, attributes);\r\n } else {\r\n readFile(imageFileOrSrc, dataUrl => {\r\n if (dataUrl && !editor.isDisposed()) {\r\n insertImageWithSrc(editor, dataUrl, attributes);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction insertImageWithSrc(editor: IEditor, src: string, attributes?: Record) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n const image = editor.getDocument().createElement('img');\r\n image.src = src;\r\n\r\n if (attributes) {\r\n getObjectKeys(attributes).forEach(attribute =>\r\n image.setAttribute(attribute, attributes[attribute])\r\n );\r\n }\r\n editor.insertNode(image);\r\n },\r\n 'insertImage'\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { unwrap } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Remove link at selection. If no links at selection, do nothing.\r\n * If selection contains multiple links, all of the link styles will be removed.\r\n * If only part of a link is selected, the whole link style will be removed.\r\n * @param editor The editor instance\r\n */\r\nexport default function removeLink(editor: IEditor) {\r\n editor.focus();\r\n formatUndoSnapshot(\r\n editor,\r\n (start, end) => {\r\n editor.queryElements('a[href]', QueryScope.OnSelection, unwrap);\r\n if (start && end) {\r\n editor.select(start, end);\r\n }\r\n },\r\n 'removeLink'\r\n );\r\n}\r\n","import { ContentPosition, IEditor, IPositionContentSearcher } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Replace text before current selection with a node, current selection will be kept if possible\r\n * @param editor The editor instance\r\n * @param text The text for matching. We will try to match the text with the text before cursor\r\n * @param node The node to replace the text with\r\n * @param exactMatch True if the text must appear exactly before selection,\r\n * otherwise there can be some text between the target text and selection\r\n * @param searcher Optional PositionContentSearcher of current selection to help search text\r\n */\r\nexport default function replaceWithNode(\r\n editor: IEditor,\r\n text: string,\r\n node: Node,\r\n exactMatch: boolean,\r\n searcher?: IPositionContentSearcher\r\n): boolean;\r\n\r\n/**\r\n * Replace a given range with a node, current selection will be kept if possible\r\n * @param editor The editor instance\r\n * @param range The range to replace from\r\n * @param node The node to replace the text with\r\n * @param exactMatch True if the text must appear exactly before selection,\r\n * otherwise there can be some text between the target text and selection\r\n */\r\nexport default function replaceWithNode(\r\n editor: IEditor,\r\n range: Range,\r\n node: Node,\r\n exactMatch: boolean\r\n): boolean;\r\n\r\nexport default function replaceWithNode(\r\n editor: IEditor,\r\n textOrRange: string | Range,\r\n node: Node,\r\n exactMatch: boolean,\r\n searcher?: IPositionContentSearcher\r\n): boolean {\r\n // Make sure the text and node is valid\r\n if (!textOrRange || !node) {\r\n return false;\r\n }\r\n\r\n let range: Range | null;\r\n\r\n if (typeof textOrRange == 'string') {\r\n searcher = (searcher || editor.getContentSearcherOfCursor()) ?? undefined;\r\n range = searcher?.getRangeFromText(textOrRange, exactMatch) ?? null;\r\n } else {\r\n range = textOrRange;\r\n }\r\n\r\n if (range) {\r\n const backupRange = editor.getSelectionRange();\r\n\r\n // If the range to replace is right before current cursor, it is actually an exact match\r\n if (\r\n backupRange?.collapsed &&\r\n range.endContainer == backupRange.startContainer &&\r\n range.endOffset == backupRange.startOffset\r\n ) {\r\n exactMatch = true;\r\n }\r\n\r\n editor.insertNode(node, {\r\n position: ContentPosition.Range,\r\n updateCursor: exactMatch,\r\n replaceSelection: true,\r\n insertOnNewLine: false,\r\n range: range,\r\n });\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\nimport { IEditor } from 'roosterjs-editor-types';\n\n/**\n * Rotate an element visually\n * @param editor The editor instance\n * @param element The element that should be rotated\n * @param angle The degree at which to rotate the element from it's center\n */\nexport default function rotateElement(editor: IEditor, element: HTMLElement, angle: number): void {\n if (element) {\n formatUndoSnapshot(\n editor,\n () => {\n element.style.transform = `rotate(${angle}deg)`;\n },\n 'rotateElement'\n );\n }\n}\n","import blockFormat from '../utils/blockFormat';\r\nimport execCommand from '../utils/execCommand';\r\nimport formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport normalizeBlockquote from '../utils/normalizeBlockquote';\r\nimport {\r\n createVListFromRegion,\r\n findClosestElementAncestor,\r\n getSelectedBlockElementsInRegion,\r\n isWholeTableSelected,\r\n VTable,\r\n} from 'roosterjs-editor-dom';\r\nimport {\r\n Alignment,\r\n DocumentCommand,\r\n IEditor,\r\n QueryScope,\r\n SelectionRangeTypes,\r\n TableSelectionRange,\r\n} from 'roosterjs-editor-types';\r\nimport type { CompatibleAlignment } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Set content alignment\r\n * @param editor The editor instance\r\n * @param alignment The alignment option:\r\n * Alignment.Center, Alignment.Left, Alignment.Right\r\n */\r\nexport default function setAlignment(editor: IEditor, alignment: Alignment | CompatibleAlignment) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n const selection = editor.getSelectionRangeEx();\r\n const isATable = selection && selection.type === SelectionRangeTypes.TableSelection;\r\n const elementAtCursor = editor.getElementAtCursor();\r\n\r\n if (\r\n isATable &&\r\n selection.coordinates &&\r\n isWholeTableSelected(new VTable(selection.table), selection.coordinates)\r\n ) {\r\n alignTable(selection, alignment);\r\n } else if (elementAtCursor && isList(elementAtCursor)) {\r\n alignList(editor, alignment);\r\n } else {\r\n alignText(editor, alignment);\r\n }\r\n },\r\n 'setAlignment'\r\n );\r\n}\r\n\r\n/**\r\n * Align text using the margins\r\n * @param editor\r\n * @param element\r\n * @param alignment\r\n * @param addUndoSnapshot\r\n * @returns\r\n */\r\nfunction alignTable(selection: TableSelectionRange, alignment: Alignment | CompatibleAlignment) {\r\n const table = selection.table;\r\n if (alignment == Alignment.Center) {\r\n table.style.marginLeft = 'auto';\r\n table.style.marginRight = 'auto';\r\n } else if (alignment == Alignment.Right) {\r\n table.style.marginLeft = 'auto';\r\n table.style.marginRight = '';\r\n } else {\r\n table.style.marginLeft = '';\r\n table.style.marginRight = 'auto';\r\n }\r\n}\r\n\r\n/**\r\n * Align text using the text-align\r\n * @param editor\r\n * @param alignment\r\n * @returns\r\n */\r\nfunction alignText(editor: IEditor, alignment: Alignment | CompatibleAlignment) {\r\n let align = 'left';\r\n let command = DocumentCommand.JustifyLeft;\r\n if (alignment == Alignment.Center) {\r\n command = DocumentCommand.JustifyCenter;\r\n align = 'center';\r\n } else if (alignment == Alignment.Right) {\r\n command = DocumentCommand.JustifyRight;\r\n align = 'right';\r\n }\r\n execCommand(editor, command);\r\n const elements = editor.queryElements('[align]', QueryScope.OnSelection, node => {\r\n node.style.textAlign = align;\r\n normalizeBlockquote(node);\r\n });\r\n\r\n if (elements.length == 0) {\r\n const node = editor.getElementAtCursor();\r\n if (node) {\r\n normalizeBlockquote(node);\r\n }\r\n }\r\n}\r\n\r\nfunction isList(element: HTMLElement) {\r\n return findClosestElementAncestor(element, undefined /** root */, 'LI');\r\n}\r\n\r\nfunction alignList(editor: IEditor, alignment: Alignment | CompatibleAlignment) {\r\n blockFormat(\r\n editor,\r\n (region, start, end) => {\r\n const blocks = getSelectedBlockElementsInRegion(region);\r\n const startNode = blocks[0].getStartNode();\r\n const vList = createVListFromRegion(region, true /*includeSiblingLists*/, startNode);\r\n if (start && end) {\r\n vList?.setAlignment(start, end, alignment);\r\n }\r\n },\r\n undefined /* beforeRunCallback */,\r\n 'alignList'\r\n );\r\n}\r\n","import applyInlineStyle from '../utils/applyInlineStyle';\r\nimport { IEditor, ModeIndependentColor } from 'roosterjs-editor-types';\r\nimport { setColor } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Set background color at current selection\r\n * @param editor The editor instance\r\n * @param color One of two options:\r\n * The color string, can be any of the predefined color names (e.g, 'red')\r\n * or hexadecimal color string (e.g, '#FF0000') or rgb value (e.g, 'rgb(255, 0, 0)') supported by browser.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take effect\r\n * Alternatively, you can pass a @typedef ModeIndependentColor. If in light mode, the lightModeColor property will be used.\r\n * If in dark mode, the darkModeColor will be used and the lightModeColor will be used when converting back to light mode.\r\n **/\r\nexport default function setBackgroundColor(editor: IEditor, color: string | ModeIndependentColor) {\r\n applyInlineStyle(\r\n editor,\r\n (element, isInnerNode) => {\r\n setColor(\r\n element,\r\n isInnerNode ? '' : color,\r\n true /*isBackground*/,\r\n editor.isDarkMode(),\r\n false /*shouldAdaptFontColor*/,\r\n editor.getDarkColorHandler()\r\n );\r\n },\r\n 'setBackgroundColor'\r\n );\r\n}\r\n","import collapseSelectedBlocks from '../utils/collapseSelectedBlocks';\r\nimport formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { Direction, IEditor } from 'roosterjs-editor-types';\r\nimport type { CompatibleDirection } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Change direction for the blocks/paragraph at selection\r\n * @param editor The editor instance\r\n * @param direction The direction option:\r\n * Direction.LeftToRight refers to 'ltr', Direction.RightToLeft refers to 'rtl'\r\n */\r\nexport default function setDirection(editor: IEditor, direction: Direction | CompatibleDirection) {\r\n editor.focus();\r\n\r\n formatUndoSnapshot(\r\n editor,\r\n (start, end) => {\r\n collapseSelectedBlocks(editor, element => {\r\n element.setAttribute('dir', direction == Direction.LeftToRight ? 'ltr' : 'rtl');\r\n element.style.textAlign = direction == Direction.LeftToRight ? 'left' : 'right';\r\n });\r\n if (start && end) {\r\n editor.select(start, end);\r\n }\r\n },\r\n 'setDirection'\r\n );\r\n}\r\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport { IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Set font name at selection\r\n * @param editor The editor instance\r\n * @param fontName The fontName string, should be a valid CSS font-family style.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take affect\r\n */\r\nexport default function setFontName(editor: IEditor, fontName: string) {\r\n // The browser provided execCommand creates a HTML tag with face attribute. is not HTML5 standard\r\n // (http://www.w3schools.com/tags/tag_font.asp).\r\n applyListItemStyleWrap(\r\n editor,\r\n 'font-family',\r\n (element, isInnerNode) => {\r\n element.style.fontFamily = isInnerNode ? '' : fontName;\r\n },\r\n 'setFontName'\r\n );\r\n}\r\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport { getComputedStyle } from 'roosterjs-editor-dom';\r\nimport { IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Set font size at selection\r\n * @param editor The editor instance\r\n * @param fontSize The fontSize string, should be a valid CSS font-size style.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take affect\r\n */\r\nexport default function setFontSize(editor: IEditor, fontSize: string) {\r\n // The browser provided execCommand only accepts 1-7 point value. In addition, it uses HTML tag with size attribute.\r\n // is not HTML5 standard (http://www.w3schools.com/tags/tag_font.asp).\r\n applyListItemStyleWrap(\r\n editor,\r\n 'font-size',\r\n (element, isInnerNode) => {\r\n element.style.fontSize = isInnerNode ? '' : fontSize;\r\n let lineHeight = getComputedStyle(element, 'line-height');\r\n if (lineHeight && lineHeight != 'normal') {\r\n element.style.lineHeight = 'normal';\r\n }\r\n },\r\n 'setFontSize'\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Set image alt text for all selected images at selection. If no images is contained\r\n * in selection, do nothing.\r\n * The alt attribute provides alternative information for an image if a user for some reason\r\n * cannot view it (because of slow connection, an error in the src attribute, or if the user\r\n * uses a screen reader). See https://www.w3schools.com/tags/att_img_alt.asp\r\n * @param editor The editor instance\r\n * @param altText The image alt text\r\n */\r\nexport default function setImageAltText(editor: IEditor, altText: string) {\r\n editor.focus();\r\n\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n editor.queryElements('img', QueryScope.OnSelection, node =>\r\n node.setAttribute('alt', altText)\r\n );\r\n },\r\n 'setImageAltText'\r\n );\r\n}\r\n","import blockFormat from '../utils/blockFormat';\r\nimport normalizeBlockquote from '../utils/normalizeBlockquote';\r\nimport {\r\n BlockElement,\r\n ExperimentalFeatures,\r\n IEditor,\r\n Indentation,\r\n KnownCreateElementDataIndex,\r\n RegionBase,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\nimport {\r\n collapseNodesInRegion,\r\n createVListFromRegion,\r\n findClosestElementAncestor,\r\n getSelectedBlockElementsInRegion,\r\n getTagOfNode,\r\n isNodeInRegion,\r\n isWholeTableSelected,\r\n splitBalancedNodeRange,\r\n toArray,\r\n unwrap,\r\n VList,\r\n VTable,\r\n wrap,\r\n} from 'roosterjs-editor-dom';\r\nimport type { CompatibleIndentation } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Set indentation at selection\r\n * If selection contains bullet/numbering list, increase/decrease indentation will\r\n * increase/decrease the list level by one.\r\n * @param editor The editor instance\r\n * @param indentation The indentation option:\r\n * Indentation.Increase to increase indentation or Indentation.Decrease to decrease indentation\r\n */\r\nexport default function setIndentation(\r\n editor: IEditor,\r\n indentation: Indentation | CompatibleIndentation\r\n) {\r\n const handler = indentation == Indentation.Increase ? indent : outdent;\r\n\r\n blockFormat(\r\n editor,\r\n (region, start, end) => {\r\n const blocks = getSelectedBlockElementsInRegion(region, true /*createBlockIfEmpty*/);\r\n const blockGroups: BlockElement[][] = [[]];\r\n\r\n for (let i = 0; i < blocks.length; i++) {\r\n const startNode = blocks[i].getStartNode();\r\n const vList = createVListFromRegion(\r\n region,\r\n true /*includeSiblingLists*/,\r\n startNode\r\n );\r\n\r\n if (vList) {\r\n while (blocks[i + 1] && vList.contains(blocks[i + 1].getStartNode())) {\r\n i++;\r\n }\r\n\r\n const isTabKeyTextFeaturesEnabled = editor.isFeatureEnabled(\r\n ExperimentalFeatures.TabKeyTextFeatures\r\n );\r\n\r\n if (\r\n isTabKeyTextFeaturesEnabled &&\r\n isFirstItem(vList, startNode) &&\r\n shouldHandleWithBlockquotes(indentation, editor, startNode)\r\n ) {\r\n const block = editor.getBlockElementAtNode(vList.rootList);\r\n if (block) {\r\n blockGroups.push([block]);\r\n }\r\n } else {\r\n if (start && end) {\r\n indentation == Indentation.Decrease\r\n ? vList.setIndentation(\r\n start,\r\n end,\r\n indentation,\r\n false /* softOutdent */,\r\n isTabKeyTextFeaturesEnabled /* preventItemRemoval */\r\n )\r\n : vList.setIndentation(start, end, indentation);\r\n vList.writeBack(\r\n editor.isFeatureEnabled(\r\n ExperimentalFeatures.ReuseAllAncestorListElements\r\n ),\r\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\r\n );\r\n blockGroups.push([]);\r\n }\r\n }\r\n } else {\r\n blockGroups[blockGroups.length - 1].push(blocks[i]);\r\n }\r\n }\r\n\r\n blockGroups.forEach(group => handler(region, group));\r\n },\r\n () => {\r\n const selection = editor.getSelectionRangeEx();\r\n if (\r\n selection.type == SelectionRangeTypes.TableSelection &&\r\n selection.coordinates &&\r\n isWholeTableSelected(new VTable(selection.table), selection.coordinates)\r\n ) {\r\n if (indentation == Indentation.Decrease) {\r\n const quote = editor.getElementAtCursor('blockquote', selection.table);\r\n if (quote) {\r\n unwrap(quote);\r\n }\r\n } else if (indentation == Indentation.Increase) {\r\n wrap(selection.table, KnownCreateElementDataIndex.BlockquoteWrapper);\r\n }\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n 'setIndentation'\r\n );\r\n\r\n function indent(region: RegionBase, blocks: BlockElement[]) {\r\n const nodes = collapseNodesInRegion(region, blocks);\r\n wrap(nodes, KnownCreateElementDataIndex.BlockquoteWrapper);\r\n const quotesHandled: Node[] = [];\r\n nodes.forEach(node => normalizeBlockquote(node, quotesHandled));\r\n }\r\n}\r\n\r\nfunction outdent(region: RegionBase, blocks: BlockElement[]) {\r\n blocks.forEach(blockElement => {\r\n let node: Node | null = blockElement.collapseToSingleElement();\r\n const quote = findClosestElementAncestor(node, region.rootNode, 'blockquote');\r\n if (quote) {\r\n if (node == quote) {\r\n node = wrap(toArray(node.childNodes));\r\n }\r\n\r\n while (node && isNodeInRegion(region, node) && getTagOfNode(node) != 'BLOCKQUOTE') {\r\n node = splitBalancedNodeRange(node);\r\n }\r\n\r\n if (node && isNodeInRegion(region, node)) {\r\n unwrap(node);\r\n }\r\n }\r\n });\r\n}\r\n\r\nfunction isFirstItem(vList: VList, startNode: Node) {\r\n return (\r\n vList.items[0]?.getNode() == startNode &&\r\n vList.getListItemIndex(startNode) == (vList.getStart() || 1)\r\n );\r\n}\r\n\r\nfunction shouldHandleWithBlockquotes(\r\n indentation: Indentation | CompatibleIndentation,\r\n editor: IEditor,\r\n startNode: Node\r\n) {\r\n return (\r\n indentation == Indentation.Increase || editor.getElementAtCursor('blockquote', startNode)\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\nimport { createVListFromRegion } from 'roosterjs-editor-dom';\nimport { ExperimentalFeatures, IEditor } from 'roosterjs-editor-types';\n\n/**\n * Resets Ordered List Numbering back to the value of the parameter startNumber\n * @param editor The editor instance\n * @param separator The HTML element that indicates when to split the VList\n * @param startNumber The number of that the splitted list should start\n */\nexport default function setOrderedListNumbering(\n editor: IEditor,\n separator: HTMLLIElement,\n startNumber: number = 1\n) {\n formatUndoSnapshot(\n editor,\n () => {\n editor.focus();\n const regions = editor.getSelectedRegions();\n if (regions[0]) {\n const vList = createVListFromRegion(\n regions[0],\n false /*includeSiblingLists*/,\n separator\n );\n if (vList) {\n vList.split(separator, startNumber);\n vList.writeBack(\n editor.isFeatureEnabled(ExperimentalFeatures.ReuseAllAncestorListElements),\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\n );\n }\n }\n },\n 'setOrderedListNumbering'\n );\n}\n","import applyListItemStyleWrap from '../utils/applyListItemWrap';\r\nimport { IEditor, ModeIndependentColor } from 'roosterjs-editor-types';\r\nimport { setColor } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Set text color at selection\r\n * @param editor The editor instance\r\n * @param color One of two options:\r\n * The color string, can be any of the predefined color names (e.g, 'red')\r\n * or hexadecimal color string (e.g, '#FF0000') or rgb value (e.g, 'rgb(255, 0, 0)') supported by browser.\r\n * Currently there's no validation to the string, if the passed string is invalid, it won't take affect\r\n * Alternatively, you can pass a @typedef ModeIndependentColor. If in light mode, the lightModeColor property will be used.\r\n * If in dark mode, the darkModeColor will be used and the lightModeColor will be used when converting back to light mode.\r\n * @param shouldApplyInlineStyle Optional callback function to be invoked to verify if the current element should have the inline Style applied\r\n */\r\nexport default function setTextColor(\r\n editor: IEditor,\r\n color: string | ModeIndependentColor,\r\n shouldApplyInlineStyle?: (element: HTMLElement) => boolean\r\n) {\r\n applyListItemStyleWrap(\r\n editor,\r\n 'color',\r\n (element, isInnerNode) => {\r\n if (!shouldApplyInlineStyle || shouldApplyInlineStyle(element)) {\r\n setColor(\r\n element,\r\n isInnerNode ? '' : color,\r\n false /*isBackground*/,\r\n editor.isDarkMode(),\r\n false /*shouldAdaptFontColor*/,\r\n editor.getDarkColorHandler()\r\n );\r\n }\r\n },\r\n 'setTextColor'\r\n );\r\n}\r\n","import blockWrap from '../utils/blockWrap';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { unwrap, wrap } from 'roosterjs-editor-dom';\r\n\r\nconst BLOCKQUOTE_TAG = 'blockquote';\r\nconst DEFAULT_STYLER = (element: HTMLElement): void => {\r\n element.style.borderLeft = '3px solid';\r\n element.style.borderColor = '#C8C8C8';\r\n element.style.paddingLeft = '10px';\r\n element.style.color = '#666666';\r\n};\r\n\r\n/**\r\n * Toggle blockquote at selection, if selection already contains any blockquote elements,\r\n * the blockquote elements will be unquote and other elements will take no effect\r\n * @param editor The editor instance\r\n * @param styler (Optional) The custom styler for setting the style for the blockquote element\r\n */\r\nexport default function toggleBlockQuote(editor: IEditor, styler?: (element: HTMLElement) => void) {\r\n blockWrap(\r\n editor,\r\n nodes => {\r\n const wrapper = wrap(nodes, BLOCKQUOTE_TAG);\r\n (styler || DEFAULT_STYLER)(wrapper);\r\n },\r\n () => editor.queryElements('blockquote', QueryScope.OnSelection, unwrap).length == 0,\r\n 'toggleBlockQuote'\r\n );\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle bold at selection\r\n * If selection is collapsed, it will only affect the following input after caret\r\n * If selection contains only bold text, the bold style will be removed\r\n * If selection contains only normal text, bold style will be added to the whole selected text\r\n * If selection contains both bold and normal text, bold style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleBold(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Bold, 'toggleBold');\r\n}\r\n","import toggleListType from '../utils/toggleListType';\r\nimport { BulletListType, IEditor, ListType } from 'roosterjs-editor-types';\r\nimport type { CompatibleBulletListType } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Toggle bullet at selection\r\n * If selection contains bullet in deep level, toggle bullet will decrease the bullet level by one\r\n * If selection contains number list, toggle bullet will convert the number list into bullet list\r\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\r\n * browser execCommand API\r\n * @param editor The editor instance\r\n * @param listStyle (Optional) the style of the bullet list. If not defined, the style will be set to disc.\r\n * @param apiNameOverride (Optional) Set a new api name, if empty the api name will be 'toggleListType'.\r\n */\r\nexport default function toggleBullet(\r\n editor: IEditor,\r\n listStyle?: BulletListType | CompatibleBulletListType,\r\n apiNameOverride?: string\r\n) {\r\n toggleListType(\r\n editor,\r\n ListType.Unordered,\r\n undefined /* startNumber */,\r\n false /* includeSiblingLists */,\r\n undefined /** orderedStyle */,\r\n listStyle,\r\n apiNameOverride\r\n );\r\n}\r\n","import blockWrap from '../utils/blockWrap';\r\nimport { IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { unwrap, wrap } from 'roosterjs-editor-dom';\r\n\r\nconst PRE_TAG = 'pre';\r\nconst CODE_TAG = 'code';\r\nconst SELECTOR = `${PRE_TAG}>${CODE_TAG}`;\r\n\r\n/**\r\n * Toggle code block at selection, if selection already contains any code blocked elements,\r\n * the code block elements will be no longer be code blocked and other elements will take no affect\r\n * @param editor The editor instance\r\n * @param styler (Optional) The custom styler for setting the style for the code block element\r\n */\r\nexport default function toggleCodeBlock(\r\n editor: IEditor,\r\n styler?: (element: HTMLElement) => void\r\n): void {\r\n blockWrap(\r\n editor,\r\n nodes => {\r\n const code = wrap(nodes, CODE_TAG);\r\n const pre = wrap(code, PRE_TAG);\r\n styler?.(pre);\r\n },\r\n () =>\r\n editor.queryElements(SELECTOR, QueryScope.OnSelection, code => {\r\n if (!code.previousSibling && !code.nextSibling) {\r\n const parent = code.parentNode;\r\n unwrap(code);\r\n if (parent) {\r\n unwrap(parent);\r\n }\r\n }\r\n }).length == 0,\r\n 'toggleCodeBlock'\r\n );\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { DocumentCommand, IEditor, QueryScope } from 'roosterjs-editor-types';\r\nimport { HtmlSanitizer, moveChildNodes } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Toggle header at selection\r\n * @param editor The editor instance\r\n * @param level The header level, can be a number from 0 to 6, in which 1 ~ 6 refers to\r\n * the HTML header element <H1> to <H6>, 0 means no header\r\n * if passed in param is outside the range, will be rounded to nearest number in the range\r\n */\r\nexport default function toggleHeader(editor: IEditor, level: number) {\r\n level = Math.min(Math.max(Math.round(level), 0), 6);\r\n\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n editor.focus();\r\n\r\n let wrapped = false;\r\n editor.queryElements('H1,H2,H3,H4,H5,H6', QueryScope.OnSelection, header => {\r\n if (!wrapped) {\r\n editor.getDocument().execCommand(DocumentCommand.FormatBlock, false, '
                ');\r\n wrapped = true;\r\n }\r\n\r\n const div = editor.getDocument().createElement('div');\r\n moveChildNodes(div, header);\r\n editor.replaceNode(header, div);\r\n });\r\n\r\n if (level > 0) {\r\n let traverser = editor.getSelectionTraverser();\r\n let blockElement = traverser?.currentBlockElement;\r\n let sanitizer = new HtmlSanitizer({\r\n cssStyleCallbacks: {\r\n 'font-size': () => false,\r\n },\r\n });\r\n while (blockElement) {\r\n let element = blockElement.collapseToSingleElement();\r\n sanitizer.sanitize(element);\r\n blockElement = traverser?.getNextBlockElement();\r\n }\r\n editor.getDocument().execCommand(DocumentCommand.FormatBlock, false, ``);\r\n }\r\n },\r\n 'toggleHeader'\r\n );\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle italic at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only italic text, the italic style will be removed\r\n * If selection contains only normal text, italic style will be added to the whole selected text\r\n * If selection contains both italic and normal text, italic style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleItalic(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Italic, 'toggleItalic');\r\n}\r\n","import toggleListType from '../utils/toggleListType';\r\nimport { IEditor, ListType, NumberingListType } from 'roosterjs-editor-types';\r\nimport type { CompatibleNumberingListType } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Toggle numbering at selection\r\n * If selection contains numbering in deep level, toggle numbering will decrease the numbering level by one\r\n * If selection contains bullet list, toggle numbering will convert the bullet list into number list\r\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\r\n * realization of browser execCommand API\r\n * @param editor The editor instance\r\n * @param startNumber (Optional) Start number of the list\r\n * @param listStyle (Optional) The style of the numbering list. If not defined, the style will be set to decimal.\r\n * @param apiNameOverride (Optional) Set a new api name, if empty the api name will be 'toggleListType'.\r\n */\r\nexport default function toggleNumbering(\r\n editor: IEditor,\r\n startNumber?: number,\r\n listStyle?: NumberingListType | CompatibleNumberingListType,\r\n apiNameOverride?: string\r\n) {\r\n toggleListType(\r\n editor,\r\n ListType.Ordered,\r\n startNumber,\r\n undefined /* includeSiblingLists */,\r\n listStyle,\r\n undefined /* unorderedStyle */,\r\n apiNameOverride\r\n );\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle strikethrough at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only strikethrough text, the strikethrough style will be removed\r\n * If selection contains only normal text, strikethrough style will be added to the whole selected text\r\n * If selection contains both strikethrough and normal text, strikethrough style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleStrikethrough(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.StrikeThrough, 'toggleStrikethrough');\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle subscript at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only subscript text, the subscript style will be removed\r\n * If selection contains only normal text, subscript style will be added to the whole selected text\r\n * If selection contains both subscript and normal text, the subscript style will be removed from whole selected text\r\n * If selection contains any superscript text, the behavior is determined by corresponding realization of browser\r\n * execCommand API\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleSubscript(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Subscript, 'toggleSubscript');\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle superscript at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only superscript text, the superscript style will be removed\r\n * If selection contains only normal text, superscript style will be added to the whole selected text\r\n * If selection contains both superscript and normal text, the superscript style will be removed from whole selected text\r\n * If selection contains any subscript text, the behavior is determined by corresponding realization of browser\r\n * execCommand API\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleSuperscript(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Superscript, 'toggleSuperscript');\r\n}\r\n","import execCommand from '../utils/execCommand';\r\nimport { DocumentCommand, IEditor } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Toggle underline at selection\r\n * If selection is collapsed, it will only affect the input after caret\r\n * If selection contains only underlined text, the underline style will be removed\r\n * If selection contains only normal text, underline style will be added to the whole selected text\r\n * If selection contains both underlined and normal text, the underline style will be added to the whole selected text\r\n * @param editor The editor instance\r\n */\r\nexport default function toggleUnderline(editor: IEditor) {\r\n execCommand(editor, DocumentCommand.Underline, 'toggleUnderline');\r\n}\r\n","export { default as changeFontSize, FONT_SIZES } from './format/changeFontSize';\r\nexport { default as clearBlockFormat } from './format/clearBlockFormat';\r\nexport { default as clearFormat } from './format/clearFormat';\r\nexport { default as createLink } from './format/createLink';\r\nexport { default as getFormatState, getElementBasedFormatState } from './format/getFormatState';\r\nexport { default as insertEntity } from './format/insertEntity';\r\nexport { default as insertImage } from './format/insertImage';\r\nexport { default as insertTable } from './table/insertTable';\r\nexport { default as editTable } from './table/editTable';\r\nexport { default as formatTable } from './table/formatTable';\r\nexport { default as removeLink } from './format/removeLink';\r\nexport { default as replaceWithNode } from './format/replaceWithNode';\r\nexport { default as rotateElement } from './format/rotateElement';\r\nexport { default as setAlignment } from './format/setAlignment';\r\nexport { default as setBackgroundColor } from './format/setBackgroundColor';\r\nexport { default as setTextColor } from './format/setTextColor';\r\nexport { default as setDirection } from './format/setDirection';\r\nexport { default as setFontName } from './format/setFontName';\r\nexport { default as setFontSize } from './format/setFontSize';\r\nexport { default as setImageAltText } from './format/setImageAltText';\r\nexport { default as setIndentation } from './format/setIndentation';\r\nexport { default as changeCapitalization } from './format/changeCapitalization';\r\nexport { default as toggleBold } from './format/toggleBold';\r\nexport { default as toggleBullet } from './format/toggleBullet';\r\nexport { default as toggleItalic } from './format/toggleItalic';\r\nexport { default as toggleNumbering } from './format/toggleNumbering';\r\nexport { default as setOrderedListNumbering } from './format/setOrderedListNumbering';\r\nexport { default as toggleBlockQuote } from './format/toggleBlockQuote';\r\nexport { default as toggleCodeBlock } from './format/toggleCodeBlock';\r\nexport { default as toggleStrikethrough } from './format/toggleStrikethrough';\r\nexport { default as toggleSubscript } from './format/toggleSubscript';\r\nexport { default as toggleSuperscript } from './format/toggleSuperscript';\r\nexport { default as toggleUnderline } from './format/toggleUnderline';\r\nexport { default as toggleHeader } from './format/toggleHeader';\r\nexport { default as applyCellShading } from './table/applyCellShading';\r\n\r\nexport { default as toggleListType } from './utils/toggleListType';\r\nexport { default as blockFormat } from './utils/blockFormat';\r\nexport { default as commitListChains, experimentCommitListChains } from './utils/commitListChains';\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\nimport { IEditor, ModeIndependentColor } from 'roosterjs-editor-types';\nimport { safeInstanceOf, saveTableCellMetadata, setColor } from 'roosterjs-editor-dom';\n\n/**\n * Set background color of cells.\n * @param editor The editor instance\n * @param color One of two options:\n **/\nexport default function applyCellShading(editor: IEditor, color: string | ModeIndependentColor) {\n editor.focus();\n formatUndoSnapshot(\n editor,\n () => {\n const regions = editor.getSelectedRegions();\n regions.forEach(region => {\n if (safeInstanceOf(region.rootNode, 'HTMLTableCellElement')) {\n setColor(\n region.rootNode,\n color,\n true /* isBackgroundColor */,\n editor.isDarkMode(),\n true /** shouldAdaptFontColor */,\n editor.getDarkColorHandler()\n );\n saveTableCellMetadata(region.rootNode, { bgColorOverride: true });\n }\n });\n },\n 'applyCellShading'\n );\n}\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, PositionType, SelectionRangeTypes, TableOperation } from 'roosterjs-editor-types';\r\nimport { VTable } from 'roosterjs-editor-dom';\r\nimport type { CompatibleTableOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Edit table with given operation. If there is no table at cursor then no op.\r\n * @param editor The editor instance\r\n * @param operation Table operation\r\n */\r\nexport default function editTable(\r\n editor: IEditor,\r\n operation: TableOperation | CompatibleTableOperation\r\n) {\r\n let td = editor.getElementAtCursor('TD,TH') as HTMLTableCellElement;\r\n if (td) {\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n let vtable = new VTable(td);\r\n\r\n saveTableSelection(editor, vtable);\r\n vtable.edit(operation);\r\n vtable.writeBack(false /** skipApplyFormat */, editor.getDarkColorHandler());\r\n editor.transformToDarkColor(vtable.table);\r\n\r\n editor.focus();\r\n if (isUndefined(vtable.row) || isUndefined(vtable.col)) {\r\n return;\r\n }\r\n let { newCol, newRow } = calculateCellToSelect(operation, vtable.row, vtable.col);\r\n const newTd = vtable.getCell(newRow, newCol).td;\r\n if (newTd) {\r\n editor.select(newTd, PositionType.Begin);\r\n }\r\n },\r\n 'editTable'\r\n );\r\n }\r\n}\r\n\r\nfunction isUndefined(n: number | undefined): n is undefined {\r\n return n == undefined;\r\n}\r\n\r\nfunction calculateCellToSelect(\r\n operation: TableOperation | CompatibleTableOperation,\r\n currentRow: number,\r\n currentCol: number\r\n) {\r\n let newRow = currentRow;\r\n let newCol = currentCol;\r\n switch (operation) {\r\n case TableOperation.InsertAbove:\r\n newCol = 0;\r\n break;\r\n case TableOperation.InsertBelow:\r\n newRow += 1;\r\n newCol = 0;\r\n break;\r\n case TableOperation.InsertLeft:\r\n newRow = 0;\r\n break;\r\n case TableOperation.InsertRight:\r\n newRow = 0;\r\n newCol += 1;\r\n break;\r\n }\r\n\r\n return {\r\n newRow,\r\n newCol,\r\n };\r\n}\r\n\r\nfunction saveTableSelection(editor: IEditor, vtable: VTable) {\r\n const selection = editor.getSelectionRangeEx();\r\n if (selection && selection.type === SelectionRangeTypes.TableSelection) {\r\n vtable.selection = selection.coordinates ?? null;\r\n }\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport { IEditor, TableFormat } from 'roosterjs-editor-types';\r\nimport { VTable } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Format table\r\n * @param editor The editor which contains the table to format\r\n * @param format A TableFormat object contains format information we want to apply to the table\r\n * @param table The table to format. This is optional. When not passed, the current table (if any) will be formatted\r\n */\r\nexport default function formatTable(\r\n editor: IEditor,\r\n format: TableFormat,\r\n table?: HTMLTableElement\r\n) {\r\n table = table || (editor.getElementAtCursor('TABLE') as HTMLTableElement);\r\n if (table) {\r\n formatUndoSnapshot(\r\n editor,\r\n (start, end) => {\r\n if (!table) {\r\n return;\r\n }\r\n\r\n let vtable = new VTable(table);\r\n vtable.applyFormat(format);\r\n vtable.writeBack(false /** skipApplyFormat */, editor.getDarkColorHandler());\r\n editor.transformToDarkColor(vtable.table);\r\n editor.focus();\r\n if (start && end) {\r\n editor.select(start, end);\r\n }\r\n },\r\n 'formatTable'\r\n );\r\n }\r\n}\r\n","import formatUndoSnapshot from '../utils/formatUndoSnapshot';\r\nimport setBackgroundColor from '../format/setBackgroundColor';\r\nimport { IEditor, PositionType, TableFormat } from 'roosterjs-editor-types';\r\nimport { Position, VTable } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * Insert table into editor at current selection\r\n * @param editor The editor instance\r\n * @param columns Number of columns in table, it also controls the default table cell width:\r\n * if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px\r\n * @param rows Number of rows in table\r\n * @param format (Optional) The table format. If not passed, the default format will be applied:\r\n * background color: #FFF; border color: #ABABAB\r\n */\r\nexport default function insertTable(\r\n editor: IEditor,\r\n columns: number,\r\n rows: number,\r\n format?: TableFormat\r\n) {\r\n let document = editor.getDocument();\r\n let table = document.createElement('table') as HTMLTableElement;\r\n table.cellSpacing = '0';\r\n table.cellPadding = '1';\r\n for (let i = 0; i < rows; i++) {\r\n let tr = document.createElement('tr') as HTMLTableRowElement;\r\n table.appendChild(tr);\r\n for (let j = 0; j < columns; j++) {\r\n let td = document.createElement('td') as HTMLTableCellElement;\r\n tr.appendChild(td);\r\n td.appendChild(document.createElement('br'));\r\n td.style.width = getTableCellWidth(columns);\r\n }\r\n }\r\n\r\n editor.focus();\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n const element = editor.getElementAtCursor();\r\n if (element?.style.backgroundColor) {\r\n setBackgroundColor(editor, 'transparent');\r\n }\r\n let vtable = new VTable(table);\r\n vtable.applyFormat(format || {});\r\n vtable.writeBack();\r\n editor.insertNode(table);\r\n editor.runAsync(editor =>\r\n editor.select(new Position(table, PositionType.Begin).normalize())\r\n );\r\n },\r\n 'insertTable'\r\n );\r\n}\r\n\r\nfunction getTableCellWidth(columns: number): string {\r\n if (columns <= 4) {\r\n return '120px';\r\n } else if (columns <= 6) {\r\n return '100px';\r\n } else {\r\n return '70px';\r\n }\r\n}\r\n","import formatUndoSnapshot from './formatUndoSnapshot';\r\nimport { getTagOfNode } from 'roosterjs-editor-dom';\r\nimport {\r\n ChangeSource,\r\n IEditor,\r\n PluginEventType,\r\n PositionType,\r\n SelectionRangeTypes,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Apply inline style to current selection\r\n * @param editor The editor instance\r\n * @param callback The callback function to apply style\r\n */\r\nexport default function applyInlineStyle(\r\n editor: IEditor,\r\n callback: (element: HTMLElement, isInnerNode?: boolean) => any,\r\n apiName: string\r\n) {\r\n editor.focus();\r\n let selection = editor.getSelectionRangeEx();\r\n\r\n const safeCallback = (element: HTMLElement, isInnerNode?: boolean) =>\r\n element.isContentEditable && callback(element, isInnerNode);\r\n\r\n if (selection && selection.areAllCollapsed) {\r\n const range = selection.ranges[0];\r\n let node = range.startContainer;\r\n let isEmptySpan =\r\n getTagOfNode(node) == 'SPAN' &&\r\n (!node.firstChild ||\r\n (getTagOfNode(node.firstChild) == 'BR' && !node.firstChild.nextSibling));\r\n if (isEmptySpan) {\r\n editor.addUndoSnapshot();\r\n safeCallback(node as HTMLElement);\r\n } else {\r\n editor.triggerPluginEvent(PluginEventType.PendingFormatStateChanged, {\r\n formatState: {},\r\n // Here we use callback instead of safeCallback because we know it's contentEditable.\r\n // In addition, for elements that are not added to the DOM tree, isContentEditable always returns false on Safari.\r\n formatCallback: callback,\r\n });\r\n editor.triggerContentChangedEvent(ChangeSource.Format);\r\n }\r\n } else {\r\n // This is start and end node that get the style. The start and end needs to be recorded so that selection\r\n // can be re-applied post-applying style\r\n formatUndoSnapshot(\r\n editor,\r\n () => {\r\n let firstNode: Node | undefined;\r\n let lastNode: Node | undefined;\r\n selection.ranges.forEach(range => {\r\n let contentTraverser = editor.getSelectionTraverser(range);\r\n if (!contentTraverser) {\r\n return;\r\n }\r\n let inlineElement = contentTraverser && contentTraverser.currentInlineElement;\r\n while (inlineElement) {\r\n let nextInlineElement = contentTraverser.getNextInlineElement();\r\n inlineElement.applyStyle((element, isInnerNode) => {\r\n safeCallback(element, isInnerNode);\r\n firstNode = firstNode || element;\r\n lastNode = element;\r\n });\r\n inlineElement = nextInlineElement;\r\n }\r\n });\r\n\r\n if (firstNode && lastNode && selection.type == SelectionRangeTypes.Normal) {\r\n editor.select(firstNode, PositionType.Before, lastNode, PositionType.After);\r\n }\r\n },\r\n apiName\r\n );\r\n }\r\n}\r\n","import applyInlineStyle from '../utils/applyInlineStyle';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { safeInstanceOf, setListItemStyle } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Set the List Item Style when all inner inline element have the same style\n * @param editor The editor instance\n * @param styleName Name of the style to apply to the list item\n * @param formatCallback callback to apply the style to each element\n */\nexport default function applyListItemStyleWrap(\n editor: IEditor,\n styleName: string,\n formatCallback: (element: HTMLElement, isInnerNode?: boolean) => any,\n apiName: string\n) {\n const parentNodes: Node[] = [];\n applyInlineStyle(\n editor,\n (element, isInnerNode) => {\n formatCallback(element, isInnerNode);\n\n let parent = editor.getElementAtCursor('LI', element);\n if (parent && parentNodes.indexOf(parent) === -1) {\n parentNodes.push(parent);\n }\n },\n apiName\n );\n\n applyStyleToListItems(parentNodes, [styleName]);\n}\n\n/**\n * @internal\n * Checks if the parent element is a List Item, if it is, apply the style elements to the list item\n * @param parentNodes parentNodes to apply the style\n * @param styles styles to apply to the List Item Element\n */\nfunction applyStyleToListItems(parentNodes: Node[], styles: string[]) {\n parentNodes.forEach(node => {\n if (safeInstanceOf(node, 'HTMLLIElement')) {\n setListItemStyle(node, styles);\n }\n });\n}\n","import commitListChains from '../utils/commitListChains';\nimport formatUndoSnapshot from './formatUndoSnapshot';\nimport { IEditor, NodePosition, Region, SelectionRangeTypes } from 'roosterjs-editor-types';\nimport { VListChain } from 'roosterjs-editor-dom';\n\n/**\n * Split selection into regions, and perform a block-wise formatting action for each region.\n */\nexport default function blockFormat(\n editor: IEditor,\n callback: (\n region: Region,\n start: NodePosition | null,\n end: NodePosition | null,\n chains: VListChain[]\n ) => void,\n beforeRunCallback?: () => boolean,\n apiName?: string\n) {\n editor.focus();\n const selection = editor.getSelectionRangeEx();\n\n formatUndoSnapshot(\n editor,\n (start, end) => {\n if (!beforeRunCallback || beforeRunCallback()) {\n const regions = editor.getSelectedRegions();\n if (regions.length > 0) {\n const chains = VListChain.createListChains(regions, start?.node);\n regions.forEach(region => callback(region, start, end, chains));\n commitListChains(editor, chains);\n }\n }\n if (selection.type == SelectionRangeTypes.Normal && start && end) {\n editor.select(start, end);\n } else {\n editor.select(selection);\n }\n },\n apiName\n );\n}\n","import blockFormat from './blockFormat';\nimport { IEditor } from 'roosterjs-editor-types';\nimport {\n collapseNodesInRegion,\n getSelectedBlockElementsInRegion,\n getTagOfNode,\n isNodeInRegion,\n splitBalancedNodeRange,\n toArray,\n wrap,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Toggle a tag at selection, if selection already contains elements of such tag,\n * the elements will be untagged and other elements will take no effect\n * @param editor The editor instance\n * @param wrapFunction The wrap function\n * @param beforeRunCallback A callback function to run before looping all regions. If it returns false,\n * the loop for regions will be skipped\n */\nexport default function blockWrap(\n editor: IEditor,\n wrapFunction: (nodes: Node[]) => void,\n beforeRunCallback: () => boolean,\n apiName?: string\n): void {\n blockFormat(\n editor,\n region => {\n const blocks = getSelectedBlockElementsInRegion(region, true /*createBlockIfEmpty*/);\n let nodes = collapseNodesInRegion(region, blocks);\n if (nodes.length > 0) {\n if (nodes.length == 1) {\n const NodeTag = getTagOfNode(nodes[0]);\n if (NodeTag == 'BR') {\n nodes = [wrap(nodes[0])];\n } else if (NodeTag == 'LI' || NodeTag == 'TD') {\n nodes = toArray(nodes[0].childNodes);\n }\n }\n\n while (\n nodes[0] &&\n nodes[0].parentNode &&\n isNodeInRegion(region, nodes[0].parentNode) &&\n nodes.some(node => getTagOfNode(node) == 'LI')\n ) {\n const result = splitBalancedNodeRange(nodes);\n nodes = result ? [result] : [];\n }\n\n wrapFunction(nodes);\n }\n },\n beforeRunCallback,\n apiName\n );\n}\n","import { BlockElement, IEditor, NodeType } from 'roosterjs-editor-types';\r\nimport { getTagOfNode } from 'roosterjs-editor-dom';\r\n\r\n/**\r\n * @internal\r\n * Collapse all selected blocks, return single HTML elements for each block\r\n * @param editor The editor instance\r\n * @param forEachCallback A callback function to invoke for each of the collapsed element\r\n */\r\nexport default function collapseSelectedBlocks(\r\n editor: IEditor,\r\n forEachCallback: (element: HTMLElement) => any\r\n) {\r\n let traverser = editor.getSelectionTraverser();\r\n if (!traverser) {\r\n return;\r\n }\r\n let block = traverser.currentBlockElement;\r\n let blocks: BlockElement[] = [];\r\n while (block) {\r\n if (!isEmptyBlockUnderTR(block)) {\r\n blocks.push(block);\r\n }\r\n block = traverser.getNextBlockElement();\r\n }\r\n\r\n blocks.forEach(block => {\r\n let element = block.collapseToSingleElement();\r\n forEachCallback(element);\r\n });\r\n}\r\n\r\nfunction isEmptyBlockUnderTR(block: BlockElement): boolean {\r\n let startNode = block.getStartNode();\r\n\r\n return (\r\n startNode == block.getEndNode() &&\r\n startNode.nodeType == NodeType.Text &&\r\n ['TR', 'TABLE'].indexOf(getTagOfNode(startNode.parentNode)) >= 0\r\n );\r\n}\r\n","import { ExperimentalFeatures, IEditor } from 'roosterjs-editor-types';\nimport { Position, VListChain } from 'roosterjs-editor-dom';\n\n/**\n * Commit changes of all list changes when experiment features are allowed\n * @param editor The Editor object\n * @param chains List chains to commit\n */\nexport default function commitListChains(editor: IEditor, chains: VListChain[]) {\n if (chains?.length > 0) {\n const range = editor.getSelectionRange();\n const start = range && Position.getStart(range);\n const end = range && Position.getEnd(range);\n const shouldReuseAllAncestorListElements = editor.isFeatureEnabled(\n ExperimentalFeatures.ReuseAllAncestorListElements\n );\n const shouldDisableListChain = editor.isFeatureEnabled(\n ExperimentalFeatures.DisableListChain\n );\n\n chains.forEach(chain =>\n chain.commit(shouldReuseAllAncestorListElements, shouldDisableListChain)\n );\n\n if (start && end) {\n editor.select(start, end);\n }\n }\n}\n\n/**\n * @deprecated\n * Same with commitListChains, keep this export just for backward compatibility\n */\nexport const experimentCommitListChains = commitListChains;\n","import formatUndoSnapshot from './formatUndoSnapshot';\nimport { getObjectKeys, PendableFormatCommandMap, PendableFormatNames } from 'roosterjs-editor-dom';\nimport {\n DocumentCommand,\n IEditor,\n PluginEventType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\nimport type { CompatibleDocumentCommand } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Execute a document command\n * @param editor The editor instance\n * @param command The command to execute\n * @param addUndoSnapshotWhenCollapsed Optional, set to true to always add undo snapshot even current selection is collapsed.\n * Default value is false.\n * @param doWorkaroundForList Optional, set to true to do workaround for list in order to keep current format.\n * Default value is false.\n */\nexport default function execCommand(\n editor: IEditor,\n command: DocumentCommand | CompatibleDocumentCommand,\n apiName?: string\n) {\n editor.focus();\n\n let formatter = () => editor.getDocument().execCommand(command, false, undefined);\n\n let selection = editor.getSelectionRangeEx();\n if (selection && selection.areAllCollapsed) {\n editor.addUndoSnapshot();\n const formatState = editor.getPendableFormatState(false /* forceGetStateFromDom */);\n formatter();\n const formatName = getObjectKeys(PendableFormatCommandMap).filter(\n x => PendableFormatCommandMap[x] == command\n )[0] as PendableFormatNames;\n\n if (formatName) {\n formatState[formatName] = !formatState[formatName];\n editor.triggerPluginEvent(PluginEventType.PendingFormatStateChanged, {\n formatState: formatState,\n });\n }\n } else {\n formatUndoSnapshot(\n editor,\n () => {\n const needToSwitchSelection = selection.type != SelectionRangeTypes.Normal;\n\n selection.ranges.forEach(range => {\n if (needToSwitchSelection) {\n editor.select(range);\n }\n formatter();\n });\n\n if (needToSwitchSelection) {\n editor.select(selection);\n }\n },\n apiName\n );\n }\n}\n","import { ChangeSource, IEditor, NodePosition } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Execute add undo snapshot for the Format APIs\n * @param editor The editor instance\n * @param command Optional, The callback function to perform formatting, returns a data object which will be used as the data field in ContentChangedEvent if changeSource is not null.\n * @param apiName Optional, name of the API that was is going to be executed.\n * Default value is false.\n */\nexport default function formatUndoSnapshot(\n editor: IEditor,\n callback?: (start: NodePosition | null, end: NodePosition | null) => any,\n apiName?: string\n) {\n editor.addUndoSnapshot(\n callback,\n ChangeSource.Format,\n undefined /* canUndoByBackspace */,\n apiName && apiName != ''\n ? {\n formatApiName: apiName,\n }\n : undefined\n );\n}\n","import { findClosestElementAncestor, getComputedStyle, safeInstanceOf } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * @param node start node to normalize\n * @param quotesHandled Optional parameter to prevent already modified quotes to be rechecked.\n * @returns\n */\nexport default function normalizeBlockquote(node: Node, quotesHandled?: Node[]): void {\n if (safeInstanceOf(node, 'HTMLElement')) {\n const alignment = node.style.textAlign;\n\n let quote = findClosestElementAncestor(node, undefined /* root */, 'blockquote');\n if (!quote) {\n return;\n }\n const isNodeRTL = isRTL(node);\n\n if (quotesHandled) {\n if (quotesHandled.indexOf(quote) > -1) {\n return;\n }\n quotesHandled.push(quote);\n }\n\n while (quote) {\n if (alignment == 'center') {\n if (isNodeRTL) {\n quote.style.removeProperty('marginInlineEnd');\n quote.style.marginInlineStart = 'auto';\n } else {\n quote.style.removeProperty('marginInlineStart');\n quote.style.marginInlineEnd = 'auto';\n }\n } else {\n quote.style.removeProperty('marginInlineEnd');\n quote.style.removeProperty('marginInlineStart');\n }\n\n quote = findClosestElementAncestor(\n quote.parentElement,\n undefined /* root */,\n 'blockquote'\n );\n }\n }\n}\n\nfunction isRTL(el: Element) {\n return getComputedStyle(el, 'direction') == 'rtl' || el.getAttribute('dir') == 'rtl';\n}\n","import blockFormat from '../utils/blockFormat';\nimport { createVListFromRegion, getBlockElementAtNode } from 'roosterjs-editor-dom';\nimport {\n BulletListType,\n ExperimentalFeatures,\n IEditor,\n ListType,\n NumberingListType,\n} from 'roosterjs-editor-types';\nimport type {\n CompatibleBulletListType,\n CompatibleListType,\n CompatibleNumberingListType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Toggle List Type at selection\n * If ListType Provided is Ordered:\n * If selection contains numbering in deep level, toggle numbering will decrease the numbering level by one\n * If selection contains bullet list, toggle numbering will convert the bullet list into number list\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\n * realization of browser execCommand API\n * If ListType Provided is Unordered:\n * If selection contains bullet in deep level, toggle bullet will decrease the bullet level by one\n * If selection contains number list, toggle bullet will convert the number list into bullet list\n * If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding\n * browser execCommand API\n * @param editor The editor instance\n * @param listType The list type to toggle\n * @param startNumber (Optional) Start number of the list\n * @param includeSiblingLists Sets wether the operation should include Sibling Lists, by default true\n * @param orderedStyle (Optional) the style of an ordered. If not defined, the style will be set to decimal.\n * @param unorderedStyle (Optional) the style of an unordered list. If not defined, the style will be set to disc.\n * @param apiNameOverride (Optional) Set a new api name, if empty the api name will be 'toggleListType'.\n */\nexport default function toggleListType(\n editor: IEditor,\n listType: ListType | CompatibleListType,\n startNumber: number = 0,\n includeSiblingLists: boolean = true,\n orderedStyle?: NumberingListType | CompatibleNumberingListType,\n unorderedStyle?: BulletListType | CompatibleBulletListType,\n apiNameOverride?: string\n) {\n blockFormat(\n editor,\n (region, start, end, chains) => {\n const chain =\n startNumber > 0 && chains.filter(chain => chain.canAppendAtCursor(startNumber))[0];\n const block = getBlockElementAtNode(\n region.rootNode,\n start?.node ?? null\n )?.collapseToSingleElement();\n if (!block) {\n return;\n }\n const vList =\n chain && end && start?.equalTo(end)\n ? chain.createVListAtBlock(block, startNumber)\n : createVListFromRegion(\n region,\n startNumber === 1 ? false : includeSiblingLists\n );\n\n if (vList && start && end) {\n vList.changeListType(start, end, listType);\n if (editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList)) {\n vList.setListStyleType(orderedStyle, unorderedStyle);\n }\n vList.writeBack(\n editor.isFeatureEnabled(ExperimentalFeatures.ReuseAllAncestorListElements),\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\n );\n }\n },\n undefined /* beforeRunCallback */,\n apiNameOverride || 'toggleListType'\n );\n}\n","import { EntityState } from 'roosterjs-editor-types';\nimport { getSelectionPath, Position } from 'roosterjs-editor-dom';\nimport {\n AddUndoSnapshot,\n ChangeSource,\n ContentChangedData,\n ContentChangedEvent,\n ContentMetadata,\n EditorCore,\n NodePosition,\n PluginEventType,\n SelectionRangeEx,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\nimport type { CompatibleChangeSource } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Call an editing callback with adding undo snapshots around, and trigger a ContentChanged event if change source is specified.\n * Undo snapshot will not be added if this call is nested inside another addUndoSnapshot() call.\n * @param core The EditorCore object\n * @param callback The editing callback, accepting current selection start and end position, returns an optional object used as the data field of ContentChangedEvent.\n * @param changeSource The ChangeSource string of ContentChangedEvent. @default ChangeSource.Format. Set to null to avoid triggering ContentChangedEvent\n * @param canUndoByBackspace True if this action can be undone when user press Backspace key (aka Auto Complete).\n * @param additionalData @optional parameter to provide additional data related to the ContentChanged Event.\n */\nexport const addUndoSnapshot: AddUndoSnapshot = (\n core: EditorCore,\n callback: ((start: NodePosition | null, end: NodePosition | null) => any) | null,\n changeSource: ChangeSource | CompatibleChangeSource | string | null,\n canUndoByBackspace: boolean,\n additionalData?: ContentChangedData\n) => {\n const undoState = core.undo;\n const isNested = undoState.isNested;\n let data: any;\n\n if (!isNested) {\n undoState.isNested = true;\n\n // When there is getEntityState, it means this is triggered by an entity change.\n // So if HTML content is not changed (hasNewContent is false), no need to add another snapshot before change\n if (core.undo.hasNewContent || !additionalData?.getEntityState || !callback) {\n addUndoSnapshotInternal(core, canUndoByBackspace, additionalData?.getEntityState?.());\n }\n }\n\n try {\n if (callback) {\n let range = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n data = callback(\n range && Position.getStart(range).normalize(),\n range && Position.getEnd(range).normalize()\n );\n\n if (!isNested) {\n const entityStates = additionalData?.getEntityState?.();\n addUndoSnapshotInternal(core, false /*isAutoCompleteSnapshot*/, entityStates);\n }\n }\n } finally {\n if (!isNested) {\n undoState.isNested = false;\n }\n }\n\n if (callback && changeSource) {\n let event: ContentChangedEvent = {\n eventType: PluginEventType.ContentChanged,\n source: changeSource,\n data: data,\n additionalData,\n };\n core.api.triggerEvent(core, event, true /*broadcast*/);\n }\n\n if (canUndoByBackspace) {\n const range = core.api.getSelectionRange(core, false /*tryGetFromCache*/);\n\n if (range) {\n core.undo.hasNewContent = false;\n core.undo.autoCompletePosition = Position.getStart(range);\n }\n }\n};\n\nfunction addUndoSnapshotInternal(\n core: EditorCore,\n canUndoByBackspace: boolean,\n entityStates?: EntityState[]\n) {\n if (!core.lifecycle.shadowEditFragment) {\n const rangeEx = core.api.getSelectionRangeEx(core);\n const isDarkMode = core.lifecycle.isDarkMode;\n const metadata = createContentMetadata(core.contentDiv, rangeEx, isDarkMode) || null;\n\n core.undo.snapshotsService.addSnapshot(\n {\n html: core.contentDiv.innerHTML,\n metadata,\n knownColors: core.darkColorHandler?.getKnownColorsCopy() || [],\n entityStates,\n },\n canUndoByBackspace\n );\n core.undo.hasNewContent = false;\n }\n}\n\nfunction createContentMetadata(\n root: HTMLElement,\n rangeEx: SelectionRangeEx,\n isDarkMode: boolean\n): ContentMetadata | undefined {\n switch (rangeEx?.type) {\n case SelectionRangeTypes.TableSelection:\n return {\n type: SelectionRangeTypes.TableSelection,\n tableId: rangeEx.table.id,\n isDarkMode: !!isDarkMode,\n ...rangeEx.coordinates!,\n };\n case SelectionRangeTypes.ImageSelection:\n return {\n type: SelectionRangeTypes.ImageSelection,\n imageId: rangeEx.image.id,\n isDarkMode: !!isDarkMode,\n };\n case SelectionRangeTypes.Normal:\n return {\n type: SelectionRangeTypes.Normal,\n isDarkMode: !!isDarkMode,\n start: [],\n end: [],\n ...(getSelectionPath(root, rangeEx.ranges[0]) || {}),\n };\n }\n}\n","import { getObjectKeys } from 'roosterjs-editor-dom';\nimport {\n AttachDomEvent,\n DOMEventHandler,\n DOMEventHandlerObject,\n EditorCore,\n PluginDomEvent,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Attach a DOM event to the editor content DIV\n * @param core The EditorCore object\n * @param eventName The DOM event name\n * @param pluginEventType Optional event type. When specified, editor will trigger a plugin event with this name when the DOM event is triggered\n * @param beforeDispatch Optional callback function to be invoked when the DOM event is triggered before trigger plugin event\n */\nexport const attachDomEvent: AttachDomEvent = (\n core: EditorCore,\n eventMap: Record\n) => {\n const disposers = getObjectKeys(eventMap || {}).map(key => {\n const { pluginEventType, beforeDispatch } = extractHandler(eventMap[key]);\n const eventName = key as keyof HTMLElementEventMap;\n let onEvent = (event: HTMLElementEventMap[typeof eventName]) => {\n if (beforeDispatch) {\n beforeDispatch(event);\n }\n if (pluginEventType != null) {\n core.api.triggerEvent(\n core,\n {\n eventType: pluginEventType,\n rawEvent: event,\n },\n false /*broadcast*/\n );\n }\n };\n\n core.contentDiv.addEventListener(eventName, onEvent);\n\n return () => {\n core.contentDiv.removeEventListener(eventName, onEvent);\n };\n });\n return () => disposers.forEach(disposers => disposers());\n};\n\nfunction extractHandler(handlerObj: DOMEventHandler): DOMEventHandlerObject {\n let result: DOMEventHandlerObject = {\n pluginEventType: null,\n beforeDispatch: null,\n };\n\n if (typeof handlerObj === 'number') {\n result.pluginEventType = handlerObj;\n } else if (typeof handlerObj === 'function') {\n result.beforeDispatch = handlerObj;\n } else if (typeof handlerObj === 'object') {\n result = handlerObj;\n }\n return result;\n}\n","import { addUndoSnapshot } from './addUndoSnapshot';\nimport { attachDomEvent } from './attachDomEvent';\nimport { CoreApiMap } from 'roosterjs-editor-types';\nimport { createPasteFragment } from './createPasteFragment';\nimport { ensureTypeInContainer } from './ensureTypeInContainer';\nimport { focus } from './focus';\nimport { getContent } from './getContent';\nimport { getPendableFormatState } from './getPendableFormatState';\nimport { getSelectionRange } from './getSelectionRange';\nimport { getSelectionRangeEx } from './getSelectionRangeEx';\nimport { getStyleBasedFormatState } from './getStyleBasedFormatState';\nimport { hasFocus } from './hasFocus';\nimport { insertNode } from './insertNode';\nimport { restoreUndoSnapshot } from './restoreUndoSnapshot';\nimport { select } from './select';\nimport { selectImage } from './selectImage';\nimport { selectRange } from './selectRange';\nimport { selectTable } from './selectTable';\nimport { setContent } from './setContent';\nimport { switchShadowEdit } from './switchShadowEdit';\nimport { transformColor } from './transformColor';\nimport { triggerEvent } from './triggerEvent';\n\n/**\n * @internal\n */\nexport const coreApiMap: CoreApiMap = {\n attachDomEvent,\n addUndoSnapshot,\n createPasteFragment,\n ensureTypeInContainer,\n focus,\n getContent,\n getSelectionRange,\n getSelectionRangeEx,\n getStyleBasedFormatState,\n getPendableFormatState,\n hasFocus,\n insertNode,\n restoreUndoSnapshot,\n select,\n selectRange,\n setContent,\n switchShadowEdit,\n transformColor,\n triggerEvent,\n selectTable,\n selectImage,\n};\n","import {\n createDefaultHtmlSanitizerOptions,\n createFragmentFromClipboardData,\n getPasteType,\n} from 'roosterjs-editor-dom';\nimport {\n BeforePasteEvent,\n ClipboardData,\n CreatePasteFragment,\n EditorCore,\n PluginEventType,\n NodePosition,\n PasteType,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Create a DocumentFragment for paste from a ClipboardData\n * @param core The EditorCore object.\n * @param clipboardData Clipboard data retrieved from clipboard\n * @param position The position to paste to\n * @param pasteAsText True to force use plain text as the content to paste, false to choose HTML or Image if any\n * @param applyCurrentStyle True if apply format of current selection to the pasted content,\n * false to keep original format\n */\nexport const createPasteFragment: CreatePasteFragment = (\n core: EditorCore,\n clipboardData: ClipboardData,\n position: NodePosition | null,\n pasteAsText: boolean,\n applyCurrentStyle: boolean,\n pasteAsImage: boolean = false\n) => {\n if (!clipboardData) {\n return null;\n }\n\n const pasteType = getPasteType(pasteAsText, applyCurrentStyle, pasteAsImage);\n\n // Step 1: Prepare BeforePasteEvent object\n const event = createBeforePasteEvent(core, clipboardData, pasteType);\n return createFragmentFromClipboardData(\n core,\n clipboardData,\n position,\n pasteAsText,\n applyCurrentStyle,\n pasteAsImage,\n event\n );\n};\n\nfunction createBeforePasteEvent(\n core: EditorCore,\n clipboardData: ClipboardData,\n pasteType: PasteType\n): BeforePasteEvent {\n const options = createDefaultHtmlSanitizerOptions();\n\n // Remove \"caret-color\" style generated by Safari to make sure caret shows in right color after paste\n options.cssStyleCallbacks['caret-color'] = () => false;\n\n return {\n eventType: PluginEventType.BeforePaste,\n clipboardData,\n fragment: core.contentDiv.ownerDocument.createDocumentFragment(),\n sanitizingOption: options,\n htmlBefore: '',\n htmlAfter: '',\n htmlAttributes: {},\n pasteType: pasteType,\n };\n}\n","import {\n ContentPosition,\n EditorCore,\n EnsureTypeInContainer,\n KnownCreateElementDataIndex,\n NodePosition,\n PositionType,\n} from 'roosterjs-editor-types';\nimport {\n applyFormat,\n createElement,\n createRange,\n findClosestElementAncestor,\n getBlockElementAtNode,\n isNodeEmpty,\n Position,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * When typing goes directly under content div, many things can go wrong\n * We fix it by wrapping it with a div and reposition cursor within the div\n */\nexport const ensureTypeInContainer: EnsureTypeInContainer = (\n core: EditorCore,\n position: NodePosition,\n keyboardEvent?: KeyboardEvent\n) => {\n const table = findClosestElementAncestor(position.node, core.contentDiv, 'table');\n let td: HTMLElement | null;\n\n if (table && (td = table.querySelector('td,th'))) {\n position = new Position(td, PositionType.Begin);\n }\n position = position.normalize();\n\n const block = getBlockElementAtNode(core.contentDiv, position.node);\n let formatNode: HTMLElement | null;\n\n if (block) {\n formatNode = block.collapseToSingleElement();\n if (isNodeEmpty(formatNode, false /* trimContent */, true /* shouldCountBrAsVisible */)) {\n const brEl = formatNode.ownerDocument.createElement('br');\n formatNode.append(brEl);\n }\n // if the block is empty, apply default format\n // Otherwise, leave it as it is as we don't want to change the style for existing data\n // unless the block was just created by the keyboard event (e.g. ctrl+a & start typing)\n const shouldSetNodeStyles =\n isNodeEmpty(formatNode) ||\n (keyboardEvent && wasNodeJustCreatedByKeyboardEvent(keyboardEvent, formatNode));\n formatNode = formatNode && shouldSetNodeStyles ? formatNode : null;\n } else {\n // Only reason we don't get the selection block is that we have an empty content div\n // which can happen when users removes everything (i.e. select all and DEL, or backspace from very end to begin)\n // The fix is to add a DIV wrapping, apply default format and move cursor over\n formatNode = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n core.contentDiv.ownerDocument\n ) as HTMLElement;\n core.api.insertNode(core, formatNode, {\n position: ContentPosition.End,\n updateCursor: false,\n replaceSelection: false,\n insertOnNewLine: false,\n });\n\n // element points to a wrapping node we added \"

                \". We should move the selection left to
                \n position = new Position(formatNode, PositionType.Begin);\n }\n\n if (formatNode && core.lifecycle.defaultFormat) {\n applyFormat(\n formatNode,\n core.lifecycle.defaultFormat,\n core.lifecycle.isDarkMode,\n core.darkColorHandler\n );\n }\n\n // If this is triggered by a keyboard event, let's select the new position\n if (keyboardEvent) {\n core.api.selectRange(core, createRange(new Position(position)));\n }\n};\n\nfunction wasNodeJustCreatedByKeyboardEvent(event: KeyboardEvent, formatNode: HTMLElement) {\n return (\n safeInstanceOf(event.target, 'Node') &&\n event.target.contains(formatNode) &&\n event.key === formatNode.innerText\n );\n}\n","import { createRange, getFirstLeafNode } from 'roosterjs-editor-dom';\nimport { EditorCore, Focus, PositionType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Focus to editor. If there is a cached selection range, use it as current selection\n * @param core The EditorCore object\n */\nexport const focus: Focus = (core: EditorCore) => {\n if (!core.lifecycle.shadowEditFragment) {\n if (\n !core.api.hasFocus(core) ||\n !core.api.getSelectionRange(core, false /*tryGetFromCache*/)\n ) {\n // Focus (document.activeElement indicates) and selection are mostly in sync, but could be out of sync in some extreme cases.\n // i.e. if you programmatically change window selection to point to a non-focusable DOM element (i.e. tabindex=-1 etc.).\n // On Chrome/Firefox, it does not change document.activeElement. On Edge/IE, it change document.activeElement to be body\n // Although on Chrome/Firefox, document.activeElement points to editor, you cannot really type which we don't want (no cursor).\n // So here we always do a live selection pull on DOM and make it point in Editor. The pitfall is, the cursor could be reset\n // to very begin to of editor since we don't really have last saved selection (created on blur which does not fire in this case).\n // It should be better than the case you cannot type\n if (\n !core.domEvent.selectionRange ||\n !core.api.selectRange(core, core.domEvent.selectionRange, true /*skipSameRange*/)\n ) {\n let node = getFirstLeafNode(core.contentDiv) || core.contentDiv;\n core.api.selectRange(\n core,\n createRange(node, PositionType.Begin),\n true /*skipSameRange*/\n );\n }\n }\n\n // remember to clear cached selection range\n core.domEvent.selectionRange = null;\n\n // This is more a fallback to ensure editor gets focus if it didn't manage to move focus to editor\n if (!core.api.hasFocus(core)) {\n core.contentDiv.focus();\n }\n }\n};\n","import {\n ColorTransformDirection,\n EditorCore,\n GetContent,\n GetContentMode,\n PluginEventType,\n} from 'roosterjs-editor-types';\nimport {\n createRange,\n getHtmlWithSelectionPath,\n getSelectionPath,\n getTextContent,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\nimport type { CompatibleGetContentMode } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Get current editor content as HTML string\n * @param core The EditorCore object\n * @param mode specify what kind of HTML content to retrieve\n * @returns HTML string representing current editor content\n */\nexport const getContent: GetContent = (\n core: EditorCore,\n mode: GetContentMode | CompatibleGetContentMode\n): string => {\n let content: string | null = '';\n const triggerExtractContentEvent = mode == GetContentMode.CleanHTML;\n const includeSelectionMarker = mode == GetContentMode.RawHTMLWithSelection;\n\n // When there is fragment for shadow edit, always use the cached fragment as document since HTML node in editor\n // has been changed by uncommitted shadow edit which should be ignored.\n const root = core.lifecycle.shadowEditFragment || core.contentDiv;\n\n if (mode == GetContentMode.PlainTextFast) {\n content = root.textContent;\n } else if (mode == GetContentMode.PlainText) {\n content = getTextContent(root);\n } else {\n const clonedRoot = cloneNode(root);\n clonedRoot.normalize();\n\n const originalRange = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n const path = !includeSelectionMarker\n ? null\n : core.lifecycle.shadowEditFragment\n ? core.lifecycle.shadowEditSelectionPath\n : originalRange\n ? getSelectionPath(core.contentDiv, originalRange)\n : null;\n const range = path && createRange(clonedRoot, path.start, path.end);\n\n core.api.transformColor(\n core,\n clonedRoot,\n false /*includeSelf*/,\n null /*callback*/,\n ColorTransformDirection.DarkToLight,\n true /*forceTransform*/,\n core.lifecycle.isDarkMode\n );\n\n if (triggerExtractContentEvent) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.ExtractContentWithDom,\n clonedRoot,\n },\n true /*broadcast*/\n );\n\n content = clonedRoot.innerHTML;\n } else if (range) {\n // range is not null, which means we want to include a selection path in the content\n content = getHtmlWithSelectionPath(clonedRoot, range);\n } else {\n content = clonedRoot.innerHTML;\n }\n }\n\n return content ?? '';\n};\n\nfunction cloneNode(node: HTMLElement | DocumentFragment): HTMLElement {\n let clonedNode: HTMLElement;\n if (safeInstanceOf(node, 'DocumentFragment')) {\n clonedNode = node.ownerDocument.createElement('div');\n clonedNode.appendChild(node.cloneNode(true /*deep*/));\n } else {\n clonedNode = node.cloneNode(true /*deep*/) as HTMLElement;\n }\n\n return clonedNode;\n}\n","import {\n contains,\n getObjectKeys,\n getTagOfNode,\n PendableFormatNames,\n Position,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n GetPendableFormatState,\n NodePosition,\n NodeType,\n PendableFormatState,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * @param core The EditorCore object\n * @param forceGetStateFromDOM If set to true, will force get the format state from DOM tree.\n * @returns The cached format state if it exists. If the cached position do not exist, search for pendable elements in the DOM tree and return the pendable format state.\n */\nexport const getPendableFormatState: GetPendableFormatState = (\n core: EditorCore,\n forceGetStateFromDOM: boolean\n): PendableFormatState => {\n const range = core.api.getSelectionRange(core, true /* tryGetFromCache*/);\n const cachedPendableFormatState = core.pendingFormatState.pendableFormatState;\n const cachedPosition = core.pendingFormatState.pendableFormatPosition?.normalize();\n const currentPosition = range && Position.getStart(range).normalize();\n const isSamePosition =\n currentPosition &&\n cachedPosition &&\n range.collapsed &&\n currentPosition.equalTo(cachedPosition);\n\n if (range && cachedPendableFormatState && isSamePosition && !forceGetStateFromDOM) {\n return cachedPendableFormatState;\n } else {\n return currentPosition ? queryCommandStateFromDOM(core, currentPosition) : {};\n }\n};\n\nconst PendableStyleCheckers: Record<\n PendableFormatNames,\n (tagName: string, style: CSSStyleDeclaration) => boolean\n> = {\n isBold: (tag, style) =>\n tag == 'B' ||\n tag == 'STRONG' ||\n tag == 'H1' ||\n tag == 'H2' ||\n tag == 'H3' ||\n tag == 'H4' ||\n tag == 'H5' ||\n tag == 'H6' ||\n parseInt(style.fontWeight) >= 700 ||\n ['bold', 'bolder'].indexOf(style.fontWeight) >= 0,\n isUnderline: (tag, style) => tag == 'U' || style.textDecoration.indexOf('underline') >= 0,\n isItalic: (tag, style) => tag == 'I' || tag == 'EM' || style.fontStyle === 'italic',\n isSubscript: (tag, style) => tag == 'SUB' || style.verticalAlign === 'sub',\n isSuperscript: (tag, style) => tag == 'SUP' || style.verticalAlign === 'super',\n isStrikeThrough: (tag, style) =>\n tag == 'S' || tag == 'STRIKE' || style.textDecoration.indexOf('line-through') >= 0,\n};\n\n/**\n * CssFalsyCheckers checks for non pendable format that might overlay a pendable format, then it can prevent getPendableFormatState return falsy pendable format states.\n */\n\nconst CssFalsyCheckers: Record boolean> = {\n isBold: style =>\n (style.fontWeight !== '' && parseInt(style.fontWeight) < 700) ||\n style.fontWeight === 'normal',\n isUnderline: style =>\n style.textDecoration !== '' && style.textDecoration.indexOf('underline') < 0,\n isItalic: style => style.fontStyle !== '' && style.fontStyle !== 'italic',\n isSubscript: style => style.verticalAlign !== '' && style.verticalAlign !== 'sub',\n isSuperscript: style => style.verticalAlign !== '' && style.verticalAlign !== 'super',\n isStrikeThrough: style =>\n style.textDecoration !== '' && style.textDecoration.indexOf('line-through') < 0,\n};\n\nfunction queryCommandStateFromDOM(\n core: EditorCore,\n currentPosition: NodePosition\n): PendableFormatState {\n let node: Node | null = currentPosition.node;\n let formatState: PendableFormatState = {};\n let pendableKeys: PendableFormatNames[] = [];\n while (node && contains(core.contentDiv, node)) {\n const tag = getTagOfNode(node);\n const style = node.nodeType == NodeType.Element && (node as HTMLElement).style;\n if (tag && style) {\n getObjectKeys(PendableStyleCheckers).forEach(key => {\n if (!(pendableKeys.indexOf(key) >= 0)) {\n formatState[key] = formatState[key] || PendableStyleCheckers[key](tag, style);\n if (CssFalsyCheckers[key](style)) {\n pendableKeys.push(key);\n }\n }\n });\n }\n node = node.parentNode;\n }\n return formatState;\n}\n","import { contains, createRange } from 'roosterjs-editor-dom';\nimport { EditorCore, GetSelectionRange } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Get current or cached selection range\n * @param core The EditorCore object\n * @param tryGetFromCache Set to true to retrieve the selection range from cache if editor doesn't own the focus now\n * @returns A Range object of the selection range\n */\nexport const getSelectionRange: GetSelectionRange = (\n core: EditorCore,\n tryGetFromCache: boolean\n) => {\n let result: Range | null = null;\n\n if (core.lifecycle.shadowEditFragment) {\n result =\n core.lifecycle.shadowEditSelectionPath &&\n createRange(\n core.contentDiv,\n core.lifecycle.shadowEditSelectionPath.start,\n core.lifecycle.shadowEditSelectionPath.end\n );\n\n return result;\n } else {\n if (!tryGetFromCache || core.api.hasFocus(core)) {\n let selection = core.contentDiv.ownerDocument.defaultView?.getSelection();\n if (selection && selection.rangeCount > 0) {\n let range = selection.getRangeAt(0);\n if (contains(core.contentDiv, range)) {\n result = range;\n }\n }\n }\n\n if (!result && tryGetFromCache) {\n result = core.domEvent.selectionRange;\n }\n\n return result;\n }\n};\n","import { contains, createRange, findClosestElementAncestor } from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n GetSelectionRangeEx,\n SelectionRangeEx,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Get current or cached selection range\n * @param core The EditorCore object\n * @returns A Range object of the selection range\n */\nexport const getSelectionRangeEx: GetSelectionRangeEx = (core: EditorCore) => {\n let result: SelectionRangeEx | null = null;\n if (core.lifecycle.shadowEditFragment) {\n const {\n shadowEditTableSelectionPath,\n shadowEditSelectionPath,\n shadowEditImageSelectionPath,\n } = core.lifecycle;\n\n if ((shadowEditTableSelectionPath?.length || 0) > 0) {\n const ranges = core.lifecycle.shadowEditTableSelectionPath!.map(path =>\n createRange(core.contentDiv, path.start, path.end)\n );\n\n return {\n type: SelectionRangeTypes.TableSelection,\n ranges,\n areAllCollapsed: checkAllCollapsed(ranges),\n table: findClosestElementAncestor(\n ranges[0].startContainer,\n core.contentDiv,\n 'table'\n ) as HTMLTableElement,\n coordinates: undefined,\n };\n } else if ((shadowEditImageSelectionPath?.length || 0) > 0) {\n const ranges = core.lifecycle.shadowEditImageSelectionPath!.map(path =>\n createRange(core.contentDiv, path.start, path.end)\n );\n return {\n type: SelectionRangeTypes.ImageSelection,\n ranges,\n areAllCollapsed: checkAllCollapsed(ranges),\n image: findClosestElementAncestor(\n ranges[0].startContainer,\n core.contentDiv,\n 'img'\n ) as HTMLImageElement,\n imageId: undefined,\n };\n } else {\n const shadowRange =\n shadowEditSelectionPath &&\n createRange(\n core.contentDiv,\n shadowEditSelectionPath.start,\n shadowEditSelectionPath.end\n );\n\n return createNormalSelectionEx(shadowRange ? [shadowRange] : []);\n }\n } else {\n if (core.api.hasFocus(core)) {\n if (core.domEvent.tableSelectionRange) {\n return core.domEvent.tableSelectionRange;\n }\n\n if (core.domEvent.imageSelectionRange) {\n return core.domEvent.imageSelectionRange;\n }\n\n let selection = core.contentDiv.ownerDocument.defaultView?.getSelection();\n if (!result && selection && selection.rangeCount > 0) {\n let range = selection.getRangeAt(0);\n if (contains(core.contentDiv, range)) {\n return createNormalSelectionEx([range]);\n }\n }\n }\n\n return (\n core.domEvent.tableSelectionRange ??\n core.domEvent.imageSelectionRange ??\n createNormalSelectionEx(\n core.domEvent.selectionRange ? [core.domEvent.selectionRange] : []\n )\n );\n }\n};\n\nfunction createNormalSelectionEx(ranges: Range[]): SelectionRangeEx {\n return {\n type: SelectionRangeTypes.Normal,\n ranges: ranges,\n areAllCollapsed: checkAllCollapsed(ranges),\n };\n}\n\nfunction checkAllCollapsed(ranges: Range[]): boolean {\n return ranges.filter(range => range?.collapsed).length == ranges.length;\n}\n","import { contains, getComputedStyles } from 'roosterjs-editor-dom';\r\nimport { EditorCore, GetStyleBasedFormatState, NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Get style based format state from current selection, including font name/size and colors\r\n * @param core The EditorCore objects\r\n * @param node The node to get style from\r\n */\r\nexport const getStyleBasedFormatState: GetStyleBasedFormatState = (\r\n core: EditorCore,\r\n node: Node | null\r\n) => {\r\n if (!node) {\r\n return {};\r\n }\r\n\r\n let override: string[] = [];\r\n const pendableFormatSpan = core.pendingFormatState.pendableFormatSpan;\r\n\r\n if (pendableFormatSpan) {\r\n override = [\r\n pendableFormatSpan.style.fontFamily,\r\n pendableFormatSpan.style.fontSize,\r\n pendableFormatSpan.style.color,\r\n pendableFormatSpan.style.backgroundColor,\r\n ];\r\n }\r\n\r\n const styles = node\r\n ? getComputedStyles(node, [\r\n 'font-family',\r\n 'font-size',\r\n 'color',\r\n 'background-color',\r\n 'line-height',\r\n 'margin-top',\r\n 'margin-bottom',\r\n 'text-align',\r\n 'direction',\r\n ])\r\n : [];\r\n const { contentDiv, darkColorHandler } = core;\r\n\r\n let styleTextColor: string | undefined;\r\n let styleBackColor: string | undefined;\r\n\r\n while (\r\n node &&\r\n contains(contentDiv, node, true /*treatSameNodeAsContain*/) &&\r\n !(styleTextColor && styleBackColor)\r\n ) {\r\n if (node.nodeType == NodeType.Element) {\r\n const element = node as HTMLElement;\r\n\r\n styleTextColor = styleTextColor || element.style.getPropertyValue('color');\r\n styleBackColor = styleBackColor || element.style.getPropertyValue('background-color');\r\n }\r\n node = node.parentNode;\r\n }\r\n\r\n if (!core.lifecycle.isDarkMode && node == core.contentDiv) {\r\n styleTextColor = styleTextColor || styles[2];\r\n styleBackColor = styleBackColor || styles[3];\r\n }\r\n\r\n const textColor = darkColorHandler.parseColorValue(override[2] || styleTextColor);\r\n const backColor = darkColorHandler.parseColorValue(override[3] || styleBackColor);\r\n\r\n return {\r\n fontName: override[0] || styles[0],\r\n fontSize: override[1] || styles[1],\r\n textColor: textColor.lightModeColor,\r\n backgroundColor: backColor.lightModeColor,\r\n textColors: textColor.darkModeColor\r\n ? {\r\n lightModeColor: textColor.lightModeColor,\r\n darkModeColor: textColor.darkModeColor,\r\n }\r\n : undefined,\r\n backgroundColors: backColor.darkModeColor\r\n ? {\r\n lightModeColor: backColor.lightModeColor,\r\n darkModeColor: backColor.darkModeColor,\r\n }\r\n : undefined,\r\n lineHeight: styles[4],\r\n marginTop: styles[5],\r\n marginBottom: styles[6],\r\n textAlign: styles[7],\r\n direction: styles[8],\r\n };\r\n};\r\n","import { contains } from 'roosterjs-editor-dom';\nimport { EditorCore, HasFocus } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Check if the editor has focus now\n * @param core The EditorCore object\n * @returns True if the editor has focus, otherwise false\n */\nexport const hasFocus: HasFocus = (core: EditorCore) => {\n let activeElement = core.contentDiv.ownerDocument.activeElement;\n return !!(\n activeElement && contains(core.contentDiv, activeElement, true /*treatSameNodeAsContain*/)\n );\n};\n","import {\n BlockElement,\n ContentPosition,\n ColorTransformDirection,\n EditorCore,\n InsertNode,\n InsertOption,\n NodeType,\n PositionType,\n NodePosition,\n RegionType,\n} from 'roosterjs-editor-types';\nimport {\n createRange,\n getBlockElementAtNode,\n getFirstLastBlockElement,\n isBlockElement,\n isVoidHtmlElement,\n Position,\n safeInstanceOf,\n toArray,\n wrap,\n adjustInsertPosition,\n getRegionsFromRange,\n splitTextNode,\n splitParentNode,\n} from 'roosterjs-editor-dom';\n\nfunction getInitialRange(\n core: EditorCore,\n option: InsertOption\n): { range: Range | null; rangeToRestore: Range | null } {\n // Selection start replaces based on the current selection.\n // Range inserts based on a provided range.\n // Both have the potential to use the current selection to restore cursor position\n // So in both cases we need to store the selection state.\n let range = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n let rangeToRestore = null;\n if (option.position == ContentPosition.Range) {\n rangeToRestore = range;\n range = option.range;\n } else if (range) {\n rangeToRestore = range.cloneRange();\n }\n\n return { range, rangeToRestore };\n}\n\n/**\n * @internal\n * Insert a DOM node into editor content\n * @param core The EditorCore object. No op if null.\n * @param option An insert option object to specify how to insert the node\n */\nexport const insertNode: InsertNode = (\n core: EditorCore,\n node: Node,\n option: InsertOption | null\n) => {\n option = option || {\n position: ContentPosition.SelectionStart,\n insertOnNewLine: false,\n updateCursor: true,\n replaceSelection: true,\n insertToRegionRoot: false,\n };\n let contentDiv = core.contentDiv;\n\n if (option.updateCursor) {\n core.api.focus(core);\n }\n\n if (option.position == ContentPosition.Outside) {\n contentDiv.parentNode?.insertBefore(node, contentDiv.nextSibling);\n return true;\n }\n\n core.api.transformColor(\n core,\n node,\n true /*includeSelf*/,\n () => {\n if (!option) {\n return;\n }\n switch (option.position) {\n case ContentPosition.Begin:\n case ContentPosition.End: {\n let isBegin = option.position == ContentPosition.Begin;\n let block = getFirstLastBlockElement(contentDiv, isBegin);\n let insertedNode: Node | Node[] | undefined;\n if (block) {\n let refNode = isBegin ? block.getStartNode() : block.getEndNode();\n if (\n option.insertOnNewLine ||\n refNode.nodeType == NodeType.Text ||\n isVoidHtmlElement(refNode)\n ) {\n // For insert on new line, or refNode is text or void html element (HR, BR etc.)\n // which cannot have children, i.e.
                hello
                world
                . 'hello', 'world' are the\n // first and last node. Insert before 'hello' or after 'world', but still inside DIV\n if (safeInstanceOf(node, 'DocumentFragment')) {\n // if the node to be inserted is DocumentFragment, use its childNodes as insertedNode\n // because insertBefore() returns an empty DocumentFragment\n insertedNode = toArray(node.childNodes);\n refNode.parentNode?.insertBefore(\n node,\n isBegin ? refNode : refNode.nextSibling\n );\n } else {\n insertedNode = refNode.parentNode?.insertBefore(\n node,\n isBegin ? refNode : refNode.nextSibling\n );\n }\n } else {\n // if the refNode can have child, use appendChild (which is like to insert as first/last child)\n // i.e.
                hello
                , the content will be inserted before/after hello\n insertedNode = refNode.insertBefore(\n node,\n isBegin ? refNode.firstChild : null\n );\n }\n } else {\n // No first block, this can happen when editor is empty. Use appendChild to insert the content in contentDiv\n insertedNode = contentDiv.appendChild(node);\n }\n\n // Final check to see if the inserted node is a block. If not block and the ask is to insert on new line,\n // add a DIV wrapping\n if (insertedNode && option.insertOnNewLine) {\n const nodes = Array.isArray(insertedNode) ? insertedNode : [insertedNode];\n if (!isBlockElement(nodes[0]) || !isBlockElement(nodes[nodes.length - 1])) {\n wrap(nodes);\n }\n }\n\n break;\n }\n case ContentPosition.DomEnd:\n // Use appendChild to insert the node at the end of the content div.\n let insertedNode = contentDiv.appendChild(node);\n // Final check to see if the inserted node is a block. If not block and the ask is to insert on new line,\n // add a DIV wrapping\n if (insertedNode && option.insertOnNewLine && !isBlockElement(insertedNode)) {\n wrap(insertedNode);\n }\n break;\n case ContentPosition.Range:\n case ContentPosition.SelectionStart:\n let { range, rangeToRestore } = getInitialRange(core, option);\n if (!range) {\n return;\n }\n\n // if to replace the selection and the selection is not collapsed, remove the the content at selection first\n if (option.replaceSelection && !range.collapsed) {\n range.deleteContents();\n }\n\n let pos: NodePosition = Position.getStart(range);\n let blockElement: BlockElement | null;\n\n if (option.insertOnNewLine && option.insertToRegionRoot) {\n pos = adjustInsertPositionRegionRoot(core, range, pos);\n } else if (\n option.insertOnNewLine &&\n (blockElement = getBlockElementAtNode(contentDiv, pos.normalize().node))\n ) {\n pos = adjustInsertPositionNewLine(blockElement, core, pos);\n } else {\n pos = adjustInsertPosition(contentDiv, node, pos, range);\n }\n\n let nodeForCursor =\n node.nodeType == NodeType.DocumentFragment ? node.lastChild : node;\n\n range = createRange(pos);\n range.insertNode(node);\n\n if (option.updateCursor && nodeForCursor) {\n rangeToRestore = createRange(\n new Position(nodeForCursor, PositionType.After).normalize()\n );\n }\n\n if (rangeToRestore) {\n core.api.selectRange(core, rangeToRestore);\n }\n\n break;\n }\n },\n ColorTransformDirection.LightToDark\n );\n\n return true;\n};\n\nfunction adjustInsertPositionRegionRoot(core: EditorCore, range: Range, position: NodePosition) {\n const region = getRegionsFromRange(core.contentDiv, range, RegionType.Table)[0];\n let node: Node | null = position.node;\n\n if (region) {\n if (node.nodeType == NodeType.Text && !position.isAtEnd) {\n node = splitTextNode(node as Text, position.offset, true /*returnFirstPart*/);\n }\n\n if (node != region.rootNode) {\n while (node && node.parentNode != region.rootNode) {\n splitParentNode(node, false /*splitBefore*/);\n node = node.parentNode;\n }\n }\n\n if (node) {\n position = new Position(node, PositionType.After);\n }\n }\n\n return position;\n}\n\nfunction adjustInsertPositionNewLine(blockElement: BlockElement, core: EditorCore, pos: Position) {\n let tempPos = new Position(blockElement.getEndNode(), PositionType.After);\n if (safeInstanceOf(tempPos.node, 'HTMLTableRowElement')) {\n const div = core.contentDiv.ownerDocument.createElement('div');\n const range = createRange(pos);\n range.insertNode(div);\n tempPos = new Position(div, PositionType.Begin);\n }\n return tempPos;\n}\n","import { getEntityFromElement, getEntitySelector, queryElements } from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n EntityOperation,\n PluginEventType,\n RestoreUndoSnapshot,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Restore an undo snapshot into editor\n * @param core The editor core object\n * @param step Steps to move, can be 0, positive or negative\n */\nexport const restoreUndoSnapshot: RestoreUndoSnapshot = (core: EditorCore, step: number) => {\n if (core.undo.hasNewContent && step < 0) {\n core.api.addUndoSnapshot(\n core,\n null /*callback*/,\n null /*changeSource*/,\n false /*canUndoByBackspace*/\n );\n }\n\n const snapshot = core.undo.snapshotsService.move(step);\n\n if (snapshot && snapshot.html != null) {\n try {\n core.undo.isRestoring = true;\n core.api.setContent(\n core,\n snapshot.html,\n true /*triggerContentChangedEvent*/,\n snapshot.metadata ?? undefined\n );\n\n const darkColorHandler = core.darkColorHandler;\n const isDarkModel = core.lifecycle.isDarkMode;\n\n snapshot.knownColors.forEach(color => {\n darkColorHandler.registerColor(\n color.lightModeColor,\n isDarkModel,\n color.darkModeColor\n );\n });\n\n snapshot.entityStates?.forEach(entityState => {\n const { type, id, state } = entityState;\n const wrapper = queryElements(\n core.contentDiv,\n getEntitySelector(type, id)\n )[0] as HTMLElement;\n const entity = wrapper && getEntityFromElement(wrapper);\n\n if (entity) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.EntityOperation,\n operation: EntityOperation.UpdateEntityState,\n entity: entity,\n state,\n },\n false\n );\n }\n });\n } finally {\n core.undo.isRestoring = false;\n }\n }\n};\n","import { contains, createRange, safeInstanceOf } from 'roosterjs-editor-dom';\nimport {\n NodePosition,\n PluginEventType,\n PositionType,\n Select,\n SelectionPath,\n SelectionRangeEx,\n SelectionRangeTypes,\n TableSelection,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Select content according to the given information.\n * There are a bunch of allowed combination of parameters. See IEditor.select for more details\n * @param core The editor core object\n * @param arg1 A DOM Range, or SelectionRangeEx, or NodePosition, or Node, or Selection Path\n * @param arg2 (optional) A NodePosition, or an offset number, or a PositionType, or a TableSelection\n * @param arg3 (optional) A Node\n * @param arg4 (optional) An offset number, or a PositionType\n */\nexport const select: Select = (core, arg1, arg2, arg3, arg4) => {\n let rangeEx: SelectionRangeEx | null = null;\n\n if (isSelectionRangeEx(arg1)) {\n rangeEx = arg1;\n } else if (safeInstanceOf(arg1, 'HTMLTableElement') && isTableSelectionOrNull(arg2)) {\n rangeEx = {\n type: SelectionRangeTypes.TableSelection,\n ranges: [],\n areAllCollapsed: false,\n table: arg1,\n coordinates: arg2 ?? undefined,\n };\n } else if (safeInstanceOf(arg1, 'HTMLImageElement') && typeof arg2 == 'undefined') {\n rangeEx = {\n type: SelectionRangeTypes.ImageSelection,\n ranges: [],\n areAllCollapsed: false,\n image: arg1,\n };\n } else {\n let range = !arg1\n ? null\n : safeInstanceOf(arg1, 'Range')\n ? arg1\n : isSelectionPath(arg1)\n ? createRange(core.contentDiv, arg1.start, arg1.end)\n : isNodePosition(arg1) || safeInstanceOf(arg1, 'Node')\n ? createRange(\n arg1,\n arg2,\n arg3,\n arg4\n )\n : null;\n\n rangeEx = range\n ? {\n type: SelectionRangeTypes.Normal,\n ranges: [range],\n areAllCollapsed: range.collapsed,\n }\n : null;\n }\n\n if (rangeEx) {\n switch (rangeEx.type) {\n case SelectionRangeTypes.TableSelection:\n if (contains(core.contentDiv, rangeEx.table)) {\n core.domEvent.imageSelectionRange = core.api.selectImage(core, null);\n core.domEvent.tableSelectionRange = core.api.selectTable(\n core,\n rangeEx.table,\n rangeEx.coordinates\n );\n rangeEx = core.domEvent.tableSelectionRange;\n }\n break;\n case SelectionRangeTypes.ImageSelection:\n if (contains(core.contentDiv, rangeEx.image)) {\n core.domEvent.tableSelectionRange = core.api.selectTable(core, null);\n core.domEvent.imageSelectionRange = core.api.selectImage(core, rangeEx.image);\n rangeEx = core.domEvent.imageSelectionRange;\n }\n break;\n case SelectionRangeTypes.Normal:\n core.domEvent.tableSelectionRange = core.api.selectTable(core, null);\n core.domEvent.imageSelectionRange = core.api.selectImage(core, null);\n\n if (contains(core.contentDiv, rangeEx.ranges[0])) {\n core.api.selectRange(core, rangeEx.ranges[0]);\n } else {\n rangeEx = null;\n }\n break;\n }\n\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.SelectionChanged,\n selectionRangeEx: rangeEx,\n },\n true /** broadcast **/\n );\n } else {\n core.domEvent.tableSelectionRange = core.api.selectTable(core, null);\n core.domEvent.imageSelectionRange = core.api.selectImage(core, null);\n }\n\n return !!rangeEx;\n};\n\nfunction isSelectionRangeEx(obj: any): obj is SelectionRangeEx {\n const rangeEx = obj as SelectionRangeEx;\n return (\n rangeEx &&\n typeof rangeEx == 'object' &&\n typeof rangeEx.type == 'number' &&\n Array.isArray(rangeEx.ranges)\n );\n}\n\nfunction isTableSelectionOrNull(obj: any): obj is TableSelection | null {\n const selection = obj as TableSelection | null;\n\n return (\n selection === null ||\n (selection &&\n typeof selection == 'object' &&\n typeof selection.firstCell == 'object' &&\n typeof selection.lastCell == 'object')\n );\n}\n\nfunction isSelectionPath(obj: any): obj is SelectionPath {\n const path = obj as SelectionPath;\n\n return path && typeof path == 'object' && Array.isArray(path.start) && Array.isArray(path.end);\n}\n\nfunction isNodePosition(obj: any): obj is NodePosition {\n const pos = obj as NodePosition;\n\n return (\n pos &&\n typeof pos == 'object' &&\n typeof pos.node == 'object' &&\n typeof pos.offset == 'number'\n );\n}\n","import addUniqueId from './utils/addUniqueId';\nimport {\n createRange,\n Position,\n removeGlobalCssStyle,\n removeImportantStyleRule,\n setGlobalCssStyles,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n ImageSelectionRange,\n PositionType,\n SelectImage,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\nconst IMAGE_ID = 'imageSelected';\nconst CONTENT_DIV_ID = 'contentDiv_';\nconst STYLE_ID = 'imageStyle';\nconst DEFAULT_SELECTION_BORDER_COLOR = '#DB626C';\n\n/**\n * @internal\n * Select a image and save data of the selected range\n * @param image Image to select\n * @returns Selected image information\n */\nexport const selectImage: SelectImage = (core: EditorCore, image: HTMLImageElement | null) => {\n unselect(core);\n\n let selection: ImageSelectionRange | null = null;\n\n if (image) {\n const range = createRange(image);\n\n addUniqueId(image, IMAGE_ID);\n addUniqueId(core.contentDiv, CONTENT_DIV_ID);\n\n core.api.selectRange(core, createRange(new Position(image, PositionType.After)));\n\n select(core, image);\n\n selection = {\n type: SelectionRangeTypes.ImageSelection,\n ranges: [range],\n image: image,\n areAllCollapsed: range.collapsed,\n };\n }\n\n return selection;\n};\n\nconst select = (core: EditorCore, image: HTMLImageElement) => {\n removeImportantStyleRule(image, ['border', 'margin']);\n const borderCSS = buildBorderCSS(core, image.id);\n setGlobalCssStyles(core.contentDiv.ownerDocument, borderCSS, STYLE_ID + core.contentDiv.id);\n};\n\nconst buildBorderCSS = (core: EditorCore, imageId: string): string => {\n const divId = core.contentDiv.id;\n const color = core.imageSelectionBorderColor || DEFAULT_SELECTION_BORDER_COLOR;\n\n return `#${divId} #${imageId} {outline-style: auto!important;outline-color: ${color}!important;caret-color: transparent!important;}`;\n};\n\nconst unselect = (core: EditorCore) => {\n const doc = core.contentDiv.ownerDocument;\n removeGlobalCssStyle(doc, STYLE_ID + core.contentDiv.id);\n};\n","import { EditorCore, SelectRange } from 'roosterjs-editor-types';\nimport { hasFocus } from './hasFocus';\nimport {\n contains,\n getPendableFormatState,\n Position,\n PendableFormatCommandMap,\n addRangeToSelection,\n getObjectKeys,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Change the editor selection to the given range\n * @param core The EditorCore object\n * @param range The range to select\n * @param skipSameRange When set to true, do nothing if the given range is the same with current selection\n * in editor, otherwise it will always remove current selection range and set to the given one.\n * This parameter is always treat as true in Edge to avoid some weird runtime exception.\n */\nexport const selectRange: SelectRange = (\n core: EditorCore,\n range: Range,\n skipSameRange?: boolean\n) => {\n if (!core.lifecycle.shadowEditSelectionPath && contains(core.contentDiv, range)) {\n addRangeToSelection(range, skipSameRange);\n\n if (!hasFocus(core)) {\n core.domEvent.selectionRange = range;\n }\n\n if (range.collapsed) {\n // If selected, and current selection is collapsed,\n // need to restore pending format state if exists.\n restorePendingFormatState(core);\n }\n\n return true;\n } else {\n return false;\n }\n};\n\n/**\n * Restore cached pending format state (if exist) to current selection\n */\nfunction restorePendingFormatState(core: EditorCore) {\n const {\n contentDiv,\n pendingFormatState,\n api: { getSelectionRange },\n } = core;\n\n if (pendingFormatState.pendableFormatState) {\n const document = contentDiv.ownerDocument;\n let formatState = getPendableFormatState(document);\n getObjectKeys(PendableFormatCommandMap).forEach(key => {\n if (!!pendingFormatState.pendableFormatState?.[key] != formatState[key]) {\n document.execCommand(\n PendableFormatCommandMap[key],\n false /* showUI */,\n undefined /* value */\n );\n }\n });\n\n const range = getSelectionRange(core, true /*tryGetFromCache*/);\n let position: Position | null = range && Position.getStart(range);\n if (position) {\n pendingFormatState.pendableFormatPosition = position;\n }\n }\n}\n","import addUniqueId from './utils/addUniqueId';\nimport {\n createRange,\n getTagOfNode,\n isWholeTableSelected,\n Position,\n removeGlobalCssStyle,\n removeImportantStyleRule,\n setGlobalCssStyles,\n toArray,\n VTable,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n SelectionRangeTypes,\n TableSelection,\n SelectTable,\n PositionType,\n Coordinates,\n} from 'roosterjs-editor-types';\n\nconst TABLE_ID = 'tableSelected';\nconst CONTENT_DIV_ID = 'contentDiv_';\nconst STYLE_ID = 'tableStyle';\nconst SELECTED_CSS_RULE =\n '{background-color: rgb(198,198,198) !important; caret-color: transparent}';\nconst MAX_RULE_SELECTOR_LENGTH = 9000;\n\n/**\n * @internal\n * Select a table and save data of the selected range\n * @param core The EditorCore object\n * @param table table to select\n * @param coordinates first and last cell of the selection, if this parameter is null, instead of\n * selecting, will unselect the table.\n * @returns true if successful\n */\nexport const selectTable: SelectTable = (\n core: EditorCore,\n table: HTMLTableElement | null,\n coordinates?: TableSelection\n) => {\n unselect(core);\n\n if (areValidCoordinates(coordinates) && table) {\n addUniqueId(table, TABLE_ID);\n addUniqueId(core.contentDiv, CONTENT_DIV_ID);\n\n const { ranges, isWholeTableSelected } = select(core, table, coordinates);\n if (!isMergedCell(table, coordinates)) {\n const cellToSelect = table.rows\n .item(coordinates.firstCell.y)\n ?.cells.item(coordinates.firstCell.x);\n\n if (cellToSelect) {\n core.api.selectRange(\n core,\n createRange(new Position(cellToSelect, PositionType.Begin))\n );\n }\n }\n\n return {\n type: SelectionRangeTypes.TableSelection,\n ranges,\n table,\n areAllCollapsed: ranges.filter(range => range?.collapsed).length == ranges.length,\n coordinates,\n isWholeTableSelected,\n };\n }\n\n return null;\n};\n\nfunction buildCss(\n table: HTMLTableElement,\n coordinates: TableSelection,\n contentDivSelector: string\n): { cssRules: string[]; ranges: Range[]; isWholeTableSelected: boolean } {\n const ranges: Range[] = [];\n const selectors: string[] = [];\n\n const vTable = new VTable(table);\n const isAllTableSelected = isWholeTableSelected(vTable, coordinates);\n if (isAllTableSelected) {\n handleAllTableSelected(contentDivSelector, vTable, selectors, ranges);\n } else {\n handleTableSelected(coordinates, vTable, contentDivSelector, selectors, ranges);\n }\n\n const cssRules: string[] = [];\n let currentRules: string = '';\n while (selectors.length > 0) {\n currentRules += (currentRules.length > 0 ? ',' : '') + selectors.shift() || '';\n if (\n currentRules.length + (selectors[0]?.length || 0) > MAX_RULE_SELECTOR_LENGTH ||\n selectors.length == 0\n ) {\n cssRules.push(currentRules + ' ' + SELECTED_CSS_RULE);\n currentRules = '';\n }\n }\n\n return { cssRules, ranges, isWholeTableSelected: isAllTableSelected };\n}\n\nfunction handleAllTableSelected(\n contentDivSelector: string,\n vTable: VTable,\n selectors: string[],\n ranges: Range[]\n) {\n const table = vTable.table;\n const tableSelector = contentDivSelector + ' #' + table.id;\n selectors.push(tableSelector, `${tableSelector} *`);\n\n const tableRange = new Range();\n tableRange.selectNode(table);\n ranges.push(tableRange);\n}\n\nfunction handleTableSelected(\n coordinates: TableSelection,\n vTable: VTable,\n contentDivSelector: string,\n selectors: string[],\n ranges: Range[]\n) {\n const tr1 = coordinates.firstCell.y;\n const td1 = coordinates.firstCell.x;\n const tr2 = coordinates.lastCell.y;\n const td2 = coordinates.lastCell.x;\n const table = vTable.table;\n\n let firstSelected: HTMLTableCellElement | null = null;\n let lastSelected: HTMLTableCellElement | null = null;\n // Get whether table has thead, tbody or tfoot.\n const tableChildren = toArray(table.childNodes).filter(\n node => ['THEAD', 'TBODY', 'TFOOT'].indexOf(getTagOfNode(node)) > -1\n );\n // Set the start and end of each of the table children, so we can build the selector according the element between the table and the row.\n let cont = 0;\n const indexes = tableChildren.map(node => {\n const result = {\n el: getTagOfNode(node),\n start: cont,\n end: node.childNodes.length + cont,\n };\n\n cont = result.end;\n return result;\n });\n\n vTable.cells?.forEach((row, rowIndex) => {\n let tdCount = 0;\n firstSelected = null;\n lastSelected = null;\n\n //Get current TBODY/THEAD/TFOOT\n const midElement = indexes.filter(ind => ind.start <= rowIndex && ind.end > rowIndex)[0];\n\n const middleElSelector = midElement ? '>' + midElement.el + '>' : '>';\n const currentRow =\n midElement && rowIndex + 1 >= midElement.start\n ? rowIndex + 1 - midElement.start\n : rowIndex + 1;\n\n for (let cellIndex = 0; cellIndex < row.length; cellIndex++) {\n const cell = row[cellIndex].td;\n if (cell) {\n tdCount++;\n if (rowIndex >= tr1 && rowIndex <= tr2 && cellIndex >= td1 && cellIndex <= td2) {\n removeImportant(cell);\n\n const selector = generateCssFromCell(\n contentDivSelector,\n table.id,\n middleElSelector,\n currentRow,\n getTagOfNode(cell),\n tdCount\n );\n const elementsSelector = selector + ' *';\n\n selectors.push(selector, elementsSelector);\n firstSelected = firstSelected || table.querySelector(selector);\n lastSelected = table.querySelector(selector);\n }\n }\n }\n\n if (firstSelected && lastSelected) {\n const rowRange = new Range();\n rowRange.setStartBefore(firstSelected);\n rowRange.setEndAfter(lastSelected);\n ranges.push(rowRange);\n }\n });\n}\n\nfunction select(\n core: EditorCore,\n table: HTMLTableElement,\n coordinates: TableSelection\n): { ranges: Range[]; isWholeTableSelected: boolean } {\n const contentDivSelector = '#' + core.contentDiv.id;\n let { cssRules, ranges, isWholeTableSelected } = buildCss(\n table,\n coordinates,\n contentDivSelector\n );\n cssRules.forEach(css =>\n setGlobalCssStyles(core.contentDiv.ownerDocument, css, STYLE_ID + core.contentDiv.id)\n );\n\n return { ranges, isWholeTableSelected };\n}\n\nconst unselect = (core: EditorCore) => {\n const doc = core.contentDiv.ownerDocument;\n removeGlobalCssStyle(doc, STYLE_ID + core.contentDiv.id);\n};\n\nfunction generateCssFromCell(\n contentDivSelector: string,\n tableId: string,\n middleElSelector: string,\n rowIndex: number,\n cellTag: string,\n index: number\n): string {\n return (\n contentDivSelector +\n ' #' +\n tableId +\n middleElSelector +\n ' tr:nth-child(' +\n rowIndex +\n ')>' +\n cellTag +\n ':nth-child(' +\n index +\n ')'\n );\n}\n\nfunction removeImportant(cell: HTMLTableCellElement) {\n if (cell) {\n removeImportantStyleRule(cell, ['background-color', 'background']);\n }\n}\n\nfunction areValidCoordinates(input?: TableSelection): input is TableSelection {\n if (input) {\n const { firstCell, lastCell } = input || {};\n if (firstCell && lastCell) {\n const handler = (coordinate: Coordinates) =>\n isValidCoordinate(coordinate.x) && isValidCoordinate(coordinate.y);\n return handler(firstCell) && handler(lastCell);\n }\n }\n\n return false;\n}\n\nfunction isValidCoordinate(input: number): boolean {\n return (!!input || input == 0) && input > -1;\n}\n\nfunction isMergedCell(table: HTMLTableElement, coordinates: TableSelection): boolean {\n const { firstCell } = coordinates;\n return !(table.rows.item(firstCell.y) && table.rows.item(firstCell.y)?.cells.item(firstCell.x));\n}\n","import {\n createRange,\n extractContentMetadata,\n queryElements,\n restoreContentWithEntityPlaceholder,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ColorTransformDirection,\n ContentMetadata,\n EditorCore,\n PluginEventType,\n SelectionRangeTypes,\n SetContent,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Set HTML content to this editor. All existing content will be replaced. A ContentChanged event will be triggered\n * if triggerContentChangedEvent is set to true\n * @param core The EditorCore object\n * @param content HTML content to set in\n * @param triggerContentChangedEvent True to trigger a ContentChanged event. Default value is true\n * @param metadata @optional Metadata of the content that helps editor know the selection and color mode.\n * If not passed, we will treat content as in light mode without selection\n */\nexport const setContent: SetContent = (\n core: EditorCore,\n content: string,\n triggerContentChangedEvent: boolean,\n metadata?: ContentMetadata\n) => {\n let contentChanged = false;\n if (core.contentDiv.innerHTML != content) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.BeforeSetContent,\n newContent: content,\n },\n true /*broadcast*/\n );\n\n const entities = core.entity.entityMap;\n const html = content || '';\n const body = new DOMParser().parseFromString(\n core.trustedHTMLHandler?.(html) ?? html,\n 'text/html'\n ).body;\n\n restoreContentWithEntityPlaceholder(body, core.contentDiv, entities);\n\n const metadataFromContent = extractContentMetadata(core.contentDiv);\n metadata = metadata || metadataFromContent;\n selectContentMetadata(core, metadata);\n contentChanged = true;\n }\n\n const isDarkMode = core.lifecycle.isDarkMode;\n\n if ((!metadata && isDarkMode) || (metadata && !!metadata.isDarkMode != !!isDarkMode)) {\n core.api.transformColor(\n core,\n core.contentDiv,\n false /*includeSelf*/,\n null /*callback*/,\n isDarkMode ? ColorTransformDirection.LightToDark : ColorTransformDirection.DarkToLight,\n true /*forceTransform*/,\n metadata?.isDarkMode\n );\n contentChanged = true;\n }\n\n if (triggerContentChangedEvent && contentChanged) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.ContentChanged,\n source: ChangeSource.SetContent,\n },\n false /*broadcast*/\n );\n }\n};\n\nfunction selectContentMetadata(core: EditorCore, metadata: ContentMetadata | undefined) {\n if (!core.lifecycle.shadowEditSelectionPath && metadata) {\n core.domEvent.tableSelectionRange = null;\n core.domEvent.imageSelectionRange = null;\n core.domEvent.selectionRange = null;\n\n switch (metadata.type) {\n case SelectionRangeTypes.Normal:\n core.api.selectTable(core, null);\n core.api.selectImage(core, null);\n\n const range = createRange(core.contentDiv, metadata.start, metadata.end);\n core.api.selectRange(core, range);\n break;\n case SelectionRangeTypes.TableSelection:\n const table = queryElements(\n core.contentDiv,\n '#' + metadata.tableId\n )[0] as HTMLTableElement;\n\n if (table) {\n core.domEvent.tableSelectionRange = core.api.selectTable(core, table, metadata);\n }\n break;\n case SelectionRangeTypes.ImageSelection:\n const image = queryElements(\n core.contentDiv,\n '#' + metadata.imageId\n )[0] as HTMLImageElement;\n\n if (image) {\n core.domEvent.imageSelectionRange = core.api.selectImage(core, image);\n }\n break;\n }\n }\n}\n","import {\n createRange,\n getSelectionPath,\n moveContentWithEntityPlaceholders,\n restoreContentWithEntityPlaceholder,\n} from 'roosterjs-editor-dom';\nimport {\n EditorCore,\n PluginEventType,\n SelectionRangeEx,\n SelectionRangeTypes,\n SwitchShadowEdit,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport const switchShadowEdit: SwitchShadowEdit = (core: EditorCore, isOn: boolean): void => {\n const { lifecycle, contentDiv } = core;\n let {\n shadowEditEntities,\n shadowEditFragment,\n shadowEditSelectionPath,\n shadowEditTableSelectionPath,\n shadowEditImageSelectionPath,\n } = lifecycle;\n const wasInShadowEdit = !!shadowEditFragment;\n\n const getShadowEditSelectionPath = (\n selectionType: SelectionRangeTypes,\n shadowEditSelection?: SelectionRangeEx\n ) => {\n return (\n (shadowEditSelection?.type == selectionType &&\n shadowEditSelection.ranges\n .map(range => getSelectionPath(contentDiv, range))\n .map(w => w!!)) ||\n null\n );\n };\n\n if (isOn) {\n if (!wasInShadowEdit) {\n const selection = core.api.getSelectionRangeEx(core);\n const range = core.api.getSelectionRange(core, true /*tryGetFromCache*/);\n\n shadowEditSelectionPath = range && getSelectionPath(contentDiv, range);\n shadowEditTableSelectionPath = getShadowEditSelectionPath(\n SelectionRangeTypes.TableSelection,\n selection\n );\n shadowEditImageSelectionPath = getShadowEditSelectionPath(\n SelectionRangeTypes.ImageSelection,\n selection\n );\n\n shadowEditEntities = {};\n shadowEditFragment = moveContentWithEntityPlaceholders(contentDiv, shadowEditEntities);\n\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.EnteredShadowEdit,\n fragment: shadowEditFragment,\n selectionPath: shadowEditSelectionPath,\n },\n false /*broadcast*/\n );\n\n lifecycle.shadowEditFragment = shadowEditFragment;\n lifecycle.shadowEditSelectionPath = shadowEditSelectionPath;\n lifecycle.shadowEditTableSelectionPath = shadowEditTableSelectionPath;\n lifecycle.shadowEditImageSelectionPath = shadowEditImageSelectionPath;\n lifecycle.shadowEditEntities = shadowEditEntities;\n }\n\n if (lifecycle.shadowEditFragment) {\n restoreContentWithEntityPlaceholder(\n lifecycle.shadowEditFragment,\n contentDiv,\n lifecycle.shadowEditEntities,\n true /*insertClonedNode*/\n );\n }\n } else {\n lifecycle.shadowEditFragment = null;\n lifecycle.shadowEditSelectionPath = null;\n lifecycle.shadowEditEntities = null;\n\n if (wasInShadowEdit) {\n core.api.triggerEvent(\n core,\n {\n eventType: PluginEventType.LeavingShadowEdit,\n },\n false /*broadcast*/\n );\n\n if (shadowEditFragment) {\n restoreContentWithEntityPlaceholder(\n shadowEditFragment,\n contentDiv,\n shadowEditEntities\n );\n }\n core.api.focus(core);\n\n if (shadowEditSelectionPath) {\n core.api.selectRange(\n core,\n createRange(\n contentDiv,\n shadowEditSelectionPath.start,\n shadowEditSelectionPath.end\n )\n );\n }\n\n if (core.domEvent.imageSelectionRange) {\n const { image } = core.domEvent.imageSelectionRange;\n const imageElement = core.contentDiv.querySelector('#' + image.id);\n if (imageElement) {\n core.api.selectImage(core, image);\n }\n }\n\n if (core.domEvent.tableSelectionRange) {\n const { table, coordinates } = core.domEvent.tableSelectionRange;\n const tableId = table.id;\n const tableElement = core.contentDiv.querySelector('#' + tableId);\n if (table) {\n core.domEvent.tableSelectionRange = core.api.selectTable(\n core,\n tableElement as HTMLTableElement,\n coordinates\n );\n }\n }\n }\n }\n};\n","import { ColorTransformDirection, EditorCore, TransformColor } from 'roosterjs-editor-types';\nimport type { CompatibleColorTransformDirection } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Edit and transform color of elements between light mode and dark mode\n * @param core The EditorCore object\n * @param rootNode The root HTML elements to transform\n * @param includeSelf True to transform the root node as well, otherwise false\n * @param callback The callback function to invoke before do color transformation\n * @param direction To specify the transform direction, light to dark, or dark to light\n * @param forceTransform By default this function will only work when editor core is in dark mode.\n * Pass true to this value to force do color transformation even editor core is in light mode\n */\nexport const transformColor: TransformColor = (\n core: EditorCore,\n rootNode: Node | null,\n includeSelf: boolean,\n callback: (() => void) | null,\n direction: ColorTransformDirection | CompatibleColorTransformDirection,\n forceTransform?: boolean,\n fromDarkMode: boolean = false\n) => {\n const {\n darkColorHandler,\n lifecycle: { onExternalContentTransform },\n } = core;\n const toDarkMode = direction == ColorTransformDirection.LightToDark;\n if (rootNode && (forceTransform || core.lifecycle.isDarkMode)) {\n const transformer = onExternalContentTransform\n ? (element: HTMLElement) => {\n onExternalContentTransform(element, fromDarkMode, toDarkMode, darkColorHandler);\n }\n : (element: HTMLElement) => {\n darkColorHandler.transformElementColor(element, fromDarkMode, toDarkMode);\n };\n\n iterateElements(rootNode, transformer, includeSelf);\n }\n\n callback?.();\n};\n\nfunction iterateElements(\n root: Node,\n transformer: (element: HTMLElement) => void,\n includeSelf?: boolean\n) {\n if (includeSelf && isHTMLElement(root)) {\n transformer(root);\n }\n\n for (let child = root.firstChild; child; child = child.nextSibling) {\n if (isHTMLElement(child)) {\n transformer(child);\n }\n\n iterateElements(child, transformer);\n }\n}\n\n// This is not a strict check, we just need to make sure this element has style so that we can set style to it\n// We don't use safeInstanceOf() here since this function will be called very frequently when extract html content\n// in dark mode, so we need to make sure this check is fast enough\nfunction isHTMLElement(node: Node): node is HTMLElement {\n const htmlElement = node;\n return node.nodeType == Node.ELEMENT_NODE && !!htmlElement.style;\n}\n","import {\n EditorCore,\n EditorPlugin,\n PluginEvent,\n PluginEventType,\n TriggerEvent,\n} from 'roosterjs-editor-types';\nimport type { CompatiblePluginEventType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst allowedEventsInShadowEdit: (PluginEventType | CompatiblePluginEventType)[] = [\n PluginEventType.EditorReady,\n PluginEventType.BeforeDispose,\n PluginEventType.ExtractContentWithDom,\n PluginEventType.ZoomChanged,\n];\n\n/**\n * @internal\n * Trigger a plugin event\n * @param core The EditorCore object\n * @param pluginEvent The event object to trigger\n * @param broadcast Set to true to skip the shouldHandleEventExclusively check\n */\nexport const triggerEvent: TriggerEvent = (\n core: EditorCore,\n pluginEvent: PluginEvent,\n broadcast: boolean\n) => {\n if (\n (!core.lifecycle.shadowEditFragment ||\n allowedEventsInShadowEdit.indexOf(pluginEvent.eventType) >= 0) &&\n (broadcast || !core.plugins.some(plugin => handledExclusively(pluginEvent, plugin)))\n ) {\n core.plugins.forEach(plugin => {\n if (plugin.onPluginEvent) {\n plugin.onPluginEvent(pluginEvent);\n }\n });\n }\n};\n\nfunction handledExclusively(event: PluginEvent, plugin: EditorPlugin): boolean {\n if (plugin.onPluginEvent && plugin.willHandleEventExclusively?.(event)) {\n plugin.onPluginEvent(event);\n return true;\n }\n\n return false;\n}\n","/**\n * Add an unique id to element and ensure that is unique\n * @param el The HTMLElement that will receive the id\n * @param idPrefix The prefix that will antecede the id (Ex: tableSelected01)\n */\nexport default function addUniqueId(el: HTMLElement, idPrefix: string) {\n const doc = el.ownerDocument;\n if (!el.id) {\n applyId(el, idPrefix, doc);\n } else {\n const elements = doc.querySelectorAll(`#${el.id}`);\n if (elements.length > 1) {\n el.removeAttribute('id');\n applyId(el, idPrefix, doc);\n }\n }\n}\n\nfunction applyId(el: HTMLElement, idPrefix: string, doc: Document) {\n let cont = 0;\n const getElement = () => doc.getElementById(idPrefix + cont);\n //Ensure that there are no elements with the same ID\n let element = getElement();\n while (element) {\n cont++;\n element = getElement();\n }\n\n el.id = idPrefix + cont;\n}\n","import { forEachSelectedCell } from './utils/forEachSelectedCell';\nimport { removeCellsOutsideSelection } from './utils/removeCellsOutsideSelection';\nimport {\n addRangeToSelection,\n createElement,\n extractClipboardEvent,\n moveChildNodes,\n Browser,\n setHtmlWithMetadata,\n createRange,\n VTable,\n isWholeTableSelected,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n CopyPastePluginState,\n EditorOptions,\n GetContentMode,\n IEditor,\n PluginEventType,\n PluginWithState,\n KnownCreateElementDataIndex,\n SelectionRangeEx,\n SelectionRangeTypes,\n TableSelection,\n TableOperation,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Copy and paste plugin for handling onCopy and onPaste event\n */\nexport default class CopyPastePlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n private state: CopyPastePluginState;\n\n /**\n * Construct a new instance of CopyPastePlugin\n * @param options The editor options\n */\n constructor(options: EditorOptions) {\n this.state = {\n allowedCustomPasteType: options.allowedCustomPasteType || [],\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'CopyPaste';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler({\n paste: e => this.onPaste(e),\n copy: e => this.onCutCopy(e, false /*isCut*/),\n cut: e => this.onCutCopy(e, true /*isCut*/),\n });\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n if (this.disposer) {\n this.disposer();\n }\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n private onCutCopy(event: Event, isCut: boolean) {\n if (this.editor) {\n const selection = this.editor.getSelectionRangeEx();\n if (selection && !selection.areAllCollapsed) {\n const html = this.editor.getContent(GetContentMode.RawHTMLWithSelection);\n const tempDiv = this.getTempDiv(this.editor, true /*forceInLightMode*/);\n const metadata = setHtmlWithMetadata(\n tempDiv,\n html,\n this.editor.getTrustedHTMLHandler()\n );\n let newRange: Range | null = null;\n\n if (\n selection.type === SelectionRangeTypes.TableSelection &&\n selection.coordinates\n ) {\n const table = tempDiv.querySelector(\n `#${selection.table.id}`\n ) as HTMLTableElement;\n newRange = this.createTableRange(table, selection.coordinates);\n if (isCut) {\n this.deleteTableContent(\n this.editor,\n selection.table,\n selection.coordinates\n );\n }\n } else if (selection.type === SelectionRangeTypes.ImageSelection) {\n const image = tempDiv.querySelector('#' + selection.image.id);\n\n if (image) {\n newRange = createRange(image);\n if (isCut) {\n this.deleteImage(this.editor, selection.image.id);\n }\n }\n } else {\n newRange =\n metadata?.type === SelectionRangeTypes.Normal\n ? createRange(tempDiv, metadata.start, metadata.end)\n : null;\n }\n if (newRange) {\n const cutCopyEvent = this.editor.triggerPluginEvent(\n PluginEventType.BeforeCutCopy,\n {\n clonedRoot: tempDiv,\n range: newRange,\n rawEvent: event as ClipboardEvent,\n isCut,\n }\n );\n\n if (cutCopyEvent.range) {\n addRangeToSelection(newRange);\n }\n\n this.editor.runAsync(editor => {\n this.cleanUpAndRestoreSelection(tempDiv, selection, !isCut /* isCopy */);\n\n if (isCut) {\n editor.addUndoSnapshot(() => {\n const position = editor.deleteSelectedContent();\n editor.focus();\n editor.select(position);\n }, ChangeSource.Cut);\n }\n });\n }\n }\n }\n }\n\n private onPaste = (event: Event) => {\n let range: Range | null = null;\n if (this.editor) {\n const editor = this.editor;\n extractClipboardEvent(\n event as ClipboardEvent,\n clipboardData => {\n if (editor && !editor.isDisposed()) {\n editor.paste(clipboardData);\n }\n },\n {\n allowedCustomPasteType: this.state.allowedCustomPasteType,\n getTempDiv: () => {\n range = editor.getSelectionRange() ?? null;\n return this.getTempDiv(editor);\n },\n removeTempDiv: div => {\n if (range) {\n this.cleanUpAndRestoreSelection(div, range, false /* isCopy */);\n }\n },\n },\n this.editor.getSelectionRange() ?? undefined\n );\n }\n };\n\n private getTempDiv(editor: IEditor, forceInLightMode?: boolean) {\n const div = editor.getCustomData(\n 'CopyPasteTempDiv',\n () => {\n const tempDiv = createElement(\n KnownCreateElementDataIndex.CopyPasteTempDiv,\n editor.getDocument()\n ) as HTMLDivElement;\n\n editor.getDocument().body.appendChild(tempDiv);\n\n return tempDiv;\n },\n tempDiv => tempDiv.parentNode?.removeChild(tempDiv)\n );\n\n if (forceInLightMode) {\n div.style.backgroundColor = 'white';\n div.style.color = 'black';\n }\n\n div.style.display = '';\n div.focus();\n\n return div;\n }\n\n private cleanUpAndRestoreSelection(\n tempDiv: HTMLDivElement,\n range: Range | SelectionRangeEx,\n isCopy: boolean\n ) {\n if (!!(range)?.type || (range).type == 0) {\n const selection = range;\n switch (selection.type) {\n case SelectionRangeTypes.TableSelection:\n case SelectionRangeTypes.ImageSelection:\n this.editor?.select(selection);\n break;\n case SelectionRangeTypes.Normal:\n const range = selection.ranges?.[0];\n this.restoreRange(range, isCopy);\n break;\n }\n } else {\n this.restoreRange(range, isCopy);\n }\n\n tempDiv.style.backgroundColor = '';\n tempDiv.style.color = '';\n tempDiv.style.display = 'none';\n moveChildNodes(tempDiv);\n }\n\n private restoreRange(range: Range, isCopy: boolean) {\n if (range && this.editor) {\n if (isCopy && Browser.isAndroid) {\n range.collapse();\n }\n this.editor.select(range);\n }\n }\n\n private createTableRange(table: HTMLTableElement, selection: TableSelection) {\n const clonedVTable = new VTable(table as HTMLTableElement);\n clonedVTable.selection = selection;\n removeCellsOutsideSelection(clonedVTable);\n clonedVTable.writeBack();\n return createRange(clonedVTable.table);\n }\n\n private deleteTableContent(\n editor: IEditor,\n table: HTMLTableElement,\n selection: TableSelection\n ) {\n const selectedVTable = new VTable(table);\n selectedVTable.selection = selection;\n\n forEachSelectedCell(selectedVTable, cell => {\n if (cell?.td) {\n cell.td.innerHTML = editor.getTrustedHTMLHandler()('
                ');\n }\n });\n\n const wholeTableSelected = isWholeTableSelected(selectedVTable, selection);\n const isWholeColumnSelected =\n table.rows.length - 1 === selection.lastCell.y && selection.firstCell.y === 0;\n if (wholeTableSelected) {\n selectedVTable.edit(TableOperation.DeleteTable);\n selectedVTable.writeBack();\n } else if (isWholeColumnSelected) {\n selectedVTable.edit(TableOperation.DeleteColumn);\n selectedVTable.writeBack();\n }\n if (wholeTableSelected || isWholeColumnSelected) {\n table.style.removeProperty('width');\n table.style.removeProperty('height');\n }\n }\n\n private deleteImage(editor: IEditor, imageId: string) {\n editor.queryElements('#' + imageId, node => {\n editor.deleteNode(node);\n });\n }\n}\n","import { arrayPush, Browser, isCharacterValue } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ContextMenuProvider,\n DOMEventHandler,\n DOMEventPluginState,\n EditorOptions,\n EditorPlugin,\n IEditor,\n Keys,\n PluginEventType,\n PluginWithState,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * DOMEventPlugin handles customized DOM events, including:\n * 1. Keyboard event\n * 2. Mouse event\n * 3. IME state\n * 4. Drop event\n * 5. Focus and blur event\n * 6. Input event\n * 7. Scroll event\n * It contains special handling for Safari since Safari cannot get correct selection when onBlur event is triggered in editor.\n */\nexport default class DOMEventPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n private state: DOMEventPluginState;\n\n /**\n * Construct a new instance of DOMEventPlugin\n * @param options The editor options\n * @param contentDiv The editor content DIV\n */\n constructor(options: EditorOptions, contentDiv: HTMLDivElement) {\n this.state = {\n isInIME: false,\n scrollContainer: options.scrollContainer || contentDiv,\n selectionRange: null,\n stopPrintableKeyboardEventPropagation: !options.allowKeyboardEventPropagation,\n contextMenuProviders:\n options.plugins?.filter>(isContextMenuProvider) || [],\n tableSelectionRange: null,\n imageSelectionRange: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'DOMEvent';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n\n const document = this.editor.getDocument();\n //Record\n const eventHandlers: Partial<\n { [P in keyof HTMLElementEventMap]: DOMEventHandler }\n > = {\n // 1. Keyboard event\n keypress: this.getEventHandler(PluginEventType.KeyPress),\n keydown: this.getEventHandler(PluginEventType.KeyDown),\n keyup: this.getEventHandler(PluginEventType.KeyUp),\n\n // 2. Mouse event\n mousedown: PluginEventType.MouseDown,\n contextmenu: this.onContextMenuEvent,\n\n // 3. IME state management\n compositionstart: () => (this.state.isInIME = true),\n compositionend: (rawEvent: CompositionEvent) => {\n this.state.isInIME = false;\n editor.triggerPluginEvent(PluginEventType.CompositionEnd, {\n rawEvent,\n });\n },\n\n // 4. Drop event\n drop: this.onDrop,\n\n // 5. Focus management\n focus: this.onFocus,\n\n // 6. Input event\n [Browser.isIE ? 'textinput' : 'input']: this.getEventHandler(PluginEventType.Input),\n };\n\n // 7. onBlur handlers\n if (Browser.isSafari) {\n document.addEventListener('mousedown', this.onMouseDownDocument, true /*useCapture*/);\n document.addEventListener('keydown', this.onKeyDownDocument);\n document.defaultView?.addEventListener('blur', this.cacheSelection);\n } else if (Browser.isIEOrEdge) {\n type EventHandlersIE = {\n beforedeactivate: DOMEventHandler;\n };\n (eventHandlers as EventHandlersIE).beforedeactivate = this.cacheSelection;\n } else {\n eventHandlers.blur = this.cacheSelection;\n }\n\n this.disposer = editor.addDomEventHandler(>eventHandlers);\n\n // 8. Scroll event\n this.state.scrollContainer.addEventListener('scroll', this.onScroll);\n document.defaultView?.addEventListener('scroll', this.onScroll);\n document.defaultView?.addEventListener('resize', this.onScroll);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n const document = this.editor?.getDocument();\n if (document && Browser.isSafari) {\n document.removeEventListener(\n 'mousedown',\n this.onMouseDownDocument,\n true /*useCapture*/\n );\n document.removeEventListener('keydown', this.onKeyDownDocument);\n document.defaultView?.removeEventListener('blur', this.cacheSelection);\n }\n\n document?.defaultView?.removeEventListener('resize', this.onScroll);\n document?.defaultView?.removeEventListener('scroll', this.onScroll);\n this.state.scrollContainer.removeEventListener('scroll', this.onScroll);\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n private onDrop = () => {\n this.editor?.runAsync(editor => {\n editor.addUndoSnapshot(() => {}, ChangeSource.Drop);\n });\n };\n\n private onFocus = () => {\n const { table, coordinates } = this.state.tableSelectionRange || {};\n const { image } = this.state.imageSelectionRange || {};\n\n if (table && coordinates) {\n this.editor?.select(table, coordinates);\n } else if (image) {\n this.editor?.select(image);\n } else if (this.state.selectionRange) {\n this.editor?.select(this.state.selectionRange);\n }\n\n this.state.selectionRange = null;\n };\n private onKeyDownDocument = (event: KeyboardEvent) => {\n if (event.which == Keys.TAB && !event.defaultPrevented) {\n this.cacheSelection();\n }\n };\n\n private onMouseDownDocument = (event: MouseEvent) => {\n if (\n this.editor &&\n !this.state.selectionRange &&\n !this.editor.contains(event.target as Node)\n ) {\n this.cacheSelection();\n }\n };\n\n private cacheSelection = () => {\n if (!this.state.selectionRange && this.editor) {\n this.state.selectionRange = this.editor.getSelectionRange(false /*tryGetFromCache*/);\n }\n };\n private onScroll = (e: Event) => {\n this.editor?.triggerPluginEvent(PluginEventType.Scroll, {\n rawEvent: e,\n scrollContainer: this.state.scrollContainer,\n });\n };\n\n private getEventHandler(eventType: PluginEventType): DOMEventHandler {\n const beforeDispatch = (event: Event) =>\n eventType == PluginEventType.Input\n ? this.onInputEvent(event)\n : this.onKeyboardEvent(event);\n\n return this.state.stopPrintableKeyboardEventPropagation\n ? {\n pluginEventType: eventType,\n beforeDispatch,\n }\n : eventType;\n }\n\n private onKeyboardEvent = (event: KeyboardEvent) => {\n if (isCharacterValue(event) || (event.which >= Keys.PAGEUP && event.which <= Keys.DOWN)) {\n // Stop propagation for Character keys and Up/Down/Left/Right/Home/End/PageUp/PageDown\n // since editor already handles these keys and no need to propagate to parents\n event.stopPropagation();\n }\n };\n\n private onInputEvent = (event: InputEvent) => {\n event.stopPropagation();\n };\n\n private onContextMenuEvent = (event: MouseEvent) => {\n const allItems: any[] = [];\n const searcher = this.editor?.getContentSearcherOfCursor();\n const elementBeforeCursor = searcher?.getInlineElementBefore();\n\n let eventTargetNode = event.target as Node;\n if (event.button != 2 && elementBeforeCursor) {\n eventTargetNode = elementBeforeCursor.getContainerNode();\n }\n this.state.contextMenuProviders.forEach(provider => {\n const items = provider.getContextMenuItems(eventTargetNode) ?? [];\n if (items?.length > 0) {\n if (allItems.length > 0) {\n allItems.push(null);\n }\n arrayPush(allItems, items);\n }\n });\n this.editor?.triggerPluginEvent(PluginEventType.ContextMenu, {\n rawEvent: event,\n items: allItems,\n });\n };\n}\n\nfunction isContextMenuProvider(source: EditorPlugin): source is ContextMenuProvider {\n return !!(>source)?.getContextMenuItems;\n}\n","import { isCtrlOrMetaPressed } from 'roosterjs-editor-dom';\nimport {\n EditPluginState,\n GenericContentEditFeature,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n PluginWithState,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Edit Component helps handle Content edit features\n */\nexport default class EditPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private state: EditPluginState;\n\n /**\n * Construct a new instance of EditPlugin\n * @param options The editor options\n */\n constructor() {\n this.state = {\n features: {},\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Edit';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n let hasFunctionKey = false;\n let features: GenericContentEditFeature[] | null = null;\n let ctrlOrMeta = false;\n\n if (event.eventType == PluginEventType.KeyDown) {\n const rawEvent = event.rawEvent;\n const range = this.editor?.getSelectionRange();\n\n ctrlOrMeta = isCtrlOrMetaPressed(rawEvent);\n hasFunctionKey = ctrlOrMeta || rawEvent.altKey;\n features =\n this.state.features[rawEvent.which] ||\n (range && !range.collapsed && this.state.features[Keys.RANGE]);\n } else if (event.eventType == PluginEventType.ContentChanged) {\n features = this.state.features[Keys.CONTENTCHANGED];\n }\n\n for (let i = 0; features && i < features?.length; i++) {\n const feature = features[i];\n if (\n (feature.allowFunctionKeys || !hasFunctionKey) &&\n this.editor &&\n feature.shouldHandleEvent(event, this.editor, ctrlOrMeta)\n ) {\n feature.handleEvent(event, this.editor);\n break;\n }\n }\n }\n}\n","import {\n inlineEntityOnPluginEvent,\n normalizeDelimitersInEditor,\n} from './utils/inlineEntityOnPluginEvent';\nimport {\n Browser,\n commitEntity,\n getEntityFromElement,\n getEntitySelector,\n isCharacterValue,\n toArray,\n arrayPush,\n createElement,\n addRangeToSelection,\n createRange,\n isBlockElement,\n getObjectKeys,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n ContentChangedEvent,\n ContentPosition,\n Entity,\n EntityClasses,\n EntityOperation,\n EntityOperationEvent,\n EntityPluginState,\n KnownEntityItem,\n ExperimentalFeatures,\n HtmlSanitizerOptions,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n PluginMouseUpEvent,\n PluginWithState,\n QueryScope,\n} from 'roosterjs-editor-types';\nimport type { CompatibleEntityOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst ENTITY_ID_REGEX = /_(\\d{1,8})$/;\n\nconst ENTITY_CSS_REGEX = '^' + EntityClasses.ENTITY_INFO_NAME + '$';\nconst ENTITY_ID_CSS_REGEX = '^' + EntityClasses.ENTITY_ID_PREFIX;\nconst ENTITY_TYPE_CSS_REGEX = '^' + EntityClasses.ENTITY_TYPE_PREFIX;\nconst ENTITY_READONLY_CSS_REGEX = '^' + EntityClasses.ENTITY_READONLY_PREFIX;\nconst ALLOWED_CSS_CLASSES = [\n ENTITY_CSS_REGEX,\n ENTITY_ID_CSS_REGEX,\n ENTITY_TYPE_CSS_REGEX,\n ENTITY_READONLY_CSS_REGEX,\n];\nconst REMOVE_ENTITY_OPERATIONS: (EntityOperation | CompatibleEntityOperation)[] = [\n EntityOperation.Overwrite,\n EntityOperation.PartialOverwrite,\n EntityOperation.RemoveFromStart,\n EntityOperation.RemoveFromEnd,\n];\n\n/**\n * @internal\n * Entity Plugin helps handle all operations related to an entity and generate entity specified events\n */\nexport default class EntityPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private state: EntityPluginState;\n private disposer: (() => void) | null = null;\n\n /**\n * Construct a new instance of EntityPlugin\n */\n constructor() {\n this.state = {\n entityMap: {},\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Entity';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler('dragstart', this.onDragStart);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n this.state.entityMap = {};\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.MouseUp:\n this.handleMouseUpEvent(event);\n break;\n case PluginEventType.KeyDown:\n this.handleKeyDownEvent(event.rawEvent);\n break;\n case PluginEventType.BeforeCutCopy:\n if (event.isCut) {\n this.handleCutEvent(event.rawEvent);\n }\n break;\n case PluginEventType.BeforePaste:\n this.handleBeforePasteEvent(event.sanitizingOption);\n break;\n case PluginEventType.ContentChanged:\n this.handleContentChangedEvent(event);\n break;\n case PluginEventType.EditorReady:\n this.handleContentChangedEvent();\n break;\n case PluginEventType.ExtractContentWithDom:\n this.handleExtractContentWithDomEvent(event.clonedRoot);\n break;\n case PluginEventType.ContextMenu:\n this.handleContextMenuEvent(event.rawEvent);\n break;\n case PluginEventType.EntityOperation:\n this.handleEntityOperationEvent(event);\n break;\n }\n\n if (this.editor?.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)) {\n inlineEntityOnPluginEvent(event, this.editor);\n }\n }\n\n private handleContextMenuEvent(event: UIEvent) {\n const node = event.target as Node;\n const entityElement = node && this.editor?.getElementAtCursor(getEntitySelector(), node);\n\n if (entityElement) {\n event.preventDefault();\n this.triggerEvent(entityElement, EntityOperation.ContextMenu, event);\n }\n }\n\n private handleCutEvent = (event: ClipboardEvent) => {\n const range = this.editor?.getSelectionRange();\n if (range && !range.collapsed) {\n this.checkRemoveEntityForRange(event);\n }\n };\n\n private handleMouseUpEvent(event: PluginMouseUpEvent) {\n const { rawEvent, isClicking } = event;\n const node = rawEvent.target as Node;\n let entityElement: HTMLElement | null;\n\n if (\n this.editor &&\n isClicking &&\n node &&\n !!(entityElement = this.editor.getElementAtCursor(getEntitySelector(), node))\n ) {\n this.triggerEvent(entityElement, EntityOperation.Click, rawEvent);\n\n workaroundSelectionIssueForIE(this.editor);\n }\n }\n\n private handleKeyDownEvent(event: KeyboardEvent) {\n if (\n isCharacterValue(event) ||\n event.which == Keys.BACKSPACE ||\n event.which == Keys.DELETE ||\n event.which == Keys.ENTER\n ) {\n const range = this.editor?.getSelectionRange();\n if (range && !range.collapsed) {\n this.checkRemoveEntityForRange(event);\n }\n }\n }\n\n private handleBeforePasteEvent(sanitizingOption: HtmlSanitizerOptions) {\n const range = this.editor?.getSelectionRange();\n\n if (range && !range.collapsed) {\n this.checkRemoveEntityForRange(null! /*rawEvent*/);\n }\n\n if (sanitizingOption.additionalAllowedCssClasses) {\n arrayPush(sanitizingOption.additionalAllowedCssClasses, ALLOWED_CSS_CLASSES);\n }\n }\n\n private handleContentChangedEvent(event?: ContentChangedEvent) {\n let shouldNormalizeDelimiters: boolean = false;\n // 1. find removed entities\n getObjectKeys(this.state.entityMap).forEach(id => {\n const item = this.state.entityMap[id];\n const element = item.element;\n\n if (this.editor && !item.isDeleted && !this.editor.contains(element)) {\n item.isDeleted = true;\n\n this.triggerEvent(element, EntityOperation.Overwrite);\n\n if (\n !shouldNormalizeDelimiters &&\n !element.isContentEditable &&\n !isBlockElement(element)\n ) {\n shouldNormalizeDelimiters = true;\n }\n }\n });\n\n // 2. collect all new entities\n const newEntities =\n event?.source == ChangeSource.InsertEntity && event.data\n ? [event.data as Entity]\n : this.getExistingEntities().filter(entity => {\n const item = this.state.entityMap[entity.id];\n\n return !item || item.element != entity.wrapper || item.isDeleted;\n });\n\n // 3. Add new entities to known entity list, and hydrate\n newEntities.forEach(entity => {\n const { wrapper, type, id, isReadonly } = entity;\n\n entity.id = this.ensureUniqueId(type, id, wrapper);\n commitEntity(wrapper, type, isReadonly, entity.id); // Use entity.id here because it is newly updated\n this.handleNewEntity(entity);\n });\n\n if (\n shouldNormalizeDelimiters &&\n this.editor?.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n normalizeDelimitersInEditor(this.editor);\n }\n }\n\n private handleEntityOperationEvent(event: EntityOperationEvent) {\n if (this.editor && REMOVE_ENTITY_OPERATIONS.indexOf(event.operation) >= 0) {\n const item = this.state.entityMap[event.entity.id];\n\n if (item) {\n item.isDeleted = true;\n }\n }\n }\n\n private handleExtractContentWithDomEvent(root: HTMLElement) {\n toArray(root.querySelectorAll(getEntitySelector())).forEach(element => {\n element.removeAttribute('contentEditable');\n\n this.triggerEvent(element as HTMLElement, EntityOperation.ReplaceTemporaryContent);\n });\n }\n\n private onDragStart = (e: Event) => {\n const dragEvent = e as DragEvent;\n const entityWrapper = this.editor?.getElementAtCursor(\n getEntitySelector(),\n dragEvent.target as Node\n );\n\n if (entityWrapper && getEntityFromElement(entityWrapper)?.isReadonly) {\n dragEvent.preventDefault();\n }\n };\n\n private checkRemoveEntityForRange(event: Event) {\n const editableEntityElements: HTMLElement[] = [];\n const selector = getEntitySelector();\n this.editor?.queryElements(selector, QueryScope.OnSelection, element => {\n if (element.isContentEditable) {\n editableEntityElements.push(element);\n } else {\n this.triggerEvent(element, EntityOperation.Overwrite, event);\n }\n });\n\n // For editable entities, we need to check if it is fully or partially covered by current selection,\n // and trigger different events;\n if (this.editor && editableEntityElements.length > 0) {\n const inSelectionEntityElements = this.editor.queryElements(\n selector,\n QueryScope.InSelection\n );\n editableEntityElements.forEach(element => {\n const isFullyCovered = inSelectionEntityElements.indexOf(element) >= 0;\n this.triggerEvent(\n element,\n isFullyCovered ? EntityOperation.Overwrite : EntityOperation.PartialOverwrite,\n event\n );\n });\n }\n }\n\n private triggerEvent(element: HTMLElement, operation: EntityOperation, rawEvent?: Event) {\n const entity = element && getEntityFromElement(element);\n\n return entity\n ? this.editor?.triggerPluginEvent(PluginEventType.EntityOperation, {\n operation,\n rawEvent,\n entity,\n })\n : null;\n }\n\n private handleNewEntity(entity: Entity) {\n const { wrapper } = entity;\n const event = this.triggerEvent(wrapper, EntityOperation.NewEntity);\n\n const newItem: KnownEntityItem = {\n element: entity.wrapper,\n };\n\n if (event?.shouldPersist) {\n newItem.canPersist = true;\n }\n\n this.state.entityMap[entity.id] = newItem;\n }\n\n private getExistingEntities(): Entity[] {\n return (\n this.editor\n ?.queryElements(getEntitySelector())\n .map(getEntityFromElement)\n .filter((x): x is Entity => !!x) ?? []\n );\n }\n\n private ensureUniqueId(type: string, id: string, wrapper: HTMLElement) {\n const match = ENTITY_ID_REGEX.exec(id);\n const baseId = (match ? id.substr(0, id.length - match[0].length) : id) || type;\n\n // Make sure entity id is unique\n let newId = '';\n\n for (let num = (match && parseInt(match[1])) || 0; ; num++) {\n newId = num > 0 ? `${baseId}_${num}` : baseId;\n\n const item = this.state.entityMap[newId];\n\n if (!item || item.element == wrapper) {\n break;\n }\n }\n\n return newId;\n }\n}\n\n/**\n * IE will show a resize border around the readonly content within content editable DIV\n * This is a workaround to remove it by temporarily move focus out of editor\n */\nconst workaroundSelectionIssueForIE = Browser.isIE\n ? (editor: IEditor) => {\n editor.runAsync(editor => {\n const workaroundButton = editor.getCustomData('ENTITY_IE_FOCUS_BUTTON', () => {\n const button = createElement(\n {\n tag: 'button',\n style: 'overflow:hidden;position:fixed;width:0;height:0;top:-1000px',\n },\n editor.getDocument()\n ) as HTMLElement;\n button.onblur = () => {\n button.style.display = 'none';\n };\n\n editor.insertNode(button, {\n position: ContentPosition.Outside,\n });\n\n return button;\n });\n\n workaroundButton.style.display = '';\n addRangeToSelection(createRange(workaroundButton, 0));\n });\n }\n : () => {};\n","import { safeInstanceOf } from 'roosterjs-editor-dom';\n\nimport {\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n PositionType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\nconst Escape = 'Escape';\nconst Delete = 'Delete';\nconst mouseLeftButton = 0;\n\n/**\n * Detect image selection and help highlight the image\n */\nexport default class ImageSelection implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ImageSelection';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor?.select(null);\n this.editor = null;\n }\n\n onPluginEvent(event: PluginEvent) {\n if (this.editor) {\n switch (event.eventType) {\n case PluginEventType.EnteredShadowEdit:\n case PluginEventType.LeavingShadowEdit:\n const selection = this.editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.ImageSelection) {\n this.editor.select(selection.image);\n }\n break;\n\n case PluginEventType.MouseUp:\n const target = event.rawEvent.target;\n if (\n safeInstanceOf(target, 'HTMLImageElement') &&\n event.rawEvent.button === mouseLeftButton\n ) {\n this.editor.select(target);\n }\n break;\n case PluginEventType.MouseDown:\n const mouseTarget = event.rawEvent.target;\n const mouseSelection = this.editor.getSelectionRangeEx();\n if (\n mouseSelection &&\n mouseSelection.type === SelectionRangeTypes.ImageSelection &&\n mouseSelection.image !== mouseTarget\n ) {\n this.editor.select(null);\n }\n break;\n case PluginEventType.KeyUp:\n const key = event.rawEvent.key;\n const keyDownSelection = this.editor.getSelectionRangeEx();\n if (keyDownSelection.type === SelectionRangeTypes.ImageSelection) {\n if (key === Escape) {\n this.editor.select(keyDownSelection.image, PositionType.Before);\n this.editor.getSelectionRange()?.collapse();\n event.rawEvent.stopPropagation();\n } else if (key === Delete) {\n this.editor.deleteNode(keyDownSelection.image);\n event.rawEvent.preventDefault();\n } else {\n this.editor.select(keyDownSelection.ranges[0]);\n }\n }\n break;\n case PluginEventType.ContextMenu:\n const contextMenuTarget = event.rawEvent.target;\n const actualSelection = this.editor.getSelectionRangeEx();\n if (\n safeInstanceOf(contextMenuTarget, 'HTMLImageElement') &&\n (actualSelection.type !== SelectionRangeTypes.ImageSelection ||\n actualSelection.image !== contextMenuTarget)\n ) {\n this.editor.select(contextMenuTarget);\n }\n }\n }\n }\n}\n","import { Browser, getObjectKeys, setColor } from 'roosterjs-editor-dom';\nimport {\n DocumentCommand,\n EditorOptions,\n IEditor,\n LifecyclePluginState,\n PluginEventType,\n PluginWithState,\n PluginEvent,\n ChangeSource,\n} from 'roosterjs-editor-types';\n\nconst CONTENT_EDITABLE_ATTRIBUTE_NAME = 'contenteditable';\nconst COMMANDS: Record = Browser.isFirefox\n ? {\n /**\n * Disable these object resizing for firefox since other browsers don't have these behaviors\n */\n [DocumentCommand.EnableObjectResizing]: (false as any) as string,\n [DocumentCommand.EnableInlineTableEditing]: (false as any) as string,\n }\n : Browser.isIE\n ? {\n /**\n * Change the default paragraph separator to DIV. This is mainly for IE since its default setting is P\n */\n [DocumentCommand.DefaultParagraphSeparator]: 'div',\n\n /**\n * Disable auto link feature in IE since we have our own implementation\n */\n [DocumentCommand.AutoUrlDetect]: (false as any) as string,\n }\n : {};\n\nconst DARK_MODE_DEFAULT_FORMAT = {\n backgroundColors: {\n darkModeColor: 'rgb(51,51,51)',\n lightModeColor: 'rgb(255,255,255)',\n },\n textColors: {\n darkModeColor: 'rgb(255,255,255)',\n lightModeColor: 'rgb(0,0,0)',\n },\n};\n\n/**\n * @internal\n * Lifecycle plugin handles editor initialization and disposing\n */\nexport default class LifecyclePlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private state: LifecyclePluginState;\n private initialContent: string;\n private initializer: (() => void) | null = null;\n private disposer: (() => void) | null = null;\n private adjustColor: () => void;\n\n /**\n * Construct a new instance of LifecyclePlugin\n * @param options The editor options\n * @param contentDiv The editor content DIV\n */\n constructor(options: EditorOptions, contentDiv: HTMLDivElement) {\n this.initialContent = options.initialContent || contentDiv.innerHTML || '';\n\n // Make the container editable and set its selection styles\n if (contentDiv.getAttribute(CONTENT_EDITABLE_ATTRIBUTE_NAME) === null) {\n this.initializer = () => {\n contentDiv.contentEditable = 'true';\n contentDiv.style.userSelect = 'text';\n contentDiv.style.webkitUserSelect = 'text';\n };\n this.disposer = () => {\n contentDiv.style.userSelect = '';\n contentDiv.style.webkitUserSelect = '';\n contentDiv.removeAttribute(CONTENT_EDITABLE_ATTRIBUTE_NAME);\n };\n }\n this.adjustColor = options.doNotAdjustEditorColor\n ? () => {}\n : () => {\n const { textColors, backgroundColors } = DARK_MODE_DEFAULT_FORMAT;\n const { isDarkMode } = this.state;\n const darkColorHandler = this.editor?.getDarkColorHandler();\n setColor(\n contentDiv,\n textColors,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n setColor(\n contentDiv,\n backgroundColors,\n true /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n };\n\n const getDarkColor = options.getDarkColor ?? ((color: string) => color);\n const defaultFormat = options.defaultFormat ? { ...options.defaultFormat } : null;\n\n if (defaultFormat) {\n if (defaultFormat.textColor && !defaultFormat.textColors) {\n defaultFormat.textColors = {\n lightModeColor: defaultFormat.textColor,\n darkModeColor: getDarkColor(defaultFormat.textColor),\n };\n delete defaultFormat.textColor;\n }\n\n if (defaultFormat.backgroundColor && !defaultFormat.backgroundColors) {\n defaultFormat.backgroundColors = {\n lightModeColor: defaultFormat.backgroundColor,\n darkModeColor: getDarkColor(defaultFormat.backgroundColor),\n };\n delete defaultFormat.backgroundColor;\n }\n }\n\n this.state = {\n customData: {},\n defaultFormat,\n isDarkMode: !!options.inDarkMode,\n getDarkColor,\n onExternalContentTransform: options.onExternalContentTransform ?? null,\n experimentalFeatures: options.experimentalFeatures || [],\n shadowEditFragment: null,\n shadowEditEntities: null,\n shadowEditSelectionPath: null,\n shadowEditTableSelectionPath: null,\n shadowEditImageSelectionPath: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Lifecycle';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n\n // Ensure initial content and its format\n this.editor.setContent(this.initialContent, false /*triggerContentChangedEvent*/);\n\n // Set content DIV to be editable\n this.initializer?.();\n\n // Set editor background color for dark mode\n this.adjustColor();\n\n // Do proper change for browsers to disable some browser-specified behaviors.\n this.adjustBrowserBehavior();\n\n // Let other plugins know that we are ready\n this.editor.triggerPluginEvent(PluginEventType.EditorReady, {}, true /*broadcast*/);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor?.triggerPluginEvent(PluginEventType.BeforeDispose, {}, true /*broadcast*/);\n\n getObjectKeys(this.state.customData).forEach(key => {\n const data = this.state.customData[key];\n\n if (data && data.disposer) {\n data.disposer(data.value);\n }\n\n delete this.state.customData[key];\n });\n\n if (this.disposer) {\n this.disposer();\n this.disposer = null;\n this.initializer = null;\n }\n\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (\n event.eventType == PluginEventType.ContentChanged &&\n (event.source == ChangeSource.SwitchToDarkMode ||\n event.source == ChangeSource.SwitchToLightMode)\n ) {\n this.state.isDarkMode = event.source == ChangeSource.SwitchToDarkMode;\n this.adjustColor();\n }\n }\n\n private adjustBrowserBehavior() {\n getObjectKeys(COMMANDS).forEach(command => {\n // Catch any possible exception since this should not block the initialization of editor\n try {\n this.editor?.getDocument().execCommand(command, false, COMMANDS[command]);\n } catch {}\n });\n }\n}\n","import { EditorPlugin, IEditor, PluginEvent, PluginEventType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * MouseUpPlugin help trigger MouseUp event even when mouse up happens outside editor\n * as long as the mouse was pressed within Editor before\n */\nexport default class MouseUpPlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n private mouseUpEventListerAdded: boolean = false;\n private mouseDownX: number | null = null;\n private mouseDownY: number | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'MouseUp';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.removeMouseUpEventListener();\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (\n this.editor &&\n event.eventType == PluginEventType.MouseDown &&\n !this.mouseUpEventListerAdded\n ) {\n this.editor\n .getDocument()\n .addEventListener('mouseup', this.onMouseUp, true /*setCapture*/);\n this.mouseUpEventListerAdded = true;\n this.mouseDownX = event.rawEvent.pageX;\n this.mouseDownY = event.rawEvent.pageY;\n }\n }\n private removeMouseUpEventListener() {\n if (this.editor && this.mouseUpEventListerAdded) {\n this.mouseUpEventListerAdded = false;\n this.editor.getDocument().removeEventListener('mouseup', this.onMouseUp, true);\n }\n }\n\n private onMouseUp = (rawEvent: MouseEvent) => {\n if (this.editor) {\n this.removeMouseUpEventListener();\n this.editor.triggerPluginEvent(PluginEventType.MouseUp, {\n rawEvent,\n isClicking: this.mouseDownX == rawEvent.pageX && this.mouseDownY == rawEvent.pageY,\n });\n }\n };\n}\n","import {\n changeElementTag,\n getTagOfNode,\n moveChildNodes,\n safeInstanceOf,\n toArray,\n} from 'roosterjs-editor-dom';\nimport {\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * TODO: Rename this plugin since it is not only for table now\n *\n * NormalizeTable plugin makes sure each table in editor has TBODY/THEAD/TFOOT tag around TR tags\n *\n * When we retrieve HTML content using innerHTML, browser will always add TBODY around TR nodes if there is not.\n * This causes some issue when we restore the HTML content with selection path since the selection path is\n * deeply coupled with DOM structure. So we need to always make sure there is already TBODY tag whenever\n * new table is inserted, to make sure the selection path we created is correct.\n */\nexport default class NormalizeTablePlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'NormalizeTable';\n }\n\n /**\n * The first method that editor will call to a plugin when editor is initializing.\n * It will pass in the editor instance, plugin should take this chance to save the\n * editor reference so that it can call to any editor method or format API later.\n * @param editor The editor object\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * The last method that editor will call to a plugin before it is disposed.\n * Plugin can take this chance to clear the reference to editor. After this method is\n * called, plugin should not call to any editor method since it will result in error.\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Core method for a plugin. Once an event happens in editor, editor will call this\n * method of each plugin to handle the event as long as the event is not handled\n * exclusively by another plugin.\n * @param event The event to handle:\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.EditorReady:\n case PluginEventType.ContentChanged:\n if (this.editor) {\n this.normalizeTables(this.editor.queryElements('table'));\n }\n break;\n\n case PluginEventType.BeforePaste:\n this.normalizeTables(toArray(event.fragment.querySelectorAll('table')));\n break;\n\n case PluginEventType.MouseDown:\n this.normalizeTableFromEvent(event.rawEvent);\n break;\n\n case PluginEventType.KeyDown:\n if (event.rawEvent.shiftKey) {\n this.normalizeTableFromEvent(event.rawEvent);\n }\n break;\n\n case PluginEventType.ExtractContentWithDom:\n normalizeListsForExport(event.clonedRoot);\n break;\n }\n }\n\n private normalizeTableFromEvent(event: KeyboardEvent | MouseEvent) {\n const table = this.editor?.getElementAtCursor('table', event.target as Node);\n\n if (table) {\n this.normalizeTables([table]);\n }\n }\n\n private normalizeTables(tables: HTMLTableElement[]) {\n if (this.editor && tables.length > 0) {\n const rangeEx = this.editor.getSelectionRangeEx();\n const { startContainer, endContainer, startOffset, endOffset } =\n (rangeEx?.type == SelectionRangeTypes.Normal && rangeEx.ranges[0]) || {};\n\n const isChanged = normalizeTables(tables);\n\n if (isChanged) {\n if (\n startContainer &&\n endContainer &&\n typeof startOffset === 'number' &&\n typeof endOffset === 'number'\n ) {\n this.editor.select(startContainer, startOffset, endContainer, endOffset);\n } else if (\n rangeEx?.type == SelectionRangeTypes.TableSelection &&\n rangeEx.coordinates\n ) {\n this.editor.select(rangeEx.table, rangeEx.coordinates);\n }\n }\n }\n }\n}\n\nfunction normalizeTables(tables: HTMLTableElement[]) {\n let isDOMChanged = false;\n tables.forEach(table => {\n let tbody: HTMLTableSectionElement | null = null;\n\n for (let child = table.firstChild; child; child = child.nextSibling) {\n const tag = getTagOfNode(child);\n switch (tag) {\n case 'TR':\n if (!tbody) {\n tbody = table.ownerDocument.createElement('tbody');\n table.insertBefore(tbody, child);\n }\n\n tbody.appendChild(child);\n child = tbody;\n isDOMChanged = true;\n\n break;\n case 'TBODY':\n if (tbody) {\n moveChildNodes(tbody, child, true /*keepExistingChildren*/);\n child.parentNode?.removeChild(child);\n child = tbody;\n isDOMChanged = true;\n } else {\n tbody = child as HTMLTableSectionElement;\n }\n break;\n default:\n tbody = null;\n break;\n }\n }\n\n const colgroups = table.querySelectorAll('colgroup');\n const thead = table.querySelector('thead');\n if (thead) {\n colgroups.forEach(colgroup => {\n if (!thead.contains(colgroup)) {\n thead.appendChild(colgroup);\n }\n });\n }\n });\n\n return isDOMChanged;\n}\n\nfunction normalizeListsForExport(root: ParentNode) {\n toArray(root.querySelectorAll('li')).forEach(li => {\n const prevElement = li.previousSibling;\n\n if (li.style.display == 'block' && safeInstanceOf(prevElement, 'HTMLLIElement')) {\n li.style.removeProperty('display');\n\n prevElement.appendChild(changeElementTag(li, 'div'));\n }\n });\n}\n","import { isCharacterValue, Position, setColor } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n IEditor,\n Keys,\n NodePosition,\n PendingFormatStatePluginState,\n PluginEvent,\n PluginEventType,\n PluginWithState,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\n/**\n * @internal\n * PendingFormatStatePlugin handles pending format state management\n */\nexport default class PendingFormatStatePlugin\n implements PluginWithState {\n private editor: IEditor | null = null;\n private state: PendingFormatStatePluginState;\n\n /**\n * Construct a new instance of PendingFormatStatePlugin\n * @param options The editor options\n * @param contentDiv The editor content DIV\n */\n constructor() {\n this.state = {\n pendableFormatPosition: null,\n pendableFormatState: null,\n pendableFormatSpan: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'PendingFormatState';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n this.clear();\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.PendingFormatStateChanged:\n // Got PendingFormatStateChanged event, cache current position and pending format if a format is passed in\n // otherwise clear existing pending format.\n if (event.formatState) {\n this.state.pendableFormatPosition = this.getCurrentPosition();\n this.state.pendableFormatState = event.formatState;\n this.state.pendableFormatSpan = event.formatCallback\n ? this.createPendingFormatSpan(event.formatCallback)\n : null;\n } else {\n this.clear();\n }\n\n break;\n case PluginEventType.KeyDown:\n case PluginEventType.MouseDown:\n case PluginEventType.ContentChanged:\n let currentPosition: NodePosition | null = null;\n if (\n this.editor &&\n event.eventType == PluginEventType.KeyDown &&\n isCharacterValue(event.rawEvent) &&\n this.state.pendableFormatSpan\n ) {\n this.state.pendableFormatSpan.removeAttribute('contentEditable');\n this.editor.insertNode(this.state.pendableFormatSpan);\n this.editor.select(\n this.state.pendableFormatSpan,\n PositionType.Begin,\n this.state.pendableFormatSpan,\n PositionType.End\n );\n this.clear();\n } else if (\n (event.eventType == PluginEventType.KeyDown &&\n event.rawEvent.which >= Keys.PAGEUP &&\n event.rawEvent.which <= Keys.DOWN) ||\n (this.state.pendableFormatPosition &&\n (currentPosition = this.getCurrentPosition()) &&\n !this.state.pendableFormatPosition.equalTo(currentPosition)) ||\n (event.eventType == PluginEventType.ContentChanged &&\n (event.source == ChangeSource.SwitchToDarkMode ||\n event.source == ChangeSource.SwitchToLightMode))\n ) {\n // If content or position is changed (by keyboard, mouse, or code),\n // check if current position is still the same with the cached one (if exist),\n // and clear cached format if position is changed since it is out-of-date now\n this.clear();\n }\n\n break;\n }\n }\n\n private clear() {\n this.state.pendableFormatPosition = null;\n this.state.pendableFormatState = null;\n this.state.pendableFormatSpan = null;\n }\n\n private getCurrentPosition() {\n let range = this.editor?.getSelectionRange();\n return (range && Position.getStart(range).normalize()) ?? null;\n }\n\n private createPendingFormatSpan(\n callback: (element: HTMLElement, isInnerNode?: boolean) => any\n ) {\n let span = this.state.pendableFormatSpan;\n\n if (!span && this.editor) {\n const currentStyle = this.editor.getStyleBasedFormatState();\n const doc = this.editor.getDocument();\n const isDarkMode = this.editor.isDarkMode();\n\n span = doc.createElement('span');\n span.contentEditable = 'true';\n span.appendChild(doc.createTextNode(ZERO_WIDTH_SPACE));\n\n span.style.setProperty('font-family', currentStyle.fontName ?? null);\n span.style.setProperty('font-size', currentStyle.fontSize ?? null);\n\n const darkColorHandler = this.editor.getDarkColorHandler();\n\n if (currentStyle.textColors || currentStyle.textColor) {\n setColor(\n span,\n (currentStyle.textColors || currentStyle.textColor)!,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n }\n\n if (currentStyle.backgroundColors || currentStyle.backgroundColor) {\n setColor(\n span,\n (currentStyle.backgroundColors || currentStyle.backgroundColor)!,\n true /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n }\n }\n\n if (span) {\n callback(span);\n }\n\n return span;\n }\n}\n","import { EditorPlugin, IEditor, PluginEvent, PluginEventType } from 'roosterjs-editor-types';\nimport {\n Browser,\n findClosestElementAncestor,\n getTagOfNode,\n isCtrlOrMetaPressed,\n Position,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Typing Component helps to ensure typing is always happening under a DOM container\n */\nexport default class TypeInContainerPlugin implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'TypeInContainer';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n private isRangeEmpty(range: Range) {\n if (\n range.collapsed &&\n range.startContainer.nodeType === Node.ELEMENT_NODE &&\n getTagOfNode(range.startContainer) == 'DIV' &&\n !range.startContainer.firstChild\n ) {\n return true;\n }\n return false;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n // We need to check if the ctrl key or the meta key is pressed,\n // browsers like Safari fire the \"keypress\" event when the meta key is pressed.\n if (\n event.eventType == PluginEventType.KeyPress &&\n this.editor &&\n !(event.rawEvent && isCtrlOrMetaPressed(event.rawEvent))\n ) {\n // If normalization was not possible before the keypress,\n // check again after the keyboard event has been processed by browser native behavior.\n //\n // This handles the case where the keyboard event that first inserts content happens when\n // there is already content under the selection (e.g. Ctrl+a -> type new content).\n //\n // Only schedule when the range is not collapsed to catch this edge case.\n let range = this.editor.getSelectionRange();\n\n const styledAncestor =\n range &&\n findClosestElementAncestor(range.startContainer, undefined /* root */, '[style]');\n\n if (!range || (!this.isRangeEmpty(range) && this.editor.contains(styledAncestor))) {\n return;\n }\n\n if (range.collapsed) {\n this.editor.ensureTypeInContainer(Position.getStart(range), event.rawEvent);\n } else {\n const callback = () => {\n const focusedPosition = this.editor?.getFocusedPosition();\n if (focusedPosition) {\n this.editor?.ensureTypeInContainer(focusedPosition, event.rawEvent);\n }\n };\n\n if (Browser.isMobileOrTablet) {\n this.editor.getDocument().defaultView?.setTimeout(callback, 100);\n } else {\n this.editor.runAsync(callback);\n }\n }\n }\n }\n}\n","import {\n ChangeSource,\n ContentChangedEvent,\n EditorOptions,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n PluginWithState,\n Snapshot,\n UndoPluginState,\n UndoSnapshotsService,\n} from 'roosterjs-editor-types';\nimport {\n addSnapshotV2,\n canMoveCurrentSnapshot,\n clearProceedingSnapshotsV2,\n createSnapshots,\n isCtrlOrMetaPressed,\n moveCurrentSnapshot,\n canUndoAutoComplete,\n} from 'roosterjs-editor-dom';\n\n// Max stack size that cannot be exceeded. When exceeded, old undo history will be dropped\n// to keep size under limit. This is kept at 10MB\nconst MAX_SIZE_LIMIT = 1e7;\n\n/**\n * @internal\n * Provides snapshot based undo service for Editor\n */\nexport default class UndoPlugin implements PluginWithState {\n private editor: IEditor | null = null;\n private lastKeyPress: number | null = null;\n private state: UndoPluginState;\n\n /**\n * Construct a new instance of UndoPlugin\n * @param options The wrapper of the state object\n */\n constructor(options: EditorOptions) {\n this.state = {\n snapshotsService:\n options.undoMetadataSnapshotService ||\n createUndoSnapshotServiceBridge(options.undoSnapshotService) ||\n createUndoSnapshots(),\n isRestoring: false,\n hasNewContent: false,\n isNested: false,\n autoCompletePosition: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Undo';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor): void {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Get plugin state object\n */\n getState() {\n return this.state;\n }\n\n /**\n * Check if the plugin should handle the given event exclusively.\n * @param event The event to check\n */\n willHandleEventExclusively(event: PluginEvent) {\n return (\n event.eventType == PluginEventType.KeyDown &&\n event.rawEvent.which == Keys.BACKSPACE &&\n !event.rawEvent.ctrlKey &&\n this.canUndoAutoComplete()\n );\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent): void {\n // if editor is in IME, don't do anything\n if (!this.editor || this.editor.isInIME()) {\n return;\n }\n\n switch (event.eventType) {\n case PluginEventType.EditorReady:\n const undoState = this.editor.getUndoState();\n if (!undoState.canUndo && !undoState.canRedo) {\n // Only add initial snapshot when there is no existing snapshot\n // Otherwise preserved undo/redo state may be ruined\n this.addUndoSnapshot();\n }\n break;\n case PluginEventType.KeyDown:\n this.onKeyDown(event.rawEvent);\n break;\n case PluginEventType.KeyPress:\n this.onKeyPress(event.rawEvent);\n break;\n case PluginEventType.CompositionEnd:\n this.clearRedoForInput();\n this.addUndoSnapshot();\n break;\n case PluginEventType.ContentChanged:\n this.onContentChanged(event);\n break;\n case PluginEventType.BeforeKeyboardEditing:\n this.onBeforeKeyboardEditing(event.rawEvent);\n break;\n }\n }\n\n private onKeyDown(evt: KeyboardEvent): void {\n // Handle backspace/delete when there is a selection to take a snapshot\n // since we want the state prior to deletion restorable\n // Ignore if keycombo is ALT+BACKSPACE\n if ((evt.which == Keys.BACKSPACE && !evt.altKey) || evt.which == Keys.DELETE) {\n if (evt.which == Keys.BACKSPACE && !evt.ctrlKey && this.canUndoAutoComplete()) {\n evt.preventDefault();\n this.editor?.undo();\n this.state.autoCompletePosition = null;\n this.lastKeyPress = evt.which;\n } else if (!evt.defaultPrevented) {\n let selectionRange = this.editor?.getSelectionRange();\n\n // Add snapshot when\n // 1. Something has been selected (not collapsed), or\n // 2. It has a different key code from the last keyDown event (to prevent adding too many snapshot when keeping press the same key), or\n // 3. Ctrl/Meta key is pressed so that a whole word will be deleted\n if (\n selectionRange &&\n (!selectionRange.collapsed ||\n this.lastKeyPress != evt.which ||\n isCtrlOrMetaPressed(evt))\n ) {\n this.addUndoSnapshot();\n }\n\n // Since some content is deleted, always set hasNewContent to true so that we will take undo snapshot next time\n this.state.hasNewContent = true;\n this.lastKeyPress = evt.which;\n }\n } else if (evt.which >= Keys.PAGEUP && evt.which <= Keys.DOWN) {\n // PageUp, PageDown, Home, End, Left, Right, Up, Down\n if (this.state.hasNewContent) {\n this.addUndoSnapshot();\n }\n this.lastKeyPress = 0;\n } else if (this.lastKeyPress == Keys.BACKSPACE || this.lastKeyPress == Keys.DELETE) {\n if (this.state.hasNewContent) {\n this.addUndoSnapshot();\n }\n }\n }\n\n private onKeyPress(evt: KeyboardEvent): void {\n if (evt.metaKey) {\n // if metaKey is pressed, simply return since no actual effect will be taken on the editor.\n // this is to prevent changing hasNewContent to true when meta + v to paste on Safari.\n return;\n }\n\n let range = this.editor?.getSelectionRange();\n if (\n (range && !range.collapsed) ||\n (evt.which == Keys.SPACE && this.lastKeyPress != Keys.SPACE) ||\n evt.which == Keys.ENTER\n ) {\n this.addUndoSnapshot();\n if (evt.which == Keys.ENTER) {\n // Treat ENTER as new content so if there is no input after ENTER and undo,\n // we restore the snapshot before ENTER\n this.state.hasNewContent = true;\n }\n } else {\n this.clearRedoForInput();\n }\n\n this.lastKeyPress = evt.which;\n }\n\n private onBeforeKeyboardEditing(event: KeyboardEvent) {\n // For keyboard event (triggered from Content Model), we can get its keycode from event.data\n // And when user is keep pressing the same key, mark editor with \"hasNewContent\" so that next time user\n // do some other action or press a different key, we will add undo snapshot\n if (event.which != this.lastKeyPress) {\n this.addUndoSnapshot();\n }\n\n this.lastKeyPress = event.which;\n this.state.hasNewContent = true;\n }\n\n private onContentChanged(event: ContentChangedEvent) {\n if (\n !(\n this.state.isRestoring ||\n event.source == ChangeSource.SwitchToDarkMode ||\n event.source == ChangeSource.SwitchToLightMode ||\n event.source == ChangeSource.Keyboard\n )\n ) {\n this.clearRedoForInput();\n }\n }\n\n private clearRedoForInput() {\n this.state.snapshotsService.clearRedo();\n this.lastKeyPress = 0;\n this.state.hasNewContent = true;\n }\n\n private canUndoAutoComplete() {\n const focusedPosition = this.editor?.getFocusedPosition();\n return (\n this.state.snapshotsService.canUndoAutoComplete() &&\n !!focusedPosition &&\n !!this.state.autoCompletePosition?.equalTo(focusedPosition)\n );\n }\n\n private addUndoSnapshot() {\n this.editor?.addUndoSnapshot();\n this.state.autoCompletePosition = null;\n }\n}\n\nfunction createUndoSnapshots(): UndoSnapshotsService {\n const snapshots = createSnapshots(MAX_SIZE_LIMIT);\n\n return {\n canMove: (delta: number): boolean => canMoveCurrentSnapshot(snapshots, delta),\n move: (delta: number): Snapshot | null => moveCurrentSnapshot(snapshots, delta),\n addSnapshot: (snapshot: Snapshot, isAutoCompleteSnapshot: boolean) =>\n addSnapshotV2(snapshots, snapshot, isAutoCompleteSnapshot),\n clearRedo: () => clearProceedingSnapshotsV2(snapshots),\n canUndoAutoComplete: () => canUndoAutoComplete(snapshots),\n };\n}\n\nfunction createUndoSnapshotServiceBridge(\n service: UndoSnapshotsService | undefined\n): UndoSnapshotsService | undefined {\n let html: string | null;\n return service\n ? {\n canMove: (delta: number) => service.canMove(delta),\n move: (delta: number): Snapshot | null =>\n (html = service.move(delta)) ? { html, metadata: null, knownColors: [] } : null,\n addSnapshot: (snapshot: Snapshot, isAutoCompleteSnapshot: boolean) =>\n service.addSnapshot(\n snapshot.html +\n (snapshot.metadata ? `` : ''),\n isAutoCompleteSnapshot\n ),\n clearRedo: () => service.clearRedo(),\n canUndoAutoComplete: () => service.canUndoAutoComplete(),\n }\n : undefined;\n}\n","import CopyPastePlugin from './CopyPastePlugin';\nimport DOMEventPlugin from './DOMEventPlugin';\nimport EditPlugin from './EditPlugin';\nimport EntityPlugin from './EntityPlugin';\nimport ImageSelection from './ImageSelection';\nimport LifecyclePlugin from './LifecyclePlugin';\nimport MouseUpPlugin from './MouseUpPlugin';\nimport NormalizeTablePlugin from './NormalizeTablePlugin';\nimport PendingFormatStatePlugin from './PendingFormatStatePlugin';\nimport TypeInContainerPlugin from './TypeInContainerPlugin';\nimport UndoPlugin from './UndoPlugin';\nimport { CorePlugins, EditorOptions, PluginState } from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport interface CreateCorePluginResponse extends CorePlugins {\n _placeholder: null;\n}\n\n/**\n * @internal\n * Create Core Plugins\n * @param contentDiv Content DIV of editor\n * @param options Editor options\n */\nexport default function createCorePlugins(\n contentDiv: HTMLDivElement,\n options: EditorOptions\n): CreateCorePluginResponse {\n const map = options.corePluginOverride || {};\n // The order matters, some plugin needs to be put before/after others to make sure event\n // can be handled in right order\n return {\n typeInContainer: map.typeInContainer || new TypeInContainerPlugin(),\n edit: map.edit || new EditPlugin(),\n pendingFormatState: map.pendingFormatState || new PendingFormatStatePlugin(),\n _placeholder: null,\n typeAfterLink: null!, //deprecated after firefox update\n undo: map.undo || new UndoPlugin(options),\n domEvent: map.domEvent || new DOMEventPlugin(options, contentDiv),\n mouseUp: map.mouseUp || new MouseUpPlugin(),\n copyPaste: map.copyPaste || new CopyPastePlugin(options),\n entity: map.entity || new EntityPlugin(),\n imageSelection: map.imageSelection || new ImageSelection(),\n normalizeTable: map.normalizeTable || new NormalizeTablePlugin(),\n lifecycle: map.lifecycle || new LifecyclePlugin(options, contentDiv),\n };\n}\n\n/**\n * @internal\n * Get plugin state of core plugins\n * @param corePlugins CorePlugins object\n */\nexport function getPluginState(corePlugins: CorePlugins): PluginState {\n return {\n domEvent: corePlugins.domEvent.getState(),\n pendingFormatState: corePlugins.pendingFormatState.getState(),\n edit: corePlugins.edit.getState(),\n lifecycle: corePlugins.lifecycle.getState(),\n undo: corePlugins.undo.getState(),\n entity: corePlugins.entity.getState(),\n copyPaste: corePlugins.copyPaste.getState(),\n };\n}\n","import { VCell } from 'roosterjs-editor-types';\nimport { VTable } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Executes an action to all the cells within the selection range.\n * @param callback action to apply on each selected cell\n * @returns the amount of cells modified\n */\nexport const forEachSelectedCell = (vTable: VTable, callback: (cell: VCell) => void): void => {\n if (vTable.selection) {\n const { lastCell, firstCell } = vTable.selection;\n\n for (let y = firstCell.y; y <= lastCell.y; y++) {\n for (let x = firstCell.x; x <= lastCell.x; x++) {\n if (vTable.cells && vTable.cells[y][x]?.td) {\n callback(vTable.cells[y][x]);\n }\n }\n }\n }\n};\n","import {\n addDelimiters,\n arrayPush,\n createRange,\n getDelimiterFromElement,\n getEntityFromElement,\n getEntitySelector,\n isBlockElement,\n isCharacterValue,\n matchesSelector,\n Position,\n safeInstanceOf,\n splitTextNode,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n DelimiterClasses,\n Entity,\n IEditor,\n Keys,\n NodeType,\n PluginEvent,\n PluginEventType,\n PluginKeyDownEvent,\n PositionType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\nconst DELIMITER_SELECTOR =\n '.' + DelimiterClasses.DELIMITER_AFTER + ',.' + DelimiterClasses.DELIMITER_BEFORE;\nconst ZERO_WIDTH_SPACE = '\\u200B';\nconst INLINE_ENTITY_SELECTOR = 'span' + getEntitySelector();\n\nexport function inlineEntityOnPluginEvent(event: PluginEvent, editor: IEditor) {\n switch (event.eventType) {\n case PluginEventType.ContentChanged:\n if (event.source === ChangeSource.SetContent) {\n normalizeDelimitersInEditor(editor);\n }\n break;\n case PluginEventType.EditorReady:\n normalizeDelimitersInEditor(editor);\n break;\n\n case PluginEventType.BeforePaste:\n const { fragment, sanitizingOption } = event;\n addDelimitersIfNeeded(fragment.querySelectorAll(INLINE_ENTITY_SELECTOR));\n\n if (sanitizingOption.additionalAllowedCssClasses) {\n arrayPush(sanitizingOption.additionalAllowedCssClasses, [\n DelimiterClasses.DELIMITER_AFTER,\n DelimiterClasses.DELIMITER_BEFORE,\n ]);\n }\n break;\n\n case PluginEventType.ExtractContentWithDom:\n case PluginEventType.BeforeCutCopy:\n event.clonedRoot.querySelectorAll(DELIMITER_SELECTOR).forEach(node => {\n if (getDelimiterFromElement(node)) {\n removeNode(node);\n } else {\n removeDelimiterAttr(node);\n }\n });\n break;\n\n case PluginEventType.KeyDown:\n handleKeyDownEvent(editor, event);\n break;\n }\n}\n\nfunction preventTypeInDelimiter(delimiter: HTMLElement) {\n delimiter.normalize();\n const textNode = delimiter.firstChild as Node;\n const index = textNode.nodeValue?.indexOf(ZERO_WIDTH_SPACE) ?? -1;\n if (index >= 0) {\n splitTextNode(textNode, index == 0 ? 1 : index, false /* returnFirstPart */);\n let nodeToMove: Node | undefined;\n delimiter.childNodes.forEach(node => {\n if (node.nodeValue !== ZERO_WIDTH_SPACE) {\n nodeToMove = node;\n }\n });\n if (nodeToMove) {\n delimiter.parentElement?.insertBefore(\n nodeToMove,\n delimiter.className == DelimiterClasses.DELIMITER_BEFORE\n ? delimiter\n : delimiter.nextSibling\n );\n const selection = nodeToMove.ownerDocument?.getSelection();\n\n if (selection) {\n selection.setPosition(\n nodeToMove,\n new Position(nodeToMove, PositionType.End).offset\n );\n }\n }\n }\n}\n\n/**\n * @internal\n */\nexport function normalizeDelimitersInEditor(editor: IEditor) {\n removeInvalidDelimiters(editor.queryElements(DELIMITER_SELECTOR));\n addDelimitersIfNeeded(editor.queryElements(INLINE_ENTITY_SELECTOR));\n}\n\nfunction addDelimitersIfNeeded(nodes: Element[] | NodeListOf) {\n nodes.forEach(node => {\n if (isEntityElement(node)) {\n addDelimiters(node);\n }\n });\n}\n\nfunction isEntityElement(node: Node | null): node is HTMLElement {\n return !!(\n node &&\n safeInstanceOf(node, 'HTMLElement') &&\n isReadOnly(getEntityFromElement(node))\n );\n}\n\nfunction removeNode(el: Node | undefined | null) {\n el?.parentElement?.removeChild(el);\n}\n\nfunction isReadOnly(entity: Entity | null) {\n return (\n entity?.isReadonly &&\n !isBlockElement(entity.wrapper) &&\n safeInstanceOf(entity.wrapper, 'HTMLElement')\n );\n}\n\nfunction removeInvalidDelimiters(nodes: Element[] | NodeListOf) {\n nodes.forEach(node => {\n if (getDelimiterFromElement(node)) {\n const sibling = node.classList.contains(DelimiterClasses.DELIMITER_BEFORE)\n ? node.nextElementSibling\n : node.previousElementSibling;\n if (!(safeInstanceOf(sibling, 'HTMLElement') && getEntityFromElement(sibling))) {\n removeNode(node);\n }\n } else {\n removeDelimiterAttr(node);\n }\n });\n}\n\nfunction removeDelimiterAttr(node: Element | undefined | null, checkEntity: boolean = true) {\n if (!node) {\n return;\n }\n\n const isAfter = node.classList.contains(DelimiterClasses.DELIMITER_AFTER);\n const entitySibling = isAfter ? node.previousElementSibling : node.nextElementSibling;\n if (checkEntity && entitySibling && isEntityElement(entitySibling)) {\n return;\n }\n\n node.classList.remove(DelimiterClasses.DELIMITER_AFTER, DelimiterClasses.DELIMITER_BEFORE);\n\n node.normalize();\n node.childNodes.forEach(cn => {\n const index = cn.textContent?.indexOf(ZERO_WIDTH_SPACE) ?? -1;\n if (index >= 0) {\n createRange(cn, index, cn, index + 1)?.deleteContents();\n }\n });\n}\n\nfunction handleCollapsedEnter(editor: IEditor, delimiter: HTMLElement) {\n const isAfter = delimiter.classList.contains(DelimiterClasses.DELIMITER_AFTER);\n const entity = !isAfter ? delimiter.nextSibling : delimiter.previousSibling;\n const block = getBlock(editor, delimiter);\n\n editor.runAsync(() => {\n if (!block) {\n return;\n }\n const blockToCheck = isAfter ? block.nextSibling : block.previousSibling;\n if (blockToCheck && safeInstanceOf(blockToCheck, 'HTMLElement')) {\n const delimiters = blockToCheck.querySelectorAll(DELIMITER_SELECTOR);\n // Check if the last or first delimiter still contain the delimiter class and remove it.\n const delimiterToCheck = delimiters.item(isAfter ? 0 : delimiters.length - 1);\n removeDelimiterAttr(delimiterToCheck);\n }\n\n if (isEntityElement(entity)) {\n const { nextElementSibling, previousElementSibling } = entity;\n [nextElementSibling, previousElementSibling].forEach(el => {\n // Check if after Enter the ZWS got removed but we still have a element with the class\n // Remove the attributes of the element if it is invalid now.\n if (el && matchesSelector(el, DELIMITER_SELECTOR) && !getDelimiterFromElement(el)) {\n removeDelimiterAttr(el, false /* checkEntity */);\n }\n });\n // Add delimiters to the entity if needed because on Enter we can sometimes lose the ZWS of the element.\n addDelimiters(entity);\n }\n });\n}\n\nconst getPosition = (container: HTMLElement | null) => {\n if (container && getDelimiterFromElement(container)) {\n const isAfter = container.classList.contains(DelimiterClasses.DELIMITER_AFTER);\n return new Position(container, isAfter ? PositionType.After : PositionType.Before);\n }\n return undefined;\n};\n\nfunction getBlock(editor: IEditor, element: Node | undefined) {\n if (!element) {\n return undefined;\n }\n\n let block = editor.getBlockElementAtNode(element)?.getStartNode();\n\n while (block && !isBlockElement(block)) {\n block = editor.contains(block.parentElement) ? block.parentElement! : undefined;\n }\n\n return block;\n}\n\nfunction handleSelectionNotCollapsed(editor: IEditor, range: Range, event: KeyboardEvent) {\n const { startContainer, endContainer, startOffset, endOffset } = range;\n\n const startElement = editor.getElementAtCursor(DELIMITER_SELECTOR, startContainer);\n const endElement = editor.getElementAtCursor(DELIMITER_SELECTOR, endContainer);\n\n const startUpdate = getPosition(startElement);\n const endUpdate = getPosition(endElement);\n\n if (startUpdate || endUpdate) {\n editor.select(\n startUpdate ?? new Position(startContainer, startOffset),\n endUpdate ?? new Position(endContainer, endOffset)\n );\n }\n editor.runAsync(aEditor => {\n const delimiter = aEditor.getElementAtCursor(DELIMITER_SELECTOR);\n if (delimiter) {\n preventTypeInDelimiter(delimiter);\n if (event.which === Keys.ENTER) {\n removeDelimiterAttr(delimiter);\n }\n }\n });\n}\n\nfunction handleKeyDownEvent(editor: IEditor, event: PluginKeyDownEvent) {\n const range = editor.getSelectionRangeEx();\n const { rawEvent } = event;\n if (range.type != SelectionRangeTypes.Normal) {\n return;\n }\n\n if (range.areAllCollapsed && (isCharacterValue(rawEvent) || rawEvent.which === Keys.ENTER)) {\n const position = editor.getFocusedPosition()?.normalize();\n if (!position) {\n return;\n }\n\n const { element, node } = position;\n const refNode = element == node ? element.childNodes.item(position.offset) : element;\n\n const delimiter = editor.getElementAtCursor(DELIMITER_SELECTOR, refNode);\n if (!delimiter) {\n return;\n }\n\n if (rawEvent.which === Keys.ENTER) {\n handleCollapsedEnter(editor, delimiter);\n } else if (delimiter.firstChild?.nodeType == NodeType.Text) {\n editor.runAsync(() => preventTypeInDelimiter(delimiter));\n }\n } else if (!range.areAllCollapsed && !rawEvent.shiftKey && rawEvent.which != Keys.SHIFT) {\n const currentRange = range.ranges[0];\n if (!currentRange) {\n return;\n }\n handleSelectionNotCollapsed(editor, currentRange, rawEvent);\n }\n}\n","import { isWholeTableSelected, VTable } from 'roosterjs-editor-dom';\nimport { VCell } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Remove the cells outside of the selection.\n * @param vTable VTable to remove selection\n */\nexport const removeCellsOutsideSelection = (vTable: VTable) => {\n if (vTable.selection) {\n if (isWholeTableSelected(vTable, vTable.selection)) {\n return;\n }\n\n vTable.table.style.removeProperty('width');\n vTable.table.style.removeProperty('height');\n\n const { firstCell, lastCell } = vTable.selection;\n const resultCells: VCell[][] = [];\n\n const firstX = firstCell.x;\n const firstY = firstCell.y;\n const lastX = lastCell.x;\n const lastY = lastCell.y;\n\n if (vTable.cells) {\n vTable.cells.forEach((row, y) => {\n row = row.filter((_, x) => y >= firstY && y <= lastY && x >= firstX && x <= lastX);\n if (row.length > 0) {\n resultCells.push(row);\n }\n });\n vTable.cells = resultCells;\n }\n }\n};\n","import { ColorKeyAndValue, DarkColorHandler, ModeIndependentColor } from 'roosterjs-editor-types';\nimport { getObjectKeys, parseColor, setColor } from 'roosterjs-editor-dom';\n\nconst VARIABLE_REGEX = /^\\s*var\\(\\s*(\\-\\-[a-zA-Z0-9\\-_]+)\\s*(?:,\\s*(.*))?\\)\\s*$/;\nconst VARIABLE_PREFIX = 'var(';\nconst COLOR_VAR_PREFIX = 'darkColor';\nconst enum ColorAttributeEnum {\n CssColor = 0,\n HtmlColor = 1,\n}\nconst ColorAttributeName: { [key in ColorAttributeEnum]: string }[] = [\n {\n [ColorAttributeEnum.CssColor]: 'color',\n [ColorAttributeEnum.HtmlColor]: 'color',\n },\n {\n [ColorAttributeEnum.CssColor]: 'background-color',\n [ColorAttributeEnum.HtmlColor]: 'bgcolor',\n },\n];\n\n/**\n * @internal\n */\nexport default class DarkColorHandlerImpl implements DarkColorHandler {\n private knownColors: Record> = {};\n\n constructor(private contentDiv: HTMLElement, private getDarkColor: (color: string) => string) {}\n\n /**\n * Get a copy of known colors\n * @returns\n */\n getKnownColorsCopy() {\n return Object.values(this.knownColors);\n }\n\n /**\n * Given a light mode color value and an optional dark mode color value, register this color\n * so that editor can handle it, then return the CSS color value for current color mode.\n * @param lightModeColor Light mode color value\n * @param isDarkMode Whether current color mode is dark mode\n * @param darkModeColor Optional dark mode color value. If not passed, we will calculate one.\n */\n registerColor(lightModeColor: string, isDarkMode: boolean, darkModeColor?: string): string {\n const parsedColor = this.parseColorValue(lightModeColor);\n let colorKey: string | undefined;\n\n if (parsedColor) {\n lightModeColor = parsedColor.lightModeColor;\n darkModeColor = parsedColor.darkModeColor || darkModeColor;\n colorKey = parsedColor.key;\n }\n\n if (isDarkMode && lightModeColor) {\n colorKey =\n colorKey || `--${COLOR_VAR_PREFIX}_${lightModeColor.replace(/[^\\d\\w]/g, '_')}`;\n\n if (!this.knownColors[colorKey]) {\n darkModeColor = darkModeColor || this.getDarkColor(lightModeColor);\n\n this.knownColors[colorKey] = { lightModeColor, darkModeColor };\n this.contentDiv.style.setProperty(colorKey, darkModeColor);\n }\n\n return `var(${colorKey}, ${lightModeColor})`;\n } else {\n return lightModeColor;\n }\n }\n\n /**\n * Reset known color record, clean up registered color variables.\n */\n reset(): void {\n getObjectKeys(this.knownColors).forEach(key => this.contentDiv.style.removeProperty(key));\n this.knownColors = {};\n }\n\n /**\n * Parse an existing color value, if it is in variable-based color format, extract color key,\n * light color and query related dark color if any\n * @param color The color string to parse\n * @param isInDarkMode Whether current content is in dark mode. When set to true, if the color value is not in dark var format,\n * we will treat is as a dark mode color and try to find a matched dark mode color.\n */\n parseColorValue(color: string | undefined | null, isInDarkMode?: boolean): ColorKeyAndValue {\n let key: string | undefined;\n let lightModeColor = '';\n let darkModeColor: string | undefined;\n\n if (color) {\n const match = color.startsWith(VARIABLE_PREFIX) ? VARIABLE_REGEX.exec(color) : null;\n\n if (match) {\n if (match[2]) {\n key = match[1];\n lightModeColor = match[2];\n darkModeColor = this.knownColors[key]?.darkModeColor;\n } else {\n lightModeColor = '';\n }\n } else if (isInDarkMode) {\n // If editor is in dark mode but the color is not in dark color format, it is possible the color was inserted from external code\n // without any light color info. So we first try to see if there is a known dark color can match this color, and use its related\n // light color as light mode color. Otherwise we need to drop this color to avoid show \"white on white\" content.\n lightModeColor = this.findLightColorFromDarkColor(color) || '';\n\n if (lightModeColor) {\n darkModeColor = color;\n }\n } else {\n lightModeColor = color;\n }\n }\n\n return { key, lightModeColor, darkModeColor };\n }\n\n /**\n * Find related light mode color from dark mode color.\n * @param darkColor The existing dark color\n */\n findLightColorFromDarkColor(darkColor: string): string | null {\n const rgbSearch = parseColor(darkColor);\n\n if (rgbSearch) {\n const key = getObjectKeys(this.knownColors).find(key => {\n const rgbCurrent = parseColor(this.knownColors[key].darkModeColor);\n\n return (\n rgbCurrent &&\n rgbCurrent[0] == rgbSearch[0] &&\n rgbCurrent[1] == rgbSearch[1] &&\n rgbCurrent[2] == rgbSearch[2]\n );\n });\n\n if (key) {\n return this.knownColors[key].lightModeColor;\n }\n }\n\n return null;\n }\n\n /**\n * Transform element color, from dark to light or from light to dark\n * @param element The element to transform color\n * @param fromDarkMode Whether this is transforming color from dark mode\n * @param toDarkMode Whether this is transforming color to dark mode\n */\n transformElementColor(element: HTMLElement, fromDarkMode: boolean, toDarkMode: boolean): void {\n ColorAttributeName.forEach((names, i) => {\n const color = this.parseColorValue(\n element.style.getPropertyValue(names[ColorAttributeEnum.CssColor]) ||\n element.getAttribute(names[ColorAttributeEnum.HtmlColor]),\n !!fromDarkMode\n ).lightModeColor;\n\n element.style.setProperty(names[ColorAttributeEnum.CssColor], null);\n element.removeAttribute(names[ColorAttributeEnum.HtmlColor]);\n\n if (color && color != 'inherit') {\n setColor(element, color, i != 0, toDarkMode, false /*shouldAdaptFontColor*/, this);\n }\n });\n }\n}\n","import { createEditorCore } from './createEditorCore';\r\nimport { EditorBase } from './EditorBase';\r\nimport { EditorCore, EditorOptions } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * RoosterJs core editor class\r\n */\r\nexport default class Editor extends EditorBase {\r\n /**\r\n * Creates an instance of EditorBase\r\n * @param contentDiv The DIV HTML element which will be the container element of editor\r\n * @param options An optional options object to customize the editor\r\n */\r\n constructor(contentDiv: HTMLDivElement, options: EditorOptions = {}) {\r\n super(contentDiv, options, createEditorCore);\r\n }\r\n}\r\n","import { isFeatureEnabled } from './isFeatureEnabled';\nimport {\n BlockElement,\n ChangeSource,\n ClipboardData,\n ColorTransformDirection,\n ContentChangedData,\n ContentPosition,\n CoreCreator,\n DarkColorHandler,\n DefaultFormat,\n DOMEventHandler,\n EditorCore,\n EditorOptions,\n EditorUndoState,\n ExperimentalFeatures,\n GenericContentEditFeature,\n GetContentMode,\n IContentTraverser,\n IEditor,\n InsertOption,\n IPositionContentSearcher,\n NodePosition,\n PendableFormatState,\n PluginEvent,\n PluginEventData,\n PluginEventFromType,\n PluginEventType,\n PositionType,\n QueryScope,\n Rect,\n Region,\n RegionType,\n SelectionPath,\n SelectionRangeEx,\n SizeTransformer,\n StyleBasedFormatState,\n TableSelection,\n TrustedHTMLHandler,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n collapseNodes,\n contains,\n ContentTraverser,\n deleteSelectedContent,\n getRegionsFromRange,\n findClosestElementAncestor,\n getBlockElementAtNode,\n getSelectionPath,\n getTagOfNode,\n isNodeEmpty,\n Position,\n PositionContentSearcher,\n queryElements,\n wrap,\n isPositionAtBeginningOf,\n toArray,\n} from 'roosterjs-editor-dom';\nimport type {\n CompatibleChangeSource,\n CompatibleContentPosition,\n CompatibleExperimentalFeatures,\n CompatibleGetContentMode,\n CompatiblePluginEventType,\n CompatibleQueryScope,\n CompatibleRegionType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Base class of editor\n */\nexport class EditorBase\n implements IEditor {\n private core: TEditorCore | null = null;\n\n //#region Lifecycle\n\n /**\n * Creates an instance of EditorBase\n * @param contentDiv The DIV HTML element which will be the container element of editor\n * @param options An optional options object to customize the editor\n */\n constructor(\n contentDiv: HTMLDivElement,\n options: TEditorOptions,\n coreCreator: CoreCreator\n ) {\n // 1. Make sure all parameters are valid\n if (getTagOfNode(contentDiv) != 'DIV') {\n throw new Error('contentDiv must be an HTML DIV element');\n }\n\n // 2. Create editor core\n this.core = coreCreator(contentDiv, options);\n\n // 3. Initialize plugins\n this.core.plugins.forEach(plugin => plugin.initialize(this));\n\n // 4. Ensure user will type in a container node, not the editor content DIV\n this.ensureTypeInContainer(\n new Position(this.core.contentDiv, PositionType.Begin).normalize()\n );\n }\n\n /**\n * Dispose this editor, dispose all plugins and custom data\n */\n public dispose(): void {\n const core = this.getCore();\n for (let i = core.plugins.length - 1; i >= 0; i--) {\n core.plugins[i].dispose();\n }\n\n core.darkColorHandler.reset();\n\n this.core = null;\n }\n\n /**\n * Get whether this editor is disposed\n * @returns True if editor is disposed, otherwise false\n */\n public isDisposed(): boolean {\n return !this.core;\n }\n\n //#endregion\n\n //#region Node API\n\n /**\n * Insert node into editor\n * @param node The node to insert\n * @param option Insert options. Default value is:\n * position: ContentPosition.SelectionStart\n * updateCursor: true\n * replaceSelection: true\n * insertOnNewLine: false\n * @returns true if node is inserted. Otherwise false\n */\n public insertNode(node: Node, option?: InsertOption): boolean {\n const core = this.getCore();\n return node ? core.api.insertNode(core, node, option ?? null) : false;\n }\n\n /**\n * Delete a node from editor content\n * @param node The node to delete\n * @returns true if node is deleted. Otherwise false\n */\n public deleteNode(node: Node): boolean {\n // Only remove the node when it falls within editor\n if (node && this.contains(node) && node.parentNode) {\n node.parentNode.removeChild(node);\n return true;\n }\n\n return false;\n }\n\n /**\n * Replace a node in editor content with another node\n * @param existingNode The existing node to be replaced\n * @param toNode node to replace to\n * @param transformColorForDarkMode (optional) Whether to transform new node to dark mode. Default is false\n * @returns true if node is replaced. Otherwise false\n */\n public replaceNode(\n existingNode: Node,\n toNode: Node,\n transformColorForDarkMode?: boolean\n ): boolean {\n const core = this.getCore();\n // Only replace the node when it falls within editor\n if (this.contains(existingNode) && toNode) {\n core.api.transformColor(\n core,\n transformColorForDarkMode ? toNode : null,\n true /*includeSelf*/,\n () => existingNode.parentNode?.replaceChild(toNode, existingNode),\n ColorTransformDirection.LightToDark\n );\n\n return true;\n }\n\n return false;\n }\n\n /**\n * Get BlockElement at given node\n * @param node The node to create InlineElement\n * @returns The BlockElement result\n */\n public getBlockElementAtNode(node: Node): BlockElement | null {\n return getBlockElementAtNode(this.getCore().contentDiv, node);\n }\n\n public contains(arg: Node | Range | null): boolean {\n if (!arg) {\n return false;\n }\n return contains(this.getCore().contentDiv, arg);\n }\n\n public queryElements(\n selector: string,\n scopeOrCallback:\n | QueryScope\n | CompatibleQueryScope\n | ((node: Node) => any) = QueryScope.Body,\n callback?: (node: Node) => any\n ) {\n const core = this.getCore();\n const result: HTMLElement[] = [];\n let scope = scopeOrCallback instanceof Function ? QueryScope.Body : scopeOrCallback;\n callback = scopeOrCallback instanceof Function ? scopeOrCallback : callback;\n\n let selectionEx = scope == QueryScope.Body ? null : this.getSelectionRangeEx();\n if (selectionEx) {\n selectionEx.ranges.forEach(range => {\n result.push(...queryElements(core.contentDiv, selector, callback, scope, range));\n });\n } else {\n return queryElements(core.contentDiv, selector, callback, scope, undefined /* range */);\n }\n\n return result;\n }\n\n /**\n * Collapse nodes within the given start and end nodes to their common ancestor node,\n * split parent nodes if necessary\n * @param start The start node\n * @param end The end node\n * @param canSplitParent True to allow split parent node there are nodes before start or after end under the same parent\n * and the returned nodes will be all nodes from start through end after splitting\n * False to disallow split parent\n * @returns When canSplitParent is true, returns all node from start through end after splitting,\n * otherwise just return start and end\n */\n public collapseNodes(start: Node, end: Node, canSplitParent: boolean): Node[] {\n return collapseNodes(this.getCore().contentDiv, start, end, canSplitParent);\n }\n\n //#endregion\n\n //#region Content API\n\n /**\n * Check whether the editor contains any visible content\n * @param trim Whether trim the content string before check. Default is false\n * @returns True if there's no visible content, otherwise false\n */\n public isEmpty(trim?: boolean): boolean {\n return isNodeEmpty(this.getCore().contentDiv, trim);\n }\n\n /**\n * Get current editor content as HTML string\n * @param mode specify what kind of HTML content to retrieve\n * @returns HTML string representing current editor content\n */\n public getContent(\n mode: GetContentMode | CompatibleGetContentMode = GetContentMode.CleanHTML\n ): string {\n const core = this.getCore();\n return core.api.getContent(core, mode);\n }\n\n /**\n * Set HTML content to this editor. All existing content will be replaced. A ContentChanged event will be triggered\n * @param content HTML content to set in\n * @param triggerContentChangedEvent True to trigger a ContentChanged event. Default value is true\n */\n public setContent(content: string, triggerContentChangedEvent: boolean = true) {\n const core = this.getCore();\n core.api.setContent(core, content, triggerContentChangedEvent);\n }\n\n /**\n * Insert HTML content into editor\n * @param HTML content to insert\n * @param option Insert options. Default value is:\n * position: ContentPosition.SelectionStart\n * updateCursor: true\n * replaceSelection: true\n * insertOnNewLine: false\n */\n public insertContent(content: string, option?: InsertOption) {\n if (content) {\n const doc = this.getDocument();\n const body = new DOMParser().parseFromString(\n this.getCore().trustedHTMLHandler(content),\n 'text/html'\n )?.body;\n let allNodes = body?.childNodes ? toArray(body.childNodes) : [];\n\n // If it is to insert on new line, and there are more than one node in the collection, wrap all nodes with\n // a parent DIV before calling insertNode on each top level sub node. Otherwise, every sub node may get wrapped\n // separately to show up on its own line\n if (option && option.insertOnNewLine && allNodes.length > 1) {\n allNodes = [wrap(allNodes)];\n }\n\n let fragment = doc.createDocumentFragment();\n allNodes.forEach(node => fragment.appendChild(node));\n\n this.insertNode(fragment, option);\n }\n }\n\n /**\n * Delete selected content\n */\n public deleteSelectedContent(): NodePosition | null {\n const range = this.getSelectionRange();\n if (range && !range.collapsed) {\n return deleteSelectedContent(this.getCore().contentDiv, range);\n }\n return null;\n }\n\n /**\n * Paste into editor using a clipboardData object\n * @param clipboardData Clipboard data retrieved from clipboard\n * @param pasteAsText Force pasting as plain text. Default value is false\n * @param applyCurrentStyle True if apply format of current selection to the pasted content,\n * false to keep original format. Default value is false. When pasteAsText is true, this parameter is ignored\n * @param pasteAsImage: When set to true, if the clipboardData contains a imageDataUri will paste the image to the editor\n */\n public paste(\n clipboardData: ClipboardData,\n pasteAsText: boolean = false,\n applyCurrentFormat: boolean = false,\n pasteAsImage: boolean = false\n ) {\n const core = this.getCore();\n if (!clipboardData) {\n return;\n }\n\n if (clipboardData.snapshotBeforePaste) {\n // Restore original content before paste a new one\n this.setContent(clipboardData.snapshotBeforePaste);\n } else {\n clipboardData.snapshotBeforePaste = this.getContent(\n GetContentMode.RawHTMLWithSelection\n );\n }\n\n const range = this.getSelectionRange();\n const pos = range && Position.getStart(range);\n const fragment = core.api.createPasteFragment(\n core,\n clipboardData,\n pos,\n pasteAsText,\n applyCurrentFormat,\n pasteAsImage\n );\n if (fragment) {\n this.addUndoSnapshot(() => {\n this.insertNode(fragment);\n return clipboardData;\n }, ChangeSource.Paste);\n }\n }\n\n //#endregion\n\n //#region Focus and Selection\n\n /**\n * Get current selection range from Editor.\n * It does a live pull on the selection, if nothing retrieved, return whatever we have in cache.\n * @param tryGetFromCache Set to true to retrieve the selection range from cache if editor doesn't own the focus now.\n * Default value is true\n * @returns current selection range, or null if editor never got focus before\n */\n public getSelectionRange(tryGetFromCache: boolean = true): Range | null {\n const core = this.getCore();\n return core.api.getSelectionRange(core, tryGetFromCache);\n }\n\n /**\n * Get current selection range from Editor.\n * It does a live pull on the selection, if nothing retrieved, return whatever we have in cache.\n * @param tryGetFromCache Set to true to retrieve the selection range from cache if editor doesn't own the focus now.\n * Default value is true\n * @returns current selection range, or null if editor never got focus before\n */\n public getSelectionRangeEx(): SelectionRangeEx {\n const core = this.getCore();\n return core.api.getSelectionRangeEx(core);\n }\n\n /**\n * Get current selection in a serializable format\n * It does a live pull on the selection, if nothing retrieved, return whatever we have in cache.\n * @returns current selection path, or null if editor never got focus before\n */\n public getSelectionPath(): SelectionPath | null {\n const range = this.getSelectionRange();\n return range && getSelectionPath(this.getCore().contentDiv, range);\n }\n\n /**\n * Check if focus is in editor now\n * @returns true if focus is in editor, otherwise false\n */\n public hasFocus(): boolean {\n const core = this.getCore();\n return core.api.hasFocus(core);\n }\n\n /**\n * Focus to this editor, the selection was restored to where it was before, no unexpected scroll.\n */\n public focus() {\n const core = this.getCore();\n core.api.focus(core);\n }\n\n public select(\n arg1: Range | SelectionRangeEx | NodePosition | Node | SelectionPath | null,\n arg2?: NodePosition | number | PositionType | TableSelection | null,\n arg3?: Node,\n arg4?: number | PositionType\n ): boolean {\n const core = this.getCore();\n\n return core.api.select(core, arg1, arg2, arg3, arg4);\n }\n\n /**\n * Get current focused position. Return null if editor doesn't have focus at this time.\n */\n public getFocusedPosition(): NodePosition | null {\n let sel = this.getDocument().defaultView?.getSelection();\n if (sel?.focusNode && this.contains(sel.focusNode)) {\n return new Position(sel.focusNode, sel.focusOffset);\n }\n\n let range = this.getSelectionRange();\n if (range) {\n return Position.getStart(range);\n }\n\n return null;\n }\n\n /**\n * Get an HTML element from current cursor position.\n * When expectedTags is not specified, return value is the current node (if it is HTML element)\n * or its parent node (if current node is a Text node).\n * When expectedTags is specified, return value is the first ancestor of current node which has\n * one of the expected tags.\n * If no element found within editor by the given tag, return null.\n * @param selector Optional, an HTML selector to find HTML element with.\n * @param startFrom Start search from this node. If not specified, start from current focused position\n * @param event Optional, if specified, editor will try to get cached result from the event object first.\n * If it is not cached before, query from DOM and cache the result into the event object\n */\n public getElementAtCursor(\n selector?: string,\n startFrom?: Node,\n event?: PluginEvent\n ): HTMLElement | null {\n event = startFrom ? undefined : event; // Only use cache when startFrom is not specified, for different start position can have different result\n\n return (\n cacheGetEventData(event ?? null, 'GET_ELEMENT_AT_CURSOR_' + selector, () => {\n if (!startFrom) {\n let position = this.getFocusedPosition();\n startFrom = position?.node;\n }\n return (\n startFrom &&\n findClosestElementAncestor(startFrom, this.getCore().contentDiv, selector)\n );\n }) ?? null\n );\n }\n\n /**\n * Check if this position is at beginning of the editor.\n * This will return true if all nodes between the beginning of target node and the position are empty.\n * @param position The position to check\n * @returns True if position is at beginning of the editor, otherwise false\n */\n public isPositionAtBeginning(position: NodePosition): boolean {\n return isPositionAtBeginningOf(position, this.getCore().contentDiv);\n }\n\n /**\n * Get impacted regions from selection\n */\n public getSelectedRegions(\n type: RegionType | CompatibleRegionType = RegionType.Table\n ): Region[] {\n const selection = this.getSelectionRangeEx();\n const result: Region[] = [];\n const contentDiv = this.getCore().contentDiv;\n selection.ranges.forEach(range => {\n result.push(...(range ? getRegionsFromRange(contentDiv, range, type) : []));\n });\n return result.filter((value, index, self) => {\n return self.indexOf(value) === index;\n });\n }\n\n //#endregion\n\n //#region EVENT API\n\n public addDomEventHandler(\n nameOrMap: string | Record,\n handler?: DOMEventHandler\n ): () => void {\n const eventsToMap = typeof nameOrMap == 'string' ? { [nameOrMap]: handler! } : nameOrMap;\n const core = this.getCore();\n return core.api.attachDomEvent(core, eventsToMap);\n }\n\n /**\n * Trigger an event to be dispatched to all plugins\n * @param eventType Type of the event\n * @param data data of the event with given type, this is the rest part of PluginEvent with the given type\n * @param broadcast indicates if the event needs to be dispatched to all plugins\n * True means to all, false means to allow exclusive handling from one plugin unless no one wants that\n * @returns the event object which is really passed into plugins. Some plugin may modify the event object so\n * the result of this function provides a chance to read the modified result\n */\n public triggerPluginEvent(\n eventType: T,\n data: PluginEventData,\n broadcast: boolean = false\n ): PluginEventFromType {\n const core = this.getCore();\n let event = ({\n eventType,\n ...data,\n } as any) as PluginEventFromType;\n core.api.triggerEvent(core, event, broadcast);\n\n return event;\n }\n\n /**\n * Trigger a ContentChangedEvent\n * @param source Source of this event, by default is 'SetContent'\n * @param data additional data for this event\n */\n public triggerContentChangedEvent(\n source: ChangeSource | CompatibleChangeSource | string = ChangeSource.SetContent,\n data?: any\n ) {\n this.triggerPluginEvent(PluginEventType.ContentChanged, {\n source,\n data,\n });\n }\n\n //#endregion\n\n //#region Undo API\n\n /**\n * Undo last edit operation\n */\n public undo() {\n this.focus();\n const core = this.getCore();\n core.api.restoreUndoSnapshot(core, -1 /*step*/);\n }\n\n /**\n * Redo next edit operation\n */\n public redo() {\n this.focus();\n const core = this.getCore();\n core.api.restoreUndoSnapshot(core, 1 /*step*/);\n }\n\n /**\n * Add undo snapshot, and execute a format callback function, then add another undo snapshot, then trigger\n * ContentChangedEvent with given change source.\n * If this function is called nested, undo snapshot will only be added in the outside one\n * @param callback The callback function to perform formatting, returns a data object which will be used as\n * the data field in ContentChangedEvent if changeSource is not null.\n * @param changeSource The change source to use when fire ContentChangedEvent. When the value is not null,\n * a ContentChangedEvent will be fired with change source equal to this value\n * @param canUndoByBackspace True if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n public addUndoSnapshot(\n callback?: (start: NodePosition | null, end: NodePosition | null) => any,\n changeSource?: ChangeSource | CompatibleChangeSource | string,\n canUndoByBackspace?: boolean,\n additionalData?: ContentChangedData\n ) {\n const core = this.getCore();\n core.api.addUndoSnapshot(\n core,\n callback ?? null,\n changeSource ?? null,\n canUndoByBackspace ?? false,\n additionalData\n );\n }\n\n /**\n * Whether there is an available undo/redo snapshot\n */\n public getUndoState(): EditorUndoState {\n const { hasNewContent, snapshotsService } = this.getCore().undo;\n return {\n canUndo: hasNewContent || snapshotsService.canMove(-1 /*previousSnapshot*/),\n canRedo: snapshotsService.canMove(1 /*nextSnapshot*/),\n };\n }\n\n //#endregion\n\n //#region Misc\n\n /**\n * Get document which contains this editor\n * @returns The HTML document which contains this editor\n */\n public getDocument(): Document {\n return this.getCore().contentDiv.ownerDocument;\n }\n\n /**\n * Get the scroll container of the editor\n */\n public getScrollContainer(): HTMLElement {\n return this.getCore().domEvent.scrollContainer;\n }\n\n /**\n * Get custom data related to this editor\n * @param key Key of the custom data\n * @param getter Getter function. If custom data for the given key doesn't exist,\n * call this function to get one and store it if it is specified. Otherwise return undefined\n * @param disposer An optional disposer function to dispose this custom data when\n * dispose editor.\n */\n public getCustomData(key: string, getter?: () => T, disposer?: (value: T) => void): T {\n const core = this.getCore();\n return (core.lifecycle.customData[key] = core.lifecycle.customData[key] || {\n value: getter ? getter() : undefined,\n disposer,\n }).value as T;\n }\n\n /**\n * Check if editor is in IME input sequence\n * @returns True if editor is in IME input sequence, otherwise false\n */\n public isInIME(): boolean {\n return this.getCore().domEvent.isInIME;\n }\n\n /**\n * Get default format of this editor\n * @returns Default format object of this editor\n */\n public getDefaultFormat(): DefaultFormat {\n return this.getCore().lifecycle.defaultFormat ?? {};\n }\n\n /**\n * Get a content traverser for the whole editor\n * @param startNode The node to start from. If not passed, it will start from the beginning of the body\n */\n public getBodyTraverser(startNode?: Node): IContentTraverser {\n return ContentTraverser.createBodyTraverser(this.getCore().contentDiv, startNode);\n }\n\n /**\n * Get a content traverser for current selection\n * @returns A content traverser, or null if editor never got focus before\n */\n public getSelectionTraverser(range?: Range): IContentTraverser | null {\n range = range ?? this.getSelectionRange() ?? undefined;\n return range\n ? ContentTraverser.createSelectionTraverser(this.getCore().contentDiv, range)\n : null;\n }\n\n /**\n * Get a content traverser for current block element start from specified position\n * @param startFrom Start position of the traverser. Default value is ContentPosition.SelectionStart\n * @returns A content traverser, or null if editor never got focus before\n */\n public getBlockTraverser(\n startFrom: ContentPosition | CompatibleContentPosition = ContentPosition.SelectionStart\n ): IContentTraverser | null {\n let range = this.getSelectionRange();\n return range\n ? ContentTraverser.createBlockTraverser(this.getCore().contentDiv, range, startFrom)\n : null;\n }\n\n /**\n * Get a text traverser of current selection\n * @param event Optional, if specified, editor will try to get cached result from the event object first.\n * If it is not cached before, query from DOM and cache the result into the event object\n * @returns A content traverser, or null if editor never got focus before\n */\n public getContentSearcherOfCursor(event?: PluginEvent): IPositionContentSearcher | null {\n return cacheGetEventData(event ?? null, 'ContentSearcher', () => {\n let range = this.getSelectionRange();\n return (\n range &&\n new PositionContentSearcher(this.getCore().contentDiv, Position.getStart(range))\n );\n });\n }\n\n /**\n * Run a callback function asynchronously\n * @param callback The callback function to run\n * @returns a function to cancel this async run\n */\n public runAsync(callback: (editor: IEditor) => void) {\n let win = this.getCore().contentDiv.ownerDocument.defaultView || window;\n const handle = win.requestAnimationFrame(() => {\n if (!this.isDisposed() && callback) {\n callback(this);\n }\n });\n\n return () => {\n win.cancelAnimationFrame(handle);\n };\n }\n\n /**\n * Set DOM attribute of editor content DIV\n * @param name Name of the attribute\n * @param value Value of the attribute\n */\n public setEditorDomAttribute(name: string, value: string | null) {\n if (value === null) {\n this.getCore().contentDiv.removeAttribute(name);\n } else {\n this.getCore().contentDiv.setAttribute(name, value);\n }\n }\n\n /**\n * Get DOM attribute of editor content DIV, null if there is no such attribute.\n * @param name Name of the attribute\n */\n public getEditorDomAttribute(name: string): string | null {\n return this.getCore().contentDiv.getAttribute(name);\n }\n\n /**\n * @deprecated Use getVisibleViewport() instead.\n *\n * Get current relative distance from top-left corner of the given element to top-left corner of editor content DIV.\n * @param element The element to calculate from. If the given element is not in editor, return value will be null\n * @param addScroll When pass true, The return value will also add scrollLeft and scrollTop if any. So the value\n * may be different than what user is seeing from the view. When pass false, scroll position will be ignored.\n * @returns An [x, y] array which contains the left and top distances, or null if the given element is not in editor.\n */\n getRelativeDistanceToEditor(element: HTMLElement, addScroll?: boolean): number[] | null {\n if (this.contains(element)) {\n const contentDiv = this.getCore().contentDiv;\n const editorRect = contentDiv.getBoundingClientRect();\n const elementRect = element.getBoundingClientRect();\n\n if (editorRect && elementRect) {\n let x = elementRect.left - editorRect?.left;\n let y = elementRect.top - editorRect?.top;\n\n if (addScroll) {\n x += contentDiv.scrollLeft;\n y += contentDiv.scrollTop;\n }\n\n return [x, y];\n }\n }\n\n return null;\n }\n\n /**\n * Add a Content Edit feature.\n * @param feature The feature to add\n */\n public addContentEditFeature(feature: GenericContentEditFeature) {\n const core = this.getCore();\n feature?.keys.forEach(key => {\n let array = core.edit.features[key] || [];\n array.push(feature);\n core.edit.features[key] = array;\n });\n }\n\n /**\n * Remove a Content Edit feature.\n * @param feature The feature to remove\n */\n public removeContentEditFeature(feature: GenericContentEditFeature) {\n const core = this.getCore();\n feature?.keys.forEach(key => {\n const featureSet = core.edit.features[key];\n const index = featureSet?.indexOf(feature) ?? -1;\n if (index >= 0) {\n core.edit.features[key].splice(index, 1);\n if (core.edit.features[key].length < 1) {\n delete core.edit.features[key];\n }\n }\n });\n }\n\n /**\n * Get style based format state from current selection, including font name/size and colors\n */\n public getStyleBasedFormatState(node?: Node): StyleBasedFormatState {\n if (!node) {\n const range = this.getSelectionRange();\n node = (range && Position.getStart(range).normalize().node) ?? undefined;\n }\n const core = this.getCore();\n return core.api.getStyleBasedFormatState(core, node ?? null);\n }\n\n /**\n * Get the pendable format such as underline and bold\n * @param forceGetStateFromDOM If set to true, will force get the format state from DOM tree.\n * @returns The pending format state\n */\n public getPendableFormatState(forceGetStateFromDOM: boolean = false): PendableFormatState {\n const core = this.getCore();\n return core.api.getPendableFormatState(core, forceGetStateFromDOM);\n }\n\n /**\n * Ensure user will type into a container element rather than into the editor content DIV directly\n * @param position The position that user is about to type to\n * @param keyboardEvent Optional keyboard event object\n */\n public ensureTypeInContainer(position: NodePosition, keyboardEvent?: KeyboardEvent) {\n const core = this.getCore();\n core.api.ensureTypeInContainer(core, position, keyboardEvent);\n }\n\n //#endregion\n\n //#region Dark mode APIs\n\n /**\n * Set the dark mode state and transforms the content to match the new state.\n * @param nextDarkMode The next status of dark mode. True if the editor should be in dark mode, false if not.\n */\n public setDarkModeState(nextDarkMode?: boolean) {\n const isDarkMode = this.isDarkMode();\n\n if (isDarkMode == !!nextDarkMode) {\n return;\n }\n const core = this.getCore();\n\n core.api.transformColor(\n core,\n core.contentDiv,\n false /*includeSelf*/,\n null /*callback*/,\n nextDarkMode\n ? ColorTransformDirection.LightToDark\n : ColorTransformDirection.DarkToLight,\n true /*forceTransform*/,\n isDarkMode\n );\n\n this.triggerContentChangedEvent(\n nextDarkMode ? ChangeSource.SwitchToDarkMode : ChangeSource.SwitchToLightMode\n );\n }\n\n /**\n * Check if the editor is in dark mode\n * @returns True if the editor is in dark mode, otherwise false\n */\n public isDarkMode(): boolean {\n return this.getCore().lifecycle.isDarkMode;\n }\n\n /**\n * Transform the given node and all its child nodes to dark mode color if editor is in dark mode\n * @param node The node to transform\n */\n public transformToDarkColor(node: Node) {\n const core = this.getCore();\n core.api.transformColor(\n core,\n node,\n true /*includeSelf*/,\n null /*callback*/,\n ColorTransformDirection.LightToDark\n );\n }\n\n /**\n * Get a darkColorHandler object for this editor.\n */\n public getDarkColorHandler(): DarkColorHandler {\n return this.getCore().darkColorHandler;\n }\n\n /**\n * Make the editor in \"Shadow Edit\" mode.\n * In Shadow Edit mode, all format change will finally be ignored.\n * This can be used for building a live preview feature for format button, to allow user\n * see format result without really apply it.\n * This function can be called repeated. If editor is already in shadow edit mode, we can still\n * use this function to do more shadow edit operation.\n */\n public startShadowEdit() {\n const core = this.getCore();\n core.api.switchShadowEdit(core, true /*isOn*/);\n }\n\n /**\n * Leave \"Shadow Edit\" mode, all changes made during shadow edit will be discarded\n */\n public stopShadowEdit() {\n const core = this.getCore();\n core.api.switchShadowEdit(core, false /*isOn*/);\n }\n\n /**\n * Check if editor is in Shadow Edit mode\n */\n public isInShadowEdit() {\n return !!this.getCore().lifecycle.shadowEditFragment;\n }\n\n /**\n * Check if the given experimental feature is enabled\n * @param feature The feature to check\n */\n public isFeatureEnabled(\n feature: ExperimentalFeatures | CompatibleExperimentalFeatures\n ): boolean {\n return isFeatureEnabled(this.getCore().lifecycle.experimentalFeatures, feature);\n }\n\n /**\n * Get a function to convert HTML string to trusted HTML string.\n * By default it will just return the input HTML directly. To override this behavior,\n * pass your own trusted HTML handler to EditorOptions.trustedHTMLHandler\n * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types\n */\n getTrustedHTMLHandler(): TrustedHTMLHandler {\n return this.getCore().trustedHTMLHandler;\n }\n\n /**\n * @deprecated Use getZoomScale() instead\n */\n getSizeTransformer(): SizeTransformer {\n return this.getCore().sizeTransformer;\n }\n\n /**\n * Get current zoom scale, default value is 1\n * When editor is put under a zoomed container, need to pass the zoom scale number using EditorOptions.zoomScale\n * to let editor behave correctly especially for those mouse drag/drop behaviors\n * @returns current zoom scale number\n */\n getZoomScale(): number {\n return this.getCore().zoomScale;\n }\n\n /**\n * Set current zoom scale, default value is 1\n * When editor is put under a zoomed container, need to pass the zoom scale number using EditorOptions.zoomScale\n * to let editor behave correctly especially for those mouse drag/drop behaviors\n * @param scale The new scale number to set. It should be positive number and no greater than 10, otherwise it will be ignored.\n */\n setZoomScale(scale: number): void {\n const core = this.getCore();\n if (scale > 0 && scale <= 10) {\n const oldValue = core.zoomScale;\n core.zoomScale = scale;\n\n if (oldValue != scale) {\n this.triggerPluginEvent(\n PluginEventType.ZoomChanged,\n {\n oldZoomScale: oldValue,\n newZoomScale: scale,\n },\n true /*broadcast*/\n );\n }\n }\n }\n\n /**\n * Retrieves the rect of the visible viewport of the editor.\n */\n getVisibleViewport(): Rect | null {\n return this.getCore().getVisibleViewport();\n }\n\n /**\n * @returns the current EditorCore object\n * @throws a standard Error if there's no core object\n */\n protected getCore(): TEditorCore {\n if (!this.core) {\n throw new Error('Editor is already disposed');\n }\n return this.core;\n }\n\n //#endregion\n}\n","import createCorePlugins, { getPluginState } from '../corePlugins/createCorePlugins';\nimport DarkColorHandlerImpl from './DarkColorHandlerImpl';\nimport { arrayPush, getIntersectedRect, getObjectKeys } from 'roosterjs-editor-dom';\nimport { coreApiMap } from '../coreApi/coreApiMap';\nimport { CoreCreator, EditorCore, EditorOptions, EditorPlugin } from 'roosterjs-editor-types';\n\n/**\n * Create a new instance of Editor Core\n * @param contentDiv The DIV HTML element which will be the container element of editor\n * @param options An optional options object to customize the editor\n */\nexport const createEditorCore: CoreCreator = (contentDiv, options) => {\n const corePlugins = createCorePlugins(contentDiv, options);\n const plugins: EditorPlugin[] = [];\n\n getObjectKeys(corePlugins).forEach(name => {\n if (name == '_placeholder') {\n if (options.plugins) {\n arrayPush(plugins, options.plugins);\n }\n } else {\n plugins.push(corePlugins[name]);\n }\n });\n\n const pluginState = getPluginState(corePlugins);\n const zoomScale: number = (options.zoomScale ?? -1) > 0 ? options.zoomScale! : 1;\n const getVisibleViewport =\n options.getVisibleViewport ||\n (() => {\n const scrollContainer = pluginState.domEvent.scrollContainer;\n\n return getIntersectedRect(\n scrollContainer == core.contentDiv\n ? [scrollContainer]\n : [scrollContainer, core.contentDiv]\n );\n });\n\n const core: EditorCore = {\n contentDiv,\n api: {\n ...coreApiMap,\n ...(options.coreApiOverride || {}),\n },\n originalApi: coreApiMap,\n plugins: plugins.filter(x => !!x),\n ...pluginState,\n trustedHTMLHandler: options.trustedHTMLHandler || ((html: string) => html),\n zoomScale: zoomScale,\n sizeTransformer: options.sizeTransformer || ((size: number) => size / zoomScale),\n getVisibleViewport,\n imageSelectionBorderColor: options.imageSelectionBorderColor,\n darkColorHandler: new DarkColorHandlerImpl(contentDiv, pluginState.lifecycle.getDarkColor),\n };\n\n return core;\n};\n","import { ExperimentalFeatures } from 'roosterjs-editor-types';\nimport type { CompatibleExperimentalFeatures } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Check if the given experimental feature is enabled\n * @param featureSet All enabled features\n * @param feature The feature to check\n * @returns True if the given feature is enabled, otherwise false\n */\nexport function isFeatureEnabled(\n featureSet: (ExperimentalFeatures | CompatibleExperimentalFeatures)[] | undefined,\n feature: ExperimentalFeatures | CompatibleExperimentalFeatures\n) {\n return (featureSet || []).indexOf(feature) >= 0;\n}\n","// Classes\r\nexport { default as Editor } from './editor/Editor';\r\nexport { EditorBase } from './editor/EditorBase';\r\nexport { isFeatureEnabled } from './editor/isFeatureEnabled';\r\nexport { createEditorCore } from './editor/createEditorCore';\r\n","import contains from '../utils/contains';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * This presents a content block that can be represented by a single html block type element.\r\n * In most cases, it corresponds to an HTML block level element, i.e. P, DIV, LI, TD etc.\r\n */\r\nexport default class NodeBlockElement implements BlockElement {\r\n constructor(private element: HTMLElement) {}\r\n\r\n /**\r\n * Collapse this element to a single DOM element.\r\n * If the content nodes are separated in different root nodes, wrap them to a single node\r\n * If the content nodes are included in root node with other nodes, split root node\r\n */\r\n public collapseToSingleElement(): HTMLElement {\r\n return this.element;\r\n }\r\n\r\n /**\r\n * Get the start node of the block\r\n * For NodeBlockElement, start and end essentially refers to same node\r\n */\r\n public getStartNode(): Node {\r\n return this.element;\r\n }\r\n\r\n /**\r\n * Get the end node of the block\r\n * For NodeBlockElement, start and end essentially refers to same node\r\n */\r\n public getEndNode(): Node {\r\n return this.element;\r\n }\r\n\r\n /**\r\n * Checks if it refers to same block\r\n */\r\n public equals(blockElement: BlockElement): boolean {\r\n // Ideally there is only one unique way to generate a block so we only need to compare the startNode\r\n return this.element == blockElement.getStartNode();\r\n }\r\n\r\n /**\r\n * Checks if a block is after the current block\r\n */\r\n public isAfter(blockElement: BlockElement): boolean {\r\n // if the block's startNode is after current node endEnd, we say it is after\r\n return isNodeAfter(this.element, blockElement.getEndNode());\r\n }\r\n\r\n /**\r\n * Checks if a certain html node is within the block\r\n */\r\n public contains(node: Node): boolean {\r\n return contains(this.element, node, true /*treatSameNodeAsContain*/);\r\n }\r\n\r\n /**\r\n * Get the text content of this block element\r\n */\r\n public getTextContent(): string {\r\n return this.element?.textContent || '';\r\n }\r\n}\r\n","import collapseNodes from '../utils/collapseNodes';\r\nimport contains from '../utils/contains';\r\nimport createRange from '../selection/createRange';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport isBlockElement from '../utils/isBlockElement';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport wrap from '../utils/wrap';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\nimport { splitBalancedNodeRange } from '../utils/splitParentNode';\r\n\r\nconst STRUCTURE_NODE_TAGS = ['TD', 'TH', 'LI', 'BLOCKQUOTE'];\r\n\r\n/**\r\n * @internal\r\n * This represents a block that is identified by a start and end node\r\n * This is for cases like <root>Hello<BR>World</root>\r\n * in that case, Hello<BR> is a block, World is another block\r\n * Such block cannot be represented by a NodeBlockElement since they don't chained up\r\n * to a single parent node, instead they have a start and end\r\n * This start and end must be in same sibling level and have same parent in DOM tree\r\n */\r\nexport default class StartEndBlockElement implements BlockElement {\r\n constructor(private rootNode: Node, private startNode: Node, private endNode: Node) {}\r\n\r\n static getBlockContext(node: Node): HTMLElement | null {\r\n let currentNode: Node | null = node;\r\n while (currentNode && !isBlockElement(currentNode)) {\r\n currentNode = currentNode.parentNode;\r\n }\r\n return currentNode as HTMLElement;\r\n }\r\n\r\n /**\r\n * Collapse this element to a single DOM element.\r\n * If the content nodes are separated in different root nodes, wrap them to a single node\r\n * If the content nodes are included in root node with other nodes, split root node\r\n */\r\n public collapseToSingleElement(): HTMLElement {\r\n const nodeContext = StartEndBlockElement.getBlockContext(this.startNode);\r\n let nodes = nodeContext\r\n ? collapseNodes(nodeContext, this.startNode, this.endNode, true /*canSplitParent*/)\r\n : [];\r\n let blockContext = StartEndBlockElement.getBlockContext(this.startNode);\r\n while (\r\n nodes[0] &&\r\n nodes[0] != blockContext &&\r\n nodes[0].parentNode != this.rootNode &&\r\n STRUCTURE_NODE_TAGS.indexOf(getTagOfNode(nodes[0].parentNode)) < 0\r\n ) {\r\n const newNode = splitBalancedNodeRange(nodes);\r\n if (newNode) {\r\n nodes = [newNode];\r\n } else {\r\n break;\r\n }\r\n }\r\n return nodes.length == 1 && isBlockElement(nodes[0])\r\n ? (nodes[0] as HTMLElement)\r\n : wrap(nodes);\r\n }\r\n\r\n /**\r\n * Gets the start node\r\n */\r\n public getStartNode(): Node {\r\n return this.startNode;\r\n }\r\n\r\n /**\r\n * Gets the end node\r\n */\r\n public getEndNode(): Node {\r\n return this.endNode;\r\n }\r\n\r\n /**\r\n * Checks equals of two blocks\r\n */\r\n public equals(blockElement: BlockElement): boolean {\r\n return (\r\n this.startNode == blockElement.getStartNode() &&\r\n this.endNode == blockElement.getEndNode()\r\n );\r\n }\r\n\r\n /**\r\n * Checks if another block is after this current\r\n */\r\n public isAfter(blockElement: BlockElement): boolean {\r\n return isNodeAfter(this.getStartNode(), blockElement.getEndNode());\r\n }\r\n\r\n /**\r\n * Checks if an Html node is contained within the block\r\n */\r\n public contains(node: Node): boolean {\r\n return (\r\n contains(this.startNode, node, true /*treatSameNodeAsContain*/) ||\r\n contains(this.endNode, node, true /*treatSameNodeAsContain*/) ||\r\n (isNodeAfter(node, this.startNode) && isNodeAfter(this.endNode, node))\r\n );\r\n }\r\n\r\n /**\r\n * Get the text content of this block element\r\n */\r\n public getTextContent(): string {\r\n const range = createRange(this.getStartNode(), this.getEndNode());\r\n return range ? range.toString() : '';\r\n }\r\n}\r\n","import collapseNodes from '../utils/collapseNodes';\r\nimport contains from '../utils/contains';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport isBlockElement from '../utils/isBlockElement';\r\nimport NodeBlockElement from './NodeBlockElement';\r\nimport StartEndBlockElement from './StartEndBlockElement';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This produces a block element from a a node\r\n * It needs to account for various HTML structure. Examples:\r\n * 1) <root><div>abc</div></root>\r\n * This is most common the case, user passes in a node pointing to abc, and get back a block representing <div>abc</div>\r\n * 2) <root><p><br></p></root>\r\n * Common content for empty block, user passes node pointing to <br>, and get back a block representing <p><br></p>\r\n * 3) <root>abc</root>\r\n * Not common, but does happen. It is still a block in user's view. User passes in abc, and get back a start-end block representing abc\r\n * NOTE: abc could be just one node. However, since it is not a html block, it is more appropriate to use start-end block although they point to same node\r\n * 4) <root><div>abc<br>123</div></root>\r\n * A bit tricky, but can happen when user use Ctrl+Enter which simply inserts a <BR> to create a link break. There're two blocks:\r\n * block1: 1) abc<br> block2: 123\r\n * 5) <root><div>abc<div>123</div></div></root>\r\n * Nesting div and there is text node in same level as a DIV. Two blocks: 1) abc 2) <div>123</div>\r\n * 6) <root><div>abc<span>123<br>456</span></div></root>\r\n * This is really tricky. Essentially there is a <BR> in middle of a span breaking the span into two blocks;\r\n * block1: abc<span>123<br> block2: 456\r\n * In summary, given any arbitrary node (leaf), to identify the head and tail of the block, following rules need to be followed:\r\n * 1) to identify the head, it needs to crawl DOM tre left/up till a block node or BR is encountered\r\n * 2) same for identifying tail\r\n * 3) should also apply a block ceiling, meaning as it crawls up, it should stop at a block node\r\n * @param rootNode Root node of the scope, the block element will be inside of this node\r\n * @param node The node to get BlockElement start from\r\n */\r\nexport default function getBlockElementAtNode(\r\n rootNode: Node,\r\n node: Node | null\r\n): BlockElement | null {\r\n if (!contains(rootNode, node)) {\r\n return null;\r\n }\r\n\r\n // Identify the containing block. This serves as ceiling for traversing down below\r\n // NOTE: this container block could be just the rootNode,\r\n // which cannot be used to create block element. We will special case handle it later on\r\n let containerBlockNode = StartEndBlockElement.getBlockContext(node!);\r\n if (!containerBlockNode) {\r\n return null;\r\n } else if (containerBlockNode == node) {\r\n return new NodeBlockElement(containerBlockNode);\r\n }\r\n\r\n // Find the head and leaf node in the block\r\n let headNode = findHeadTailLeafNode(node!, containerBlockNode, false /*isTail*/);\r\n let tailNode = findHeadTailLeafNode(node!, containerBlockNode, true /*isTail*/);\r\n\r\n if (!headNode || !tailNode) {\r\n return null;\r\n }\r\n\r\n // At this point, we have the head and tail of a block, here are some examples and where head and tail point to\r\n // 1) <root><div>hello<br></div></root>, head: hello, tail: <br>\r\n // 2) <root><div>hello<span style=\"font-family: Arial\">world</span></div></root>, head: hello, tail: world\r\n // Both are actually completely and exclusively wrapped in a parent div, and can be represented with a Node block\r\n // So we shall try to collapse as much as we can to the nearest common ancestor\r\n let nodes = collapseNodes(rootNode, headNode, tailNode, false /*canSplitParent*/);\r\n\r\n if (nodes.length === 0) {\r\n return null;\r\n }\r\n\r\n headNode = nodes[0];\r\n tailNode = nodes[nodes.length - 1];\r\n\r\n if (headNode.parentNode != tailNode.parentNode) {\r\n // Un-Balanced start and end, create a start-end block\r\n return new StartEndBlockElement(rootNode, headNode, tailNode);\r\n } else {\r\n // Balanced start and end (point to same parent), need to see if further collapsing can be done\r\n while (!headNode.previousSibling && !tailNode.nextSibling) {\r\n let parentNode = headNode.parentNode;\r\n if (parentNode == containerBlockNode) {\r\n // Has reached the container block\r\n if (containerBlockNode != rootNode) {\r\n // If the container block is not the root, use the container block\r\n headNode = tailNode = parentNode;\r\n }\r\n break;\r\n } else if (parentNode && parentNode != rootNode) {\r\n // Continue collapsing to parent\r\n headNode = tailNode = parentNode;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // If head and tail are same and it is a block element, create NodeBlock, otherwise start-end block\r\n return headNode == tailNode && isBlockElement(headNode)\r\n ? new NodeBlockElement(headNode as HTMLElement)\r\n : new StartEndBlockElement(rootNode, headNode, tailNode);\r\n }\r\n}\r\n\r\n/**\r\n * Given a node and container block, identify the first/last leaf node\r\n * A leaf node is defined as deepest first/last node in a block\r\n * i.e. <div><span style=\"font-family: Arial\">abc</span></div>, abc is the head leaf of the block\r\n * Often <br> or a child <div> is used to create a block. In that case, the leaf after the sibling div or br should be the head leaf\r\n * i.e. <div>123<br>abc</div>, abc is the head of a block because of a previous sibling <br>\r\n * i.e. <div><div>123</div>abc</div>, abc is also the head of a block because of a previous sibling <div>\r\n */\r\nfunction findHeadTailLeafNode(node: Node, containerBlockNode: Node, isTail: boolean): Node {\r\n let result = node;\r\n\r\n if (getTagOfNode(result) == 'BR' && isTail) {\r\n return result;\r\n }\r\n\r\n while (result) {\r\n let sibling: Node | null = node;\r\n while (node.parentNode && !(sibling = isTail ? node.nextSibling : node.previousSibling)) {\r\n node = node.parentNode;\r\n if (node == containerBlockNode) {\r\n return result;\r\n }\r\n }\r\n\r\n while (sibling) {\r\n if (isBlockElement(sibling)) {\r\n return result;\r\n } else if (getTagOfNode(sibling) == 'BR') {\r\n return isTail ? sibling : result;\r\n }\r\n\r\n node = sibling;\r\n sibling = isTail ? node.firstChild : node.lastChild;\r\n }\r\n\r\n result = node;\r\n }\r\n return result;\r\n}\r\n","import getBlockElementAtNode from './getBlockElementAtNode';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get the first/last BlockElement of under the root node.\r\n * If no suitable BlockElement found, returns null\r\n * @param rootNode The root node to get BlockElement from\r\n * @param isFirst True to get first BlockElement, false to get last BlockElement\r\n */\r\nexport default function getFirstLastBlockElement(\r\n rootNode: Node,\r\n isFirst: boolean\r\n): BlockElement | null {\r\n let node: Node | null = rootNode;\r\n do {\r\n node = node && (isFirst ? node.firstChild : node.lastChild);\r\n } while (node && node.firstChild);\r\n return (node && getBlockElementAtNode(rootNode, node)) || null;\r\n}\r\n","import applyFormat from '../utils/applyFormat';\nimport applyTextStyle from '../inlineElements/applyTextStyle';\nimport handleImagePaste from './handleImagePaste';\nimport handleTextPaste from './handleTextPaste';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport retrieveMetadataFromClipboard from './retrieveMetadataFromClipboard';\nimport sanitizeContent from './sanitizePasteContent';\nimport {\n BeforePasteEvent,\n ClipboardData,\n DefaultFormat,\n EditorCore,\n NodePosition,\n} from 'roosterjs-editor-types';\n\n/**\n * Create a DocumentFragment for paste from a ClipboardData\n * @param core The EditorCore object.\n * @param clipboardData Clipboard data retrieved from clipboard\n * @param position The position to paste to\n * @param pasteAsText True to force use plain text as the content to paste, false to choose HTML or Image if any\n * @param applyCurrentStyle True if apply format of current selection to the pasted content,\n * @param pasteAsImage Whether to force paste as image\n * @param event Event to trigger.\n * false to keep original format\n */\nexport default function createFragmentFromClipboardData(\n core: EditorCore,\n clipboardData: ClipboardData,\n position: NodePosition | null,\n pasteAsText: boolean,\n applyCurrentStyle: boolean,\n pasteAsImage: boolean,\n event: BeforePasteEvent\n) {\n const { fragment } = event;\n const { rawHtml, text, imageDataUri } = clipboardData;\n let doc: Document | undefined = rawHtml\n ? new DOMParser().parseFromString(core.trustedHTMLHandler(rawHtml), 'text/html')\n : undefined;\n\n // Step 2: Retrieve Metadata from Html and the Html that was copied.\n retrieveMetadataFromClipboard(doc, event, core.trustedHTMLHandler);\n\n // Step 3: Fill the BeforePasteEvent object, especially the fragment for paste\n if ((pasteAsImage && imageDataUri) || (!pasteAsText && !text && imageDataUri)) {\n // Paste image\n handleImagePaste(imageDataUri, fragment);\n } else if (!pasteAsText && rawHtml && doc ? doc.body : false) {\n moveChildNodes(fragment, doc?.body);\n\n if (applyCurrentStyle && position) {\n const format = getCurrentFormat(core, position.node);\n applyTextStyle(fragment, node => applyFormat(node, format));\n }\n } else if (text) {\n // Paste text\n handleTextPaste(text, position, fragment);\n }\n\n // Step 4: Trigger BeforePasteEvent so that plugins can do proper change before paste\n core.api.triggerEvent(core, event, true /*broadcast*/);\n\n // Step 5. Sanitize the fragment before paste to make sure the content is safe\n sanitizeContent(event, position);\n\n return fragment;\n}\n\nfunction getCurrentFormat(core: EditorCore, node: Node): DefaultFormat {\n const pendableFormat = core.api.getPendableFormatState(core, true /** forceGetStateFromDOM*/);\n const styleBasedFormat = core.api.getStyleBasedFormatState(core, node);\n return {\n fontFamily: styleBasedFormat.fontName,\n fontSize: styleBasedFormat.fontSize,\n textColor: styleBasedFormat.textColor,\n backgroundColor: styleBasedFormat.backgroundColor,\n textColors: styleBasedFormat.textColors,\n backgroundColors: styleBasedFormat.backgroundColors,\n bold: pendableFormat.isBold,\n italic: pendableFormat.isItalic,\n underline: pendableFormat.isUnderline,\n };\n}\n","import extractClipboardItems from './extractClipboardItems';\nimport extractClipboardItemsForIE from './extractClipboardItemsForIE';\nimport toArray from '../jsUtils/toArray';\nimport { Browser } from '../utils/Browser';\nimport { ClipboardData, ExtractClipboardEventOption } from 'roosterjs-editor-types';\n\ninterface WindowForIE extends Window {\n clipboardData: DataTransfer;\n}\n\n/**\n * @deprecated Use extractClipboardItems and extractClipboardItemsForIE instead\n * Extract a Clipboard event\n * @param event The paste event\n * @param callback Callback function when data is ready\n * @param options Options to retrieve more items from the event, including HTML string and other customized items\n * @param rangeBeforePaste Optional range to be removed when pasting in Android\n * @returns An object with the following properties:\n * types: Available types from the clipboard event\n * text: Plain text from the clipboard event\n * image: Image file from the clipboard event\n * html: Html string from the clipboard event. When set to null, it means there's no HTML found from the event.\n * When set to undefined, it means can't retrieve HTML string, there may be HTML string but direct retrieving is\n * not supported by browser.\n */\nexport default function extractClipboardEvent(\n event: ClipboardEvent,\n callback: (clipboardData: ClipboardData) => void,\n options?: ExtractClipboardEventOption,\n rangeBeforePaste?: Range\n) {\n const dataTransfer =\n event.clipboardData ||\n (((event.target).ownerDocument?.defaultView)).clipboardData;\n\n if (dataTransfer.items) {\n event.preventDefault();\n extractClipboardItems(toArray(dataTransfer.items), options).then(\n (clipboardData: ClipboardData) => {\n removeContents(rangeBeforePaste);\n callback(clipboardData);\n }\n );\n } else {\n extractClipboardItemsForIE(dataTransfer, callback, options);\n }\n}\n\nfunction removeContents(range?: Range) {\n if (Browser.isAndroid && range) {\n range.deleteContents();\n }\n}\n","import readFile from '../utils/readFile';\r\nimport { Browser } from '../utils/Browser';\r\nimport {\r\n ClipboardData,\r\n ContentType,\r\n ContentTypePrefix,\r\n EdgeLinkPreview,\r\n ExtractClipboardItemsOption,\r\n} from 'roosterjs-editor-types';\r\n\r\n// HTML header to indicate where is the HTML content started from.\r\n// Sample header:\r\n// Version:0.9\r\n// StartHTML:71\r\n// EndHTML:170\r\n// StartFragment:140\r\n// EndFragment:160\r\n// StartSelection:140\r\n// EndSelection:160\r\nconst CLIPBOARD_HTML_HEADER_REGEX = /^Version:[0-9\\.]+\\s+StartHTML:\\s*([0-9]+)\\s+EndHTML:\\s*([0-9]+)\\s+/i;\r\nconst OTHER_TEXT_TYPE = ContentTypePrefix.Text + '*';\r\nconst EDGE_LINK_PREVIEW = 'link-preview';\r\nconst ContentHandlers: {\r\n [contentType: string]: (data: ClipboardData, value: string, type?: string) => void;\r\n} = {\r\n [ContentType.HTML]: (data, value) =>\r\n (data.rawHtml = Browser.isEdge ? workaroundForEdge(value) : value),\r\n [ContentType.PlainText]: (data, value) => (data.text = value),\r\n [OTHER_TEXT_TYPE]: (data, value, type?) => !!type && (data.customValues[type] = value),\r\n [ContentTypePrefix.Text + EDGE_LINK_PREVIEW]: tryParseLinkPreview,\r\n};\r\n\r\n/**\r\n * Extract clipboard items to be a ClipboardData object for IE\r\n * @param items The clipboard items retrieve from a DataTransfer object\r\n * @param callback Callback function when data is ready\r\n * @returns An object with the following properties:\r\n * types: Available types from the clipboard event\r\n * text: Plain text from the clipboard event\r\n * image: Image file from the clipboard event\r\n * html: Html string from the clipboard event. When set to null, it means there's no HTML found from the event.\r\n * When set to undefined, it means can't retrieve HTML string, there may be HTML string but direct retrieving is\r\n * not supported by browser.\r\n */\r\nexport default function extractClipboardItems(\r\n items: DataTransferItem[],\r\n options?: ExtractClipboardItemsOption\r\n): Promise {\r\n const data: ClipboardData = {\r\n types: [],\r\n text: '',\r\n image: null,\r\n files: [],\r\n rawHtml: null,\r\n customValues: {},\r\n };\r\n\r\n return Promise.all(\r\n (items || []).map(item => {\r\n const type = item.type;\r\n\r\n if (type.indexOf(ContentTypePrefix.Image) == 0 && !data.image && item.kind == 'file') {\r\n data.types.push(type);\r\n data.image = item.getAsFile();\r\n return new Promise(resolve => {\r\n if (data.image) {\r\n readFile(data.image, dataUrl => {\r\n data.imageDataUri = dataUrl;\r\n resolve();\r\n });\r\n } else {\r\n resolve();\r\n }\r\n });\r\n } else if (item.kind == 'file') {\r\n return new Promise(resolve => {\r\n const file = item.getAsFile();\r\n if (!!file) {\r\n data.types.push(type);\r\n data.files!.push(file);\r\n }\r\n resolve();\r\n });\r\n } else {\r\n const customType = getAllowedCustomType(type, options?.allowedCustomPasteType);\r\n const handler =\r\n ContentHandlers[type] || (customType ? ContentHandlers[OTHER_TEXT_TYPE] : null);\r\n return new Promise(resolve =>\r\n handler\r\n ? item.getAsString(value => {\r\n data.types.push(type);\r\n handler(data, value, customType);\r\n resolve();\r\n })\r\n : resolve()\r\n );\r\n }\r\n })\r\n ).then(() => data);\r\n}\r\n\r\n/**\r\n * Edge sometimes doesn't remove the headers, which cause we paste more things then expected.\r\n * So we need to remove it in our code\r\n * @param html The HTML string got from clipboard\r\n */\r\nfunction workaroundForEdge(html: string) {\r\n const headerValues = CLIPBOARD_HTML_HEADER_REGEX.exec(html);\r\n\r\n if (headerValues?.length == 3) {\r\n const start = parseInt(headerValues[1]);\r\n const end = parseInt(headerValues[2]);\r\n if (start > 0 && end > start) {\r\n html = html.substring(start, end);\r\n }\r\n }\r\n\r\n return html;\r\n}\r\n\r\nfunction tryParseLinkPreview(data: ClipboardData, value: string) {\r\n try {\r\n data.customValues[EDGE_LINK_PREVIEW] = value;\r\n data.linkPreview = JSON.parse(value) as EdgeLinkPreview;\r\n } catch {}\r\n}\r\n\r\nfunction getAllowedCustomType(type: string, allowedCustomPasteType?: string[]) {\r\n const textType =\r\n type.indexOf(ContentTypePrefix.Text) == 0\r\n ? type.substring(ContentTypePrefix.Text.length)\r\n : null;\r\n const index =\r\n allowedCustomPasteType && textType ? allowedCustomPasteType.indexOf(textType) : -1;\r\n return textType && index >= 0 ? textType : undefined;\r\n}\r\n","import readFile from '../utils/readFile';\r\nimport toArray from '../jsUtils/toArray';\r\nimport {\r\n ClipboardData,\r\n ContentTypePrefix,\r\n ExtractClipboardItemsForIEOptions,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Extract clipboard items to be a ClipboardData object for IE\r\n * @param dataTransfer The clipboard items retrieve from a DataTransfer object\r\n * @param callback Callback function when data is ready\r\n * @returns An object with the following properties:\r\n * types: Available types from the clipboard event\r\n * text: Plain text from the clipboard event\r\n * image: Image file from the clipboard event\r\n * html: Html string from the clipboard event. When set to null, it means there's no HTML found from the event.\r\n * When set to undefined, it means can't retrieve HTML string, there may be HTML string but direct retrieving is\r\n * not supported by browser.\r\n */\r\nexport default function extractClipboardItemsForIE(\r\n dataTransfer: DataTransfer,\r\n callback: (data: ClipboardData) => void,\r\n options?: ExtractClipboardItemsForIEOptions\r\n) {\r\n const clipboardData: ClipboardData = {\r\n types: dataTransfer.types ? toArray(dataTransfer.types) : [],\r\n text: dataTransfer.getData('text'),\r\n image: null,\r\n files: [],\r\n rawHtml: null,\r\n customValues: {},\r\n };\r\n\r\n for (let i = 0; i < (dataTransfer.files ? dataTransfer.files.length : 0); i++) {\r\n let file = dataTransfer.files.item(i);\r\n if (file?.type?.indexOf(ContentTypePrefix.Image) == 0) {\r\n clipboardData.image = file;\r\n break;\r\n }\r\n }\r\n\r\n const nextStep = () => {\r\n if (clipboardData.image) {\r\n readFile(clipboardData.image, dataUrl => {\r\n clipboardData.imageDataUri = dataUrl;\r\n callback(clipboardData);\r\n });\r\n } else {\r\n callback(clipboardData);\r\n }\r\n };\r\n\r\n if (options?.getTempDiv && options?.removeTempDiv) {\r\n const div = options.getTempDiv();\r\n div.contentEditable = 'true';\r\n div.innerHTML = '';\r\n div.focus();\r\n div.ownerDocument?.defaultView?.setTimeout(() => {\r\n clipboardData.rawHtml = div.innerHTML;\r\n options.removeTempDiv?.(div);\r\n nextStep();\r\n }, 0);\r\n } else {\r\n clipboardData.rawHtml = undefined;\r\n nextStep();\r\n }\r\n}\r\n","import { PasteType } from 'roosterjs-editor-types';\n\n/**\n * Get the paste type that will be used corresponding to the configuration\n * @param pasteAsText Whether to paste as Text\n * @param applyCurrentStyle Whether to apply the current format to the content\n * @param pasteAsImage Whether to only paste the image\n * @returns\n */\nexport default function getPasteType(\n pasteAsText: boolean,\n applyCurrentStyle: boolean,\n pasteAsImage: boolean\n) {\n if (pasteAsText) {\n return PasteType.AsPlainText;\n } else if (applyCurrentStyle) {\n return PasteType.MergeFormat;\n } else if (pasteAsImage) {\n return PasteType.AsImage;\n } else {\n return PasteType.Normal;\n }\n}\n","/**\n * Handles the content when using the Image Paste Option\n * @param imageDataUri the image uri to use for the image\n * @param fragment fragment that will contain the content to paste.\n */\nexport default function handleImagePaste(imageDataUri: string, fragment: DocumentFragment) {\n const img = fragment.ownerDocument.createElement('img');\n img.style.maxWidth = '100%';\n img.src = imageDataUri;\n fragment.appendChild(img);\n}\n","import wrap from '../utils/wrap';\nimport { NodePosition } from 'roosterjs-editor-types';\n\nconst NBSP_HTML = '\\u00A0';\nconst ENSP_HTML = '\\u2002';\nconst TAB_SPACES = 6;\n\n/**\n * handle the content when using the text only option\n * @param text Text from clipboard\n * @param position current position of the clipboard\n * @param fragment fragment that contains the paste content.\n */\nexport default function handleTextPaste(\n text: string,\n position: NodePosition | null,\n fragment: DocumentFragment\n) {\n const document = fragment.ownerDocument;\n text.split('\\n').forEach((line, index, lines) => {\n line = line\n .replace(/^ /g, NBSP_HTML)\n .replace(/\\r/g, '')\n .replace(/ {2}/g, ' ' + NBSP_HTML);\n\n if (line.includes('\\t')) {\n line = transformTabCharacters(line, index === 0 ? position?.offset : 0);\n }\n\n const textNode = document.createTextNode(line);\n\n // There are 3 scenarios:\n // 1. Single line: Paste as it is\n // 2. Two lines: Add
                between the lines\n // 3. 3 or More lines, For first and last line, paste as it is. For middle lines, wrap with DIV, and add BR if it is empty line\n if (lines.length == 2 && index == 0) {\n // 1 of 2 lines scenario, add BR\n fragment.appendChild(textNode);\n fragment.appendChild(document.createElement('br'));\n } else if (index > 0 && index < lines.length - 1) {\n // Middle line of >=3 lines scenario, wrap with DIV\n fragment.appendChild(wrap(line == '' ? document.createElement('br') : textNode));\n } else {\n // All others, paste as it is\n fragment.appendChild(textNode);\n }\n });\n}\n\n/**\n * @internal\n * Transform \\t characters into EN SPACE characters\n * @param input string NOT containing \\n characters\n * @example t(\"\\thello\", 2) => \"    hello\"\n */\n\nexport function transformTabCharacters(input: string, initialOffset: number = 0) {\n let line = input;\n let tIndex: number;\n while ((tIndex = line.indexOf('\\t')) != -1) {\n const lineBefore = line.slice(0, tIndex);\n const lineAfter = line.slice(tIndex + 1);\n const tabCount = TAB_SPACES - ((lineBefore.length + initialOffset) % TAB_SPACES);\n const tabStr = Array(tabCount).fill(ENSP_HTML).join('');\n line = lineBefore + tabStr + lineAfter;\n }\n return line;\n}\n","import getTagOfNode from '../utils/getTagOfNode';\nimport toArray from '../jsUtils/toArray';\nimport { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\n\nconst START_FRAGMENT = '';\nconst END_FRAGMENT = '';\n\n/**\n * Retrieves the metadata from the content inside of the clipboard\n * @param doc Document parsed from the clipboard\n * @param event Before Paste event\n * @param trustedHTMLHandler the trusted html handler to sanitize the content.\n */\nexport default function retrieveMetadataFromClipboard(\n doc: Document | undefined,\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { clipboardData, sanitizingOption } = event;\n const { rawHtml } = clipboardData;\n if (rawHtml && doc?.body) {\n const attributes = doc.querySelector('html')?.attributes;\n (attributes ? toArray(attributes) : []).reduce((attrs, attr) => {\n attrs[attr.name] = attr.value;\n return attrs;\n }, event.htmlAttributes);\n toArray(doc.querySelectorAll('meta')).reduce((attrs, meta) => {\n attrs[meta.name] = meta.content;\n return attrs;\n }, event.htmlAttributes);\n\n clipboardData.htmlFirstLevelChildTags = [];\n doc?.body.normalize();\n\n for (let i = 0; i < doc?.body.childNodes.length; i++) {\n const node = doc?.body.childNodes.item(i);\n if (node.nodeType == Node.TEXT_NODE) {\n const trimmedString = node.nodeValue?.replace(/(\\r\\n|\\r|\\n)/gm, '').trim();\n if (!trimmedString) {\n continue;\n }\n }\n const nodeTag = getTagOfNode(node);\n if (node.nodeType != Node.COMMENT_NODE) {\n clipboardData.htmlFirstLevelChildTags.push(nodeTag);\n }\n }\n // Move all STYLE nodes into header, and save them into sanitizing options.\n // Because if we directly move them into a fragment, all sheets under STYLE will be lost.\n processStyles(doc, style => {\n doc?.head.appendChild(style);\n sanitizingOption.additionalGlobalStyleNodes.push(style);\n });\n\n const startIndex = rawHtml.indexOf(START_FRAGMENT);\n const endIndex = rawHtml.lastIndexOf(END_FRAGMENT);\n\n if (startIndex >= 0 && endIndex >= startIndex + START_FRAGMENT.length) {\n event.htmlBefore = rawHtml.substr(0, startIndex);\n event.htmlAfter = rawHtml.substr(endIndex + END_FRAGMENT.length);\n clipboardData.html = rawHtml.substring(startIndex + START_FRAGMENT.length, endIndex);\n doc.body.innerHTML = trustedHTMLHandler(clipboardData.html);\n\n // Remove style nodes just added by setting innerHTML of body since we already have all\n // style nodes in header.\n // Here we use doc.body instead of doc because we only want to remove STYLE nodes under BODY\n // and the nodes under HEAD are still used when convert global CSS to inline\n processStyles(doc.body, style => style.parentNode?.removeChild(style));\n }\n }\n}\n\nfunction processStyles(node: ParentNode, callback: (style: HTMLStyleElement) => void) {\n toArray(node.querySelectorAll('style')).forEach(callback);\n}\n","import getInheritableStyles from '../htmlSanitizer/getInheritableStyles';\nimport HtmlSanitizer from '../htmlSanitizer/HtmlSanitizer';\nimport { BeforePasteEvent, NodePosition } from 'roosterjs-editor-types';\n\n/**\n * Sanitize the content from the pasted content\n * @param event The before paste event\n * @param position the position of the cursor\n */\nexport default function sanitizePasteContent(\n event: BeforePasteEvent,\n position: NodePosition | null\n) {\n const { fragment } = event;\n const sanitizer = new HtmlSanitizer(event.sanitizingOption);\n sanitizer.convertGlobalCssToInlineCss(fragment);\n sanitizer.sanitize(fragment, position ? getInheritableStyles(position.element) : undefined);\n}\n","import contains from '../utils/contains';\r\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getFirstLastBlockElement from '../blockElements/getFirstLastBlockElement';\r\nimport getInlineElementAtNode from '../inlineElements/getInlineElementAtNode';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { BlockElement, InlineElement } from 'roosterjs-editor-types';\r\nimport { getFirstInlineElement } from '../inlineElements/getFirstLastInlineElement';\r\n\r\n/**\r\n * @internal\r\n * provides a scope object for traversing the entire editor body starting from the beginning\r\n */\r\nexport default class BodyScoper implements TraversingScoper {\r\n private startNode: Node | null;\r\n\r\n /**\r\n * Construct a new instance of BodyScoper class\r\n * @param rootNode Root node of the body\r\n * @param startNode The node to start from. If not passed, it will start from the beginning of the body\r\n */\r\n constructor(public rootNode: Node, startNode?: Node) {\r\n this.startNode = contains(rootNode, startNode) ? startNode! : null;\r\n }\r\n\r\n /**\r\n * Get the start block element\r\n */\r\n public getStartBlockElement(): BlockElement | null {\r\n return this.startNode\r\n ? getBlockElementAtNode(this.rootNode, this.startNode)\r\n : getFirstLastBlockElement(this.rootNode, true /*isFirst*/);\r\n }\r\n\r\n /**\r\n * Get the start inline element\r\n */\r\n public getStartInlineElement(): InlineElement | null {\r\n return this.startNode\r\n ? getInlineElementAtNode(this.rootNode, this.startNode)\r\n : getFirstInlineElement(this.rootNode);\r\n }\r\n\r\n /**\r\n * Since the scope is global, all blocks under the root node are in scope\r\n */\r\n public isBlockInScope(blockElement: BlockElement): boolean {\r\n return contains(this.rootNode, blockElement.getStartNode());\r\n }\r\n\r\n /**\r\n * Since we're at body scope, inline elements never need to be trimmed\r\n */\r\n public trimInlineElement(inlineElement: InlineElement): InlineElement {\r\n return inlineElement;\r\n }\r\n}\r\n","import BodyScoper from './BodyScoper';\r\nimport EmptyInlineElement from '../inlineElements/EmptyInlineElement';\r\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getInlineElementAtNode from '../inlineElements/getInlineElementAtNode';\r\nimport PartialInlineElement from '../inlineElements/PartialInlineElement';\r\nimport SelectionBlockScoper from './SelectionBlockScoper';\r\nimport SelectionScoper from './SelectionScoper';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { getInlineElementBeforeAfter } from '../inlineElements/getInlineElementBeforeAfter';\r\nimport { getLeafSibling } from '../utils/getLeafSibling';\r\nimport type { CompatibleContentPosition } from 'roosterjs-editor-types/lib/compatibleTypes';\r\nimport {\r\n BlockElement,\r\n ContentPosition,\r\n IContentTraverser,\r\n InlineElement,\r\n NodePosition,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * The provides traversing of content inside editor.\r\n * There are two ways to traverse, block by block, or inline element by inline element\r\n * Block and inline traversing is independent from each other, meaning if you traverse block by block, it does not change\r\n * the current inline element position\r\n */\r\nexport default class ContentTraverser implements IContentTraverser {\r\n private currentInline: InlineElement | null = null;\r\n private currentBlock: BlockElement | null = null;\r\n\r\n /**\r\n * Create a content traverser for the whole body of given root node\r\n * @param scoper Traversing scoper object to help scope the traversing\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n private constructor(private scoper: TraversingScoper, private skipTags?: string[]) {}\r\n\r\n /**\r\n * Create a content traverser for the whole body of given root node\r\n * @param rootNode The root node to traverse in\r\n * @param startNode The node to start from. If not passed, it will start from the beginning of the body\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n public static createBodyTraverser(\r\n rootNode: Node,\r\n startNode?: Node,\r\n skipTags?: string[]\r\n ): IContentTraverser {\r\n return new ContentTraverser(new BodyScoper(rootNode, startNode));\r\n }\r\n\r\n /**\r\n * Create a content traverser for the given selection\r\n * @param rootNode The root node to traverse in\r\n * @param range The selection range to scope the traversing\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n public static createSelectionTraverser(\r\n rootNode: Node,\r\n range: Range,\r\n skipTags?: string[]\r\n ): IContentTraverser {\r\n return new ContentTraverser(new SelectionScoper(rootNode, range), skipTags);\r\n }\r\n\r\n /**\r\n * Create a content traverser for a block element which contains the given position\r\n * @param rootNode The root node to traverse in\r\n * @param position A position inside a block, traversing will be scoped within this block.\r\n * If passing a range, the start position of this range will be used\r\n * @param startFrom Start position of traversing. The value can be Begin, End, SelectionStart\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\n public static createBlockTraverser(\r\n rootNode: Node,\r\n position: NodePosition | Range,\r\n start: ContentPosition | CompatibleContentPosition = ContentPosition.SelectionStart,\r\n skipTags?: string[]\r\n ): IContentTraverser {\r\n return new ContentTraverser(new SelectionBlockScoper(rootNode, position, start));\r\n }\r\n\r\n /**\r\n * Get current block\r\n */\r\n public get currentBlockElement(): BlockElement | null {\r\n // Prepare currentBlock from the scoper\r\n if (!this.currentBlock) {\r\n this.currentBlock = this.scoper.getStartBlockElement();\r\n }\r\n\r\n return this.currentBlock;\r\n }\r\n\r\n /**\r\n * Get next block element\r\n */\r\n public getNextBlockElement(): BlockElement | null {\r\n return this.getPreviousNextBlockElement(true /*isNext*/);\r\n }\r\n\r\n /**\r\n * Get previous block element\r\n */\r\n public getPreviousBlockElement(): BlockElement | null {\r\n return this.getPreviousNextBlockElement(false /*isNext*/);\r\n }\r\n\r\n private getPreviousNextBlockElement(isNext: boolean): BlockElement | null {\r\n let current = this.currentBlockElement;\r\n\r\n if (!current) {\r\n return null;\r\n }\r\n\r\n let leaf = getLeafSibling(\r\n this.scoper.rootNode,\r\n isNext ? current.getEndNode() : current.getStartNode(),\r\n isNext,\r\n this.skipTags\r\n );\r\n let newBlock = leaf ? getBlockElementAtNode(this.scoper.rootNode, leaf) : null;\r\n\r\n // Make sure this is right block:\r\n // 1) the block is in scope per scoper\r\n // 2) the block is after (for next) or before (for previous) the current block\r\n // Then:\r\n // 1) Re-position current block to newly found block\r\n if (\r\n newBlock &&\r\n this.scoper.isBlockInScope(newBlock) &&\r\n ((isNext && newBlock.isAfter(current)) || (!isNext && current.isAfter(newBlock)))\r\n ) {\r\n this.currentBlock = newBlock;\r\n return this.currentBlock;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Current inline element getter\r\n */\r\n public get currentInlineElement(): InlineElement | null {\r\n // Retrieve a start inline from scoper\r\n if (!this.currentInline) {\r\n this.currentInline = this.scoper.getStartInlineElement();\r\n }\r\n\r\n return this.currentInline instanceof EmptyInlineElement ? null : this.currentInline;\r\n }\r\n\r\n /**\r\n * Get next inline element\r\n */\r\n public getNextInlineElement(): InlineElement | null {\r\n return this.getPreviousNextInlineElement(true /*isNext*/);\r\n }\r\n\r\n /**\r\n * Get previous inline element\r\n */\r\n public getPreviousInlineElement(): InlineElement | null {\r\n return this.getPreviousNextInlineElement(false /*isNext*/);\r\n }\r\n\r\n private getPreviousNextInlineElement(isNext: boolean): InlineElement | null {\r\n let current = this.currentInlineElement || this.currentInline;\r\n let newInline: InlineElement | null;\r\n\r\n if (!current) {\r\n return null;\r\n }\r\n\r\n if (current instanceof EmptyInlineElement) {\r\n newInline = getInlineElementBeforeAfter(\r\n this.scoper.rootNode,\r\n current.getStartPosition(),\r\n isNext\r\n );\r\n if (newInline && !current.getParentBlock().contains(newInline.getContainerNode())) {\r\n newInline = null;\r\n }\r\n } else {\r\n newInline = getNextPreviousInlineElement(this.scoper.rootNode, current, isNext);\r\n newInline =\r\n newInline &&\r\n current &&\r\n ((isNext && newInline.isAfter(current)) || (!isNext && current.isAfter(newInline)))\r\n ? newInline\r\n : null;\r\n }\r\n\r\n // For inline, we need to make sure:\r\n // 1) it is really next/previous to current\r\n // 2) pass on the new inline to this.scoper to do the trimming and we still get back an inline\r\n // Then\r\n // 1) re-position current inline\r\n if (newInline && (newInline = this.scoper.trimInlineElement(newInline))) {\r\n this.currentInline = newInline;\r\n return this.currentInline;\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n\r\nfunction getNextPreviousInlineElement(\r\n rootNode: Node,\r\n current: InlineElement,\r\n isNext: boolean\r\n): InlineElement | null {\r\n if (!current) {\r\n return null;\r\n }\r\n if (current instanceof PartialInlineElement) {\r\n // if current is partial, get the other half of the inline unless it is no more\r\n let result = isNext ? current.nextInlineElement : current.previousInlineElement;\r\n\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n\r\n // Get a leaf node after startNode and use that base to find next inline\r\n let startNode: Node | null = current.getContainerNode();\r\n startNode = getLeafSibling(rootNode, startNode, isNext);\r\n return getInlineElementAtNode(rootNode, startNode);\r\n}\r\n","import ContentTraverser from './ContentTraverser';\r\nimport createRange from '../selection/createRange';\r\nimport {\r\n IContentTraverser,\r\n InlineElement,\r\n IPositionContentSearcher,\r\n NodePosition,\r\n} from 'roosterjs-editor-types';\r\n\r\n// White space matching regex. It matches following chars:\r\n// \\s: white space\r\n// \\u00A0: no-breaking white space\r\n// \\u200B: zero width space\r\n// \\u3000: full width space (which can come from JPN IME)\r\nconst WHITESPACE_REGEX = /[\\s\\u00A0\\u200B\\u3000]+([^\\s\\u00A0\\u200B\\u3000]*)$/i;\r\n\r\n/**\r\n * The class that helps search content around a position\r\n */\r\nexport default class PositionContentSearcher implements IPositionContentSearcher {\r\n // The cached text before position that has been read so far\r\n private text = '';\r\n\r\n // The cached word before position\r\n private word: string = '';\r\n\r\n // The inline element before position\r\n private inlineBefore: InlineElement | null = null;\r\n\r\n // The inline element after position\r\n private inlineAfter: InlineElement | null = null;\r\n\r\n // The content traverser used to traverse backwards\r\n private traverser: IContentTraverser | null = null;\r\n\r\n // Backward parsing has completed\r\n private traversingComplete: boolean = false;\r\n\r\n // All inline elements before position that have been read so far\r\n private inlineElements: InlineElement[] = [];\r\n\r\n // First non-text inline before position\r\n private nearestNonTextInlineElement: InlineElement | null = null;\r\n\r\n /**\r\n * Create a new CursorData instance\r\n * @param rootNode Root node of the whole scope\r\n * @param position Start position\r\n */\r\n constructor(private rootNode: Node, private position: NodePosition) {}\r\n\r\n /**\r\n * Get the word before position. The word is determined by scanning backwards till the first white space, the portion\r\n * between position and the white space is the word before position\r\n * @returns The word before position\r\n */\r\n public getWordBefore(): string {\r\n if (!this.word) {\r\n this.traverse(() => this.word);\r\n }\r\n\r\n return this.word || '';\r\n }\r\n\r\n /**\r\n * Get the inline element before position\r\n * @returns The inlineElement before position\r\n */\r\n public getInlineElementBefore(): InlineElement | null {\r\n if (!this.inlineBefore) {\r\n this.traverse(null);\r\n }\r\n\r\n return this.inlineBefore;\r\n }\r\n\r\n /**\r\n * Get the inline element after position\r\n * @returns The inline element after position\r\n */\r\n public getInlineElementAfter(): InlineElement | null {\r\n if (!this.inlineAfter) {\r\n this.inlineAfter = ContentTraverser.createBlockTraverser(\r\n this.rootNode,\r\n this.position\r\n ).currentInlineElement;\r\n }\r\n\r\n return this.inlineAfter;\r\n }\r\n\r\n /**\r\n * Get X number of chars before position\r\n * The actual returned chars may be less than what is requested.\r\n * @param length The length of string user want to get, the string always ends at the position,\r\n * so this length determines the start position of the string\r\n * @returns The actual string we get as a sub string, or the whole string before position when\r\n * there is not enough chars in the string\r\n */\r\n public getSubStringBefore(length: number): string {\r\n if (this.text.length < length) {\r\n this.traverse(() => this.text.length >= length);\r\n }\r\n\r\n return this.text.substr(Math.max(0, this.text.length - length));\r\n }\r\n\r\n /**\r\n * Try to get a range matches the given text before the position\r\n * @param text The text to match against\r\n * @param exactMatch Whether it is an exact match\r\n * @returns The range for the matched text, null if unable to find a match\r\n */\r\n public getRangeFromText(text: string, exactMatch: boolean): Range | null {\r\n if (!text) {\r\n return null;\r\n }\r\n\r\n let startPosition: NodePosition | null = null;\r\n let endPosition: NodePosition | null = null;\r\n let textIndex = text.length - 1;\r\n\r\n this.forEachTextInlineElement(textInline => {\r\n let nodeContent = textInline.getTextContent() || '';\r\n let nodeIndex = nodeContent.length - 1;\r\n for (; nodeIndex >= 0 && textIndex >= 0; nodeIndex--) {\r\n if (text.charCodeAt(textIndex) == nodeContent.charCodeAt(nodeIndex)) {\r\n textIndex--;\r\n\r\n // on first time when end is matched, set the end of range\r\n if (!endPosition) {\r\n endPosition = textInline.getStartPosition().move(nodeIndex + 1);\r\n }\r\n } else if (exactMatch || endPosition) {\r\n // Mismatch found when exact match or end already match, so return since matching failed\r\n return true;\r\n }\r\n }\r\n\r\n // when textIndex == -1, we have a successful complete match\r\n if (textIndex == -1) {\r\n startPosition = textInline.getStartPosition().move(nodeIndex + 1);\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n return startPosition && endPosition && createRange(startPosition, endPosition);\r\n }\r\n\r\n /**\r\n * Get text section before position till stop condition is met.\r\n * This offers consumers to retrieve text section by section\r\n * The section essentially is just an inline element which has Container element\r\n * so that the consumer can remember it for anchoring popup or verification purpose\r\n * when position moves out of context etc.\r\n * @param stopFunc The callback stop function\r\n */\r\n public forEachTextInlineElement(callback: (textInlineElement: InlineElement) => any) {\r\n // We cache all text sections read so far\r\n // Every time when you ask for textSection, we start with the cached first\r\n // and resort to further reading once we exhausted with the cache\r\n if (!this.inlineElements.some(callback)) {\r\n this.traverse(callback);\r\n }\r\n }\r\n\r\n /**\r\n * Get first non textual inline element before position\r\n * @returns First non textual inline element before position or null if no such element exists\r\n */\r\n public getNearestNonTextInlineElement(): InlineElement | null {\r\n if (!this.nearestNonTextInlineElement) {\r\n this.traverse(() => this.nearestNonTextInlineElement);\r\n }\r\n\r\n return this.nearestNonTextInlineElement;\r\n }\r\n\r\n /**\r\n * Continue traversing backward till stop condition is met or begin of block is reached\r\n */\r\n private traverse(callback: null | ((inlineElement: InlineElement) => any)) {\r\n this.traverser =\r\n this.traverser || ContentTraverser.createBlockTraverser(this.rootNode, this.position);\r\n\r\n if (!this.traverser || this.traversingComplete) {\r\n return;\r\n }\r\n\r\n let previousInline = this.traverser.getPreviousInlineElement();\r\n while (!this.traversingComplete) {\r\n this.inlineBefore = this.inlineBefore || previousInline;\r\n\r\n if (previousInline && previousInline.isTextualInlineElement()) {\r\n let textContent = previousInline.getTextContent();\r\n\r\n // build the word before position if it is not built yet\r\n if (!this.word) {\r\n // Match on the white space, the portion after space is on the index of 1 of the matched result\r\n // (index at 0 is whole match result, index at 1 is the word)\r\n let matches = WHITESPACE_REGEX.exec(textContent);\r\n if (matches && matches.length == 2) {\r\n this.word = matches[1] + this.text;\r\n }\r\n }\r\n\r\n this.text = textContent + this.text;\r\n this.inlineElements.push(previousInline);\r\n\r\n // Check if stop condition is met\r\n if (callback && callback(previousInline)) {\r\n break;\r\n }\r\n } else {\r\n this.nearestNonTextInlineElement = previousInline;\r\n this.traversingComplete = true;\r\n if (!this.word) {\r\n // if parsing is done, whatever we get so far in this.cachedText should also be in this.cachedWordBeforeCursor\r\n this.word = this.text;\r\n }\r\n\r\n // When a non-textual inline element, or null is seen, we consider parsing complete\r\n // TODO: we may need to change this if there is a future need to parse beyond text, i.e.\r\n // we have aaa @someone bbb, and we want to read the text before @someone\r\n break;\r\n }\r\n\r\n previousInline = this.traverser.getPreviousInlineElement();\r\n }\r\n }\r\n}\r\n","import EmptyInlineElement from '../inlineElements/EmptyInlineElement';\r\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getInlineElementAtNode from '../inlineElements/getInlineElementAtNode';\r\nimport NodeBlockElement from '../blockElements/NodeBlockElement';\r\nimport Position from '../selection/Position';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { BlockElement, ContentPosition, InlineElement, NodePosition } from 'roosterjs-editor-types';\r\nimport { getInlineElementAfter } from '../inlineElements/getInlineElementBeforeAfter';\r\nimport {\r\n getFirstInlineElement,\r\n getLastInlineElement,\r\n} from '../inlineElements/getFirstLastInlineElement';\r\nimport type { CompatibleContentPosition } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * @internal\r\n * This provides traversing content in a selection start block\r\n * This is commonly used for those cursor context sensitive plugin,\r\n * they want to know text being typed at cursor\r\n * This provides a scope for parsing from cursor position up to begin of the selection block\r\n */\r\nexport default class SelectionBlockScoper implements TraversingScoper {\r\n private block: BlockElement | null;\r\n private position: NodePosition;\r\n\r\n /**\r\n * Create a new instance of SelectionBlockScoper class\r\n * @param rootNode The root node of the whole scope\r\n * @param position Position of the selection start\r\n * @param startFrom Where to start, can be Begin, End, SelectionStart\r\n */\r\n constructor(\r\n public rootNode: Node,\r\n position: NodePosition | Range,\r\n private startFrom: ContentPosition | CompatibleContentPosition\r\n ) {\r\n if (safeInstanceOf(position, 'Range')) {\r\n position = Position.getStart(position);\r\n }\r\n\r\n this.position = position.normalize();\r\n this.block = getBlockElementAtNode(this.rootNode, this.position.node);\r\n }\r\n\r\n /**\r\n * Get the start block element\r\n */\r\n public getStartBlockElement(): BlockElement | null {\r\n return this.block;\r\n }\r\n\r\n /**\r\n * Get the start inline element\r\n * The start inline refers to inline before the selection start\r\n * The reason why we choose the one before rather after is, when cursor is at the end of a paragraph,\r\n * the one after likely will point to inline in next paragraph which may be null if the cursor is at bottom of editor\r\n */\r\n public getStartInlineElement(): InlineElement | null {\r\n if (this.block) {\r\n switch (this.startFrom) {\r\n case ContentPosition.Begin:\r\n case ContentPosition.End:\r\n case ContentPosition.DomEnd:\r\n return getFirstLastInlineElementFromBlockElement(\r\n this.block,\r\n this.startFrom == ContentPosition.Begin\r\n );\r\n case ContentPosition.SelectionStart:\r\n // Get the inline before selection start point, and ensure it falls in the selection block\r\n let startInline = getInlineElementAfter(this.rootNode, this.position);\r\n return startInline && this.block.contains(startInline.getContainerNode())\r\n ? startInline\r\n : new EmptyInlineElement(this.position, this.block);\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Check if the given block element is in current scope\r\n * @param blockElement The block element to check\r\n */\r\n public isBlockInScope(blockElement: BlockElement): boolean {\r\n return this.block && blockElement ? this.block.equals(blockElement) : false;\r\n }\r\n\r\n /**\r\n * Trim the incoming inline element, and return an inline element\r\n * This just tests and return the inline element if it is in block\r\n * This is a block scoper, which is not like selection scoper where it may cut an inline element in half\r\n * A block scoper does not cut an inline in half\r\n */\r\n public trimInlineElement(inlineElement: InlineElement): InlineElement | null {\r\n return this.block && inlineElement && this.block.contains(inlineElement.getContainerNode())\r\n ? inlineElement\r\n : null;\r\n }\r\n}\r\n\r\n/**\r\n * Get first/last InlineElement of the given BlockElement\r\n * @param block The BlockElement to get InlineElement from\r\n * @param isFirst True to get first InlineElement, false to get last InlineElement\r\n */\r\nfunction getFirstLastInlineElementFromBlockElement(\r\n block: BlockElement,\r\n isFirst: boolean\r\n): InlineElement | null {\r\n if (block instanceof NodeBlockElement) {\r\n let blockNode = block.getStartNode();\r\n return isFirst ? getFirstInlineElement(blockNode) : getLastInlineElement(blockNode);\r\n } else {\r\n return getInlineElementAtNode(block, isFirst ? block.getStartNode() : block.getEndNode());\r\n }\r\n}\r\n","import getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport PartialInlineElement from '../inlineElements/PartialInlineElement';\r\nimport Position from '../selection/Position';\r\nimport TraversingScoper from './TraversingScoper';\r\nimport { BlockElement, InlineElement, NodePosition } from 'roosterjs-editor-types';\r\nimport { getInlineElementAfter } from '../inlineElements/getInlineElementBeforeAfter';\r\n\r\n/**\r\n * @internal\r\n * This is selection scoper that provide a start inline as the start of the selection\r\n * and checks if a block falls in the selection (isBlockInScope)\r\n * last trimInlineElement to trim any inline element to return a partial that falls in the selection\r\n */\r\nexport default class SelectionScoper implements TraversingScoper {\r\n private start: NodePosition;\r\n private end: NodePosition;\r\n private startBlock: BlockElement | null = null;\r\n private startInline: InlineElement | null = null;\r\n\r\n /**\r\n * Create a new instance of SelectionScoper class\r\n * @param rootNode The root node of the content\r\n * @param range The selection range to scope to\r\n */\r\n constructor(public rootNode: Node, range: Range) {\r\n this.start = Position.getStart(range).normalize();\r\n this.end = Position.getEnd(range).normalize();\r\n }\r\n\r\n /**\r\n * Provide a start block as the first block after the cursor\r\n */\r\n public getStartBlockElement(): BlockElement | null {\r\n if (!this.startBlock) {\r\n this.startBlock = getBlockElementAtNode(this.rootNode, this.start.node);\r\n }\r\n\r\n return this.startBlock;\r\n }\r\n\r\n /**\r\n * Provide a start inline as the first inline after the cursor\r\n */\r\n public getStartInlineElement(): InlineElement | null {\r\n if (!this.startInline) {\r\n this.startInline = this.trimInlineElement(\r\n getInlineElementAfter(this.rootNode, this.start)\r\n );\r\n }\r\n\r\n return this.startInline;\r\n }\r\n\r\n /**\r\n * Checks if a block completely falls in the selection\r\n * @param block The BlockElement to check\r\n */\r\n public isBlockInScope(block: BlockElement): boolean {\r\n if (!block) {\r\n return false;\r\n }\r\n let inScope = false;\r\n let selStartBlock = this.getStartBlockElement();\r\n if (this.start.equalTo(this.end)) {\r\n inScope = !!selStartBlock && selStartBlock.equals(block);\r\n } else {\r\n let selEndBlock = getBlockElementAtNode(this.rootNode, this.end.node);\r\n\r\n // There are three cases that are considered as \"block in scope\"\r\n // 1) The start of selection falls on the block\r\n // 2) The end of selection falls on the block\r\n // 3) the block falls in-between selection start and end\r\n inScope =\r\n !!selStartBlock &&\r\n !!selEndBlock &&\r\n (block.equals(selStartBlock) ||\r\n block.equals(selEndBlock) ||\r\n (block.isAfter(selStartBlock) && selEndBlock.isAfter(block)));\r\n }\r\n\r\n return inScope;\r\n }\r\n\r\n /**\r\n * Trim an incoming inline. If it falls completely outside selection, return null\r\n * otherwise return a partial that represents the portion that falls in the selection\r\n * @param inline The InlineElement to check\r\n */\r\n public trimInlineElement(inline: InlineElement | null): InlineElement | null {\r\n if (!inline || this.start.equalTo(this.end)) {\r\n return null;\r\n }\r\n\r\n // Temp code. Will be changed to using InlineElement.getStart/EndPosition() soon\r\n let start = inline.getStartPosition();\r\n let end = inline.getEndPosition();\r\n\r\n if (start.isAfter(this.end) || this.start.isAfter(end)) {\r\n return null;\r\n }\r\n\r\n let startPartial = false;\r\n let endPartial = false;\r\n\r\n if (this.start.isAfter(start)) {\r\n start = this.start;\r\n startPartial = true;\r\n }\r\n\r\n if (end.isAfter(this.end)) {\r\n end = this.end;\r\n endPartial = true;\r\n }\r\n\r\n return start.isAfter(end) || start.equalTo(end)\r\n ? null\r\n : startPartial || endPartial\r\n ? new PartialInlineElement(\r\n inline,\r\n startPartial ? start : undefined,\r\n endPartial ? end : undefined\r\n )\r\n : inline;\r\n }\r\n}\r\n","import createElement from '../utils/createElement';\nimport getDelimiterFromElement from './getDelimiterFromElement';\nimport { DelimiterClasses } from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\n/**\n * Adds delimiters to the element provided. If the delimiters already exists, will not be added\n * @param node the node to add the delimiters\n */\nexport default function addDelimiters(node: Element): Element[] {\n let [delimiterAfter, delimiterBefore] = getDelimiters(node);\n\n if (!delimiterAfter) {\n delimiterAfter = addDelimiterAfter(node);\n }\n if (!delimiterBefore) {\n delimiterBefore = addDelimiterBefore(node);\n }\n return [delimiterAfter, delimiterBefore];\n}\n\n/**\n * Adds delimiter after the element provided.\n * @param element element to use\n */\nexport function addDelimiterAfter(element: Element) {\n return insertDelimiter(element, DelimiterClasses.DELIMITER_AFTER);\n}\n\n/**\n * Adds delimiter before the element provided.\n * @param element element to use\n */\nexport function addDelimiterBefore(element: Element) {\n return insertDelimiter(element, DelimiterClasses.DELIMITER_BEFORE);\n}\n\nfunction getDelimiters(entityWrapper: Element): (Element | undefined)[] {\n const result: (Element | undefined)[] = [];\n const { nextElementSibling, previousElementSibling } = entityWrapper;\n result.push(\n isDelimiter(nextElementSibling, DelimiterClasses.DELIMITER_AFTER),\n isDelimiter(previousElementSibling, DelimiterClasses.DELIMITER_BEFORE)\n );\n\n return result;\n}\n\nfunction isDelimiter(el: Element | null, className: string): Element | undefined {\n return el && getDelimiterFromElement(el) && el.classList.contains(className) ? el : undefined;\n}\n\nfunction insertDelimiter(element: Element, delimiterClass: DelimiterClasses) {\n const span = createElement(\n {\n tag: 'span',\n className: delimiterClass,\n children: [ZERO_WIDTH_SPACE],\n },\n element.ownerDocument\n ) as HTMLElement;\n if (span) {\n const insertPosition: InsertPosition =\n delimiterClass == DelimiterClasses.DELIMITER_AFTER ? 'afterend' : 'beforebegin';\n element.insertAdjacentElement(insertPosition, span);\n }\n\n return span;\n}\n","import safeInstanceOf from '../utils/safeInstanceOf';\nimport { DelimiterClasses } from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\n/**\n * Retrieves Delimiter information from a provided element.\n * @param element element to try to retrieve a delimiter\n * @returns delimiter info if it is a Delimiter, else null\n */\nexport default function getDelimiterFromElement(element: Node | null | undefined): Element | null {\n if (!element) {\n return null;\n }\n if (\n safeInstanceOf(element, 'HTMLSpanElement') &&\n (element.classList.contains(DelimiterClasses.DELIMITER_AFTER) ||\n element.classList.contains(DelimiterClasses.DELIMITER_BEFORE)) &&\n element.textContent === ZERO_WIDTH_SPACE\n ) {\n return element;\n }\n\n return null;\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport contains from '../utils/contains';\nimport ContentTraverser from '../contentTraverser/ContentTraverser';\nimport createRange from '../selection/createRange';\nimport findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport isNodeEmpty from '../utils/isNodeEmpty';\nimport isPositionAtBeginningOf from '../selection/isPositionAtBeginningOf';\nimport isVoidHtmlElement from '../utils/isVoidHtmlElement';\nimport LinkInlineElement from '../inlineElements/LinkInlineElement';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport pasteTable from '../table/pasteTable';\nimport Position from '../selection/Position';\nimport PositionContentSearcher from '../contentTraverser/PositionContentSearcher';\nimport queryElements from '../utils/queryElements';\nimport splitTextNode from '../utils/splitTextNode';\nimport toArray from '../jsUtils/toArray';\nimport unwrap from '../utils/unwrap';\nimport wrap from '../utils/wrap';\nimport { splitBalancedNodeRange } from '../utils/splitParentNode';\nimport {\n BlockElement,\n NodePosition,\n NodeType,\n PositionType,\n QueryScope,\n} from 'roosterjs-editor-types';\n\nconst NOT_EDITABLE_SELECTOR = '[contenteditable=false]';\n\nconst adjustSteps: ((\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n) => NodePosition)[] = [\n adjustInsertPositionForHyperLink,\n adjustInsertPositionForStructuredNode,\n adjustInsertPositionForParagraph,\n adjustInsertPositionForVoidElement,\n adjustInsertPositionForMoveCursorOutOfALink,\n adjustInsertPositionForNotEditableNode,\n adjustInsertPositionForTable,\n];\n\n/**\n * Adjust position for A tag don't be nested inside another A tag.\n */\nfunction adjustInsertPositionForHyperLink(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n let blockElement = getBlockElementAtNode(root, position.node);\n\n if (blockElement) {\n // Find the first tag within current block which covers current selection\n // If there are more than one nested, let's handle the first one only since that is not a common scenario.\n let anchor: HTMLElement | null = queryElements(\n root,\n 'a[href]',\n null /*forEachCallback*/,\n QueryScope.OnSelection,\n createRange(position)\n ).filter((a: HTMLElement) => blockElement!.contains(a))[0];\n\n // If this is about to insert node to an empty A tag, clear the A tag and reset position\n if (anchor && isNodeEmpty(anchor)) {\n position = new Position(anchor, PositionType.Before);\n safeRemove(anchor);\n anchor = null;\n }\n\n // If this is about to insert nodes which contains A tag into another A tag, need to break current A tag\n // otherwise we will have nested A tags which is a wrong HTML structure\n if (\n anchor &&\n ((nodeToInsert as HTMLElement))?.querySelector &&\n ((nodeToInsert as HTMLElement))?.querySelector('a[href]')\n ) {\n let normalizedPosition = position.normalize();\n let parentNode = normalizedPosition.node.parentNode!;\n let nextNode =\n normalizedPosition.node.nodeType == NodeType.Text\n ? splitTextNode(\n normalizedPosition.node,\n normalizedPosition.offset,\n false /*returnFirstPart*/\n )\n : normalizedPosition.isAtEnd\n ? normalizedPosition.node.nextSibling\n : normalizedPosition.node;\n let splitter: Node | null = root.ownerDocument.createTextNode('');\n parentNode.insertBefore(splitter, nextNode);\n\n while (splitter && contains(anchor, splitter)) {\n splitter = splitBalancedNodeRange(splitter);\n }\n\n if (splitter) {\n position = new Position(splitter, PositionType.Before);\n safeRemove(splitter);\n }\n }\n }\n\n return position;\n}\n\n/**\n * Adjust position for a node don't be nested inside tags like BR, LI, TD.\n */\nfunction adjustInsertPositionForStructuredNode(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n let rootNodeToInsert: Node | null = nodeToInsert;\n let isFragment: boolean = false;\n\n if (rootNodeToInsert.nodeType == NodeType.DocumentFragment) {\n isFragment = true;\n let rootNodes = toArray(rootNodeToInsert.childNodes).filter(\n (n: ChildNode) => getTagOfNode(n) != 'BR'\n );\n rootNodeToInsert = rootNodes.length == 1 ? rootNodes[0] : null;\n }\n\n let tag = getTagOfNode(rootNodeToInsert);\n let hasBrNextToRoot =\n tag && rootNodeToInsert && getTagOfNode(rootNodeToInsert.nextSibling) == 'BR';\n let listItem = findClosestElementAncestor(position.node, root, 'LI');\n let listNode = listItem && findClosestElementAncestor(listItem, root, 'OL,UL');\n let tdNode = findClosestElementAncestor(position.node, root, 'TD,TH');\n\n if (tag == 'LI') {\n tag = listNode ? getTagOfNode(listNode) : 'UL';\n rootNodeToInsert = wrap(rootNodeToInsert!, tag);\n }\n\n if (\n (tag == 'OL' || tag == 'UL') &&\n rootNodeToInsert &&\n getTagOfNode(rootNodeToInsert.firstChild) == 'LI'\n ) {\n let shouldInsertListAsText = !rootNodeToInsert.firstChild!.nextSibling && !hasBrNextToRoot;\n\n if (hasBrNextToRoot && rootNodeToInsert.parentNode) {\n safeRemove(rootNodeToInsert.nextSibling!);\n }\n\n if (shouldInsertListAsText) {\n unwrap(rootNodeToInsert.firstChild!);\n unwrap(rootNodeToInsert);\n } else if (getTagOfNode(listNode) == tag) {\n unwrap(rootNodeToInsert);\n position = new Position(\n listItem!,\n isPositionAtBeginningOf(position, listItem!)\n ? PositionType.Before\n : PositionType.After\n );\n }\n }\n\n if (isFragment && tag == 'TABLE' && tdNode) {\n pasteTable(\n tdNode,\n rootNodeToInsert,\n position,\n range\n );\n position = new Position(rootNodeToInsert!, 0);\n moveChildNodes(nodeToInsert);\n }\n\n return position;\n}\n\n/**\n * Change P tag to DIV, when a new node when insert node.\n */\n\nfunction adjustInsertPositionForParagraph(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (getTagOfNode(position.node) == 'P') {\n // Insert into a P tag may cause issues when the inserted content contains any block element.\n // Change P tag to DIV to make sure it works well\n let pos = position.normalize();\n let div = changeElementTag(position.node, 'div');\n if (pos.node != div) {\n position = pos;\n }\n }\n\n return position;\n}\n\n/**\n * Adjust position for a node that can have children.\n */\n\nfunction adjustInsertPositionForVoidElement(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (isVoidHtmlElement(position.node)) {\n position = new Position(\n position.node,\n position.isAtEnd ? PositionType.After : PositionType.Before\n );\n }\n return position;\n}\n\n/**\n * Adjust the position cursor out of link when a new node is inserted.\n */\n\nfunction adjustInsertPositionForMoveCursorOutOfALink(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (range && range.collapsed) {\n const searcher = new PositionContentSearcher(root, Position.getStart(range));\n const inlineElementBefore = searcher.getInlineElementBefore();\n const inlineElementAfter = searcher.getInlineElementAfter();\n if (inlineElementBefore instanceof LinkInlineElement) {\n position = new Position(inlineElementBefore.getContainerNode(), PositionType.After);\n } else if (inlineElementAfter instanceof LinkInlineElement) {\n position = new Position(inlineElementAfter.getContainerNode(), PositionType.Before);\n }\n }\n return position;\n}\n\n/**\n * Adjust the position cursor out of a not contenteditable element.\n */\nfunction adjustInsertPositionForNotEditableNode(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (!position.element?.isContentEditable) {\n let nonEditableElement: HTMLElement | undefined;\n let lastNonEditableElement: HTMLElement | null = findClosestElementAncestor(\n position.node,\n root,\n NOT_EDITABLE_SELECTOR\n );\n\n while (lastNonEditableElement) {\n nonEditableElement = lastNonEditableElement;\n lastNonEditableElement = nonEditableElement?.parentElement\n ? findClosestElementAncestor(\n nonEditableElement.parentElement,\n root,\n NOT_EDITABLE_SELECTOR\n )\n : null;\n }\n\n if (nonEditableElement) {\n position = new Position(nonEditableElement, PositionType.After);\n return adjustInsertPositionForNotEditableNode(root, nodeToInsert, position, range);\n }\n }\n\n return position;\n}\n\n/**\n * Adjust the position of a table to be one line after another table.\n */\nfunction adjustInsertPositionForTable(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n if (\n (nodeToInsert.childNodes.length == 1 &&\n getTagOfNode(nodeToInsert.childNodes[0]) == 'TABLE') ||\n getTagOfNode(nodeToInsert) == 'TABLE'\n ) {\n const { element } = position;\n\n const posBefore = new Position(element, PositionType.Before);\n const rangeToTraverse = createRange(posBefore, position);\n const contentTraverser = ContentTraverser.createSelectionTraverser(root, rangeToTraverse);\n\n let blockElement = contentTraverser && contentTraverser.currentBlockElement;\n\n if (blockElement) {\n let nextBlockElement: BlockElement | null = blockElement;\n\n while (!nextBlockElement) {\n nextBlockElement = contentTraverser.getNextBlockElement();\n if (nextBlockElement) {\n blockElement = nextBlockElement;\n }\n }\n\n const prevElement = blockElement?.getEndNode();\n\n if (prevElement && findClosestElementAncestor(prevElement, root, 'TABLE')) {\n let tempRange = createRange(position);\n tempRange.collapse(false /* toStart */);\n const br = root.ownerDocument.createElement('br');\n tempRange.insertNode(br);\n\n tempRange = createRange(br);\n position = Position.getEnd(tempRange);\n }\n }\n }\n return position;\n}\n\n/**\n *\n * @param root the contentDiv of the ditor\n * @param nodeToInsert the node to be inserted\n * @param position the position of the node to be inserted\n * @param range the range current or cached range of the editor\n * @returns the adjusted position of the inserted node\n */\n\nexport default function adjustInsertPositionBySteps(\n root: HTMLElement,\n nodeToInsert: Node,\n position: NodePosition,\n range: Range\n): NodePosition {\n adjustSteps.forEach(handler => {\n position = handler(root, nodeToInsert, position, range);\n });\n return position;\n}\n\nfunction safeRemove(node: Node) {\n node?.parentNode?.removeChild(node);\n}\n","import arrayPush from '../jsUtils/arrayPush';\nimport collapseNodesInRegion from '../region/collapseNodesInRegion';\nimport getRegionsFromRange from '../region/getRegionsFromRange';\nimport getSelectionRangeInRegion from '../region/getSelectionRangeInRegion';\nimport mergeBlocksInRegion from '../region/mergeBlocksInRegion';\nimport Position from '../selection/Position';\nimport queryElements from '../utils/queryElements';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport splitTextNode from '../utils/splitTextNode';\nimport { NodePosition, PositionType, QueryScope, RegionType } from 'roosterjs-editor-types';\n\n/**\n * Delete selected content, and return the new position to select\n * @param core The EditorCore object.\n * @param range The range to delete\n */\nexport default function deleteSelectedContent(\n root: HTMLElement,\n range: Range\n): NodePosition | null {\n let nodeBefore: Node | null = null;\n\n // 1. TABLE and TR node in selected should be deleted. It is possible we don't detect them from step 2\n // since table cells will fall in to different regions\n const nodesToDelete: Node[] = queryElements(\n root,\n 'table,tr',\n null /*callback*/,\n QueryScope.InSelection,\n range\n );\n\n // 2. Loop all selected regions, find out those nodes need to be deleted and merged.\n // We don't delete them directly here because delete node from one region may cause selection range\n // another region becomes invalid. So we delay the process of deletion.\n const regions = getRegionsFromRange(root, range, RegionType.Table);\n const nodesPairToMerge = regions\n .map(region => {\n const regionRange = getSelectionRangeInRegion(region);\n if (!regionRange) {\n return null;\n }\n\n const {\n startContainer,\n endContainer,\n startOffset,\n endOffset,\n commonAncestorContainer,\n } = regionRange;\n\n // Disallow merging of readonly elements\n if (\n safeInstanceOf(commonAncestorContainer, 'HTMLElement') &&\n !commonAncestorContainer.isContentEditable\n ) {\n return null;\n }\n\n // Make sure there are node before and after the merging point.\n // This is required by mergeBlocksInRegion API.\n // This may create some empty text node as anchor\n let [beforeEnd, afterEnd] = ensureBeforeAndAfter(\n endContainer,\n endOffset,\n false /*isStart*/\n );\n let [beforeStart, afterStart] = ensureBeforeAndAfter(\n startContainer,\n startOffset,\n true /*isStart*/\n );\n nodeBefore = nodeBefore || beforeStart;\n\n // Find out all nodes to be deleted\n const nodes = collapseNodesInRegion(region, [afterStart, beforeEnd]);\n arrayPush(nodesToDelete, nodes);\n return { region, beforeStart, afterEnd };\n })\n .filter(x => !!x);\n\n // 3. Delete all nodes that we found, whose parent is editable\n nodesToDelete.forEach(\n node => node.parentElement?.isContentEditable && node.parentElement.removeChild(node)\n );\n\n // 4. Merge lines for each region, so that after we don't see extra line breaks\n nodesPairToMerge.forEach(nodes => {\n if (nodes) {\n mergeBlocksInRegion(nodes.region, nodes.beforeStart, nodes.afterEnd);\n }\n });\n\n return nodeBefore && new Position(nodeBefore, PositionType.End);\n}\n\nfunction ensureBeforeAndAfter(node: Node, offset: number, isStart: boolean) {\n if (safeInstanceOf(node, 'Text')) {\n const newNode = splitTextNode(node, offset, isStart);\n return isStart ? [newNode, node] : [node, newNode];\n } else {\n let nodeBefore: Node | null = node.childNodes[offset - 1];\n let nodeAfter: Node | null = node.childNodes[offset];\n\n // Condition 1: node child nodes\n // (\"I\" means cursor; \"o\" means a DOM node, \"[ ]\" means a parent node)\n // [ I ]\n // need to use parent node instead to convert to condition 2\n if (!nodeBefore && !nodeAfter) {\n if (isStart) {\n nodeAfter = node;\n nodeBefore = nodeAfter.previousSibling;\n } else {\n nodeBefore = node;\n nodeAfter = nodeBefore.nextSibling;\n }\n }\n\n // Condition 2: Either nodeBefore or nodeAfter is null (XOR case)\n // [ o I ] or [ I o]\n // need to add empty text node to convert to condition 3\n if ((nodeBefore || nodeAfter) && (!nodeBefore || !nodeAfter)) {\n const emptyNode = node.ownerDocument!.createTextNode('');\n (nodeBefore || nodeAfter)?.parentNode?.insertBefore(emptyNode, nodeAfter);\n if (nodeBefore) {\n nodeAfter = emptyNode;\n } else {\n nodeBefore = emptyNode;\n }\n }\n\n // Condition 3: Both nodeBefore and nodeAfter are not null\n // [o I o]\n // return the nodes\n return [nodeBefore!, nodeAfter!];\n }\n}\n","import ContentTraverser from '../contentTraverser/ContentTraverser';\n\n/**\n * get block element's text content.\n * @param rootNode Root node that the get the textContent of.\n * @returns text content of given text content.\n */\nexport default function getTextContent(rootNode: Node): string {\n const traverser = ContentTraverser.createBodyTraverser(rootNode);\n let block = traverser && traverser.currentBlockElement;\n let textContent: string[] = [];\n\n while (block) {\n textContent.push(block.getTextContent());\n block = traverser.getNextBlockElement();\n }\n\n return textContent.join('\\n');\n}\n","import { EntityClasses } from 'roosterjs-editor-types';\n\nconst CONTENT_EDITABLE = 'contenteditable';\n\n/**\n * Commit information of an entity (type, isReadonly, id) into the wrapper node as CSS Classes\n * @param wrapper The entity wrapper element\n * @param type Entity type\n * @param isReadonly Whether this is a readonly entity\n * @param id Optional Id of the entity\n */\nexport default function commitEntity(\n wrapper: HTMLElement,\n type: string,\n isReadonly: boolean,\n id?: string\n) {\n if (wrapper) {\n wrapper.className = `${EntityClasses.ENTITY_INFO_NAME} ${\n EntityClasses.ENTITY_TYPE_PREFIX\n }${type} ${id ? `${EntityClasses.ENTITY_ID_PREFIX}${id} ` : ''}${\n EntityClasses.ENTITY_READONLY_PREFIX\n }${isReadonly ? '1' : '0'}`;\n\n if (isReadonly) {\n wrapper.contentEditable = 'false';\n } else if (wrapper.getAttribute(CONTENT_EDITABLE)) {\n wrapper.removeAttribute(CONTENT_EDITABLE);\n }\n }\n}\n","import getEntityFromElement from './getEntityFromElement';\nimport getEntitySelector from './getEntitySelector';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport { Entity, EntityClasses, KnownEntityItem } from 'roosterjs-editor-types';\n\nconst EntityPlaceHolderTagName = 'ENTITY-PLACEHOLDER';\n\n/**\n * @deprecated\n * Create a placeholder comment node for entity\n * @param entity The entity to create placeholder from\n * @returns A placeholder comment node as\n */\nexport function createEntityPlaceholder(entity: Entity): HTMLElement {\n const placeholder = entity.wrapper.ownerDocument.createElement(EntityPlaceHolderTagName);\n placeholder.id = entity.id;\n\n return placeholder;\n}\n\n/**\n * Move content from a container into a new Document fragment, and try keep entities to be reusable by creating placeholder\n * for them in the document fragment.\n * If an entity is directly under root container, the whole entity can be reused and no need to move it at all.\n * If an entity is not directly under root container, it is still reusable, but it may need some movement.\n * In any case, entities will be replaced with a placeholder in the target document fragment.\n * We will use an entity map (the \"entities\" parameter) to save the map from entity id to its wrapper element.\n * @param root The root element\n * @param entities A map from entity id to entity wrapper element\n * @returns A new document fragment contains all the content and entity placeholders\n */\nexport function moveContentWithEntityPlaceholders(\n root: HTMLDivElement,\n entities: Record\n) {\n const entitySelector = getEntitySelector();\n const fragment = root.ownerDocument.createDocumentFragment();\n let next: Node | null = null;\n\n for (let child: Node | null = root.firstChild; child; child = next) {\n let entity: Entity | null;\n let nodeToAppend = child;\n\n next = child.nextSibling;\n\n if (safeInstanceOf(child, 'HTMLElement')) {\n if ((entity = getEntityFromElement(child))) {\n nodeToAppend = getPlaceholder(entity, entities);\n } else {\n child.querySelectorAll(entitySelector).forEach(wrapper => {\n if ((entity = getEntityFromElement(wrapper))) {\n const placeholder = getPlaceholder(entity, entities);\n\n wrapper.parentNode?.replaceChild(placeholder, wrapper);\n }\n });\n }\n }\n\n fragment.appendChild(nodeToAppend);\n }\n\n fragment.normalize();\n\n return fragment;\n}\n\n/**\n * Restore HTML content from a document fragment that may contain entity placeholders.\n * @param source Source document fragment that contains HTML content and entity placeholders\n * @param target Target container, usually to be editor root container\n * @param entities A map from entity id to entity wrapper, used for reusing existing DOM structure for entity\n * @param insertClonedNode When pass true, merge with a cloned copy of the nodes from source fragment rather than the nodes themselves @default false\n */\nexport function restoreContentWithEntityPlaceholder(\n source: ParentNode,\n target: HTMLElement,\n entities: Record | null,\n insertClonedNode?: boolean\n) {\n let anchor = target.firstChild;\n\n const entitySelector = getEntitySelector();\n\n for (let current = source.firstChild; current; ) {\n const next = current.nextSibling;\n const wrapper = tryGetWrapperFromEntityPlaceholder(entities, current);\n\n if (wrapper) {\n anchor = removeUntil(anchor, wrapper);\n\n if (anchor) {\n anchor = anchor.nextSibling;\n } else {\n target.appendChild(wrapper);\n }\n } else {\n const nodeToInsert = insertClonedNode ? current.cloneNode(true /*deep*/) : current;\n target.insertBefore(nodeToInsert, anchor);\n\n if (safeInstanceOf(nodeToInsert, 'HTMLElement')) {\n nodeToInsert.querySelectorAll(entitySelector).forEach(placeholder => {\n const wrapper = tryGetWrapperFromEntityPlaceholder(entities, placeholder);\n\n if (wrapper) {\n placeholder.parentNode?.replaceChild(wrapper, placeholder);\n }\n });\n }\n }\n\n current = next;\n }\n\n removeUntil(anchor);\n}\n\nfunction removeUntil(anchor: ChildNode | null, nodeToStop?: HTMLElement) {\n while (anchor && (!nodeToStop || anchor != nodeToStop)) {\n const nodeToRemove = anchor;\n anchor = anchor.nextSibling;\n nodeToRemove.parentNode?.removeChild(nodeToRemove);\n }\n return anchor;\n}\n\nfunction tryGetWrapperFromEntityPlaceholder(\n entities: Record | null,\n node: Node\n): HTMLElement | null {\n const id =\n safeInstanceOf(node, 'HTMLElement') &&\n node.classList.contains(EntityClasses.ENTITY_INFO_NAME) &&\n getEntityFromElement(node as HTMLElement)?.id;\n const item = id ? entities?.[id] : null;\n\n return !item\n ? null\n : safeInstanceOf(item, 'HTMLElement')\n ? item\n : item?.canPersist\n ? item.element\n : null;\n}\n\nfunction getPlaceholder(entity: Entity, entities: Record) {\n entities[entity.id] = entity.wrapper;\n\n return entity.wrapper.cloneNode(true /*deep*/);\n}\n","import { Entity, EntityClasses } from 'roosterjs-editor-types';\n\n/**\n * Get Entity object from an entity root element\n * @param element The entity root element. If this element is not an entity root element,\n * it will return null\n */\nexport default function getEntityFromElement(element: HTMLElement): Entity | null {\n let isEntity = false;\n let type = '';\n let id = '';\n let isReadonly = false;\n\n element?.className?.split(' ').forEach(name => {\n if (name == EntityClasses.ENTITY_INFO_NAME) {\n isEntity = true;\n } else if (name.indexOf(EntityClasses.ENTITY_TYPE_PREFIX) == 0) {\n type = name.substr(EntityClasses.ENTITY_TYPE_PREFIX.length);\n } else if (name.indexOf(EntityClasses.ENTITY_ID_PREFIX) == 0) {\n id = name.substr(EntityClasses.ENTITY_ID_PREFIX.length);\n } else if (name.indexOf(EntityClasses.ENTITY_READONLY_PREFIX) == 0) {\n isReadonly = name.substr(EntityClasses.ENTITY_READONLY_PREFIX.length) == '1';\n }\n });\n\n return isEntity\n ? {\n wrapper: element,\n id,\n type,\n isReadonly,\n }\n : null;\n}\n","import { EntityClasses } from 'roosterjs-editor-types';\n\n/**\n * Get a selector string for specified entity type and id\n * @param type (Optional) Type of entity\n * @param id (Optional) Id of entity\n */\nexport default function getEntitySelector(type?: string, id?: string): string {\n const typeSelector = type ? `.${EntityClasses.ENTITY_TYPE_PREFIX}${type}` : '';\n const idSelector = id ? `.${EntityClasses.ENTITY_ID_PREFIX}${id}` : '';\n return '.' + EntityClasses.ENTITY_INFO_NAME + typeSelector + idSelector;\n}\n","import { PluginEvent } from 'roosterjs-editor-types';\n\n/**\n * Gets the cached event data by cache key from event object if there is already one.\n * Otherwise, call getter function to create one, and cache it.\n * @param event The event object\n * @param key Cache key string, need to be unique\n * @param getter Getter function to get the object when it is not in cache yet\n */\nexport default function cacheGetEventData(\n event: PluginEvent | null,\n key: string,\n getter: () => T\n): T {\n let result =\n event && event.eventDataCache && event.eventDataCache.hasOwnProperty(key)\n ? event.eventDataCache[key]\n : getter();\n if (event) {\n event.eventDataCache = event.eventDataCache || {};\n event.eventDataCache[key] = result;\n }\n\n return result;\n}\n","import { PluginEvent } from 'roosterjs-editor-types';\n\n/**\n * Clear a cached object by its key from an event object\n * @param event The event object\n * @param key The cache key\n */\nexport default function clearEventDataCache(event: PluginEvent, key?: string): void {\n if (event && event.eventDataCache) {\n if (key && event.eventDataCache.hasOwnProperty(key)) {\n delete event.eventDataCache[key];\n } else if (!key) {\n event.eventDataCache = {};\n }\n }\n}\n","import isModifierKey from './isModifierKey';\n\n/**\n * Returns true when the event was fired from a key that produces a character value, otherwise false\n * This detection is not 100% accurate. event.key is not fully supported by all browsers, and in some browsers (e.g. IE),\n * event.key is longer than 1 for num pad input. But here we just want to improve performance as much as possible.\n * So if we missed some case here it is still acceptable.\n * @param event The keyboard event object\n */\nexport default function isCharacterValue(event: KeyboardEvent): boolean {\n return !isModifierKey(event) && !!event.key && event.key.length == 1;\n}\n","import { Browser } from '../utils/Browser';\n\nconst isCtrlOrMetaPressedImpl: (event: KeyboardEvent | MouseEvent) => boolean = Browser.isMac\n ? event => event.metaKey\n : event => event.ctrlKey;\n\n/**\n * Check if Ctrl key (Windows) or Meta key (Mac) is pressed for the given Event\n * @param event A Keyboard event or Mouse event object\n * @returns True if Ctrl key is pressed on Windows or Meta key is pressed on Mac\n */\nexport default function isCtrlOrMetaPressed(event: KeyboardEvent | MouseEvent): boolean {\n return isCtrlOrMetaPressedImpl(event);\n}\n","const CTRL_CHAR_CODE = 'Control';\nconst ALT_CHAR_CODE = 'Alt';\nconst META_CHAR_CODE = 'Meta';\n\n/**\n * Returns true when the event was fired from a modifier key, otherwise false\n * @param event The keyboard event object\n */\nexport default function isModifierKey(event: KeyboardEvent): boolean {\n const isCtrlKey = event.ctrlKey || event.key === CTRL_CHAR_CODE;\n const isAltKey = event.altKey || event.key === ALT_CHAR_CODE;\n const isMetaKey = event.metaKey || event.key === META_CHAR_CODE;\n\n return isCtrlKey || isAltKey || isMetaKey;\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport getInheritableStyles from './getInheritableStyles';\nimport getObjectKeys from '../jsUtils/getObjectKeys';\nimport getPredefinedCssForElement from './getPredefinedCssForElement';\nimport getStyles from '../style/getStyles';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport setStyles from '../style/setStyles';\nimport toArray from '../jsUtils/toArray';\nimport { cloneObject } from './cloneObject';\nimport { isCssVariable, processCssVariable } from './processCssVariable';\nimport {\n getAllowedAttributes,\n getAllowedCssClassesRegex,\n getTagReplacement,\n getDefaultStyleValues,\n getStyleCallbacks,\n} from './getAllowedValues';\nimport {\n AttributeCallbackMap,\n CssStyleCallbackMap,\n ElementCallbackMap,\n HtmlSanitizerOptions,\n NodeType,\n PredefinedCssMap,\n SanitizeHtmlOptions,\n StringMap,\n} from 'roosterjs-editor-types';\n\n/**\n * HTML sanitizer class provides two features:\n * 1. Convert global CSS to inline CSS\n * 2. Sanitize an HTML document, remove unnecessary/dangerous attribute/nodes\n */\nexport default class HtmlSanitizer {\n /**\n * @deprecated Use new HtmlSanitizer().convertGlobalCssToInlineCss() instead\n * Convert global CSS to inline CSS if any\n * @param html HTML source\n * @param additionalStyleNodes (Optional) additional HTML STYLE elements used as global CSS\n */\n static convertInlineCss(html: string, additionalStyleNodes?: HTMLStyleElement[]) {\n let sanitizer = new HtmlSanitizer({\n additionalGlobalStyleNodes: additionalStyleNodes,\n });\n return sanitizer.exec(html, true /*convertCssOnly*/);\n }\n\n /**\n * @deprecated Use new HtmlSanitizer().sanitize() instead\n * Sanitize HTML string, remove any unused HTML node/attribute/CSS.\n * @param html HTML source string\n * @param options Options used for this sanitizing process\n */\n static sanitizeHtml(html: string, options?: SanitizeHtmlOptions) {\n options = options || {};\n let sanitizer = new HtmlSanitizer(options);\n let currentStyles = safeInstanceOf(options.currentElementOrStyle, 'HTMLElement')\n ? getInheritableStyles(options.currentElementOrStyle)\n : options.currentElementOrStyle;\n return sanitizer.exec(html, options.convertCssOnly, currentStyles);\n }\n\n private elementCallbacks: ElementCallbackMap;\n private styleCallbacks: CssStyleCallbackMap;\n private attributeCallbacks: AttributeCallbackMap;\n private tagReplacements: Record;\n private allowedAttributes: string[];\n private allowedCssClassesRegex: RegExp | null;\n private defaultStyleValues: StringMap;\n private additionalPredefinedCssForElement: PredefinedCssMap | null;\n private additionalGlobalStyleNodes: HTMLStyleElement[];\n private preserveHtmlComments: boolean;\n private unknownTagReplacement: string | null;\n\n /**\n * Construct a new instance of HtmlSanitizer\n * @param options Options for HtmlSanitizer\n */\n constructor(options?: HtmlSanitizerOptions) {\n options = options || {};\n this.elementCallbacks = cloneObject(options.elementCallbacks);\n this.styleCallbacks = getStyleCallbacks(options.cssStyleCallbacks);\n this.attributeCallbacks = cloneObject(options.attributeCallbacks);\n this.tagReplacements = getTagReplacement(options.additionalTagReplacements);\n this.allowedAttributes = getAllowedAttributes(options.additionalAllowedAttributes);\n this.allowedCssClassesRegex = getAllowedCssClassesRegex(\n options.additionalAllowedCssClasses\n );\n this.defaultStyleValues = getDefaultStyleValues(options.additionalDefaultStyleValues);\n this.additionalPredefinedCssForElement = options.additionalPredefinedCssForElement || null;\n this.additionalGlobalStyleNodes = options.additionalGlobalStyleNodes || [];\n this.preserveHtmlComments = options.preserveHtmlComments || false;\n this.unknownTagReplacement = options.unknownTagReplacement || null;\n }\n\n /**\n * @deprecated Use HtmlSanitizer.convertGlobalCssToInlineCss() and HtmlSanitizer.sanitize() instead\n * Sanitize HTML string\n * This function will do the following work:\n * 1. Convert global CSS into inline CSS\n * 2. Remove dangerous HTML tags and attributes\n * 3. Remove useless CSS properties\n * @param html The input HTML\n * @param convertInlineCssOnly Whether only convert inline css and skip html content sanitizing\n * @param currentStyles Current inheritable CSS styles\n */\n exec(html: string, convertCssOnly?: boolean, currentStyles?: StringMap): string {\n const parser = new DOMParser();\n const doc = parser.parseFromString(html || '', 'text/html');\n\n if (doc && doc.body && doc.body.firstChild) {\n this.convertGlobalCssToInlineCss(doc);\n if (!convertCssOnly) {\n this.sanitize(doc.body, currentStyles);\n }\n }\n return (doc && doc.body && doc.body.innerHTML) || '';\n }\n\n /**\n * Sanitize an HTML element, remove unnecessary or dangerous elements/attribute/CSS rules\n * @param rootNode Root node to sanitize\n * @param currentStyles Current CSS styles. Inheritable styles in the given node which has\n * the same value with current styles will be ignored.\n */\n sanitize(rootNode: Node, currentStyles?: StringMap) {\n if (!rootNode) {\n return '';\n }\n currentStyles = cloneObject(currentStyles, getInheritableStyles(null));\n this.processNode(rootNode, currentStyles, {});\n }\n\n /**\n * Convert global CSS into inline CSS\n * @param rootNode The HTML Document\n */\n convertGlobalCssToInlineCss(rootNode: ParentNode) {\n let styleNodes = toArray(rootNode.querySelectorAll('style'));\n let styleSheets = this.additionalGlobalStyleNodes\n .reverse()\n .map(node => node.sheet as CSSStyleSheet)\n .concat(styleNodes.map(node => node.sheet as CSSStyleSheet).reverse())\n .filter(sheet => sheet);\n for (let styleSheet of styleSheets) {\n for (let j = styleSheet.cssRules.length - 1; j >= 0; j--) {\n // Skip any none-style rule, i.e. @page\n let styleRule = styleSheet.cssRules[j] as CSSStyleRule;\n let text = styleRule && styleRule.style ? styleRule.style.cssText : null;\n if (styleRule.type != CSSRule.STYLE_RULE || !text || !styleRule.selectorText) {\n continue;\n }\n // Make sure the selector is not empty\n for (let selector of styleRule.selectorText.split(',')) {\n if (!selector || !selector.trim() || selector.indexOf(':') >= 0) {\n continue;\n }\n let nodes = toArray(rootNode.querySelectorAll(selector));\n // Always put existing styles after so that they have higher priority\n // Which means if both global style and inline style apply to the same element,\n // inline style will have higher priority\n nodes.forEach(node =>\n node.setAttribute('style', text + (node.getAttribute('style') || ''))\n );\n }\n }\n }\n\n styleNodes.forEach(node => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }\n\n private processNode(node: Node, currentStyle: StringMap, context: Object) {\n const nodeType = node.nodeType;\n const isElement = nodeType == NodeType.Element;\n const isText = nodeType == NodeType.Text;\n const isFragment = nodeType == NodeType.DocumentFragment;\n const isComment = nodeType == NodeType.Comment;\n\n let shouldKeep = false;\n\n if (isElement) {\n const tag = getTagOfNode(node);\n const callback = this.elementCallbacks[tag];\n let replacement: string | null | undefined = this.tagReplacements[tag.toLowerCase()];\n\n if (replacement === undefined) {\n replacement = this.unknownTagReplacement;\n }\n\n if (callback) {\n shouldKeep = callback(node as HTMLElement, context);\n } else if (tag.indexOf(':') > 0) {\n shouldKeep = true;\n } else if (tag == replacement || replacement == '*') {\n shouldKeep = true;\n } else if (replacement && /^[a-zA-Z][\\w\\-]*$/.test(replacement)) {\n node = changeElementTag(node as HTMLElement, replacement)!;\n shouldKeep = true;\n }\n } else if (isText) {\n const whiteSpace = currentStyle['white-space'];\n shouldKeep =\n whiteSpace == 'pre' ||\n whiteSpace == 'pre-line' ||\n whiteSpace == 'pre-wrap' ||\n !/^[\\r\\n]*$/g.test(node.nodeValue || '');\n } else if (isFragment) {\n shouldKeep = true;\n } else if (isComment) {\n shouldKeep = this.preserveHtmlComments;\n } else {\n shouldKeep = false;\n }\n\n if (!shouldKeep) {\n node.parentNode?.removeChild(node);\n } else if (\n isText &&\n (currentStyle['white-space'] == 'pre' || currentStyle['white-space'] == 'pre-wrap')\n ) {\n node.nodeValue = (node.nodeValue || '')\n .replace(/^ /gm, '\\u00A0')\n .replace(/ {2}/g, ' \\u00A0');\n } else if (isElement || isFragment) {\n let thisStyle = cloneObject(currentStyle);\n let element = node;\n if (isElement) {\n this.processAttributes(element, context);\n this.preprocessCss(element, thisStyle);\n this.processCss(element, thisStyle, context);\n }\n\n let child: Node | null = element.firstChild;\n let next: Node | null;\n for (; child; child = next) {\n next = child.nextSibling;\n this.processNode(child, thisStyle, context);\n }\n }\n }\n\n private preprocessCss(element: HTMLElement, thisStyle: StringMap) {\n const predefinedStyles = getPredefinedCssForElement(\n element,\n this.additionalPredefinedCssForElement\n );\n if (predefinedStyles) {\n getObjectKeys(predefinedStyles).forEach(name => {\n thisStyle[name] = predefinedStyles[name];\n });\n }\n }\n\n private processCss(element: HTMLElement, thisStyle: StringMap, context: Object) {\n const styles = getStyles(element);\n getObjectKeys(styles).forEach(name => {\n let value = styles[name];\n let callback = this.styleCallbacks[name];\n let isInheritable = thisStyle[name] != undefined;\n let keep = true;\n\n if (keep && !!callback) {\n keep = callback(value, element, thisStyle, context);\n }\n\n if (keep && isCssVariable(value)) {\n value = processCssVariable(value);\n keep = !!value;\n }\n\n keep =\n keep &&\n value != 'inherit' &&\n value.indexOf('expression') < 0 &&\n name.substr(0, 1) != '-' &&\n this.defaultStyleValues[name] != value &&\n ((isInheritable && value != thisStyle[name]) ||\n (!isInheritable && value != 'initial' && value != 'normal'));\n if (keep && isInheritable) {\n thisStyle[name] = value;\n }\n\n if (keep) {\n styles[name] = value;\n } else {\n delete styles[name];\n }\n });\n\n setStyles(element, styles);\n }\n\n private processAttributes(element: HTMLElement, context: Object) {\n for (let i = element.attributes.length - 1; i >= 0; i--) {\n let attribute = element.attributes[i];\n let name = attribute.name.toLowerCase().trim();\n let value = attribute.value;\n let callback = this.attributeCallbacks[name];\n\n let newValue = callback\n ? callback(value, element, context)\n : this.allowedAttributes.indexOf(name) >= 0 || name.indexOf('data-') == 0\n ? value\n : null;\n\n if (name == 'class' && this.allowedCssClassesRegex) {\n newValue = this.processCssClass(value, newValue);\n }\n\n if (\n newValue === null ||\n newValue === undefined ||\n newValue.match(/s\\n*c\\n*r\\n*i\\n*p\\n*t\\n*:/i) // match script: with any NewLine inside. Browser will ignore those NewLine char and still treat it as script prefix\n ) {\n element.removeAttribute(name);\n } else {\n attribute.value = newValue;\n }\n }\n }\n\n private processCssClass(originalValue: string, calculatedValue: string | null): string | null {\n const originalClasses = originalValue ? originalValue.split(' ') : [];\n const calculatedClasses = calculatedValue ? calculatedValue.split(' ') : [];\n\n originalClasses.forEach(className => {\n if (\n this.allowedCssClassesRegex?.test(className) &&\n calculatedClasses.indexOf(className) < 0\n ) {\n calculatedClasses.push(className);\n }\n });\n\n return calculatedClasses?.length > 0 ? calculatedClasses.join(' ') : null;\n }\n}\n","/**\n * Chain all callback for an attribute together\n * @param map The source callback map\n * @param name Name of the property to chain\n * @param newCallback A new callback to process the given name on the given map.\n * If the same property got multiple callbacks, the final return value will be the return\n * value of the latest callback\n */\nexport default function chainSanitizerCallback R, R>(\n map: Record R>,\n name: string,\n newCallback: TChainedFn\n) {\n if (!map[name]) {\n map[name] = newCallback;\n } else {\n const originalCallback = map[name];\n map[name] = (...args: TOriginalArgs) => {\n originalCallback(...args);\n return newCallback(...args);\n };\n }\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\n\nfunction nativeClone(\n source: Record | null | undefined,\n existingObj?: Record\n): Record {\n return Object.assign(existingObj || {}, source);\n}\n\nfunction customClone(\n source: Record | null | undefined,\n existingObj?: Record\n): Record {\n let result: Record = existingObj || {};\n if (source) {\n for (let key of getObjectKeys(source)) {\n result[key] = source[key];\n }\n }\n return result;\n}\n\n// @ts-ignore Ignore this error for IE compatibility\nconst cloneObjectImpl = Object.assign ? nativeClone : customClone;\n\n/**\n * @internal\n */\nexport function cloneObject(\n source: Record | null | undefined,\n existingObj?: Record\n): Record {\n return cloneObjectImpl(source, existingObj);\n}\n","import { HtmlSanitizerOptions } from 'roosterjs-editor-types';\n\n/**\n * Create default value of HtmlSanitizerOptions with every property set\n */\nexport default function createDefaultHtmlSanitizerOptions(): Required {\n return {\n elementCallbacks: {},\n attributeCallbacks: {},\n cssStyleCallbacks: {},\n additionalTagReplacements: {},\n additionalAllowedAttributes: [],\n additionalAllowedCssClasses: [],\n additionalDefaultStyleValues: {},\n additionalGlobalStyleNodes: [],\n additionalPredefinedCssForElement: {},\n preserveHtmlComments: false,\n unknownTagReplacement: null,\n };\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\nimport { cloneObject } from './cloneObject';\nimport { CssStyleCallbackMap, StringMap } from 'roosterjs-editor-types';\n\nconst HTML_TAG_REPLACEMENT: Record = {\n // Allowed tags\n a: '*',\n abbr: '*',\n address: '*',\n area: '*',\n article: '*',\n aside: '*',\n b: '*',\n bdi: '*',\n bdo: '*',\n blockquote: '*',\n body: '*',\n br: '*',\n button: '*',\n canvas: '*',\n caption: '*',\n center: '*',\n cite: '*',\n code: '*',\n col: '*',\n colgroup: '*',\n data: '*',\n datalist: '*',\n dd: '*',\n del: '*',\n details: '*',\n dfn: '*',\n dialog: '*',\n dir: '*',\n div: '*',\n dl: '*',\n dt: '*',\n em: '*',\n fieldset: '*',\n figcaption: '*',\n figure: '*',\n font: '*',\n footer: '*',\n h1: '*',\n h2: '*',\n h3: '*',\n h4: '*',\n h5: '*',\n h6: '*',\n head: '*',\n header: '*',\n hgroup: '*',\n hr: '*',\n html: '*',\n i: '*',\n img: '*',\n input: '*',\n ins: '*',\n kbd: '*',\n label: '*',\n legend: '*',\n li: '*',\n main: '*',\n map: '*',\n mark: '*',\n menu: '*',\n menuitem: '*',\n meter: '*',\n nav: '*',\n ol: '*',\n optgroup: '*',\n option: '*',\n output: '*',\n p: '*',\n picture: '*',\n pre: '*',\n progress: '*',\n q: '*',\n rp: '*',\n rt: '*',\n ruby: '*',\n s: '*',\n samp: '*',\n section: '*',\n select: '*',\n small: '*',\n span: '*',\n strike: '*',\n strong: '*',\n sub: '*',\n summary: '*',\n sup: '*',\n table: '*',\n tbody: '*',\n td: '*',\n textarea: '*',\n tfoot: '*',\n th: '*',\n thead: '*',\n time: '*',\n tr: '*',\n tt: '*',\n u: '*',\n ul: '*',\n var: '*',\n wbr: '*',\n xmp: '*',\n\n // Replaced tags:\n form: 'SPAN',\n\n // Disallowed tags\n applet: null,\n audio: null,\n base: null,\n basefont: null,\n embed: null,\n frame: null,\n frameset: null,\n iframe: null,\n link: null,\n meta: null,\n noscript: null,\n object: null,\n param: null,\n script: null,\n slot: null,\n source: null,\n style: null,\n template: null,\n title: null,\n track: null,\n video: null,\n};\n\nconst ALLOWED_HTML_ATTRIBUTES = (\n 'accept,align,alt,checked,cite,color,cols,colspan,contextmenu,' +\n 'coords,datetime,default,dir,dirname,disabled,download,face,headers,height,hidden,high,href,' +\n 'hreflang,ismap,kind,label,lang,list,low,max,maxlength,media,min,multiple,open,optimum,pattern,' +\n 'placeholder,readonly,rel,required,reversed,rows,rowspan,scope,selected,shape,size,sizes,span,' +\n 'spellcheck,src,srclang,srcset,start,step,style,tabindex,target,title,translate,type,usemap,valign,value,' +\n 'width,wrap,bgColor'\n).split(',');\n\nconst DEFAULT_STYLE_VALUES: { [name: string]: string } = {\n 'background-color': 'transparent',\n 'border-bottom-color': 'rgb(0, 0, 0)',\n 'border-bottom-style': 'none',\n 'border-bottom-width': '0px',\n 'border-image-outset': '0',\n 'border-image-repeat': 'stretch',\n 'border-image-slice': '100%',\n 'border-image-source': 'none',\n 'border-image-width': '1',\n 'border-left-color': 'rgb(0, 0, 0)',\n 'border-left-style': 'none',\n 'border-left-width': '0px',\n 'border-right-color': 'rgb(0, 0, 0)',\n 'border-right-style': 'none',\n 'border-right-width': '0px',\n 'border-top-color': 'rgb(0, 0, 0)',\n 'border-top-style': 'none',\n 'border-top-width': '0px',\n 'outline-color': 'transparent',\n 'outline-style': 'none',\n 'outline-width': '0px',\n overflow: 'visible',\n '-webkit-text-stroke-width': '0px',\n 'word-wrap': 'break-word',\n 'margin-left': '0px',\n 'margin-right': '0px',\n padding: '0px',\n 'padding-top': '0px',\n 'padding-left': '0px',\n 'padding-right': '0px',\n 'padding-bottom': '0px',\n border: '0px',\n 'border-top': '0px',\n 'border-left': '0px',\n 'border-right': '0px',\n 'border-bottom': '0px',\n 'vertical-align': 'baseline',\n float: 'none',\n};\n\n// This is to preserve entity related CSS classes when paste.\nconst ALLOWED_CSS_CLASSES: string[] = [];\n\n/**\n * @internal\n */\nexport function getTagReplacement(\n additionalReplacements: Record | undefined\n): Record {\n const result = { ...HTML_TAG_REPLACEMENT };\n const replacements = additionalReplacements || {};\n getObjectKeys(replacements).forEach(key => {\n if (key) {\n result[key.toLowerCase()] = replacements[key];\n }\n });\n\n return result;\n}\n\n/**\n * @internal\n */\nexport function getAllowedAttributes(additionalAttributes: string[] | undefined): string[] {\n return unique(ALLOWED_HTML_ATTRIBUTES.concat(additionalAttributes || [])).map(attr =>\n attr.toLocaleLowerCase()\n );\n}\n\n/**\n * @internal\n */\nexport function getAllowedCssClassesRegex(\n additionalCssClasses: string[] | undefined\n): RegExp | null {\n const patterns = ALLOWED_CSS_CLASSES.concat(additionalCssClasses || []);\n return patterns.length > 0 ? new RegExp(patterns.join('|')) : null;\n}\n\n/**\n * @internal\n */\nexport function getDefaultStyleValues(additionalDefaultStyles: StringMap | undefined): StringMap {\n let result = cloneObject(DEFAULT_STYLE_VALUES);\n if (additionalDefaultStyles) {\n Object.keys(additionalDefaultStyles).forEach(name => {\n let value = additionalDefaultStyles[name];\n if (value !== null && value !== undefined) {\n result[name] = value;\n } else {\n delete result[name];\n }\n });\n }\n\n return result;\n}\n\n/**\n * @internal\n */\nexport function getStyleCallbacks(\n callbacks: CssStyleCallbackMap | null | undefined\n): CssStyleCallbackMap {\n let result = cloneObject(callbacks);\n result.position = result.position || removeValue;\n result.width = result.width || removeWidthForLiAndDiv;\n return result;\n}\n\nfunction removeValue(): null {\n return null;\n}\n\nfunction removeWidthForLiAndDiv(value: string, element: HTMLElement) {\n let tag = element.tagName;\n return !(tag == 'LI' || tag == 'DIV');\n}\n\nfunction unique(array: T[]): T[] {\n return array.filter((value, index, self) => self.indexOf(value) == index);\n}\n","import { StringMap } from 'roosterjs-editor-types';\n\n// Inheritable CSS properties\n// Ref: https://www.w3.org/TR/CSS21/propidx.html\nconst INHERITABLE_PROPERTIES = (\n 'border-spacing,caption-side,color,' +\n 'cursor,direction,empty-cells,font-family,font-size,font-style,font-variant,font-weight,' +\n 'font,letter-spacing,line-height,list-style-image,list-style-position,list-style-type,' +\n 'list-style,orphans,quotes,text-align,text-indent,text-transform,visibility,white-space,' +\n 'widows,word-spacing'\n).split(',');\n\n/**\n * Get inheritable CSS style values from the given element\n * @param element The element to get style from\n */\nexport default function getInheritableStyles(element: HTMLElement | null): StringMap {\n let win = element && element.ownerDocument && element.ownerDocument.defaultView;\n let styles = win && element && win.getComputedStyle(element);\n let result: StringMap = {};\n INHERITABLE_PROPERTIES.forEach(\n name => (result[name] = (styles && styles.getPropertyValue(name)) || '')\n );\n return result;\n}\n","import getTagOfNode from '../utils/getTagOfNode';\nimport { PredefinedCssMap, StringMap } from 'roosterjs-editor-types';\n\nconst PREDEFINED_CSS_FOR_ELEMENT: PredefinedCssMap = {\n B: {\n 'font-weight': 'bold',\n },\n EM: {\n 'font-style': 'italic',\n },\n I: {\n 'font-style': 'italic',\n },\n U: {\n 'text-decoration': 'underline',\n },\n P: {\n 'margin-top': '1em',\n 'margin-bottom': '1em',\n },\n PRE: {\n 'white-space': 'pre',\n },\n S: {\n 'text-decoration': 'line-through',\n },\n STRIKE: {\n 'text-decoration': 'line-through',\n },\n SUB: {\n 'vertical-align': 'sub',\n 'font-size': 'smaller',\n },\n SUP: {\n 'vertical-align': 'super',\n 'font-size': 'smaller',\n },\n};\n\n/**\n * @internal\n * Get a map for browser built-in CSS definitions of elements\n */\nexport default function getPredefinedCssForElement(\n element: HTMLElement,\n additionalPredefinedCssForElement?: PredefinedCssMap | null\n): StringMap {\n const tag = getTagOfNode(element);\n return PREDEFINED_CSS_FOR_ELEMENT[tag] || (additionalPredefinedCssForElement || {})[tag];\n}\n","const VARIABLE_REGEX = /^\\s*var\\(\\s*[a-zA-Z0-9-_]+\\s*(,\\s*(.*))?\\)\\s*$/;\nconst VARIABLE_PREFIX = 'var(';\n\n/**\n * @internal\n * Handle CSS variable format. e.g.: var(--name, fallbackValue)\n */\nexport function processCssVariable(value: string): string {\n const match = VARIABLE_REGEX.exec(value);\n return match?.[2] || ''; // Without fallback value, we don't know what does the original value mean, so ignore it\n}\n\n/**\n * @internal\n */\nexport function isCssVariable(value: string): boolean {\n return value.indexOf(VARIABLE_PREFIX) == 0;\n}\n","export { default as getBlockElementAtNode } from './blockElements/getBlockElementAtNode';\nexport { default as getFirstLastBlockElement } from './blockElements/getFirstLastBlockElement';\n\nexport { default as ContentTraverser } from './contentTraverser/ContentTraverser';\nexport { default as PositionContentSearcher } from './contentTraverser/PositionContentSearcher';\n\nexport {\n default as addDelimiters,\n addDelimiterAfter,\n addDelimiterBefore,\n} from './delimiter/addDelimiters';\nexport { default as getDelimiterFromElement } from './delimiter/getDelimiterFromElement';\n\nexport { default as getInlineElementAtNode } from './inlineElements/getInlineElementAtNode';\nexport { default as ImageInlineElement } from './inlineElements/ImageInlineElement';\nexport { default as LinkInlineElement } from './inlineElements/LinkInlineElement';\nexport { default as NodeInlineElement } from './inlineElements/NodeInlineElement';\nexport { default as PartialInlineElement } from './inlineElements/PartialInlineElement';\nexport { default as applyTextStyle } from './inlineElements/applyTextStyle';\n\nexport { default as extractClipboardEvent } from './clipboard/extractClipboardEvent';\nexport { default as extractClipboardItems } from './clipboard/extractClipboardItems';\nexport { default as extractClipboardItemsForIE } from './clipboard/extractClipboardItemsForIE';\nexport { default as createFragmentFromClipboardData } from './clipboard/createFragmentFromClipboardData';\nexport { default as handleImagePaste } from './clipboard/handleImagePaste';\nexport { default as handleTextPaste } from './clipboard/handleTextPaste';\nexport { default as retrieveMetadataFromClipboard } from './clipboard/retrieveMetadataFromClipboard';\nexport { default as sanitizePasteContent } from './clipboard/sanitizePasteContent';\nexport { default as getPasteType } from './clipboard/getPasteType';\n\nexport { Browser, getBrowserInfo } from './utils/Browser';\nexport { default as applyFormat } from './utils/applyFormat';\nexport { default as changeElementTag } from './utils/changeElementTag';\nexport { default as collapseNodes } from './utils/collapseNodes';\nexport { default as contains } from './utils/contains';\nexport { default as findClosestElementAncestor } from './utils/findClosestElementAncestor';\nexport { default as fromHtml } from './utils/fromHtml';\nexport { default as getComputedStyles, getComputedStyle } from './utils/getComputedStyles';\nexport {\n default as getPendableFormatState,\n PendableFormatCommandMap,\n PendableFormatNames,\n} from './utils/getPendableFormatState';\nexport { default as getTagOfNode } from './utils/getTagOfNode';\nexport { default as isBlockElement } from './utils/isBlockElement';\nexport { default as isNodeEmpty } from './utils/isNodeEmpty';\nexport { default as isVoidHtmlElement } from './utils/isVoidHtmlElement';\nexport { default as matchLink } from './utils/matchLink';\nexport { default as queryElements } from './utils/queryElements';\nexport { default as splitParentNode, splitBalancedNodeRange } from './utils/splitParentNode';\nexport { default as unwrap } from './utils/unwrap';\nexport { default as wrap } from './utils/wrap';\nexport { getNextLeafSibling, getPreviousLeafSibling } from './utils/getLeafSibling';\nexport { getFirstLeafNode, getLastLeafNode } from './utils/getLeafNode';\nexport { default as splitTextNode } from './utils/splitTextNode';\nexport { default as normalizeRect } from './utils/normalizeRect';\nexport { default as safeInstanceOf } from './utils/safeInstanceOf';\nexport { default as readFile } from './utils/readFile';\nexport { default as getInnerHTML } from './utils/getInnerHTML';\nexport { default as setColor } from './utils/setColor';\nexport { default as matchesSelector } from './utils/matchesSelector';\nexport { default as createElement, KnownCreateElementData } from './utils/createElement';\nexport { default as moveChildNodes } from './utils/moveChildNodes';\nexport { default as getIntersectedRect } from './utils/getIntersectedRect';\nexport { default as isNodeAfter } from './utils/isNodeAfter';\nexport { default as parseColor } from './utils/parseColor';\n\nexport { default as VTable } from './table/VTable';\nexport { default as isWholeTableSelected } from './table/isWholeTableSelected';\n\nexport { default as VList } from './list/VList';\nexport { default as VListItem } from './list/VListItem';\nexport { default as createVListFromRegion } from './list/createVListFromRegion';\nexport { default as VListChain } from './list/VListChain';\nexport { default as setListItemStyle } from './list/setListItemStyle';\nexport { getTableFormatInfo } from './table/tableFormatInfo';\nexport { saveTableCellMetadata } from './table/tableCellInfo';\n\nexport { default as getRegionsFromRange } from './region/getRegionsFromRange';\nexport { default as getSelectedBlockElementsInRegion } from './region/getSelectedBlockElementsInRegion';\nexport { default as collapseNodesInRegion } from './region/collapseNodesInRegion';\nexport { default as isNodeInRegion } from './region/isNodeInRegion';\nexport { default as getSelectionRangeInRegion } from './region/getSelectionRangeInRegion';\nexport { default as mergeBlocksInRegion } from './region/mergeBlocksInRegion';\n\nexport { default as Position } from './selection/Position';\nexport { default as createRange } from './selection/createRange';\nexport { default as getPositionRect } from './selection/getPositionRect';\nexport { default as isPositionAtBeginningOf } from './selection/isPositionAtBeginningOf';\nexport { default as getSelectionPath } from './selection/getSelectionPath';\nexport { default as getHtmlWithSelectionPath } from './selection/getHtmlWithSelectionPath';\nexport {\n default as setHtmlWithSelectionPath,\n setHtmlWithMetadata,\n extractContentMetadata,\n} from './selection/setHtmlWithSelectionPath';\nexport { default as addRangeToSelection } from './selection/addRangeToSelection';\n\nexport { default as addSnapshot, addSnapshotV2 } from './snapshots/addSnapshot';\nexport { default as canMoveCurrentSnapshot } from './snapshots/canMoveCurrentSnapshot';\nexport {\n default as clearProceedingSnapshots,\n clearProceedingSnapshotsV2,\n} from './snapshots/clearProceedingSnapshots';\nexport {\n default as moveCurrentSnapshot,\n moveCurrentSnapsnot,\n} from './snapshots/moveCurrentSnapshot';\nexport { default as createSnapshots } from './snapshots/createSnapshots';\nexport { default as canUndoAutoComplete } from './snapshots/canUndoAutoComplete';\n\nexport { default as HtmlSanitizer } from './htmlSanitizer/HtmlSanitizer';\nexport { default as getInheritableStyles } from './htmlSanitizer/getInheritableStyles';\nexport { default as createDefaultHtmlSanitizerOptions } from './htmlSanitizer/createDefaultHtmlSanitizerOptions';\nexport { default as chainSanitizerCallback } from './htmlSanitizer/chainSanitizerCallback';\n\nexport { default as commitEntity } from './entity/commitEntity';\nexport { default as getEntityFromElement } from './entity/getEntityFromElement';\nexport { default as getEntitySelector } from './entity/getEntitySelector';\nexport {\n createEntityPlaceholder,\n moveContentWithEntityPlaceholders,\n restoreContentWithEntityPlaceholder,\n} from './entity/entityPlaceholderUtils';\n\nexport { default as cacheGetEventData } from './event/cacheGetEventData';\nexport { default as clearEventDataCache } from './event/clearEventDataCache';\nexport { default as isModifierKey } from './event/isModifierKey';\nexport { default as isCharacterValue } from './event/isCharacterValue';\nexport { default as isCtrlOrMetaPressed } from './event/isCtrlOrMetaPressed';\n\nexport { default as getStyles } from './style/getStyles';\nexport { default as setStyles } from './style/setStyles';\nexport { default as removeImportantStyleRule } from './style/removeImportantStyleRule';\nexport { default as setGlobalCssStyles } from './style/setGlobalCssStyles';\nexport { default as removeGlobalCssStyle } from './style/removeGlobalCssStyle';\n\nexport { default as adjustInsertPosition } from './edit/adjustInsertPosition';\nexport { default as deleteSelectedContent } from './edit/deleteSelectedContent';\nexport { default as getTextContent } from './edit/getTextContent';\n\nexport { default as validate } from './metadata/validate';\nexport {\n createNumberDefinition,\n createBooleanDefinition,\n createStringDefinition,\n createArrayDefinition,\n createObjectDefinition,\n} from './metadata/definitionCreators';\nexport { getMetadata, setMetadata, removeMetadata } from './metadata/metadata';\n\nexport { default as arrayPush } from './jsUtils/arrayPush';\nexport { default as getObjectKeys } from './jsUtils/getObjectKeys';\nexport { default as toArray } from './jsUtils/toArray';\n\nexport { default as getPasteSource } from './pasteSourceValidations/getPasteSource';\n","import { BlockElement, InlineElement, NodePosition } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Represents an empty InlineElement.\r\n * This is used for ContentTraverser internally only.\r\n * An empty InlineElement means current position is at the end of a tag so nothing is included inside this element\r\n */\r\nexport default class EmptyInlineElement implements InlineElement {\r\n constructor(private position: NodePosition, private parentBlock: BlockElement) {}\r\n\r\n /**\r\n * Get the text content of this inline element\r\n */\r\n getTextContent(): string {\r\n return '';\r\n }\r\n\r\n /**\r\n * Get the container node of this inline element\r\n */\r\n getContainerNode(): Node {\r\n return this.position.node;\r\n }\r\n\r\n /**\r\n * Get the parent block element of this inline element\r\n */\r\n getParentBlock(): BlockElement {\r\n return this.parentBlock;\r\n }\r\n\r\n /**\r\n * Get the start position of this inline element\r\n */\r\n getStartPosition(): NodePosition {\r\n return this.position;\r\n }\r\n\r\n /**\r\n * Get the end position of this inline element\r\n */\r\n getEndPosition(): NodePosition {\r\n return this.position;\r\n }\r\n\r\n /**\r\n * Checks if the given inline element is after this inline element\r\n */\r\n isAfter(inlineElement: InlineElement): boolean {\r\n return inlineElement && this.position.isAfter(inlineElement.getEndPosition());\r\n }\r\n\r\n /**\r\n * Checks if this inline element is a textual inline element\r\n */\r\n isTextualInlineElement(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if the given editor position is contained in this inline element\r\n */\r\n contains(position: NodePosition): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Apply inline style to a region of an inline element.\r\n */\r\n applyStyle(styler: (element: HTMLElement) => any): void {}\r\n}\r\n","import NodeInlineElement from './NodeInlineElement';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This is an inline element representing an Html image\r\n */\r\nexport default class ImageInlineElement extends NodeInlineElement {\r\n constructor(containerNode: Node, parentBlock: BlockElement) {\r\n super(containerNode, parentBlock);\r\n }\r\n}\r\n","import NodeInlineElement from './NodeInlineElement';\r\nimport { BlockElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This is inline element presenting an html hyperlink\r\n */\r\nexport default class LinkInlineElement extends NodeInlineElement {\r\n constructor(containerNode: Node, parentBlock: BlockElement) {\r\n super(containerNode, parentBlock);\r\n }\r\n}\r\n","import applyTextStyle from './applyTextStyle';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport Position from '../selection/Position';\r\nimport {\r\n BlockElement,\r\n InlineElement,\r\n NodePosition,\r\n NodeType,\r\n PositionType,\r\n} from 'roosterjs-editor-types';\r\n\r\n/**\r\n * This presents an inline element that can be represented by a single html node.\r\n * This serves as base for most inline element as it contains most implementation\r\n * of all operations that can happen on an inline element. Other sub inline elements mostly\r\n * just identify themselves for a certain type\r\n */\r\nexport default class NodeInlineElement implements InlineElement {\r\n constructor(private containerNode: Node, private parentBlock: BlockElement) {}\r\n\r\n /**\r\n * The text content for this inline element\r\n */\r\n public getTextContent(): string {\r\n // nodeValue is better way to retrieve content for a text. Others, just use textContent\r\n return (\r\n (this.containerNode.nodeType == NodeType.Text\r\n ? this.containerNode.nodeValue\r\n : this.containerNode.textContent) || ''\r\n );\r\n }\r\n\r\n /**\r\n * Get the container node\r\n */\r\n public getContainerNode(): Node {\r\n return this.containerNode;\r\n }\r\n\r\n // Get the parent block\r\n public getParentBlock(): BlockElement {\r\n return this.parentBlock;\r\n }\r\n\r\n /**\r\n * Get the start position of the inline element\r\n */\r\n public getStartPosition(): NodePosition {\r\n // For a position, we always want it to point to a leaf node\r\n // We should try to go get the lowest first child node from the container\r\n return new Position(this.containerNode, 0).normalize();\r\n }\r\n\r\n /**\r\n * Get the end position of the inline element\r\n */\r\n public getEndPosition(): NodePosition {\r\n // For a position, we always want it to point to a leaf node\r\n // We should try to go get the lowest last child node from the container\r\n return new Position(this.containerNode, PositionType.End).normalize();\r\n }\r\n\r\n /**\r\n * Checks if this inline element is a textual inline element\r\n */\r\n public isTextualInlineElement(): boolean {\r\n return this.containerNode && this.containerNode.nodeType == NodeType.Text;\r\n }\r\n\r\n /**\r\n * Checks if an inline element is after the current inline element\r\n */\r\n public isAfter(inlineElement: InlineElement): boolean {\r\n return inlineElement && isNodeAfter(this.containerNode, inlineElement.getContainerNode());\r\n }\r\n\r\n /**\r\n * Checks if the given position is contained in the inline element\r\n */\r\n public contains(pos: NodePosition): boolean {\r\n let start = this.getStartPosition();\r\n let end = this.getEndPosition();\r\n return pos && pos.isAfter(start) && end.isAfter(pos);\r\n }\r\n\r\n /**\r\n * Apply inline style to an inline element\r\n */\r\n public applyStyle(styler: (element: HTMLElement, isInnerNode?: boolean) => any): void {\r\n applyTextStyle(this.containerNode, styler);\r\n }\r\n}\r\n","import applyTextStyle from './applyTextStyle';\r\nimport createRange from '../selection/createRange';\r\nimport Position from '../selection/Position';\r\nimport { BlockElement, InlineElement, NodePosition, PositionType } from 'roosterjs-editor-types';\r\nimport { getNextLeafSibling, getPreviousLeafSibling } from '../utils/getLeafSibling';\r\n\r\n/**\r\n * This is a special version of inline element that identifies a section of an inline element\r\n * We often have the need to cut an inline element in half and perform some operation only on half of an inline element\r\n * i.e. users select only some text of a text node and apply format, in that case, format has to happen on partial of an inline element\r\n * PartialInlineElement is implemented in a way that decorate another full inline element with its own override on methods like isAfter\r\n * It also offers some special methods that others don't have, i.e. nextInlineElement etc.\r\n */\r\nexport default class PartialInlineElement implements InlineElement {\r\n constructor(\r\n private inlineElement: InlineElement,\r\n private start: NodePosition | null = null,\r\n private end: NodePosition | null = null\r\n ) {}\r\n\r\n /**\r\n * Get the full inline element that this partial inline decorates\r\n */\r\n public getDecoratedInline(): InlineElement {\r\n return this.inlineElement;\r\n }\r\n\r\n /**\r\n * Gets the container node\r\n */\r\n public getContainerNode(): Node {\r\n return this.inlineElement.getContainerNode();\r\n }\r\n\r\n /**\r\n * Gets the parent block\r\n */\r\n public getParentBlock(): BlockElement {\r\n return this.inlineElement.getParentBlock();\r\n }\r\n\r\n /**\r\n * Gets the text content\r\n */\r\n public getTextContent(): string {\r\n let range = createRange(this.getStartPosition(), this.getEndPosition());\r\n\r\n return range.toString();\r\n }\r\n\r\n /**\r\n * Get start position of this inline element.\r\n */\r\n public getStartPosition(): NodePosition {\r\n return this.start || this.inlineElement.getStartPosition();\r\n }\r\n\r\n /**\r\n * Get end position of this inline element.\r\n */\r\n public getEndPosition(): NodePosition {\r\n return this.end || this.inlineElement.getEndPosition();\r\n }\r\n\r\n /**\r\n * Get next partial inline element if it is not at the end boundary yet\r\n */\r\n public get nextInlineElement(): PartialInlineElement | null {\r\n return this.end ? new PartialInlineElement(this.inlineElement, this.end) : null;\r\n }\r\n\r\n /**\r\n * Get previous partial inline element if it is not at the begin boundary yet\r\n */\r\n public get previousInlineElement(): PartialInlineElement | null {\r\n return this.start\r\n ? new PartialInlineElement(this.inlineElement, undefined, this.start)\r\n : null;\r\n }\r\n\r\n /**\r\n * Checks if it contains a position\r\n */\r\n public contains(pos: NodePosition): boolean {\r\n return pos && pos.isAfter(this.getStartPosition()) && this.getEndPosition().isAfter(pos);\r\n }\r\n\r\n /**\r\n * Checks if this inline element is a textual inline element\r\n */\r\n public isTextualInlineElement(): boolean {\r\n return this.inlineElement && this.inlineElement.isTextualInlineElement();\r\n }\r\n\r\n /**\r\n * Check if this inline element is after the other inline element\r\n */\r\n public isAfter(inlineElement: InlineElement): boolean {\r\n let thisStart = this.getStartPosition();\r\n let otherEnd = inlineElement && inlineElement.getEndPosition();\r\n return otherEnd && (thisStart.isAfter(otherEnd) || thisStart.equalTo(otherEnd));\r\n }\r\n\r\n /**\r\n * apply style\r\n */\r\n public applyStyle(styler: (element: HTMLElement, isInnerNode?: boolean) => any) {\r\n let from: NodePosition | null = this.getStartPosition().normalize();\r\n let to: NodePosition | null = this.getEndPosition().normalize();\r\n let container = this.getContainerNode();\r\n\r\n if (from.isAtEnd) {\r\n let nextNode = getNextLeafSibling(container, from.node);\r\n from = nextNode ? new Position(nextNode, PositionType.Begin) : null;\r\n }\r\n if (to.offset == 0) {\r\n let previousNode = getPreviousLeafSibling(container, to.node);\r\n to = previousNode ? new Position(previousNode, PositionType.End) : null;\r\n }\r\n\r\n applyTextStyle(container, styler, from || undefined, to || undefined);\r\n }\r\n}\r\n","import getTagOfNode from '../utils/getTagOfNode';\nimport Position from '../selection/Position';\nimport splitTextNode from '../utils/splitTextNode';\nimport wrap from '../utils/wrap';\nimport { getNextLeafSibling } from '../utils/getLeafSibling';\nimport { NodePosition, NodeType, PositionType } from 'roosterjs-editor-types';\nimport { splitBalancedNodeRange } from '../utils/splitParentNode';\nimport safeInstanceOf from '../utils/safeInstanceOf';\n\nconst STYLET_AGS = 'SPAN,B,I,U,EM,STRONG,STRIKE,S,SMALL,SUP,SUB'.split(',');\n\n/**\n * Apply style using a styler function to the given container node in the given range\n * @param container The container node to apply style to\n * @param styler The styler function\n * @param fromPosition From position\n * @param toPosition To position\n */\nexport default function applyTextStyle(\n container: Node,\n styler: (node: HTMLElement, isInnerNode?: boolean) => any,\n from: NodePosition = new Position(container, PositionType.Begin).normalize(),\n to: NodePosition = new Position(container, PositionType.End).normalize()\n) {\n let formatNodes: Node[] = [];\n let fromPosition: NodePosition | null = from;\n let toPosition: NodePosition | null = to;\n\n while (fromPosition && toPosition && toPosition.isAfter(fromPosition)) {\n let formatNode = fromPosition.node;\n let parentTag = getTagOfNode(formatNode.parentNode);\n\n // The code below modifies DOM. Need to get the next sibling first otherwise you won't be able to reliably get a good next sibling node\n let nextNode = getNextLeafSibling(container, formatNode);\n\n if (formatNode.nodeType == NodeType.Text && ['TR', 'TABLE'].indexOf(parentTag) < 0) {\n if (formatNode == toPosition.node && !toPosition.isAtEnd) {\n formatNode = splitTextNode(\n formatNode,\n toPosition.offset,\n true /*returnFirstPart*/\n );\n }\n\n if (fromPosition.offset > 0) {\n formatNode = splitTextNode(\n formatNode,\n fromPosition.offset,\n false /*returnFirstPart*/\n );\n }\n\n formatNodes.push(formatNode);\n }\n\n fromPosition = nextNode && new Position(nextNode, PositionType.Begin);\n }\n\n if (formatNodes.length > 0) {\n if (formatNodes.every(node => node.parentNode == formatNodes[0].parentNode)) {\n let newNode = formatNodes.shift()!;\n formatNodes.forEach(node => {\n const newNodeValue = (newNode.nodeValue || '') + (node.nodeValue || '');\n newNode.nodeValue = newNodeValue;\n node.parentNode?.removeChild(node);\n });\n formatNodes = [newNode];\n }\n\n formatNodes.forEach(startingNode => {\n // When apply style within style tags like B/I/U/..., we split the tag and apply outside them\n // So that the inner style tag such as U, STRIKE can inherit the style we added\n let node: Node | null = startingNode;\n while (\n node &&\n getTagOfNode(node) != 'SPAN' &&\n STYLET_AGS.indexOf(getTagOfNode(node.parentNode)) >= 0\n ) {\n callStylerWithInnerNode(node, styler);\n node = splitBalancedNodeRange(node);\n }\n\n if (node && getTagOfNode(node) != 'SPAN') {\n callStylerWithInnerNode(node, styler);\n node = wrap(node, 'SPAN');\n }\n\n if (safeInstanceOf(node, 'HTMLElement')) {\n styler(node);\n }\n });\n }\n}\n\nfunction callStylerWithInnerNode(\n node: Node,\n styler: (node: HTMLElement, isInnerNode?: boolean) => any\n) {\n if (node && node.nodeType == NodeType.Element) {\n styler(node as HTMLElement, true /*isInnerNode*/);\n }\n}\n","import getInlineElementAtNode from './getInlineElementAtNode';\r\nimport { getFirstLeafNode, getLastLeafNode } from '../utils/getLeafNode';\r\nimport { InlineElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Get the first inline element inside the given node\r\n */\r\nexport function getFirstInlineElement(rootNode: Node): InlineElement | null {\r\n // getFirstLeafNode can return null for empty container\r\n // do check null before passing on to get inline from the node\r\n let node = getFirstLeafNode(rootNode);\r\n return node ? getInlineElementAtNode(rootNode, node) : null;\r\n}\r\n\r\n/**\r\n * @internal\r\n * Get the last inline element inside the given node\r\n */\r\nexport function getLastInlineElement(rootNode: Node): InlineElement | null {\r\n // getLastLeafNode can return null for empty container\r\n // do check null before passing on to get inline from the node\r\n let node = getLastLeafNode(rootNode);\r\n return node ? getInlineElementAtNode(rootNode, node) : null;\r\n}\r\n","import getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport ImageInlineElement from './ImageInlineElement';\r\nimport LinkInlineElement from './LinkInlineElement';\r\nimport NodeInlineElement from './NodeInlineElement';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport { BlockElement, InlineElement } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get the inline element at a node\r\n * @param rootNode The root node of current scope\r\n * @param node The node to get InlineElement from\r\n */\r\nexport default function getInlineElementAtNode(rootNode: Node, node: Node | null): InlineElement;\r\n\r\n/**\r\n * Get the inline element at a node\r\n * @param parentBlock Parent BlockElement of this node\r\n * @param node The node to get InlineElement from\r\n */\r\nexport default function getInlineElementAtNode(\r\n parentBlock: BlockElement,\r\n node: Node | null\r\n): InlineElement;\r\n\r\nexport default function getInlineElementAtNode(\r\n parent: Node | BlockElement,\r\n node: Node | null\r\n): InlineElement | null {\r\n // An inline element has to be in a block element, get the block first and then resolve through the factory\r\n let parentBlock = safeInstanceOf(parent, 'Node') ? getBlockElementAtNode(parent, node) : parent;\r\n return node && parentBlock && resolveInlineElement(node, parentBlock);\r\n}\r\n\r\n/**\r\n * Resolve an inline element by a leaf node\r\n * @param node The node to resolve from\r\n * @param parentBlock The parent block element\r\n */\r\nfunction resolveInlineElement(node: Node, parentBlock: BlockElement): InlineElement {\r\n let nodeChain = [node];\r\n for (\r\n let parent = node.parentNode;\r\n parent && parentBlock.contains(parent);\r\n parent = parent.parentNode\r\n ) {\r\n nodeChain.push(parent);\r\n }\r\n\r\n let inlineElement: InlineElement | undefined;\r\n\r\n for (let i = nodeChain.length - 1; i >= 0 && !inlineElement; i--) {\r\n let currentNode = nodeChain[i];\r\n let tag = getTagOfNode(currentNode);\r\n if (tag == 'A') {\r\n inlineElement = new LinkInlineElement(currentNode, parentBlock);\r\n } else if (tag == 'IMG') {\r\n inlineElement = new ImageInlineElement(currentNode, parentBlock);\r\n }\r\n }\r\n\r\n return inlineElement || new NodeInlineElement(node, parentBlock);\r\n}\r\n","import getInlineElementAtNode from './getInlineElementAtNode';\r\nimport PartialInlineElement from './PartialInlineElement';\r\nimport shouldSkipNode from '../utils/shouldSkipNode';\r\nimport { getLeafSibling } from '../utils/getLeafSibling';\r\nimport { InlineElement, NodePosition, NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * @internal\r\n * Get inline element before a position\r\n * This is mostly used when we want to get the inline element before selection/cursor\r\n * There is a possible that the cursor is in middle of an inline element (i.e. mid of a text node)\r\n * in this case, we only want to return what is before cursor (a partial of an inline) to indicate\r\n * that we're in middle.\r\n * @param root Root node of current scope, use for create InlineElement\r\n * @param position The position to get InlineElement before\r\n */\r\nexport function getInlineElementBefore(root: Node, position: NodePosition): InlineElement | null {\r\n return getInlineElementBeforeAfter(root, position, false /*isAfter*/);\r\n}\r\n\r\n/**\r\n * @internal\r\n * Get inline element after a position\r\n * This is mostly used when we want to get the inline element after selection/cursor\r\n * There is a possible that the cursor is in middle of an inline element (i.e. mid of a text node)\r\n * in this case, we only want to return what is before cursor (a partial of an inline) to indicate\r\n * that we're in middle.\r\n * @param root Root node of current scope, use for create InlineElement\r\n * @param position The position to get InlineElement after\r\n */\r\nexport function getInlineElementAfter(root: Node, position: NodePosition): InlineElement | null {\r\n return getInlineElementBeforeAfter(root, position, true /*isAfter*/);\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function getInlineElementBeforeAfter(root: Node, position: NodePosition, isAfter: boolean) {\r\n if (!root || !position || !position.node) {\r\n return null;\r\n }\r\n\r\n position = position.normalize();\r\n let { offset, isAtEnd } = position;\r\n let node: Node | null = position.node;\r\n let isPartial = false;\r\n\r\n if ((!isAfter && offset == 0 && !isAtEnd) || (isAfter && isAtEnd)) {\r\n node = getLeafSibling(root, node, isAfter);\r\n } else if (\r\n node.nodeType == NodeType.Text &&\r\n ((!isAfter && !isAtEnd) || (isAfter && offset > 0))\r\n ) {\r\n isPartial = true;\r\n }\r\n\r\n if (node && shouldSkipNode(node)) {\r\n node = getLeafSibling(root, node, isAfter);\r\n }\r\n\r\n let inlineElement = getInlineElementAtNode(root, node);\r\n\r\n if (inlineElement && (isPartial || inlineElement.contains(position))) {\r\n inlineElement = isAfter\r\n ? new PartialInlineElement(inlineElement, position, undefined)\r\n : new PartialInlineElement(inlineElement, undefined, position);\r\n }\r\n\r\n return inlineElement;\r\n}\r\n","/**\n * A type-safe wrapper for Array.prototype.push.apply()\n * @param mainArray The main array to push items into\n * @param itemsArray The items to push to main array\n */\nexport default function arrayPush(mainArray: T[], itemsArray: T[]) {\n Array.prototype.push.apply(mainArray, itemsArray);\n}\n","/**\n * Provide a strong-typed version of Object.keys()\n * @param obj The source object\n * @returns Array of keys\n */\nexport default function getObjectKeys(\n obj: Record | Partial>\n): T[] {\n return Object.keys(obj) as T[];\n}\n","/**\n * Convert a named node map to an array\n * @param collection The map to convert\n */\nexport default function toArray(collection: NamedNodeMap): Attr[];\n\n/**\n * Convert a named node map to an array\n * @param collection The map to convert\n */\nexport default function toArray(collection: DataTransferItemList): DataTransferItem[];\n\n/**\n * Convert a collection to an array\n * @param collection The collection to convert\n */\nexport default function toArray(collection: NodeListOf): T[];\n\n/**\n * Convert a collection to an array\n * @param collection The collection to convert\n */\nexport default function toArray(collection: HTMLCollectionOf): T[];\n\n/**\n * Convert an array to an array.\n * This is to satisfy typescript compiler. For some cases the object can be a collection at runtime,\n * but the declaration is an array. e.g. ClipboardData.types\n * @param array The array to convert\n */\nexport default function toArray(array: readonly T[]): T[];\n\nexport default function toArray(collection: any): any[] {\n return [].slice.call(collection);\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport getListTypeFromNode, { isListElement } from './getListTypeFromNode';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport isBlockElement from '../utils/isBlockElement';\nimport isNodeEmpty from '../utils/isNodeEmpty';\nimport Position from '../selection/Position';\nimport queryElements from '../utils/queryElements';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport splitParentNode from '../utils/splitParentNode';\nimport toArray from '../jsUtils/toArray';\nimport unwrap from '../utils/unwrap';\nimport VListItem, { ListStyleDefinitionMetadata, ListStyleMetadata } from './VListItem';\nimport wrap from '../utils/wrap';\nimport { getMetadata, setMetadata } from '../metadata/metadata';\nimport {\n Indentation,\n ListType,\n NodePosition,\n PositionType,\n NodeType,\n Alignment,\n NumberingListType,\n BulletListType,\n} from 'roosterjs-editor-types';\nimport type {\n CompatibleAlignment,\n CompatibleBulletListType,\n CompatibleIndentation,\n CompatibleListType,\n CompatibleNumberingListType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Represent a bullet or a numbering list\n *\n * @example\n * A VList is a logical representation of list items, it contains an item array with node and list type stack.\n * e.g. We have a list like this\n * ```html\n *
                  \n *
                1. item 1
                2. \n *
                3. item 2
                4. \n *
                    \n *
                  • item 2.1
                  • \n *
                  • item 2.2
                  • \n *
                      \n *
                \n * ```\n *\n * A VList of this list will be like this:\n * ```javascript\n * {\n * rootList: (OL node),\n * items: [{\n * node: (LI node with 'item 1'),\n * listTypes: [null, OL],\n * }, {\n * node: (LI node with 'item 2'),\n * listTypes: [null, OL],\n * }, {\n * node: (LI node with 'item 2.1),\n * listTypes: [null, OL, UL],\n * }, {\n * node: (LI node with 'item 2.2'),\n * listTypes: [null, OL, UL],\n * }\n * ]\n * }\n * ```\n *\n * When we want to outdent item 2.1, we just need to remove the last \"UL\" from listTypes of item 2.1, then\n * the writeBack() function will handle everything related to DOM change\n */\nexport default class VList {\n public readonly items: VListItem[] = [];\n\n /**\n * Create a new instance of VList class\n * @param rootList The root list element, can be either OL or UL tag\n */\n constructor(public rootList: HTMLOListElement | HTMLUListElement) {\n if (!rootList) {\n throw new Error('rootList must not be null');\n }\n\n // Before populate items, we need to normalize the list to make sure it is in a correct format\n // otherwise further action may mass thing up.\n //\n // There are two kinds of normalization to perform.\n // 1. Move nodes directly under OL/UL into a LI node, unless it is an orphan node\n // Please see comment for VListItem.isOrphanItem() for more information about orphan node\n // e.g.:\n // ```HTML\n //
                  \n //
                1. item 1
                2. \n //
                  item 2
                  \n //
                \n // ```\n // After this step, it should become:\n // ```html\n //
                  \n //
                1. item 1\n //
                  item 2
                  \n //
                2. \n //
                \n // ```\n moveChildNodesToLi(this.rootList);\n queryElements(this.rootList, 'ol,ul', moveChildNodesToLi);\n\n // 2. Move LI node embedded into another LI node out to directly under OL/UL node\n // Ideally browser we do this for us automatically when out the HTML into DOM. However after\n // step 1, it is possible that we move some LI node into another one. e.g:\n // ```HTML\n //
                  \n //
                1. item 1
                2. \n //
                  \n // item 1.1\n //
                3. item 3
                4. \n //
                  \n //
                \n // ```\n // See that the second LI tag is not directly under OL, so after step 1, this will become:\n // ```html\n //
                  \n //
                1. item 1\n //
                  \n // item 1.1\n //
                2. item 2
                3. \n //
                \n //
              2. \n // \n // ```\n // Now we have a LI tag embedded into another LI tag. So we need step 2 to move the inner LI tag out to be:\n // ```html\n //
                  \n //
                1. item1\n //
                  item 1.1
                  \n //
                2. \n //
                3. item2
                4. \n //
                \n // ```\n queryElements(this.rootList, 'li', moveLiToList);\n\n this.populateItems(this.rootList);\n }\n\n /**\n * Check if this list contains the given node\n * @param node The node to check\n */\n contains(node: Node) {\n // We don't check if the node is contained by this.rootList here, because after some operation,\n // it is possible a node is logically contained by this list but the container list item hasn't\n // been put under this.rootList in DOM tree yet.\n return this.items.some(item => item.contains(node));\n }\n\n /**\n * Get list number of the last item in this VList.\n * If there is no order list item, result will be undefined\n */\n getLastItemNumber(): number | undefined {\n const start = this.getStart();\n\n return start === undefined\n ? start\n : start -\n 1 +\n this.items.filter(\n item =>\n item.getListType() == ListType.Ordered &&\n item.getLevel() == 1 &&\n !item.isDummy()\n ).length;\n }\n\n /**\n * Write the result back into DOM tree\n * After that, this VList becomes unavailable because we set this.rootList to null\n *\n * @param shouldReuseAllAncestorListElements Optional - defaults to false.\n * @param disableListChain Whether we want to disable list chain functionality. @default false\n */\n writeBack(shouldReuseAllAncestorListElements?: boolean, disableListChain?: boolean) {\n if (!this.rootList) {\n throw new Error('rootList must not be null');\n }\n\n const doc = this.rootList.ownerDocument;\n const listStack: Node[] = [doc.createDocumentFragment()];\n const placeholder = doc.createTextNode('');\n let start = this.getStart() || 1;\n let lastList: Node;\n\n // Use a placeholder to hold the position since the root list may be moved into document fragment later\n this.rootList.parentNode!.replaceChild(placeholder, this.rootList);\n\n this.items.forEach(item => {\n const newListStart = item.getNewListStart();\n\n if (newListStart && newListStart != start) {\n listStack.splice(1, listStack.length - 1);\n start = newListStart;\n }\n\n item.writeBack(listStack, this.rootList, shouldReuseAllAncestorListElements);\n const topList = listStack[1];\n\n item.applyListStyle(this.rootList, start);\n\n if (safeInstanceOf(topList, 'HTMLOListElement')) {\n if (lastList != topList) {\n if (start == 1) {\n topList.removeAttribute('start');\n } else {\n topList.start = start;\n }\n }\n\n if (item.getLevel() == 1 && !item.isDummy() && !disableListChain) {\n start++;\n }\n }\n\n lastList = topList;\n });\n\n // Restore the content to the position of placeholder\n placeholder.parentNode!.replaceChild(listStack[0], placeholder);\n }\n\n /**\n * Sets the New List Start Property, that is going to be used to create a new List in the WriteBack function\n * @param separator The HTML element that indicates when to split the VList\n * @param startNumber The start number of the new List\n */\n split(separator: HTMLElement, startNumber: number) {\n if (!this.rootList) {\n throw new Error('rootList must not be null');\n }\n\n //Traverse the items of the VList, when the separator is found, set the New List Start Property\n for (let index = 0; index < this.items.length; index++) {\n if (this.items[index].getNode() == separator) {\n this.items[index].setNewListStart(startNumber);\n return;\n }\n }\n }\n\n /**\n * Set indentation of the given range of this list\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param indentation Indent or outdent\n */\n setIndentation(\n start: NodePosition,\n end: NodePosition,\n indentation: Indentation | CompatibleIndentation\n ): void;\n\n /**\n * Outdent the give range of this list\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param indentation Specify to outdent\n * @param softOutdent (Optional) True to make the item to by dummy (no bullet or number) if the item is not dummy,\n * otherwise outdent the item\n * @param preventItemRemoval (Optional) True to prevent the indentation to remove the bullet when outdenting a first\n * level list item, by default is false\n */\n setIndentation(\n start: NodePosition,\n end: NodePosition,\n indentation: Indentation.Decrease | CompatibleIndentation.Decrease,\n softOutdent?: boolean,\n preventItemRemoval?: boolean\n ): void;\n\n setIndentation(\n start: NodePosition,\n end: NodePosition,\n indentation: Indentation | CompatibleIndentation,\n softOutdent?: boolean,\n preventItemRemoval: boolean = false\n ) {\n let shouldAddMargin = false;\n this.findListItems(start, end, item => {\n shouldAddMargin = shouldAddMargin || this.items.indexOf(item) == 0;\n indentation == Indentation.Decrease\n ? softOutdent && !item.isDummy()\n ? item.setIsDummy(true /*isDummy*/)\n : item.outdent(preventItemRemoval)\n : item.indent();\n });\n\n if (shouldAddMargin && preventItemRemoval) {\n for (let index = 0; index < this.items.length; index++) {\n this.items[index].addNegativeMargins();\n }\n }\n }\n\n /**\n * Set alignment of the given range of this list\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param alignment Align items left, center or right\n */\n\n setAlignment(\n start: NodePosition,\n end: NodePosition,\n alignment: Alignment | CompatibleAlignment\n ) {\n this.rootList.style.display = 'flex';\n this.rootList.style.flexDirection = 'column';\n this.findListItems(start, end, item => {\n let align = 'start';\n if (alignment == Alignment.Center) {\n align = 'center';\n } else if (alignment == Alignment.Right) {\n align = 'end';\n }\n item.getNode().style.alignSelf = align;\n });\n }\n\n /**\n * Change list type of the given range of this list.\n * If some of the items are not real list item yet, this will make them to be list item with given type\n * If all items in the given range are already in the type to change to, this becomes an outdent operation\n * @param start Start position to operate from\n * @param end End position to operate to\n * @param targetType Target list type\n */\n changeListType(\n start: NodePosition,\n end: NodePosition,\n targetType: ListType | CompatibleListType\n ) {\n let needChangeType = false;\n\n this.findListItems(start, end, item => {\n needChangeType = needChangeType || item.getListType() != targetType;\n });\n this.findListItems(start, end, item =>\n needChangeType ? item.changeListType(targetType) : item.outdent()\n );\n }\n\n /**\n * Change list style of the given range of this list.\n * If some of the items are not real list item yet, this will make them to be list item with given style\n * @param orderedStyle The style of ordered list\n * @param unorderedStyle The style of unordered list\n */\n setListStyleType(\n orderedStyle?: NumberingListType | CompatibleNumberingListType,\n unorderedStyle?: BulletListType | CompatibleBulletListType\n ) {\n const style = getMetadata(this.rootList, ListStyleDefinitionMetadata);\n const styleMetadata = createListStyleMetadata(\n style,\n orderedStyle as NumberingListType,\n unorderedStyle as BulletListType\n );\n setMetadata(this.rootList, styleMetadata, ListStyleDefinitionMetadata);\n }\n\n /**\n * Append a new item to this VList\n * @param node node of the item to append. If it is not wrapped with LI tag, it will be wrapped\n * @param type Type of this list item, can be ListType.None\n */\n appendItem(node: Node, type: ListType | CompatibleListType) {\n const nodeTag = getTagOfNode(node);\n\n // Change DIV tag to SPAN. Otherwise we cannot create new list item by Enter key in Safari\n if (nodeTag == 'DIV') {\n node = changeElementTag(node, 'LI')!;\n } else if (nodeTag != 'LI') {\n node = wrap(node, 'LI');\n }\n\n this.items.push(\n type == ListType.None\n ? new VListItem(node)\n : new VListItem(node, (type))\n );\n }\n\n /**\n * Merge the given VList into current VList.\n * - All list items will be removed from the given VList and added into this list.\n * - The root node of the given VList will be removed from DOM tree\n * - If there are orphan items in the given VList, they will be merged into the last item\n * of this list if any.\n * @param list The vList to merge from\n */\n mergeVList(list: VList) {\n if (list && list != this) {\n list.items.forEach(item => this.items.push(item));\n list.items.splice(0, list.items.length);\n list.rootList.parentNode?.removeChild(list.rootList);\n }\n }\n\n /**\n * Get the index of the List Item in the current List\n * If the root list is:\n * Ordered list, the listIndex start count is going to be the start property of the OL - 1,\n * @example For example if we want to find the index of Item 2 in the list below, the returned index is going to be 6\n * * ```html\n *
                  \n *
                1. item 1
                2. \n *
                3. item 2
                4. \n *
                5. item 3
                6. \n *
                \n * ```\n * Unordered list, the listIndex start count starts from 0\n * @example For example if we want to find the index of Item 2 in the list below, the returned index is going to be 2\n * ```html\n *
                  \n *
                • item 1
                • \n *
                • item 2
                • \n *
                • item 3
                • \n *
                \n * ```\n * @param input List item to find in the root list\n */\n getListItemIndex(input: Node) {\n if (this.items) {\n let listIndex = (this.getStart() || 1) - 1;\n\n for (let index = 0; index < this.items.length; index++) {\n const child = this.items[index];\n if (child.getLevel() == 1 && !child.isDummy()) {\n listIndex++;\n }\n\n if (child.getNode() == input) {\n return listIndex;\n }\n }\n }\n return -1;\n }\n\n /**\n * Get the Start property of the root list of this VList\n * @returns Start number of the list\n */\n getStart(): number | undefined {\n return safeInstanceOf(this.rootList, 'HTMLOListElement') ? this.rootList.start : undefined;\n }\n\n private findListItems(\n start: NodePosition,\n end: NodePosition,\n callback?: (item: VListItem) => any\n ): VListItem[] {\n if (this.items.length == 0) {\n return [];\n }\n\n const listStartPos = new Position(this.items[0].getNode(), PositionType.Begin);\n const listEndPos = new Position(\n this.items[this.items.length - 1].getNode(),\n PositionType.End\n );\n\n let startIndex = listStartPos.isAfter(start) ? 0 : -1;\n let endIndex = this.items.length - (end.isAfter(listEndPos) ? 1 : 0);\n\n this.items.forEach((item, index) => {\n startIndex = item.contains(start.node) ? index : startIndex;\n endIndex = item.contains(end.node) ? index : endIndex;\n });\n\n startIndex = endIndex < this.items.length ? Math.max(0, startIndex) : startIndex;\n endIndex = startIndex >= 0 ? Math.min(this.items.length - 1, endIndex) : endIndex;\n\n const result = startIndex <= endIndex ? this.items.slice(startIndex, endIndex + 1) : [];\n\n if (callback) {\n result.forEach(callback);\n }\n\n return result;\n }\n\n private populateItems(\n list: HTMLOListElement | HTMLUListElement,\n listTypes: (\n | ListType.Ordered\n | ListType.Unordered\n | CompatibleListType.Ordered\n | CompatibleListType.Unordered\n )[] = []\n ) {\n const type = getListTypeFromNode(list);\n const items = toArray(list.childNodes);\n\n items.forEach(item => {\n const newListTypes = [...listTypes, type];\n\n if (isListElement(item)) {\n this.populateItems(item, newListTypes);\n } else if (item.nodeType != NodeType.Text || (item.nodeValue || '').trim() != '') {\n this.items.push(new VListItem(item, ...newListTypes));\n }\n });\n }\n}\n\n//Normalization\n\n// Step 1: Move all non-LI direct children under list into LI\n// e.g.\n// From:
                • line 1
                • line 2
                \n// To:
                • line 1
                  line 2
                \nfunction moveChildNodesToLi(list: HTMLElement) {\n let currentItem: HTMLLIElement | null = null;\n\n toArray(list.childNodes).forEach(child => {\n if (getTagOfNode(child) == 'LI') {\n currentItem = child as HTMLLIElement;\n } else if (isListElement(child)) {\n currentItem = null;\n } else if (currentItem && !isNodeEmpty(child, true /*trimContent*/)) {\n currentItem.appendChild(isBlockElement(child) ? child : wrap(child));\n }\n });\n}\n\n// Step 2: Move nested LI up to under list directly\n// e.g.\n// From:
                • line 1
                • line 2
                • line 3
                \n// To:
                • line 1
                • line 2
                  line 3
                \nfunction moveLiToList(li: HTMLElement) {\n while (!isListElement(li.parentNode)) {\n splitParentNode(li, true /*splitBefore*/);\n let furtherNodes: Node[] = toArray(li.parentNode!.childNodes).slice(1);\n\n if (furtherNodes.length > 0) {\n if (!isBlockElement(furtherNodes[0])) {\n furtherNodes = [wrap(furtherNodes)];\n }\n furtherNodes.forEach(node => li.appendChild(node));\n }\n\n unwrap(li.parentNode!);\n }\n}\n\nfunction getValidValue(...values: (T | undefined)[]): T | undefined {\n return values.filter(x => x !== undefined)[0];\n}\n\nfunction createListStyleMetadata(\n style: ListStyleMetadata | null,\n orderedStyle?: NumberingListType | CompatibleNumberingListType,\n unorderedStyle?: BulletListType | CompatibleBulletListType\n): ListStyleMetadata {\n return {\n orderedStyleType: getValidValue(\n orderedStyle,\n style?.orderedStyleType,\n NumberingListType.Decimal\n ),\n unorderedStyleType: getValidValue(\n unorderedStyle,\n style?.unorderedStyleType,\n BulletListType.Disc\n ),\n };\n}\n","import arrayPush from '../jsUtils/arrayPush';\nimport getRootListNode from './getRootListNode';\nimport isNodeAfter from '../utils/isNodeAfter';\nimport isNodeInRegion from '../region/isNodeInRegion';\nimport queryElements from '../utils/queryElements';\nimport VList from './VList';\nimport { ListType, RegionBase } from 'roosterjs-editor-types';\n\nconst CHAIN_NAME_PREFIX = '__List_Chain_';\nconst CHAIN_DATASET_NAME = 'listchain';\nconst AFTER_CURSOR_DATASET_NAME = 'listchainafter';\nlet lastChainIndex = 0;\n\n/**\n * Represent a chain of list nodes.\n * A chain of lists is a virtual link of lists that have continuous numbers, when editor one of them,\n * all others should also be updated in order to main the list number to be continuous.\n */\nexport default class VListChain {\n private lastNumber = 0;\n private lastNumberBeforeCursor = 0;\n\n /**\n * Create an array of VListChain from current region in editor\n * @param region The region to create VListChain from\n * @param currentNode Optional current node, used for mark lists that are after this node\n * @param nameGenerator Used by test code only\n */\n static createListChains(\n region: RegionBase | RegionBase[],\n currentNode?: Node,\n nameGenerator?: () => string\n ): VListChain[] {\n const regions = Array.isArray(region) ? region : region ? [region] : [];\n const result: VListChain[] = [];\n regions.forEach(region => {\n const chains: VListChain[] = [];\n let lastList: HTMLOListElement;\n\n queryElements(region.rootNode, 'ol', ol => {\n const list = getRootListNode(region, 'ol', ol);\n\n if (lastList != list) {\n const chain =\n chains.filter(c => c.canAppendToTail(list))[0] ||\n new VListChain(region, (nameGenerator || createListChainName)());\n const index = chains.indexOf(chain);\n const afterCurrentNode = !!currentNode && isNodeAfter(list, currentNode);\n\n if (!afterCurrentNode) {\n // Make sure current one is at the front if current block has not been met, so that\n // the first chain is always the nearest one from current node\n if (index >= 0) {\n chains.splice(index, 1);\n }\n\n chains.unshift(chain);\n } else if (index < 0) {\n chains.push(chain);\n }\n\n chain.append(list, afterCurrentNode);\n lastList = list;\n }\n });\n\n arrayPush(result, chains);\n });\n\n return result;\n }\n\n /**\n * Check if a list with the given start number can be appended next to the last list before cursor\n * @param startNumber The start number of the new list\n */\n canAppendAtCursor(startNumber: number): boolean {\n return startNumber > 1 && this.lastNumberBeforeCursor + 1 == startNumber;\n }\n\n /**\n * Create a VList to wrap the block of the given node, and append to current chain\n * @param container The container node to create list at\n * @param startNumber Start number of the new list\n */\n createVListAtBlock(container: Node, startNumber: number): VList | null {\n if (container && container.parentNode) {\n const list = container.ownerDocument!.createElement('ol');\n\n list.start = startNumber;\n this.applyChainName(list);\n container.parentNode.insertBefore(list, container);\n\n const vList = new VList(list);\n\n vList.appendItem(container, ListType.None);\n return vList;\n } else {\n return null;\n }\n }\n\n /**\n * After change the lists, commit the change to all lists in this chain to update the list number,\n * and clear the temporary dataset values added to list node\n * @param shouldReuseAllAncestorListElements Whether we can parent list item (OL/UL) even if its list type does not match the previous one. @default false\n * @param disableListChain Whether we want to disable list chain functionality, so splitted list will always restart its number from 1 @default false\n */\n commit(shouldReuseAllAncestorListElements?: boolean, disableListChain?: boolean) {\n const lists = this.getLists();\n let lastNumber = 0;\n\n for (let i = 0; i < lists.length; i++) {\n const list = lists[i];\n\n if (!disableListChain) {\n //If there is a list chain sequence, ensure the list chain keep increasing correctly\n if (list.start > 1) {\n list.start = list.start === lastNumber ? lastNumber + 1 : list.start;\n } else {\n list.start = lastNumber + 1;\n }\n }\n\n const vlist = new VList(list);\n lastNumber = vlist.getLastItemNumber() || 0;\n\n delete list.dataset[CHAIN_DATASET_NAME];\n delete list.dataset[AFTER_CURSOR_DATASET_NAME];\n\n vlist.writeBack(shouldReuseAllAncestorListElements);\n }\n }\n\n /**\n * Construct a new instance of VListChain class\n * @param editor Editor object\n */\n private constructor(private region: RegionBase, private name: string) {}\n\n /**\n * Check if the given list node is can be appended into current list chain\n * @param list The list node to check\n */\n private canAppendToTail(list: HTMLOListElement) {\n return this.lastNumber + 1 == list.start;\n }\n\n /**\n * Append the given list node into this VListChain\n * @param list The list node to append\n * @param isAfterCurrentNode Whether this list is after current node\n */\n private append(list: HTMLOListElement, isAfterCurrentNode: boolean) {\n this.applyChainName(list);\n this.lastNumber = new VList(list).getLastItemNumber() || 0;\n\n if (isAfterCurrentNode) {\n list.dataset[AFTER_CURSOR_DATASET_NAME] = 'true';\n } else {\n this.lastNumberBeforeCursor = this.lastNumber;\n }\n }\n\n private applyChainName(list: HTMLOListElement) {\n list.dataset[CHAIN_DATASET_NAME] = this.name;\n }\n\n private getLists() {\n return queryElements(\n this.region.rootNode,\n `ol[data-${CHAIN_DATASET_NAME}=${this.name}]`\n ).filter(node => isNodeInRegion(this.region, node)) as HTMLOListElement[];\n }\n}\n\nfunction createListChainName() {\n return CHAIN_NAME_PREFIX + lastChainIndex++;\n}\n","import contains from '../utils/contains';\nimport getListTypeFromNode from './getListTypeFromNode';\nimport getStyles from '../style/getStyles';\nimport getTagOfNode from '../utils/getTagOfNode';\nimport isBlockElement from '../utils/isBlockElement';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport setBulletListMarkers from './setBulletListMarkers';\nimport setListItemStyle from './setListItemStyle';\nimport setNumberingListMarkers from './setNumberingListMarkers';\nimport setStyles from '../style/setStyles';\nimport toArray from '../jsUtils/toArray';\nimport unwrap from '../utils/unwrap';\nimport wrap from '../utils/wrap';\nimport { createNumberDefinition, createObjectDefinition } from '../metadata/definitionCreators';\nimport { getMetadata, setMetadata } from '../metadata/metadata';\nimport {\n BulletListType,\n KnownCreateElementDataIndex,\n ListType,\n NumberingListType,\n} from 'roosterjs-editor-types';\nimport type {\n CompatibleBulletListType,\n CompatibleListType,\n CompatibleNumberingListType,\n} from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst orderListStyles = [null, 'lower-alpha', 'lower-roman'];\nconst unorderedListStyles = ['disc', 'circle', 'square'];\n\nconst MARGIN_BASE = '0in 0in 0in 0.5in';\nconst NEGATIVE_MARGIN = '-.25in';\n\nconst stylesToInherit = ['font-size', 'font-family', 'color'];\nconst attrsToInherit = ['data-ogsc', 'data-ogsb', 'data-ogac', 'data-ogab'];\n\n/**\n * @internal\n * The definition for the number of BulletListType or NumberingListType\n */\nexport const ListStyleDefinitionMetadata = createObjectDefinition(\n {\n orderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n NumberingListType.Min,\n NumberingListType.Max\n ),\n unorderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n BulletListType.Min,\n BulletListType.Max\n ),\n },\n true /** isOptional */,\n true /** allowNull */\n);\n\n/**\n * @internal\n * Represents the metadata of the style of a list element\n */\nexport interface ListStyleMetadata {\n orderedStyleType?: NumberingListType | CompatibleNumberingListType;\n unorderedStyleType?: BulletListType | CompatibleBulletListType;\n}\n\n/**\n * !!! Never directly create instance of this class. It should be created within VList class !!!\n *\n * Represent a list item.\n *\n * A list item is normally wrapped using a LI tag. But this class is only a logical item,\n * it can be a LI tag, or another other type of node which means it is actually not a list item.\n * That can happen after we do \"outdent\" on a 1-level list item, then it becomes not a list item.\n */\nexport default class VListItem {\n private listTypes: (ListType | CompatibleListType)[];\n private node: HTMLLIElement;\n private dummy: boolean;\n private newListStart: number | undefined = undefined;\n\n /**\n * Construct a new instance of VListItem class\n * @param node The DOM node for this item\n * @param listTypes An array represents list types of all parent and current level.\n * Skip this parameter for a non-list item.\n */\n constructor(\n node: Node,\n ...listTypes: (\n | ListType.Ordered\n | ListType.Unordered\n | CompatibleListType.Ordered\n | CompatibleListType.Unordered\n )[]\n ) {\n if (!node) {\n throw new Error('node must not be null');\n }\n\n this.node = safeInstanceOf(node, 'HTMLLIElement')\n ? node\n : (wrap(node, KnownCreateElementDataIndex.BlockListItem) as HTMLLIElement);\n const display = this.node.style.display;\n\n this.dummy = display != 'list-item' && display != '';\n\n // Always add a None list type in front of all other types to represent non-list scenario.\n this.listTypes = [ListType.None, ...listTypes];\n }\n\n /**\n * Get type of current list item\n */\n getListType(): ListType | CompatibleListType {\n return this.listTypes[this.listTypes.length - 1];\n }\n\n /**\n * Get the levels of this list item.\n */\n getLevel(): number {\n return this.listTypes.length - 1;\n }\n\n /**\n * Get DOM node of this list item\n */\n getNode(): HTMLLIElement {\n return this.node;\n }\n\n /**\n * Get the Start Number of the new List\n */\n getNewListStart(): number | undefined {\n return this.newListStart;\n }\n\n /**\n * Check if a given node is contained by this list item\n * @param node The node to check\n */\n contains(node: Node): boolean {\n return contains(this.node, node, true /*treatSameNodeAsContain*/);\n }\n\n /**\n * Check if this item is a dummy item.\n * A dummy item is also represented by LI tag, but it won't render a bullet (for Unordered list) or a number (for Ordered list)\n * normally it has CSS style display set to a value other than \"list-item\"\n */\n isDummy() {\n return this.dummy;\n }\n\n /**\n * @deprecated Always return false\n */\n isOrphanItem(): boolean {\n return false;\n }\n\n /**\n * @deprecated\n */\n canMerge(item: VListItem): boolean {\n if (!item?.isOrphanItem() || this.listTypes.length != item.listTypes.length) {\n return false;\n }\n\n return this.listTypes.every((type, index) => item.listTypes[index] == type);\n }\n\n /**\n * @deprecated\n */\n mergeItems(items: VListItem[]) {\n const nodesToWrap = items?.map(item => item.node) || [];\n const targetNodes = wrapIfNotBlockNode(\n nodesToWrap,\n true /*checkFirst*/,\n false /*checkLast*/\n );\n targetNodes.forEach(node => this.node.appendChild(node));\n }\n\n /**\n * Indent this item\n * If this is not an list item, it will be no op\n */\n indent() {\n if (this.node.style.marginLeft == NEGATIVE_MARGIN) {\n this.node.style.margin = '';\n this.node.style.marginLeft = '';\n return;\n }\n\n const listType = this.getListType();\n if (listType != ListType.None) {\n this.listTypes.push(listType);\n }\n }\n\n /**\n * Outdent this item\n * If this item is already not an list item, it will be no op\n * @param preventItemRemoval Whether prevent the list item to be removed for the listItem by default false\n */\n outdent(preventItemRemoval: boolean = false) {\n const expectedLength = preventItemRemoval ? 2 : 1;\n if (this.listTypes.length > expectedLength) {\n this.listTypes.pop();\n }\n }\n\n /**\n * Add negative margin to the List item\n */\n addNegativeMargins() {\n this.node.style.margin = MARGIN_BASE;\n this.node.style.marginLeft = NEGATIVE_MARGIN;\n }\n\n /**\n * Change list type of this item\n * @param targetType The target list type to change to\n */\n changeListType(targetType: ListType | CompatibleListType) {\n if (targetType == ListType.None) {\n this.listTypes = [targetType];\n } else {\n this.outdent();\n this.listTypes.push(targetType);\n }\n }\n\n /**\n * Set whether the item is a dummy item\n * @param isDummy Whether the item is a dummy item\n */\n setIsDummy(isDummy: boolean) {\n this.dummy = isDummy;\n }\n\n /**\n * Set the start Number of the new list\n * @param isDummy Whether the item is a dummy item\n */\n setNewListStart(startNumber: number) {\n this.newListStart = startNumber;\n }\n\n /**\n * Apply the list style type\n * @param rootList the vList that receives the style\n * @param index the list item index\n */\n applyListStyle(rootList: HTMLOListElement | HTMLUListElement, index: number) {\n const style = getMetadata(rootList, ListStyleDefinitionMetadata);\n // The list just need to be styled if it is at top level, so the listType length for this Vlist must be 2.\n const isFirstLevel = this.listTypes.length < 3;\n if (style) {\n if (\n isFirstLevel &&\n this.listTypes[1] === ListType.Unordered &&\n style.unorderedStyleType\n ) {\n setBulletListMarkers(this.node, style.unorderedStyleType);\n } else if (\n isFirstLevel &&\n this.listTypes[1] === ListType.Ordered &&\n style.orderedStyleType\n ) {\n setNumberingListMarkers(this.node, style.orderedStyleType, index);\n } else {\n this.node.style.removeProperty('list-style-type');\n }\n }\n }\n\n /**\n * Write the change result back into DOM\n * @param listStack current stack of list elements\n * @param originalRoot Original list root element. It will be reused when write back if possible\n * @param shouldReuseAllAncestorListElements Optional - defaults to false. If true, only make\n * sure the direct parent of this list matches the list types when writing back.\n */\n writeBack(\n listStack: Node[],\n originalRoot?: HTMLOListElement | HTMLUListElement,\n shouldReuseAllAncestorListElements: boolean = false\n ) {\n let nextLevel = 1;\n\n if (shouldReuseAllAncestorListElements) {\n // Remove any un-needed lists from the stack.\n if (listStack.length > this.listTypes.length) {\n listStack.splice(this.listTypes.length);\n }\n\n // 1. If the listStack is the same length as the listTypes for this item, check\n // if the last item needs to change, and remove it if needed. We can always re-use\n // the other lists even if the type doesn't match - since the display is the same\n // as long as the list immediately surrounding the item is correct.\n const listStackEndIndex = listStack.length - 1;\n if (\n listStackEndIndex === this.listTypes.length - 1 && // they are the same length\n getListTypeFromNode(listStack[listStackEndIndex]) !==\n this.listTypes[listStackEndIndex]\n ) {\n listStack.splice(listStackEndIndex);\n }\n\n nextLevel = listStack.length;\n } else {\n // 1. Determine list elements that we can reuse\n // e.g.:\n // passed in listStack: Fragment > OL > UL > OL\n // local listTypes: null > OL > UL > UL > OL\n // then Fragment > OL > UL can be reused\n for (; nextLevel < listStack.length; nextLevel++) {\n if (getListTypeFromNode(listStack[nextLevel]) !== this.listTypes[nextLevel]) {\n listStack.splice(nextLevel);\n break;\n }\n }\n }\n\n // 2. Add new list elements\n // e.g.:\n // passed in listStack: Fragment > OL > UL\n // local listTypes: null > OL > UL > UL > OL\n // then we need to create a UL and a OL tag\n for (; nextLevel < this.listTypes.length; nextLevel++) {\n const stackLength = listStack.length - 1;\n const newList = createListElement(\n listStack[0],\n this.listTypes[nextLevel],\n nextLevel,\n originalRoot\n );\n\n listStack[stackLength].appendChild(newList);\n listStack.push(newList);\n\n //If the current node parent is in the same deep child index,\n //apply the styles of the current parent list to the new list\n if (this.getDeepChildIndex(originalRoot) == stackLength) {\n const listStyleType = this.node.parentElement?.style.listStyleType;\n if (\n listStyleType &&\n getTagOfNode(this.node.parentElement) === getTagOfNode(newList)\n ) {\n newList.style.listStyleType = listStyleType;\n }\n }\n }\n // 3. Add current node into deepest list element\n listStack[listStack.length - 1].appendChild(this.node);\n this.node.style.setProperty('display', this.dummy ? 'block' : null);\n\n // 4. Inherit styles of the child element to the li, so we are able to apply the styles to the ::marker\n if (this.listTypes.length > 1) {\n setListItemStyle(this.node, stylesToInherit, true /*isCssStyle*/);\n setListItemStyle(this.node, attrsToInherit, false /*isCssStyle*/);\n }\n\n // 5. If this is not a list item now, need to unwrap the LI node and do proper handling\n if (this.listTypes.length <= 1) {\n // If original
              3. node has styles for font and color, we need to apply it to new parent\n const isLi = getTagOfNode(this.node) == 'LI';\n const stylesToApply = isLi\n ? {\n 'font-family': this.node.style.fontFamily,\n 'font-size': this.node.style.fontSize,\n color: this.node.style.color,\n }\n : undefined;\n\n const childNodes = isLi ? getChildrenAndUnwrap(this.node) : [this.node];\n\n if (stylesToApply) {\n for (let i = 0; i < childNodes.length; i++) {\n if (safeInstanceOf(childNodes[i], 'Text')) {\n childNodes[i] = wrap(childNodes[i], 'span');\n }\n\n const node = childNodes[i];\n\n if (safeInstanceOf(node, 'HTMLElement')) {\n const styles = {\n ...stylesToApply,\n ...getStyles(node),\n };\n setStyles(node, styles);\n\n attrsToInherit.forEach(attr => {\n const attrValue = this.node.getAttribute(attr);\n\n if (attrValue) {\n node.setAttribute(attr, attrValue);\n }\n });\n }\n }\n }\n\n wrapIfNotBlockNode(childNodes, true /*checkFirst*/, true /*checkLast*/);\n }\n }\n\n /**\n * Get the index of how deep is the current node parent list inside of the original root list.\n * @example In the following structure this function would return 2\n * ```html\n *
                  \n *
                    \n *
                      \n *
                    1. \n *
                    \n *
                  \n *
                \n * ```\n * @param originalRoot The root list\n * @returns -1 if the node does not have parent element or if original root was not provided,\n * else, how deep is the parent element inside of the original root.\n */\n private getDeepChildIndex(originalRoot: HTMLOListElement | HTMLUListElement | undefined) {\n let parentElement = this.node.parentElement;\n if (originalRoot && parentElement) {\n let deepIndex = 0;\n while (parentElement && parentElement != originalRoot) {\n deepIndex++;\n parentElement = parentElement?.parentElement || null;\n }\n return deepIndex;\n }\n return -1;\n }\n}\n\nfunction createListElement(\n newRoot: Node,\n listType: ListType | CompatibleListType,\n nextLevel: number,\n originalRoot?: HTMLOListElement | HTMLUListElement\n): HTMLOListElement | HTMLUListElement {\n const doc = newRoot.ownerDocument!;\n let result: HTMLOListElement | HTMLUListElement;\n\n // Try to reuse the existing root element\n // It can be reused when\n // 1. Current list item is level 1 (top level), AND\n // 2. Original root exists, AND\n // 3. They have the same list type AND\n // 4. The original root is not used yet\n if (nextLevel == 1 && originalRoot && listType == getListTypeFromNode(originalRoot)) {\n if (contains(newRoot, originalRoot)) {\n // If it is already used, let's clone one and remove ID to avoid duplicating ID\n result = originalRoot.cloneNode(false /*deep*/) as HTMLOListElement | HTMLUListElement;\n (result).removeAttribute('id');\n } else {\n // Remove all child nodes, they will be added back later when write back other items\n moveChildNodes(originalRoot);\n result = originalRoot;\n }\n } else {\n // Can't be reused, can't clone, let's create a new one\n result = doc.createElement(listType == ListType.Ordered ? 'ol' : 'ul');\n }\n\n // Always maintain the metadata saved in the list\n if (originalRoot && nextLevel == 1 && listType != getListTypeFromNode(originalRoot)) {\n const style = getMetadata(originalRoot, ListStyleDefinitionMetadata);\n if (style) {\n setMetadata(result, style, ListStyleDefinitionMetadata);\n }\n }\n\n if (listType == ListType.Ordered && nextLevel > 1) {\n result.style.setProperty(\n 'list-style-type',\n orderListStyles[(nextLevel - 1) % orderListStyles.length]\n );\n }\n\n if (listType == ListType.Unordered && nextLevel > 1) {\n result.style.setProperty(\n 'list-style-type',\n unorderedListStyles[(nextLevel - 1) % unorderedListStyles.length]\n );\n }\n\n return result;\n}\n\nfunction wrapIfNotBlockNode(nodes: Node[], checkFirst: boolean, checkLast: boolean): Node[] {\n if (\n nodes.length > 0 &&\n (!checkFirst || !isBlockElement(nodes[0])) &&\n (!checkLast || !isBlockElement(nodes[nodes.length]))\n ) {\n nodes = [wrap(nodes)];\n }\n\n return nodes;\n}\n\nfunction getChildrenAndUnwrap(node: Node): Node[] {\n const result = toArray(node.childNodes);\n unwrap(node);\n return result;\n}\n","const ALPHABET: Record = {\n 0: 'A',\n 1: 'B',\n 2: 'C',\n 3: 'D',\n 4: 'E',\n 5: 'F',\n 6: 'G',\n 7: 'H',\n 8: 'I',\n 9: 'J',\n 10: 'K',\n 11: 'L',\n 12: 'M',\n 13: 'N',\n 14: 'O',\n 15: 'P',\n 16: 'Q',\n 17: 'R',\n 18: 'S',\n 19: 'T',\n 20: 'U',\n 21: 'V',\n 22: 'W',\n 23: 'X',\n 24: 'Y',\n 25: 'Z',\n};\n\n/**\n * @internal\n * Convert decimal numbers into english alphabet letters\n * @param decimal The decimal number that needs to be converted\n * @param isLowerCase if true the roman value will appear in lower case\n * @returns\n */\nexport default function convertDecimalsToAlpha(decimal: number, isLowerCase?: boolean): string {\n let alpha = '';\n while (decimal >= 0) {\n alpha = ALPHABET[decimal % 26] + alpha;\n decimal = Math.floor(decimal / 26) - 1;\n }\n return isLowerCase ? alpha.toLowerCase() : alpha;\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\n\nconst RomanValues: Record = {\n M: 1000,\n CM: 900,\n D: 500,\n CD: 400,\n C: 100,\n XC: 90,\n L: 50,\n XL: 40,\n X: 10,\n IX: 9,\n V: 5,\n IV: 4,\n I: 1,\n};\n\n/**\n * @internal\n * Convert decimal numbers into roman numbers\n * @param decimal The decimal number that needs to be converted\n * @param isLowerCase if true the roman value will appear in lower case\n * @returns\n */\nexport default function convertDecimalsToRoman(decimal: number, isLowerCase?: boolean) {\n let romanValue = '';\n for (let i of getObjectKeys(RomanValues)) {\n let timesRomanCharAppear = Math.floor(decimal / RomanValues[i]);\n decimal = decimal - timesRomanCharAppear * RomanValues[i];\n romanValue = romanValue + i.repeat(timesRomanCharAppear);\n }\n return isLowerCase ? romanValue.toLocaleLowerCase() : romanValue;\n}\n","import createElement from '../utils/createElement';\nimport getRootListNode from './getRootListNode';\nimport getSelectedBlockElementsInRegion from '../region/getSelectedBlockElementsInRegion';\nimport isNodeInRegion from '../region/isNodeInRegion';\nimport Position from '../selection/Position';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport shouldSkipNode from '../utils/shouldSkipNode';\nimport toArray from '../jsUtils/toArray';\nimport VList from './VList';\nimport wrap from '../utils/wrap';\nimport { getLeafSibling } from '../utils/getLeafSibling';\nimport { isListElement } from './getListTypeFromNode';\nimport {\n KnownCreateElementDataIndex,\n ListType,\n Region,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst ListSelector = 'ol,ul';\n\n/**\n * Create a VList object from the given region.\n * @param region The region to get VList from\n * @param includeSiblingLists True to also try get lists before and after the selection and merge them together,\n * false to only include the list for the selected blocks\n * @param startNode (Optional) When specified, try get VList which will contain this node.\n * If not specified, get VList from selection of this region\n */\nexport default function createVListFromRegion(\n region: Region,\n includeSiblingLists?: boolean,\n startNode?: Node\n): VList | null {\n if (!region) {\n return null;\n }\n\n let nodes: Node[] = [];\n\n if (startNode) {\n const list = getRootListNode(region, ListSelector, startNode);\n if (list) {\n nodes.push(list);\n }\n } else {\n const blocks = getSelectedBlockElementsInRegion(\n region,\n undefined,\n true /* shouldApplyFormatToSpan */\n );\n blocks.forEach(block => {\n const list = getRootListNode(region, ListSelector, block.getStartNode());\n\n if (list) {\n if (nodes[nodes.length - 1] != list) {\n nodes.push(list);\n }\n if (\n nodes.length == 1 &&\n safeInstanceOf(list, 'HTMLOListElement') &&\n list.start > 1\n ) {\n // Do not include sibling lists if this list is not start from 1\n includeSiblingLists = false;\n }\n } else {\n nodes.push(block.collapseToSingleElement());\n }\n });\n\n if (nodes.length == 0 && !region.rootNode.firstChild) {\n const newNode = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n region.rootNode.ownerDocument\n )!;\n region.rootNode.appendChild(newNode);\n nodes.push(newNode);\n region.fullSelectionStart = new Position(newNode, PositionType.Begin);\n region.fullSelectionEnd = new Position(newNode, PositionType.End);\n }\n\n if (includeSiblingLists) {\n tryIncludeSiblingNode(region, nodes, false /*isNext*/);\n tryIncludeSiblingNode(region, nodes, true /*isNext*/);\n }\n\n nodes = nodes.filter(node => !shouldSkipNode(node, true /*ignoreSpace*/));\n }\n\n let vList: VList | null = null;\n\n if (nodes.length > 0) {\n const firstNode = nodes.shift() || null;\n vList = isListElement(firstNode)\n ? new VList(firstNode)\n : firstNode\n ? createVListFromItemNode(firstNode)\n : null;\n\n if (vList) {\n nodes.forEach(node => {\n if (isListElement(node)) {\n vList!.mergeVList(new VList(node));\n } else {\n vList!.appendItem(node, ListType.None);\n }\n });\n }\n }\n\n return vList;\n}\n\nfunction tryIncludeSiblingNode(region: Region, nodes: Node[], isNext: boolean) {\n let node: Node | null = nodes[isNext ? nodes.length - 1 : 0];\n node = getLeafSibling(region.rootNode, node, isNext, region.skipTags, true /*ignoreSpace*/);\n node = getRootListNode(region, ListSelector, node);\n if (isNodeInRegion(region, node) && isListElement(node)) {\n if (isNext) {\n if (!safeInstanceOf(node, 'HTMLOListElement') || node.start == 1) {\n // Only include sibling list when\n // 1. This is a unordered list, OR\n // 2. This list starts from 1\n nodes.push(node);\n }\n } else {\n nodes.unshift(node);\n }\n }\n}\n\nfunction createVListFromItemNode(node: Node): VList {\n // Wrap all child nodes under a single one, and put the new list under original root node\n // so that the list can carry over styles under the root node.\n const childNodes = toArray(node.childNodes);\n const nodeForItem = childNodes.length == 1 ? childNodes[0] : wrap(childNodes, 'SPAN');\n\n // Create a temporary OL root element for this list.\n const listNode = node.ownerDocument!.createElement('ol'); // Either OL or UL is ok here\n node.appendChild(listNode);\n\n // Create the VList and append items\n const vList = new VList(listNode);\n vList.appendItem(nodeForItem, ListType.None);\n\n return vList;\n}\n","import getTagOfNode from '../utils/getTagOfNode';\nimport { ListType } from 'roosterjs-editor-types';\nimport type { CompatibleListType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Get list type from a list element. The result will be either Ordered or Unordered ListType\n * @param listElement the element to get list type from\n */\nexport default function getListTypeFromNode(\n listElement: HTMLOListElement | HTMLUListElement\n):\n | ListType.Ordered\n | ListType.Unordered\n | CompatibleListType.Ordered\n | CompatibleListType.Unordered;\n\n/**\n * @internal\n * Get list type from a DOM node. It is possible to return ListType.None\n * @param node the node to get list type from\n */\nexport default function getListTypeFromNode(node: Node | null): ListType | CompatibleListType;\n\nexport default function getListTypeFromNode(node: Node | null): ListType | CompatibleListType {\n switch (getTagOfNode(node)) {\n case 'OL':\n return ListType.Ordered;\n case 'UL':\n return ListType.Unordered;\n default:\n return ListType.None;\n }\n}\n\n/**\n * @internal\n * Check if the given DOM node is a list element (OL or UL)\n * @param node The node to check\n */\nexport function isListElement(node: Node | null): node is HTMLUListElement | HTMLOListElement {\n return getListTypeFromNode(node) != ListType.None;\n}\n","import findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport { RegionBase } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * A type map from selector string to HTML element type\n */\nexport interface SelectorToTypeMap {\n ol: HTMLOListElement;\n ul: HTMLUListElement;\n 'ol,ul': HTMLOListElement | HTMLUListElement;\n}\n\n/**\n * @internal\n * Get Root list node from the given node within the given region\n * @param region Region to scope the search into\n * @param selector The selector to search\n * @param node The start node\n */\nexport default function getRootListNode(\n region: RegionBase,\n selector: TSelector,\n node: Node | null\n): SelectorToTypeMap[TSelector] {\n let list =\n region &&\n (findClosestElementAncestor(\n node,\n region.rootNode,\n selector\n ) as SelectorToTypeMap[TSelector]);\n\n if (list) {\n let ancestor: SelectorToTypeMap[TSelector];\n while (\n (ancestor = findClosestElementAncestor(\n list.parentNode,\n region.rootNode,\n selector\n ) as SelectorToTypeMap[TSelector])\n ) {\n list = ancestor;\n }\n }\n\n return list;\n}\n","import { BulletListType } from 'roosterjs-editor-types';\nimport type { CompatibleBulletListType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * @internal\n * Set the marker of a bullet list\n * @param li\n * @param listStyleType\n */\nexport default function setBulletListMarkers(\n li: HTMLLIElement,\n listStyleType: BulletListType | CompatibleBulletListType\n) {\n const marker = bulletListStyle[listStyleType];\n const isDisc = listStyleType === BulletListType.Disc;\n li.style.listStyleType = isDisc ? marker : `\"${marker}\"`;\n}\n\nconst bulletListStyle: Record = {\n [BulletListType.Disc]: 'disc',\n [BulletListType.Square]: '∎ ',\n [BulletListType.Dash]: '- ',\n [BulletListType.LongArrow]: '➔ ',\n [BulletListType.DoubleLongArrow]: '➔ ',\n [BulletListType.ShortArrow]: '➢ ',\n [BulletListType.UnfilledArrow]: '➪ ',\n [BulletListType.Hyphen]: '— ',\n};\n","import ContentTraverser from '../contentTraverser/ContentTraverser';\nimport findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport { InlineElement } from 'roosterjs-editor-types';\n\n/**\n * Set the Style of a List Item provided, with the styles that the inline child elements have\n * If the child inline elements have different styles, it will not modify the styles of the list item\n * @param element the LI Element to set the styles\n * @param styles The styles that should be applied to the element.\n * @param isCssStyle True means the given styles are CSS style names, false means they are HTML attributes @default true\n */\nexport default function setListItemStyle(\n element: HTMLLIElement,\n styles: string[],\n isCssStyle: boolean = true\n) {\n const elementsStyles = getInlineChildElementsStyle(element, styles, isCssStyle);\n\n styles.forEach(styleName => {\n const styleValues = elementsStyles.map(style =>\n style[styleName] !== undefined ? style[styleName] : ''\n );\n\n if (\n styleValues &&\n (styleValues.length == 1 || new Set(styleValues).size == 1) &&\n styleValues[0]\n ) {\n if (isCssStyle) {\n element.style.setProperty(styleName, styleValues[0]);\n } else {\n element.setAttribute(styleName, styleValues[0]);\n }\n }\n });\n}\n\nfunction getInlineChildElementsStyle(element: HTMLElement, styles: string[], isCssStyle: boolean) {\n const result: Record[] = [];\n const contentTraverser = ContentTraverser.createBodyTraverser(element);\n let currentInlineElement: InlineElement | null = null;\n\n while (contentTraverser.currentInlineElement != currentInlineElement) {\n currentInlineElement = contentTraverser.currentInlineElement;\n let currentNode = currentInlineElement?.getContainerNode() || null;\n let currentStyle: Record | null = null;\n\n currentNode = currentNode ? findClosestElementAncestor(currentNode) : null;\n\n // we should consider of when it is the single child node of element, the parentNode's style should add\n // such as the \"i\", \"b\", \"span\" node in
              4. aa
              5. \n while (\n currentNode &&\n currentNode !== element &&\n safeInstanceOf(currentNode, 'HTMLElement') &&\n (result.length == 0 || (currentNode.textContent?.trim().length || 0) > 0)\n ) {\n const element: HTMLElement = currentNode;\n\n styles.forEach(styleName => {\n const styleValue = isCssStyle\n ? element.style.getPropertyValue(styleName)\n : element.getAttribute(styleName);\n\n if (!currentStyle) {\n currentStyle = {};\n }\n\n if (styleValue && !currentStyle[styleName]) {\n currentStyle[styleName] = styleValue;\n }\n });\n\n if (currentNode?.parentNode?.childNodes.length === 1) {\n currentNode = currentNode.parentNode;\n } else {\n currentNode = null;\n }\n }\n\n if (currentStyle) {\n result.push(currentStyle);\n }\n\n contentTraverser.getNextInlineElement();\n }\n\n return result;\n}\n","import convertDecimalsToAlpha from './convertDecimalsToAlpha';\nimport convertDecimalsToRoman from './convertDecimalsToRomans';\nimport { NumberingListType } from 'roosterjs-editor-types';\nimport type { CompatibleNumberingListType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\ninterface MarkerStyle {\n markerType: number;\n markerSeparator: string;\n markerSecondSeparator?: string;\n lowerCase?: boolean;\n}\n\nenum MarkerTypes {\n Decimal,\n Roman,\n Alpha,\n}\n\n/**\n * @internal\n * Set marker style of a numbering list\n * @param listStyleType\n * @param li\n */\nexport default function setNumberingListMarkers(\n li: HTMLLIElement,\n listStyleType: NumberingListType | CompatibleNumberingListType,\n level: number\n) {\n const { markerSeparator, markerSecondSeparator, markerType, lowerCase } = numberingListStyle[\n listStyleType\n ];\n\n let markerNumber = level.toString();\n if (markerType === MarkerTypes.Roman) {\n markerNumber = convertDecimalsToRoman(level, lowerCase);\n } else if (markerType === MarkerTypes.Alpha) {\n markerNumber = convertDecimalsToAlpha(level - 1, lowerCase);\n }\n\n const marker = markerSecondSeparator\n ? markerSecondSeparator + markerNumber + markerSeparator\n : markerNumber + markerSeparator;\n\n li.style.listStyleType = `\"${marker}\"`;\n}\n\nconst numberingListStyle: Record = {\n [NumberingListType.Decimal]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: '. ',\n },\n [NumberingListType.DecimalDash]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: '- ',\n },\n [NumberingListType.DecimalParenthesis]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: ') ',\n },\n [NumberingListType.DecimalDoubleParenthesis]: {\n markerType: MarkerTypes.Decimal,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n },\n [NumberingListType.LowerAlpha]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '. ',\n lowerCase: true,\n },\n [NumberingListType.LowerAlphaDash]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '- ',\n lowerCase: true,\n },\n [NumberingListType.LowerAlphaParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n lowerCase: true,\n },\n [NumberingListType.LowerAlphaDoubleParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n lowerCase: true,\n },\n [NumberingListType.UpperAlpha]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '. ',\n },\n [NumberingListType.UpperAlphaDash]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: '- ',\n },\n [NumberingListType.UpperAlphaParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n },\n [NumberingListType.UpperAlphaDoubleParenthesis]: {\n markerType: MarkerTypes.Alpha,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n },\n [NumberingListType.LowerRoman]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '. ',\n lowerCase: true,\n },\n [NumberingListType.LowerRomanDash]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '- ',\n lowerCase: true,\n },\n [NumberingListType.LowerRomanParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n lowerCase: true,\n },\n [NumberingListType.LowerRomanDoubleParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n lowerCase: true,\n },\n [NumberingListType.UpperRoman]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '. ',\n },\n [NumberingListType.UpperRomanDash]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: '- ',\n },\n [NumberingListType.UpperRomanParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n },\n [NumberingListType.UpperRomanDoubleParenthesis]: {\n markerType: MarkerTypes.Roman,\n markerSeparator: ') ',\n markerSecondSeparator: '(',\n },\n};\n","import {\n Definition,\n DefinitionType,\n NumberDefinition,\n ArrayDefinition,\n BooleanDefinition,\n StringDefinition,\n ObjectDefinition,\n ObjectPropertyDefinition,\n} from 'roosterjs-editor-types';\n\n/**\n * Create a number definition\n * @param isOptional Whether this property is optional\n * @param value Optional value of the number\n * @param minValue Optional minimum value\n * @param maxValue Optional maximum value\n * @param allowNull Allow the property to be null\n * @returns The number definition object\n */\nexport function createNumberDefinition(\n isOptional?: boolean,\n value?: number,\n minValue?: number,\n maxValue?: number,\n allowNull?: boolean\n): NumberDefinition {\n return {\n type: DefinitionType.Number,\n isOptional,\n value,\n maxValue,\n minValue,\n allowNull,\n };\n}\n\n/**\n * Create a boolean definition\n * @param isOptional Whether this property is optional\n * @param value Optional expected boolean value\n * @param allowNull Allow the property to be null\n * @returns The boolean definition object\n */\nexport function createBooleanDefinition(\n isOptional?: boolean,\n value?: boolean,\n allowNull?: boolean\n): BooleanDefinition {\n return {\n type: DefinitionType.Boolean,\n isOptional,\n value,\n allowNull,\n };\n}\n\n/**\n * Create a string definition\n * @param isOptional Whether this property is optional\n * @param value Optional expected string value\n * @param allowNull Allow the property to be null\n * @returns The string definition object\n */\nexport function createStringDefinition(\n isOptional?: boolean,\n value?: string,\n allowNull?: boolean\n): StringDefinition {\n return {\n type: DefinitionType.String,\n isOptional,\n value,\n allowNull,\n };\n}\n\n/**\n * Create an array definition\n * @param itemDef Definition of each item of the related array\n * @param isOptional Whether this property is optional\n * @param allowNull Allow the property to be null\n * @returns The array definition object\n */\nexport function createArrayDefinition(\n itemDef: Definition,\n isOptional?: boolean,\n minLength?: number,\n maxLength?: number,\n allowNull?: boolean\n): ArrayDefinition {\n return {\n type: DefinitionType.Array,\n isOptional,\n itemDef,\n minLength,\n maxLength,\n allowNull,\n };\n}\n\n/**\n * Create an object definition\n * @param propertyDef Definition of each property of the related object\n * @param isOptional Whether this property is optional\n * @param allowNull Allow the property to be null\n * @returns The object definition object\n */\nexport function createObjectDefinition(\n propertyDef: ObjectPropertyDefinition,\n isOptional?: boolean,\n allowNull?: boolean\n): ObjectDefinition {\n return {\n type: DefinitionType.Object,\n isOptional,\n propertyDef,\n allowNull,\n };\n}\n","import validate from './validate';\nimport { Definition } from 'roosterjs-editor-types';\n\nconst MetadataDataSetName = 'editingInfo';\n\n/**\n * Get metadata object from an HTML element\n * @param element The HTML element to get metadata object from\n * @param definition The type definition of this metadata used for validate this metadata object.\n * If not specified, no validation will be performed and always return whatever we get from the element\n * @param defaultValue The default value to return if the retrieved object cannot pass the validation,\n * or there is no metadata object at all\n * @returns The strong-type metadata object if it can be validated, or null\n */\nexport function getMetadata(\n element: HTMLElement,\n definition?: Definition,\n defaultValue?: T\n): T | null {\n const str = element.dataset[MetadataDataSetName];\n let obj: any;\n\n try {\n obj = str ? JSON.parse(str) : null;\n } catch {}\n\n if (typeof obj !== 'undefined') {\n if (!definition) {\n return obj as T;\n } else if (validate(obj, definition)) {\n return obj;\n }\n }\n\n if (defaultValue) {\n return defaultValue;\n } else {\n return null;\n }\n}\n\n/**\n * Set metadata object into an HTML element\n * @param element The HTML element to set metadata object to\n * @param metadata The metadata object to set\n * @param def An optional type definition object used for validate this metadata object.\n * If not specified, metadata will be set without validation\n * @returns True if metadata is set, otherwise false\n */\nexport function setMetadata(element: HTMLElement, metadata: T, def?: Definition): boolean {\n if (!def || validate(metadata, def)) {\n element.dataset[MetadataDataSetName] = JSON.stringify(metadata);\n return true;\n } else {\n return false;\n }\n}\n\n/**\n * Remove metadata from the given element if any\n * @param element The element to remove metadata from\n */\nexport function removeMetadata(element: HTMLElement) {\n delete element.dataset[MetadataDataSetName];\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\nimport { Definition, DefinitionType } from 'roosterjs-editor-types';\n\n/**\n * Validate the given object with a type definition object\n * @param input The object to validate\n * @param def The type definition object used for validation\n * @returns True if the object passed the validation, otherwise false\n */\nexport default function validate(input: any, def: Definition): input is T {\n let result = false;\n if ((def.isOptional && typeof input === 'undefined') || (def.allowNull && input === null)) {\n result = true;\n } else if (\n (!def.isOptional && typeof input === 'undefined') ||\n (!def.allowNull && input === null)\n ) {\n return false;\n } else {\n switch (def.type) {\n case DefinitionType.String:\n result =\n typeof input === 'string' &&\n (typeof def.value === 'undefined' || input === def.value);\n break;\n\n case DefinitionType.Number:\n result =\n typeof input === 'number' &&\n (typeof def.value === 'undefined' || areSameNumbers(def.value, input)) &&\n (typeof def.minValue === 'undefined' || input >= def.minValue) &&\n (typeof def.maxValue === 'undefined' || input <= def.maxValue);\n break;\n\n case DefinitionType.Boolean:\n result =\n typeof input === 'boolean' &&\n (typeof def.value === 'undefined' || input === def.value);\n break;\n\n case DefinitionType.Array:\n result =\n Array.isArray(input) &&\n (typeof def.minLength === 'undefined' || input.length >= def.minLength) &&\n (typeof def.maxLength === 'undefined' || input.length <= def.maxLength) &&\n input.every(x => validate(x, def.itemDef));\n break;\n\n case DefinitionType.Object:\n result =\n typeof input === 'object' &&\n getObjectKeys(def.propertyDef).every(x =>\n validate(input[x], def.propertyDef[x])\n );\n break;\n\n case DefinitionType.Customize:\n result = def.validator(input);\n break;\n }\n }\n\n return result;\n}\n\nfunction areSameNumbers(n1: number, n2: number) {\n return Math.abs(n1 - n2) < 1e-3;\n}\n","/**\n * @internal\n * Node attribute used to identify if the content is from Google Sheets.\n */\nexport const GOOGLE_SHEET_NODE_NAME = 'google-sheets-html-origin';\n/**\n * @internal\n * Name of the HTMLMeta Property that provides the Office App Source of the pasted content\n */\nexport const PROG_ID_NAME = 'ProgId';\n/**\n * @internal\n * Name of the HTMLMeta Property that identifies pated content as from Excel Desktop\n */\nexport const EXCEL_DESKTOP_ATTRIBUTE_NAME = 'xmlns:x';\n","import type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst WAC_IDENTIFY_SELECTOR =\n 'ul[class^=\"BulletListStyle\"]>.OutlineElement,ol[class^=\"NumberListStyle\"]>.OutlineElement,span.WACImageContainer';\n\n/**\n * @internal\n * Check whether the fragment provided contain Wac Elements\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst documentContainWacElements: getSourceFunction = (props: getSourceInputParams) => {\n const { fragment } = props;\n return !!fragment.querySelector(WAC_IDENTIFY_SELECTOR);\n};\nexport default documentContainWacElements;\n","import documentContainWacElements from './documentContainWacElements';\nimport isExcelDesktopDocument from './isExcelDesktopDocument';\nimport isExcelOnlineDocument from './isExcelOnlineDocument';\nimport isGoogleSheetDocument from './isGoogleSheetDocument';\nimport isPowerPointDesktopDocument from './isPowerPointDesktopDocument';\nimport isWordDesktopDocument from './isWordDesktopDocument';\nimport shouldConvertToSingleImage from './shouldConvertToSingleImage';\nimport { BeforePasteEvent, ClipboardData, KnownPasteSourceType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport type getSourceInputParams = {\n htmlAttributes: Record;\n fragment: DocumentFragment;\n shouldConvertSingleImage: boolean;\n clipboardData: ClipboardData;\n};\n\n/**\n * @internal\n */\nexport type getSourceFunction = (props: getSourceInputParams) => boolean;\n\nconst getSourceFunctions = new Map([\n [KnownPasteSourceType.WordDesktop, isWordDesktopDocument],\n [KnownPasteSourceType.ExcelDesktop, isExcelDesktopDocument],\n [KnownPasteSourceType.ExcelOnline, isExcelOnlineDocument],\n [KnownPasteSourceType.PowerPointDesktop, isPowerPointDesktopDocument],\n [KnownPasteSourceType.WacComponents, documentContainWacElements],\n [KnownPasteSourceType.GoogleSheets, isGoogleSheetDocument],\n [KnownPasteSourceType.SingleImage, shouldConvertToSingleImage],\n]);\n\n/**\n * This function tries to get the source of the Pasted content\n * @param event the before paste event\n * @param shouldConvertSingleImage Whether convert single image is enabled.\n * @returns The Type of pasted content, if no type found will return {KnownSourceType.Default}\n */\nexport default function getPasteSource(\n event: BeforePasteEvent,\n shouldConvertSingleImage: boolean\n): KnownPasteSourceType {\n const { htmlAttributes, clipboardData, fragment } = event;\n\n let result: KnownPasteSourceType | null = null;\n const param: getSourceInputParams = {\n htmlAttributes,\n fragment,\n shouldConvertSingleImage,\n clipboardData,\n };\n\n getSourceFunctions.forEach((func, key) => {\n if (!result && func(param)) {\n result = key;\n }\n });\n\n return result ?? KnownPasteSourceType.Default;\n}\n","import { EXCEL_DESKTOP_ATTRIBUTE_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst EXCEL_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:excel';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isExcelDesktopDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { htmlAttributes } = props;\n // The presence of this attribute confirms its origin from Excel Desktop\n return htmlAttributes[EXCEL_DESKTOP_ATTRIBUTE_NAME] == EXCEL_ATTRIBUTE_VALUE;\n};\nexport default isExcelDesktopDocument;\n","import { EXCEL_DESKTOP_ATTRIBUTE_NAME, PROG_ID_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\n// Excel Desktop also has this attribute\nconst EXCEL_ONLINE_ATTRIBUTE_VALUE = 'Excel.Sheet';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Excel Online documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isExcelOnlineDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { htmlAttributes } = props;\n // The presence of Excel.Sheet confirms its origin from Excel, the absence of EXCEL_DESKTOP_ATTRIBUTE_NAME confirms it is from the Online version\n return (\n htmlAttributes[PROG_ID_NAME] == EXCEL_ONLINE_ATTRIBUTE_VALUE &&\n htmlAttributes[EXCEL_DESKTOP_ATTRIBUTE_NAME] == undefined\n );\n};\nexport default isExcelOnlineDocument;\n","import { GOOGLE_SHEET_NODE_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment provided contain elements from Google sheets\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isGoogleSheetDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { fragment } = props;\n return !!fragment.querySelector(GOOGLE_SHEET_NODE_NAME);\n};\n\nexport default isGoogleSheetDocument;\n","import { PROG_ID_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isPowerPointDesktopDocument: getSourceFunction = (props: getSourceInputParams) => {\n return props.htmlAttributes[PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\n};\nexport default isPowerPointDesktopDocument;\n","import { PROG_ID_NAME } from './constants';\nimport type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\nconst WORD_PROG_ID = 'Word.Document';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Word Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst isWordDesktopDocument: getSourceFunction = (props: getSourceInputParams) => {\n const { htmlAttributes } = props;\n return (\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\n htmlAttributes[PROG_ID_NAME] == WORD_PROG_ID\n );\n};\n\nexport default isWordDesktopDocument;\n","import type { getSourceFunction, getSourceInputParams } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment only contains a single image to paste\n * and the editor have the ConvertSingleImageBody Experimental feature\n * @param props Properties related to the PasteEvent\n * @returns\n */\nconst shouldConvertToSingleImage: getSourceFunction = (props: getSourceInputParams) => {\n const { shouldConvertSingleImage, clipboardData } = props;\n return (\n shouldConvertSingleImage &&\n clipboardData.htmlFirstLevelChildTags?.length == 1 &&\n clipboardData.htmlFirstLevelChildTags[0] == 'IMG'\n );\n};\n\nexport default shouldConvertToSingleImage;\n","import collapseNode from '../utils/collapseNodes';\nimport isNodeInRegion from './isNodeInRegion';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport { BlockElement, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Collapse nodes within this region to their common ancestor node under this region\n * @param region The region to collapse nodes in.\n * @param nodesOrBlockElements Nodes or block elements to collapse. When take BlockElement[] as input,\n * start node of the first BlockElement and end node of the last BlockElement will be used as the nodes.\n * All nodes not contained by the given region will be ignored.\n */\nexport default function collapseNodesInRegion(\n region: RegionBase,\n nodesOrBlockElements: Node[] | BlockElement[]\n): Node[] {\n if (!nodesOrBlockElements || nodesOrBlockElements.length == 0) {\n return [];\n }\n\n let nodes = safeInstanceOf(nodesOrBlockElements[0], 'Node')\n ? nodesOrBlockElements\n : [\n nodesOrBlockElements[0].getStartNode(),\n (nodesOrBlockElements[nodesOrBlockElements.length - 1]).getEndNode(),\n ];\n\n nodes = nodes && nodes.filter(node => isNodeInRegion(region, node));\n\n const firstNode = nodes[0];\n const lastNode = nodes[nodes.length - 1];\n\n if (isNodeInRegion(region, firstNode) && isNodeInRegion(region, lastNode)) {\n return collapseNode(region.rootNode, firstNode, lastNode, true /*canSplitParent*/);\n } else {\n return [];\n }\n}\n","import contains from '../utils/contains';\nimport findClosestElementAncestor from '../utils/findClosestElementAncestor';\nimport Position from '../selection/Position';\nimport queryElements from '../utils/queryElements';\nimport { getNextLeafSibling, getPreviousLeafSibling } from '../utils/getLeafSibling';\nimport { QueryScope, Region, RegionType } from 'roosterjs-editor-types';\nimport type { CompatibleRegionType } from 'roosterjs-editor-types/lib/compatibleTypes';\n\ninterface RegionTypeData {\n /**\n * Tags that child elements will be skipped\n */\n skipTags: string[];\n\n /**\n * Selector of outer node of a region\n */\n outerSelector: string;\n\n /**\n * Selector of inner node of a region\n */\n innerSelector: string;\n}\n\nconst regionTypeData: Record = {\n [RegionType.Table]: {\n skipTags: ['TABLE'],\n outerSelector: 'table',\n innerSelector: 'td,th',\n },\n};\n\n/**\n * Get regions impacted by the given range under the root node\n * @param root Root node to get regions from\n * @param range A selection range. Regions will be created according to this range. Each region will be\n * fully or partially covered by this range.\n * @param type Type of region. Currently we only support TABLE region.\n */\nexport default function getRegionsFromRange(\n root: HTMLElement,\n range: Range,\n type: RegionType | CompatibleRegionType\n): Region[] {\n let regions: Region[] = [];\n if (root && range) {\n const { innerSelector, skipTags } = regionTypeData[type];\n const boundaryTree = buildBoundaryTree(root, range, type);\n const start = findClosestElementAncestor(range.startContainer, root, innerSelector) || root;\n const end = findClosestElementAncestor(range.endContainer, root, innerSelector) || root;\n const creator = getRegionCreator(range, skipTags);\n [regions] = iterateNodes(creator, boundaryTree, start, end);\n }\n\n return regions.filter(r => !!r);\n}\n\n/**\n * @internal export for test only\n */\nexport function getRegionCreator(\n fullRange: Range,\n skipTags: string[]\n): (rootNode: HTMLElement, nodeBefore?: Node, nodeAfter?: Node) => Region | null {\n const fullSelectionStart = Position.getStart(fullRange).normalize();\n const fullSelectionEnd = Position.getEnd(fullRange).normalize();\n return (rootNode: HTMLElement, nodeBefore?: Node, nodeAfter?: Node) => {\n return areNodesValid(rootNode, nodeBefore, nodeAfter, skipTags)\n ? {\n rootNode,\n nodeBefore,\n nodeAfter,\n skipTags,\n fullSelectionStart,\n fullSelectionEnd,\n }\n : null;\n };\n}\n\n/**\n * This is a internal data structure used for build regions.\n * We firstly split the selection by some boundaries, then we can build region from these boundaries.\n */\ninterface Boundary {\n /**\n * inner node of this boundary\n */\n innerNode: HTMLElement;\n\n /**\n * Children of this boundary\n */\n children: {\n /**\n * Outer node of a boundary child\n */\n outerNode: Node;\n\n /**\n * Child boundaries\n */\n boundaries: Boundary[];\n }[];\n}\n\n/**\n * Step 1: Build boundary tree\n * @param root Root node of the whole scope, normally this will be the root of editable scope\n * @param range Existing selected full range\n * @param type Type of region to create\n */\nfunction buildBoundaryTree(\n root: HTMLElement,\n range: Range,\n type: RegionType | CompatibleRegionType\n): Boundary {\n const allBoundaries: Boundary[] = [{ innerNode: root, children: [] }];\n const { outerSelector, innerSelector } = regionTypeData[type];\n const inSelectionOuterNode = queryElements(\n root,\n outerSelector,\n null /*callback*/,\n QueryScope.InSelection,\n range\n );\n\n // According to https://www.w3.org/TR/selectors-api/#queryselectorall, the result of querySelectorAll\n // is in document order, which is what we expect. So we don't need to sort the result here.\n queryElements(\n root,\n innerSelector,\n thisInnerNode => {\n const thisOuterNode = findClosestElementAncestor(thisInnerNode, root, outerSelector);\n if (thisOuterNode && inSelectionOuterNode.indexOf(thisOuterNode) < 0) {\n const boundary: Boundary = { innerNode: thisInnerNode, children: [] };\n\n for (let i = allBoundaries.length - 1; i >= 0; i--) {\n const { innerNode, children } = allBoundaries[i];\n if (contains(innerNode, thisOuterNode)) {\n let child = children.filter(c => c.outerNode == thisOuterNode)[0];\n\n if (!child) {\n child = { outerNode: thisOuterNode, boundaries: [] };\n children.push(child);\n }\n\n child.boundaries.push(boundary);\n break;\n }\n }\n allBoundaries.push(boundary);\n }\n },\n QueryScope.OnSelection,\n range\n );\n\n return allBoundaries[0];\n}\n\n/**\n * Step 2: Recursively iterate all boundaries and create regions\n * @param creator A region creator function to help create region\n * @param boundary Current root boundary\n * @param start A node where full range start from. This may not be the direct node container of range.startContainer.\n * It is the nearest ancestor which satisfies the InnerSelector of the given region type\n * @param end A node where full range end from. This may not be the direct node container of range.endContainer.\n * It is the nearest ancestor which satisfies the InnerSelector of the given region type\n * @param started Whether we have already hit the start node\n */\nfunction iterateNodes(\n creator: (rootNode: HTMLElement, nodeBefore?: Node, nodeAfter?: Node) => Region | null,\n boundary: Boundary,\n start: Node,\n end: Node,\n started?: boolean\n): [Region[], boolean, boolean] {\n started = started || boundary.innerNode == start;\n let ended = false;\n const { children, innerNode } = boundary;\n let regions: Region[] = [];\n\n if (children.length == 0) {\n const region = creator(innerNode);\n if (region) {\n regions.push(region);\n }\n } else {\n // Need to run one more time to add region after all children\n for (let i = 0; i <= children.length && !ended; i++) {\n const { outerNode, boundaries } = children[i] || {};\n const previousOuterNode = children[i - 1]?.outerNode;\n if (started) {\n const region = creator(innerNode, previousOuterNode, outerNode);\n if (region) {\n regions.push(region);\n }\n }\n\n boundaries?.forEach(child => {\n let newRegions: Region[];\n [newRegions, started, ended] = iterateNodes(creator, child, start, end, started);\n regions = regions.concat(newRegions);\n });\n }\n }\n\n return [regions, started, ended || innerNode == end];\n}\n\n/**\n * Check if the given nodes combination is valid to create a region.\n * A combination is valid when:\n * 1. Root node is not null and is not empty. And\n * 2. For nodeBefore and nodeAfter, each of them should be either null or contained by root node. And\n * 3. If none of nodeBefore and nodeAfter is null, the should not contain each other, and there should be\n * node between them.\n * @param root Root node of region\n * @param nodeBefore The boundary node before the region under root\n * @param nodeAfter The boundary node after the region under root\n * @param skipTags Tags to skip\n */\nfunction areNodesValid(\n root: Node,\n nodeBefore: Node | undefined,\n nodeAfter: Node | undefined,\n skipTags: string[]\n) {\n if (!root) {\n return false;\n } else {\n const firstNodeOfRegion = nodeBefore && getNextLeafSibling(root, nodeBefore, skipTags);\n const lastNodeOfRegion = nodeAfter && getPreviousLeafSibling(root, nodeAfter, skipTags);\n const firstNodeValid =\n !nodeBefore || (contains(root, nodeBefore) && contains(root, firstNodeOfRegion));\n const lastNodeValid =\n !nodeAfter || (contains(root, nodeAfter) && contains(root, lastNodeOfRegion));\n const bothValid =\n !nodeBefore ||\n !nodeAfter ||\n (!contains(nodeBefore, nodeAfter, true /*treatSameAsContain*/) &&\n !contains(nodeBefore, lastNodeOfRegion, true /*treatSameAsContain*/) &&\n !contains(nodeAfter, nodeBefore, true /*treatSameAsContain*/) &&\n !contains(nodeAfter, firstNodeOfRegion, true /*treatSameAsContain*/));\n return firstNodeValid && lastNodeValid && bothValid;\n }\n}\n","import ContentTraverser from '../contentTraverser/ContentTraverser';\nimport createElement from '../utils/createElement';\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\nimport getSelectionRangeInRegion from './getSelectionRangeInRegion';\nimport shouldSkipNode from '../utils/shouldSkipNode';\nimport { BlockElement, KnownCreateElementDataIndex, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Get all block elements covered by the selection under this region\n * @param regionBase The region to get block elements from\n * @param createBlockIfEmpty When set to true, a new empty block element will be created if there is not\n * any blocks in the region. Default value is false\n * @param deprecated Deprecated parameter, not used\n */\nexport default function getSelectedBlockElementsInRegion(\n regionBase: RegionBase,\n createBlockIfEmpty?: boolean,\n deprecated?: boolean\n): BlockElement[] {\n const range = getSelectionRangeInRegion(regionBase);\n let blocks: BlockElement[] = [];\n\n if (range) {\n const { rootNode, skipTags } = regionBase;\n const traverser = ContentTraverser.createSelectionTraverser(rootNode, range, skipTags);\n\n for (\n let block = traverser?.currentBlockElement;\n !!block;\n block = traverser.getNextBlockElement()\n ) {\n blocks.push(block);\n }\n\n // Remove meaningless nodes\n blocks = blocks.filter(block => {\n const startNode = block.getStartNode();\n const endNode = block.getEndNode();\n\n if (startNode == endNode && shouldSkipNode(startNode, true /*ignoreSpace*/)) {\n startNode.parentNode?.removeChild(startNode);\n return false;\n } else {\n return true;\n }\n });\n }\n\n if (blocks.length == 0 && regionBase && !regionBase.rootNode.firstChild && createBlockIfEmpty) {\n const newNode = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n regionBase.rootNode.ownerDocument\n );\n regionBase.rootNode.appendChild(newNode!);\n\n const block = getBlockElementAtNode(regionBase.rootNode, newNode);\n\n if (block) {\n blocks.push(block);\n }\n }\n\n return blocks;\n}\n","import createRange from '../selection/createRange';\nimport Position from '../selection/Position';\nimport { getNextLeafSibling, getPreviousLeafSibling } from '../utils/getLeafSibling';\nimport { Region, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Get the selection range in the given region.\n * The original range can cover multiple regions, this function will narrow the original selection\n * of a region into current region\n * @param regionBase The region to get range from\n */\nexport default function getSelectionRangeInRegion(regionBase: RegionBase): Range | null {\n if (!regionBase) {\n return null;\n }\n\n const { nodeBefore, nodeAfter, rootNode, skipTags } = regionBase;\n const startNode = nodeBefore\n ? getNextLeafSibling(regionBase.rootNode, nodeBefore, regionBase.skipTags)\n : rootNode.firstChild;\n const endNode = nodeAfter\n ? getPreviousLeafSibling(rootNode, nodeAfter, skipTags)\n : rootNode.lastChild;\n const regionRange = startNode && endNode && createRange(startNode, endNode);\n\n if (!isRegion(regionBase)) {\n return regionRange;\n } else if (regionRange) {\n const regionStart = Position.getStart(regionRange).normalize();\n const regionEnd = Position.getEnd(regionRange).normalize();\n const { fullSelectionEnd, fullSelectionStart } = regionBase;\n\n if (!fullSelectionStart.isAfter(regionEnd) && !regionStart.isAfter(fullSelectionEnd)) {\n const start = fullSelectionStart.isAfter(regionStart)\n ? fullSelectionStart\n : regionStart;\n const end = fullSelectionEnd.isAfter(regionEnd) ? regionEnd : fullSelectionEnd;\n\n return createRange(start, end);\n }\n }\n\n return null;\n}\n\nfunction isRegion(regionBase: RegionBase): regionBase is Region {\n const region = regionBase as Region;\n return !!region.fullSelectionEnd && !!region.fullSelectionStart;\n}\n","import contains from '../utils/contains';\nimport { DocumentPosition, RegionBase } from 'roosterjs-editor-types';\n\n/**\n * Check if a given node is contained by the given region\n * @param region The region to check from\n * @param node The node or block element to check\n */\nexport default function isNodeInRegion(region: RegionBase, node: Node): boolean {\n return !!(\n region &&\n contains(region.rootNode, node) &&\n (!region.nodeBefore ||\n region.nodeBefore.compareDocumentPosition(node) == DocumentPosition.Following) &&\n (!region.nodeAfter ||\n region.nodeAfter.compareDocumentPosition(node) == DocumentPosition.Preceding)\n );\n}\n","import changeElementTag from '../utils/changeElementTag';\nimport contains from '../utils/contains';\nimport getBlockElementAtNode from '../blockElements/getBlockElementAtNode';\nimport getPredefinedCssForElement from '../htmlSanitizer/getPredefinedCssForElement';\nimport getStyles from '../style/getStyles';\nimport isNodeInRegion from './isNodeInRegion';\nimport safeInstanceOf from '../utils/safeInstanceOf';\nimport setStyles from '../style/setStyles';\nimport { BlockElement, RegionBase } from 'roosterjs-editor-types';\nimport { collapse } from '../utils/collapseNodes';\n\n/**\n * Merge a BlockElement of given node after another node\n * @param region Region to operate in\n * @param refNode The node to merge after\n * @param targetNode The node of target block element\n */\nexport default function mergeBlocksInRegion(region: RegionBase, refNode: Node, targetNode: Node) {\n let block: BlockElement | null;\n\n if (\n !isNodeInRegion(region, refNode) ||\n !isNodeInRegion(region, targetNode) ||\n !(block = getBlockElementAtNode(region.rootNode, targetNode)) ||\n block.contains(refNode)\n ) {\n return;\n }\n\n const blockRoot = block.collapseToSingleElement();\n const commonContainer = collapse(\n region.rootNode,\n blockRoot,\n refNode,\n false /*isStart*/,\n true /*canSplitParent*/\n );\n\n // Copy styles of parent nodes into blockRoot\n for (let node: Node | null = blockRoot; contains(commonContainer, node); ) {\n const parent: Node | null = node!.parentNode;\n if (safeInstanceOf(parent, 'HTMLElement')) {\n const styles = {\n ...(getPredefinedCssForElement(parent) || {}),\n ...getStyles(parent),\n ...getStyles(blockRoot),\n };\n setStyles(blockRoot, styles);\n }\n node = parent;\n }\n\n let nodeToRemove: Node | null = null;\n let nodeToMerge =\n blockRoot.childNodes.length == 1 && blockRoot.attributes.length == 0\n ? blockRoot.firstChild!\n : changeElementTag(blockRoot, 'SPAN')!;\n\n // Remove empty node\n for (\n let node: Node | null = nodeToMerge;\n contains(commonContainer, node) && node.parentNode?.childNodes.length == 1;\n node = node!.parentNode\n ) {\n // If the only child is the one which is about to be removed, this node should also be removed\n nodeToRemove = node.parentNode;\n }\n\n // Finally, merge blocks, and remove empty nodes\n refNode.parentNode?.insertBefore(nodeToMerge, refNode.nextSibling);\n nodeToRemove?.parentNode?.removeChild(nodeToRemove);\n}\n","import findClosestElementAncestor from '../utils/findClosestElementAncestor';\r\nimport isNodeAfter from '../utils/isNodeAfter';\r\nimport { NodePosition, NodeType, PositionType } from 'roosterjs-editor-types';\r\nimport type { CompatiblePositionType } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Represent a position in DOM tree by the node and its offset index\r\n */\r\nexport default class Position implements NodePosition {\r\n readonly node: Node;\r\n readonly element: HTMLElement;\r\n readonly offset: number;\r\n readonly isAtEnd: boolean;\r\n\r\n /**\r\n * Clone and validate a position from existing position.\r\n * If the given position has invalid offset, this function will return a corrected value.\r\n * @param position The original position to clone from\r\n */\r\n constructor(position: NodePosition);\r\n\r\n /**\r\n * Create a Position from node and an offset number\r\n * @param node The node of this position\r\n * @param offset Offset of this position\r\n * @param isFromEndOfRange Whether this position is created from end of a range. An position\r\n * created from end of range has different behavior when normalize, it will use the child node\r\n * before current position if any as a deeper level node and set isAtEnd to true.\r\n */\r\n constructor(node: Node, offset: number, isFromEndOfRange?: boolean);\r\n\r\n /**\r\n * Create a Position from node and a type of position\r\n * @param node The node of this position\r\n * @param positionType Type of the position, can be Begin, End, Before, After\r\n */\r\n constructor(node: Node, positionType: PositionType | CompatiblePositionType);\r\n\r\n constructor(\r\n nodeOrPosition: Node | NodePosition,\r\n offsetOrPosType: number = 0,\r\n private readonly isFromEndOfRange?: boolean\r\n ) {\r\n if ((nodeOrPosition).node) {\r\n this.node = (nodeOrPosition).node;\r\n offsetOrPosType = (nodeOrPosition).offset;\r\n } else {\r\n this.node = nodeOrPosition;\r\n }\r\n\r\n switch (offsetOrPosType) {\r\n case PositionType.Before:\r\n this.offset = getIndexOfNode(this.node);\r\n this.node = this.node.parentNode!; // TODO: how to handle parentNode is null?\r\n this.isAtEnd = false;\r\n break;\r\n\r\n case PositionType.After:\r\n this.offset = getIndexOfNode(this.node) + 1;\r\n this.isAtEnd = !this.node.nextSibling;\r\n this.node = this.node.parentNode!; // TODO: how to handle parentNode is null?\r\n break;\r\n\r\n case PositionType.End:\r\n this.offset = getEndOffset(this.node);\r\n this.isAtEnd = true;\r\n break;\r\n\r\n default:\r\n let endOffset = getEndOffset(this.node);\r\n this.offset = Math.max(0, Math.min(offsetOrPosType, endOffset));\r\n this.isAtEnd = offsetOrPosType > 0 && offsetOrPosType >= endOffset;\r\n break;\r\n }\r\n\r\n this.element = findClosestElementAncestor(this.node)!; // TODO: how to handle parent element is null?\r\n }\r\n\r\n /**\r\n * Normalize this position to the leaf node, return the normalize result.\r\n * If current position is already using leaf node, return this position object itself\r\n */\r\n normalize(): NodePosition {\r\n if (this.node.nodeType == NodeType.Text || !this.node.firstChild) {\r\n return this;\r\n }\r\n\r\n let node = this.node;\r\n let newOffset: number | PositionType.Begin | PositionType.End = this.isAtEnd\r\n ? PositionType.End\r\n : this.offset;\r\n while (node.nodeType == NodeType.Element || node.nodeType == NodeType.DocumentFragment) {\r\n const nextNode = this.isFromEndOfRange\r\n ? newOffset == PositionType.End\r\n ? node.lastChild\r\n : node.childNodes[newOffset - 1]\r\n : newOffset == PositionType.Begin\r\n ? node.firstChild\r\n : newOffset == PositionType.End\r\n ? node.lastChild\r\n : node.childNodes[newOffset];\r\n\r\n if (nextNode) {\r\n node = nextNode;\r\n newOffset =\r\n this.isAtEnd || this.isFromEndOfRange ? PositionType.End : PositionType.Begin;\r\n } else {\r\n break;\r\n }\r\n }\r\n return new Position(node, newOffset, this.isFromEndOfRange);\r\n }\r\n\r\n /**\r\n * Check if this position is equal to the given position\r\n * @param position The position to check\r\n */\r\n equalTo(position: NodePosition): boolean {\r\n return (\r\n position &&\r\n (this == position ||\r\n (this.node == position.node &&\r\n this.offset == position.offset &&\r\n this.isAtEnd == position.isAtEnd))\r\n );\r\n }\r\n\r\n /**\r\n * Checks if this position is after the given position\r\n */\r\n isAfter(position: NodePosition): boolean {\r\n return this.node == position.node\r\n ? (this.isAtEnd && !position.isAtEnd) || this.offset > position.offset\r\n : isNodeAfter(this.node, position.node);\r\n }\r\n\r\n /**\r\n * Move this position with offset, returns a new position with a valid offset in the same node\r\n * @param offset Offset to move with\r\n */\r\n move(offset: number) {\r\n return new Position(this.node, Math.max(this.offset + offset, 0));\r\n }\r\n\r\n /**\r\n * Get start position of the given Range\r\n * @param range The range to get position from\r\n */\r\n static getStart(range: Range) {\r\n return new Position(range.startContainer, range.startOffset);\r\n }\r\n\r\n /**\r\n * Get end position of the given Range\r\n * @param range The range to get position from\r\n */\r\n static getEnd(range: Range) {\r\n // For collapsed range, always return the same value of start container to make sure\r\n // end position is not before start position\r\n return range.collapsed\r\n ? Position.getStart(range)\r\n : new Position(range.endContainer, range.endOffset, true /*isFromEndOfRange*/);\r\n }\r\n}\r\n\r\nfunction getIndexOfNode(node: Node | null): number {\r\n let i = 0;\r\n while ((node = node?.previousSibling || null)) {\r\n i++;\r\n }\r\n return i;\r\n}\r\n\r\nfunction getEndOffset(node: Node): number {\r\n if (node.nodeType == NodeType.Text) {\r\n return node.nodeValue?.length || 0;\r\n } else if (node.nodeType == NodeType.Element || node.nodeType == NodeType.DocumentFragment) {\r\n return node.childNodes.length;\r\n } else {\r\n return 1;\r\n }\r\n}\r\n","import { Browser } from '../utils/Browser';\n\n/**\n * Add the given range into selection of the given document\n * @param range The range to select\n * @param skipSameRange When set to true, do nothing if the given range is the same with current selection,\n * otherwise it will always remove current selection range and set to the given one.\n * This parameter is always treat as true in Edge to avoid some weird runtime exception.\n */\nexport default function addRangeToSelection(range: Range, skipSameRange?: boolean) {\n const selection = range?.commonAncestorContainer?.ownerDocument?.defaultView?.getSelection();\n if (selection) {\n let needAddRange = true;\n\n if (selection.rangeCount > 0) {\n // Workaround IE exception 800a025e\n try {\n let currentRange: Range | null = null;\n // Do not remove/add range if current selection is the same with target range\n // Without this check, execCommand() may fail in Edge since we changed the selection\n if (\n (skipSameRange || Browser.isEdge) &&\n (currentRange = selection.rangeCount == 1 ? selection.getRangeAt(0) : null) &&\n currentRange.startContainer == range.startContainer &&\n currentRange.startOffset == range.startOffset &&\n currentRange.endContainer == range.endContainer &&\n currentRange.endOffset == range.endOffset\n ) {\n needAddRange = false;\n } else {\n selection.removeAllRanges();\n }\n } catch (e) {}\n }\n\n if (needAddRange) {\n selection.addRange(range);\n }\n }\n}\n","import isVoidHtmlElement from '../utils/isVoidHtmlElement';\r\nimport Position from './Position';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport { NodePosition, NodeType, PositionType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Create a range around the given node(s)\r\n * @param startNode The start node to create range from\r\n * @param endNode The end node to create range from. If specified, the range will start before startNode and\r\n * end after endNode, otherwise, the range will start before and end after the start node\r\n * @returns A range start before the given node and end after the given node\r\n */\r\nexport default function createRange(startNode: Node, endNode?: Node): Range;\r\n\r\n/**\r\n * Create a collapsed range at the given node and offset\r\n * @param node The container node of the range\r\n * @param offset The offset of the range, can be a number or value of PositionType\r\n * @returns A range at the given node and offset\r\n */\r\nexport default function createRange(node: Node, offset: number | PositionType): Range;\r\n\r\n/**\r\n * Create a range with the given start/end container node and offset\r\n * @param startNode The start container node of the range\r\n * @param startOffset The start offset of the range\r\n * @param endNode The end container node of the range\r\n * @param endOffset The end offset of the range\r\n * @returns A range at the given start/end container node and offset\r\n */\r\nexport default function createRange(\r\n startNode: Node,\r\n startOffset: number | PositionType,\r\n endNode: Node,\r\n endOffset: number | PositionType\r\n): Range;\r\n\r\n/**\r\n * Create a range under the given rootNode with start and end selection paths\r\n * @param rootNode The root node that the selection paths start from\r\n * @param startPath The selection path of the start position of the range\r\n * @param endPath The selection path of the end position of the range\r\n * @returns A range with the given start and end selection paths\r\n */\r\nexport default function createRange(rootNode: Node, startPath: number[], endPath?: number[]): Range;\r\n\r\n/**\r\n * Create a range with the start and end position\r\n * @param startPosition The start position of the range\r\n * @param endPosition The end position of the range, if not specified, the range will be collapsed at start position\r\n * @returns A range start at startPosition, end at endPosition, or startPosition when endPosition is not specified\r\n */\r\nexport default function createRange(startPosition: NodePosition, endPosition?: NodePosition): Range;\r\n\r\nexport default function createRange(\r\n arg1: Node | NodePosition,\r\n arg2?: number | number[] | Node | NodePosition,\r\n arg3?: Node | number[],\r\n arg4?: number\r\n): Range | null {\r\n let start: NodePosition | null = null;\r\n let end: NodePosition | null = null;\r\n\r\n if (isNodePosition(arg1)) {\r\n // function createRange(startPosition: NodePosition, endPosition?: NodePosition): Range;\r\n start = arg1;\r\n end = isNodePosition(arg2) ? arg2 : null;\r\n } else if (safeInstanceOf(arg1, 'Node')) {\r\n if (Array.isArray(arg2)) {\r\n // function createRange(rootNode: Node, startPath: number[], endPath?: number[]): Range;\r\n start = getPositionFromPath(arg1, arg2);\r\n end = Array.isArray(arg3) ? getPositionFromPath(arg1, arg3) : null;\r\n } else if (typeof arg2 == 'number') {\r\n // function createRange(node: Node, offset: number | PositionType): Range;\r\n // function createRange(startNode: Node, startOffset: number | PositionType, endNode: Node, endOffset: number | PositionType): Range;\r\n start = new Position(arg1, arg2);\r\n end = safeInstanceOf(arg3, 'Node') ? new Position(arg3, arg4!) : null;\r\n } else if (safeInstanceOf(arg2, 'Node') || !arg2) {\r\n // function createRange(startNode: Node, endNode?: Node): Range;\r\n start = new Position(arg1, PositionType.Before);\r\n end = new Position(arg2 || arg1, PositionType.After);\r\n }\r\n }\r\n\r\n if (start?.node?.ownerDocument) {\r\n let range = start.node.ownerDocument.createRange();\r\n start = getFocusablePosition(start);\r\n end = getFocusablePosition(end || start);\r\n range.setStart(start.node, start.offset);\r\n range.setEnd(end.node, end.offset);\r\n\r\n return range;\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Convert to focusable position\r\n * If current node is a void element, we need to move up one level to put cursor outside void element\r\n */\r\nfunction getFocusablePosition(position: NodePosition) {\r\n return position.node.nodeType == NodeType.Element && isVoidHtmlElement(position.node)\r\n ? new Position(position.node, position.isAtEnd ? PositionType.After : PositionType.Before)\r\n : position;\r\n}\r\n\r\nfunction isNodePosition(arg: any): arg is NodePosition {\r\n return arg && arg.node;\r\n}\r\n\r\nfunction getPositionFromPath(node: Node, path: number[]): NodePosition | null {\r\n if (!node || !path) {\r\n return null;\r\n }\r\n\r\n // Iterate with a for loop to avoid mutating the passed in element path stack\r\n // or needing to copy it.\r\n let offset: number = 0;\r\n\r\n for (let i = 0; i < path.length; i++) {\r\n offset = path[i];\r\n if (\r\n i < path.length - 1 &&\r\n node &&\r\n node.nodeType == NodeType.Element &&\r\n node.childNodes.length > offset\r\n ) {\r\n node = node.childNodes[offset];\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return new Position(node, offset);\r\n}\r\n","import getInnerHTML from '../utils/getInnerHTML';\nimport getSelectionPath from './getSelectionPath';\n\n/**\n * Get inner Html of a root node with a selection path which can be used for restore selection.\n * The result string can be used by setHtmlWithSelectionPath() to restore the HTML and selection.\n * @param rootNode Root node to get inner Html from\n * @param range The range of selection. If pass null, no selection path will be added\n * @returns Inner HTML of the root node, followed by HTML comment contains selection path if the given range is valid\n */\nexport default function getHtmlWithSelectionPath(\n rootNode: HTMLElement | DocumentFragment,\n range: Range | null\n): string {\n if (!rootNode) {\n return '';\n }\n\n const content = getInnerHTML(rootNode);\n const selectionPath = range && getSelectionPath(rootNode, range);\n\n return selectionPath ? `${content}` : content;\n}\n","import createElement from '../utils/createElement';\r\nimport createRange from './createRange';\r\nimport normalizeRect from '../utils/normalizeRect';\r\nimport { NodePosition, NodeType, Rect } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get bounding rect of this position\r\n * @param position The position to get rect from\r\n */\r\nexport default function getPositionRect(position: NodePosition): Rect | null {\r\n if (!position) {\r\n return null;\r\n }\r\n\r\n let range = createRange(position);\r\n\r\n // 1) try to get rect using range.getBoundingClientRect()\r\n let rect: Rect | null =\r\n range.getBoundingClientRect && normalizeRect(range.getBoundingClientRect());\r\n\r\n if (rect) {\r\n return rect;\r\n }\r\n\r\n // 2) try to get rect using range.getClientRects\r\n position = position.normalize();\r\n const rects = range.getClientRects && range.getClientRects();\r\n rect = rects && rects.length == 1 ? normalizeRect(rects[0]) : null;\r\n if (rect) {\r\n return rect;\r\n }\r\n\r\n // 3) if node is text node, try inserting a SPAN and get the rect of SPAN for others\r\n if (position.node.nodeType == NodeType.Text && position.node.ownerDocument) {\r\n const span = createElement(\r\n { tag: 'span', children: ['\\u200b'] },\r\n position.node.ownerDocument\r\n );\r\n range = createRange(position);\r\n range.insertNode(span!);\r\n rect = span!.getBoundingClientRect && normalizeRect(span!.getBoundingClientRect());\r\n span!.parentNode?.removeChild(span!);\r\n if (rect) {\r\n return rect;\r\n }\r\n }\r\n\r\n // 4) try getBoundingClientRect on element\r\n let element = position.element;\r\n if (element && element.getBoundingClientRect) {\r\n rect = normalizeRect(element.getBoundingClientRect());\r\n if (rect) {\r\n return rect;\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","import contains from '../utils/contains';\r\nimport Position from './Position';\r\nimport { NodePosition, NodeType, SelectionPath } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get path of the given selection range related to the given rootNode\r\n * @param rootNode The root node where the path start from\r\n * @param range The range of selection\r\n */\r\nexport default function getSelectionPath(\r\n rootNode: Node,\r\n range: Range | null\r\n): SelectionPath | null {\r\n if (!range) {\r\n return null;\r\n }\r\n\r\n let selectionPath: SelectionPath = {\r\n start: getPositionPath(Position.getStart(range), rootNode),\r\n end: getPositionPath(Position.getEnd(range), rootNode),\r\n };\r\n\r\n return selectionPath;\r\n}\r\n\r\n/**\r\n * Get the path of the node relative to rootNode.\r\n * The path of the node is an array of integer indices into the childNodes of the given node.\r\n *\r\n * The node path will be what the node path will be on a _normalized_ dom\r\n * (e.g. empty text nodes will be ignored and adjacent text nodes will be concatenated)\r\n *\r\n * @param rootNode the node the path will be relative to\r\n * @param position the position to get indexes from. Follows the same semantics\r\n * as selectionRange (if node is of type Text, it is an offset into the text of that node.\r\n * If node is of type Element, it is the index of a child in that Element node.)\r\n */\r\nfunction getPositionPath(position: NodePosition, rootNode: Node): number[] {\r\n if (!position || !rootNode) {\r\n return [];\r\n }\r\n\r\n let node: Node | null = position.node;\r\n let offset = position.offset;\r\n let result: number[] = [];\r\n let parent: Node | null;\r\n\r\n if (!contains(rootNode, node, true)) {\r\n return [];\r\n }\r\n\r\n if (node.nodeType == NodeType.Text) {\r\n parent = node.parentNode;\r\n while (node.previousSibling && node.previousSibling.nodeType == NodeType.Text) {\r\n offset += node.previousSibling.nodeValue?.length || 0;\r\n node = node.previousSibling;\r\n }\r\n result.unshift(offset);\r\n } else {\r\n parent = node;\r\n node = node.childNodes[offset];\r\n }\r\n\r\n do {\r\n offset = 0;\r\n let isPreviousText = false;\r\n\r\n for (let c: Node | null = parent?.firstChild || null; c && c != node; c = c.nextSibling) {\r\n if (c.nodeType == NodeType.Text) {\r\n if (c.nodeValue?.length === 0 || isPreviousText) {\r\n continue;\r\n }\r\n\r\n isPreviousText = true;\r\n } else {\r\n isPreviousText = false;\r\n }\r\n\r\n offset++;\r\n }\r\n\r\n result.unshift(offset);\r\n node = parent;\r\n parent = parent?.parentNode || null;\r\n } while (node && node != rootNode);\r\n\r\n return result;\r\n}\r\n","import contains from '../utils/contains';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport isNodeEmpty from '../utils/isNodeEmpty';\r\nimport { NodePosition } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Check if this position is at beginning of the given node.\r\n * This will return true if all nodes between the beginning of target node and the position are empty.\r\n * @param position The position to check\r\n * @param targetNode The node to check\r\n * @returns True if position is at beginning of the node, otherwise false\r\n */\r\nexport default function isPositionAtBeginningOf(position: NodePosition, targetNode: Node | null) {\r\n if (position) {\r\n position = position.normalize();\r\n let node: Node | null = position.node;\r\n const offset = position.offset;\r\n if (offset == 0) {\r\n while (node && contains(targetNode, node) && areAllPreviousNodesEmpty(node)) {\r\n node = node?.parentNode || null;\r\n }\r\n\r\n return node == targetNode;\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\nfunction areAllPreviousNodesEmpty(node: Node): boolean {\r\n while (node.previousSibling) {\r\n node = node.previousSibling;\r\n if (getTagOfNode(node) == 'BR' || !isNodeEmpty(node)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n","import createRange from './createRange';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport validate from '../metadata/validate';\r\nimport {\r\n createArrayDefinition,\r\n createBooleanDefinition,\r\n createNumberDefinition,\r\n createObjectDefinition,\r\n createStringDefinition,\r\n} from '../metadata/definitionCreators';\r\nimport {\r\n ContentMetadata,\r\n SelectionRangeTypes,\r\n TrustedHTMLHandler,\r\n ImageContentMetadata,\r\n NormalContentMetadata,\r\n TableContentMetadata,\r\n Coordinates,\r\n} from 'roosterjs-editor-types';\r\nconst NumberArrayDefinition = createArrayDefinition(createNumberDefinition());\r\n\r\nconst CoordinatesDefinition = createObjectDefinition({\r\n x: createNumberDefinition(),\r\n y: createNumberDefinition(),\r\n});\r\n\r\nconst IsDarkModeDefinition = createBooleanDefinition(true /*isOptional*/);\r\n\r\nconst NormalContentMetadataDefinition = createObjectDefinition({\r\n type: createNumberDefinition(true /*isOptional*/, SelectionRangeTypes.Normal),\r\n isDarkMode: IsDarkModeDefinition,\r\n start: NumberArrayDefinition,\r\n end: NumberArrayDefinition,\r\n});\r\n\r\nconst TableContentMetadataDefinition = createObjectDefinition({\r\n type: createNumberDefinition(false /*isOptional*/, SelectionRangeTypes.TableSelection),\r\n isDarkMode: IsDarkModeDefinition,\r\n tableId: createStringDefinition(),\r\n firstCell: CoordinatesDefinition,\r\n lastCell: CoordinatesDefinition,\r\n});\r\n\r\nconst ImageContentMetadataDefinition = createObjectDefinition({\r\n type: createNumberDefinition(false /*isOptional*/, SelectionRangeTypes.ImageSelection),\r\n isDarkMode: IsDarkModeDefinition,\r\n imageId: createStringDefinition(),\r\n});\r\n\r\n/**\r\n * @deprecated Use setHtmlWithMetadata instead\r\n * Restore inner HTML of a root element from given html string. If the string contains selection path,\r\n * remove the selection path and return a range represented by the path\r\n * @param root The root element\r\n * @param html The HTML to restore\r\n * @param trustedHTMLHandler An optional trusted HTML handler to convert HTML string to security string\r\n * @returns A selection range if the html contains a valid selection path, otherwise null\r\n */\r\nexport default function setHtmlWithSelectionPath(\r\n rootNode: HTMLElement,\r\n html: string,\r\n trustedHTMLHandler?: TrustedHTMLHandler\r\n): Range | null {\r\n const metadata = setHtmlWithMetadata(rootNode, html, trustedHTMLHandler);\r\n return metadata?.type == SelectionRangeTypes.Normal\r\n ? createRange(rootNode, metadata.start, metadata.end)\r\n : null;\r\n}\r\n\r\n/**\r\n * Restore inner HTML of a root element from given html string. If the string contains metadata,\r\n * remove it from DOM tree and return the metadata\r\n * @param root The root element\r\n * @param html The HTML to restore\r\n * @param trustedHTMLHandler An optional trusted HTML handler to convert HTML string to security string\r\n * @returns Content metadata if any, or undefined\r\n */\r\nexport function setHtmlWithMetadata(\r\n rootNode: HTMLElement,\r\n html: string,\r\n trustedHTMLHandler?: TrustedHTMLHandler\r\n): ContentMetadata | undefined {\r\n if (!rootNode) {\r\n return undefined;\r\n }\r\n\r\n html = html || '';\r\n rootNode.innerHTML = trustedHTMLHandler?.(html) || html;\r\n\r\n return extractContentMetadata(rootNode);\r\n}\r\n\r\n/**\r\n * Extract content metadata from DOM tree\r\n * @param rootNode Root of the DOM tree\r\n * @returns If there is a valid content metadata node in the give DOM tree, return this metadata object, otherwise undefined\r\n */\r\nexport function extractContentMetadata(rootNode: HTMLElement): ContentMetadata | undefined {\r\n const potentialMetadataComment = rootNode.lastChild;\r\n\r\n if (safeInstanceOf(potentialMetadataComment, 'Comment')) {\r\n try {\r\n const obj = JSON.parse(potentialMetadataComment.nodeValue || '');\r\n\r\n if (\r\n validate(obj, NormalContentMetadataDefinition) ||\r\n validate(obj, TableContentMetadataDefinition) ||\r\n validate(obj, ImageContentMetadataDefinition)\r\n ) {\r\n rootNode.removeChild(potentialMetadataComment);\r\n obj.type = typeof obj.type === 'undefined' ? SelectionRangeTypes.Normal : obj.type;\r\n obj.isDarkMode = obj.isDarkMode || false;\r\n\r\n return obj;\r\n }\r\n } catch {}\r\n }\r\n\r\n return undefined;\r\n}\r\n","import clearProceedingSnapshots from './clearProceedingSnapshots';\r\nimport { Snapshot, Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Add a new snapshot to the given snapshots data structure\r\n * @param snapshots The snapshots data structure to add new snapshot into\r\n * @param html The snapshot HTML to add\r\n * @param isAutoCompleteSnapshot Whether this is a snapshot before auto complete action\r\n */\r\nexport default function addSnapshot(\r\n snapshots: Snapshots,\r\n html: string,\r\n isAutoCompleteSnapshot: boolean\r\n): void;\r\n\r\n/**\r\n * Add a new snapshot to the given snapshots data structure\r\n * @param snapshots The snapshots data structure to add new snapshot into\r\n * @param snapshot The generic snapshot object to add\r\n * @param isAutoCompleteSnapshot Whether this is a snapshot before auto complete action\r\n * @param getLength A callback function to calculate length of the snapshot\r\n * @param isSame A callback function to check if the given snapshots are the same\r\n */\r\nexport default function addSnapshot(\r\n snapshots: Snapshots,\r\n snapshot: T,\r\n isAutoCompleteSnapshot: boolean,\r\n getLength: (snapshot: T) => number,\r\n isSame: (snapshot1: T, snapshot2: T) => boolean\r\n): void;\r\n\r\nexport default function addSnapshot(\r\n snapshots: Snapshots,\r\n snapshot: T,\r\n isAutoCompleteSnapshot: boolean,\r\n getLength?: (snapshot: T) => number,\r\n compare?: (snapshot1: T, snapshot2: T) => boolean\r\n) {\r\n getLength = getLength || (str => ((str))?.length || 0);\r\n compare = compare || defaultCompare;\r\n\r\n const currentSnapshot = snapshots.snapshots[snapshots.currentIndex];\r\n const isSameSnapshot = currentSnapshot && compare(currentSnapshot, snapshot);\r\n\r\n if (snapshots.currentIndex < 0 || !currentSnapshot || !isSameSnapshot) {\r\n clearProceedingSnapshots(snapshots, getLength);\r\n snapshots.snapshots.push(snapshot);\r\n snapshots.currentIndex++;\r\n snapshots.totalSize += getLength(snapshot);\r\n\r\n let removeCount = 0;\r\n while (\r\n removeCount < snapshots.snapshots.length &&\r\n snapshots.totalSize > snapshots.maxSize\r\n ) {\r\n snapshots.totalSize -= getLength(snapshots.snapshots[removeCount]);\r\n removeCount++;\r\n }\r\n\r\n if (removeCount > 0) {\r\n snapshots.snapshots.splice(0, removeCount);\r\n snapshots.currentIndex -= removeCount;\r\n snapshots.autoCompleteIndex -= removeCount;\r\n }\r\n\r\n if (isAutoCompleteSnapshot) {\r\n snapshots.autoCompleteIndex = snapshots.currentIndex;\r\n }\r\n } else if (isSameSnapshot) {\r\n // replace the currentSnapshot's metadata so the selection is updated\r\n snapshots.snapshots.splice(snapshots.currentIndex, 1, snapshot);\r\n }\r\n}\r\n\r\n/**\r\n * Add a new snapshot to the given snapshots data structure\r\n * @param snapshots The snapshots data structure to add new snapshot into\r\n * @param snapshot The snapshot object to add\r\n * @param isAutoCompleteSnapshot Whether this is a snapshot before auto complete action\r\n */\r\nexport function addSnapshotV2(\r\n snapshots: Snapshots,\r\n snapshot: Snapshot,\r\n isAutoCompleteSnapshot: boolean\r\n) {\r\n addSnapshot(\r\n snapshots,\r\n snapshot,\r\n isAutoCompleteSnapshot,\r\n s => s.html?.length || 0,\r\n compareSnapshots\r\n );\r\n}\r\n\r\nfunction compareSnapshots(s1: Snapshot, s2: Snapshot) {\r\n return s1.html == s2.html && !s1.entityStates && !s2.entityStates;\r\n}\r\n\r\nfunction defaultCompare(s1: T, s2: T) {\r\n return s1 == s2;\r\n}\r\n","import { Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Check whether can move current snapshot with the given step\r\n * @param snapshots The snapshots data structure to check\r\n * @param step The step to check, can be positive, negative or 0\r\n * @returns True if can move current snapshot with the given step, otherwise false\r\n */\r\nexport default function canMoveCurrentSnapshot(\r\n snapshots: Snapshots,\r\n step: number\r\n): boolean {\r\n let newIndex = snapshots.currentIndex + step;\r\n return newIndex >= 0 && newIndex < snapshots.snapshots.length;\r\n}\r\n","import { Snapshots } from 'roosterjs-editor-types';\n\n/**\n * Whether there is a snapshot added before auto complete and it can be undone now\n */\nexport default function canUndoAutoComplete(snapshots: Snapshots): boolean {\n return (\n snapshots.autoCompleteIndex >= 0 &&\n snapshots.currentIndex - snapshots.autoCompleteIndex == 1\n );\n}\n","import canMoveCurrentSnapshot from './canMoveCurrentSnapshot';\r\nimport { Snapshot, Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport default function clearProceedingSnapshots(snapshots: Snapshots): void;\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport default function clearProceedingSnapshots(\r\n snapshots: Snapshots,\r\n getLength: (snapshot: T) => number\r\n): void;\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport default function clearProceedingSnapshots(\r\n snapshots: Snapshots,\r\n getLength?: (snapshot: T) => number\r\n) {\r\n getLength = getLength || (str => ((str))?.length || 0);\r\n if (canMoveCurrentSnapshot(snapshots, 1)) {\r\n let removedSize = 0;\r\n for (let i = snapshots.currentIndex + 1; i < snapshots.snapshots.length; i++) {\r\n removedSize += getLength(snapshots.snapshots[i]);\r\n }\r\n snapshots.snapshots.splice(snapshots.currentIndex + 1);\r\n snapshots.totalSize -= removedSize;\r\n snapshots.autoCompleteIndex = -1;\r\n }\r\n}\r\n\r\n/**\r\n * Clear all snapshots after the current one\r\n * @param snapshots The snapshots data structure to clear\r\n */\r\nexport function clearProceedingSnapshotsV2(snapshots: Snapshots) {\r\n clearProceedingSnapshots(snapshots, s => s.html?.length || 0);\r\n}\r\n","import { Snapshots } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Create initial snapshots\r\n * @param maxSize max size of all snapshots\r\n */\r\nexport default function createSnapshots(maxSize: number): Snapshots {\r\n return {\r\n snapshots: [],\r\n totalSize: 0,\r\n currentIndex: -1,\r\n autoCompleteIndex: -1,\r\n maxSize,\r\n };\r\n}\r\n","import canMoveCurrentSnapshot from './canMoveCurrentSnapshot';\nimport { Snapshots } from 'roosterjs-editor-types';\n\n/**\n * Move current snapshot with the given step if can move this step. Otherwise no action and return null\n * @param snapshots The snapshots data structure to move\n * @param step The step to move\n * @returns If can move with the given step, returns the snapshot after move, otherwise null\n */\nexport default function moveCurrentSnapshot(\n snapshots: Snapshots,\n step: number\n): T | null {\n if (canMoveCurrentSnapshot(snapshots, step)) {\n snapshots.currentIndex += step;\n snapshots.autoCompleteIndex = -1;\n return snapshots.snapshots[snapshots.currentIndex];\n } else {\n return null;\n }\n}\n\n/**\n * @deprecated\n * For backward compatibility only\n */\nexport const moveCurrentSnapsnot = moveCurrentSnapshot;\n","/**\n * Get CSS styles of a given element in name-value pair format\n * @param element The element to get styles from\n */\nexport default function getStyles(element: HTMLElement): Record {\n const result: Record = {};\n const style = element?.getAttribute('style') || '';\n style.split(';').forEach(pair => {\n const valueIndex = pair.indexOf(':');\n const name = pair.slice(0, valueIndex);\n const value = pair.slice(valueIndex + 1);\n if (name && value) {\n result[name.trim()] = value.trim();\n }\n });\n return result;\n}\n","/**\n * Remove a css rule style from a style sheet\n * @param doc The document object\n * @param styleId the ID of the style tag\n */\n\nexport default function removeGlobalCssStyle(doc: Document, styleId: string) {\n const styleTag = doc.getElementById(styleId) as HTMLStyleElement;\n if (styleTag) {\n styleTag.parentNode?.removeChild(styleTag);\n }\n}\n","import getStyles from './getStyles';\nimport setStyles from './setStyles';\n\n/**\n * Removes the css important rule from some css properties\n * @param element The HTMLElement\n * @param styleProperties The css properties that important must be removed. Ex: ['background-color', 'background']\n */\n\nexport default function removeImportantStyleRule(element: HTMLElement, styleProperties: string[]) {\n const styles = getStyles(element);\n let modifiedStyles = 0;\n styleProperties.forEach(style => {\n if (styles[style]?.indexOf('!important') > -1) {\n const index = styles[style].indexOf('!');\n styles[style] = styles[style].substring(0, index);\n modifiedStyles++;\n }\n });\n if (modifiedStyles > 0) {\n setStyles(element, styles);\n }\n}\n","/**\n * Add global css styles\n * @param doc The document object\n * @param cssRule The css rule that must added to the selection\n * @param styleId The id of the style tag\n */\n\nexport default function setGlobalCssStyles(doc: Document, cssRule: string, styleId: string) {\n if (cssRule) {\n let styleTag = doc.getElementById(styleId) as HTMLStyleElement;\n if (!styleTag) {\n styleTag = doc.createElement('style');\n styleTag.id = styleId;\n doc.head.appendChild(styleTag);\n }\n styleTag.sheet?.insertRule(cssRule);\n }\n}\n","import getObjectKeys from '../jsUtils/getObjectKeys';\n\n/**\n * Set styles to an HTML element. If styles are empty, remove 'style' attribute\n * @param element The element to set styles\n * @param styles The styles to set, in name-value pair format\n */\nexport default function setStyles(element: HTMLElement, styles: Record) {\n if (element) {\n const style = getObjectKeys(styles || {})\n .map(name => {\n const value: string | null = styles[name];\n const trimmedName = name ? name.trim() : null;\n const trimmedValue = value ? value.trim() : null;\n return trimmedName && trimmedValue ? `${trimmedName}:${trimmedValue}` : null;\n })\n .filter(x => x)\n .join(';');\n if (style) {\n element.setAttribute('style', style);\n } else {\n element.removeAttribute('style');\n }\n }\n}\n","import applyTableFormat from './applyTableFormat';\r\nimport getTagOfNode from '../utils/getTagOfNode';\r\nimport moveChildNodes from '../utils/moveChildNodes';\r\nimport normalizeRect from '../utils/normalizeRect';\r\nimport safeInstanceOf from '../utils/safeInstanceOf';\r\nimport toArray from '../jsUtils/toArray';\r\nimport { getTableFormatInfo, saveTableInfo } from './tableFormatInfo';\r\nimport { removeMetadata } from '../metadata/metadata';\r\nimport {\r\n SizeTransformer,\r\n TableBorderFormat,\r\n TableFormat,\r\n TableOperation,\r\n TableSelection,\r\n VCell,\r\n DarkColorHandler,\r\n} from 'roosterjs-editor-types';\r\nimport type { CompatibleTableOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\nconst DEFAULT_FORMAT: Required = {\r\n topBorderColor: '#ABABAB',\r\n bottomBorderColor: '#ABABAB',\r\n verticalBorderColor: '#ABABAB',\r\n hasHeaderRow: false,\r\n hasFirstColumn: false,\r\n hasBandedRows: false,\r\n hasBandedColumns: false,\r\n bgColorEven: null,\r\n bgColorOdd: '#ABABAB20',\r\n headerRowColor: '#ABABAB',\r\n tableBorderFormat: TableBorderFormat.DEFAULT,\r\n keepCellShade: false,\r\n};\r\n\r\n/**\r\n * A virtual table class, represent an HTML table, by expand all merged cells to each separated cells\r\n */\r\nexport default class VTable {\r\n /**\r\n * The HTML table object\r\n */\r\n table: HTMLTableElement;\r\n\r\n /**\r\n * Virtual cells\r\n */\r\n cells: VCell[][] | null = null;\r\n\r\n /**\r\n * Current row index\r\n */\r\n row: number | undefined;\r\n\r\n /**\r\n * Current column index\r\n */\r\n col: number | undefined;\r\n\r\n /**\r\n * Current format of the table\r\n */\r\n formatInfo: Required | null = null;\r\n\r\n private trs: HTMLTableRowElement[] = [];\r\n\r\n private tableSelection: TableSelection | null = null;\r\n\r\n /**\r\n * Create a new instance of VTable object using HTML TABLE or TD node\r\n * @param node The HTML Table or TD node\r\n * @param normalizeSize Whether table size needs to be normalized\r\n * @param zoomScale When the table is under a zoomed container, pass in the zoom scale here\r\n */\r\n constructor(\r\n node: HTMLTableElement | HTMLTableCellElement,\r\n normalizeSize?: boolean,\r\n zoomScale?: number | SizeTransformer\r\n ) {\r\n this.table = safeInstanceOf(node, 'HTMLTableElement') ? node : getTableFromTd(node);\r\n if (this.table) {\r\n let currentTd = safeInstanceOf(node, 'HTMLTableElement') ? null : node;\r\n let trs = toArray(this.table.rows);\r\n this.cells = trs.map(row => []);\r\n trs.forEach((tr, rowIndex) => {\r\n this.trs[rowIndex % 2] = tr;\r\n for (let sourceCol = 0, targetCol = 0; sourceCol < tr.cells.length; sourceCol++) {\r\n // Skip the cells which already initialized\r\n for (; this.cells![rowIndex][targetCol]; targetCol++) {}\r\n let td = tr.cells[sourceCol];\r\n\r\n if (td == currentTd) {\r\n this.col = targetCol;\r\n this.row = rowIndex;\r\n }\r\n\r\n for (let colSpan = 0; colSpan < td.colSpan; colSpan++, targetCol++) {\r\n for (let rowSpan = 0; rowSpan < td.rowSpan; rowSpan++) {\r\n const hasTd: boolean = colSpan + rowSpan == 0;\r\n const rect = td.getBoundingClientRect();\r\n if (this.cells?.[rowIndex + rowSpan]) {\r\n this.cells[rowIndex + rowSpan][targetCol] = {\r\n td: hasTd ? td : null,\r\n spanLeft: colSpan > 0,\r\n spanAbove: rowSpan > 0,\r\n width: hasTd ? rect.width : undefined,\r\n height: hasTd ? rect.height : undefined,\r\n };\r\n }\r\n }\r\n }\r\n }\r\n });\r\n this.formatInfo = getTableFormatInfo(this.table);\r\n if (normalizeSize) {\r\n this.normalizeSize(typeof zoomScale == 'number' ? n => n / zoomScale : zoomScale);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Selected range of cells with the coordinates of the first and last cell selected.\r\n */\r\n public get selection(): TableSelection | null {\r\n return this.tableSelection || null;\r\n }\r\n\r\n public set selection(value: TableSelection | null) {\r\n if (value) {\r\n const { firstCell } = value;\r\n this.row = firstCell?.y;\r\n this.col = firstCell?.x;\r\n }\r\n this.tableSelection = value;\r\n }\r\n\r\n /**\r\n * Write the virtual table back to DOM tree to represent the change of VTable\r\n * @param skipApplyFormat Do not reapply table format when write back. Only use this parameter when you are pretty sure there is no format or table structure change during the process.\r\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\r\n */\r\n writeBack(skipApplyFormat?: boolean, darkColorHandler?: DarkColorHandler | null) {\r\n if (this.cells) {\r\n moveChildNodes(this.table);\r\n this.cells.forEach((row, r) => {\r\n let tr = cloneNode(this.trs[r % 2] || this.trs[0]);\r\n\r\n if (tr) {\r\n this.table.appendChild(tr);\r\n row.forEach((cell, c) => {\r\n if (cell.td) {\r\n this.recalculateSpans(r, c);\r\n this.recalculateCellHeight(cell.td);\r\n tr!.appendChild(cell.td);\r\n }\r\n });\r\n }\r\n });\r\n if (this.formatInfo && !skipApplyFormat) {\r\n saveTableInfo(this.table, this.formatInfo);\r\n applyTableFormat(this.table, this.cells, this.formatInfo, darkColorHandler);\r\n }\r\n } else if (this.table) {\r\n this.table.parentNode?.removeChild(this.table);\r\n }\r\n }\r\n\r\n private recalculateCellHeight(td: HTMLTableCellElement) {\r\n if (this.isEmptyCell(td) && td.rowSpan > 1) {\r\n for (let i = 1; i < td.rowSpan; i++) {\r\n const br = document.createElement('br');\r\n td.appendChild(br);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Apply the given table format to this virtual table\r\n * @param format Table format to apply\r\n */\r\n applyFormat(format: Partial) {\r\n if (!this.table) {\r\n return;\r\n }\r\n this.formatInfo = {\r\n ...DEFAULT_FORMAT,\r\n ...(this.formatInfo || {}),\r\n ...(format || {}),\r\n };\r\n if (!this.formatInfo.keepCellShade) {\r\n this.deleteCellShadeDataset(this.cells);\r\n }\r\n }\r\n\r\n /**\r\n * Remove the cellShade dataset to apply a new style format at the cell.\r\n * @param cells\r\n */\r\n private deleteCellShadeDataset(cells: VCell[][] | null) {\r\n cells?.forEach(row => {\r\n row.forEach(cell => {\r\n if (cell.td) {\r\n removeMetadata(cell.td);\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Edit table with given operation.\r\n * @param operation Table operation\r\n */\r\n edit(operation: TableOperation | CompatibleTableOperation) {\r\n if (!this.table || !this.cells || this.row === undefined || this.col == undefined) {\r\n return;\r\n }\r\n\r\n let currentRow = this.cells[this.row];\r\n let currentCell = currentRow[this.col];\r\n const firstRow = this.selection ? this.selection.firstCell.y : this.row;\r\n const lastRow = this.selection ? this.selection.lastCell.y : this.row;\r\n const firstColumn = this.selection ? this.selection.firstCell.x : this.col;\r\n const lastColumn = this.selection ? this.selection.lastCell.x : this.col;\r\n switch (operation) {\r\n case TableOperation.InsertAbove:\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n this.cells.splice(firstRow, 0, currentRow.map(cloneCell));\r\n }\r\n break;\r\n case TableOperation.InsertBelow:\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n let newRow = lastRow + this.countSpanAbove(lastRow, this.col);\r\n this.cells.splice(\r\n newRow,\r\n 0,\r\n this.cells[newRow - 1].map((cell, colIndex) => {\r\n let nextCell = this.getCell(newRow, colIndex);\r\n\r\n if (nextCell.spanAbove) {\r\n return cloneCell(nextCell);\r\n } else if (cell.spanLeft) {\r\n let newCell = cloneCell(cell);\r\n newCell.spanAbove = false;\r\n return newCell;\r\n } else {\r\n return {\r\n td: cloneNode(this.getTd(this.row!, colIndex)),\r\n };\r\n }\r\n })\r\n );\r\n }\r\n\r\n break;\r\n\r\n case TableOperation.InsertLeft:\r\n for (let i = firstColumn; i <= lastColumn; i++) {\r\n this.forEachCellOfCurrentColumn((cell, row) => {\r\n row.splice(i, 0, cloneCell(cell));\r\n });\r\n }\r\n\r\n break;\r\n case TableOperation.InsertRight:\r\n for (let i = firstColumn; i <= lastColumn; i++) {\r\n let newCol = lastColumn + this.countSpanLeft(this.row, lastColumn);\r\n this.forEachCellOfColumn(newCol - 1, (cell, row, i) => {\r\n let nextCell = this.getCell(i, newCol);\r\n let newCell: VCell;\r\n if (nextCell.spanLeft) {\r\n newCell = cloneCell(nextCell);\r\n } else if (cell.spanAbove) {\r\n newCell = cloneCell(cell);\r\n newCell.spanLeft = false;\r\n } else {\r\n newCell = {\r\n td: cloneNode(this.getTd(i, this.col!)),\r\n };\r\n }\r\n\r\n row.splice(newCol, 0, newCell);\r\n });\r\n }\r\n\r\n break;\r\n\r\n case TableOperation.DeleteRow:\r\n for (let rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) {\r\n this.forEachCellOfRow(rowIndex, (cell: VCell, i: number) => {\r\n let nextCell = this.getCell(rowIndex + 1, i);\r\n if (cell.td && cell.td.rowSpan > 1 && nextCell.spanAbove) {\r\n nextCell.td = cell.td;\r\n }\r\n });\r\n }\r\n const removedRows = this.selection\r\n ? this.selection.lastCell.y - this.selection.firstCell.y\r\n : 0;\r\n this.cells.splice(firstRow, removedRows + 1);\r\n if (this.cells.length === 0) {\r\n this.cells = null;\r\n }\r\n\r\n break;\r\n case TableOperation.DeleteColumn:\r\n let deletedColumns = 0;\r\n for (let colIndex = firstColumn; colIndex <= lastColumn; colIndex++) {\r\n this.forEachCellOfColumn(colIndex, (cell, row, i) => {\r\n let nextCell = this.getCell(i, colIndex + 1);\r\n if (cell.td && cell.td.colSpan > 1 && nextCell.spanLeft) {\r\n nextCell.td = cell.td;\r\n }\r\n const removedColumns = this.selection\r\n ? colIndex - deletedColumns\r\n : this.col!;\r\n row.splice(removedColumns, 1);\r\n });\r\n deletedColumns++;\r\n }\r\n if (this.cells?.length === 0 || this.cells?.every(row => row.length === 0)) {\r\n this.cells = null;\r\n }\r\n break;\r\n\r\n case TableOperation.MergeAbove:\r\n case TableOperation.MergeBelow:\r\n let rowStep = operation == TableOperation.MergeAbove ? -1 : 1;\r\n for (\r\n let rowIndex = this.row + rowStep;\r\n rowIndex >= 0 && rowIndex < this.cells.length;\r\n rowIndex += rowStep\r\n ) {\r\n let cell = this.getCell(rowIndex, this.col);\r\n if (cell.td && !cell.spanAbove) {\r\n let aboveCell = rowIndex < this.row ? cell : currentCell;\r\n let belowCell = rowIndex < this.row ? currentCell : cell;\r\n this.mergeCells(aboveCell, belowCell);\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case TableOperation.MergeLeft:\r\n case TableOperation.MergeRight:\r\n let colStep = operation == TableOperation.MergeLeft ? -1 : 1;\r\n for (\r\n let colIndex = this.col + colStep;\r\n colIndex >= 0 && colIndex < this.cells[this.row].length;\r\n colIndex += colStep\r\n ) {\r\n let cell = this.getCell(this.row, colIndex);\r\n if (cell.td && !cell.spanLeft) {\r\n let leftCell = colIndex < this.col ? cell : currentCell;\r\n let rightCell = colIndex < this.col ? currentCell : cell;\r\n this.mergeCells(leftCell, rightCell, true /** horizontally */);\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case TableOperation.MergeCells:\r\n for (let colIndex = firstColumn; colIndex <= lastColumn; colIndex++) {\r\n for (let rowIndex = firstRow + 1; rowIndex <= lastRow; rowIndex++) {\r\n let cell = this.getCell(firstRow, colIndex);\r\n let nextCellBelow = this.getCell(rowIndex, colIndex);\r\n this.mergeCells(cell, nextCellBelow);\r\n }\r\n }\r\n for (let colIndex = firstColumn + 1; colIndex <= lastColumn; colIndex++) {\r\n let cell = this.getCell(firstRow, firstColumn);\r\n let nextCellRight = this.getCell(firstRow, colIndex);\r\n this.mergeCells(cell, nextCellRight, true /** horizontally */);\r\n }\r\n\r\n break;\r\n case TableOperation.DeleteTable:\r\n this.cells = null;\r\n break;\r\n\r\n case TableOperation.SplitVertically:\r\n if (currentCell.td && currentCell.td.rowSpan > 1) {\r\n this.getCell(this.row + 1, this.col).td = cloneNode(currentCell.td);\r\n } else {\r\n let splitRow = currentRow.map(cell => {\r\n return {\r\n td: cell == currentCell ? cloneNode(cell.td) : null,\r\n spanAbove: cell != currentCell,\r\n spanLeft: cell.spanLeft,\r\n };\r\n });\r\n this.cells.splice(this.row + 1, 0, splitRow);\r\n }\r\n break;\r\n\r\n case TableOperation.SplitHorizontally:\r\n if (currentCell.td && currentCell.td.colSpan > 1) {\r\n this.getCell(this.row, this.col + 1).td = cloneNode(currentCell.td);\r\n } else {\r\n this.forEachCellOfCurrentColumn((cell, row) => {\r\n row.splice(this.col! + 1, 0, {\r\n td: row == currentRow ? cloneNode(cell.td) : null,\r\n spanAbove: cell.spanAbove,\r\n spanLeft: row != currentRow,\r\n });\r\n });\r\n }\r\n break;\r\n case TableOperation.AlignCenter:\r\n this.table.style.marginLeft = 'auto';\r\n this.table.style.marginRight = 'auto';\r\n break;\r\n case TableOperation.AlignLeft:\r\n this.table.style.marginLeft = '';\r\n this.table.style.marginRight = 'auto';\r\n break;\r\n case TableOperation.AlignRight:\r\n this.table.style.marginLeft = 'auto';\r\n this.table.style.marginRight = '';\r\n break;\r\n case TableOperation.AlignCellCenter:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'center'\r\n );\r\n break;\r\n case TableOperation.AlignCellLeft:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'left'\r\n );\r\n break;\r\n case TableOperation.AlignCellRight:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'right'\r\n );\r\n break;\r\n case TableOperation.AlignCellTop:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'top',\r\n true /** isVertical */\r\n );\r\n break;\r\n case TableOperation.AlignCellMiddle:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'middle',\r\n true /** isVertical */\r\n );\r\n break;\r\n case TableOperation.AlignCellBottom:\r\n this.setAlignmentToSelectedCells(\r\n firstRow,\r\n lastRow,\r\n firstColumn,\r\n lastColumn,\r\n 'bottom',\r\n true /** isVertical */\r\n );\r\n break;\r\n }\r\n }\r\n\r\n setAlignmentToSelectedCells(\r\n firstRow: number,\r\n lastRow: number,\r\n firstColumn: number,\r\n lastColumn: number,\r\n alignmentType: string,\r\n isVertical?: boolean\r\n ) {\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n for (let j = firstColumn; j <= lastColumn; j++) {\r\n if (this.cells) {\r\n const cell = this.cells[i][j].td;\r\n if (isVertical && cell) {\r\n cell.style?.setProperty('vertical-align', alignmentType);\r\n } else if (cell) {\r\n cell.style?.setProperty('text-align', alignmentType);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private mergeCells(cell: VCell, nextCell: VCell, horizontally?: boolean) {\r\n const checkSpans = horizontally\r\n ? cell.td?.rowSpan === nextCell.td?.rowSpan && !cell.spanLeft\r\n : cell.td?.colSpan === nextCell.td?.colSpan && !cell.spanAbove;\r\n if (cell.td && nextCell.td && checkSpans) {\r\n this.mergeCellContents(cell.td, nextCell.td);\r\n nextCell.td = null;\r\n if (horizontally) {\r\n nextCell.spanLeft = true;\r\n } else {\r\n nextCell.spanAbove = true;\r\n }\r\n }\r\n }\r\n\r\n private isEmptyCell(td: HTMLTableCellElement) {\r\n return td.childElementCount === 1 && getTagOfNode(td.firstChild) === 'BR';\r\n }\r\n\r\n private mergeCellContents(cellTd: HTMLTableCellElement, nextCellTd: HTMLTableCellElement) {\r\n if (this.isEmptyCell(nextCellTd)) {\r\n moveChildNodes(cellTd, nextCellTd, false /*keepExistingChildren*/);\r\n } else {\r\n const br = document.createElement('br');\r\n cellTd.appendChild(br);\r\n moveChildNodes(cellTd, nextCellTd, true /*keepExistingChildren*/);\r\n }\r\n }\r\n\r\n /**\r\n * Loop each cell of current column and invoke a callback function\r\n * @param callback The callback function to invoke\r\n */\r\n forEachCellOfCurrentColumn(callback: (cell: VCell, row: VCell[], i: number) => any) {\r\n this.forEachCellOfColumn(this.col, callback);\r\n }\r\n\r\n /**\r\n * Loop each table cell and get all the cells that share the same border from one side\r\n * The result is an array of table cell elements\r\n * @param borderPos The position of the border\r\n * @param getLeftCells Get left-hand-side or right-hand-side cells of the border\r\n *\r\n * Example, consider having a 3 by 4 table as below with merged and split cells\r\n *\r\n * | 1 | 4 | 7 | 8 |\r\n * | 5 | 9 |\r\n * | 3 | 10 |\r\n *\r\n * input => borderPos: the 3rd border, getLeftCells: true\r\n * output => [4, 5, 3]\r\n *\r\n * input => borderPos: the 3rd border, getLeftCells: false\r\n * output => [7, 9, 10]\r\n *\r\n * input => borderPos: the 2nd border, getLeftCells: true\r\n * output => [1]\r\n *\r\n * input => borderPos: the 2nd border, getLeftCells: false\r\n * output => [4]\r\n */\r\n getCellsWithBorder(borderPos: number, getLeftCells: boolean): HTMLTableCellElement[] {\r\n const cells: HTMLTableCellElement[] = [];\r\n for (let i = 0; this.cells && i < this.cells.length; i++) {\r\n for (let j = 0; j < this.cells[i].length; j++) {\r\n const cell = this.getCell(i, j);\r\n if (cell.td) {\r\n const cellRect = normalizeRect(cell.td.getBoundingClientRect());\r\n\r\n if (cellRect) {\r\n let found: boolean = false;\r\n if (getLeftCells) {\r\n if (cellRect.right == borderPos) {\r\n found = true;\r\n cells.push(cell.td);\r\n } else if (found) {\r\n break;\r\n }\r\n } else {\r\n if (cellRect.left == borderPos) {\r\n found = true;\r\n cells.push(cell.td);\r\n } else if (found) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return cells;\r\n }\r\n\r\n /**\r\n * Loop each cell of current row and invoke a callback function\r\n * @param callback The callback function to invoke\r\n */\r\n forEachCellOfCurrentRow(callback: (cell: VCell, i: number) => any) {\r\n this.forEachCellOfRow(this.row, callback);\r\n }\r\n\r\n /**\r\n * Get a table cell using its row and column index. This function will always return an object\r\n * even if the given indexes don't exist in table.\r\n * @param row The row index\r\n * @param col The column index\r\n */\r\n getCell(row: number, col: number): VCell {\r\n return (this.cells && this.cells[row] && this.cells[row][col]) || {};\r\n }\r\n\r\n /**\r\n * Get current HTML table cell object. If the current table cell is a virtual expanded cell, return its root cell\r\n */\r\n getCurrentTd(): HTMLTableCellElement | null {\r\n return this.getTd(this.row, this.col);\r\n }\r\n\r\n /**\r\n * Get the Table Cell in a provided coordinate\r\n * @param row row of the cell\r\n * @param col column of the cell\r\n */\r\n getTd(row: number | undefined, col: number | undefined) {\r\n if (this.cells && row !== undefined && col !== undefined) {\r\n row = Math.min(this.cells.length - 1, row);\r\n col = this.cells[row] ? Math.min(this.cells[row].length - 1, col) : col;\r\n if (!isNaN(row) && !isNaN(col)) {\r\n while (row >= 0 && col >= 0) {\r\n let cell = this.getCell(row, col);\r\n if (cell.td) {\r\n return cell.td;\r\n } else if (cell.spanLeft) {\r\n col--;\r\n } else if (cell.spanAbove) {\r\n row--;\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private forEachCellOfColumn(\r\n col: number | undefined,\r\n callback: (cell: VCell, row: VCell[], i: number) => any\r\n ) {\r\n if (col !== undefined) {\r\n for (let i = 0; this.cells && i < this.cells.length; i++) {\r\n callback(this.getCell(i, col), this.cells[i], i);\r\n }\r\n }\r\n }\r\n\r\n private forEachCellOfRow(row: number | undefined, callback: (cell: VCell, i: number) => any) {\r\n if (row !== undefined) {\r\n for (let i = 0; this.cells && i < this.cells[row].length; i++) {\r\n callback(this.getCell(row, i), i);\r\n }\r\n }\r\n }\r\n\r\n private recalculateSpans(row: number, col: number) {\r\n let td = this.getCell(row, col).td;\r\n if (td) {\r\n td.colSpan = this.countSpanLeft(row, col);\r\n td.rowSpan = this.countSpanAbove(row, col);\r\n if (td.colSpan == 1) {\r\n td.removeAttribute('colSpan');\r\n }\r\n if (td.rowSpan == 1) {\r\n td.removeAttribute('rowSpan');\r\n }\r\n }\r\n }\r\n\r\n private countSpanLeft(row: number, col: number) {\r\n let result = 1;\r\n for (let i = col + 1; this.cells && i < this.cells[row].length; i++) {\r\n let cell = this.getCell(row, i);\r\n if (cell.td || !cell.spanLeft) {\r\n break;\r\n }\r\n result++;\r\n }\r\n return result;\r\n }\r\n\r\n private countSpanAbove(row: number, col: number) {\r\n let result = 1;\r\n for (let i = row + 1; this.cells && i < this.cells.length; i++) {\r\n let cell = this.getCell(i, col);\r\n if (cell.td || !cell.spanAbove) {\r\n break;\r\n }\r\n result++;\r\n }\r\n return result;\r\n }\r\n\r\n private normalizeEmptyTableCells() {\r\n for (let i = 0, row; (row = this.table.rows[i]); i++) {\r\n for (let j = 0, cell; (cell = row.cells[j]); j++) {\r\n if (cell) {\r\n if (!cell.innerHTML || !cell.innerHTML.trim()) {\r\n cell.appendChild(document.createElement('br'));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /* normalize width/height for each cell in the table */\r\n public normalizeTableCellSize(zoomScale?: number | SizeTransformer) {\r\n // remove width/height for each row\r\n for (let i = 0, row; (row = this.table.rows[i]); i++) {\r\n row.removeAttribute('width');\r\n row.style.setProperty('width', null);\r\n row.removeAttribute('height');\r\n row.style.setProperty('height', null);\r\n }\r\n\r\n // set width/height for each cell\r\n for (let i = 0; this.cells && i < this.cells.length; i++) {\r\n for (let j = 0; j < this.cells[i].length; j++) {\r\n const cell = this.cells[i][j];\r\n if (cell) {\r\n const func =\r\n typeof zoomScale == 'number' ? (n: number) => n / zoomScale : zoomScale;\r\n const width = cell.width || 0;\r\n const height = cell.height || 0;\r\n\r\n setHTMLElementSizeInPx(\r\n cell.td,\r\n func?.(width) || width,\r\n func?.(height) || height\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n private normalizeSize(sizeTransformer: SizeTransformer | undefined) {\r\n this.normalizeEmptyTableCells();\r\n this.normalizeTableCellSize(sizeTransformer);\r\n\r\n const rect = this.table.getBoundingClientRect();\r\n\r\n // Make sure table width/height is fixed to avoid shifting effect\r\n setHTMLElementSizeInPx(\r\n this.table,\r\n sizeTransformer?.(rect.width) || rect.width,\r\n sizeTransformer?.(rect.height) || rect.height\r\n );\r\n }\r\n}\r\n\r\nfunction setHTMLElementSizeInPx(\r\n element: HTMLElement | null | undefined,\r\n newWidth: number,\r\n newHeight: number\r\n) {\r\n if (!!element) {\r\n element.removeAttribute('width');\r\n element.removeAttribute('height');\r\n element.style.boxSizing = 'border-box';\r\n element.style.width = `${newWidth}px`;\r\n element.style.height = `${newHeight}px`;\r\n }\r\n}\r\n\r\nfunction getTableFromTd(td: HTMLTableCellElement) {\r\n let result: Element | null = td;\r\n for (; result && result.tagName != 'TABLE'; result = result.parentElement) {}\r\n return result;\r\n}\r\n\r\n/**\r\n * Clone a table cell\r\n * @param cell The cell to clone\r\n */\r\nfunction cloneCell(cell: VCell): VCell {\r\n return {\r\n td: cloneNode(cell.td),\r\n spanAbove: cell.spanAbove,\r\n spanLeft: cell.spanLeft,\r\n };\r\n}\r\n\r\n/**\r\n * Clone a node without its children.\r\n * @param node The node to clone\r\n */\r\nfunction cloneNode(node: T | null | undefined): T | null {\r\n let newNode = node ? node.cloneNode(false /*deep*/) : null;\r\n if (safeInstanceOf(newNode, 'HTMLTableCellElement')) {\r\n newNode.removeAttribute('id');\r\n if (!newNode.firstChild) {\r\n newNode.appendChild(node!.ownerDocument!.createElement('br'));\r\n }\r\n }\r\n return newNode;\r\n}\r\n","import changeElementTag from '../utils/changeElementTag';\nimport setColor from '../utils/setColor';\nimport { DarkColorHandler, TableBorderFormat, TableFormat, VCell } from 'roosterjs-editor-types';\nimport { getTableCellMetadata } from './tableCellInfo';\nconst TRANSPARENT = 'transparent';\nconst TABLE_CELL_TAG_NAME = 'TD';\nconst TABLE_HEADER_TAG_NAME = 'TH';\n\n/**\n * @internal\n * Apply the given table format to this virtual table\n * @param format Table format to apply\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\n */\nexport default function applyTableFormat(\n table: HTMLTableElement,\n cells: VCell[][],\n format: Required,\n darkColorHandler?: DarkColorHandler | null\n) {\n if (!format) {\n return;\n }\n table.style.borderCollapse = 'collapse';\n setBordersType(cells, format);\n setCellColor(cells, format, darkColorHandler);\n setFirstColumnFormat(cells, format);\n setHeaderRowFormat(cells, format, darkColorHandler);\n}\n\n/**\n * Check if the cell has shade\n * @param cell\n * @returns\n */\nfunction hasCellShade(cell: VCell) {\n if (!cell.td) {\n return false;\n }\n\n return !!getTableCellMetadata(cell.td)?.bgColorOverride;\n}\n\n/**\n * Set color to the table\n * @param format the format that must be applied\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\n */\nfunction setCellColor(\n cells: VCell[][],\n format: TableFormat,\n darkColorHandler?: DarkColorHandler | null\n) {\n const color = (index: number) => (index % 2 === 0 ? format.bgColorEven : format.bgColorOdd);\n const { hasBandedRows, hasBandedColumns, bgColorOdd, bgColorEven } = format;\n const shouldColorWholeTable = !hasBandedRows && bgColorOdd === bgColorEven ? true : false;\n cells.forEach((row, index) => {\n row.forEach(cell => {\n if (cell.td && !hasCellShade(cell)) {\n if (hasBandedRows) {\n const backgroundColor = color(index);\n setColor(\n cell.td,\n backgroundColor || TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n } else if (shouldColorWholeTable) {\n setColor(\n cell.td,\n format.bgColorOdd || TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n } else {\n setColor(\n cell.td,\n TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n }\n }\n });\n });\n if (hasBandedColumns) {\n cells.forEach(row => {\n row.forEach((cell, index) => {\n const backgroundColor = color(index);\n if (cell.td && backgroundColor && !hasCellShade(cell)) {\n setColor(\n cell.td,\n backgroundColor,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n }\n });\n });\n }\n}\n\n/**\n * Set color to borders of an table\n * @param format\n * @returns\n */\nfunction setBorderColors(td: HTMLTableCellElement, format: Partial) {\n td.style.borderTop = getBorderStyle(format.topBorderColor);\n td.style.borderLeft = getBorderStyle(format.verticalBorderColor);\n td.style.borderRight = getBorderStyle(format.verticalBorderColor);\n td.style.borderBottom = getBorderStyle(format.bottomBorderColor);\n}\n\n/**\n * Format the border type\n * @returns\n */\nfunction formatBorders(\n format: TableFormat,\n td: HTMLTableCellElement,\n isFirstRow: boolean,\n isLastRow: boolean,\n isFirstColumn: boolean,\n isLastColumn: boolean\n) {\n setBorderColors(td, format);\n switch (format.tableBorderFormat) {\n case TableBorderFormat.DEFAULT:\n return;\n case TableBorderFormat.LIST_WITH_SIDE_BORDERS:\n if (!isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (!isLastColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n\n break;\n case TableBorderFormat.FIRST_COLUMN_HEADER_EXTERNAL:\n if (!isFirstRow) {\n td.style.borderTopColor = TRANSPARENT;\n }\n\n if (!isLastRow && !isFirstRow) {\n td.style.borderBottomColor = TRANSPARENT;\n }\n if (!isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (!isLastColumn && !isFirstColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n if (isFirstColumn && isFirstRow) {\n td.style.borderRightColor = TRANSPARENT;\n }\n\n break;\n case TableBorderFormat.NO_HEADER_BORDERS:\n if (isFirstRow) {\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isLastColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n break;\n case TableBorderFormat.NO_SIDE_BORDERS:\n if (isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isLastColumn) {\n td.style.borderRightColor = TRANSPARENT;\n }\n break;\n case TableBorderFormat.ESPECIAL_TYPE_1:\n if (isFirstRow) {\n td.style.borderRightColor = TRANSPARENT;\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n }\n if (isFirstRow && isFirstColumn) {\n td.style.borderLeftColor = format.verticalBorderColor || TRANSPARENT;\n td.style.borderBottomColor = format.bottomBorderColor || TRANSPARENT;\n td.style.borderTopColor = format.topBorderColor || TRANSPARENT;\n }\n break;\n case TableBorderFormat.ESPECIAL_TYPE_2:\n if (isFirstRow) {\n td.style.borderRightColor = TRANSPARENT;\n td.style.borderLeftColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n }\n if (isFirstRow && isFirstColumn) {\n td.style.borderLeftColor = format.verticalBorderColor || TRANSPARENT;\n td.style.borderBottomColor = format.bottomBorderColor || TRANSPARENT;\n td.style.borderTopColor = format.topBorderColor || TRANSPARENT;\n }\n if (!isFirstRow && !isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n }\n\n break;\n case TableBorderFormat.ESPECIAL_TYPE_3:\n if (isFirstRow) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n }\n if (isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderBottomColor = TRANSPARENT;\n }\n if (!isFirstRow && !isFirstColumn) {\n td.style.borderLeftColor = TRANSPARENT;\n td.style.borderBottomColor = TRANSPARENT;\n td.style.borderTopColor = TRANSPARENT;\n td.style.borderRightColor = TRANSPARENT;\n }\n if (isFirstRow && isFirstColumn) {\n td.style.borderBottomColor = format.bottomBorderColor || TRANSPARENT;\n }\n break;\n }\n}\n\n/**\n * Organize the borders of table according to a border type\n * @param format\n * @returns\n */\nfunction setBordersType(cells: VCell[][], format: TableFormat) {\n cells.forEach((row, rowIndex) => {\n row.forEach((cell, cellIndex) => {\n if (cell.td) {\n formatBorders(\n format,\n cell.td,\n rowIndex === 0,\n rowIndex === cells.length - 1,\n cellIndex === 0,\n cellIndex === row.length - 1\n );\n }\n });\n });\n}\n\n/**\n * Apply custom design to the first table column\n * @param format\n * @returns\n */\nfunction setFirstColumnFormat(cells: VCell[][], format: Partial) {\n if (!format.hasFirstColumn) {\n cells.forEach(row => {\n row.forEach((cell, cellIndex) => {\n if (cell.td && cellIndex === 0) {\n cell.td = changeElementTag(\n cell.td,\n TABLE_CELL_TAG_NAME\n ) as HTMLTableCellElement;\n cell.td.scope = '';\n }\n });\n });\n return;\n }\n cells.forEach((row, rowIndex) => {\n row.forEach((cell, cellIndex) => {\n if (cell.td && cellIndex === 0) {\n if (rowIndex !== 0 && !hasCellShade(cell)) {\n cell.td.style.borderTopColor = TRANSPARENT;\n setColor(\n cell.td,\n TRANSPARENT,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */\n );\n }\n if (rowIndex !== cells.length - 1 && rowIndex !== 0) {\n cell.td.style.borderBottomColor = TRANSPARENT;\n }\n cell.td = changeElementTag(cell.td, TABLE_HEADER_TAG_NAME) as HTMLTableCellElement;\n cell.td.scope = 'col';\n }\n });\n });\n}\n\n/**\n * Apply custom design to the Header Row\n * @param format\n * @param darkColorHandler An object to handle dark background colors, if not passed the cell background color will not be set\n * @returns\n */\nfunction setHeaderRowFormat(\n cells: VCell[][],\n format: TableFormat,\n darkColorHandler?: DarkColorHandler | null\n) {\n if (!format.hasHeaderRow) {\n cells[0]?.forEach(cell => {\n if (cell.td) {\n cell.td = changeElementTag(cell.td, TABLE_CELL_TAG_NAME) as HTMLTableCellElement;\n cell.td.scope = '';\n }\n });\n return;\n }\n cells[0]?.forEach(cell => {\n if (cell.td && format.headerRowColor) {\n if (!hasCellShade(cell)) {\n setColor(\n cell.td,\n format.headerRowColor,\n true /** isBackgroundColor*/,\n undefined /** isDarkMode **/,\n true /** shouldAdaptFontColor */,\n darkColorHandler\n );\n }\n cell.td.style.borderRightColor = format.headerRowColor;\n cell.td.style.borderLeftColor = format.headerRowColor;\n cell.td.style.borderTopColor = format.headerRowColor;\n cell.td = changeElementTag(cell.td, TABLE_HEADER_TAG_NAME) as HTMLTableCellElement;\n cell.td.scope = 'row';\n }\n });\n}\n\nfunction getBorderStyle(style?: string | null) {\n const color = style ? style : 'transparent';\n return 'solid 1px ' + color;\n}\n","import { saveTableCellMetadata } from './tableCellInfo';\n/**\n * Clone css styles from a element an set to another.\n * @param cell cell that will receive the styles\n * @param styledCell cell where the styles will be clone\n */\n\nexport default function cloneCellStyles(\n cell: HTMLTableCellElement,\n styledCell: HTMLTableCellElement\n) {\n const styles = styledCell.getAttribute('style');\n if (styles) {\n cell.setAttribute('style', styles);\n saveTableCellMetadata(cell, {\n bgColorOverride: true,\n });\n }\n}\n","import VTable from './VTable';\nimport { TableSelection } from 'roosterjs-editor-types';\n\n/**\n * Check if the whole table is selected\n * @param vTable VTable to check whether all cells are selected\n * @param selection Table selection with first cell selected and last cell selected coordinates.\n * @returns\n */\nexport default function isWholeTableSelected(vTable: VTable, selection: TableSelection) {\n if (!selection || !vTable.cells) {\n return false;\n }\n const { firstCell, lastCell } = selection;\n const rowsLength = vTable.cells.length - 1;\n const rowCells = vTable.cells[rowsLength];\n if (!rowCells) {\n return false;\n }\n const colIndex = rowCells.length - 1;\n const firstX = firstCell.x;\n const firstY = firstCell.y;\n const lastX = lastCell.x;\n const lastY = lastCell.y;\n return firstX == 0 && firstY == 0 && lastX == colIndex && lastY == rowsLength;\n}\n","import cloneCellStyles from './cloneCellStyles';\nimport moveChildNodes from '../utils/moveChildNodes';\nimport VTable from './VTable';\nimport { NodePosition, TableOperation } from 'roosterjs-editor-types';\n\n/**\n *\n * Pastes a table inside another, modifying the original to create a merged one\n * @param currentTd The cell where the cursor is in the table to paste into\n * @param rootNodeToInsert A Node containing the table to be inserted\n * @param position The position to paste the table\n * @param range The selected range of the table\n *\n * Position and range are here for when table selection allows to move pivot point\n */\nexport default function pasteTable(\n currentTd: HTMLTableCellElement,\n rootNodeToInsert: HTMLTableElement,\n position?: NodePosition,\n range?: Range\n) {\n // This is the table on the clipboard\n let newTable = new VTable(rootNodeToInsert);\n // This table is already on the editor\n let currentTable = new VTable(currentTd);\n\n // Which cell in the currentTable is the cursor placed\n let cursorRow = currentTable.row!;\n let cursorCol = currentTable.col!;\n\n // Total rows and columns of the final table\n let rows = cursorRow + newTable.cells?.length! ?? 0;\n let columns = cursorCol + newTable.cells?.[0].length! ?? 0;\n\n // Add new rows\n currentTable.row = currentTable.cells!.length! - 1;\n while (currentTable.cells!.length! < rows) {\n currentTable.edit(TableOperation.InsertBelow);\n }\n\n // Add new columns\n currentTable.col = currentTable.cells![0].length! - 1;\n while (currentTable.cells![0].length! < columns) {\n currentTable.edit(TableOperation.InsertRight);\n }\n\n // Create final table\n for (let i = cursorRow; i < rows; i++) {\n for (let j = cursorCol; j < columns; j++) {\n let cell = currentTable.getCell(i, j);\n let newCell = newTable.getTd(i - cursorRow, j - cursorCol);\n if (cell.td && newCell) {\n moveChildNodes(cell.td, newCell);\n cloneCellStyles(cell.td, newCell);\n } else {\n cell.td = document.createElement('td');\n }\n }\n }\n\n currentTable.writeBack();\n}\n","import { createBooleanDefinition, createObjectDefinition } from '../metadata/definitionCreators';\nimport { getMetadata, setMetadata } from '../metadata/metadata';\nimport { TableCellMetadataFormat } from 'roosterjs-editor-types';\n\nconst BooleanDefinition = createBooleanDefinition(\n false /** isOptional */,\n undefined /** value */,\n true /** allowNull */\n);\n\nconst TableCellFormatMetadata = createObjectDefinition>(\n {\n bgColorOverride: BooleanDefinition,\n },\n false /* isOptional */,\n true /** allowNull */\n);\n\n/**\n * @internal\n * Get the format info of a table cell\n * @param cell The table cell to use\n */\nexport function getTableCellMetadata(cell: HTMLTableCellElement) {\n return getMetadata(cell, TableCellFormatMetadata);\n}\n\n/**\n * Add metadata to a cell\n * @param cell The table cell to add the metadata\n * @param format The format of the table\n */\nexport function saveTableCellMetadata(cell: HTMLTableCellElement, format: TableCellMetadataFormat) {\n if (cell && format) {\n setMetadata(cell, format, TableCellFormatMetadata);\n }\n}\n","import { getMetadata, setMetadata } from '../metadata/metadata';\nimport { TableBorderFormat, TableFormat } from 'roosterjs-editor-types';\nimport {\n createBooleanDefinition,\n createNumberDefinition,\n createObjectDefinition,\n createStringDefinition,\n} from '../metadata/definitionCreators';\n\nconst NullStringDefinition = createStringDefinition(\n false /** isOptional */,\n undefined /** value */,\n true /** allowNull */\n);\n\nconst BooleanDefinition = createBooleanDefinition(false /** isOptional */);\n\nconst TableFormatMetadata = createObjectDefinition>(\n {\n topBorderColor: NullStringDefinition,\n bottomBorderColor: NullStringDefinition,\n verticalBorderColor: NullStringDefinition,\n hasHeaderRow: BooleanDefinition,\n headerRowColor: NullStringDefinition,\n hasFirstColumn: BooleanDefinition,\n hasBandedColumns: BooleanDefinition,\n hasBandedRows: BooleanDefinition,\n bgColorEven: NullStringDefinition,\n bgColorOdd: NullStringDefinition,\n tableBorderFormat: createNumberDefinition(\n false /** isOptional */,\n undefined /* value */,\n TableBorderFormat.DEFAULT /* first table border format, TODO: Use Min/Max to specify valid values */,\n TableBorderFormat.CLEAR /* last table border format, , TODO: Use Min/Max to specify valid values */\n ),\n keepCellShade: createBooleanDefinition(true /** isOptional */),\n },\n false /* isOptional */,\n true /** allowNull */\n);\n\n/**\n * Get the format info of a table\n * If the table does not have a info saved, it will be retrieved from the css styles\n * @param table The table that has the info\n */\nexport function getTableFormatInfo(table: HTMLTableElement) {\n return getMetadata(table, TableFormatMetadata);\n}\n\n/**\n * @internal\n * Save the format info of a table\n * @param table The table the info will be saved\n * @param format The format of the table\n */\nexport function saveTableInfo(table: HTMLTableElement, format: TableFormat) {\n if (table && format) {\n setMetadata(table, format, TableFormatMetadata);\n }\n}\n","import { BrowserInfo } from 'roosterjs-editor-types';\r\n\r\nconst isAndroidRegex = /android/i;\r\n\r\n/**\r\n * Get current browser information from user agent string\r\n * @param userAgent The userAgent string of a browser\r\n * @param appVersion The appVersion string of a browser\r\n * @param vendor The vendor string of a browser\r\n * @returns The BrowserInfo object calculated from the given userAgent and appVersion\r\n */\r\nexport function getBrowserInfo(\r\n userAgent: string,\r\n appVersion: string,\r\n vendor?: string\r\n): BrowserInfo {\r\n // checks whether the browser is running in IE\r\n // IE11 will use rv in UA instead of MSIE. Unfortunately Firefox also uses this. We should also look for \"Trident\" to confirm this.\r\n // There have been cases where companies using older version of IE and custom UserAgents have broken this logic (e.g. IE 10 and KellyServices)\r\n // therefore we should check that the Trident/rv combo is not just from an older IE browser\r\n let isIE11OrGreater = userAgent.indexOf('rv:') != -1 && userAgent.indexOf('Trident') != -1;\r\n let isIE = userAgent.indexOf('MSIE') != -1 || isIE11OrGreater;\r\n\r\n // IE11+ may also have 'Chrome', 'Firefox' and 'Safari' in user agent. But it will have 'trident' as well\r\n let isChrome = false;\r\n let isFirefox = false;\r\n let isSafari = false;\r\n let isEdge = false;\r\n let isWebKit = userAgent.indexOf('WebKit') != -1;\r\n let isMobileOrTablet = false;\r\n\r\n // Reference: http://detectmobilebrowsers.com/\r\n // The default regex on the website doesn't consider tablet.\r\n // To support tablet, add |android|ipad|playbook|silk to the first regex according to the info in /about page\r\n ((userAgentOrVendor: string) => {\r\n if (\r\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(\r\n userAgentOrVendor\r\n ) ||\r\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\r\n userAgentOrVendor.substr(0, 4)\r\n )\r\n ) {\r\n isMobileOrTablet = true;\r\n }\r\n })(userAgent || vendor || '');\r\n\r\n if (!isIE) {\r\n isChrome = userAgent.indexOf('Chrome') != -1;\r\n isFirefox = userAgent.indexOf('Firefox') != -1;\r\n if (userAgent.indexOf('Safari') != -1) {\r\n // Android and Chrome have Safari in the user string\r\n isSafari = userAgent.indexOf('Chrome') == -1 && userAgent.indexOf('Android') == -1;\r\n }\r\n\r\n // Sample Edge UA: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10121\r\n isEdge = userAgent.indexOf('Edge') != -1;\r\n\r\n // When it is edge, it should not be chrome or firefox. and it is also not webkit\r\n if (isEdge) {\r\n isWebKit = isChrome = isFirefox = false;\r\n }\r\n }\r\n\r\n let isMac = appVersion.indexOf('Mac') != -1;\r\n let isWin = appVersion.indexOf('Win') != -1 || appVersion.indexOf('NT') != -1;\r\n let isAndroid = isAndroidRegex.test(userAgent);\r\n\r\n return {\r\n isMac,\r\n isWin,\r\n isWebKit,\r\n isIE,\r\n isIE11OrGreater,\r\n isSafari,\r\n isChrome,\r\n isFirefox,\r\n isEdge,\r\n isIEOrEdge: isIE || isEdge,\r\n isAndroid,\r\n isMobileOrTablet,\r\n };\r\n}\r\n\r\n/**\r\n * Browser object contains browser and operating system information of current environment\r\n */\r\nexport const Browser =\r\n typeof window !== 'undefined' && window\r\n ? getBrowserInfo(\r\n window.navigator.userAgent,\r\n window.navigator.appVersion,\r\n window.navigator.vendor\r\n )\r\n : {};\r\n","import setColor from './setColor';\r\nimport { DarkColorHandler, DefaultFormat } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Apply format to an HTML element\r\n * @param element The HTML element to apply format to\r\n * @param format The format to apply\r\n * @param isDarkMode Whether the content should be formatted in dark mode\r\n * @param darkColorHandler An optional dark color handler object. When it is passed, we will use this handler to do variable-based dark color instead of original dataset base dark color\r\n */\r\nexport default function applyFormat(\r\n element: HTMLElement,\r\n format: DefaultFormat,\r\n isDarkMode?: boolean,\r\n darkColorHandler?: DarkColorHandler | null\r\n) {\r\n if (format) {\r\n let elementStyle = element.style;\r\n let {\r\n fontFamily,\r\n fontSize,\r\n textColor,\r\n textColors,\r\n backgroundColor,\r\n backgroundColors,\r\n bold,\r\n italic,\r\n underline,\r\n } = format;\r\n\r\n if (fontFamily) {\r\n elementStyle.fontFamily = fontFamily;\r\n }\r\n if (fontSize) {\r\n elementStyle.fontSize = fontSize;\r\n }\r\n\r\n if (textColors) {\r\n setColor(\r\n element,\r\n textColors,\r\n false /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n } else if (textColor) {\r\n setColor(\r\n element,\r\n textColor,\r\n false /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n }\r\n\r\n if (backgroundColors) {\r\n setColor(\r\n element,\r\n backgroundColors,\r\n true /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n } else if (backgroundColor) {\r\n setColor(\r\n element,\r\n backgroundColor,\r\n true /*isBackground*/,\r\n isDarkMode,\r\n false /*shouldAdaptFontColor*/,\r\n darkColorHandler\r\n );\r\n }\r\n\r\n if (bold) {\r\n elementStyle.fontWeight = 'bold';\r\n }\r\n if (italic) {\r\n elementStyle.fontStyle = 'italic';\r\n }\r\n if (underline) {\r\n elementStyle.textDecoration = 'underline';\r\n }\r\n }\r\n}\r\n","import getComputedStyles from './getComputedStyles';\r\nimport getTagOfNode from './getTagOfNode';\r\nimport moveChildNodes from './moveChildNodes';\r\n\r\n/**\r\n * Change tag of an HTML Element to a new one, and replace it from DOM tree\r\n * @param element The element to change tag\r\n * @param newTag New tag to change to\r\n * @returns The new element with new tag\r\n */\r\nexport default function changeElementTag(\r\n element: HTMLElement,\r\n newTag: K\r\n): HTMLElementTagNameMap[K];\r\n\r\n/**\r\n * Change tag of an HTML Element to a new one, and replace it from DOM tree\r\n * @param element The element to change tag\r\n * @param newTag New tag to change to\r\n * @returns The new element with new tag\r\n */\r\nexport default function changeElementTag(element: HTMLElement, newTag: string): HTMLElement | null;\r\n\r\nexport default function changeElementTag(element: HTMLElement, newTag: string): HTMLElement | null {\r\n if (!element || !newTag) {\r\n return null;\r\n }\r\n\r\n const origianlTag = getTagOfNode(element);\r\n\r\n if (origianlTag == newTag.toUpperCase()) {\r\n // Already in the target tag, no need to change\r\n return element;\r\n }\r\n\r\n let newElement = element.ownerDocument.createElement(newTag);\r\n\r\n for (let i = 0; i < element.attributes.length; i++) {\r\n let attr = element.attributes[i];\r\n newElement.setAttribute(attr.name, attr.value);\r\n }\r\n\r\n moveChildNodes(newElement, element);\r\n\r\n if (origianlTag == 'P' || getTagOfNode(newElement) == 'P') {\r\n [newElement.style.marginTop, newElement.style.marginBottom] = getComputedStyles(element, [\r\n 'margin-top',\r\n 'margin-bottom',\r\n ]);\r\n }\r\n\r\n if (element.parentNode) {\r\n element.parentNode.replaceChild(newElement, element);\r\n }\r\n\r\n return newElement;\r\n}\r\n","import contains from './contains';\r\nimport splitParentNode from './splitParentNode';\r\nimport toArray from '../jsUtils/toArray';\r\n\r\n/**\r\n * Collapse nodes within the given start and end nodes to their common ancestor node,\r\n * split parent nodes if necessary\r\n * @param root The root node of the scope\r\n * @param start The start node\r\n * @param end The end node\r\n * @param canSplitParent True to allow split parent node there are nodes before start or after end under the same parent\r\n * and the returned nodes will be all nodes from start through end after splitting\r\n * False to disallow split parent\r\n * @returns When canSplitParent is true, returns all node from start through end after splitting,\r\n * otherwise just return start and end\r\n */\r\nexport default function collapseNodes(\r\n root: Node,\r\n start: Node,\r\n end: Node,\r\n canSplitParent: boolean\r\n): Node[] {\r\n if (!contains(root, start) || !contains(root, end)) {\r\n return [];\r\n }\r\n\r\n start = collapse(root, start, end, true /*isStart*/, canSplitParent);\r\n end = collapse(root, end, start, false /*isStart*/, canSplitParent);\r\n\r\n if (contains(start, end, true /*treatSameNodeAsContain*/)) {\r\n return [start];\r\n } else if (contains(end, start)) {\r\n return [end];\r\n } else if (start.parentNode == end.parentNode) {\r\n let nodes: Node[] = start.parentNode ? toArray(start.parentNode?.childNodes) : [];\r\n let startIndex = nodes.indexOf(start);\r\n let endIndex = nodes.indexOf(end);\r\n return nodes.slice(startIndex, endIndex + 1);\r\n } else {\r\n return [start, end];\r\n }\r\n}\r\n\r\n/**\r\n * @internal\r\n * Collapse a node by traversing its parent nodes until we get the common ancestor node of node and ref node\r\n * @param root Root node, traversing will be limited under this scope\r\n * @param node The node to collapse\r\n * @param ref Ref node. The result will be the nearest common ancestor node of the given node and this ref node\r\n * @param isStart Whether the given node is start of the sequence of nodes to collapse\r\n * @param canSplitParent Whether splitting parent node is allowed\r\n * @returns The common ancestor node of the given node ref node\r\n */\r\nexport function collapse(\r\n root: Node,\r\n node: Node,\r\n ref: Node,\r\n isStart: boolean,\r\n canSplitParent: boolean\r\n): Node {\r\n while (node.parentNode != root && !contains(node.parentNode, ref)) {\r\n if ((isStart && node.previousSibling) || (!isStart && node.nextSibling)) {\r\n if (!canSplitParent) {\r\n break;\r\n }\r\n splitParentNode(node, isStart);\r\n }\r\n\r\n if (!node.parentNode) {\r\n break;\r\n }\r\n\r\n node = node.parentNode;\r\n }\r\n return node;\r\n}\r\n","import safeInstanceOf from './safeInstanceOf';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Test if a node contains another node\r\n * @param container The container node\r\n * @param contained The node to check if it is inside container\r\n * @param treatSameNodeAsContain When container and contained are the same node,\r\n * return true if this param is set to true, otherwise return false. Default value is false\r\n * @returns True if contained is inside container, or they are the same node when treatSameNodeAsContain is true.\r\n * Otherwise false.\r\n */\r\nexport default function contains(\r\n container: Node | null | undefined,\r\n contained: Node | null | undefined,\r\n treatSameNodeAsContain?: boolean\r\n): boolean;\r\n\r\n/**\r\n * Test if a node contains a given range\r\n * @param container The container node\r\n * @param contained The range to check if it is inside container\r\n * @returns True if contained is inside container, otherwise false\r\n */\r\nexport default function contains(\r\n container: Node | null | undefined,\r\n contained: Range | null | undefined\r\n): boolean;\r\n\r\nexport default function contains(\r\n container: Node | null | undefined,\r\n contained: Node | Range | null | undefined,\r\n treatSameNodeAsContain?: boolean\r\n): boolean {\r\n if (!container || !contained) {\r\n return false;\r\n }\r\n\r\n if (treatSameNodeAsContain && container == contained) {\r\n return true;\r\n }\r\n\r\n if (safeInstanceOf(contained, 'Range')) {\r\n contained = contained && contained.commonAncestorContainer;\r\n treatSameNodeAsContain = true;\r\n }\r\n\r\n if (contained && contained.nodeType == NodeType.Text) {\r\n contained = contained.parentNode;\r\n treatSameNodeAsContain = true;\r\n }\r\n\r\n if (container.nodeType != NodeType.Element && container.nodeType != NodeType.DocumentFragment) {\r\n return !!treatSameNodeAsContain && container == contained;\r\n }\r\n\r\n return (\r\n !!(treatSameNodeAsContain || container != contained) &&\r\n internalContains(container, contained)\r\n );\r\n}\r\n\r\nfunction internalContains(container: Node, contained: Node | null): boolean {\r\n if (container.contains) {\r\n return container.contains(contained);\r\n } else {\r\n while (contained) {\r\n if (contained == container) {\r\n return true;\r\n }\r\n\r\n contained = contained.parentNode;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","import getObjectKeys from '../jsUtils/getObjectKeys';\nimport safeInstanceOf from './safeInstanceOf';\nimport { Browser } from './Browser';\nimport { CreateElementData, KnownCreateElementDataIndex } from 'roosterjs-editor-types';\nimport type { CompatibleKnownCreateElementDataIndex } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * All known CreateElementData used by roosterjs to create elements\n */\nexport const KnownCreateElementData: Record = {\n [KnownCreateElementDataIndex.None]: { tag: '' },\n\n // Edge can sometimes lose current format when Enter to new line.\n // So here we add an extra SPAN for Edge to workaround this bug\n [KnownCreateElementDataIndex.EmptyLine]: Browser.isEdge\n ? { tag: 'div', children: [{ tag: 'span', children: [{ tag: 'br' }] }] }\n : { tag: 'div', children: [{ tag: 'br' }] },\n [KnownCreateElementDataIndex.BlockquoteWrapper]: {\n tag: 'blockquote',\n style: 'margin-top:0;margin-bottom:0',\n },\n [KnownCreateElementDataIndex.CopyPasteTempDiv]: {\n tag: 'div',\n style:\n 'width: 600px; height: 1px; overflow: hidden; position: fixed; top: 0; left; 0; -webkit-user-select: text',\n attributes: {\n contenteditable: 'true',\n },\n },\n [KnownCreateElementDataIndex.BlockListItem]: { tag: 'li', style: 'display:block' },\n [KnownCreateElementDataIndex.ContextMenuWrapper]: {\n tag: 'div',\n style: 'position: fixed; width: 0; height: 0',\n },\n [KnownCreateElementDataIndex.ImageEditWrapper]: {\n tag: 'span',\n style: 'max-width:100%;position:relative',\n children: [\n {\n tag: 'div',\n style: 'width:100%;height:100%;position:relative;overflow:hidden',\n },\n ],\n },\n [KnownCreateElementDataIndex.TableHorizontalResizer]: {\n tag: 'div',\n style: 'position: fixed; cursor: row-resize; user-select: none',\n },\n [KnownCreateElementDataIndex.TableVerticalResizer]: {\n tag: 'div',\n style: 'position: fixed; cursor: col-resize; user-select: none',\n },\n [KnownCreateElementDataIndex.TableResizerLTR]: {\n tag: 'div',\n style: 'position: fixed; cursor: nw-resize; user-select: none; border: 1px solid #808080',\n },\n [KnownCreateElementDataIndex.TableResizerRTL]: {\n tag: 'div',\n style: 'position: fixed; cursor: ne-resize; user-select: none; border: 1px solid #808080',\n },\n [KnownCreateElementDataIndex.TableSelector]: {\n tag: 'div',\n style: 'position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080',\n },\n [KnownCreateElementDataIndex.EmptyLineFormatInSpan]: {\n tag: 'div',\n children: [{ tag: 'span', children: [{ tag: 'br' }] }],\n },\n};\n\n/**\n * Create DOM element from the given CreateElementData\n * @param elementData The CreateElementData or an index of a known CreateElementData used for creating this element\n * @param document The document to create the element from\n * @returns The root DOM element just created\n */\nexport default function createElement(\n elementData:\n | CreateElementData\n | KnownCreateElementDataIndex\n | CompatibleKnownCreateElementDataIndex,\n document: Document\n): Element | null {\n if (typeof elementData == 'number') {\n elementData = KnownCreateElementData[elementData];\n }\n\n if (!elementData || !elementData.tag) {\n return null;\n }\n\n const { tag, namespace, className, style, dataset, attributes, children } = elementData;\n const result = namespace\n ? document.createElementNS(namespace, tag)\n : document.createElement(tag);\n\n if (style) {\n result.setAttribute('style', style);\n }\n\n if (className) {\n result.className = className;\n }\n\n if (dataset && safeInstanceOf(result, 'HTMLElement')) {\n getObjectKeys(dataset).forEach(datasetName => {\n result.dataset[datasetName] = dataset[datasetName];\n });\n }\n\n if (attributes) {\n getObjectKeys(attributes).forEach(attrName => {\n result.setAttribute(attrName, attributes[attrName]);\n });\n }\n\n if (children) {\n children.forEach(child => {\n if (typeof child === 'string') {\n result.appendChild(document.createTextNode(child));\n } else if (child) {\n const childElement = createElement(child, document);\n if (childElement) {\n result.appendChild(childElement);\n }\n }\n });\n }\n\n return result;\n}\n","import contains from './contains';\r\nimport matchesSelector from './matchesSelector';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Find closest element ancestor start from the given node which matches the given selector\r\n * @param node Find ancestor start from this node\r\n * @param root Root node where the search should stop at. The return value can never be this node\r\n * @param selector The expected selector. If null, return the first HTML Element found from start node\r\n * @returns An HTML element which matches the given selector. If the given start node matches the selector,\r\n * returns the given node\r\n */\r\nexport default function findClosestElementAncestor(\r\n node: Node | null,\r\n root?: Node,\r\n selector?: string\r\n): HTMLElement | null {\r\n node = !node ? null : node.nodeType == NodeType.Element ? node : node.parentNode;\r\n let element = node && node.nodeType == NodeType.Element ? node : null;\r\n\r\n if (element && selector) {\r\n if (element.closest) {\r\n element = element.closest(selector) as HTMLElement;\r\n } else {\r\n while (element && element != root && !matchesSelector(element, selector)) {\r\n element = element.parentElement;\r\n }\r\n }\r\n }\r\n\r\n return !root || contains(root, element) ? element : null;\r\n}\r\n","import toArray from '../jsUtils/toArray';\r\n\r\n/**\r\n * @deprecated\r\n * Creates an HTML node array from html\r\n * @param html the html string to create HTML elements from\r\n * @param ownerDocument Owner document of the result HTML elements\r\n * @returns An HTML node array to represent the given html string\r\n */\r\nexport default function fromHtml(html: string, ownerDocument: HTMLDocument): Node[] {\r\n let element = ownerDocument.createElement('DIV');\r\n element.innerHTML = html;\r\n\r\n return toArray(element.childNodes);\r\n}\r\n","import findClosestElementAncestor from './findClosestElementAncestor';\r\n\r\n/**\r\n * Get computed styles of a node\r\n * @param node The node to get computed styles from\r\n * @param styleNames Names of style to get, can be a single name or an array.\r\n * Default value is font-family, font-size, color, background-color\r\n * @returns An array of the computed styles\r\n */\r\nexport default function getComputedStyles(\r\n node: Node,\r\n styleNames: string | string[] = ['font-family', 'font-size', 'color', 'background-color']\r\n): string[] {\r\n let element = findClosestElementAncestor(node);\r\n let result: string[] = [];\r\n styleNames = Array.isArray(styleNames) ? styleNames : [styleNames];\r\n if (element) {\r\n let win = element.ownerDocument.defaultView || window;\r\n let styles = win.getComputedStyle(element);\r\n\r\n if (styles) {\r\n for (let style of styleNames) {\r\n let value = styles.getPropertyValue(style) || '';\r\n value = style != 'font-family' ? value.toLowerCase() : value;\r\n value = style == 'font-size' ? px2Pt(value) : value;\r\n result.push(value);\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * A shortcut for getComputedStyles() when only one style is to be retrieved\r\n * @param node The node to get style from\r\n * @param styleName The style name\r\n * @returns The style value\r\n */\r\nexport function getComputedStyle(node: Node, styleName: string): string {\r\n return getComputedStyles(node, styleName)[0] || '';\r\n}\r\n\r\nfunction px2Pt(px: string) {\r\n if (px && px.indexOf('px') == px.length - 2) {\r\n // Edge may not handle the floating computing well which causes the calculated value is a little less than actual value\r\n // So add 0.05 to fix it\r\n return Math.round(parseFloat(px) * 75 + 0.05) / 100 + 'pt';\r\n }\r\n return px;\r\n}\r\n","import safeInstanceOf from './safeInstanceOf';\n\n/**\n * Get innerHTML of the given node\n * @param node The DOM node to get innerHTML from\n */\nexport default function getInnerHTML(node: HTMLElement | DocumentFragment) {\n if (safeInstanceOf(node, 'HTMLElement')) {\n return node.innerHTML;\n } else if (node) {\n const tempNode = node.ownerDocument.createElement('span');\n tempNode.appendChild(node.cloneNode(true /*deep*/));\n return tempNode.innerHTML;\n } else {\n return '';\n }\n}\n","import normalizeRect from './normalizeRect';\nimport { Rect } from 'roosterjs-editor-types';\n\n/**\n * Get the intersected Rect of elements provided\n *\n * @example\n * The result of the following Elements Rects would be:\n {\n top: Element2.top,\n bottom: Element1.bottom,\n left: Element2.left,\n right: Element2.right\n }\n +-------------------------+\n | Element 1 |\n | +-----------------+ |\n | | Element2 | |\n | | | |\n | | | |\n +-------------------------+\n | |\n +-----------------+\n\n * @param elements Elements to use.\n * @param additionalRects additional rects to use\n * @returns If the Rect is valid return the rect, if not, return null.\n */\nexport default function getIntersectedRect(\n elements: HTMLElement[],\n additionalRects: Rect[] = []\n): Rect | null {\n const rects = elements\n .map(element => normalizeRect(element.getBoundingClientRect()))\n .concat(additionalRects)\n .filter(element => !!element) as Rect[];\n\n const result: Rect = {\n top: Math.max(...rects.map(r => r.top)),\n bottom: Math.min(...rects.map(r => r.bottom)),\n left: Math.max(...rects.map(r => r.left)),\n right: Math.min(...rects.map(r => r.right)),\n };\n\n return result.top < result.bottom && result.left < result.right ? result : null;\n}\n","import shouldSkipNode from './shouldSkipNode';\r\nimport { getLeafSibling } from './getLeafSibling';\r\n\r\n/**\r\n * Get first/last leaf node of the given root node.\r\n * @param rootNode Root node to get leaf node from\r\n * @param isFirst True to get first leaf node, false to get last leaf node\r\n */\r\nfunction getLeafNode(rootNode: Node, isFirst: boolean): Node | null {\r\n let getChild = (node: Node): Node | null => (isFirst ? node.firstChild : node.lastChild);\r\n let result = getChild(rootNode);\r\n while (result && getChild(result)) {\r\n result = getChild(result);\r\n }\r\n\r\n if (result && shouldSkipNode(result)) {\r\n result = getLeafSibling(rootNode, result, isFirst);\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Get the first meaningful leaf node\r\n * @param rootNode Root node to get leaf node from\r\n */\r\nexport function getFirstLeafNode(rootNode: Node): Node | null {\r\n return getLeafNode(rootNode, true /*isFirst*/);\r\n}\r\n\r\n/**\r\n * Get the last meaningful leaf node\r\n * @param rootNode Root node to get leaf node from\r\n */\r\nexport function getLastLeafNode(rootNode: Node): Node | null {\r\n return getLeafNode(rootNode, false /*isFirst*/);\r\n}\r\n","import contains from './contains';\r\nimport getTagOfNode from './getTagOfNode';\r\nimport shouldSkipNode from './shouldSkipNode';\r\n\r\n/**\r\n * @internal\r\n * This walks forwards/backwards DOM tree to get next meaningful node\r\n * @param rootNode Root node to scope the leaf sibling node\r\n * @param startNode current node to get sibling node from\r\n * @param isNext True to get next leaf sibling node, false to get previous leaf sibling node\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n * @param ignoreSpace (Optional) Ignore pure space text node when check if the node should be skipped\r\n */\r\nexport function getLeafSibling(\r\n rootNode: Node,\r\n startNode: Node,\r\n isNext: boolean,\r\n skipTags?: string[],\r\n ignoreSpace?: boolean\r\n): Node | null {\r\n let result = null;\r\n let getSibling = isNext\r\n ? (node: Node | null) => node?.nextSibling || null\r\n : (node: Node | null) => node?.previousSibling || null;\r\n let getChild = isNext ? (node: Node) => node.firstChild : (node: Node) => node.lastChild;\r\n if (contains(rootNode, startNode)) {\r\n let curNode: Node | null = startNode;\r\n let shouldContinue: boolean = true;\r\n\r\n while (shouldContinue) {\r\n // Find next/previous node, starting from next/previous sibling, then one level up to find next/previous sibling from parent\r\n // till a non-null nextSibling/previousSibling is found or the ceiling is encountered (rootNode)\r\n let parentNode = curNode?.parentNode || null;\r\n curNode = getSibling(curNode);\r\n while (!curNode && parentNode != rootNode) {\r\n curNode = getSibling(parentNode);\r\n parentNode = parentNode?.parentNode || null;\r\n }\r\n\r\n // Now traverse down to get first/last child\r\n while (\r\n curNode &&\r\n (!skipTags || skipTags.indexOf(getTagOfNode(curNode)) < 0) &&\r\n getChild(curNode)\r\n ) {\r\n curNode = getChild(curNode);\r\n }\r\n\r\n // Check special nodes (i.e. node that has a display:none etc.) and continue looping if so\r\n shouldContinue = !!curNode && shouldSkipNode(curNode, ignoreSpace);\r\n if (!shouldContinue) {\r\n // Found a good leaf node, assign and exit\r\n result = curNode;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * This walks forwards DOM tree to get next meaningful node\r\n * @param rootNode Root node to scope the leaf sibling node\r\n * @param startNode current node to get sibling node from\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\nexport function getNextLeafSibling(\r\n rootNode: Node,\r\n startNode: Node,\r\n skipTags?: string[]\r\n): Node | null {\r\n return getLeafSibling(rootNode, startNode, true /*isNext*/, skipTags);\r\n}\r\n\r\n/**\r\n * This walks backwards DOM tree to get next meaningful node\r\n * @param rootNode Root node to scope the leaf sibling node\r\n * @param startNode current node to get sibling node from\r\n * @param skipTags (Optional) tags that child elements will be skipped\r\n */\r\nexport function getPreviousLeafSibling(\r\n rootNode: Node,\r\n startNode: Node,\r\n skipTags?: string[]\r\n): Node | null {\r\n return getLeafSibling(rootNode, startNode, false /*isNext*/, skipTags);\r\n}\r\n","import getObjectKeys from '../jsUtils/getObjectKeys';\r\nimport { DocumentCommand, PendableFormatState } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Names of Pendable formats\r\n */\r\nexport type PendableFormatNames = keyof PendableFormatState;\r\n\r\n/**\r\n * A map from pendable format name to document command\r\n */\r\nexport const PendableFormatCommandMap: { [key in PendableFormatNames]: DocumentCommand } = {\r\n /**\r\n * Bold\r\n */\r\n isBold: DocumentCommand.Bold,\r\n\r\n /**\r\n * Italic\r\n */\r\n isItalic: DocumentCommand.Italic,\r\n\r\n /**\r\n * Underline\r\n */\r\n isUnderline: DocumentCommand.Underline,\r\n\r\n /**\r\n * StrikeThrough\r\n */\r\n isStrikeThrough: DocumentCommand.StrikeThrough,\r\n\r\n /**\r\n * Subscript\r\n */\r\n isSubscript: DocumentCommand.Subscript,\r\n\r\n /**\r\n * Superscript\r\n */\r\n isSuperscript: DocumentCommand.Superscript,\r\n};\r\n\r\n/**\r\n * Get Pendable Format State at cursor.\r\n * @param document The HTML Document to get format state from\r\n * @returns A PendableFormatState object which contains the values of pendable format states\r\n */\r\nexport default function getPendableFormatState(document: Document): PendableFormatState {\r\n let keys = getObjectKeys(PendableFormatCommandMap);\r\n\r\n return keys.reduce((state, key) => {\r\n state[key] = document.queryCommandState(PendableFormatCommandMap[key]);\r\n return state;\r\n }, {});\r\n}\r\n","import { NodeType } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Get the html tag of a node, or empty if it is not an element\r\n * @param node The node to get tag of\r\n * @returns Tag name in upper case if the given node is an Element, or empty string otherwise\r\n */\r\nexport default function getTagOfNode(node: Node | null): string {\r\n return node && node.nodeType == NodeType.Element ? (node).tagName.toUpperCase() : '';\r\n}\r\n","import getTagOfNode from './getTagOfNode';\r\n\r\nconst BLOCK_ELEMENT_TAGS = 'ADDRESS,ARTICLE,ASIDE,BLOCKQUOTE,CANVAS,DD,DIV,DL,DT,FIELDSET,FIGCAPTION,FIGURE,FOOTER,FORM,H1,H2,H3,H4,H5,H6,HEADER,HR,LI,MAIN,NAV,NOSCRIPT,OL,OUTPUT,P,PRE,SECTION,TABLE,TD,TH,TFOOT,UL,VIDEO'.split(\r\n ','\r\n);\r\nconst BLOCK_DISPLAY_STYLES = ['block', 'list-item', 'table-cell'];\r\n\r\n/**\r\n * Checks if the node is a block like element. Block like element are usually those P, DIV, LI, TD etc.\r\n * @param node The node to check\r\n * @returns True if the node is a block element, otherwise false\r\n */\r\nexport default function isBlockElement(node: Node): node is HTMLElement {\r\n let tag = getTagOfNode(node);\r\n return !!(\r\n tag &&\r\n (BLOCK_DISPLAY_STYLES.indexOf((node).style.display) >= 0 ||\r\n BLOCK_ELEMENT_TAGS.indexOf(tag) >= 0)\r\n );\r\n}\r\n","import { DocumentPosition } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * Checks if node1 is after node2\r\n * @param node1 The node to check if it is after another node\r\n * @param node2 The node to check if another node is after this one\r\n * @returns True if node1 is after node2, otherwise false\r\n */\r\nexport default function isNodeAfter(node1: Node, node2: Node): boolean {\r\n return !!(\r\n node1 &&\r\n node2 &&\r\n (node2.compareDocumentPosition(node1) & DocumentPosition.Following) ==\r\n DocumentPosition.Following\r\n );\r\n}\r\n","import getTagOfNode from './getTagOfNode';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\nconst VISIBLE_ELEMENT_TAGS = ['IMG'];\r\nconst VISIBLE_CHILD_ELEMENT_SELECTOR = ['TABLE', 'IMG', 'LI'].join(',');\r\nconst ZERO_WIDTH_SPACE = /\\u200b/g;\r\n\r\n/**\r\n * Check if a given node has no visible content\r\n * @param node The node to check\r\n * @param trimContent Whether trim the text content so that spaces will be treated as empty.\r\n * Default value is false\r\n * @returns True if there isn't any visible element inside node, otherwise false\r\n */\r\nexport default function isNodeEmpty(\r\n node: Node,\r\n trimContent?: boolean,\r\n shouldCountBrAsVisible?: boolean\r\n) {\r\n if (!node) {\r\n return false;\r\n } else if (node.nodeType == NodeType.Text) {\r\n return trim(node.nodeValue || '', trimContent) == '';\r\n } else if (node.nodeType == NodeType.Element) {\r\n let element = node as Element;\r\n let textContent = trim(element.textContent || '', trimContent);\r\n const visibleSelector = shouldCountBrAsVisible\r\n ? `${VISIBLE_CHILD_ELEMENT_SELECTOR},BR`\r\n : VISIBLE_CHILD_ELEMENT_SELECTOR;\r\n if (\r\n textContent != '' ||\r\n VISIBLE_ELEMENT_TAGS.indexOf(getTagOfNode(element)) >= 0 ||\r\n element.querySelectorAll(visibleSelector)[0]\r\n ) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\nfunction trim(s: string, trim: boolean | undefined) {\r\n s = s.replace(ZERO_WIDTH_SPACE, '');\r\n return trim ? s.trim() : s;\r\n}\r\n","import getTagOfNode from './getTagOfNode';\r\n\r\n/**\r\n * HTML void elements\r\n * Per https://www.w3.org/TR/html/syntax.html#syntax-elements, cannot have child nodes\r\n * This regex is used when we move focus to very begin of editor. We should avoid putting focus inside\r\n * void elements so users don't accidentally create child nodes in them\r\n */\r\nconst HTML_VOID_ELEMENTS = 'AREA,BASE,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,KEYGEN,LINK,META,PARAM,SOURCE,TRACK,WBR'.split(\r\n ','\r\n);\r\n\r\n/**\r\n * Check if the given node is html void element. Void element cannot have children\r\n * @param node The node to check\r\n */\r\nexport default function isVoidHtmlElement(node: Node): boolean {\r\n return !!node && HTML_VOID_ELEMENTS.indexOf(getTagOfNode(node)) >= 0;\r\n}\r\n","import getObjectKeys from '../jsUtils/getObjectKeys';\r\nimport { LinkData } from 'roosterjs-editor-types';\r\n\r\ninterface LinkMatchRule {\r\n match: RegExp;\r\n except?: RegExp;\r\n normalizeUrl?: (url: string) => string;\r\n}\r\n\r\n// http exclude matching regex\r\n// invalid URL example (in particular on IE and Edge):\r\n// - http://www.bing.com%00, %00 before ? (question mark) is considered invalid. IE/Edge throws invalid argument exception\r\n// - http://www.bing.com%1, %1 is invalid\r\n// - http://www.bing.com%g, %g is invalid (IE and Edge expects a two hex value after a %)\r\n// - http://www.bing.com%, % as ending is invalid (IE and Edge expects a two hex value after a %)\r\n// All above % cases if they're after ? (question mark) is then considered valid again\r\n// Similar for @, it needs to be after / (forward slash), or ? (question mark). Otherwise IE/Edge will throw security exception\r\n// - http://www.bing.com@name, @name before ? (question mark) is considered invalid\r\n// - http://www.bing.com/@name, is valid sine it is after / (forward slash)\r\n// - http://www.bing.com?@name, is also valid since it is after ? (question mark)\r\n// The regex below is essentially a break down of:\r\n// ^[^?]+%[^0-9a-f]+ => to exclude URL like www.bing.com%%\r\n// ^[^?]+%[0-9a-f][^0-9a-f]+ => to exclude URL like www.bing.com%1\r\n// ^[^?]+%00 => to exclude URL like www.bing.com%00\r\n// ^[^?]+%$ => to exclude URL like www.bing.com%\r\n// ^https?:\\/\\/[^?\\/]+@ => to exclude URL like http://www.bing.com@name\r\n// ^www\\.[^?\\/]+@ => to exclude URL like www.bing.com@name\r\n// , => to exclude url like www.bing,,com\r\nconst httpExcludeRegEx = /^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\\/\\/[^?\\/]+@|^www\\.[^?\\/]+@/i;\r\n\r\n// via https://tools.ietf.org/html/rfc1035 Page 7\r\nconst labelRegEx = '[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'; // We're using case insensitive regexps below so don't bother including A-Z\r\nconst domainNameRegEx = `(?:${labelRegEx}\\\\.)*${labelRegEx}`;\r\nconst domainPortRegEx = `${domainNameRegEx}(?:\\\\:[0-9]+)?`;\r\nconst domainPortWithUrlRegEx = `${domainPortRegEx}(?:[\\\\/\\\\?]\\\\S*)?`;\r\n\r\nconst linkMatchRules: Record = {\r\n http: {\r\n match: new RegExp(\r\n `^(?:microsoft-edge:)?http:\\\\/\\\\/${domainPortWithUrlRegEx}|www\\\\.${domainPortWithUrlRegEx}`,\r\n 'i'\r\n ),\r\n except: httpExcludeRegEx,\r\n normalizeUrl: url =>\r\n new RegExp('^(?:microsoft-edge:)?http:\\\\/\\\\/', 'i').test(url) ? url : 'http://' + url,\r\n },\r\n https: {\r\n match: new RegExp(`^(?:microsoft-edge:)?https:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i'),\r\n except: httpExcludeRegEx,\r\n },\r\n mailto: { match: new RegExp('^mailto:\\\\S+@\\\\S+\\\\.\\\\S+', 'i') },\r\n notes: { match: new RegExp('^notes:\\\\/\\\\/\\\\S+', 'i') },\r\n file: { match: new RegExp('^file:\\\\/\\\\/\\\\/?\\\\S+', 'i') },\r\n unc: { match: new RegExp('^\\\\\\\\\\\\\\\\\\\\S+', 'i') },\r\n ftp: {\r\n match: new RegExp(\r\n `^ftp:\\\\/\\\\/${domainPortWithUrlRegEx}|ftp\\\\.${domainPortWithUrlRegEx}`,\r\n 'i'\r\n ),\r\n normalizeUrl: url => (new RegExp('^ftp:\\\\/\\\\/', 'i').test(url) ? url : 'ftp://' + url),\r\n },\r\n news: { match: new RegExp(`^news:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n telnet: { match: new RegExp(`^telnet:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n gopher: { match: new RegExp(`^gopher:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i') },\r\n wais: { match: new RegExp(`^wais:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n};\r\n\r\n/**\r\n * Try to match a given string with link match rules, return matched link\r\n * @param url Input url to match\r\n * @param option Link match option, exact or partial. If it is exact match, we need\r\n * to check the length of matched link and url\r\n * @param rules Optional link match rules, if not passed, only the default link match\r\n * rules will be applied\r\n * @returns The matched link data, or null if no match found.\r\n * The link data includes an original url and a normalized url\r\n */\r\nexport default function matchLink(url: string): LinkData | null {\r\n if (url) {\r\n for (let schema of getObjectKeys(linkMatchRules)) {\r\n let rule = linkMatchRules[schema];\r\n let matches = url.match(rule.match);\r\n if (matches && matches[0] == url && (!rule.except || !rule.except.test(url))) {\r\n return {\r\n scheme: schema,\r\n originalUrl: url,\r\n normalizedUrl: rule.normalizeUrl ? rule.normalizeUrl(url) : url,\r\n };\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n","import safeInstanceOf from './safeInstanceOf';\n\n/**\n * Type definition of HTMLElement interface for IE\n */\ninterface HTMLElementForIE extends HTMLElement {\n /**\n * IE implementation of Element.matches() function\n *\n */\n msMatchesSelector: (selector: string) => boolean;\n}\n\n/**\n * A wrapper function of Element.matches\n * @param element The element to match\n * @param selector The selector to match\n */\nexport default function matchesSelector(element: Node, selector: string): boolean {\n return (\n safeInstanceOf(element, 'HTMLElement') &&\n (element.matches || (element).msMatchesSelector).call(element, selector)\n );\n}\n","/**\n * Replace all child nodes of the given target node to the child nodes of source node.\n * @param target Target node, all child nodes of this node will be removed if keepExistingChildren is not set to true\n * @param source (Optional) source node, all child nodes of this node will be move to target node\n * @param keepExistingChildren (Optional) When set to true, all existing child nodes of target will be kept\n */\nexport default function moveChildNodes(\n target: Node,\n source?: Node,\n keepExistingChildren?: boolean\n) {\n if (!target) {\n return;\n }\n\n while (!keepExistingChildren && target.firstChild) {\n target.removeChild(target.firstChild);\n }\n\n while (source?.firstChild) {\n target.appendChild(source.firstChild);\n }\n}\n","import { Rect } from 'roosterjs-editor-types';\r\n\r\n/**\r\n * A ClientRect of all 0 is possible. i.e. chrome returns a ClientRect of 0 when the cursor is on an empty p\r\n * We validate that and only return a rect when the passed in ClientRect is valid\r\n */\r\nexport default function normalizeRect(clientRect: DOMRect): Rect | null {\r\n let { left, right, top, bottom } =\r\n clientRect || { left: 0, right: 0, top: 0, bottom: 0 };\r\n return left === 0 && right === 0 && top === 0 && bottom === 0\r\n ? null\r\n : {\r\n left: Math.round(left),\r\n right: Math.round(right),\r\n top: Math.round(top),\r\n bottom: Math.round(bottom),\r\n };\r\n}\r\n","const HEX3_REGEX = /^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/;\nconst HEX6_REGEX = /^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/;\nconst RGB_REGEX = /^rgb\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*\\)$/;\nconst RGBA_REGEX = /^rgba\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*\\)$/;\n\n/**\n * Parse color string to r/g/b value.\n * If the given color is not in a recognized format, return null\n */\nexport default function parseColor(color: string): [number, number, number] | null {\n color = (color || '').trim();\n\n let match: RegExpMatchArray | null;\n if ((match = color.match(HEX3_REGEX))) {\n return [\n parseInt(match[1] + match[1], 16),\n parseInt(match[2] + match[2], 16),\n parseInt(match[3] + match[3], 16),\n ];\n } else if ((match = color.match(HEX6_REGEX))) {\n return [parseInt(match[1], 16), parseInt(match[2], 16), parseInt(match[3], 16)];\n } else if ((match = color.match(RGB_REGEX) || color.match(RGBA_REGEX))) {\n return [parseInt(match[1]), parseInt(match[2]), parseInt(match[3])];\n } else {\n // CSS color names such as red, green is not included for now.\n // If need, we can add those colors from https://www.w3.org/wiki/CSS/Properties/color/keywords\n return null;\n }\n}\n","import toArray from '../jsUtils/toArray';\r\nimport { DocumentPosition, NodeType, QueryScope } from 'roosterjs-editor-types';\r\nimport type { CompatibleQueryScope } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Query HTML elements in the container by a selector string\r\n * @param container Container element to query from\r\n * @param selector Selector string to query\r\n * @param forEachCallback An optional callback to be invoked on each node in query result\r\n * @param scope The scope of the query, default value is QueryScope.Body\r\n * @param range The selection range to query with. This is required when scope is not Body\r\n * @returns HTML Element array of the query result\r\n */\r\nexport default function queryElements(\r\n container: ParentNode,\r\n selector: string,\r\n forEachCallback?: ((node: HTMLElement) => any) | null,\r\n scope: QueryScope | CompatibleQueryScope = QueryScope.Body,\r\n range?: Range\r\n): HTMLElement[] {\r\n if (!container || !selector) {\r\n return [];\r\n }\r\n\r\n let elements = toArray(container.querySelectorAll(selector));\r\n\r\n if (scope != QueryScope.Body && range) {\r\n let { startContainer, startOffset, endContainer, endOffset } = range;\r\n if (startContainer.nodeType == NodeType.Element && startContainer.firstChild) {\r\n const child = startContainer.childNodes[startOffset];\r\n\r\n // range.startOffset can give a value of child.length+1 when selection is after the last child\r\n // In that case we will use the last child instead\r\n startContainer = child || startContainer.lastChild;\r\n }\r\n\r\n endContainer =\r\n endContainer.nodeType == NodeType.Element && endContainer.firstChild && endOffset > 0\r\n ? endContainer.childNodes[endOffset - 1]\r\n : endContainer;\r\n\r\n elements = elements.filter(element =>\r\n isIntersectWithNodeRange(\r\n element,\r\n startContainer,\r\n endContainer,\r\n scope == QueryScope.InSelection\r\n )\r\n );\r\n }\r\n\r\n if (forEachCallback) {\r\n elements.forEach(forEachCallback);\r\n }\r\n return elements;\r\n}\r\n\r\nfunction isIntersectWithNodeRange(\r\n node: Node,\r\n startNode: Node,\r\n endNode: Node,\r\n nodeContainedByRangeOnly: boolean\r\n): boolean {\r\n let startPosition = node.compareDocumentPosition(startNode);\r\n let endPosition = node.compareDocumentPosition(endNode);\r\n let targetPositions = [DocumentPosition.Same, DocumentPosition.Contains];\r\n\r\n if (!nodeContainedByRangeOnly) {\r\n targetPositions.push(DocumentPosition.ContainedBy);\r\n }\r\n\r\n return (\r\n checkPosition(startPosition, targetPositions) || // intersectStart\r\n checkPosition(endPosition, targetPositions) || // intersectEnd\r\n (checkPosition(startPosition, [DocumentPosition.Preceding]) && // Contains\r\n checkPosition(endPosition, [DocumentPosition.Following]) &&\r\n !checkPosition(endPosition, [DocumentPosition.ContainedBy]))\r\n );\r\n}\r\n\r\nfunction checkPosition(position: DocumentPosition, targets: DocumentPosition[]): boolean {\r\n return targets.some(target =>\r\n target == DocumentPosition.Same\r\n ? position == DocumentPosition.Same\r\n : (position & target) == target\r\n );\r\n}\r\n","/**\n * Read a file object and invoke a callback function with the data url of this file\n * @param file The file to read\n * @param callback the callback to invoke with data url of the file.\n * If fail to read, dataUrl will be null\n */\nexport default function readFile(file: File, callback: (dataUrl: string | null) => void) {\n if (file) {\n const reader = new FileReader();\n reader.onload = () => {\n callback(reader.result as string);\n };\n reader.onerror = () => {\n callback(null);\n };\n reader.readAsDataURL(file);\n }\n}\n","import { TargetWindow } from 'roosterjs-editor-types';\n\n// NOTE: Type TargetWindow is an auto-generated type.\n// Run node ./tools/generateTargetWindow.js to generate it.\n\n/**\n * @internal Export for test only\n * Try get window from the given node or range\n * @param node Source node to get window from\n */\nexport function getTargetWindow(node: Node): T {\n const document =\n node &&\n (node.ownerDocument ||\n (Object.prototype.toString.apply(node) == '[object HTMLDocument]'\n ? node\n : null));\n\n // If document exists but document.defaultView doesn't exist, it is a detached object, just use current window instead\n const targetWindow = document && ((document.defaultView || window) as any);\n return targetWindow as T;\n}\n\n/**\n * Check if the given object is instance of the target type\n * @param obj Object to check\n * @param typeName Target type name\n */\nexport default function safeInstanceOf(\n obj: any,\n typeName: T\n): obj is W[T] {\n if (typeName == 'Range') {\n return (\n Object.prototype.toString.apply(obj) == '[object Range]' &&\n !!(obj)?.commonAncestorContainer\n );\n }\n\n const targetWindow = getTargetWindow(obj);\n const targetType = targetWindow && (targetWindow[typeName] as any);\n const mainWindow = (window as any) as W;\n const mainWindowType = mainWindow && (mainWindow[typeName] as any);\n return (\n (mainWindowType && obj instanceof mainWindowType) ||\n (targetType && obj instanceof targetType)\n );\n}\n","import parseColor from './parseColor';\nimport { DarkColorHandler, ModeIndependentColor } from 'roosterjs-editor-types';\n\nconst WHITE = '#ffffff';\nconst GRAY = '#333333';\nconst BLACK = '#000000';\nconst TRANSPARENT = 'transparent';\nconst enum ColorTones {\n BRIGHT,\n DARK,\n NONE,\n}\n\n//Using the HSL (hue, saturation and lightness) representation for RGB color values, if the value of the lightness is less than 20, the color is dark\nconst DARK_COLORS_LIGHTNESS = 20;\n//If the value of the lightness is more than 80, the color is bright\nconst BRIGHT_COLORS_LIGHTNESS = 80;\n\n/**\n * Set text color or background color to the given element\n * @param element The element to set color to\n * @param color The color to set, it can be a string of color name/value or a ModeIndependentColor object\n * @param isBackgroundColor Whether set background color or text color\n * @param isDarkMode Whether current mode is dark mode. @default false\n * @param shouldAdaptTheFontColor Whether the font color needs to be adapted to be visible in a dark or bright background color. @default false\n * @param darkColorHandler A dark color handler object. This is now required.\n * We keep it optional only for backward compatibility. If it is not passed, color will not be set.\n */\nexport default function setColor(\n element: HTMLElement,\n color: string | ModeIndependentColor,\n isBackgroundColor: boolean,\n isDarkMode?: boolean,\n shouldAdaptTheFontColor?: boolean,\n darkColorHandler?: DarkColorHandler | null\n) {\n const colorString = typeof color === 'string' ? color.trim() : '';\n const modeIndependentColor = typeof color === 'string' ? null : color;\n const cssName = isBackgroundColor ? 'background-color' : 'color';\n\n if (colorString || modeIndependentColor) {\n if (darkColorHandler) {\n const colorValue = darkColorHandler.registerColor(\n modeIndependentColor?.lightModeColor || colorString,\n !!isDarkMode,\n modeIndependentColor?.darkModeColor\n );\n\n element.style.setProperty(cssName, colorValue);\n }\n\n if (isBackgroundColor && shouldAdaptTheFontColor) {\n adaptFontColorToBackgroundColor(\n element,\n modeIndependentColor?.lightModeColor || colorString,\n isDarkMode,\n darkColorHandler\n );\n }\n }\n}\n\n/**\n * Change the font color to white or some other color, so the text can be visible with a darker background\n * @param element The element that contains text.\n * @param lightModeBackgroundColor Existing background color in light mode\n * @param isDarkMode Whether the content is in dark mode\n * @param darkColorHandler A dark color handler object. This is now required.\n * We keep it optional only for backward compatibility. If it is not passed, color will not be set.\n */\nfunction adaptFontColorToBackgroundColor(\n element: HTMLElement,\n lightModeBackgroundColor: string,\n isDarkMode?: boolean,\n darkColorHandler?: DarkColorHandler | null\n) {\n if (!lightModeBackgroundColor || lightModeBackgroundColor === TRANSPARENT) {\n return;\n }\n\n const isADarkOrBrightOrNone = isADarkOrBrightColor(lightModeBackgroundColor!);\n\n switch (isADarkOrBrightOrNone) {\n case ColorTones.DARK:\n const fontForDark: ModeIndependentColor = {\n lightModeColor: WHITE,\n darkModeColor: GRAY,\n };\n setColor(\n element,\n fontForDark,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n break;\n case ColorTones.BRIGHT:\n const fontForLight: ModeIndependentColor = {\n lightModeColor: BLACK,\n darkModeColor: WHITE,\n };\n setColor(\n element,\n fontForLight,\n false /*isBackground*/,\n isDarkMode,\n false /*shouldAdaptFontColor*/,\n darkColorHandler\n );\n break;\n }\n}\n\nfunction isADarkOrBrightColor(color: string): ColorTones {\n let lightness = calculateLightness(color);\n if (lightness < DARK_COLORS_LIGHTNESS) {\n return ColorTones.DARK;\n } else if (lightness > BRIGHT_COLORS_LIGHTNESS) {\n return ColorTones.BRIGHT;\n }\n\n return ColorTones.NONE;\n}\n\n/**\n * Calculate the lightness of HSL (hue, saturation and lightness) representation\n * @param color a RBG or RGBA COLOR\n * @returns\n */\nfunction calculateLightness(color: string) {\n const colorValues = parseColor(color);\n\n // Use the values of r,g,b to calculate the lightness in the HSl representation\n //First calculate the fraction of the light in each color, since in css the value of r,g,b is in the interval of [0,255], we have\n if (colorValues) {\n const red = colorValues[0] / 255;\n const green = colorValues[1] / 255;\n const blue = colorValues[2] / 255;\n\n //Then the lightness in the HSL representation is the average between maximum fraction of r,g,b and the minimum fraction\n return (Math.max(red, green, blue) + Math.min(red, green, blue)) * 50;\n } else {\n return 255;\n }\n}\n","import getTagOfNode from './getTagOfNode';\r\nimport { getComputedStyle } from './getComputedStyles';\r\nimport { NodeType } from 'roosterjs-editor-types';\r\n\r\nconst CRLF = /^[\\r\\n]+$/g;\r\nconst CRLF_SPACE = /[\\t\\r\\n\\u0020\\u200B]/gm; // We should only find new line, real space or ZeroWidthSpace (TAB, %20, but not  )\r\n\r\n/**\r\n * @internal\r\n * Skip a node when any of following conditions are true\r\n * - it is neither Element nor Text\r\n * - it is a text node but is empty\r\n * - it is a text node but contains just CRLF (noisy text node that often comes in-between elements)\r\n * - has a display:none\r\n * - it is just
                \r\n * @param node The node to check\r\n * @param ignoreSpace (Optional) True to ignore pure space text node of the node when check.\r\n * If the value of a node value is only space, set this to true will treat this node can be skipped.\r\n * Default value is false\r\n */\r\nexport default function shouldSkipNode(node: Node, ignoreSpace?: boolean): boolean {\r\n if (node.nodeType == NodeType.Text) {\r\n if (!node.nodeValue || node.textContent == '' || CRLF.test(node.nodeValue)) {\r\n return true;\r\n } else if (ignoreSpace && node.nodeValue.replace(CRLF_SPACE, '') == '') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } else if (node.nodeType == NodeType.Element) {\r\n if (getComputedStyle(node, 'display') == 'none') {\r\n return true;\r\n }\r\n\r\n const tag = getTagOfNode(node);\r\n\r\n if (tag == 'DIV' || tag == 'SPAN') {\r\n // Empty SPAN/DIV or SPAN/DIV with only meaningless children is meaningless,\r\n // because it can render nothing. If we keep them here, there may be unexpected\r\n // LI elements added for those meaningless nodes.\r\n for (let child = node.firstChild; !!child; child = child.nextSibling) {\r\n if (!shouldSkipNode(child, ignoreSpace)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n } else {\r\n // There may still be other cases that the node is not meaningful.\r\n // We can add those cases here once we hit them.\r\n return false;\r\n }\r\n } else {\r\n return true;\r\n }\r\n}\r\n","import isNodeAfter from './isNodeAfter';\r\n\r\n/**\r\n * Split parent node of the given node before/after the given node.\r\n * When a parent node contains [A,B,C] and pass B as the given node,\r\n * If split before, the new nodes will be [A][B,C] and returns [A];\r\n * otherwise, it will be [A,B][C] and returns [C].\r\n * @param node The node to split before/after\r\n * @param splitBefore Whether split before or after\r\n * @param removeEmptyNewNode If the new node is empty (even then only child is space or ZER_WIDTH_SPACE),\r\n * we remove it. @default false\r\n * @returns The new parent node\r\n */\r\nexport default function splitParentNode(node: Node, splitBefore: boolean): Node | null {\r\n if (!node || !node.parentNode) {\r\n return null;\r\n }\r\n\r\n let parentNode = node.parentNode;\r\n let newParent: HTMLElement | null = parentNode.cloneNode(false /*deep*/) as HTMLElement;\r\n newParent.removeAttribute('id');\r\n if (splitBefore) {\r\n while (parentNode.firstChild && parentNode.firstChild != node) {\r\n newParent.appendChild(parentNode.firstChild);\r\n }\r\n } else {\r\n while (node.nextSibling) {\r\n newParent.appendChild(node.nextSibling);\r\n }\r\n }\r\n\r\n // When the only child of new parent is ZERO_WIDTH_SPACE, we can still prevent keeping it by set removeEmptyNewNode to true\r\n if (newParent.firstChild && newParent.innerHTML != '') {\r\n parentNode.parentNode?.insertBefore(\r\n newParent,\r\n splitBefore ? parentNode : parentNode.nextSibling\r\n );\r\n } else {\r\n newParent = null;\r\n }\r\n\r\n return newParent;\r\n}\r\n\r\n/**\r\n * Split parent node by a balanced node range\r\n * @param nodes The nodes to split from. If only one node is passed, split it from all its siblings.\r\n * If two or nodes are passed, will split before the first one and after the last one, all other nodes will be ignored\r\n * @returns The parent node of the given node range if the given nodes are balanced, otherwise null\r\n */\r\nexport function splitBalancedNodeRange(nodes: Node | Node[]): Node | null {\r\n let start = Array.isArray(nodes) ? nodes[0] : nodes;\r\n let end = Array.isArray(nodes) ? nodes[nodes.length - 1] : nodes;\r\n const parentNode = start && end && start.parentNode == end.parentNode ? start.parentNode : null;\r\n if (parentNode) {\r\n if (isNodeAfter(start, end)) {\r\n let temp = end;\r\n end = start;\r\n start = temp;\r\n }\r\n splitParentNode(start, true /*splitBefore*/);\r\n splitParentNode(end, false /*splitBefore*/);\r\n }\r\n\r\n return parentNode;\r\n}\r\n","/**\r\n * Split a text node into two parts by an offset number, and return one of them\r\n * @param textNode The text node to split\r\n * @param offset The offset number to split at\r\n * @param returnFirstPart True to return the first part, then the passed in textNode will become the second part.\r\n * Otherwise return the second part, and the passed in textNode will become the first part\r\n */\r\nexport default function splitTextNode(textNode: Text, offset: number, returnFirstPart: boolean) {\r\n const firstPart = textNode.nodeValue?.substring(0, offset) || '';\r\n const secondPart = textNode.nodeValue?.substring(offset) || '';\r\n const newNode = textNode.ownerDocument.createTextNode(returnFirstPart ? firstPart : secondPart);\r\n textNode.nodeValue = returnFirstPart ? secondPart : firstPart;\r\n textNode.parentNode?.insertBefore(newNode, returnFirstPart ? textNode : textNode.nextSibling);\r\n return newNode;\r\n}\r\n","/**\r\n * Removes the node and keep all children in place, return the parentNode where the children are attached\r\n * @param node the node to remove\r\n */\r\nexport default function unwrap(node: Node): Node | null {\r\n // Unwrap requires a parentNode\r\n let parentNode = node ? node.parentNode : null;\r\n if (!parentNode) {\r\n return null;\r\n }\r\n\r\n while (node.firstChild) {\r\n parentNode.insertBefore(node.firstChild, node);\r\n }\r\n\r\n parentNode.removeChild(node);\r\n return parentNode;\r\n}\r\n","import createElement from './createElement';\r\nimport fromHtml from './fromHtml';\r\nimport safeInstanceOf from './safeInstanceOf';\r\nimport { CreateElementData, KnownCreateElementDataIndex } from 'roosterjs-editor-types';\r\nimport type { CompatibleKnownCreateElementDataIndex } from 'roosterjs-editor-types/lib/compatibleTypes';\r\n\r\n/**\r\n * Wrap all the node with html and return the wrapped node, and put the wrapper node under the parent of the first node\r\n * @param nodes The node or node array to wrap\r\n * @param wrapper The wrapper HTML tag name\r\n * @returns The wrapper element\r\n */\r\nexport default function wrap(\r\n nodes: Node | Node[],\r\n wrapper?: T\r\n): HTMLElementTagNameMap[T];\r\n\r\n/**\r\n * @deprecated\r\n * Wrap all the nodes with html and return the wrapped node, and put the wrapper node under the parent of the first node\r\n * @param nodes The node or node array to wrap\r\n * @param wrapper The wrapper HTML string, default value is DIV\r\n * @returns The wrapper element\r\n */\r\nexport default function wrap(nodes: Node | Node[], wrapper?: string): HTMLElement;\r\n\r\n/**\r\n * Wrap all the nodes with html and return the wrapped node, and put the wrapper node under the parent of the first node\r\n * @param nodes The node or node array to wrap\r\n * @param wrapper The wrapper HTML element, default value is a new DIV element\r\n * @returns The wrapper element\r\n */\r\nexport default function wrap(nodes: Node | Node[], wrapper?: HTMLElement): HTMLElement;\r\n\r\n/**\r\n * Wraps all the nodes with CreateElementData or an index of a known CreateElementData\r\n * @param nodes The nodes to wrap\r\n * @param wrapper The CreateElementData or an index of a known CreateElementData\r\n */\r\nexport default function wrap(\r\n nodes: Node | Node[],\r\n wrapper?:\r\n | CreateElementData\r\n | KnownCreateElementDataIndex\r\n | CompatibleKnownCreateElementDataIndex\r\n): HTMLElement;\r\n\r\nexport default function wrap(\r\n nodes: Node | Node[],\r\n wrapper?:\r\n | string\r\n | HTMLElement\r\n | CreateElementData\r\n | KnownCreateElementDataIndex\r\n | CompatibleKnownCreateElementDataIndex\r\n): HTMLElement | null {\r\n nodes = !nodes ? [] : safeInstanceOf(nodes, 'Node') ? [nodes] : nodes;\r\n if (nodes.length == 0 || !nodes[0] || !nodes[0].ownerDocument) {\r\n return null;\r\n }\r\n\r\n if (!wrapper) {\r\n wrapper = 'div';\r\n }\r\n\r\n if (!safeInstanceOf(wrapper, 'HTMLElement')) {\r\n let document = nodes[0].ownerDocument;\r\n\r\n if (typeof wrapper === 'string') {\r\n wrapper = /^\\w+$/.test(wrapper)\r\n ? document.createElement(wrapper)\r\n : (fromHtml(wrapper, document)[0] as HTMLElement); // This will be removed in next major release\r\n } else {\r\n wrapper = createElement(wrapper, document) as HTMLElement;\r\n }\r\n }\r\n\r\n let parentNode = nodes[0].parentNode;\r\n\r\n if (parentNode) {\r\n parentNode.insertBefore(wrapper, nodes[0]);\r\n }\r\n\r\n for (let node of nodes) {\r\n wrapper.appendChild(node);\r\n }\r\n\r\n return wrapper;\r\n}\r\n","export * from './plugins/AutoFormat/index';\n","export * from './plugins/ContentEdit/index';\n","export * from './plugins/ContextMenu/index';\n","export * from './plugins/CustomReplace/index';\n","export * from './plugins/CutPasteListChain/index';\n","export * from './plugins/HyperLink/index';\n","export * from './plugins/ImageEdit/index';\n","export * from './plugins/ImageResize/index';\n","export * from './plugins/Paste/index';\n","export * from './plugins/Picker/index';\n","export * from './plugins/TableCellSelection/index';\n","export * from './plugins/TableResize/index';\n","export * from './plugins/Watermark/index';\n","export * from './ContentEdit';\r\nexport * from './ContextMenu';\r\nexport * from './CustomReplace';\r\nexport * from './CutPasteListChain';\r\nexport * from './HyperLink';\r\nexport * from './ImageEdit';\r\nexport * from './ImageResize';\r\nexport * from './Paste';\r\nexport * from './Picker';\r\nexport * from './TableResize';\r\nexport * from './Watermark';\r\nexport * from './TableCellSelection';\r\nexport * from './AutoFormat';\r\n","import Disposable from './Disposable';\nimport DragAndDropHandler from './DragAndDropHandler';\nimport { Browser } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n */\ninterface MouseEventMoves {\n MOUSEDOWN: string;\n MOUSEMOVE: string;\n MOUSEUP: string;\n}\n\n/**\n * @internal\n */\ninterface MouseEventInfo extends MouseEventMoves {\n getPageXY: (e: MouseEvent) => number[];\n}\n\n/**\n * @internal\n * Compatible mouse event names for different platform\n */\ninterface TouchEventInfo extends MouseEventMoves {\n getPageXY: (e: TouchEvent) => number[];\n}\n\n/**\n * Generate event names and getXY function based on different platforms to be compatible with desktop and mobile browsers\n */\nconst MOUSE_EVENT_INFO_DESKTOP: MouseEventInfo = (() => {\n return {\n MOUSEDOWN: 'mousedown',\n MOUSEMOVE: 'mousemove',\n MOUSEUP: 'mouseup',\n getPageXY: getMouseEventPageXY,\n };\n})();\n\nconst MOUSE_EVENT_INFO_MOBILE: TouchEventInfo = (() => {\n return {\n MOUSEDOWN: 'touchstart',\n MOUSEMOVE: 'touchmove',\n MOUSEUP: 'touchend',\n getPageXY: getTouchEventPageXY,\n };\n})();\n\nfunction getMouseEventPageXY(e: MouseEvent): [number, number] {\n return [e.pageX, e.pageY];\n}\n\nfunction getTouchEventPageXY(e: TouchEvent): [number, number] {\n let pageX = 0;\n let pageY = 0;\n if (e.targetTouches && e.targetTouches.length > 0) {\n const touch = e.targetTouches[0];\n pageX = touch.pageX;\n pageY = touch.pageY;\n }\n return [pageX, pageY];\n}\n\n/**\n * @internal\n * A helper class to help manage drag and drop to an HTML element\n */\nexport default class DragAndDropHelper implements Disposable {\n private initX: number = 0;\n private initY: number = 0;\n private initValue: TInitValue | undefined = undefined;\n private dndMouse: MouseEventInfo | TouchEventInfo;\n\n /**\n * Create a new instance of DragAndDropHelper class\n * @param trigger The trigger element. When user start drag on this element,\n * events will be fired to the handler object\n * @param context Context object that will be passed to handler function when event is fired,\n * so that the handler object knows which element it is triggered from.\n * @param onSubmit A callback that will be invoked when event handler in handler object returns true\n * @param handler The event handler object, see DragAndDropHandler interface for more information\n * @param zoomScale The zoom scale of the editor\n * @param forceMobile A boolean to force the use of touch controls for the helper\n */\n constructor(\n private trigger: HTMLElement,\n private context: TContext,\n private onSubmit: (context: TContext, trigger: HTMLElement) => void,\n private handler: DragAndDropHandler,\n private zoomScale: number,\n forceMobile?: boolean\n ) {\n this.dndMouse =\n forceMobile || Browser.isMobileOrTablet\n ? MOUSE_EVENT_INFO_MOBILE\n : MOUSE_EVENT_INFO_DESKTOP;\n trigger.addEventListener(this.dndMouse.MOUSEDOWN, this.onMouseDown);\n }\n\n /**\n * Dispose this object, remove all event listeners that has been attached\n */\n dispose() {\n this.trigger.removeEventListener(this.dndMouse.MOUSEDOWN, this.onMouseDown);\n this.removeDocumentEvents();\n }\n\n public get mouseType(): string {\n return this.dndMouse == MOUSE_EVENT_INFO_MOBILE ? 'touch' : 'mouse';\n }\n\n private addDocumentEvents() {\n const doc = this.trigger.ownerDocument;\n doc.addEventListener(this.dndMouse.MOUSEMOVE, this.onMouseMove, true /*useCapture*/);\n doc.addEventListener(this.dndMouse.MOUSEUP, this.onMouseUp, true /*useCapture*/);\n }\n\n private removeDocumentEvents() {\n const doc = this.trigger.ownerDocument;\n doc.removeEventListener(this.dndMouse.MOUSEMOVE, this.onMouseMove, true /*useCapture*/);\n doc.removeEventListener(this.dndMouse.MOUSEUP, this.onMouseUp, true /*useCapture*/);\n }\n\n private onMouseDown = (e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n this.addDocumentEvents();\n [this.initX, this.initY] = this.dndMouse.getPageXY(e as MouseEvent & TouchEvent);\n this.initValue = this.handler.onDragStart?.(this.context, e as MouseEvent);\n };\n\n private onMouseMove = (e: Event) => {\n e.preventDefault();\n const [pageX, pageY] = this.dndMouse.getPageXY(e as MouseEvent & TouchEvent);\n const deltaX = (pageX - this.initX) / this.zoomScale;\n const deltaY = (pageY - this.initY) / this.zoomScale;\n if (\n this.initValue &&\n this.handler.onDragging?.(this.context, e as MouseEvent, this.initValue, deltaX, deltaY)\n ) {\n this.onSubmit?.(this.context, this.trigger);\n }\n };\n\n private onMouseUp = (e: Event) => {\n e.preventDefault();\n this.removeDocumentEvents();\n if (this.handler.onDragEnd?.(this.context, e as MouseEvent, this.initValue)) {\n this.onSubmit?.(this.context, this.trigger);\n }\n };\n}\n","import {\n ChangeSource,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst specialCharacters = /[`!@#$%^&*()_+\\=\\[\\]{};':\"\\\\|,.<>\\/?~]/;\n\n/**\n * Automatically transform -- into hyphen, if typed between two words.\n */\nexport default class AutoFormat implements EditorPlugin {\n private editor: IEditor | null = null;\n private lastKeyTyped: string | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'AutoFormat';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n this.lastKeyTyped = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (!this.editor) {\n return;\n }\n if (\n event.eventType === PluginEventType.ContentChanged ||\n event.eventType === PluginEventType.MouseDown ||\n event.eventType === PluginEventType.MouseUp\n ) {\n this.lastKeyTyped = '';\n }\n\n if (event.eventType === PluginEventType.KeyPress) {\n const keyTyped = event.rawEvent.key;\n\n if (keyTyped && keyTyped.length > 1) {\n this.lastKeyTyped = '';\n }\n\n if (\n this.lastKeyTyped === '-' &&\n !specialCharacters.test(keyTyped) &&\n keyTyped !== ' ' &&\n keyTyped !== '-'\n ) {\n const searcher = this.editor.getContentSearcherOfCursor(event);\n const textBeforeCursor = searcher?.getSubStringBefore(3);\n const dashes = searcher?.getSubStringBefore(2);\n const isPrecededByADash = textBeforeCursor?.[0] === '-';\n const isPrecededByASpace = textBeforeCursor?.[0] === ' ';\n if (\n isPrecededByADash ||\n isPrecededByASpace ||\n (typeof textBeforeCursor === 'string' &&\n specialCharacters.test(textBeforeCursor[0])) ||\n dashes !== '--'\n ) {\n return;\n }\n\n const textRange = searcher?.getRangeFromText(dashes, true /* exactMatch */);\n const nodeHyphen = document.createTextNode('—');\n this.editor.addUndoSnapshot(\n () => {\n if (textRange) {\n textRange.deleteContents();\n textRange.insertNode(nodeHyphen);\n this.editor!.select(nodeHyphen, PositionType.End);\n }\n },\n ChangeSource.Format /*changeSource*/,\n true /*canUndoByBackspace*/,\n { formatApiName: 'autoHyphen' }\n );\n\n //After the substitution the last key typed needs to be cleaned\n this.lastKeyTyped = null;\n } else {\n this.lastKeyTyped = keyTyped;\n }\n }\n }\n}\n","export { default as AutoFormat } from './AutoFormat';\n","import getAllFeatures from './getAllFeatures';\nimport { getObjectKeys } from 'roosterjs-editor-dom';\nimport {\n ContentEditFeatureSettings,\n EditorPlugin,\n GenericContentEditFeature,\n IEditor,\n PluginEvent,\n} from 'roosterjs-editor-types';\n\n/**\n * An editor plugin to handle content edit event.\n * The following cases are included:\n * 1. Auto increase/decrease indentation on Tab, Shift+tab\n * 2. Enter, Backspace on empty list item\n * 3. Enter, Backspace on empty blockquote line\n * 4. Auto bullet/numbering\n * 5. Auto link\n * 6. Tab in table\n * 7. Up/Down in table\n * 8. Manage list style\n */\nexport default class ContentEdit implements EditorPlugin {\n private editor: IEditor | undefined = undefined;\n private features: GenericContentEditFeature[] = [];\n /**\n * Create instance of ContentEdit plugin\n * @param settingsOverride An optional feature set to override default feature settings\n * @param additionalFeatures Optional. More features to add\n */\n constructor(\n private settingsOverride?: Partial,\n private additionalFeatures?: GenericContentEditFeature[]\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ContentEdit';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor): void {\n this.editor = editor;\n const allFeatures = getAllFeatures();\n getObjectKeys(allFeatures).forEach(key => {\n const feature = allFeatures[key];\n const hasSettingForKey =\n this.settingsOverride && this.settingsOverride[key] !== undefined;\n\n if (\n (hasSettingForKey && this.settingsOverride?.[key]) ||\n (!hasSettingForKey && !feature.defaultDisabled)\n ) {\n this.features.push(feature);\n }\n });\n this.features = this.features.concat(this.additionalFeatures || []);\n this.features.forEach(feature => this.editor?.addContentEditFeature(feature));\n }\n\n private disposeFeatures() {\n if (this.editor) {\n this.features.forEach(feature => this.editor!.removeContentEditFeature(feature));\n }\n this.features = [];\n }\n\n /**\n * Dispose this plugin\n */\n dispose(): void {\n this.disposeFeatures();\n this.editor = undefined;\n }\n}\n","import { removeLink, replaceWithNode } from 'roosterjs-editor-api';\nimport {\n AutoLinkFeatureSettings,\n BuildInEditFeature,\n ChangeSource,\n ClipboardData,\n IEditor,\n Keys,\n LinkData,\n PluginEvent,\n PluginEventType,\n PluginKeyboardEvent,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n clearEventDataCache,\n LinkInlineElement,\n matchLink,\n} from 'roosterjs-editor-dom';\n\n/**\n * When user type, they may end a link with a punctuation, i.e. www.bing.com;\n * we need to trim off the trailing punctuation before turning it to link match\n */\nconst TRAILING_PUNCTUATION_REGEX = /[.+=\\s:;\"',>]+$/i;\nconst MINIMUM_LENGTH = 5;\n\n/**\n * AutoLink edit feature, provides the ability to automatically convert text user typed or pasted\n * in hyperlink format into a real hyperlink\n */\nconst AutoLink: BuildInEditFeature = {\n keys: [Keys.ENTER, Keys.SPACE, Keys.CONTENTCHANGED],\n shouldHandleEvent: cacheGetLinkData,\n handleEvent: autoLink,\n};\n\n/**\n * UnlinkWhenBackspaceAfterLink edit feature, provides the ability to convert a hyperlink back into text\n * if user presses BACKSPACE right after a hyperlink\n */\nconst UnlinkWhenBackspaceAfterLink: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: hasLinkBeforeCursor,\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n removeLink(editor);\n },\n defaultDisabled: true,\n};\n\nfunction cacheGetLinkData(event: PluginEvent, editor: IEditor): LinkData | null {\n return event.eventType == PluginEventType.KeyDown ||\n (event.eventType == PluginEventType.ContentChanged && event.source == ChangeSource.Paste)\n ? cacheGetEventData(event, 'LINK_DATA', () => {\n // First try to match link from the whole paste string from the plain text in clipboard.\n // This helps when we paste a link next to some existing character, and the text we got\n // from clipboard will only contain what we pasted, any existing characters will not\n // be included.\n let clipboardData =\n (event.eventType == PluginEventType.ContentChanged &&\n event.source == ChangeSource.Paste &&\n (event.data as ClipboardData)) ||\n null;\n let link = matchLink((clipboardData?.text || '').trim());\n let searcher = editor.getContentSearcherOfCursor(event);\n\n // In case the matched link is already inside a
                tag, we do a range search.\n // getRangeFromText will return null if the given text is already in a LinkInlineElement\n if (link && searcher?.getRangeFromText(link.originalUrl, false /*exactMatch*/)) {\n return link;\n }\n\n let word = searcher && searcher.getWordBefore();\n if (word && word.length > MINIMUM_LENGTH) {\n // Check for trailing punctuation\n let trailingPunctuations = word.match(TRAILING_PUNCTUATION_REGEX);\n let trailingPunctuation = (trailingPunctuations || [])[0] || '';\n let candidate = word.substring(0, word.length - trailingPunctuation.length);\n\n // Do special handling for ')', '}', ']'\n ['()', '{}', '[]'].forEach(str => {\n if (\n candidate[candidate.length - 1] == str[1] &&\n candidate.indexOf(str[0]) < 0\n ) {\n candidate = candidate.substr(0, candidate.length - 1);\n }\n });\n\n // Match and replace in editor\n return matchLink(candidate);\n }\n return null;\n })\n : null;\n}\n\nfunction hasLinkBeforeCursor(event: PluginKeyboardEvent, editor: IEditor): boolean {\n let contentSearcher = editor.getContentSearcherOfCursor(event);\n let inline = contentSearcher?.getInlineElementBefore();\n return inline instanceof LinkInlineElement;\n}\n\nfunction autoLink(event: PluginEvent, editor: IEditor) {\n const linkData = cacheGetLinkData(event, editor);\n if (!linkData) {\n return;\n }\n let anchor = editor.getDocument().createElement('a');\n // Need to get searcher before we enter the async callback since the callback can happen when cursor is moved to next line\n // and at that time a new searcher won't be able to find the link text to replace\n let searcher = editor.getContentSearcherOfCursor();\n anchor.textContent = linkData.originalUrl;\n anchor.href = linkData.normalizedUrl;\n\n editor.runAsync(editor => {\n editor.addUndoSnapshot(\n () => {\n replaceWithNode(\n editor,\n linkData.originalUrl,\n anchor,\n false /* exactMatch */,\n searcher ?? undefined\n );\n\n // The content at cursor has changed. Should also clear the cursor data cache\n clearEventDataCache(event);\n return anchor;\n },\n ChangeSource.AutoLink,\n true /*canUndoByBackspace*/\n );\n });\n}\n\n/**\n * @internal\n */\nexport const AutoLinkFeatures: Record<\n keyof AutoLinkFeatureSettings,\n BuildInEditFeature\n> = {\n autoLink: AutoLink,\n unlinkWhenBackspaceAfterLink: UnlinkWhenBackspaceAfterLink as BuildInEditFeature,\n};\n","import {\n isNodeEmpty,\n cacheGetEventData,\n safeInstanceOf,\n splitBalancedNodeRange,\n unwrap,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n PluginKeyboardEvent,\n Keys,\n IEditor,\n PositionType,\n CodeFeatureSettings,\n QueryScope,\n} from 'roosterjs-editor-types';\n\nconst RemoveCodeWhenEnterOnEmptyLine: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => {\n const childOfCode = cacheGetCodeChild(event, editor);\n return childOfCode && isNodeEmpty(childOfCode);\n },\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n splitCode(event, editor);\n },\n undefined /* changeSource */,\n true /* canUndoByBackspace */\n );\n },\n};\n\nconst RemoveCodeWhenBackspaceOnEmptyFirstLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n const childOfCode = cacheGetCodeChild(event, editor);\n return childOfCode && isNodeEmpty(childOfCode) && !childOfCode.previousSibling;\n },\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(() => splitCode(event, editor));\n },\n};\n\nfunction cacheGetCodeChild(event: PluginKeyboardEvent, editor: IEditor): Node | null {\n return cacheGetEventData(event, 'CODE_CHILD', () => {\n const codeElement =\n editor.getElementAtCursor('code') ??\n editor.queryElements('code', QueryScope.OnSelection)[0];\n if (codeElement) {\n const pos = editor.getFocusedPosition();\n const block = pos && editor.getBlockElementAtNode(pos.normalize().node);\n if (block) {\n const node =\n block.getStartNode() == codeElement.parentNode\n ? block.getStartNode()\n : block.collapseToSingleElement();\n return isNodeEmpty(node) ? node : null;\n }\n }\n\n return null;\n });\n}\n\nfunction splitCode(event: PluginKeyboardEvent, editor: IEditor) {\n const currentContainer = cacheGetCodeChild(event, editor);\n if (!safeInstanceOf(currentContainer, 'HTMLElement')) {\n return;\n }\n const codeChild = currentContainer.querySelector('code');\n if (!codeChild) {\n const codeParent = splitBalancedNodeRange(currentContainer);\n if (codeParent) {\n unwrap(codeParent);\n }\n if (safeInstanceOf(currentContainer.parentElement, 'HTMLPreElement')) {\n const preParent = splitBalancedNodeRange(currentContainer);\n if (preParent) {\n unwrap(preParent);\n }\n }\n } else {\n //Content model\n unwrap(codeChild);\n }\n editor.select(currentContainer, PositionType.Begin);\n}\n\nexport const CodeFeatures: Record<\n keyof CodeFeatureSettings,\n BuildInEditFeature\n> = {\n removeCodeWhenEnterOnEmptyLine: RemoveCodeWhenEnterOnEmptyLine,\n removeCodeWhenBackspaceOnEmptyFirstLine: RemoveCodeWhenBackspaceOnEmptyFirstLine,\n};\n","import { Browser, getComputedStyle, Position } from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n CursorFeatureSettings,\n Keys,\n PluginKeyboardEvent,\n} from 'roosterjs-editor-types';\n\nconst NoCycleCursorMove: BuildInEditFeature = {\n keys: [Keys.LEFT, Keys.RIGHT],\n allowFunctionKeys: true,\n shouldHandleEvent: (event, editor, ctrlOrMeta) => {\n let range: Range | null = null;\n let position: Position;\n\n if (\n !ctrlOrMeta ||\n !(range = editor.getSelectionRange()) ||\n !range.collapsed ||\n !(position = Position.getStart(range)) ||\n !editor.isPositionAtBeginning(position)\n ) {\n return false;\n }\n\n let rtl = getComputedStyle(position.element, 'direction') == 'rtl';\n let rawEvent = event.rawEvent;\n\n return (!rtl && rawEvent.which == Keys.LEFT) || (rtl && rawEvent.which == Keys.RIGHT);\n },\n handleEvent: event => {\n event.rawEvent.preventDefault();\n },\n defaultDisabled: !Browser.isChrome,\n};\n\n/**\n * @internal\n */\nexport const CursorFeatures: Record<\n keyof CursorFeatureSettings,\n BuildInEditFeature\n> = {\n noCycleCursorMove: NoCycleCursorMove,\n};\n","import { ContentTraverser } from 'roosterjs-editor-dom';\nimport {\n addDelimiters,\n cacheGetEventData,\n createRange,\n getComputedStyle,\n getDelimiterFromElement,\n getEntityFromElement,\n getEntitySelector,\n isBlockElement,\n matchesSelector,\n Position,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n EntityFeatureSettings,\n EntityOperation,\n IEditor,\n Keys,\n PluginKeyboardEvent,\n PositionType,\n PluginEventType,\n DelimiterClasses,\n PluginEvent,\n NodeType,\n ExperimentalFeatures,\n Entity,\n IContentTraverser,\n InlineElement,\n} from 'roosterjs-editor-types';\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"Click\" when user\n * clicks on a readonly entity.\n */\nconst ClickOnEntityFeature: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => cacheGetReadonlyEntityElement(event, editor),\n handleEvent: (event, editor) => {\n cacheGetReadonlyEntityElement(event, editor, EntityOperation.Click);\n },\n};\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"Escape\" when user\n * presses ESC on a readonly entity.\n */\nconst EscapeFromEntityFeature: BuildInEditFeature = {\n keys: [Keys.ESCAPE],\n shouldHandleEvent: (event, editor) => cacheGetReadonlyEntityElement(event, editor),\n handleEvent: (event, editor) => {\n cacheGetReadonlyEntityElement(event, editor, EntityOperation.Escape);\n },\n};\n\nfunction cacheGetReadonlyEntityElement(\n event: PluginKeyboardEvent,\n editor: IEditor,\n operation?: EntityOperation\n) {\n const element = cacheGetEventData(event, 'READONLY_ENTITY_ELEMENT', () => {\n const node = event.rawEvent.target as Node;\n const entityElement = node && editor.getElementAtCursor(getEntitySelector(), node);\n return entityElement && !entityElement.isContentEditable ? entityElement : null;\n });\n\n if (element && operation !== undefined) {\n const entity = getEntityFromElement(element);\n if (entity) {\n editor.triggerPluginEvent(PluginEventType.EntityOperation, {\n operation,\n rawEvent: event.rawEvent,\n entity,\n });\n }\n }\n\n return element;\n}\n\n/**\n * A content edit feature to split current line into two lines at the cursor when user presses\n * ENTER right before a readonly entity.\n * Browser's default behavior will insert an extra BR tag before the entity which causes an extra\n * empty line. So we override the default behavior here.\n */\nconst EnterBeforeReadonlyEntityFeature: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) =>\n cacheGetNeighborEntityElement(event, editor, true /*isNext*/, false /*collapseOnly*/),\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n\n const range = editor.getSelectionRange();\n if (!range) {\n return;\n }\n\n const node = Position.getEnd(range).normalize().node;\n const br = editor.getDocument().createElement('BR');\n node.parentNode?.insertBefore(br, node.nextSibling);\n\n const block = editor.getBlockElementAtNode(node);\n let newContainer: HTMLElement | undefined;\n\n if (block) {\n newContainer = block.collapseToSingleElement();\n br.parentNode?.removeChild(br);\n }\n\n editor.getSelectionRange()?.deleteContents();\n\n if (newContainer?.nextSibling) {\n editor.select(newContainer.nextSibling, PositionType.Begin);\n }\n },\n};\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"RemoveFromEnd\" when user\n * press BACKSPACE right after an entity\n */\nconst BackspaceAfterEntityFeature: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) =>\n cacheGetNeighborEntityElement(event, editor, false /*isNext*/, true /*collapseOnly*/),\n handleEvent: (event, editor) => {\n cacheGetNeighborEntityElement(\n event,\n editor,\n false /*isNext*/,\n true /*collapseOnly*/,\n EntityOperation.RemoveFromEnd\n );\n },\n};\n\n/**\n * A content edit feature to trigger EntityOperation event with operation \"RemoveFromStart\" when user\n * press DELETE right after an entity\n */\nconst DeleteBeforeEntityFeature: BuildInEditFeature = {\n keys: [Keys.DELETE],\n shouldHandleEvent: (event, editor) =>\n cacheGetNeighborEntityElement(event, editor, true /*isNext*/, true /*collapseOnly*/),\n handleEvent: (event, editor) => {\n cacheGetNeighborEntityElement(\n event,\n editor,\n true /*isNext*/,\n true /*collapseOnly*/,\n EntityOperation.RemoveFromStart\n );\n },\n};\n\nfunction cacheGetNeighborEntityElement(\n event: PluginKeyboardEvent,\n editor: IEditor,\n isNext: boolean,\n collapseOnly: boolean,\n operation?: EntityOperation\n): HTMLElement | null {\n const element = cacheGetEventData(\n event,\n 'NEIGHBOR_ENTITY_ELEMENT_' + isNext + '_' + collapseOnly,\n () => {\n const range = editor.getSelectionRange();\n\n if (!range || (collapseOnly && !range.collapsed)) {\n return null;\n }\n\n const regions = editor.getSelectedRegions();\n const regionRoot = regions[0]?.rootNode;\n\n range.commonAncestorContainer.normalize();\n const pos = Position.getEnd(range).normalize();\n const isAtBeginOrEnd = pos.offset == 0 || pos.isAtEnd;\n let entityNode: HTMLElement | null = null;\n\n if (isAtBeginOrEnd && regionRoot) {\n const traverser = ContentTraverser.createBodyTraverser(regionRoot, pos.node);\n const sibling = isNext\n ? pos.offset == 0\n ? traverser.currentInlineElement\n : traverser.getNextInlineElement()\n : pos.isAtEnd\n ? traverser.currentInlineElement\n : traverser.getPreviousInlineElement();\n let node = sibling && sibling.getContainerNode();\n\n if (!collapseOnly) {\n const block = editor.getBlockElementAtNode(pos.node);\n if (!block || (node && !block.contains(node))) {\n node = null;\n }\n }\n\n entityNode = node && editor.getElementAtCursor(getEntitySelector(), node);\n }\n\n return entityNode;\n }\n );\n\n if (element && operation !== undefined) {\n const entity = getEntityFromElement(element);\n if (entity) {\n triggerOperation(entity, editor, operation, event);\n }\n }\n\n return element;\n}\n\n/**\n * @requires ExperimentalFeatures.InlineEntityReadOnlyDelimiters to be enabled\n * Content edit feature to move the cursor from Delimiters around Entities when using Right or Left Arrow Keys\n */\nconst MoveBetweenDelimitersFeature: BuildInEditFeature = {\n keys: [Keys.RIGHT, Keys.LEFT],\n allowFunctionKeys: true,\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) => {\n if (\n event.rawEvent.altKey ||\n !editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n return false;\n }\n\n const element = editor.getElementAtCursor();\n if (!element) {\n return false;\n }\n\n const isRTL = getComputedStyle(element, 'direction') === 'rtl';\n const shouldCheckBefore = isRTL == (event.rawEvent.which === Keys.LEFT);\n\n return getIsDelimiterAtCursor(event, editor, shouldCheckBefore);\n },\n handleEvent(event: PluginKeyboardEvent, editor: IEditor) {\n const checkBefore = cacheGetCheckBefore(event);\n const delimiter = cacheDelimiter(event, checkBefore);\n\n if (!delimiter) {\n return;\n }\n\n const { delimiterPair, entity } = getRelatedElements(delimiter, checkBefore, editor);\n\n if (delimiterPair && entity && matchesSelector(entity, getEntitySelector())) {\n event.rawEvent.preventDefault();\n editor.runAsync(() => {\n const positionType = checkBefore\n ? event.rawEvent.shiftKey\n ? PositionType.After\n : PositionType.End\n : PositionType.Before;\n const position = new Position(delimiterPair, positionType);\n if (event.rawEvent.shiftKey) {\n const selection = delimiterPair.ownerDocument.getSelection();\n selection?.extend(position.node, position.offset);\n } else {\n editor.select(position);\n }\n });\n }\n },\n};\n\n/**\n * @requires ExperimentalFeatures.InlineEntityReadOnlyDelimiters to be enabled\n * Content edit Feature to trigger a Delete Entity Operation when one of the Delimiter is about to be removed with DELETE or Backspace\n */\nconst RemoveEntityBetweenDelimitersFeature: BuildInEditFeature = {\n keys: [Keys.BACKSPACE, Keys.DELETE],\n shouldHandleEvent(event: PluginKeyboardEvent, editor: IEditor) {\n if (!editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)) {\n return false;\n }\n\n const range = editor.getSelectionRange();\n if (!range?.collapsed) {\n return false;\n }\n const checkBefore = event.rawEvent.which === Keys.DELETE;\n const isDelimiter = getIsDelimiterAtCursor(event, editor, checkBefore);\n\n if (isDelimiter) {\n const delimiter = cacheDelimiter(event, checkBefore);\n const entityElement = checkBefore\n ? delimiter?.nextElementSibling\n : delimiter?.previousElementSibling;\n\n return !!cacheEntityBetweenDelimiter(event, editor, checkBefore, entityElement);\n }\n\n return false;\n },\n handleEvent(event: PluginKeyboardEvent, editor: IEditor) {\n const checkBefore = event.rawEvent.which === Keys.DELETE;\n cacheEntityBetweenDelimiter(\n event,\n editor,\n checkBefore,\n null,\n checkBefore ? EntityOperation.RemoveFromStart : EntityOperation.RemoveFromEnd\n );\n },\n};\n\nfunction getIsDelimiterAtCursor(event: PluginKeyboardEvent, editor: IEditor, checkBefore: boolean) {\n const position = editor.getFocusedPosition()?.normalize();\n cacheGetCheckBefore(event, checkBefore);\n\n if (!position) {\n return false;\n }\n\n const focusedElement =\n position.node.nodeType == NodeType.Text\n ? position.node\n : position.node == position.element\n ? position.element.childNodes.item(position.offset)\n : position.element;\n\n const data = checkBefore\n ? {\n class: DelimiterClasses.DELIMITER_BEFORE,\n pairClass: DelimiterClasses.DELIMITER_AFTER,\n isAtEndOrBeginning: position.isAtEnd,\n }\n : {\n class: DelimiterClasses.DELIMITER_AFTER,\n pairClass: DelimiterClasses.DELIMITER_BEFORE,\n isAtEndOrBeginning: position.offset == 0,\n };\n\n const sibling = getNextSibling(editor, focusedElement, checkBefore);\n if (data.isAtEndOrBeginning && sibling) {\n const elAtCursor = editor.getElementAtCursor('.' + data.class, sibling);\n\n if (elAtCursor && !!shouldHandle(elAtCursor)) {\n return true;\n }\n }\n\n const entityAtCursor =\n focusedElement && editor.getElementAtCursor('.' + data.class, focusedElement);\n return !!shouldHandle(entityAtCursor);\n\n function shouldHandle(element: HTMLElement | null | undefined) {\n if (!element) {\n return false;\n }\n\n const { delimiterPair } = getRelatedElements(element, checkBefore, editor);\n\n return (\n delimiterPair &&\n (delimiterPair.className || '').indexOf(data.pairClass) > -1 &&\n cacheDelimiter(event, checkBefore, element)\n );\n }\n}\n\nfunction getNextSibling(editor: IEditor, element: Node, checkBefore: boolean) {\n const traverser = getBlockTraverser(editor, element);\n if (!traverser) {\n return undefined;\n }\n\n const traverseFn = (t: IContentTraverser) =>\n checkBefore ? t.getNextInlineElement() : t.getPreviousInlineElement();\n\n let currentInline = traverser.currentInlineElement;\n while (currentInline && currentInline.getContainerNode() === element) {\n currentInline = traverseFn(traverser);\n }\n return currentInline?.getContainerNode();\n}\n\nfunction getBlockTraverser(editor: IEditor, element: Node | null | undefined) {\n if (!element) {\n return undefined;\n }\n const blockElement = editor.getBlockElementAtNode(element)?.getStartNode();\n if (!blockElement || !isBlockElement(blockElement)) {\n return undefined;\n }\n return ContentTraverser.createBodyTraverser(blockElement, element);\n}\n\nfunction cacheDelimiter(event: PluginEvent, checkBefore: boolean, delimiter?: HTMLElement | null) {\n return cacheGetEventData(event, 'delimiter_cache_key_' + checkBefore, () => delimiter);\n}\n\nfunction cacheEntityBetweenDelimiter(\n event: PluginKeyboardEvent,\n editor: IEditor,\n checkBefore: boolean,\n entity?: Element | null,\n operation?: EntityOperation\n) {\n const element = cacheGetEventData(\n event,\n 'entity_delimiter_cache_key_' + checkBefore,\n () => entity && editor.getElementAtCursor(getEntitySelector(), entity)\n );\n\n if (element && operation !== undefined) {\n const entity = getEntityFromElement(element);\n\n if (entity) {\n triggerOperation(entity, editor, operation, event);\n }\n }\n\n return element;\n}\n\nfunction triggerOperation(\n entity: Entity,\n editor: IEditor,\n operation: EntityOperation,\n event: PluginKeyboardEvent\n) {\n const { nextElementSibling, previousElementSibling } = entity.wrapper;\n editor.triggerPluginEvent(PluginEventType.EntityOperation, {\n operation,\n rawEvent: event.rawEvent,\n entity,\n });\n\n if (\n entity.isReadonly &&\n !isBlockElement(entity.wrapper) &&\n editor.isFeatureEnabled(ExperimentalFeatures.InlineEntityReadOnlyDelimiters)\n ) {\n if (event.rawEvent.defaultPrevented) {\n editor.runAsync(() => {\n if (!editor.contains(entity.wrapper)) {\n removeDelimiters(nextElementSibling, previousElementSibling);\n } else {\n const [delimiterAfter] = addDelimiters(entity.wrapper);\n if (delimiterAfter) {\n editor.select(delimiterAfter, PositionType.After);\n }\n }\n });\n } else if (\n getDelimiterFromElement(nextElementSibling) &&\n getDelimiterFromElement(previousElementSibling)\n ) {\n editor.select(createRange(previousElementSibling, nextElementSibling));\n }\n }\n}\n\nfunction removeDelimiters(\n nextElementSibling: Element | null,\n previousElementSibling: Element | null\n) {\n [nextElementSibling, previousElementSibling].forEach(sibling => {\n if (getDelimiterFromElement(sibling)) {\n sibling?.parentElement?.removeChild(sibling);\n }\n });\n}\n\nfunction cacheGetCheckBefore(event: PluginKeyboardEvent, checkBefore?: boolean): boolean {\n return !!cacheGetEventData(event, 'Check_Before', () => checkBefore);\n}\n\nfunction getRelatedElements(delimiter: HTMLElement, checkBefore: boolean, editor: IEditor) {\n let entity: Element | null = null;\n let delimiterPair: Element | null = null;\n const traverser = getBlockTraverser(editor, delimiter);\n if (!traverser) {\n return { delimiterPair, entity };\n }\n\n const selector = `.${\n checkBefore ? DelimiterClasses.DELIMITER_AFTER : DelimiterClasses.DELIMITER_BEFORE\n }`;\n const traverseFn = (t: IContentTraverser) =>\n checkBefore ? t.getNextInlineElement() : t.getPreviousInlineElement();\n const getElementFromInline = (element: InlineElement, selector: string) => {\n const node = element?.getContainerNode();\n return (node && editor.getElementAtCursor(selector, node)) ?? null;\n };\n const entitySelector = getEntitySelector();\n\n let current = traverser.currentInlineElement;\n while (current && (!entity || !delimiterPair)) {\n entity = entity || getElementFromInline(current, entitySelector);\n delimiterPair = delimiterPair || getElementFromInline(current, selector);\n\n // If we found the entity but the next inline after the entity is not a delimiter,\n // it means that the delimiter pair got removed or is invalid, return null instead.\n if (entity && !delimiterPair && !getElementFromInline(current, entitySelector)) {\n delimiterPair = null;\n break;\n }\n current = traverseFn(traverser);\n }\n\n return { entity, delimiterPair };\n}\n\n/**\n * @internal\n */\nexport const EntityFeatures: Record<\n keyof EntityFeatureSettings,\n BuildInEditFeature\n> = {\n clickOnEntity: ClickOnEntityFeature,\n escapeFromEntity: EscapeFromEntityFeature,\n enterBeforeReadonlyEntity: EnterBeforeReadonlyEntityFeature,\n backspaceAfterEntity: BackspaceAfterEntityFeature,\n deleteBeforeEntity: DeleteBeforeEntityFeature,\n moveBetweenDelimitersFeature: MoveBetweenDelimitersFeature,\n removeEntityBetweenDelimiters: RemoveEntityBetweenDelimitersFeature,\n};\n","import getAutoBulletListStyle from '../utils/getAutoBulletListStyle';\nimport getAutoNumberingListStyle from '../utils/getAutoNumberingListStyle';\nimport {\n blockFormat,\n commitListChains,\n setIndentation,\n toggleBullet,\n toggleNumbering,\n toggleListType,\n} from 'roosterjs-editor-api';\nimport {\n Browser,\n getTagOfNode,\n isNodeEmpty,\n isPositionAtBeginningOf,\n Position,\n VListChain,\n createVListFromRegion,\n isBlockElement,\n cacheGetEventData,\n safeInstanceOf,\n VList,\n createObjectDefinition,\n createNumberDefinition,\n getMetadata,\n findClosestElementAncestor,\n getComputedStyle,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n IEditor,\n Indentation,\n ListFeatureSettings,\n Keys,\n PluginKeyboardEvent,\n QueryScope,\n RegionBase,\n ListType,\n ExperimentalFeatures,\n PositionType,\n NumberingListType,\n BulletListType,\n IPositionContentSearcher,\n} from 'roosterjs-editor-types';\n\nconst PREVIOUS_BLOCK_CACHE_KEY = 'previousBlock';\nconst NEXT_BLOCK_CACHE_KEY = 'nextBlock';\n\ninterface ListStyleMetadata {\n orderedStyleType?: NumberingListType;\n unorderedStyleType?: BulletListType;\n}\n\nconst ListStyleDefinitionMetadata = createObjectDefinition(\n {\n orderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n NumberingListType.Min,\n NumberingListType.Max\n ),\n unorderedStyleType: createNumberDefinition(\n true /** isOptional */,\n undefined /** value **/,\n BulletListType.Min,\n BulletListType.Max\n ),\n },\n true /** isOptional */,\n true /** allowNull */\n);\n\nconst shouldHandleIndentationEvent = (indenting: boolean) => (\n event: PluginKeyboardEvent,\n editor: IEditor\n) => {\n const { keyCode, altKey, shiftKey, ctrlKey, metaKey } = event.rawEvent;\n return (\n !ctrlKey &&\n !metaKey &&\n (keyCode === Keys.TAB\n ? !altKey && shiftKey === !indenting\n : shiftKey && altKey && keyCode === (indenting ? Keys.RIGHT : Keys.LEFT)) &&\n cacheGetListElement(event, editor)\n );\n};\n\nconst handleIndentationEvent = (indenting: boolean) => (\n event: PluginKeyboardEvent,\n editor: IEditor\n) => {\n let currentElement: Node | null = null;\n const isRTL =\n event.rawEvent.keyCode !== Keys.TAB &&\n (currentElement = editor.getElementAtCursor()) &&\n getComputedStyle(currentElement, 'direction') == 'rtl';\n setIndentation(editor, isRTL == indenting ? Indentation.Decrease : Indentation.Increase);\n event.rawEvent.preventDefault();\n};\n\n/**\n * IndentWhenTab edit feature, provides the ability to indent current list when user press TAB\n */\nconst IndentWhenTab: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: shouldHandleIndentationEvent(true),\n handleEvent: handleIndentationEvent(true),\n};\n\n/**\n * OutdentWhenShiftTab edit feature, provides the ability to outdent current list when user press Shift+TAB\n */\nconst OutdentWhenShiftTab: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: shouldHandleIndentationEvent(false),\n handleEvent: handleIndentationEvent(false),\n allowFunctionKeys: true,\n};\n\n/**\n * indentWhenAltShiftRight edit feature, provides the ability to indent or outdent current list when user press Alt+shift+Right\n */\nconst IndentWhenAltShiftRight: BuildInEditFeature = {\n keys: [Keys.RIGHT],\n shouldHandleEvent: shouldHandleIndentationEvent(true),\n handleEvent: handleIndentationEvent(true),\n allowFunctionKeys: true,\n defaultDisabled: Browser.isMac,\n};\n\n/**\n * outdentWhenAltShiftLeft edit feature, provides the ability to indent or outdent current list when user press Alt+shift+Left\n */\nconst OutdentWhenAltShiftLeft: BuildInEditFeature = {\n keys: [Keys.LEFT],\n shouldHandleEvent: shouldHandleIndentationEvent(false),\n handleEvent: handleIndentationEvent(false),\n allowFunctionKeys: true,\n defaultDisabled: Browser.isMac,\n};\n\n/**\n * MergeInNewLine edit feature, provides the ability to merge current line into a new line when user press\n * BACKSPACE at beginning of a list item\n */\nconst MergeInNewLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n let range = editor.getSelectionRange();\n return li && range?.collapsed && isPositionAtBeginningOf(Position.getStart(range), li);\n },\n handleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n if (li?.previousSibling) {\n blockFormat(editor, (region, start, end) => {\n const vList = createVListFromRegion(\n region,\n false /*includeSiblingList*/,\n li ?? undefined\n );\n if (vList && start && end) {\n vList.setIndentation(start, end, Indentation.Decrease, true /*softOutdent*/);\n vList.writeBack(\n editor.isFeatureEnabled(ExperimentalFeatures.ReuseAllAncestorListElements),\n editor.isFeatureEnabled(ExperimentalFeatures.DisableListChain)\n );\n event.rawEvent.preventDefault();\n }\n });\n } else {\n toggleListAndPreventDefault(event, editor);\n }\n },\n defaultDisabled: true,\n};\n\n/**\n * OutdentWhenBackOn1stEmptyLine edit feature, provides the ability to outdent current item if user press\n * BACKSPACE at the first and empty line of a list\n */\nconst OutdentWhenBackOn1stEmptyLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n return (\n li &&\n isNodeEmpty(li) &&\n !li.previousSibling &&\n !li.getElementsByTagName('blockquote').length\n );\n },\n handleEvent: toggleListAndPreventDefault,\n};\n\n/**\n * MaintainListChainWhenDelete edit feature, provides the ability to indent the list if user press\n * DELETE before the first item of a list\n */\nconst MaintainListChainWhenDelete: BuildInEditFeature = {\n keys: [Keys.DELETE],\n shouldHandleEvent: (event, editor) => {\n const li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n const range = editor.getSelectionRange();\n if (li || !range) {\n return false;\n }\n const isAtEnd = Position.getEnd(range).isAtEnd;\n const nextSibling = isAtEnd ? getCacheNextSibling(event, editor) : undefined;\n const isAtEndAndBeforeLI = editor.getElementAtCursor('LI', nextSibling, event);\n return isAtEndAndBeforeLI;\n },\n handleEvent: (event, editor) => {\n const chains = getListChains(editor);\n editor.runAsync(editor => commitListChains(editor, chains));\n },\n};\n\n/**\n * OutdentWhenEnterOnEmptyLine edit feature, provides the ability to outdent current item if user press\n * ENTER at the beginning of an empty line of a list\n */\nconst OutdentWhenEnterOnEmptyLine: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => {\n let li = editor.getElementAtCursor('LI', undefined /*startFrom*/, event);\n return !event.rawEvent.shiftKey && li && isNodeEmpty(li);\n },\n handleEvent: (event, editor) => {\n editor.addUndoSnapshot(\n () => toggleListAndPreventDefault(event, editor, false /* includeSiblingLists */),\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n defaultDisabled: !Browser.isIE && !Browser.isChrome,\n};\n\n/**\n * Validate if a block of text is considered a list pattern\n * The regex expression will look for patterns of the form:\n * 1. 1> 1) 1- (1)\n * @returns if a text is considered a list pattern\n */\nfunction isAListPattern(textBeforeCursor: string) {\n const REGEX: RegExp = /^(\\*|-|[0-9]{1,2}\\.|[0-9]{1,2}\\>|[0-9]{1,2}\\)|[0-9]{1,2}\\-|\\([0-9]{1,2}\\))$/;\n return REGEX.test(textBeforeCursor);\n}\n\n/**\n * AutoBullet edit feature, provides the ability to automatically convert current line into a list.\n * When user input \"1. \", convert into a numbering list\n * When user input \"- \" or \"* \", convert into a bullet list\n */\nconst AutoBullet: BuildInEditFeature = {\n keys: [Keys.SPACE],\n shouldHandleEvent: (event, editor) => {\n let searcher: IPositionContentSearcher | null;\n if (\n !cacheGetListElement(event, editor) &&\n !editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList) &&\n (searcher = editor.getContentSearcherOfCursor(event))\n ) {\n let textBeforeCursor = searcher.getSubStringBefore(4);\n\n // Auto list is triggered if:\n // 1. Text before cursor exactly matches '*', '-' or '1.'\n // 2. There's no non-text inline entities before cursor\n return isAListPattern(textBeforeCursor) && !searcher.getNearestNonTextInlineElement();\n }\n return false;\n },\n handleEvent: (event, editor) => {\n editor.insertContent(' ');\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n let regions: RegionBase[];\n let searcher = editor.getContentSearcherOfCursor();\n if (!searcher) {\n return;\n }\n let textBeforeCursor = searcher.getSubStringBefore(4);\n let textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n\n if (!textRange) {\n // no op if the range can't be found\n } else if (\n textBeforeCursor.indexOf('*') == 0 ||\n textBeforeCursor.indexOf('-') == 0\n ) {\n prepareAutoBullet(editor, textRange);\n toggleBullet(editor);\n } else if (isAListPattern(textBeforeCursor)) {\n prepareAutoBullet(editor, textRange);\n toggleNumbering(editor);\n } else if ((regions = editor.getSelectedRegions()) && regions.length == 1) {\n const num = parseInt(textBeforeCursor);\n prepareAutoBullet(editor, textRange);\n toggleNumbering(editor, num);\n }\n searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/)?.deleteContents();\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.AutoFormatList to be enabled\n * AutoBulletList edit feature, provides the ability to automatically convert current line into a bullet list.\n */\nconst AutoBulletList: BuildInEditFeature = {\n keys: [Keys.SPACE],\n shouldHandleEvent: (event, editor) => {\n if (\n !cacheGetListElement(event, editor) &&\n editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList)\n ) {\n return shouldTriggerList(event, editor, getAutoBulletListStyle, ListType.Unordered);\n }\n return false;\n },\n handleEvent: (event, editor) => {\n editor.insertContent(' ');\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n let searcher = editor.getContentSearcherOfCursor();\n if (!searcher) {\n return;\n }\n let textBeforeCursor = searcher.getSubStringBefore(5);\n let textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n const listStyle = getAutoBulletListStyle(textBeforeCursor);\n\n if (textRange) {\n prepareAutoBullet(editor, textRange);\n toggleBullet(\n editor,\n listStyle ?? undefined,\n 'autoToggleList' /** apiNameOverride */\n );\n }\n searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/)?.deleteContents();\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.AutoFormatList to be enabled\n * AutoNumberingList edit feature, provides the ability to automatically convert current line into a numbering list.\n */\nconst AutoNumberingList: BuildInEditFeature = {\n keys: [Keys.SPACE],\n shouldHandleEvent: (event, editor) => {\n if (\n !cacheGetListElement(event, editor) &&\n editor.isFeatureEnabled(ExperimentalFeatures.AutoFormatList)\n ) {\n return shouldTriggerList(event, editor, getAutoNumberingListStyle, ListType.Ordered);\n }\n return false;\n },\n handleEvent: (event, editor) => {\n editor.insertContent(' ');\n event.rawEvent.preventDefault();\n editor.addUndoSnapshot(\n () => {\n const searcher = editor.getContentSearcherOfCursor();\n if (!searcher) {\n return;\n }\n const textBeforeCursor = searcher.getSubStringBefore(5);\n const textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n\n if (textRange) {\n const number = isFirstItemOfAList(textBeforeCursor)\n ? 1\n : parseInt(textBeforeCursor);\n\n const isLi = getPreviousListItem(editor, textRange);\n const listStyle = getAutoNumberingListStyle(textBeforeCursor) ?? undefined;\n prepareAutoBullet(editor, textRange);\n toggleNumbering(\n editor,\n isLi && number !== 1 ? undefined : number /** startNumber */,\n listStyle,\n 'autoToggleList' /** apiNameOverride */\n );\n }\n searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/)?.deleteContents();\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n },\n};\n\nconst getPreviousListItem = (editor: IEditor, textRange: Range) => {\n const blockElement = editor\n .getBodyTraverser(textRange?.startContainer)\n .getPreviousBlockElement();\n const previousNode = blockElement?.getEndNode() ?? null;\n return getTagOfNode(previousNode) === 'LI' ? previousNode : undefined;\n};\n\nconst getPreviousListType = (editor: IEditor, textRange: Range, listType: ListType) => {\n const type = listType === ListType.Ordered ? 'orderedStyleType' : 'unorderedStyleType';\n const listItem = getPreviousListItem(editor, textRange);\n const list = listItem\n ? findClosestElementAncestor(\n listItem,\n undefined /** root*/,\n listType === ListType.Ordered ? 'ol' : 'ul'\n )\n : null;\n const metadata = list ? getMetadata(list, ListStyleDefinitionMetadata) : null;\n return metadata ? metadata[type] : null;\n};\n\nconst isFirstItemOfAList = (item: string) => {\n const number = parseInt(item);\n if (number && number === 1) {\n return 1;\n } else {\n const letter = item.replace(/\\(|\\)|\\-|\\./g, '').trim();\n return letter.length === 1 && ['i', 'a', 'I', 'A'].indexOf(letter) > -1 ? 1 : undefined;\n }\n};\n\n/**\n * Maintain the list numbers in list chain\n * e.g. we have two lists:\n * 1, 2, 3 and 4, 5, 6\n * Now we delete list item 2, so the first one becomes \"1, 2\".\n * This edit feature can maintain the list number of the second list to become \"3, 4, 5\"\n */\nconst MaintainListChain: BuildInEditFeature = {\n keys: [Keys.ENTER, Keys.TAB, Keys.DELETE, Keys.BACKSPACE, Keys.RANGE],\n shouldHandleEvent: (event, editor) =>\n editor\n .queryElements('li', QueryScope.OnSelection)\n .filter(li => !li.getElementsByTagName('blockquote').length).length > 0,\n handleEvent: (event, editor) => {\n const chains = getListChains(editor);\n editor.runAsync(editor => commitListChains(editor, chains));\n },\n};\n\nfunction getListChains(editor: IEditor) {\n return VListChain.createListChains(editor.getSelectedRegions());\n}\n\nfunction getCacheNextSibling(event: PluginKeyboardEvent, editor: IEditor): Node | undefined {\n const element = cacheGetEventData(event, 'nextSibling', () => {\n const range = editor.getSelectionRange();\n const pos = range && Position.getEnd(range).normalize();\n const traverser = pos && editor.getBodyTraverser(pos.node);\n return traverser?.getNextBlockElement()?.getStartNode();\n });\n return element;\n}\n\nfunction prepareAutoBullet(editor: IEditor, range: Range) {\n const block = editor.getBlockElementAtNode(range.startContainer);\n const endNode = block?.getEndNode();\n if (endNode && getTagOfNode(endNode) != 'BR') {\n const br = editor.getDocument().createElement('BR');\n if (isBlockElement(endNode)) {\n endNode.appendChild(br);\n } else {\n endNode.parentNode?.insertBefore(br, endNode.nextSibling);\n }\n editor.select(range.startContainer, range.startOffset);\n }\n}\n\nfunction toggleListAndPreventDefault(\n event: PluginKeyboardEvent,\n editor: IEditor,\n includeSiblingLists: boolean = true\n) {\n let listInfo = cacheGetListElement(event, editor);\n if (listInfo) {\n let listElement = listInfo[0];\n let tag = getTagOfNode(listElement);\n\n if (tag == 'UL' || tag == 'OL') {\n toggleListType(\n editor,\n tag == 'UL' ? ListType.Unordered : ListType.Ordered,\n undefined /* startNumber */,\n includeSiblingLists\n );\n }\n\n editor.focus();\n event.rawEvent.preventDefault();\n }\n}\n\nfunction cacheGetListElement(event: PluginKeyboardEvent, editor: IEditor) {\n let li = editor.getElementAtCursor('LI,TABLE', undefined /*startFrom*/, event);\n let listElement = li && getTagOfNode(li) == 'LI' && editor.getElementAtCursor('UL,OL', li);\n return listElement ? [listElement, li] : null;\n}\n\nfunction shouldTriggerList<\n T extends ListType,\n K extends T extends ListType.Ordered ? NumberingListType : BulletListType\n>(\n event: PluginKeyboardEvent,\n editor: IEditor,\n getListStyle: (\n text: string,\n previousListChain?: VListChain[],\n previousListStyle?: K\n ) => K | null,\n listType: T\n) {\n const searcher = editor.getContentSearcherOfCursor(event);\n if (!searcher) {\n return false;\n }\n const textBeforeCursor = searcher.getSubStringBefore(4);\n const traverser = editor.getBlockTraverser();\n const text =\n traverser && traverser.currentBlockElement\n ? traverser.currentBlockElement.getTextContent().slice(0, textBeforeCursor.length)\n : null;\n const isATheBeginning = text && text === textBeforeCursor;\n const listChains = getListChains(editor);\n const textRange = searcher.getRangeFromText(textBeforeCursor, true /*exactMatch*/);\n const previousListType =\n textRange && getPreviousListType(editor, textRange, listType);\n const isFirstItem = isFirstItemOfAList(textBeforeCursor);\n const listStyle = getListStyle(textBeforeCursor, listChains, previousListType ?? undefined);\n const shouldTriggerNewListStyle =\n isFirstItem ||\n !previousListType ||\n previousListType === listStyle ||\n listType === ListType.Unordered;\n\n return (\n isATheBeginning &&\n !searcher.getNearestNonTextInlineElement() &&\n listStyle &&\n shouldTriggerNewListStyle\n );\n}\n\n/**\n * MergeListOnBackspaceAfterList edit feature, provides the ability to merge list on backspace on block after a list.\n */\nconst MergeListOnBackspaceAfterList: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n const target = editor.getElementAtCursor();\n if (target) {\n const cursorBlock = editor.getBlockElementAtNode(target)?.getStartNode() as HTMLElement;\n const previousBlock = cursorBlock?.previousElementSibling ?? null;\n\n if (isList(previousBlock)) {\n const range = editor.getSelectionRange();\n const searcher = editor.getContentSearcherOfCursor(event);\n const textBeforeCursor = searcher?.getSubStringBefore(4);\n const nearestInline = searcher?.getNearestNonTextInlineElement();\n\n if (range && range.collapsed && textBeforeCursor === '' && !nearestInline) {\n const tempBlock = cursorBlock?.nextElementSibling;\n const nextBlock = isList(tempBlock) ? tempBlock : tempBlock?.firstChild;\n\n if (\n isList(nextBlock) &&\n getTagOfNode(previousBlock) == getTagOfNode(nextBlock)\n ) {\n const element = cacheGetEventData(\n event,\n PREVIOUS_BLOCK_CACHE_KEY,\n () => previousBlock\n );\n const nextElement = cacheGetEventData(\n event,\n NEXT_BLOCK_CACHE_KEY,\n () => nextBlock\n );\n\n return !!element && !!nextElement;\n }\n }\n }\n }\n\n return false;\n },\n handleEvent: (event, editor) => {\n editor.runAsync(editor => {\n const previousList = cacheGetEventData(\n event,\n PREVIOUS_BLOCK_CACHE_KEY,\n () => null\n );\n const targetBlock = cacheGetEventData(\n event,\n NEXT_BLOCK_CACHE_KEY,\n () => null\n );\n\n const rangeBeforeWriteBack = editor.getSelectionRange();\n\n if (previousList && targetBlock && rangeBeforeWriteBack) {\n const fvList = new VList(previousList);\n fvList.mergeVList(new VList(targetBlock));\n\n let span = editor.getDocument().createElement('span');\n span.id = 'restoreRange';\n rangeBeforeWriteBack.insertNode(span);\n\n fvList.writeBack();\n\n span = editor.queryElements('#restoreRange')[0];\n\n if (span.parentElement) {\n editor.select(new Position(span, PositionType.After));\n span.parentElement.removeChild(span);\n }\n }\n });\n },\n};\n\n/**\n * @internal\n */\nexport const ListFeatures: Record<\n keyof ListFeatureSettings,\n BuildInEditFeature\n> = {\n autoBullet: AutoBullet,\n indentWhenTab: IndentWhenTab,\n outdentWhenShiftTab: OutdentWhenShiftTab,\n outdentWhenBackspaceOnEmptyFirstLine: OutdentWhenBackOn1stEmptyLine,\n outdentWhenEnterOnEmptyLine: OutdentWhenEnterOnEmptyLine,\n mergeInNewLineWhenBackspaceOnFirstChar: MergeInNewLine,\n maintainListChain: MaintainListChain,\n maintainListChainWhenDelete: MaintainListChainWhenDelete,\n autoNumberingList: AutoNumberingList,\n autoBulletList: AutoBulletList,\n mergeListOnBackspaceAfterList: MergeListOnBackspaceAfterList,\n outdentWhenAltShiftLeft: OutdentWhenAltShiftLeft,\n indentWhenAltShiftRight: IndentWhenAltShiftRight,\n};\n\nfunction isList(element: Node | null | undefined): element is HTMLOListElement | HTMLOListElement {\n return (\n !!element &&\n (safeInstanceOf(element, 'HTMLOListElement') || safeInstanceOf(element, 'HTMLUListElement'))\n );\n}\n","import { cacheGetEventData, createRange, Position, wrap } from 'roosterjs-editor-dom';\nimport type { CompatibleKeys } from 'roosterjs-editor-types/lib/compatibleTypes';\nimport {\n BuildInEditFeature,\n ChangeSource,\n IEditor,\n Keys,\n MarkdownFeatureSettings,\n NodePosition,\n PluginKeyboardEvent,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst ZERO_WIDTH_SPACE = '\\u200B';\n\nfunction generateBasicMarkdownFeature(\n key: Keys | CompatibleKeys,\n triggerCharacter: string,\n elementTag: string,\n useShiftKey: boolean\n): BuildInEditFeature {\n return {\n keys: [key],\n shouldHandleEvent: (event, editor) =>\n event.rawEvent.shiftKey === useShiftKey &&\n !!cacheGetRangeForMarkdownOperation(event, editor, triggerCharacter),\n handleEvent: (event, editor) => {\n // runAsync is here to allow the event to complete so autocomplete will present the trigger character.\n editor.runAsync(editor => {\n handleMarkdownEvent(event, editor, triggerCharacter, elementTag);\n });\n },\n };\n}\n\nfunction cacheGetRangeForMarkdownOperation(\n event: PluginKeyboardEvent,\n editor: IEditor,\n triggerCharacter: string\n): Range | null {\n return cacheGetEventData(event, 'MARKDOWN_RANGE', (): Range | null => {\n const searcher = editor.getContentSearcherOfCursor(event);\n\n let startPosition: NodePosition | null = null;\n let endPosition: NodePosition | null = null;\n searcher?.forEachTextInlineElement(textInlineElement => {\n if (endPosition && startPosition) {\n return true;\n }\n const inlineTextContent = textInlineElement.getTextContent();\n\n // special case for immediately preceding character being whitespace\n if (inlineTextContent[inlineTextContent.length - 1].trim().length == 0) {\n return false;\n }\n\n //if the text is pasted, it might create a inner element inside the text element,\n // then is necessary to check the parent block to get whole text\n const parentBlockText = textInlineElement.getParentBlock().getTextContent();\n\n // special case for consecutive trigger characters\n // check parent block in case of pasted text\n if (parentBlockText[parentBlockText.length - 1].trim() === triggerCharacter) {\n return false;\n }\n\n if (!endPosition) {\n endPosition = textInlineElement.getStartPosition().move(inlineTextContent.length);\n }\n if (inlineTextContent[0] == triggerCharacter) {\n startPosition = textInlineElement.getStartPosition();\n } else {\n let contentIndex = inlineTextContent.length - 1;\n for (; contentIndex > 0; contentIndex--) {\n if (startPosition) {\n return true;\n }\n if (\n inlineTextContent[contentIndex] == triggerCharacter &&\n inlineTextContent[contentIndex - 1].trim().length == 0\n ) {\n startPosition = textInlineElement.getStartPosition().move(contentIndex);\n return true;\n }\n }\n }\n });\n return startPosition && endPosition && createRange(startPosition, endPosition);\n });\n}\n\nfunction handleMarkdownEvent(\n event: PluginKeyboardEvent,\n editor: IEditor,\n triggerCharacter: string,\n elementTag: string\n) {\n editor.addUndoSnapshot(\n () => {\n const range = cacheGetRangeForMarkdownOperation(event, editor, triggerCharacter);\n if (!range) {\n return;\n }\n const lastTypedTriggerPosition = new Position(range.endContainer, PositionType.End);\n const hasLastTypedTrigger = range.endOffset + 1 <= lastTypedTriggerPosition.offset;\n if (!!range && hasLastTypedTrigger) {\n // get the text content range\n const textContentRange = range.cloneRange();\n textContentRange.setStart(\n textContentRange.startContainer,\n textContentRange.startOffset + 1\n );\n\n const text = textContentRange.extractContents().textContent;\n const textNode = editor.getDocument().createTextNode(text ?? '');\n\n // extract content and put it into a new element.\n const elementToWrap = wrap(textNode, elementTag);\n //include last typed character\n range.setEnd(range.endContainer, range.endOffset + 1);\n range.deleteContents();\n\n // ZWS here ensures we don't end up inside the newly created node.\n const nonPrintedSpaceTextNode = editor\n .getDocument()\n .createTextNode(ZERO_WIDTH_SPACE);\n range.insertNode(nonPrintedSpaceTextNode);\n range.insertNode(elementToWrap);\n\n editor.select(nonPrintedSpaceTextNode, PositionType.End);\n }\n },\n ChangeSource.Format,\n true /*canUndoByBackspace*/\n );\n}\n\n/**\n * Markdown bold feature. Make bold text with markdown shortcuts.\n */\nconst MarkdownBold: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.EIGHT_ASTERISK,\n '*',\n 'b',\n true /* useShiftKey */\n);\n\n/**\n * Markdown italics feature. Make italic text with markdown shortcuts.\n */\nconst MarkdownItalic: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.DASH_UNDERSCORE,\n '_',\n 'i',\n true /* useShiftKey */\n);\n\n/**\n * Markdown strikethrough feature. MAke strikethrough text with markdown shortcuts.\n */\nconst MarkdownStrikethrough: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.GRAVE_TILDE,\n '~',\n 's',\n true /* useShiftKey */\n);\n\n/**\n * Markdown inline code feature. Marks specific text as inline code with markdown shortcuts.\n */\nconst MarkdownInlineCode: BuildInEditFeature = generateBasicMarkdownFeature(\n Keys.GRAVE_TILDE,\n '`',\n 'code',\n false /* useShiftKey */\n);\n\n/**\n * @internal\n */\nexport const MarkdownFeatures: Record<\n keyof MarkdownFeatureSettings,\n BuildInEditFeature\n> = {\n markdownBold: MarkdownBold,\n markdownItalic: MarkdownItalic,\n markdownStrikethru: MarkdownStrikethrough,\n markdownInlineCode: MarkdownInlineCode,\n};\n","import { clearFormat } from 'roosterjs-editor-api';\nimport {\n BuildInEditFeature,\n IEditor,\n Keys,\n PluginKeyboardEvent,\n PositionType,\n QuoteFeatureSettings,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n getTagOfNode,\n isNodeEmpty,\n safeInstanceOf,\n splitBalancedNodeRange,\n toArray,\n unwrap,\n wrap,\n} from 'roosterjs-editor-dom';\n\nconst QUOTE_TAG = 'BLOCKQUOTE';\nconst STRUCTURED_TAGS = [QUOTE_TAG, 'LI', 'TD', 'TH'].join(',');\n\n/**\n * UnquoteWhenBackOnEmpty1stLine edit feature, provides the ability to Unquote current line when\n * user press BACKSPACE on first and empty line of a BLOCKQUOTE\n */\nconst UnquoteWhenBackOnEmpty1stLine: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event, editor) => {\n let childOfQuote = cacheGetQuoteChild(event, editor);\n return childOfQuote && isNodeEmpty(childOfQuote) && !childOfQuote.previousSibling;\n },\n handleEvent: splitQuote,\n};\n\n/**\n * UnquoteWhenEnterOnEmptyLine edit feature, provides the ability to Unquote current line when\n * user press ENTER on an empty line of a BLOCKQUOTE\n */\nconst UnquoteWhenEnterOnEmptyLine: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: (event, editor) => {\n let childOfQuote = cacheGetQuoteChild(event, editor);\n let shift = event.rawEvent.shiftKey;\n return !shift && childOfQuote && isNodeEmpty(childOfQuote);\n },\n handleEvent: (event, editor) =>\n editor.addUndoSnapshot(\n () => splitQuote(event, editor),\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n ),\n};\n\nfunction cacheGetQuoteChild(event: PluginKeyboardEvent, editor: IEditor): Node | null {\n return cacheGetEventData(event, 'QUOTE_CHILD', () => {\n let quote = editor.getElementAtCursor(STRUCTURED_TAGS);\n if (quote && getTagOfNode(quote) == QUOTE_TAG) {\n let pos = editor.getFocusedPosition();\n let block = pos && editor.getBlockElementAtNode(pos.normalize().node);\n if (block) {\n let node =\n block.getStartNode() == quote\n ? block.getStartNode()\n : block.collapseToSingleElement();\n return isNodeEmpty(node) ? node : null;\n }\n }\n\n return null;\n });\n}\n\nfunction splitQuote(event: PluginKeyboardEvent, editor: IEditor) {\n editor.addUndoSnapshot(() => {\n let childOfQuote = cacheGetQuoteChild(event, editor);\n if (!childOfQuote) {\n return;\n }\n if (getTagOfNode(childOfQuote) == QUOTE_TAG) {\n childOfQuote = wrap(toArray(childOfQuote.childNodes));\n }\n const parent = splitBalancedNodeRange(childOfQuote);\n const shouldClearFormat = !!parent && isStyledBlockquote(parent);\n const newParent = parent && unwrap(parent);\n editor.select(childOfQuote, PositionType.Begin);\n\n if (shouldClearFormat) {\n if (safeInstanceOf(newParent, 'HTMLLIElement')) {\n newParent.style.removeProperty('color');\n }\n clearFormat(editor);\n }\n });\n event.rawEvent.preventDefault();\n}\n\nconst isStyledBlockquote = (element: Node) => {\n if (\n element &&\n safeInstanceOf(element, 'HTMLQuoteElement') &&\n element.style.borderLeft &&\n element.style.borderColor &&\n element.style.paddingLeft &&\n element.style.color\n ) {\n return true;\n }\n return false;\n};\n\n/**\n * @internal\n */\nexport const QuoteFeatures: Record<\n keyof QuoteFeatureSettings,\n BuildInEditFeature\n> = {\n unquoteWhenBackspaceOnEmptyFirstLine: UnquoteWhenBackOnEmpty1stLine,\n unquoteWhenEnterOnEmptyLine: UnquoteWhenEnterOnEmptyLine,\n};\n","import { Browser, cacheGetEventData } from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n FontSizeChange,\n IEditor,\n Keys,\n PluginEventType,\n PluginKeyboardEvent,\n ShortcutFeatureSettings,\n} from 'roosterjs-editor-types';\nimport {\n changeFontSize,\n toggleBold,\n toggleItalic,\n toggleUnderline,\n toggleBullet,\n toggleNumbering,\n clearFormat,\n} from 'roosterjs-editor-api';\n\ninterface ShortcutCommand {\n winKey: number;\n macKey: number;\n action: (editor: IEditor) => any;\n}\n\nfunction createCommand(\n winKey: number,\n macKey: number,\n action: (editor: IEditor) => any,\n disabled: boolean = false\n) {\n if (disabled) {\n return null;\n }\n return {\n winKey,\n macKey,\n action,\n };\n}\n\nconst commands: ShortcutCommand[] = [\n createCommand(Keys.Ctrl | Keys.B, Keys.Meta | Keys.B, toggleBold),\n createCommand(Keys.Ctrl | Keys.I, Keys.Meta | Keys.I, toggleItalic),\n createCommand(Keys.Ctrl | Keys.U, Keys.Meta | Keys.U, toggleUnderline),\n createCommand(Keys.Ctrl | Keys.SPACE, Keys.Meta | Keys.SPACE, clearFormat),\n createCommand(Keys.Ctrl | Keys.Z, Keys.Meta | Keys.Z, editor => editor.undo()),\n createCommand(\n Keys.ALT | Keys.BACKSPACE,\n Keys.ALT | Keys.BACKSPACE,\n editor => editor.undo(),\n Browser.isMac /* Option+Backspace to be handled by browsers on Mac */\n ),\n createCommand(Keys.Ctrl | Keys.Y, Keys.Meta | Keys.Shift | Keys.Z, editor => editor.redo()),\n createCommand(Keys.Ctrl | Keys.PERIOD, Keys.Meta | Keys.PERIOD, toggleBullet),\n createCommand(Keys.Ctrl | Keys.FORWARD_SLASH, Keys.Meta | Keys.FORWARD_SLASH, toggleNumbering),\n createCommand(\n Keys.Ctrl | Keys.Shift | Keys.PERIOD,\n Keys.Meta | Keys.Shift | Keys.PERIOD,\n editor => changeFontSize(editor, FontSizeChange.Increase)\n ),\n createCommand(\n Keys.Ctrl | Keys.Shift | Keys.COMMA,\n Keys.Meta | Keys.Shift | Keys.COMMA,\n editor => changeFontSize(editor, FontSizeChange.Decrease)\n ),\n].filter((command): command is ShortcutCommand => !!command);\n\n/**\n * DefaultShortcut edit feature, provides shortcuts for the following features:\n * Ctrl/Meta+B: toggle bold style\n * Ctrl/Meta+I: toggle italic style\n * Ctrl/Meta+U: toggle underline style\n * Ctrl/Meta+Space: clear formatting\n * Alt+Backspace: undo\n * Ctrl/Meta+Z: undo\n * Ctrl+Y/Meta+Shift+Z: redo\n * Ctrl/Meta+PERIOD: toggle bullet list\n * Ctrl/Meta+/: toggle numbering list\n * Ctrl/Meta+Shift+>: increase font size\n * Ctrl/Meta+Shift+<: decrease font size\n */\nconst DefaultShortcut: BuildInEditFeature = {\n allowFunctionKeys: true,\n keys: [\n Keys.B,\n Keys.I,\n Keys.U,\n Keys.Y,\n Keys.Z,\n Keys.COMMA,\n Keys.PERIOD,\n Keys.FORWARD_SLASH,\n Keys.SPACE,\n Keys.BACKSPACE,\n ],\n shouldHandleEvent: cacheGetCommand,\n handleEvent: (event, editor) => {\n let command = cacheGetCommand(event);\n if (command) {\n command.action(editor);\n event.rawEvent.preventDefault();\n event.rawEvent.stopPropagation();\n }\n },\n};\n\nfunction cacheGetCommand(event: PluginKeyboardEvent) {\n return cacheGetEventData(event, 'DEFAULT_SHORT_COMMAND', () => {\n let e = event.rawEvent;\n let key =\n // Need to check AltGraph isn't being pressed since some languages (e.g. Polski) use AltGr\n // to input some special characters. In that case, ctrlKey and altKey are both true in Edge,\n // but we should not trigger any shortcut function here. However, we still want to capture\n // the ALT+BACKSPACE combination.\n event.eventType == PluginEventType.KeyDown && !e.getModifierState('AltGraph')\n ? e.which |\n ((e.metaKey && Keys.Meta)) |\n ((e.shiftKey && Keys.Shift)) |\n ((e.ctrlKey && Keys.Ctrl)) |\n ((e.altKey && Keys.ALT))\n : 0;\n return key && commands.filter(cmd => (Browser.isMac ? cmd.macKey : cmd.winKey) == key)[0];\n });\n}\n\n/**\n * @internal\n */\nexport const ShortcutFeatures: Record<\n keyof ShortcutFeatureSettings,\n BuildInEditFeature\n> = {\n defaultShortcut: DefaultShortcut,\n};\n","import {\n BuildInEditFeature,\n IEditor,\n Keys,\n KnownCreateElementDataIndex,\n PluginKeyboardEvent,\n PositionType,\n StructuredNodeFeatureSettings,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n isPositionAtBeginningOf,\n Position,\n getTagOfNode,\n createElement,\n getObjectKeys,\n} from 'roosterjs-editor-dom';\n\nconst CHILD_PARENT_TAG_MAP: { [childTag: string]: string } = {\n TD: 'TABLE',\n TH: 'TABLE',\n LI: 'OL,UL',\n};\nconst CHILD_SELECTOR = getObjectKeys(CHILD_PARENT_TAG_MAP).join(',');\n\n/**\n * InsertLineBeforeStructuredNode edit feature, provides the ability to insert an empty line before\n * a structured element (bullet/numbering list, blockquote, table) if the element is at beginning of\n * document\n */\nconst InsertLineBeforeStructuredNodeFeature: BuildInEditFeature = {\n keys: [Keys.ENTER],\n shouldHandleEvent: cacheGetStructuredElement,\n handleEvent: (event, editor) => {\n let element = cacheGetStructuredElement(event, editor);\n let div = createElement(\n KnownCreateElementDataIndex.EmptyLine,\n editor.getDocument()\n ) as HTMLElement;\n editor.addUndoSnapshot(() => {\n element?.parentNode?.insertBefore(div, element);\n // Select the new line when we are in table. This is the same behavior with Word\n if (getTagOfNode(element) == 'TABLE') {\n editor.select(new Position(div, PositionType.Begin).normalize());\n }\n });\n event.rawEvent.preventDefault();\n },\n defaultDisabled: true,\n};\n\nfunction cacheGetStructuredElement(event: PluginKeyboardEvent, editor: IEditor) {\n return cacheGetEventData(event, 'FIRST_STRUCTURE', () => {\n // Provide a chance to keep browser default behavior by pressing SHIFT\n let element = event.rawEvent.shiftKey ? null : editor.getElementAtCursor(CHILD_SELECTOR);\n\n if (element) {\n let range = editor.getSelectionRange();\n if (\n range &&\n range.collapsed &&\n isPositionAtBeginningOf(Position.getStart(range), element) &&\n !editor.getBodyTraverser(element).getPreviousBlockElement()\n ) {\n return editor.getElementAtCursor(CHILD_PARENT_TAG_MAP[getTagOfNode(element)]);\n }\n }\n\n return null;\n });\n}\n\n/**\n * @internal\n */\nexport const StructuredNodeFeatures: Record<\n keyof StructuredNodeFeatureSettings,\n BuildInEditFeature\n> = {\n insertLineBeforeStructuredNodeFeature: InsertLineBeforeStructuredNodeFeature,\n};\n","import { editTable, setIndentation } from 'roosterjs-editor-api';\nimport {\n BuildInEditFeature,\n IEditor,\n Keys,\n NodeType,\n PluginEvent,\n PositionType,\n TableFeatureSettings,\n TableOperation,\n PluginKeyboardEvent,\n SelectionRangeTypes,\n TableSelectionRange,\n Indentation,\n ExperimentalFeatures,\n} from 'roosterjs-editor-types';\nimport {\n cacheGetEventData,\n contains,\n getTagOfNode,\n isVoidHtmlElement,\n isWholeTableSelected,\n Position,\n VTable,\n} from 'roosterjs-editor-dom';\n\n/**\n * TabInTable edit feature, provides the ability to jump between cells when user press TAB in table\n */\nconst TabInTable: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n cacheGetTableCell(event, editor) && !cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n let shift = event.rawEvent.shiftKey;\n let td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n let vtable = cacheVTable(event, td);\n\n for (\n let step = shift ? -1 : 1, row = vtable.row ?? 0, col = (vtable.col ?? 0) + step;\n ;\n col += step\n ) {\n const tableCells = vtable.cells ?? [];\n if (col < 0 || col >= tableCells[row].length) {\n row += step;\n if (row < 0) {\n editor.select(vtable.table, PositionType.Before);\n break;\n } else if (row >= tableCells.length) {\n editTable(editor, TableOperation.InsertBelow);\n break;\n }\n col = shift ? tableCells[row].length - 1 : 0;\n }\n let cell = vtable.getCell(row, col);\n if (cell.td) {\n const newPos = new Position(cell.td, PositionType.Begin).normalize();\n editor.select(newPos);\n break;\n }\n }\n event.rawEvent.preventDefault();\n },\n};\n\n/**\n * IndentTableOnTab edit feature, provides the ability to indent the table if it is all cells are selected.\n */\nconst IndentTableOnTab: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n cacheGetTableCell(event, editor) && cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n event.rawEvent.preventDefault();\n\n editor.addUndoSnapshot(() => {\n let shift = event.rawEvent.shiftKey;\n let selection = editor.getSelectionRangeEx() as TableSelectionRange;\n let td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n let vtable = cacheVTable(event, td);\n\n if (shift && editor.getElementAtCursor('blockquote', vtable.table, event)) {\n setIndentation(editor, Indentation.Decrease);\n } else if (!shift) {\n setIndentation(editor, Indentation.Increase);\n }\n\n if (selection.coordinates) {\n editor.select(selection.table, selection.coordinates);\n }\n });\n },\n};\n\n/**\n * UpDownInTable edit feature, provides the ability to jump to cell above/below when user press UP/DOWN\n * in table\n */\nconst UpDownInTable: BuildInEditFeature = {\n keys: [Keys.UP, Keys.DOWN],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n cacheGetTableCell(event, editor) && !cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n const td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n const vtable = new VTable(td);\n const isUp = event.rawEvent.which == Keys.UP;\n const step = isUp ? -1 : 1;\n const hasShiftKey = event.rawEvent.shiftKey;\n const selection = editor.getDocument().defaultView?.getSelection();\n let targetTd: HTMLTableCellElement | null = null;\n\n if (selection) {\n let { anchorNode, anchorOffset } = selection;\n\n for (\n let row = vtable.row ?? 0;\n row >= 0 && vtable.cells && row < vtable.cells.length;\n row += step\n ) {\n let cell = vtable.getCell(row, vtable.col ?? 0);\n if (cell.td && cell.td != td) {\n targetTd = cell.td;\n break;\n }\n }\n\n editor.runAsync(editor => {\n let newContainer = editor.getElementAtCursor();\n if (\n contains(vtable.table, newContainer) &&\n !contains(td, newContainer, true /*treatSameNodeAsContain*/)\n ) {\n let newPos = targetTd\n ? new Position(targetTd, PositionType.Begin)\n : new Position(\n vtable.table,\n isUp ? PositionType.Before : PositionType.After\n );\n if (hasShiftKey) {\n newPos =\n newPos.node.nodeType == NodeType.Element &&\n isVoidHtmlElement(newPos.node)\n ? new Position(\n newPos.node,\n newPos.isAtEnd ? PositionType.After : PositionType.Before\n )\n : newPos;\n const selection = editor.getDocument().defaultView?.getSelection();\n if (anchorNode) {\n selection?.setBaseAndExtent(\n anchorNode,\n anchorOffset,\n newPos.node,\n newPos.offset\n );\n }\n } else {\n editor.select(newPos.normalize());\n }\n }\n });\n }\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.DeleteTableWithBackspace\n * Delete a table selected with the table selector pressing Backspace key\n */\nconst DeleteTableWithBackspace: BuildInEditFeature = {\n keys: [Keys.BACKSPACE],\n shouldHandleEvent: (event: PluginKeyboardEvent, editor: IEditor) =>\n editor.isFeatureEnabled(ExperimentalFeatures.DeleteTableWithBackspace) &&\n cacheIsWholeTableSelected(event, editor),\n handleEvent: (event, editor) => {\n const td = cacheGetTableCell(event, editor);\n if (!td) {\n return;\n }\n const vtable = new VTable(td);\n vtable.edit(TableOperation.DeleteTable);\n vtable.writeBack();\n },\n};\n\nfunction cacheGetTableCell(event: PluginEvent, editor: IEditor): HTMLTableCellElement | null {\n return cacheGetEventData(event, 'TABLE_CELL_FOR_TABLE_FEATURES', () => {\n let pos = editor.getFocusedPosition();\n let firstTd = pos && editor.getElementAtCursor('TD,TH,LI', pos.node);\n return (\n firstTd && (getTagOfNode(firstTd) == 'LI' ? null : (firstTd as HTMLTableCellElement))\n );\n });\n}\n\nfunction cacheIsWholeTableSelected(event: PluginEvent, editor: IEditor) {\n return cacheGetEventData(event, 'WHOLE_TABLE_SELECTED_FOR_FEATURES', () => {\n const td = cacheGetTableCell(event, editor);\n if (!td) {\n return false;\n }\n let vtable = cacheVTable(event, td);\n let selection = editor.getSelectionRangeEx();\n return (\n selection.type == SelectionRangeTypes.TableSelection &&\n selection.coordinates &&\n isWholeTableSelected(vtable, selection.coordinates)\n );\n });\n}\n\nfunction cacheVTable(event: PluginEvent, td: HTMLTableCellElement) {\n return cacheGetEventData(event, 'VTABLE_FOR_TABLE_FEATURES', () => {\n return new VTable(td);\n });\n}\n\n/**\n * @internal\n */\nexport const TableFeatures: Record<\n keyof TableFeatureSettings,\n BuildInEditFeature\n> = {\n tabInTable: TabInTable,\n upDownInTable: UpDownInTable,\n indentTableOnTab: IndentTableOnTab,\n deleteTableWithBackspace: DeleteTableWithBackspace,\n};\n","import { setIndentation } from 'roosterjs-editor-api';\nimport {\n createRange,\n getEntitySelector,\n getTagOfNode,\n Position,\n queryElements,\n} from 'roosterjs-editor-dom';\nimport {\n BuildInEditFeature,\n IEditor,\n Indentation,\n TextFeatureSettings,\n Keys,\n PluginKeyboardEvent,\n SelectionRangeTypes,\n ContentPosition,\n PositionType,\n ExperimentalFeatures,\n NodePosition,\n QueryScope,\n} from 'roosterjs-editor-types';\n\nconst TAB_SPACES = 6;\n\n/**\n * Requires @see ExperimentalFeatures.TabKeyTextFeatures to be enabled\n * Provides additional functionality when press Tab:\n * If Whole Paragraph selected, indent paragraph,\n * If range is collapsed, add tab spaces\n * If range is not collapsed but not all the paragraph is selected, replace selection with Tab spaces\n * If there are more than one block in the selection, indent all selection\n */\nconst IndentWhenTabText: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event, editor) => {\n if (\n editor.isFeatureEnabled(ExperimentalFeatures.TabKeyTextFeatures) &&\n !event.rawEvent.shiftKey\n ) {\n let activeElement = editor.getDocument().activeElement as HTMLElement;\n const listOrTable = editor.getElementAtCursor(\n 'LI,TABLE',\n undefined /*startFrom*/,\n event\n );\n const entity = editor.getElementAtCursor(\n getEntitySelector(),\n undefined /*startFrom*/,\n event\n );\n\n return (\n !listOrTable &&\n (entity ? entity.isContentEditable : activeElement.isContentEditable)\n );\n }\n\n return false;\n },\n handleEvent: (event, editor) => {\n const selection = editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.Normal) {\n editor.addUndoSnapshot(() => {\n if (selection.areAllCollapsed) {\n insertTab(editor, event);\n } else {\n const { ranges } = selection;\n const range = ranges[0];\n if (shouldSetIndentation(editor, range)) {\n setIndentation(editor, Indentation.Increase);\n } else {\n const tempRange = createRange(range.startContainer, range.startOffset);\n ranges.forEach(range => range.deleteContents());\n editor.select(tempRange);\n insertTab(editor, event);\n }\n }\n });\n\n event.rawEvent.preventDefault();\n }\n },\n};\n\n/**\n * Requires @see ExperimentalFeatures.TabKeyTextFeatures to be enabled\n * If Whole Paragraph selected, outdent paragraph on Tab press\n */\nconst OutdentWhenTabText: BuildInEditFeature = {\n keys: [Keys.TAB],\n shouldHandleEvent: (event, editor) => {\n if (\n event.rawEvent.shiftKey &&\n editor.isFeatureEnabled(ExperimentalFeatures.TabKeyTextFeatures)\n ) {\n const selection = editor.getSelectionRangeEx();\n\n return (\n selection.type == SelectionRangeTypes.Normal &&\n !selection.areAllCollapsed &&\n editor.getElementAtCursor('blockquote', undefined, event) &&\n !editor.getElementAtCursor('LI,TABLE', undefined /*startFrom*/, event) &&\n shouldSetIndentation(editor, selection.ranges[0])\n );\n }\n\n return false;\n },\n handleEvent: (event, editor) => {\n editor.addUndoSnapshot(() => setIndentation(editor, Indentation.Decrease));\n\n event.rawEvent.preventDefault();\n },\n};\n\n/**\n * @deprecated\n * Automatically transform -- into hyphen, if typed between two words.\n */\nconst AutoHyphen: BuildInEditFeature = {\n keys: [],\n shouldHandleEvent: (event, editor) => {\n return false;\n },\n handleEvent: (event, editor) => {\n return false;\n },\n defaultDisabled: true,\n};\n\n/**\n * @internal\n */\nexport const TextFeatures: Record<\n keyof TextFeatureSettings,\n BuildInEditFeature\n> = {\n indentWhenTabText: IndentWhenTabText,\n outdentWhenTabText: OutdentWhenTabText,\n autoHyphen: AutoHyphen,\n};\n\nfunction shouldSetIndentation(editor: IEditor, range: Range): boolean {\n let result: boolean = false;\n\n const startPosition: NodePosition = Position.getStart(range);\n const endPosition: NodePosition = Position.getEnd(range);\n const firstBlock = editor.getBlockElementAtNode(startPosition.node);\n const lastBlock = editor.getBlockElementAtNode(endPosition.node);\n\n if (!firstBlock || !lastBlock) {\n return false;\n }\n\n if (!firstBlock.equals(lastBlock)) {\n //If the selections has more than one block, we indent all the blocks in the selection\n return true;\n } else {\n //We only indent a single block if all the block is selected.\n const blockStart = new Position(firstBlock.getStartNode(), PositionType.Begin);\n const blockEnd = new Position(firstBlock.getEndNode(), PositionType.End);\n\n const rangeBefore = createRange(blockStart, Position.getStart(range));\n const rangeAfter = createRange(Position.getEnd(range), blockEnd);\n\n if (!result && isRangeEmpty(rangeBefore) && isRangeEmpty(rangeAfter)) {\n result = true;\n }\n\n return result;\n }\n}\n\nfunction isRangeEmpty(range: Range) {\n return (\n range.toString() == '' &&\n queryElements(\n range.commonAncestorContainer as ParentNode,\n 'img,table,ul,ol',\n null,\n QueryScope.InSelection,\n range\n ).length == 0\n );\n}\n\nfunction insertTab(editor: IEditor, event: PluginKeyboardEvent) {\n const span = editor.getDocument().createElement('span');\n let searcher = editor.getContentSearcherOfCursor(event);\n if (!searcher) {\n return;\n }\n const charsBefore = searcher.getSubStringBefore(Number.MAX_SAFE_INTEGER);\n const numberOfChars = TAB_SPACES - (charsBefore.length % TAB_SPACES);\n let span2: HTMLSpanElement | null = null;\n\n let textContent = '';\n for (let index = 0; index < numberOfChars; index++) {\n textContent += ' ';\n }\n editor.insertNode(span);\n if (span.nextElementSibling && getTagOfNode(span.nextElementSibling) == 'A') {\n span2 = editor.getDocument().createElement('span');\n span2.textContent = ' ';\n editor.insertNode(span2);\n editor.select(createRange(span2, PositionType.Before));\n }\n editor.insertContent(textContent, {\n position: ContentPosition.Range,\n range: createRange(span, PositionType.Begin),\n updateCursor: false,\n });\n editor.select(createRange(span, PositionType.After));\n if (span2) {\n editor.deleteNode(span2);\n }\n}\n","import { AutoLinkFeatures } from './features/autoLinkFeatures';\nimport { CursorFeatures } from './features/cursorFeatures';\nimport { EntityFeatures } from './features/entityFeatures';\nimport { ListFeatures } from './features/listFeatures';\nimport { MarkdownFeatures } from './features/markdownFeatures';\nimport { QuoteFeatures } from './features/quoteFeatures';\nimport { ShortcutFeatures } from './features/shortcutFeatures';\nimport { StructuredNodeFeatures } from './features/structuredNodeFeatures';\nimport { TableFeatures } from './features/tableFeatures';\nimport { TextFeatures } from './features/textFeatures';\nimport { CodeFeatures } from './features/codeFeatures';\nimport {\n BuildInEditFeature,\n ContentEditFeatureSettings,\n PluginEvent,\n} from 'roosterjs-editor-types';\n\nconst allFeatures = {\n ...ListFeatures,\n ...QuoteFeatures,\n ...TableFeatures,\n ...StructuredNodeFeatures,\n ...AutoLinkFeatures,\n ...ShortcutFeatures,\n ...CursorFeatures,\n ...MarkdownFeatures,\n ...EntityFeatures,\n ...TextFeatures,\n ...CodeFeatures,\n};\n\n/**\n * Get all content edit features provided by roosterjs\n */\nexport default function getAllFeatures() {\n return allFeatures as Record>;\n}\n","export { default as ContentEdit } from './ContentEdit';\nexport { default as getAllFeatures } from './getAllFeatures';\n","/**\n * @internal\n * Convert english alphabet numbers into decimal numbers\n * @param letter The letter that needs to be converted\n * @returns\n */\nexport default function convertAlphaToDecimals(letter: string): number | null {\n const alpha = letter.toLocaleLowerCase();\n if (alpha) {\n const size = alpha.length - 1;\n const number = 26 * size + alpha.charCodeAt(size) - 96;\n return number;\n }\n return null;\n}\n","import { BulletListType } from 'roosterjs-editor-types';\n\nconst bulletListType: Record = {\n '*': BulletListType.Disc,\n '-': BulletListType.Dash,\n '--': BulletListType.Square,\n '->': BulletListType.LongArrow,\n '-->': BulletListType.DoubleLongArrow,\n '=>': BulletListType.UnfilledArrow,\n '>': BulletListType.ShortArrow,\n '—': BulletListType.Hyphen,\n};\n\nconst identifyBulletListType = (bullet: string): BulletListType | null => {\n return bulletListType[bullet] || null;\n};\n\n/**\n * @internal\n * @param textBeforeCursor The trigger character\n * @returns The style of a bullet list triggered by a string\n */\nexport default function getAutoBulletListStyle(textBeforeCursor: string): BulletListType | null {\n const trigger = textBeforeCursor.trim();\n const bulletType = identifyBulletListType(trigger);\n return bulletType;\n}\n","import convertAlphaToDecimals from './convertAlphaToDecimals';\nimport { NumberingListType } from 'roosterjs-editor-types';\nimport { VListChain } from 'roosterjs-editor-dom';\n\nconst enum NumberingTypes {\n Decimal = 1,\n LowerAlpha = 2,\n UpperAlpha = 3,\n LowerRoman = 4,\n UpperRoman = 5,\n}\n\nconst enum Character {\n Dot = 1,\n Dash = 2,\n Parenthesis = 3,\n DoubleParenthesis = 4,\n}\n\nconst characters: Record = {\n '.': Character.Dot,\n '-': Character.Dash,\n ')': Character.Parenthesis,\n};\n\nconst lowerRomanTypes = [\n NumberingListType.LowerRoman,\n NumberingListType.LowerRomanDash,\n NumberingListType.LowerRomanDoubleParenthesis,\n NumberingListType.LowerRomanParenthesis,\n];\nconst upperRomanTypes = [\n NumberingListType.UpperRoman,\n NumberingListType.UpperRomanDash,\n NumberingListType.UpperRomanDoubleParenthesis,\n NumberingListType.UpperRomanParenthesis,\n];\nconst numberingTriggers = ['1', 'a', 'A', 'I', 'i'];\nconst lowerRomanNumbers = ['i', 'v', 'x', 'l', 'c', 'd', 'm'];\nconst upperRomanNumbers = ['I', 'V', 'X', 'L', 'C', 'D', 'M'];\n\nconst identifyNumberingType = (text: string, previousListStyle?: NumberingListType) => {\n if (!isNaN(parseInt(text))) {\n return NumberingTypes.Decimal;\n } else if (/[a-z]+/g.test(text)) {\n if (\n (previousListStyle != undefined &&\n lowerRomanTypes.indexOf(previousListStyle) > -1 &&\n lowerRomanNumbers.indexOf(text[0]) > -1) ||\n (!previousListStyle && text === 'i')\n ) {\n return NumberingTypes.LowerRoman;\n } else if (previousListStyle || (!previousListStyle && text === 'a')) {\n return NumberingTypes.LowerAlpha;\n }\n } else if (/[A-Z]+/g.test(text)) {\n if (\n (previousListStyle != undefined &&\n upperRomanTypes.indexOf(previousListStyle) > -1 &&\n upperRomanNumbers.indexOf(text[0]) > -1) ||\n (!previousListStyle && text === 'I')\n ) {\n return NumberingTypes.UpperRoman;\n } else if (previousListStyle || (!previousListStyle && text === 'A')) {\n return NumberingTypes.UpperAlpha;\n }\n }\n};\n\nconst numberingListTypes: Record number | null> = {\n [NumberingTypes.Decimal]: char => DecimalsTypes[char] || null,\n [NumberingTypes.LowerAlpha]: char => LowerAlphaTypes[char] || null,\n [NumberingTypes.UpperAlpha]: char => UpperAlphaTypes[char] || null,\n [NumberingTypes.LowerRoman]: char => LowerRomanTypes[char] || null,\n [NumberingTypes.UpperRoman]: char => UpperRomanTypes[char] || null,\n};\n\nconst UpperRomanTypes: Record = {\n [Character.Dot]: NumberingListType.UpperRoman,\n [Character.Dash]: NumberingListType.UpperRomanDash,\n [Character.Parenthesis]: NumberingListType.UpperRomanParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.UpperRomanDoubleParenthesis,\n};\n\nconst LowerRomanTypes: Record = {\n [Character.Dot]: NumberingListType.LowerRoman,\n [Character.Dash]: NumberingListType.LowerRomanDash,\n [Character.Parenthesis]: NumberingListType.LowerRomanParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.LowerRomanDoubleParenthesis,\n};\n\nconst UpperAlphaTypes: Record = {\n [Character.Dot]: NumberingListType.UpperAlpha,\n [Character.Dash]: NumberingListType.UpperAlphaDash,\n [Character.Parenthesis]: NumberingListType.UpperAlphaParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.UpperAlphaDoubleParenthesis,\n};\n\nconst LowerAlphaTypes: Record = {\n [Character.Dot]: NumberingListType.LowerAlpha,\n [Character.Dash]: NumberingListType.LowerAlphaDash,\n [Character.Parenthesis]: NumberingListType.LowerAlphaParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.LowerAlphaDoubleParenthesis,\n};\n\nconst DecimalsTypes: Record = {\n [Character.Dot]: NumberingListType.Decimal,\n [Character.Dash]: NumberingListType.DecimalDash,\n [Character.Parenthesis]: NumberingListType.DecimalParenthesis,\n [Character.DoubleParenthesis]: NumberingListType.DecimalDoubleParenthesis,\n};\n\nconst identifyNumberingListType = (\n numbering: string,\n isDoubleParenthesis: boolean,\n previousListStyle?: NumberingListType\n): NumberingListType | null => {\n const separatorCharacter = isDoubleParenthesis\n ? Character.DoubleParenthesis\n : characters[numbering[numbering.length - 1]];\n // if separator is not valid, no need to check if the number is valid.\n if (separatorCharacter) {\n const number = isDoubleParenthesis ? numbering.slice(1, -1) : numbering.slice(0, -1);\n const numberingType = identifyNumberingType(number, previousListStyle);\n return numberingType ? numberingListTypes[numberingType](separatorCharacter) : null;\n }\n return null;\n};\n\n/**\n * @internal\n * @param textBeforeCursor The trigger character\n * @param previousListChain @optional This parameters is used to keep the list chain, if the is not a new list\n * @param previousListStyle @optional The list style of the previous list\n * @returns The style of a numbering list triggered by a string\n */\nexport default function getAutoNumberingListStyle(\n textBeforeCursor: string,\n previousListChain?: VListChain[],\n previousListStyle?: NumberingListType\n): NumberingListType | null {\n const trigger = textBeforeCursor.trim();\n const isDoubleParenthesis = trigger[0] === '(' && trigger[trigger.length - 1] === ')';\n //Only the staring items ['1', 'a', 'A', 'I', 'i'] must trigger a new list. All the other triggers is used to keep the list chain.\n //The index is always the characters before the last character\n const listIndex = isDoubleParenthesis ? trigger.slice(1, -1) : trigger.slice(0, -1);\n\n const indexNumber = parseInt(listIndex);\n let index = !isNaN(indexNumber) ? indexNumber : convertAlphaToDecimals(listIndex);\n\n if (!index || index < 1) {\n return null;\n }\n\n if (previousListChain && index > 1) {\n if (\n (previousListChain.length < 1 && numberingTriggers.indexOf(listIndex) < 0) ||\n (previousListChain?.length > 0 &&\n !previousListChain[previousListChain.length - 1]?.canAppendAtCursor(index))\n ) {\n return null;\n }\n }\n\n const numberingType = isValidNumbering(listIndex)\n ? identifyNumberingListType(trigger, isDoubleParenthesis, previousListStyle)\n : null;\n return numberingType;\n}\n\n/**\n * Check if index has only numbers or only letters to avoid sequence of character such 1:1. trigger a list.\n * @param index\n * @returns\n */\nfunction isValidNumbering(index: string) {\n return Number(index) || /^[A-Za-z\\s]*$/.test(index);\n}\n","import { createElement } from 'roosterjs-editor-dom';\nimport {\n EditorPlugin,\n IEditor,\n KnownCreateElementDataIndex,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\n\n/**\n * Context Menu options for ContextMenu plugin\n */\nexport interface ContextMenuOptions {\n /**\n * Render function for the context menu\n * @param container The container HTML element, it will be located at the mouse click position,\n * so the callback just need to render menu content into this container\n * @param onDismiss The onDismiss callback, some menu render need to know this callback so that\n * it can handle the dismiss event\n */\n render: (container: HTMLElement, items: (T | null)[], onDismiss: () => void) => void;\n\n /**\n * Dismiss function for the context menu, it will be called when user wants to dismiss this context menu\n * e.g. user click away so the menu should be dismissed\n * @param container The container HTML element\n */\n dismiss?: (container: HTMLElement) => void;\n\n /**\n * Whether the default context menu is allowed. @default false\n */\n allowDefaultMenu?: boolean;\n}\n\n/**\n * An editor plugin that support showing a context menu using render() function from options parameter\n */\nexport default class ContextMenu implements EditorPlugin {\n private container: HTMLElement | null = null;\n private editor: IEditor | null = null;\n private isMenuShowing: boolean = false;\n\n /**\n * Create a new instance of ContextMenu class\n * @param options An options object to determine how to show/hide the context menu\n */\n constructor(private options: ContextMenuOptions) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ContextMenu';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.onDismiss();\n\n if (this.container?.parentNode) {\n this.container.parentNode.removeChild(this.container);\n this.container = null;\n }\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (event.eventType == PluginEventType.ContextMenu && event.items.length > 0) {\n const { rawEvent, items } = event;\n\n this.onDismiss();\n\n if (!this.options.allowDefaultMenu) {\n rawEvent.preventDefault();\n }\n\n if (this.initContainer(rawEvent.pageX, rawEvent.pageY)) {\n this.options.render(this.container!, items as T[], this.onDismiss);\n this.isMenuShowing = true;\n }\n }\n }\n\n private initContainer(x: number, y: number) {\n if (!this.container && this.editor) {\n this.container = createElement(\n KnownCreateElementDataIndex.ContextMenuWrapper,\n this.editor.getDocument()\n ) as HTMLElement;\n this.editor.getDocument().body.appendChild(this.container);\n }\n this.container?.style.setProperty('left', x + 'px');\n this.container?.style.setProperty('top', y + 'px');\n return !!this.container;\n }\n\n private onDismiss = () => {\n if (this.container && this.isMenuShowing) {\n this.options.dismiss?.(this.container);\n this.isMenuShowing = false;\n }\n };\n}\n","export { default as ContextMenu, ContextMenuOptions } from './ContextMenu';\n","import {\n CustomReplacement,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n PositionType,\n} from 'roosterjs-editor-types';\n\nconst makeReplacement = (\n sourceString: string,\n replacementHTML: string,\n matchSourceCaseSensitive: boolean,\n shouldReplace?: (\n replacement: CustomReplacement,\n content: string,\n sourceEditor?: IEditor\n ) => boolean\n): CustomReplacement => ({\n sourceString,\n replacementHTML,\n matchSourceCaseSensitive,\n shouldReplace,\n});\n\nconst defaultReplacements: CustomReplacement[] = [\n makeReplacement(':)', '🙂', true),\n makeReplacement(';)', '😉', true),\n makeReplacement(':O', '😲', true),\n makeReplacement(':o', '😯', true),\n makeReplacement('<3', '❤️', true),\n];\n\n/**\n * Wrapper for CustomReplaceContentEditFeature that provides an API for updating the\n * content edit feature\n */\nexport default class CustomReplacePlugin implements EditorPlugin {\n private longestReplacementLength: number | null = null;\n private editor: IEditor | null = null;\n private replacements: CustomReplacement[] | null = null;\n private replacementEndCharacters: Set | null = null;\n\n /**\n * Create instance of CustomReplace plugin\n * @param replacements Replacement rules. If not passed, a default replacement rule set will be applied\n */\n constructor(replacements: CustomReplacement[] = defaultReplacements) {\n this.updateReplacements(replacements);\n }\n\n /**\n * Set the replacements that this plugin is looking for.\n * @param newReplacements new set of replacements for this plugin\n */\n updateReplacements(newReplacements: CustomReplacement[]) {\n this.replacements = newReplacements;\n this.longestReplacementLength = getLongestReplacementSourceLength(this.replacements);\n this.replacementEndCharacters = getReplacementEndCharacters(this.replacements);\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'CustomReplace';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n public initialize(editor: IEditor): void {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n public dispose(): void {\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n public onPluginEvent(event: PluginEvent) {\n if (event.eventType != PluginEventType.Input || !this.editor || this.editor.isInIME()) {\n return;\n }\n\n // Exit early on input events that do not insert a replacement's final character.\n if (!event.rawEvent.data || !this.replacementEndCharacters?.has(event.rawEvent.data)) {\n return;\n }\n\n // Get the matching replacement\n const searcher = this.editor.getContentSearcherOfCursor(event);\n if (!searcher || this.longestReplacementLength == null) {\n return;\n }\n const stringToSearch = searcher.getSubStringBefore(this.longestReplacementLength);\n\n const replacement = this.getMatchingReplacement(stringToSearch);\n\n if (\n !replacement ||\n (replacement.shouldReplace &&\n searcher &&\n !replacement.shouldReplace(replacement, searcher.getWordBefore(), this.editor))\n ) {\n return;\n }\n\n // Reconstruct a selection of the text on the document that matches the\n // replacement we selected.\n const matchingText = searcher.getSubStringBefore(replacement.sourceString.length);\n const matchingRange = searcher.getRangeFromText(matchingText, true /* exactMatch */);\n\n // parse the html string off the dom and inline the resulting element.\n const document = this.editor.getDocument();\n const parsingSpan = document.createElement('span');\n parsingSpan.innerHTML = this.editor.getTrustedHTMLHandler()(replacement.replacementHTML);\n const nodeToInsert =\n parsingSpan.childNodes.length == 1 ? parsingSpan.childNodes[0] : parsingSpan;\n\n // Switch the node for the selection range\n if (matchingRange) {\n this.editor.addUndoSnapshot(\n () => {\n matchingRange.deleteContents();\n matchingRange.insertNode(nodeToInsert);\n this.editor?.select(nodeToInsert, PositionType.End);\n },\n undefined /*changeSource*/,\n true /*canUndoByBackspace*/\n );\n }\n }\n\n private getMatchingReplacement(stringToSearch: string): CustomReplacement | null {\n if (stringToSearch.length == 0 || !this.replacements) {\n return null;\n }\n const originalStringToSearch = stringToSearch.replace(/\\s/g, ' ');\n const lowerCaseStringToSearch = originalStringToSearch.toLocaleLowerCase();\n for (const replacement of this.replacements) {\n const [sourceMatch, replacementMatch] = replacement.matchSourceCaseSensitive\n ? [originalStringToSearch, replacement.sourceString]\n : [lowerCaseStringToSearch, replacement.sourceString.toLocaleLowerCase()];\n\n if (\n sourceMatch.substring(sourceMatch.length - replacementMatch.length) ==\n replacementMatch\n ) {\n return replacement;\n }\n }\n return null;\n }\n}\n\nfunction getLongestReplacementSourceLength(replacements: CustomReplacement[]): number {\n return Math.max.apply(\n null,\n replacements.map(replacement => replacement.sourceString.length)\n );\n}\n\nfunction getReplacementEndCharacters(replacements: CustomReplacement[]): Set {\n const endChars = new Set();\n for (let replacement of replacements) {\n const sourceString = replacement.sourceString;\n if (sourceString.length == 0) {\n continue;\n }\n const lastChar = sourceString[sourceString.length - 1];\n if (!replacement.matchSourceCaseSensitive) {\n endChars.add(lastChar.toLocaleLowerCase());\n endChars.add(lastChar.toLocaleUpperCase());\n } else {\n endChars.add(lastChar);\n }\n }\n return endChars;\n}\n","export { default as CustomReplace } from './CustomReplace';\n","import { commitListChains } from 'roosterjs-editor-api';\nimport { VListChain } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\nimport type { CompatibleChangeSource } from 'roosterjs-editor-types/lib/compatibleTypes';\n\n/**\n * Maintain list numbers of list chain when content is modified by cut/paste/drag&drop\n */\nexport default class CutPasteListChain implements EditorPlugin {\n private chains: VListChain[] | null = null;\n private expectedChangeSource: ChangeSource | CompatibleChangeSource | null = null;\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'CutPasteListChain';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler('drop', this.onDrop);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.BeforeCutCopy:\n if (event.isCut) {\n this.cacheListChains(ChangeSource.Cut);\n }\n break;\n\n case PluginEventType.BeforePaste:\n this.cacheListChains(ChangeSource.Paste);\n break;\n\n case PluginEventType.ContentChanged:\n if (\n this.chains &&\n this.chains.length > 0 &&\n this.expectedChangeSource == event.source &&\n this.editor\n ) {\n commitListChains(this.editor, this.chains);\n this.chains = null;\n this.expectedChangeSource = null;\n }\n break;\n }\n }\n\n private onDrop = () => {\n this.cacheListChains(ChangeSource.Drop);\n };\n\n private cacheListChains(source: ChangeSource) {\n const selectedRegions = this.editor?.getSelectedRegions();\n if (selectedRegions) {\n this.chains = VListChain.createListChains(selectedRegions);\n this.expectedChangeSource = source;\n }\n }\n}\n","export { default as CutPasteListChain } from './CutPasteListChain';\n","import { isCharacterValue, isCtrlOrMetaPressed, matchLink } from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n DOMEventHandler,\n EditorPlugin,\n IEditor,\n Keys,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\n\n/**\n * An editor plugin that show a tooltip for existing link\n */\nexport default class HyperLink implements EditorPlugin {\n private originalHref: string | null = null;\n private trackedLink: HTMLAnchorElement | null = null;\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n\n /**\n * Create a new instance of HyperLink class\n * @param getTooltipCallback A callback function to get tooltip text for an existing hyperlink.\n * Default value is to return the href itself. If null, there will be no tooltip text.\n * @param target (Optional) Target window name for hyperlink. If null, will use \"_blank\"\n * @param onLinkClick (Optional) Open link callback (return false to use default behavior)\n */\n constructor(\n private getTooltipCallback: (href: string, a: HTMLAnchorElement) => string = href => href,\n private target?: string,\n private onLinkClick?: (anchor: HTMLAnchorElement, mouseEvent: MouseEvent) => boolean | void\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Hyperlink';\n }\n\n /**\n * Initialize this plugin\n * @param editor The editor instance\n */\n public initialize(editor: IEditor): void {\n this.editor = editor;\n this.disposer = editor.addDomEventHandler({\n mouseover: this.onMouse,\n mouseout: this.onMouse,\n blur: this.onBlur,\n });\n }\n\n protected onMouse = (e: MouseEvent) => {\n const a = this.editor?.getElementAtCursor(\n 'a[href]',\n e.target\n ) as HTMLAnchorElement | null;\n const href = a && this.tryGetHref(a);\n\n if (href) {\n this.editor?.setEditorDomAttribute(\n 'title',\n e.type == 'mouseover' ? this.getTooltipCallback(href, a) : null\n );\n }\n };\n\n protected onBlur = (e: FocusEvent) => {\n if (this.trackedLink) {\n this.updateLinkHrefIfShouldUpdate();\n }\n\n this.resetLinkTracking();\n };\n\n /**\n * Dispose this plugin\n */\n public dispose(): void {\n if (this.disposer) {\n this.disposer();\n this.disposer = null;\n }\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n public onPluginEvent(event: PluginEvent): void {\n if (\n event.eventType == PluginEventType.MouseUp ||\n (event.eventType == PluginEventType.KeyUp &&\n (!this.isContentEditValue(event.rawEvent) || event.rawEvent.which == Keys.SPACE)) ||\n event.eventType == PluginEventType.ContentChanged\n ) {\n const anchor = this.editor?.getElementAtCursor(\n 'A[href]',\n undefined /*startFrom*/,\n event\n ) as HTMLAnchorElement | null;\n\n const shouldCheckUpdateLink =\n (anchor && anchor !== this.trackedLink) ||\n event.eventType == PluginEventType.KeyUp ||\n event.eventType == PluginEventType.ContentChanged;\n\n if (\n event.eventType == PluginEventType.ContentChanged &&\n event.source == ChangeSource.Keyboard &&\n this.trackedLink != anchor &&\n anchor\n ) {\n // For Keyboard event that causes content change (mostly come from Content Model), this tracked list may be staled.\n // So we need to get an up-to-date link element\n // TODO: This is a temporary solution. Later when Content Model can fully take over this behavior, we can remove this code.\n this.trackedLink = anchor;\n }\n\n if (\n this.trackedLink &&\n (shouldCheckUpdateLink || this.tryGetHref(this.trackedLink) !== this.originalHref)\n ) {\n // If cursor has moved out of previously tracked link\n // update link href if display text doesn't match href anymore.\n if (shouldCheckUpdateLink) {\n this.updateLinkHrefIfShouldUpdate();\n }\n\n // If the link's href value was edited, or the cursor has moved out of the\n // previously tracked link, stop tracking the link.\n this.resetLinkTracking();\n }\n\n // Cache link and href value if its href attribute currently matches its display text\n if (!this.trackedLink && anchor && this.doesLinkDisplayMatchHref(anchor)) {\n this.trackedLink = anchor;\n this.originalHref = this.tryGetHref(anchor);\n }\n }\n\n if (event.eventType == PluginEventType.MouseUp) {\n const anchor = this.editor?.getElementAtCursor(\n 'A',\n event.rawEvent.srcElement\n ) as HTMLAnchorElement | null;\n\n if (anchor) {\n if (this.onLinkClick && this.onLinkClick(anchor, event.rawEvent) !== false) {\n return;\n }\n\n let href: string | null;\n if (\n (href = this.tryGetHref(anchor)) &&\n isCtrlOrMetaPressed(event.rawEvent) &&\n event.rawEvent.button === 0\n ) {\n event.rawEvent.preventDefault();\n try {\n const target = this.target || '_blank';\n const window = this.editor?.getDocument().defaultView;\n window?.open(href, target);\n } catch {}\n }\n }\n }\n }\n\n /**\n * Try get href from an anchor element\n * The reason this is put in a try-catch is that\n * it has been seen that accessing href may throw an exception, in particular on IE/Edge\n */\n private tryGetHref(anchor: HTMLAnchorElement): string | null {\n try {\n return anchor ? anchor.href : null;\n } catch {\n return null;\n }\n }\n\n /**\n * Determines if KeyboardEvent is meant to edit content\n */\n private isContentEditValue(event: KeyboardEvent): boolean {\n return (\n isCharacterValue(event) || event.which == Keys.BACKSPACE || event.which == Keys.DELETE\n );\n }\n\n /**\n * Updates the href of the tracked link if the display text doesn't match href anymore\n */\n private updateLinkHrefIfShouldUpdate() {\n if (this.trackedLink && !this.doesLinkDisplayMatchHref(this.trackedLink)) {\n this.updateLinkHref();\n }\n }\n\n /**\n * Clears the tracked link and its original href value so that it's back to default state\n */\n private resetLinkTracking() {\n this.trackedLink = null;\n this.originalHref = '';\n }\n\n /**\n * Compares the normalized URL of inner text of element to its href to see if they match.\n */\n private doesLinkDisplayMatchHref(element: HTMLAnchorElement): boolean {\n if (element) {\n let display = element.innerText.trim();\n\n // We first escape the display text so that any text passed into the regex is not\n // treated as a special character.\n let escapedDisplay = display.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n let rule = new RegExp(`^(?:https?:\\\\/\\\\/)?${escapedDisplay}\\\\/?`, 'i');\n let href = this.tryGetHref(element);\n if (href !== null) {\n return rule.test(href);\n }\n }\n\n return false;\n }\n\n /**\n * Update href of an element in place to new display text if it's a valid URL\n */\n private updateLinkHref() {\n if (this.trackedLink) {\n let linkData = matchLink(this.trackedLink.innerText.trim());\n if (linkData !== null) {\n this.editor?.addUndoSnapshot(() => {\n this.trackedLink!.href = linkData!.normalizedUrl;\n });\n }\n }\n }\n}\n","export { default as HyperLink } from './HyperLink';\n","import applyChange from './editInfoUtils/applyChange';\nimport canRegenerateImage from './api/canRegenerateImage';\nimport DragAndDropContext, { DNDDirectionX, DnDDirectionY } from './types/DragAndDropContext';\nimport DragAndDropHandler from '../../pluginUtils/DragAndDropHandler';\nimport DragAndDropHelper from '../../pluginUtils/DragAndDropHelper';\nimport getGeneratedImageSize from './editInfoUtils/getGeneratedImageSize';\nimport ImageEditInfo from './types/ImageEditInfo';\nimport ImageHtmlOptions from './types/ImageHtmlOptions';\nimport { Cropper, getCropHTML } from './imageEditors/Cropper';\nimport { deleteEditInfo, getEditInfoFromImage } from './editInfoUtils/editInfo';\nimport { getRotateHTML, Rotator, updateRotateHandlePosition } from './imageEditors/Rotator';\nimport { ImageEditElementClass } from './types/ImageEditElementClass';\nimport { tryToConvertGifToPng } from './editInfoUtils/tryToConvertGifToPng';\nimport {\n arrayPush,\n Browser,\n createElement,\n getComputedStyle,\n getObjectKeys,\n safeInstanceOf,\n toArray,\n unwrap,\n wrap,\n} from 'roosterjs-editor-dom';\nimport {\n Resizer,\n doubleCheckResize,\n getSideResizeHTML,\n getCornerResizeHTML,\n OnShowResizeHandle,\n getResizeBordersHTML,\n} from './imageEditors/Resizer';\nimport {\n ImageEditOperation,\n ImageEditOptions,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n CreateElementData,\n KnownCreateElementDataIndex,\n ModeIndependentColor,\n SelectionRangeTypes,\n ChangeSource,\n} from 'roosterjs-editor-types';\nimport type { CompatibleImageEditOperation } from 'roosterjs-editor-types/lib/compatibleTypes';\n\nconst PI = Math.PI;\nconst DIRECTIONS = 8;\nconst DirectionRad = (PI * 2) / DIRECTIONS;\nconst DirectionOrder = ['nw', 'n', 'ne', 'e', 'se', 's', 'sw', 'w'];\n\n/**\n * Default image edit options\n */\nconst DefaultOptions: Required = {\n borderColor: '#DB626C',\n minWidth: 10,\n minHeight: 10,\n preserveRatio: false,\n minRotateDeg: 5,\n imageSelector: 'img',\n rotateIconHTML: '',\n disableCrop: false,\n disableRotate: false,\n disableSideResize: false,\n onSelectState: ImageEditOperation.ResizeAndRotate,\n};\n\n/**\n * Map the image edit operation to a function that returns editing elements HTML to help\n * build image editing UI\n */\nconst ImageEditHTMLMap = {\n [ImageEditOperation.CornerResize]: getCornerResizeHTML,\n [ImageEditOperation.SideResize]: getSideResizeHTML,\n [ImageEditOperation.Rotate]: getRotateHTML,\n [ImageEditOperation.Crop]: getCropHTML,\n};\n\n/**\n * Default background colors for rotate handle\n */\nconst LIGHT_MODE_BGCOLOR = 'white';\nconst DARK_MODE_BGCOLOR = '#333';\n\n/**\n * The biggest area of image with 4 handles\n */\nconst MAX_SMALL_SIZE_IMAGE = 10000;\n\n/**\n * ImageEdit plugin provides the ability to edit an inline image in editor, including image resizing, rotation and cropping\n */\nexport default class ImageEdit implements EditorPlugin {\n protected editor: IEditor | null = null;\n protected options: ImageEditOptions;\n private disposer: (() => void) | null = null;\n\n // Allowed editing operations\n private allowedOperations: ImageEditOperation;\n\n // Current editing image\n private image: HTMLImageElement | null = null;\n\n // Image cloned from the current editing image\n private clonedImage: HTMLImageElement | null = null;\n\n // The image wrapper\n private wrapper: HTMLSpanElement | null = null;\n\n // Current edit info of the image. All changes user made will be stored in this object.\n // We use this object to update the editing UI, and finally we will use this object to generate\n // the new image if necessary\n private editInfo: ImageEditInfo | null = null;\n\n // Src of the image before current editing\n private lastSrc: string | null = null;\n\n // Drag and drop helper objects\n private dndHelpers: DragAndDropHelper[] = [];\n\n /**\n * Identify if the image was resized by the user.\n */\n private wasResized: boolean = false;\n\n /**\n * The span element that wraps the image and opens shadow dom\n */\n private shadowSpan: HTMLSpanElement | null = null;\n\n /**\n * The span element that wraps the image and opens shadow dom\n */\n private isCropping: boolean = false;\n\n /**\n * If the image is a gif, this is the png source of the gif image\n */\n private pngSource: string | null = null;\n\n /**\n * Create a new instance of ImageEdit\n * @param options Image editing options\n * @param onShowResizeHandle An optional callback to allow customize resize handle element of image resizing.\n * To customize the resize handle element, add this callback and change the attributes of elementData then it\n * will be picked up by ImageEdit code\n */\n constructor(options?: ImageEditOptions, private onShowResizeHandle?: OnShowResizeHandle) {\n this.options = {\n ...DefaultOptions,\n ...(options || {}),\n };\n\n this.allowedOperations =\n ImageEditOperation.CornerResize |\n (this.options.disableCrop ? 0 : ImageEditOperation.Crop) |\n (this.options.disableRotate ? 0 : ImageEditOperation.Rotate) |\n (this.options.disableSideResize ? 0 : ImageEditOperation.SideResize);\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'ImageEdit';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = editor.addDomEventHandler({\n blur: () => this.onBlur(),\n dragstart: e => {\n if (this.image) {\n e.preventDefault();\n }\n },\n });\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.clearDndHelpers();\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param e PluginEvent object\n */\n onPluginEvent(e: PluginEvent) {\n switch (e.eventType) {\n case PluginEventType.SelectionChanged:\n if (\n e.selectionRangeEx &&\n e.selectionRangeEx.type === SelectionRangeTypes.ImageSelection &&\n this.options &&\n this.options.onSelectState !== undefined\n ) {\n this.setEditingImage(e.selectionRangeEx.image, this.options.onSelectState);\n }\n\n break;\n case PluginEventType.MouseDown:\n // When left click in a image that already in editing mode, do not quit edit mode\n const mouseTarget = e.rawEvent.target;\n const button = e.rawEvent.button;\n if (\n this.shadowSpan !== mouseTarget ||\n (this.shadowSpan === mouseTarget && button !== 0) ||\n this.isCropping\n ) {\n this.setEditingImage(null);\n }\n break;\n case PluginEventType.KeyDown:\n this.setEditingImage(null);\n break;\n case PluginEventType.ContentChanged:\n //After contentChanged event, the current image wrapper may not be valid any more, remove all of them if any\n this.removeWrapper();\n break;\n\n case PluginEventType.ExtractContentWithDom:\n // When extract content, remove all image info since they may not be valid when load the content again\n if (this.options?.imageSelector) {\n toArray(e.clonedRoot.querySelectorAll(this.options.imageSelector)).forEach(\n img => {\n deleteEditInfo(img as HTMLImageElement);\n }\n );\n }\n break;\n case PluginEventType.BeforeDispose:\n this.removeWrapper();\n break;\n }\n }\n\n /**\n * Check if the given image edit operation is allowed by this plugin\n * @param operation The image edit operation to check\n * @returns True means it is allowed, otherwise false\n */\n isOperationAllowed(operation: ImageEditOperation): boolean {\n return !!(this.allowedOperations & operation);\n }\n\n /**\n * Set current image for edit. If there is already image in editing, it will quit editing mode and any pending editing\n * operation will be submitted\n * @param image The image to edit\n * @param operation The editing operation\n */\n setEditingImage(\n image: HTMLImageElement,\n operation: ImageEditOperation | CompatibleImageEditOperation\n ): void;\n\n /**\n * Stop editing image. If there is already image in editing, it will quit editing mode and any pending editing\n * operation will be submitted\n * @param image The image to edit\n * @param selectImage True to select this image after quit editing mode\n */\n setEditingImage(image: null, selectImage?: boolean): void;\n\n setEditingImage(\n image: HTMLImageElement | null,\n operationOrSelect?: ImageEditOperation | CompatibleImageEditOperation | boolean\n ) {\n let operation =\n typeof operationOrSelect === 'number' ? operationOrSelect : ImageEditOperation.None;\n const selectImage = typeof operationOrSelect === 'number' ? false : !!operationOrSelect;\n\n if (\n !image &&\n this.image &&\n this.editor &&\n this.editInfo &&\n this.lastSrc &&\n this.clonedImage\n ) {\n // When there is image in editing, clean up any cached objects and elements\n this.clearDndHelpers();\n\n // If the image is a gif we change the editing image to a new png image, then we need to change the\n // image source to the original gif image\n if (this.pngSource) {\n this.clonedImage.src = this.editInfo.src;\n }\n\n // Apply the changes, and add undo snapshot if necessary\n applyChange(\n this.editor,\n this.image,\n this.editInfo,\n this.lastSrc,\n this.wasResized || this.isCropping,\n this.clonedImage\n );\n\n // Remove editing wrapper\n this.removeWrapper();\n\n this.editor.addUndoSnapshot(() => this.image, ChangeSource.ImageResize);\n\n if (selectImage) {\n this.editor.select(this.image);\n }\n\n this.pngSource = null;\n this.image = null;\n this.editInfo = null;\n this.lastSrc = null;\n this.clonedImage = null;\n this.isCropping = false;\n }\n\n if (!this.image && image?.isContentEditable && this.editor) {\n // If there is new image to edit, enter editing mode for this image\n this.editor.addUndoSnapshot();\n this.image = image;\n\n // Get initial edit info\n this.editInfo = getEditInfoFromImage(image);\n\n //Check if the image is a gif and convert it to a png\n this.pngSource = tryToConvertGifToPng(this.editInfo);\n\n //Check if the image was resized by the user\n this.wasResized = checkIfImageWasResized(this.image);\n\n operation =\n (canRegenerateImage(image) ? operation : ImageEditOperation.Resize) &\n this.allowedOperations;\n\n // Create and update editing wrapper and elements\n this.createWrapper(operation);\n this.updateWrapper();\n\n // Init drag and drop\n this.dndHelpers = [\n ...this.createDndHelpers(ImageEditElementClass.ResizeHandle, Resizer),\n ...this.createDndHelpers(ImageEditElementClass.RotateHandle, Rotator),\n ...this.createDndHelpers(ImageEditElementClass.CropHandle, Cropper),\n ...this.createDndHelpers(ImageEditElementClass.CropContainer, Cropper),\n ];\n\n this.editor.select(this.image);\n }\n }\n\n /**\n * Flip the image.\n * @param image The image to be flipped\n * @param direction\n */\n public flipImage(image: HTMLImageElement, direction: 'vertical' | 'horizontal') {\n this.image = image;\n this.editInfo = getEditInfoFromImage(image);\n const { angleRad } = this.editInfo;\n const isInVerticalPostion =\n (angleRad >= Math.PI / 2 && angleRad < (3 * Math.PI) / 4) ||\n (angleRad <= -Math.PI / 2 && angleRad > (-3 * Math.PI) / 4);\n if (isInVerticalPostion) {\n if (direction === 'horizontal') {\n this.editInfo.flippedVertical = !this.editInfo.flippedVertical;\n } else {\n this.editInfo.flippedHorizontal = !this.editInfo.flippedHorizontal;\n }\n } else {\n if (direction === 'vertical') {\n this.editInfo.flippedVertical = !this.editInfo.flippedVertical;\n } else {\n this.editInfo.flippedHorizontal = !this.editInfo.flippedHorizontal;\n }\n }\n this.createWrapper(ImageEditOperation.Rotate);\n this.updateWrapper();\n this.setEditingImage(null);\n this.editor?.select(image);\n }\n\n /**\n * Rotate the image in radian angle.\n * @param image The image to be rotated\n * @param angleRad The angle in radian that the image must be rotated.\n */\n public rotateImage(image: HTMLImageElement, angleRad: number) {\n this.image = image;\n this.editInfo = getEditInfoFromImage(image);\n this.editInfo.angleRad = this.editInfo.angleRad + angleRad;\n this.createWrapper(ImageEditOperation.Rotate);\n this.updateWrapper();\n this.setEditingImage(null);\n this.editor?.select(image);\n }\n\n /**\n * quit editing mode when editor lose focus\n */\n private onBlur = () => {\n this.setEditingImage(null, false /* selectImage */);\n };\n /**\n * Create editing wrapper for the image\n */\n private createWrapper(operation: ImageEditOperation | CompatibleImageEditOperation) {\n if (this.image && this.editor && this.options && this.editInfo) {\n //Clone the image and insert the clone in a entity\n this.clonedImage = this.image.cloneNode(true) as HTMLImageElement;\n this.clonedImage.removeAttribute('id');\n this.clonedImage.style.removeProperty('max-width');\n this.clonedImage.style.width = this.editInfo.widthPx + 'px';\n this.clonedImage.style.height = this.editInfo.heightPx + 'px';\n this.wrapper = createElement(\n KnownCreateElementDataIndex.ImageEditWrapper,\n this.image.ownerDocument\n ) as HTMLSpanElement;\n this.wrapper?.firstChild?.appendChild(this.clonedImage);\n this.wrapper.style.display = Browser.isSafari ? 'inline-block' : 'inline-flex';\n\n // Cache current src so that we can compare it after edit see if src is changed\n this.lastSrc = this.image.getAttribute('src');\n\n // Set image src to original src to help show editing UI, also it will be used when regenerate image dataURL after editing\n if (this.clonedImage) {\n this.clonedImage.src = this.pngSource ?? this.editInfo.src;\n setFlipped(\n this.clonedImage,\n this.editInfo.flippedHorizontal,\n this.editInfo.flippedVertical\n );\n this.clonedImage.style.position = 'absolute';\n }\n\n // Get HTML for all edit elements (resize handle, rotate handle, crop handle and overlay, ...) and create HTML element\n const options: ImageHtmlOptions = {\n borderColor: getColorString(this.options.borderColor!, this.editor.isDarkMode()),\n rotateIconHTML: this.options.rotateIconHTML!,\n rotateHandleBackColor: this.editor.isDarkMode()\n ? DARK_MODE_BGCOLOR\n : LIGHT_MODE_BGCOLOR,\n isSmallImage: isASmallImage(this.editInfo!),\n };\n const htmlData: CreateElementData[] = [getResizeBordersHTML(options)];\n\n getObjectKeys(ImageEditHTMLMap).forEach(thisOperation => {\n const element = ImageEditHTMLMap[thisOperation](options, this.onShowResizeHandle);\n if ((operation & thisOperation) == thisOperation && element) {\n arrayPush(htmlData, element);\n }\n });\n\n htmlData.forEach(data => {\n const element = createElement(data, this.image!.ownerDocument);\n if (element && this.wrapper) {\n this.wrapper.appendChild(element);\n }\n });\n this.insertImageWrapper(this.wrapper);\n }\n }\n\n private insertImageWrapper(wrapper: HTMLSpanElement) {\n if (this.image) {\n this.shadowSpan = wrap(this.image, 'span');\n const shadowRoot = this.shadowSpan.attachShadow({\n mode: 'open',\n });\n\n this.shadowSpan.style.verticalAlign = 'bottom';\n this.shadowSpan.style.fontSize = '24px';\n\n shadowRoot.appendChild(wrapper);\n }\n }\n\n /**\n * Remove the temp wrapper of the image\n */\n private removeWrapper = () => {\n if (this.shadowSpan) {\n unwrap(this.shadowSpan);\n }\n this.wrapper = null;\n this.shadowSpan = null;\n };\n\n /**\n * Update image edit elements to reflect current editing result\n * @param context\n */\n private updateWrapper = (context?: DragAndDropContext) => {\n const wrapper = this.wrapper;\n if (\n wrapper &&\n this.editInfo &&\n this.image &&\n this.clonedImage &&\n this.options &&\n this.shadowSpan?.parentElement\n ) {\n // Prepare: get related editing elements\n const cropContainers = getEditElements(wrapper, ImageEditElementClass.CropContainer);\n const cropOverlays = getEditElements(wrapper, ImageEditElementClass.CropOverlay);\n const resizeHandles = getEditElements(wrapper, ImageEditElementClass.ResizeHandle);\n const rotateCenter = getEditElements(wrapper, ImageEditElementClass.RotateCenter)[0];\n const rotateHandle = getEditElements(wrapper, ImageEditElementClass.RotateHandle)[0];\n const cropHandles = getEditElements(wrapper, ImageEditElementClass.CropHandle);\n\n // Cropping and resizing will show different UI, so check if it is cropping here first\n this.isCropping = cropContainers.length == 1 && cropOverlays.length == 4;\n const {\n angleRad,\n bottomPercent,\n leftPercent,\n rightPercent,\n topPercent,\n } = this.editInfo;\n\n // Width/height of the image\n const {\n targetWidth,\n targetHeight,\n originalWidth,\n originalHeight,\n visibleWidth,\n visibleHeight,\n } = getGeneratedImageSize(this.editInfo, this.isCropping);\n\n const marginHorizontal = (targetWidth - visibleWidth) / 2;\n const marginVertical = (targetHeight - visibleHeight) / 2;\n const cropLeftPx = originalWidth * leftPercent;\n const cropRightPx = originalWidth * rightPercent;\n const cropTopPx = originalHeight * topPercent;\n const cropBottomPx = originalHeight * bottomPercent;\n\n // Update size and margin of the wrapper\n wrapper.style.margin = `${marginVertical}px ${marginHorizontal}px`;\n wrapper.style.transform = `rotate(${angleRad}rad)`;\n setWrapperSizeDimensions(wrapper, this.image, visibleWidth, visibleHeight);\n\n // Update the text-alignment to avoid the image to overflow if the parent element have align center or right\n // or if the direction is Right To Left\n wrapper.style.textAlign = isRtl(this.shadowSpan.parentElement) ? 'right' : 'left';\n\n // Update size of the image\n this.clonedImage.style.width = getPx(originalWidth);\n this.clonedImage.style.height = getPx(originalHeight);\n\n if (this.isCropping) {\n // For crop, we also need to set position of the overlays\n setSize(\n cropContainers[0],\n cropLeftPx,\n cropTopPx,\n cropRightPx,\n cropBottomPx,\n undefined,\n undefined\n );\n setSize(cropOverlays[0], 0, 0, cropRightPx, undefined, undefined, cropTopPx);\n setSize(cropOverlays[1], undefined, 0, 0, cropBottomPx, cropRightPx, undefined);\n setSize(cropOverlays[2], cropLeftPx, undefined, 0, 0, undefined, cropBottomPx);\n setSize(cropOverlays[3], 0, cropTopPx, undefined, 0, cropLeftPx, undefined);\n\n updateHandleCursor(cropHandles, angleRad);\n } else {\n // For rotate/resize, set the margin of the image so that cropped part won't be visible\n this.clonedImage.style.margin = `${-cropTopPx}px 0 0 ${-cropLeftPx}px`;\n\n // Double check resize\n if (context?.elementClass == ImageEditElementClass.ResizeHandle) {\n const clientWidth = wrapper.clientWidth;\n const clientHeight = wrapper.clientHeight;\n this.wasResized = true;\n doubleCheckResize(\n this.editInfo,\n this.options.preserveRatio || false,\n clientWidth,\n clientHeight\n );\n\n this.updateWrapper();\n }\n\n const viewport = this.editor?.getVisibleViewport();\n if (rotateHandle && rotateCenter && viewport) {\n updateRotateHandlePosition(viewport, rotateCenter, rotateHandle);\n }\n\n updateHandleCursor(resizeHandles, angleRad);\n }\n }\n };\n\n /**\n * Create drag and drop helpers\n * @param wrapper\n * @param elementClass\n * @param dragAndDrop\n */\n private createDndHelpers(\n elementClass: ImageEditElementClass,\n dragAndDrop: DragAndDropHandler\n ): DragAndDropHelper[] {\n const wrapper = this.wrapper;\n return wrapper && this.editInfo\n ? getEditElements(wrapper, elementClass).map(\n element =>\n new DragAndDropHelper(\n element,\n {\n editInfo: this.editInfo!,\n options: this.options,\n elementClass,\n x: element.dataset.x as DNDDirectionX,\n y: element.dataset.y as DnDDirectionY,\n },\n this.updateWrapper,\n dragAndDrop,\n this.editor ? this.editor.getZoomScale() : 1\n )\n )\n : [];\n }\n\n /**\n * Clean up drag and drop helpers\n */\n private clearDndHelpers() {\n this.dndHelpers?.forEach(helper => helper.dispose());\n this.dndHelpers = [];\n }\n}\n\nfunction setSize(\n element: HTMLElement,\n left: number | undefined,\n top: number | undefined,\n right: number | undefined,\n bottom: number | undefined,\n width: number | undefined,\n height: number | undefined\n) {\n element.style.left = left !== undefined ? getPx(left) : element.style.left;\n element.style.top = top !== undefined ? getPx(top) : element.style.top;\n element.style.right = right !== undefined ? getPx(right) : element.style.right;\n element.style.bottom = bottom !== undefined ? getPx(bottom) : element.style.bottom;\n element.style.width = width !== undefined ? getPx(width) : element.style.width;\n element.style.height = height !== undefined ? getPx(height) : element.style.height;\n}\n\nfunction setWrapperSizeDimensions(\n wrapper: HTMLElement,\n image: HTMLImageElement,\n width: number,\n height: number\n) {\n const hasBorder = image.style.borderStyle;\n if (hasBorder) {\n const borderWidth = image.style.borderWidth ? 2 * parseInt(image.style.borderWidth) : 2;\n wrapper.style.width = getPx(width + borderWidth);\n wrapper.style.height = getPx(height + borderWidth);\n return;\n }\n wrapper.style.width = getPx(width);\n wrapper.style.height = getPx(height);\n}\n\nfunction getPx(value: number): string {\n return value + 'px';\n}\n\nfunction getEditElements(wrapper: HTMLElement, elementClass: ImageEditElementClass): HTMLElement[] {\n return toArray(wrapper.querySelectorAll('.' + elementClass)) as HTMLElement[];\n}\n\nfunction isRtl(element: Node): boolean {\n return safeInstanceOf(element, 'HTMLElement')\n ? getComputedStyle(element, 'direction') == 'rtl'\n : false;\n}\n\nfunction handleRadIndexCalculator(angleRad: number): number {\n let idx = Math.round(angleRad / DirectionRad) % DIRECTIONS;\n return idx < 0 ? idx + DIRECTIONS : idx;\n}\n\nfunction rotateHandles(angleRad: number, y: string = '', x: string = ''): string {\n const radIndex = handleRadIndexCalculator(angleRad);\n const originalDirection = y + x;\n const originalIndex = DirectionOrder.indexOf(originalDirection);\n const rotatedIndex = originalIndex >= 0 && originalIndex + radIndex;\n return rotatedIndex ? DirectionOrder[rotatedIndex % DIRECTIONS] : '';\n}\n\n/**\n * Rotate the resizer and cropper handles according to the image position.\n * @param handles The resizer handles.\n * @param angleRad The angle that the image was rotated.\n */\nfunction updateHandleCursor(handles: HTMLElement[], angleRad: number) {\n handles.map(handle => {\n const y = handle.dataset.y;\n const x = handle.dataset.x;\n handle.style.cursor = `${rotateHandles(angleRad, y, x)}-resize`;\n });\n}\n\n/**\n * Check if the current image was resized by the user\n * @param image the current image\n * @returns if the user resized the image, returns true, otherwise, returns false\n */\nfunction checkIfImageWasResized(image: HTMLImageElement): boolean {\n const { width, height, style } = image;\n const isMaxWidthInitial =\n style.maxWidth === '' || style.maxWidth === 'initial' || style.maxWidth === 'auto';\n if (\n isMaxWidthInitial &&\n (isFixedNumberValue(style.height) ||\n isFixedNumberValue(style.width) ||\n isFixedNumberValue(width) ||\n isFixedNumberValue(height))\n ) {\n return true;\n } else {\n return false;\n }\n}\n\nfunction isFixedNumberValue(value: string | number) {\n const numberValue = typeof value === 'string' ? parseInt(value) : value;\n return !isNaN(numberValue);\n}\n\nfunction isASmallImage(editInfo: ImageEditInfo): boolean {\n const { widthPx, heightPx } = editInfo;\n return widthPx && heightPx && widthPx * widthPx < MAX_SMALL_SIZE_IMAGE ? true : false;\n}\n\nfunction getColorString(color: string | ModeIndependentColor, isDarkMode: boolean): string {\n if (typeof color === 'string') {\n return color.trim();\n }\n return isDarkMode ? color.darkModeColor.trim() : color.lightModeColor.trim();\n}\n\nfunction setFlipped(\n element: HTMLImageElement,\n flippedHorizontally?: boolean,\n flippedVertically?: boolean\n) {\n element.style.transform = `scale(${flippedHorizontally ? '-1' : '1'}, ${\n flippedVertically ? '-1' : '1'\n })`;\n}\n","/**\n * Check if we can regenerate edited image from the source image.\n * An image can't regenerate result when there is CORS issue of the source content.\n * @param img The image element to test\n * @returns True when we can regenerate the edited image, otherwise false\n */\nexport default function canRegenerateImage(img: HTMLImageElement): boolean {\n if (!img) {\n return false;\n }\n\n try {\n const canvas = img.ownerDocument.createElement('canvas');\n canvas.width = 10;\n canvas.height = 10;\n const context = canvas.getContext('2d');\n if (context) {\n context.drawImage(img, 0, 0);\n context.getImageData(0, 0, 1, 1);\n return true;\n }\n\n return false;\n } catch {\n return false;\n }\n}\n","import getTargetSizeByPercentage from '../editInfoUtils/getTargetSizeByPercentage';\nimport { getEditInfoFromImage } from '../editInfoUtils/editInfo';\n\n/**\n * Check if the image is already resized to the given percentage\n * @param image The image to check\n * @param percentage The percentage to check\n */\nexport default function isResizedTo(image: HTMLImageElement, percentage: number): boolean {\n const editInfo = getEditInfoFromImage(image);\n if (editInfo) {\n const { width, height } = getTargetSizeByPercentage(editInfo, percentage);\n return (\n Math.round(width) == Math.round(editInfo.widthPx) &&\n Math.round(height) == Math.round(editInfo.heightPx)\n );\n }\n return false;\n}\n","import { ChangeSource, IEditor } from 'roosterjs-editor-types';\nimport { deleteEditInfo } from '../editInfoUtils/editInfo';\n\n/**\n * Remove explicit width & height attributes on the image element.\n * @param editor The editor that contains the image\n * @param image The image to remove w/h from\n */\nexport default function resetImage(editor: IEditor, image: HTMLImageElement) {\n editor.addUndoSnapshot(() => {\n image.style.width = '';\n image.style.height = '';\n image.style.maxWidth = '100%';\n image.removeAttribute('width');\n image.removeAttribute('height');\n deleteEditInfo(image);\n }, ChangeSource.ImageResize);\n}\n","import applyChange from '../editInfoUtils/applyChange';\nimport getTargetSizeByPercentage from '../editInfoUtils/getTargetSizeByPercentage';\nimport isResizedTo from './isResizedTo';\nimport { ChangeSource, IEditor } from 'roosterjs-editor-types';\nimport { getEditInfoFromImage } from '../editInfoUtils/editInfo';\n\n/**\n * Resize the image by percentage of its natural size. If the image is cropped or rotated,\n * the final size will also calculated with crop and rotate info.\n * @param editor The editor that contains the image\n * @param image The image to resize\n * @param percentage Percentage to resize to\n * @param minWidth Minimum width\n * @param minHeight Minimum height\n */\nexport default function resizeByPercentage(\n editor: IEditor,\n image: HTMLImageElement,\n percentage: number,\n minWidth: number,\n minHeight: number\n) {\n const editInfo = getEditInfoFromImage(image);\n\n if (!isResizedTo(image, percentage)) {\n loadImage(image, image.src, () => {\n if (!editor.isDisposed() && editor.contains(image) && editInfo) {\n const lastSrc = image.getAttribute('src');\n const { width, height } = getTargetSizeByPercentage(editInfo, percentage);\n editInfo.widthPx = Math.max(width, minWidth);\n editInfo.heightPx = Math.max(height, minHeight);\n\n editor.addUndoSnapshot(() => {\n applyChange(editor, image, editInfo, lastSrc || '', true /*wasResized*/);\n }, ChangeSource.ImageResize);\n editor.select(image);\n }\n });\n }\n}\n\nfunction loadImage(img: HTMLImageElement, src: string, callback: () => void) {\n img.onload = () => {\n img.onload = null;\n img.onerror = null;\n callback();\n };\n img.onerror = () => {\n img.onload = null;\n img.onerror = null;\n callback();\n };\n img.src = src;\n}\n","import checkEditInfoState, { ImageEditInfoState } from './checkEditInfoState';\nimport generateDataURL from './generateDataURL';\nimport getGeneratedImageSize from './getGeneratedImageSize';\nimport ImageEditInfo from '../types/ImageEditInfo';\nimport { deleteEditInfo, getEditInfoFromImage, saveEditInfo } from './editInfo';\nimport { IEditor, PluginEventType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Apply changes from the edit info of an image, write result to the image\n * @param editor The editor object that contains the image\n * @param image The image to apply the change\n * @param editInfo Edit info that contains the changed information of the image\n * @param previousSrc Last src value of the image before the change was made\n * @param wasResizedOrCropped if the image was resized or cropped apply the new image dimensions\n * @param editingImage (optional) Image in editing state\n */\nexport default function applyChange(\n editor: IEditor,\n image: HTMLImageElement,\n editInfo: ImageEditInfo,\n previousSrc: string,\n wasResizedOrCropped: boolean,\n editingImage?: HTMLImageElement\n) {\n let newSrc = '';\n\n const initEditInfo = getEditInfoFromImage(editingImage ?? image);\n const state = checkEditInfoState(editInfo, initEditInfo);\n\n switch (state) {\n case ImageEditInfoState.ResizeOnly:\n // For resize only case, no need to generate a new image, just reuse the original one\n newSrc = editInfo.src;\n break;\n case ImageEditInfoState.SameWithLast:\n // For SameWithLast case, image may be resized but the content is still the same with last one,\n // so no need to create a new image, but just reuse last one\n newSrc = previousSrc;\n break;\n case ImageEditInfoState.FullyChanged:\n // For other cases (cropped, rotated, ...) we need to create a new image to reflect the change\n newSrc = generateDataURL(editingImage ?? image, editInfo);\n break;\n }\n\n const srcChanged = newSrc != previousSrc;\n\n if (srcChanged) {\n // If the src is changed, fire an EditImage event so that plugins knows that a new image is used, and can\n // replace the new src with some other string and it will be used and set to the image\n const event = editor.triggerPluginEvent(PluginEventType.EditImage, {\n image: image,\n originalSrc: editInfo.src,\n previousSrc,\n newSrc,\n });\n newSrc = event.newSrc;\n }\n\n if (newSrc == editInfo.src) {\n // If newSrc is the same with original one, it means there is only size change, but no rotation, no cropping,\n // so we don't need to keep edit info, we can delete it\n deleteEditInfo(image);\n } else {\n // Otherwise, save the new edit info to the image so that next time when we edit the same image, we know\n // the edit info\n saveEditInfo(image, editInfo);\n }\n\n // Write back the change to image, and set its new size\n const { targetWidth, targetHeight } = getGeneratedImageSize(editInfo);\n image.src = newSrc;\n\n if (wasResizedOrCropped || state == ImageEditInfoState.FullyChanged) {\n image.width = targetWidth;\n image.height = targetHeight;\n }\n}\n","import ImageEditInfo, { CropInfo, ResizeInfo, RotateInfo } from '../types/ImageEditInfo';\n\nconst RESIZE_KEYS: (keyof ResizeInfo)[] = ['widthPx', 'heightPx'];\nconst ROTATE_KEYS: (keyof RotateInfo)[] = ['angleRad'];\nconst CROP_KEYS: (keyof CropInfo)[] = [\n 'leftPercent',\n 'rightPercent',\n 'topPercent',\n 'bottomPercent',\n];\nconst ROTATE_CROP_KEYS: (keyof RotateInfo | keyof CropInfo)[] = [...ROTATE_KEYS, ...CROP_KEYS];\nconst ALL_KEYS = [...ROTATE_CROP_KEYS, ...RESIZE_KEYS];\n\n/**\n * @internal\n * State of an edit info object for image editing.\n * It is returned by checkEditInfoState() function\n */\nexport const enum ImageEditInfoState {\n /**\n * Invalid edit info. It means the given edit info object is either null,\n * or not all its member are of correct type\n */\n Invalid,\n\n /**\n * The edit info shows that it is only potentially edited by resizing action.\n * Image is not rotated or cropped, or event not changed at all.\n */\n ResizeOnly,\n\n /**\n * When compare with another edit info, this value can be returned when both current\n * edit info and the other one are not been rotated, and they have same cropping\n * percentages. So that they can share the same image src, only width and height\n * need to be adjusted.\n */\n SameWithLast,\n\n /**\n * When this value is returned, it means the image is edited by either cropping or\n * rotation, or both. Image source can't be reused, need to generate a new image src\n * data uri.\n */\n FullyChanged,\n}\n\n/**\n * @internal\n * Check the state of an edit info\n * @param editInfo The edit info to check\n * @param compareTo An optional edit info to compare to\n * @returns If the source edit info is not valid (wrong type, missing field, ...), returns Invalid.\n * If the source edit info doesn't contain any rotation or cropping, returns ResizeOnly\n * If the compare edit info exists, and both of them don't contain rotation, and the have same cropping values,\n * returns SameWithLast. Otherwise, returns FullyChanged\n */\nexport default function checkEditInfoState(\n editInfo: ImageEditInfo,\n compareTo?: ImageEditInfo\n): ImageEditInfoState {\n if (!editInfo || !editInfo.src || ALL_KEYS.some(key => !isNumber(editInfo[key]))) {\n return ImageEditInfoState.Invalid;\n } else if (\n ROTATE_CROP_KEYS.every(key => areSameNumber(editInfo[key], 0)) &&\n !editInfo.flippedHorizontal &&\n !editInfo.flippedVertical &&\n (!compareTo || (compareTo && editInfo.angleRad === compareTo.angleRad))\n ) {\n return ImageEditInfoState.ResizeOnly;\n } else if (\n compareTo &&\n ROTATE_KEYS.every(key => areSameNumber(editInfo[key], 0)) &&\n ROTATE_KEYS.every(key => areSameNumber(compareTo[key], 0)) &&\n CROP_KEYS.every(key => areSameNumber(editInfo[key], compareTo[key])) &&\n compareTo.flippedHorizontal === editInfo.flippedHorizontal &&\n compareTo.flippedVertical === editInfo.flippedVertical\n ) {\n return ImageEditInfoState.SameWithLast;\n } else {\n return ImageEditInfoState.FullyChanged;\n }\n}\n\nfunction isNumber(o: any): o is number {\n return typeof o === 'number';\n}\n\nfunction areSameNumber(n1: number, n2: number) {\n return Math.abs(n1 - n2) < 1e-3;\n}\n","import checkEditInfoState, { ImageEditInfoState } from './checkEditInfoState';\nimport ImageEditInfo from '../types/ImageEditInfo';\nimport { getMetadata, removeMetadata, setMetadata } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Save edit info to image\n * @param image The image to save edit info to\n * @param editInfo The edit info to save\n */\nexport function saveEditInfo(image: HTMLImageElement, editInfo: ImageEditInfo) {\n if (image) {\n setMetadata(image, editInfo);\n }\n}\n\n/**\n * @internal\n * Delete edit info of an image if any\n * @param image The image to delete edit info from\n */\nexport function deleteEditInfo(image: HTMLImageElement) {\n if (image) {\n removeMetadata(image);\n }\n}\n\n/**\n * @internal\n * Get image edit info from an image. If the image doesn't have edit info, create one from this image.\n * When create new edit info, it will have width/height set to the image's current client width/height, and\n * natural width/height set to the image's natural width/height, src set to its current src, and all\n * other fields set to 0.\n * @param image The image to get edit info from\n */\nexport function getEditInfoFromImage(image: HTMLImageElement): ImageEditInfo {\n const obj = getMetadata(image);\n return !obj || checkEditInfoState(obj) == ImageEditInfoState.Invalid\n ? getInitialEditInfo(image)\n : obj;\n}\n\nfunction getInitialEditInfo(image: HTMLImageElement): ImageEditInfo {\n return {\n src: image.getAttribute('src') || '',\n widthPx: image.clientWidth,\n heightPx: image.clientHeight,\n naturalWidth: image.naturalWidth,\n naturalHeight: image.naturalHeight,\n leftPercent: 0,\n rightPercent: 0,\n topPercent: 0,\n bottomPercent: 0,\n angleRad: 0,\n };\n}\n","import getGeneratedImageSize from './getGeneratedImageSize';\nimport ImageEditInfo from '../types/ImageEditInfo';\n\n/**\n * @internal\n * Generate new dataURL from an image and edit info\n * @param image The image to generate data URL from. It is supposed to have original src loaded\n * @param editInfo Edit info of the image\n * @returns A BASE64 encoded string with image prefix that represents the content of the generated image.\n * If there are rotate/crop/resize info in the edit info, the generated image will also reflect the result.\n * It is possible to throw exception since the original image may not be able to read its content from\n * the code, so better check canRegenerateImage() of the image first.\n * @throws Exception when fail to generate dataURL from canvas\n */\nexport default function generateDataURL(image: HTMLImageElement, editInfo: ImageEditInfo): string {\n const {\n angleRad: angle,\n widthPx: width,\n heightPx: height,\n bottomPercent: bottom,\n leftPercent: left,\n rightPercent: right,\n topPercent: top,\n naturalWidth,\n naturalHeight,\n } = editInfo;\n const imageWidth = naturalWidth * (1 - left - right);\n const imageHeight = naturalHeight * (1 - top - bottom);\n\n // Adjust the canvas size and scaling for high display resolution\n const devicePixelRatio = window.devicePixelRatio || 1;\n const canvas = document.createElement('canvas');\n const { targetWidth, targetHeight } = getGeneratedImageSize(editInfo);\n canvas.width = targetWidth * devicePixelRatio;\n canvas.height = targetHeight * devicePixelRatio;\n\n const context = canvas.getContext('2d');\n if (context) {\n context.scale(devicePixelRatio, devicePixelRatio);\n context.translate(targetWidth / 2, targetHeight / 2);\n context.rotate(angle);\n context.scale(editInfo.flippedHorizontal ? -1 : 1, editInfo.flippedVertical ? -1 : 1);\n context.drawImage(\n image,\n naturalWidth * left,\n naturalHeight * top,\n imageWidth,\n imageHeight,\n -width / 2,\n -height / 2,\n width,\n height\n );\n }\n\n return canvas.toDataURL('image/png', 1.0);\n}\n","import GeneratedImageSize from '../types/GeneratedImageSize';\nimport ImageEditInfo from '../types/ImageEditInfo';\n\n/**\n * @internal\n * Calculate the target size of an image.\n * For image that is not rotated, target size is the same with resizing/cropping size.\n * For image that is rotated, target size is calculated from resizing/cropping size and its rotate angle\n * Say an image is resized to 100w*100h, cropped 25% on each side, then rotated 45deg, so that cropped size\n * will be (both height and width) 100*(1-0.25-0,25) = 50px, then final image size will be 50*sqrt(2) = 71px\n * @param editInfo The edit info to calculate size from\n * @param beforeCrop True to calculate the full size of original image before crop, false to calculate the size\n * after crop\n * @returns A GeneratedImageSize object which contains original, visible and target target width and height of the image\n */\nexport default function getGeneratedImageSize(\n editInfo: ImageEditInfo,\n beforeCrop?: boolean\n): GeneratedImageSize {\n const {\n widthPx: width,\n heightPx: height,\n angleRad: angle,\n leftPercent: left,\n rightPercent: right,\n topPercent: top,\n bottomPercent: bottom,\n } = editInfo;\n\n // Original image size before crop and rotate\n const originalWidth = width / (1 - left - right);\n const originalHeight = height / (1 - top - bottom);\n\n // Visible size\n const visibleWidth = beforeCrop ? originalWidth : width;\n const visibleHeight = beforeCrop ? originalHeight : height;\n\n // Target size after crop and rotate\n const targetWidth =\n Math.abs(visibleWidth * Math.cos(angle)) + Math.abs(visibleHeight * Math.sin(angle));\n const targetHeight =\n Math.abs(visibleWidth * Math.sin(angle)) + Math.abs(visibleHeight * Math.cos(angle));\n\n return {\n targetWidth,\n targetHeight,\n originalWidth,\n originalHeight,\n visibleWidth,\n visibleHeight,\n };\n}\n","import ImageEditInfo from '../types/ImageEditInfo';\nimport ImageSize from '../types/ImageSize';\n\n/**\n * @internal\n * Get target size of an image with a percentage\n * @param editInfo\n * @param percentage\n * @returns [width, height] array\n */\nexport default function getTargetSizeByPercentage(\n editInfo: ImageEditInfo,\n percentage: number\n): ImageSize {\n const {\n naturalWidth,\n naturalHeight,\n leftPercent: left,\n topPercent: top,\n rightPercent: right,\n bottomPercent: bottom,\n } = editInfo;\n const width = naturalWidth * (1 - left - right) * percentage;\n const height = naturalHeight * (1 - top - bottom) * percentage;\n return { width, height };\n}\n","import generateDataURL from './generateDataURL';\nimport ImageEditInfo from '../types/ImageEditInfo';\n\n/**\n * @internal\n * Check if the image is a gif, if true, use canvas to convert it to a png.\n * If the image is not a gif, return null.\n * @param image to be converted\n * @returns the converted image data url or null, if the image is not a gif\n */\nexport function tryToConvertGifToPng(editInfo: ImageEditInfo) {\n const { src, widthPx, heightPx, naturalHeight, naturalWidth } = editInfo;\n if (src.indexOf('.gif') > -1 || src.indexOf('image/gif') > -1) {\n try {\n const image = document.createElement('img');\n image.src = src;\n const newEditInfo = {\n src: src,\n widthPx: widthPx,\n heightPx: heightPx,\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n leftPercent: 0,\n rightPercent: 0,\n topPercent: 0,\n bottomPercent: 0,\n angleRad: 0,\n };\n return generateDataURL(image, newEditInfo);\n } catch {\n return null;\n }\n }\n return null;\n}\n","import DragAndDropContext, { DNDDirectionX, DnDDirectionY } from '../types/DragAndDropContext';\nimport DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport { CreateElementData } from 'roosterjs-editor-types';\nimport { CropInfo } from '../types/ImageEditInfo';\nimport { ImageEditElementClass } from '../types/ImageEditElementClass';\nimport { rotateCoordinate } from './Resizer';\n\nconst CROP_HANDLE_SIZE = 22;\nconst CROP_HANDLE_WIDTH = 7;\nconst Xs: DNDDirectionX[] = ['w', 'e'];\nconst Ys: DnDDirectionY[] = ['s', 'n'];\nconst ROTATION: Record = {\n sw: 0,\n nw: 90,\n ne: 180,\n se: 270,\n};\n\n/**\n * @internal\n * Crop handle for DragAndDropHelper\n */\nexport const Cropper: DragAndDropHandler = {\n onDragStart: ({ editInfo }) => ({ ...editInfo }),\n onDragging: ({ editInfo, x, y, options }, e, base, dx, dy) => {\n [dx, dy] = rotateCoordinate(dx, dy, editInfo.angleRad);\n\n const {\n widthPx,\n heightPx,\n leftPercent,\n rightPercent,\n topPercent,\n bottomPercent,\n } = editInfo;\n const { minWidth, minHeight } = options;\n const widthPercent = 1 - leftPercent - rightPercent;\n const heightPercent = 1 - topPercent - bottomPercent;\n\n if (\n widthPercent > 0 &&\n heightPercent > 0 &&\n minWidth !== undefined &&\n minHeight !== undefined\n ) {\n const fullWidth = widthPx / widthPercent;\n const fullHeight = heightPx / heightPercent;\n const newLeft =\n x != 'e'\n ? crop(base.leftPercent, dx, fullWidth, rightPercent, minWidth)\n : leftPercent;\n const newRight =\n x != 'w'\n ? crop(base.rightPercent, -dx, fullWidth, leftPercent, minWidth)\n : rightPercent;\n const newTop =\n y != 's'\n ? crop(base.topPercent, dy, fullHeight, bottomPercent, minHeight)\n : topPercent;\n const newBottom =\n y != 'n'\n ? crop(base.bottomPercent, -dy, fullHeight, topPercent, minHeight)\n : bottomPercent;\n\n editInfo.leftPercent = newLeft;\n editInfo.rightPercent = newRight;\n editInfo.topPercent = newTop;\n editInfo.bottomPercent = newBottom;\n editInfo.widthPx = fullWidth * (1 - newLeft - newRight);\n editInfo.heightPx = fullHeight * (1 - newTop - newBottom);\n\n return true;\n } else {\n return false;\n }\n },\n};\n\nfunction crop(\n basePercentage: number,\n deltaValue: number,\n fullValue: number,\n currentPercentage: number,\n minValue: number\n): number {\n const maxValue = fullValue * (1 - currentPercentage) - minValue;\n const newValue = fullValue * basePercentage + deltaValue;\n const validValue = Math.max(Math.min(newValue, maxValue), 0);\n return validValue / fullValue;\n}\n\n/**\n * @internal\n * Get HTML for crop elements, including 4 overlays (to show dark shadow), 1 container and 4 crop handles\n */\nexport function getCropHTML(): CreateElementData[] {\n const overlayHTML: CreateElementData = {\n tag: 'div',\n style: 'position:absolute;background-color:rgb(0,0,0,0.5);pointer-events:none',\n className: ImageEditElementClass.CropOverlay,\n };\n const containerHTML: CreateElementData = {\n tag: 'div',\n style: 'position:absolute;overflow:hidden',\n className: ImageEditElementClass.CropContainer,\n children: [],\n };\n if (containerHTML) {\n Xs.forEach(x => Ys.forEach(y => containerHTML.children?.push(getCropHTMLInternal(x, y))));\n }\n return [containerHTML, overlayHTML, overlayHTML, overlayHTML, overlayHTML];\n}\n\nfunction getCropHTMLInternal(x: DNDDirectionX, y: DnDDirectionY): CreateElementData {\n const leftOrRight = x == 'w' ? 'left' : 'right';\n const topOrBottom = y == 'n' ? 'top' : 'bottom';\n const rotation = ROTATION[y + x];\n\n return {\n tag: 'div',\n className: ImageEditElementClass.CropHandle,\n style: `position:absolute;pointer-events:auto;cursor:${y}${x}-resize;${leftOrRight}:0;${topOrBottom}:0;width:${CROP_HANDLE_SIZE}px;height:${CROP_HANDLE_SIZE}px;transform:rotate(${rotation}deg)`,\n dataset: { x, y },\n children: getCropHandleHTML(),\n };\n}\n\nfunction getCropHandleHTML(): CreateElementData[] {\n const result: CreateElementData[] = [];\n [0, 1].forEach(layer =>\n [0, 1].forEach(dir => {\n result.push(getCropHandleHTMLInternal(layer, dir));\n })\n );\n return result;\n}\n\nfunction getCropHandleHTMLInternal(layer: number, dir: number): CreateElementData {\n const position =\n dir == 0\n ? `right:${layer}px;height:${CROP_HANDLE_WIDTH - layer * 2}px;`\n : `top:${layer}px;width:${CROP_HANDLE_WIDTH - layer * 2}px;`;\n const bgColor = layer == 0 ? 'white' : 'black';\n\n return {\n tag: 'div',\n style: `position:absolute;left:${layer}px;bottom:${layer}px;${position};background-color:${bgColor}`,\n };\n}\n","import DragAndDropContext, { DNDDirectionX, DnDDirectionY } from '../types/DragAndDropContext';\nimport DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport ImageEditInfo, { ResizeInfo } from '../types/ImageEditInfo';\nimport ImageHtmlOptions from '../types/ImageHtmlOptions';\nimport { CreateElementData } from 'roosterjs-editor-types';\nimport { ImageEditElementClass } from '../types/ImageEditElementClass';\n\n/**\n * An optional callback to allow customize resize handle element of image resizing.\n * To customize the resize handle element, add this callback and change the attributes of elementData then it\n * will be picked up by ImageEdit code\n */\nexport interface OnShowResizeHandle {\n (elementData: CreateElementData, x: DNDDirectionX, y: DnDDirectionY): void;\n}\n\nconst enum HandleTypes {\n SquareHandles,\n CircularHandlesCorner,\n}\nconst RESIZE_HANDLE_SIZE = 10;\nconst RESIZE_HANDLE_MARGIN = 3;\nconst Xs: DNDDirectionX[] = ['w', '', 'e'];\nconst Ys: DnDDirectionY[] = ['s', '', 'n'];\n\n/**\n * @internal\n * The resize drag and drop handler\n */\nexport const Resizer: DragAndDropHandler = {\n onDragStart: ({ editInfo }) => ({ ...editInfo }),\n onDragging: ({ x, y, editInfo, options }, e, base, deltaX, deltaY) => {\n const ratio =\n base.widthPx > 0 && base.heightPx > 0 ? (base.widthPx * 1.0) / base.heightPx : 0;\n\n [deltaX, deltaY] = rotateCoordinate(deltaX, deltaY, editInfo.angleRad);\n if (options.minWidth !== undefined && options.minHeight !== undefined) {\n const horizontalOnly = x == '';\n const verticalOnly = y == '';\n const shouldPreserveRatio =\n !(horizontalOnly || verticalOnly) && (options.preserveRatio || e.shiftKey);\n let newWidth = horizontalOnly\n ? base.widthPx\n : Math.max(base.widthPx + deltaX * (x == 'w' ? -1 : 1), options.minWidth);\n let newHeight = verticalOnly\n ? base.heightPx\n : Math.max(base.heightPx + deltaY * (y == 'n' ? -1 : 1), options.minHeight);\n\n if (shouldPreserveRatio && ratio > 0) {\n if (ratio > 1) {\n // first sure newHeight is right,calculate newWidth\n newWidth = newHeight * ratio;\n if (newWidth < options.minWidth) {\n newWidth = options.minWidth;\n newHeight = newWidth / ratio;\n }\n } else {\n // first sure newWidth is right,calculate newHeight\n newHeight = newWidth / ratio;\n if (newHeight < options.minHeight) {\n newHeight = options.minHeight;\n newWidth = newHeight * ratio;\n }\n }\n }\n editInfo.widthPx = newWidth;\n editInfo.heightPx = newHeight;\n return true;\n } else {\n return false;\n }\n },\n};\n\n/**\n * @internal Calculate the rotated x and y distance for mouse moving\n * @param x Original x distance\n * @param y Original y distance\n * @param angle Rotated angle, in radian\n * @returns rotated x and y distances\n */\nexport function rotateCoordinate(x: number, y: number, angle: number): [number, number] {\n if (x == 0 && y == 0) {\n return [0, 0];\n }\n const hypotenuse = Math.sqrt(x * x + y * y);\n angle = Math.atan2(y, x) - angle;\n return [hypotenuse * Math.cos(angle), hypotenuse * Math.sin(angle)];\n}\n\n/**\n * @internal\n * Double check if the changed size can satisfy current width of container.\n * When resize an image and preserve ratio, its size can be limited by the size of container.\n * So we need to check the actual size and calculate the size again\n * @param editInfo Edit info of the image\n * @param preserveRatio Whether w/h ratio need to be preserved\n * @param actualWidth Actual width of the image after resize\n * @param actualHeight Actual height of the image after resize\n */\nexport function doubleCheckResize(\n editInfo: ImageEditInfo,\n preserveRatio: boolean,\n actualWidth: number,\n actualHeight: number\n) {\n let { widthPx, heightPx } = editInfo;\n const ratio = heightPx > 0 ? widthPx / heightPx : 0;\n\n actualWidth = Math.floor(actualWidth);\n actualHeight = Math.floor(actualHeight);\n widthPx = Math.floor(widthPx);\n heightPx = Math.floor(heightPx);\n\n editInfo.widthPx = actualWidth;\n editInfo.heightPx = actualHeight;\n\n if (preserveRatio && ratio > 0 && (widthPx !== actualWidth || heightPx !== actualHeight)) {\n if (actualWidth < widthPx) {\n editInfo.heightPx = actualWidth / ratio;\n } else {\n editInfo.widthPx = actualHeight * ratio;\n }\n }\n}\n\n/**\n * @internal\n * Get HTML for resize handles at the corners\n */\nexport function getCornerResizeHTML(\n { borderColor: resizeBorderColor }: ImageHtmlOptions,\n onShowResizeHandle?: OnShowResizeHandle\n): CreateElementData[] {\n const result: CreateElementData[] = [];\n\n Xs.forEach(x =>\n Ys.forEach(y => {\n let elementData =\n (x == '') == (y == '')\n ? getResizeHandleHTML(\n x,\n y,\n resizeBorderColor,\n HandleTypes.CircularHandlesCorner\n )\n : null;\n if (onShowResizeHandle && elementData) {\n onShowResizeHandle(elementData, x, y);\n }\n if (elementData) {\n result.push(elementData);\n }\n })\n );\n return result;\n}\n\n/**\n * @internal\n * Get HTML for resize handles on the sides\n */\nexport function getSideResizeHTML(\n { borderColor: resizeBorderColor, isSmallImage: isSmallImage }: ImageHtmlOptions,\n onShowResizeHandle?: OnShowResizeHandle\n): CreateElementData[] | null {\n if (isSmallImage) {\n return null;\n }\n const result: CreateElementData[] = [];\n Xs.forEach(x =>\n Ys.forEach(y => {\n let elementData =\n (x == '') != (y == '')\n ? getResizeHandleHTML(\n x,\n y,\n resizeBorderColor,\n HandleTypes.CircularHandlesCorner\n )\n : null;\n if (onShowResizeHandle && elementData) {\n onShowResizeHandle(elementData, x, y);\n }\n if (elementData) {\n result.push(elementData);\n }\n })\n );\n return result;\n}\n\n/**\n * @internal\n * Get HTML for resize borders\n */\nexport function getResizeBordersHTML({\n borderColor: resizeBorderColor,\n}: ImageHtmlOptions): CreateElementData {\n return {\n tag: 'div',\n style: `position:absolute;left:0;right:0;top:0;bottom:0;border:solid 2px ${resizeBorderColor};pointer-events:none;`,\n };\n}\n\nfunction getResizeHandleHTML(\n x: DNDDirectionX,\n y: DnDDirectionY,\n borderColor: string,\n handleTypes: HandleTypes\n): CreateElementData | null {\n const leftOrRight = x == 'w' ? 'left' : 'right';\n const topOrBottom = y == 'n' ? 'top' : 'bottom';\n const leftOrRightValue = x == '' ? '50%' : '0px';\n const topOrBottomValue = y == '' ? '50%' : '0px';\n const direction = y + x;\n return x == '' && y == ''\n ? null\n : {\n tag: 'div',\n style: `position:absolute;${leftOrRight}:${leftOrRightValue};${topOrBottom}:${topOrBottomValue}`,\n children: [\n {\n tag: 'div',\n style: setHandleStyle[handleTypes](\n direction,\n topOrBottom,\n leftOrRight,\n borderColor\n ),\n className: ImageEditElementClass.ResizeHandle,\n dataset: { x, y },\n },\n ],\n };\n}\n\nconst setHandleStyle: Record<\n HandleTypes,\n (direction: string, topOrBottom: string, leftOrRight: string, borderColor: string) => string\n> = {\n 0: (direction, leftOrRight, topOrBottom, borderColor) =>\n `position:relative;width:${RESIZE_HANDLE_SIZE}px;height:${RESIZE_HANDLE_SIZE}px;background-color: ${borderColor};cursor:${direction}-resize;${topOrBottom}:-${RESIZE_HANDLE_MARGIN}px;${leftOrRight}:-${RESIZE_HANDLE_MARGIN}px;`,\n 1: (direction, leftOrRight, topOrBottom) =>\n `position:relative;width:${RESIZE_HANDLE_SIZE}px;height:${RESIZE_HANDLE_SIZE}px;background-color: #FFFFFF;cursor:${direction}-resize;${topOrBottom}:-${RESIZE_HANDLE_MARGIN}px;${leftOrRight}:-${RESIZE_HANDLE_MARGIN}px;border-radius:100%;border: 2px solid #bfbfbf;box-shadow: 0px 0.36316px 1.36185px rgba(100, 100, 100, 0.25);`,\n};\n","import DragAndDropContext from '../types/DragAndDropContext';\nimport DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport ImageHtmlOptions from '../types/ImageHtmlOptions';\nimport { CreateElementData, Rect } from 'roosterjs-editor-types';\nimport { ImageEditElementClass } from '../types/ImageEditElementClass';\nimport { RotateInfo } from '../types/ImageEditInfo';\n\nconst ROTATE_SIZE = 32;\nconst ROTATE_GAP = 15;\nconst DEG_PER_RAD = 180 / Math.PI;\nconst DEFAULT_ROTATE_HANDLE_HEIGHT = ROTATE_SIZE / 2 + ROTATE_GAP;\nconst ROTATE_ICON_MARGIN = 8;\n\n/**\n * @internal\n * The rotate drag and drop handler\n */\nexport const Rotator: DragAndDropHandler = {\n onDragStart: ({ editInfo }) => ({ ...editInfo }),\n onDragging: ({ editInfo, options }, e, base, deltaX, deltaY) => {\n const distance = editInfo.heightPx / 2 + DEFAULT_ROTATE_HANDLE_HEIGHT;\n const newX = distance * Math.sin(base.angleRad) + deltaX;\n const newY = distance * Math.cos(base.angleRad) - deltaY;\n let angleInRad = Math.atan2(newX, newY);\n\n if (!e.altKey && options && options.minRotateDeg !== undefined) {\n const angleInDeg = angleInRad * DEG_PER_RAD;\n const adjustedAngleInDeg =\n Math.round(angleInDeg / options.minRotateDeg) * options.minRotateDeg;\n angleInRad = adjustedAngleInDeg / DEG_PER_RAD;\n }\n\n if (editInfo.angleRad != angleInRad) {\n editInfo.angleRad = angleInRad;\n return true;\n } else {\n return false;\n }\n },\n};\n\n/**\n * @internal\n * Move rotate handle. When image is very close to the border of editor, rotate handle may not be visible.\n * Fix it by reduce the distance from image to rotate handle\n */\nexport function updateRotateHandlePosition(\n editorRect: Rect,\n rotateCenter: HTMLElement,\n rotateHandle: HTMLElement\n) {\n const rotateHandleRect = rotateHandle.getBoundingClientRect();\n\n if (rotateHandleRect) {\n const top = rotateHandleRect.top - editorRect.top;\n const left = rotateHandleRect.left - editorRect.left;\n const right = rotateHandleRect.right - editorRect.right;\n const bottom = rotateHandleRect.bottom - editorRect.bottom;\n let adjustedDistance = Number.MAX_SAFE_INTEGER;\n if (top <= 0) {\n adjustedDistance = top;\n } else if (left <= 0) {\n adjustedDistance = left;\n } else if (right >= 0) {\n adjustedDistance = right;\n } else if (bottom >= 0) {\n adjustedDistance = bottom;\n }\n\n const rotateGap = Math.max(Math.min(ROTATE_GAP, adjustedDistance), 0);\n const rotateTop = Math.max(Math.min(ROTATE_SIZE, adjustedDistance - rotateGap), 0);\n rotateCenter.style.top = -rotateGap + 'px';\n rotateCenter.style.height = rotateGap + 'px';\n rotateHandle.style.top = -rotateTop + 'px';\n }\n}\n\n/**\n * @internal\n * Get HTML for rotate elements, including the rotate handle with icon, and a line between the handle and the image\n */\nexport function getRotateHTML({\n borderColor,\n rotateHandleBackColor,\n}: ImageHtmlOptions): CreateElementData[] {\n const handleLeft = ROTATE_SIZE / 2;\n return [\n {\n tag: 'div',\n className: ImageEditElementClass.RotateCenter,\n style: `position:absolute;left:50%;width:1px;background-color:${borderColor};top:${-ROTATE_GAP}px;height:${ROTATE_GAP}px;`,\n children: [\n {\n tag: 'div',\n className: ImageEditElementClass.RotateHandle,\n style: `position:absolute;background-color:${rotateHandleBackColor};border:solid 1px ${borderColor};border-radius:50%;width:${ROTATE_SIZE}px;height:${ROTATE_SIZE}px;left:-${handleLeft}px;cursor:move;top:${-ROTATE_SIZE}px;`,\n children: [getRotateIconHTML(borderColor)],\n },\n ],\n },\n ];\n}\n\nfunction getRotateIconHTML(borderColor: string): CreateElementData {\n return {\n tag: 'svg',\n namespace: 'http://www.w3.org/2000/svg',\n style: `width:16px;height:16px;margin: ${ROTATE_ICON_MARGIN}px ${ROTATE_ICON_MARGIN}px`,\n children: [\n {\n tag: 'path',\n namespace: 'http://www.w3.org/2000/svg',\n attributes: {\n d: 'M 10.5,10.0 A 3.8,3.8 0 1 1 6.7,6.3',\n transform: 'matrix(1.1 1.1 -1.1 1.1 11.6 -10.8)',\n ['fill-opacity']: '0',\n stroke: borderColor,\n },\n },\n {\n tag: 'path',\n namespace: 'http://www.w3.org/2000/svg',\n attributes: {\n d: 'M12.0 3.648l.884-.884.53 2.298-2.298-.53z',\n stroke: borderColor,\n },\n },\n ],\n };\n}\n","export { default as ImageEdit } from './ImageEdit';\nexport { default as canRegenerateImage } from './api/canRegenerateImage';\nexport { default as resizeByPercentage } from './api/resizeByPercentage';\nexport { default as isResizedTo } from './api/isResizedTo';\nexport { default as resetImage } from './api/resetImage';\nexport { OnShowResizeHandle } from './imageEditors/Resizer';\nexport { DNDDirectionX, DnDDirectionY } from './types/DragAndDropContext';\n","import ImageEdit from '../ImageEdit/ImageEdit';\nimport { ImageEditOperation } from 'roosterjs-editor-types';\n\n/**\n * @deprecated Use ImageEdit plugin instead\n */\nexport default class ImageResize extends ImageEdit {\n /**\n * Create a new instance of ImageResize\n * @param minWidth Minimum width of image when resize in pixel, default value is 10\n * @param minHeight Minimum height of image when resize in pixel, default value is 10\n * @param selectionBorderColor Color of resize border and handles, default value is #DB626C\n * @param forcePreserveRatio Whether always preserve width/height ratio when resize, default value is false\n * @param resizableImageSelector Selector for picking which image is resizable (e.g. for all images not placeholders), note\n * that the tag must be IMG regardless what the selector is\n */\n constructor(\n minWidth: number = 10,\n minHeight: number = 10,\n selectionBorderColor: string = '#DB626C',\n forcePreserveRatio: boolean = false,\n resizableImageSelector: string = 'img'\n ) {\n super({\n minHeight,\n minWidth,\n borderColor: selectionBorderColor,\n preserveRatio: forcePreserveRatio,\n imageSelector: resizableImageSelector,\n });\n }\n\n /**\n * @deprecated\n */\n showResizeHandle(img: HTMLImageElement) {\n this.setEditingImage(img, ImageEditOperation.Resize);\n }\n\n /**\n * @deprecated\n */\n hideResizeHandle(selectImageAfterUnSelect?: boolean) {\n this.setEditingImage(null /*image*/, selectImageAfterUnSelect);\n }\n}\n","export { default as ImageResize } from './ImageResize';\n","import convertPasteContentForSingleImage from './imageConverter/convertPasteContentForSingleImage';\nimport convertPastedContentForLI from './commonConverter/convertPastedContentForLI';\nimport convertPastedContentFromExcel from './excelConverter/convertPastedContentFromExcel';\nimport convertPastedContentFromOfficeOnline from './officeOnlineConverter/convertPastedContentFromOfficeOnline';\nimport convertPastedContentFromPowerPoint from './pptConverter/convertPastedContentFromPowerPoint';\nimport convertPastedContentFromWord from './wordConverter/convertPastedContentFromWord';\nimport handleLineMerge from './lineMerge/handleLineMerge';\nimport sanitizeHtmlColorsFromPastedContent from './sanitizeHtmlColorsFromPastedContent/sanitizeHtmlColorsFromPastedContent';\nimport sanitizeLinks from './sanitizeLinks/sanitizeLinks';\nimport { getPasteSource } from 'roosterjs-editor-dom';\nimport { KnownPasteSourceType } from 'roosterjs-editor-types';\nimport {\n EditorPlugin,\n IEditor,\n PasteType,\n PluginEvent,\n PluginEventType,\n} from 'roosterjs-editor-types';\n\nconst GOOGLE_SHEET_NODE_NAME = 'google-sheets-html-origin';\n\n/**\n * Paste plugin, handles BeforePaste event and reformat some special content, including:\n * 1. Content copied from Word\n * 2. Content copied from Excel\n * 3. Content copied from Word Online or OneNote Online\n */\nexport default class Paste implements EditorPlugin {\n private editor: IEditor | null = null;\n\n /**\n * Construct a new instance of Paste class\n * @param unknownTagReplacement Replace solution of unknown tags, default behavior is to replace with SPAN\n * @param convertSingleImageBody When enabled, if clipboard HTML contains a single image, we reuse the image without modifying the src attribute.\n * When disabled, pasted image src attribute will use the dataUri from clipboard data -- By Default disabled.\n */\n constructor(\n private unknownTagReplacement: string = 'SPAN',\n private convertSingleImageBody: boolean = false\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Paste';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (this.editor && event.eventType == PluginEventType.BeforePaste) {\n const { fragment, sanitizingOption } = event;\n const trustedHTMLHandler = this.editor.getTrustedHTMLHandler();\n\n switch (getPasteSource(event, this.convertSingleImageBody)) {\n case KnownPasteSourceType.WordDesktop:\n // Handle HTML copied from Word\n convertPastedContentFromWord(event);\n break;\n case KnownPasteSourceType.ExcelDesktop:\n case KnownPasteSourceType.ExcelOnline:\n if (\n event.pasteType === PasteType.Normal ||\n event.pasteType === PasteType.MergeFormat\n ) {\n // Handle HTML copied from Excel\n convertPastedContentFromExcel(event, trustedHTMLHandler);\n }\n break;\n case KnownPasteSourceType.PowerPointDesktop:\n convertPastedContentFromPowerPoint(event, trustedHTMLHandler);\n break;\n case KnownPasteSourceType.WacComponents:\n convertPastedContentFromOfficeOnline(fragment, sanitizingOption);\n break;\n case KnownPasteSourceType.GoogleSheets:\n sanitizingOption.additionalTagReplacements[GOOGLE_SHEET_NODE_NAME] = '*';\n break;\n case KnownPasteSourceType.SingleImage:\n convertPasteContentForSingleImage(event, trustedHTMLHandler);\n break;\n case KnownPasteSourceType.Default:\n convertPastedContentForLI(fragment);\n handleLineMerge(fragment);\n break;\n }\n sanitizeLinks(sanitizingOption);\n sanitizeHtmlColorsFromPastedContent(sanitizingOption);\n\n // Replace unknown tags with SPAN\n sanitizingOption.unknownTagReplacement = this.unknownTagReplacement;\n }\n }\n}\n","import {\n changeElementTag,\n getTagOfNode,\n toArray,\n wrap,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Convert content copied from Teams to be well-formed\n */\nexport default function convertPastedContentForLI(fragment: DocumentFragment) {\n // Sometimes it is possible that we get LI nodes directly under DIV.\n // In that case we need to convert DIV to UL. It is also possible to be OL, but we don't know it.\n // So always assume it is UL here, and later user can change it.\n if (isPureLiNode(fragment)) {\n wrap(toArray(fragment.childNodes), 'UL');\n } else if (\n safeInstanceOf(fragment.firstChild, 'HTMLElement') &&\n isPureLiNode(fragment.firstChild)\n ) {\n changeElementTag(fragment.firstChild as HTMLElement, 'UL');\n }\n}\n\nfunction isPureLiNode(node: ParentNode & Node) {\n if (node && !node.nextSibling && ['OL', 'UL', 'MENU'].indexOf(getTagOfNode(node)) < 0) {\n let hasLi = false;\n if (\n toArray(node.childNodes).every(childNode => {\n if (safeInstanceOf(childNode, 'Text') && !childNode.nodeValue?.trim()) {\n return true;\n } else if (getTagOfNode(childNode) == 'LI') {\n hasLi = true;\n return true;\n } else {\n return false;\n }\n }) &&\n hasLi\n ) {\n return true;\n }\n }\n return false;\n}\n","import { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\nimport { chainSanitizerCallback, getTagOfNode, moveChildNodes } from 'roosterjs-editor-dom';\n\nconst LAST_TD_END_REGEX = /<\\/\\s*td\\s*>((?!<\\/\\s*tr\\s*>)[\\s\\S])*$/i;\nconst LAST_TR_END_REGEX = /<\\/\\s*tr\\s*>((?!<\\/\\s*table\\s*>)[\\s\\S])*$/i;\nconst LAST_TR_REGEX = /]*>[^<]*/i;\nconst LAST_TABLE_REGEX = /]*>[^<]*/i;\nconst DEFAULT_BORDER_STYLE = 'solid 1px #d4d4d4';\n\n/**\n * @internal\n * Convert pasted content from Excel, add borders when source doc doesn't have a border\n * @param event The BeforePaste event\n */\nexport default function convertPastedContentFromExcel(\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { fragment, sanitizingOption, htmlBefore, clipboardData } = event;\n const html = clipboardData.html ? excelHandler(clipboardData.html, htmlBefore) : undefined;\n\n if (html && clipboardData.html != html) {\n const doc = new DOMParser().parseFromString(trustedHTMLHandler(html), 'text/html');\n moveChildNodes(fragment, doc?.body);\n }\n\n // For Excel Online\n const firstChild = fragment.firstChild;\n if (firstChild && firstChild.childNodes.length > 0 && getTagOfNode(firstChild) == 'DIV') {\n const tableFound = Array.from(firstChild.childNodes).every((child: Node) => {\n // Tables pasted from Excel Online should be of the format: 0 to N META tags and 1 TABLE tag\n return getTagOfNode(child) == 'META'\n ? true\n : getTagOfNode(child) == 'TABLE' && child == firstChild.lastChild;\n });\n\n // Extract Table from Div\n if (tableFound && firstChild.lastChild) {\n event.fragment.replaceChildren(firstChild.lastChild);\n }\n }\n\n chainSanitizerCallback(sanitizingOption.elementCallbacks, 'TD', element => {\n if (element.style.borderStyle == 'none') {\n element.style.border = DEFAULT_BORDER_STYLE;\n }\n return true;\n });\n}\n\n/**\n * @internal Export for test only\n * @param html Source html\n */\nexport function excelHandler(html: string, htmlBefore: string): string {\n if (html.match(LAST_TD_END_REGEX)) {\n const trMatch = htmlBefore.match(LAST_TR_REGEX);\n const tr = trMatch ? trMatch[0] : '';\n html = tr + html + '';\n }\n if (html.match(LAST_TR_END_REGEX)) {\n let tableMatch = htmlBefore.match(LAST_TABLE_REGEX);\n let table = tableMatch ? tableMatch[0] : '';\n html = table + html + '
                ';\n }\n\n return html;\n}\n","import { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\nimport { moveChildNodes } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Convert pasted content if there are HTML and Image data in the Clipboard\n * @param event The BeforePaste event\n */\nexport default function convertPasteContentForSingleImage(\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { fragment, clipboardData } = event;\n const { html, image } = clipboardData;\n\n if (html && image) {\n //If there are Html in the clipboard, and the html body only have one img children, use the HTML\n const doc = new DOMParser().parseFromString(trustedHTMLHandler(html), 'text/html');\n moveChildNodes(fragment, doc?.body);\n }\n}\n","export { default as Paste } from './Paste';\n","import {\n changeElementTag,\n ContentTraverser,\n findClosestElementAncestor,\n getBlockElementAtNode,\n getNextLeafSibling,\n getPreviousLeafSibling,\n getTagOfNode,\n} from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Process pasted content, if there are multiple blocks that are not wrapped by a shared ancestor node,\n * change the tag of first and last node to be SPAN so that it will be merged into current block\n * @param root Root node of content to process\n */\nexport default function handleLineMerge(root: Node) {\n const traverser = ContentTraverser.createBodyTraverser(root);\n const blocks: { start: Node; end: Node }[] = [];\n\n for (\n let block = traverser?.currentBlockElement;\n block;\n block = traverser.getNextBlockElement()\n ) {\n blocks.push({\n start: block.getStartNode(),\n end: block.getEndNode(),\n });\n }\n\n if (blocks.length > 0) {\n const blocksLength = blocks.length - 1;\n processBlock(blocks[0]);\n processBlock(blocks[blocksLength]);\n checkAndAddBr(root, blocks[0], true /*isFirst*/);\n checkAndAddBr(root, blocks[blocksLength], false /*isFirst*/, blocks[0]);\n }\n}\n\nfunction processBlock(block: { start: Node; end: Node }) {\n const { start, end } = block;\n\n if (start == end && getTagOfNode(start) == 'DIV') {\n const node = changeElementTag(start as HTMLElement, 'SPAN') as Node;\n block.start = node;\n block.end = node;\n\n if (node && node.lastChild && getTagOfNode(node.lastChild) == 'BR') {\n node.removeChild(node.lastChild);\n }\n } else if (getTagOfNode(end) == 'BR') {\n const node = end.ownerDocument?.createTextNode('');\n if (node) {\n end.parentNode?.insertBefore(node, end);\n block.end = node;\n end.parentNode?.removeChild(end);\n }\n }\n}\n\nfunction checkAndAddBr(\n root: Node,\n block: { start: Node; end: Node },\n isFirst: boolean,\n firstBlock?: { start: Node; end: Node }\n) {\n const blockElement = getBlockElementAtNode(root, block.start);\n const sibling = isFirst\n ? getNextLeafSibling(root, block.end)\n : getPreviousLeafSibling(root, block.start);\n\n if (!sibling) {\n return;\n }\n\n if (blockElement?.contains(sibling)) {\n const br = block.start.ownerDocument?.createElement('br');\n if (br) {\n const blockToUse = isFirst ? block.end : block.start;\n blockToUse.parentNode?.insertBefore(br, isFirst ? block.end.nextSibling : block.start);\n }\n } else if (\n firstBlock &&\n firstBlock.end == firstBlock.start &&\n getTagOfNode(firstBlock.end) == 'SPAN'\n ) {\n // If the first block and the last block are Siblings, add a BR before so the only two\n // lines that are being pasted are not merged.\n const previousSibling = getPreviousLeafSibling(root, block.start);\n if (\n firstBlock.end.contains(previousSibling) &&\n !findClosestElementAncestor(block.start, root, 'li')\n ) {\n const br = block.start.ownerDocument?.createElement('br');\n if (br) {\n block.start.parentNode?.insertBefore(br, block.start);\n }\n }\n }\n}\n","/**\n * @internal\n * Type that holds all the info of a consecutive list item block.\n */\nexport default interface ListItemBlock {\n /**\n * The first element in block of list item from pasted word online document.\n */\n startElement: Element | null;\n\n /**\n * The last element in block of list item from pasted word online document.\n */\n endElement: Element | null;\n\n /**\n * The position where the processed bulleted list should be inserted.\n */\n insertPositionNode: Node | null;\n\n /**\n * The list of containers that wraps each list item.\n */\n listItemContainers: Element[];\n}\n\n/**\n * @internal\n * Initialize an empty ListItemBlock\n */\nexport function createListItemBlock(listItem: Element | null = null): ListItemBlock {\n return {\n startElement: listItem,\n endElement: listItem,\n insertPositionNode: null,\n listItemContainers: listItem ? [listItem] : [],\n };\n}\n","import { chainSanitizerCallback } from 'roosterjs-editor-dom';\nimport { HtmlSanitizerOptions } from 'roosterjs-editor-types';\nimport convertPastedContentFromWordOnline, {\n isWordOnlineWithList,\n} from './convertPastedContentFromWordOnline';\n\nconst WAC_IDENTIFY_SELECTOR =\n 'ul[class^=\"BulletListStyle\"]>.OutlineElement,ol[class^=\"NumberListStyle\"]>.OutlineElement,span.WACImageContainer';\nconst TABLE_TEMP_ELEMENTS_QUERY = [\n 'TableInsertRowGapBlank',\n 'TableColumnResizeHandle',\n 'TableCellTopBorderHandle',\n 'TableCellLeftBorderHandle',\n 'TableHoverColumnHandle',\n 'TableHoverRowHandle',\n]\n .map(className => `.${className}`)\n .join(',');\n/**\n * @internal\n * Convert pasted content from Office Online\n * Once it is known that the document is from WAC\n * We need to remove the display property and margin from all the list item\n * @param event The BeforePaste event\n */\nexport default function convertPastedContentFromOfficeOnline(\n fragment: DocumentFragment,\n sanitizingOption: Required\n) {\n fragment.querySelectorAll(WAC_IDENTIFY_SELECTOR).forEach((el: Element) => {\n const element = el as HTMLElement;\n element.style.removeProperty('display');\n element.style.removeProperty('margin');\n });\n // call conversion function if the pasted content is from word online and\n // has list element in the pasted content.\n if (isWordOnlineWithList(fragment)) {\n convertPastedContentFromWordOnline(fragment);\n }\n\n // Remove \"border:none\" for image to fix image resize behavior\n // We found a problem that when paste an image with \"border:none\" then the resize border will be\n // displayed incorrectly when resize it. So we need to drop this style\n chainSanitizerCallback(\n sanitizingOption.cssStyleCallbacks,\n 'border',\n (value, element) => element.tagName != 'IMG' || value != 'none'\n );\n\n fragment\n .querySelectorAll(TABLE_TEMP_ELEMENTS_QUERY)\n .forEach(node => node.parentElement?.removeChild(node));\n}\n","import ListItemBlock, { createListItemBlock } from './ListItemBlock';\n\nimport {\n splitParentNode,\n getNextLeafSibling,\n getFirstLeafNode,\n getTagOfNode,\n collapseNodes,\n unwrap,\n toArray,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\nconst WORD_ONLINE_IDENTIFYING_SELECTOR =\n 'div.ListContainerWrapper>ul[class^=\"BulletListStyle\"],div.ListContainerWrapper>ol[class^=\"NumberListStyle\"],span.WACImageContainer > img';\nconst LIST_CONTAINER_ELEMENT_CLASS_NAME = 'ListContainerWrapper';\nconst IMAGE_CONTAINER_ELEMENT_CLASS_NAME = 'WACImageContainer';\n\n//When the list style is a symbol and the value is not in the clipboard, WordOnline\nconst VALID_LIST_STYLE_CHAR_CODES = [\n '111', //'o'\n '9643', //'▫'\n '9830', //'♦'\n];\n\n/**\n * @internal\n */\nexport function isWordOnlineWithList(fragment: DocumentFragment): boolean {\n return !!(fragment && fragment.querySelector(WORD_ONLINE_IDENTIFYING_SELECTOR));\n}\n\n// Word Online pasted content DOM structure as of July 12th 2019\n//\n// \n//
                ----------> this layer may exist depend on the content user paste\n//
                ----------> text content\n//

                \n//
                \n//
                ----------> list items: for unordered list, all the items on the same level is under the same wrapper\n//
                  list items in the same list can be divided into different ListItemWrapper\n//
                • list items in the same list can also be divided into different Outline Group;\n//
                • \n//
                \n//
                \n//
                \n//
                \n//
                ----------> list items: for ordered list, each items has it's own wrapper\n//
                  \n//
                1. \n//
                \n//
                \n//
                \n//
                  \n//
                1. \n//
                \n//
                \n//
                \n// \n//\n//\n\n/**\n * @internal\n * Convert text copied from word online into text that's workable with rooster editor\n * @param fragment Document fragment that is being pasted into editor.\n */\nexport default function convertPastedContentFromWordOnline(fragment: DocumentFragment) {\n sanitizeListItemContainer(fragment);\n const listItemBlocks: ListItemBlock[] = getListItemBlocks(fragment);\n\n listItemBlocks.forEach(itemBlock => {\n // There are cases where consecutive List Elements are separated into different nodes:\n //
                \n //
                \n //
                  \n //
                  \n //
                  \n //
                    \n //
                    \n //
                    \n //
                    \n //
                    \n //
                      \n //
                      \n //
                      \n // in the above case we want to collapse the two root level div into one and unwrap the list item nodes.\n // after the following flattening the list will become following:\n //\n //
                      \n //
                        \n //
                        \n //
                        \n //
                          \n //
                          \n //
                          \n //
                            \n //
                            \n // Then we are start processing.\n flattenListBlock(fragment, itemBlock);\n\n // Find the node to insertBefore, which is next sibling node of the end of a listItemBlock.\n itemBlock.insertPositionNode = itemBlock.endElement?.nextSibling ?? null;\n\n let convertedListElement: Element | undefined = undefined;\n const doc = fragment.ownerDocument;\n\n itemBlock.listItemContainers.forEach(listItemContainer => {\n let listType: 'OL' | 'UL' | null = getContainerListType(listItemContainer); // list type that is contained by iterator.\n if (listType) {\n // Initialize processed element with proper listType if this is the first element\n if (!convertedListElement) {\n convertedListElement = createNewList(listItemContainer, doc, listType);\n }\n\n // Get all list items(
                          1. ) in the current iterator element.\n const currentListItems = toArray(listItemContainer.querySelectorAll('li'));\n currentListItems.forEach(item => {\n // If item is in root level and the type of list changes then\n // insert the current list into body and then reinitialize the convertedListElement\n // Word Online is using data-aria-level to determine the the depth of the list item.\n const itemLevel = parseInt(item.getAttribute('data-aria-level') ?? '');\n // In first level list, there are cases where a consecutive list item DIV may have different list type\n // When that happens we need to insert the processed elements into the document, then change the list type\n // and keep the processing going.\n if (\n convertedListElement &&\n getTagOfNode(convertedListElement) != listType &&\n itemLevel == 1 &&\n listType\n ) {\n insertConvertedListToDoc(convertedListElement, fragment, itemBlock);\n convertedListElement = createNewList(listItemContainer, doc, listType);\n }\n if (convertedListElement && listType) {\n insertListItem(convertedListElement, item, listType, doc);\n }\n });\n }\n });\n if (convertedListElement) {\n insertConvertedListToDoc(convertedListElement, fragment, itemBlock);\n }\n\n // Once we finish the process the list items and put them into a list.\n // After inserting the processed element,\n // we need to remove all the non processed node from the parent node.\n const parentContainer = itemBlock.startElement?.parentNode;\n if (parentContainer) {\n itemBlock.listItemContainers.forEach(listItemContainer => {\n parentContainer.removeChild(listItemContainer);\n });\n }\n });\n\n const imageNodes = getImageNodes(fragment);\n imageNodes.forEach(node => {\n // Structure when pasting Word Wac Image as of 10/22/2021\n // \n // \n // \n // \n // \n //\n // Since the second span inside of WACImageContainer have style display block it displays an additional space at the bottom of the image.\n // Removing the nodes that are not img will resolve the additional space\n if (safeInstanceOf(node, 'HTMLSpanElement')) {\n node.childNodes.forEach(childNode => {\n if (getTagOfNode(childNode) != 'IMG') {\n childNode.parentElement?.removeChild(childNode);\n }\n });\n }\n });\n}\n\nfunction createNewList(listItemContainer: Element, doc: Document, tag: 'OL' | 'UL') {\n const newList = doc.createElement(tag);\n const startAttribute = listItemContainer.firstElementChild?.getAttribute('start');\n if (startAttribute) {\n newList.setAttribute('start', startAttribute);\n }\n return newList;\n}\n\n/**\n * The node processing is based on the premise of only ol/ul is in ListContainerWrapper class\n * However the html might be malformed, this function is to split all the other elements out of ListContainerWrapper\n * @param fragment pasted document that contains all the list element.\n */\nfunction sanitizeListItemContainer(fragment: DocumentFragment) {\n const listItemContainerListEl = toArray(\n fragment.querySelectorAll(WORD_ONLINE_IDENTIFYING_SELECTOR)\n );\n listItemContainerListEl.forEach(el => {\n const replaceRegex = new RegExp(`\\\\b${LIST_CONTAINER_ELEMENT_CLASS_NAME}\\\\b`, 'g');\n if (el.previousSibling) {\n const prevParent = splitParentNode(el, true) as HTMLElement;\n prevParent.className = prevParent.className.replace(replaceRegex, '');\n }\n if (el.nextSibling) {\n const nextParent = splitParentNode(el, false) as HTMLElement;\n nextParent.className = nextParent.className.replace(replaceRegex, '');\n }\n });\n}\n\n/**\n * Take all the list items in the document, and group the consecutive list times in a list block;\n * @param fragment pasted document that contains all the list element.\n */\nfunction getListItemBlocks(fragment: DocumentFragment): ListItemBlock[] {\n const listElements = fragment.querySelectorAll('.' + LIST_CONTAINER_ELEMENT_CLASS_NAME);\n const result: ListItemBlock[] = [];\n let curListItemBlock: ListItemBlock | null = null;\n for (let i = 0; i < listElements.length; i++) {\n let curItem = listElements[i];\n if (!curListItemBlock) {\n curListItemBlock = createListItemBlock(curItem);\n } else {\n const { listItemContainers } = curListItemBlock;\n const lastItemInCurBlock = listItemContainers[listItemContainers.length - 1];\n if (\n curItem == lastItemInCurBlock.nextSibling ||\n (lastItemInCurBlock.parentNode &&\n getFirstLeafNode(curItem) ==\n getNextLeafSibling(lastItemInCurBlock.parentNode, lastItemInCurBlock))\n ) {\n listItemContainers.push(curItem);\n curListItemBlock.endElement = curItem;\n } else {\n curListItemBlock.endElement = lastItemInCurBlock;\n result.push(curListItemBlock);\n curListItemBlock = createListItemBlock(curItem);\n }\n }\n }\n\n if (curListItemBlock && curListItemBlock.listItemContainers.length > 0) {\n result.push(curListItemBlock);\n }\n\n return result;\n}\n\n/**\n * Flatten the list items, so that all the consecutive list items are under the same parent.\n * @param fragment Root element of that contains the element.\n * @param listItemBlock The list item block needed to be flattened.\n */\nfunction flattenListBlock(fragment: DocumentFragment, listItemBlock: ListItemBlock) {\n if (listItemBlock.startElement && listItemBlock.endElement) {\n const collapsedListItemSections = collapseNodes(\n fragment,\n listItemBlock.startElement,\n listItemBlock.endElement,\n true\n );\n collapsedListItemSections.forEach(section => {\n if (getTagOfNode(section.firstChild) == 'DIV') {\n unwrap(section);\n }\n });\n }\n}\n\n/**\n * Get the list type that the container contains. If there is no list in the container\n * return null;\n * @param listItemContainer Container that contains a list\n */\nfunction getContainerListType(listItemContainer: Element): 'OL' | 'UL' | null {\n const tag = getTagOfNode(listItemContainer.firstChild);\n return tag == 'UL' || tag == 'OL' ? tag : null;\n}\n\n/**\n * Insert list item into the correct position of a list\n * @param listRootElement Root element of the list that is accepting a coming element.\n * @param itemToInsert List item that needed to be inserted.\n * @param listType Type of list(ul/ol)\n */\nfunction insertListItem(\n listRootElement: Element,\n itemToInsert: HTMLElement,\n listType: 'UL' | 'OL',\n doc: HTMLDocument\n): void {\n if (!listType) {\n return;\n }\n // Get item level from 'data-aria-level' attribute\n let itemLevel = parseInt(itemToInsert.getAttribute('data-aria-level') ?? '');\n\n // Try to reuse the List Marker\n let style = itemToInsert.getAttribute('data-leveltext');\n if (\n listType == 'UL' &&\n style &&\n VALID_LIST_STYLE_CHAR_CODES.indexOf(style.charCodeAt(0).toString()) > -1\n ) {\n itemToInsert.style.listStyleType = `\"${style} \"`;\n }\n\n let curListLevel = listRootElement; // Level iterator to find the correct place for the current element.\n // if the itemLevel is 1 it means the level iterator is at the correct place.\n while (itemLevel > 1) {\n if (!curListLevel.firstChild) {\n // If the current level is empty, create empty list within the current level\n // then move the level iterator into the next level.\n curListLevel.appendChild(doc.createElement(listType));\n if (curListLevel.firstElementChild) {\n curListLevel = curListLevel.firstElementChild;\n }\n } else {\n // If the current level is not empty, the last item in the needs to be a UL or OL\n // and the level iterator should move to the UL/OL at the last position.\n let lastChild = curListLevel.lastElementChild;\n let lastChildTag = getTagOfNode(lastChild);\n if (lastChild && (lastChildTag == 'UL' || lastChildTag == 'OL')) {\n // If the last child is a list(UL/OL), then move the level iterator to last child.\n curListLevel = lastChild;\n } else {\n // If the last child is not a list, then append a new list to the level\n // and move the level iterator to the new level.\n curListLevel.appendChild(doc.createElement(listType));\n if (curListLevel.lastElementChild) {\n curListLevel = curListLevel.lastElementChild;\n }\n }\n }\n itemLevel--;\n }\n\n // Once the level iterator is at the right place, then append the list item in the level.\n curListLevel.appendChild(itemToInsert);\n}\n\n/**\n * Insert the converted list item into the correct place.\n * @param convertedListElement List element that is converted from list item block\n * @param fragment Root element of that contains the converted listItemBlock\n * @param listItemBlock List item block that was converted.\n */\nfunction insertConvertedListToDoc(\n convertedListElement: Element,\n fragment: DocumentFragment,\n listItemBlock: ListItemBlock\n) {\n if (!convertedListElement) {\n return;\n }\n\n const { insertPositionNode } = listItemBlock;\n if (insertPositionNode) {\n const parentNode = insertPositionNode.parentNode;\n if (parentNode) {\n parentNode.insertBefore(convertedListElement, insertPositionNode);\n }\n } else {\n const parentNode = listItemBlock.startElement?.parentNode;\n if (parentNode) {\n parentNode.appendChild(convertedListElement);\n } else {\n fragment.appendChild(convertedListElement);\n }\n }\n}\n\nfunction getImageNodes(fragment: DocumentFragment) {\n return fragment.querySelectorAll('.' + IMAGE_CONTAINER_ELEMENT_CLASS_NAME);\n}\n","import { BeforePasteEvent, TrustedHTMLHandler } from 'roosterjs-editor-types';\nimport { moveChildNodes } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Convert pasted content from PowerPoint\n * @param event The BeforePaste event\n */\nexport default function convertPastedContentFromPowerPoint(\n event: BeforePasteEvent,\n trustedHTMLHandler: TrustedHTMLHandler\n) {\n const { fragment, clipboardData } = event;\n\n if (clipboardData.html && !clipboardData.text && clipboardData.image) {\n // It is possible that PowerPoint copied both image and HTML but not plain text.\n // We always prefer HTML if any.\n const doc = new DOMParser().parseFromString(\n trustedHTMLHandler(clipboardData.html),\n 'text/html'\n );\n\n moveChildNodes(fragment, doc?.body);\n }\n}\n","/**\n * @internal\n * List of deprecated colors that should be removed\n */\n\nexport const DeprecatedColorList: string[] = [\n 'activeborder',\n 'activecaption',\n 'appworkspace',\n 'background',\n 'buttonhighlight',\n 'buttonshadow',\n 'captiontext',\n 'inactiveborder',\n 'inactivecaption',\n 'inactivecaptiontext',\n 'infobackground',\n 'infotext',\n 'menu',\n 'menutext',\n 'scrollbar',\n 'threeddarkshadow',\n 'threedface',\n 'threedhighlight',\n 'threedlightshadow',\n 'threedfhadow',\n 'window',\n 'windowframe',\n 'windowtext',\n];\n","import { chainSanitizerCallback } from 'roosterjs-editor-dom';\nimport { DeprecatedColorList } from './deprecatedColorList';\nimport { HtmlSanitizerOptions } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Remove the deprecated colors from pasted content\n * @param sanitizingOption the sanitizingOption of BeforePasteEvent\n * */\nexport default function sanitizeHtmlColorsFromPastedContent(\n sanitizingOption: Required\n) {\n ['color', 'background-color'].forEach(property => {\n chainSanitizerCallback(\n sanitizingOption.cssStyleCallbacks,\n property,\n (value: string) => DeprecatedColorList.indexOf(value) < 0\n );\n });\n}\n","import { chainSanitizerCallback } from 'roosterjs-editor-dom';\nimport { HtmlSanitizerOptions } from 'roosterjs-editor-types';\n\nconst SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];\n\n/**\n * @internal\n * Clear local paths and remove link\n * @param sanitizingOption the sanitizingOption of BeforePasteEvent\n * */\nexport default function sanitizeLinks(sanitizingOption: Required) {\n chainSanitizerCallback(\n sanitizingOption.attributeCallbacks,\n 'href',\n (value: string, element: HTMLElement) => validateLink(value, element)\n );\n}\n\nfunction validateLink(link: string, htmlElement: HTMLElement) {\n let url;\n try {\n url = new URL(link);\n } catch {\n url = undefined;\n }\n\n /* whitelist supported protocols */\n if (url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) > -1) {\n return link;\n }\n htmlElement.removeAttribute('href');\n return '';\n}\n","import ListMetadata from './ListMetadata';\n\n/**\n * @internal\n * Holds the ids for the lists already seen for a specified level\n */\nexport default interface LevelLists {\n /**\n * The metadata for the lists seen at this level\n * key: word list id, value: list metadata\n */\n listsMetadata: { [key: string]: ListMetadata };\n\n /** Unique id of the list currently at this level */\n currentUniqueListId: number;\n}\n\n/**\n * @internal\n * create an empty LevelLists\n */\nexport function createLevelLists(): LevelLists {\n return {\n listsMetadata: {},\n currentUniqueListId: -1,\n };\n}\n","import LevelLists, { createLevelLists } from './LevelLists';\nimport ListItemMetadata from './ListItemMetadata';\nimport ListMetadata from './ListMetadata';\n\n/**\n * @internal\n * Contains the state of the WordConverter when called back after yielding\n */\nexport default interface WordConverterArguments {\n /** The list of element nodes being processed */\n nodes: NodeListOf;\n\n /** The index of the element currently being processed */\n currentIndex: number;\n\n /**\n * Holds the metadata for all the lists we have found\n * key: unique list id, value: list metadata\n */\n lists: { [key: string]: ListMetadata };\n\n /**\n * Stores the list item meta data of the items we\n * have found that need to be converted\n */\n listItems: ListItemMetadata[];\n\n /**\n * This array holds the list id of the lists we are processing\n * that are next to each other.. This list will be used to determine\n * if list items are next to each other or if they are separated...\n * Separated items are ignored from the conversion\n */\n\n currentListIdsByLevels: LevelLists[];\n\n /** Remembers the item that was last processed */\n lastProcessedItem: HTMLElement | null;\n}\n\n/**\n * @internal\n * create an empty WordConverterArguments\n */\nexport function createWordConverterArguments(\n nodes: NodeListOf\n): WordConverterArguments {\n return {\n nodes: nodes,\n currentIndex: 0,\n lists: {},\n listItems: [],\n currentListIdsByLevels: [createLevelLists()],\n lastProcessedItem: null,\n };\n}\n","import { NodeType } from 'roosterjs-editor-types';\n\n/** NodeId attribute */\nconst NODE_ID_ATTRIBUTE_NAME = 'NodeId';\n\n/**\n * @internal\n * Custom data for dom elements\n */\nexport default interface WordCustomData {\n /** The dict storing custom data, key is element Id, value is dictionary */\n dict: { [key: string]: { [key: string]: number } };\n\n /** Next node Id to use */\n nextNodeId: number;\n}\n\n/**\n * @internal\n * Create an empty WordCustomData\n */\nexport function createCustomData(): WordCustomData {\n return {\n dict: {},\n nextNodeId: 1,\n };\n}\n\n/**\n * @internal\n * Sets the specified object data\n */\nexport function setObject(wordCustomData: WordCustomData, element: Node, key: string, value: any) {\n // Get the id for the element\n if (element.nodeType == NodeType.Element) {\n let id = getAndSetNodeId(wordCustomData, element as HTMLElement);\n if (id != '') {\n // Get the values for the element\n if (!wordCustomData.dict[id]) {\n // First time dictionary creation\n wordCustomData.dict[id] = {};\n }\n wordCustomData.dict[id][key] = value;\n }\n }\n}\n\n/**\n * @internal\n * Reads the specified object data\n */\nexport function getObject(wordCustomData: WordCustomData, element: Node, key: string): any {\n if (element.nodeType == NodeType.Element) {\n let id = getAndSetNodeId(wordCustomData, element as HTMLElement);\n if (id != '') {\n return wordCustomData.dict[id] && wordCustomData.dict[id][key];\n }\n }\n\n return null;\n}\n\n/**\n * Get the unique id for the specified node...\n */\nfunction getAndSetNodeId(wordCustomData: WordCustomData, element: HTMLElement): string {\n let id = element.getAttribute(NODE_ID_ATTRIBUTE_NAME);\n if (!id) {\n id = wordCustomData.nextNodeId.toString();\n wordCustomData.nextNodeId++;\n element.setAttribute(NODE_ID_ATTRIBUTE_NAME, id);\n }\n return id;\n}\n","import { CssStyleCallbackMap, ElementCallbackMap } from 'roosterjs-editor-types';\nimport {\n chainSanitizerCallback,\n getStyles,\n moveChildNodes,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\n\nconst MSO_COMMENT_PARENT = 'mso-comment-parent';\nconst MSO_COMMENT_REFERENCE = 'mso-comment-reference';\nconst MSO_COMMENT_DATE = 'mso-comment-date';\nconst MSO_COMMENT_ANCHOR_HREF_REGEX = /#_msocom_/;\nconst MSO_SPECIAL_CHARACTER = 'mso-special-character';\nconst MSO_SPECIAL_CHARACTER_COMMENT = 'comment';\nconst MSO_COMMENT_CONTINUATION = 'mso-comment-continuation';\nconst MSO_ELEMENT = 'mso-element';\nconst MSO_ELEMENT_COMMENT_LIST = 'comment-list';\nconst MSO_COMMENT_DONE = 'mso-comment-done';\n\n/**\n * @internal\n * Removes comments when pasting Word content.\n */\nexport default function commentsRemoval(\n elementCallbacks: ElementCallbackMap,\n styleCallbacks: CssStyleCallbackMap\n) {\n // 1st Step, Remove SPAN elements added after each comment.\n // Word adds multiple elements for comments as SPAN elements.\n // In this step we remove these elements:\n // Structure as of 4/18/2022\n // 1.  \n // 2. \n // \n // \n // [RS2]\n //  \n // \n // \n // \n chainSanitizerCallback(elementCallbacks, 'SPAN', element => {\n const styles = getStyles(element);\n if (styles[MSO_SPECIAL_CHARACTER] == MSO_SPECIAL_CHARACTER_COMMENT) {\n element.parentElement?.removeChild(element);\n }\n return true;\n });\n\n // 2nd Step, Modify Anchor elements.\n // 1. When the element was selected to add a comment in Word, the selection is converted to\n // an anchor element, so we change the tag to span.\n // 2. Word also adds some Anchor elements with the following structure:\n // Structure as of 4/18/2022\n // [SS3]\n // In this step we remove this Anchor elements.\n chainSanitizerCallback(elementCallbacks, 'A', element => {\n if (\n safeInstanceOf(element, 'HTMLAnchorElement') &&\n MSO_COMMENT_ANCHOR_HREF_REGEX.test(element.href)\n ) {\n element.parentElement?.removeChild(element);\n }\n return true;\n });\n\n // 3rd Step, remove List of comments.\n // When the document have a long thread of comments, these comments are appended\n // at the end of the copied fragment, we also need to remove it.\n // Structure as of 4/18/2022\n //\n //
                            \n //
                            \n //
                            ...
                            \n //
                            ...
                            \n //
                            ...
                            \n //
                            \n // \n chainSanitizerCallback(elementCallbacks, 'DIV', element => {\n const styles = getStyles(element);\n if (styles[MSO_ELEMENT] == MSO_ELEMENT_COMMENT_LIST) {\n moveChildNodes(element);\n }\n return true;\n });\n\n /**\n * Remove styles related to Office Comments that can cause unwanted behaviors\n * depending on the user client\n */\n [\n MSO_COMMENT_REFERENCE,\n MSO_COMMENT_DATE,\n MSO_COMMENT_PARENT,\n MSO_COMMENT_CONTINUATION,\n MSO_COMMENT_DONE,\n ].forEach(style => chainSanitizerCallback(styleCallbacks, style, () => false));\n}\n","import commentsRemoval from './commentsRemoval';\nimport { BeforePasteEvent } from 'roosterjs-editor-types';\nimport { chainSanitizerCallback, moveChildNodes } from 'roosterjs-editor-dom';\nimport { createWordConverter } from './wordConverter';\nimport { createWordConverterArguments } from './WordConverterArguments';\nimport { processNodeConvert, processNodesDiscovery } from './converterUtils';\n\nconst PERCENTAGE_REGEX = /%/;\nconst DEFAULT_BROWSER_LINE_HEIGHT_PERCENTAGE = 120;\nconst LIST_ELEMENTS_SELECTOR = 'p,h1,h2,h3,h4,h5,h6';\n\n/**\n * @internal\n * Converts all the Word generated list items in the specified node into standard HTML UL and OL tags\n */\nexport default function convertPastedContentFromWord(event: BeforePasteEvent) {\n const { sanitizingOption, fragment } = event;\n\n // Preserve when its innerHTML is \" \" to avoid dropping an empty line\n chainSanitizerCallback(sanitizingOption.elementCallbacks, 'O:P', element => {\n moveChildNodes(element);\n element.appendChild(element.ownerDocument.createTextNode('\\u00A0')); //  \n return true;\n });\n\n let wordConverter = createWordConverter();\n\n // First find all the nodes that we need to check for list item information\n // This call will return all the p and header elements under the root node.. These are the elements that\n // Word uses a list items, so we'll only process them and avoid walking the whole tree.\n let elements = fragment.querySelectorAll(LIST_ELEMENTS_SELECTOR) as NodeListOf;\n if (elements.length > 0) {\n wordConverter.wordConverterArgs = createWordConverterArguments(elements);\n if (processNodesDiscovery(wordConverter)) {\n processNodeConvert(wordConverter);\n }\n }\n\n // If the List style contains marginBottom = 0in, the space after the list is going to be too narrow.\n // Remove this style so the list displays correctly.\n ['OL', 'UL'].forEach(tag => {\n chainSanitizerCallback(sanitizingOption.elementCallbacks, tag, element => {\n if (element.style.marginBottom == '0in') {\n element.style.marginBottom = '';\n }\n\n return true;\n });\n });\n\n //If the line height is less than the browser default line height, line between the text is going to be too narrow\n chainSanitizerCallback(sanitizingOption.cssStyleCallbacks, 'line-height', (value: string) => {\n let parsedLineHeight: number;\n if (\n PERCENTAGE_REGEX.test(value) &&\n !isNaN((parsedLineHeight = parseInt(value))) &&\n parsedLineHeight < DEFAULT_BROWSER_LINE_HEIGHT_PERCENTAGE\n ) {\n return false;\n }\n return true;\n });\n\n commentsRemoval(sanitizingOption.elementCallbacks, sanitizingOption.cssStyleCallbacks);\n}\n","import ListItemMetadata from './ListItemMetadata';\nimport ListMetadata from './ListMetadata';\nimport WordConverter from './wordConverter';\nimport WordConverterArguments from './WordConverterArguments';\nimport { createLevelLists } from './LevelLists';\nimport { getObject, setObject } from './WordCustomData';\nimport { getStyles, getTagOfNode, moveChildNodes } from 'roosterjs-editor-dom';\nimport { NodeType } from 'roosterjs-editor-types';\n\n/** Word list metadata style name */\nconst LOOKUP_DEPTH = 5;\n\n/** Name for the word list id property in the custom data */\nconst UNIQUE_LIST_ID_CUSTOM_DATA = 'UniqueListId';\n\n/** Word list metadata style name */\nconst MSO_LIST_STYLE_NAME = 'mso-list';\n\n/** Regular expression to match line breaks */\nconst LINE_BREAKS = /[\\n|\\r]/gi;\n\n/**\n * @internal\n * Handles the pass 1: Discovery\n * During discovery, we'll parse the metadata out of the elements and store it in the list items dictionary.\n * We'll detect cases where the list items for a particular ordered list are not next to each other. Word does these\n * for numbered headers, and we don't want to convert those, because the numbering would be completely wrong.\n */\nexport function processNodesDiscovery(wordConverter: WordConverter): boolean {\n let args = wordConverter.wordConverterArgs;\n if (!args) {\n return false;\n }\n while (args.currentIndex < args.nodes.length) {\n let node = args.nodes.item(args.currentIndex);\n\n // Try to get the list metadata for the specified node\n let itemMetadata = getListItemMetadata(node);\n if (itemMetadata) {\n let levelInfo =\n args.currentListIdsByLevels[itemMetadata.level - 1] || createLevelLists();\n args.currentListIdsByLevels[itemMetadata.level - 1] = levelInfo;\n\n // We need to drop some list information if this is not an item next to another\n if (args.lastProcessedItem && getRealPreviousSibling(node) != args.lastProcessedItem) {\n // This list item is not next to the previous one. This means that there is some content in between them\n // so we need to reset our list of list ids per level\n resetCurrentLists(args);\n }\n\n // Get the list metadata for the list that will hold this item\n let listMetadata = levelInfo.listsMetadata[itemMetadata.wordListId];\n if (!listMetadata) {\n // Get the first item fake bullet.. This will be used later to check what is the right type of list\n let firstFakeBullet = getFakeBulletText(node, LOOKUP_DEPTH);\n\n // This is a the first item of a list.. We'll create the list metadata using the information\n // we already have from this first item\n listMetadata = {\n numberOfItems: 0,\n uniqueListId: wordConverter.nextUniqueId++,\n firstFakeBullet: firstFakeBullet,\n\n // If the bullet we got is empty or not found, we ignore the list out.. this means\n // that this is not an item we need to convert of that the format doesn't match what\n // we are expecting\n ignore: !firstFakeBullet || firstFakeBullet.length == 0,\n\n // We'll use the first fake bullet to try to figure out which type of list we create. If this list has a second\n // item, we'll perform a better comparison, but for one item lists, this will be check that will determine the list type\n tagName: getFakeBulletTagName(firstFakeBullet),\n };\n levelInfo.listsMetadata[itemMetadata.wordListId] = listMetadata;\n args.lists[listMetadata.uniqueListId.toString()] = listMetadata;\n } else if (!listMetadata.ignore && listMetadata.numberOfItems == 1) {\n // This is the second item we've seen for this list.. we'll compare the 2 fake bullet\n // items we have an decide if we create ordered or unordered lists based on this.\n // This is the best way we can do this since we cannot read the metadata that Word\n // puts in the head of the HTML...\n let secondFakeBullet = getFakeBulletText(node, LOOKUP_DEPTH);\n listMetadata.tagName =\n listMetadata.firstFakeBullet == secondFakeBullet ? 'UL' : 'OL';\n }\n\n // Set the unique id to the list\n itemMetadata.uniqueListId = listMetadata.uniqueListId;\n\n // Check if we need to ignore this list... we'll either know already that we need to ignore\n // it, or we'll know it because the previous list items are not next to this one\n if (\n listMetadata.ignore ||\n (listMetadata.tagName == 'OL' &&\n listMetadata.numberOfItems > 0 &&\n levelInfo.currentUniqueListId != itemMetadata.uniqueListId)\n ) {\n // We need to ignore this item... and we also need to forget about the lists that\n // are not at the root level\n listMetadata.ignore = true;\n args.currentListIdsByLevels[0].currentUniqueListId = -1;\n args.currentListIdsByLevels = args.currentListIdsByLevels.slice(0, 1);\n } else {\n // This is an item we don't need to ignore... If added lists deep under this one before\n // we'll drop their ids from the list of ids per level.. this is because this list item\n // breaks the deeper lists.\n if (args.currentListIdsByLevels.length > itemMetadata.level) {\n args.currentListIdsByLevels = args.currentListIdsByLevels.slice(\n 0,\n itemMetadata.level\n );\n }\n\n levelInfo.currentUniqueListId = itemMetadata.uniqueListId;\n\n // Add the list item into the list of items to be processed\n args.listItems.push(itemMetadata);\n listMetadata.numberOfItems++;\n }\n\n args.lastProcessedItem = node;\n } else {\n // Here, we know that this is not a list item, but we'll want to check if it is one \"no bullet\" list items...\n // these can be created by creating a bullet and hitting delete on it it... The content will continue to be indented, but there will\n // be no bullet and the list will continue correctly after that. Visually, it looks like the previous item has multiple lines, but\n // the HTML generated has multiple paragraphs with the same class. We'll merge these when we find them, so the logic doesn't skips\n // the list conversion thinking that the list items are not together...\n let last = args.lastProcessedItem;\n if (\n last &&\n getRealPreviousSibling(node) == last &&\n node.tagName == last.tagName &&\n node.className == last.className\n ) {\n // Add 2 line breaks and move all the nodes to the last item\n last.appendChild(last.ownerDocument.createElement('br'));\n last.appendChild(last.ownerDocument.createElement('br'));\n moveChildNodes(last, node, true /*keepExistingChildren*/);\n\n // Remove the item that we don't need anymore\n node.parentNode?.removeChild(node);\n }\n }\n\n // Move to the next element are return true if more elements need to be processed\n args.currentIndex++;\n }\n return args.listItems.length > 0;\n}\n\n/**\n * @internal\n * Handles the pass 2: Conversion\n * During conversion, we'll go over the elements that belong to a list that we've marked as a list to convert, and we'll perform the\n * conversion needed\n */\nexport function processNodeConvert(wordConverter: WordConverter): boolean {\n let args = wordConverter.wordConverterArgs;\n if (args) {\n args.currentIndex = 0;\n\n while (args.currentIndex < args.listItems.length) {\n let metadata = args.listItems[args.currentIndex];\n let node = metadata.originalNode;\n let listMetadata = args.lists[metadata.uniqueListId.toString()];\n if (!listMetadata.ignore) {\n // We have a list item that we need to convert, get or create the list\n // that hold this item out\n let list = getOrCreateListForNode(wordConverter, node, metadata, listMetadata);\n if (list) {\n // Clean the element out.. this call gets rid of the fake bullet and unneeded nodes\n cleanupListIgnore(node, LOOKUP_DEPTH);\n\n // Create a new list item and transfer the children\n let li = node.ownerDocument.createElement('LI');\n if (getTagOfNode(node).startsWith('H')) {\n const clone = node.cloneNode(true /* deep */) as HTMLHeadingElement;\n clone.style.textIndent = '';\n clone.style.marginLeft = '';\n clone.style.marginRight = '';\n li.appendChild(clone);\n } else {\n moveChildNodes(li, node);\n }\n\n // Append the list item into the list\n list.appendChild(li);\n\n // Remove the node we just converted\n node.parentNode?.removeChild(node);\n\n if (listMetadata.tagName == 'UL') {\n wordConverter.numBulletsConverted++;\n } else {\n wordConverter.numNumberedConverted++;\n }\n }\n }\n args.currentIndex++;\n }\n }\n return wordConverter.numBulletsConverted > 0 || wordConverter.numNumberedConverted > 0;\n}\n\n/**\n * Gets or creates the list (UL or OL) that holds this item out based on the\n * items content and the specified metadata\n */\nfunction getOrCreateListForNode(\n wordConverter: WordConverter,\n node: HTMLElement,\n metadata: ListItemMetadata,\n listMetadata: ListMetadata\n): Node {\n // First get the last list next to this node under the specified level. This code\n // path will return the list or will create lists if needed\n let list = recurringGetOrCreateListAtNode(node, metadata.level, listMetadata);\n\n // Here use the unique list ID to detect if we have the right list...\n // it is possible to have 2 different lists next to each other with different formats, so\n // we want to detect this an create separate lists for those cases\n let listId = getObject(wordConverter.wordCustomData, list, UNIQUE_LIST_ID_CUSTOM_DATA);\n\n // If we have a list with and ID, but the ID is different than the ID for this list item, this\n // is a completely new list, so we'll append a new list for that\n if ((listId && listId != metadata.uniqueListId) || (!listId && list.firstChild)) {\n let newList = node.ownerDocument.createElement(listMetadata.tagName);\n list.parentNode?.insertBefore(newList, list.nextSibling);\n list = newList;\n }\n\n // Set the list id into the custom data\n setObject(\n wordConverter.wordCustomData,\n list,\n UNIQUE_LIST_ID_CUSTOM_DATA,\n metadata.uniqueListId\n );\n\n // This call will convert the list if needed to the right type of list required. This can happen\n // on the cases where the first list item for this list is located after a deeper list. for that\n // case, we will have created a UL for it, and we may need to convert it\n return convertListIfNeeded(wordConverter, list, listMetadata);\n}\n\n/**\n * Converts the list between UL and OL if needed, by using the fake bullet and\n * information already stored in the list itself\n */\nfunction convertListIfNeeded(\n wordConverter: WordConverter,\n list: Node,\n listMetadata: ListMetadata\n): Node {\n // Check if we need to convert the list out\n if (listMetadata.tagName != getTagOfNode(list)) {\n // We have the wrong list type.. convert it, set the id again and transfer all the children\n let newList = list.ownerDocument?.createElement(listMetadata.tagName);\n if (newList) {\n setObject(\n wordConverter.wordCustomData,\n newList,\n UNIQUE_LIST_ID_CUSTOM_DATA,\n getObject(wordConverter.wordCustomData, list, UNIQUE_LIST_ID_CUSTOM_DATA)\n );\n moveChildNodes(newList, list);\n\n list.parentNode?.insertBefore(newList, list);\n list.parentNode?.removeChild(list);\n list = newList;\n }\n }\n\n return list;\n}\n\n/**\n * Gets or creates the specified list\n */\nfunction recurringGetOrCreateListAtNode(\n node: HTMLElement,\n level: number,\n listMetadata: ListMetadata | null\n): Node {\n let parent: Node | null = null;\n let possibleList: Node | null = null;\n if (level == 1) {\n // Root case, we'll check if the list is the previous sibling of the node\n possibleList = getRealPreviousSibling(node);\n } else {\n // If we get here, we are looking for level 2 or deeper... get the upper list\n // and check if the last element is a list\n parent = recurringGetOrCreateListAtNode(node, level - 1, null);\n if (parent.lastChild) {\n possibleList = parent.lastChild;\n }\n }\n\n // Check the element that we got and verify that it is a list\n if (possibleList && possibleList.nodeType == NodeType.Element) {\n let tag = getTagOfNode(possibleList);\n if (tag == 'UL' || tag == 'OL') {\n // We have a list.. use it\n return possibleList;\n }\n }\n\n // If we get here, it means we don't have a list and we need to create one\n // this code path will always create new lists as UL lists\n let newList = node.ownerDocument?.createElement(listMetadata ? listMetadata.tagName : 'UL');\n if (level == 1) {\n // For level 1, we'll insert the list before the node\n node.parentNode?.insertBefore(newList, node);\n } else {\n // Any level 2 or above, we insert the list as the last\n // child of the upper level list\n parent?.appendChild(newList);\n }\n\n return newList;\n}\n\n/**\n * Cleans up the node children by removing the children marked as mso-list: Ignore.\n * This nodes hold the fake bullet information that Word puts in and when\n * conversion is happening, we want to get rid of these elements\n */\nfunction cleanupListIgnore(node: Node, levels: number) {\n let nodesToRemove: Node[] = [];\n\n for (let child: Node | null = node.firstChild; child; child = child.nextSibling) {\n if (child) {\n // Clean up the item internally first if we need to based on the number of levels\n if (child && child.nodeType == NodeType.Element && levels > 1) {\n cleanupListIgnore(child, levels - 1);\n }\n\n // Try to convert word comments into ignore elements if we haven't done so for this element\n child = fixWordListComments(child, true /*removeComments*/);\n\n // Check if we can remove this item out\n if (isEmptySpan(child) || isIgnoreNode(child)) {\n nodesToRemove.push(child);\n }\n }\n }\n\n nodesToRemove.forEach(child => node.removeChild(child));\n}\n\n/**\n * Reads the word list meta dada out of the specified node. If the node\n * is not a Word list item, it returns null.\n */\nfunction getListItemMetadata(node: HTMLElement): ListItemMetadata | null {\n if (node.nodeType == NodeType.Element) {\n let listAttribute = getStyleValue(node, MSO_LIST_STYLE_NAME);\n if (listAttribute && listAttribute.length > 0) {\n try {\n // Word mso-list property holds 3 space separated values in the following format: lst1 level1 lfo0\n // Where:\n // (0) List identified for the metadata in the <head> of the document. We cannot read the <head> meta data\n // (1) Level of the list. This also maps to the <head> metadata that we cannot read, but\n // for almost all cases, it maps to the list indentation (or level). We'll use it as the\n // list indentation value\n // (2) Contains a specific list identifier.\n // Example value: \"l0 level1 lfo1\"\n let listProps = listAttribute.split(' ');\n if (listProps.length == 3) {\n return {\n level: parseInt(listProps[1].substr('level'.length)),\n wordListId: listAttribute,\n originalNode: node,\n uniqueListId: 0,\n };\n }\n } catch (e) {}\n }\n }\n return null;\n}\n\nfunction isFakeBullet(fakeBullet: string): boolean {\n return ['o', '·', '§', '-'].indexOf(fakeBullet) >= 0;\n}\n\n/** Given a fake bullet text, returns the type of list that should be used for it */\nfunction getFakeBulletTagName(fakeBullet: string): string {\n return isFakeBullet(fakeBullet) ? 'UL' : 'OL';\n}\n\n/**\n * Finds the fake bullet text out of the specified node and returns it. For images, it will return\n * a bullet string. If not found, it returns null...\n */\nfunction getFakeBulletText(node: Node, levels: number): string {\n // Word uses the following format for their bullets:\n // <p style=\"mso-list:l1 level1 lfo2\">\n // <span style=\"...\">\n // <span style=\"mso-list:Ignore\">1.<span style=\"...\">      </span></span>\n // </span>\n // Content here...\n // </p>\n //\n // Basically, we need to locate the mso-list:Ignore SPAN, which holds either one text or image node. That\n // text or image node will be the fake bullet we are looking for\n let result: string = '';\n let child: Node | null = node.firstChild;\n while (!result && child) {\n // First, check if we need to convert the Word list comments into real elements\n child = fixWordListComments(child, true /*removeComments*/);\n\n // Check if this is the node that holds the fake bullets (mso-list: Ignore)\n if (isIgnoreNode(child)) {\n // Yes... this is the node that holds either the text or image data\n result = child.textContent?.trim() ?? '';\n\n // This is the case for image case\n if (result.length == 0) {\n result = 'o';\n }\n } else if (child.nodeType == NodeType.Element && levels > 1) {\n // If this is an element and we are not in the last level, try to get the fake bullet\n // out of the child\n result = getFakeBulletText(child, levels - 1);\n }\n\n child = child.nextSibling;\n }\n\n return result;\n}\n\n/**\n * If the specified element is a Word List comments, this code verifies and fixes\n * the markup when needed to ensure that Chrome bullet conversions work as expected\n * -----\n * We'll convert <!--[if !supportLists]--> and <!--[endif]--> comments into\n * <span style=\"mso-list:Ignore\"></span>... Chrome has a bug where it drops the\n * styles of the span, but we'll use these comments to recreate them out\n */\nfunction fixWordListComments(child: Node, removeComments: boolean): Node {\n if (child.nodeType == NodeType.Comment) {\n let value = (child as Comment).data;\n if (value && value.trim().toLowerCase() == '[if !supportlists]') {\n // We have a list ignore start, find the end.. We know is not more than\n // 3 nodes away, so we'll optimize our checks\n let nextElement: Node | null = child;\n let endComment: Node | null = null;\n for (let j = 0; j < 4; j++) {\n nextElement = getRealNextSibling(nextElement);\n if (!nextElement) {\n break;\n }\n if (nextElement.nodeType == NodeType.Comment) {\n value = (nextElement as Comment).data;\n if (value && value.trim().toLowerCase() == '[endif]') {\n endComment = nextElement;\n break;\n }\n }\n }\n\n // if we found the end node, wrap everything out\n if (endComment) {\n let newSpan = child.ownerDocument?.createElement('span');\n newSpan?.setAttribute('style', 'mso-list: ignore');\n\n nextElement = getRealNextSibling(child);\n while (nextElement != endComment) {\n nextElement = nextElement?.nextSibling as HTMLElement;\n if (nextElement.previousSibling) {\n newSpan?.appendChild(nextElement.previousSibling);\n }\n }\n\n // Insert the element out and use that one as the current child\n if (newSpan) {\n endComment.parentNode?.insertBefore(newSpan, endComment);\n }\n\n // Remove the comments out if the call specified it out\n if (removeComments) {\n child.parentNode?.removeChild(child);\n endComment.parentNode?.removeChild(endComment);\n }\n\n // Last, make sure we return the new element out instead of the comment\n if (newSpan) {\n child = newSpan;\n }\n }\n }\n }\n\n return child;\n}\n\n/** Finds the real previous sibling, ignoring empty text nodes */\nfunction getRealPreviousSibling(node: Node): Node | null {\n let prevSibling: Node | null = node;\n do {\n prevSibling = prevSibling.previousSibling;\n } while (prevSibling && isEmptyTextNode(prevSibling));\n return prevSibling;\n}\n\n/** Finds the real next sibling, ignoring empty text nodes */\nfunction getRealNextSibling(node: Node): Node | null {\n let nextSibling: Node | null = node;\n do {\n nextSibling = nextSibling.nextSibling;\n } while (nextSibling && isEmptyTextNode(nextSibling));\n\n return nextSibling;\n}\n\n/**\n * Checks if the specified node is marked as a mso-list: Ignore. These\n * nodes need to be ignored when a list item is converted into standard\n * HTML lists\n */\nfunction isIgnoreNode(node: Node): boolean {\n if (node.nodeType == NodeType.Element) {\n let listAttribute = getStyleValue(node as HTMLElement, MSO_LIST_STYLE_NAME);\n if (\n listAttribute &&\n listAttribute.length > 0 &&\n listAttribute.trim().toLowerCase() == 'ignore'\n ) {\n return true;\n }\n }\n\n return false;\n}\n\n/** Checks if the specified node is an empty span. */\nfunction isEmptySpan(node: Node): boolean {\n return getTagOfNode(node) == 'SPAN' && !node.firstChild;\n}\n\n/** Reads the specified style value from the node */\nfunction getStyleValue(node: HTMLElement, styleName: string): string | null {\n // Word uses non-standard names for the metadata that puts in the style of the element...\n // Most browsers will not provide the information for those nonstandard values through the node.style\n // property, so the only reliable way to read them is to get the attribute directly and do\n // the required parsing..\n return getStyles(node)[styleName] || null;\n}\n\n/** Checks if the node is an empty text node that can be ignored */\nfunction isEmptyTextNode(node: Node): boolean {\n // No node is empty\n if (!node) {\n return true;\n }\n\n // Empty text node is empty\n if (node.nodeType == NodeType.Text) {\n let value = node.nodeValue;\n value = value?.replace(LINE_BREAKS, '') ?? '';\n return value?.trim().length == 0;\n }\n\n // Span or Font with an empty child node is empty\n let tagName = getTagOfNode(node);\n if (\n node.firstChild &&\n node.firstChild == node.lastChild &&\n (tagName == 'SPAN' || tagName == 'FONT')\n ) {\n return isEmptyTextNode(node.firstChild);\n }\n\n // If not found, then this is not empty\n return false;\n}\n\n/** Resets the list */\nfunction resetCurrentLists(args: WordConverterArguments) {\n for (let i = 0; i < args.currentListIdsByLevels.length; i++) {\n let ll = args.currentListIdsByLevels[i];\n if (ll) {\n ll.currentUniqueListId = -1;\n }\n }\n}\n","import WordConverterArguments from './WordConverterArguments';\nimport WordCustomData, { createCustomData } from './WordCustomData';\n\n/**\n * @internal\n * Processes HTML generated by Word, converting Word Lists into standard HTML UL and OL tags\n */\nexport default interface WordConverter {\n /** Next unique id to be assigned to a list */\n nextUniqueId: number;\n\n /** Number of bullets converted */\n numBulletsConverted: number;\n\n /** Number of numbering converted */\n numNumberedConverted: number;\n\n /** The structure that records the status of the conversion */\n wordConverterArgs: WordConverterArguments | null;\n\n /** Custom data storage for list items */\n wordCustomData: WordCustomData;\n}\n\n/**\n * @internal\n * create an empty WordConverter\n */\nexport function createWordConverter(): WordConverter {\n return {\n nextUniqueId: 1,\n numBulletsConverted: 0,\n numNumberedConverted: 0,\n wordConverterArgs: null,\n wordCustomData: createCustomData(),\n };\n}\n","import { replaceWithNode } from 'roosterjs-editor-api';\nimport {\n Browser,\n createRange,\n isCharacterValue,\n isModifierKey,\n PartialInlineElement,\n safeInstanceOf,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n EditorPlugin,\n IEditor,\n NodePosition,\n PickerDataProvider,\n PickerPluginOptions,\n PluginDomEvent,\n PluginEvent,\n PluginEventType,\n PluginInputEvent,\n PluginKeyboardEvent,\n PositionType,\n} from 'roosterjs-editor-types';\n\n// Character codes.\n// IE11 uses different character codes. which are noted below.\n// If adding a new key, test in IE to figure out what the code is.\nconst BACKSPACE_CHAR_CODE = 'Backspace';\nconst TAB_CHAR_CODE = 'Tab';\nconst ENTER_CHAR_CODE = 'Enter';\nconst ESC_CHAR_CODE = !Browser.isIE ? 'Escape' : 'Esc';\nconst LEFT_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowLeft' : 'Left';\nconst UP_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowUp' : 'Up';\nconst RIGHT_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowRight' : 'Right';\nconst DOWN_ARROW_CHAR_CODE = !Browser.isIE ? 'ArrowDown' : 'Down';\nconst DELETE_CHAR_CODE = !Browser.isIE ? 'Delete' : 'Del';\n\n// Input event input types.\nconst DELETE_CONTENT_BACKWARDS_INPUT_TYPE = 'deleteContentBackwards';\n\n// Unidentified key, the code for Android keyboard events.\nconst UNIDENTIFIED_KEY = 'Unidentified';\n// the char code for Android keyboard events on Webview below 51.\nconst UNIDENTIFIED_CODE = [0, 229];\n\n/**\n * PickerPlugin represents a plugin of editor which can handle picker related behaviors, including\n * - Show picker when special trigger key is pressed\n * - Hide picker\n * - Change selection in picker by Up/Down/Left/Right\n * - Apply selected item in picker\n *\n * PickerPlugin doesn't provide any UI, it just wraps related DOM events and invoke callback functions.\n */\nexport default class PickerPlugin\n implements EditorPlugin {\n private editor: IEditor | null = null;\n private eventHandledOnKeyDown: boolean = false;\n private blockSuggestions: boolean = false;\n private isSuggesting: boolean = false;\n private lastKnownRange: Range | null = null;\n\n // For detecting backspace in Android\n private isPendingInputEventHandling: boolean = false;\n private currentInputLength: number = 0;\n private newInputLength: number = 0;\n\n constructor(public readonly dataProvider: T, private pickerOptions: PickerPluginOptions) {}\n\n /**\n * Get a friendly name\n */\n getName() {\n return 'Picker';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n public initialize(editor: IEditor) {\n this.editor = editor;\n this.dataProvider.onInitalize(\n (htmlNode: Node) => {\n if (this.editor) {\n this.editor.focus();\n\n let wordToReplace = this.getWord(null);\n\n // Safari drops our focus out so we get an empty word to replace when we call getWord.\n // We fall back to using the lastKnownRange to try to get around this.\n if ((!wordToReplace || wordToReplace.length == 0) && this.lastKnownRange) {\n this.editor.select(this.lastKnownRange);\n wordToReplace = this.getWord(null);\n }\n\n let insertNode = () => {\n if (wordToReplace && this.editor) {\n replaceWithNode(\n this.editor,\n wordToReplace,\n htmlNode,\n true /* exactMatch */\n );\n } else {\n this.editor?.insertNode(htmlNode);\n }\n this.setIsSuggesting(false);\n };\n\n this.editor.addUndoSnapshot(\n insertNode,\n this.pickerOptions.changeSource,\n this.pickerOptions.handleAutoComplete\n );\n }\n },\n (isSuggesting: boolean) => {\n this.setIsSuggesting(isSuggesting);\n },\n editor\n );\n }\n\n /**\n * Dispose this plugin\n */\n public dispose() {\n this.editor = null;\n this.isSuggesting = false;\n this.blockSuggestions = false;\n this.eventHandledOnKeyDown = false;\n this.lastKnownRange = null;\n this.isPendingInputEventHandling = false;\n this.currentInputLength = 0;\n this.newInputLength = 0;\n this.dataProvider.onDispose();\n }\n\n /**\n * Check if the plugin should handle the given event exclusively.\n * Handle an event exclusively means other plugin will not receive this event in\n * onPluginEvent method.\n * If two plugins will return true in willHandleEventExclusively() for the same event,\n * the final result depends on the order of the plugins are added into editor\n * @param event The event to check\n */\n public willHandleEventExclusively(event: PluginEvent) {\n return (\n this.isSuggesting &&\n (event.eventType == PluginEventType.KeyDown ||\n event.eventType == PluginEventType.KeyUp ||\n event.eventType == PluginEventType.Input)\n );\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n public onPluginEvent(event: PluginEvent) {\n switch (event.eventType) {\n case PluginEventType.ContentChanged:\n if (event.source == ChangeSource.SetContent && this.dataProvider.onContentChanged) {\n // Stop suggesting since content is fully changed\n if (this.isSuggesting) {\n this.setIsSuggesting(false);\n }\n\n // Undo and other major changes to document content fire this type of event.\n // Inform the data provider of the current picker placed elements in the body.\n let elementIds: string[] = [];\n this.editor?.queryElements(\n \"[id^='\" + this.pickerOptions.elementIdPrefix + \"']\",\n element => {\n if (element.id) {\n elementIds.push(element.id);\n }\n }\n );\n this.dataProvider.onContentChanged(elementIds);\n }\n break;\n\n case PluginEventType.KeyDown:\n this.eventHandledOnKeyDown = false;\n if (this.isAndroidKeyboardEvent(event)) {\n // On Android, the key for KeyboardEvent is \"Unidentified\" or undefined,\n // so handling should be done using the input rather than key down event\n // Since the key down event happens right before the input event, calculate the input\n // length here in preparation for onAndroidInputEvent\n this.currentInputLength = this.calcInputLength(event);\n this.isPendingInputEventHandling = true;\n } else {\n this.onKeyDownEvent(event);\n this.isPendingInputEventHandling = false;\n }\n break;\n\n case PluginEventType.Input:\n if (this.isPendingInputEventHandling) {\n this.onAndroidInputEvent(event);\n }\n break;\n\n case PluginEventType.KeyUp:\n if (!this.eventHandledOnKeyDown && this.shouldHandleKeyUpEvent(event)) {\n this.onKeyUpDomEvent(event);\n this.isPendingInputEventHandling = false;\n }\n break;\n\n case PluginEventType.MouseUp:\n if (this.isSuggesting) {\n this.setIsSuggesting(false);\n }\n break;\n\n case PluginEventType.Scroll:\n if (this.dataProvider.onScroll) {\n // Dispatch scroll event to data provider\n this.dataProvider.onScroll(event.scrollContainer);\n }\n break;\n }\n }\n\n private setLastKnownRange(range: Range | null) {\n this.lastKnownRange = range;\n }\n\n private setIsSuggesting(isSuggesting: boolean) {\n this.isSuggesting = isSuggesting;\n\n if (!isSuggesting) {\n this.setLastKnownRange(null);\n }\n this.dataProvider.onIsSuggestingChanged(isSuggesting);\n\n this.setAriaOwns(isSuggesting);\n this.setAriaActiveDescendant(isSuggesting ? 0 : null);\n }\n\n private cancelDefaultKeyDownEvent(event: PluginKeyboardEvent) {\n this.eventHandledOnKeyDown = true;\n event.rawEvent.preventDefault();\n event.rawEvent.stopImmediatePropagation();\n }\n\n private getIdValue(node: Node): string | null {\n if (safeInstanceOf(node, 'HTMLElement')) {\n const attribute = node.attributes.getNamedItem('id');\n return attribute ? (attribute.value as string) : null;\n } else {\n return null;\n }\n }\n\n private getWordBeforeCursor(event: PluginKeyboardEvent | null): string | null {\n let searcher = this.editor?.getContentSearcherOfCursor(event);\n return searcher ? searcher.getWordBefore() : null;\n }\n\n private replaceNode(currentNode: Node | null, replacementNode: Node | null) {\n if (currentNode) {\n this.editor?.deleteNode(currentNode);\n }\n if (replacementNode) {\n this.editor?.insertNode(replacementNode);\n }\n }\n\n private getRangeUntilAt(event: PluginKeyboardEvent | null): Range | null {\n let positionContentSearcher = this.editor?.getContentSearcherOfCursor(event);\n let startPos: NodePosition | undefined = undefined;\n let endPos: NodePosition | undefined = undefined;\n positionContentSearcher?.forEachTextInlineElement(textInline => {\n let hasMatched = false;\n let nodeContent = textInline.getTextContent();\n let nodeIndex = nodeContent ? nodeContent.length : -1;\n while (nodeIndex >= 0) {\n if (nodeContent[nodeIndex] == this.pickerOptions.triggerCharacter) {\n startPos = textInline.getStartPosition().move(nodeIndex);\n hasMatched = true;\n break;\n }\n nodeIndex--;\n }\n\n if (hasMatched) {\n endPos = textInline.getEndPosition();\n }\n\n return hasMatched;\n });\n return startPos\n ? createRange(startPos, endPos)\n : this.editor?.getDocument().createRange() ?? null;\n }\n\n private shouldHandleKeyUpEvent(event: PluginKeyboardEvent) {\n // onKeyUpDomEvent should only be called when a key that produces a character value is pressed\n // This check will always fail on Android since the KeyboardEvent's key is \"Unidentified\" or undefined\n // However, we don't need to check for modifier events on mobile, so can ignore this check\n return (\n this.isAndroidKeyboardEvent(event) ||\n isCharacterValue(event.rawEvent) ||\n (this.isSuggesting && !isModifierKey(event.rawEvent))\n );\n }\n\n private onKeyUpDomEvent(event: PluginKeyboardEvent) {\n if (this.editor) {\n if (this.isSuggesting) {\n // Word before cursor represents the text prior to the cursor, up to and including the trigger symbol.\n const wordBeforeCursor = this.getWord(event);\n if (wordBeforeCursor !== null) {\n const wordBeforeCursorWithoutTriggerChar = wordBeforeCursor.substring(1);\n const trimmedWordBeforeCursor = wordBeforeCursorWithoutTriggerChar.trim();\n\n // If we hit a case where wordBeforeCursor is just the trigger character,\n // that means we've gotten a onKeyUp event right after it's been typed.\n // Otherwise, update the query string when:\n // 1. There's an actual value\n // 2. That actual value isn't just pure whitespace\n // 3. That actual value isn't more than 4 words long (at which point we assume the person kept typing)\n // Otherwise, we want to dismiss the picker plugin's UX.\n if (\n wordBeforeCursor == this.pickerOptions.triggerCharacter ||\n (trimmedWordBeforeCursor &&\n trimmedWordBeforeCursor.length > 0 &&\n trimmedWordBeforeCursor.split(' ').length <= 4)\n ) {\n this.dataProvider.queryStringUpdated(\n trimmedWordBeforeCursor,\n wordBeforeCursorWithoutTriggerChar == trimmedWordBeforeCursor\n );\n this.setLastKnownRange(this.editor.getSelectionRange() ?? null);\n } else {\n this.setIsSuggesting(false);\n }\n }\n } else {\n let wordBeforeCursor = this.getWordBeforeCursor(event);\n if (!this.blockSuggestions) {\n if (\n wordBeforeCursor != null &&\n wordBeforeCursor.split(' ').length <= 4 &&\n wordBeforeCursor[0] == this.pickerOptions.triggerCharacter\n ) {\n this.setIsSuggesting(true);\n const wordBeforeCursorWithoutTriggerChar = wordBeforeCursor.substring(1);\n let trimmedWordBeforeCursor = wordBeforeCursorWithoutTriggerChar.trim();\n this.dataProvider.queryStringUpdated(\n trimmedWordBeforeCursor,\n wordBeforeCursorWithoutTriggerChar == trimmedWordBeforeCursor\n );\n this.setLastKnownRange(this.editor.getSelectionRange() ?? null);\n if (this.dataProvider.setCursorPoint) {\n // Determine the bounding rectangle for the @mention\n let searcher = this.editor.getContentSearcherOfCursor(event);\n let rangeNode = this.editor.getDocument().createRange();\n\n if (rangeNode) {\n let nodeBeforeCursor =\n searcher?.getInlineElementBefore()?.getContainerNode() ?? null;\n\n let rangeStartSuccessfullySet = this.setRangeStart(\n rangeNode,\n nodeBeforeCursor,\n wordBeforeCursor\n );\n if (!rangeStartSuccessfullySet) {\n // VSO 24891: Out of range error is occurring because nodeBeforeCursor\n // is not including the trigger character. In this case, the node before\n // the node before cursor is the trigger character, and this is where the range should start.\n let nodeBeforeNodeBeforeCursor =\n nodeBeforeCursor?.previousSibling ?? null;\n this.setRangeStart(\n rangeNode,\n nodeBeforeNodeBeforeCursor,\n this.pickerOptions.triggerCharacter\n );\n }\n let rect = rangeNode.getBoundingClientRect();\n\n // Safari's support for range.getBoundingClientRect is incomplete.\n // We perform this check to fall back to getClientRects in case it's at the page origin.\n if (rect.left == 0 && rect.bottom == 0 && rect.top == 0) {\n rect = rangeNode.getClientRects()[0];\n }\n\n if (rect) {\n rangeNode.detach();\n\n // Display the @mention popup in the correct place\n let targetPoint = {\n x: rect.left,\n y: (rect.bottom + rect.top) / 2,\n };\n let bufferZone = (rect.bottom - rect.top) / 2;\n this.dataProvider.setCursorPoint(targetPoint, bufferZone);\n }\n }\n }\n }\n } else {\n if (\n wordBeforeCursor != null &&\n wordBeforeCursor[0] != this.pickerOptions.triggerCharacter\n ) {\n this.blockSuggestions = false;\n }\n }\n }\n }\n }\n\n private onKeyDownEvent(event: PluginKeyboardEvent) {\n let keyboardEvent = event.rawEvent;\n if (this.isSuggesting) {\n if (keyboardEvent.key == ESC_CHAR_CODE) {\n this.setIsSuggesting(false);\n this.blockSuggestions = true;\n this.cancelDefaultKeyDownEvent(event);\n } else if (keyboardEvent.key == BACKSPACE_CHAR_CODE) {\n // #483: If we are backspacing over the trigger character that triggered this Picker\n // then we need to hide the Picker\n const wordBeforeCursor = this.getWord(event);\n if (wordBeforeCursor == this.pickerOptions.triggerCharacter) {\n this.setIsSuggesting(false);\n }\n } else if (\n this.dataProvider.shiftHighlight &&\n (this.pickerOptions.isHorizontal\n ? keyboardEvent.key == LEFT_ARROW_CHAR_CODE ||\n keyboardEvent.key == RIGHT_ARROW_CHAR_CODE\n : keyboardEvent.key == UP_ARROW_CHAR_CODE ||\n keyboardEvent.key == DOWN_ARROW_CHAR_CODE)\n ) {\n this.dataProvider.shiftHighlight(\n this.pickerOptions.isHorizontal\n ? keyboardEvent.key == RIGHT_ARROW_CHAR_CODE\n : keyboardEvent.key == DOWN_ARROW_CHAR_CODE\n );\n\n if (this.dataProvider.getSelectedIndex) {\n this.setAriaActiveDescendant(this.dataProvider.getSelectedIndex());\n }\n\n this.cancelDefaultKeyDownEvent(event);\n } else if (\n this.dataProvider.selectOption &&\n (keyboardEvent.key == ENTER_CHAR_CODE || keyboardEvent.key == TAB_CHAR_CODE)\n ) {\n this.dataProvider.selectOption();\n this.cancelDefaultKeyDownEvent(event);\n } else {\n // Currently no op.\n }\n } else {\n if (keyboardEvent.key == BACKSPACE_CHAR_CODE) {\n const nodeRemoved = this.tryRemoveNode(event);\n if (nodeRemoved) {\n this.cancelDefaultKeyDownEvent(event);\n }\n } else if (keyboardEvent.key == DELETE_CHAR_CODE) {\n let searcher = this.editor?.getContentSearcherOfCursor(event);\n if (searcher) {\n let nodeAfterCursor = searcher.getInlineElementAfter()\n ? searcher.getInlineElementAfter()?.getContainerNode()\n : null;\n let nodeId = nodeAfterCursor ? this.getIdValue(nodeAfterCursor) : null;\n if (\n nodeId &&\n nodeId.indexOf(this.pickerOptions.elementIdPrefix) == 0 &&\n nodeAfterCursor\n ) {\n let replacementNode = this.dataProvider.onRemove(nodeAfterCursor, false);\n this.replaceNode(nodeAfterCursor, replacementNode);\n this.cancelDefaultKeyDownEvent(event);\n }\n }\n }\n }\n }\n\n private onAndroidInputEvent(event: PluginInputEvent) {\n this.newInputLength = this.calcInputLength(event);\n\n if (\n this.newInputLength < this.currentInputLength ||\n (event.rawEvent as any).inputType === DELETE_CONTENT_BACKWARDS_INPUT_TYPE\n ) {\n const nodeRemoved = this.tryRemoveNode(event);\n if (nodeRemoved) {\n this.eventHandledOnKeyDown = true;\n }\n }\n }\n\n private calcInputLength(event: PluginEvent) {\n const wordBeforeCursor = this.getInlineElementBeforeCursor(event);\n return wordBeforeCursor ? wordBeforeCursor.length : 0;\n }\n\n private tryRemoveNode(event: PluginDomEvent): boolean {\n if (!this.editor) {\n return false;\n }\n\n const searcher = this.editor.getContentSearcherOfCursor(event);\n if (!searcher) {\n return false;\n }\n\n const inlineElementBefore = searcher.getInlineElementBefore();\n const nodeBeforeCursor = inlineElementBefore\n ? inlineElementBefore.getContainerNode()\n : null;\n const nodeId = nodeBeforeCursor ? this.getIdValue(nodeBeforeCursor) : null;\n const inlineElementAfter = searcher.getInlineElementAfter();\n\n if (\n nodeBeforeCursor &&\n nodeId &&\n nodeId.indexOf(this.pickerOptions.elementIdPrefix) == 0 &&\n (inlineElementAfter == null || !(inlineElementAfter instanceof PartialInlineElement))\n ) {\n const replacementNode = this.dataProvider.onRemove(nodeBeforeCursor, true);\n if (replacementNode) {\n this.replaceNode(nodeBeforeCursor, replacementNode);\n if (this.isPendingInputEventHandling) {\n this.editor.runAsync(editor => {\n editor.select(replacementNode, PositionType.After);\n });\n } else {\n this.editor.select(replacementNode, PositionType.After);\n }\n\n return true;\n } else {\n // Select the node then let browser delete it\n this.editor.select(nodeBeforeCursor);\n return false;\n }\n }\n return false;\n }\n\n private getWord(event: PluginKeyboardEvent | null) {\n let wordFromRange = this.getRangeUntilAt(event)?.toString() ?? '';\n let wordFromCache = this.getWordBeforeCursor(event);\n // VSO 24891: In picker, trigger and mention are separated into two nodes.\n // In this case, wordFromRange is the trigger character while wordFromCache is the whole string,\n // so wordFromCache is what we want to return.\n if (\n wordFromRange == this.pickerOptions.triggerCharacter &&\n wordFromRange != wordFromCache\n ) {\n return wordFromCache;\n }\n return wordFromRange;\n }\n\n private setRangeStart(rangeNode: Range, node: Node | null, target: string) {\n let nodeOffset = node?.textContent ? node.textContent.lastIndexOf(target) : -1;\n if (node && nodeOffset > -1) {\n rangeNode.setStart(node, nodeOffset);\n return true;\n }\n return false;\n }\n\n private setAriaOwns(isSuggesting: boolean) {\n this.editor?.setEditorDomAttribute(\n 'aria-owns',\n isSuggesting && this.pickerOptions.suggestionsLabel\n ? this.pickerOptions.suggestionsLabel\n : null\n );\n }\n\n private setAriaActiveDescendant(selectedIndex: number | null) {\n this.editor?.setEditorDomAttribute(\n 'aria-activedescendant',\n selectedIndex != null && this.pickerOptions.suggestionLabelPrefix\n ? this.pickerOptions.suggestionLabelPrefix + selectedIndex.toString()\n : null\n );\n }\n\n private getInlineElementBeforeCursor(event: PluginEvent): string | null {\n const searcher = this.editor?.getContentSearcherOfCursor(event);\n const element = searcher ? searcher.getInlineElementBefore() : null;\n return element ? element.getTextContent() : null;\n }\n\n private isAndroidKeyboardEvent(event: PluginKeyboardEvent): boolean {\n // Check keyboard events on Android for further handling.\n // On Android Webview later 51, the KeyboardEvent's key is \"Unidentified\".\n // On Android Webview below 51, the KeyboardEvent's key is not supported and always returns undefined,\n // so using the charCode property, which is 0 or 229.\n return (\n event.rawEvent.key == UNIDENTIFIED_KEY ||\n (event.rawEvent.key == undefined &&\n UNIDENTIFIED_CODE.indexOf(event.rawEvent.charCode) > -1)\n );\n }\n}\n","export { default as PickerPlugin } from './PickerPlugin';\n","import { clearState } from './utils/clearState';\nimport { DeleteTableContents } from './features/DeleteTableContents';\nimport { handleKeyDownEvent } from './keyUtils/handleKeyDownEvent';\nimport { handleKeyUpEvent } from './keyUtils/handleKeyUpEvent';\nimport { handleMouseDownEvent } from './mouseUtils/handleMouseDownEvent';\nimport { handleScrollEvent } from './mouseUtils/handleScrollEvent';\nimport { TableCellSelectionState } from './TableCellSelectionState';\nimport {\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n SelectionRangeTypes,\n TableSelection,\n} from 'roosterjs-editor-types';\n\n/**\n * TableCellSelectionPlugin help highlight table cells\n */\nexport default class TableCellSelection implements EditorPlugin {\n private editor: IEditor | null = null;\n private state: TableCellSelectionState | null;\n private shadowEditCoordinatesBackup: TableSelection | null = null;\n\n constructor() {\n this.state = {\n firstTable: null,\n lastTarget: null,\n firstTarget: null,\n preventKeyUp: false,\n startedSelection: false,\n tableSelection: false,\n targetTable: null,\n vTable: null,\n mouseMoveDisposer: null,\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'TableCellSelection';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.editor.addContentEditFeature(DeleteTableContents);\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n clearState(this.state, this.editor);\n this.state = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (this.editor && this.state) {\n switch (event.eventType) {\n case PluginEventType.EnteredShadowEdit:\n this.handleEnteredShadowEdit(this.state, this.editor);\n break;\n case PluginEventType.LeavingShadowEdit:\n this.handleLeavingShadowEdit(this.state, this.editor);\n break;\n case PluginEventType.MouseDown:\n if (!this.state.startedSelection) {\n handleMouseDownEvent(event, this.state, this.editor);\n }\n break;\n case PluginEventType.KeyDown:\n if (!this.state.startedSelection) {\n handleKeyDownEvent(event, this.state, this.editor);\n } else {\n event.rawEvent.preventDefault();\n }\n break;\n case PluginEventType.KeyUp:\n if (!this.state.startedSelection) {\n handleKeyUpEvent(event, this.state, this.editor);\n } else {\n event.rawEvent.preventDefault();\n }\n break;\n case PluginEventType.Scroll:\n if (this.state.startedSelection) {\n handleScrollEvent(this.state, this.editor);\n }\n break;\n case PluginEventType.BeforeSetContent:\n this.state.firstTable = null;\n this.state.tableSelection = false;\n this.editor.select(null);\n break;\n }\n }\n }\n\n private handleLeavingShadowEdit(state: TableCellSelectionState, editor: IEditor) {\n if (state.firstTable && state.tableSelection && state.firstTable) {\n const table = editor.queryElements('#' + state.firstTable.id);\n if (table.length == 1) {\n state.firstTable = table[0] as HTMLTableElement;\n editor.select(state.firstTable, this.shadowEditCoordinatesBackup);\n this.shadowEditCoordinatesBackup = null;\n }\n }\n }\n\n private handleEnteredShadowEdit(state: TableCellSelectionState, editor: IEditor) {\n const selection = editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.TableSelection) {\n this.shadowEditCoordinatesBackup = selection.coordinates ?? null;\n state.firstTable = selection.table;\n state.tableSelection = true;\n editor.select(selection.table, null);\n }\n }\n}\n","/**\n * @internal\n * Table cell query selector\n */\nexport const TABLE_CELL_SELECTOR = 'td,th';\n","import { safeInstanceOf } from 'roosterjs-editor-dom';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport {\n GenericContentEditFeature,\n IEditor,\n Keys,\n PluginEvent,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Feature that when Backspace is pressed and there is Table Selection, delete the contents inside of the selection\n */\nexport const DeleteTableContents: GenericContentEditFeature = {\n keys: [Keys.DELETE, Keys.BACKSPACE],\n shouldHandleEvent: (_, editor: IEditor) => {\n const selection = editor.getSelectionRangeEx();\n return selection.type == SelectionRangeTypes.TableSelection;\n },\n handleEvent: (_, editor) => {\n const selection = editor.getSelectionRangeEx();\n if (selection.type == SelectionRangeTypes.TableSelection) {\n editor.addUndoSnapshot(() => {\n if (selection.isWholeTableSelected) {\n selection.table\n .querySelectorAll(TABLE_CELL_SELECTOR)\n .forEach(td => deleteNodeContents(td, editor));\n } else {\n editor\n .getSelectedRegions()\n .forEach(region => deleteNodeContents(region.rootNode, editor));\n }\n });\n }\n },\n};\n\nfunction deleteNodeContents(element: Node, editor: IEditor) {\n if (safeInstanceOf(element, 'HTMLTableCellElement')) {\n const range = new Range();\n range.selectNodeContents(element);\n range.deleteContents();\n element.appendChild(editor.getDocument().createElement('br'));\n }\n}\n","export { default as TableCellSelection } from './TableCellSelection';\n","import { getCellAtCursor } from '../utils/getCellAtCursor';\nimport { getCellCoordinates } from '../utils/getCellCoordinates';\nimport { isAfter } from '../utils/isAfter';\nimport { prepareSelection } from '../utils/prepareSelection';\nimport { selectTable } from '../utils/selectTable';\nimport { setData } from '../utils/setData';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from '../utils/updateSelection';\nimport {\n contains,\n isCtrlOrMetaPressed,\n Position,\n safeInstanceOf,\n VTable,\n} from 'roosterjs-editor-dom';\nimport {\n Coordinates,\n IEditor,\n Keys,\n PluginKeyDownEvent,\n PositionType,\n SelectionRangeTypes,\n} from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport function handleKeyDownEvent(\n event: PluginKeyDownEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n const { shiftKey, ctrlKey, metaKey, which, defaultPrevented } = event.rawEvent;\n if ((shiftKey && (ctrlKey || metaKey)) || which == Keys.SHIFT || defaultPrevented) {\n state.preventKeyUp = defaultPrevented;\n return;\n }\n\n if (shiftKey) {\n if (!state.firstTarget) {\n const pos = editor.getFocusedPosition();\n const cell = pos && getCellAtCursor(editor, pos.node);\n\n state.firstTarget = cell;\n }\n\n //If first target is not a table cell, we should ignore this plugin\n if (!safeInstanceOf(state.firstTarget, 'HTMLTableCellElement')) {\n return;\n }\n editor.runAsync(editor => {\n const pos = editor.getFocusedPosition();\n const newTarget = state.tableSelection ? state.lastTarget : pos?.node;\n if (newTarget) {\n setData(newTarget, state, editor);\n }\n\n if (state.firstTable! == state.targetTable!) {\n if (!shouldConvertToTableSelection(state, editor) && !state.tableSelection) {\n return;\n }\n //When selection start and end is inside of the same table\n handleKeySelectionInsideTable(event, state, editor);\n } else if (state.tableSelection) {\n if (state.firstTable) {\n editor.select(state.firstTable, null /* coordinates */);\n }\n state.tableSelection = false;\n }\n });\n } else if (\n editor.getSelectionRangeEx()?.type == SelectionRangeTypes.TableSelection &&\n (!isCtrlOrMetaPressed(event.rawEvent) || which == Keys.HOME || which == Keys.END)\n ) {\n editor.select(null);\n }\n}\n\n/**\n * @internal\n */\nfunction handleKeySelectionInsideTable(\n event: PluginKeyDownEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n state.firstTarget = getCellAtCursor(editor, state.firstTarget);\n state.lastTarget = getCellAtCursor(editor, state.lastTarget);\n\n updateSelection(editor, state.firstTarget, 0);\n state.vTable = state.vTable || new VTable(state.firstTable as HTMLTableElement);\n\n const firstCell = getCellCoordinates(state.vTable, state.firstTarget as Element);\n const lastCell = getNextTD(event, editor, state);\n\n if (!firstCell || !lastCell) {\n return;\n }\n state.vTable.selection = {\n firstCell,\n lastCell,\n };\n\n const { selection } = state.vTable;\n\n if (\n !selection.lastCell ||\n (state.vTable.cells && selection.lastCell.y > state.vTable.cells.length - 1) ||\n selection.lastCell.y == -1\n ) {\n //When selection is moving from inside of a table to outside\n state.lastTarget = editor.getElementAtCursor(\n TABLE_CELL_SELECTOR + ',div',\n state.firstTable ?? undefined\n );\n if (safeInstanceOf(state.lastTarget, 'HTMLTableCellElement')) {\n prepareSelection(state, editor);\n } else {\n const position =\n state.targetTable &&\n new Position(\n state.targetTable,\n selection.lastCell.y == null || selection.lastCell.y == -1\n ? PositionType.Before\n : PositionType.After\n );\n\n const sel = editor.getDocument().defaultView?.getSelection();\n const { anchorNode, anchorOffset } = sel || {};\n if (\n sel &&\n anchorNode &&\n anchorOffset != undefined &&\n anchorOffset != null &&\n position\n ) {\n editor.select(sel.getRangeAt(0));\n sel.setBaseAndExtent(anchorNode, anchorOffset, position.node, position.offset);\n state.lastTarget = position.node;\n event.rawEvent.preventDefault();\n return;\n }\n }\n }\n\n selectTable(editor, state);\n\n const isBeginAboveEnd = isAfter(state.firstTarget, state.lastTarget);\n if (state.lastTarget) {\n const targetPosition = new Position(\n state.lastTarget,\n isBeginAboveEnd ? PositionType.Begin : PositionType.End\n );\n updateSelection(editor, targetPosition.node, targetPosition.offset);\n }\n\n state.tableSelection = true;\n event.rawEvent.preventDefault();\n}\n\nfunction getNextTD(\n event: PluginKeyDownEvent,\n editor: IEditor,\n state: TableCellSelectionState\n): Coordinates | undefined {\n state.lastTarget =\n state.lastTarget && editor.getElementAtCursor(TABLE_CELL_SELECTOR, state.lastTarget);\n\n if (safeInstanceOf(state.lastTarget, 'HTMLTableCellElement') && state.vTable?.cells) {\n let coordinates = getCellCoordinates(state.vTable, state.lastTarget);\n\n if (state.tableSelection && coordinates) {\n switch (event.rawEvent.which) {\n case Keys.RIGHT:\n coordinates.x += state.lastTarget.colSpan;\n if (state.vTable.cells[coordinates.y][coordinates.x] == null) {\n coordinates.x = state.vTable.cells[coordinates.y].length - 1;\n coordinates.y++;\n }\n break;\n case Keys.LEFT:\n if (coordinates.x == 0) {\n coordinates.y--;\n } else {\n coordinates.x--;\n }\n break;\n case Keys.UP:\n coordinates.y--;\n break;\n case Keys.DOWN:\n coordinates.y++;\n break;\n }\n }\n\n if (coordinates && coordinates.y >= 0 && coordinates.x >= 0) {\n state.lastTarget = state.vTable.getTd(coordinates.y, coordinates.x);\n }\n return coordinates;\n }\n return undefined;\n}\n\nfunction shouldConvertToTableSelection(state: TableCellSelectionState, editor: IEditor) {\n if (!state.firstTable || !editor) {\n return false;\n }\n const regions = editor.getSelectedRegions();\n if (regions.length == 1) {\n return false;\n }\n\n let result = true;\n\n regions.forEach(value => {\n if (!contains(state.firstTable, value.rootNode)) {\n result = false;\n }\n });\n\n return result;\n}\n","import { clearState } from '../utils/clearState';\nimport { IEditor, Keys, PluginKeyUpEvent } from 'roosterjs-editor-types';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\nconst IGNORE_KEY_UP_KEYS = [\n Keys.SHIFT,\n Keys.ALT,\n Keys.META_LEFT,\n Keys.CTRL_LEFT,\n Keys.PRINT_SCREEN,\n];\n\n/**\n * @internal\n */\nexport function handleKeyUpEvent(\n event: PluginKeyUpEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n const { shiftKey, which, ctrlKey } = event.rawEvent;\n if (\n !shiftKey &&\n !ctrlKey &&\n state.firstTarget &&\n !state.preventKeyUp &&\n IGNORE_KEY_UP_KEYS.indexOf(which) == -1\n ) {\n clearState(state, editor);\n }\n state.preventKeyUp = false;\n}\n","import normalizeTableSelection from '../utils/normalizeTableSelection';\nimport { clearState } from '../utils/clearState';\nimport { contains, getTagOfNode, safeInstanceOf, VTable } from 'roosterjs-editor-dom';\nimport { getCellAtCursor } from '../utils/getCellAtCursor';\nimport { getCellCoordinates } from '../utils/getCellCoordinates';\nimport { getTableAtCursor } from '../utils/getTableAtCursor';\nimport { IEditor, PluginMouseDownEvent } from 'roosterjs-editor-types';\nimport { prepareSelection } from '../utils/prepareSelection';\nimport { restoreSelection } from '../utils/restoreSelection';\nimport { selectTable } from '../utils/selectTable';\nimport { setData } from '../utils/setData';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from '../utils/updateSelection';\n\nconst LEFT_CLICK = 1;\nconst RIGHT_CLICK = 3;\n\n/**\n * @internal\n */\nexport function handleMouseDownEvent(\n event: PluginMouseDownEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n const { which, shiftKey } = event.rawEvent;\n\n const td = editor.getElementAtCursor(TABLE_CELL_SELECTOR);\n if (which == RIGHT_CLICK && state.tableSelection && state.vTable && td) {\n //If the user is right clicking To open context menu\n const coord = getCellCoordinates(state.vTable, td);\n if (coord) {\n const { firstCell, lastCell } = normalizeTableSelection(state.vTable) || {};\n if (\n firstCell &&\n lastCell &&\n coord.y >= firstCell.y &&\n coord.y <= lastCell.y &&\n coord.x >= firstCell.x &&\n coord.x <= lastCell.x\n ) {\n state.firstTarget = state.vTable.getCell(firstCell.y, firstCell.x).td;\n state.lastTarget = state.vTable.getCell(lastCell.y, lastCell.x).td;\n\n if (state.firstTarget && state.lastTarget) {\n const selection = editor.getDocument().defaultView?.getSelection();\n selection?.setBaseAndExtent(state.firstTarget, 0, state.lastTarget, 0);\n selectTable(editor, state);\n }\n\n return;\n }\n }\n }\n if (which == LEFT_CLICK && !shiftKey) {\n clearState(state, editor);\n\n if (getTableAtCursor(editor, event.rawEvent.target)) {\n const doc = editor.getDocument() || document;\n\n const mouseUpListener = getOnMouseUp(state);\n const mouseMoveListener = onMouseMove(state, editor);\n doc.addEventListener('mouseup', mouseUpListener, true /*setCapture*/);\n doc.addEventListener('mousemove', mouseMoveListener, true /*setCapture*/);\n\n state.mouseMoveDisposer = () => {\n doc.removeEventListener('mouseup', mouseUpListener, true /*setCapture*/);\n doc.removeEventListener('mousemove', mouseMoveListener, true /*setCapture*/);\n };\n\n state.startedSelection = true;\n }\n }\n\n if (which == LEFT_CLICK && shiftKey) {\n editor.runAsync(editor => {\n const sel = editor.getDocument().defaultView?.getSelection();\n const first = getCellAtCursor(editor, sel?.anchorNode);\n const last = getCellAtCursor(editor, sel?.focusNode);\n const firstTable = getTableAtCursor(editor, first);\n const targetTable = getTableAtCursor(editor, first);\n if (\n firstTable! == targetTable! &&\n safeInstanceOf(first, 'HTMLTableCellElement') &&\n safeInstanceOf(last, 'HTMLTableCellElement')\n ) {\n state.vTable = new VTable(first);\n const firstCord = getCellCoordinates(state.vTable, first);\n const lastCord = getCellCoordinates(state.vTable, last);\n\n if (!firstCord || !lastCord) {\n return;\n }\n state.vTable.selection = {\n firstCell: firstCord,\n lastCell: lastCord,\n };\n\n state.firstTarget = first;\n state.lastTarget = last;\n selectTable(editor, state);\n\n state.tableSelection = true;\n state.firstTable = firstTable as HTMLTableElement;\n state.targetTable = targetTable;\n updateSelection(editor, first, 0);\n }\n });\n }\n}\n\nfunction getOnMouseUp(state: TableCellSelectionState) {\n return () => {\n removeMouseUpEventListener(state);\n };\n}\n\nfunction onMouseMove(state: TableCellSelectionState, editor: IEditor) {\n return (event: MouseEvent) => {\n if (!editor.contains(event.target as Node)) {\n return;\n }\n\n //If already in table selection and the new target is contained in the last target cell, no need to\n //Apply selection styles again.\n if (\n state.tableSelection &&\n state.firstTarget &&\n contains(state.lastTarget, event.target as Node, true)\n ) {\n updateSelection(editor, state.firstTarget, 0);\n event.preventDefault();\n return;\n }\n\n if (getTagOfNode(event.target as Node) == 'TABLE') {\n event.preventDefault();\n return;\n }\n\n setData(event.target as Node, state, editor);\n\n // If there is a first target, but is not inside a table, no more actions to perform.\n if (state.firstTarget && !state.firstTable) {\n return;\n }\n\n //Ignore if\n // Is a DIV that only contains a Table\n // If the event target is not contained in the editor.\n if (\n state.lastTarget &&\n ((state.lastTarget.lastChild == state.lastTarget.firstChild &&\n getTagOfNode(state.lastTarget.lastChild) == 'TABLE' &&\n getTagOfNode(state.lastTarget) == 'DIV') ||\n !editor.contains(state.lastTarget))\n ) {\n event.preventDefault();\n return;\n }\n\n prepareSelection(state, editor);\n const isNewTDContainingFirstTable = safeInstanceOf(state.lastTarget, 'HTMLTableCellElement')\n ? contains(state.lastTarget, state.firstTable)\n : false;\n\n if (\n (state.firstTable && state.firstTable == state.targetTable) ||\n isNewTDContainingFirstTable\n ) {\n //When starting selection inside of a table and ends inside of the same table.\n selectionInsideTableMouseMove(event, state, editor);\n } else if (state.tableSelection) {\n restoreSelection(state, editor);\n }\n\n if (state.tableSelection && state.firstTarget) {\n updateSelection(editor, state.firstTarget, 0);\n event.preventDefault();\n }\n };\n}\n\n/**\n * @internal\n */\nexport function selectionInsideTableMouseMove(\n event: MouseEvent,\n state: TableCellSelectionState,\n editor: IEditor\n) {\n if (\n state.firstTarget &&\n state.firstTable &&\n state.lastTarget != state.firstTarget &&\n state.lastTarget\n ) {\n updateSelection(editor, state.firstTarget, 0);\n if (\n state.firstTable != state.targetTable &&\n state.targetTable?.contains(state.firstTable)\n ) {\n //If selection started in a table that is inside of another table and moves to parent table\n //Make the firstTarget the TD of the parent table.\n state.firstTarget = editor.getElementAtCursor(TABLE_CELL_SELECTOR, state.lastTarget);\n }\n\n if (state.firstTable && state.firstTarget) {\n state.tableSelection = true;\n\n state.vTable = state.vTable || new VTable(state.firstTable);\n\n const firstCell = getCellCoordinates(state.vTable, state.firstTarget);\n const lastCell = getCellCoordinates(state.vTable, state.lastTarget);\n\n if (!firstCell || !lastCell) {\n return;\n }\n\n state.vTable.selection = {\n firstCell,\n lastCell,\n };\n selectTable(editor, state);\n }\n\n event.preventDefault();\n } else if (\n state.lastTarget == state.firstTarget &&\n state.tableSelection &&\n state.firstTable &&\n state.firstTarget\n ) {\n state.vTable = new VTable(state.firstTable);\n const cell = getCellCoordinates(state.vTable, state.firstTarget);\n if (cell) {\n state.vTable.selection = {\n firstCell: cell,\n lastCell: cell,\n };\n }\n\n selectTable(editor, state);\n }\n}\n\nfunction removeMouseUpEventListener(state: TableCellSelectionState): void {\n if (state.startedSelection) {\n state.startedSelection = false;\n state.mouseMoveDisposer?.();\n }\n}\n","import { getCellCoordinates } from '../utils/getCellCoordinates';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { restoreSelection } from '../utils/restoreSelection';\nimport { selectTable } from '../utils/selectTable';\nimport { setData } from '../utils/setData';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from '../utils/updateSelection';\n\n/**\n * Handle Scroll Event and mantains the selection range,\n * Since when we scroll the cursor does not trigger the on Mouse Move event\n * The table selection gets removed.\n */\nexport function handleScrollEvent(state: TableCellSelectionState, editor: IEditor) {\n const eventTarget = editor.getElementAtCursor();\n if (!eventTarget) {\n return;\n }\n setData(eventTarget, state, editor);\n if (\n state.firstTable == state.targetTable &&\n state.firstTarget &&\n state.vTable?.selection &&\n state.lastTarget &&\n state.tableSelection\n ) {\n const newCell = getCellCoordinates(state.vTable, state.lastTarget);\n if (newCell) {\n state.vTable.selection.lastCell = newCell;\n selectTable(editor, state);\n updateSelection(editor, state.firstTarget, 0);\n }\n } else if (state.tableSelection) {\n restoreSelection(state, editor);\n }\n}\n","import { IEditor } from 'roosterjs-editor-types';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function clearState(state: TableCellSelectionState | null, editor: IEditor | null): void {\n editor?.select(null);\n if (state) {\n state.vTable = null;\n state.firstTarget = null;\n state.lastTarget = null;\n state.tableSelection = false;\n state.firstTable = null;\n state.targetTable = null;\n state.mouseMoveDisposer?.();\n state.mouseMoveDisposer = null;\n }\n}\n","import { IEditor } from 'roosterjs-editor-types';\nimport { Nullable } from '../TableCellSelectionState';\nimport { TABLE_CELL_SELECTOR } from '../constants';\n\n/**\n * @internal\n */\nexport function getCellAtCursor(editor: IEditor, node: Nullable): HTMLElement {\n if (editor) {\n return (\n editor.getElementAtCursor(TABLE_CELL_SELECTOR, node ?? undefined) ||\n (node as HTMLElement)\n );\n }\n return node as HTMLElement;\n}\n","import { Coordinates } from 'roosterjs-editor-types';\nimport { VTable } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Gets the coordinates of a cell\n * @param cellInput The cell the to find the coordinates\n * @returns Coordinates of the cell, null if not found\n */\nexport function getCellCoordinates(vTable: VTable, cellInput: Node): Coordinates | undefined {\n let result: Coordinates | undefined;\n if (vTable?.cells) {\n for (let indexY = 0; indexY < vTable.cells.length; indexY++) {\n for (let indexX = 0; indexX < vTable.cells[indexY].length; indexX++) {\n if (cellInput == vTable.cells[indexY][indexX].td) {\n result = {\n x: indexX,\n y: indexY,\n };\n }\n }\n }\n }\n\n return result;\n}\n","import { IEditor } from 'roosterjs-editor-types';\nimport { Nullable } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function getTableAtCursor(\n editor: IEditor,\n node: Nullable\n): HTMLTableElement | null {\n if (editor) {\n return editor.getElementAtCursor('table', node as Node) as HTMLTableElement;\n }\n return null;\n}\n","import { Nullable } from '../TableCellSelectionState';\nimport { Position } from 'roosterjs-editor-dom';\nimport { PositionType } from 'roosterjs-editor-types';\n\n/**\n * @internal\n */\nexport function isAfter(node1: Nullable, node2: Nullable) {\n if (node1 && node2) {\n if (node2.contains(node1)) {\n const r1 = (node1 as Element).getBoundingClientRect?.();\n const r2 = (node2 as Element).getBoundingClientRect?.();\n if (r1 && r2) {\n return r1.top > r2.top && r1.bottom < r2.bottom;\n }\n }\n\n const position = new Position(node1, PositionType.End);\n return position.isAfter(new Position(node2, PositionType.End));\n }\n return false;\n}\n","import { Coordinates, TableSelection } from 'roosterjs-editor-types';\nimport { VTable } from 'roosterjs-editor-dom';\n\n/**\n * @internal\n * Make the first Cell of a table selection always be on top of the last cell.\n * @param input Table selection\n * @returns Table Selection where the first cell is always going to be first selected in the table\n * and the last cell always going to be last selected in the table.\n */\nexport default function normalizeTableSelection(vTable: VTable): TableSelection | null {\n const { firstCell, lastCell } = vTable?.selection || {};\n if (!vTable?.cells || !vTable.selection || !firstCell || !lastCell) {\n return null;\n }\n\n const cells = vTable.cells;\n\n let newFirst = {\n x: Math.min(firstCell.x, lastCell.x),\n y: Math.min(firstCell.y, lastCell.y),\n };\n let newLast = {\n x: Math.max(firstCell.x, lastCell.x),\n y: Math.max(firstCell.y, lastCell.y),\n };\n\n const fixCoordinates = (coord: Coordinates) => {\n if (coord.x < 0) {\n coord.x = 0;\n }\n if (coord.y < 0) {\n coord.y = 0;\n }\n\n if (coord.y >= cells.length) {\n coord.y = cells.length - 1;\n }\n\n const rowsCells = cells[coord.y].length;\n if (coord.x >= rowsCells) {\n coord.x = rowsCells - 1;\n }\n };\n\n fixCoordinates(newFirst);\n fixCoordinates(newLast);\n\n return { firstCell: newFirst, lastCell: newLast };\n}\n","import { findClosestElementAncestor } from 'roosterjs-editor-dom';\nimport { getTableAtCursor } from './getTableAtCursor';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n * Check if the selection started in a inner table.\n */\nexport function prepareSelection(state: TableCellSelectionState, editor: IEditor) {\n if (!state.firstTable || !state.targetTable) {\n return;\n }\n let isNewTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.firstTable?.contains(\n findClosestElementAncestor(state.targetTable, state.firstTable, TABLE_CELL_SELECTOR)\n );\n\n if (isNewTargetTableContained && state.tableSelection) {\n while (isNewTargetTableContained) {\n state.lastTarget = findClosestElementAncestor(\n state.targetTable,\n state.firstTable,\n TABLE_CELL_SELECTOR\n );\n state.targetTable = getTableAtCursor(editor, state.lastTarget);\n isNewTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.firstTable?.contains(\n findClosestElementAncestor(\n state.targetTable,\n state.firstTable,\n TABLE_CELL_SELECTOR\n )\n );\n }\n }\n\n let isFirstTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.targetTable?.contains(\n findClosestElementAncestor(state.firstTable, state.targetTable, TABLE_CELL_SELECTOR)\n );\n\n if (isFirstTargetTableContained && state.tableSelection && state.targetTable) {\n while (isFirstTargetTableContained) {\n state.firstTarget = findClosestElementAncestor(\n state.firstTable,\n state.targetTable,\n TABLE_CELL_SELECTOR\n );\n if (!state.firstTarget) {\n return;\n }\n state.firstTable = getTableAtCursor(editor, state.firstTarget);\n isFirstTargetTableContained =\n state.lastTarget != state.firstTarget &&\n state.targetTable?.contains(\n findClosestElementAncestor(\n state.firstTable,\n state.targetTable,\n TABLE_CELL_SELECTOR\n )\n );\n }\n }\n}\n","import { IEditor, PositionType } from 'roosterjs-editor-types';\nimport { isAfter } from './isAfter';\nimport { Position } from 'roosterjs-editor-dom';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\nimport { updateSelection } from './updateSelection';\n\n/**\n * @internal\n */\nexport function restoreSelection(state: TableCellSelectionState, editor: IEditor) {\n if (!state.lastTarget || !state.firstTarget) {\n return;\n }\n\n if (state.firstTable) {\n editor.select(state.firstTable, null /* coordinates */);\n }\n state.tableSelection = false;\n const isBeginAboveEnd = isAfter(state.firstTarget, state.lastTarget);\n const targetPosition = new Position(\n state.lastTarget,\n isBeginAboveEnd ? PositionType.End : PositionType.Begin\n );\n\n const firstTargetRange = new Range();\n if (state.firstTarget) {\n firstTargetRange.selectNodeContents(state.firstTarget);\n }\n updateSelection(\n editor,\n state.firstTarget,\n isBeginAboveEnd\n ? Position.getEnd(firstTargetRange).offset\n : Position.getStart(firstTargetRange).offset,\n targetPosition.element,\n targetPosition.offset\n );\n}\n","import normalizeTableSelection from './normalizeTableSelection';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function selectTable(editor: IEditor, state: TableCellSelectionState) {\n if (editor && state.vTable) {\n editor?.select(state.vTable.table, normalizeTableSelection(state.vTable));\n }\n}\n","import { getCellAtCursor } from './getCellAtCursor';\nimport { getTableAtCursor } from './getTableAtCursor';\nimport { IEditor } from 'roosterjs-editor-types';\nimport { TABLE_CELL_SELECTOR } from '../constants';\nimport { TableCellSelectionState } from '../TableCellSelectionState';\n\n/**\n * @internal\n */\nexport function setData(eventTarget: Node, state: TableCellSelectionState, editor: IEditor) {\n const pos = editor.getFocusedPosition();\n if (pos) {\n state.firstTarget = state.firstTarget || getCellAtCursor(editor, pos.node);\n\n if (state.firstTarget.nodeType == Node.TEXT_NODE) {\n state.firstTarget = editor.getElementAtCursor(TABLE_CELL_SELECTOR, state.firstTarget);\n }\n if (!editor.contains(state.firstTarget) && state.lastTarget) {\n state.firstTarget = state.lastTarget;\n }\n }\n\n state.firstTable = getTableAtCursor(editor, state.firstTarget) as HTMLTableElement;\n state.lastTarget = getCellAtCursor(editor, eventTarget as Node);\n state.targetTable = getTableAtCursor(editor, state.lastTarget);\n}\n","import { IEditor } from 'roosterjs-editor-types';\n\n/**\n * @internal\n * Use SetBaseAndExtend to update the selection without losing the order that was used in the selection.\n * Using editor.select may lose the order of the selection if the start of the selection is After\n * the end container of the selection.\n */\nexport function updateSelection(\n editor: IEditor,\n start: Node,\n offset: number,\n end?: Node,\n endOffset?: number\n) {\n const selection = editor.getDocument().defaultView?.getSelection();\n if (selection) {\n end = end || start;\n endOffset = endOffset || offset;\n selection.setBaseAndExtent(start, offset, end, endOffset);\n }\n}\n","import TableEditor from './editors/TableEditor';\nimport { normalizeRect, safeInstanceOf } from 'roosterjs-editor-dom';\nimport {\n CreateElementData,\n EditorPlugin,\n IEditor,\n PluginEvent,\n PluginEventType,\n Rect,\n} from 'roosterjs-editor-types';\n\nconst TABLE_RESIZER_LENGTH = 12;\n\n/**\n * TableResize plugin, provides the ability to resize a table by drag-and-drop\n */\nexport default class TableResize implements EditorPlugin {\n private editor: IEditor | null = null;\n private onMouseMoveDisposer: (() => void) | null = null;\n private tableRectMap: { table: HTMLTableElement; rect: Rect }[] | null = null;\n private tableEditor: TableEditor | null = null;\n\n /**\n * Construct a new instance of TableResize plugin\n * @param onShowHelperElement An optional callback to allow customize helper element of table resizing.\n * To customize the helper element, add this callback and change the attributes of elementData then it\n * will be picked up by TableResize code\n */\n constructor(\n private onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n ) {}\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'TableResize';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.onMouseMoveDisposer = this.editor.addDomEventHandler({\n mousemove: this.onMouseMove,\n mouseout: e => this.onMouseOut(e),\n });\n }\n\n private onMouseOut = (ev: Event) => {\n if (\n isMouseEvent(ev) &&\n safeInstanceOf(ev.relatedTarget, 'HTMLElement') &&\n this.tableEditor &&\n !this.tableEditor.isOwnedElement(ev.relatedTarget) &&\n !this.editor?.contains(ev.relatedTarget)\n ) {\n this.setTableEditor(null);\n }\n };\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.onMouseMoveDisposer?.();\n this.invalidateTableRects();\n this.disposeTableEditor();\n this.editor = null;\n this.onMouseMoveDisposer = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(e: PluginEvent) {\n switch (e.eventType) {\n case PluginEventType.Input:\n case PluginEventType.ContentChanged:\n case PluginEventType.Scroll:\n case PluginEventType.ZoomChanged:\n this.setTableEditor(null);\n this.invalidateTableRects();\n break;\n }\n }\n\n private onMouseMove = (event: Event) => {\n const e = event as MouseEvent;\n\n if (e.buttons > 0 || !this.editor) {\n return;\n }\n\n this.ensureTableRects();\n\n const editorWindow = this.editor.getDocument().defaultView || window;\n const x = e.pageX - editorWindow.scrollX;\n const y = e.pageY - editorWindow.scrollY;\n let currentTable: HTMLTableElement | null = null;\n\n if (this.tableRectMap) {\n for (let i = this.tableRectMap.length - 1; i >= 0; i--) {\n const { table, rect } = this.tableRectMap[i];\n\n if (\n x >= rect.left - TABLE_RESIZER_LENGTH &&\n x <= rect.right + TABLE_RESIZER_LENGTH &&\n y >= rect.top - TABLE_RESIZER_LENGTH &&\n y <= rect.bottom + TABLE_RESIZER_LENGTH\n ) {\n currentTable = table;\n break;\n }\n }\n }\n\n this.setTableEditor(currentTable, e);\n this.tableEditor?.onMouseMove(x, y);\n };\n\n private setTableEditor(table: HTMLTableElement | null, e?: MouseEvent) {\n if (this.tableEditor && !this.tableEditor.isEditing() && table != this.tableEditor.table) {\n this.disposeTableEditor();\n }\n\n if (!this.tableEditor && table && this.editor && table.rows.length > 0) {\n this.tableEditor = new TableEditor(\n this.editor,\n table,\n this.invalidateTableRects,\n this.onShowHelperElement,\n e?.currentTarget\n );\n }\n }\n\n private invalidateTableRects = () => {\n this.tableRectMap = null;\n };\n\n private disposeTableEditor() {\n this.tableEditor?.dispose();\n this.tableEditor = null;\n }\n\n private ensureTableRects() {\n if (!this.tableRectMap && this.editor) {\n this.tableRectMap = [];\n this.editor.queryElements('table', table => {\n if (table.isContentEditable) {\n const rect = normalizeRect(table.getBoundingClientRect());\n if (rect && this.tableRectMap) {\n this.tableRectMap.push({\n table,\n rect,\n });\n }\n }\n });\n }\n }\n}\n\nfunction isMouseEvent(e: Event): e is MouseEvent {\n return !!(e as MouseEvent).pageX;\n}\n","import DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport DragAndDropHelper from '../../../pluginUtils/DragAndDropHelper';\nimport TableEditFeature from './TableEditorFeature';\nimport { createElement, normalizeRect, VTable } from 'roosterjs-editor-dom';\nimport { CreateElementData, Rect } from 'roosterjs-editor-types';\n\nconst CELL_RESIZER_WIDTH = 4;\nconst MIN_CELL_WIDTH = 30;\n\n/**\n * @internal\n */\nexport default function createCellResizer(\n td: HTMLTableCellElement,\n zoomScale: number,\n isRTL: boolean,\n isHorizontal: boolean,\n onStart: () => void,\n onEnd: () => false,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n): TableEditFeature | null {\n const document = td.ownerDocument;\n const createElementData = {\n tag: 'div',\n style: `position: fixed; cursor: ${isHorizontal ? 'row' : 'col'}-resize; user-select: none`,\n };\n\n onShowHelperElement?.(createElementData, 'CellResizer');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n document.body.appendChild(div);\n\n const context: DragAndDropContext = { td, isRTL, zoomScale, onStart };\n const setPosition = isHorizontal ? setHorizontalPosition : setVerticalPosition;\n setPosition(context, div);\n\n const handler: DragAndDropHandler = {\n onDragStart,\n onDragging: isHorizontal ? onDraggingHorizontal : onDraggingVertical,\n onDragEnd: onEnd,\n };\n\n const featureHandler = new DragAndDropHelper(\n div,\n context,\n setPosition,\n handler,\n zoomScale\n );\n\n return { node: td, div, featureHandler };\n}\n\ninterface DragAndDropContext {\n td: HTMLTableCellElement;\n isRTL: boolean;\n zoomScale: number;\n onStart: () => void;\n}\n\ninterface DragAndDropInitValue {\n vTable: VTable;\n currentCells: HTMLTableCellElement[];\n nextCells: HTMLTableCellElement[];\n initialX: number;\n}\n\nfunction onDragStart(context: DragAndDropContext, event: MouseEvent): DragAndDropInitValue {\n const { td, isRTL, zoomScale, onStart } = context;\n const vTable = new VTable(td, true /*normalizeSize*/, zoomScale);\n const rect = normalizeRect(td.getBoundingClientRect());\n\n if (rect) {\n onStart();\n\n // calculate and retrieve the cells of the two columns shared by the current vertical resizer\n const currentCells = vTable.getCellsWithBorder(isRTL ? rect.left : rect.right, !isRTL);\n const nextCells = vTable.getCellsWithBorder(isRTL ? rect.left : rect.right, isRTL);\n\n return {\n vTable,\n currentCells,\n nextCells,\n initialX: event.pageX,\n };\n } else {\n return { vTable, currentCells: [], nextCells: [], initialX: 0 }; // Just a fallback\n }\n}\n\nfunction onDraggingHorizontal(\n context: DragAndDropContext,\n event: MouseEvent,\n initValue: DragAndDropInitValue,\n deltaX: number,\n deltaY: number\n) {\n const { td, zoomScale } = context;\n const { vTable } = initValue;\n\n vTable.table.removeAttribute('height');\n vTable.table.style.setProperty('height', null);\n vTable.forEachCellOfCurrentRow(cell => {\n if (cell.td) {\n cell.td.style.setProperty(\n 'height',\n cell.td == td ? `${(cell.height ?? 0) / zoomScale + deltaY}px` : null\n );\n }\n });\n\n // To avoid apply format styles when the table is being resizing, the skipApplyFormat is set to true.\n vTable.writeBack(true /**skipApplyFormat*/);\n return true;\n}\n\nfunction onDraggingVertical(\n context: DragAndDropContext,\n event: MouseEvent,\n initValue: DragAndDropInitValue,\n deltaX: number\n) {\n const { isRTL, zoomScale } = context;\n const { vTable, nextCells, currentCells, initialX } = initValue;\n\n if (!canResizeColumns(event.pageX, currentCells, nextCells, isRTL, zoomScale)) {\n return false;\n }\n\n // Since we allow the user to resize the table width on adjusting the border of the last cell,\n // we need to make the table width resizable by setting it as null;\n // We also allow the user to resize the table width if Shift key is pressed\n const isLastCell = nextCells.length == 0;\n const isShiftPressed = event.shiftKey;\n\n if (isLastCell || isShiftPressed) {\n vTable.table.style.setProperty('width', null);\n }\n\n const newWidthList = new Map();\n currentCells.forEach(td => {\n const rect = normalizeRect(td.getBoundingClientRect());\n\n if (rect) {\n td.style.wordBreak = 'break-word';\n td.style.whiteSpace = 'normal';\n td.style.boxSizing = 'border-box';\n const newWidth = getHorizontalDistance(rect, event.pageX, !isRTL) / zoomScale;\n newWidthList.set(td, newWidth);\n }\n });\n newWidthList.forEach((newWidth, td) => {\n td.style.width = `${newWidth}px`;\n });\n if (!isShiftPressed) {\n nextCells.forEach(td => {\n const width = td.rowSpan > 1 ? 0 : td.getBoundingClientRect().right - initialX;\n td.style.wordBreak = 'break-word';\n td.style.whiteSpace = 'normal';\n td.style.boxSizing = 'border-box';\n td.style.width = td.rowSpan > 1 ? '' : width / zoomScale - deltaX + 'px';\n });\n }\n\n // To avoid apply format styles when the table is being resizing, the skipApplyFormat is set to true.\n vTable.writeBack(true /**skipApplyFormat*/);\n return true;\n}\n\nfunction getHorizontalDistance(rect: Rect, pos: number, toLeft: boolean): number {\n return toLeft ? pos - rect.left : rect.right - pos;\n}\n\nfunction setHorizontalPosition(context: DragAndDropContext, trigger: HTMLElement) {\n const { td } = context;\n const rect = normalizeRect(td.getBoundingClientRect());\n if (rect) {\n trigger.style.top = rect.bottom - CELL_RESIZER_WIDTH + 'px';\n trigger.style.left = rect.left + 'px';\n trigger.style.width = rect.right - rect.left + 'px';\n trigger.style.height = CELL_RESIZER_WIDTH + 'px';\n }\n}\n\nfunction setVerticalPosition(context: DragAndDropContext, trigger: HTMLElement) {\n const { td, isRTL } = context;\n const rect = normalizeRect(td.getBoundingClientRect());\n if (rect) {\n trigger.style.top = rect.top + 'px';\n trigger.style.left = (isRTL ? rect.left : rect.right) - CELL_RESIZER_WIDTH + 1 + 'px';\n trigger.style.width = CELL_RESIZER_WIDTH + 'px';\n trigger.style.height = rect.bottom - rect.top + 'px';\n }\n}\n\n/**\n *\n * @param newPos The position to where we want to move the vertical border\n * @returns if the move is allowed, or, if any of the cells on either side of the vertical border is smaller than\n * the minimum width, such move is not allowed\n */\nfunction canResizeColumns(\n newPos: number,\n currentCells: HTMLTableCellElement[],\n nextCells: HTMLTableCellElement[],\n isRTL: boolean,\n zoomScale: number\n) {\n for (let i = 0; i < currentCells.length; i++) {\n const td = currentCells[i];\n const rect = normalizeRect(td.getBoundingClientRect());\n if (rect) {\n const width = getHorizontalDistance(rect, newPos, !isRTL) / zoomScale;\n if (width < MIN_CELL_WIDTH) {\n return false;\n }\n }\n }\n\n for (let i = 0; i < nextCells.length; i++) {\n const td = nextCells[i];\n let width: number = Number.MAX_SAFE_INTEGER;\n if (td) {\n const rect = normalizeRect(td.getBoundingClientRect());\n\n if (rect) {\n width = getHorizontalDistance(rect, newPos, isRTL) / zoomScale;\n }\n }\n\n if (width < MIN_CELL_WIDTH) {\n return false;\n }\n }\n\n return true;\n}\n","import createCellResizer from './CellResizer';\nimport createTableInserter from './TableInserter';\nimport createTableResizer from './TableResizer';\nimport createTableSelector from './TableSelector';\nimport TableEditFeature, { disposeTableEditFeature } from './TableEditorFeature';\nimport {\n contains,\n getComputedStyle,\n normalizeRect,\n Position,\n safeInstanceOf,\n VTable,\n} from 'roosterjs-editor-dom';\nimport {\n ChangeSource,\n IEditor,\n NodePosition,\n TableSelection,\n CreateElementData,\n} from 'roosterjs-editor-types';\n\nconst INSERTER_HOVER_OFFSET = 6;\nconst enum TOP_OR_SIDE {\n top = 0,\n side = 1,\n}\n/**\n * @internal\n *\n * A table has 6 hot areas to be resized/edited (take LTR example):\n *\n * [6] [ ]\n * +[ 1 ]+--------------------+\n * |[ ]| |\n * [ ] [ ] |\n * [ ] [ ] |\n * [2] [3] |\n * [ ] [ ] |\n * [ ][ 4 ]| |\n * +------------------+--------------------+\n * | | |\n * | | |\n * | | |\n * +------------------+--------------------+\n * [5]\n *\n * 1 - Hover area to show insert column button\n * 2 - Hover area to show insert row button\n * 3 - Hover area to show vertical resizing bar\n * 4 - Hover area to show horizontal resizing bar\n * 5 - Hover area to show whole table resize button\n * 6 - Hover area to show whole table selector button\n *\n * When set a different current table or change current TD, we need to update these areas\n */\nexport default class TableEditor {\n // 1, 2 - Insert a column or a row\n private horizontalInserter: TableEditFeature | null = null;\n private verticalInserter: TableEditFeature | null = null;\n\n // 3, 4 - Resize a column or a row from a cell\n private horizontalResizer: TableEditFeature | null = null;\n private verticalResizer: TableEditFeature | null = null;\n\n // 5 - Resize whole table\n private tableResizer: TableEditFeature | null = null;\n\n // 6 - Select whole table\n private tableSelector: TableEditFeature | null = null;\n\n private isRTL: boolean;\n private start: NodePosition | null = null;\n private end: NodePosition | null = null;\n private isCurrentlyEditing: boolean;\n\n constructor(\n private editor: IEditor,\n public readonly table: HTMLTableElement,\n private onChanged: () => void,\n private onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void,\n private contentDiv?: EventTarget | null\n ) {\n this.isRTL = getComputedStyle(table, 'direction') == 'rtl';\n this.setEditorFeatures();\n this.isCurrentlyEditing = false;\n }\n\n dispose() {\n this.disposeTableResizer();\n this.disposeCellResizers();\n this.disposeTableInserter();\n this.disposeTableSelector();\n }\n\n isEditing(): boolean {\n return this.isCurrentlyEditing;\n }\n\n isOwnedElement(node: Node) {\n return [\n this.tableResizer,\n this.tableSelector,\n this.horizontalInserter,\n this.verticalInserter,\n this.horizontalResizer,\n this.verticalResizer,\n ]\n .filter(feature => !!feature?.div)\n .some(feature => contains(feature?.div, node, true /* treatSameNodeAsContain */));\n }\n\n onMouseMove(x: number, y: number) {\n //Get Cell [0,0]\n const firstCell = this.table.rows[0]?.cells[0];\n\n if (!firstCell) {\n return;\n }\n\n const firstCellRect = normalizeRect(firstCell.getBoundingClientRect());\n\n if (!firstCellRect) {\n return;\n }\n\n //Determine if cursor is on top or side\n const topOrSide =\n y <= firstCellRect.top + INSERTER_HOVER_OFFSET\n ? TOP_OR_SIDE.top\n : this.isRTL\n ? x >= firstCellRect.right - INSERTER_HOVER_OFFSET\n ? TOP_OR_SIDE.side\n : undefined\n : x <= firstCellRect.left + INSERTER_HOVER_OFFSET\n ? TOP_OR_SIDE.side\n : undefined;\n\n // i is row index, j is column index\n for (let i = 0; i < this.table.rows.length; i++) {\n const tr = this.table.rows[i];\n let j = 0;\n for (; j < tr.cells.length; j++) {\n const td = tr.cells[j];\n const tableRect = normalizeRect(this.table.getBoundingClientRect());\n const tdRect = normalizeRect(td.getBoundingClientRect());\n\n if (!tdRect || !tableRect) {\n continue;\n }\n\n // Determine the cell the cursor is in range of\n const lessThanBottom = y <= tdRect.bottom;\n const lessThanRight = this.isRTL\n ? x <= tdRect.right + INSERTER_HOVER_OFFSET\n : x <= tdRect.right;\n const moreThanLeft = this.isRTL\n ? x >= tdRect.left\n : x >= tdRect.left - INSERTER_HOVER_OFFSET;\n\n if (lessThanBottom && lessThanRight && moreThanLeft) {\n const isOnLeftOrRight = this.isRTL\n ? tdRect.right <= tableRect.right && tdRect.right >= tableRect.right - 1\n : tdRect.left >= tableRect.left && tdRect.left <= tableRect.left + 1;\n if (i === 0 && topOrSide == TOP_OR_SIDE.top) {\n const center = (tdRect.left + tdRect.right) / 2;\n const isOnRightHalf = this.isRTL ? x < center : x > center;\n this.setInserterTd(\n isOnRightHalf ? td : tr.cells[j - 1],\n false /*isHorizontal*/\n );\n } else if (j === 0 && topOrSide == TOP_OR_SIDE.side && isOnLeftOrRight) {\n const tdAbove = this.table.rows[i - 1]?.cells[0];\n const tdAboveRect = tdAbove\n ? normalizeRect(tdAbove.getBoundingClientRect())\n : null;\n\n const isTdNotAboveMerged = !tdAboveRect\n ? null\n : this.isRTL\n ? tdAboveRect.right === tdRect.right\n : tdAboveRect.left === tdRect.left;\n\n this.setInserterTd(\n y < (tdRect.top + tdRect.bottom) / 2 && isTdNotAboveMerged\n ? tdAbove\n : td,\n true /*isHorizontal*/\n );\n } else {\n this.setInserterTd(null);\n }\n\n this.setResizingTd(td);\n\n break;\n }\n }\n\n if (j < tr.cells.length) {\n break;\n }\n }\n\n this.setEditorFeatures();\n }\n\n private setEditorFeatures() {\n if (!this.tableSelector) {\n this.tableSelector = createTableSelector(\n this.table,\n this.editor.getZoomScale(),\n this.editor,\n this.onSelect,\n this.getOnMouseOut,\n this.onShowHelperElement,\n this.contentDiv\n );\n }\n\n if (!this.tableResizer) {\n this.tableResizer = createTableResizer(\n this.table,\n this.editor.getZoomScale(),\n this.isRTL,\n this.onStartTableResize,\n this.onFinishEditing,\n this.onShowHelperElement\n );\n }\n }\n\n private setResizingTd(td: HTMLTableCellElement) {\n if (this.horizontalResizer && this.horizontalResizer.node != td) {\n this.disposeCellResizers();\n }\n\n if (!this.horizontalResizer && td) {\n const zoomScale = this.editor.getZoomScale();\n this.horizontalResizer = createCellResizer(\n td,\n zoomScale,\n this.isRTL,\n true /*isHorizontal*/,\n this.onStartCellResize,\n this.onFinishEditing,\n this.onShowHelperElement\n );\n this.verticalResizer = createCellResizer(\n td,\n zoomScale,\n this.isRTL,\n false /*isHorizontal*/,\n this.onStartCellResize,\n this.onFinishEditing,\n this.onShowHelperElement\n );\n }\n }\n\n /**\n * create or remove TableInserter\n * @param td td to attach to, set this to null to remove inserters (both horizontal and vertical)\n */\n private setInserterTd(td: HTMLTableCellElement | null, isHorizontal?: boolean) {\n const inserter = isHorizontal ? this.horizontalInserter : this.verticalInserter;\n if (td === null || (inserter && inserter.node != td)) {\n this.disposeTableInserter();\n }\n\n if (!this.horizontalInserter && !this.verticalInserter && td) {\n const newInserter = createTableInserter(\n this.editor,\n td,\n this.isRTL,\n !!isHorizontal,\n this.onInserted,\n this.getOnMouseOut,\n this.onShowHelperElement\n );\n if (isHorizontal) {\n this.horizontalInserter = newInserter;\n } else {\n this.verticalInserter = newInserter;\n }\n }\n }\n\n private disposeTableResizer() {\n if (this.tableResizer) {\n disposeTableEditFeature(this.tableResizer);\n this.tableResizer = null;\n }\n }\n\n private disposeTableInserter() {\n if (this.horizontalInserter) {\n disposeTableEditFeature(this.horizontalInserter);\n this.horizontalInserter = null;\n }\n if (this.verticalInserter) {\n disposeTableEditFeature(this.verticalInserter);\n this.verticalInserter = null;\n }\n }\n\n private disposeCellResizers() {\n if (this.horizontalResizer) {\n disposeTableEditFeature(this.horizontalResizer);\n this.horizontalResizer = null;\n }\n if (this.verticalResizer) {\n disposeTableEditFeature(this.verticalResizer);\n this.verticalResizer = null;\n }\n }\n\n private disposeTableSelector() {\n if (this.tableSelector) {\n disposeTableEditFeature(this.tableSelector);\n this.tableSelector = null;\n }\n }\n\n private onFinishEditing = (): false => {\n this.editor.focus();\n\n if (this.start && this.end) {\n this.editor.select(this.start, this.end);\n }\n\n this.editor.addUndoSnapshot(undefined /*callback*/, ChangeSource.Format);\n this.onChanged();\n this.isCurrentlyEditing = false;\n\n return false;\n };\n\n private onStartTableResize = () => {\n this.isCurrentlyEditing = true;\n this.onStartResize();\n };\n\n private onStartCellResize = () => {\n this.isCurrentlyEditing = true;\n this.disposeTableResizer();\n this.onStartResize();\n };\n\n private onStartResize() {\n this.isCurrentlyEditing = true;\n const range = this.editor.getSelectionRange();\n\n if (range) {\n this.start = Position.getStart(range);\n this.end = Position.getEnd(range);\n }\n\n this.editor.addUndoSnapshot();\n }\n\n private onInserted = (table: HTMLTableElement) => {\n this.editor.transformToDarkColor(table);\n this.disposeTableResizer();\n this.onFinishEditing();\n };\n\n /**\n * Public only for testing purposes\n * @param table the table to select\n */\n public onSelect = (table: HTMLTableElement) => {\n this.editor.focus();\n if (table) {\n const vTable = new VTable(table);\n if (vTable.cells) {\n const rows = vTable.cells.length - 1;\n let lastCellIndex: number = 0;\n vTable.cells[rows].forEach((cell, index) => {\n lastCellIndex = index;\n });\n\n const selection: TableSelection = {\n firstCell: {\n x: 0,\n y: 0,\n },\n lastCell: {\n y: rows,\n x: lastCellIndex,\n },\n };\n this.editor.select(table, selection);\n }\n }\n };\n\n private getOnMouseOut = (feature: HTMLElement) => {\n return (ev: MouseEvent) => {\n if (\n feature &&\n ev.relatedTarget != feature &&\n safeInstanceOf(this.contentDiv, 'HTMLElement') &&\n safeInstanceOf(ev.relatedTarget, 'HTMLElement') &&\n !contains(this.contentDiv, ev.relatedTarget, true /* treatSameNodeAsContain */)\n ) {\n this.dispose();\n }\n };\n };\n}\n","import Disposable from '../../../pluginUtils/Disposable';\n\n/**\n * @internal\n */\nexport default interface TableEditFeature {\n node: Node;\n div: HTMLDivElement | null;\n featureHandler: Disposable | null;\n}\n\n/**\n * @internal\n */\nexport function disposeTableEditFeature(resizer: TableEditFeature | null) {\n if (resizer) {\n resizer.div?.parentNode?.removeChild(resizer.div);\n resizer.div = null;\n resizer.featureHandler?.dispose();\n resizer.featureHandler = null;\n }\n}\n","import Disposable from '../../../pluginUtils/Disposable';\nimport TableEditFeature from './TableEditorFeature';\nimport { createElement, getIntersectedRect, normalizeRect, VTable } from 'roosterjs-editor-dom';\nimport { CreateElementData, IEditor, TableOperation } from 'roosterjs-editor-types';\n\nconst INSERTER_COLOR = '#4A4A4A';\nconst INSERTER_COLOR_DARK_MODE = 'white';\nconst INSERTER_SIDE_LENGTH = 12;\nconst INSERTER_BORDER_SIZE = 1;\n\n/**\n * @internal\n */\nexport default function createTableInserter(\n editor: IEditor,\n td: HTMLTableCellElement,\n isRTL: boolean,\n isHorizontal: boolean,\n onInsert: (table: HTMLTableElement) => void,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n): TableEditFeature | null {\n const table = editor.getElementAtCursor('table', td);\n\n const tdRect = normalizeRect(td.getBoundingClientRect());\n const viewPort = editor.getVisibleViewport();\n const tableRect = table && viewPort ? getIntersectedRect([table], [viewPort]) : null;\n\n // set inserter position\n if (tdRect && tableRect) {\n const document = td.ownerDocument;\n const createElementData = getInsertElementData(\n isHorizontal,\n editor.isDarkMode(),\n isRTL,\n editor.getDefaultFormat().backgroundColor || 'white'\n );\n\n onShowHelperElement?.(createElementData, 'TableInserter');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n if (isHorizontal) {\n // tableRect.left/right is used because the Inserter is always intended to be on the side\n div.style.left = `${\n isRTL\n ? tableRect.right\n : tableRect.left - (INSERTER_SIDE_LENGTH - 1 + 2 * INSERTER_BORDER_SIZE)\n }px`;\n div.style.top = `${tdRect.bottom - 8}px`;\n (div.firstChild as HTMLElement).style.width = `${tableRect.right - tableRect.left}px`;\n } else {\n div.style.left = `${isRTL ? tdRect.left - 8 : tdRect.right - 8}px`;\n // tableRect.top is used because the Inserter is always intended to be on top\n div.style.top = `${\n tableRect.top - (INSERTER_SIDE_LENGTH - 1 + 2 * INSERTER_BORDER_SIZE)\n }px`;\n (div.firstChild as HTMLElement).style.height = `${tableRect.bottom - tableRect.top}px`;\n }\n\n document.body.appendChild(div);\n\n const handler = new TableInsertHandler(\n div,\n td,\n isHorizontal,\n editor,\n onInsert,\n getOnMouseOut\n );\n\n return { div, featureHandler: handler, node: td };\n }\n\n return null;\n}\n\nclass TableInsertHandler implements Disposable {\n private onMouseOutEvent: null | ((ev: MouseEvent) => void);\n constructor(\n private div: HTMLDivElement,\n private td: HTMLTableCellElement,\n private isHorizontal: boolean,\n private editor: IEditor,\n private onInsert: (table: HTMLTableElement) => void,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void\n ) {\n this.div.addEventListener('click', this.insertTd);\n this.onMouseOutEvent = getOnMouseOut(div);\n this.div.addEventListener('mouseout', this.onMouseOutEvent);\n }\n\n dispose() {\n this.div.removeEventListener('click', this.insertTd);\n\n if (this.onMouseOutEvent) {\n this.div.removeEventListener('mouseout', this.onMouseOutEvent);\n }\n\n this.onMouseOutEvent = null;\n }\n\n private insertTd = () => {\n let vtable = new VTable(this.td);\n if (!this.isHorizontal) {\n vtable.normalizeTableCellSize(this.editor.getZoomScale());\n\n // Since adding new column will cause table width to change, we need to remove width properties\n vtable.table.removeAttribute('width');\n vtable.table.style.setProperty('width', null);\n }\n\n vtable.edit(this.isHorizontal ? TableOperation.InsertBelow : TableOperation.InsertRight);\n vtable.writeBack();\n\n this.onInsert(vtable.table);\n };\n}\n\nfunction getInsertElementData(\n isHorizontal: boolean,\n isDark: boolean,\n isRTL: boolean,\n backgroundColor: string\n): CreateElementData {\n const inserterColor = isDark ? INSERTER_COLOR_DARK_MODE : INSERTER_COLOR;\n const outerDivStyle = `position: fixed; width: ${INSERTER_SIDE_LENGTH}px; height: ${INSERTER_SIDE_LENGTH}px; font-size: 16px; color: black; line-height: 8px; vertical-align: middle; text-align: center; cursor: pointer; border: solid ${INSERTER_BORDER_SIZE}px ${inserterColor}; border-radius: 50%; background-color: ${backgroundColor}`;\n const leftOrRight = isRTL ? 'right' : 'left';\n const childBaseStyles = `position: absolute; box-sizing: border-box; background-color: ${backgroundColor};`;\n const childInfo: CreateElementData = {\n tag: 'div',\n style:\n childBaseStyles +\n (isHorizontal\n ? `${leftOrRight}: 12px; top: 5px; height: 3px; border-top: 1px solid ${inserterColor}; border-bottom: 1px solid ${inserterColor}; border-right: 1px solid ${inserterColor}; border-left: 0px;`\n : `left: 5px; top: 12px; width: 3px; border-left: 1px solid ${inserterColor}; border-right: 1px solid ${inserterColor}; border-bottom: 1px solid ${inserterColor}; border-top: 0px;`),\n };\n\n return {\n tag: 'div',\n style: outerDivStyle,\n children: [childInfo, '+'],\n };\n}\n","import DragAndDropHelper from '../../../pluginUtils/DragAndDropHelper';\nimport TableEditFeature from './TableEditorFeature';\nimport { createElement, normalizeRect, VTable } from 'roosterjs-editor-dom';\nimport { CreateElementData } from 'roosterjs-editor-types';\n\nconst TABLE_RESIZER_LENGTH = 12;\nconst MIN_CELL_WIDTH = 30;\nconst MIN_CELL_HEIGHT = 20;\n\n/**\n * @internal\n */\nexport default function createTableResizer(\n table: HTMLTableElement,\n zoomScale: number,\n isRTL: boolean,\n onStart: () => void,\n onDragEnd: () => false,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void\n): TableEditFeature | null {\n const document = table.ownerDocument;\n const createElementData = {\n tag: 'div',\n style: `position: fixed; cursor: ${\n isRTL ? 'ne' : 'nw'\n }-resize; user-select: none; border: 1px solid #808080`,\n };\n\n onShowHelperElement?.(createElementData, 'TableResizer');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n div.style.width = `${TABLE_RESIZER_LENGTH}px`;\n div.style.height = `${TABLE_RESIZER_LENGTH}px`;\n document.body.appendChild(div);\n\n const context: DragAndDropContext = {\n isRTL,\n table,\n zoomScale,\n onStart,\n };\n\n setResizeDivPosition(context, div);\n\n const featureHandler = new DragAndDropHelper(\n div,\n context,\n setResizeDivPosition,\n {\n onDragStart,\n onDragging,\n onDragEnd,\n },\n zoomScale\n );\n\n return { node: table, div, featureHandler };\n}\n\ninterface DragAndDropContext {\n table: HTMLTableElement;\n isRTL: boolean;\n zoomScale: number;\n onStart: () => void;\n}\n\ninterface DragAndDropInitValue {\n originalRect: DOMRect;\n vTable: VTable;\n}\n\nfunction onDragStart(context: DragAndDropContext) {\n context.onStart();\n\n return {\n originalRect: context.table.getBoundingClientRect(),\n vTable: new VTable(context.table, true /*normalizeTable*/, context.zoomScale),\n };\n}\n\nfunction onDragging(\n context: DragAndDropContext,\n event: MouseEvent,\n initValue: DragAndDropInitValue,\n deltaX: number,\n deltaY: number\n) {\n const { isRTL, zoomScale } = context;\n const { originalRect, vTable } = initValue;\n const ratioX = 1.0 + (deltaX / originalRect.width) * zoomScale * (isRTL ? -1 : 1);\n const ratioY = 1.0 + (deltaY / originalRect.height) * zoomScale;\n const shouldResizeX = Math.abs(ratioX - 1.0) > 1e-3;\n const shouldResizeY = Math.abs(ratioY - 1.0) > 1e-3;\n\n if (vTable.cells && (shouldResizeX || shouldResizeY)) {\n for (let i = 0; i < vTable.cells.length; i++) {\n for (let j = 0; j < vTable.cells[i].length; j++) {\n const cell = vTable.cells[i][j];\n if (cell.td) {\n if (shouldResizeX) {\n // the width of some external table is fixed, we need to make it resizable\n vTable.table.style.setProperty('width', null);\n const newWidth = ((cell.width ?? 0) * ratioX) / zoomScale;\n cell.td.style.boxSizing = 'border-box';\n if (newWidth >= MIN_CELL_WIDTH) {\n cell.td.style.wordBreak = 'break-word';\n cell.td.style.whiteSpace = 'normal';\n cell.td.style.width = `${newWidth}px`;\n }\n }\n\n if (shouldResizeY) {\n // the height of some external table is fixed, we need to make it resizable\n vTable.table.style.setProperty('height', null);\n if (j == 0) {\n const newHeight = ((cell.height ?? 0) * ratioY) / zoomScale;\n if (newHeight >= MIN_CELL_HEIGHT) {\n cell.td.style.height = `${newHeight}px`;\n }\n } else {\n cell.td.style.setProperty('height', null);\n }\n }\n }\n }\n }\n\n // To avoid apply format styles when the table is being resizing, the skipApplyFormat is set to true.\n vTable.writeBack(true /**skipApplyFormat*/);\n return true;\n } else {\n return false;\n }\n}\n\nfunction setResizeDivPosition(context: DragAndDropContext, trigger: HTMLElement) {\n const { table, isRTL } = context;\n const rect = normalizeRect(table.getBoundingClientRect());\n\n if (rect) {\n trigger.style.top = `${rect.bottom}px`;\n trigger.style.left = isRTL\n ? `${rect.left - TABLE_RESIZER_LENGTH - 2}px`\n : `${rect.right}px`;\n }\n}\n","import DragAndDropHandler from '../../../pluginUtils/DragAndDropHandler';\nimport DragAndDropHelper from '../../../pluginUtils/DragAndDropHelper';\nimport TableEditorFeature from './TableEditorFeature';\nimport { createElement, normalizeRect, safeInstanceOf } from 'roosterjs-editor-dom';\nimport { CreateElementData, IEditor, Rect } from 'roosterjs-editor-types';\n\nconst TABLE_SELECTOR_LENGTH = 12;\nconst TABLE_SELECTOR_ID = '_Table_Selector';\n\n/**\n * @internal\n */\nexport default function createTableSelector(\n table: HTMLTableElement,\n zoomScale: number,\n editor: IEditor,\n onFinishDragging: (table: HTMLTableElement) => void,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void,\n onShowHelperElement?: (\n elementData: CreateElementData,\n helperType: 'CellResizer' | 'TableInserter' | 'TableResizer' | 'TableSelector'\n ) => void,\n contentDiv?: EventTarget | null\n): TableEditorFeature | null {\n const rect = normalizeRect(table.getBoundingClientRect());\n\n if (!isTableTopVisible(editor, rect, contentDiv)) {\n return null;\n }\n\n const document = table.ownerDocument;\n const createElementData = {\n tag: 'div',\n style: 'position: fixed; cursor: all-scroll; user-select: none; border: 1px solid #808080',\n };\n\n onShowHelperElement?.(createElementData, 'TableSelector');\n\n const div = createElement(createElementData, document) as HTMLDivElement;\n\n div.id = TABLE_SELECTOR_ID;\n div.style.width = `${TABLE_SELECTOR_LENGTH}px`;\n div.style.height = `${TABLE_SELECTOR_LENGTH}px`;\n document.body.appendChild(div);\n\n const context: TableSelectorContext = {\n table,\n zoomScale,\n rect,\n };\n\n setSelectorDivPosition(context, div);\n\n const onDragEnd = (context: TableSelectorContext, event: MouseEvent): false => {\n if (event.target == div) {\n onFinishDragging(context.table);\n }\n return false;\n };\n\n const featureHandler = new TableSelectorFeature(\n div,\n context,\n setSelectorDivPosition,\n {\n onDragEnd,\n },\n zoomScale,\n getOnMouseOut\n );\n\n return { div, featureHandler, node: table };\n}\n\ninterface TableSelectorContext {\n table: HTMLTableElement;\n zoomScale: number;\n rect: Rect | null;\n}\n\ninterface TableSelectorInitValue {\n event: MouseEvent;\n}\n\nclass TableSelectorFeature extends DragAndDropHelper {\n private onMouseOut: ((ev: MouseEvent) => void) | null;\n\n constructor(\n private div: HTMLElement,\n context: TableSelectorContext,\n onSubmit: (context: TableSelectorContext, trigger: HTMLElement) => void,\n handler: DragAndDropHandler,\n zoomScale: number,\n getOnMouseOut: (feature: HTMLElement) => (ev: MouseEvent) => void,\n forceMobile?: boolean\n ) {\n super(div, context, onSubmit, handler, zoomScale, forceMobile);\n this.onMouseOut = getOnMouseOut(div);\n div.addEventListener('mouseout', this.onMouseOut);\n }\n\n dispose(): void {\n super.dispose();\n if (this.onMouseOut) {\n this.div.removeEventListener('mouseout', this.onMouseOut);\n }\n this.onMouseOut = null;\n }\n}\n\nfunction setSelectorDivPosition(context: TableSelectorContext, trigger: HTMLElement) {\n const { rect } = context;\n if (rect) {\n trigger.style.top = `${rect.top - TABLE_SELECTOR_LENGTH}px`;\n trigger.style.left = `${rect.left - TABLE_SELECTOR_LENGTH - 2}px`;\n }\n}\n\nfunction isTableTopVisible(\n editor: IEditor,\n rect: Rect | null,\n contentDiv?: EventTarget | null\n): boolean {\n const visibleViewport = editor.getVisibleViewport();\n if (contentDiv && safeInstanceOf(contentDiv, 'HTMLElement') && visibleViewport && rect) {\n const containerRect = normalizeRect(contentDiv.getBoundingClientRect());\n\n return !!containerRect && containerRect.top <= rect.top && visibleViewport.top <= rect.top;\n }\n\n return true;\n}\n","export { default as TableResize } from './TableResize';\n","import { applyFormat, getEntitySelector, getTagOfNode } from 'roosterjs-editor-dom';\nimport { insertEntity } from 'roosterjs-editor-api';\nimport {\n DefaultFormat,\n EditorPlugin,\n Entity,\n EntityOperation,\n IEditor,\n PluginEvent,\n PluginEventType,\n ContentPosition,\n} from 'roosterjs-editor-types';\n\nconst ENTITY_TYPE = 'WATERMARK_WRAPPER';\n\n/**\n * A watermark plugin to manage watermark string for roosterjs\n */\nexport default class Watermark implements EditorPlugin {\n private editor: IEditor | null = null;\n private disposer: (() => void) | null = null;\n private format: DefaultFormat;\n\n /**\n * Create an instance of Watermark plugin\n * @param watermark The watermark string\n */\n constructor(private watermark: string, format?: DefaultFormat, private customClass?: string) {\n this.format = format || {\n fontSize: '14px',\n textColors: {\n lightModeColor: '#AAAAAA',\n darkModeColor: '#6B6B6B',\n },\n };\n }\n\n /**\n * Get a friendly name of this plugin\n */\n getName() {\n return 'Watermark';\n }\n\n /**\n * Initialize this plugin. This should only be called from Editor\n * @param editor Editor instance\n */\n initialize(editor: IEditor) {\n this.editor = editor;\n this.disposer = this.editor.addDomEventHandler({\n focus: this.showHideWatermark,\n blur: this.showHideWatermark,\n });\n }\n\n /**\n * Dispose this plugin\n */\n dispose() {\n this.disposer?.();\n this.disposer = null;\n this.editor = null;\n }\n\n /**\n * Handle events triggered from editor\n * @param event PluginEvent object\n */\n onPluginEvent(event: PluginEvent) {\n if (\n event.eventType == PluginEventType.EditorReady ||\n (event.eventType == PluginEventType.ContentChanged &&\n (event.data)?.type != ENTITY_TYPE)\n ) {\n this.showHideWatermark();\n } else if (\n event.eventType == PluginEventType.EntityOperation &&\n event.entity.type == ENTITY_TYPE &&\n this.editor\n ) {\n const {\n operation,\n entity: { wrapper },\n } = event;\n if (operation == EntityOperation.ReplaceTemporaryContent) {\n this.removeWatermark(wrapper);\n } else if (event.operation == EntityOperation.NewEntity) {\n applyFormat(\n wrapper,\n this.format,\n this.editor.isDarkMode(),\n this.editor.getDarkColorHandler()\n );\n wrapper.spellcheck = false;\n }\n }\n }\n\n private showHideWatermark = () => {\n if (!this.editor) {\n return;\n }\n const hasFocus = this.editor.hasFocus();\n const watermarks = this.editor.queryElements(getEntitySelector(ENTITY_TYPE));\n const isShowing = watermarks.length > 0;\n\n if (hasFocus && isShowing) {\n watermarks.forEach(this.removeWatermark);\n this.editor.focus();\n } else if (!hasFocus && !isShowing && this.editor.isEmpty()) {\n const newEntity = insertEntity(\n this.editor,\n ENTITY_TYPE,\n this.editor.getDocument().createTextNode(this.watermark),\n false /*isBlock*/,\n false /*isReadonly*/,\n ContentPosition.Begin\n );\n if (this.customClass) {\n newEntity.wrapper.classList.add(this.customClass);\n }\n }\n };\n\n private removeWatermark = (wrapper: HTMLElement) => {\n const parentNode = wrapper.parentNode;\n parentNode?.removeChild(wrapper);\n\n // After remove watermark node, if it leaves an empty DIV, append a BR node into it to make it a regular empty line\n if (\n parentNode &&\n this.editor?.contains(parentNode) &&\n getTagOfNode(parentNode) == 'DIV' &&\n !parentNode.firstChild\n ) {\n parentNode.appendChild(this.editor.getDocument().createElement('BR'));\n }\n };\n}\n","export { default as Watermark } from './Watermark';\n","export * from 'roosterjs-editor-types/lib/compatibleTypes';\n","/**\r\n * enum for setting block alignment, used by setAlignment API\r\n */\r\nexport enum CompatibleAlignment {\r\n\r\n /**\r\n * Align left\r\n */\r\n Left,\r\n\r\n /**\r\n * Align center\r\n */\r\n Center,\r\n\r\n /**\r\n * Align right\r\n */\r\n Right,\r\n}\r\n","/**\n * Enum used to control the different types of bullet list\n */\r\nexport enum CompatibleBulletListType {\r\n\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Bullet triggered by *\n */\n Disc = 1,\n\n /**\n * Bullet triggered by -\n */\n Dash = 2,\n\n /**\n * Bullet triggered by --\n */\n Square = 3,\n\n /**\n * Bullet triggered by >\n */\n ShortArrow = 4,\n\n /**\n * Bullet triggered by ->\n */\n LongArrow = 5,\n\n /**\n * Bullet triggered by =>\n */\n UnfilledArrow = 6,\n\n /**\n * Bullet triggered by —\n */\n Hyphen = 7,\n\n /**\n * Bullet triggered by -->\n */\n DoubleLongArrow = 8,\n\n /**\n * Bullet type circle\n */\n Circle = 9,\n\n /**\n * Maximum value of the enum\n */\n Max = 9,\n}\r\n","/**\n * The enum used for controlling the capitalization of text.\n * Used by changeCapitalization API\n */\r\nexport enum CompatibleCapitalization {\r\n\n /**\n * Transforms the first character after punctuation mark followed by space\n * to uppercase and the rest of characters to lowercase.\n */\n Sentence = 'sentence',\n\n /**\n * Transforms all characters to lowercase\n */\n Lowercase = 'lowercase',\n\n /**\n * Transforms all characters to uppercase\n */\n Uppercase = 'uppercase',\n\n /**\n * Transforms the first character of each word to uppercase\n */\n CapitalizeEachWord = 'capitalize',\n}\r\n","/**\r\n * Possible change sources. Here are the predefined sources.\r\n * It can also be other string if the change source can't fall into these sources.\r\n */\r\nexport enum CompatibleChangeSource {\r\n\r\n /**\r\n * Content changed by auto link\r\n */\r\n AutoLink = 'AutoLink',\r\n\r\n /**\r\n * Content changed by create link\r\n */\r\n CreateLink = 'CreateLink',\r\n\r\n /**\r\n * Content changed by format\r\n */\r\n Format = 'Format',\r\n\r\n /**\r\n * Content changed by image resize\r\n */\r\n ImageResize = 'ImageResize',\r\n\r\n /**\r\n * Content changed by paste\r\n */\r\n Paste = 'Paste',\r\n\r\n /**\r\n * Content changed by setContent API\r\n */\r\n SetContent = 'SetContent',\r\n\r\n /**\r\n * Content changed by cut operation\r\n */\r\n Cut = 'Cut',\r\n\r\n /**\r\n * Content changed by drag & drop operation\r\n */\r\n Drop = 'Drop',\r\n\r\n /**\r\n * Insert a new entity into editor\r\n */\r\n InsertEntity = 'InsertEntity',\r\n\r\n /**\r\n * Editor is switched to dark mode, content color is changed\r\n */\r\n SwitchToDarkMode = 'SwitchToDarkMode',\r\n\r\n /**\r\n * Editor is switched to light mode, content color is changed\r\n */\r\n SwitchToLightMode = 'SwitchToLightMode',\r\n\r\n /**\r\n * List chain reorganized numbers of lists\r\n */\r\n ListChain = 'ListChain',\r\n\r\n /**\r\n * Keyboard event, used by Content Model.\r\n * Data of this event will be the key code number\r\n */\r\n Keyboard = 'Keyboard',\r\n}\r\n","/**\n * Represents the strategy to clear the format of the current editor selection\n */\r\nexport enum CompatibleClearFormatMode {\r\n\n /**\n * Inline format. Remove text format.\n */\n Inline,\n\n /**\n * BLock format. Remove text and structure format of the block.\n */\n Block,\n\n /**\n * Detect Inline or Block format based on the current editor selector.\n */\n AutoDetect,\n}\r\n","/**\n * Represents the mode of color transformation\n */\r\nexport enum CompatibleColorTransformDirection {\r\n\n /**\n * Transform from light to dark\n */\n LightToDark = 0,\n\n /**\n * Transform from dark to light\n */\n DarkToLight = 1,\n}\r\n","/**\r\n * The position. Mostly used for content insertion and traversing\r\n * On insertion, we will need to specify where we want the content to be placed (begin, end, selection or outside)\r\n * On content traversing, we will need to specify the start position of traversing\r\n */\r\nexport enum CompatibleContentPosition {\r\n\r\n /**\r\n * Begin of the container\r\n */\r\n Begin,\r\n\r\n /**\r\n * End of the container\r\n */\r\n End,\r\n\r\n /**\r\n * End of the content div domain.\r\n */\r\n DomEnd,\r\n\r\n /**\r\n * Selection start\r\n */\r\n SelectionStart,\r\n\r\n /**\r\n * Outside of editor\r\n */\r\n Outside,\r\n\r\n /**\r\n * Manually defined range\r\n */\r\n Range,\r\n}\r\n","/**\n * Prefix of content types\n */\r\nexport enum CompatibleContentTypePrefix {\r\n\n /**\n * Text type prefix\n */\n Text = 'text/',\n\n /**\n * Image type prefix\n */\n Image = 'image/',\n}\r\n\r\n\n/**\n * Known content types\n */\r\nexport enum CompatibleContentType {\r\n\n /**\n * Plain text content type\n */\n PlainText = 'text/plain',\n\n /**\n * HTML content type\n */\n HTML = 'text/html',\n}\r\n","/**\n * @deprecated\n * Constants string for dataset names used by dark mode\n */\r\nexport enum CompatibleDarkModeDatasetNames {\r\n\n /**\n * Original style text color\n */\n OriginalStyleColor = 'ogsc',\n\n /**\n * Original style background color\n */\n OriginalStyleBackgroundColor = 'ogsb',\n\n /**\n * Original attribute text color\n */\n OriginalAttributeColor = 'ogac',\n\n /**\n * Original attribute background color\n */\n OriginalAttributeBackgroundColor = 'ogab',\n}\r\n","/**\n * Types of definitions, used by Definition type\n */\r\nexport enum CompatibleDefinitionType {\r\n\n /**\n * Boolean type definition, represents a boolean type value\n */\n Boolean,\n\n /**\n * Number type definition, represents a number type value\n */\n Number,\n\n /**\n * String type definition, represents a string type value\n */\n String,\n\n /**\n * Array type definition, represents an array with a given item type\n */\n Array,\n\n /**\n * Object type definition, represents an object with the given property types\n */\n Object,\n\n /**\n * Customize type definition, represents a customized type with a validator function\n */\n Customize,\n}\r\n","/**\n * Class names for Delimiter\n */\r\nexport enum CompatibleDelimiterClasses {\r\n\n /**\n * Class name to specify this delimiter is before an entity\n */\n DELIMITER_BEFORE = 'entityDelimiterBefore',\n\n /**\n * Class name to specify this delimiter is after an entity\n */\n DELIMITER_AFTER = 'entityDelimiterAfter',\n}\r\n","/**\r\n * enum for setting block direction, used by setDirection API\r\n */\r\nexport enum CompatibleDirection {\r\n\r\n /**\r\n * Left to right\r\n */\r\n LeftToRight,\r\n\r\n /**\r\n * Right to left\r\n */\r\n RightToLeft,\r\n}\r\n","/**\n * Command strings for Document.execCommand() API\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand\n */\r\nexport enum CompatibleDocumentCommand {\r\n\n /**\n * Changes the browser auto-link behavior (Internet Explorer only)\n */\n AutoUrlDetect = 'AutoUrlDetect',\n\n /**\n * Changes the document background color. In styleWithCss mode, it affects the background color of the containing block instead.\n * This requires a <color> value string to be passed in as a value argument. Note that Internet Explorer uses this to set the\n * text background color.\n */\n BackColor = 'backColor',\n\n /**\n * Toggles bold on/off for the selection or at the insertion point. Internet Explorer uses the <strong> tag instead of <b>.\n */\n Bold = 'bold',\n\n /**\n * Clears all authentication credentials from the cache.\n */\n ClearAuthenticationCache = 'ClearAuthenticationCache',\n\n /**\n * Makes the content document either read-only or editable. This requires a boolean true/false as the value argument.\n * (Not supported by Internet Explorer.)\n */\n ContentReadOnly = 'contentReadOnly',\n\n /**\n * Copies the current selection to the clipboard. Conditions of having this behavior enabled vary from one browser to another,\n * and have evolved over time. Check the compatibility table to determine if you can use it in your case.\n */\n Copy = 'copy',\n\n /**\n * Creates an hyperlink from the selection, but only if there is a selection. Requires a URI string as a value argument for the\n * hyperlink's href. The URI must contain at least a single character, which may be whitespace.\n * (Internet Explorer will create a link with a null value.)\n */\n CreateLink = 'createLink',\n\n /**\n * Removes the current selection and copies it to the clipboard. When this behavior is enabled varies between browsers,\n * and its conditions have evolved over time. Check the compatibility table for usage details.\n */\n Cut = 'cut',\n\n /**\n * Adds a <small> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n DecreaseFontSize = 'decreaseFontSize',\n\n /**\n * Changes the paragraph separator used when new paragraphs are created in editable text regions. See Differences in markup\n * generation for more details.\n */\n DefaultParagraphSeparator = 'defaultParagraphSeparator',\n\n /**\n * Deletes the current selection.\n */\n Delete = 'delete',\n\n /**\n * Enables or disables the table row/column insertion and deletion controls. (Not supported by Internet Explorer.)\n */\n EnableInlineTableEditing = 'enableInlineTableEditing',\n\n /**\n * Enables or disables the resize handles on images and other resizable objects. (Not supported by Internet Explorer.)\n */\n EnableObjectResizing = 'enableObjectResizing',\n\n /**\n * Changes the font name for the selection or at the insertion point. This requires a font name string (like \"Arial\")\n * as a value argument.\n */\n FontName = 'fontName',\n\n /**\n * Changes the font size for the selection or at the insertion point. This requires an integer from 1-7 as a value argument.\n */\n FontSize = 'fontSize',\n\n /**\n * Changes a font color for the selection or at the insertion point. This requires a hexadecimal color value string\n * as a value argument.\n */\n ForeColor = 'foreColor',\n\n /**\n * Adds an HTML block-level element around the line containing the current selection, replacing the block element containing\n * the line if one exists (in Firefox, <blockquote> is the exception — it will wrap any containing block element).\n * Requires a tag-name string as a value argument. Virtually all block-level elements can be used.\n * (Internet Explorer supports only heading tags H1–H6, ADDRESS, and PRE, which must be wrapped in angle brackets, such as \"<H1>\".)\n */\n FormatBlock = 'formatBlock',\n\n /**\n * Deletes the character ahead of the cursor's position, identical to hitting the Delete key on a Windows keyboard.\n */\n ForwardDelete = 'forwardDelete',\n\n /**\n * Adds a heading element around a selection or insertion point line. Requires the tag-name strings a value argument (i.e. \"H1\", \"H6\").\n * (Not supported by Internet Explorer and Safari.)\n */\n Heading = 'heading',\n\n /**\n * Changes the background color for the selection or at the insertion point. Requires a color value string as a value argument.\n * useCSS must be true for this to function. (Not supported by Internet Explorer.)\n */\n HiliteColor = 'hiliteColor',\n\n /**\n * Adds a <big> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n IncreaseFontSize = 'increaseFontSize',\n\n /**\n * Indents the line containing the selection or insertion point. In Firefox, if the selection spans multiple lines at different\n * levels of indentation, only the least indented lines in the selection will be indented.\n */\n Indent = 'indent',\n\n /**\n * Controls whether the Enter key inserts a <br> element, or splits the current block element into two.\n * (Not supported by Internet Explorer.)\n */\n InsertBrOnReturn = 'insertBrOnReturn',\n\n /**\n * Inserts a <hr> element at the insertion point, or replaces the selection with it.\n */\n InsertHorizontalRule = 'insertHorizontalRule',\n\n /**\n * Inserts an HTML string at the insertion point (deletes selection). Requires a valid HTML string as a value argument.\n * (Not supported by Internet Explorer.)\n */\n InsertHTML = 'insertHTML',\n\n /**\n * Inserts an image at the insertion point (deletes selection). Requires a URL string for the image's src as a value argument.\n * The requirements for this string are the same as createLink.\n */\n InsertImage = 'insertImage',\n\n /**\n * Creates a numbered ordered list for the selection or at the insertion point.\n */\n InsertOrderedList = 'insertOrderedList',\n\n /**\n * Creates a bulleted unordered list for the selection or at the insertion point.\n */\n InsertUnorderedList = 'insertUnorderedList',\n\n /**\n * Inserts a paragraph around the selection or the current line.\n * (Internet Explorer inserts a paragraph at the insertion point and deletes the selection.)\n */\n InsertParagraph = 'insertParagraph',\n\n /**\n * Inserts the given plain text at the insertion point (deletes selection).\n */\n InsertText = 'insertText',\n\n /**\n * Toggles italics on/off for the selection or at the insertion point.\n * (Internet Explorer uses the <em> element instead of <i>.)\n */\n Italic = 'italic',\n\n /**\n * Centers the selection or insertion point.\n */\n JustifyCenter = 'justifyCenter',\n\n /**\n * Justifies the selection or insertion point.\n */\n JustifyFull = 'justifyFull',\n\n /**\n * Justifies the selection or insertion point to the left.\n */\n JustifyLeft = 'justifyLeft',\n\n /**\n * Right-justifies the selection or the insertion point.\n */\n JustifyRight = 'justifyRight',\n\n /**\n * Outdents the line containing the selection or insertion point.\n */\n Outdent = 'outdent',\n\n /**\n * Pastes the clipboard contents at the insertion point (replaces current selection). Disabled for web content. See [1].\n */\n Paste = 'paste',\n\n /**\n * Redoes the previous undo command.\n */\n Redo = 'redo',\n\n /**\n * Removes all formatting from the current selection.\n */\n RemoveFormat = 'removeFormat',\n\n /**\n * Selects all of the content of the editable region.\n */\n SelectAll = 'selectAll',\n\n /**\n * Toggles strikethrough on/off for the selection or at the insertion point.\n */\n StrikeThrough = 'strikeThrough',\n\n /**\n * Toggles subscript on/off for the selection or at the insertion point.\n */\n Subscript = 'subscript',\n\n /**\n * Toggles superscript on/off for the selection or at the insertion point.\n */\n Superscript = 'superscript',\n\n /**\n * Toggles underline on/off for the selection or at the insertion point.\n */\n Underline = 'underline',\n\n /**\n * Undoes the last executed command.\n */\n Undo = 'undo',\n\n /**\n * Removes the anchor element from a selected hyperlink.\n */\n Unlink = 'unlink',\n\n /**\n * Replaces the useCSS command. true modifies/generates style attributes in markup, false generates presentational elements.\n */\n StyleWithCSS = 'styleWithCSS',\n}\r\n","/**\n * The is essentially an enum representing result from browser compareDocumentPosition API\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n */\r\nexport enum CompatibleDocumentPosition {\r\n\n /**\n * Same node\n */\n Same = 0,\n\n /**\n * Node is disconnected from document\n */\n Disconnected = 1,\n\n /**\n * Node is preceding the comparing node\n */\n Preceding = 2,\n\n /**\n * Node is following the comparing node\n */\n Following = 4,\n\n /**\n * Node contains the comparing node\n */\n Contains = 8,\n\n /**\n * Node is contained by the comparing node\n */\n ContainedBy = 16,\n}\r\n","/**\n * CSS Class names for Entity\n */\r\nexport enum CompatibleEntityClasses {\r\n\n /**\n * Class name to specify this is an entity\n */\n ENTITY_INFO_NAME = '_Entity',\n\n /**\n * Class name to specify the type of an entity\n */\n ENTITY_TYPE_PREFIX = '_EType_',\n\n /**\n * Class name to specify the ID of an entity\n */\n ENTITY_ID_PREFIX = '_EId_',\n\n /**\n * Class name to specify if the entity is readonly\n */\n ENTITY_READONLY_PREFIX = '_EReadonly_',\n}\r\n","/**\n * Define possible operations to an entity\n */\r\nexport enum CompatibleEntityOperation {\r\n\n /**\n * Notify plugins that there is a new plugin was added into editor.\n * Plugin can handle this event to entity hydration.\n * This event will be only fired once for each entity DOM node.\n * After undo, or copy/paste, since new DOM nodes were added, this event will be fired\n * for those entities represented by newly added nodes.\n */\n NewEntity,\n\n /**\n * Notify plugins that user is clicking target to an entity\n */\n Click,\n\n /**\n * Notify plugins that user is triggering context menu to an entity\n */\n ContextMenu,\n\n /**\n * Notify plugins that user is escaping from an entity by pressing ESC key\n */\n Escape,\n\n /**\n * Notify plugins that user is removing an entity from its start position using DELETE key\n */\n RemoveFromStart,\n\n /**\n * Notify plugins that user is remove an entity from its end position using BACKSPACE key\n */\n RemoveFromEnd,\n\n /**\n * Notify plugins that an entity is being overwritten.\n * This can be caused by key in, cut, paste, delete, backspace ... on a selection\n * which contains some entities.\n */\n Overwrite,\n\n /**\n * Notify plugins that an entity is being partially overwritten.\n * This happens when user selected part of the entity then do key press, or cut, paste, delete, backspace, ...\n */\n PartialOverwrite,\n\n /**\n * Notify plugins that editor is generating HTML content for save.\n * Plugin should use this event to remove any temporary content, and only leave DOM nodes that\n * should be saved as HTML string.\n * This event will provide a cloned DOM tree for each entity, do NOT compare the DOM nodes with cached nodes\n * because it will always return false.\n */\n ReplaceTemporaryContent,\n\n /**\n * @deprecated\n */\n AddShadowRoot,\n\n /**\n * @deprecated\n */\n RemoveShadowRoot,\n\n /**\n * Notify plugins that a new entity state need to be updated to an entity.\n * This is normally happened when user undo/redo the content with an entity snapshot added by a plugin that handles entity\n */\n UpdateEntityState,\n}\r\n","/**\n * Experimental feature flags\n */\r\nexport enum CompatibleExperimentalFeatures {\r\n\n // #region Graduated and deprecated features.\n // These features will be removed in next major release\n /**\n * @deprecated This feature is always enabled\n */\n NewIndentation = 'NewIndentation',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewBullet = 'NewBullet',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewNumbering = 'NewNumbering',\n\n /**\n * @deprecated This feature is always enabled\n */\n ListChain = 'ListChain',\n\n /**\n * @deprecated This feature is always enabled\n */\n MergePastedLine = 'MergePastedLine',\n\n /**\n * @deprecated This feature is always enabled\n */\n SingleDirectionResize = 'SingleDirectionResize',\n\n /**\n * @deprecated This feature is always enabled\n */\n PasteWithLinkPreview = 'PasteWithLinkPreview',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageRotate = 'ImageRotate',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageCrop = 'ImageCrop',\n\n /**\n * @deprecated This feature is always enabled\n * Check if the element has a style attribute, if not, apply the default format\n */\n AlwaysApplyDefaultFormat = 'AlwaysApplyDefaultFormat',\n\n /**\n * @deprecated This feature can be enabled/disabled using Paste Plugin contructor param\n * Paste the Html instead of the Img when the Html Body only have one IMG Child node\n */\n ConvertSingleImageBody = 'ConvertSingleImageBody',\n\n /**\n * @deprecated This feature is always enabled\n * Align table elements to left, center and right using setAlignment API\n */\n TableAlignment = 'TableAlignment',\n\n /**\n * @deprecated this feature is always enabled\n * Provide a circular resize handles that adaptive the number od handles to the size of the image\n */\n AdaptiveHandlesResizer = 'AdaptiveHandlesResizer',\n\n /**\n * @deprecated this feature is always disabled\n * Automatically transform -- into hyphen, if typed between two words.\n */\n AutoHyphen = 'AutoHyphen',\n\n /**\n * @deprecated this feature is always disabled\n * Use pending format strategy to do style based format, e.g. Font size, Color.\n * With this feature enabled, we don't need to insert temp ZeroWidthSpace character to hold pending format\n * when selection is collapsed. Instead, we will hold the pending format in memory and only apply it when type something\n */\n PendingStyleBasedFormat = 'PendingStyleBasedFormat',\n\n /**\n * @deprecated this feature is always disabled\n * Normalize list to make sure it can be displayed correctly in other client\n * e.g. We will move list items with \"display: block\" into previous list item and change tag to be DIV\n */\n NormalizeList = 'NormalizeList',\n\n /**\n * @deprecated this feature is always enabled\n * When a html image is selected, the selected image data will be stored by editor core.\n */\n ImageSelection = 'ImageSelection',\n\n /**\n * @deprecated this feature is always enabled\n * Use variable-based dark mode solution rather than dataset-based solution.\n * When enable this feature, need to pass in a DarkModelHandler object to each call of setColor and applyFormat\n * if you need them work for dark mode\n */\n VariableBasedDarkColor = 'VariableBasedDarkColor',\n\n /**\n * @deprecated this feature is always enabled\n * Align list elements elements to left, center and right using setAlignment API\n */\n ListItemAlignment = 'ListItemAlignment',\n\n /**\n * @deprecated\n */\n DefaultFormatInSpan = 'DefaultFormatInSpan',\n\n /**\n * @deprecated\n */\n DefaultFormatOnContainer = 'DefaultFormatOnContainer',\n\n //#endregion\n\n /**\n * Provide additional Tab Key Features. Requires Text Features Content Editable Features\n */\n TabKeyTextFeatures = 'TabKeyTextFeatures',\n\n /**\n * Trigger formatting by a especial characters. Ex: (A), 1. i).\n */\n AutoFormatList = 'AutoFormatList',\n\n /**\n * With this feature enabled, when writing back a list item we will re-use all\n * ancestor list elements, even if they don't match the types currently in the\n * listTypes array for that item. The only list that we will ensure is correct\n * is the one closest to the item.\n */\n ReuseAllAncestorListElements = 'ReuseAllAncestorListElements',\n\n /**\n * Reuse existing DOM structure if possible when convert Content Model back to DOM tree\n */\n ReusableContentModel = 'ReusableContentModel',\n\n /**\n * Handle keyboard editing event with Content Model\n */\n EditWithContentModel = 'EditWithContentModel',\n\n /**\n * Delete table with Backspace key with the whole was selected with table selector\n */\n DeleteTableWithBackspace = 'DeleteTableWithBackspace',\n\n /**\n * Add entities around a Read Only Inline entity to prevent cursor to be hidden when cursor is next of it.\n */\n InlineEntityReadOnlyDelimiters = 'InlineEntityReadOnlyDelimiters',\n\n /**\n * Paste with Content model\n */\n ContentModelPaste = 'ContentModelPaste',\n\n /**\n * Disable list chain functionality\n */\n DisableListChain = 'DisableListChain',\n}\r\n","/**\r\n * The enum used for increase or decrease font size\r\n * Used by setFontSize API\r\n */\r\nexport enum CompatibleFontSizeChange {\r\n\r\n /**\r\n * Increase font size\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease font size\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Represents a mode number to indicate what kind of content to retrieve when call Editor.getContent()\n */\r\nexport enum CompatibleGetContentMode {\r\n\n /**\n * The clean content without any temporary content only for editor.\n * This is the default value. Call to Editor.getContent() with trigger an ExtractContentWithDom event\n * so that plugins can remove their temporary content, and will return the HTML content\n * which is ready for save to storage.\n */\n CleanHTML = 0,\n\n /**\n * Retrieve the raw HTML string in current editor. Temporary content will be included.\n */\n RawHTMLOnly = 1,\n\n /**\n * Retrieve the raw HTML string in current editor with a selection marker. This can be used for\n * save current editor state and call to SetContent with this result can fully restore editor state\n * including current selection\n */\n RawHTMLWithSelection = 2,\n\n /**\n * Get plain text content only, all format will be ignored\n */\n PlainText,\n\n /**\n * A fast way to get plain text content, the line-end positions may not be exactly same with HTML content,\n * but the text content should be the same. This is used for quickly retrieve text content and check\n * text only\n */\n PlainTextFast,\n}\r\n","/**\n * Operation flags for ImageEdit plugin\n */\r\nexport enum CompatibleImageEditOperation {\r\n\n /**\n * No operation\n */\n None = 0,\n\n /**\n * Resize image from corner ( horizontal and vertical resize)\n */\n CornerResize = 1,\n\n /**\n * Resize image from side ( either horizontal or vertical resize)\n */\n SideResize = 2,\n\n /**\n * Image resize\n */\n Resize = CornerResize | SideResize,\n\n /**\n * Image rotate\n */\n Rotate = 4,\n\n /**\n * Image resize and rotate\n */\n ResizeAndRotate = Resize | Rotate,\n\n /**\n * Image crop\n */\n Crop = 8,\n\n /**\n * All operations\n */\n All = ResizeAndRotate | Crop,\n}\r\n","/**\r\n * The enum used for increase or decrease indentation of a block\r\n * Used by setIndentation API\r\n */\r\nexport enum CompatibleIndentation {\r\n\r\n /**\r\n * Increase indentation\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease indentation\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Key numbers common used keys\n */\r\nexport enum CompatibleKeys {\r\n\n NULL = 0,\n BACKSPACE = 8,\n TAB = 9,\n ENTER = 13,\n SHIFT = 16,\n CTRL_LEFT = 17,\n ALT = 18,\n ESCAPE = 27,\n SPACE = 32,\n PAGEUP = 33,\n END = 35,\n HOME = 36,\n LEFT = 37,\n UP = 38,\n RIGHT = 39,\n DOWN = 40,\n PRINT_SCREEN = 44,\n DELETE = 46,\n /**\n * @deprecated Just for backward compatibility\n */\n EIGHT_ASTIRISK = 56,\n EIGHT_ASTERISK = 56,\n B = 66,\n I = 73,\n U = 85,\n Y = 89,\n Z = 90,\n META_LEFT = 91,\n COMMA = 188,\n DASH_UNDERSCORE = 189,\n PERIOD = 190,\n /**\n * @deprecated Just for backward compatibility\n */\n FORWARDSLASH = 191,\n FORWARD_SLASH = 191,\n GRAVE_TILDE = 192,\n\n /**\n * Keys below are non-standard, and should be used in ContentEditFeatures only\n */\n CONTENTCHANGED = 0x101,\n RANGE = 0x102,\n\n Ctrl = 0x1000,\n Meta = 0x2000,\n Shift = 0x4000,\n}\r\n","/**\n * Index of known CreateElementData used by createElement function\n */\r\nexport enum CompatibleKnownCreateElementDataIndex {\r\n\n /**\n * Set a none value to help createElement function ignore falsy value\n */\n None = 0,\n\n /**\n * An empty line without format\n */\n EmptyLine = 1,\n\n /**\n * Wrapper for blockquote\n */\n BlockquoteWrapper = 2,\n\n /**\n * Temp DIV for copy/paste\n */\n CopyPasteTempDiv = 3,\n\n /**\n * ListItem with block style\n */\n BlockListItem = 4,\n\n /**\n * Wrapper element for context menu\n */\n ContextMenuWrapper = 5,\n\n /**\n * Wrapper element for image edit\n */\n ImageEditWrapper = 6,\n\n /**\n * @deprecated\n */\n TableHorizontalResizer = 7,\n\n /**\n * @deprecated\n */\n TableVerticalResizer = 8,\n\n /**\n * @deprecated\n */\n TableResizerLTR = 9,\n\n /**\n * @deprecated\n */\n TableResizerRTL = 10,\n\n /**\n * @deprecated\n */\n TableSelector = 11,\n\n /**\n * @deprecated\n */\n EmptyLineFormatInSpan = 12,\n}\r\n","/**\n * Represent the types of sources to handle in the Paste Plugin\n */\r\nexport enum CompatibleKnownPasteSourceType {\r\n\n WordDesktop,\n ExcelDesktop,\n ExcelOnline,\n PowerPointDesktop,\n GoogleSheets,\n WacComponents,\n Default,\n SingleImage,\n}\r\n","/**\n * Type of list (numbering or bullet)\n */\r\nexport enum CompatibleListType {\r\n\n /**\n * None list type\n * It means this is not a list\n */\n None = 0,\n\n /**\n * Ordered List type (numbering list)\n * Represented by \"OL\" tag\n */\n Ordered = 1,\n\n /**\n * Unordered List type (bullet list)\n * Represented by \"UL\" tag\n */\n Unordered = 2,\n}\r\n","/**\n * The is essentially an enum represents the type of the node\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n * Values not listed here are deprecated.\n */\r\nexport enum CompatibleNodeType {\r\n\n /**\n * An Element node such as <p> or <div>.\n */\n Element = 1,\n\n /**\n * An Attribute node such as name=\"value\".\n */\n Attribute = 2,\n\n /**\n * The actual Text of Element or Attr.\n */\n Text = 3,\n\n /**\n * A ProcessingInstruction of an XML document such as <?xml-stylesheet ... ?> declaration.\n */\n ProcessingInstruction = 7,\n\n /**\n * A Comment node.\n */\n Comment = 8,\n\n /**\n * A Document node.\n */\n Document = 9,\n\n /**\n * A DocumentType node e.g. <!DOCTYPE html> for HTML5 documents.\n */\n DocumentType = 10,\n\n /**\n * A DocumentFragment node.\n */\n DocumentFragment = 11,\n}\r\n","/**\n * Enum used to control the different types of numbering list\n */\r\nexport enum CompatibleNumberingListType {\r\n\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Numbering triggered by 1.\n */\n Decimal = 1,\n\n /**\n * Numbering triggered by 1-\n */\n DecimalDash = 2,\n\n /**\n * Numbering triggered by 1)\n */\n DecimalParenthesis = 3,\n\n /**\n * Numbering triggered by (1)\n */\n DecimalDoubleParenthesis = 4,\n\n /**\n * Numbering triggered by a.\n */\n LowerAlpha = 5,\n\n /**\n * Numbering triggered by a)\n */\n LowerAlphaParenthesis = 6,\n\n /**\n * Numbering triggered by (a)\n */\n LowerAlphaDoubleParenthesis = 7,\n\n /**\n * Numbering triggered by a-\n */\n LowerAlphaDash = 8,\n\n /**\n * Numbering triggered by A.\n */\n UpperAlpha = 9,\n\n /**\n * Numbering triggered by A)\n */\n UpperAlphaParenthesis = 10,\n\n /**\n * Numbering triggered by (A)\n */\n UpperAlphaDoubleParenthesis = 11,\n\n /**\n * Numbering triggered by A-\n */\n UpperAlphaDash = 12,\n\n /**\n * Numbering triggered by i.\n */\n LowerRoman = 13,\n\n /**\n * Numbering triggered by i)\n */\n LowerRomanParenthesis = 14,\n\n /**\n * Numbering triggered by (i)\n */\n LowerRomanDoubleParenthesis = 15,\n\n /**\n * Numbering triggered by i-\n */\n LowerRomanDash = 16,\n\n /**\n * Numbering triggered by I.\n */\n UpperRoman = 17,\n\n /**\n * Numbering triggered by I)\n */\n UpperRomanParenthesis = 18,\n\n /**\n * Numbering triggered by (I)\n */\n UpperRomanDoubleParenthesis = 19,\n\n /**\n * Numbering triggered by I-\n */\n UpperRomanDash = 20,\n\n /**\n * Maximum value of the enum\n */\n Max = 20,\n}\r\n","/**\n * Enum for paste options\n */\r\nexport enum CompatiblePasteType {\r\n\n /**\n * Default paste behavior\n */\n Normal,\n\n /**\n * Paste only the plain text\n */\n AsPlainText,\n\n /**\n * Apply the current style to pasted content\n */\n MergeFormat,\n\n /**\n * If there is a image uri in the clipboard, paste the content as image element\n */\n AsImage,\n}\r\n","/**\n * Editor plugin event type\n */\r\nexport enum CompatiblePluginEventType {\r\n\n /**\n * HTML KeyDown event\n */\n KeyDown = 0,\n\n /**\n * HTML KeyPress event\n */\n KeyPress = 1,\n\n /**\n * HTML KeyUp event\n */\n KeyUp = 2,\n\n /**\n * HTML Input / TextInput event\n */\n Input = 3,\n\n /**\n * HTML CompositionEnd event\n */\n CompositionEnd = 4,\n\n /**\n * HTML MouseDown event\n */\n MouseDown = 5,\n\n /**\n * HTML MouseUp event\n */\n MouseUp = 6,\n\n /**\n * Content changed event\n */\n ContentChanged = 7,\n\n /**\n * Extract Content with a DOM tree event\n * This event is triggered when getContent() is called with triggerExtractContentEvent = true\n * Plugin can handle this event to remove the UI only markups to return clean HTML\n * by operating on a cloned DOM tree\n */\n ExtractContentWithDom = 8,\n\n /**\n * Before Paste event, provide a chance to change copied content\n */\n BeforeCutCopy = 9,\n\n /**\n * Before Paste event, provide a chance to change paste content\n */\n BeforePaste = 10,\n\n /**\n * Let plugin know editor is ready now\n */\n EditorReady = 11,\n\n /**\n * Let plugin know editor is about to dispose\n */\n BeforeDispose = 12,\n\n /**\n * Pending format state (bold, italic, underline, ... with collapsed selection) is changed\n */\n PendingFormatStateChanged = 13,\n\n /**\n * Scroll event triggered by scroll container\n */\n Scroll = 14,\n\n /**\n * Operating on an entity. See enum EntityOperation for more details about each operation\n */\n EntityOperation = 15,\n\n /**\n * HTML ContextMenu event\n */\n ContextMenu = 16,\n\n /**\n * Editor has entered shadow edit mode\n */\n EnteredShadowEdit = 17,\n\n /**\n * Editor is about to leave shadow edit mode\n */\n LeavingShadowEdit = 18,\n\n /**\n * Content of image is being changed from client side\n */\n EditImage = 19,\n\n /**\n * Content of editor is about to be cleared by SetContent API, handle this event to cache anything you need\n * before it is gone\n */\n BeforeSetContent = 20,\n\n /**\n * Zoom scale value is changed, triggered by Editor.setZoomScale() when set a different scale number\n */\n ZoomChanged = 21,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor changed the selection.\n */\n SelectionChanged = 22,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor content is about to be changed by keyboard event.\n * This is only used by Content Model editing\n */\n BeforeKeyboardEditing = 23,\n}\r\n","/**\r\n * Represent the type of a position\r\n */\r\nexport enum CompatiblePositionType {\r\n\r\n /**\r\n * At the beginning of a node\r\n */\r\n Begin = 0,\r\n\r\n /**\r\n * At the end of a node\r\n */\r\n End = -1,\r\n\r\n /**\r\n * Before a node\r\n */\r\n Before = -2,\r\n\r\n /**\r\n * After a node\r\n */\r\n After = -3,\r\n}\r\n","/**\r\n * Query scope for queryElements() API\r\n */\r\nexport enum CompatibleQueryScope {\r\n\r\n /**\r\n * Query from the whole body of root node. This is default value.\r\n */\r\n Body,\r\n\r\n /**\r\n * Query elements on a given selection (intersect)\r\n * The result element can contain the selection, contain part of selection, or inside selection\r\n */\r\n OnSelection,\r\n\r\n /**\r\n * Query elements inside a given selection only\r\n */\r\n InSelection,\r\n}\r\n","/**\n * Type of all possible regions. Currently we only support region of Table\n */\r\nexport enum CompatibleRegionType {\r\n\n /**\n * Region split by Table\n */\n Table,\n}\r\n","/**\n * Types of Selection Ranges that the SelectionRangeEx can return\n */\r\nexport enum CompatibleSelectionRangeTypes {\r\n\n /**\n * Normal selection range provided by browser.\n */\n Normal,\n /**\n * Selection made inside of a single table.\n */\n TableSelection,\n /**\n * Selection made in a image.\n */\n ImageSelection,\n}\r\n","/**\n * Table format border\n */\r\nexport enum CompatibleTableBorderFormat {\r\n\n /**\n * All border of the table are displayed\n * __ __ __\n * |__|__|__|\n * |__|__|__|\n * |__|__|__|\n */\n DEFAULT,\n\n /**\n * Middle vertical border are not displayed\n * __ __ __\n * |__ __ __|\n * |__ __ __|\n * |__ __ __|\n */\n LIST_WITH_SIDE_BORDERS,\n\n /**\n * All borders except header rows borders are displayed\n * __ __ __\n * __|__|__\n * __|__|__\n */\n NO_HEADER_BORDERS,\n\n /**\n * The left and right border of the table are not displayed\n * __ __ __\n * __|__|__\n * __|__|__\n * __|__|__\n */\n NO_SIDE_BORDERS,\n\n /**\n * Only the borders that divides the header row, first column and externals are displayed\n * __ __ __\n * |__ __ __|\n * | | |\n * |__|__ __|\n */\n FIRST_COLUMN_HEADER_EXTERNAL,\n\n /**\n * The header row has no vertical border, except for the first one\n * The first column has no horizontal border, except for the first one\n * __ __ __\n * |__ __ __\n * | |__|__|\n * | |__|__|\n */\n ESPECIAL_TYPE_1,\n\n /**\n * The header row has no vertical border, except for the first one\n * The only horizontal border of the table is the top and bottom of header row\n * __ __ __\n * |__ __ __\n * | | |\n * | | |\n */\n ESPECIAL_TYPE_2,\n\n /**\n * The only borders are the bottom of header row and the right border of first column\n * __ __ __\n * |\n * |\n */\n ESPECIAL_TYPE_3,\n\n /**\n * No border\n */\n CLEAR,\n}\r\n","/**\r\n * Operations used by editTable() API\r\n */\r\nexport enum CompatibleTableOperation {\r\n\r\n /**\r\n * Insert a row above current row\r\n */\r\n InsertAbove,\r\n\r\n /**\r\n * Insert a row below current row\r\n */\r\n InsertBelow,\r\n\r\n /**\r\n * Insert a column on the left of current column\r\n */\r\n InsertLeft,\r\n\r\n /**\r\n * Insert a column on the right of current column\r\n */\r\n InsertRight,\r\n\r\n /**\r\n * Delete the whole table\r\n */\r\n DeleteTable,\r\n\r\n /**\r\n * Delete current column\r\n */\r\n DeleteColumn,\r\n\r\n /**\r\n * Delete current row\r\n */\r\n DeleteRow,\r\n\r\n /**\r\n * Merge current row with the row above\r\n */\r\n MergeAbove,\r\n\r\n /**\r\n * Merge current row with the row below\r\n */\r\n MergeBelow,\r\n\r\n /**\r\n * Merge current column with the column on the left\r\n */\r\n MergeLeft,\r\n\r\n /**\r\n * Merge current column with the column on the right\r\n */\r\n MergeRight,\r\n\r\n /**\r\n * Merge all selected cells\r\n */\r\n MergeCells,\r\n\r\n /**\r\n * Split current table cell horizontally\r\n */\r\n SplitHorizontally,\r\n\r\n /**\r\n * Split current table cell vertically\r\n */\r\n SplitVertically,\r\n\r\n /**\r\n * Align current table at the center\r\n */\r\n AlignCenter,\r\n\r\n /**\r\n * Align current table at the left\r\n */\r\n AlignLeft,\r\n\r\n /**\r\n * Align current table at the right\r\n */\r\n AlignRight,\r\n\r\n /**\r\n * Align current content table cell at the left\r\n */\r\n AlignCellLeft,\r\n\r\n /**\r\n * Align current content table cell at the center\r\n */\r\n AlignCellCenter,\r\n\r\n /**\r\n * Align current content table cell at the right\r\n */\r\n AlignCellRight,\r\n\r\n /**\r\n * Align current content table cell at the top\r\n */\r\n AlignCellTop,\r\n\r\n /**\r\n * Align current table cell at the middle\r\n */\r\n AlignCellMiddle,\r\n\r\n /**\r\n * Align current table cell at the bottom\r\n */\r\n AlignCellBottom,\r\n}\r\n","export { CompatibleAlignment } from './Alignment'\r\nexport { CompatibleBulletListType } from './BulletListType'\r\nexport { CompatibleCapitalization } from './Capitalization'\r\nexport { CompatibleChangeSource } from './ChangeSource'\r\nexport { CompatibleClearFormatMode } from './ClearFormatMode'\r\nexport { CompatibleColorTransformDirection } from './ColorTransformDirection'\r\nexport { CompatibleContentPosition } from './ContentPosition'\r\nexport { CompatibleContentTypePrefix, CompatibleContentType } from './ContentType'\r\nexport { CompatibleDarkModeDatasetNames } from './DarkModeDatasetNames'\r\nexport { CompatibleDefinitionType } from './DefinitionType'\r\nexport { CompatibleDelimiterClasses } from './DelimiterClasses'\r\nexport { CompatibleDirection } from './Direction'\r\nexport { CompatibleDocumentCommand } from './DocumentCommand'\r\nexport { CompatibleDocumentPosition } from './DocumentPosition'\r\nexport { CompatibleEntityClasses } from './EntityClasses'\r\nexport { CompatibleEntityOperation } from './EntityOperation'\r\nexport { CompatibleExperimentalFeatures } from './ExperimentalFeatures'\r\nexport { CompatibleFontSizeChange } from './FontSizeChange'\r\nexport { CompatibleGetContentMode } from './GetContentMode'\r\nexport { CompatibleImageEditOperation } from './ImageEditOperation'\r\nexport { CompatibleIndentation } from './Indentation'\r\nexport { CompatibleKeys } from './Keys'\r\nexport { CompatibleKnownCreateElementDataIndex } from './KnownCreateElementDataIndex'\r\nexport { CompatibleKnownPasteSourceType } from './KnownPasteSourceType'\r\nexport { CompatibleListType } from './ListType'\r\nexport { CompatibleNodeType } from './NodeType'\r\nexport { CompatibleNumberingListType } from './NumberingListType'\r\nexport { CompatiblePasteType } from './PasteType'\r\nexport { CompatiblePluginEventType } from './PluginEventType'\r\nexport { CompatiblePositionType } from './PositionType'\r\nexport { CompatibleQueryScope } from './QueryScope'\r\nexport { CompatibleRegionType } from './RegionType'\r\nexport { CompatibleSelectionRangeTypes } from './SelectionRangeTypes'\r\nexport { CompatibleTableBorderFormat } from './TableBorderFormat'\r\nexport { CompatibleTableOperation } from './TableOperation'\r\n","export * from './browser/index';\nexport * from './corePluginState/index';\nexport * from './compatibleEnum/index';\nexport * from './event/index';\nexport * from './interface/index';\nexport * from './type/index';\n","/**\r\n * enum for setting block alignment, used by setAlignment API\r\n */\r\nexport const enum Alignment {\r\n /**\r\n * Align left\r\n */\r\n Left,\r\n\r\n /**\r\n * Align center\r\n */\r\n Center,\r\n\r\n /**\r\n * Align right\r\n */\r\n Right,\r\n}\r\n","/**\n * Enum used to control the different types of bullet list\n */\nexport const enum BulletListType {\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Bullet triggered by *\n */\n Disc = 1,\n\n /**\n * Bullet triggered by -\n */\n Dash = 2,\n\n /**\n * Bullet triggered by --\n */\n Square = 3,\n\n /**\n * Bullet triggered by >\n */\n ShortArrow = 4,\n\n /**\n * Bullet triggered by ->\n */\n LongArrow = 5,\n\n /**\n * Bullet triggered by =>\n */\n UnfilledArrow = 6,\n\n /**\n * Bullet triggered by —\n */\n Hyphen = 7,\n\n /**\n * Bullet triggered by -->\n */\n DoubleLongArrow = 8,\n\n /**\n * Bullet type circle\n */\n Circle = 9,\n\n /**\n * Maximum value of the enum\n */\n Max = 9,\n}\n","/**\n * The enum used for controlling the capitalization of text.\n * Used by changeCapitalization API\n */\nexport const enum Capitalization {\n /**\n * Transforms the first character after punctuation mark followed by space\n * to uppercase and the rest of characters to lowercase.\n */\n Sentence = 'sentence',\n\n /**\n * Transforms all characters to lowercase\n */\n Lowercase = 'lowercase',\n\n /**\n * Transforms all characters to uppercase\n */\n Uppercase = 'uppercase',\n\n /**\n * Transforms the first character of each word to uppercase\n */\n CapitalizeEachWord = 'capitalize',\n}\n","/**\r\n * Possible change sources. Here are the predefined sources.\r\n * It can also be other string if the change source can't fall into these sources.\r\n */\r\nexport const enum ChangeSource {\r\n /**\r\n * Content changed by auto link\r\n */\r\n AutoLink = 'AutoLink',\r\n\r\n /**\r\n * Content changed by create link\r\n */\r\n CreateLink = 'CreateLink',\r\n\r\n /**\r\n * Content changed by format\r\n */\r\n Format = 'Format',\r\n\r\n /**\r\n * Content changed by image resize\r\n */\r\n ImageResize = 'ImageResize',\r\n\r\n /**\r\n * Content changed by paste\r\n */\r\n Paste = 'Paste',\r\n\r\n /**\r\n * Content changed by setContent API\r\n */\r\n SetContent = 'SetContent',\r\n\r\n /**\r\n * Content changed by cut operation\r\n */\r\n Cut = 'Cut',\r\n\r\n /**\r\n * Content changed by drag & drop operation\r\n */\r\n Drop = 'Drop',\r\n\r\n /**\r\n * Insert a new entity into editor\r\n */\r\n InsertEntity = 'InsertEntity',\r\n\r\n /**\r\n * Editor is switched to dark mode, content color is changed\r\n */\r\n SwitchToDarkMode = 'SwitchToDarkMode',\r\n\r\n /**\r\n * Editor is switched to light mode, content color is changed\r\n */\r\n SwitchToLightMode = 'SwitchToLightMode',\r\n\r\n /**\r\n * List chain reorganized numbers of lists\r\n */\r\n ListChain = 'ListChain',\r\n\r\n /**\r\n * Keyboard event, used by Content Model.\r\n * Data of this event will be the key code number\r\n */\r\n Keyboard = 'Keyboard',\r\n}\r\n","/**\n * Represents the strategy to clear the format of the current editor selection\n */\nexport const enum ClearFormatMode {\n /**\n * Inline format. Remove text format.\n */\n Inline,\n\n /**\n * BLock format. Remove text and structure format of the block.\n */\n Block,\n\n /**\n * Detect Inline or Block format based on the current editor selector.\n */\n AutoDetect,\n}\n","/**\n * Represents the mode of color transformation\n */\nexport const enum ColorTransformDirection {\n /**\n * Transform from light to dark\n */\n LightToDark = 0,\n\n /**\n * Transform from dark to light\n */\n DarkToLight = 1,\n}\n","/**\r\n * The position. Mostly used for content insertion and traversing\r\n * On insertion, we will need to specify where we want the content to be placed (begin, end, selection or outside)\r\n * On content traversing, we will need to specify the start position of traversing\r\n */\r\nexport const enum ContentPosition {\r\n /**\r\n * Begin of the container\r\n */\r\n Begin,\r\n\r\n /**\r\n * End of the container\r\n */\r\n End,\r\n\r\n /**\r\n * End of the content div domain.\r\n */\r\n DomEnd,\r\n\r\n /**\r\n * Selection start\r\n */\r\n SelectionStart,\r\n\r\n /**\r\n * Outside of editor\r\n */\r\n Outside,\r\n\r\n /**\r\n * Manually defined range\r\n */\r\n Range,\r\n}\r\n","/**\n * Prefix of content types\n */\nexport const enum ContentTypePrefix {\n /**\n * Text type prefix\n */\n Text = 'text/',\n\n /**\n * Image type prefix\n */\n Image = 'image/',\n}\n\n/**\n * Known content types\n */\nexport const enum ContentType {\n /**\n * Plain text content type\n */\n PlainText = 'text/plain',\n\n /**\n * HTML content type\n */\n HTML = 'text/html',\n}\n","/**\n * @deprecated\n * Constants string for dataset names used by dark mode\n */\nexport const enum DarkModeDatasetNames {\n /**\n * Original style text color\n */\n OriginalStyleColor = 'ogsc',\n\n /**\n * Original style background color\n */\n OriginalStyleBackgroundColor = 'ogsb',\n\n /**\n * Original attribute text color\n */\n OriginalAttributeColor = 'ogac',\n\n /**\n * Original attribute background color\n */\n OriginalAttributeBackgroundColor = 'ogab',\n}\n","/**\n * Types of definitions, used by Definition type\n */\nexport const enum DefinitionType {\n /**\n * Boolean type definition, represents a boolean type value\n */\n Boolean,\n\n /**\n * Number type definition, represents a number type value\n */\n Number,\n\n /**\n * String type definition, represents a string type value\n */\n String,\n\n /**\n * Array type definition, represents an array with a given item type\n */\n Array,\n\n /**\n * Object type definition, represents an object with the given property types\n */\n Object,\n\n /**\n * Customize type definition, represents a customized type with a validator function\n */\n Customize,\n}\n","/**\n * Class names for Delimiter\n */\nexport const enum DelimiterClasses {\n /**\n * Class name to specify this delimiter is before an entity\n */\n DELIMITER_BEFORE = 'entityDelimiterBefore',\n\n /**\n * Class name to specify this delimiter is after an entity\n */\n DELIMITER_AFTER = 'entityDelimiterAfter',\n}\n","/**\r\n * enum for setting block direction, used by setDirection API\r\n */\r\nexport const enum Direction {\r\n /**\r\n * Left to right\r\n */\r\n LeftToRight,\r\n\r\n /**\r\n * Right to left\r\n */\r\n RightToLeft,\r\n}\r\n","/**\n * Command strings for Document.execCommand() API\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand\n */\nexport const enum DocumentCommand {\n /**\n * Changes the browser auto-link behavior (Internet Explorer only)\n */\n AutoUrlDetect = 'AutoUrlDetect',\n\n /**\n * Changes the document background color. In styleWithCss mode, it affects the background color of the containing block instead.\n * This requires a <color> value string to be passed in as a value argument. Note that Internet Explorer uses this to set the\n * text background color.\n */\n BackColor = 'backColor',\n\n /**\n * Toggles bold on/off for the selection or at the insertion point. Internet Explorer uses the <strong> tag instead of <b>.\n */\n Bold = 'bold',\n\n /**\n * Clears all authentication credentials from the cache.\n */\n ClearAuthenticationCache = 'ClearAuthenticationCache',\n\n /**\n * Makes the content document either read-only or editable. This requires a boolean true/false as the value argument.\n * (Not supported by Internet Explorer.)\n */\n ContentReadOnly = 'contentReadOnly',\n\n /**\n * Copies the current selection to the clipboard. Conditions of having this behavior enabled vary from one browser to another,\n * and have evolved over time. Check the compatibility table to determine if you can use it in your case.\n */\n Copy = 'copy',\n\n /**\n * Creates an hyperlink from the selection, but only if there is a selection. Requires a URI string as a value argument for the\n * hyperlink's href. The URI must contain at least a single character, which may be whitespace.\n * (Internet Explorer will create a link with a null value.)\n */\n CreateLink = 'createLink',\n\n /**\n * Removes the current selection and copies it to the clipboard. When this behavior is enabled varies between browsers,\n * and its conditions have evolved over time. Check the compatibility table for usage details.\n */\n Cut = 'cut',\n\n /**\n * Adds a <small> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n DecreaseFontSize = 'decreaseFontSize',\n\n /**\n * Changes the paragraph separator used when new paragraphs are created in editable text regions. See Differences in markup\n * generation for more details.\n */\n DefaultParagraphSeparator = 'defaultParagraphSeparator',\n\n /**\n * Deletes the current selection.\n */\n Delete = 'delete',\n\n /**\n * Enables or disables the table row/column insertion and deletion controls. (Not supported by Internet Explorer.)\n */\n EnableInlineTableEditing = 'enableInlineTableEditing',\n\n /**\n * Enables or disables the resize handles on images and other resizable objects. (Not supported by Internet Explorer.)\n */\n EnableObjectResizing = 'enableObjectResizing',\n\n /**\n * Changes the font name for the selection or at the insertion point. This requires a font name string (like \"Arial\")\n * as a value argument.\n */\n FontName = 'fontName',\n\n /**\n * Changes the font size for the selection or at the insertion point. This requires an integer from 1-7 as a value argument.\n */\n FontSize = 'fontSize',\n\n /**\n * Changes a font color for the selection or at the insertion point. This requires a hexadecimal color value string\n * as a value argument.\n */\n ForeColor = 'foreColor',\n\n /**\n * Adds an HTML block-level element around the line containing the current selection, replacing the block element containing\n * the line if one exists (in Firefox, <blockquote> is the exception — it will wrap any containing block element).\n * Requires a tag-name string as a value argument. Virtually all block-level elements can be used.\n * (Internet Explorer supports only heading tags H1–H6, ADDRESS, and PRE, which must be wrapped in angle brackets, such as \"<H1>\".)\n */\n FormatBlock = 'formatBlock',\n\n /**\n * Deletes the character ahead of the cursor's position, identical to hitting the Delete key on a Windows keyboard.\n */\n ForwardDelete = 'forwardDelete',\n\n /**\n * Adds a heading element around a selection or insertion point line. Requires the tag-name strings a value argument (i.e. \"H1\", \"H6\").\n * (Not supported by Internet Explorer and Safari.)\n */\n Heading = 'heading',\n\n /**\n * Changes the background color for the selection or at the insertion point. Requires a color value string as a value argument.\n * useCSS must be true for this to function. (Not supported by Internet Explorer.)\n */\n HiliteColor = 'hiliteColor',\n\n /**\n * Adds a <big> tag around the selection or at the insertion point. (Not supported by Internet Explorer.)\n */\n IncreaseFontSize = 'increaseFontSize',\n\n /**\n * Indents the line containing the selection or insertion point. In Firefox, if the selection spans multiple lines at different\n * levels of indentation, only the least indented lines in the selection will be indented.\n */\n Indent = 'indent',\n\n /**\n * Controls whether the Enter key inserts a <br> element, or splits the current block element into two.\n * (Not supported by Internet Explorer.)\n */\n InsertBrOnReturn = 'insertBrOnReturn',\n\n /**\n * Inserts a <hr> element at the insertion point, or replaces the selection with it.\n */\n InsertHorizontalRule = 'insertHorizontalRule',\n\n /**\n * Inserts an HTML string at the insertion point (deletes selection). Requires a valid HTML string as a value argument.\n * (Not supported by Internet Explorer.)\n */\n InsertHTML = 'insertHTML',\n\n /**\n * Inserts an image at the insertion point (deletes selection). Requires a URL string for the image's src as a value argument.\n * The requirements for this string are the same as createLink.\n */\n InsertImage = 'insertImage',\n\n /**\n * Creates a numbered ordered list for the selection or at the insertion point.\n */\n InsertOrderedList = 'insertOrderedList',\n\n /**\n * Creates a bulleted unordered list for the selection or at the insertion point.\n */\n InsertUnorderedList = 'insertUnorderedList',\n\n /**\n * Inserts a paragraph around the selection or the current line.\n * (Internet Explorer inserts a paragraph at the insertion point and deletes the selection.)\n */\n InsertParagraph = 'insertParagraph',\n\n /**\n * Inserts the given plain text at the insertion point (deletes selection).\n */\n InsertText = 'insertText',\n\n /**\n * Toggles italics on/off for the selection or at the insertion point.\n * (Internet Explorer uses the <em> element instead of <i>.)\n */\n Italic = 'italic',\n\n /**\n * Centers the selection or insertion point.\n */\n JustifyCenter = 'justifyCenter',\n\n /**\n * Justifies the selection or insertion point.\n */\n JustifyFull = 'justifyFull',\n\n /**\n * Justifies the selection or insertion point to the left.\n */\n JustifyLeft = 'justifyLeft',\n\n /**\n * Right-justifies the selection or the insertion point.\n */\n JustifyRight = 'justifyRight',\n\n /**\n * Outdents the line containing the selection or insertion point.\n */\n Outdent = 'outdent',\n\n /**\n * Pastes the clipboard contents at the insertion point (replaces current selection). Disabled for web content. See [1].\n */\n Paste = 'paste',\n\n /**\n * Redoes the previous undo command.\n */\n Redo = 'redo',\n\n /**\n * Removes all formatting from the current selection.\n */\n RemoveFormat = 'removeFormat',\n\n /**\n * Selects all of the content of the editable region.\n */\n SelectAll = 'selectAll',\n\n /**\n * Toggles strikethrough on/off for the selection or at the insertion point.\n */\n StrikeThrough = 'strikeThrough',\n\n /**\n * Toggles subscript on/off for the selection or at the insertion point.\n */\n Subscript = 'subscript',\n\n /**\n * Toggles superscript on/off for the selection or at the insertion point.\n */\n Superscript = 'superscript',\n\n /**\n * Toggles underline on/off for the selection or at the insertion point.\n */\n Underline = 'underline',\n\n /**\n * Undoes the last executed command.\n */\n Undo = 'undo',\n\n /**\n * Removes the anchor element from a selected hyperlink.\n */\n Unlink = 'unlink',\n\n /**\n * Replaces the useCSS command. true modifies/generates style attributes in markup, false generates presentational elements.\n */\n StyleWithCSS = 'styleWithCSS',\n}\n","/**\n * The is essentially an enum representing result from browser compareDocumentPosition API\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n */\nexport const enum DocumentPosition {\n /**\n * Same node\n */\n Same = 0,\n\n /**\n * Node is disconnected from document\n */\n Disconnected = 1,\n\n /**\n * Node is preceding the comparing node\n */\n Preceding = 2,\n\n /**\n * Node is following the comparing node\n */\n Following = 4,\n\n /**\n * Node contains the comparing node\n */\n Contains = 8,\n\n /**\n * Node is contained by the comparing node\n */\n ContainedBy = 16,\n}\n","/**\n * CSS Class names for Entity\n */\nexport const enum EntityClasses {\n /**\n * Class name to specify this is an entity\n */\n ENTITY_INFO_NAME = '_Entity',\n\n /**\n * Class name to specify the type of an entity\n */\n ENTITY_TYPE_PREFIX = '_EType_',\n\n /**\n * Class name to specify the ID of an entity\n */\n ENTITY_ID_PREFIX = '_EId_',\n\n /**\n * Class name to specify if the entity is readonly\n */\n ENTITY_READONLY_PREFIX = '_EReadonly_',\n}\n","/**\n * Define possible operations to an entity\n */\nexport const enum EntityOperation {\n /**\n * Notify plugins that there is a new plugin was added into editor.\n * Plugin can handle this event to entity hydration.\n * This event will be only fired once for each entity DOM node.\n * After undo, or copy/paste, since new DOM nodes were added, this event will be fired\n * for those entities represented by newly added nodes.\n */\n NewEntity,\n\n /**\n * Notify plugins that user is clicking target to an entity\n */\n Click,\n\n /**\n * Notify plugins that user is triggering context menu to an entity\n */\n ContextMenu,\n\n /**\n * Notify plugins that user is escaping from an entity by pressing ESC key\n */\n Escape,\n\n /**\n * Notify plugins that user is removing an entity from its start position using DELETE key\n */\n RemoveFromStart,\n\n /**\n * Notify plugins that user is remove an entity from its end position using BACKSPACE key\n */\n RemoveFromEnd,\n\n /**\n * Notify plugins that an entity is being overwritten.\n * This can be caused by key in, cut, paste, delete, backspace ... on a selection\n * which contains some entities.\n */\n Overwrite,\n\n /**\n * Notify plugins that an entity is being partially overwritten.\n * This happens when user selected part of the entity then do key press, or cut, paste, delete, backspace, ...\n */\n PartialOverwrite,\n\n /**\n * Notify plugins that editor is generating HTML content for save.\n * Plugin should use this event to remove any temporary content, and only leave DOM nodes that\n * should be saved as HTML string.\n * This event will provide a cloned DOM tree for each entity, do NOT compare the DOM nodes with cached nodes\n * because it will always return false.\n */\n ReplaceTemporaryContent,\n\n /**\n * @deprecated\n */\n AddShadowRoot,\n\n /**\n * @deprecated\n */\n RemoveShadowRoot,\n\n /**\n * Notify plugins that a new entity state need to be updated to an entity.\n * This is normally happened when user undo/redo the content with an entity snapshot added by a plugin that handles entity\n */\n UpdateEntityState,\n}\n","/**\n * Experimental feature flags\n */\nexport const enum ExperimentalFeatures {\n // #region Graduated and deprecated features.\n // These features will be removed in next major release\n /**\n * @deprecated This feature is always enabled\n */\n NewIndentation = 'NewIndentation',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewBullet = 'NewBullet',\n\n /**\n * @deprecated This feature is always enabled\n */\n NewNumbering = 'NewNumbering',\n\n /**\n * @deprecated This feature is always enabled\n */\n ListChain = 'ListChain',\n\n /**\n * @deprecated This feature is always enabled\n */\n MergePastedLine = 'MergePastedLine',\n\n /**\n * @deprecated This feature is always enabled\n */\n SingleDirectionResize = 'SingleDirectionResize',\n\n /**\n * @deprecated This feature is always enabled\n */\n PasteWithLinkPreview = 'PasteWithLinkPreview',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageRotate = 'ImageRotate',\n\n /**\n * @deprecated This feature is always enabled\n */\n ImageCrop = 'ImageCrop',\n\n /**\n * @deprecated This feature is always enabled\n * Check if the element has a style attribute, if not, apply the default format\n */\n AlwaysApplyDefaultFormat = 'AlwaysApplyDefaultFormat',\n\n /**\n * @deprecated This feature can be enabled/disabled using Paste Plugin contructor param\n * Paste the Html instead of the Img when the Html Body only have one IMG Child node\n */\n ConvertSingleImageBody = 'ConvertSingleImageBody',\n\n /**\n * @deprecated This feature is always enabled\n * Align table elements to left, center and right using setAlignment API\n */\n TableAlignment = 'TableAlignment',\n\n /**\n * @deprecated this feature is always enabled\n * Provide a circular resize handles that adaptive the number od handles to the size of the image\n */\n AdaptiveHandlesResizer = 'AdaptiveHandlesResizer',\n\n /**\n * @deprecated this feature is always disabled\n * Automatically transform -- into hyphen, if typed between two words.\n */\n AutoHyphen = 'AutoHyphen',\n\n /**\n * @deprecated this feature is always disabled\n * Use pending format strategy to do style based format, e.g. Font size, Color.\n * With this feature enabled, we don't need to insert temp ZeroWidthSpace character to hold pending format\n * when selection is collapsed. Instead, we will hold the pending format in memory and only apply it when type something\n */\n PendingStyleBasedFormat = 'PendingStyleBasedFormat',\n\n /**\n * @deprecated this feature is always disabled\n * Normalize list to make sure it can be displayed correctly in other client\n * e.g. We will move list items with \"display: block\" into previous list item and change tag to be DIV\n */\n NormalizeList = 'NormalizeList',\n\n /**\n * @deprecated this feature is always enabled\n * When a html image is selected, the selected image data will be stored by editor core.\n */\n ImageSelection = 'ImageSelection',\n\n /**\n * @deprecated this feature is always enabled\n * Use variable-based dark mode solution rather than dataset-based solution.\n * When enable this feature, need to pass in a DarkModelHandler object to each call of setColor and applyFormat\n * if you need them work for dark mode\n */\n VariableBasedDarkColor = 'VariableBasedDarkColor',\n\n /**\n * @deprecated this feature is always enabled\n * Align list elements elements to left, center and right using setAlignment API\n */\n ListItemAlignment = 'ListItemAlignment',\n\n /**\n * @deprecated\n */\n DefaultFormatInSpan = 'DefaultFormatInSpan',\n\n /**\n * @deprecated\n */\n DefaultFormatOnContainer = 'DefaultFormatOnContainer',\n\n //#endregion\n\n /**\n * Provide additional Tab Key Features. Requires Text Features Content Editable Features\n */\n TabKeyTextFeatures = 'TabKeyTextFeatures',\n\n /**\n * Trigger formatting by a especial characters. Ex: (A), 1. i).\n */\n AutoFormatList = 'AutoFormatList',\n\n /**\n * With this feature enabled, when writing back a list item we will re-use all\n * ancestor list elements, even if they don't match the types currently in the\n * listTypes array for that item. The only list that we will ensure is correct\n * is the one closest to the item.\n */\n ReuseAllAncestorListElements = 'ReuseAllAncestorListElements',\n\n /**\n * Reuse existing DOM structure if possible when convert Content Model back to DOM tree\n */\n ReusableContentModel = 'ReusableContentModel',\n\n /**\n * Handle keyboard editing event with Content Model\n */\n EditWithContentModel = 'EditWithContentModel',\n\n /**\n * Delete table with Backspace key with the whole was selected with table selector\n */\n DeleteTableWithBackspace = 'DeleteTableWithBackspace',\n\n /**\n * Add entities around a Read Only Inline entity to prevent cursor to be hidden when cursor is next of it.\n */\n InlineEntityReadOnlyDelimiters = 'InlineEntityReadOnlyDelimiters',\n\n /**\n * Paste with Content model\n */\n ContentModelPaste = 'ContentModelPaste',\n\n /**\n * Disable list chain functionality\n */\n DisableListChain = 'DisableListChain',\n}\n","/**\r\n * The enum used for increase or decrease font size\r\n * Used by setFontSize API\r\n */\r\nexport const enum FontSizeChange {\r\n /**\r\n * Increase font size\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease font size\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Represents a mode number to indicate what kind of content to retrieve when call Editor.getContent()\n */\nexport const enum GetContentMode {\n /**\n * The clean content without any temporary content only for editor.\n * This is the default value. Call to Editor.getContent() with trigger an ExtractContentWithDom event\n * so that plugins can remove their temporary content, and will return the HTML content\n * which is ready for save to storage.\n */\n CleanHTML = 0,\n\n /**\n * Retrieve the raw HTML string in current editor. Temporary content will be included.\n */\n RawHTMLOnly = 1,\n\n /**\n * Retrieve the raw HTML string in current editor with a selection marker. This can be used for\n * save current editor state and call to SetContent with this result can fully restore editor state\n * including current selection\n */\n RawHTMLWithSelection = 2,\n\n /**\n * Get plain text content only, all format will be ignored\n */\n PlainText,\n\n /**\n * A fast way to get plain text content, the line-end positions may not be exactly same with HTML content,\n * but the text content should be the same. This is used for quickly retrieve text content and check\n * text only\n */\n PlainTextFast,\n}\n","/**\n * Operation flags for ImageEdit plugin\n */\nexport const enum ImageEditOperation {\n /**\n * No operation\n */\n None = 0,\n\n /**\n * Resize image from corner ( horizontal and vertical resize)\n */\n CornerResize = 1,\n\n /**\n * Resize image from side ( either horizontal or vertical resize)\n */\n SideResize = 2,\n\n /**\n * Image resize\n */\n Resize = CornerResize | SideResize,\n\n /**\n * Image rotate\n */\n Rotate = 4,\n\n /**\n * Image resize and rotate\n */\n ResizeAndRotate = Resize | Rotate,\n\n /**\n * Image crop\n */\n Crop = 8,\n\n /**\n * All operations\n */\n All = ResizeAndRotate | Crop,\n}\n","/**\r\n * The enum used for increase or decrease indentation of a block\r\n * Used by setIndentation API\r\n */\r\nexport const enum Indentation {\r\n /**\r\n * Increase indentation\r\n */\r\n Increase,\r\n\r\n /**\r\n * Decrease indentation\r\n */\r\n Decrease,\r\n}\r\n","/**\n * Key numbers common used keys\n */\nexport const enum Keys {\n NULL = 0,\n BACKSPACE = 8,\n TAB = 9,\n ENTER = 13,\n SHIFT = 16,\n CTRL_LEFT = 17,\n ALT = 18,\n ESCAPE = 27,\n SPACE = 32,\n PAGEUP = 33,\n END = 35,\n HOME = 36,\n LEFT = 37,\n UP = 38,\n RIGHT = 39,\n DOWN = 40,\n PRINT_SCREEN = 44,\n DELETE = 46,\n /**\n * @deprecated Just for backward compatibility\n */\n EIGHT_ASTIRISK = 56,\n EIGHT_ASTERISK = 56,\n B = 66,\n I = 73,\n U = 85,\n Y = 89,\n Z = 90,\n META_LEFT = 91,\n COMMA = 188,\n DASH_UNDERSCORE = 189,\n PERIOD = 190,\n /**\n * @deprecated Just for backward compatibility\n */\n FORWARDSLASH = 191,\n FORWARD_SLASH = 191,\n GRAVE_TILDE = 192,\n\n /**\n * Keys below are non-standard, and should be used in ContentEditFeatures only\n */\n CONTENTCHANGED = 0x101,\n RANGE = 0x102,\n\n Ctrl = 0x1000,\n Meta = 0x2000,\n Shift = 0x4000,\n}\n","/**\n * Index of known CreateElementData used by createElement function\n */\nexport const enum KnownCreateElementDataIndex {\n /**\n * Set a none value to help createElement function ignore falsy value\n */\n None = 0,\n\n /**\n * An empty line without format\n */\n EmptyLine = 1,\n\n /**\n * Wrapper for blockquote\n */\n BlockquoteWrapper = 2,\n\n /**\n * Temp DIV for copy/paste\n */\n CopyPasteTempDiv = 3,\n\n /**\n * ListItem with block style\n */\n BlockListItem = 4,\n\n /**\n * Wrapper element for context menu\n */\n ContextMenuWrapper = 5,\n\n /**\n * Wrapper element for image edit\n */\n ImageEditWrapper = 6,\n\n /**\n * @deprecated\n */\n TableHorizontalResizer = 7,\n\n /**\n * @deprecated\n */\n TableVerticalResizer = 8,\n\n /**\n * @deprecated\n */\n TableResizerLTR = 9,\n\n /**\n * @deprecated\n */\n TableResizerRTL = 10,\n\n /**\n * @deprecated\n */\n TableSelector = 11,\n\n /**\n * @deprecated\n */\n EmptyLineFormatInSpan = 12,\n}\n","/**\n * Represent the types of sources to handle in the Paste Plugin\n */\nexport const enum KnownPasteSourceType {\n WordDesktop,\n ExcelDesktop,\n ExcelOnline,\n PowerPointDesktop,\n GoogleSheets,\n WacComponents,\n Default,\n SingleImage,\n}\n","/**\n * Type of list (numbering or bullet)\n */\nexport const enum ListType {\n /**\n * None list type\n * It means this is not a list\n */\n None = 0,\n\n /**\n * Ordered List type (numbering list)\n * Represented by \"OL\" tag\n */\n Ordered = 1,\n\n /**\n * Unordered List type (bullet list)\n * Represented by \"UL\" tag\n */\n Unordered = 2,\n}\n","/**\n * The is essentially an enum represents the type of the node\n * https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n * Values not listed here are deprecated.\n */\nexport const enum NodeType {\n /**\n * An Element node such as <p> or <div>.\n */\n Element = 1,\n\n /**\n * An Attribute node such as name=\"value\".\n */\n Attribute = 2,\n\n /**\n * The actual Text of Element or Attr.\n */\n Text = 3,\n\n /**\n * A ProcessingInstruction of an XML document such as <?xml-stylesheet ... ?> declaration.\n */\n ProcessingInstruction = 7,\n\n /**\n * A Comment node.\n */\n Comment = 8,\n\n /**\n * A Document node.\n */\n Document = 9,\n\n /**\n * A DocumentType node e.g. <!DOCTYPE html> for HTML5 documents.\n */\n DocumentType = 10,\n\n /**\n * A DocumentFragment node.\n */\n DocumentFragment = 11,\n}\n","/**\n * Enum used to control the different types of numbering list\n */\nexport const enum NumberingListType {\n /**\n * Minimum value of the enum\n */\n Min = 1,\n\n /**\n * Numbering triggered by 1.\n */\n Decimal = 1,\n\n /**\n * Numbering triggered by 1-\n */\n DecimalDash = 2,\n\n /**\n * Numbering triggered by 1)\n */\n DecimalParenthesis = 3,\n\n /**\n * Numbering triggered by (1)\n */\n DecimalDoubleParenthesis = 4,\n\n /**\n * Numbering triggered by a.\n */\n LowerAlpha = 5,\n\n /**\n * Numbering triggered by a)\n */\n LowerAlphaParenthesis = 6,\n\n /**\n * Numbering triggered by (a)\n */\n LowerAlphaDoubleParenthesis = 7,\n\n /**\n * Numbering triggered by a-\n */\n LowerAlphaDash = 8,\n\n /**\n * Numbering triggered by A.\n */\n UpperAlpha = 9,\n\n /**\n * Numbering triggered by A)\n */\n UpperAlphaParenthesis = 10,\n\n /**\n * Numbering triggered by (A)\n */\n UpperAlphaDoubleParenthesis = 11,\n\n /**\n * Numbering triggered by A-\n */\n UpperAlphaDash = 12,\n\n /**\n * Numbering triggered by i.\n */\n LowerRoman = 13,\n\n /**\n * Numbering triggered by i)\n */\n LowerRomanParenthesis = 14,\n\n /**\n * Numbering triggered by (i)\n */\n LowerRomanDoubleParenthesis = 15,\n\n /**\n * Numbering triggered by i-\n */\n LowerRomanDash = 16,\n\n /**\n * Numbering triggered by I.\n */\n UpperRoman = 17,\n\n /**\n * Numbering triggered by I)\n */\n UpperRomanParenthesis = 18,\n\n /**\n * Numbering triggered by (I)\n */\n UpperRomanDoubleParenthesis = 19,\n\n /**\n * Numbering triggered by I-\n */\n UpperRomanDash = 20,\n\n /**\n * Maximum value of the enum\n */\n Max = 20,\n}\n","/**\n * Enum for paste options\n */\nexport const enum PasteType {\n /**\n * Default paste behavior\n */\n Normal,\n\n /**\n * Paste only the plain text\n */\n AsPlainText,\n\n /**\n * Apply the current style to pasted content\n */\n MergeFormat,\n\n /**\n * If there is a image uri in the clipboard, paste the content as image element\n */\n AsImage,\n}\n","/**\n * Editor plugin event type\n */\nexport const enum PluginEventType {\n /**\n * HTML KeyDown event\n */\n KeyDown = 0,\n\n /**\n * HTML KeyPress event\n */\n KeyPress = 1,\n\n /**\n * HTML KeyUp event\n */\n KeyUp = 2,\n\n /**\n * HTML Input / TextInput event\n */\n Input = 3,\n\n /**\n * HTML CompositionEnd event\n */\n CompositionEnd = 4,\n\n /**\n * HTML MouseDown event\n */\n MouseDown = 5,\n\n /**\n * HTML MouseUp event\n */\n MouseUp = 6,\n\n /**\n * Content changed event\n */\n ContentChanged = 7,\n\n /**\n * Extract Content with a DOM tree event\n * This event is triggered when getContent() is called with triggerExtractContentEvent = true\n * Plugin can handle this event to remove the UI only markups to return clean HTML\n * by operating on a cloned DOM tree\n */\n ExtractContentWithDom = 8,\n\n /**\n * Before Paste event, provide a chance to change copied content\n */\n BeforeCutCopy = 9,\n\n /**\n * Before Paste event, provide a chance to change paste content\n */\n BeforePaste = 10,\n\n /**\n * Let plugin know editor is ready now\n */\n EditorReady = 11,\n\n /**\n * Let plugin know editor is about to dispose\n */\n BeforeDispose = 12,\n\n /**\n * Pending format state (bold, italic, underline, ... with collapsed selection) is changed\n */\n PendingFormatStateChanged = 13,\n\n /**\n * Scroll event triggered by scroll container\n */\n Scroll = 14,\n\n /**\n * Operating on an entity. See enum EntityOperation for more details about each operation\n */\n EntityOperation = 15,\n\n /**\n * HTML ContextMenu event\n */\n ContextMenu = 16,\n\n /**\n * Editor has entered shadow edit mode\n */\n EnteredShadowEdit = 17,\n\n /**\n * Editor is about to leave shadow edit mode\n */\n LeavingShadowEdit = 18,\n\n /**\n * Content of image is being changed from client side\n */\n EditImage = 19,\n\n /**\n * Content of editor is about to be cleared by SetContent API, handle this event to cache anything you need\n * before it is gone\n */\n BeforeSetContent = 20,\n\n /**\n * Zoom scale value is changed, triggered by Editor.setZoomScale() when set a different scale number\n */\n ZoomChanged = 21,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor changed the selection.\n */\n SelectionChanged = 22,\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor content is about to be changed by keyboard event.\n * This is only used by Content Model editing\n */\n BeforeKeyboardEditing = 23,\n}\n","/**\r\n * Represent the type of a position\r\n */\r\nexport const enum PositionType {\r\n /**\r\n * At the beginning of a node\r\n */\r\n Begin = 0,\r\n\r\n /**\r\n * At the end of a node\r\n */\r\n End = -1,\r\n\r\n /**\r\n * Before a node\r\n */\r\n Before = -2,\r\n\r\n /**\r\n * After a node\r\n */\r\n After = -3,\r\n}\r\n","/**\r\n * Query scope for queryElements() API\r\n */\r\nexport const enum QueryScope {\r\n /**\r\n * Query from the whole body of root node. This is default value.\r\n */\r\n Body,\r\n\r\n /**\r\n * Query elements on a given selection (intersect)\r\n * The result element can contain the selection, contain part of selection, or inside selection\r\n */\r\n OnSelection,\r\n\r\n /**\r\n * Query elements inside a given selection only\r\n */\r\n InSelection,\r\n}\r\n","/**\n * Type of all possible regions. Currently we only support region of Table\n */\nexport const enum RegionType {\n /**\n * Region split by Table\n */\n Table,\n}\n","/**\n * Types of Selection Ranges that the SelectionRangeEx can return\n */\nexport const enum SelectionRangeTypes {\n /**\n * Normal selection range provided by browser.\n */\n Normal,\n /**\n * Selection made inside of a single table.\n */\n TableSelection,\n /**\n * Selection made in a image.\n */\n ImageSelection,\n}\n","/**\n * Table format border\n */\nexport const enum TableBorderFormat {\n /**\n * All border of the table are displayed\n * __ __ __\n * |__|__|__|\n * |__|__|__|\n * |__|__|__|\n */\n DEFAULT,\n\n /**\n * Middle vertical border are not displayed\n * __ __ __\n * |__ __ __|\n * |__ __ __|\n * |__ __ __|\n */\n LIST_WITH_SIDE_BORDERS,\n\n /**\n * All borders except header rows borders are displayed\n * __ __ __\n * __|__|__\n * __|__|__\n */\n NO_HEADER_BORDERS,\n\n /**\n * The left and right border of the table are not displayed\n * __ __ __\n * __|__|__\n * __|__|__\n * __|__|__\n */\n NO_SIDE_BORDERS,\n\n /**\n * Only the borders that divides the header row, first column and externals are displayed\n * __ __ __\n * |__ __ __|\n * | | |\n * |__|__ __|\n */\n FIRST_COLUMN_HEADER_EXTERNAL,\n\n /**\n * The header row has no vertical border, except for the first one\n * The first column has no horizontal border, except for the first one\n * __ __ __\n * |__ __ __\n * | |__|__|\n * | |__|__|\n */\n ESPECIAL_TYPE_1,\n\n /**\n * The header row has no vertical border, except for the first one\n * The only horizontal border of the table is the top and bottom of header row\n * __ __ __\n * |__ __ __\n * | | |\n * | | |\n */\n ESPECIAL_TYPE_2,\n\n /**\n * The only borders are the bottom of header row and the right border of first column\n * __ __ __\n * |\n * |\n */\n ESPECIAL_TYPE_3,\n\n /**\n * No border\n */\n CLEAR,\n}\n","/**\r\n * Operations used by editTable() API\r\n */\r\nexport const enum TableOperation {\r\n /**\r\n * Insert a row above current row\r\n */\r\n InsertAbove,\r\n\r\n /**\r\n * Insert a row below current row\r\n */\r\n InsertBelow,\r\n\r\n /**\r\n * Insert a column on the left of current column\r\n */\r\n InsertLeft,\r\n\r\n /**\r\n * Insert a column on the right of current column\r\n */\r\n InsertRight,\r\n\r\n /**\r\n * Delete the whole table\r\n */\r\n DeleteTable,\r\n\r\n /**\r\n * Delete current column\r\n */\r\n DeleteColumn,\r\n\r\n /**\r\n * Delete current row\r\n */\r\n DeleteRow,\r\n\r\n /**\r\n * Merge current row with the row above\r\n */\r\n MergeAbove,\r\n\r\n /**\r\n * Merge current row with the row below\r\n */\r\n MergeBelow,\r\n\r\n /**\r\n * Merge current column with the column on the left\r\n */\r\n MergeLeft,\r\n\r\n /**\r\n * Merge current column with the column on the right\r\n */\r\n MergeRight,\r\n\r\n /**\r\n * Merge all selected cells\r\n */\r\n MergeCells,\r\n\r\n /**\r\n * Split current table cell horizontally\r\n */\r\n SplitHorizontally,\r\n\r\n /**\r\n * Split current table cell vertically\r\n */\r\n SplitVertically,\r\n\r\n /**\r\n * Align current table at the center\r\n */\r\n AlignCenter,\r\n\r\n /**\r\n * Align current table at the left\r\n */\r\n AlignLeft,\r\n\r\n /**\r\n * Align current table at the right\r\n */\r\n AlignRight,\r\n\r\n /**\r\n * Align current content table cell at the left\r\n */\r\n AlignCellLeft,\r\n\r\n /**\r\n * Align current content table cell at the center\r\n */\r\n AlignCellCenter,\r\n\r\n /**\r\n * Align current content table cell at the right\r\n */\r\n AlignCellRight,\r\n\r\n /**\r\n * Align current content table cell at the top\r\n */\r\n AlignCellTop,\r\n\r\n /**\r\n * Align current table cell at the middle\r\n */\r\n AlignCellMiddle,\r\n\r\n /**\r\n * Align current table cell at the bottom\r\n */\r\n AlignCellBottom,\r\n}\r\n","export { DocumentCommand } from './DocumentCommand';\nexport { DocumentPosition } from './DocumentPosition';\nexport { Keys } from './Keys';\nexport { NodeType } from './NodeType';\nexport { ContentTypePrefix, ContentType } from './ContentType';\nexport { Alignment } from './Alignment';\nexport { ChangeSource } from './ChangeSource';\nexport { ColorTransformDirection } from './ColorTransformDirection';\nexport { ContentPosition } from './ContentPosition';\nexport { DarkModeDatasetNames } from './DarkModeDatasetNames';\nexport { DelimiterClasses } from './DelimiterClasses';\nexport { Direction } from './Direction';\nexport { EntityClasses } from './EntityClasses';\nexport { EntityOperation } from './EntityOperation';\nexport { ExperimentalFeatures } from './ExperimentalFeatures';\nexport { FontSizeChange } from './FontSizeChange';\nexport { GetContentMode } from './GetContentMode';\nexport { Indentation } from './Indentation';\nexport { Capitalization } from './Capitalization';\nexport { ListType } from './ListType';\nexport { PositionType } from './PositionType';\nexport { QueryScope } from './QueryScope';\nexport { RegionType } from './RegionType';\nexport { TableOperation } from './TableOperation';\nexport { ImageEditOperation } from './ImageEditOperation';\nexport { ClearFormatMode } from './ClearFormatMode';\nexport { KnownCreateElementDataIndex } from './KnownCreateElementDataIndex';\nexport { KnownPasteSourceType } from './KnownPasteSourceType';\nexport { TableBorderFormat } from './TableBorderFormat';\nexport { PluginEventType } from './PluginEventType';\nexport { SelectionRangeTypes } from './SelectionRangeTypes';\nexport { NumberingListType } from './NumberingListType';\nexport { BulletListType } from './BulletListType';\nexport { DefinitionType } from './DefinitionType';\nexport { PasteType } from './PasteType';\n","export * from './browser/index';\r\nexport * from './corePluginState/index';\r\nexport * from './enum/index';\r\nexport * from './event/index';\r\nexport * from './interface/index';\r\nexport * from './type/index';\r\n","import { Editor } from 'roosterjs-editor-core';\r\nimport { EditorOptions, EditorPlugin, IEditor } from 'roosterjs-editor-types';\r\nimport { getDarkColor } from 'roosterjs-color-utils';\r\nimport { ContentEdit, HyperLink, Paste } from 'roosterjs-editor-plugins';\r\n\r\n/**\r\n * Create an editor instance with most common options\r\n * @param contentDiv The html div element needed for creating the editor\r\n * @param additionalPlugins The additional user defined plugins. Currently the default plugins that are already included are\r\n * ContentEdit, HyperLink and Paste, user don't need to add those.\r\n * @param initialContent The initial content to show in editor. It can't be removed by undo, user need to manually remove it if needed.\r\n * @returns The editor instance\r\n */\r\nexport default function createEditor(\r\n contentDiv: HTMLDivElement,\r\n additionalPlugins?: EditorPlugin[],\r\n initialContent?: string\r\n): IEditor {\r\n let plugins: EditorPlugin[] = [new HyperLink(), new Paste(), new ContentEdit()];\r\n\r\n if (additionalPlugins) {\r\n plugins = plugins.concat(additionalPlugins);\r\n }\r\n\r\n let options: EditorOptions = {\r\n plugins: plugins,\r\n initialContent: initialContent,\r\n getDarkColor: getDarkColor,\r\n defaultFormat: {\r\n fontFamily: 'Calibri,Arial,Helvetica,sans-serif',\r\n fontSize: '11pt',\r\n textColor: '#000000',\r\n },\r\n };\r\n return new Editor(contentDiv, options);\r\n}\r\n","export { default as createEditor } from './createEditor';\r\nexport * from 'roosterjs-editor-types';\r\nexport * from 'roosterjs-editor-types-compatible';\r\nexport * from 'roosterjs-editor-dom';\r\nexport * from 'roosterjs-editor-core';\r\nexport * from 'roosterjs-editor-api';\r\nexport * from 'roosterjs-editor-plugins';\r\nexport * from 'roosterjs-color-utils';\r\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(8608);\n"],"names":["cssKeywords","reverseKeywords","key","hasOwnProperty","convert","module","exports","rgb","channels","labels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","keyword","ansi16","ansi256","hcg","apple","gray","model","Error","length","Object","defineProperty","value","h","l","r","g","b","min","Math","max","delta","rdif","gdif","bdif","s","v","diff","diffc","c","k","reversed","currentClosestKeyword","x","y","currentClosestDistance","Infinity","distance","pow","z","t1","t2","t3","val","i","smin","lmin","hi","floor","f","p","q","t","sl","vmin","n","wh","bl","ratio","m","y2","x2","z2","a","atan2","PI","sqrt","hr","cos","sin","args","arguments","round","ansi","color","mult","rem","string","toString","toUpperCase","substring","match","colorString","split","map","char","join","integer","parseInt","hue","chroma","mg","pure","w","conversions","route","keys","forEach","fromModel","routes","toModel","fn","wrappedFn","Array","prototype","slice","call","result","len","conversion","wrapRounded","raw","wrapRaw","link","from","to","wrapConversion","graph","path","parent","cur","unshift","models","buildGraph","queue","current","pop","adjacents","adjacent","node","deriveBFS","colorNames","swizzle","reverseNames","name","cs","get","clamp","num","hexDouble","str","toLowerCase","hexAlpha","i2","parseFloat","alpha","isNaN","rgba","percent","hsla","hwba","_slice","skippedModels","hashedModelKeys","sort","limiters","Color","obj","this","valpha","newArr","zeroArray","splice","indexOf","hashedKeys","JSON","stringify","push","limit","freeze","getset","channel","modifier","isArray","maxfn","arr","toJSON","places","self","concat","percentString","array","object","unitArray","unitObject","Number","toFixed","roundTo","roundToPlace","red","green","blue","saturationl","lightness","saturationv","white","wblack","cyan","magenta","yellow","black","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","isDark","isLight","negate","lighten","darken","saturate","desaturate","whiten","blacken","grayscale","fade","opaquer","rotate","degrees","mix","mixinColor","weight","color1","undefined","w1","w2","newAlpha","Function","getOwnPropertyDescriptor","constructor","isArrayish","results","arg","wrap","default","baseLValue","computedColor","colorLab","newLValue","editor","capitalization","language","getCapitalizedText","originalText","toLocaleLowerCase","toLocaleUpperCase","wordArray","charAt","regex","RegExp","replace","element","getFirstLeafNode","getNextLeafSibling","nodeType","textContent","FONT_SIZES","getNewFontSize","pt","changeBase","fontSizes","ceil","last","change","getComputedStyle","style","fontSize","lineHeight","STYLES_TO_REMOVE","TAGS_TO_UNWRAP","ATTRIBUTES_TO_PRESERVE","TAGS_TO_STOP_UNWRAP","clearNodeFormat","areAllChildrenBlock","toArray","childNodes","every","returnBlockElement","isBlockElement","tag","getTagOfNode","isVoidHtmlElement","unwrap","isTableCell","safeInstanceOf","isTable","attributes","attr","removeNonBorderStyles","removeNotTableDefaultStyles","removeAttribute","clearAttribute","updateStyles","callbackfn","styles","getStyles","getObjectKeys","setStyles","clearBlockFormat","region","blocks","getSelectedBlockElementsInRegion","nodes","collapseNodesInRegion","contains","rootNode","nonborderStyles","wrapper","parentNode","isNodeInRegion","balancedNodes","splitBalancedNodeRange","setDefaultFormat","defaultFormat","getDefaultFormat","isDefaultFormatEmpty","queryElements","removeStyles","cNode","fontFamily","textColor","shouldApplyInlineStyle","textColors","backgroundColor","backgroundColors","bold","fontWeight","setDefaultFontWeight","italic","underline","removeProperty","getAttribute","clearFormat","formatType","focus","addUndoSnapshot","clearInlineFormat","isMultiBlock","transverser","getSelectionTraverser","currentBlockElement","getNextBlockElement","isMultiBlockSelection","inlineElement","currentInlineElement","isPartial","PartialInlineElement","NodeInlineElement","currentNode","nextSibling","previousSibling","isNodeWholeBlock","getContainerNode","clearAutoDetectFormat","URI_REGEX","MAILTO_REGEX","FTP_REGEX","getAnchorNodeAtCursor","updateAnchorDisplayText","anchor","displayText","altText","target","url","sanitizer","HtmlSanitizer","document","createElement","href","sanitize","checkXss","trim","linkData","matchLink","normalizedUrl","prefix","search","applyLinkPrefix","originalUrl","selection","getSelectionRangeEx","type","range","ranges","collapsed","getDocument","insertNode","execCommand","traverser","currentInline","getNextInlineElement","deletionInlineList","deleteNode","image","title","updateAnchorTarget","getElementBasedFormatState","event","listTag","getElementAtCursor","getSelectionRange","multiline","startingBlock","getBlockElementAtNode","startContainer","endingBlock","endContainer","equals","headerTag","table","tableFormat","getTableFormatInfo","hasHeader","rows","cells","cell","isBullet","isNumbering","isMultilineSelection","headerLevel","canUnlink","canAddImageAltText","isBlockQuote","isCodeInline","isCodeBlock","isInTable","tableHasHeader","canMergeTableCell","getPendableFormatState","getStyleBasedFormatState","getUndoState","isDarkMode","zoomScale","getZoomScale","coordinates","firstCell","lastCell","contentNode","isBlock","isReadonly","position","insertToRegionRoot","focusAfterEntity","display","commitEntity","currentRange","contentPosition","normalize","existingEntity","getEntitySelector","Position","select","regions","getSelectedRegions","chains","VListChain","createListChains","updateCursor","insertOnNewLine","replaceSelection","entity","getEntityFromElement","newLine","insertBefore","applyFormat","getDarkColorHandler","br","querySelector","pos","isFeatureEnabled","addDelimiters","nextElementSibling","triggerContentChangedEvent","insertImageWithSrc","src","attribute","setAttribute","imageFileOrSrc","readFile","dataUrl","isDisposed","start","end","textOrRange","exactMatch","searcher","getContentSearcherOfCursor","getRangeFromText","backupRange","endOffset","startOffset","angle","transform","alignment","isATable","elementAtCursor","isWholeTableSelected","VTable","marginLeft","marginRight","alignTable","findClosestElementAncestor","startNode","getStartNode","vList","createVListFromRegion","setAlignment","alignList","align","command","elements","textAlign","alignText","isInnerNode","setColor","direction","fontName","outdent","blockElement","collapseToSingleElement","quote","isFirstItem","items","getNode","getListItemIndex","getStart","shouldHandleWithBlockquotes","indentation","handler","quotesHandled","blockGroups","isTabKeyTextFeaturesEnabled","block","rootList","setIndentation","writeBack","group","separator","startNumber","DEFAULT_STYLER","borderLeft","borderColor","paddingLeft","styler","listStyle","apiNameOverride","CODE_TAG","SELECTOR","PRE_TAG","code","pre","wrapped","header","div","moveChildNodes","replaceNode","cssStyleCallbacks","experimentCommitListChains","saveTableCellMetadata","bgColorOverride","isUndefined","operation","td","vtable","saveTableSelection","edit","transformToDarkColor","row","col","currentRow","currentCol","newRow","newCol","calculateCellToSelect","newTd","getCell","format","getTableCellWidth","columns","cellSpacing","cellPadding","tr","appendChild","j","width","runAsync","callback","apiName","safeCallback","isContentEditable","areAllCollapsed","firstChild","triggerPluginEvent","formatState","formatCallback","firstNode","lastNode","contentTraverser","nextInlineElement","applyStyle","styleName","parentNodes","setListItemStyle","applyStyleToListItems","beforeRunCallback","wrapFunction","NodeTag","some","isEmptyBlockUnderTR","getEndNode","forEachCallback","commitListChains","getEnd","chain","commit","formatter","formatName","PendableFormatCommandMap","filter","needToSwitchSelection","formatApiName","isNodeRTL","el","marginInlineStart","marginInlineEnd","parentElement","listType","includeSiblingLists","orderedStyle","unorderedStyle","canAppendAtCursor","equalTo","createVListAtBlock","changeListType","setListStyleType","addUndoSnapshotInternal","core","canUndoByBackspace","entityStates","lifecycle","shadowEditFragment","rangeEx","api","metadata","root","tableId","id","imageId","getSelectionPath","createContentMetadata","contentDiv","undo","snapshotsService","addSnapshot","html","innerHTML","knownColors","darkColorHandler","getKnownColorsCopy","hasNewContent","changeSource","additionalData","data","undoState","isNested","getEntityState","eventType","source","triggerEvent","autoCompletePosition","attachDomEvent","eventMap","disposers","handlerObj","pluginEventType","beforeDispatch","eventName","onEvent","rawEvent","addEventListener","removeEventListener","coreApiMap","createPasteFragment","ensureTypeInContainer","getContent","hasFocus","restoreUndoSnapshot","selectRange","setContent","switchShadowEdit","transformColor","selectTable","selectImage","clipboardData","pasteAsText","applyCurrentStyle","pasteAsImage","pasteType","options","createDefaultHtmlSanitizerOptions","fragment","ownerDocument","createDocumentFragment","sanitizingOption","htmlBefore","htmlAfter","htmlAttributes","createBeforePasteEvent","getPasteType","createFragmentFromClipboardData","keyboardEvent","formatNode","isNodeEmpty","brEl","append","shouldSetNodeStyles","innerText","wasNodeJustCreatedByKeyboardEvent","createRange","domEvent","selectionRange","mode","clonedNode","content","triggerExtractContentEvent","includeSelectionMarker","getTextContent","clonedRoot","cloneNode","originalRange","shadowEditSelectionPath","getHtmlWithSelectionPath","forceGetStateFromDOM","cachedPendableFormatState","pendingFormatState","pendableFormatState","cachedPosition","pendableFormatPosition","currentPosition","isSamePosition","pendableKeys","PendableStyleCheckers","CssFalsyCheckers","queryCommandStateFromDOM","isBold","isUnderline","textDecoration","isItalic","fontStyle","isSubscript","verticalAlign","isSuperscript","isStrikeThrough","tryGetFromCache","defaultView","getSelection","rangeCount","getRangeAt","createNormalSelectionEx","checkAllCollapsed","shadowEditTableSelectionPath","shadowEditImageSelectionPath","shadowRange","tableSelectionRange","imageSelectionRange","override","pendableFormatSpan","styleTextColor","styleBackColor","getComputedStyles","getPropertyValue","parseColorValue","backColor","lightModeColor","darkModeColor","marginTop","marginBottom","activeElement","option","isBegin","getFirstLastBlockElement","refNode","insertedNode","rangeToRestore","cloneRange","getInitialRange","deleteContents","getRegionsFromRange","isAtEnd","splitTextNode","offset","splitParentNode","adjustInsertPositionRegionRoot","tempPos","adjustInsertPositionNewLine","adjustInsertPosition","nodeForCursor","lastChild","step","snapshot","move","isRestoring","registerColor","entityState","state","arg1","arg2","arg3","arg4","isSelectionRangeEx","isNodePosition","selectionRangeEx","STYLE_ID","unselect","removeImportantStyleRule","borderCSS","buildBorderCSS","setGlobalCssStyles","imageSelectionBorderColor","doc","removeGlobalCssStyle","skipSameRange","addRangeToSelection","restorePendingFormatState","input","coordinate","isValidCoordinate","areValidCoordinates","contentDivSelector","selectors","vTable","isAllTableSelected","tableSelector","tableRange","Range","selectNode","handleAllTableSelected","tr1","td1","tr2","td2","firstSelected","lastSelected","tableChildren","cont","indexes","rowIndex","tdCount","midElement","ind","middleElSelector","cellIndex","removeImportant","selector","generateCssFromCell","elementsSelector","rowRange","setStartBefore","setEndAfter","handleTableSelected","cssRules","currentRules","shift","buildCss","css","item","isMergedCell","cellToSelect","cellTag","index","contentChanged","newContent","entities","entityMap","body","DOMParser","parseFromString","trustedHTMLHandler","restoreContentWithEntityPlaceholder","metadataFromContent","extractContentMetadata","selectContentMetadata","isOn","shadowEditEntities","wasInShadowEdit","getShadowEditSelectionPath","selectionType","shadowEditSelection","moveContentWithEntityPlaceholders","selectionPath","tableElement","iterateElements","transformer","includeSelf","isHTMLElement","child","htmlElement","Node","ELEMENT_NODE","forceTransform","fromDarkMode","onExternalContentTransform","toDarkMode","transformElementColor","allowedEventsInShadowEdit","pluginEvent","broadcast","plugins","plugin","onPluginEvent","willHandleEventExclusively","handledExclusively","applyId","idPrefix","getElement","getElementById","querySelectorAll","disposer","onPaste","extractClipboardEvent","paste","allowedCustomPasteType","getTempDiv","removeTempDiv","cleanUpAndRestoreSelection","getName","initialize","addDomEventHandler","e","copy","onCutCopy","cut","dispose","getState","isCut","setHtmlWithMetadata","getTrustedHTMLHandler","newRange","createTableRange","deleteTableContent","deleteImage","deleteSelectedContent","forceInLightMode","getCustomData","tempDiv","removeChild","isCopy","restoreRange","Browser","isAndroid","collapse","clonedVTable","removeCellsOutsideSelection","selectedVTable","forEachSelectedCell","wholeTableSelected","isWholeColumnSelected","onDrop","onFocus","onKeyDownDocument","which","defaultPrevented","cacheSelection","onMouseDownDocument","onScroll","scrollContainer","onKeyboardEvent","isCharacterValue","stopPropagation","onInputEvent","onContextMenuEvent","allItems","elementBeforeCursor","getInlineElementBefore","eventTargetNode","button","contextMenuProviders","provider","getContextMenuItems","arrayPush","isInIME","stopPrintableKeyboardEventPropagation","allowKeyboardEventPropagation","isContextMenuProvider","eventHandlers","keypress","getEventHandler","keydown","keyup","mousedown","contextmenu","compositionstart","compositionend","drop","isIE","isSafari","isIEOrEdge","beforedeactivate","blur","features","hasFunctionKey","ctrlOrMeta","isCtrlOrMetaPressed","altKey","feature","allowFunctionKeys","shouldHandleEvent","handleEvent","ENTITY_ID_REGEX","ALLOWED_CSS_CLASSES","REMOVE_ENTITY_OPERATIONS","handleCutEvent","checkRemoveEntityForRange","onDragStart","dragEvent","entityWrapper","preventDefault","handleMouseUpEvent","handleKeyDownEvent","handleBeforePasteEvent","handleContentChangedEvent","handleExtractContentWithDomEvent","handleContextMenuEvent","handleEntityOperationEvent","inlineEntityOnPluginEvent","entityElement","isClicking","workaroundSelectionIssueForIE","additionalAllowedCssClasses","shouldNormalizeDelimiters","isDeleted","getExistingEntities","ensureUniqueId","handleNewEntity","normalizeDelimitersInEditor","editableEntityElements","isFullyCovered","newItem","shouldPersist","canPersist","exec","baseId","substr","newId","workaroundButton","onblur","mouseTarget","mouseSelection","keyDownSelection","contextMenuTarget","actualSelection","CONTENT_EDITABLE_ATTRIBUTE_NAME","COMMANDS","isFirefox","DARK_MODE_DEFAULT_FORMAT","initializer","initialContent","contentEditable","userSelect","webkitUserSelect","adjustColor","doNotAdjustEditorColor","getDarkColor","customData","inDarkMode","experimentalFeatures","adjustBrowserBehavior","mouseUpEventListerAdded","mouseDownX","mouseDownY","onMouseUp","removeMouseUpEventListener","pageX","pageY","normalizeTables","normalizeTableFromEvent","shiftKey","li","prevElement","changeElementTag","tables","isChanged","isDOMChanged","tbody","colgroups","thead","colgroup","clear","getCurrentPosition","createPendingFormatSpan","span","currentStyle","createTextNode","setProperty","isRangeEmpty","styledAncestor","focusedPosition","getFocusedPosition","isMobileOrTablet","setTimeout","snapshots","service","lastKeyPress","undoMetadataSnapshotService","undoSnapshotService","canMove","isAutoCompleteSnapshot","clearRedo","canUndoAutoComplete","createSnapshots","canMoveCurrentSnapshot","moveCurrentSnapshot","addSnapshotV2","clearProceedingSnapshotsV2","ctrlKey","canUndo","canRedo","onKeyDown","onKeyPress","clearRedoForInput","onContentChanged","onBeforeKeyboardEditing","evt","metaKey","corePluginOverride","typeInContainer","_placeholder","typeAfterLink","mouseUp","copyPaste","imageSelection","normalizeTable","corePlugins","DELIMITER_SELECTOR","ZERO_WIDTH_SPACE","INLINE_ENTITY_SELECTOR","preventTypeInDelimiter","delimiter","textNode","nodeValue","className","setPosition","getDelimiterFromElement","sibling","classList","previousElementSibling","removeNode","removeDelimiterAttr","addDelimitersIfNeeded","isEntityElement","checkEntity","entitySibling","remove","cn","isAfter","getBlock","blockToCheck","delimiters","matchesSelector","handleCollapsedEnter","startElement","endElement","startUpdate","getPosition","endUpdate","aEditor","handleSelectionNotCollapsed","container","_","ColorAttributeEnum","VARIABLE_REGEX","ColorAttributeName","values","colorKey","parsedColor","reset","isInDarkMode","startsWith","findLightColorFromDarkColor","darkColor","rgbSearch","parseColor","find","rgbCurrent","names","createEditorCore","Editor","EditorBase","coreCreator","getCore","existingNode","toNode","transformColorForDarkMode","replaceChild","scopeOrCallback","scope","selectionEx","collapseNodes","canSplitParent","isEmpty","insertContent","allNodes","applyCurrentFormat","snapshotBeforePaste","sel","focusNode","focusOffset","startFrom","cacheGetEventData","isPositionAtBeginning","isPositionAtBeginningOf","nameOrMap","eventsToMap","redo","getScrollContainer","getter","getBodyTraverser","ContentTraverser","createBodyTraverser","createSelectionTraverser","getBlockTraverser","createBlockTraverser","PositionContentSearcher","win","window","handle","requestAnimationFrame","cancelAnimationFrame","setEditorDomAttribute","getEditorDomAttribute","getRelativeDistanceToEditor","addScroll","editorRect","getBoundingClientRect","elementRect","left","top","scrollLeft","scrollTop","addContentEditFeature","removeContentEditFeature","featureSet","setDarkModeState","nextDarkMode","startShadowEdit","stopShadowEdit","isInShadowEdit","getSizeTransformer","sizeTransformer","setZoomScale","scale","oldValue","oldZoomScale","newZoomScale","getVisibleViewport","pluginState","getPluginState","getIntersectedRect","coreApiOverride","originalApi","size","STRUCTURE_NODE_TAGS","endNode","getBlockContext","nodeContext","StartEndBlockElement","blockContext","newNode","findHeadTailLeafNode","containerBlockNode","isTail","headNode","tailNode","isFirst","rawHtml","text","imageDataUri","pendableFormat","styleBasedFormat","getCurrentFormat","rangeBeforePaste","dataTransfer","then","CLIPBOARD_HTML_HEADER_REGEX","OTHER_TEXT_TYPE","EDGE_LINK_PREVIEW","ContentHandlers","isEdge","headerValues","workaroundForEdge","customValues","linkPreview","parse","types","files","Promise","all","kind","resolve","file","getAsFile","textType","getAllowedCustomType","getAsString","getData","nextStep","img","maxWidth","transformTabCharacters","initialOffset","tIndex","line","lineBefore","lineAfter","tabCount","fill","lines","includes","processStyles","reduce","attrs","meta","htmlFirstLevelChildTags","TEXT_NODE","nodeTag","COMMENT_NODE","head","additionalGlobalStyleNodes","startIndex","endIndex","lastIndexOf","START_FRAGMENT","END_FRAGMENT","convertGlobalCssToInlineCss","getStartBlockElement","getStartInlineElement","getFirstInlineElement","isBlockInScope","trimInlineElement","scoper","skipTags","currentBlock","getPreviousNextBlockElement","getPreviousBlockElement","isNext","leaf","getLeafSibling","newBlock","getPreviousNextInlineElement","getPreviousInlineElement","newInline","getInlineElementBeforeAfter","getStartPosition","getParentBlock","previousInlineElement","getNextPreviousInlineElement","WHITESPACE_REGEX","word","inlineBefore","inlineAfter","traversingComplete","inlineElements","nearestNonTextInlineElement","getWordBefore","traverse","getInlineElementAfter","getSubStringBefore","startPosition","endPosition","textIndex","forEachTextInlineElement","textInline","nodeContent","nodeIndex","charCodeAt","getNearestNonTextInlineElement","previousInline","isTextualInlineElement","matches","blockNode","getLastInlineElement","getFirstLastInlineElementFromBlockElement","startInline","startBlock","inScope","selStartBlock","selEndBlock","inline","getEndPosition","startPartial","endPartial","addDelimiterAfter","insertDelimiter","addDelimiterBefore","isDelimiter","delimiterClass","children","insertPosition","insertAdjacentElement","delimiterAfter","delimiterBefore","NOT_EDITABLE_SELECTOR","adjustSteps","nodeToInsert","safeRemove","normalizedPosition","nextNode","splitter","rootNodeToInsert","isFragment","rootNodes","hasBrNextToRoot","listItem","listNode","tdNode","shouldInsertListAsText","inlineElementBefore","inlineElementAfter","adjustInsertPositionForNotEditableNode","nonEditableElement","lastNonEditableElement","posBefore","rangeToTraverse","nextBlockElement","tempRange","ensureBeforeAndAfter","isStart","nodeBefore","nodeAfter","emptyNode","nodesToDelete","nodesPairToMerge","regionRange","commonAncestorContainer","beforeEnd","afterEnd","beforeStart","afterStart","CONTENT_EDITABLE","removeUntil","nodeToStop","nodeToRemove","tryGetWrapperFromEntityPlaceholder","getPlaceholder","placeholder","entitySelector","next","nodeToAppend","insertClonedNode","isEntity","eventDataCache","isCtrlOrMetaPressedImpl","isMac","isCtrlKey","isAltKey","isMetaKey","elementCallbacks","cloneObject","styleCallbacks","getStyleCallbacks","attributeCallbacks","tagReplacements","getTagReplacement","additionalTagReplacements","allowedAttributes","getAllowedAttributes","additionalAllowedAttributes","allowedCssClassesRegex","getAllowedCssClassesRegex","defaultStyleValues","getDefaultStyleValues","additionalDefaultStyleValues","additionalPredefinedCssForElement","preserveHtmlComments","unknownTagReplacement","convertInlineCss","additionalStyleNodes","sanitizeHtml","currentStyles","currentElementOrStyle","convertCssOnly","processNode","styleNodes","styleSheets","reverse","sheet","styleSheet","styleRule","cssText","CSSRule","STYLE_RULE","selectorText","context","isElement","isText","isComment","shouldKeep","replacement","test","whiteSpace","thisStyle","processAttributes","preprocessCss","processCss","predefinedStyles","isInheritable","keep","isCssVariable","processCssVariable","newValue","processCssClass","originalValue","calculatedValue","originalClasses","calculatedClasses","newCallback","cloneObjectImpl","assign","existingObj","HTML_TAG_REPLACEMENT","abbr","address","area","article","aside","bdi","bdo","blockquote","canvas","caption","center","cite","datalist","dd","del","details","dfn","dialog","dir","dl","dt","em","fieldset","figcaption","figure","font","footer","h1","h2","h3","h4","h5","h6","hgroup","ins","kbd","label","legend","main","mark","menu","menuitem","meter","nav","ol","optgroup","output","picture","progress","rp","rt","ruby","samp","section","small","strike","strong","sub","summary","sup","textarea","tfoot","th","time","tt","u","ul","var","wbr","xmp","form","applet","audio","base","basefont","embed","frame","frameset","iframe","noscript","param","script","slot","template","track","video","ALLOWED_HTML_ATTRIBUTES","DEFAULT_STYLE_VALUES","overflow","padding","border","float","removeValue","removeWidthForLiAndDiv","tagName","additionalReplacements","replacements","additionalAttributes","additionalCssClasses","patterns","additionalDefaultStyles","callbacks","INHERITABLE_PROPERTIES","PREDEFINED_CSS_FOR_ELEMENT","B","EM","I","U","P","PRE","S","STRIKE","SUB","SUP","getBrowserInfo","getPreviousLeafSibling","getLastLeafNode","KnownCreateElementData","moveCurrentSnapsnot","createEntityPlaceholder","createNumberDefinition","createBooleanDefinition","createStringDefinition","createArrayDefinition","createObjectDefinition","getMetadata","setMetadata","removeMetadata","parentBlock","containerNode","getDecoratedInline","thisStart","otherEnd","previousNode","STYLET_AGS","callStylerWithInnerNode","formatNodes","fromPosition","toPosition","parentTag","newNodeValue","startingNode","nodeChain","resolveInlineElement","mainArray","itemsArray","apply","collection","moveChildNodesToLi","moveLiToList","populateItems","getLastItemNumber","getListType","getLevel","isDummy","shouldReuseAllAncestorListElements","disableListChain","lastList","listStack","newListStart","getNewListStart","topList","applyListStyle","setNewListStart","softOutdent","preventItemRemoval","shouldAddMargin","findListItems","setIsDummy","indent","addNegativeMargins","flexDirection","alignSelf","targetType","needChangeType","styleMetadata","orderedStyleType","getValidValue","unorderedStyleType","createListStyleMetadata","ListStyleDefinitionMetadata","appendItem","mergeVList","list","listIndex","listStartPos","listEndPos","listTypes","newListTypes","isListElement","currentItem","furtherNodes","CHAIN_DATASET_NAME","AFTER_CURSOR_DATASET_NAME","lastChainIndex","lastNumber","lastNumberBeforeCursor","nameGenerator","canAppendToTail","createListChainName","afterCurrentNode","applyChainName","lists","getLists","vlist","dataset","isAfterCurrentNode","orderListStyles","unorderedListStyles","NEGATIVE_MARGIN","stylesToInherit","attrsToInherit","dummy","isOrphanItem","canMerge","mergeItems","wrapIfNotBlockNode","margin","expectedLength","isFirstLevel","originalRoot","nextLevel","listStackEndIndex","stackLength","newList","createListElement","getDeepChildIndex","listStyleType","isLi","stylesToApply","attrValue","deepIndex","newRoot","checkFirst","checkLast","ALPHABET","decimal","isLowerCase","RomanValues","M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","romanValue","timesRomanCharAppear","repeat","ListSelector","tryIncludeSiblingNode","fullSelectionStart","fullSelectionEnd","nodeForItem","createVListFromItemNode","getListTypeFromNode","ancestor","marker","bulletListStyle","isDisc","isCssStyle","elementsStyles","styleValue","getInlineChildElementsStyle","styleValues","Set","MarkerTypes","numberingListStyle","markerSeparator","markerSecondSeparator","markerType","lowerCase","markerNumber","Roman","Alpha","Decimal","isOptional","minValue","maxValue","allowNull","itemDef","minLength","maxLength","propertyDef","MetadataDataSetName","definition","defaultValue","def","validate","n1","n2","abs","validator","GOOGLE_SHEET_NODE_NAME","PROG_ID_NAME","EXCEL_DESKTOP_ATTRIBUTE_NAME","props","getSourceFunctions","Map","shouldConvertSingleImage","func","nodesOrBlockElements","regionTypeData","outerSelector","innerSelector","getRegionCreator","fullRange","firstNodeOfRegion","lastNodeOfRegion","firstNodeValid","lastNodeValid","bothValid","areNodesValid","iterateNodes","creator","boundary","started","innerNode","ended","outerNode","boundaries","previousOuterNode","newRegions","boundaryTree","allBoundaries","inSelectionOuterNode","thisInnerNode","thisOuterNode","buildBoundaryTree","regionBase","createBlockIfEmpty","deprecated","isRegion","regionStart","regionEnd","compareDocumentPosition","targetNode","blockRoot","commonContainer","nodeToMerge","nodeOrPosition","offsetOrPosType","isFromEndOfRange","getIndexOfNode","getEndOffset","newOffset","needAddRange","removeAllRanges","addRange","getFocusablePosition","getPositionFromPath","setStart","setEnd","rect","rects","getClientRects","getPositionPath","isPreviousText","areAllPreviousNodesEmpty","NumberArrayDefinition","CoordinatesDefinition","IsDarkModeDefinition","NormalContentMetadataDefinition","TableContentMetadataDefinition","ImageContentMetadataDefinition","potentialMetadataComment","getLength","compare","defaultCompare","currentSnapshot","currentIndex","isSameSnapshot","totalSize","removeCount","maxSize","autoCompleteIndex","compareSnapshots","s1","s2","newIndex","clearProceedingSnapshots","removedSize","pair","valueIndex","styleId","styleTag","styleProperties","modifiedStyles","cssRule","insertRule","trimmedName","trimmedValue","DEFAULT_FORMAT","topBorderColor","bottomBorderColor","verticalBorderColor","hasHeaderRow","hasFirstColumn","hasBandedRows","hasBandedColumns","bgColorEven","bgColorOdd","headerRowColor","tableBorderFormat","keepCellShade","normalizeSize","formatInfo","trs","tableSelection","getTableFromTd","sourceCol","targetCol","colSpan","rowSpan","hasTd","spanLeft","spanAbove","height","skipApplyFormat","recalculateSpans","recalculateCellHeight","saveTableInfo","isEmptyCell","deleteCellShadeDataset","currentCell","firstRow","lastRow","firstColumn","lastColumn","cloneCell","countSpanAbove","colIndex","nextCell","newCell","getTd","forEachCellOfCurrentColumn","countSpanLeft","forEachCellOfColumn","forEachCellOfRow","removedRows","removedColumns","rowStep","aboveCell","belowCell","mergeCells","colStep","leftCell","rightCell","nextCellBelow","nextCellRight","splitRow","setAlignmentToSelectedCells","alignmentType","isVertical","horizontally","checkSpans","mergeCellContents","childElementCount","cellTd","nextCellTd","getCellsWithBorder","borderPos","getLeftCells","cellRect","found","right","forEachCellOfCurrentRow","getCurrentTd","normalizeEmptyTableCells","normalizeTableCellSize","setHTMLElementSizeInPx","newWidth","newHeight","boxSizing","TRANSPARENT","hasCellShade","getTableCellMetadata","getBorderStyle","borderCollapse","isFirstRow","isLastRow","isFirstColumn","isLastColumn","borderTop","borderRight","borderBottom","setBorderColors","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor","formatBorders","setBordersType","shouldColorWholeTable","setCellColor","setFirstColumnFormat","setHeaderRowFormat","styledCell","rowsLength","rowCells","firstX","firstY","lastX","lastY","currentTd","newTable","currentTable","cursorRow","cursorCol","BooleanDefinition","TableCellFormatMetadata","NullStringDefinition","TableFormatMetadata","isAndroidRegex","userAgent","appVersion","vendor","userAgentOrVendor","isIE11OrGreater","isChrome","isWebKit","isWin","navigator","elementStyle","newTag","origianlTag","newElement","ref","contained","treatSameNodeAsContain","internalContains","contenteditable","elementData","namespace","createElementNS","datasetName","attrName","childElement","closest","styleNames","px","tempNode","additionalRects","bottom","getLeafNode","getChild","ignoreSpace","getSibling","curNode","shouldContinue","queryCommandState","BLOCK_ELEMENT_TAGS","BLOCK_DISPLAY_STYLES","node1","node2","VISIBLE_ELEMENT_TAGS","VISIBLE_CHILD_ELEMENT_SELECTOR","trimContent","shouldCountBrAsVisible","visibleSelector","HTML_VOID_ELEMENTS","httpExcludeRegEx","labelRegEx","domainPortWithUrlRegEx","domainPortRegEx","linkMatchRules","http","except","normalizeUrl","https","mailto","notes","unc","ftp","news","telnet","gopher","wais","schema","rule","scheme","msMatchesSelector","keepExistingChildren","clientRect","HEX3_REGEX","HEX6_REGEX","RGB_REGEX","RGBA_REGEX","checkPosition","targets","nodeContainedByRangeOnly","targetPositions","FileReader","onload","onerror","readAsDataURL","getTargetWindow","typeName","targetWindow","mainWindow","mainWindowType","ColorTones","WHITE","isBackgroundColor","shouldAdaptTheFontColor","modeIndependentColor","cssName","colorValue","lightModeBackgroundColor","colorValues","calculateLightness","isADarkOrBrightColor","adaptFontColorToBackgroundColor","CRLF","CRLF_SPACE","shouldSkipNode","splitBefore","newParent","temp","returnFirstPart","firstPart","secondPart","MOUSE_EVENT_INFO_DESKTOP","MOUSEDOWN","MOUSEMOVE","MOUSEUP","getPageXY","MOUSE_EVENT_INFO_MOBILE","targetTouches","touch","trigger","onSubmit","forceMobile","initX","initY","initValue","onMouseDown","addDocumentEvents","dndMouse","onMouseMove","deltaX","deltaY","onDragging","removeDocumentEvents","onDragEnd","specialCharacters","lastKeyTyped","keyTyped","textBeforeCursor","dashes","isPrecededByADash","isPrecededByASpace","settingsOverride","additionalFeatures","allFeatures","hasSettingForKey","defaultDisabled","disposeFeatures","TRAILING_PUNCTUATION_REGEX","AutoLink","cacheGetLinkData","replaceWithNode","clearEventDataCache","UnlinkWhenBackspaceAfterLink","contentSearcher","LinkInlineElement","removeLink","trailingPunctuation","AutoLinkFeatures","autoLink","unlinkWhenBackspaceAfterLink","RemoveCodeWhenEnterOnEmptyLine","childOfCode","cacheGetCodeChild","splitCode","RemoveCodeWhenBackspaceOnEmptyFirstLine","codeElement","currentContainer","codeChild","codeParent","preParent","CodeFeatures","removeCodeWhenEnterOnEmptyLine","removeCodeWhenBackspaceOnEmptyFirstLine","NoCycleCursorMove","rtl","CursorFeatures","noCycleCursorMove","ClickOnEntityFeature","cacheGetReadonlyEntityElement","EscapeFromEntityFeature","EnterBeforeReadonlyEntityFeature","cacheGetNeighborEntityElement","newContainer","BackspaceAfterEntityFeature","DeleteBeforeEntityFeature","collapseOnly","regionRoot","entityNode","triggerOperation","MoveBetweenDelimitersFeature","getIsDelimiterAtCursor","checkBefore","cacheGetCheckBefore","cacheDelimiter","getRelatedElements","delimiterPair","positionType","extend","RemoveEntityBetweenDelimitersFeature","cacheEntityBetweenDelimiter","focusedElement","class","pairClass","isAtEndOrBeginning","getNextSibling","elAtCursor","shouldHandle","removeDelimiters","getElementFromInline","EntityFeatures","clickOnEntity","escapeFromEntity","enterBeforeReadonlyEntity","backspaceAfterEntity","deleteBeforeEntity","moveBetweenDelimitersFeature","removeEntityBetweenDelimiters","PREVIOUS_BLOCK_CACHE_KEY","NEXT_BLOCK_CACHE_KEY","shouldHandleIndentationEvent","indenting","keyCode","cacheGetListElement","handleIndentationEvent","currentElement","isRTL","IndentWhenTab","OutdentWhenShiftTab","IndentWhenAltShiftRight","OutdentWhenAltShiftLeft","MergeInNewLine","blockFormat","toggleListAndPreventDefault","OutdentWhenBackOn1stEmptyLine","getElementsByTagName","MaintainListChainWhenDelete","getCacheNextSibling","getListChains","OutdentWhenEnterOnEmptyLine","isAListPattern","AutoBullet","textRange","prepareAutoBullet","toggleBullet","toggleNumbering","AutoBulletList","shouldTriggerList","AutoNumberingList","number","isFirstItemOfAList","getPreviousListItem","getPreviousListType","letter","MaintainListChain","listInfo","listElement","toggleListType","getListStyle","isATheBeginning","listChains","previousListType","shouldTriggerNewListStyle","MergeListOnBackspaceAfterList","cursorBlock","isList","nearestInline","tempBlock","nextElement","previousList","targetBlock","rangeBeforeWriteBack","fvList","VList","ListFeatures","autoBullet","indentWhenTab","outdentWhenShiftTab","outdentWhenBackspaceOnEmptyFirstLine","outdentWhenEnterOnEmptyLine","mergeInNewLineWhenBackspaceOnFirstChar","maintainListChain","maintainListChainWhenDelete","autoNumberingList","autoBulletList","mergeListOnBackspaceAfterList","outdentWhenAltShiftLeft","indentWhenAltShiftRight","generateBasicMarkdownFeature","triggerCharacter","elementTag","useShiftKey","cacheGetRangeForMarkdownOperation","lastTypedTriggerPosition","hasLastTypedTrigger","textContentRange","extractContents","elementToWrap","nonPrintedSpaceTextNode","handleMarkdownEvent","textInlineElement","inlineTextContent","parentBlockText","contentIndex","MarkdownBold","MarkdownItalic","MarkdownStrikethrough","MarkdownInlineCode","MarkdownFeatures","markdownBold","markdownItalic","markdownStrikethru","markdownInlineCode","QUOTE_TAG","STRUCTURED_TAGS","UnquoteWhenBackOnEmpty1stLine","childOfQuote","cacheGetQuoteChild","splitQuote","UnquoteWhenEnterOnEmptyLine","shouldClearFormat","isStyledBlockquote","QuoteFeatures","unquoteWhenBackspaceOnEmptyFirstLine","unquoteWhenEnterOnEmptyLine","createCommand","winKey","macKey","action","disabled","commands","toggleBold","toggleItalic","toggleUnderline","changeFontSize","DefaultShortcut","cacheGetCommand","getModifierState","cmd","ShortcutFeatures","defaultShortcut","CHILD_PARENT_TAG_MAP","TD","TH","LI","CHILD_SELECTOR","InsertLineBeforeStructuredNodeFeature","cacheGetStructuredElement","StructuredNodeFeatures","insertLineBeforeStructuredNodeFeature","TabInTable","cacheGetTableCell","cacheIsWholeTableSelected","cacheVTable","tableCells","editTable","newPos","IndentTableOnTab","UpDownInTable","isUp","hasShiftKey","targetTd","setBaseAndExtent","DeleteTableWithBackspace","firstTd","TableFeatures","tabInTable","upDownInTable","indentTableOnTab","deleteTableWithBackspace","IndentWhenTabText","listOrTable","insertTab","shouldSetIndentation","OutdentWhenTabText","firstBlock","lastBlock","blockStart","blockEnd","rangeBefore","rangeAfter","numberOfChars","MAX_SAFE_INTEGER","span2","TextFeatures","indentWhenTabText","outdentWhenTabText","autoHyphen","bulletListType","NumberingTypes","Character","characters","lowerRomanTypes","upperRomanTypes","numberingTriggers","lowerRomanNumbers","upperRomanNumbers","numberingListTypes","DecimalsTypes","LowerAlphaTypes","UpperAlphaTypes","LowerRomanTypes","UpperRomanTypes","previousListChain","previousListStyle","isDoubleParenthesis","indexNumber","isValidNumbering","numbering","separatorCharacter","numberingType","identifyNumberingType","identifyNumberingListType","isMenuShowing","onDismiss","dismiss","allowDefaultMenu","initContainer","render","makeReplacement","sourceString","replacementHTML","matchSourceCaseSensitive","shouldReplace","defaultReplacements","longestReplacementLength","replacementEndCharacters","updateReplacements","newReplacements","endChars","lastChar","add","getReplacementEndCharacters","has","stringToSearch","getMatchingReplacement","matchingText","matchingRange","parsingSpan","originalStringToSearch","lowerCaseStringToSearch","sourceMatch","replacementMatch","expectedChangeSource","cacheListChains","selectedRegions","getTooltipCallback","onLinkClick","originalHref","trackedLink","onMouse","tryGetHref","onBlur","updateLinkHrefIfShouldUpdate","resetLinkTracking","mouseover","mouseout","isContentEditValue","shouldCheckUpdateLink","doesLinkDisplayMatchHref","srcElement","open","updateLinkHref","escapedDisplay","DIRECTIONS","DirectionRad","DirectionOrder","DefaultOptions","minWidth","minHeight","preserveRatio","minRotateDeg","imageSelector","rotateIconHTML","disableCrop","disableRotate","disableSideResize","onSelectState","ImageEditHTMLMap","getCornerResizeHTML","getSideResizeHTML","getRotateHTML","getCropHTML","onShowResizeHandle","clonedImage","editInfo","lastSrc","dndHelpers","wasResized","shadowSpan","isCropping","pngSource","setEditingImage","removeWrapper","updateWrapper","cropContainers","getEditElements","cropOverlays","resizeHandles","rotateCenter","rotateHandle","cropHandles","angleRad","bottomPercent","leftPercent","rightPercent","topPercent","targetWidth","targetHeight","originalWidth","originalHeight","visibleWidth","visibleHeight","marginHorizontal","marginVertical","cropLeftPx","cropRightPx","cropTopPx","cropBottomPx","borderStyle","borderWidth","getPx","setWrapperSizeDimensions","setSize","updateHandleCursor","elementClass","clientWidth","clientHeight","doubleCheckResize","viewport","updateRotateHandlePosition","allowedOperations","dragstart","clearDndHelpers","deleteEditInfo","isOperationAllowed","operationOrSelect","getEditInfoFromImage","tryToConvertGifToPng","isFixedNumberValue","checkIfImageWasResized","createWrapper","createDndHelpers","Resizer","Rotator","Cropper","flipImage","flippedVertical","flippedHorizontal","rotateImage","widthPx","heightPx","flippedHorizontally","flippedVertically","rotateHandleBackColor","isSmallImage","getResizeBordersHTML","thisOperation","insertImageWrapper","shadowRoot","attachShadow","dragAndDrop","helper","handles","cursor","radIndex","idx","handleRadIndexCalculator","originalDirection","originalIndex","rotatedIndex","rotateHandles","numberValue","getContext","drawImage","getImageData","percentage","previousSrc","wasResizedOrCropped","editingImage","newSrc","initEditInfo","originalSrc","saveEditInfo","ImageEditInfoState","ROTATE_KEYS","CROP_KEYS","ROTATE_CROP_KEYS","ALL_KEYS","areSameNumber","compareTo","naturalWidth","naturalHeight","getInitialEditInfo","imageWidth","imageHeight","devicePixelRatio","translate","toDataURL","beforeCrop","newEditInfo","Xs","Ys","ROTATION","sw","nw","ne","se","crop","basePercentage","deltaValue","fullValue","currentPercentage","dx","dy","rotateCoordinate","widthPercent","heightPercent","fullWidth","fullHeight","newLeft","newRight","newTop","newBottom","overlayHTML","containerHTML","layer","getCropHandleHTMLInternal","getCropHTMLInternal","HandleTypes","hypotenuse","getResizeHandleHTML","handleTypes","leftOrRight","topOrBottom","setHandleStyle","horizontalOnly","verticalOnly","shouldPreserveRatio","actualWidth","actualHeight","resizeBorderColor","DEG_PER_RAD","getRotateIconHTML","d","stroke","ROTATE_SIZE","newX","newY","angleInRad","angleInDeg","rotateHandleRect","adjustedDistance","rotateGap","rotateTop","selectionBorderColor","forcePreserveRatio","resizableImageSelector","showResizeHandle","hideResizeHandle","selectImageAfterUnSelect","convertSingleImageBody","getPasteSource","isPureLiNode","childNode","LAST_TD_END_REGEX","LAST_TR_END_REGEX","LAST_TR_REGEX","LAST_TABLE_REGEX","excelHandler","trMatch","tableMatch","replaceChildren","chainSanitizerCallback","processBlock","checkAndAddBr","blocksLength","insertPositionNode","listItemContainers","TABLE_TEMP_ELEMENTS_QUERY","isWordOnlineWithList","WORD_ONLINE_IDENTIFYING_SELECTOR","LIST_CONTAINER_ELEMENT_CLASS_NAME","VALID_LIST_STYLE_CHAR_CODES","createNewList","listItemContainer","startAttribute","firstElementChild","insertConvertedListToDoc","convertedListElement","listItemBlock","replaceRegex","prevParent","nextParent","sanitizeListItemContainer","listElements","curListItemBlock","curItem","lastItemInCurBlock","createListItemBlock","getListItemBlocks","itemBlock","flattenListBlock","getContainerListType","itemLevel","listRootElement","itemToInsert","curListLevel","lastElementChild","lastChildTag","insertListItem","parentContainer","getImageNodes","DeprecatedColorList","property","SUPPORTED_PROTOCOLS","URL","protocol","validateLink","listsMetadata","currentUniqueListId","listItems","currentListIdsByLevels","createLevelLists","lastProcessedItem","NODE_ID_ATTRIBUTE_NAME","getAndSetNodeId","wordCustomData","nextNodeId","dict","MSO_COMMENT_PARENT","MSO_COMMENT_REFERENCE","MSO_COMMENT_DATE","MSO_COMMENT_ANCHOR_HREF_REGEX","MSO_COMMENT_CONTINUATION","MSO_COMMENT_DONE","PERCENTAGE_REGEX","wordConverter","createWordConverter","wordConverterArgs","createWordConverterArguments","processNodesDiscovery","processNodeConvert","parsedLineHeight","UNIQUE_LIST_ID_CUSTOM_DATA","MSO_LIST_STYLE_NAME","LINE_BREAKS","getOrCreateListForNode","listMetadata","recurringGetOrCreateListAtNode","listId","getObject","uniqueListId","setObject","convertListIfNeeded","possibleList","getRealPreviousSibling","cleanupListIgnore","levels","nodesToRemove","isEmptySpan","fixWordListComments","isIgnoreNode","getListItemMetadata","listAttribute","getStyleValue","listProps","wordListId","originalNode","isFakeBullet","fakeBullet","getFakeBulletText","removeComments","endComment","getRealNextSibling","newSpan","prevSibling","isEmptyTextNode","resetCurrentLists","ll","itemMetadata","levelInfo","ignore","numberOfItems","secondFakeBullet","firstFakeBullet","nextUniqueId","clone","textIndent","numBulletsConverted","numNumberedConverted","createCustomData","BACKSPACE_CHAR_CODE","ESC_CHAR_CODE","LEFT_ARROW_CHAR_CODE","UP_ARROW_CHAR_CODE","RIGHT_ARROW_CHAR_CODE","DOWN_ARROW_CHAR_CODE","DELETE_CHAR_CODE","UNIDENTIFIED_CODE","dataProvider","pickerOptions","eventHandledOnKeyDown","blockSuggestions","isSuggesting","lastKnownRange","isPendingInputEventHandling","currentInputLength","newInputLength","onInitalize","htmlNode","getWord","setIsSuggesting","handleAutoComplete","onDispose","elementIdPrefix","isAndroidKeyboardEvent","calcInputLength","onKeyDownEvent","onAndroidInputEvent","shouldHandleKeyUpEvent","onKeyUpDomEvent","setLastKnownRange","onIsSuggestingChanged","setAriaOwns","setAriaActiveDescendant","cancelDefaultKeyDownEvent","stopImmediatePropagation","getIdValue","getNamedItem","getWordBeforeCursor","replacementNode","getRangeUntilAt","positionContentSearcher","startPos","endPos","hasMatched","isModifierKey","wordBeforeCursor","trimmedWordBeforeCursor","wordBeforeCursorWithoutTriggerChar","queryStringUpdated","setCursorPoint","rangeNode","nodeBeforeCursor","setRangeStart","nodeBeforeNodeBeforeCursor","detach","targetPoint","bufferZone","shiftHighlight","isHorizontal","getSelectedIndex","selectOption","tryRemoveNode","nodeAfterCursor","nodeId","onRemove","inputType","getInlineElementBeforeCursor","wordFromRange","wordFromCache","nodeOffset","suggestionsLabel","selectedIndex","suggestionLabelPrefix","charCode","shadowEditCoordinatesBackup","firstTable","lastTarget","firstTarget","preventKeyUp","startedSelection","targetTable","mouseMoveDisposer","DeleteTableContents","clearState","handleEnteredShadowEdit","handleLeavingShadowEdit","handleMouseDownEvent","handleKeyUpEvent","handleScrollEvent","TABLE_CELL_SELECTOR","deleteNodeContents","selectNodeContents","getCellAtCursor","newTarget","setData","shouldConvertToTableSelection","updateSelection","getCellCoordinates","getNextTD","prepareSelection","anchorNode","anchorOffset","isBeginAboveEnd","targetPosition","handleKeySelectionInsideTable","IGNORE_KEY_UP_KEYS","selectionInsideTableMouseMove","coord","getTableAtCursor","getOnMouseUp","isNewTDContainingFirstTable","restoreSelection","first","firstCord","lastCord","eventTarget","cellInput","indexY","indexX","r1","r2","newFirst","newLast","fixCoordinates","rowsCells","isNewTargetTableContained","isFirstTargetTableContained","firstTargetRange","onShowHelperElement","onMouseMoveDisposer","tableRectMap","tableEditor","onMouseOut","ev","relatedTarget","isOwnedElement","setTableEditor","buttons","ensureTableRects","editorWindow","scrollX","scrollY","invalidateTableRects","mousemove","disposeTableEditor","isEditing","currentTarget","normalizeRect","onStart","currentCells","nextCells","initialX","onDraggingHorizontal","onDraggingVertical","getHorizontalDistance","canResizeColumns","isLastCell","isShiftPressed","newWidthList","wordBreak","set","toLeft","setHorizontalPosition","CELL_RESIZER_WIDTH","setVerticalPosition","onEnd","createElementData","featureHandler","TOP_OR_SIDE","onChanged","horizontalInserter","verticalInserter","horizontalResizer","verticalResizer","tableResizer","onFinishEditing","isCurrentlyEditing","onStartTableResize","onStartResize","onStartCellResize","disposeTableResizer","onInserted","onSelect","getOnMouseOut","setEditorFeatures","disposeCellResizers","disposeTableInserter","disposeTableSelector","firstCellRect","topOrSide","tableRect","tdRect","lessThanBottom","lessThanRight","moreThanLeft","isOnLeftOrRight","isOnRightHalf","setInserterTd","tdAbove","tdAboveRect","isTdNotAboveMerged","setResizingTd","inserter","newInserter","disposeTableEditFeature","resizer","onInsert","viewPort","inserterColor","getInsertElementData","TableInsertHandler","insertTd","onMouseOutEvent","originalRect","ratioX","ratioY","shouldResizeX","shouldResizeY","setResizeDivPosition","TABLE_RESIZER_LENGTH","onFinishDragging","visibleViewport","containerRect","isTableTopVisible","TABLE_SELECTOR_LENGTH","setSelectorDivPosition","TableSelectorFeature","ENTITY_TYPE","watermark","customClass","showHideWatermark","watermarks","isShowing","removeWatermark","newEntity","insertEntity","spellcheck","CompatibleAlignment","CompatibleBulletListType","CompatibleCapitalization","CompatibleChangeSource","CompatibleClearFormatMode","CompatibleColorTransformDirection","CompatibleContentPosition","CompatibleContentType","CompatibleContentTypePrefix","CompatibleDarkModeDatasetNames","CompatibleDefinitionType","CompatibleDelimiterClasses","CompatibleDirection","CompatibleDocumentCommand","CompatibleDocumentPosition","CompatibleEntityClasses","CompatibleEntityOperation","CompatibleExperimentalFeatures","CompatibleFontSizeChange","CompatibleGetContentMode","CompatibleImageEditOperation","CompatibleIndentation","CompatibleKeys","CompatibleKnownCreateElementDataIndex","CompatibleKnownPasteSourceType","CompatibleListType","CompatibleNodeType","CompatibleNumberingListType","CompatiblePasteType","CompatiblePluginEventType","CompatiblePositionType","CompatibleQueryScope","CompatibleRegionType","CompatibleSelectionRangeTypes","CompatibleTableBorderFormat","CompatibleTableOperation","Alignment","BulletListType","Capitalization","ChangeSource","ClearFormatMode","ColorTransformDirection","ContentPosition","ContentType","ContentTypePrefix","DarkModeDatasetNames","DefinitionType","DelimiterClasses","Direction","DocumentCommand","DocumentPosition","EntityClasses","EntityOperation","ExperimentalFeatures","FontSizeChange","GetContentMode","ImageEditOperation","Indentation","Keys","KnownCreateElementDataIndex","KnownPasteSourceType","ListType","NodeType","NumberingListType","PasteType","PluginEventType","PositionType","QueryScope","RegionType","SelectionRangeTypes","TableBorderFormat","TableOperation","additionalPlugins","HyperLink","Paste","ContentEdit","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","String","__","create","__assign","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","decorators","desc","Reflect","decorate","__param","paramIndex","decorator","__esDecorate","ctor","descriptorIn","contextIn","initializers","extraInitializers","accept","descriptor","done","access","addInitializer","init","__runInitializers","thisArg","useValue","__propKey","__setFunctionName","description","configurable","__metadata","metadataKey","metadataValue","__awaiter","_arguments","generator","reject","fulfilled","rejected","__generator","sent","trys","ops","verb","Symbol","iterator","op","__createBinding","o","k2","__esModule","writable","enumerable","__exportStar","__values","__read","ar","error","__spread","__spreadArrays","il","jl","__spreadArray","pack","__await","__asyncGenerator","asyncIterator","resume","fulfill","settle","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","__setModuleDefault","__importStar","mod","__importDefault","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","prop","toStringTag","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file