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,IAAIqC,EAAS,IAAIzB,EACjBsB,EAAElC,GAAKqC,EAAOlP,YACd+O,EAAElC,GAAG1wD,IAAM,WACP,OAAO+yD,EAAOV,SAElBO,EAAElC,GAAG5zD,IAAM,SAAU4zD,GACjBqC,EAAOT,MAAM5B,GACb,IAAIrgB,EAAS0iB,EAAOlP,YACpB,IAAK,IAAImP,KAAQ3iB,EACbuiB,EAAElC,GAAGsC,GAAQ3iB,EAAO2iB,KA11BpC,CA+1BqB,iBAAXhgD,OAAsBA,OAASrR","sources":["/home/vsts/work/1/s/node_modules/draft-js/lib/AtomicBlockUtils.js","/home/vsts/work/1/s/node_modules/draft-js/lib/BlockMapBuilder.js","/home/vsts/work/1/s/node_modules/draft-js/lib/BlockTree.js","/home/vsts/work/1/s/node_modules/draft-js/lib/CharacterMetadata.js","/home/vsts/work/1/s/node_modules/draft-js/lib/CompositeDraftDecorator.js","/home/vsts/work/1/s/node_modules/draft-js/lib/ContentBlock.js","/home/vsts/work/1/s/node_modules/draft-js/lib/ContentBlockNode.js","/home/vsts/work/1/s/node_modules/draft-js/lib/ContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/ContentStateInlineStyle.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DOMObserver.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DefaultDraftInlineStyle.js","/home/vsts/work/1/s/node_modules/draft-js/lib/Draft.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditor.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorBlock.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorBlockNode.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorCompositionHandler.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorContents-core.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorContents.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorDragHandler.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorEditHandler.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorFlushControlled.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorLeaf.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorNode.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorPlaceholder.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEditorTextNode.react.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEffects.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEntity.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEntityInstance.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftEntitySegments.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftJsDebugLogging.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftModifier.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftOffsetKey.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftPasteProcessor.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftRemovableWord.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftStringKey.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftTreeAdapter.js","/home/vsts/work/1/s/node_modules/draft-js/lib/DraftTreeInvariants.js","/home/vsts/work/1/s/node_modules/draft-js/lib/EditorBidiService.js","/home/vsts/work/1/s/node_modules/draft-js/lib/EditorState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/KeyBindingUtil.js","/home/vsts/work/1/s/node_modules/draft-js/lib/RichTextEditorUtil.js","/home/vsts/work/1/s/node_modules/draft-js/lib/SecondaryClipboard.js","/home/vsts/work/1/s/node_modules/draft-js/lib/SelectionState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/adjustBlockDepthForContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/applyEntityToContentBlock.js","/home/vsts/work/1/s/node_modules/draft-js/lib/applyEntityToContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/convertFromDraftStateToRaw.js","/home/vsts/work/1/s/node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js","/home/vsts/work/1/s/node_modules/draft-js/lib/convertFromRawToDraftState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/createCharacterList.js","/home/vsts/work/1/s/node_modules/draft-js/lib/decodeEntityRanges.js","/home/vsts/work/1/s/node_modules/draft-js/lib/decodeInlineStyleRanges.js","/home/vsts/work/1/s/node_modules/draft-js/lib/draftKeyUtils.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnBeforeInput.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnBlur.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnCompositionStart.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnCopy.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnCut.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnDragOver.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnDragStart.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnFocus.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnInput.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnKeyDown.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnPaste.js","/home/vsts/work/1/s/node_modules/draft-js/lib/editOnSelect.js","/home/vsts/work/1/s/node_modules/draft-js/lib/encodeEntityRanges.js","/home/vsts/work/1/s/node_modules/draft-js/lib/encodeInlineStyleRanges.js","/home/vsts/work/1/s/node_modules/draft-js/lib/expandRangeToStartOfLine.js","/home/vsts/work/1/s/node_modules/draft-js/lib/findAncestorOffsetKey.js","/home/vsts/work/1/s/node_modules/draft-js/lib/findRangesImmutable.js","/home/vsts/work/1/s/node_modules/draft-js/lib/generateRandomKey.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getCharacterRemovalRange.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getContentEditableContainer.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getContentStateFragment.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getCorrectDocumentFromNode.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getDefaultKeyBinding.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getDraftEditorSelection.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getEntityKeyForSelection.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getFragmentFromSelection.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getNextDelimiterBlockKey.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getOwnObjectValues.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getRangeBoundingClientRect.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getRangeClientRects.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getRangesForDraftEntity.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getSafeBodyFromHTML.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getTextContentFromFiles.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getUpdatedSelectionState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getVisibleSelectionRect.js","/home/vsts/work/1/s/node_modules/draft-js/lib/getWindowForNode.js","/home/vsts/work/1/s/node_modules/draft-js/lib/gkx.js","/home/vsts/work/1/s/node_modules/draft-js/lib/insertFragmentIntoContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/insertIntoList.js","/home/vsts/work/1/s/node_modules/draft-js/lib/insertTextIntoContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isElement.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isEventHandled.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isHTMLAnchorElement.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isHTMLBRElement.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isHTMLElement.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isHTMLImageElement.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isInstanceOfNode.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isSelectionAtLeafStart.js","/home/vsts/work/1/s/node_modules/draft-js/lib/isSoftNewlineEvent.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandBackspaceWord.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandDeleteWord.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandInsertNewline.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandPlainBackspace.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandPlainDelete.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandTransposeCharacters.js","/home/vsts/work/1/s/node_modules/draft-js/lib/keyCommandUndo.js","/home/vsts/work/1/s/node_modules/draft-js/lib/modifyBlockForContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/moveBlockInContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/moveSelectionBackward.js","/home/vsts/work/1/s/node_modules/draft-js/lib/moveSelectionForward.js","/home/vsts/work/1/s/node_modules/draft-js/lib/randomizeBlockMapKeys.js","/home/vsts/work/1/s/node_modules/draft-js/lib/removeEntitiesAtEdges.js","/home/vsts/work/1/s/node_modules/draft-js/lib/removeRangeFromContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/removeTextWithStrategy.js","/home/vsts/work/1/s/node_modules/draft-js/lib/sanitizeDraftText.js","/home/vsts/work/1/s/node_modules/draft-js/lib/setDraftEditorSelection.js","/home/vsts/work/1/s/node_modules/draft-js/lib/splitBlockInContentState.js","/home/vsts/work/1/s/node_modules/draft-js/lib/splitTextIntoTextBlocks.js","/home/vsts/work/1/s/node_modules/draft-js/lib/uuid.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/DataTransfer.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/Keys.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/PhotosMimeType.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/Scroll.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/Style.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/TokenizeUtil.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/URI.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidi.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiDirection.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/UnicodeBidiService.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/UnicodeUtils.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/UserAgent.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/UserAgentData.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/VersionRange.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/camelize.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/containsNode.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/createArrayFromMixed.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/cx.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/emptyFunction.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getActiveElement.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getDocumentScrollElement.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getElementPosition.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getElementRect.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getScrollPosition.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getStyleProperty.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getUnboundedScrollPosition.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/getViewportDimensions.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/hyphenate.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/invariant.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/isNode.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/isTextNode.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/joinClasses.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/mapObject.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/memoizeStringOnly.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/nullthrows.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/setImmediate.js","/home/vsts/work/1/s/node_modules/draft-js/node_modules/fbjs/lib/warning.js","/home/vsts/work/1/s/node_modules/object-assign/index.js","/home/vsts/work/1/s/node_modules/setimmediate/setImmediate.js","/home/vsts/work/1/s/node_modules/ua-parser-js/src/ua-parser.js"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar moveBlockInContentState = require(\"./moveBlockInContentState\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock;\nvar List = Immutable.List,\n Repeat = Immutable.Repeat;\nvar AtomicBlockUtils = {\n insertAtomicBlock: function insertAtomicBlock(editorState, entityKey, character) {\n var contentState = editorState.getCurrentContent();\n var selectionState = editorState.getSelection();\n var afterRemoval = DraftModifier.removeRange(contentState, selectionState, 'backward');\n var targetSelection = afterRemoval.getSelectionAfter();\n var afterSplit = DraftModifier.splitBlock(afterRemoval, targetSelection);\n var insertionTarget = afterSplit.getSelectionAfter();\n var asAtomicBlock = DraftModifier.setBlockType(afterSplit, insertionTarget, 'atomic');\n var charData = CharacterMetadata.create({\n entity: entityKey\n });\n var atomicBlockConfig = {\n key: generateRandomKey(),\n type: 'atomic',\n text: character,\n characterList: List(Repeat(charData, character.length))\n };\n var atomicDividerBlockConfig = {\n key: generateRandomKey(),\n type: 'unstyled'\n };\n\n if (experimentalTreeDataSupport) {\n atomicBlockConfig = _objectSpread({}, atomicBlockConfig, {\n nextSibling: atomicDividerBlockConfig.key\n });\n atomicDividerBlockConfig = _objectSpread({}, atomicDividerBlockConfig, {\n prevSibling: atomicBlockConfig.key\n });\n }\n\n var fragmentArray = [new ContentBlockRecord(atomicBlockConfig), new ContentBlockRecord(atomicDividerBlockConfig)];\n var fragment = BlockMapBuilder.createFromArray(fragmentArray);\n var withAtomicBlock = DraftModifier.replaceWithFragment(asAtomicBlock, insertionTarget, fragment);\n var newContent = withAtomicBlock.merge({\n selectionBefore: selectionState,\n selectionAfter: withAtomicBlock.getSelectionAfter().set('hasFocus', true)\n });\n return EditorState.push(editorState, newContent, 'insert-fragment');\n },\n moveAtomicBlock: function moveAtomicBlock(editorState, atomicBlock, targetRange, insertionMode) {\n var contentState = editorState.getCurrentContent();\n var selectionState = editorState.getSelection();\n var withMovedAtomicBlock;\n\n if (insertionMode === 'before' || insertionMode === 'after') {\n var targetBlock = contentState.getBlockForKey(insertionMode === 'before' ? targetRange.getStartKey() : targetRange.getEndKey());\n withMovedAtomicBlock = moveBlockInContentState(contentState, atomicBlock, targetBlock, insertionMode);\n } else {\n var afterRemoval = DraftModifier.removeRange(contentState, targetRange, 'backward');\n var selectionAfterRemoval = afterRemoval.getSelectionAfter();\n\n var _targetBlock = afterRemoval.getBlockForKey(selectionAfterRemoval.getFocusKey());\n\n if (selectionAfterRemoval.getStartOffset() === 0) {\n withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'before');\n } else if (selectionAfterRemoval.getEndOffset() === _targetBlock.getLength()) {\n withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'after');\n } else {\n var afterSplit = DraftModifier.splitBlock(afterRemoval, selectionAfterRemoval);\n var selectionAfterSplit = afterSplit.getSelectionAfter();\n\n var _targetBlock2 = afterSplit.getBlockForKey(selectionAfterSplit.getFocusKey());\n\n withMovedAtomicBlock = moveBlockInContentState(afterSplit, atomicBlock, _targetBlock2, 'before');\n }\n }\n\n var newContent = withMovedAtomicBlock.merge({\n selectionBefore: selectionState,\n selectionAfter: withMovedAtomicBlock.getSelectionAfter().set('hasFocus', true)\n });\n return EditorState.push(editorState, newContent, 'move-block');\n }\n};\nmodule.exports = AtomicBlockUtils;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Immutable = require(\"immutable\");\n\nvar OrderedMap = Immutable.OrderedMap;\nvar BlockMapBuilder = {\n createFromArray: function createFromArray(blocks) {\n return OrderedMap(blocks.map(function (block) {\n return [block.getKey(), block];\n }));\n }\n};\nmodule.exports = BlockMapBuilder;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar getOwnObjectValues = require(\"./getOwnObjectValues\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Repeat = Immutable.Repeat,\n Record = Immutable.Record;\n\nvar returnTrue = function returnTrue() {\n return true;\n};\n\nvar defaultLeafRange = {\n start: null,\n end: null\n};\nvar LeafRange = Record(defaultLeafRange);\nvar defaultDecoratorRange = {\n start: null,\n end: null,\n decoratorKey: null,\n leaves: null\n};\nvar DecoratorRange = Record(defaultDecoratorRange);\nvar BlockTree = {\n /**\n * Generate a block tree for a given ContentBlock/decorator pair.\n */\n generate: function generate(contentState, block, decorator) {\n var textLength = block.getLength();\n\n if (!textLength) {\n return List.of(new DecoratorRange({\n start: 0,\n end: 0,\n decoratorKey: null,\n leaves: List.of(new LeafRange({\n start: 0,\n end: 0\n }))\n }));\n }\n\n var leafSets = [];\n var decorations = decorator ? decorator.getDecorations(block, contentState) : List(Repeat(null, textLength));\n var chars = block.getCharacterList();\n findRangesImmutable(decorations, areEqual, returnTrue, function (start, end) {\n leafSets.push(new DecoratorRange({\n start: start,\n end: end,\n decoratorKey: decorations.get(start),\n leaves: generateLeaves(chars.slice(start, end).toList(), start)\n }));\n });\n return List(leafSets);\n },\n fromJS: function fromJS(_ref) {\n var leaves = _ref.leaves,\n other = _objectWithoutPropertiesLoose(_ref, [\"leaves\"]);\n\n return new DecoratorRange(_objectSpread({}, other, {\n leaves: leaves != null ? List(Array.isArray(leaves) ? leaves : getOwnObjectValues(leaves)).map(function (leaf) {\n return LeafRange(leaf);\n }) : null\n }));\n }\n};\n/**\n * Generate LeafRange records for a given character list.\n */\n\nfunction generateLeaves(characters, offset) {\n var leaves = [];\n var inlineStyles = characters.map(function (c) {\n return c.getStyle();\n }).toList();\n findRangesImmutable(inlineStyles, areEqual, returnTrue, function (start, end) {\n leaves.push(new LeafRange({\n start: start + offset,\n end: end + offset\n }));\n });\n return List(leaves);\n}\n\nfunction areEqual(a, b) {\n return a === b;\n}\n\nmodule.exports = BlockTree;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar _require = require(\"immutable\"),\n Map = _require.Map,\n OrderedSet = _require.OrderedSet,\n Record = _require.Record; // Immutable.map is typed such that the value for every key in the map\n// must be the same type\n\n\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n style: EMPTY_SET,\n entity: null\n};\nvar CharacterMetadataRecord = Record(defaultRecord);\n\nvar CharacterMetadata = /*#__PURE__*/function (_CharacterMetadataRec) {\n _inheritsLoose(CharacterMetadata, _CharacterMetadataRec);\n\n function CharacterMetadata() {\n return _CharacterMetadataRec.apply(this, arguments) || this;\n }\n\n var _proto = CharacterMetadata.prototype;\n\n _proto.getStyle = function getStyle() {\n return this.get('style');\n };\n\n _proto.getEntity = function getEntity() {\n return this.get('entity');\n };\n\n _proto.hasStyle = function hasStyle(style) {\n return this.getStyle().includes(style);\n };\n\n CharacterMetadata.applyStyle = function applyStyle(record, style) {\n var withStyle = record.set('style', record.getStyle().add(style));\n return CharacterMetadata.create(withStyle);\n };\n\n CharacterMetadata.removeStyle = function removeStyle(record, style) {\n var withoutStyle = record.set('style', record.getStyle().remove(style));\n return CharacterMetadata.create(withoutStyle);\n };\n\n CharacterMetadata.applyEntity = function applyEntity(record, entityKey) {\n var withEntity = record.getEntity() === entityKey ? record : record.set('entity', entityKey);\n return CharacterMetadata.create(withEntity);\n }\n /**\n * Use this function instead of the `CharacterMetadata` constructor.\n * Since most content generally uses only a very small number of\n * style/entity permutations, we can reuse these objects as often as\n * possible.\n */\n ;\n\n CharacterMetadata.create = function create(config) {\n if (!config) {\n return EMPTY;\n }\n\n var defaultConfig = {\n style: EMPTY_SET,\n entity: null\n }; // Fill in unspecified properties, if necessary.\n\n var configMap = Map(defaultConfig).merge(config);\n var existing = pool.get(configMap);\n\n if (existing) {\n return existing;\n }\n\n var newCharacter = new CharacterMetadata(configMap);\n pool = pool.set(configMap, newCharacter);\n return newCharacter;\n };\n\n CharacterMetadata.fromJS = function fromJS(_ref) {\n var style = _ref.style,\n entity = _ref.entity;\n return new CharacterMetadata({\n style: Array.isArray(style) ? OrderedSet(style) : style,\n entity: Array.isArray(entity) ? OrderedSet(entity) : entity\n });\n };\n\n return CharacterMetadata;\n}(CharacterMetadataRecord);\n\nvar EMPTY = new CharacterMetadata();\nvar pool = Map([[Map(defaultRecord), EMPTY]]);\nCharacterMetadata.EMPTY = EMPTY;\nmodule.exports = CharacterMetadata;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List;\nvar DELIMITER = '.';\n/**\n * A CompositeDraftDecorator traverses through a list of DraftDecorator\n * instances to identify sections of a ContentBlock that should be rendered\n * in a \"decorated\" manner. For example, hashtags, mentions, and links may\n * be intended to stand out visually, be rendered as anchors, etc.\n *\n * The list of decorators supplied to the constructor will be used in the\n * order they are provided. This allows the caller to specify a priority for\n * string matching, in case of match collisions among decorators.\n *\n * For instance, I may have a link with a `#` in its text. Though this section\n * of text may match our hashtag decorator, it should not be treated as a\n * hashtag. I should therefore list my link DraftDecorator\n * before my hashtag DraftDecorator when constructing this composite\n * decorator instance.\n *\n * Thus, when a collision like this is encountered, the earlier match is\n * preserved and the new match is discarded.\n */\n\nvar CompositeDraftDecorator = /*#__PURE__*/function () {\n function CompositeDraftDecorator(decorators) {\n _defineProperty(this, \"_decorators\", void 0);\n\n // Copy the decorator array, since we use this array order to determine\n // precedence of decoration matching. If the array is mutated externally,\n // we don't want to be affected here.\n this._decorators = decorators.slice();\n }\n\n var _proto = CompositeDraftDecorator.prototype;\n\n _proto.getDecorations = function getDecorations(block, contentState) {\n var decorations = Array(block.getText().length).fill(null);\n\n this._decorators.forEach(function (\n /*object*/\n decorator,\n /*number*/\n ii) {\n var counter = 0;\n var strategy = decorator.strategy;\n\n var callback = function callback(\n /*number*/\n start,\n /*number*/\n end) {\n // Find out if any of our matching range is already occupied\n // by another decorator. If so, discard the match. Otherwise, store\n // the component key for rendering.\n if (canOccupySlice(decorations, start, end)) {\n occupySlice(decorations, start, end, ii + DELIMITER + counter);\n counter++;\n }\n };\n\n strategy(block, callback, contentState);\n });\n\n return List(decorations);\n };\n\n _proto.getComponentForKey = function getComponentForKey(key) {\n var componentKey = parseInt(key.split(DELIMITER)[0], 10);\n return this._decorators[componentKey].component;\n };\n\n _proto.getPropsForKey = function getPropsForKey(key) {\n var componentKey = parseInt(key.split(DELIMITER)[0], 10);\n return this._decorators[componentKey].props;\n };\n\n return CompositeDraftDecorator;\n}();\n/**\n * Determine whether we can occupy the specified slice of the decorations\n * array.\n */\n\n\nfunction canOccupySlice(decorations, start, end) {\n for (var ii = start; ii < end; ii++) {\n if (decorations[ii] != null) {\n return false;\n }\n }\n\n return true;\n}\n/**\n * Splice the specified component into our decoration array at the desired\n * range.\n */\n\n\nfunction occupySlice(targetArr, start, end, componentKey) {\n for (var ii = start; ii < end; ii++) {\n targetArr[ii] = componentKey;\n }\n}\n\nmodule.exports = CompositeDraftDecorator;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat;\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n key: '',\n type: 'unstyled',\n text: '',\n characterList: List(),\n depth: 0,\n data: Map()\n};\nvar ContentBlockRecord = Record(defaultRecord);\n\nvar decorateCharacterList = function decorateCharacterList(config) {\n if (!config) {\n return config;\n }\n\n var characterList = config.characterList,\n text = config.text;\n\n if (text && !characterList) {\n config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length));\n }\n\n return config;\n};\n\nvar ContentBlock = /*#__PURE__*/function (_ContentBlockRecord) {\n _inheritsLoose(ContentBlock, _ContentBlockRecord);\n\n function ContentBlock(config) {\n return _ContentBlockRecord.call(this, decorateCharacterList(config)) || this;\n }\n\n var _proto = ContentBlock.prototype;\n\n _proto.getKey = function getKey() {\n return this.get('key');\n };\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getText = function getText() {\n return this.get('text');\n };\n\n _proto.getCharacterList = function getCharacterList() {\n return this.get('characterList');\n };\n\n _proto.getLength = function getLength() {\n return this.getText().length;\n };\n\n _proto.getDepth = function getDepth() {\n return this.get('depth');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n _proto.getInlineStyleAt = function getInlineStyleAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getStyle() : EMPTY_SET;\n };\n\n _proto.getEntityAt = function getEntityAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getEntity() : null;\n }\n /**\n * Execute a callback for every contiguous range of styles within the block.\n */\n ;\n\n _proto.findStyleRanges = function findStyleRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback);\n }\n /**\n * Execute a callback for every contiguous range of entities within the block.\n */\n ;\n\n _proto.findEntityRanges = function findEntityRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback);\n };\n\n return ContentBlock;\n}(ContentBlockRecord);\n\nfunction haveEqualStyle(charA, charB) {\n return charA.getStyle() === charB.getStyle();\n}\n\nfunction haveEqualEntity(charA, charB) {\n return charA.getEntity() === charB.getEntity();\n}\n\nmodule.exports = ContentBlock;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of ContentBlock adding support for nesting references by\n * providing links to children, parent, prevSibling, and nextSibling.\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat;\nvar EMPTY_SET = OrderedSet();\nvar defaultRecord = {\n parent: null,\n characterList: List(),\n data: Map(),\n depth: 0,\n key: '',\n text: '',\n type: 'unstyled',\n children: List(),\n prevSibling: null,\n nextSibling: null\n};\n\nvar haveEqualStyle = function haveEqualStyle(charA, charB) {\n return charA.getStyle() === charB.getStyle();\n};\n\nvar haveEqualEntity = function haveEqualEntity(charA, charB) {\n return charA.getEntity() === charB.getEntity();\n};\n\nvar decorateCharacterList = function decorateCharacterList(config) {\n if (!config) {\n return config;\n }\n\n var characterList = config.characterList,\n text = config.text;\n\n if (text && !characterList) {\n config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length));\n }\n\n return config;\n};\n\nvar ContentBlockNode = /*#__PURE__*/function (_ref) {\n _inheritsLoose(ContentBlockNode, _ref);\n\n function ContentBlockNode() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultRecord;\n\n /* eslint-disable-next-line constructor-super */\n return _ref.call(this, decorateCharacterList(props)) || this;\n }\n\n var _proto = ContentBlockNode.prototype;\n\n _proto.getKey = function getKey() {\n return this.get('key');\n };\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getText = function getText() {\n return this.get('text');\n };\n\n _proto.getCharacterList = function getCharacterList() {\n return this.get('characterList');\n };\n\n _proto.getLength = function getLength() {\n return this.getText().length;\n };\n\n _proto.getDepth = function getDepth() {\n return this.get('depth');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n _proto.getInlineStyleAt = function getInlineStyleAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getStyle() : EMPTY_SET;\n };\n\n _proto.getEntityAt = function getEntityAt(offset) {\n var character = this.getCharacterList().get(offset);\n return character ? character.getEntity() : null;\n };\n\n _proto.getChildKeys = function getChildKeys() {\n return this.get('children');\n };\n\n _proto.getParentKey = function getParentKey() {\n return this.get('parent');\n };\n\n _proto.getPrevSiblingKey = function getPrevSiblingKey() {\n return this.get('prevSibling');\n };\n\n _proto.getNextSiblingKey = function getNextSiblingKey() {\n return this.get('nextSibling');\n };\n\n _proto.findStyleRanges = function findStyleRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback);\n };\n\n _proto.findEntityRanges = function findEntityRanges(filterFn, callback) {\n findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback);\n };\n\n return ContentBlockNode;\n}(Record(defaultRecord));\n\nmodule.exports = ContentBlockNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getOwnObjectValues = require(\"./getOwnObjectValues\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar sanitizeDraftText = require(\"./sanitizeDraftText\");\n\nvar List = Immutable.List,\n Record = Immutable.Record,\n Repeat = Immutable.Repeat,\n ImmutableMap = Immutable.Map,\n OrderedMap = Immutable.OrderedMap;\nvar defaultRecord = {\n entityMap: null,\n blockMap: null,\n selectionBefore: null,\n selectionAfter: null\n};\nvar ContentStateRecord = Record(defaultRecord);\n/* $FlowFixMe[signature-verification-failure] Supressing a `signature-\n * verification-failure` error here. TODO: T65949050 Clean up the branch for\n * this GK */\n\nvar ContentBlockNodeRecord = gkx('draft_tree_data_support') ? ContentBlockNode : ContentBlock;\n\nvar ContentState = /*#__PURE__*/function (_ContentStateRecord) {\n _inheritsLoose(ContentState, _ContentStateRecord);\n\n function ContentState() {\n return _ContentStateRecord.apply(this, arguments) || this;\n }\n\n var _proto = ContentState.prototype;\n\n _proto.getEntityMap = function getEntityMap() {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity;\n };\n\n _proto.getBlockMap = function getBlockMap() {\n return this.get('blockMap');\n };\n\n _proto.getSelectionBefore = function getSelectionBefore() {\n return this.get('selectionBefore');\n };\n\n _proto.getSelectionAfter = function getSelectionAfter() {\n return this.get('selectionAfter');\n };\n\n _proto.getBlockForKey = function getBlockForKey(key) {\n var block = this.getBlockMap().get(key);\n return block;\n };\n\n _proto.getKeyBefore = function getKeyBefore(key) {\n return this.getBlockMap().reverse().keySeq().skipUntil(function (v) {\n return v === key;\n }).skip(1).first();\n };\n\n _proto.getKeyAfter = function getKeyAfter(key) {\n return this.getBlockMap().keySeq().skipUntil(function (v) {\n return v === key;\n }).skip(1).first();\n };\n\n _proto.getBlockAfter = function getBlockAfter(key) {\n return this.getBlockMap().skipUntil(function (_, k) {\n return k === key;\n }).skip(1).first();\n };\n\n _proto.getBlockBefore = function getBlockBefore(key) {\n return this.getBlockMap().reverse().skipUntil(function (_, k) {\n return k === key;\n }).skip(1).first();\n };\n\n _proto.getBlocksAsArray = function getBlocksAsArray() {\n return this.getBlockMap().toArray();\n };\n\n _proto.getFirstBlock = function getFirstBlock() {\n return this.getBlockMap().first();\n };\n\n _proto.getLastBlock = function getLastBlock() {\n return this.getBlockMap().last();\n };\n\n _proto.getPlainText = function getPlainText(delimiter) {\n return this.getBlockMap().map(function (block) {\n return block ? block.getText() : '';\n }).join(delimiter || '\\n');\n };\n\n _proto.getLastCreatedEntityKey = function getLastCreatedEntityKey() {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity.__getLastCreatedEntityKey();\n };\n\n _proto.hasText = function hasText() {\n var blockMap = this.getBlockMap();\n return blockMap.size > 1 || // make sure that there are no zero width space chars\n escape(blockMap.first().getText()).replace(/%u200B/g, '').length > 0;\n };\n\n _proto.createEntity = function createEntity(type, mutability, data) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__create(type, mutability, data);\n\n return this;\n };\n\n _proto.mergeEntityData = function mergeEntityData(key, toMerge) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__mergeData(key, toMerge);\n\n return this;\n };\n\n _proto.replaceEntityData = function replaceEntityData(key, newData) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__replaceData(key, newData);\n\n return this;\n };\n\n _proto.addEntity = function addEntity(instance) {\n // TODO: update this when we fully remove DraftEntity\n DraftEntity.__add(instance);\n\n return this;\n };\n\n _proto.getEntity = function getEntity(key) {\n // TODO: update this when we fully remove DraftEntity\n return DraftEntity.__get(key);\n };\n\n _proto.getAllEntities = function getAllEntities() {\n return DraftEntity.__getAll();\n };\n\n _proto.loadWithEntities = function loadWithEntities(entities) {\n return DraftEntity.__loadWithEntities(entities);\n };\n\n ContentState.createFromBlockArray = function createFromBlockArray( // TODO: update flow type when we completely deprecate the old entity API\n blocks, entityMap) {\n // TODO: remove this when we completely deprecate the old entity API\n var theBlocks = Array.isArray(blocks) ? blocks : blocks.contentBlocks;\n var blockMap = BlockMapBuilder.createFromArray(theBlocks);\n var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey());\n return new ContentState({\n blockMap: blockMap,\n entityMap: entityMap || DraftEntity,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n };\n\n ContentState.createFromText = function createFromText(text) {\n var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : /\\r\\n?|\\n/g;\n var strings = text.split(delimiter);\n var blocks = strings.map(function (block) {\n block = sanitizeDraftText(block);\n return new ContentBlockNodeRecord({\n key: generateRandomKey(),\n text: block,\n type: 'unstyled',\n characterList: List(Repeat(CharacterMetadata.EMPTY, block.length))\n });\n });\n return ContentState.createFromBlockArray(blocks);\n };\n\n ContentState.fromJS = function fromJS(state) {\n return new ContentState(_objectSpread({}, state, {\n blockMap: OrderedMap(state.blockMap).map(ContentState.createContentBlockFromJS),\n selectionBefore: new SelectionState(state.selectionBefore),\n selectionAfter: new SelectionState(state.selectionAfter)\n }));\n };\n\n ContentState.createContentBlockFromJS = function createContentBlockFromJS(block) {\n var characterList = block.characterList;\n return new ContentBlockNodeRecord(_objectSpread({}, block, {\n data: ImmutableMap(block.data),\n characterList: characterList != null ? List((Array.isArray(characterList) ? characterList : getOwnObjectValues(characterList)).map(function (c) {\n return CharacterMetadata.fromJS(c);\n })) : undefined\n }));\n };\n\n return ContentState;\n}(ContentStateRecord);\n\nmodule.exports = ContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar _require = require(\"immutable\"),\n Map = _require.Map;\n\nvar ContentStateInlineStyle = {\n add: function add(contentState, selectionState, inlineStyle) {\n return modifyInlineStyle(contentState, selectionState, inlineStyle, true);\n },\n remove: function remove(contentState, selectionState, inlineStyle) {\n return modifyInlineStyle(contentState, selectionState, inlineStyle, false);\n }\n};\n\nfunction modifyInlineStyle(contentState, selectionState, inlineStyle, addOrRemove) {\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var newBlocks = blockMap.skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat(Map([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) {\n var sliceStart;\n var sliceEnd;\n\n if (startKey === endKey) {\n sliceStart = startOffset;\n sliceEnd = endOffset;\n } else {\n sliceStart = blockKey === startKey ? startOffset : 0;\n sliceEnd = blockKey === endKey ? endOffset : block.getLength();\n }\n\n var chars = block.getCharacterList();\n var current;\n\n while (sliceStart < sliceEnd) {\n current = chars.get(sliceStart);\n chars = chars.set(sliceStart, addOrRemove ? CharacterMetadata.applyStyle(current, inlineStyle) : CharacterMetadata.removeStyle(current, inlineStyle));\n sliceStart++;\n }\n\n return block.set('characterList', chars);\n });\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = ContentStateInlineStyle;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar getWindowForNode = require(\"./getWindowForNode\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar Map = Immutable.Map;\n// Heavily based on Prosemirror's DOMObserver https://github.com/ProseMirror/prosemirror-view/blob/master/src/domobserver.js\nvar DOM_OBSERVER_OPTIONS = {\n subtree: true,\n characterData: true,\n childList: true,\n characterDataOldValue: false,\n attributes: false\n}; // IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\n\nvar USE_CHAR_DATA = UserAgent.isBrowser('IE <= 11');\n\nvar DOMObserver = /*#__PURE__*/function () {\n function DOMObserver(container) {\n var _this = this;\n\n _defineProperty(this, \"observer\", void 0);\n\n _defineProperty(this, \"container\", void 0);\n\n _defineProperty(this, \"mutations\", void 0);\n\n _defineProperty(this, \"onCharData\", void 0);\n\n this.container = container;\n this.mutations = Map();\n var containerWindow = getWindowForNode(container);\n\n if (containerWindow.MutationObserver && !USE_CHAR_DATA) {\n this.observer = new containerWindow.MutationObserver(function (mutations) {\n return _this.registerMutations(mutations);\n });\n } else {\n this.onCharData = function (e) {\n !(e.target instanceof Node) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Expected target to be an instance of Node') : invariant(false) : void 0;\n\n _this.registerMutation({\n type: 'characterData',\n target: e.target\n });\n };\n }\n }\n\n var _proto = DOMObserver.prototype;\n\n _proto.start = function start() {\n if (this.observer) {\n this.observer.observe(this.container, DOM_OBSERVER_OPTIONS);\n } else {\n /* $FlowFixMe[incompatible-call] (>=0.68.0 site=www,mobile) This event\n * type is not defined by Flow's standard library */\n this.container.addEventListener('DOMCharacterDataModified', this.onCharData);\n }\n };\n\n _proto.stopAndFlushMutations = function stopAndFlushMutations() {\n var observer = this.observer;\n\n if (observer) {\n this.registerMutations(observer.takeRecords());\n observer.disconnect();\n } else {\n /* $FlowFixMe[incompatible-call] (>=0.68.0 site=www,mobile) This event\n * type is not defined by Flow's standard library */\n this.container.removeEventListener('DOMCharacterDataModified', this.onCharData);\n }\n\n var mutations = this.mutations;\n this.mutations = Map();\n return mutations;\n };\n\n _proto.registerMutations = function registerMutations(mutations) {\n for (var i = 0; i < mutations.length; i++) {\n this.registerMutation(mutations[i]);\n }\n };\n\n _proto.getMutationTextContent = function getMutationTextContent(mutation) {\n var type = mutation.type,\n target = mutation.target,\n removedNodes = mutation.removedNodes;\n\n if (type === 'characterData') {\n // When `textContent` is '', there is a race condition that makes\n // getting the offsetKey from the target not possible.\n // These events are also followed by a `childList`, which is the one\n // we are able to retrieve the offsetKey and apply the '' text.\n if (target.textContent !== '') {\n // IE 11 considers the enter keypress that concludes the composition\n // as an input char. This strips that newline character so the draft\n // state does not receive spurious newlines.\n if (USE_CHAR_DATA) {\n return target.textContent.replace('\\n', '');\n }\n\n return target.textContent;\n }\n } else if (type === 'childList') {\n if (removedNodes && removedNodes.length) {\n // `characterData` events won't happen or are ignored when\n // removing the last character of a leaf node, what happens\n // instead is a `childList` event with a `removedNodes` array.\n // For this case the textContent should be '' and\n // `DraftModifier.replaceText` will make sure the content is\n // updated properly.\n return '';\n } else if (target.textContent !== '') {\n // Typing Chinese in an empty block in MS Edge results in a\n // `childList` event with non-empty textContent.\n // See https://github.com/facebook/draft-js/issues/2082\n return target.textContent;\n }\n }\n\n return null;\n };\n\n _proto.registerMutation = function registerMutation(mutation) {\n var textContent = this.getMutationTextContent(mutation);\n\n if (textContent != null) {\n var offsetKey = nullthrows(findAncestorOffsetKey(mutation.target));\n this.mutations = this.mutations.set(offsetKey, textContent);\n }\n };\n\n return DOMObserver;\n}();\n\nmodule.exports = DOMObserver;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar _require = require(\"immutable\"),\n Map = _require.Map;\n\nvar UL_WRAP = React.createElement(\"ul\", {\n className: cx('public/DraftStyleDefault/ul')\n});\nvar OL_WRAP = React.createElement(\"ol\", {\n className: cx('public/DraftStyleDefault/ol')\n});\nvar PRE_WRAP = React.createElement(\"pre\", {\n className: cx('public/DraftStyleDefault/pre')\n});\nvar DefaultDraftBlockRenderMap = Map({\n 'header-one': {\n element: 'h1'\n },\n 'header-two': {\n element: 'h2'\n },\n 'header-three': {\n element: 'h3'\n },\n 'header-four': {\n element: 'h4'\n },\n 'header-five': {\n element: 'h5'\n },\n 'header-six': {\n element: 'h6'\n },\n section: {\n element: 'section'\n },\n article: {\n element: 'article'\n },\n 'unordered-list-item': {\n element: 'li',\n wrapper: UL_WRAP\n },\n 'ordered-list-item': {\n element: 'li',\n wrapper: OL_WRAP\n },\n blockquote: {\n element: 'blockquote'\n },\n atomic: {\n element: 'figure'\n },\n 'code-block': {\n element: 'pre',\n wrapper: PRE_WRAP\n },\n unstyled: {\n element: 'div',\n aliasedElements: ['p']\n }\n});\nmodule.exports = DefaultDraftBlockRenderMap;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nmodule.exports = {\n BOLD: {\n fontWeight: 'bold'\n },\n CODE: {\n fontFamily: 'monospace',\n wordWrap: 'break-word'\n },\n ITALIC: {\n fontStyle: 'italic'\n },\n STRIKETHROUGH: {\n textDecoration: 'line-through'\n },\n UNDERLINE: {\n textDecoration: 'underline'\n }\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nvar AtomicBlockUtils = require(\"./AtomicBlockUtils\");\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar CompositeDraftDecorator = require(\"./CompositeDraftDecorator\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentState = require(\"./ContentState\");\n\nvar DefaultDraftBlockRenderMap = require(\"./DefaultDraftBlockRenderMap\");\n\nvar DefaultDraftInlineStyle = require(\"./DefaultDraftInlineStyle\");\n\nvar DraftEditor = require(\"./DraftEditor.react\");\n\nvar DraftEditorBlock = require(\"./DraftEditorBlock.react\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftEntityInstance = require(\"./DraftEntityInstance\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar KeyBindingUtil = require(\"./KeyBindingUtil\");\n\nvar RawDraftContentState = require(\"./RawDraftContentState\");\n\nvar RichTextEditorUtil = require(\"./RichTextEditorUtil\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar convertFromDraftStateToRaw = require(\"./convertFromDraftStateToRaw\");\n\nvar convertFromRawToDraftState = require(\"./convertFromRawToDraftState\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getDefaultKeyBinding = require(\"./getDefaultKeyBinding\");\n\nvar getVisibleSelectionRect = require(\"./getVisibleSelectionRect\");\n\nvar convertFromHTML = require(\"./convertFromHTMLToContentBlocks\");\n\nvar DraftPublic = {\n Editor: DraftEditor,\n EditorBlock: DraftEditorBlock,\n EditorState: EditorState,\n CompositeDecorator: CompositeDraftDecorator,\n Entity: DraftEntity,\n EntityInstance: DraftEntityInstance,\n BlockMapBuilder: BlockMapBuilder,\n CharacterMetadata: CharacterMetadata,\n ContentBlock: ContentBlock,\n ContentState: ContentState,\n RawDraftContentState: RawDraftContentState,\n SelectionState: SelectionState,\n AtomicBlockUtils: AtomicBlockUtils,\n KeyBindingUtil: KeyBindingUtil,\n Modifier: DraftModifier,\n RichUtils: RichTextEditorUtil,\n DefaultDraftBlockRenderMap: DefaultDraftBlockRenderMap,\n DefaultDraftInlineStyle: DefaultDraftInlineStyle,\n convertFromHTML: convertFromHTML,\n convertFromRaw: convertFromRawToDraftState,\n convertToRaw: convertFromDraftStateToRaw,\n genKey: generateRandomKey,\n getDefaultKeyBinding: getDefaultKeyBinding,\n getVisibleSelectionRect: getVisibleSelectionRect\n};\nmodule.exports = DraftPublic;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @preventMunge\n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DefaultDraftBlockRenderMap = require(\"./DefaultDraftBlockRenderMap\");\n\nvar DefaultDraftInlineStyle = require(\"./DefaultDraftInlineStyle\");\n\nvar DraftEditorCompositionHandler = require(\"./DraftEditorCompositionHandler\");\n\nvar DraftEditorContents = require(\"./DraftEditorContents.react\");\n\nvar DraftEditorDragHandler = require(\"./DraftEditorDragHandler\");\n\nvar DraftEditorEditHandler = require(\"./DraftEditorEditHandler\");\n\nvar flushControlled = require(\"./DraftEditorFlushControlled\");\n\nvar DraftEditorPlaceholder = require(\"./DraftEditorPlaceholder.react\");\n\nvar DraftEffects = require(\"./DraftEffects\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar React = require(\"react\");\n\nvar Scroll = require(\"fbjs/lib/Scroll\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getDefaultKeyBinding = require(\"./getDefaultKeyBinding\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar gkx = require(\"./gkx\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar isIE = UserAgent.isBrowser('IE'); // IE does not support the `input` event on contentEditable, so we can't\n// observe spellcheck behavior.\n\nvar allowSpellCheck = !isIE; // Define a set of handler objects to correspond to each possible `mode`\n// of editor behavior.\n\nvar handlerMap = {\n edit: DraftEditorEditHandler,\n composite: DraftEditorCompositionHandler,\n drag: DraftEditorDragHandler,\n cut: null,\n render: null\n};\nvar didInitODS = false;\n\nvar UpdateDraftEditorFlags = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(UpdateDraftEditorFlags, _React$Component);\n\n function UpdateDraftEditorFlags() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = UpdateDraftEditorFlags.prototype;\n\n _proto.render = function render() {\n return null;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._update();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._update();\n };\n\n _proto._update = function _update() {\n var editor = this.props.editor;\n /**\n * Sometimes a render triggers a 'focus' or other event, and that will\n * schedule a second render pass.\n * In order to make sure the second render pass gets the latest editor\n * state, we update it here.\n * Example:\n * render #1\n * +\n * |\n * | cWU -> Nothing ... latestEditorState = STALE_STATE :(\n * |\n * | render -> this.props.editorState = FRESH_STATE\n * | + *and* set latestEditorState = FRESH_STATE\n * |\n * | |\n * | +--> triggers 'focus' event, calling 'handleFocus' with latestEditorState\n * | +\n * | |\n * +>cdU -> latestEditorState = FRESH_STATE | the 'handleFocus' call schedules render #2\n * | with latestEditorState, which is FRESH_STATE\n * |\n * render #2 <--------------------------------------+\n * +\n * |\n * | cwU -> nothing updates\n * |\n * | render -> this.props.editorState = FRESH_STATE which was passed in above\n * |\n * +>cdU fires and resets latestEditorState = FRESH_STATE\n * ---\n * Note that if we don't set latestEditorState in 'render' in the above\n * diagram, then STALE_STATE gets passed to render #2.\n */\n\n editor._latestEditorState = this.props.editorState;\n /**\n * The reason we set this 'blockSelectEvents' flag is that IE will fire a\n * 'selectionChange' event when we programmatically change the selection,\n * meaning it would trigger a new select event while we are in the middle\n * of updating.\n * We found that the 'selection.addRange' was what triggered the stray\n * selectionchange event in IE.\n * To be clear - we have not been able to reproduce specific bugs related\n * to this stray selection event, but have recorded logs that some\n * conditions do cause it to get bumped into during editOnSelect.\n */\n\n editor._blockSelectEvents = true;\n };\n\n return UpdateDraftEditorFlags;\n}(React.Component);\n/**\n * `DraftEditor` is the root editor component. It composes a `contentEditable`\n * div, and provides a wide variety of useful function props for managing the\n * state of the editor. See `DraftEditorProps` for details.\n */\n\n\nvar DraftEditor = /*#__PURE__*/function (_React$Component2) {\n _inheritsLoose(DraftEditor, _React$Component2);\n\n /**\n * Define proxies that can route events to the current handler.\n */\n function DraftEditor(props) {\n var _this;\n\n _this = _React$Component2.call(this, props) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"_blockSelectEvents\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_clipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_handler\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_dragCount\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_internalDrag\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_editorKey\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_placeholderAccessibilityID\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_latestEditorState\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_latestCommittedEditorState\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_pendingStateFromBeforeInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onBeforeInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onBlur\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCharacterData\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCompositionEnd\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCompositionStart\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCopy\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onCut\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragEnd\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragOver\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDragStart\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onDrop\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onInput\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onFocus\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyDown\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyPress\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyUp\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onMouseDown\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onMouseUp\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onPaste\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onSelect\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"editor\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"editorContainer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"focus\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"blur\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"setMode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"exitCurrentMode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"restoreEditorDOM\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"setClipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"getClipboard\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"getEditorKey\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"update\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_handleEditorContainerRef\", function (node) {\n _this.editorContainer = node; // Instead of having a direct ref on the child, we'll grab it here.\n // This is safe as long as the rendered structure is static (which it is).\n // This lets the child support ref={props.editorRef} without merging refs.\n\n _this.editor = node !== null ? node.firstChild : null;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"focus\", function (scrollPosition) {\n var editorState = _this.props.editorState;\n var alreadyHasFocus = editorState.getSelection().getHasFocus();\n var editorNode = _this.editor;\n\n if (!editorNode) {\n // once in a while people call 'focus' in a setTimeout, and the node has\n // been deleted, so it can be null in that case.\n return;\n }\n\n var scrollParent = Style.getScrollParent(editorNode);\n\n var _ref = scrollPosition || getScrollPosition(scrollParent),\n x = _ref.x,\n y = _ref.y;\n\n !isHTMLElement(editorNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'editorNode is not an HTMLElement') : invariant(false) : void 0;\n editorNode.focus(); // Restore scroll position\n\n if (scrollParent === window) {\n window.scrollTo(x, y);\n } else {\n Scroll.setTop(scrollParent, y);\n } // On Chrome and Safari, calling focus on contenteditable focuses the\n // cursor at the first character. This is something you don't expect when\n // you're clicking on an input element but not directly on a character.\n // Put the cursor back where it was before the blur.\n\n\n if (!alreadyHasFocus) {\n _this.update(EditorState.forceSelection(editorState, editorState.getSelection()));\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"blur\", function () {\n var editorNode = _this.editor;\n\n if (!editorNode) {\n return;\n }\n\n !isHTMLElement(editorNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'editorNode is not an HTMLElement') : invariant(false) : void 0;\n editorNode.blur();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setMode\", function (mode) {\n var _this$props = _this.props,\n onPaste = _this$props.onPaste,\n onCut = _this$props.onCut,\n onCopy = _this$props.onCopy;\n\n var editHandler = _objectSpread({}, handlerMap.edit);\n\n if (onPaste) {\n /* $FlowFixMe[incompatible-type] (>=0.117.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.117 was deployed. To see the\n * error delete this comment and run Flow. */\n editHandler.onPaste = onPaste;\n }\n\n if (onCut) {\n editHandler.onCut = onCut;\n }\n\n if (onCopy) {\n editHandler.onCopy = onCopy;\n }\n\n var handler = _objectSpread({}, handlerMap, {\n edit: editHandler\n });\n\n _this._handler = handler[mode];\n });\n\n _defineProperty(_assertThisInitialized(_this), \"exitCurrentMode\", function () {\n _this.setMode('edit');\n });\n\n _defineProperty(_assertThisInitialized(_this), \"restoreEditorDOM\", function (scrollPosition) {\n _this.setState({\n contentsKey: _this.state.contentsKey + 1\n }, function () {\n _this.focus(scrollPosition);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setClipboard\", function (clipboard) {\n _this._clipboard = clipboard;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getClipboard\", function () {\n return _this._clipboard;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"update\", function (editorState) {\n _this._latestEditorState = editorState;\n\n _this.props.onChange(editorState);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", function () {\n _this._dragCount++;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", function () {\n _this._dragCount--;\n\n if (_this._dragCount === 0) {\n _this.exitCurrentMode();\n }\n });\n\n _this._blockSelectEvents = false;\n _this._clipboard = null;\n _this._handler = null;\n _this._dragCount = 0;\n _this._editorKey = props.editorKey || generateRandomKey();\n _this._placeholderAccessibilityID = 'placeholder-' + _this._editorKey;\n _this._latestEditorState = props.editorState;\n _this._latestCommittedEditorState = props.editorState;\n _this._onBeforeInput = _this._buildHandler('onBeforeInput');\n _this._onBlur = _this._buildHandler('onBlur');\n _this._onCharacterData = _this._buildHandler('onCharacterData');\n _this._onCompositionEnd = _this._buildHandler('onCompositionEnd');\n _this._onCompositionStart = _this._buildHandler('onCompositionStart');\n _this._onCopy = _this._buildHandler('onCopy');\n _this._onCut = _this._buildHandler('onCut');\n _this._onDragEnd = _this._buildHandler('onDragEnd');\n _this._onDragOver = _this._buildHandler('onDragOver');\n _this._onDragStart = _this._buildHandler('onDragStart');\n _this._onDrop = _this._buildHandler('onDrop');\n _this._onInput = _this._buildHandler('onInput');\n _this._onFocus = _this._buildHandler('onFocus');\n _this._onKeyDown = _this._buildHandler('onKeyDown');\n _this._onKeyPress = _this._buildHandler('onKeyPress');\n _this._onKeyUp = _this._buildHandler('onKeyUp');\n _this._onMouseDown = _this._buildHandler('onMouseDown');\n _this._onMouseUp = _this._buildHandler('onMouseUp');\n _this._onPaste = _this._buildHandler('onPaste');\n _this._onSelect = _this._buildHandler('onSelect');\n\n _this.getEditorKey = function () {\n return _this._editorKey;\n };\n\n if (process.env.NODE_ENV !== \"production\") {\n ['onDownArrow', 'onEscape', 'onLeftArrow', 'onRightArrow', 'onTab', 'onUpArrow'].forEach(function (propName) {\n if (props.hasOwnProperty(propName)) {\n // eslint-disable-next-line no-console\n console.warn(\"Supplying an `\".concat(propName, \"` prop to `DraftEditor` has \") + 'been deprecated. If your handler needs access to the keyboard ' + 'event, supply a custom `keyBindingFn` prop that falls back to ' + 'the default one (eg. https://is.gd/wHKQ3W).');\n }\n });\n } // See `restoreEditorDOM()`.\n\n\n _this.state = {\n contentsKey: 0\n };\n return _this;\n }\n /**\n * Build a method that will pass the event to the specified handler method.\n * This allows us to look up the correct handler function for the current\n * editor mode, if any has been specified.\n */\n\n\n var _proto2 = DraftEditor.prototype;\n\n _proto2._buildHandler = function _buildHandler(eventName) {\n var _this2 = this;\n\n // Wrap event handlers in `flushControlled`. In sync mode, this is\n // effectively a no-op. In async mode, this ensures all updates scheduled\n // inside the handler are flushed before React yields to the browser.\n return function (e) {\n if (!_this2.props.readOnly) {\n var method = _this2._handler && _this2._handler[eventName];\n\n if (method) {\n if (flushControlled) {\n flushControlled(function () {\n return method(_this2, e);\n });\n } else {\n method(_this2, e);\n }\n }\n }\n };\n };\n\n _proto2._showPlaceholder = function _showPlaceholder() {\n return !!this.props.placeholder && !this.props.editorState.isInCompositionMode() && !this.props.editorState.getCurrentContent().hasText();\n };\n\n _proto2._renderPlaceholder = function _renderPlaceholder() {\n if (this._showPlaceholder()) {\n var placeHolderProps = {\n text: nullthrows(this.props.placeholder),\n editorState: this.props.editorState,\n textAlignment: this.props.textAlignment,\n accessibilityID: this._placeholderAccessibilityID\n };\n /* $FlowFixMe[incompatible-type] (>=0.112.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.112 was deployed. To see the\n * error delete this comment and run Flow. */\n\n return React.createElement(DraftEditorPlaceholder, placeHolderProps);\n }\n\n return null;\n }\n /**\n * returns ariaDescribedBy prop with '{{editor_id_placeholder}}' replaced with\n * the DOM id of the placeholder (if it exists)\n * @returns aria-describedby attribute value\n */\n ;\n\n _proto2._renderARIADescribedBy = function _renderARIADescribedBy() {\n var describedBy = this.props.ariaDescribedBy || '';\n var placeholderID = this._showPlaceholder() ? this._placeholderAccessibilityID : '';\n return describedBy.replace('{{editor_id_placeholder}}', placeholderID) || undefined;\n };\n\n _proto2.render = function render() {\n var _this$props2 = this.props,\n blockRenderMap = _this$props2.blockRenderMap,\n blockRendererFn = _this$props2.blockRendererFn,\n blockStyleFn = _this$props2.blockStyleFn,\n customStyleFn = _this$props2.customStyleFn,\n customStyleMap = _this$props2.customStyleMap,\n editorState = _this$props2.editorState,\n preventScroll = _this$props2.preventScroll,\n readOnly = _this$props2.readOnly,\n textAlignment = _this$props2.textAlignment,\n textDirectionality = _this$props2.textDirectionality;\n var rootClass = cx({\n 'DraftEditor/root': true,\n 'DraftEditor/alignLeft': textAlignment === 'left',\n 'DraftEditor/alignRight': textAlignment === 'right',\n 'DraftEditor/alignCenter': textAlignment === 'center'\n });\n var contentStyle = {\n outline: 'none',\n // fix parent-draggable Safari bug. #1326\n userSelect: 'text',\n WebkitUserSelect: 'text',\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word'\n }; // The aria-expanded and aria-haspopup properties should only be rendered\n // for a combobox.\n\n /* $FlowFixMe[prop-missing] (>=0.68.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the error\n * delete this comment and run Flow. */\n\n var ariaRole = this.props.role || 'textbox';\n var ariaExpanded = ariaRole === 'combobox' ? !!this.props.ariaExpanded : null;\n var editorContentsProps = {\n blockRenderMap: blockRenderMap,\n blockRendererFn: blockRendererFn,\n blockStyleFn: blockStyleFn,\n customStyleMap: _objectSpread({}, DefaultDraftInlineStyle, customStyleMap),\n customStyleFn: customStyleFn,\n editorKey: this._editorKey,\n editorState: editorState,\n preventScroll: preventScroll,\n textDirectionality: textDirectionality\n };\n return React.createElement(\"div\", {\n className: rootClass\n }, this._renderPlaceholder(), React.createElement(\"div\", {\n className: cx('DraftEditor/editorContainer'),\n ref: this._handleEditorContainerRef\n }, React.createElement(\"div\", {\n \"aria-activedescendant\": readOnly ? null : this.props.ariaActiveDescendantID,\n \"aria-autocomplete\": readOnly ? null : this.props.ariaAutoComplete,\n \"aria-controls\": readOnly ? null : this.props.ariaControls,\n \"aria-describedby\": this._renderARIADescribedBy(),\n \"aria-expanded\": readOnly ? null : ariaExpanded,\n \"aria-label\": this.props.ariaLabel,\n \"aria-labelledby\": this.props.ariaLabelledBy,\n \"aria-multiline\": this.props.ariaMultiline,\n \"aria-owns\": readOnly ? null : this.props.ariaOwneeID,\n autoCapitalize: this.props.autoCapitalize,\n autoComplete: this.props.autoComplete,\n autoCorrect: this.props.autoCorrect,\n className: cx({\n // Chrome's built-in translation feature mutates the DOM in ways\n // that Draft doesn't expect (ex: adding tags inside\n // DraftEditorLeaf spans) and causes problems. We add notranslate\n // here which makes its autotranslation skip over this subtree.\n notranslate: !readOnly,\n 'public/DraftEditor/content': true\n }),\n contentEditable: !readOnly,\n \"data-testid\": this.props.webDriverTestID,\n onBeforeInput: this._onBeforeInput,\n onBlur: this._onBlur,\n onCompositionEnd: this._onCompositionEnd,\n onCompositionStart: this._onCompositionStart,\n onCopy: this._onCopy,\n onCut: this._onCut,\n onDragEnd: this._onDragEnd,\n onDragEnter: this.onDragEnter,\n onDragLeave: this.onDragLeave,\n onDragOver: this._onDragOver,\n onDragStart: this._onDragStart,\n onDrop: this._onDrop,\n onFocus: this._onFocus,\n onInput: this._onInput,\n onKeyDown: this._onKeyDown,\n onKeyPress: this._onKeyPress,\n onKeyUp: this._onKeyUp,\n onMouseUp: this._onMouseUp,\n onPaste: this._onPaste,\n onSelect: this._onSelect,\n ref: this.props.editorRef,\n role: readOnly ? null : ariaRole,\n spellCheck: allowSpellCheck && this.props.spellCheck,\n style: contentStyle,\n suppressContentEditableWarning: true,\n tabIndex: this.props.tabIndex\n }, React.createElement(UpdateDraftEditorFlags, {\n editor: this,\n editorState: editorState\n }), React.createElement(DraftEditorContents, _extends({}, editorContentsProps, {\n key: 'contents' + this.state.contentsKey\n })))));\n };\n\n _proto2.componentDidMount = function componentDidMount() {\n this._blockSelectEvents = false;\n\n if (!didInitODS && gkx('draft_ods_enabled')) {\n didInitODS = true;\n DraftEffects.initODS();\n }\n\n this.setMode('edit');\n /**\n * IE has a hardcoded \"feature\" that attempts to convert link text into\n * anchors in contentEditable DOM. This breaks the editor's expectations of\n * the DOM, and control is lost. Disable it to make IE behave.\n * See: http://blogs.msdn.com/b/ieinternals/archive/2010/09/15/\n * ie9-beta-minor-change-list.aspx\n */\n\n if (isIE) {\n // editor can be null after mounting\n // https://stackoverflow.com/questions/44074747/componentdidmount-called-before-ref-callback\n if (!this.editor) {\n global.execCommand('AutoUrlDetect', false, false);\n } else {\n this.editor.ownerDocument.execCommand('AutoUrlDetect', false, false);\n }\n }\n };\n\n _proto2.componentDidUpdate = function componentDidUpdate() {\n this._blockSelectEvents = false;\n this._latestEditorState = this.props.editorState;\n this._latestCommittedEditorState = this.props.editorState;\n }\n /**\n * Used via `this.focus()`.\n *\n * Force focus back onto the editor node.\n *\n * We attempt to preserve scroll position when focusing. You can also pass\n * a specified scroll position (for cases like `cut` behavior where it should\n * be restored to a known position).\n */\n ;\n\n return DraftEditor;\n}(React.Component);\n\n_defineProperty(DraftEditor, \"defaultProps\", {\n ariaDescribedBy: '{{editor_id_placeholder}}',\n blockRenderMap: DefaultDraftBlockRenderMap,\n blockRendererFn: function blockRendererFn() {\n return null;\n },\n blockStyleFn: function blockStyleFn() {\n return '';\n },\n keyBindingFn: getDefaultKeyBinding,\n readOnly: false,\n spellCheck: false,\n stripPastedStyles: false\n});\n\nmodule.exports = DraftEditor;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorLeaf = require(\"./DraftEditorLeaf.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar Scroll = require(\"fbjs/lib/Scroll\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar UnicodeBidi = require(\"fbjs/lib/UnicodeBidi\");\n\nvar UnicodeBidiDirection = require(\"fbjs/lib/UnicodeBidiDirection\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar getElementPosition = require(\"fbjs/lib/getElementPosition\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar getViewportDimensions = require(\"fbjs/lib/getViewportDimensions\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar SCROLL_BUFFER = 10;\n\n/**\n * Return whether a block overlaps with either edge of the `SelectionState`.\n */\nvar isBlockOnSelectionEdge = function isBlockOnSelectionEdge(selection, key) {\n return selection.getAnchorKey() === key || selection.getFocusKey() === key;\n};\n/**\n * The default block renderer for a `DraftEditor` component.\n *\n * A `DraftEditorBlock` is able to render a given `ContentBlock` to its\n * appropriate decorator and inline style components.\n */\n\n\nvar DraftEditorBlock = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorBlock, _React$Component);\n\n function DraftEditorBlock() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"_node\", void 0);\n\n return _this;\n }\n\n var _proto = DraftEditorBlock.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return this.props.block !== nextProps.block || this.props.tree !== nextProps.tree || this.props.direction !== nextProps.direction || isBlockOnSelectionEdge(nextProps.selection, nextProps.block.getKey()) && nextProps.forceSelection;\n }\n /**\n * When a block is mounted and overlaps the selection state, we need to make\n * sure that the cursor is visible to match native behavior. This may not\n * be the case if the user has pressed `RETURN` or pasted some content, since\n * programmatically creating these new blocks and setting the DOM selection\n * will miss out on the browser natively scrolling to that position.\n *\n * To replicate native behavior, if the block overlaps the selection state\n * on mount, force the scroll position. Check the scroll state of the scroll\n * parent, and adjust it to align the entire block to the bottom of the\n * scroll parent.\n */\n ;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.preventScroll) {\n return;\n }\n\n var selection = this.props.selection;\n var endKey = selection.getEndKey();\n\n if (!selection.getHasFocus() || endKey !== this.props.block.getKey()) {\n return;\n }\n\n var blockNode = this._node;\n\n if (blockNode == null) {\n return;\n }\n\n var scrollParent = Style.getScrollParent(blockNode);\n var scrollPosition = getScrollPosition(scrollParent);\n var scrollDelta;\n\n if (scrollParent === window) {\n var nodePosition = getElementPosition(blockNode);\n var nodeBottom = nodePosition.y + nodePosition.height;\n var viewportHeight = getViewportDimensions().height;\n scrollDelta = nodeBottom - viewportHeight;\n\n if (scrollDelta > 0) {\n window.scrollTo(scrollPosition.x, scrollPosition.y + scrollDelta + SCROLL_BUFFER);\n }\n } else {\n !isHTMLElement(blockNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'blockNode is not an HTMLElement') : invariant(false) : void 0;\n var blockBottom = blockNode.offsetHeight + blockNode.offsetTop;\n var pOffset = scrollParent.offsetTop + scrollParent.offsetHeight;\n var scrollBottom = pOffset + scrollPosition.y;\n scrollDelta = blockBottom - scrollBottom;\n\n if (scrollDelta > 0) {\n Scroll.setTop(scrollParent, Scroll.getTop(scrollParent) + scrollDelta + SCROLL_BUFFER);\n }\n }\n };\n\n _proto._renderChildren = function _renderChildren() {\n var _this2 = this;\n\n var block = this.props.block;\n var blockKey = block.getKey();\n var text = block.getText();\n var lastLeafSet = this.props.tree.size - 1;\n var hasSelection = isBlockOnSelectionEdge(this.props.selection, blockKey);\n return this.props.tree.map(function (leafSet, ii) {\n var leavesForLeafSet = leafSet.get('leaves'); // T44088704\n\n if (leavesForLeafSet.size === 0) {\n return null;\n }\n\n var lastLeaf = leavesForLeafSet.size - 1;\n var leaves = leavesForLeafSet.map(function (leaf, jj) {\n var offsetKey = DraftOffsetKey.encode(blockKey, ii, jj);\n var start = leaf.get('start');\n var end = leaf.get('end');\n return React.createElement(DraftEditorLeaf, {\n key: offsetKey,\n offsetKey: offsetKey,\n block: block,\n start: start,\n selection: hasSelection ? _this2.props.selection : null,\n forceSelection: _this2.props.forceSelection,\n text: text.slice(start, end),\n styleSet: block.getInlineStyleAt(start),\n customStyleMap: _this2.props.customStyleMap,\n customStyleFn: _this2.props.customStyleFn,\n isLast: ii === lastLeafSet && jj === lastLeaf\n });\n }).toArray();\n var decoratorKey = leafSet.get('decoratorKey');\n\n if (decoratorKey == null) {\n return leaves;\n }\n\n if (!_this2.props.decorator) {\n return leaves;\n }\n\n var decorator = nullthrows(_this2.props.decorator);\n var DecoratorComponent = decorator.getComponentForKey(decoratorKey);\n\n if (!DecoratorComponent) {\n return leaves;\n }\n\n var decoratorProps = decorator.getPropsForKey(decoratorKey);\n var decoratorOffsetKey = DraftOffsetKey.encode(blockKey, ii, 0);\n var start = leavesForLeafSet.first().get('start');\n var end = leavesForLeafSet.last().get('end');\n var decoratedText = text.slice(start, end);\n var entityKey = block.getEntityAt(leafSet.get('start')); // Resetting dir to the same value on a child node makes Chrome/Firefox\n // confused on cursor movement. See http://jsfiddle.net/d157kLck/3/\n\n var dir = UnicodeBidiDirection.getHTMLDirIfDifferent(UnicodeBidi.getDirection(decoratedText), _this2.props.direction);\n var commonProps = {\n contentState: _this2.props.contentState,\n decoratedText: decoratedText,\n dir: dir,\n start: start,\n end: end,\n blockKey: blockKey,\n entityKey: entityKey,\n offsetKey: decoratorOffsetKey\n };\n return React.createElement(DecoratorComponent, _extends({}, decoratorProps, commonProps, {\n key: decoratorOffsetKey\n }), leaves);\n }).toArray();\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n direction = _this$props.direction,\n offsetKey = _this$props.offsetKey;\n var className = cx({\n 'public/DraftStyleDefault/block': true,\n 'public/DraftStyleDefault/ltr': direction === 'LTR',\n 'public/DraftStyleDefault/rtl': direction === 'RTL'\n });\n return React.createElement(\"div\", {\n \"data-offset-key\": offsetKey,\n className: className,\n ref: function ref(_ref) {\n return _this3._node = _ref;\n }\n }, this._renderChildren());\n };\n\n return DraftEditorBlock;\n}(React.Component);\n\nmodule.exports = DraftEditorBlock;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of DraftEditorBlock.react.js and DraftEditorContents.react.js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorNode = require(\"./DraftEditorNode.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar Scroll = require(\"fbjs/lib/Scroll\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar getElementPosition = require(\"fbjs/lib/getElementPosition\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar getViewportDimensions = require(\"fbjs/lib/getViewportDimensions\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar SCROLL_BUFFER = 10;\nvar List = Immutable.List; // we should harden up the bellow flow types to make them more strict\n\n/**\n * Return whether a block overlaps with either edge of the `SelectionState`.\n */\nvar isBlockOnSelectionEdge = function isBlockOnSelectionEdge(selection, key) {\n return selection.getAnchorKey() === key || selection.getFocusKey() === key;\n};\n/**\n * We will use this helper to identify blocks that need to be wrapped but have siblings that\n * also share the same wrapper element, this way we can do the wrapping once the last sibling\n * is added.\n */\n\n\nvar shouldNotAddWrapperElement = function shouldNotAddWrapperElement(block, contentState) {\n var nextSiblingKey = block.getNextSiblingKey();\n return nextSiblingKey ? contentState.getBlockForKey(nextSiblingKey).getType() === block.getType() : false;\n};\n\nvar applyWrapperElementToSiblings = function applyWrapperElementToSiblings(wrapperTemplate, Element, nodes) {\n var wrappedSiblings = []; // we check back until we find a sibling that does not have same wrapper\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = nodes.reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var sibling = _step.value;\n\n if (sibling.type !== Element) {\n break;\n }\n\n wrappedSiblings.push(sibling);\n } // we now should remove from acc the wrappedSiblings and add them back under same wrap\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator[\"return\"] != null) {\n _iterator[\"return\"]();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n nodes.splice(nodes.indexOf(wrappedSiblings[0]), wrappedSiblings.length + 1);\n var childrenIs = wrappedSiblings.reverse();\n var key = childrenIs[0].key;\n nodes.push(React.cloneElement(wrapperTemplate, {\n key: \"\".concat(key, \"-wrap\"),\n 'data-offset-key': DraftOffsetKey.encode(key, 0, 0)\n }, childrenIs));\n return nodes;\n};\n\nvar getDraftRenderConfig = function getDraftRenderConfig(block, blockRenderMap) {\n var configForType = blockRenderMap.get(block.getType()) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n var Element = configForType.element || blockRenderMap.get('unstyled').element;\n return {\n Element: Element,\n wrapperTemplate: wrapperTemplate\n };\n};\n\nvar getCustomRenderConfig = function getCustomRenderConfig(block, blockRendererFn) {\n var customRenderer = blockRendererFn(block);\n\n if (!customRenderer) {\n return {};\n }\n\n var CustomComponent = customRenderer.component,\n customProps = customRenderer.props,\n customEditable = customRenderer.editable;\n return {\n CustomComponent: CustomComponent,\n customProps: customProps,\n customEditable: customEditable\n };\n};\n\nvar getElementPropsConfig = function getElementPropsConfig(block, editorKey, offsetKey, blockStyleFn, customConfig, ref) {\n var elementProps = {\n 'data-block': true,\n 'data-editor': editorKey,\n 'data-offset-key': offsetKey,\n key: block.getKey(),\n ref: ref\n };\n var customClass = blockStyleFn(block);\n\n if (customClass) {\n elementProps.className = customClass;\n }\n\n if (customConfig.customEditable !== undefined) {\n elementProps = _objectSpread({}, elementProps, {\n contentEditable: customConfig.customEditable,\n suppressContentEditableWarning: true\n });\n }\n\n return elementProps;\n};\n\nvar DraftEditorBlockNode = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorBlockNode, _React$Component);\n\n function DraftEditorBlockNode() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"wrapperRef\", React.createRef());\n\n return _this;\n }\n\n var _proto = DraftEditorBlockNode.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var _this$props = this.props,\n block = _this$props.block,\n direction = _this$props.direction,\n tree = _this$props.tree;\n var isContainerNode = !block.getChildKeys().isEmpty();\n var blockHasChanged = block !== nextProps.block || tree !== nextProps.tree || direction !== nextProps.direction || isBlockOnSelectionEdge(nextProps.selection, nextProps.block.getKey()) && nextProps.forceSelection; // if we have children at this stage we always re-render container nodes\n // else if its a root node we avoid re-rendering by checking for block updates\n\n return isContainerNode || blockHasChanged;\n }\n /**\n * When a block is mounted and overlaps the selection state, we need to make\n * sure that the cursor is visible to match native behavior. This may not\n * be the case if the user has pressed `RETURN` or pasted some content, since\n * programatically creating these new blocks and setting the DOM selection\n * will miss out on the browser natively scrolling to that position.\n *\n * To replicate native behavior, if the block overlaps the selection state\n * on mount, force the scroll position. Check the scroll state of the scroll\n * parent, and adjust it to align the entire block to the bottom of the\n * scroll parent.\n */\n ;\n\n _proto.componentDidMount = function componentDidMount() {\n var selection = this.props.selection;\n var endKey = selection.getEndKey();\n\n if (!selection.getHasFocus() || endKey !== this.props.block.getKey()) {\n return;\n }\n\n var blockNode = this.wrapperRef.current;\n\n if (!blockNode) {\n // This Block Node was rendered without a wrapper element.\n return;\n }\n\n var scrollParent = Style.getScrollParent(blockNode);\n var scrollPosition = getScrollPosition(scrollParent);\n var scrollDelta;\n\n if (scrollParent === window) {\n var nodePosition = getElementPosition(blockNode);\n var nodeBottom = nodePosition.y + nodePosition.height;\n var viewportHeight = getViewportDimensions().height;\n scrollDelta = nodeBottom - viewportHeight;\n\n if (scrollDelta > 0) {\n window.scrollTo(scrollPosition.x, scrollPosition.y + scrollDelta + SCROLL_BUFFER);\n }\n } else {\n !isHTMLElement(blockNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'blockNode is not an HTMLElement') : invariant(false) : void 0;\n var htmlBlockNode = blockNode;\n var blockBottom = htmlBlockNode.offsetHeight + htmlBlockNode.offsetTop;\n var scrollBottom = scrollParent.offsetHeight + scrollPosition.y;\n scrollDelta = blockBottom - scrollBottom;\n\n if (scrollDelta > 0) {\n Scroll.setTop(scrollParent, Scroll.getTop(scrollParent) + scrollDelta + SCROLL_BUFFER);\n }\n }\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n block = _this$props2.block,\n blockRenderMap = _this$props2.blockRenderMap,\n blockRendererFn = _this$props2.blockRendererFn,\n blockStyleFn = _this$props2.blockStyleFn,\n contentState = _this$props2.contentState,\n decorator = _this$props2.decorator,\n editorKey = _this$props2.editorKey,\n editorState = _this$props2.editorState,\n customStyleFn = _this$props2.customStyleFn,\n customStyleMap = _this$props2.customStyleMap,\n direction = _this$props2.direction,\n forceSelection = _this$props2.forceSelection,\n selection = _this$props2.selection,\n tree = _this$props2.tree;\n var children = null;\n\n if (block.children.size) {\n children = block.children.reduce(function (acc, key) {\n var offsetKey = DraftOffsetKey.encode(key, 0, 0);\n var child = contentState.getBlockForKey(key);\n var customConfig = getCustomRenderConfig(child, blockRendererFn);\n var Component = customConfig.CustomComponent || DraftEditorBlockNode;\n\n var _getDraftRenderConfig = getDraftRenderConfig(child, blockRenderMap),\n Element = _getDraftRenderConfig.Element,\n wrapperTemplate = _getDraftRenderConfig.wrapperTemplate;\n\n var elementProps = getElementPropsConfig(child, editorKey, offsetKey, blockStyleFn, customConfig, null);\n\n var childProps = _objectSpread({}, _this2.props, {\n tree: editorState.getBlockTree(key),\n blockProps: customConfig.customProps,\n offsetKey: offsetKey,\n block: child\n });\n\n acc.push(React.createElement(Element, elementProps, React.createElement(Component, childProps)));\n\n if (!wrapperTemplate || shouldNotAddWrapperElement(child, contentState)) {\n return acc;\n } // if we are here it means we are the last block\n // that has a wrapperTemplate so we should wrap itself\n // and all other previous siblings that share the same wrapper\n\n\n applyWrapperElementToSiblings(wrapperTemplate, Element, acc);\n return acc;\n }, []);\n }\n\n var blockKey = block.getKey();\n var offsetKey = DraftOffsetKey.encode(blockKey, 0, 0);\n var customConfig = getCustomRenderConfig(block, blockRendererFn);\n var Component = customConfig.CustomComponent;\n var blockNode = Component != null ? React.createElement(Component, _extends({}, this.props, {\n tree: editorState.getBlockTree(blockKey),\n blockProps: customConfig.customProps,\n offsetKey: offsetKey,\n block: block\n })) : React.createElement(DraftEditorNode, {\n block: block,\n children: children,\n contentState: contentState,\n customStyleFn: customStyleFn,\n customStyleMap: customStyleMap,\n decorator: decorator,\n direction: direction,\n forceSelection: forceSelection,\n hasSelection: isBlockOnSelectionEdge(selection, blockKey),\n selection: selection,\n tree: tree\n });\n\n if (block.getParentKey()) {\n return blockNode;\n }\n\n var _getDraftRenderConfig2 = getDraftRenderConfig(block, blockRenderMap),\n Element = _getDraftRenderConfig2.Element;\n\n var elementProps = getElementPropsConfig(block, editorKey, offsetKey, blockStyleFn, customConfig, this.wrapperRef); // root block nodes needs to be wrapped\n\n return React.createElement(Element, elementProps, blockNode);\n };\n\n return DraftEditorBlockNode;\n}(React.Component);\n\nmodule.exports = DraftEditorBlockNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DOMObserver = require(\"./DOMObserver\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar editOnSelect = require(\"./editOnSelect\");\n\nvar getContentEditableContainer = require(\"./getContentEditableContainer\");\n\nvar getDraftEditorSelection = require(\"./getDraftEditorSelection\");\n\nvar getEntityKeyForSelection = require(\"./getEntityKeyForSelection\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar isIE = UserAgent.isBrowser('IE');\n/**\n * Millisecond delay to allow `compositionstart` to fire again upon\n * `compositionend`.\n *\n * This is used for Korean input to ensure that typing can continue without\n * the editor trying to render too quickly. More specifically, Safari 7.1+\n * triggers `compositionstart` a little slower than Chrome/FF, which\n * leads to composed characters being resolved and re-render occurring\n * sooner than we want.\n */\n\nvar RESOLVE_DELAY = 20;\n/**\n * A handful of variables used to track the current composition and its\n * resolution status. These exist at the module level because it is not\n * possible to have compositions occurring in multiple editors simultaneously,\n * and it simplifies state management with respect to the DraftEditor component.\n */\n\nvar resolved = false;\nvar stillComposing = false;\nvar domObserver = null;\n\nfunction startDOMObserver(editor) {\n if (!domObserver) {\n domObserver = new DOMObserver(getContentEditableContainer(editor));\n domObserver.start();\n }\n}\n\nvar DraftEditorCompositionHandler = {\n /**\n * A `compositionstart` event has fired while we're still in composition\n * mode. Continue the current composition session to prevent a re-render.\n */\n onCompositionStart: function onCompositionStart(editor) {\n stillComposing = true;\n startDOMObserver(editor);\n },\n\n /**\n * Attempt to end the current composition session.\n *\n * Defer handling because browser will still insert the chars into active\n * element after `compositionend`. If a `compositionstart` event fires\n * before `resolveComposition` executes, our composition session will\n * continue.\n *\n * The `resolved` flag is useful because certain IME interfaces fire the\n * `compositionend` event multiple times, thus queueing up multiple attempts\n * at handling the composition. Since handling the same composition event\n * twice could break the DOM, we only use the first event. Example: Arabic\n * Google Input Tools on Windows 8.1 fires `compositionend` three times.\n */\n onCompositionEnd: function onCompositionEnd(editor) {\n resolved = false;\n stillComposing = false;\n setTimeout(function () {\n if (!resolved) {\n DraftEditorCompositionHandler.resolveComposition(editor);\n }\n }, RESOLVE_DELAY);\n },\n onSelect: editOnSelect,\n\n /**\n * In Safari, keydown events may fire when committing compositions. If\n * the arrow keys are used to commit, prevent default so that the cursor\n * doesn't move, otherwise it will jump back noticeably on re-render.\n */\n onKeyDown: function onKeyDown(editor, e) {\n if (!stillComposing) {\n // If a keydown event is received after compositionend but before the\n // 20ms timer expires (ex: type option-E then backspace, or type A then\n // backspace in 2-Set Korean), we should immediately resolve the\n // composition and reinterpret the key press in edit mode.\n DraftEditorCompositionHandler.resolveComposition(editor);\n\n editor._onKeyDown(e);\n\n return;\n }\n\n if (e.which === Keys.RIGHT || e.which === Keys.LEFT) {\n e.preventDefault();\n }\n },\n\n /**\n * Keypress events may fire when committing compositions. In Firefox,\n * pressing RETURN commits the composition and inserts extra newline\n * characters that we do not want. `preventDefault` allows the composition\n * to be committed while preventing the extra characters.\n */\n onKeyPress: function onKeyPress(_editor, e) {\n if (e.which === Keys.RETURN) {\n e.preventDefault();\n }\n },\n\n /**\n * Attempt to insert composed characters into the document.\n *\n * If we are still in a composition session, do nothing. Otherwise, insert\n * the characters into the document and terminate the composition session.\n *\n * If no characters were composed -- for instance, the user\n * deleted all composed characters and committed nothing new --\n * force a re-render. We also re-render when the composition occurs\n * at the beginning of a leaf, to ensure that if the browser has\n * created a new text node for the composition, we will discard it.\n *\n * Resetting innerHTML will move focus to the beginning of the editor,\n * so we update to force it back to the correct place.\n */\n resolveComposition: function resolveComposition(editor) {\n if (stillComposing) {\n return;\n }\n\n var mutations = nullthrows(domObserver).stopAndFlushMutations();\n domObserver = null;\n resolved = true;\n var editorState = EditorState.set(editor._latestEditorState, {\n inCompositionMode: false\n });\n editor.exitCurrentMode();\n\n if (!mutations.size) {\n editor.update(editorState);\n return;\n } // TODO, check if Facebook still needs this flag or if it could be removed.\n // Since there can be multiple mutations providing a `composedChars` doesn't\n // apply well on this new model.\n // if (\n // gkx('draft_handlebeforeinput_composed_text') &&\n // editor.props.handleBeforeInput &&\n // isEventHandled(\n // editor.props.handleBeforeInput(\n // composedChars,\n // editorState,\n // event.timeStamp,\n // ),\n // )\n // ) {\n // return;\n // }\n\n\n var contentState = editorState.getCurrentContent();\n mutations.forEach(function (composedChars, offsetKey) {\n var _DraftOffsetKey$decod = DraftOffsetKey.decode(offsetKey),\n blockKey = _DraftOffsetKey$decod.blockKey,\n decoratorKey = _DraftOffsetKey$decod.decoratorKey,\n leafKey = _DraftOffsetKey$decod.leafKey;\n\n var _editorState$getBlock = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]),\n start = _editorState$getBlock.start,\n end = _editorState$getBlock.end;\n\n var replacementRange = editorState.getSelection().merge({\n anchorKey: blockKey,\n focusKey: blockKey,\n anchorOffset: start,\n focusOffset: end,\n isBackward: false\n });\n var entityKey = getEntityKeyForSelection(contentState, replacementRange);\n var currentStyle = contentState.getBlockForKey(blockKey).getInlineStyleAt(start);\n contentState = DraftModifier.replaceText(contentState, replacementRange, composedChars, currentStyle, entityKey); // We need to update the editorState so the leaf node ranges are properly\n // updated and multiple mutations are correctly applied.\n\n editorState = EditorState.set(editorState, {\n currentContent: contentState\n });\n }); // When we apply the text changes to the ContentState, the selection always\n // goes to the end of the field, but it should just stay where it is\n // after compositionEnd.\n\n var documentSelection = getDraftEditorSelection(editorState, getContentEditableContainer(editor));\n var compositionEndSelectionState = documentSelection.selectionState;\n editor.restoreEditorDOM(); // See:\n // - https://github.com/facebook/draft-js/issues/2093\n // - https://github.com/facebook/draft-js/pull/2094\n // Apply this fix only in IE for now. We can test it in\n // other browsers in the future to ensure no regressions\n\n var editorStateWithUpdatedSelection = isIE ? EditorState.forceSelection(editorState, compositionEndSelectionState) : EditorState.acceptSelection(editorState, compositionEndSelectionState);\n editor.update(EditorState.push(editorStateWithUpdatedSelection, contentState, 'insert-characters'));\n }\n};\nmodule.exports = DraftEditorCompositionHandler;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorBlock = require(\"./DraftEditorBlock.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar joinClasses = require(\"fbjs/lib/joinClasses\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\n/**\n * Provide default styling for list items. This way, lists will be styled with\n * proper counters and indentation even if the caller does not specify\n * their own styling at all. If more than five levels of nesting are needed,\n * the necessary CSS classes can be provided via `blockStyleFn` configuration.\n */\nvar getListItemClasses = function getListItemClasses(type, depth, shouldResetCount, direction) {\n return cx({\n 'public/DraftStyleDefault/unorderedListItem': type === 'unordered-list-item',\n 'public/DraftStyleDefault/orderedListItem': type === 'ordered-list-item',\n 'public/DraftStyleDefault/reset': shouldResetCount,\n 'public/DraftStyleDefault/depth0': depth === 0,\n 'public/DraftStyleDefault/depth1': depth === 1,\n 'public/DraftStyleDefault/depth2': depth === 2,\n 'public/DraftStyleDefault/depth3': depth === 3,\n 'public/DraftStyleDefault/depth4': depth >= 4,\n 'public/DraftStyleDefault/listLTR': direction === 'LTR',\n 'public/DraftStyleDefault/listRTL': direction === 'RTL'\n });\n};\n/**\n * `DraftEditorContents` is the container component for all block components\n * rendered for a `DraftEditor`. It is optimized to aggressively avoid\n * re-rendering blocks whenever possible.\n *\n * This component is separate from `DraftEditor` because certain props\n * (for instance, ARIA props) must be allowed to update without affecting\n * the contents of the editor.\n */\n\n\nvar DraftEditorContents = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorContents, _React$Component);\n\n function DraftEditorContents() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorContents.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var prevEditorState = this.props.editorState;\n var nextEditorState = nextProps.editorState;\n var prevDirectionMap = prevEditorState.getDirectionMap();\n var nextDirectionMap = nextEditorState.getDirectionMap(); // Text direction has changed for one or more blocks. We must re-render.\n\n if (prevDirectionMap !== nextDirectionMap) {\n return true;\n }\n\n var didHaveFocus = prevEditorState.getSelection().getHasFocus();\n var nowHasFocus = nextEditorState.getSelection().getHasFocus();\n\n if (didHaveFocus !== nowHasFocus) {\n return true;\n }\n\n var nextNativeContent = nextEditorState.getNativelyRenderedContent();\n var wasComposing = prevEditorState.isInCompositionMode();\n var nowComposing = nextEditorState.isInCompositionMode(); // If the state is unchanged or we're currently rendering a natively\n // rendered state, there's nothing new to be done.\n\n if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) {\n return false;\n }\n\n var prevContent = prevEditorState.getCurrentContent();\n var nextContent = nextEditorState.getCurrentContent();\n var prevDecorator = prevEditorState.getDecorator();\n var nextDecorator = nextEditorState.getDecorator();\n return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection();\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n blockRenderMap = _this$props.blockRenderMap,\n blockRendererFn = _this$props.blockRendererFn,\n blockStyleFn = _this$props.blockStyleFn,\n customStyleMap = _this$props.customStyleMap,\n customStyleFn = _this$props.customStyleFn,\n editorState = _this$props.editorState,\n editorKey = _this$props.editorKey,\n preventScroll = _this$props.preventScroll,\n textDirectionality = _this$props.textDirectionality;\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var forceSelection = editorState.mustForceSelection();\n var decorator = editorState.getDecorator();\n var directionMap = nullthrows(editorState.getDirectionMap());\n var blocksAsArray = content.getBlocksAsArray();\n var processedBlocks = [];\n var currentDepth = null;\n var lastWrapperTemplate = null;\n\n for (var ii = 0; ii < blocksAsArray.length; ii++) {\n var _block = blocksAsArray[ii];\n\n var key = _block.getKey();\n\n var blockType = _block.getType();\n\n var customRenderer = blockRendererFn(_block);\n var CustomComponent = void 0,\n customProps = void 0,\n customEditable = void 0;\n\n if (customRenderer) {\n CustomComponent = customRenderer.component;\n customProps = customRenderer.props;\n customEditable = customRenderer.editable;\n }\n\n var direction = textDirectionality ? textDirectionality : directionMap.get(key);\n var offsetKey = DraftOffsetKey.encode(key, 0, 0);\n var componentProps = {\n contentState: content,\n block: _block,\n blockProps: customProps,\n blockStyleFn: blockStyleFn,\n customStyleMap: customStyleMap,\n customStyleFn: customStyleFn,\n decorator: decorator,\n direction: direction,\n forceSelection: forceSelection,\n offsetKey: offsetKey,\n preventScroll: preventScroll,\n selection: selection,\n tree: editorState.getBlockTree(key)\n };\n var configForType = blockRenderMap.get(blockType) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n var Element = configForType.element || blockRenderMap.get('unstyled').element;\n\n var depth = _block.getDepth();\n\n var _className = '';\n\n if (blockStyleFn) {\n _className = blockStyleFn(_block);\n } // List items are special snowflakes, since we handle nesting and\n // counters manually.\n\n\n if (Element === 'li') {\n var shouldResetCount = lastWrapperTemplate !== wrapperTemplate || currentDepth === null || depth > currentDepth;\n _className = joinClasses(_className, getListItemClasses(blockType, depth, shouldResetCount, direction));\n }\n\n var Component = CustomComponent || DraftEditorBlock;\n var childProps = {\n className: _className,\n 'data-block': true,\n 'data-editor': editorKey,\n 'data-offset-key': offsetKey,\n key: key\n };\n\n if (customEditable !== undefined) {\n childProps = _objectSpread({}, childProps, {\n contentEditable: customEditable,\n suppressContentEditableWarning: true\n });\n }\n\n var child = React.createElement(Element, childProps,\n /* $FlowFixMe[incompatible-type] (>=0.112.0 site=www,mobile) This\n * comment suppresses an error found when Flow v0.112 was deployed. To\n * see the error delete this comment and run Flow. */\n React.createElement(Component, _extends({}, componentProps, {\n key: key\n })));\n processedBlocks.push({\n block: child,\n wrapperTemplate: wrapperTemplate,\n key: key,\n offsetKey: offsetKey\n });\n\n if (wrapperTemplate) {\n currentDepth = _block.getDepth();\n } else {\n currentDepth = null;\n }\n\n lastWrapperTemplate = wrapperTemplate;\n } // Group contiguous runs of blocks that have the same wrapperTemplate\n\n\n var outputBlocks = [];\n\n for (var _ii = 0; _ii < processedBlocks.length;) {\n var info = processedBlocks[_ii];\n\n if (info.wrapperTemplate) {\n var blocks = [];\n\n do {\n blocks.push(processedBlocks[_ii].block);\n _ii++;\n } while (_ii < processedBlocks.length && processedBlocks[_ii].wrapperTemplate === info.wrapperTemplate);\n\n var wrapperElement = React.cloneElement(info.wrapperTemplate, {\n key: info.key + '-wrap',\n 'data-offset-key': info.offsetKey\n }, blocks);\n outputBlocks.push(wrapperElement);\n } else {\n outputBlocks.push(info.block);\n _ii++;\n }\n }\n\n return React.createElement(\"div\", {\n \"data-contents\": \"true\"\n }, outputBlocks);\n };\n\n return DraftEditorContents;\n}(React.Component);\n\nmodule.exports = DraftEditorContents;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nvar gkx = require(\"./gkx\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nmodule.exports = experimentalTreeDataSupport ? require(\"./DraftEditorContentsExperimental.react\") : require(\"./DraftEditorContents-core.react\");","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This file is a fork of DraftEditorContents.react.js for tree nodes\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorBlockNode = require(\"./DraftEditorBlockNode.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\n/**\n * `DraftEditorContents` is the container component for all block components\n * rendered for a `DraftEditor`. It is optimized to aggressively avoid\n * re-rendering blocks whenever possible.\n *\n * This component is separate from `DraftEditor` because certain props\n * (for instance, ARIA props) must be allowed to update without affecting\n * the contents of the editor.\n */\nvar DraftEditorContentsExperimental = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorContentsExperimental, _React$Component);\n\n function DraftEditorContentsExperimental() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorContentsExperimental.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var prevEditorState = this.props.editorState;\n var nextEditorState = nextProps.editorState;\n var prevDirectionMap = prevEditorState.getDirectionMap();\n var nextDirectionMap = nextEditorState.getDirectionMap(); // Text direction has changed for one or more blocks. We must re-render.\n\n if (prevDirectionMap !== nextDirectionMap) {\n return true;\n }\n\n var didHaveFocus = prevEditorState.getSelection().getHasFocus();\n var nowHasFocus = nextEditorState.getSelection().getHasFocus();\n\n if (didHaveFocus !== nowHasFocus) {\n return true;\n }\n\n var nextNativeContent = nextEditorState.getNativelyRenderedContent();\n var wasComposing = prevEditorState.isInCompositionMode();\n var nowComposing = nextEditorState.isInCompositionMode(); // If the state is unchanged or we're currently rendering a natively\n // rendered state, there's nothing new to be done.\n\n if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) {\n return false;\n }\n\n var prevContent = prevEditorState.getCurrentContent();\n var nextContent = nextEditorState.getCurrentContent();\n var prevDecorator = prevEditorState.getDecorator();\n var nextDecorator = nextEditorState.getDecorator();\n return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection();\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n blockRenderMap = _this$props.blockRenderMap,\n blockRendererFn = _this$props.blockRendererFn,\n blockStyleFn = _this$props.blockStyleFn,\n customStyleMap = _this$props.customStyleMap,\n customStyleFn = _this$props.customStyleFn,\n editorState = _this$props.editorState,\n editorKey = _this$props.editorKey,\n textDirectionality = _this$props.textDirectionality;\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var forceSelection = editorState.mustForceSelection();\n var decorator = editorState.getDecorator();\n var directionMap = nullthrows(editorState.getDirectionMap());\n var blocksAsArray = content.getBlocksAsArray();\n var rootBlock = blocksAsArray[0];\n var processedBlocks = [];\n var nodeBlock = rootBlock;\n\n while (nodeBlock) {\n var blockKey = nodeBlock.getKey();\n var blockProps = {\n blockRenderMap: blockRenderMap,\n blockRendererFn: blockRendererFn,\n blockStyleFn: blockStyleFn,\n contentState: content,\n customStyleFn: customStyleFn,\n customStyleMap: customStyleMap,\n decorator: decorator,\n editorKey: editorKey,\n editorState: editorState,\n forceSelection: forceSelection,\n selection: selection,\n block: nodeBlock,\n direction: textDirectionality ? textDirectionality : directionMap.get(blockKey),\n tree: editorState.getBlockTree(blockKey)\n };\n var configForType = blockRenderMap.get(nodeBlock.getType()) || blockRenderMap.get('unstyled');\n var wrapperTemplate = configForType.wrapper;\n processedBlocks.push({\n /* $FlowFixMe[incompatible-type] (>=0.112.0 site=www,mobile) This\n * comment suppresses an error found when Flow v0.112 was deployed. To\n * see the error delete this comment and run Flow. */\n block: React.createElement(DraftEditorBlockNode, _extends({\n key: blockKey\n }, blockProps)),\n wrapperTemplate: wrapperTemplate,\n key: blockKey,\n offsetKey: DraftOffsetKey.encode(blockKey, 0, 0)\n });\n var nextBlockKey = nodeBlock.getNextSiblingKey();\n nodeBlock = nextBlockKey ? content.getBlockForKey(nextBlockKey) : null;\n } // Group contiguous runs of blocks that have the same wrapperTemplate\n\n\n var outputBlocks = [];\n\n for (var ii = 0; ii < processedBlocks.length;) {\n var info = processedBlocks[ii];\n\n if (info.wrapperTemplate) {\n var blocks = [];\n\n do {\n blocks.push(processedBlocks[ii].block);\n ii++;\n } while (ii < processedBlocks.length && processedBlocks[ii].wrapperTemplate === info.wrapperTemplate);\n\n var wrapperElement = React.cloneElement(info.wrapperTemplate, {\n key: info.key + '-wrap',\n 'data-offset-key': info.offsetKey\n }, blocks);\n outputBlocks.push(wrapperElement);\n } else {\n outputBlocks.push(info.block);\n ii++;\n }\n }\n\n return React.createElement(\"div\", {\n \"data-contents\": \"true\"\n }, outputBlocks);\n };\n\n return DraftEditorContentsExperimental;\n}(React.Component);\n\nmodule.exports = DraftEditorContentsExperimental;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _extends() { _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar React = require(\"react\");\n\nvar UnicodeBidi = require(\"fbjs/lib/UnicodeBidi\");\n\nvar UnicodeBidiDirection = require(\"fbjs/lib/UnicodeBidiDirection\");\n\nvar DraftEditorDecoratedLeaves = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorDecoratedLeaves, _React$Component);\n\n function DraftEditorDecoratedLeaves() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorDecoratedLeaves.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n block = _this$props.block,\n children = _this$props.children,\n contentState = _this$props.contentState,\n decorator = _this$props.decorator,\n decoratorKey = _this$props.decoratorKey,\n direction = _this$props.direction,\n leafSet = _this$props.leafSet,\n text = _this$props.text;\n var blockKey = block.getKey();\n var leavesForLeafSet = leafSet.get('leaves');\n var DecoratorComponent = decorator.getComponentForKey(decoratorKey);\n var decoratorProps = decorator.getPropsForKey(decoratorKey);\n var decoratorOffsetKey = DraftOffsetKey.encode(blockKey, parseInt(decoratorKey, 10), 0);\n var decoratedText = text.slice(leavesForLeafSet.first().get('start'), leavesForLeafSet.last().get('end')); // Resetting dir to the same value on a child node makes Chrome/Firefox\n // confused on cursor movement. See http://jsfiddle.net/d157kLck/3/\n\n var dir = UnicodeBidiDirection.getHTMLDirIfDifferent(UnicodeBidi.getDirection(decoratedText), direction);\n return React.createElement(DecoratorComponent, _extends({}, decoratorProps, {\n contentState: contentState,\n decoratedText: decoratedText,\n dir: dir,\n key: decoratorOffsetKey,\n entityKey: block.getEntityAt(leafSet.get('start')),\n offsetKey: decoratorOffsetKey\n }), children);\n };\n\n return DraftEditorDecoratedLeaves;\n}(React.Component);\n\nmodule.exports = DraftEditorDecoratedLeaves;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DataTransfer = require(\"fbjs/lib/DataTransfer\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar getTextContentFromFiles = require(\"./getTextContentFromFiles\");\n\nvar getUpdatedSelectionState = require(\"./getUpdatedSelectionState\");\n\nvar getWindowForNode = require(\"./getWindowForNode\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n/**\n * Get a SelectionState for the supplied mouse event.\n */\n\n\nfunction getSelectionForEvent(event, editorState) {\n var node = null;\n var offset = null;\n var eventTargetDocument = getCorrectDocumentFromNode(event.currentTarget);\n /* $FlowFixMe[prop-missing] (>=0.68.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the error\n * delete this comment and run Flow. */\n\n if (typeof eventTargetDocument.caretRangeFromPoint === 'function') {\n /* $FlowFixMe[incompatible-use] (>=0.68.0 site=www,mobile) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the error\n * delete this comment and run Flow. */\n var dropRange = eventTargetDocument.caretRangeFromPoint(event.x, event.y);\n node = dropRange.startContainer;\n offset = dropRange.startOffset;\n } else if (event.rangeParent) {\n node = event.rangeParent;\n offset = event.rangeOffset;\n } else {\n return null;\n }\n\n node = nullthrows(node);\n offset = nullthrows(offset);\n var offsetKey = nullthrows(findAncestorOffsetKey(node));\n return getUpdatedSelectionState(editorState, offsetKey, offset, offsetKey, offset);\n}\n\nvar DraftEditorDragHandler = {\n /**\n * Drag originating from input terminated.\n */\n onDragEnd: function onDragEnd(editor) {\n editor.exitCurrentMode();\n endDrag(editor);\n },\n\n /**\n * Handle data being dropped.\n */\n onDrop: function onDrop(editor, e) {\n var data = new DataTransfer(e.nativeEvent.dataTransfer);\n var editorState = editor._latestEditorState;\n var dropSelection = getSelectionForEvent(e.nativeEvent, editorState);\n e.preventDefault();\n editor._dragCount = 0;\n editor.exitCurrentMode();\n\n if (dropSelection == null) {\n return;\n }\n\n var files = data.getFiles();\n\n if (files.length > 0) {\n if (editor.props.handleDroppedFiles && isEventHandled(editor.props.handleDroppedFiles(dropSelection, files))) {\n return;\n }\n /* $FlowFixMe[incompatible-call] This comment suppresses an error found\n * DataTransfer was typed. getFiles() returns an array of , not Blob */\n\n\n getTextContentFromFiles(files, function (fileText) {\n fileText && editor.update(insertTextAtSelection(editorState, dropSelection, fileText));\n });\n return;\n }\n\n var dragType = editor._internalDrag ? 'internal' : 'external';\n\n if (editor.props.handleDrop && isEventHandled(editor.props.handleDrop(dropSelection, data, dragType))) {// handled\n } else if (editor._internalDrag) {\n editor.update(moveText(editorState, dropSelection));\n } else {\n editor.update(insertTextAtSelection(editorState, dropSelection, data.getText()));\n }\n\n endDrag(editor);\n }\n};\n\nfunction endDrag(editor) {\n editor._internalDrag = false; // Fix issue #1383\n // Prior to React v16.5.0 onDrop breaks onSelect event:\n // https://github.com/facebook/react/issues/11379.\n // Dispatching a mouseup event on DOM node will make it go back to normal.\n\n var editorNode = editor.editorContainer;\n\n if (editorNode) {\n var mouseUpEvent = new MouseEvent('mouseup', {\n view: getWindowForNode(editorNode),\n bubbles: true,\n cancelable: true\n });\n editorNode.dispatchEvent(mouseUpEvent);\n }\n}\n\nfunction moveText(editorState, targetSelection) {\n var newContentState = DraftModifier.moveText(editorState.getCurrentContent(), editorState.getSelection(), targetSelection);\n return EditorState.push(editorState, newContentState, 'insert-fragment');\n}\n/**\n * Insert text at a specified selection.\n */\n\n\nfunction insertTextAtSelection(editorState, selection, text) {\n var newContentState = DraftModifier.insertText(editorState.getCurrentContent(), selection, text, editorState.getCurrentInlineStyle());\n return EditorState.push(editorState, newContentState, 'insert-fragment');\n}\n\nmodule.exports = DraftEditorDragHandler;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar onBeforeInput = require(\"./editOnBeforeInput\");\n\nvar onBlur = require(\"./editOnBlur\");\n\nvar onCompositionStart = require(\"./editOnCompositionStart\");\n\nvar onCopy = require(\"./editOnCopy\");\n\nvar onCut = require(\"./editOnCut\");\n\nvar onDragOver = require(\"./editOnDragOver\");\n\nvar onDragStart = require(\"./editOnDragStart\");\n\nvar onFocus = require(\"./editOnFocus\");\n\nvar onInput = require(\"./editOnInput\");\n\nvar onKeyDown = require(\"./editOnKeyDown\");\n\nvar onPaste = require(\"./editOnPaste\");\n\nvar onSelect = require(\"./editOnSelect\");\n\nvar isChrome = UserAgent.isBrowser('Chrome');\nvar isFirefox = UserAgent.isBrowser('Firefox');\nvar selectionHandler = isChrome || isFirefox ? onSelect : function (e) {};\nvar DraftEditorEditHandler = {\n onBeforeInput: onBeforeInput,\n onBlur: onBlur,\n onCompositionStart: onCompositionStart,\n onCopy: onCopy,\n onCut: onCut,\n onDragOver: onDragOver,\n onDragStart: onDragStart,\n onFocus: onFocus,\n onInput: onInput,\n onKeyDown: onKeyDown,\n onPaste: onPaste,\n onSelect: onSelect,\n // In certain cases, contenteditable on chrome does not fire the onSelect\n // event, causing problems with cursor positioning. Therefore, the selection\n // state update handler is added to more events to ensure that the selection\n // state is always synced with the actual cursor positions.\n onMouseUp: selectionHandler,\n onKeyUp: selectionHandler\n};\nmodule.exports = DraftEditorEditHandler;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar ReactDOMComet = require(\"react-dom\");\n\nvar flushControlled = ReactDOMComet.unstable_flushControlled;\nmodule.exports = flushControlled;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _assign = require(\"object-assign\");\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar DraftEditorTextNode = require(\"./DraftEditorTextNode.react\");\n\nvar React = require(\"react\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLBRElement = require(\"./isHTMLBRElement\");\n\nvar setDraftEditorSelection = require(\"./setDraftEditorSelection\").setDraftEditorSelection;\n\n/**\n * All leaf nodes in the editor are spans with single text nodes. Leaf\n * elements are styled based on the merging of an optional custom style map\n * and a default style map.\n *\n * `DraftEditorLeaf` also provides a wrapper for calling into the imperative\n * DOM Selection API. In this way, top-level components can declaratively\n * maintain the selection state.\n */\nvar DraftEditorLeaf = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorLeaf, _React$Component);\n\n function DraftEditorLeaf() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"leaf\", void 0);\n\n return _this;\n }\n\n var _proto = DraftEditorLeaf.prototype;\n\n _proto._setSelection = function _setSelection() {\n var selection = this.props.selection; // If selection state is irrelevant to the parent block, no-op.\n\n if (selection == null || !selection.getHasFocus()) {\n return;\n }\n\n var _this$props = this.props,\n block = _this$props.block,\n start = _this$props.start,\n text = _this$props.text;\n var blockKey = block.getKey();\n var end = start + text.length;\n\n if (!selection.hasEdgeWithin(blockKey, start, end)) {\n return;\n } // Determine the appropriate target node for selection. If the child\n // is not a text node, it is a
spacer. In this case, use the\n // itself as the selection target.\n\n\n var node = this.leaf;\n !node ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing node') : invariant(false) : void 0;\n var child = node.firstChild;\n !child ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing child') : invariant(false) : void 0;\n var targetNode;\n\n if (child.nodeType === Node.TEXT_NODE) {\n targetNode = child;\n } else if (isHTMLBRElement(child)) {\n targetNode = node;\n } else {\n targetNode = child.firstChild;\n !targetNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing targetNode') : invariant(false) : void 0;\n }\n\n setDraftEditorSelection(selection, targetNode, blockKey, start, end);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var leafNode = this.leaf;\n !leafNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing leafNode') : invariant(false) : void 0;\n var shouldUpdate = leafNode.textContent !== nextProps.text || nextProps.styleSet !== this.props.styleSet || nextProps.forceSelection;\n return shouldUpdate;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._setSelection();\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._setSelection();\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var block = this.props.block;\n var text = this.props.text; // If the leaf is at the end of its block and ends in a soft newline, append\n // an extra line feed character. Browsers collapse trailing newline\n // characters, which leaves the cursor in the wrong place after a\n // shift+enter. The extra character repairs this.\n\n if (text.endsWith('\\n') && this.props.isLast) {\n text += '\\n';\n }\n\n var _this$props2 = this.props,\n customStyleMap = _this$props2.customStyleMap,\n customStyleFn = _this$props2.customStyleFn,\n offsetKey = _this$props2.offsetKey,\n styleSet = _this$props2.styleSet;\n var styleObj = styleSet.reduce(function (map, styleName) {\n var mergedStyles = {};\n var style = customStyleMap[styleName];\n\n if (style !== undefined && map.textDecoration !== style.textDecoration) {\n // .trim() is necessary for IE9/10/11 and Edge\n mergedStyles.textDecoration = [map.textDecoration, style.textDecoration].join(' ').trim();\n }\n\n return _assign(map, style, mergedStyles);\n }, {});\n\n if (customStyleFn) {\n var newStyles = customStyleFn(styleSet, block);\n styleObj = _assign(styleObj, newStyles);\n }\n\n return React.createElement(\"span\", {\n \"data-offset-key\": offsetKey,\n ref: function ref(_ref) {\n return _this2.leaf = _ref;\n },\n style: styleObj\n }, React.createElement(DraftEditorTextNode, null, text));\n };\n\n return DraftEditorLeaf;\n}(React.Component);\n\nmodule.exports = DraftEditorLeaf;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar DraftEditorDecoratedLeaves = require(\"./DraftEditorDecoratedLeaves.react\");\n\nvar DraftEditorLeaf = require(\"./DraftEditorLeaf.react\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar List = Immutable.List;\n\nvar DraftEditorNode = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorNode, _React$Component);\n\n function DraftEditorNode() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorNode.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n block = _this$props.block,\n contentState = _this$props.contentState,\n customStyleFn = _this$props.customStyleFn,\n customStyleMap = _this$props.customStyleMap,\n decorator = _this$props.decorator,\n direction = _this$props.direction,\n forceSelection = _this$props.forceSelection,\n hasSelection = _this$props.hasSelection,\n selection = _this$props.selection,\n tree = _this$props.tree;\n var blockKey = block.getKey();\n var text = block.getText();\n var lastLeafSet = tree.size - 1;\n var children = this.props.children || tree.map(function (leafSet, ii) {\n var decoratorKey = leafSet.get('decoratorKey');\n var leavesForLeafSet = leafSet.get('leaves');\n var lastLeaf = leavesForLeafSet.size - 1;\n var Leaves = leavesForLeafSet.map(function (leaf, jj) {\n var offsetKey = DraftOffsetKey.encode(blockKey, ii, jj);\n var start = leaf.get('start');\n var end = leaf.get('end');\n return React.createElement(DraftEditorLeaf, {\n key: offsetKey,\n offsetKey: offsetKey,\n block: block,\n start: start,\n selection: hasSelection ? selection : null,\n forceSelection: forceSelection,\n text: text.slice(start, end),\n styleSet: block.getInlineStyleAt(start),\n customStyleMap: customStyleMap,\n customStyleFn: customStyleFn,\n isLast: decoratorKey === lastLeafSet && jj === lastLeaf\n });\n }).toArray();\n\n if (!decoratorKey || !decorator) {\n return Leaves;\n }\n\n return React.createElement(DraftEditorDecoratedLeaves, {\n block: block,\n children: Leaves,\n contentState: contentState,\n decorator: decorator,\n decoratorKey: decoratorKey,\n direction: direction,\n leafSet: leafSet,\n text: text,\n key: ii\n });\n }).toArray();\n return React.createElement(\"div\", {\n \"data-offset-key\": DraftOffsetKey.encode(blockKey, 0, 0),\n className: cx({\n 'public/DraftStyleDefault/block': true,\n 'public/DraftStyleDefault/ltr': direction === 'LTR',\n 'public/DraftStyleDefault/rtl': direction === 'RTL'\n })\n }, children);\n };\n\n return DraftEditorNode;\n}(React.Component);\n\nmodule.exports = DraftEditorNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar React = require(\"react\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\n/**\n * This component is responsible for rendering placeholder text for the\n * `DraftEditor` component.\n *\n * Override placeholder style via CSS.\n */\nvar DraftEditorPlaceholder = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorPlaceholder, _React$Component);\n\n function DraftEditorPlaceholder() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DraftEditorPlaceholder.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return this.props.text !== nextProps.text || this.props.editorState.getSelection().getHasFocus() !== nextProps.editorState.getSelection().getHasFocus();\n };\n\n _proto.render = function render() {\n var hasFocus = this.props.editorState.getSelection().getHasFocus();\n var className = cx({\n 'public/DraftEditorPlaceholder/root': true,\n 'public/DraftEditorPlaceholder/hasFocus': hasFocus\n });\n var contentStyle = {\n whiteSpace: 'pre-wrap'\n };\n return React.createElement(\"div\", {\n className: className\n }, React.createElement(\"div\", {\n className: cx('public/DraftEditorPlaceholder/inner'),\n id: this.props.accessibilityID,\n style: contentStyle\n }, this.props.text));\n };\n\n return DraftEditorPlaceholder;\n}(React.Component);\n\nmodule.exports = DraftEditorPlaceholder;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar React = require(\"react\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isElement = require(\"./isElement\"); // In IE, spans with
tags render as two newlines. By rendering a span\n// with only a newline character, we can be sure to render a single line.\n\n\nvar useNewlineChar = UserAgent.isBrowser('IE <= 11');\n/**\n * Check whether the node should be considered a newline.\n */\n\nfunction isNewline(node) {\n return useNewlineChar ? node.textContent === '\\n' : node.tagName === 'BR';\n}\n/**\n * Placeholder elements for empty text content.\n *\n * What is this `data-text` attribute, anyway? It turns out that we need to\n * put an attribute on the lowest-level text node in order to preserve correct\n * spellcheck handling. If the is naked, Chrome and Safari may do\n * bizarre things to do the DOM -- split text nodes, create extra spans, etc.\n * If the has an attribute, this appears not to happen.\n * See http://jsfiddle.net/9khdavod/ for the failure case, and\n * http://jsfiddle.net/7pg143f7/ for the fixed case.\n */\n\n\nvar NEWLINE_A = function NEWLINE_A(ref) {\n return useNewlineChar ? React.createElement(\"span\", {\n key: \"A\",\n \"data-text\": \"true\",\n ref: ref\n }, '\\n') : React.createElement(\"br\", {\n key: \"A\",\n \"data-text\": \"true\",\n ref: ref\n });\n};\n\nvar NEWLINE_B = function NEWLINE_B(ref) {\n return useNewlineChar ? React.createElement(\"span\", {\n key: \"B\",\n \"data-text\": \"true\",\n ref: ref\n }, '\\n') : React.createElement(\"br\", {\n key: \"B\",\n \"data-text\": \"true\",\n ref: ref\n });\n};\n\n/**\n * The lowest-level component in a `DraftEditor`, the text node component\n * replaces the default React text node implementation. This allows us to\n * perform custom handling of newline behavior and avoid re-rendering text\n * nodes with DOM state that already matches the expectations of our immutable\n * editor state.\n */\nvar DraftEditorTextNode = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DraftEditorTextNode, _React$Component);\n\n function DraftEditorTextNode(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // By flipping this flag, we also keep flipping keys which forces\n // React to remount this node every time it rerenders.\n\n _defineProperty(_assertThisInitialized(_this), \"_forceFlag\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_node\", void 0);\n\n _this._forceFlag = false;\n return _this;\n }\n\n var _proto = DraftEditorTextNode.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n var node = this._node;\n var shouldBeNewline = nextProps.children === '';\n !isElement(node) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'node is not an Element') : invariant(false) : void 0;\n var elementNode = node;\n\n if (shouldBeNewline) {\n return !isNewline(elementNode);\n }\n\n return elementNode.textContent !== nextProps.children;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this._forceFlag = !this._forceFlag;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this._forceFlag = !this._forceFlag;\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n if (this.props.children === '') {\n return this._forceFlag ? NEWLINE_A(function (ref) {\n return _this2._node = ref;\n }) : NEWLINE_B(function (ref) {\n return _this2._node = ref;\n });\n }\n\n return React.createElement(\"span\", {\n key: this._forceFlag ? 'A' : 'B',\n \"data-text\": \"true\",\n ref: function ref(_ref) {\n return _this2._node = _ref;\n }\n }, this.props.children);\n };\n\n return DraftEditorTextNode;\n}(React.Component);\n\nmodule.exports = DraftEditorTextNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nmodule.exports = {\n initODS: function initODS() {},\n handleExtensionCausedError: function handleExtensionCausedError() {}\n};","\"use strict\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar DraftEntityInstance = require(\"./DraftEntityInstance\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar uuid = require(\"./uuid\");\n\nvar Map = Immutable.Map;\nvar instances = Map();\nvar instanceKey = uuid();\n/**\n * Temporary utility for generating the warnings\n */\n\nfunction logWarning(oldMethodCall, newMethodCall) {\n console.warn('WARNING: ' + oldMethodCall + ' will be deprecated soon!\\nPlease use \"' + newMethodCall + '\" instead.');\n}\n\n/**\n * A \"document entity\" is an object containing metadata associated with a\n * piece of text in a ContentBlock.\n *\n * For example, a `link` entity might include a `uri` property. When a\n * ContentBlock is rendered in the browser, text that refers to that link\n * entity may be rendered as an anchor, with the `uri` as the href value.\n *\n * In a ContentBlock, every position in the text may correspond to zero\n * or one entities. This correspondence is tracked using a key string,\n * generated via DraftEntity.create() and used to obtain entity metadata\n * via DraftEntity.get().\n */\nvar DraftEntity = {\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.getLastCreatedEntityKey' instead.\n * ---\n * Get the random key string from whatever entity was last created.\n * We need this to support the new API, as part of transitioning to put Entity\n * storage in contentState.\n */\n getLastCreatedEntityKey: function getLastCreatedEntityKey() {\n logWarning('DraftEntity.getLastCreatedEntityKey', 'contentState.getLastCreatedEntityKey');\n return DraftEntity.__getLastCreatedEntityKey();\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.createEntity' instead.\n * ---\n * Create a DraftEntityInstance and store it for later retrieval.\n *\n * A random key string will be generated and returned. This key may\n * be used to track the entity's usage in a ContentBlock, and for\n * retrieving data about the entity at render time.\n */\n create: function create(type, mutability, data) {\n logWarning('DraftEntity.create', 'contentState.createEntity');\n return DraftEntity.__create(type, mutability, data);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.addEntity' instead.\n * ---\n * Add an existing DraftEntityInstance to the DraftEntity map. This is\n * useful when restoring instances from the server.\n */\n add: function add(instance) {\n logWarning('DraftEntity.add', 'contentState.addEntity');\n return DraftEntity.__add(instance);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.getEntity' instead.\n * ---\n * Retrieve the entity corresponding to the supplied key string.\n */\n get: function get(key) {\n logWarning('DraftEntity.get', 'contentState.getEntity');\n return DraftEntity.__get(key);\n },\n\n /**\n * Get all the entities in the content state.\n */\n __getAll: function __getAll() {\n return instances;\n },\n\n /**\n * Load the entity map with the given set of entities.\n */\n __loadWithEntities: function __loadWithEntities(entities) {\n instances = entities;\n instanceKey = uuid();\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.mergeEntityData' instead.\n * ---\n * Entity instances are immutable. If you need to update the data for an\n * instance, this method will merge your data updates and return a new\n * instance.\n */\n mergeData: function mergeData(key, toMerge) {\n logWarning('DraftEntity.mergeData', 'contentState.mergeEntityData');\n return DraftEntity.__mergeData(key, toMerge);\n },\n\n /**\n * WARNING: This method will be deprecated soon!\n * Please use 'contentState.replaceEntityData' instead.\n * ---\n * Completely replace the data for a given instance.\n */\n replaceData: function replaceData(key, newData) {\n logWarning('DraftEntity.replaceData', 'contentState.replaceEntityData');\n return DraftEntity.__replaceData(key, newData);\n },\n // ***********************************WARNING******************************\n // --- the above public API will be deprecated in the next version of Draft!\n // The methods below this line are private - don't call them directly.\n\n /**\n * Get the random key string from whatever entity was last created.\n * We need this to support the new API, as part of transitioning to put Entity\n * storage in contentState.\n */\n __getLastCreatedEntityKey: function __getLastCreatedEntityKey() {\n return instanceKey;\n },\n\n /**\n * Create a DraftEntityInstance and store it for later retrieval.\n *\n * A random key string will be generated and returned. This key may\n * be used to track the entity's usage in a ContentBlock, and for\n * retrieving data about the entity at render time.\n */\n __create: function __create(type, mutability, data) {\n return DraftEntity.__add(new DraftEntityInstance({\n type: type,\n mutability: mutability,\n data: data || {}\n }));\n },\n\n /**\n * Add an existing DraftEntityInstance to the DraftEntity map. This is\n * useful when restoring instances from the server.\n */\n __add: function __add(instance) {\n instanceKey = uuid();\n instances = instances.set(instanceKey, instance);\n return instanceKey;\n },\n\n /**\n * Retrieve the entity corresponding to the supplied key string.\n */\n __get: function __get(key) {\n var instance = instances.get(key);\n !!!instance ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Unknown DraftEntity key: %s.', key) : invariant(false) : void 0;\n return instance;\n },\n\n /**\n * Entity instances are immutable. If you need to update the data for an\n * instance, this method will merge your data updates and return a new\n * instance.\n */\n __mergeData: function __mergeData(key, toMerge) {\n var instance = DraftEntity.__get(key);\n\n var newData = _objectSpread({}, instance.getData(), toMerge);\n\n var newInstance = instance.set('data', newData);\n instances = instances.set(key, newInstance);\n return newInstance;\n },\n\n /**\n * Completely replace the data for a given instance.\n */\n __replaceData: function __replaceData(key, newData) {\n var instance = DraftEntity.__get(key);\n\n var newInstance = instance.set('data', newData);\n instances = instances.set(key, newInstance);\n return newInstance;\n }\n};\nmodule.exports = DraftEntity;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @legacyServerCallableInstance\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Immutable = require(\"immutable\");\n\nvar Record = Immutable.Record;\nvar DraftEntityInstanceRecord = Record({\n type: 'TOKEN',\n mutability: 'IMMUTABLE',\n data: Object\n});\n/**\n * An instance of a document entity, consisting of a `type` and relevant\n * `data`, metadata about the entity.\n *\n * For instance, a \"link\" entity might provide a URI, and a \"mention\"\n * entity might provide the mentioned user's ID. These pieces of data\n * may be used when rendering the entity as part of a ContentBlock DOM\n * representation. For a link, the data would be used as an href for\n * the rendered anchor. For a mention, the ID could be used to retrieve\n * a hovercard.\n */\n\nvar DraftEntityInstance = /*#__PURE__*/function (_DraftEntityInstanceR) {\n _inheritsLoose(DraftEntityInstance, _DraftEntityInstanceR);\n\n function DraftEntityInstance() {\n return _DraftEntityInstanceR.apply(this, arguments) || this;\n }\n\n var _proto = DraftEntityInstance.prototype;\n\n _proto.getType = function getType() {\n return this.get('type');\n };\n\n _proto.getMutability = function getMutability() {\n return this.get('mutability');\n };\n\n _proto.getData = function getData() {\n return this.get('data');\n };\n\n return DraftEntityInstance;\n}(DraftEntityInstanceRecord);\n\nmodule.exports = DraftEntityInstance;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Identify the range to delete from a segmented entity.\n *\n * Rules:\n *\n * Example: 'John F. Kennedy'\n *\n * - Deletion from within any non-whitespace (i.e. ['John', 'F.', 'Kennedy'])\n * will return the range of that text.\n *\n * 'John F. Kennedy' -> 'John F.'\n * ^\n *\n * - Forward deletion of whitespace will remove the following section:\n *\n * 'John F. Kennedy' -> 'John Kennedy'\n * ^\n *\n * - Backward deletion of whitespace will remove the previous section:\n *\n * 'John F. Kennedy' -> 'F. Kennedy'\n * ^\n */\nvar DraftEntitySegments = {\n getRemovalRange: function getRemovalRange(selectionStart, selectionEnd, text, entityStart, direction) {\n var segments = text.split(' ');\n segments = segments.map(function (\n /*string*/\n segment,\n /*number*/\n ii) {\n if (direction === 'forward') {\n if (ii > 0) {\n return ' ' + segment;\n }\n } else if (ii < segments.length - 1) {\n return segment + ' ';\n }\n\n return segment;\n });\n var segmentStart = entityStart;\n var segmentEnd;\n var segment;\n var removalStart = null;\n var removalEnd = null;\n\n for (var jj = 0; jj < segments.length; jj++) {\n segment = segments[jj];\n segmentEnd = segmentStart + segment.length; // Our selection overlaps this segment.\n\n if (selectionStart < segmentEnd && segmentStart < selectionEnd) {\n if (removalStart !== null) {\n removalEnd = segmentEnd;\n } else {\n removalStart = segmentStart;\n removalEnd = segmentEnd;\n }\n } else if (removalStart !== null) {\n break;\n }\n\n segmentStart = segmentEnd;\n }\n\n var entityEnd = entityStart + text.length;\n var atStart = removalStart === entityStart;\n var atEnd = removalEnd === entityEnd;\n\n if (!atStart && atEnd || atStart && !atEnd) {\n if (direction === 'forward') {\n if (removalEnd !== entityEnd) {\n removalEnd++;\n }\n } else if (removalStart !== entityStart) {\n removalStart--;\n }\n }\n\n return {\n start: removalStart,\n end: removalEnd\n };\n }\n};\nmodule.exports = DraftEntitySegments;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nmodule.exports = {\n logBlockedSelectionEvent: function logBlockedSelectionEvent() {\n return null;\n },\n logSelectionStateFailure: function logSelectionStateFailure() {\n return null;\n }\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentStateInlineStyle = require(\"./ContentStateInlineStyle\");\n\nvar applyEntityToContentState = require(\"./applyEntityToContentState\");\n\nvar getCharacterRemovalRange = require(\"./getCharacterRemovalRange\");\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n\nvar Immutable = require(\"immutable\");\n\nvar insertFragmentIntoContentState = require(\"./insertFragmentIntoContentState\");\n\nvar insertTextIntoContentState = require(\"./insertTextIntoContentState\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar modifyBlockForContentState = require(\"./modifyBlockForContentState\");\n\nvar removeEntitiesAtEdges = require(\"./removeEntitiesAtEdges\");\n\nvar removeRangeFromContentState = require(\"./removeRangeFromContentState\");\n\nvar splitBlockInContentState = require(\"./splitBlockInContentState\");\n\nvar OrderedSet = Immutable.OrderedSet;\n/**\n * `DraftModifier` provides a set of convenience methods that apply\n * modifications to a `ContentState` object based on a target `SelectionState`.\n *\n * Any change to a `ContentState` should be decomposable into a series of\n * transaction functions that apply the required changes and return output\n * `ContentState` objects.\n *\n * These functions encapsulate some of the most common transaction sequences.\n */\n\nvar DraftModifier = {\n replaceText: function replaceText(contentState, rangeToReplace, text, inlineStyle, entityKey) {\n var withoutEntities = removeEntitiesAtEdges(contentState, rangeToReplace);\n var withoutText = removeRangeFromContentState(withoutEntities, rangeToReplace);\n var character = CharacterMetadata.create({\n style: inlineStyle || OrderedSet(),\n entity: entityKey || null\n });\n return insertTextIntoContentState(withoutText, withoutText.getSelectionAfter(), text, character);\n },\n insertText: function insertText(contentState, targetRange, text, inlineStyle, entityKey) {\n !targetRange.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Target range must be collapsed for `insertText`.') : invariant(false) : void 0;\n return DraftModifier.replaceText(contentState, targetRange, text, inlineStyle, entityKey);\n },\n moveText: function moveText(contentState, removalRange, targetRange) {\n var movedFragment = getContentStateFragment(contentState, removalRange);\n var afterRemoval = DraftModifier.removeRange(contentState, removalRange, 'backward');\n return DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment);\n },\n replaceWithFragment: function replaceWithFragment(contentState, targetRange, fragment) {\n var mergeBlockData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'REPLACE_WITH_NEW_DATA';\n var withoutEntities = removeEntitiesAtEdges(contentState, targetRange);\n var withoutText = removeRangeFromContentState(withoutEntities, targetRange);\n return insertFragmentIntoContentState(withoutText, withoutText.getSelectionAfter(), fragment, mergeBlockData);\n },\n removeRange: function removeRange(contentState, rangeToRemove, removalDirection) {\n var startKey, endKey, startBlock, endBlock;\n\n if (rangeToRemove.getIsBackward()) {\n rangeToRemove = rangeToRemove.merge({\n anchorKey: rangeToRemove.getFocusKey(),\n anchorOffset: rangeToRemove.getFocusOffset(),\n focusKey: rangeToRemove.getAnchorKey(),\n focusOffset: rangeToRemove.getAnchorOffset(),\n isBackward: false\n });\n }\n\n startKey = rangeToRemove.getAnchorKey();\n endKey = rangeToRemove.getFocusKey();\n startBlock = contentState.getBlockForKey(startKey);\n endBlock = contentState.getBlockForKey(endKey);\n var startOffset = rangeToRemove.getStartOffset();\n var endOffset = rangeToRemove.getEndOffset();\n var startEntityKey = startBlock.getEntityAt(startOffset);\n var endEntityKey = endBlock.getEntityAt(endOffset - 1); // Check whether the selection state overlaps with a single entity.\n // If so, try to remove the appropriate substring of the entity text.\n\n if (startKey === endKey) {\n if (startEntityKey && startEntityKey === endEntityKey) {\n var adjustedRemovalRange = getCharacterRemovalRange(contentState.getEntityMap(), startBlock, endBlock, rangeToRemove, removalDirection);\n return removeRangeFromContentState(contentState, adjustedRemovalRange);\n }\n }\n\n var withoutEntities = removeEntitiesAtEdges(contentState, rangeToRemove);\n return removeRangeFromContentState(withoutEntities, rangeToRemove);\n },\n splitBlock: function splitBlock(contentState, selectionState) {\n var withoutEntities = removeEntitiesAtEdges(contentState, selectionState);\n var withoutText = removeRangeFromContentState(withoutEntities, selectionState);\n return splitBlockInContentState(withoutText, withoutText.getSelectionAfter());\n },\n applyInlineStyle: function applyInlineStyle(contentState, selectionState, inlineStyle) {\n return ContentStateInlineStyle.add(contentState, selectionState, inlineStyle);\n },\n removeInlineStyle: function removeInlineStyle(contentState, selectionState, inlineStyle) {\n return ContentStateInlineStyle.remove(contentState, selectionState, inlineStyle);\n },\n setBlockType: function setBlockType(contentState, selectionState, blockType) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n type: blockType,\n depth: 0\n });\n });\n },\n setBlockData: function setBlockData(contentState, selectionState, blockData) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n data: blockData\n });\n });\n },\n mergeBlockData: function mergeBlockData(contentState, selectionState, blockData) {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n data: block.getData().merge(blockData)\n });\n });\n },\n applyEntity: function applyEntity(contentState, selectionState, entityKey) {\n var withoutEntities = removeEntitiesAtEdges(contentState, selectionState);\n return applyEntityToContentState(withoutEntities, selectionState, entityKey);\n }\n};\nmodule.exports = DraftModifier;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar KEY_DELIMITER = '-';\nvar DraftOffsetKey = {\n encode: function encode(blockKey, decoratorKey, leafKey) {\n return blockKey + KEY_DELIMITER + decoratorKey + KEY_DELIMITER + leafKey;\n },\n decode: function decode(offsetKey) {\n // Extracts the last two parts of offsetKey and captures the rest in blockKeyParts\n var _offsetKey$split$reve = offsetKey.split(KEY_DELIMITER).reverse(),\n leafKey = _offsetKey$split$reve[0],\n decoratorKey = _offsetKey$split$reve[1],\n blockKeyParts = _offsetKey$split$reve.slice(2);\n\n return {\n // Recomposes the parts of blockKey after reversing them\n blockKey: blockKeyParts.reverse().join(KEY_DELIMITER),\n decoratorKey: parseInt(decoratorKey, 10),\n leafKey: parseInt(leafKey, 10)\n };\n }\n};\nmodule.exports = DraftOffsetKey;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar convertFromHTMLToContentBlocks = require(\"./convertFromHTMLToContentBlocks\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getSafeBodyFromHTML = require(\"./getSafeBodyFromHTML\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar sanitizeDraftText = require(\"./sanitizeDraftText\");\n\nvar List = Immutable.List,\n Repeat = Immutable.Repeat;\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock;\nvar DraftPasteProcessor = {\n processHTML: function processHTML(html, blockRenderMap) {\n return convertFromHTMLToContentBlocks(html, getSafeBodyFromHTML, blockRenderMap);\n },\n processText: function processText(textBlocks, character, type) {\n return textBlocks.reduce(function (acc, textLine, index) {\n textLine = sanitizeDraftText(textLine);\n var key = generateRandomKey();\n var blockNodeConfig = {\n key: key,\n type: type,\n text: textLine,\n characterList: List(Repeat(character, textLine.length))\n }; // next block updates previous block\n\n if (experimentalTreeDataSupport && index !== 0) {\n var prevSiblingIndex = index - 1; // update previous block\n\n var previousBlock = acc[prevSiblingIndex] = acc[prevSiblingIndex].merge({\n nextSibling: key\n });\n blockNodeConfig = _objectSpread({}, blockNodeConfig, {\n prevSibling: previousBlock.getKey()\n });\n }\n\n acc.push(new ContentBlockRecord(blockNodeConfig));\n return acc;\n }, []);\n }\n};\nmodule.exports = DraftPasteProcessor;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar TokenizeUtil = require(\"fbjs/lib/TokenizeUtil\");\n\nvar punctuation = TokenizeUtil.getPunctuation(); // The apostrophe and curly single quotes behave in a curious way: when\n// surrounded on both sides by word characters, they behave as word chars; when\n// either neighbor is punctuation or an end of the string, they behave as\n// punctuation.\n\nvar CHAMELEON_CHARS = \"['\\u2018\\u2019]\"; // Remove the underscore, which should count as part of the removable word. The\n// \"chameleon chars\" also count as punctuation in this regex.\n\nvar WHITESPACE_AND_PUNCTUATION = '\\\\s|(?![_])' + punctuation;\nvar DELETE_STRING = '^' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)';\nvar DELETE_REGEX = new RegExp(DELETE_STRING);\nvar BACKSPACE_STRING = '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '$';\nvar BACKSPACE_REGEX = new RegExp(BACKSPACE_STRING);\n\nfunction getRemovableWord(text, isBackward) {\n var matches = isBackward ? BACKSPACE_REGEX.exec(text) : DELETE_REGEX.exec(text);\n return matches ? matches[0] : text;\n}\n\nvar DraftRemovableWord = {\n getBackward: function getBackward(text) {\n return getRemovableWord(text, true);\n },\n getForward: function getForward(text) {\n return getRemovableWord(text, false);\n }\n};\nmodule.exports = DraftRemovableWord;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftStringKey = {\n stringify: function stringify(key) {\n return '_' + String(key);\n },\n unstringify: function unstringify(key) {\n return key.slice(1);\n }\n};\nmodule.exports = DraftStringKey;","\"use strict\";\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar traverseInDepthOrder = function traverseInDepthOrder(blocks, fn) {\n var stack = [].concat(blocks).reverse();\n\n while (stack.length) {\n var _block = stack.pop();\n\n fn(_block);\n var children = _block.children;\n !Array.isArray(children) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid tree raw block') : invariant(false) : void 0;\n stack = stack.concat([].concat(children.reverse()));\n }\n};\n\nvar isListBlock = function isListBlock(block) {\n if (!(block && block.type)) {\n return false;\n }\n\n var type = block.type;\n return type === 'unordered-list-item' || type === 'ordered-list-item';\n};\n\nvar addDepthToChildren = function addDepthToChildren(block) {\n if (Array.isArray(block.children)) {\n block.children = block.children.map(function (child) {\n return child.type === block.type ? _objectSpread({}, child, {\n depth: (block.depth || 0) + 1\n }) : child;\n });\n }\n};\n/**\n * This adapter is intended to be be used as an adapter to draft tree data\n *\n * draft state <=====> draft tree state\n */\n\n\nvar DraftTreeAdapter = {\n /**\n * Converts from a tree raw state back to draft raw state\n */\n fromRawTreeStateToRawState: function fromRawTreeStateToRawState(draftTreeState) {\n var blocks = draftTreeState.blocks;\n var transformedBlocks = [];\n !Array.isArray(blocks) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid raw state') : invariant(false) : void 0;\n\n if (!Array.isArray(blocks) || !blocks.length) {\n return draftTreeState;\n }\n\n traverseInDepthOrder(blocks, function (block) {\n var newBlock = _objectSpread({}, block);\n\n if (isListBlock(block)) {\n newBlock.depth = newBlock.depth || 0;\n addDepthToChildren(block); // if it's a non-leaf node, we don't do anything else\n\n if (block.children != null && block.children.length > 0) {\n return;\n }\n }\n\n delete newBlock.children;\n transformedBlocks.push(newBlock);\n });\n draftTreeState.blocks = transformedBlocks;\n return _objectSpread({}, draftTreeState, {\n blocks: transformedBlocks\n });\n },\n\n /**\n * Converts from draft raw state to tree draft state\n */\n fromRawStateToRawTreeState: function fromRawStateToRawTreeState(draftState) {\n var transformedBlocks = [];\n var parentStack = [];\n draftState.blocks.forEach(function (block) {\n var isList = isListBlock(block);\n var depth = block.depth || 0;\n\n var treeBlock = _objectSpread({}, block, {\n children: []\n });\n\n if (!isList) {\n transformedBlocks.push(treeBlock);\n return;\n }\n\n var lastParent = parentStack[0]; // block is non-nested & there are no nested blocks, directly push block\n\n if (lastParent == null && depth === 0) {\n transformedBlocks.push(treeBlock); // block is first nested block or previous nested block is at a lower level\n } else if (lastParent == null || lastParent.depth < depth - 1) {\n // create new parent block\n var newParent = {\n key: generateRandomKey(),\n text: '',\n depth: depth - 1,\n type: block.type,\n children: [],\n entityRanges: [],\n inlineStyleRanges: []\n };\n parentStack.unshift(newParent);\n\n if (depth === 1) {\n // add as a root-level block\n transformedBlocks.push(newParent);\n } else if (lastParent != null) {\n // depth > 1 => also add as previous parent's child\n lastParent.children.push(newParent);\n }\n\n newParent.children.push(treeBlock);\n } else if (lastParent.depth === depth - 1) {\n // add as child of last parent\n lastParent.children.push(treeBlock);\n } else {\n // pop out parents at levels above this one from the parent stack\n while (lastParent != null && lastParent.depth >= depth) {\n parentStack.shift();\n lastParent = parentStack[0];\n }\n\n if (depth > 0) {\n lastParent.children.push(treeBlock);\n } else {\n transformedBlocks.push(treeBlock);\n }\n }\n });\n return _objectSpread({}, draftState, {\n blocks: transformedBlocks\n });\n }\n};\nmodule.exports = DraftTreeAdapter;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar warning = require(\"fbjs/lib/warning\");\n\nvar DraftTreeInvariants = {\n /**\n * Check if the block is valid\n */\n isValidBlock: function isValidBlock(block, blockMap) {\n var key = block.getKey(); // is its parent's child\n\n var parentKey = block.getParentKey();\n\n if (parentKey != null) {\n var parent = blockMap.get(parentKey);\n\n if (!parent.getChildKeys().includes(key)) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is missing parent -> child pointer on %s', key) : void 0;\n return false;\n }\n } // is its children's parent\n\n\n var children = block.getChildKeys().map(function (k) {\n return blockMap.get(k);\n });\n\n if (!children.every(function (c) {\n return c.getParentKey() === key;\n })) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is missing child -> parent pointer on %s', key) : void 0;\n return false;\n } // is its previous sibling's next sibling\n\n\n var prevSiblingKey = block.getPrevSiblingKey();\n\n if (prevSiblingKey != null) {\n var prevSibling = blockMap.get(prevSiblingKey);\n\n if (prevSibling.getNextSiblingKey() !== key) {\n process.env.NODE_ENV !== \"production\" ? warning(true, \"Tree is missing nextSibling pointer on %s's prevSibling\", key) : void 0;\n return false;\n }\n } // is its next sibling's previous sibling\n\n\n var nextSiblingKey = block.getNextSiblingKey();\n\n if (nextSiblingKey != null) {\n var nextSibling = blockMap.get(nextSiblingKey);\n\n if (nextSibling.getPrevSiblingKey() !== key) {\n process.env.NODE_ENV !== \"production\" ? warning(true, \"Tree is missing prevSibling pointer on %s's nextSibling\", key) : void 0;\n return false;\n }\n } // no 2-node cycles\n\n\n if (nextSiblingKey !== null && prevSiblingKey !== null) {\n if (prevSiblingKey === nextSiblingKey) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree has a two-node cycle at %s', key) : void 0;\n return false;\n }\n } // if it's a leaf node, it has text but no children\n\n\n if (block.text != '') {\n if (block.getChildKeys().size > 0) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Leaf node %s has children', key) : void 0;\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * Checks that this is a connected tree on all the blocks\n * starting from the first block, traversing nextSibling and child pointers\n * should be a tree (preorder traversal - parent, then children)\n * num of connected node === number of blocks\n */\n isConnectedTree: function isConnectedTree(blockMap) {\n // exactly one node has no previous sibling + no parent\n var eligibleFirstNodes = blockMap.toArray().filter(function (block) {\n return block.getParentKey() == null && block.getPrevSiblingKey() == null;\n });\n\n if (eligibleFirstNodes.length !== 1) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is not connected. More or less than one first node') : void 0;\n return false;\n }\n\n var firstNode = eligibleFirstNodes.shift();\n var nodesSeen = 0;\n var currentKey = firstNode.getKey();\n var visitedStack = [];\n\n while (currentKey != null) {\n var currentNode = blockMap.get(currentKey);\n var childKeys = currentNode.getChildKeys();\n var nextSiblingKey = currentNode.getNextSiblingKey(); // if the node has children, add parent's next sibling to stack and go to children\n\n if (childKeys.size > 0) {\n if (nextSiblingKey != null) {\n visitedStack.unshift(nextSiblingKey);\n }\n\n var children = childKeys.map(function (k) {\n return blockMap.get(k);\n });\n\n var _firstNode = children.find(function (block) {\n return block.getPrevSiblingKey() == null;\n });\n\n if (_firstNode == null) {\n process.env.NODE_ENV !== \"production\" ? warning(true, '%s has no first child', currentKey) : void 0;\n return false;\n }\n\n currentKey = _firstNode.getKey(); // TODO(T32490138): Deal with multi-node cycles here\n } else {\n if (currentNode.getNextSiblingKey() != null) {\n currentKey = currentNode.getNextSiblingKey();\n } else {\n currentKey = visitedStack.shift();\n }\n }\n\n nodesSeen++;\n }\n\n if (nodesSeen !== blockMap.size) {\n process.env.NODE_ENV !== \"production\" ? warning(true, 'Tree is not connected. %s nodes were seen instead of %s', nodesSeen, blockMap.size) : void 0;\n return false;\n }\n\n return true;\n },\n\n /**\n * Checks that the block map is a connected tree with valid blocks\n */\n isValidTree: function isValidTree(blockMap) {\n var _this = this;\n\n var blocks = blockMap.toArray();\n\n if (!blocks.every(function (block) {\n return _this.isValidBlock(block, blockMap);\n })) {\n return false;\n }\n\n return this.isConnectedTree(blockMap);\n }\n};\nmodule.exports = DraftTreeInvariants;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeBidiService = require(\"fbjs/lib/UnicodeBidiService\");\n\nvar Immutable = require(\"immutable\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar OrderedMap = Immutable.OrderedMap;\nvar bidiService;\nvar EditorBidiService = {\n getDirectionMap: function getDirectionMap(content, prevBidiMap) {\n if (!bidiService) {\n bidiService = new UnicodeBidiService();\n } else {\n bidiService.reset();\n }\n\n var blockMap = content.getBlockMap();\n var nextBidi = blockMap.valueSeq().map(function (block) {\n return nullthrows(bidiService).getDirection(block.getText());\n });\n var bidiMap = OrderedMap(blockMap.keySeq().zip(nextBidi));\n\n if (prevBidiMap != null && Immutable.is(prevBidiMap, bidiMap)) {\n return prevBidiMap;\n }\n\n return bidiMap;\n }\n};\nmodule.exports = EditorBidiService;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar BlockTree = require(\"./BlockTree\");\n\nvar ContentState = require(\"./ContentState\");\n\nvar EditorBidiService = require(\"./EditorBidiService\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar Immutable = require(\"immutable\");\n\nvar OrderedSet = Immutable.OrderedSet,\n Record = Immutable.Record,\n Stack = Immutable.Stack,\n OrderedMap = Immutable.OrderedMap,\n List = Immutable.List; // When configuring an editor, the user can chose to provide or not provide\n// basically all keys. `currentContent` varies, so this type doesn't include it.\n// (See the types defined below.)\n\nvar defaultRecord = {\n allowUndo: true,\n currentContent: null,\n decorator: null,\n directionMap: null,\n forceSelection: false,\n inCompositionMode: false,\n inlineStyleOverride: null,\n lastChangeType: null,\n nativelyRenderedContent: null,\n redoStack: Stack(),\n selection: null,\n treeMap: null,\n undoStack: Stack()\n};\nvar EditorStateRecord = Record(defaultRecord);\n\nvar EditorState = /*#__PURE__*/function () {\n EditorState.createEmpty = function createEmpty(decorator) {\n return this.createWithText('', decorator);\n };\n\n EditorState.createWithText = function createWithText(text, decorator) {\n return EditorState.createWithContent(ContentState.createFromText(text), decorator);\n };\n\n EditorState.createWithContent = function createWithContent(contentState, decorator) {\n if (contentState.getBlockMap().count() === 0) {\n return EditorState.createEmpty(decorator);\n }\n\n var firstKey = contentState.getBlockMap().first().getKey();\n return EditorState.create({\n currentContent: contentState,\n undoStack: Stack(),\n redoStack: Stack(),\n decorator: decorator || null,\n selection: SelectionState.createEmpty(firstKey)\n });\n };\n\n EditorState.create = function create(config) {\n var currentContent = config.currentContent,\n decorator = config.decorator;\n\n var recordConfig = _objectSpread({}, config, {\n treeMap: generateNewTreeMap(currentContent, decorator),\n directionMap: EditorBidiService.getDirectionMap(currentContent)\n });\n\n return new EditorState(new EditorStateRecord(recordConfig));\n };\n\n EditorState.fromJS = function fromJS(config) {\n return new EditorState(new EditorStateRecord(_objectSpread({}, config, {\n directionMap: config.directionMap != null ? OrderedMap(config.directionMap) : config.directionMap,\n inlineStyleOverride: config.inlineStyleOverride != null ? OrderedSet(config.inlineStyleOverride) : config.inlineStyleOverride,\n nativelyRenderedContent: config.nativelyRenderedContent != null ? ContentState.fromJS(config.nativelyRenderedContent) : config.nativelyRenderedContent,\n redoStack: config.redoStack != null ? Stack(config.redoStack.map(function (v) {\n return ContentState.fromJS(v);\n })) : config.redoStack,\n selection: config.selection != null ? new SelectionState(config.selection) : config.selection,\n treeMap: config.treeMap != null ? OrderedMap(config.treeMap).map(function (v) {\n return List(v).map(function (v) {\n return BlockTree.fromJS(v);\n });\n }) : config.treeMap,\n undoStack: config.undoStack != null ? Stack(config.undoStack.map(function (v) {\n return ContentState.fromJS(v);\n })) : config.undoStack,\n currentContent: ContentState.fromJS(config.currentContent)\n })));\n };\n\n EditorState.set = function set(editorState, put) {\n var map = editorState.getImmutable().withMutations(function (state) {\n var existingDecorator = state.get('decorator');\n var decorator = existingDecorator;\n\n if (put.decorator === null) {\n decorator = null;\n } else if (put.decorator) {\n decorator = put.decorator;\n }\n\n var newContent = put.currentContent || editorState.getCurrentContent();\n\n if (decorator !== existingDecorator) {\n var treeMap = state.get('treeMap');\n var newTreeMap;\n\n if (decorator && existingDecorator) {\n newTreeMap = regenerateTreeForNewDecorator(newContent, newContent.getBlockMap(), treeMap, decorator, existingDecorator);\n } else {\n newTreeMap = generateNewTreeMap(newContent, decorator);\n }\n\n state.merge({\n decorator: decorator,\n treeMap: newTreeMap,\n nativelyRenderedContent: null\n });\n return;\n }\n\n var existingContent = editorState.getCurrentContent();\n\n if (newContent !== existingContent) {\n state.set('treeMap', regenerateTreeForNewBlocks(editorState, newContent.getBlockMap(), newContent.getEntityMap(), decorator));\n }\n\n state.merge(put);\n });\n return new EditorState(map);\n };\n\n var _proto = EditorState.prototype;\n\n _proto.toJS = function toJS() {\n return this.getImmutable().toJS();\n };\n\n _proto.getAllowUndo = function getAllowUndo() {\n return this.getImmutable().get('allowUndo');\n };\n\n _proto.getCurrentContent = function getCurrentContent() {\n return this.getImmutable().get('currentContent');\n };\n\n _proto.getUndoStack = function getUndoStack() {\n return this.getImmutable().get('undoStack');\n };\n\n _proto.getRedoStack = function getRedoStack() {\n return this.getImmutable().get('redoStack');\n };\n\n _proto.getSelection = function getSelection() {\n return this.getImmutable().get('selection');\n };\n\n _proto.getDecorator = function getDecorator() {\n return this.getImmutable().get('decorator');\n };\n\n _proto.isInCompositionMode = function isInCompositionMode() {\n return this.getImmutable().get('inCompositionMode');\n };\n\n _proto.mustForceSelection = function mustForceSelection() {\n return this.getImmutable().get('forceSelection');\n };\n\n _proto.getNativelyRenderedContent = function getNativelyRenderedContent() {\n return this.getImmutable().get('nativelyRenderedContent');\n };\n\n _proto.getLastChangeType = function getLastChangeType() {\n return this.getImmutable().get('lastChangeType');\n }\n /**\n * While editing, the user may apply inline style commands with a collapsed\n * cursor, intending to type text that adopts the specified style. In this\n * case, we track the specified style as an \"override\" that takes precedence\n * over the inline style of the text adjacent to the cursor.\n *\n * If null, there is no override in place.\n */\n ;\n\n _proto.getInlineStyleOverride = function getInlineStyleOverride() {\n return this.getImmutable().get('inlineStyleOverride');\n };\n\n EditorState.setInlineStyleOverride = function setInlineStyleOverride(editorState, inlineStyleOverride) {\n return EditorState.set(editorState, {\n inlineStyleOverride: inlineStyleOverride\n });\n }\n /**\n * Get the appropriate inline style for the editor state. If an\n * override is in place, use it. Otherwise, the current style is\n * based on the location of the selection state.\n */\n ;\n\n _proto.getCurrentInlineStyle = function getCurrentInlineStyle() {\n var override = this.getInlineStyleOverride();\n\n if (override != null) {\n return override;\n }\n\n var content = this.getCurrentContent();\n var selection = this.getSelection();\n\n if (selection.isCollapsed()) {\n return getInlineStyleForCollapsedSelection(content, selection);\n }\n\n return getInlineStyleForNonCollapsedSelection(content, selection);\n };\n\n _proto.getBlockTree = function getBlockTree(blockKey) {\n return this.getImmutable().getIn(['treeMap', blockKey]);\n };\n\n _proto.isSelectionAtStartOfContent = function isSelectionAtStartOfContent() {\n var firstKey = this.getCurrentContent().getBlockMap().first().getKey();\n return this.getSelection().hasEdgeWithin(firstKey, 0, 0);\n };\n\n _proto.isSelectionAtEndOfContent = function isSelectionAtEndOfContent() {\n var content = this.getCurrentContent();\n var blockMap = content.getBlockMap();\n var last = blockMap.last();\n var end = last.getLength();\n return this.getSelection().hasEdgeWithin(last.getKey(), end, end);\n };\n\n _proto.getDirectionMap = function getDirectionMap() {\n return this.getImmutable().get('directionMap');\n }\n /**\n * Incorporate native DOM selection changes into the EditorState. This\n * method can be used when we simply want to accept whatever the DOM\n * has given us to represent selection, and we do not need to re-render\n * the editor.\n *\n * To forcibly move the DOM selection, see `EditorState.forceSelection`.\n */\n ;\n\n EditorState.acceptSelection = function acceptSelection(editorState, selection) {\n return updateSelection(editorState, selection, false);\n }\n /**\n * At times, we need to force the DOM selection to be where we\n * need it to be. This can occur when the anchor or focus nodes\n * are non-text nodes, for instance. In this case, we want to trigger\n * a re-render of the editor, which in turn forces selection into\n * the correct place in the DOM. The `forceSelection` method\n * accomplishes this.\n *\n * This method should be used in cases where you need to explicitly\n * move the DOM selection from one place to another without a change\n * in ContentState.\n */\n ;\n\n EditorState.forceSelection = function forceSelection(editorState, selection) {\n if (!selection.getHasFocus()) {\n selection = selection.set('hasFocus', true);\n }\n\n return updateSelection(editorState, selection, true);\n }\n /**\n * Move selection to the end of the editor without forcing focus.\n */\n ;\n\n EditorState.moveSelectionToEnd = function moveSelectionToEnd(editorState) {\n var content = editorState.getCurrentContent();\n var lastBlock = content.getLastBlock();\n var lastKey = lastBlock.getKey();\n var length = lastBlock.getLength();\n return EditorState.acceptSelection(editorState, new SelectionState({\n anchorKey: lastKey,\n anchorOffset: length,\n focusKey: lastKey,\n focusOffset: length,\n isBackward: false\n }));\n }\n /**\n * Force focus to the end of the editor. This is useful in scenarios\n * where we want to programmatically focus the input and it makes sense\n * to allow the user to continue working seamlessly.\n */\n ;\n\n EditorState.moveFocusToEnd = function moveFocusToEnd(editorState) {\n var afterSelectionMove = EditorState.moveSelectionToEnd(editorState);\n return EditorState.forceSelection(afterSelectionMove, afterSelectionMove.getSelection());\n }\n /**\n * Push the current ContentState onto the undo stack if it should be\n * considered a boundary state, and set the provided ContentState as the\n * new current content.\n */\n ;\n\n EditorState.push = function push(editorState, contentState, changeType) {\n var forceSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\n if (editorState.getCurrentContent() === contentState) {\n return editorState;\n }\n\n var directionMap = EditorBidiService.getDirectionMap(contentState, editorState.getDirectionMap());\n\n if (!editorState.getAllowUndo()) {\n return EditorState.set(editorState, {\n currentContent: contentState,\n directionMap: directionMap,\n lastChangeType: changeType,\n selection: contentState.getSelectionAfter(),\n forceSelection: forceSelection,\n inlineStyleOverride: null\n });\n }\n\n var selection = editorState.getSelection();\n var currentContent = editorState.getCurrentContent();\n var undoStack = editorState.getUndoStack();\n var newContent = contentState;\n\n if (selection !== currentContent.getSelectionAfter() || mustBecomeBoundary(editorState, changeType)) {\n undoStack = undoStack.push(currentContent);\n newContent = newContent.set('selectionBefore', selection);\n } else if (changeType === 'insert-characters' || changeType === 'backspace-character' || changeType === 'delete-character') {\n // Preserve the previous selection.\n newContent = newContent.set('selectionBefore', currentContent.getSelectionBefore());\n }\n\n var inlineStyleOverride = editorState.getInlineStyleOverride(); // Don't discard inline style overrides for the following change types:\n\n var overrideChangeTypes = ['adjust-depth', 'change-block-type', 'split-block'];\n\n if (overrideChangeTypes.indexOf(changeType) === -1) {\n inlineStyleOverride = null;\n }\n\n var editorStateChanges = {\n currentContent: newContent,\n directionMap: directionMap,\n undoStack: undoStack,\n redoStack: Stack(),\n lastChangeType: changeType,\n selection: contentState.getSelectionAfter(),\n forceSelection: forceSelection,\n inlineStyleOverride: inlineStyleOverride\n };\n return EditorState.set(editorState, editorStateChanges);\n }\n /**\n * Make the top ContentState in the undo stack the new current content and\n * push the current content onto the redo stack.\n */\n ;\n\n EditorState.undo = function undo(editorState) {\n if (!editorState.getAllowUndo()) {\n return editorState;\n }\n\n var undoStack = editorState.getUndoStack();\n var newCurrentContent = undoStack.peek();\n\n if (!newCurrentContent) {\n return editorState;\n }\n\n var currentContent = editorState.getCurrentContent();\n var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap());\n return EditorState.set(editorState, {\n currentContent: newCurrentContent,\n directionMap: directionMap,\n undoStack: undoStack.shift(),\n redoStack: editorState.getRedoStack().push(currentContent),\n forceSelection: true,\n inlineStyleOverride: null,\n lastChangeType: 'undo',\n nativelyRenderedContent: null,\n selection: currentContent.getSelectionBefore()\n });\n }\n /**\n * Make the top ContentState in the redo stack the new current content and\n * push the current content onto the undo stack.\n */\n ;\n\n EditorState.redo = function redo(editorState) {\n if (!editorState.getAllowUndo()) {\n return editorState;\n }\n\n var redoStack = editorState.getRedoStack();\n var newCurrentContent = redoStack.peek();\n\n if (!newCurrentContent) {\n return editorState;\n }\n\n var currentContent = editorState.getCurrentContent();\n var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap());\n return EditorState.set(editorState, {\n currentContent: newCurrentContent,\n directionMap: directionMap,\n undoStack: editorState.getUndoStack().push(currentContent),\n redoStack: redoStack.shift(),\n forceSelection: true,\n inlineStyleOverride: null,\n lastChangeType: 'redo',\n nativelyRenderedContent: null,\n selection: newCurrentContent.getSelectionAfter()\n });\n }\n /**\n * Not for public consumption.\n */\n ;\n\n function EditorState(immutable) {\n _defineProperty(this, \"_immutable\", void 0);\n\n this._immutable = immutable;\n }\n /**\n * Not for public consumption.\n */\n\n\n _proto.getImmutable = function getImmutable() {\n return this._immutable;\n };\n\n return EditorState;\n}();\n/**\n * Set the supplied SelectionState as the new current selection, and set\n * the `force` flag to trigger manual selection placement by the view.\n */\n\n\nfunction updateSelection(editorState, selection, forceSelection) {\n return EditorState.set(editorState, {\n selection: selection,\n forceSelection: forceSelection,\n nativelyRenderedContent: null,\n inlineStyleOverride: null\n });\n}\n/**\n * Regenerate the entire tree map for a given ContentState and decorator.\n * Returns an OrderedMap that maps all available ContentBlock objects.\n */\n\n\nfunction generateNewTreeMap(contentState, decorator) {\n return contentState.getBlockMap().map(function (block) {\n return BlockTree.generate(contentState, block, decorator);\n }).toOrderedMap();\n}\n/**\n * Regenerate tree map objects for all ContentBlocks that have changed\n * between the current editorState and newContent. Returns an OrderedMap\n * with only changed regenerated tree map objects.\n */\n\n\nfunction regenerateTreeForNewBlocks(editorState, newBlockMap, newEntityMap, decorator) {\n var contentState = editorState.getCurrentContent().set('entityMap', newEntityMap);\n var prevBlockMap = contentState.getBlockMap();\n var prevTreeMap = editorState.getImmutable().get('treeMap');\n return prevTreeMap.merge(newBlockMap.toSeq().filter(function (block, key) {\n return block !== prevBlockMap.get(key);\n }).map(function (block) {\n return BlockTree.generate(contentState, block, decorator);\n }));\n}\n/**\n * Generate tree map objects for a new decorator object, preserving any\n * decorations that are unchanged from the previous decorator.\n *\n * Note that in order for this to perform optimally, decoration Lists for\n * decorators should be preserved when possible to allow for direct immutable\n * List comparison.\n */\n\n\nfunction regenerateTreeForNewDecorator(content, blockMap, previousTreeMap, decorator, existingDecorator) {\n return previousTreeMap.merge(blockMap.toSeq().filter(function (block) {\n return decorator.getDecorations(block, content) !== existingDecorator.getDecorations(block, content);\n }).map(function (block) {\n return BlockTree.generate(content, block, decorator);\n }));\n}\n/**\n * Return whether a change should be considered a boundary state, given\n * the previous change type. Allows us to discard potential boundary states\n * during standard typing or deletion behavior.\n */\n\n\nfunction mustBecomeBoundary(editorState, changeType) {\n var lastChangeType = editorState.getLastChangeType();\n return changeType !== lastChangeType || changeType !== 'insert-characters' && changeType !== 'backspace-character' && changeType !== 'delete-character';\n}\n\nfunction getInlineStyleForCollapsedSelection(content, selection) {\n var startKey = selection.getStartKey();\n var startOffset = selection.getStartOffset();\n var startBlock = content.getBlockForKey(startKey); // If the cursor is not at the start of the block, look backward to\n // preserve the style of the preceding character.\n\n if (startOffset > 0) {\n return startBlock.getInlineStyleAt(startOffset - 1);\n } // The caret is at position zero in this block. If the block has any\n // text at all, use the style of the first character.\n\n\n if (startBlock.getLength()) {\n return startBlock.getInlineStyleAt(0);\n } // Otherwise, look upward in the document to find the closest character.\n\n\n return lookUpwardForInlineStyle(content, startKey);\n}\n\nfunction getInlineStyleForNonCollapsedSelection(content, selection) {\n var startKey = selection.getStartKey();\n var startOffset = selection.getStartOffset();\n var startBlock = content.getBlockForKey(startKey); // If there is a character just inside the selection, use its style.\n\n if (startOffset < startBlock.getLength()) {\n return startBlock.getInlineStyleAt(startOffset);\n } // Check if the selection at the end of a non-empty block. Use the last\n // style in the block.\n\n\n if (startOffset > 0) {\n return startBlock.getInlineStyleAt(startOffset - 1);\n } // Otherwise, look upward in the document to find the closest character.\n\n\n return lookUpwardForInlineStyle(content, startKey);\n}\n\nfunction lookUpwardForInlineStyle(content, fromKey) {\n var lastNonEmpty = content.getBlockMap().reverse().skipUntil(function (_, k) {\n return k === fromKey;\n }).skip(1).skipUntil(function (block, _) {\n return block.getLength();\n }).first();\n\n if (lastNonEmpty) {\n return lastNonEmpty.getInlineStyleAt(lastNonEmpty.getLength() - 1);\n }\n\n return OrderedSet();\n}\n\nmodule.exports = EditorState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar isSoftNewlineEvent = require(\"./isSoftNewlineEvent\");\n\nvar isOSX = UserAgent.isPlatform('Mac OS X');\nvar KeyBindingUtil = {\n /**\n * Check whether the ctrlKey modifier is *not* being used in conjunction with\n * the altKey modifier. If they are combined, the result is an `altGraph`\n * key modifier, which should not be handled by this set of key bindings.\n */\n isCtrlKeyCommand: function isCtrlKeyCommand(e) {\n return !!e.ctrlKey && !e.altKey;\n },\n isOptionKeyCommand: function isOptionKeyCommand(e) {\n return isOSX && e.altKey;\n },\n usesMacOSHeuristics: function usesMacOSHeuristics() {\n return isOSX;\n },\n hasCommandModifier: function hasCommandModifier(e) {\n return isOSX ? !!e.metaKey && !e.altKey : KeyBindingUtil.isCtrlKeyCommand(e);\n },\n isSoftNewlineEvent: isSoftNewlineEvent\n};\nmodule.exports = KeyBindingUtil;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar adjustBlockDepthForContentState = require(\"./adjustBlockDepthForContentState\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar RichTextEditorUtil = {\n currentBlockContainsLink: function currentBlockContainsLink(editorState) {\n var selection = editorState.getSelection();\n var contentState = editorState.getCurrentContent();\n var entityMap = contentState.getEntityMap();\n return contentState.getBlockForKey(selection.getAnchorKey()).getCharacterList().slice(selection.getStartOffset(), selection.getEndOffset()).some(function (v) {\n var entity = v.getEntity();\n return !!entity && entityMap.__get(entity).getType() === 'LINK';\n });\n },\n getCurrentBlockType: function getCurrentBlockType(editorState) {\n var selection = editorState.getSelection();\n return editorState.getCurrentContent().getBlockForKey(selection.getStartKey()).getType();\n },\n getDataObjectForLinkURL: function getDataObjectForLinkURL(uri) {\n return {\n url: uri.toString()\n };\n },\n handleKeyCommand: function handleKeyCommand(editorState, command, eventTimeStamp) {\n switch (command) {\n case 'bold':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'BOLD');\n\n case 'italic':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'ITALIC');\n\n case 'underline':\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'UNDERLINE');\n\n case 'code':\n return RichTextEditorUtil.toggleCode(editorState);\n\n case 'backspace':\n case 'backspace-word':\n case 'backspace-to-start-of-line':\n return RichTextEditorUtil.onBackspace(editorState);\n\n case 'delete':\n case 'delete-word':\n case 'delete-to-end-of-block':\n return RichTextEditorUtil.onDelete(editorState);\n\n default:\n // they may have custom editor commands; ignore those\n return null;\n }\n },\n insertSoftNewline: function insertSoftNewline(editorState) {\n var contentState = DraftModifier.insertText(editorState.getCurrentContent(), editorState.getSelection(), '\\n', editorState.getCurrentInlineStyle(), null);\n var newEditorState = EditorState.push(editorState, contentState, 'insert-characters');\n return EditorState.forceSelection(newEditorState, contentState.getSelectionAfter());\n },\n\n /**\n * For collapsed selections at the start of styled blocks, backspace should\n * just remove the existing style.\n */\n onBackspace: function onBackspace(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed() || selection.getAnchorOffset() || selection.getFocusOffset()) {\n return null;\n } // First, try to remove a preceding atomic block.\n\n\n var content = editorState.getCurrentContent();\n var startKey = selection.getStartKey();\n var blockBefore = content.getBlockBefore(startKey);\n\n if (blockBefore && blockBefore.getType() === 'atomic') {\n var blockMap = content.getBlockMap()[\"delete\"](blockBefore.getKey());\n var withoutAtomicBlock = content.merge({\n blockMap: blockMap,\n selectionAfter: selection\n });\n\n if (withoutAtomicBlock !== content) {\n return EditorState.push(editorState, withoutAtomicBlock, 'remove-range');\n }\n } // If that doesn't succeed, try to remove the current block style.\n\n\n var withoutBlockStyle = RichTextEditorUtil.tryToRemoveBlockStyle(editorState);\n\n if (withoutBlockStyle) {\n return EditorState.push(editorState, withoutBlockStyle, 'change-block-type');\n }\n\n return null;\n },\n onDelete: function onDelete(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed()) {\n return null;\n }\n\n var content = editorState.getCurrentContent();\n var startKey = selection.getStartKey();\n var block = content.getBlockForKey(startKey);\n var length = block.getLength(); // The cursor is somewhere within the text. Behave normally.\n\n if (selection.getStartOffset() < length) {\n return null;\n }\n\n var blockAfter = content.getBlockAfter(startKey);\n\n if (!blockAfter || blockAfter.getType() !== 'atomic') {\n return null;\n }\n\n var atomicBlockTarget = selection.merge({\n focusKey: blockAfter.getKey(),\n focusOffset: blockAfter.getLength()\n });\n var withoutAtomicBlock = DraftModifier.removeRange(content, atomicBlockTarget, 'forward');\n\n if (withoutAtomicBlock !== content) {\n return EditorState.push(editorState, withoutAtomicBlock, 'remove-range');\n }\n\n return null;\n },\n onTab: function onTab(event, editorState, maxDepth) {\n var selection = editorState.getSelection();\n var key = selection.getAnchorKey();\n\n if (key !== selection.getFocusKey()) {\n return editorState;\n }\n\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(key);\n var type = block.getType();\n\n if (type !== 'unordered-list-item' && type !== 'ordered-list-item') {\n return editorState;\n }\n\n event.preventDefault();\n var depth = block.getDepth();\n\n if (!event.shiftKey && depth === maxDepth) {\n return editorState;\n }\n\n var withAdjustment = adjustBlockDepthForContentState(content, selection, event.shiftKey ? -1 : 1, maxDepth);\n return EditorState.push(editorState, withAdjustment, 'adjust-depth');\n },\n toggleBlockType: function toggleBlockType(editorState, blockType) {\n var selection = editorState.getSelection();\n var startKey = selection.getStartKey();\n var endKey = selection.getEndKey();\n var content = editorState.getCurrentContent();\n var target = selection; // Triple-click can lead to a selection that includes offset 0 of the\n // following block. The `SelectionState` for this case is accurate, but\n // we should avoid toggling block type for the trailing block because it\n // is a confusing interaction.\n\n if (startKey !== endKey && selection.getEndOffset() === 0) {\n var blockBefore = nullthrows(content.getBlockBefore(endKey));\n endKey = blockBefore.getKey();\n target = target.merge({\n anchorKey: startKey,\n anchorOffset: selection.getStartOffset(),\n focusKey: endKey,\n focusOffset: blockBefore.getLength(),\n isBackward: false\n });\n }\n\n var hasAtomicBlock = content.getBlockMap().skipWhile(function (_, k) {\n return k !== startKey;\n }).reverse().skipWhile(function (_, k) {\n return k !== endKey;\n }).some(function (v) {\n return v.getType() === 'atomic';\n });\n\n if (hasAtomicBlock) {\n return editorState;\n }\n\n var typeToSet = content.getBlockForKey(startKey).getType() === blockType ? 'unstyled' : blockType;\n return EditorState.push(editorState, DraftModifier.setBlockType(content, target, typeToSet), 'change-block-type');\n },\n toggleCode: function toggleCode(editorState) {\n var selection = editorState.getSelection();\n var anchorKey = selection.getAnchorKey();\n var focusKey = selection.getFocusKey();\n\n if (selection.isCollapsed() || anchorKey !== focusKey) {\n return RichTextEditorUtil.toggleBlockType(editorState, 'code-block');\n }\n\n return RichTextEditorUtil.toggleInlineStyle(editorState, 'CODE');\n },\n\n /**\n * Toggle the specified inline style for the selection. If the\n * user's selection is collapsed, apply or remove the style for the\n * internal state. If it is not collapsed, apply the change directly\n * to the document state.\n */\n toggleInlineStyle: function toggleInlineStyle(editorState, inlineStyle) {\n var selection = editorState.getSelection();\n var currentStyle = editorState.getCurrentInlineStyle(); // If the selection is collapsed, toggle the specified style on or off and\n // set the result as the new inline style override. This will then be\n // used as the inline style for the next character to be inserted.\n\n if (selection.isCollapsed()) {\n return EditorState.setInlineStyleOverride(editorState, currentStyle.has(inlineStyle) ? currentStyle.remove(inlineStyle) : currentStyle.add(inlineStyle));\n } // If characters are selected, immediately apply or remove the\n // inline style on the document state itself.\n\n\n var content = editorState.getCurrentContent();\n var newContent; // If the style is already present for the selection range, remove it.\n // Otherwise, apply it.\n\n if (currentStyle.has(inlineStyle)) {\n newContent = DraftModifier.removeInlineStyle(content, selection, inlineStyle);\n } else {\n newContent = DraftModifier.applyInlineStyle(content, selection, inlineStyle);\n }\n\n return EditorState.push(editorState, newContent, 'change-inline-style');\n },\n toggleLink: function toggleLink(editorState, targetSelection, entityKey) {\n var withoutLink = DraftModifier.applyEntity(editorState.getCurrentContent(), targetSelection, entityKey);\n return EditorState.push(editorState, withoutLink, 'apply-entity');\n },\n\n /**\n * When a collapsed cursor is at the start of a styled block, changes block\n * type to 'unstyled'. Returns null if selection does not meet that criteria.\n */\n tryToRemoveBlockStyle: function tryToRemoveBlockStyle(editorState) {\n var selection = editorState.getSelection();\n var offset = selection.getAnchorOffset();\n\n if (selection.isCollapsed() && offset === 0) {\n var key = selection.getAnchorKey();\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(key);\n var type = block.getType();\n var blockBefore = content.getBlockBefore(key);\n\n if (type === 'code-block' && blockBefore && blockBefore.getType() === 'code-block' && blockBefore.getLength() !== 0) {\n return null;\n }\n\n if (type !== 'unstyled') {\n return DraftModifier.setBlockType(content, selection, 'unstyled');\n }\n }\n\n return null;\n }\n};\nmodule.exports = RichTextEditorUtil;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar clipboard = null;\n/**\n * Some systems offer a \"secondary\" clipboard to allow quick internal cut\n * and paste behavior. For instance, Ctrl+K (cut) and Ctrl+Y (paste).\n */\n\nvar SecondaryClipboard = {\n cut: function cut(editorState) {\n var content = editorState.getCurrentContent();\n var selection = editorState.getSelection();\n var targetRange = null;\n\n if (selection.isCollapsed()) {\n var anchorKey = selection.getAnchorKey();\n var blockEnd = content.getBlockForKey(anchorKey).getLength();\n\n if (blockEnd === selection.getAnchorOffset()) {\n var keyAfter = content.getKeyAfter(anchorKey);\n\n if (keyAfter == null) {\n return editorState;\n }\n\n targetRange = selection.set('focusKey', keyAfter).set('focusOffset', 0);\n } else {\n targetRange = selection.set('focusOffset', blockEnd);\n }\n } else {\n targetRange = selection;\n }\n\n targetRange = nullthrows(targetRange); // TODO: This should actually append to the current state when doing\n // successive ^K commands without any other cursor movement\n\n clipboard = getContentStateFragment(content, targetRange);\n var afterRemoval = DraftModifier.removeRange(content, targetRange, 'forward');\n\n if (afterRemoval === content) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n },\n paste: function paste(editorState) {\n if (!clipboard) {\n return editorState;\n }\n\n var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), clipboard);\n return EditorState.push(editorState, newContent, 'insert-fragment');\n }\n};\nmodule.exports = SecondaryClipboard;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar Immutable = require(\"immutable\");\n\nvar Record = Immutable.Record;\nvar defaultRecord = {\n anchorKey: '',\n anchorOffset: 0,\n focusKey: '',\n focusOffset: 0,\n isBackward: false,\n hasFocus: false\n};\n/* $FlowFixMe[unclear-type] This comment suppresses an error found when\n * automatically adding a type annotation with the codemod Komodo/Annotate_\n * exports. To see the error delete this comment and run Flow. */\n\nvar SelectionStateRecord = Record(defaultRecord);\n\nvar SelectionState = /*#__PURE__*/function (_SelectionStateRecord) {\n _inheritsLoose(SelectionState, _SelectionStateRecord);\n\n function SelectionState() {\n return _SelectionStateRecord.apply(this, arguments) || this;\n }\n\n var _proto = SelectionState.prototype;\n\n _proto.serialize = function serialize() {\n return 'Anchor: ' + this.getAnchorKey() + ':' + this.getAnchorOffset() + ', ' + 'Focus: ' + this.getFocusKey() + ':' + this.getFocusOffset() + ', ' + 'Is Backward: ' + String(this.getIsBackward()) + ', ' + 'Has Focus: ' + String(this.getHasFocus());\n };\n\n _proto.getAnchorKey = function getAnchorKey() {\n return this.get('anchorKey');\n };\n\n _proto.getAnchorOffset = function getAnchorOffset() {\n return this.get('anchorOffset');\n };\n\n _proto.getFocusKey = function getFocusKey() {\n return this.get('focusKey');\n };\n\n _proto.getFocusOffset = function getFocusOffset() {\n return this.get('focusOffset');\n };\n\n _proto.getIsBackward = function getIsBackward() {\n return this.get('isBackward');\n };\n\n _proto.getHasFocus = function getHasFocus() {\n return this.get('hasFocus');\n }\n /**\n * Return whether the specified range overlaps with an edge of the\n * SelectionState.\n */\n ;\n\n _proto.hasEdgeWithin = function hasEdgeWithin(blockKey, start, end) {\n var anchorKey = this.getAnchorKey();\n var focusKey = this.getFocusKey();\n\n if (anchorKey === focusKey && anchorKey === blockKey) {\n var selectionStart = this.getStartOffset();\n var selectionEnd = this.getEndOffset();\n return start <= selectionStart && selectionStart <= end || // selectionStart is between start and end, or\n start <= selectionEnd && selectionEnd <= end // selectionEnd is between start and end\n ;\n }\n\n if (blockKey !== anchorKey && blockKey !== focusKey) {\n return false;\n }\n\n var offsetToCheck = blockKey === anchorKey ? this.getAnchorOffset() : this.getFocusOffset();\n return start <= offsetToCheck && end >= offsetToCheck;\n };\n\n _proto.isCollapsed = function isCollapsed() {\n return this.getAnchorKey() === this.getFocusKey() && this.getAnchorOffset() === this.getFocusOffset();\n };\n\n _proto.getStartKey = function getStartKey() {\n return this.getIsBackward() ? this.getFocusKey() : this.getAnchorKey();\n };\n\n _proto.getStartOffset = function getStartOffset() {\n return this.getIsBackward() ? this.getFocusOffset() : this.getAnchorOffset();\n };\n\n _proto.getEndKey = function getEndKey() {\n return this.getIsBackward() ? this.getAnchorKey() : this.getFocusKey();\n };\n\n _proto.getEndOffset = function getEndOffset() {\n return this.getIsBackward() ? this.getAnchorOffset() : this.getFocusOffset();\n };\n\n SelectionState.createEmpty = function createEmpty(key) {\n return new SelectionState({\n anchorKey: key,\n anchorOffset: 0,\n focusKey: key,\n focusOffset: 0,\n isBackward: false,\n hasFocus: false\n });\n };\n\n return SelectionState;\n}(SelectionStateRecord);\n\nmodule.exports = SelectionState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction adjustBlockDepthForContentState(contentState, selectionState, adjustment, maxDepth) {\n var startKey = selectionState.getStartKey();\n var endKey = selectionState.getEndKey();\n var blockMap = contentState.getBlockMap();\n var blocks = blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat([[endKey, blockMap.get(endKey)]]).map(function (block) {\n var depth = block.getDepth() + adjustment;\n depth = Math.max(0, Math.min(depth, maxDepth));\n return block.set('depth', depth);\n });\n blockMap = blockMap.merge(blocks);\n return contentState.merge({\n blockMap: blockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = adjustBlockDepthForContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nfunction applyEntityToContentBlock(contentBlock, startArg, end, entityKey) {\n var start = startArg;\n var characterList = contentBlock.getCharacterList();\n\n while (start < end) {\n characterList = characterList.set(start, CharacterMetadata.applyEntity(characterList.get(start), entityKey));\n start++;\n }\n\n return contentBlock.set('characterList', characterList);\n}\n\nmodule.exports = applyEntityToContentBlock;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar applyEntityToContentBlock = require(\"./applyEntityToContentBlock\");\n\nvar Immutable = require(\"immutable\");\n\nfunction applyEntityToContentState(contentState, selectionState, entityKey) {\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var newBlocks = blockMap.skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).toOrderedMap().merge(Immutable.OrderedMap([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) {\n var sliceStart = blockKey === startKey ? startOffset : 0;\n var sliceEnd = blockKey === endKey ? endOffset : block.getLength();\n return applyEntityToContentBlock(block, sliceStart, sliceEnd, entityKey);\n });\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = applyEntityToContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DraftStringKey = require(\"./DraftStringKey\");\n\nvar encodeEntityRanges = require(\"./encodeEntityRanges\");\n\nvar encodeInlineStyleRanges = require(\"./encodeInlineStyleRanges\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar createRawBlock = function createRawBlock(block, entityStorageMap) {\n return {\n key: block.getKey(),\n text: block.getText(),\n type: block.getType(),\n depth: block.getDepth(),\n inlineStyleRanges: encodeInlineStyleRanges(block),\n entityRanges: encodeEntityRanges(block, entityStorageMap),\n data: block.getData().toObject()\n };\n};\n\nvar insertRawBlock = function insertRawBlock(block, entityMap, rawBlocks, blockCacheRef) {\n if (block instanceof ContentBlock) {\n rawBlocks.push(createRawBlock(block, entityMap));\n return;\n }\n\n !(block instanceof ContentBlockNode) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'block is not a BlockNode') : invariant(false) : void 0;\n var parentKey = block.getParentKey();\n\n var rawBlock = blockCacheRef[block.getKey()] = _objectSpread({}, createRawBlock(block, entityMap), {\n children: []\n });\n\n if (parentKey) {\n blockCacheRef[parentKey].children.push(rawBlock);\n return;\n }\n\n rawBlocks.push(rawBlock);\n};\n\nvar encodeRawBlocks = function encodeRawBlocks(contentState, rawState) {\n var entityMap = rawState.entityMap;\n var rawBlocks = [];\n var blockCacheRef = {};\n var entityCacheRef = {};\n var entityStorageKey = 0;\n contentState.getBlockMap().forEach(function (block) {\n block.findEntityRanges(function (character) {\n return character.getEntity() !== null;\n }, function (start) {\n var entityKey = block.getEntityAt(start); // Stringify to maintain order of otherwise numeric keys.\n\n var stringifiedEntityKey = DraftStringKey.stringify(entityKey); // This makes this function resilient to two entities\n // erroneously having the same key\n\n if (entityCacheRef[stringifiedEntityKey]) {\n return;\n }\n\n entityCacheRef[stringifiedEntityKey] = entityKey; // we need the `any` casting here since this is a temporary state\n // where we will later on flip the entity map and populate it with\n // real entity, at this stage we just need to map back the entity\n // key used by the BlockNode\n\n entityMap[stringifiedEntityKey] = \"\".concat(entityStorageKey);\n entityStorageKey++;\n });\n insertRawBlock(block, entityMap, rawBlocks, blockCacheRef);\n });\n return {\n blocks: rawBlocks,\n entityMap: entityMap\n };\n}; // Flip storage map so that our storage keys map to global\n// DraftEntity keys.\n\n\nvar encodeRawEntityMap = function encodeRawEntityMap(contentState, rawState) {\n var blocks = rawState.blocks,\n entityMap = rawState.entityMap;\n var rawEntityMap = {};\n Object.keys(entityMap).forEach(function (key, index) {\n var entity = contentState.getEntity(DraftStringKey.unstringify(key));\n rawEntityMap[index] = {\n type: entity.getType(),\n mutability: entity.getMutability(),\n data: entity.getData()\n };\n });\n return {\n blocks: blocks,\n entityMap: rawEntityMap\n };\n};\n\nvar convertFromDraftStateToRaw = function convertFromDraftStateToRaw(contentState) {\n var rawDraftContentState = {\n entityMap: {},\n blocks: []\n }; // add blocks\n\n rawDraftContentState = encodeRawBlocks(contentState, rawDraftContentState); // add entities\n\n rawDraftContentState = encodeRawEntityMap(contentState, rawDraftContentState);\n return rawDraftContentState;\n};\n\nmodule.exports = convertFromDraftStateToRaw;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _knownListItemDepthCl;\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar DefaultDraftBlockRenderMap = require(\"./DefaultDraftBlockRenderMap\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar URI = require(\"fbjs/lib/URI\");\n\nvar cx = require(\"fbjs/lib/cx\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar getSafeBodyFromHTML = require(\"./getSafeBodyFromHTML\");\n\nvar gkx = require(\"./gkx\");\n\nvar _require = require(\"immutable\"),\n List = _require.List,\n Map = _require.Map,\n OrderedSet = _require.OrderedSet;\n\nvar isHTMLAnchorElement = require(\"./isHTMLAnchorElement\");\n\nvar isHTMLBRElement = require(\"./isHTMLBRElement\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nvar isHTMLImageElement = require(\"./isHTMLImageElement\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar NBSP = ' ';\nvar SPACE = ' '; // used for replacing characters in HTML\n\nvar REGEX_CR = new RegExp('\\r', 'g');\nvar REGEX_LF = new RegExp('\\n', 'g');\nvar REGEX_LEADING_LF = new RegExp('^\\n', 'g');\nvar REGEX_NBSP = new RegExp(NBSP, 'g');\nvar REGEX_CARRIAGE = new RegExp(' ?', 'g');\nvar REGEX_ZWS = new RegExp('​?', 'g'); // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n\nvar boldValues = ['bold', 'bolder', '500', '600', '700', '800', '900'];\nvar notBoldValues = ['light', 'lighter', 'normal', '100', '200', '300', '400'];\nvar anchorAttr = ['className', 'href', 'rel', 'target', 'title'];\nvar imgAttr = ['alt', 'className', 'height', 'src', 'width'];\nvar knownListItemDepthClasses = (_knownListItemDepthCl = {}, _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth0'), 0), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth1'), 1), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth2'), 2), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth3'), 3), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth4'), 4), _knownListItemDepthCl);\nvar HTMLTagToRawInlineStyleMap = Map({\n b: 'BOLD',\n code: 'CODE',\n del: 'STRIKETHROUGH',\n em: 'ITALIC',\n i: 'ITALIC',\n s: 'STRIKETHROUGH',\n strike: 'STRIKETHROUGH',\n strong: 'BOLD',\n u: 'UNDERLINE',\n mark: 'HIGHLIGHT'\n});\n\n/**\n * Build a mapping from HTML tags to draftjs block types\n * out of a BlockRenderMap.\n *\n * The BlockTypeMap for the default BlockRenderMap looks like this:\n * Map({\n * h1: 'header-one',\n * h2: 'header-two',\n * h3: 'header-three',\n * h4: 'header-four',\n * h5: 'header-five',\n * h6: 'header-six',\n * blockquote: 'blockquote',\n * figure: 'atomic',\n * pre: ['code-block'],\n * div: 'unstyled',\n * p: 'unstyled',\n * li: ['ordered-list-item', 'unordered-list-item'],\n * })\n */\nvar buildBlockTypeMap = function buildBlockTypeMap(blockRenderMap) {\n var blockTypeMap = {};\n blockRenderMap.mapKeys(function (blockType, desc) {\n var elements = [desc.element];\n\n if (desc.aliasedElements !== undefined) {\n elements.push.apply(elements, desc.aliasedElements);\n }\n\n elements.forEach(function (element) {\n if (blockTypeMap[element] === undefined) {\n blockTypeMap[element] = blockType;\n } else if (typeof blockTypeMap[element] === 'string') {\n blockTypeMap[element] = [blockTypeMap[element], blockType];\n } else {\n blockTypeMap[element].push(blockType);\n }\n });\n });\n return Map(blockTypeMap);\n};\n\nvar detectInlineStyle = function detectInlineStyle(node) {\n if (isHTMLElement(node)) {\n var element = node; // Currently only used to detect preformatted inline code\n\n if (element.style.fontFamily.includes('monospace')) {\n return 'CODE';\n }\n }\n\n return null;\n};\n/**\n * If we're pasting from one DraftEditor to another we can check to see if\n * existing list item depth classes are being used and preserve this style\n */\n\n\nvar getListItemDepth = function getListItemDepth(node) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n Object.keys(knownListItemDepthClasses).some(function (depthClass) {\n if (node.classList.contains(depthClass)) {\n depth = knownListItemDepthClasses[depthClass];\n }\n });\n return depth;\n};\n/**\n * Return true if the provided HTML Element can be used to build a\n * Draftjs-compatible link.\n */\n\n\nvar isValidAnchor = function isValidAnchor(node) {\n if (!isHTMLAnchorElement(node)) {\n return false;\n }\n\n var anchorNode = node;\n\n if (!anchorNode.href || anchorNode.protocol !== 'http:' && anchorNode.protocol !== 'https:' && anchorNode.protocol !== 'mailto:' && anchorNode.protocol !== 'tel:') {\n return false;\n }\n\n try {\n // Just checking whether we can actually create a URI\n var _ = new URI(anchorNode.href);\n\n return true; // We need our catch statements to have arguments, else\n // UglifyJS (which we use for our OSS builds) will crash.\n // eslint-disable-next-line fb-www/no-unused-catch-bindings\n } catch (_) {\n return false;\n }\n};\n/**\n * Return true if the provided HTML Element can be used to build a\n * Draftjs-compatible image.\n */\n\n\nvar isValidImage = function isValidImage(node) {\n if (!isHTMLImageElement(node)) {\n return false;\n }\n\n var imageNode = node;\n return !!(imageNode.attributes.getNamedItem('src') && imageNode.attributes.getNamedItem('src').value);\n};\n/**\n * Try to guess the inline style of an HTML element based on its css\n * styles (font-weight, font-style and text-decoration).\n */\n\n\nvar styleFromNodeAttributes = function styleFromNodeAttributes(node, style) {\n if (!isHTMLElement(node)) {\n return style;\n }\n\n var htmlElement = node;\n var fontWeight = htmlElement.style.fontWeight;\n var fontStyle = htmlElement.style.fontStyle;\n var textDecoration = htmlElement.style.textDecoration;\n return style.withMutations(function (style) {\n if (boldValues.indexOf(fontWeight) >= 0) {\n style.add('BOLD');\n } else if (notBoldValues.indexOf(fontWeight) >= 0) {\n style.remove('BOLD');\n }\n\n if (fontStyle === 'italic') {\n style.add('ITALIC');\n } else if (fontStyle === 'normal') {\n style.remove('ITALIC');\n }\n\n if (textDecoration === 'underline') {\n style.add('UNDERLINE');\n }\n\n if (textDecoration === 'line-through') {\n style.add('STRIKETHROUGH');\n }\n\n if (textDecoration === 'none') {\n style.remove('UNDERLINE');\n style.remove('STRIKETHROUGH');\n }\n });\n};\n/**\n * Determine if a nodeName is a list type, 'ul' or 'ol'\n */\n\n\nvar isListNode = function isListNode(nodeName) {\n return nodeName === 'ul' || nodeName === 'ol';\n};\n/**\n * ContentBlockConfig is a mutable data structure that holds all\n * the information required to build a ContentBlock and an array of\n * all the child nodes (childConfigs).\n * It is being used a temporary data structure by the\n * ContentBlocksBuilder class.\n */\n\n\n/**\n * ContentBlocksBuilder builds a list of ContentBlocks and an Entity Map\n * out of one (or several) HTMLElement(s).\n *\n * The algorithm has two passes: first it builds a tree of ContentBlockConfigs\n * by walking through the HTML nodes and their children, then it walks the\n * ContentBlockConfigs tree to compute parents/siblings and create\n * the actual ContentBlocks.\n *\n * Typical usage is:\n * new ContentBlocksBuilder()\n * .addDOMNode(someHTMLNode)\n * .addDOMNode(someOtherHTMLNode)\n * .getContentBlocks();\n *\n */\nvar ContentBlocksBuilder = /*#__PURE__*/function () {\n // Most of the method in the class depend on the state of the content builder\n // (i.e. currentBlockType, currentDepth, currentEntity etc.). Though it may\n // be confusing at first, it made the code simpler than the alternative which\n // is to pass those values around in every call.\n // The following attributes are used to accumulate text and styles\n // as we are walking the HTML node tree.\n // Describes the future ContentState as a tree of content blocks\n // The content blocks generated from the blockConfigs\n // Entity map use to store links and images found in the HTML nodes\n // Map HTML tags to draftjs block types and disambiguation function\n function ContentBlocksBuilder(blockTypeMap, disambiguate) {\n _defineProperty(this, \"characterList\", List());\n\n _defineProperty(this, \"currentBlockType\", 'unstyled');\n\n _defineProperty(this, \"currentDepth\", 0);\n\n _defineProperty(this, \"currentEntity\", null);\n\n _defineProperty(this, \"currentText\", '');\n\n _defineProperty(this, \"wrapper\", null);\n\n _defineProperty(this, \"blockConfigs\", []);\n\n _defineProperty(this, \"contentBlocks\", []);\n\n _defineProperty(this, \"entityMap\", DraftEntity);\n\n _defineProperty(this, \"blockTypeMap\", void 0);\n\n _defineProperty(this, \"disambiguate\", void 0);\n\n this.clear();\n this.blockTypeMap = blockTypeMap;\n this.disambiguate = disambiguate;\n }\n /**\n * Clear the internal state of the ContentBlocksBuilder\n */\n\n\n var _proto = ContentBlocksBuilder.prototype;\n\n _proto.clear = function clear() {\n this.characterList = List();\n this.blockConfigs = [];\n this.currentBlockType = 'unstyled';\n this.currentDepth = 0;\n this.currentEntity = null;\n this.currentText = '';\n this.entityMap = DraftEntity;\n this.wrapper = null;\n this.contentBlocks = [];\n }\n /**\n * Add an HTMLElement to the ContentBlocksBuilder\n */\n ;\n\n _proto.addDOMNode = function addDOMNode(node) {\n var _this$blockConfigs;\n\n this.contentBlocks = [];\n this.currentDepth = 0; // Converts the HTML node to block config\n\n (_this$blockConfigs = this.blockConfigs).push.apply(_this$blockConfigs, this._toBlockConfigs([node], OrderedSet())); // There might be some left over text in the builder's\n // internal state, if so make a ContentBlock out of it.\n\n\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n this.blockConfigs.push(this._makeBlockConfig());\n } // for chaining\n\n\n return this;\n }\n /**\n * Return the ContentBlocks and the EntityMap that corresponds\n * to the previously added HTML nodes.\n */\n ;\n\n _proto.getContentBlocks = function getContentBlocks() {\n if (this.contentBlocks.length === 0) {\n if (experimentalTreeDataSupport) {\n this._toContentBlocks(this.blockConfigs);\n } else {\n this._toFlatContentBlocks(this.blockConfigs);\n }\n }\n\n return {\n contentBlocks: this.contentBlocks,\n entityMap: this.entityMap\n };\n } // ***********************************WARNING******************************\n // The methods below this line are private - don't call them directly.\n\n /**\n * Generate a new ContentBlockConfig out of the current internal state\n * of the builder, then clears the internal state.\n */\n ;\n\n _proto._makeBlockConfig = function _makeBlockConfig() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var key = config.key || generateRandomKey();\n\n var block = _objectSpread({\n key: key,\n type: this.currentBlockType,\n text: this.currentText,\n characterList: this.characterList,\n depth: this.currentDepth,\n parent: null,\n children: List(),\n prevSibling: null,\n nextSibling: null,\n childConfigs: []\n }, config);\n\n this.characterList = List();\n this.currentBlockType = 'unstyled';\n this.currentText = '';\n return block;\n }\n /**\n * Converts an array of HTML elements to a multi-root tree of content\n * block configs. Some text content may be left in the builders internal\n * state to enable chaining sucessive calls.\n */\n ;\n\n _proto._toBlockConfigs = function _toBlockConfigs(nodes, style) {\n var blockConfigs = [];\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'body' || isListNode(nodeName)) {\n // body, ol and ul are 'block' type nodes so create a block config\n // with the text accumulated so far (if any)\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n blockConfigs.push(this._makeBlockConfig());\n } // body, ol and ul nodes are ignored, but their children are inlined in\n // the parent block config.\n\n\n var wasCurrentDepth = this.currentDepth;\n var wasWrapper = this.wrapper;\n\n if (isListNode(nodeName)) {\n this.wrapper = nodeName;\n\n if (isListNode(wasWrapper)) {\n this.currentDepth++;\n }\n }\n\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), style));\n this.currentDepth = wasCurrentDepth;\n this.wrapper = wasWrapper;\n continue;\n }\n\n var blockType = this.blockTypeMap.get(nodeName);\n\n if (blockType !== undefined) {\n // 'block' type node means we need to create a block config\n // with the text accumulated so far (if any)\n this._trimCurrentText();\n\n if (this.currentText !== '') {\n blockConfigs.push(this._makeBlockConfig());\n }\n\n var _wasCurrentDepth = this.currentDepth;\n var _wasWrapper = this.wrapper;\n this.wrapper = nodeName === 'pre' ? 'pre' : this.wrapper;\n\n if (typeof blockType !== 'string') {\n blockType = this.disambiguate(nodeName, this.wrapper) || blockType[0] || 'unstyled';\n }\n\n if (!experimentalTreeDataSupport && isHTMLElement(node) && (blockType === 'unordered-list-item' || blockType === 'ordered-list-item')) {\n var htmlElement = node;\n this.currentDepth = getListItemDepth(htmlElement, this.currentDepth);\n }\n\n var key = generateRandomKey();\n\n var childConfigs = this._toBlockConfigs(Array.from(node.childNodes), style);\n\n this._trimCurrentText();\n\n blockConfigs.push(this._makeBlockConfig({\n key: key,\n childConfigs: childConfigs,\n type: blockType\n }));\n this.currentDepth = _wasCurrentDepth;\n this.wrapper = _wasWrapper;\n continue;\n }\n\n if (nodeName === '#text') {\n this._addTextNode(node, style);\n\n continue;\n }\n\n if (nodeName === 'br') {\n this._addBreakNode(node, style);\n\n continue;\n }\n\n if (isValidImage(node)) {\n this._addImgNode(node, style);\n\n continue;\n }\n\n if (isValidAnchor(node)) {\n this._addAnchorNode(node, blockConfigs, style);\n\n continue;\n }\n\n var newStyle = style;\n\n if (HTMLTagToRawInlineStyleMap.has(nodeName)) {\n newStyle = newStyle.add(HTMLTagToRawInlineStyleMap.get(nodeName));\n }\n\n newStyle = styleFromNodeAttributes(node, newStyle);\n var inlineStyle = detectInlineStyle(node);\n\n if (inlineStyle != null) {\n newStyle = newStyle.add(inlineStyle);\n }\n\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), newStyle));\n }\n\n return blockConfigs;\n }\n /**\n * Append a string of text to the internal buffer.\n */\n ;\n\n _proto._appendText = function _appendText(text, style) {\n var _this$characterList;\n\n this.currentText += text;\n var characterMetadata = CharacterMetadata.create({\n style: style,\n entity: this.currentEntity\n });\n this.characterList = (_this$characterList = this.characterList).push.apply(_this$characterList, Array(text.length).fill(characterMetadata));\n }\n /**\n * Trim the text in the internal buffer.\n */\n ;\n\n _proto._trimCurrentText = function _trimCurrentText() {\n var l = this.currentText.length;\n var begin = l - this.currentText.trimLeft().length;\n var end = this.currentText.trimRight().length; // We should not trim whitespaces for which an entity is defined.\n\n var entity = this.characterList.findEntry(function (characterMetadata) {\n return characterMetadata.getEntity() !== null;\n });\n begin = entity !== undefined ? Math.min(begin, entity[0]) : begin;\n entity = this.characterList.reverse().findEntry(function (characterMetadata) {\n return characterMetadata.getEntity() !== null;\n });\n end = entity !== undefined ? Math.max(end, l - entity[0]) : end;\n\n if (begin > end) {\n this.currentText = '';\n this.characterList = List();\n } else {\n this.currentText = this.currentText.slice(begin, end);\n this.characterList = this.characterList.slice(begin, end);\n }\n }\n /**\n * Add the content of an HTML text node to the internal state\n */\n ;\n\n _proto._addTextNode = function _addTextNode(node, style) {\n var text = node.textContent;\n var trimmedText = text.trim(); // If we are not in a pre block and the trimmed content is empty,\n // normalize to a single space.\n\n if (trimmedText === '' && this.wrapper !== 'pre') {\n text = ' ';\n }\n\n if (this.wrapper !== 'pre') {\n // Trim leading line feed, which is invisible in HTML\n text = text.replace(REGEX_LEADING_LF, ''); // Can't use empty string because MSWord\n\n text = text.replace(REGEX_LF, SPACE);\n }\n\n this._appendText(text, style);\n };\n\n _proto._addBreakNode = function _addBreakNode(node, style) {\n if (!isHTMLBRElement(node)) {\n return;\n }\n\n this._appendText('\\n', style);\n }\n /**\n * Add the content of an HTML img node to the internal state\n */\n ;\n\n _proto._addImgNode = function _addImgNode(node, style) {\n if (!isHTMLImageElement(node)) {\n return;\n }\n\n var image = node;\n var entityConfig = {};\n imgAttr.forEach(function (attr) {\n var imageAttribute = image.getAttribute(attr);\n\n if (imageAttribute) {\n entityConfig[attr] = imageAttribute;\n }\n }); // TODO: T15530363 update this when we remove DraftEntity entirely\n\n this.currentEntity = this.entityMap.__create('IMAGE', 'IMMUTABLE', entityConfig); // The child text node cannot just have a space or return as content (since\n // we strip those out), unless the image is for presentation only.\n // See https://github.com/facebook/draft-js/issues/231 for some context.\n\n if (gkx('draftjs_fix_paste_for_img')) {\n if (image.getAttribute('role') !== 'presentation') {\n this._appendText(\"\\uD83D\\uDCF7\", style);\n }\n } else {\n this._appendText(\"\\uD83D\\uDCF7\", style);\n }\n\n this.currentEntity = null;\n }\n /**\n * Add the content of an HTML 'a' node to the internal state. Child nodes\n * (if any) are converted to Block Configs and appended to the provided\n * blockConfig array.\n */\n ;\n\n _proto._addAnchorNode = function _addAnchorNode(node, blockConfigs, style) {\n // The check has already been made by isValidAnchor but\n // we have to do it again to keep flow happy.\n if (!isHTMLAnchorElement(node)) {\n return;\n }\n\n var anchor = node;\n var entityConfig = {};\n anchorAttr.forEach(function (attr) {\n var anchorAttribute = anchor.getAttribute(attr);\n\n if (anchorAttribute) {\n entityConfig[attr] = anchorAttribute;\n }\n });\n entityConfig.url = new URI(anchor.href).toString(); // TODO: T15530363 update this when we remove DraftEntity completely\n\n this.currentEntity = this.entityMap.__create('LINK', 'MUTABLE', entityConfig || {});\n blockConfigs.push.apply(blockConfigs, this._toBlockConfigs(Array.from(node.childNodes), style));\n this.currentEntity = null;\n }\n /**\n * Walk the BlockConfig tree, compute parent/children/siblings,\n * and generate the corresponding ContentBlockNode\n */\n ;\n\n _proto._toContentBlocks = function _toContentBlocks(blockConfigs) {\n var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var l = blockConfigs.length - 1;\n\n for (var i = 0; i <= l; i++) {\n var config = blockConfigs[i];\n config.parent = parent;\n config.prevSibling = i > 0 ? blockConfigs[i - 1].key : null;\n config.nextSibling = i < l ? blockConfigs[i + 1].key : null;\n config.children = List(config.childConfigs.map(function (child) {\n return child.key;\n }));\n this.contentBlocks.push(new ContentBlockNode(_objectSpread({}, config)));\n\n this._toContentBlocks(config.childConfigs, config.key);\n }\n }\n /**\n * Remove 'useless' container nodes from the block config hierarchy, by\n * replacing them with their children.\n */\n ;\n\n _proto._hoistContainersInBlockConfigs = function _hoistContainersInBlockConfigs(blockConfigs) {\n var _this = this;\n\n var hoisted = List(blockConfigs).flatMap(function (blockConfig) {\n // Don't mess with useful blocks\n if (blockConfig.type !== 'unstyled' || blockConfig.text !== '') {\n return [blockConfig];\n }\n\n return _this._hoistContainersInBlockConfigs(blockConfig.childConfigs);\n });\n return hoisted;\n } // ***********************************************************************\n // The two methods below are used for backward compatibility when\n // experimentalTreeDataSupport is disabled.\n\n /**\n * Same as _toContentBlocks but replaces nested blocks by their\n * text content.\n */\n ;\n\n _proto._toFlatContentBlocks = function _toFlatContentBlocks(blockConfigs) {\n var _this2 = this;\n\n var cleanConfigs = this._hoistContainersInBlockConfigs(blockConfigs);\n\n cleanConfigs.forEach(function (config) {\n var _this2$_extractTextFr = _this2._extractTextFromBlockConfigs(config.childConfigs),\n text = _this2$_extractTextFr.text,\n characterList = _this2$_extractTextFr.characterList;\n\n _this2.contentBlocks.push(new ContentBlock(_objectSpread({}, config, {\n text: config.text + text,\n characterList: config.characterList.concat(characterList)\n })));\n });\n }\n /**\n * Extract the text and the associated inline styles form an\n * array of content block configs.\n */\n ;\n\n _proto._extractTextFromBlockConfigs = function _extractTextFromBlockConfigs(blockConfigs) {\n var l = blockConfigs.length - 1;\n var text = '';\n var characterList = List();\n\n for (var i = 0; i <= l; i++) {\n var config = blockConfigs[i];\n text += config.text;\n characterList = characterList.concat(config.characterList);\n\n if (text !== '' && config.type !== 'unstyled') {\n text += '\\n';\n characterList = characterList.push(characterList.last());\n }\n\n var children = this._extractTextFromBlockConfigs(config.childConfigs);\n\n text += children.text;\n characterList = characterList.concat(children.characterList);\n }\n\n return {\n text: text,\n characterList: characterList\n };\n };\n\n return ContentBlocksBuilder;\n}();\n/**\n * Converts an HTML string to an array of ContentBlocks and an EntityMap\n * suitable to initialize the internal state of a Draftjs component.\n */\n\n\nvar convertFromHTMLToContentBlocks = function convertFromHTMLToContentBlocks(html) {\n var DOMBuilder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getSafeBodyFromHTML;\n var blockRenderMap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DefaultDraftBlockRenderMap;\n // Be ABSOLUTELY SURE that the dom builder you pass here won't execute\n // arbitrary code in whatever environment you're running this in. For an\n // example of how we try to do this in-browser, see getSafeBodyFromHTML.\n // Remove funky characters from the HTML string\n html = html.trim().replace(REGEX_CR, '').replace(REGEX_NBSP, SPACE).replace(REGEX_CARRIAGE, '').replace(REGEX_ZWS, ''); // Build a DOM tree out of the HTML string\n\n var safeBody = DOMBuilder(html);\n\n if (!safeBody) {\n return null;\n } // Build a BlockTypeMap out of the BlockRenderMap\n\n\n var blockTypeMap = buildBlockTypeMap(blockRenderMap); // Select the proper block type for the cases where the blockRenderMap\n // uses multiple block types for the same html tag.\n\n var disambiguate = function disambiguate(tag, wrapper) {\n if (tag === 'li') {\n return wrapper === 'ol' ? 'ordered-list-item' : 'unordered-list-item';\n }\n\n return null;\n };\n\n return new ContentBlocksBuilder(blockTypeMap, disambiguate).addDOMNode(safeBody).getContentBlocks();\n};\n\nmodule.exports = convertFromHTMLToContentBlocks;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ContentBlock = require(\"./ContentBlock\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar ContentState = require(\"./ContentState\");\n\nvar DraftEntity = require(\"./DraftEntity\");\n\nvar DraftTreeAdapter = require(\"./DraftTreeAdapter\");\n\nvar DraftTreeInvariants = require(\"./DraftTreeInvariants\");\n\nvar SelectionState = require(\"./SelectionState\");\n\nvar createCharacterList = require(\"./createCharacterList\");\n\nvar decodeEntityRanges = require(\"./decodeEntityRanges\");\n\nvar decodeInlineStyleRanges = require(\"./decodeInlineStyleRanges\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar gkx = require(\"./gkx\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\nvar List = Immutable.List,\n Map = Immutable.Map,\n OrderedMap = Immutable.OrderedMap;\n\nvar decodeBlockNodeConfig = function decodeBlockNodeConfig(block, entityMap) {\n var key = block.key,\n type = block.type,\n data = block.data,\n text = block.text,\n depth = block.depth;\n var blockNodeConfig = {\n text: text,\n depth: depth || 0,\n type: type || 'unstyled',\n key: key || generateRandomKey(),\n data: Map(data),\n characterList: decodeCharacterList(block, entityMap)\n };\n return blockNodeConfig;\n};\n\nvar decodeCharacterList = function decodeCharacterList(block, entityMap) {\n var text = block.text,\n rawEntityRanges = block.entityRanges,\n rawInlineStyleRanges = block.inlineStyleRanges;\n var entityRanges = rawEntityRanges || [];\n var inlineStyleRanges = rawInlineStyleRanges || []; // Translate entity range keys to the DraftEntity map.\n\n return createCharacterList(decodeInlineStyleRanges(text, inlineStyleRanges), decodeEntityRanges(text, entityRanges.filter(function (range) {\n return entityMap.hasOwnProperty(range.key);\n }).map(function (range) {\n return _objectSpread({}, range, {\n key: entityMap[range.key]\n });\n })));\n};\n\nvar addKeyIfMissing = function addKeyIfMissing(block) {\n return _objectSpread({}, block, {\n key: block.key || generateRandomKey()\n });\n};\n/**\n * Node stack is responsible to ensure we traverse the tree only once\n * in depth order, while also providing parent refs to inner nodes to\n * construct their links.\n */\n\n\nvar updateNodeStack = function updateNodeStack(stack, nodes, parentRef) {\n var nodesWithParentRef = nodes.map(function (block) {\n return _objectSpread({}, block, {\n parentRef: parentRef\n });\n }); // since we pop nodes from the stack we need to insert them in reverse\n\n return stack.concat(nodesWithParentRef.reverse());\n};\n/**\n * This will build a tree draft content state by creating the node\n * reference links into a single tree walk. Each node has a link\n * reference to \"parent\", \"children\", \"nextSibling\" and \"prevSibling\"\n * blockMap will be created using depth ordering.\n */\n\n\nvar decodeContentBlockNodes = function decodeContentBlockNodes(blocks, entityMap) {\n return blocks // ensure children have valid keys to enable sibling links\n .map(addKeyIfMissing).reduce(function (blockMap, block, index) {\n !Array.isArray(block.children) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : invariant(false) : void 0; // ensure children have valid keys to enable sibling links\n\n var children = block.children.map(addKeyIfMissing); // root level nodes\n\n var contentBlockNode = new ContentBlockNode(_objectSpread({}, decodeBlockNodeConfig(block, entityMap), {\n prevSibling: index === 0 ? null : blocks[index - 1].key,\n nextSibling: index === blocks.length - 1 ? null : blocks[index + 1].key,\n children: List(children.map(function (child) {\n return child.key;\n }))\n })); // push root node to blockMap\n\n blockMap = blockMap.set(contentBlockNode.getKey(), contentBlockNode); // this stack is used to ensure we visit all nodes respecting depth ordering\n\n var stack = updateNodeStack([], children, contentBlockNode); // start computing children nodes\n\n while (stack.length > 0) {\n // we pop from the stack and start processing this node\n var node = stack.pop(); // parentRef already points to a converted ContentBlockNode\n\n var parentRef = node.parentRef;\n var siblings = parentRef.getChildKeys();\n\n var _index = siblings.indexOf(node.key);\n\n var isValidBlock = Array.isArray(node.children);\n\n if (!isValidBlock) {\n !isValidBlock ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : invariant(false) : void 0;\n break;\n } // ensure children have valid keys to enable sibling links\n\n\n var _children = node.children.map(addKeyIfMissing);\n\n var _contentBlockNode = new ContentBlockNode(_objectSpread({}, decodeBlockNodeConfig(node, entityMap), {\n parent: parentRef.getKey(),\n children: List(_children.map(function (child) {\n return child.key;\n })),\n prevSibling: _index === 0 ? null : siblings.get(_index - 1),\n nextSibling: _index === siblings.size - 1 ? null : siblings.get(_index + 1)\n })); // push node to blockMap\n\n\n blockMap = blockMap.set(_contentBlockNode.getKey(), _contentBlockNode); // this stack is used to ensure we visit all nodes respecting depth ordering\n\n stack = updateNodeStack(stack, _children, _contentBlockNode);\n }\n\n return blockMap;\n }, OrderedMap());\n};\n\nvar decodeContentBlocks = function decodeContentBlocks(blocks, entityMap) {\n return OrderedMap(blocks.map(function (block) {\n var contentBlock = new ContentBlock(decodeBlockNodeConfig(block, entityMap));\n return [contentBlock.getKey(), contentBlock];\n }));\n};\n\nvar decodeRawBlocks = function decodeRawBlocks(rawState, entityMap) {\n var isTreeRawBlock = rawState.blocks.find(function (block) {\n return Array.isArray(block.children) && block.children.length > 0;\n });\n var rawBlocks = experimentalTreeDataSupport && !isTreeRawBlock ? DraftTreeAdapter.fromRawStateToRawTreeState(rawState).blocks : rawState.blocks;\n\n if (!experimentalTreeDataSupport) {\n return decodeContentBlocks(isTreeRawBlock ? DraftTreeAdapter.fromRawTreeStateToRawState(rawState).blocks : rawBlocks, entityMap);\n }\n\n var blockMap = decodeContentBlockNodes(rawBlocks, entityMap); // in dev mode, check that the tree invariants are met\n\n if (process.env.NODE_ENV !== \"production\") {\n !DraftTreeInvariants.isValidTree(blockMap) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Should be a valid tree') : invariant(false) : void 0;\n }\n\n return blockMap;\n};\n\nvar decodeRawEntityMap = function decodeRawEntityMap(rawState) {\n var rawEntityMap = rawState.entityMap;\n var entityMap = {}; // TODO: Update this once we completely remove DraftEntity\n\n Object.keys(rawEntityMap).forEach(function (rawEntityKey) {\n var _rawEntityMap$rawEnti = rawEntityMap[rawEntityKey],\n type = _rawEntityMap$rawEnti.type,\n mutability = _rawEntityMap$rawEnti.mutability,\n data = _rawEntityMap$rawEnti.data; // get the key reference to created entity\n\n entityMap[rawEntityKey] = DraftEntity.__create(type, mutability, data || {});\n });\n return entityMap;\n};\n\nvar convertFromRawToDraftState = function convertFromRawToDraftState(rawState) {\n !Array.isArray(rawState.blocks) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'invalid RawDraftContentState') : invariant(false) : void 0; // decode entities\n\n var entityMap = decodeRawEntityMap(rawState); // decode blockMap\n\n var blockMap = decodeRawBlocks(rawState, entityMap); // create initial selection\n\n var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey());\n return new ContentState({\n blockMap: blockMap,\n entityMap: entityMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n};\n\nmodule.exports = convertFromRawToDraftState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List;\n\nfunction createCharacterList(inlineStyles, entities) {\n var characterArray = inlineStyles.map(function (style, ii) {\n var entity = entities[ii];\n return CharacterMetadata.create({\n style: style,\n entity: entity\n });\n });\n return List(characterArray);\n}\n\nmodule.exports = createCharacterList;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar substr = UnicodeUtils.substr;\n/**\n * Convert to native JavaScript string lengths to determine ranges.\n */\n\nfunction decodeEntityRanges(text, ranges) {\n var entities = Array(text.length).fill(null);\n\n if (ranges) {\n ranges.forEach(function (range) {\n // Using Unicode-enabled substrings converted to JavaScript lengths,\n // fill the output array with entity keys.\n var start = substr(text, 0, range.offset).length;\n var end = start + substr(text, range.offset, range.length).length;\n\n for (var ii = start; ii < end; ii++) {\n entities[ii] = range.key;\n }\n });\n }\n\n return entities;\n}\n\nmodule.exports = decodeEntityRanges;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar _require = require(\"immutable\"),\n OrderedSet = _require.OrderedSet;\n\nvar substr = UnicodeUtils.substr;\nvar EMPTY_SET = OrderedSet();\n/**\n * Convert to native JavaScript string lengths to determine ranges.\n */\n\nfunction decodeInlineStyleRanges(text, ranges) {\n var styles = Array(text.length).fill(EMPTY_SET);\n\n if (ranges) {\n ranges.forEach(function (range) {\n var cursor = substr(text, 0, range.offset).length;\n var end = cursor + substr(text, range.offset, range.length).length;\n\n while (cursor < end) {\n styles[cursor] = styles[cursor].add(range.style);\n cursor++;\n }\n });\n }\n\n return styles;\n}\n\nmodule.exports = decodeInlineStyleRanges;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * Provides utilities for handling draftjs keys.\n *\n * @emails oncall+draft_js\n * \n * @format\n */\n'use strict';\n\nfunction notEmptyKey(key) {\n return key != null && key != '';\n}\n\nmodule.exports = {\n notEmptyKey: notEmptyKey\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar getEntityKeyForSelection = require(\"./getEntityKeyForSelection\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar isSelectionAtLeafStart = require(\"./isSelectionAtLeafStart\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar setImmediate = require(\"fbjs/lib/setImmediate\"); // When nothing is focused, Firefox regards two characters, `'` and `/`, as\n// commands that should open and focus the \"quickfind\" search bar. This should\n// *never* happen while a contenteditable is focused, but as of v28, it\n// sometimes does, even when the keypress event target is the contenteditable.\n// This breaks the input. Special case these characters to ensure that when\n// they are typed, we prevent default on the event to make sure not to\n// trigger quickfind.\n\n\nvar FF_QUICKFIND_CHAR = \"'\";\nvar FF_QUICKFIND_LINK_CHAR = '/';\nvar isFirefox = UserAgent.isBrowser('Firefox');\n\nfunction mustPreventDefaultForCharacter(character) {\n return isFirefox && (character == FF_QUICKFIND_CHAR || character == FF_QUICKFIND_LINK_CHAR);\n}\n/**\n * Replace the current selection with the specified text string, with the\n * inline style and entity key applied to the newly inserted text.\n */\n\n\nfunction replaceText(editorState, text, inlineStyle, entityKey, forceSelection) {\n var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), text, inlineStyle, entityKey);\n return EditorState.push(editorState, contentState, 'insert-characters', forceSelection);\n}\n/**\n * When `onBeforeInput` executes, the browser is attempting to insert a\n * character into the editor. Apply this character data to the document,\n * allowing native insertion if possible.\n *\n * Native insertion is encouraged in order to limit re-rendering and to\n * preserve spellcheck highlighting, which disappears or flashes if re-render\n * occurs on the relevant text nodes.\n */\n\n\nfunction editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n var chars = e.data; // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n\n if (!chars) {\n return;\n } // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n\n\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState, e.timeStamp))) {\n e.preventDefault();\n return;\n } // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n\n\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()), true));\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()), false); // Bunch of different cases follow where we need to prevent native insertion.\n\n var mustPreventNative = false;\n\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n\n if (!mustPreventNative) {\n // Let's say we have a decorator that highlights hashtags. In many cases\n // we need to prevent native behavior and rerender ourselves --\n // particularly, any case *except* where the inserted characters end up\n // anywhere except exactly where you put them.\n //\n // Using [] to denote a decorated leaf, some examples:\n //\n // 1. 'hi #' and append 'f'\n // desired rendering: 'hi [#f]'\n // native rendering would be: 'hi #f' (incorrect)\n //\n // 2. 'x [#foo]' and insert '#' before 'f'\n // desired rendering: 'x #[#foo]'\n // native rendering would be: 'x [##foo]' (incorrect)\n //\n // 3. '[#foobar]' and insert ' ' between 'foo' and 'bar'\n // desired rendering: '[#foo] bar'\n // native rendering would be: '[#foo bar]' (incorrect)\n //\n // 4. '[#foo]' and delete '#' [won't use this beforeinput codepath though]\n // desired rendering: 'foo'\n // native rendering would be: '[foo]' (incorrect)\n //\n // 5. '[#foo]' and append 'b'\n // desired rendering: '[#foob]'\n // native rendering would be: '[#foob]'\n // (native insertion here would be ok for decorators like simple spans,\n // but not more complex decorators. To be safe, we need to prevent it.)\n //\n // It is safe to allow native insertion if and only if the full list of\n // decorator ranges matches what we expect native insertion to give, and\n // the range lengths have not changed. We don't need to compare the content\n // because the only possible mutation to consider here is inserting plain\n // text and decorators can't affect text content.\n var oldBlockTree = editorState.getBlockTree(anchorKey);\n var newBlockTree = newEditorState.getBlockTree(anchorKey);\n mustPreventNative = oldBlockTree.size !== newBlockTree.size || oldBlockTree.zip(newBlockTree).some(function (_ref) {\n var oldLeafSet = _ref[0],\n newLeafSet = _ref[1];\n // selectionStart is guaranteed to be selectionEnd here\n var oldStart = oldLeafSet.get('start');\n var adjustedStart = oldStart + (oldStart >= selectionStart ? chars.length : 0);\n var oldEnd = oldLeafSet.get('end');\n var adjustedEnd = oldEnd + (oldEnd >= selectionStart ? chars.length : 0);\n var newStart = newLeafSet.get('start');\n var newEnd = newLeafSet.get('end');\n var newDecoratorKey = newLeafSet.get('decoratorKey');\n return (// Different decorators\n oldLeafSet.get('decoratorKey') !== newDecoratorKey || // Different number of inline styles\n oldLeafSet.get('leaves').size !== newLeafSet.get('leaves').size || // Different effective decorator position\n adjustedStart !== newStart || adjustedEnd !== newEnd || // Decorator already existed and its length changed\n newDecoratorKey != null && newEnd - newStart !== oldEnd - oldStart\n );\n });\n }\n\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n newEditorState = EditorState.set(newEditorState, {\n forceSelection: true\n });\n editor.update(newEditorState);\n return;\n } // We made it all the way! Let the browser do its thing and insert the char.\n\n\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n }); // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}\n\nmodule.exports = editOnBeforeInput;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar containsNode = require(\"fbjs/lib/containsNode\");\n\nvar getActiveElement = require(\"fbjs/lib/getActiveElement\");\n\nfunction editOnBlur(editor, e) {\n // In a contentEditable element, when you select a range and then click\n // another active element, this does trigger a `blur` event but will not\n // remove the DOM selection from the contenteditable.\n // This is consistent across all browsers, but we prefer that the editor\n // behave like a textarea, where a `blur` event clears the DOM selection.\n // We therefore force the issue to be certain, checking whether the active\n // element is `body` to force it when blurring occurs within the window (as\n // opposed to clicking to another tab or window).\n var ownerDocument = e.currentTarget.ownerDocument;\n\n if ( // This ESLint rule conflicts with `sketchy-null-bool` flow check\n // eslint-disable-next-line no-extra-boolean-cast\n !Boolean(editor.props.preserveSelectionOnBlur) && getActiveElement(ownerDocument) === ownerDocument.body) {\n var _selection = ownerDocument.defaultView.getSelection();\n\n var editorNode = editor.editor;\n\n if (_selection.rangeCount === 1 && containsNode(editorNode, _selection.anchorNode) && containsNode(editorNode, _selection.focusNode)) {\n _selection.removeAllRanges();\n }\n }\n\n var editorState = editor._latestEditorState;\n var currentSelection = editorState.getSelection();\n\n if (!currentSelection.getHasFocus()) {\n return;\n }\n\n var selection = currentSelection.set('hasFocus', false);\n editor.props.onBlur && editor.props.onBlur(e);\n editor.update(EditorState.acceptSelection(editorState, selection));\n}\n\nmodule.exports = editOnBlur;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n/**\n * The user has begun using an IME input system. Switching to `composite` mode\n * allows handling composition input and disables other edit behavior.\n */\n\n\nfunction editOnCompositionStart(editor, e) {\n editor.setMode('composite');\n editor.update(EditorState.set(editor._latestEditorState, {\n inCompositionMode: true\n })); // Allow composition handler to interpret the compositionstart event\n\n editor._onCompositionStart(e);\n}\n\nmodule.exports = editOnCompositionStart;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getFragmentFromSelection = require(\"./getFragmentFromSelection\");\n/**\n * If we have a selection, create a ContentState fragment and store\n * it in our internal clipboard. Subsequent paste events will use this\n * fragment if no external clipboard data is supplied.\n */\n\n\nfunction editOnCopy(editor, e) {\n var editorState = editor._latestEditorState;\n var selection = editorState.getSelection(); // No selection, so there's nothing to copy.\n\n if (selection.isCollapsed()) {\n e.preventDefault();\n return;\n }\n\n editor.setClipboard(getFragmentFromSelection(editor._latestEditorState));\n}\n\nmodule.exports = editOnCopy;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar Style = require(\"fbjs/lib/Style\");\n\nvar getFragmentFromSelection = require(\"./getFragmentFromSelection\");\n\nvar getScrollPosition = require(\"fbjs/lib/getScrollPosition\");\n\nvar isNode = require(\"./isInstanceOfNode\");\n/**\n * On `cut` events, native behavior is allowed to occur so that the system\n * clipboard is set properly. This means that we need to take steps to recover\n * the editor DOM state after the `cut` has occurred in order to maintain\n * control of the component.\n *\n * In addition, we can keep a copy of the removed fragment, including all\n * styles and entities, for use as an internal paste.\n */\n\n\nfunction editOnCut(editor, e) {\n var editorState = editor._latestEditorState;\n var selection = editorState.getSelection();\n var element = e.target;\n var scrollPosition; // No selection, so there's nothing to cut.\n\n if (selection.isCollapsed()) {\n e.preventDefault();\n return;\n } // Track the current scroll position so that it can be forced back in place\n // after the editor regains control of the DOM.\n\n\n if (isNode(element)) {\n var node = element;\n scrollPosition = getScrollPosition(Style.getScrollParent(node));\n }\n\n var fragment = getFragmentFromSelection(editorState);\n editor.setClipboard(fragment); // Set `cut` mode to disable all event handling temporarily.\n\n editor.setMode('cut'); // Let native `cut` behavior occur, then recover control.\n\n setTimeout(function () {\n editor.restoreEditorDOM(scrollPosition);\n editor.exitCurrentMode();\n editor.update(removeFragment(editorState));\n }, 0);\n}\n\nfunction removeFragment(editorState) {\n var newContent = DraftModifier.removeRange(editorState.getCurrentContent(), editorState.getSelection(), 'forward');\n return EditorState.push(editorState, newContent, 'remove-range');\n}\n\nmodule.exports = editOnCut;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Drag behavior has begun from outside the editor element.\n */\nfunction editOnDragOver(editor, e) {\n editor.setMode('drag');\n e.preventDefault();\n}\n\nmodule.exports = editOnDragOver;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * A `dragstart` event has begun within the text editor component.\n */\nfunction editOnDragStart(editor) {\n editor._internalDrag = true;\n editor.setMode('drag');\n}\n\nmodule.exports = editOnDragStart;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nfunction editOnFocus(editor, e) {\n var editorState = editor._latestEditorState;\n var currentSelection = editorState.getSelection();\n\n if (currentSelection.getHasFocus()) {\n return;\n }\n\n var selection = currentSelection.set('hasFocus', true);\n editor.props.onFocus && editor.props.onFocus(e); // When the tab containing this text editor is hidden and the user does a\n // find-in-page in a _different_ tab, Chrome on Mac likes to forget what the\n // selection was right after sending this focus event and (if you let it)\n // moves the cursor back to the beginning of the editor, so we force the\n // selection here instead of simply accepting it in order to preserve the\n // old cursor position. See https://crbug.com/540004.\n // But it looks like this is fixed in Chrome 60.0.3081.0.\n // Other browsers also don't have this bug, so we prefer to acceptSelection\n // when possible, to ensure that unfocusing and refocusing a Draft editor\n // doesn't preserve the selection, matching how textareas work.\n\n if (UserAgent.isBrowser('Chrome < 60.0.3081.0')) {\n editor.update(EditorState.forceSelection(editorState, selection));\n } else {\n editor.update(EditorState.acceptSelection(editorState, selection));\n }\n}\n\nmodule.exports = editOnFocus;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar _require = require(\"./draftKeyUtils\"),\n notEmptyKey = _require.notEmptyKey;\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar keyCommandPlainBackspace = require(\"./keyCommandPlainBackspace\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nvar isGecko = UserAgent.isEngine('Gecko');\nvar DOUBLE_NEWLINE = '\\n\\n';\n\nfunction onInputType(inputType, editorState) {\n switch (inputType) {\n case 'deleteContentBackward':\n return keyCommandPlainBackspace(editorState);\n }\n\n return editorState;\n}\n/**\n * This function serves two purposes\n *\n * 1. To update the editorState and call onChange method with the new\n * editorState. This editorState is calculated in editOnBeforeInput but the\n * onChange method is not called with the new state until this method does it.\n * It is done to handle a specific case where certain character inputs might\n * be replaced with something else. E.g. snippets ('rc' might be replaced\n * with boilerplate code for react component). More information on the\n * exact problem can be found here -\n * https://github.com/facebook/draft-js/commit/07892ba479bd4dfc6afd1e0ed179aaf51cd138b1\n *\n * 2. intended to handle spellcheck and autocorrect changes,\n * which occur in the DOM natively without any opportunity to observe or\n * interpret the changes before they occur.\n *\n * The `input` event fires in contentEditable elements reliably for non-IE\n * browsers, immediately after changes occur to the editor DOM. Since our other\n * handlers override or otherwise handle cover other varieties of text input,\n * the DOM state should match the model in all controlled input cases. Thus,\n * when an `input` change leads to a DOM/model mismatch, the change should be\n * due to a spellcheck change, and we can incorporate it into our model.\n */\n\n\nfunction editOnInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n } // at this point editor is not null for sure (after input)\n\n\n var castedEditorElement = editor.editor;\n var domSelection = castedEditorElement.ownerDocument.defaultView.getSelection();\n var anchorNode = domSelection.anchorNode,\n isCollapsed = domSelection.isCollapsed;\n var isNotTextOrElementNode = (anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.nodeType) !== Node.TEXT_NODE && (anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.nodeType) !== Node.ELEMENT_NODE;\n\n if (anchorNode == null || isNotTextOrElementNode) {\n // TODO: (t16149272) figure out context for this change\n return;\n }\n\n if (anchorNode.nodeType === Node.TEXT_NODE && (anchorNode.previousSibling !== null || anchorNode.nextSibling !== null)) {\n // When typing at the beginning of a visual line, Chrome splits the text\n // nodes into two. Why? No one knows. This commit is suspicious:\n // https://chromium.googlesource.com/chromium/src/+/a3b600981286b135632371477f902214c55a1724\n // To work around, we'll merge the sibling text nodes back into this one.\n var span = anchorNode.parentNode;\n\n if (span == null) {\n // Handle null-parent case.\n return;\n }\n\n anchorNode.nodeValue = span.textContent;\n\n for (var child = span.firstChild; child != null; child = child.nextSibling) {\n if (child !== anchorNode) {\n span.removeChild(child);\n }\n }\n }\n\n var domText = anchorNode.textContent;\n var editorState = editor._latestEditorState;\n var offsetKey = nullthrows(findAncestorOffsetKey(anchorNode));\n\n var _DraftOffsetKey$decod = DraftOffsetKey.decode(offsetKey),\n blockKey = _DraftOffsetKey$decod.blockKey,\n decoratorKey = _DraftOffsetKey$decod.decoratorKey,\n leafKey = _DraftOffsetKey$decod.leafKey;\n\n var _editorState$getBlock = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]),\n start = _editorState$getBlock.start,\n end = _editorState$getBlock.end;\n\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(blockKey);\n var modelText = block.getText().slice(start, end); // Special-case soft newlines here. If the DOM text ends in a soft newline,\n // we will have manually inserted an extra soft newline in DraftEditorLeaf.\n // We want to remove this extra newline for the purpose of our comparison\n // of DOM and model text.\n\n if (domText.endsWith(DOUBLE_NEWLINE)) {\n domText = domText.slice(0, -1);\n } // No change -- the DOM is up to date. Nothing to do here.\n\n\n if (domText === modelText) {\n // This can be buggy for some Android keyboards because they don't fire\n // standard onkeydown/pressed events and only fired editOnInput\n // so domText is already changed by the browser and ends up being equal\n // to modelText unexpectedly.\n // Newest versions of Android support the dom-inputevent-inputtype\n // and we can use the `inputType` to properly apply the state changes.\n\n /* $FlowFixMe[prop-missing] inputType is only defined on a draft of a\n * standard. https://w3c.github.io/input-events/#dom-inputevent-inputtype\n */\n var inputType = e.nativeEvent.inputType;\n\n if (inputType) {\n var newEditorState = onInputType(inputType, editorState);\n\n if (newEditorState !== editorState) {\n editor.restoreEditorDOM();\n editor.update(newEditorState);\n return;\n }\n }\n\n return;\n }\n\n var selection = editorState.getSelection(); // We'll replace the entire leaf with the text content of the target.\n\n var targetRange = selection.merge({\n anchorOffset: start,\n focusOffset: end,\n isBackward: false\n });\n var entityKey = block.getEntityAt(start);\n var entity = notEmptyKey(entityKey) ? content.getEntity(entityKey) : null;\n var entityType = entity != null ? entity.getMutability() : null;\n var preserveEntity = entityType === 'MUTABLE'; // Immutable or segmented entities cannot properly be handled by the\n // default browser undo, so we have to use a different change type to\n // force using our internal undo method instead of falling through to the\n // native browser undo.\n\n var changeType = preserveEntity ? 'spellcheck-change' : 'apply-entity';\n var newContent = DraftModifier.replaceText(content, targetRange, domText, block.getInlineStyleAt(start), preserveEntity ? block.getEntityAt(start) : null);\n var anchorOffset, focusOffset, startOffset, endOffset;\n\n if (isGecko) {\n // Firefox selection does not change while the context menu is open, so\n // we preserve the anchor and focus values of the DOM selection.\n anchorOffset = domSelection.anchorOffset;\n focusOffset = domSelection.focusOffset;\n startOffset = start + Math.min(anchorOffset, focusOffset);\n endOffset = startOffset + Math.abs(anchorOffset - focusOffset);\n anchorOffset = startOffset;\n focusOffset = endOffset;\n } else {\n // Browsers other than Firefox may adjust DOM selection while the context\n // menu is open, and Safari autocorrect is prone to providing an inaccurate\n // DOM selection. Don't trust it. Instead, use our existing SelectionState\n // and adjust it based on the number of characters changed during the\n // mutation.\n var charDelta = domText.length - modelText.length;\n startOffset = selection.getStartOffset();\n endOffset = selection.getEndOffset();\n anchorOffset = isCollapsed ? endOffset + charDelta : startOffset;\n focusOffset = endOffset + charDelta;\n } // Segmented entities are completely or partially removed when their\n // text content changes. For this case we do not want any text to be selected\n // after the change, so we are not merging the selection.\n\n\n var contentWithAdjustedDOMSelection = newContent.merge({\n selectionBefore: content.getSelectionAfter(),\n selectionAfter: selection.merge({\n anchorOffset: anchorOffset,\n focusOffset: focusOffset\n })\n });\n editor.update(EditorState.push(editorState, contentWithAdjustedDOMSelection, changeType));\n}\n\nmodule.exports = editOnInput;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar KeyBindingUtil = require(\"./KeyBindingUtil\");\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nvar SecondaryClipboard = require(\"./SecondaryClipboard\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar keyCommandBackspaceToStartOfLine = require(\"./keyCommandBackspaceToStartOfLine\");\n\nvar keyCommandBackspaceWord = require(\"./keyCommandBackspaceWord\");\n\nvar keyCommandDeleteWord = require(\"./keyCommandDeleteWord\");\n\nvar keyCommandInsertNewline = require(\"./keyCommandInsertNewline\");\n\nvar keyCommandMoveSelectionToEndOfBlock = require(\"./keyCommandMoveSelectionToEndOfBlock\");\n\nvar keyCommandMoveSelectionToStartOfBlock = require(\"./keyCommandMoveSelectionToStartOfBlock\");\n\nvar keyCommandPlainBackspace = require(\"./keyCommandPlainBackspace\");\n\nvar keyCommandPlainDelete = require(\"./keyCommandPlainDelete\");\n\nvar keyCommandTransposeCharacters = require(\"./keyCommandTransposeCharacters\");\n\nvar keyCommandUndo = require(\"./keyCommandUndo\");\n\nvar isOptionKeyCommand = KeyBindingUtil.isOptionKeyCommand;\nvar isChrome = UserAgent.isBrowser('Chrome');\n/**\n * Map a `DraftEditorCommand` command value to a corresponding function.\n */\n\nfunction onKeyCommand(command, editorState, e) {\n switch (command) {\n case 'redo':\n return EditorState.redo(editorState);\n\n case 'delete':\n return keyCommandPlainDelete(editorState);\n\n case 'delete-word':\n return keyCommandDeleteWord(editorState);\n\n case 'backspace':\n return keyCommandPlainBackspace(editorState);\n\n case 'backspace-word':\n return keyCommandBackspaceWord(editorState);\n\n case 'backspace-to-start-of-line':\n return keyCommandBackspaceToStartOfLine(editorState, e);\n\n case 'split-block':\n return keyCommandInsertNewline(editorState);\n\n case 'transpose-characters':\n return keyCommandTransposeCharacters(editorState);\n\n case 'move-selection-to-start-of-block':\n return keyCommandMoveSelectionToStartOfBlock(editorState);\n\n case 'move-selection-to-end-of-block':\n return keyCommandMoveSelectionToEndOfBlock(editorState);\n\n case 'secondary-cut':\n return SecondaryClipboard.cut(editorState);\n\n case 'secondary-paste':\n return SecondaryClipboard.paste(editorState);\n\n default:\n return editorState;\n }\n}\n/**\n * Intercept keydown behavior to handle keys and commands manually, if desired.\n *\n * Keydown combinations may be mapped to `DraftCommand` values, which may\n * correspond to command functions that modify the editor or its contents.\n *\n * See `getDefaultKeyBinding` for defaults. Alternatively, the top-level\n * component may provide a custom mapping via the `keyBindingFn` prop.\n */\n\n\nfunction editOnKeyDown(editor, e) {\n var keyCode = e.which;\n var editorState = editor._latestEditorState;\n\n function callDeprecatedHandler(handlerName) {\n var deprecatedHandler = editor.props[handlerName];\n\n if (deprecatedHandler) {\n deprecatedHandler(e);\n return true;\n } else {\n return false;\n }\n }\n\n switch (keyCode) {\n case Keys.RETURN:\n e.preventDefault(); // The top-level component may manually handle newline insertion. If\n // no special handling is performed, fall through to command handling.\n\n if (editor.props.handleReturn && isEventHandled(editor.props.handleReturn(e, editorState))) {\n return;\n }\n\n break;\n\n case Keys.ESC:\n e.preventDefault();\n\n if (callDeprecatedHandler('onEscape')) {\n return;\n }\n\n break;\n\n case Keys.TAB:\n if (callDeprecatedHandler('onTab')) {\n return;\n }\n\n break;\n\n case Keys.UP:\n if (callDeprecatedHandler('onUpArrow')) {\n return;\n }\n\n break;\n\n case Keys.RIGHT:\n if (callDeprecatedHandler('onRightArrow')) {\n return;\n }\n\n break;\n\n case Keys.DOWN:\n if (callDeprecatedHandler('onDownArrow')) {\n return;\n }\n\n break;\n\n case Keys.LEFT:\n if (callDeprecatedHandler('onLeftArrow')) {\n return;\n }\n\n break;\n\n case Keys.SPACE:\n // Prevent Chrome on OSX behavior where option + space scrolls.\n if (isChrome && isOptionKeyCommand(e)) {\n e.preventDefault();\n }\n\n }\n\n var command = editor.props.keyBindingFn(e); // If no command is specified, allow keydown event to continue.\n\n if (command == null || command === '') {\n if (keyCode === Keys.SPACE && isChrome && isOptionKeyCommand(e)) {\n // The default keydown event has already been prevented in order to stop\n // Chrome from scrolling. Insert a nbsp into the editor as OSX would for\n // other browsers.\n var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), \"\\xA0\");\n editor.update(EditorState.push(editorState, contentState, 'insert-characters'));\n }\n\n return;\n }\n\n if (command === 'undo') {\n // Since undo requires some special updating behavior to keep the editor\n // in sync, handle it separately.\n keyCommandUndo(e, editorState, editor.update);\n return;\n } // At this point, we know that we're handling a command of some kind, so\n // we don't want to insert a character following the keydown.\n\n\n e.preventDefault(); // Allow components higher up the tree to handle the command first.\n\n if (editor.props.handleKeyCommand && isEventHandled(editor.props.handleKeyCommand(command, editorState, e.timeStamp))) {\n return;\n }\n\n var newState = onKeyCommand(command, editorState, e);\n\n if (newState !== editorState) {\n editor.update(newState);\n }\n}\n\nmodule.exports = editOnKeyDown;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar DataTransfer = require(\"fbjs/lib/DataTransfer\");\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar DraftPasteProcessor = require(\"./DraftPasteProcessor\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar RichTextEditorUtil = require(\"./RichTextEditorUtil\");\n\nvar getEntityKeyForSelection = require(\"./getEntityKeyForSelection\");\n\nvar getTextContentFromFiles = require(\"./getTextContentFromFiles\");\n\nvar isEventHandled = require(\"./isEventHandled\");\n\nvar splitTextIntoTextBlocks = require(\"./splitTextIntoTextBlocks\");\n/**\n * Paste content.\n */\n\n\nfunction editOnPaste(editor, e) {\n e.preventDefault();\n var data = new DataTransfer(e.clipboardData); // Get files, unless this is likely to be a string the user wants inline.\n\n if (!data.isRichText()) {\n var files = data.getFiles();\n var defaultFileText = data.getText();\n\n if (files.length > 0) {\n // Allow customized paste handling for images, etc. Otherwise, fall\n // through to insert text contents into the editor.\n if (editor.props.handlePastedFiles && isEventHandled(editor.props.handlePastedFiles(files))) {\n return;\n }\n /* $FlowFixMe[incompatible-call] This comment suppresses an error found\n * DataTransfer was typed. getFiles() returns an array of , not Blob */\n\n\n getTextContentFromFiles(files, function (\n /*string*/\n fileText) {\n fileText = fileText || defaultFileText;\n\n if (!fileText) {\n return;\n }\n\n var editorState = editor._latestEditorState;\n var blocks = splitTextIntoTextBlocks(fileText);\n var character = CharacterMetadata.create({\n style: editorState.getCurrentInlineStyle(),\n entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())\n });\n var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState);\n var text = DraftPasteProcessor.processText(blocks, character, currentBlockType);\n var fragment = BlockMapBuilder.createFromArray(text);\n var withInsertedText = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment);\n editor.update(EditorState.push(editorState, withInsertedText, 'insert-fragment'));\n });\n return;\n }\n }\n\n var textBlocks = [];\n var text = data.getText();\n var html = data.getHTML();\n var editorState = editor._latestEditorState;\n\n if (editor.props.formatPastedText) {\n var _editor$props$formatP = editor.props.formatPastedText(text, html),\n formattedText = _editor$props$formatP.text,\n formattedHtml = _editor$props$formatP.html;\n\n text = formattedText;\n html = formattedHtml;\n }\n\n if (editor.props.handlePastedText && isEventHandled(editor.props.handlePastedText(text, html, editorState))) {\n return;\n }\n\n if (text) {\n textBlocks = splitTextIntoTextBlocks(text);\n }\n\n if (!editor.props.stripPastedStyles) {\n // If the text from the paste event is rich content that matches what we\n // already have on the internal clipboard, assume that we should just use\n // the clipboard fragment for the paste. This will allow us to preserve\n // styling and entities, if any are present. Note that newlines are\n // stripped during comparison -- this is because copy/paste within the\n // editor in Firefox and IE will not include empty lines. The resulting\n // paste will preserve the newlines correctly.\n var internalClipboard = editor.getClipboard();\n\n if (!editor.props.formatPastedText && data.isRichText() && internalClipboard) {\n var _html;\n\n if ( // If the editorKey is present in the pasted HTML, it should be safe to\n // assume this is an internal paste.\n ((_html = html) === null || _html === void 0 ? void 0 : _html.indexOf(editor.getEditorKey())) !== -1 || // The copy may have been made within a single block, in which case the\n // editor key won't be part of the paste. In this case, just check\n // whether the pasted text matches the internal clipboard.\n textBlocks.length === 1 && internalClipboard.size === 1 && internalClipboard.first().getText() === text) {\n editor.update(insertFragment(editor._latestEditorState, internalClipboard));\n return;\n }\n } else if (internalClipboard && data.types.includes('com.apple.webarchive') && !data.types.includes('text/html') && areTextBlocksAndClipboardEqual(textBlocks, internalClipboard)) {\n // Safari does not properly store text/html in some cases.\n // Use the internalClipboard if present and equal to what is on\n // the clipboard. See https://bugs.webkit.org/show_bug.cgi?id=19893.\n editor.update(insertFragment(editor._latestEditorState, internalClipboard));\n return;\n } // If there is html paste data, try to parse that.\n\n\n if (html) {\n var htmlFragment = DraftPasteProcessor.processHTML(html, editor.props.blockRenderMap);\n\n if (htmlFragment) {\n var contentBlocks = htmlFragment.contentBlocks,\n entityMap = htmlFragment.entityMap;\n\n if (contentBlocks) {\n var htmlMap = BlockMapBuilder.createFromArray(contentBlocks);\n editor.update(insertFragment(editor._latestEditorState, htmlMap, entityMap));\n return;\n }\n }\n } // Otherwise, create a new fragment from our pasted text. Also\n // empty the internal clipboard, since it's no longer valid.\n\n\n editor.setClipboard(null);\n }\n\n if (textBlocks.length) {\n var character = CharacterMetadata.create({\n style: editorState.getCurrentInlineStyle(),\n entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())\n });\n var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState);\n var textFragment = DraftPasteProcessor.processText(textBlocks, character, currentBlockType);\n var textMap = BlockMapBuilder.createFromArray(textFragment);\n editor.update(insertFragment(editor._latestEditorState, textMap));\n }\n}\n\nfunction insertFragment(editorState, fragment, entityMap) {\n var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment); // TODO: merge the entity map once we stop using DraftEntity\n // like this:\n // const mergedEntityMap = newContent.getEntityMap().merge(entityMap);\n\n return EditorState.push(editorState, newContent.set('entityMap', entityMap), 'insert-fragment');\n}\n\nfunction areTextBlocksAndClipboardEqual(textBlocks, blockMap) {\n return textBlocks.length === blockMap.size && blockMap.valueSeq().every(function (block, ii) {\n return block.getText() === textBlocks[ii];\n });\n}\n\nmodule.exports = editOnPaste;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftJsDebugLogging = require(\"./DraftJsDebugLogging\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar getContentEditableContainer = require(\"./getContentEditableContainer\");\n\nvar getDraftEditorSelection = require(\"./getDraftEditorSelection\");\n\nfunction editOnSelect(editor) {\n if (editor._blockSelectEvents || editor._latestEditorState !== editor.props.editorState) {\n if (editor._blockSelectEvents) {\n var _editorState = editor.props.editorState;\n\n var selectionState = _editorState.getSelection();\n\n DraftJsDebugLogging.logBlockedSelectionEvent({\n // For now I don't think we need any other info\n anonymizedDom: 'N/A',\n extraParams: JSON.stringify({\n stacktrace: new Error().stack\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n }\n\n return;\n }\n\n var editorState = editor.props.editorState;\n var documentSelection = getDraftEditorSelection(editorState, getContentEditableContainer(editor));\n var updatedSelectionState = documentSelection.selectionState;\n\n if (updatedSelectionState !== editorState.getSelection()) {\n if (documentSelection.needsRecovery) {\n editorState = EditorState.forceSelection(editorState, updatedSelectionState);\n } else {\n editorState = EditorState.acceptSelection(editorState, updatedSelectionState);\n }\n\n editor.update(editorState);\n }\n}\n\nmodule.exports = editOnSelect;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftStringKey = require(\"./DraftStringKey\");\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar strlen = UnicodeUtils.strlen;\n/**\n * Convert to UTF-8 character counts for storage.\n */\n\nfunction encodeEntityRanges(block, storageMap) {\n var encoded = [];\n block.findEntityRanges(function (character) {\n return !!character.getEntity();\n }, function (\n /*number*/\n start,\n /*number*/\n end) {\n var text = block.getText();\n var key = block.getEntityAt(start);\n encoded.push({\n offset: strlen(text.slice(0, start)),\n length: strlen(text.slice(start, end)),\n // Encode the key as a number for range storage.\n key: Number(storageMap[DraftStringKey.stringify(key)])\n });\n });\n return encoded;\n}\n\nmodule.exports = encodeEntityRanges;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar areEqual = function areEqual(a, b) {\n return a === b;\n};\n\nvar isTruthy = function isTruthy(a) {\n return !!a;\n};\n\nvar EMPTY_ARRAY = [];\n/**\n * Helper function for getting encoded styles for each inline style. Convert\n * to UTF-8 character counts for storage.\n */\n\nfunction getEncodedInlinesForType(block, styleList, styleToEncode) {\n var ranges = []; // Obtain an array with ranges for only the specified style.\n\n var filteredInlines = styleList.map(function (style) {\n return style.has(styleToEncode);\n }).toList();\n findRangesImmutable(filteredInlines, areEqual, // We only want to keep ranges with nonzero style values.\n isTruthy, function (start, end) {\n var text = block.getText();\n ranges.push({\n offset: UnicodeUtils.strlen(text.slice(0, start)),\n length: UnicodeUtils.strlen(text.slice(start, end)),\n style: styleToEncode\n });\n });\n return ranges;\n}\n/*\n * Retrieve the encoded arrays of inline styles, with each individual style\n * treated separately.\n */\n\n\nfunction encodeInlineStyleRanges(block) {\n var styleList = block.getCharacterList().map(function (c) {\n return c.getStyle();\n }).toList();\n var ranges = styleList.flatten().toSet().map(function (style) {\n return getEncodedInlinesForType(block, styleList, style);\n });\n return Array.prototype.concat.apply(EMPTY_ARRAY, ranges.toJS());\n}\n\nmodule.exports = encodeInlineStyleRanges;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar getRangeClientRects = require(\"./getRangeClientRects\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n/**\n * Return the computed line height, in pixels, for the provided element.\n */\n\n\nfunction getLineHeightPx(element) {\n var computed = getComputedStyle(element);\n var correctDocument = getCorrectDocumentFromNode(element);\n var div = correctDocument.createElement('div');\n div.style.fontFamily = computed.fontFamily;\n div.style.fontSize = computed.fontSize;\n div.style.fontStyle = computed.fontStyle;\n div.style.fontWeight = computed.fontWeight;\n div.style.lineHeight = computed.lineHeight;\n div.style.position = 'absolute';\n div.textContent = 'M';\n var documentBody = correctDocument.body;\n !documentBody ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing document.body') : invariant(false) : void 0; // forced layout here\n\n documentBody.appendChild(div);\n var rect = div.getBoundingClientRect();\n documentBody.removeChild(div);\n return rect.height;\n}\n/**\n * Return whether every ClientRect in the provided list lies on the same line.\n *\n * We assume that the rects on the same line all contain the baseline, so the\n * lowest top line needs to be above the highest bottom line (i.e., if you were\n * to project the rects onto the y-axis, their intersection would be nonempty).\n *\n * In addition, we require that no two boxes are lineHeight (or more) apart at\n * either top or bottom, which helps protect against false positives for fonts\n * with extremely large glyph heights (e.g., with a font size of 17px, Zapfino\n * produces rects of height 58px!).\n */\n\n\nfunction areRectsOnOneLine(rects, lineHeight) {\n var minTop = Infinity;\n var minBottom = Infinity;\n var maxTop = -Infinity;\n var maxBottom = -Infinity;\n\n for (var ii = 0; ii < rects.length; ii++) {\n var rect = rects[ii];\n\n if (rect.width === 0 || rect.width === 1) {\n // When a range starts or ends a soft wrap, many browsers (Chrome, IE,\n // Safari) include an empty rect on the previous or next line. When the\n // text lies in a container whose position is not integral (e.g., from\n // margin: auto), Safari makes these empty rects have width 1 (instead of\n // 0). Having one-pixel-wide characters seems unlikely (and most browsers\n // report widths in subpixel precision anyway) so it's relatively safe to\n // skip over them.\n continue;\n }\n\n minTop = Math.min(minTop, rect.top);\n minBottom = Math.min(minBottom, rect.bottom);\n maxTop = Math.max(maxTop, rect.top);\n maxBottom = Math.max(maxBottom, rect.bottom);\n }\n\n return maxTop <= minBottom && maxTop - minTop < lineHeight && maxBottom - minBottom < lineHeight;\n}\n/**\n * Return the length of a node, as used by Range offsets.\n */\n\n\nfunction getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n\n default:\n return node.childNodes.length;\n }\n}\n/**\n * Given a collapsed range, move the start position backwards as far as\n * possible while the range still spans only a single line.\n */\n\n\nfunction expandRangeToStartOfLine(range) {\n !range.collapsed ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'expandRangeToStartOfLine: Provided range is not collapsed.') : invariant(false) : void 0;\n range = range.cloneRange();\n var containingElement = range.startContainer;\n\n if (containingElement.nodeType !== 1) {\n containingElement = containingElement.parentNode;\n }\n\n var lineHeight = getLineHeightPx(containingElement); // Imagine our text looks like:\n //
once upon a time, there was a boy\n // who lived under^ the\n // stairs in a small closet.
\n // where the caret represents the cursor. First, we crawl up the tree until\n // the range spans multiple lines (setting the start point to before\n // \"\", then before \"
\"), then at each level we do a search to\n // find the latest point which is still on a previous line. We'll find that\n // the break point is inside the span, then inside the , then in its text\n // node child, the actual break point before \"who\".\n\n var bestContainer = range.endContainer;\n var bestOffset = range.endOffset;\n range.setStart(range.startContainer, 0);\n\n while (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) {\n bestContainer = range.startContainer;\n bestOffset = range.startOffset;\n !bestContainer.parentNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Found unexpected detached subtree when traversing.') : invariant(false) : void 0;\n range.setStartBefore(bestContainer);\n\n if (bestContainer.nodeType === 1 && getComputedStyle(bestContainer).display !== 'inline') {\n // The start of the line is never in a different block-level container.\n break;\n }\n } // In the above example, range now spans from \"
\" to \"under\",\n // bestContainer is
, and bestOffset is 1 (index of inside
)].\n // Picking out which child to recurse into here is a special case since we\n // don't want to check past -- once we find that the final range starts\n // in , we can look at all of its children (and all of their children)\n // to find the break point.\n // At all times, (bestContainer, bestOffset) is the latest single-line start\n // point that we know of.\n\n\n var currentContainer = bestContainer;\n var maxIndexToConsider = bestOffset - 1;\n\n do {\n var nodeValue = currentContainer.nodeValue;\n var ii = maxIndexToConsider;\n\n for (; ii >= 0; ii--) {\n if (nodeValue != null && ii > 0 && UnicodeUtils.isSurrogatePair(nodeValue, ii - 1)) {\n // We're in the middle of a surrogate pair -- skip over so we never\n // return a range with an endpoint in the middle of a code point.\n continue;\n }\n\n range.setStart(currentContainer, ii);\n\n if (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) {\n bestContainer = currentContainer;\n bestOffset = ii;\n } else {\n break;\n }\n }\n\n if (ii === -1 || currentContainer.childNodes.length === 0) {\n // If ii === -1, then (bestContainer, bestOffset), which is equal to\n // (currentContainer, 0), was a single-line start point but a start\n // point before currentContainer wasn't, so the line break seems to\n // have occurred immediately after currentContainer's start tag\n //\n // If currentContainer.childNodes.length === 0, we're already at a\n // terminal node (e.g., text node) and should return our current best.\n break;\n }\n\n currentContainer = currentContainer.childNodes[ii];\n maxIndexToConsider = getNodeLength(currentContainer);\n } while (true);\n\n range.setStart(bestContainer, bestOffset);\n return range;\n}\n\nmodule.exports = expandRangeToStartOfLine;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar getSelectionOffsetKeyForNode = require(\"./getSelectionOffsetKeyForNode\");\n/**\n * Get the key from the node's nearest offset-aware ancestor.\n */\n\n\nfunction findAncestorOffsetKey(node) {\n var searchNode = node;\n\n while (searchNode && searchNode !== getCorrectDocumentFromNode(node).documentElement) {\n var key = getSelectionOffsetKeyForNode(searchNode);\n\n if (key != null) {\n return key;\n }\n\n searchNode = searchNode.parentNode;\n }\n\n return null;\n}\n\nmodule.exports = findAncestorOffsetKey;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Search through an array to find contiguous stretches of elements that\n * match a specified filter function.\n *\n * When ranges are found, execute a specified `found` function to supply\n * the values to the caller.\n */\nfunction findRangesImmutable(haystack, areEqualFn, filterFn, foundFn) {\n if (!haystack.size) {\n return;\n }\n\n var cursor = 0;\n haystack.reduce(function (value, nextValue, nextIndex) {\n if (!areEqualFn(value, nextValue)) {\n if (filterFn(value)) {\n foundFn(cursor, nextIndex);\n }\n\n cursor = nextIndex;\n }\n\n return nextValue;\n });\n filterFn(haystack.last()) && foundFn(cursor, haystack.count());\n}\n\nmodule.exports = findRangesImmutable;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar seenKeys = {};\nvar MULTIPLIER = Math.pow(2, 24);\n\nfunction generateRandomKey() {\n var key;\n\n while (key === undefined || seenKeys.hasOwnProperty(key) || !isNaN(+key)) {\n key = Math.floor(Math.random() * MULTIPLIER).toString(32);\n }\n\n seenKeys[key] = true;\n return key;\n}\n\nmodule.exports = generateRandomKey;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftEntitySegments = require(\"./DraftEntitySegments\");\n\nvar getRangesForDraftEntity = require(\"./getRangesForDraftEntity\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n/**\n * Given a SelectionState and a removal direction, determine the entire range\n * that should be removed from a ContentState. This is based on any entities\n * within the target, with their `mutability` values taken into account.\n *\n * For instance, if we are attempting to remove part of an \"immutable\" entity\n * range, the entire entity must be removed. The returned `SelectionState`\n * will be adjusted accordingly.\n */\n\n\nfunction getCharacterRemovalRange(entityMap, startBlock, endBlock, selectionState, direction) {\n var start = selectionState.getStartOffset();\n var end = selectionState.getEndOffset();\n var startEntityKey = startBlock.getEntityAt(start);\n var endEntityKey = endBlock.getEntityAt(end - 1);\n\n if (!startEntityKey && !endEntityKey) {\n return selectionState;\n }\n\n var newSelectionState = selectionState;\n\n if (startEntityKey && startEntityKey === endEntityKey) {\n newSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, true, true);\n } else if (startEntityKey && endEntityKey) {\n var startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true);\n var endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false);\n newSelectionState = newSelectionState.merge({\n anchorOffset: startSelectionState.getAnchorOffset(),\n focusOffset: endSelectionState.getFocusOffset(),\n isBackward: false\n });\n } else if (startEntityKey) {\n var _startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true);\n\n newSelectionState = newSelectionState.merge({\n anchorOffset: _startSelectionState.getStartOffset(),\n isBackward: false\n });\n } else if (endEntityKey) {\n var _endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false);\n\n newSelectionState = newSelectionState.merge({\n focusOffset: _endSelectionState.getEndOffset(),\n isBackward: false\n });\n }\n\n return newSelectionState;\n}\n\nfunction getEntityRemovalRange(entityMap, block, selectionState, direction, entityKey, isEntireSelectionWithinEntity, isEntityAtStart) {\n var start = selectionState.getStartOffset();\n var end = selectionState.getEndOffset();\n\n var entity = entityMap.__get(entityKey);\n\n var mutability = entity.getMutability();\n var sideToConsider = isEntityAtStart ? start : end; // `MUTABLE` entities can just have the specified range of text removed\n // directly. No adjustments are needed.\n\n if (mutability === 'MUTABLE') {\n return selectionState;\n } // Find the entity range that overlaps with our removal range.\n\n\n var entityRanges = getRangesForDraftEntity(block, entityKey).filter(function (range) {\n return sideToConsider <= range.end && sideToConsider >= range.start;\n });\n !(entityRanges.length == 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'There should only be one entity range within this removal range.') : invariant(false) : void 0;\n var entityRange = entityRanges[0]; // For `IMMUTABLE` entity types, we will remove the entire entity range.\n\n if (mutability === 'IMMUTABLE') {\n return selectionState.merge({\n anchorOffset: entityRange.start,\n focusOffset: entityRange.end,\n isBackward: false\n });\n } // For `SEGMENTED` entity types, determine the appropriate segment to\n // remove.\n\n\n if (!isEntireSelectionWithinEntity) {\n if (isEntityAtStart) {\n end = entityRange.end;\n } else {\n start = entityRange.start;\n }\n }\n\n var removalRange = DraftEntitySegments.getRemovalRange(start, end, block.getText().slice(entityRange.start, entityRange.end), entityRange.start, direction);\n return selectionState.merge({\n anchorOffset: removalRange.start,\n focusOffset: removalRange.end,\n isBackward: false\n });\n}\n\nmodule.exports = getCharacterRemovalRange;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isHTMLElement = require(\"./isHTMLElement\");\n\nfunction getContentEditableContainer(editor) {\n var editorNode = editor.editorContainer;\n !editorNode ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing editorNode') : invariant(false) : void 0;\n !isHTMLElement(editorNode.firstChild) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'editorNode.firstChild is not an HTMLElement') : invariant(false) : void 0;\n var htmlElement = editorNode.firstChild;\n return htmlElement;\n}\n\nmodule.exports = getContentEditableContainer;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar randomizeBlockMapKeys = require(\"./randomizeBlockMapKeys\");\n\nvar removeEntitiesAtEdges = require(\"./removeEntitiesAtEdges\");\n\nvar getContentStateFragment = function getContentStateFragment(contentState, selectionState) {\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset(); // Edge entities should be stripped to ensure that we don't preserve\n // invalid partial entities when the fragment is reused. We do, however,\n // preserve entities that are entirely within the selection range.\n\n var contentWithoutEdgeEntities = removeEntitiesAtEdges(contentState, selectionState);\n var blockMap = contentWithoutEdgeEntities.getBlockMap();\n var blockKeys = blockMap.keySeq();\n var startIndex = blockKeys.indexOf(startKey);\n var endIndex = blockKeys.indexOf(endKey) + 1;\n return randomizeBlockMapKeys(blockMap.slice(startIndex, endIndex).map(function (block, blockKey) {\n var text = block.getText();\n var chars = block.getCharacterList();\n\n if (startKey === endKey) {\n return block.merge({\n text: text.slice(startOffset, endOffset),\n characterList: chars.slice(startOffset, endOffset)\n });\n }\n\n if (blockKey === startKey) {\n return block.merge({\n text: text.slice(startOffset),\n characterList: chars.slice(startOffset)\n });\n }\n\n if (blockKey === endKey) {\n return block.merge({\n text: text.slice(0, endOffset),\n characterList: chars.slice(0, endOffset)\n });\n }\n\n return block;\n }));\n};\n\nmodule.exports = getContentStateFragment;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction getCorrectDocumentFromNode(node) {\n if (!node || !node.ownerDocument) {\n return document;\n }\n\n return node.ownerDocument;\n}\n\nmodule.exports = getCorrectDocumentFromNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar KeyBindingUtil = require(\"./KeyBindingUtil\");\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar isOSX = UserAgent.isPlatform('Mac OS X'); // Firefox on OSX had a bug resulting in navigation instead of cursor movement.\n// This bug was fixed in Firefox 29. Feature detection is virtually impossible\n// so we just check the version number. See #342765.\n\nvar shouldFixFirefoxMovement = isOSX && UserAgent.isBrowser('Firefox < 29');\nvar hasCommandModifier = KeyBindingUtil.hasCommandModifier,\n isCtrlKeyCommand = KeyBindingUtil.isCtrlKeyCommand;\n\nfunction shouldRemoveWord(e) {\n return isOSX && e.altKey || isCtrlKeyCommand(e);\n}\n/**\n * Get the appropriate undo/redo command for a Z key command.\n */\n\n\nfunction getZCommand(e) {\n if (!hasCommandModifier(e)) {\n return null;\n }\n\n return e.shiftKey ? 'redo' : 'undo';\n}\n\nfunction getDeleteCommand(e) {\n // Allow default \"cut\" behavior for PCs on Shift + Delete.\n if (!isOSX && e.shiftKey) {\n return null;\n }\n\n return shouldRemoveWord(e) ? 'delete-word' : 'delete';\n}\n\nfunction getBackspaceCommand(e) {\n if (hasCommandModifier(e) && isOSX) {\n return 'backspace-to-start-of-line';\n }\n\n return shouldRemoveWord(e) ? 'backspace-word' : 'backspace';\n}\n/**\n * Retrieve a bound key command for the given event.\n */\n\n\nfunction getDefaultKeyBinding(e) {\n switch (e.keyCode) {\n case 66:\n // B\n return hasCommandModifier(e) ? 'bold' : null;\n\n case 68:\n // D\n return isCtrlKeyCommand(e) ? 'delete' : null;\n\n case 72:\n // H\n return isCtrlKeyCommand(e) ? 'backspace' : null;\n\n case 73:\n // I\n return hasCommandModifier(e) ? 'italic' : null;\n\n case 74:\n // J\n return hasCommandModifier(e) ? 'code' : null;\n\n case 75:\n // K\n return isOSX && isCtrlKeyCommand(e) ? 'secondary-cut' : null;\n\n case 77:\n // M\n return isCtrlKeyCommand(e) ? 'split-block' : null;\n\n case 79:\n // O\n return isCtrlKeyCommand(e) ? 'split-block' : null;\n\n case 84:\n // T\n return isOSX && isCtrlKeyCommand(e) ? 'transpose-characters' : null;\n\n case 85:\n // U\n return hasCommandModifier(e) ? 'underline' : null;\n\n case 87:\n // W\n return isOSX && isCtrlKeyCommand(e) ? 'backspace-word' : null;\n\n case 89:\n // Y\n if (isCtrlKeyCommand(e)) {\n return isOSX ? 'secondary-paste' : 'redo';\n }\n\n return null;\n\n case 90:\n // Z\n return getZCommand(e) || null;\n\n case Keys.RETURN:\n return 'split-block';\n\n case Keys.DELETE:\n return getDeleteCommand(e);\n\n case Keys.BACKSPACE:\n return getBackspaceCommand(e);\n // LEFT/RIGHT handlers serve as a workaround for a Firefox bug.\n\n case Keys.LEFT:\n return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-start-of-block' : null;\n\n case Keys.RIGHT:\n return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-end-of-block' : null;\n\n default:\n return null;\n }\n}\n\nmodule.exports = getDefaultKeyBinding;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getDraftEditorSelectionWithNodes = require(\"./getDraftEditorSelectionWithNodes\");\n/**\n * Convert the current selection range to an anchor/focus pair of offset keys\n * and values that can be interpreted by components.\n */\n\n\nfunction getDraftEditorSelection(editorState, root) {\n var selection = root.ownerDocument.defaultView.getSelection();\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset,\n rangeCount = selection.rangeCount;\n\n if ( // No active selection.\n rangeCount === 0 || // No selection, ever. As in, the user hasn't selected anything since\n // opening the document.\n anchorNode == null || focusNode == null) {\n return {\n selectionState: editorState.getSelection().set('hasFocus', false),\n needsRecovery: false\n };\n }\n\n return getDraftEditorSelectionWithNodes(editorState, root, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n\nmodule.exports = getDraftEditorSelection;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar findAncestorOffsetKey = require(\"./findAncestorOffsetKey\");\n\nvar getSelectionOffsetKeyForNode = require(\"./getSelectionOffsetKeyForNode\");\n\nvar getUpdatedSelectionState = require(\"./getUpdatedSelectionState\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isElement = require(\"./isElement\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\n/**\n * Convert the current selection range to an anchor/focus pair of offset keys\n * and values that can be interpreted by components.\n */\nfunction getDraftEditorSelectionWithNodes(editorState, root, anchorNode, anchorOffset, focusNode, focusOffset) {\n var anchorIsTextNode = anchorNode.nodeType === Node.TEXT_NODE;\n var focusIsTextNode = focusNode.nodeType === Node.TEXT_NODE; // If the selection range lies only on text nodes, the task is simple.\n // Find the nearest offset-aware elements and use the\n // offset values supplied by the selection range.\n\n if (anchorIsTextNode && focusIsTextNode) {\n return {\n selectionState: getUpdatedSelectionState(editorState, nullthrows(findAncestorOffsetKey(anchorNode)), anchorOffset, nullthrows(findAncestorOffsetKey(focusNode)), focusOffset),\n needsRecovery: false\n };\n }\n\n var anchorPoint = null;\n var focusPoint = null;\n var needsRecovery = true; // An element is selected. Convert this selection range into leaf offset\n // keys and offset values for consumption at the component level. This\n // is common in Firefox, where select-all and triple click behavior leads\n // to entire elements being selected.\n //\n // Note that we use the `needsRecovery` parameter in the callback here. This\n // is because when certain elements are selected, the behavior for subsequent\n // cursor movement (e.g. via arrow keys) is uncertain and may not match\n // expectations at the component level. For example, if an entire
is\n // selected and the user presses the right arrow, Firefox keeps the selection\n // on the
. If we allow subsequent keypresses to insert characters\n // natively, they will be inserted into a browser-created text node to the\n // right of that
. This is obviously undesirable.\n //\n // With the `needsRecovery` flag, we inform the caller that it is responsible\n // for manually setting the selection state on the rendered document to\n // ensure proper selection state maintenance.\n\n if (anchorIsTextNode) {\n anchorPoint = {\n key: nullthrows(findAncestorOffsetKey(anchorNode)),\n offset: anchorOffset\n };\n focusPoint = getPointForNonTextNode(root, focusNode, focusOffset);\n } else if (focusIsTextNode) {\n focusPoint = {\n key: nullthrows(findAncestorOffsetKey(focusNode)),\n offset: focusOffset\n };\n anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset);\n } else {\n anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset);\n focusPoint = getPointForNonTextNode(root, focusNode, focusOffset); // If the selection is collapsed on an empty block, don't force recovery.\n // This way, on arrow key selection changes, the browser can move the\n // cursor from a non-zero offset on one block, through empty blocks,\n // to a matching non-zero offset on other text blocks.\n\n if (anchorNode === focusNode && anchorOffset === focusOffset) {\n needsRecovery = !!anchorNode.firstChild && anchorNode.firstChild.nodeName !== 'BR';\n }\n }\n\n return {\n selectionState: getUpdatedSelectionState(editorState, anchorPoint.key, anchorPoint.offset, focusPoint.key, focusPoint.offset),\n needsRecovery: needsRecovery\n };\n}\n/**\n * Identify the first leaf descendant for the given node.\n */\n\n\nfunction getFirstLeaf(node) {\n while (node.firstChild && ( // data-blocks has no offset\n isElement(node.firstChild) && node.firstChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.firstChild))) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Identify the last leaf descendant for the given node.\n */\n\n\nfunction getLastLeaf(node) {\n while (node.lastChild && ( // data-blocks has no offset\n isElement(node.lastChild) && node.lastChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.lastChild))) {\n node = node.lastChild;\n }\n\n return node;\n}\n\nfunction getPointForNonTextNode(editorRoot, startNode, childOffset) {\n var node = startNode;\n var offsetKey = findAncestorOffsetKey(node);\n !(offsetKey != null || editorRoot && (editorRoot === node || editorRoot.firstChild === node)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Unknown node in selection range.') : invariant(false) : void 0; // If the editorRoot is the selection, step downward into the content\n // wrapper.\n\n if (editorRoot === node) {\n node = node.firstChild;\n !isElement(node) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid DraftEditorContents node.') : invariant(false) : void 0;\n var castedNode = node; // assignment only added for flow :/\n // otherwise it throws in line 200 saying that node can be null or undefined\n\n node = castedNode;\n !(node.getAttribute('data-contents') === 'true') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Invalid DraftEditorContents structure.') : invariant(false) : void 0;\n\n if (childOffset > 0) {\n childOffset = node.childNodes.length;\n }\n } // If the child offset is zero and we have an offset key, we're done.\n // If there's no offset key because the entire editor is selected,\n // find the leftmost (\"first\") leaf in the tree and use that as the offset\n // key.\n\n\n if (childOffset === 0) {\n var key = null;\n\n if (offsetKey != null) {\n key = offsetKey;\n } else {\n var firstLeaf = getFirstLeaf(node);\n key = nullthrows(getSelectionOffsetKeyForNode(firstLeaf));\n }\n\n return {\n key: key,\n offset: 0\n };\n }\n\n var nodeBeforeCursor = node.childNodes[childOffset - 1];\n var leafKey = null;\n var textLength = null;\n\n if (!getSelectionOffsetKeyForNode(nodeBeforeCursor)) {\n // Our target node may be a leaf or a text node, in which case we're\n // already where we want to be and can just use the child's length as\n // our offset.\n leafKey = nullthrows(offsetKey);\n textLength = getTextContentLength(nodeBeforeCursor);\n } else {\n // Otherwise, we'll look at the child to the left of the cursor and find\n // the last leaf node in its subtree.\n var lastLeaf = getLastLeaf(nodeBeforeCursor);\n leafKey = nullthrows(getSelectionOffsetKeyForNode(lastLeaf));\n textLength = getTextContentLength(lastLeaf);\n }\n\n return {\n key: leafKey,\n offset: textLength\n };\n}\n/**\n * Return the length of a node's textContent, regarding single newline\n * characters as zero-length. This allows us to avoid problems with identifying\n * the correct selection offset for empty blocks in IE, in which we\n * render newlines instead of break tags.\n */\n\n\nfunction getTextContentLength(node) {\n var textContent = node.textContent;\n return textContent === '\\n' ? 0 : textContent.length;\n}\n\nmodule.exports = getDraftEditorSelectionWithNodes;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar _require = require(\"./draftKeyUtils\"),\n notEmptyKey = _require.notEmptyKey;\n/**\n * Return the entity key that should be used when inserting text for the\n * specified target selection, only if the entity is `MUTABLE`. `IMMUTABLE`\n * and `SEGMENTED` entities should not be used for insertion behavior.\n */\n\n\nfunction getEntityKeyForSelection(contentState, targetSelection) {\n var entityKey;\n\n if (targetSelection.isCollapsed()) {\n var key = targetSelection.getAnchorKey();\n var offset = targetSelection.getAnchorOffset();\n\n if (offset > 0) {\n entityKey = contentState.getBlockForKey(key).getEntityAt(offset - 1);\n\n if (entityKey !== contentState.getBlockForKey(key).getEntityAt(offset)) {\n return null;\n }\n\n return filterKey(contentState.getEntityMap(), entityKey);\n }\n\n return null;\n }\n\n var startKey = targetSelection.getStartKey();\n var startOffset = targetSelection.getStartOffset();\n var startBlock = contentState.getBlockForKey(startKey);\n entityKey = startOffset === startBlock.getLength() ? null : startBlock.getEntityAt(startOffset);\n return filterKey(contentState.getEntityMap(), entityKey);\n}\n/**\n * Determine whether an entity key corresponds to a `MUTABLE` entity. If so,\n * return it. If not, return null.\n */\n\n\nfunction filterKey(entityMap, entityKey) {\n if (notEmptyKey(entityKey)) {\n var entity = entityMap.__get(entityKey);\n\n return entity.getMutability() === 'MUTABLE' ? entityKey : null;\n }\n\n return null;\n}\n\nmodule.exports = getEntityKeyForSelection;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n\nfunction getFragmentFromSelection(editorState) {\n var selectionState = editorState.getSelection();\n\n if (selectionState.isCollapsed()) {\n return null;\n }\n\n return getContentStateFragment(editorState.getCurrentContent(), selectionState);\n}\n\nmodule.exports = getFragmentFromSelection;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n *\n * This is unstable and not part of the public API and should not be used by\n * production systems. This file may be update/removed without notice.\n */\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar getNextDelimiterBlockKey = function getNextDelimiterBlockKey(block, blockMap) {\n var isExperimentalTreeBlock = block instanceof ContentBlockNode;\n\n if (!isExperimentalTreeBlock) {\n return null;\n }\n\n var nextSiblingKey = block.getNextSiblingKey();\n\n if (nextSiblingKey) {\n return nextSiblingKey;\n }\n\n var parent = block.getParentKey();\n\n if (!parent) {\n return null;\n }\n\n var nextNonDescendantBlock = blockMap.get(parent);\n\n while (nextNonDescendantBlock && !nextNonDescendantBlock.getNextSiblingKey()) {\n var parentKey = nextNonDescendantBlock.getParentKey();\n nextNonDescendantBlock = parentKey ? blockMap.get(parentKey) : null;\n }\n\n if (!nextNonDescendantBlock) {\n return null;\n }\n\n return nextNonDescendantBlock.getNextSiblingKey();\n};\n\nmodule.exports = getNextDelimiterBlockKey;","\"use strict\";\n\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * \n * @typechecks\n * @format\n */\n\n/**\n * Retrieve an object's own values as an array. If you want the values in the\n * protoype chain, too, use getObjectValuesIncludingPrototype.\n *\n * If you are looking for a function that creates an Array instance based\n * on an \"Array-like\" object, use createArrayFrom instead.\n *\n * @param {object} obj An object.\n * @return {array} The object's values.\n */\nfunction getOwnObjectValues(obj) {\n return Object.keys(obj).map(function (key) {\n return obj[key];\n });\n}\n\nmodule.exports = getOwnObjectValues;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getRangeClientRects = require(\"./getRangeClientRects\");\n\n/**\n * Like range.getBoundingClientRect() but normalizes for browser bugs.\n */\nfunction getRangeBoundingClientRect(range) {\n // \"Return a DOMRect object describing the smallest rectangle that includes\n // the first rectangle in list and all of the remaining rectangles of which\n // the height or width is not zero.\"\n // http://www.w3.org/TR/cssom-view/#dom-range-getboundingclientrect\n var rects = getRangeClientRects(range);\n var top = 0;\n var right = 0;\n var bottom = 0;\n var left = 0;\n\n if (rects.length) {\n // If the first rectangle has 0 width, we use the second, this is needed\n // because Chrome renders a 0 width rectangle when the selection contains\n // a line break.\n if (rects.length > 1 && rects[0].width === 0) {\n var _rects$ = rects[1];\n top = _rects$.top;\n right = _rects$.right;\n bottom = _rects$.bottom;\n left = _rects$.left;\n } else {\n var _rects$2 = rects[0];\n top = _rects$2.top;\n right = _rects$2.right;\n bottom = _rects$2.bottom;\n left = _rects$2.left;\n }\n\n for (var ii = 1; ii < rects.length; ii++) {\n var rect = rects[ii];\n\n if (rect.height !== 0 && rect.width !== 0) {\n top = Math.min(top, rect.top);\n right = Math.max(right, rect.right);\n bottom = Math.max(bottom, rect.bottom);\n left = Math.min(left, rect.left);\n }\n }\n }\n\n return {\n top: top,\n right: right,\n bottom: bottom,\n left: left,\n width: right - left,\n height: bottom - top\n };\n}\n\nmodule.exports = getRangeBoundingClientRect;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isChrome = UserAgent.isBrowser('Chrome'); // In Chrome, the client rects will include the entire bounds of all nodes that\n// begin (have a start tag) within the selection, even if the selection does\n// not overlap the entire node. To resolve this, we split the range at each\n// start tag and join the client rects together.\n// https://code.google.com/p/chromium/issues/detail?id=324437\n\n/* eslint-disable consistent-return */\n\nfunction getRangeClientRectsChrome(range) {\n var tempRange = range.cloneRange();\n var clientRects = [];\n\n for (var ancestor = range.endContainer; ancestor != null; ancestor = ancestor.parentNode) {\n // If we've climbed up to the common ancestor, we can now use the\n // original start point and stop climbing the tree.\n var atCommonAncestor = ancestor === range.commonAncestorContainer;\n\n if (atCommonAncestor) {\n tempRange.setStart(range.startContainer, range.startOffset);\n } else {\n tempRange.setStart(tempRange.endContainer, 0);\n }\n\n var rects = Array.from(tempRange.getClientRects());\n clientRects.push(rects);\n\n if (atCommonAncestor) {\n var _ref;\n\n clientRects.reverse();\n return (_ref = []).concat.apply(_ref, clientRects);\n }\n\n tempRange.setEndBefore(ancestor);\n }\n\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Found an unexpected detached subtree when getting range client rects.') : invariant(false) : void 0;\n}\n/* eslint-enable consistent-return */\n\n/**\n * Like range.getClientRects() but normalizes for browser bugs.\n */\n\n\nvar getRangeClientRects = isChrome ? getRangeClientRectsChrome : function (range) {\n return Array.from(range.getClientRects());\n};\nmodule.exports = getRangeClientRects;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar invariant = require(\"fbjs/lib/invariant\");\n/**\n * Obtain the start and end positions of the range that has the\n * specified entity applied to it.\n *\n * Entity keys are applied only to contiguous stretches of text, so this\n * method searches for the first instance of the entity key and returns\n * the subsequent range.\n */\n\n\nfunction getRangesForDraftEntity(block, key) {\n var ranges = [];\n block.findEntityRanges(function (c) {\n return c.getEntity() === key;\n }, function (start, end) {\n ranges.push({\n start: start,\n end: end\n });\n });\n !!!ranges.length ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Entity key not found in this range.') : invariant(false) : void 0;\n return ranges;\n}\n\nmodule.exports = getRangesForDraftEntity;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isOldIE = UserAgent.isBrowser('IE <= 9'); // Provides a dom node that will not execute scripts\n// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation.createHTMLDocument\n// https://developer.mozilla.org/en-US/Add-ons/Code_snippets/HTML_to_DOM\n\nfunction getSafeBodyFromHTML(html) {\n var doc;\n var root = null; // Provides a safe context\n\n if (!isOldIE && document.implementation && document.implementation.createHTMLDocument) {\n doc = document.implementation.createHTMLDocument('foo');\n !doc.documentElement ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Missing doc.documentElement') : invariant(false) : void 0;\n doc.documentElement.innerHTML = html;\n root = doc.getElementsByTagName('body')[0];\n }\n\n return root;\n}\n\nmodule.exports = getSafeBodyFromHTML;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n/**\n * Get offset key from a node or it's child nodes. Return the first offset key\n * found on the DOM tree of given node.\n */\n\nvar isElement = require(\"./isElement\");\n\nfunction getSelectionOffsetKeyForNode(node) {\n if (isElement(node)) {\n var castedNode = node;\n var offsetKey = castedNode.getAttribute('data-offset-key');\n\n if (offsetKey) {\n return offsetKey;\n }\n\n for (var ii = 0; ii < castedNode.childNodes.length; ii++) {\n var childOffsetKey = getSelectionOffsetKeyForNode(castedNode.childNodes[ii]);\n\n if (childOffsetKey) {\n return childOffsetKey;\n }\n }\n }\n\n return null;\n}\n\nmodule.exports = getSelectionOffsetKeyForNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar TEXT_CLIPPING_REGEX = /\\.textClipping$/;\nvar TEXT_TYPES = {\n 'text/plain': true,\n 'text/html': true,\n 'text/rtf': true\n}; // Somewhat arbitrary upper bound on text size. Let's not lock up the browser.\n\nvar TEXT_SIZE_UPPER_BOUND = 5000;\n/**\n * Extract the text content from a file list.\n */\n\nfunction getTextContentFromFiles(files, callback) {\n var readCount = 0;\n var results = [];\n files.forEach(function (\n /*blob*/\n file) {\n readFile(file, function (\n /*string*/\n text) {\n readCount++;\n text && results.push(text.slice(0, TEXT_SIZE_UPPER_BOUND));\n\n if (readCount == files.length) {\n callback(results.join('\\r'));\n }\n });\n });\n}\n/**\n * todo isaac: Do work to turn html/rtf into a content fragment.\n */\n\n\nfunction readFile(file, callback) {\n if (!global.FileReader || file.type && !(file.type in TEXT_TYPES)) {\n callback('');\n return;\n }\n\n if (file.type === '') {\n var _contents = ''; // Special-case text clippings, which have an empty type but include\n // `.textClipping` in the file name. `readAsText` results in an empty\n // string for text clippings, so we force the file name to serve\n // as the text value for the file.\n\n if (TEXT_CLIPPING_REGEX.test(file.name)) {\n _contents = file.name.replace(TEXT_CLIPPING_REGEX, '');\n }\n\n callback(_contents);\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function () {\n var result = reader.result;\n !(typeof result === 'string') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'We should be calling \"FileReader.readAsText\" which returns a string') : invariant(false) : void 0;\n callback(result);\n };\n\n reader.onerror = function () {\n callback('');\n };\n\n reader.readAsText(file);\n}\n\nmodule.exports = getTextContentFromFiles;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftOffsetKey = require(\"./DraftOffsetKey\");\n\nvar nullthrows = require(\"fbjs/lib/nullthrows\");\n\nfunction getUpdatedSelectionState(editorState, anchorKey, anchorOffset, focusKey, focusOffset) {\n var selection = nullthrows(editorState.getSelection());\n\n if (!anchorKey || !focusKey) {\n // If we cannot make sense of the updated selection state, stick to the current one.\n if (process.env.NODE_ENV !== \"production\") {\n /* eslint-disable-next-line */\n console.warn('Invalid selection state.', arguments, editorState.toJS());\n }\n\n return selection;\n }\n\n var anchorPath = DraftOffsetKey.decode(anchorKey);\n var anchorBlockKey = anchorPath.blockKey;\n var anchorLeafBlockTree = editorState.getBlockTree(anchorBlockKey);\n var anchorLeaf = anchorLeafBlockTree && anchorLeafBlockTree.getIn([anchorPath.decoratorKey, 'leaves', anchorPath.leafKey]);\n var focusPath = DraftOffsetKey.decode(focusKey);\n var focusBlockKey = focusPath.blockKey;\n var focusLeafBlockTree = editorState.getBlockTree(focusBlockKey);\n var focusLeaf = focusLeafBlockTree && focusLeafBlockTree.getIn([focusPath.decoratorKey, 'leaves', focusPath.leafKey]);\n\n if (!anchorLeaf || !focusLeaf) {\n // If we cannot make sense of the updated selection state, stick to the current one.\n if (process.env.NODE_ENV !== \"production\") {\n /* eslint-disable-next-line */\n console.warn('Invalid selection state.', arguments, editorState.toJS());\n }\n\n return selection;\n }\n\n var anchorLeafStart = anchorLeaf.get('start');\n var focusLeafStart = focusLeaf.get('start');\n var anchorBlockOffset = anchorLeaf ? anchorLeafStart + anchorOffset : null;\n var focusBlockOffset = focusLeaf ? focusLeafStart + focusOffset : null;\n var areEqual = selection.getAnchorKey() === anchorBlockKey && selection.getAnchorOffset() === anchorBlockOffset && selection.getFocusKey() === focusBlockKey && selection.getFocusOffset() === focusBlockOffset;\n\n if (areEqual) {\n return selection;\n }\n\n var isBackward = false;\n\n if (anchorBlockKey === focusBlockKey) {\n var anchorLeafEnd = anchorLeaf.get('end');\n var focusLeafEnd = focusLeaf.get('end');\n\n if (focusLeafStart === anchorLeafStart && focusLeafEnd === anchorLeafEnd) {\n isBackward = focusOffset < anchorOffset;\n } else {\n isBackward = focusLeafStart < anchorLeafStart;\n }\n } else {\n var startKey = editorState.getCurrentContent().getBlockMap().keySeq().skipUntil(function (v) {\n return v === anchorBlockKey || v === focusBlockKey;\n }).first();\n isBackward = startKey === focusBlockKey;\n }\n\n return selection.merge({\n anchorKey: anchorBlockKey,\n anchorOffset: anchorBlockOffset,\n focusKey: focusBlockKey,\n focusOffset: focusBlockOffset,\n isBackward: isBackward\n });\n}\n\nmodule.exports = getUpdatedSelectionState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar getRangeBoundingClientRect = require(\"./getRangeBoundingClientRect\");\n/**\n * Return the bounding ClientRect for the visible DOM selection, if any.\n * In cases where there are no selected ranges or the bounding rect is\n * temporarily invalid, return null.\n *\n * When using from an iframe, you should pass the iframe window object\n */\n\n\nfunction getVisibleSelectionRect(global) {\n var selection = global.getSelection();\n\n if (!selection.rangeCount) {\n return null;\n }\n\n var range = selection.getRangeAt(0);\n var boundingRect = getRangeBoundingClientRect(range);\n var top = boundingRect.top,\n right = boundingRect.right,\n bottom = boundingRect.bottom,\n left = boundingRect.left; // When a re-render leads to a node being removed, the DOM selection will\n // temporarily be placed on an ancestor node, which leads to an invalid\n // bounding rect. Discard this state.\n\n if (top === 0 && right === 0 && bottom === 0 && left === 0) {\n return null;\n }\n\n return boundingRect;\n}\n\nmodule.exports = getVisibleSelectionRect;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction getWindowForNode(node) {\n if (!node || !node.ownerDocument || !node.ownerDocument.defaultView) {\n return window;\n }\n\n return node.ownerDocument.defaultView;\n}\n\nmodule.exports = getWindowForNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nmodule.exports = function (name) {\n if (typeof window !== 'undefined' && window.__DRAFT_GKX) {\n return !!window.__DRAFT_GKX[name];\n }\n\n return false;\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar BlockMapBuilder = require(\"./BlockMapBuilder\");\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar Immutable = require(\"immutable\");\n\nvar insertIntoList = require(\"./insertIntoList\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar randomizeBlockMapKeys = require(\"./randomizeBlockMapKeys\");\n\nvar List = Immutable.List;\n\nvar updateExistingBlock = function updateExistingBlock(contentState, selectionState, blockMap, fragmentBlock, targetKey, targetOffset) {\n var mergeBlockData = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'REPLACE_WITH_NEW_DATA';\n var targetBlock = blockMap.get(targetKey);\n var text = targetBlock.getText();\n var chars = targetBlock.getCharacterList();\n var finalKey = targetKey;\n var finalOffset = targetOffset + fragmentBlock.getText().length;\n var data = null;\n\n switch (mergeBlockData) {\n case 'MERGE_OLD_DATA_TO_NEW_DATA':\n data = fragmentBlock.getData().merge(targetBlock.getData());\n break;\n\n case 'REPLACE_WITH_NEW_DATA':\n data = fragmentBlock.getData();\n break;\n }\n\n var type = targetBlock.getType();\n\n if (text && type === 'unstyled') {\n type = fragmentBlock.getType();\n }\n\n var newBlock = targetBlock.merge({\n text: text.slice(0, targetOffset) + fragmentBlock.getText() + text.slice(targetOffset),\n characterList: insertIntoList(chars, fragmentBlock.getCharacterList(), targetOffset),\n type: type,\n data: data\n });\n return contentState.merge({\n blockMap: blockMap.set(targetKey, newBlock),\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: finalKey,\n anchorOffset: finalOffset,\n focusKey: finalKey,\n focusOffset: finalOffset,\n isBackward: false\n })\n });\n};\n/**\n * Appends text/characterList from the fragment first block to\n * target block.\n */\n\n\nvar updateHead = function updateHead(block, targetOffset, fragment) {\n var text = block.getText();\n var chars = block.getCharacterList(); // Modify head portion of block.\n\n var headText = text.slice(0, targetOffset);\n var headCharacters = chars.slice(0, targetOffset);\n var appendToHead = fragment.first();\n return block.merge({\n text: headText + appendToHead.getText(),\n characterList: headCharacters.concat(appendToHead.getCharacterList()),\n type: headText ? block.getType() : appendToHead.getType(),\n data: appendToHead.getData()\n });\n};\n/**\n * Appends offset text/characterList from the target block to the last\n * fragment block.\n */\n\n\nvar updateTail = function updateTail(block, targetOffset, fragment) {\n // Modify tail portion of block.\n var text = block.getText();\n var chars = block.getCharacterList(); // Modify head portion of block.\n\n var blockSize = text.length;\n var tailText = text.slice(targetOffset, blockSize);\n var tailCharacters = chars.slice(targetOffset, blockSize);\n var prependToTail = fragment.last();\n return prependToTail.merge({\n text: prependToTail.getText() + tailText,\n characterList: prependToTail.getCharacterList().concat(tailCharacters),\n data: prependToTail.getData()\n });\n};\n\nvar getRootBlocks = function getRootBlocks(block, blockMap) {\n var headKey = block.getKey();\n var rootBlock = block;\n var rootBlocks = []; // sometimes the fragment head block will not be part of the blockMap itself this can happen when\n // the fragment head is used to update the target block, however when this does not happen we need\n // to make sure that we include it on the rootBlocks since the first block of a fragment is always a\n // fragment root block\n\n if (blockMap.get(headKey)) {\n rootBlocks.push(headKey);\n }\n\n while (rootBlock && rootBlock.getNextSiblingKey()) {\n var lastSiblingKey = rootBlock.getNextSiblingKey();\n\n if (!lastSiblingKey) {\n break;\n }\n\n rootBlocks.push(lastSiblingKey);\n rootBlock = blockMap.get(lastSiblingKey);\n }\n\n return rootBlocks;\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockMap, targetBlock, fragmentHeadBlock) {\n return blockMap.withMutations(function (blockMapState) {\n var targetKey = targetBlock.getKey();\n var headKey = fragmentHeadBlock.getKey();\n var targetNextKey = targetBlock.getNextSiblingKey();\n var targetParentKey = targetBlock.getParentKey();\n var fragmentRootBlocks = getRootBlocks(fragmentHeadBlock, blockMap);\n var lastRootFragmentBlockKey = fragmentRootBlocks[fragmentRootBlocks.length - 1];\n\n if (blockMapState.get(headKey)) {\n // update the fragment head when it is part of the blockMap otherwise\n blockMapState.setIn([targetKey, 'nextSibling'], headKey);\n blockMapState.setIn([headKey, 'prevSibling'], targetKey);\n } else {\n // update the target block that had the fragment head contents merged into it\n blockMapState.setIn([targetKey, 'nextSibling'], fragmentHeadBlock.getNextSiblingKey());\n blockMapState.setIn([fragmentHeadBlock.getNextSiblingKey(), 'prevSibling'], targetKey);\n } // update the last root block fragment\n\n\n blockMapState.setIn([lastRootFragmentBlockKey, 'nextSibling'], targetNextKey); // update the original target next block\n\n if (targetNextKey) {\n blockMapState.setIn([targetNextKey, 'prevSibling'], lastRootFragmentBlockKey);\n } // update fragment parent links\n\n\n fragmentRootBlocks.forEach(function (blockKey) {\n return blockMapState.setIn([blockKey, 'parent'], targetParentKey);\n }); // update targetBlock parent child links\n\n if (targetParentKey) {\n var targetParent = blockMap.get(targetParentKey);\n var originalTargetParentChildKeys = targetParent.getChildKeys();\n var targetBlockIndex = originalTargetParentChildKeys.indexOf(targetKey);\n var insertionIndex = targetBlockIndex + 1;\n var newChildrenKeysArray = originalTargetParentChildKeys.toArray(); // insert fragment children\n\n newChildrenKeysArray.splice.apply(newChildrenKeysArray, [insertionIndex, 0].concat(fragmentRootBlocks));\n blockMapState.setIn([targetParentKey, 'children'], List(newChildrenKeysArray));\n }\n });\n};\n\nvar insertFragment = function insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset) {\n var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode;\n var newBlockArr = [];\n var fragmentSize = fragment.size;\n var target = blockMap.get(targetKey);\n var head = fragment.first();\n var tail = fragment.last();\n var finalOffset = tail.getLength();\n var finalKey = tail.getKey();\n var shouldNotUpdateFromFragmentBlock = isTreeBasedBlockMap && (!target.getChildKeys().isEmpty() || !head.getChildKeys().isEmpty());\n blockMap.forEach(function (block, blockKey) {\n if (blockKey !== targetKey) {\n newBlockArr.push(block);\n return;\n }\n\n if (shouldNotUpdateFromFragmentBlock) {\n newBlockArr.push(block);\n } else {\n newBlockArr.push(updateHead(block, targetOffset, fragment));\n } // Insert fragment blocks after the head and before the tail.\n\n\n fragment // when we are updating the target block with the head fragment block we skip the first fragment\n // head since its contents have already been merged with the target block otherwise we include\n // the whole fragment\n .slice(shouldNotUpdateFromFragmentBlock ? 0 : 1, fragmentSize - 1).forEach(function (fragmentBlock) {\n return newBlockArr.push(fragmentBlock);\n }); // update tail\n\n newBlockArr.push(updateTail(block, targetOffset, fragment));\n });\n var updatedBlockMap = BlockMapBuilder.createFromArray(newBlockArr);\n\n if (isTreeBasedBlockMap) {\n updatedBlockMap = updateBlockMapLinks(updatedBlockMap, blockMap, target, head);\n }\n\n return contentState.merge({\n blockMap: updatedBlockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: finalKey,\n anchorOffset: finalOffset,\n focusKey: finalKey,\n focusOffset: finalOffset,\n isBackward: false\n })\n });\n};\n\nvar insertFragmentIntoContentState = function insertFragmentIntoContentState(contentState, selectionState, fragmentBlockMap) {\n var mergeBlockData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'REPLACE_WITH_NEW_DATA';\n !selectionState.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`insertFragment` should only be called with a collapsed selection state.') : invariant(false) : void 0;\n var blockMap = contentState.getBlockMap();\n var fragment = randomizeBlockMapKeys(fragmentBlockMap);\n var targetKey = selectionState.getStartKey();\n var targetOffset = selectionState.getStartOffset();\n var targetBlock = blockMap.get(targetKey);\n\n if (targetBlock instanceof ContentBlockNode) {\n !targetBlock.getChildKeys().isEmpty() ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`insertFragment` should not be called when a container node is selected.') : invariant(false) : void 0;\n } // When we insert a fragment with a single block we simply update the target block\n // with the contents of the inserted fragment block\n\n\n if (fragment.size === 1) {\n return updateExistingBlock(contentState, selectionState, blockMap, fragment.first(), targetKey, targetOffset, mergeBlockData);\n }\n\n return insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset);\n};\n\nmodule.exports = insertFragmentIntoContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Maintain persistence for target list when appending and prepending.\n */\nfunction insertIntoList(targetListArg, toInsert, offset) {\n var targetList = targetListArg;\n\n if (offset === targetList.count()) {\n toInsert.forEach(function (c) {\n targetList = targetList.push(c);\n });\n } else if (offset === 0) {\n toInsert.reverse().forEach(function (c) {\n targetList = targetList.unshift(c);\n });\n } else {\n var head = targetList.slice(0, offset);\n var tail = targetList.slice(offset);\n targetList = head.concat(toInsert, tail).toList();\n }\n\n return targetList;\n}\n\nmodule.exports = insertIntoList;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Immutable = require(\"immutable\");\n\nvar insertIntoList = require(\"./insertIntoList\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar Repeat = Immutable.Repeat;\n\nfunction insertTextIntoContentState(contentState, selectionState, text, characterMetadata) {\n !selectionState.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`insertText` should only be called with a collapsed range.') : invariant(false) : void 0;\n var len = null;\n\n if (text != null) {\n len = text.length;\n }\n\n if (len == null || len === 0) {\n return contentState;\n }\n\n var blockMap = contentState.getBlockMap();\n var key = selectionState.getStartKey();\n var offset = selectionState.getStartOffset();\n var block = blockMap.get(key);\n var blockText = block.getText();\n var newBlock = block.merge({\n text: blockText.slice(0, offset) + text + blockText.slice(offset, block.getLength()),\n characterList: insertIntoList(block.getCharacterList(), Repeat(characterMetadata, len).toList(), offset)\n });\n var newOffset = offset + len;\n return contentState.merge({\n blockMap: blockMap.set(key, newBlock),\n selectionAfter: selectionState.merge({\n anchorOffset: newOffset,\n focusOffset: newOffset\n })\n });\n}\n\nmodule.exports = insertTextIntoContentState;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction isElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return node.nodeType === Node.ELEMENT_NODE;\n}\n\nmodule.exports = isElement;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\n/**\n * Utility method for determining whether or not the value returned\n * from a handler indicates that it was handled.\n */\nfunction isEventHandled(value) {\n return value === 'handled' || value === true;\n}\n\nmodule.exports = isEventHandled;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = require(\"./isElement\");\n\nfunction isHTMLAnchorElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'A';\n}\n\nmodule.exports = isHTMLAnchorElement;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = require(\"./isElement\");\n\nfunction isHTMLBRElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'BR';\n}\n\nmodule.exports = isHTMLBRElement;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction isHTMLElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n if (!node.ownerDocument.defaultView) {\n return node instanceof HTMLElement;\n }\n\n if (node instanceof node.ownerDocument.defaultView.HTMLElement) {\n return true;\n }\n\n return false;\n}\n\nmodule.exports = isHTMLElement;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nvar isElement = require(\"./isElement\");\n\nfunction isHTMLImageElement(node) {\n if (!node || !node.ownerDocument) {\n return false;\n }\n\n return isElement(node) && node.nodeName === 'IMG';\n}\n\nmodule.exports = isHTMLImageElement;","\"use strict\";\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\nfunction isInstanceOfNode(target) {\n // we changed the name because of having duplicate module provider (fbjs)\n if (!target || !('ownerDocument' in target)) {\n return false;\n }\n\n if ('ownerDocument' in target) {\n var node = target;\n\n if (!node.ownerDocument.defaultView) {\n return node instanceof Node;\n }\n\n if (node instanceof node.ownerDocument.defaultView.Node) {\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = isInstanceOfNode;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nfunction isSelectionAtLeafStart(editorState) {\n var selection = editorState.getSelection();\n var anchorKey = selection.getAnchorKey();\n var blockTree = editorState.getBlockTree(anchorKey);\n var offset = selection.getStartOffset();\n var isAtStart = false;\n blockTree.some(function (leafSet) {\n if (offset === leafSet.get('start')) {\n isAtStart = true;\n return true;\n }\n\n if (offset < leafSet.get('end')) {\n return leafSet.get('leaves').some(function (leaf) {\n var leafStart = leaf.get('start');\n\n if (offset === leafStart) {\n isAtStart = true;\n return true;\n }\n\n return false;\n });\n }\n\n return false;\n });\n return isAtStart;\n}\n\nmodule.exports = isSelectionAtLeafStart;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Keys = require(\"fbjs/lib/Keys\");\n\nfunction isSoftNewlineEvent(e) {\n return e.which === Keys.RETURN && (e.getModifierState('Shift') || e.getModifierState('Alt') || e.getModifierState('Control'));\n}\n\nmodule.exports = isSoftNewlineEvent;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar expandRangeToStartOfLine = require(\"./expandRangeToStartOfLine\");\n\nvar getDraftEditorSelectionWithNodes = require(\"./getDraftEditorSelectionWithNodes\");\n\nvar moveSelectionBackward = require(\"./moveSelectionBackward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n\nfunction keyCommandBackspaceToStartOfLine(editorState, e) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n\n if (selection.isCollapsed() && selection.getAnchorOffset() === 0) {\n return moveSelectionBackward(strategyState, 1);\n }\n\n var ownerDocument = e.currentTarget.ownerDocument;\n var domSelection = ownerDocument.defaultView.getSelection(); // getRangeAt can technically throw if there's no selection, but we know\n // there is one here because text editor has focus (the cursor is a\n // selection of length 0). Therefore, we don't need to wrap this in a\n // try-catch block.\n\n var range = domSelection.getRangeAt(0);\n range = expandRangeToStartOfLine(range);\n return getDraftEditorSelectionWithNodes(strategyState, null, range.endContainer, range.endOffset, range.startContainer, range.startOffset).selectionState;\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandBackspaceToStartOfLine;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftRemovableWord = require(\"./DraftRemovableWord\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar moveSelectionBackward = require(\"./moveSelectionBackward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Delete the word that is left of the cursor, as well as any spaces or\n * punctuation after the word.\n */\n\n\nfunction keyCommandBackspaceWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset(); // If there are no words before the cursor, remove the preceding newline.\n\n if (offset === 0) {\n return moveSelectionBackward(strategyState, 1);\n }\n\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(0, offset);\n var toRemove = DraftRemovableWord.getBackward(text);\n return moveSelectionBackward(strategyState, toRemove.length || 1);\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandBackspaceWord;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftRemovableWord = require(\"./DraftRemovableWord\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar moveSelectionForward = require(\"./moveSelectionForward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Delete the word that is right of the cursor, as well as any spaces or\n * punctuation before the word.\n */\n\n\nfunction keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text); // If there are no words in front of the cursor, remove the newline.\n\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}\n\nmodule.exports = keyCommandDeleteWord;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nfunction keyCommandInsertNewline(editorState) {\n var contentState = DraftModifier.splitBlock(editorState.getCurrentContent(), editorState.getSelection());\n return EditorState.push(editorState, contentState, 'split-block');\n}\n\nmodule.exports = keyCommandInsertNewline;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n/**\n * See comment for `moveSelectionToStartOfBlock`.\n */\n\n\nfunction keyCommandMoveSelectionToEndOfBlock(editorState) {\n var selection = editorState.getSelection();\n var endKey = selection.getEndKey();\n var content = editorState.getCurrentContent();\n var textLength = content.getBlockForKey(endKey).getLength();\n return EditorState.set(editorState, {\n selection: selection.merge({\n anchorKey: endKey,\n anchorOffset: textLength,\n focusKey: endKey,\n focusOffset: textLength,\n isBackward: false\n }),\n forceSelection: true\n });\n}\n\nmodule.exports = keyCommandMoveSelectionToEndOfBlock;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n/**\n * Collapse selection at the start of the first selected block. This is used\n * for Firefox versions that attempt to navigate forward/backward instead of\n * moving the cursor. Other browsers are able to move the cursor natively.\n */\n\n\nfunction keyCommandMoveSelectionToStartOfBlock(editorState) {\n var selection = editorState.getSelection();\n var startKey = selection.getStartKey();\n return EditorState.set(editorState, {\n selection: selection.merge({\n anchorKey: startKey,\n anchorOffset: 0,\n focusKey: startKey,\n focusOffset: 0,\n isBackward: false\n }),\n forceSelection: true\n });\n}\n\nmodule.exports = keyCommandMoveSelectionToStartOfBlock;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar moveSelectionBackward = require(\"./moveSelectionBackward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Remove the selected range. If the cursor is collapsed, remove the preceding\n * character. This operation is Unicode-aware, so removing a single character\n * will remove a surrogate pair properly as well.\n */\n\n\nfunction keyCommandPlainBackspace(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charBehind = content.getBlockForKey(key).getText()[offset - 1];\n return moveSelectionBackward(strategyState, charBehind ? UnicodeUtils.getUTF16Length(charBehind, 0) : 1);\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'backspace-character' : 'remove-range');\n}\n\nmodule.exports = keyCommandPlainBackspace;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nvar UnicodeUtils = require(\"fbjs/lib/UnicodeUtils\");\n\nvar moveSelectionForward = require(\"./moveSelectionForward\");\n\nvar removeTextWithStrategy = require(\"./removeTextWithStrategy\");\n/**\n * Remove the selected range. If the cursor is collapsed, remove the following\n * character. This operation is Unicode-aware, so removing a single character\n * will remove a surrogate pair properly as well.\n */\n\n\nfunction keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}\n\nmodule.exports = keyCommandPlainDelete;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar EditorState = require(\"./EditorState\");\n\nvar getContentStateFragment = require(\"./getContentStateFragment\");\n/**\n * Transpose the characters on either side of a collapsed cursor, or\n * if the cursor is at the end of the block, transpose the last two\n * characters.\n */\n\n\nfunction keyCommandTransposeCharacters(editorState) {\n var selection = editorState.getSelection();\n\n if (!selection.isCollapsed()) {\n return editorState;\n }\n\n var offset = selection.getAnchorOffset();\n\n if (offset === 0) {\n return editorState;\n }\n\n var blockKey = selection.getAnchorKey();\n var content = editorState.getCurrentContent();\n var block = content.getBlockForKey(blockKey);\n var length = block.getLength(); // Nothing to transpose if there aren't two characters.\n\n if (length <= 1) {\n return editorState;\n }\n\n var removalRange;\n var finalSelection;\n\n if (offset === length) {\n // The cursor is at the end of the block. Swap the last two characters.\n removalRange = selection.set('anchorOffset', offset - 1);\n finalSelection = selection;\n } else {\n removalRange = selection.set('focusOffset', offset + 1);\n finalSelection = removalRange.set('anchorOffset', offset + 1);\n } // Extract the character to move as a fragment. This preserves its\n // styling and entity, if any.\n\n\n var movedFragment = getContentStateFragment(content, removalRange);\n var afterRemoval = DraftModifier.removeRange(content, removalRange, 'backward'); // After the removal, the insertion target is one character back.\n\n var selectionAfter = afterRemoval.getSelectionAfter();\n var targetOffset = selectionAfter.getAnchorOffset() - 1;\n var targetRange = selectionAfter.merge({\n anchorOffset: targetOffset,\n focusOffset: targetOffset\n });\n var afterInsert = DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment);\n var newEditorState = EditorState.push(editorState, afterInsert, 'insert-fragment');\n return EditorState.acceptSelection(newEditorState, finalSelection);\n}\n\nmodule.exports = keyCommandTransposeCharacters;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar EditorState = require(\"./EditorState\");\n\nfunction keyCommandUndo(e, editorState, updateFn) {\n var undoneState = EditorState.undo(editorState); // If the last change to occur was a spellcheck change, allow the undo\n // event to fall through to the browser. This allows the browser to record\n // the unwanted change, which should soon lead it to learn not to suggest\n // the correction again.\n\n if (editorState.getLastChangeType() === 'spellcheck-change') {\n var nativelyRenderedContent = undoneState.getCurrentContent();\n updateFn(EditorState.set(undoneState, {\n nativelyRenderedContent: nativelyRenderedContent\n }));\n return;\n } // Otheriwse, manage the undo behavior manually.\n\n\n e.preventDefault();\n\n if (!editorState.getNativelyRenderedContent()) {\n updateFn(undoneState);\n return;\n } // Trigger a re-render with the current content state to ensure that the\n // component tree has up-to-date props for comparison.\n\n\n updateFn(EditorState.set(editorState, {\n nativelyRenderedContent: null\n })); // Wait to ensure that the re-render has occurred before performing\n // the undo action.\n\n setTimeout(function () {\n updateFn(undoneState);\n }, 0);\n}\n\nmodule.exports = keyCommandUndo;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar Immutable = require(\"immutable\");\n\nvar Map = Immutable.Map;\n\nfunction modifyBlockForContentState(contentState, selectionState, operation) {\n var startKey = selectionState.getStartKey();\n var endKey = selectionState.getEndKey();\n var blockMap = contentState.getBlockMap();\n var newBlocks = blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).concat(Map([[endKey, blockMap.get(endKey)]])).map(operation);\n return contentState.merge({\n blockMap: blockMap.merge(newBlocks),\n selectionBefore: selectionState,\n selectionAfter: selectionState\n });\n}\n\nmodule.exports = modifyBlockForContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar getNextDelimiterBlockKey = require(\"./getNextDelimiterBlockKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar OrderedMap = Immutable.OrderedMap,\n List = Immutable.List;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockToBeMoved, originalTargetBlock, insertionMode, isExperimentalTreeBlock) {\n if (!isExperimentalTreeBlock) {\n return blockMap;\n } // possible values of 'insertionMode' are: 'after', 'before'\n\n\n var isInsertedAfterTarget = insertionMode === 'after';\n var originalBlockKey = originalBlockToBeMoved.getKey();\n var originalTargetKey = originalTargetBlock.getKey();\n var originalParentKey = originalBlockToBeMoved.getParentKey();\n var originalNextSiblingKey = originalBlockToBeMoved.getNextSiblingKey();\n var originalPrevSiblingKey = originalBlockToBeMoved.getPrevSiblingKey();\n var newParentKey = originalTargetBlock.getParentKey();\n var newNextSiblingKey = isInsertedAfterTarget ? originalTargetBlock.getNextSiblingKey() : originalTargetKey;\n var newPrevSiblingKey = isInsertedAfterTarget ? originalTargetKey : originalTargetBlock.getPrevSiblingKey();\n return blockMap.withMutations(function (blocks) {\n // update old parent\n transformBlock(originalParentKey, blocks, function (block) {\n var parentChildrenList = block.getChildKeys();\n return block.merge({\n children: parentChildrenList[\"delete\"](parentChildrenList.indexOf(originalBlockKey))\n });\n }); // update old prev\n\n transformBlock(originalPrevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: originalNextSiblingKey\n });\n }); // update old next\n\n transformBlock(originalNextSiblingKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalPrevSiblingKey\n });\n }); // update new next\n\n transformBlock(newNextSiblingKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalBlockKey\n });\n }); // update new prev\n\n transformBlock(newPrevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: originalBlockKey\n });\n }); // update new parent\n\n transformBlock(newParentKey, blocks, function (block) {\n var newParentChildrenList = block.getChildKeys();\n var targetBlockIndex = newParentChildrenList.indexOf(originalTargetKey);\n var insertionIndex = isInsertedAfterTarget ? targetBlockIndex + 1 : targetBlockIndex !== 0 ? targetBlockIndex - 1 : 0;\n var newChildrenArray = newParentChildrenList.toArray();\n newChildrenArray.splice(insertionIndex, 0, originalBlockKey);\n return block.merge({\n children: List(newChildrenArray)\n });\n }); // update block\n\n transformBlock(originalBlockKey, blocks, function (block) {\n return block.merge({\n nextSibling: newNextSiblingKey,\n prevSibling: newPrevSiblingKey,\n parent: newParentKey\n });\n });\n });\n};\n\nvar moveBlockInContentState = function moveBlockInContentState(contentState, blockToBeMoved, targetBlock, insertionMode) {\n !(insertionMode !== 'replace') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Replacing blocks is not supported.') : invariant(false) : void 0;\n var targetKey = targetBlock.getKey();\n var blockKey = blockToBeMoved.getKey();\n !(blockKey !== targetKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Block cannot be moved next to itself.') : invariant(false) : void 0;\n var blockMap = contentState.getBlockMap();\n var isExperimentalTreeBlock = blockToBeMoved instanceof ContentBlockNode;\n var blocksToBeMoved = [blockToBeMoved];\n var blockMapWithoutBlocksToBeMoved = blockMap[\"delete\"](blockKey);\n\n if (isExperimentalTreeBlock) {\n blocksToBeMoved = [];\n blockMapWithoutBlocksToBeMoved = blockMap.withMutations(function (blocks) {\n var nextSiblingKey = blockToBeMoved.getNextSiblingKey();\n var nextDelimiterBlockKey = getNextDelimiterBlockKey(blockToBeMoved, blocks);\n blocks.toSeq().skipUntil(function (block) {\n return block.getKey() === blockKey;\n }).takeWhile(function (block) {\n var key = block.getKey();\n var isBlockToBeMoved = key === blockKey;\n var hasNextSiblingAndIsNotNextSibling = nextSiblingKey && key !== nextSiblingKey;\n var doesNotHaveNextSiblingAndIsNotDelimiter = !nextSiblingKey && block.getParentKey() && (!nextDelimiterBlockKey || key !== nextDelimiterBlockKey);\n return !!(isBlockToBeMoved || hasNextSiblingAndIsNotNextSibling || doesNotHaveNextSiblingAndIsNotDelimiter);\n }).forEach(function (block) {\n blocksToBeMoved.push(block);\n blocks[\"delete\"](block.getKey());\n });\n });\n }\n\n var blocksBefore = blockMapWithoutBlocksToBeMoved.toSeq().takeUntil(function (v) {\n return v === targetBlock;\n });\n var blocksAfter = blockMapWithoutBlocksToBeMoved.toSeq().skipUntil(function (v) {\n return v === targetBlock;\n }).skip(1);\n var slicedBlocks = blocksToBeMoved.map(function (block) {\n return [block.getKey(), block];\n });\n var newBlocks = OrderedMap();\n\n if (insertionMode === 'before') {\n var blockBefore = contentState.getBlockBefore(targetKey);\n !(!blockBefore || blockBefore.getKey() !== blockToBeMoved.getKey()) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Block cannot be moved next to itself.') : invariant(false) : void 0;\n newBlocks = blocksBefore.concat([].concat(slicedBlocks, [[targetKey, targetBlock]]), blocksAfter).toOrderedMap();\n } else if (insertionMode === 'after') {\n var blockAfter = contentState.getBlockAfter(targetKey);\n !(!blockAfter || blockAfter.getKey() !== blockKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Block cannot be moved next to itself.') : invariant(false) : void 0;\n newBlocks = blocksBefore.concat([[targetKey, targetBlock]].concat(slicedBlocks), blocksAfter).toOrderedMap();\n }\n\n return contentState.merge({\n blockMap: updateBlockMapLinks(newBlocks, blockToBeMoved, targetBlock, insertionMode, isExperimentalTreeBlock),\n selectionBefore: contentState.getSelectionAfter(),\n selectionAfter: contentState.getSelectionAfter().merge({\n anchorKey: blockKey,\n focusKey: blockKey\n })\n });\n};\n\nmodule.exports = moveBlockInContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar warning = require(\"fbjs/lib/warning\");\n/**\n * Given a collapsed selection, move the focus `maxDistance` backward within\n * the selected block. If the selection will go beyond the start of the block,\n * move focus to the end of the previous block, but no further.\n *\n * This function is not Unicode-aware, so surrogate pairs will be treated\n * as having length 2.\n */\n\n\nfunction moveSelectionBackward(editorState, maxDistance) {\n var selection = editorState.getSelection(); // Should eventually make this an invariant\n\n process.env.NODE_ENV !== \"production\" ? warning(selection.isCollapsed(), 'moveSelectionBackward should only be called with a collapsed SelectionState') : void 0;\n var content = editorState.getCurrentContent();\n var key = selection.getStartKey();\n var offset = selection.getStartOffset();\n var focusKey = key;\n var focusOffset = 0;\n\n if (maxDistance > offset) {\n var keyBefore = content.getKeyBefore(key);\n\n if (keyBefore == null) {\n focusKey = key;\n } else {\n focusKey = keyBefore;\n var blockBefore = content.getBlockForKey(keyBefore);\n focusOffset = blockBefore.getText().length;\n }\n } else {\n focusOffset = offset - maxDistance;\n }\n\n return selection.merge({\n focusKey: focusKey,\n focusOffset: focusOffset,\n isBackward: true\n });\n}\n\nmodule.exports = moveSelectionBackward;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar warning = require(\"fbjs/lib/warning\");\n/**\n * Given a collapsed selection, move the focus `maxDistance` forward within\n * the selected block. If the selection will go beyond the end of the block,\n * move focus to the start of the next block, but no further.\n *\n * This function is not Unicode-aware, so surrogate pairs will be treated\n * as having length 2.\n */\n\n\nfunction moveSelectionForward(editorState, maxDistance) {\n var selection = editorState.getSelection(); // Should eventually make this an invariant\n\n process.env.NODE_ENV !== \"production\" ? warning(selection.isCollapsed(), 'moveSelectionForward should only be called with a collapsed SelectionState') : void 0;\n var key = selection.getStartKey();\n var offset = selection.getStartOffset();\n var content = editorState.getCurrentContent();\n var focusKey = key;\n var focusOffset;\n var block = content.getBlockForKey(key);\n\n if (maxDistance > block.getText().length - offset) {\n focusKey = content.getKeyAfter(key);\n focusOffset = 0;\n } else {\n focusOffset = offset + maxDistance;\n }\n\n return selection.merge({\n focusKey: focusKey,\n focusOffset: focusOffset\n });\n}\n\nmodule.exports = moveSelectionForward;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar OrderedMap = Immutable.OrderedMap;\n\nvar randomizeContentBlockNodeKeys = function randomizeContentBlockNodeKeys(blockMap) {\n var newKeysRef = {}; // we keep track of root blocks in order to update subsequent sibling links\n\n var lastRootBlock;\n return OrderedMap(blockMap.withMutations(function (blockMapState) {\n blockMapState.forEach(function (block, index) {\n var oldKey = block.getKey();\n var nextKey = block.getNextSiblingKey();\n var prevKey = block.getPrevSiblingKey();\n var childrenKeys = block.getChildKeys();\n var parentKey = block.getParentKey(); // new key that we will use to build linking\n\n var key = generateRandomKey(); // we will add it here to re-use it later\n\n newKeysRef[oldKey] = key;\n\n if (nextKey) {\n var nextBlock = blockMapState.get(nextKey);\n\n if (nextBlock) {\n blockMapState.setIn([nextKey, 'prevSibling'], key);\n } else {\n // this can happen when generating random keys for fragments\n blockMapState.setIn([oldKey, 'nextSibling'], null);\n }\n }\n\n if (prevKey) {\n var prevBlock = blockMapState.get(prevKey);\n\n if (prevBlock) {\n blockMapState.setIn([prevKey, 'nextSibling'], key);\n } else {\n // this can happen when generating random keys for fragments\n blockMapState.setIn([oldKey, 'prevSibling'], null);\n }\n }\n\n if (parentKey && blockMapState.get(parentKey)) {\n var parentBlock = blockMapState.get(parentKey);\n var parentChildrenList = parentBlock.getChildKeys();\n blockMapState.setIn([parentKey, 'children'], parentChildrenList.set(parentChildrenList.indexOf(block.getKey()), key));\n } else {\n // blocks will then be treated as root block nodes\n blockMapState.setIn([oldKey, 'parent'], null);\n\n if (lastRootBlock) {\n blockMapState.setIn([lastRootBlock.getKey(), 'nextSibling'], key);\n blockMapState.setIn([oldKey, 'prevSibling'], newKeysRef[lastRootBlock.getKey()]);\n }\n\n lastRootBlock = blockMapState.get(oldKey);\n }\n\n childrenKeys.forEach(function (childKey) {\n var childBlock = blockMapState.get(childKey);\n\n if (childBlock) {\n blockMapState.setIn([childKey, 'parent'], key);\n } else {\n blockMapState.setIn([oldKey, 'children'], block.getChildKeys().filter(function (child) {\n return child !== childKey;\n }));\n }\n });\n });\n }).toArray().map(function (block) {\n return [newKeysRef[block.getKey()], block.set('key', newKeysRef[block.getKey()])];\n }));\n};\n\nvar randomizeContentBlockKeys = function randomizeContentBlockKeys(blockMap) {\n return OrderedMap(blockMap.toArray().map(function (block) {\n var key = generateRandomKey();\n return [key, block.set('key', key)];\n }));\n};\n\nvar randomizeBlockMapKeys = function randomizeBlockMapKeys(blockMap) {\n var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode;\n\n if (!isTreeBasedBlockMap) {\n return randomizeContentBlockKeys(blockMap);\n }\n\n return randomizeContentBlockNodeKeys(blockMap);\n};\n\nmodule.exports = randomizeBlockMapKeys;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar CharacterMetadata = require(\"./CharacterMetadata\");\n\nvar findRangesImmutable = require(\"./findRangesImmutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nfunction removeEntitiesAtEdges(contentState, selectionState) {\n var blockMap = contentState.getBlockMap();\n var entityMap = contentState.getEntityMap();\n var updatedBlocks = {};\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var startBlock = blockMap.get(startKey);\n var updatedStart = removeForBlock(entityMap, startBlock, startOffset);\n\n if (updatedStart !== startBlock) {\n updatedBlocks[startKey] = updatedStart;\n }\n\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var endBlock = blockMap.get(endKey);\n\n if (startKey === endKey) {\n endBlock = updatedStart;\n }\n\n var updatedEnd = removeForBlock(entityMap, endBlock, endOffset);\n\n if (updatedEnd !== endBlock) {\n updatedBlocks[endKey] = updatedEnd;\n }\n\n if (!Object.keys(updatedBlocks).length) {\n return contentState.set('selectionAfter', selectionState);\n }\n\n return contentState.merge({\n blockMap: blockMap.merge(updatedBlocks),\n selectionAfter: selectionState\n });\n}\n/**\n * Given a list of characters and an offset that is in the middle of an entity,\n * returns the start and end of the entity that is overlapping the offset.\n * Note: This method requires that the offset be in an entity range.\n */\n\n\nfunction getRemovalRange(characters, entityKey, offset) {\n var removalRange; // Iterates through a list looking for ranges of matching items\n // based on the 'isEqual' callback.\n // Then instead of returning the result, call the 'found' callback\n // with each range.\n // Then filters those ranges based on the 'filter' callback\n //\n // Here we use it to find ranges of characters with the same entity key.\n\n findRangesImmutable(characters, // the list to iterate through\n function (a, b) {\n return a.getEntity() === b.getEntity();\n }, // 'isEqual' callback\n function (element) {\n return element.getEntity() === entityKey;\n }, // 'filter' callback\n function (start, end) {\n // 'found' callback\n if (start <= offset && end >= offset) {\n // this entity overlaps the offset index\n removalRange = {\n start: start,\n end: end\n };\n }\n });\n !(typeof removalRange === 'object') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Removal range must exist within character list.') : invariant(false) : void 0;\n return removalRange;\n}\n\nfunction removeForBlock(entityMap, block, offset) {\n var chars = block.getCharacterList();\n var charBefore = offset > 0 ? chars.get(offset - 1) : undefined;\n var charAfter = offset < chars.count() ? chars.get(offset) : undefined;\n var entityBeforeCursor = charBefore ? charBefore.getEntity() : undefined;\n var entityAfterCursor = charAfter ? charAfter.getEntity() : undefined;\n\n if (entityAfterCursor && entityAfterCursor === entityBeforeCursor) {\n var entity = entityMap.__get(entityAfterCursor);\n\n if (entity.getMutability() !== 'MUTABLE') {\n var _getRemovalRange = getRemovalRange(chars, entityAfterCursor, offset),\n start = _getRemovalRange.start,\n end = _getRemovalRange.end;\n\n var current;\n\n while (start < end) {\n current = chars.get(start);\n chars = chars.set(start, CharacterMetadata.applyEntity(current, null));\n start++;\n }\n\n return block.set('characterList', chars);\n }\n }\n\n return block;\n}\n\nmodule.exports = removeEntitiesAtEdges;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar getNextDelimiterBlockKey = require(\"./getNextDelimiterBlockKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar List = Immutable.List,\n Map = Immutable.Map;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n/**\n * Ancestors needs to be preserved when there are non selected\n * children to make sure we do not leave any orphans behind\n */\n\n\nvar getAncestorsKeys = function getAncestorsKeys(blockKey, blockMap) {\n var parents = [];\n\n if (!blockKey) {\n return parents;\n }\n\n var blockNode = blockMap.get(blockKey);\n\n while (blockNode && blockNode.getParentKey()) {\n var parentKey = blockNode.getParentKey();\n\n if (parentKey) {\n parents.push(parentKey);\n }\n\n blockNode = parentKey ? blockMap.get(parentKey) : null;\n }\n\n return parents;\n};\n/**\n * Get all next delimiter keys until we hit a root delimiter and return\n * an array of key references\n */\n\n\nvar getNextDelimitersBlockKeys = function getNextDelimitersBlockKeys(block, blockMap) {\n var nextDelimiters = [];\n\n if (!block) {\n return nextDelimiters;\n }\n\n var nextDelimiter = getNextDelimiterBlockKey(block, blockMap);\n\n while (nextDelimiter && blockMap.get(nextDelimiter)) {\n var _block = blockMap.get(nextDelimiter);\n\n nextDelimiters.push(nextDelimiter); // we do not need to keep checking all root node siblings, just the first occurance\n\n nextDelimiter = _block.getParentKey() ? getNextDelimiterBlockKey(_block, blockMap) : null;\n }\n\n return nextDelimiters;\n};\n\nvar getNextValidSibling = function getNextValidSibling(block, blockMap, originalBlockMap) {\n if (!block) {\n return null;\n } // note that we need to make sure we refer to the original block since this\n // function is called within a withMutations\n\n\n var nextValidSiblingKey = originalBlockMap.get(block.getKey()).getNextSiblingKey();\n\n while (nextValidSiblingKey && !blockMap.get(nextValidSiblingKey)) {\n nextValidSiblingKey = originalBlockMap.get(nextValidSiblingKey).getNextSiblingKey() || null;\n }\n\n return nextValidSiblingKey;\n};\n\nvar getPrevValidSibling = function getPrevValidSibling(block, blockMap, originalBlockMap) {\n if (!block) {\n return null;\n } // note that we need to make sure we refer to the original block since this\n // function is called within a withMutations\n\n\n var prevValidSiblingKey = originalBlockMap.get(block.getKey()).getPrevSiblingKey();\n\n while (prevValidSiblingKey && !blockMap.get(prevValidSiblingKey)) {\n prevValidSiblingKey = originalBlockMap.get(prevValidSiblingKey).getPrevSiblingKey() || null;\n }\n\n return prevValidSiblingKey;\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, startBlock, endBlock, originalBlockMap) {\n return blockMap.withMutations(function (blocks) {\n // update start block if its retained\n transformBlock(startBlock.getKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update endblock if its retained\n\n transformBlock(endBlock.getKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update start block parent ancestors\n\n getAncestorsKeys(startBlock.getKey(), originalBlockMap).forEach(function (parentKey) {\n return transformBlock(parentKey, blocks, function (block) {\n return block.merge({\n children: block.getChildKeys().filter(function (key) {\n return blocks.get(key);\n }),\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // update start block next - can only happen if startBlock == endBlock\n\n transformBlock(startBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: startBlock.getPrevSiblingKey()\n });\n }); // update start block prev\n\n transformBlock(startBlock.getPrevSiblingKey(), blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap)\n });\n }); // update end block next\n\n transformBlock(endBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n }); // update end block prev\n\n transformBlock(endBlock.getPrevSiblingKey(), blocks, function (block) {\n return block.merge({\n nextSibling: endBlock.getNextSiblingKey()\n });\n }); // update end block parent ancestors\n\n getAncestorsKeys(endBlock.getKey(), originalBlockMap).forEach(function (parentKey) {\n transformBlock(parentKey, blocks, function (block) {\n return block.merge({\n children: block.getChildKeys().filter(function (key) {\n return blocks.get(key);\n }),\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // update next delimiters all the way to a root delimiter\n\n getNextDelimitersBlockKeys(endBlock, originalBlockMap).forEach(function (delimiterKey) {\n return transformBlock(delimiterKey, blocks, function (block) {\n return block.merge({\n nextSibling: getNextValidSibling(block, blocks, originalBlockMap),\n prevSibling: getPrevValidSibling(block, blocks, originalBlockMap)\n });\n });\n }); // if parent (startBlock) was deleted\n\n if (blockMap.get(startBlock.getKey()) == null && blockMap.get(endBlock.getKey()) != null && endBlock.getParentKey() === startBlock.getKey() && endBlock.getPrevSiblingKey() == null) {\n var prevSiblingKey = startBlock.getPrevSiblingKey(); // endBlock becomes next sibling of parent's prevSibling\n\n transformBlock(endBlock.getKey(), blocks, function (block) {\n return block.merge({\n prevSibling: prevSiblingKey\n });\n });\n transformBlock(prevSiblingKey, blocks, function (block) {\n return block.merge({\n nextSibling: endBlock.getKey()\n });\n }); // Update parent for previous parent's children, and children for that parent\n\n var prevSibling = prevSiblingKey ? blockMap.get(prevSiblingKey) : null;\n var newParentKey = prevSibling ? prevSibling.getParentKey() : null;\n startBlock.getChildKeys().forEach(function (childKey) {\n transformBlock(childKey, blocks, function (block) {\n return block.merge({\n parent: newParentKey // set to null if there is no parent\n\n });\n });\n });\n\n if (newParentKey != null) {\n var newParent = blockMap.get(newParentKey);\n transformBlock(newParentKey, blocks, function (block) {\n return block.merge({\n children: newParent.getChildKeys().concat(startBlock.getChildKeys())\n });\n });\n } // last child of deleted parent should point to next sibling\n\n\n transformBlock(startBlock.getChildKeys().find(function (key) {\n var block = blockMap.get(key);\n return block.getNextSiblingKey() === null;\n }), blocks, function (block) {\n return block.merge({\n nextSibling: startBlock.getNextSiblingKey()\n });\n });\n }\n });\n};\n\nvar removeRangeFromContentState = function removeRangeFromContentState(contentState, selectionState) {\n if (selectionState.isCollapsed()) {\n return contentState;\n }\n\n var blockMap = contentState.getBlockMap();\n var startKey = selectionState.getStartKey();\n var startOffset = selectionState.getStartOffset();\n var endKey = selectionState.getEndKey();\n var endOffset = selectionState.getEndOffset();\n var startBlock = blockMap.get(startKey);\n var endBlock = blockMap.get(endKey); // we assume that ContentBlockNode and ContentBlocks are not mixed together\n\n var isExperimentalTreeBlock = startBlock instanceof ContentBlockNode; // used to retain blocks that should not be deleted to avoid orphan children\n\n var parentAncestors = [];\n\n if (isExperimentalTreeBlock) {\n var endBlockchildrenKeys = endBlock.getChildKeys();\n var endBlockAncestors = getAncestorsKeys(endKey, blockMap); // endBlock has unselected siblings so we can not remove its ancestors parents\n\n if (endBlock.getNextSiblingKey()) {\n parentAncestors = parentAncestors.concat(endBlockAncestors);\n } // endBlock has children so can not remove this block or any of its ancestors\n\n\n if (!endBlockchildrenKeys.isEmpty()) {\n parentAncestors = parentAncestors.concat(endBlockAncestors.concat([endKey]));\n } // we need to retain all ancestors of the next delimiter block\n\n\n parentAncestors = parentAncestors.concat(getAncestorsKeys(getNextDelimiterBlockKey(endBlock, blockMap), blockMap));\n }\n\n var characterList;\n\n if (startBlock === endBlock) {\n characterList = removeFromList(startBlock.getCharacterList(), startOffset, endOffset);\n } else {\n characterList = startBlock.getCharacterList().slice(0, startOffset).concat(endBlock.getCharacterList().slice(endOffset));\n }\n\n var modifiedStart = startBlock.merge({\n text: startBlock.getText().slice(0, startOffset) + endBlock.getText().slice(endOffset),\n characterList: characterList\n }); // If cursor (collapsed) is at the start of the first child, delete parent\n // instead of child\n\n var shouldDeleteParent = isExperimentalTreeBlock && startOffset === 0 && endOffset === 0 && endBlock.getParentKey() === startKey && endBlock.getPrevSiblingKey() == null;\n var newBlocks = shouldDeleteParent ? Map([[startKey, null]]) : blockMap.toSeq().skipUntil(function (_, k) {\n return k === startKey;\n }).takeUntil(function (_, k) {\n return k === endKey;\n }).filter(function (_, k) {\n return parentAncestors.indexOf(k) === -1;\n }).concat(Map([[endKey, null]])).map(function (_, k) {\n return k === startKey ? modifiedStart : null;\n });\n var updatedBlockMap = blockMap.merge(newBlocks).filter(function (block) {\n return !!block;\n }); // Only update tree block pointers if the range is across blocks\n\n if (isExperimentalTreeBlock && startBlock !== endBlock) {\n updatedBlockMap = updateBlockMapLinks(updatedBlockMap, startBlock, endBlock, blockMap);\n }\n\n return contentState.merge({\n blockMap: updatedBlockMap,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: startKey,\n anchorOffset: startOffset,\n focusKey: startKey,\n focusOffset: startOffset,\n isBackward: false\n })\n });\n};\n/**\n * Maintain persistence for target list when removing characters on the\n * head and tail of the character list.\n */\n\n\nvar removeFromList = function removeFromList(targetList, startOffset, endOffset) {\n if (startOffset === 0) {\n while (startOffset < endOffset) {\n targetList = targetList.shift();\n startOffset++;\n }\n } else if (endOffset === targetList.count()) {\n while (endOffset > startOffset) {\n targetList = targetList.pop();\n endOffset--;\n }\n } else {\n var head = targetList.slice(0, startOffset);\n var tail = targetList.slice(endOffset);\n targetList = head.concat(tail).toList();\n }\n\n return targetList;\n};\n\nmodule.exports = removeRangeFromContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftModifier = require(\"./DraftModifier\");\n\nvar gkx = require(\"./gkx\");\n\nvar experimentalTreeDataSupport = gkx('draft_tree_data_support');\n/**\n * For a collapsed selection state, remove text based on the specified strategy.\n * If the selection state is not collapsed, remove the entire selected range.\n */\n\nfunction removeTextWithStrategy(editorState, strategy, direction) {\n var selection = editorState.getSelection();\n var content = editorState.getCurrentContent();\n var target = selection;\n var anchorKey = selection.getAnchorKey();\n var focusKey = selection.getFocusKey();\n var anchorBlock = content.getBlockForKey(anchorKey);\n\n if (experimentalTreeDataSupport) {\n if (direction === 'forward') {\n if (anchorKey !== focusKey) {\n // For now we ignore forward delete across blocks,\n // if there is demand for this we will implement it.\n return content;\n }\n }\n }\n\n if (selection.isCollapsed()) {\n if (direction === 'forward') {\n if (editorState.isSelectionAtEndOfContent()) {\n return content;\n }\n\n if (experimentalTreeDataSupport) {\n var isAtEndOfBlock = selection.getAnchorOffset() === content.getBlockForKey(anchorKey).getLength();\n\n if (isAtEndOfBlock) {\n var anchorBlockSibling = content.getBlockForKey(anchorBlock.nextSibling);\n\n if (!anchorBlockSibling || anchorBlockSibling.getLength() === 0) {\n // For now we ignore forward delete at the end of a block,\n // if there is demand for this we will implement it.\n return content;\n }\n }\n }\n } else if (editorState.isSelectionAtStartOfContent()) {\n return content;\n }\n\n target = strategy(editorState);\n\n if (target === selection) {\n return content;\n }\n }\n\n return DraftModifier.removeRange(content, target, direction);\n}\n\nmodule.exports = removeTextWithStrategy;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar REGEX_BLOCK_DELIMITER = new RegExp('\\r', 'g');\n\nfunction sanitizeDraftText(input) {\n return input.replace(REGEX_BLOCK_DELIMITER, '');\n}\n\nmodule.exports = sanitizeDraftText;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar DraftEffects = require(\"./DraftEffects\");\n\nvar DraftJsDebugLogging = require(\"./DraftJsDebugLogging\");\n\nvar UserAgent = require(\"fbjs/lib/UserAgent\");\n\nvar containsNode = require(\"fbjs/lib/containsNode\");\n\nvar getActiveElement = require(\"fbjs/lib/getActiveElement\");\n\nvar getCorrectDocumentFromNode = require(\"./getCorrectDocumentFromNode\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar isElement = require(\"./isElement\");\n\nvar isIE = UserAgent.isBrowser('IE');\n\nfunction getAnonymizedDOM(node, getNodeLabels) {\n if (!node) {\n return '[empty]';\n }\n\n var anonymized = anonymizeTextWithin(node, getNodeLabels);\n\n if (anonymized.nodeType === Node.TEXT_NODE) {\n return anonymized.textContent;\n }\n\n !isElement(anonymized) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Node must be an Element if it is not a text node.') : invariant(false) : void 0;\n var castedElement = anonymized;\n return castedElement.outerHTML;\n}\n\nfunction anonymizeTextWithin(node, getNodeLabels) {\n var labels = getNodeLabels !== undefined ? getNodeLabels(node) : [];\n\n if (node.nodeType === Node.TEXT_NODE) {\n var length = node.textContent.length;\n return getCorrectDocumentFromNode(node).createTextNode('[text ' + length + (labels.length ? ' | ' + labels.join(', ') : '') + ']');\n }\n\n var clone = node.cloneNode();\n\n if (clone.nodeType === 1 && labels.length) {\n clone.setAttribute('data-labels', labels.join(', '));\n }\n\n var childNodes = node.childNodes;\n\n for (var ii = 0; ii < childNodes.length; ii++) {\n clone.appendChild(anonymizeTextWithin(childNodes[ii], getNodeLabels));\n }\n\n return clone;\n}\n\nfunction getAnonymizedEditorDOM(node, getNodeLabels) {\n // grabbing the DOM content of the Draft editor\n var currentNode = node; // this should only be used after checking with isElement\n\n var castedNode = currentNode;\n\n while (currentNode) {\n if (isElement(currentNode) && castedNode.hasAttribute('contenteditable')) {\n // found the Draft editor container\n return getAnonymizedDOM(currentNode, getNodeLabels);\n } else {\n currentNode = currentNode.parentNode;\n castedNode = currentNode;\n }\n }\n\n return 'Could not find contentEditable parent of node';\n}\n\nfunction getNodeLength(node) {\n return node.nodeValue === null ? node.childNodes.length : node.nodeValue.length;\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n */\n\n\nfunction setDraftEditorSelection(selectionState, node, blockKey, nodeStart, nodeEnd) {\n // It's possible that the editor has been removed from the DOM but\n // our selection code doesn't know it yet. Forcing selection in\n // this case may lead to errors, so just bail now.\n var documentObject = getCorrectDocumentFromNode(node);\n\n if (!containsNode(documentObject.documentElement, node)) {\n return;\n }\n\n var selection = documentObject.defaultView.getSelection();\n var anchorKey = selectionState.getAnchorKey();\n var anchorOffset = selectionState.getAnchorOffset();\n var focusKey = selectionState.getFocusKey();\n var focusOffset = selectionState.getFocusOffset();\n var isBackward = selectionState.getIsBackward(); // IE doesn't support backward selection. Swap key/offset pairs.\n\n if (!selection.extend && isBackward) {\n var tempKey = anchorKey;\n var tempOffset = anchorOffset;\n anchorKey = focusKey;\n anchorOffset = focusOffset;\n focusKey = tempKey;\n focusOffset = tempOffset;\n isBackward = false;\n }\n\n var hasAnchor = anchorKey === blockKey && nodeStart <= anchorOffset && nodeEnd >= anchorOffset;\n var hasFocus = focusKey === blockKey && nodeStart <= focusOffset && nodeEnd >= focusOffset; // If the selection is entirely bound within this node, set the selection\n // and be done.\n\n if (hasAnchor && hasFocus) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState);\n return;\n }\n\n if (!isBackward) {\n // If the anchor is within this node, set the range start.\n if (hasAnchor) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n } // If the focus is within this node, we can assume that we have\n // already set the appropriate start range on the selection, and\n // can simply extend the selection.\n\n\n if (hasFocus) {\n addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState);\n }\n } else {\n // If this node has the focus, set the selection range to be a\n // collapsed range beginning here. Later, when we encounter the anchor,\n // we'll use this information to extend the selection.\n if (hasFocus) {\n selection.removeAllRanges();\n addPointToSelection(selection, node, focusOffset - nodeStart, selectionState);\n } // If this node has the anchor, we may assume that the correct\n // focus information is already stored on the selection object.\n // We keep track of it, reset the selection range, and extend it\n // back to the focus point.\n\n\n if (hasAnchor) {\n var storedFocusNode = selection.focusNode;\n var storedFocusOffset = selection.focusOffset;\n selection.removeAllRanges();\n addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState);\n addFocusToSelection(selection, storedFocusNode, storedFocusOffset, selectionState);\n }\n }\n}\n/**\n * Extend selection towards focus point.\n */\n\n\nfunction addFocusToSelection(selection, node, offset, selectionState) {\n var activeElement = getActiveElement();\n var extend = selection.extend; // containsNode returns false if node is null.\n // Let's refine the type of this value out here so flow knows.\n\n if (extend && node != null && containsNode(activeElement, node)) {\n // If `extend` is called while another element has focus, an error is\n // thrown. We therefore disable `extend` if the active element is somewhere\n // other than the node we are selecting. This should only occur in Firefox,\n // since it is the only browser to support multiple selections.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=921444.\n // logging to catch bug that is being reported in t16250795\n if (offset > getNodeLength(node)) {\n // the call to 'selection.extend' is about to throw\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node),\n extraParams: JSON.stringify({\n offset: offset\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n } // logging to catch bug that is being reported in t18110632\n\n\n var nodeWasFocus = node === selection.focusNode;\n\n try {\n // Fixes some reports of \"InvalidStateError: Failed to execute 'extend' on\n // 'Selection': This Selection object doesn't have any Ranges.\"\n // Note: selection.extend does not exist in IE.\n if (selection.rangeCount > 0 && selection.extend) {\n selection.extend(node, offset);\n }\n } catch (e) {\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node, function (n) {\n var labels = [];\n\n if (n === activeElement) {\n labels.push('active element');\n }\n\n if (n === selection.anchorNode) {\n labels.push('selection anchor node');\n }\n\n if (n === selection.focusNode) {\n labels.push('selection focus node');\n }\n\n return labels;\n }),\n extraParams: JSON.stringify({\n activeElementName: activeElement ? activeElement.nodeName : null,\n nodeIsFocus: node === selection.focusNode,\n nodeWasFocus: nodeWasFocus,\n selectionRangeCount: selection.rangeCount,\n selectionAnchorNodeName: selection.anchorNode ? selection.anchorNode.nodeName : null,\n selectionAnchorOffset: selection.anchorOffset,\n selectionFocusNodeName: selection.focusNode ? selection.focusNode.nodeName : null,\n selectionFocusOffset: selection.focusOffset,\n message: e ? '' + e : null,\n offset: offset\n }, null, 2),\n selectionState: JSON.stringify(selectionState.toJS(), null, 2)\n }); // allow the error to be thrown -\n // better than continuing in a broken state\n\n throw e;\n }\n } else {\n // IE doesn't support extend. This will mean no backward selection.\n // Extract the existing selection range and add focus to it.\n // Additionally, clone the selection range. IE11 throws an\n // InvalidStateError when attempting to access selection properties\n // after the range is detached.\n if (node && selection.rangeCount > 0) {\n var range = selection.getRangeAt(0);\n range.setEnd(node, offset);\n selection.addRange(range.cloneRange());\n }\n }\n}\n\nfunction addPointToSelection(selection, node, offset, selectionState) {\n var range = getCorrectDocumentFromNode(node).createRange(); // logging to catch bug that is being reported in t16250795\n\n if (offset > getNodeLength(node)) {\n // in this case we know that the call to 'range.setStart' is about to throw\n DraftJsDebugLogging.logSelectionStateFailure({\n anonymizedDom: getAnonymizedEditorDOM(node),\n extraParams: JSON.stringify({\n offset: offset\n }),\n selectionState: JSON.stringify(selectionState.toJS())\n });\n DraftEffects.handleExtensionCausedError();\n }\n\n range.setStart(node, offset); // IE sometimes throws Unspecified Error when trying to addRange\n\n if (isIE) {\n try {\n selection.addRange(range);\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n /* eslint-disable-next-line no-console */\n console.warn('Call to selection.addRange() threw exception: ', e);\n }\n }\n } else {\n selection.addRange(range);\n }\n}\n\nmodule.exports = {\n setDraftEditorSelection: setDraftEditorSelection,\n addFocusToSelection: addFocusToSelection\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar ContentBlockNode = require(\"./ContentBlockNode\");\n\nvar generateRandomKey = require(\"./generateRandomKey\");\n\nvar Immutable = require(\"immutable\");\n\nvar invariant = require(\"fbjs/lib/invariant\");\n\nvar modifyBlockForContentState = require(\"./modifyBlockForContentState\");\n\nvar List = Immutable.List,\n Map = Immutable.Map;\n\nvar transformBlock = function transformBlock(key, blockMap, func) {\n if (!key) {\n return;\n }\n\n var block = blockMap.get(key);\n\n if (!block) {\n return;\n }\n\n blockMap.set(key, func(block));\n};\n\nvar updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlock, belowBlock) {\n return blockMap.withMutations(function (blocks) {\n var originalBlockKey = originalBlock.getKey();\n var belowBlockKey = belowBlock.getKey(); // update block parent\n\n transformBlock(originalBlock.getParentKey(), blocks, function (block) {\n var parentChildrenList = block.getChildKeys();\n var insertionIndex = parentChildrenList.indexOf(originalBlockKey) + 1;\n var newChildrenArray = parentChildrenList.toArray();\n newChildrenArray.splice(insertionIndex, 0, belowBlockKey);\n return block.merge({\n children: List(newChildrenArray)\n });\n }); // update original next block\n\n transformBlock(originalBlock.getNextSiblingKey(), blocks, function (block) {\n return block.merge({\n prevSibling: belowBlockKey\n });\n }); // update original block\n\n transformBlock(originalBlockKey, blocks, function (block) {\n return block.merge({\n nextSibling: belowBlockKey\n });\n }); // update below block\n\n transformBlock(belowBlockKey, blocks, function (block) {\n return block.merge({\n prevSibling: originalBlockKey\n });\n });\n });\n};\n\nvar splitBlockInContentState = function splitBlockInContentState(contentState, selectionState) {\n !selectionState.isCollapsed() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Selection range must be collapsed.') : invariant(false) : void 0;\n var key = selectionState.getAnchorKey();\n var blockMap = contentState.getBlockMap();\n var blockToSplit = blockMap.get(key);\n var text = blockToSplit.getText();\n\n if (!text) {\n var blockType = blockToSplit.getType();\n\n if (blockType === 'unordered-list-item' || blockType === 'ordered-list-item') {\n return modifyBlockForContentState(contentState, selectionState, function (block) {\n return block.merge({\n type: 'unstyled',\n depth: 0\n });\n });\n }\n }\n\n var offset = selectionState.getAnchorOffset();\n var chars = blockToSplit.getCharacterList();\n var keyBelow = generateRandomKey();\n var isExperimentalTreeBlock = blockToSplit instanceof ContentBlockNode;\n var blockAbove = blockToSplit.merge({\n text: text.slice(0, offset),\n characterList: chars.slice(0, offset)\n });\n var blockBelow = blockAbove.merge({\n key: keyBelow,\n text: text.slice(offset),\n characterList: chars.slice(offset),\n data: Map()\n });\n var blocksBefore = blockMap.toSeq().takeUntil(function (v) {\n return v === blockToSplit;\n });\n var blocksAfter = blockMap.toSeq().skipUntil(function (v) {\n return v === blockToSplit;\n }).rest();\n var newBlocks = blocksBefore.concat([[key, blockAbove], [keyBelow, blockBelow]], blocksAfter).toOrderedMap();\n\n if (isExperimentalTreeBlock) {\n !blockToSplit.getChildKeys().isEmpty() ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'ContentBlockNode must not have children') : invariant(false) : void 0;\n newBlocks = updateBlockMapLinks(newBlocks, blockAbove, blockBelow);\n }\n\n return contentState.merge({\n blockMap: newBlocks,\n selectionBefore: selectionState,\n selectionAfter: selectionState.merge({\n anchorKey: keyBelow,\n anchorOffset: 0,\n focusKey: keyBelow,\n focusOffset: 0,\n isBackward: false\n })\n });\n};\n\nmodule.exports = splitBlockInContentState;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @emails oncall+draft_js\n */\n'use strict';\n\nvar NEWLINE_REGEX = /\\r\\n?|\\n/g;\n\nfunction splitTextIntoTextBlocks(text) {\n return text.split(NEWLINE_REGEX);\n}\n\nmodule.exports = splitTextIntoTextBlocks;","\"use strict\";\n\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @typechecks\n * \n * @format\n */\n\n/*eslint-disable no-bitwise */\n\n/**\n * Based on the rfc4122-compliant solution posted at\n * http://stackoverflow.com/questions/105034\n */\nfunction uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c == 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n\nmodule.exports = uuid;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar PhotosMimeType = require(\"./PhotosMimeType\");\n\nvar createArrayFromMixed = require(\"./createArrayFromMixed\");\n\nvar emptyFunction = require(\"./emptyFunction\");\n\nvar CR_LF_REGEX = new RegExp(\"\\r\\n\", 'g');\nvar LF_ONLY = \"\\n\";\nvar RICH_TEXT_TYPES = {\n 'text/rtf': 1,\n 'text/html': 1\n};\n/**\n * If DataTransferItem is a file then return the Blob of data.\n *\n * @param {object} item\n * @return {?blob}\n */\n\nfunction getFileFromDataTransfer(item) {\n if (item.kind == 'file') {\n return item.getAsFile();\n }\n}\n\nvar DataTransfer =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {object} data\n */\n function DataTransfer(data) {\n this.data = data; // Types could be DOMStringList or array\n\n this.types = data.types ? createArrayFromMixed(data.types) : [];\n }\n /**\n * Is this likely to be a rich text data transfer?\n *\n * @return {boolean}\n */\n\n\n var _proto = DataTransfer.prototype;\n\n _proto.isRichText = function isRichText() {\n // If HTML is available, treat this data as rich text. This way, we avoid\n // using a pasted image if it is packaged with HTML -- this may occur with\n // pastes from MS Word, for example. However this is only rich text if\n // there's accompanying text.\n if (this.getHTML() && this.getText()) {\n return true;\n } // When an image is copied from a preview window, you end up with two\n // DataTransferItems one of which is a file's metadata as text. Skip those.\n\n\n if (this.isImage()) {\n return false;\n }\n\n return this.types.some(function (type) {\n return RICH_TEXT_TYPES[type];\n });\n };\n /**\n * Get raw text.\n *\n * @return {?string}\n */\n\n\n _proto.getText = function getText() {\n var text;\n\n if (this.data.getData) {\n if (!this.types.length) {\n text = this.data.getData('Text');\n } else if (this.types.indexOf('text/plain') != -1) {\n text = this.data.getData('text/plain');\n }\n }\n\n return text ? text.replace(CR_LF_REGEX, LF_ONLY) : null;\n };\n /**\n * Get HTML paste data\n *\n * @return {?string}\n */\n\n\n _proto.getHTML = function getHTML() {\n if (this.data.getData) {\n if (!this.types.length) {\n return this.data.getData('Text');\n } else if (this.types.indexOf('text/html') != -1) {\n return this.data.getData('text/html');\n }\n }\n };\n /**\n * Is this a link data transfer?\n *\n * @return {boolean}\n */\n\n\n _proto.isLink = function isLink() {\n return this.types.some(function (type) {\n return type.indexOf('Url') != -1 || type.indexOf('text/uri-list') != -1 || type.indexOf('text/x-moz-url');\n });\n };\n /**\n * Get a link url.\n *\n * @return {?string}\n */\n\n\n _proto.getLink = function getLink() {\n if (this.data.getData) {\n if (this.types.indexOf('text/x-moz-url') != -1) {\n var url = this.data.getData('text/x-moz-url').split('\\n');\n return url[0];\n }\n\n return this.types.indexOf('text/uri-list') != -1 ? this.data.getData('text/uri-list') : this.data.getData('url');\n }\n\n return null;\n };\n /**\n * Is this an image data transfer?\n *\n * @return {boolean}\n */\n\n\n _proto.isImage = function isImage() {\n var isImage = this.types.some(function (type) {\n // Firefox will have a type of application/x-moz-file for images during\n // dragging\n return type.indexOf('application/x-moz-file') != -1;\n });\n\n if (isImage) {\n return true;\n }\n\n var items = this.getFiles();\n\n for (var i = 0; i < items.length; i++) {\n var type = items[i].type;\n\n if (!PhotosMimeType.isImage(type)) {\n return false;\n }\n }\n\n return true;\n };\n\n _proto.getCount = function getCount() {\n if (this.data.hasOwnProperty('items')) {\n return this.data.items.length;\n } else if (this.data.hasOwnProperty('mozItemCount')) {\n return this.data.mozItemCount;\n } else if (this.data.files) {\n return this.data.files.length;\n }\n\n return null;\n };\n /**\n * Get files.\n *\n * @return {array}\n */\n\n\n _proto.getFiles = function getFiles() {\n if (this.data.items) {\n // createArrayFromMixed doesn't properly handle DataTransferItemLists.\n return Array.prototype.slice.call(this.data.items).map(getFileFromDataTransfer).filter(emptyFunction.thatReturnsArgument);\n } else if (this.data.files) {\n return Array.prototype.slice.call(this.data.files);\n } else {\n return [];\n }\n };\n /**\n * Are there any files to fetch?\n *\n * @return {boolean}\n */\n\n\n _proto.hasFiles = function hasFiles() {\n return this.getFiles().length > 0;\n };\n\n return DataTransfer;\n}();\n\nmodule.exports = DataTransfer;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nmodule.exports = {\n BACKSPACE: 8,\n TAB: 9,\n RETURN: 13,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46,\n COMMA: 188,\n PERIOD: 190,\n A: 65,\n Z: 90,\n ZERO: 48,\n NUMPAD_0: 96,\n NUMPAD_9: 105\n};","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nvar PhotosMimeType = {\n isImage: function isImage(mimeString) {\n return getParts(mimeString)[0] === 'image';\n },\n isJpeg: function isJpeg(mimeString) {\n var parts = getParts(mimeString);\n return PhotosMimeType.isImage(mimeString) && ( // see http://fburl.com/10972194\n parts[1] === 'jpeg' || parts[1] === 'pjpeg');\n }\n};\n\nfunction getParts(mimeString) {\n return mimeString.split('/');\n}\n\nmodule.exports = PhotosMimeType;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * @param {DOMElement} element\n * @param {DOMDocument} doc\n * @return {boolean}\n */\nfunction _isViewportScrollElement(element, doc) {\n return !!doc && (element === doc.documentElement || element === doc.body);\n}\n/**\n * Scroll Module. This class contains 4 simple static functions\n * to be used to access Element.scrollTop/scrollLeft properties.\n * To solve the inconsistencies between browsers when either\n * document.body or document.documentElement is supplied,\n * below logic will be used to alleviate the issue:\n *\n * 1. If 'element' is either 'document.body' or 'document.documentElement,\n * get whichever element's 'scroll{Top,Left}' is larger.\n * 2. If 'element' is either 'document.body' or 'document.documentElement',\n * set the 'scroll{Top,Left}' on both elements.\n */\n\n\nvar Scroll = {\n /**\n * @param {DOMElement} element\n * @return {number}\n */\n getTop: function getTop(element) {\n var doc = element.ownerDocument;\n return _isViewportScrollElement(element, doc) ? // In practice, they will either both have the same value,\n // or one will be zero and the other will be the scroll position\n // of the viewport. So we can use `X || Y` instead of `Math.max(X, Y)`\n doc.body.scrollTop || doc.documentElement.scrollTop : element.scrollTop;\n },\n\n /**\n * @param {DOMElement} element\n * @param {number} newTop\n */\n setTop: function setTop(element, newTop) {\n var doc = element.ownerDocument;\n\n if (_isViewportScrollElement(element, doc)) {\n doc.body.scrollTop = doc.documentElement.scrollTop = newTop;\n } else {\n element.scrollTop = newTop;\n }\n },\n\n /**\n * @param {DOMElement} element\n * @return {number}\n */\n getLeft: function getLeft(element) {\n var doc = element.ownerDocument;\n return _isViewportScrollElement(element, doc) ? doc.body.scrollLeft || doc.documentElement.scrollLeft : element.scrollLeft;\n },\n\n /**\n * @param {DOMElement} element\n * @param {number} newLeft\n */\n setLeft: function setLeft(element, newLeft) {\n var doc = element.ownerDocument;\n\n if (_isViewportScrollElement(element, doc)) {\n doc.body.scrollLeft = doc.documentElement.scrollLeft = newLeft;\n } else {\n element.scrollLeft = newLeft;\n }\n }\n};\nmodule.exports = Scroll;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar getStyleProperty = require(\"./getStyleProperty\");\n/**\n * @param {DOMNode} element [description]\n * @param {string} name Overflow style property name.\n * @return {boolean} True if the supplied ndoe is scrollable.\n */\n\n\nfunction _isNodeScrollable(element, name) {\n var overflow = Style.get(element, name);\n return overflow === 'auto' || overflow === 'scroll';\n}\n/**\n * Utilities for querying and mutating style properties.\n */\n\n\nvar Style = {\n /**\n * Gets the style property for the supplied node. This will return either the\n * computed style, if available, or the declared style.\n *\n * @param {DOMNode} node\n * @param {string} name Style property name.\n * @return {?string} Style property value.\n */\n get: getStyleProperty,\n\n /**\n * Determines the nearest ancestor of a node that is scrollable.\n *\n * NOTE: This can be expensive if used repeatedly or on a node nested deeply.\n *\n * @param {?DOMNode} node Node from which to start searching.\n * @return {?DOMWindow|DOMElement} Scroll parent of the supplied node.\n */\n getScrollParent: function getScrollParent(node) {\n if (!node) {\n return null;\n }\n\n var ownerDocument = node.ownerDocument;\n\n while (node && node !== ownerDocument.body) {\n if (_isNodeScrollable(node, 'overflow') || _isNodeScrollable(node, 'overflowY') || _isNodeScrollable(node, 'overflowX')) {\n return node;\n }\n\n node = node.parentNode;\n }\n\n return ownerDocument.defaultView || ownerDocument.parentWindow;\n }\n};\nmodule.exports = Style;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * @stub\n * \n */\n'use strict'; // \\u00a1-\\u00b1\\u00b4-\\u00b8\\u00ba\\u00bb\\u00bf\n// is latin supplement punctuation except fractions and superscript\n// numbers\n// \\u2010-\\u2027\\u2030-\\u205e\n// is punctuation from the general punctuation block:\n// weird quotes, commas, bullets, dashes, etc.\n// \\u30fb\\u3001\\u3002\\u3008-\\u3011\\u3014-\\u301f\n// is CJK punctuation\n// \\uff1a-\\uff1f\\uff01-\\uff0f\\uff3b-\\uff40\\uff5b-\\uff65\n// is some full-width/half-width punctuation\n// \\u2E2E\\u061f\\u066a-\\u066c\\u061b\\u060c\\u060d\\uFD3e\\uFD3F\n// is some Arabic punctuation marks\n// \\u1801\\u0964\\u104a\\u104b\n// is misc. other language punctuation marks\n\nvar PUNCTUATION = '[.,+*?$|#{}()\\'\\\\^\\\\-\\\\[\\\\]\\\\\\\\\\\\/!@%\"~=<>_:;' + \"\\u30FB\\u3001\\u3002\\u3008-\\u3011\\u3014-\\u301F\\uFF1A-\\uFF1F\\uFF01-\\uFF0F\" + \"\\uFF3B-\\uFF40\\uFF5B-\\uFF65\\u2E2E\\u061F\\u066A-\\u066C\\u061B\\u060C\\u060D\" + \"\\uFD3E\\uFD3F\\u1801\\u0964\\u104A\\u104B\\u2010-\\u2027\\u2030-\\u205E\" + \"\\xA1-\\xB1\\xB4-\\xB8\\xBA\\xBB\\xBF]\";\nmodule.exports = {\n getPunctuation: function getPunctuation() {\n return PUNCTUATION;\n }\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n'use strict';\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar URI =\n/*#__PURE__*/\nfunction () {\n function URI(uri) {\n _defineProperty(this, \"_uri\", void 0);\n\n this._uri = uri;\n }\n\n var _proto = URI.prototype;\n\n _proto.toString = function toString() {\n return this._uri;\n };\n\n return URI;\n}();\n\nmodule.exports = URI;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/**\n * Basic (stateless) API for text direction detection\n *\n * Part of our implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n'use strict';\n\nvar UnicodeBidiDirection = require(\"./UnicodeBidiDirection\");\n\nvar invariant = require(\"./invariant\");\n\n/**\n * RegExp ranges of characters with a *Strong* Bidi_Class value.\n *\n * Data is based on DerivedBidiClass.txt in UCD version 7.0.0.\n *\n * NOTE: For performance reasons, we only support Unicode's\n * Basic Multilingual Plane (BMP) for now.\n */\nvar RANGE_BY_BIDI_TYPE = {\n L: \"A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u01BA\\u01BB\" + \"\\u01BC-\\u01BF\\u01C0-\\u01C3\\u01C4-\\u0293\\u0294\\u0295-\\u02AF\\u02B0-\\u02B8\" + \"\\u02BB-\\u02C1\\u02D0-\\u02D1\\u02E0-\\u02E4\\u02EE\\u0370-\\u0373\\u0376-\\u0377\" + \"\\u037A\\u037B-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\" + \"\\u03A3-\\u03F5\\u03F7-\\u0481\\u0482\\u048A-\\u052F\\u0531-\\u0556\\u0559\" + \"\\u055A-\\u055F\\u0561-\\u0587\\u0589\\u0903\\u0904-\\u0939\\u093B\\u093D\" + \"\\u093E-\\u0940\\u0949-\\u094C\\u094E-\\u094F\\u0950\\u0958-\\u0961\\u0964-\\u0965\" + \"\\u0966-\\u096F\\u0970\\u0971\\u0972-\\u0980\\u0982-\\u0983\\u0985-\\u098C\" + \"\\u098F-\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\" + \"\\u09BE-\\u09C0\\u09C7-\\u09C8\\u09CB-\\u09CC\\u09CE\\u09D7\\u09DC-\\u09DD\" + \"\\u09DF-\\u09E1\\u09E6-\\u09EF\\u09F0-\\u09F1\\u09F4-\\u09F9\\u09FA\\u0A03\" + \"\\u0A05-\\u0A0A\\u0A0F-\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32-\\u0A33\" + \"\\u0A35-\\u0A36\\u0A38-\\u0A39\\u0A3E-\\u0A40\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\" + \"\\u0A72-\\u0A74\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\" + \"\\u0AB2-\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0ABE-\\u0AC0\\u0AC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u0D4A-\\u0D4C\\u0D4E\\u0D57\\u0D60-\\u0D61\" + \"\\u0D66-\\u0D6F\\u0D70-\\u0D75\\u0D79\\u0D7A-\\u0D7F\\u0D82-\\u0D83\\u0D85-\\u0D96\" + \"\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\" + \"\\u0DE6-\\u0DEF\\u0DF2-\\u0DF3\\u0DF4\\u0E01-\\u0E30\\u0E32-\\u0E33\\u0E40-\\u0E45\" + \"\\u0E46\\u0E4F\\u0E50-\\u0E59\\u0E5A-\\u0E5B\\u0E81-\\u0E82\\u0E84\\u0E87-\\u0E88\" + \"\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\" + \"\\u0EAA-\\u0EAB\\u0EAD-\\u0EB0\\u0EB2-\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\" + \"\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F01-\\u0F03\\u0F04-\\u0F12\\u0F13\\u0F14\" + \"\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F20-\\u0F29\\u0F2A-\\u0F33\\u0F34\\u0F36\\u0F38\" + \"\\u0F3E-\\u0F3F\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F7F\\u0F85\\u0F88-\\u0F8C\" + \"\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FCF\\u0FD0-\\u0FD4\\u0FD5-\\u0FD8\" + \"\\u0FD9-\\u0FDA\\u1000-\\u102A\\u102B-\\u102C\\u1031\\u1038\\u103B-\\u103C\\u103F\" + \"\\u1040-\\u1049\\u104A-\\u104F\\u1050-\\u1055\\u1056-\\u1057\\u105A-\\u105D\\u1061\" + \"\\u1062-\\u1064\\u1065-\\u1066\\u1067-\\u106D\\u106E-\\u1070\\u1075-\\u1081\" + \"\\u1083-\\u1084\\u1087-\\u108C\\u108E\\u108F\\u1090-\\u1099\\u109A-\\u109C\" + \"\\u109E-\\u109F\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FB\\u10FC\" + \"\\u10FD-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\" + \"\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\" + \"\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1360-\\u1368\" + \"\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166D-\\u166E\" + \"\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EB-\\u16ED\\u16EE-\\u16F0\" + \"\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1735-\\u1736\" + \"\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17B6\\u17BE-\\u17C5\" + \"\\u17C7-\\u17C8\\u17D4-\\u17D6\\u17D7\\u17D8-\\u17DA\\u17DC\\u17E0-\\u17E9\" + \"\\u1810-\\u1819\\u1820-\\u1842\\u1843\\u1844-\\u1877\\u1880-\\u18A8\\u18AA\" + \"\\u18B0-\\u18F5\\u1900-\\u191E\\u1923-\\u1926\\u1929-\\u192B\\u1930-\\u1931\" + \"\\u1933-\\u1938\\u1946-\\u194F\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\" + \"\\u19B0-\\u19C0\\u19C1-\\u19C7\\u19C8-\\u19C9\\u19D0-\\u19D9\\u19DA\\u1A00-\\u1A16\" + \"\\u1A19-\\u1A1A\\u1A1E-\\u1A1F\\u1A20-\\u1A54\\u1A55\\u1A57\\u1A61\\u1A63-\\u1A64\" + \"\\u1A6D-\\u1A72\\u1A80-\\u1A89\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u212A-\\u212D\\u212F-\\u2134\\u2135-\\u2138\\u2139\" + \"\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u214F\\u2160-\\u2182\\u2183-\\u2184\" + \"\\u2185-\\u2188\\u2336-\\u237A\\u2395\\u249C-\\u24E9\\u26AC\\u2800-\\u28FF\" + \"\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C7B\\u2C7C-\\u2C7D\\u2C7E-\\u2CE4\" + \"\\u2CEB-\\u2CEE\\u2CF2-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\" + \"\\u2D70\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\" + \"\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005\\u3006\\u3007\" + \"\\u3021-\\u3029\\u302E-\\u302F\\u3031-\\u3035\\u3038-\\u303A\\u303B\\u303C\" + \"\\u3041-\\u3096\\u309D-\\u309E\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FE\\u30FF\" + \"\\u3105-\\u312D\\u3131-\\u318E\\u3190-\\u3191\\u3192-\\u3195\\u3196-\\u319F\" + \"\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3200-\\u321C\\u3220-\\u3229\\u322A-\\u3247\" + \"\\u3248-\\u324F\\u3260-\\u327B\\u327F\\u3280-\\u3289\\u328A-\\u32B0\\u32C0-\\u32CB\" + \"\\u32D0-\\u32FE\\u3300-\\u3376\\u337B-\\u33DD\\u33E0-\\u33FE\\u3400-\\u4DB5\" + \"\\u4E00-\\u9FCC\\uA000-\\uA014\\uA015\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA4F8-\\uA4FD\" + \"\\uA4FE-\\uA4FF\\uA500-\\uA60B\\uA60C\\uA610-\\uA61F\\uA620-\\uA629\\uA62A-\\uA62B\" + \"\\uA640-\\uA66D\\uA66E\\uA680-\\uA69B\\uA69C-\\uA69D\\uA6A0-\\uA6E5\\uA6E6-\\uA6EF\" + \"\\uA6F2-\\uA6F7\\uA722-\\uA76F\\uA770\\uA771-\\uA787\\uA789-\\uA78A\\uA78B-\\uA78E\" + \"\\uA790-\\uA7AD\\uA7B0-\\uA7B1\\uA7F7\\uA7F8-\\uA7F9\\uA7FA\\uA7FB-\\uA801\" + \"\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA823-\\uA824\\uA827\\uA830-\\uA835\" + \"\\uA836-\\uA837\\uA840-\\uA873\\uA880-\\uA881\\uA882-\\uA8B3\\uA8B4-\\uA8C3\" + \"\\uA8CE-\\uA8CF\\uA8D0-\\uA8D9\\uA8F2-\\uA8F7\\uA8F8-\\uA8FA\\uA8FB\\uA900-\\uA909\" + \"\\uA90A-\\uA925\\uA92E-\\uA92F\\uA930-\\uA946\\uA952-\\uA953\\uA95F\\uA960-\\uA97C\" + \"\\uA983\\uA984-\\uA9B2\\uA9B4-\\uA9B5\\uA9BA-\\uA9BB\\uA9BD-\\uA9C0\\uA9C1-\\uA9CD\" + \"\\uA9CF\\uA9D0-\\uA9D9\\uA9DE-\\uA9DF\\uA9E0-\\uA9E4\\uA9E6\\uA9E7-\\uA9EF\" + \"\\uA9F0-\\uA9F9\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA2F-\\uAA30\\uAA33-\\uAA34\" + \"\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAA5F\\uAA60-\\uAA6F\" + \"\\uAA70\\uAA71-\\uAA76\\uAA77-\\uAA79\\uAA7A\\uAA7B\\uAA7D\\uAA7E-\\uAAAF\\uAAB1\" + \"\\uAAB5-\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADC\\uAADD\\uAADE-\\uAADF\" + \"\\uAAE0-\\uAAEA\\uAAEB\\uAAEE-\\uAAEF\\uAAF0-\\uAAF1\\uAAF2\\uAAF3-\\uAAF4\\uAAF5\" + \"\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\" + \"\\uAB30-\\uAB5A\\uAB5B\\uAB5C-\\uAB5F\\uAB64-\\uAB65\\uABC0-\\uABE2\\uABE3-\\uABE4\" + \"\\uABE6-\\uABE7\\uABE9-\\uABEA\\uABEB\\uABEC\\uABF0-\\uABF9\\uAC00-\\uD7A3\" + \"\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uE000-\\uF8FF\\uF900-\\uFA6D\\uFA70-\\uFAD9\" + \"\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFF6F\\uFF70\" + \"\\uFF71-\\uFF9D\\uFF9E-\\uFF9F\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\" + \"\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\",\n R: \"\\u0590\\u05BE\\u05C0\\u05C3\\u05C6\\u05C8-\\u05CF\\u05D0-\\u05EA\\u05EB-\\u05EF\" + \"\\u05F0-\\u05F2\\u05F3-\\u05F4\\u05F5-\\u05FF\\u07C0-\\u07C9\\u07CA-\\u07EA\" + \"\\u07F4-\\u07F5\\u07FA\\u07FB-\\u07FF\\u0800-\\u0815\\u081A\\u0824\\u0828\" + \"\\u082E-\\u082F\\u0830-\\u083E\\u083F\\u0840-\\u0858\\u085C-\\u085D\\u085E\" + \"\\u085F-\\u089F\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB37\\uFB38-\\uFB3C\" + \"\\uFB3D\\uFB3E\\uFB3F\\uFB40-\\uFB41\\uFB42\\uFB43-\\uFB44\\uFB45\\uFB46-\\uFB4F\",\n AL: \"\\u0608\\u060B\\u060D\\u061B\\u061C\\u061D\\u061E-\\u061F\\u0620-\\u063F\\u0640\" + \"\\u0641-\\u064A\\u066D\\u066E-\\u066F\\u0671-\\u06D3\\u06D4\\u06D5\\u06E5-\\u06E6\" + \"\\u06EE-\\u06EF\\u06FA-\\u06FC\\u06FD-\\u06FE\\u06FF\\u0700-\\u070D\\u070E\\u070F\" + \"\\u0710\\u0712-\\u072F\\u074B-\\u074C\\u074D-\\u07A5\\u07B1\\u07B2-\\u07BF\" + \"\\u08A0-\\u08B2\\u08B3-\\u08E3\\uFB50-\\uFBB1\\uFBB2-\\uFBC1\\uFBC2-\\uFBD2\" + \"\\uFBD3-\\uFD3D\\uFD40-\\uFD4F\\uFD50-\\uFD8F\\uFD90-\\uFD91\\uFD92-\\uFDC7\" + \"\\uFDC8-\\uFDCF\\uFDF0-\\uFDFB\\uFDFC\\uFDFE-\\uFDFF\\uFE70-\\uFE74\\uFE75\" + \"\\uFE76-\\uFEFC\\uFEFD-\\uFEFE\"\n};\nvar REGEX_STRONG = new RegExp('[' + RANGE_BY_BIDI_TYPE.L + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']');\nvar REGEX_RTL = new RegExp('[' + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']');\n/**\n * Returns the first strong character (has Bidi_Class value of L, R, or AL).\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @return A character with strong bidi direction, or null if not found\n */\n\nfunction firstStrongChar(str) {\n var match = REGEX_STRONG.exec(str);\n return match == null ? null : match[0];\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL).\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @return The resolved direction\n */\n\n\nfunction firstStrongCharDir(str) {\n var strongChar = firstStrongChar(str);\n\n if (strongChar == null) {\n return UnicodeBidiDirection.NEUTRAL;\n }\n\n return REGEX_RTL.exec(strongChar) ? UnicodeBidiDirection.RTL : UnicodeBidiDirection.LTR;\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL), or a fallback\n * direction, if no strong character is found.\n *\n * This function is supposed to be used in respect to Higher-Level Protocol\n * rule HL1. (http://www.unicode.org/reports/tr9/#HL1)\n *\n * @param str A text block; e.g. paragraph, table cell, tag\n * @param fallback Fallback direction, used if no strong direction detected\n * for the block (default = NEUTRAL)\n * @return The resolved direction\n */\n\n\nfunction resolveBlockDir(str, fallback) {\n fallback = fallback || UnicodeBidiDirection.NEUTRAL;\n\n if (!str.length) {\n return fallback;\n }\n\n var blockDir = firstStrongCharDir(str);\n return blockDir === UnicodeBidiDirection.NEUTRAL ? fallback : blockDir;\n}\n/**\n * Returns the direction of a block of text, based on the direction of its\n * first strong character (has Bidi_Class value of L, R, or AL), or a fallback\n * direction, if no strong character is found.\n *\n * NOTE: This function is similar to resolveBlockDir(), but uses the global\n * direction as the fallback, so it *always* returns a Strong direction,\n * making it useful for integration in places that you need to make the final\n * decision, like setting some CSS class.\n *\n * This function is supposed to be used in respect to Higher-Level Protocol\n * rule HL1. (http://www.unicode.org/reports/tr9/#HL1)\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return The resolved Strong direction\n */\n\n\nfunction getDirection(str, strongFallback) {\n if (!strongFallback) {\n strongFallback = UnicodeBidiDirection.getGlobalDir();\n }\n\n !UnicodeBidiDirection.isStrong(strongFallback) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Fallback direction must be a strong direction') : invariant(false) : void 0;\n return resolveBlockDir(str, strongFallback);\n}\n/**\n * Returns true if getDirection(arguments...) returns LTR.\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return True if the resolved direction is LTR\n */\n\n\nfunction isDirectionLTR(str, strongFallback) {\n return getDirection(str, strongFallback) === UnicodeBidiDirection.LTR;\n}\n/**\n * Returns true if getDirection(arguments...) returns RTL.\n *\n * @param str A text block; e.g. paragraph, table cell\n * @param strongFallback Fallback direction, used if no strong direction\n * detected for the block (default = global direction)\n * @return True if the resolved direction is RTL\n */\n\n\nfunction isDirectionRTL(str, strongFallback) {\n return getDirection(str, strongFallback) === UnicodeBidiDirection.RTL;\n}\n\nvar UnicodeBidi = {\n firstStrongChar: firstStrongChar,\n firstStrongCharDir: firstStrongCharDir,\n resolveBlockDir: resolveBlockDir,\n getDirection: getDirection,\n isDirectionLTR: isDirectionLTR,\n isDirectionRTL: isDirectionRTL\n};\nmodule.exports = UnicodeBidi;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/**\n * Constants to represent text directionality\n *\n * Also defines a *global* direciton, to be used in bidi algorithms as a\n * default fallback direciton, when no better direction is found or provided.\n *\n * NOTE: Use `setGlobalDir()`, or update `initGlobalDir()`, to set the initial\n * global direction value based on the application.\n *\n * Part of the implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n'use strict';\n\nvar invariant = require(\"./invariant\");\n\nvar NEUTRAL = 'NEUTRAL'; // No strong direction\n\nvar LTR = 'LTR'; // Left-to-Right direction\n\nvar RTL = 'RTL'; // Right-to-Left direction\n\nvar globalDir = null; // == Helpers ==\n\n/**\n * Check if a directionality value is a Strong one\n */\n\nfunction isStrong(dir) {\n return dir === LTR || dir === RTL;\n}\n/**\n * Get string value to be used for `dir` HTML attribute or `direction` CSS\n * property.\n */\n\n\nfunction getHTMLDir(dir) {\n !isStrong(dir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`dir` must be a strong direction to be converted to HTML Direction') : invariant(false) : void 0;\n return dir === LTR ? 'ltr' : 'rtl';\n}\n/**\n * Get string value to be used for `dir` HTML attribute or `direction` CSS\n * property, but returns null if `dir` has same value as `otherDir`.\n * `null`.\n */\n\n\nfunction getHTMLDirIfDifferent(dir, otherDir) {\n !isStrong(dir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`dir` must be a strong direction to be converted to HTML Direction') : invariant(false) : void 0;\n !isStrong(otherDir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '`otherDir` must be a strong direction to be converted to HTML Direction') : invariant(false) : void 0;\n return dir === otherDir ? null : getHTMLDir(dir);\n} // == Global Direction ==\n\n/**\n * Set the global direction.\n */\n\n\nfunction setGlobalDir(dir) {\n globalDir = dir;\n}\n/**\n * Initialize the global direction\n */\n\n\nfunction initGlobalDir() {\n setGlobalDir(LTR);\n}\n/**\n * Get the global direction\n */\n\n\nfunction getGlobalDir() {\n if (!globalDir) {\n this.initGlobalDir();\n }\n\n !globalDir ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Global direction not set.') : invariant(false) : void 0;\n return globalDir;\n}\n\nvar UnicodeBidiDirection = {\n // Values\n NEUTRAL: NEUTRAL,\n LTR: LTR,\n RTL: RTL,\n // Helpers\n isStrong: isStrong,\n getHTMLDir: getHTMLDir,\n getHTMLDirIfDifferent: getHTMLDirIfDifferent,\n // Global Direction\n setGlobalDir: setGlobalDir,\n initGlobalDir: initGlobalDir,\n getGlobalDir: getGlobalDir\n};\nmodule.exports = UnicodeBidiDirection;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/**\n * Stateful API for text direction detection\n *\n * This class can be used in applications where you need to detect the\n * direction of a sequence of text blocks, where each direction shall be used\n * as the fallback direction for the next one.\n *\n * NOTE: A default direction, if not provided, is set based on the global\n * direction, as defined by `UnicodeBidiDirection`.\n *\n * == Example ==\n * ```\n * var UnicodeBidiService = require('UnicodeBidiService');\n *\n * var bidiService = new UnicodeBidiService();\n *\n * ...\n *\n * bidiService.reset();\n * for (var para in paragraphs) {\n * var dir = bidiService.getDirection(para);\n * ...\n * }\n * ```\n *\n * Part of our implementation of Unicode Bidirectional Algorithm (UBA)\n * Unicode Standard Annex #9 (UAX9)\n * http://www.unicode.org/reports/tr9/\n */\n'use strict';\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar UnicodeBidi = require(\"./UnicodeBidi\");\n\nvar UnicodeBidiDirection = require(\"./UnicodeBidiDirection\");\n\nvar invariant = require(\"./invariant\");\n\nvar UnicodeBidiService =\n/*#__PURE__*/\nfunction () {\n /**\n * Stateful class for paragraph direction detection\n *\n * @param defaultDir Default direction of the service\n */\n function UnicodeBidiService(defaultDir) {\n _defineProperty(this, \"_defaultDir\", void 0);\n\n _defineProperty(this, \"_lastDir\", void 0);\n\n if (!defaultDir) {\n defaultDir = UnicodeBidiDirection.getGlobalDir();\n } else {\n !UnicodeBidiDirection.isStrong(defaultDir) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Default direction must be a strong direction (LTR or RTL)') : invariant(false) : void 0;\n }\n\n this._defaultDir = defaultDir;\n this.reset();\n }\n /**\n * Reset the internal state\n *\n * Instead of creating a new instance, you can just reset() your instance\n * everytime you start a new loop.\n */\n\n\n var _proto = UnicodeBidiService.prototype;\n\n _proto.reset = function reset() {\n this._lastDir = this._defaultDir;\n };\n /**\n * Returns the direction of a block of text, and remembers it as the\n * fall-back direction for the next paragraph.\n *\n * @param str A text block, e.g. paragraph, table cell, tag\n * @return The resolved direction\n */\n\n\n _proto.getDirection = function getDirection(str) {\n this._lastDir = UnicodeBidi.getDirection(str, this._lastDir);\n return this._lastDir;\n };\n\n return UnicodeBidiService;\n}();\n\nmodule.exports = UnicodeBidiService;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/**\n * Unicode-enabled replacesments for basic String functions.\n *\n * All the functions in this module assume that the input string is a valid\n * UTF-16 encoding of a Unicode sequence. If it's not the case, the behavior\n * will be undefined.\n *\n * WARNING: Since this module is typechecks-enforced, you may find new bugs\n * when replacing normal String functions with ones provided here.\n */\n'use strict';\n\nvar invariant = require(\"./invariant\"); // These two ranges are consecutive so anything in [HIGH_START, LOW_END] is a\n// surrogate code unit.\n\n\nvar SURROGATE_HIGH_START = 0xD800;\nvar SURROGATE_HIGH_END = 0xDBFF;\nvar SURROGATE_LOW_START = 0xDC00;\nvar SURROGATE_LOW_END = 0xDFFF;\nvar SURROGATE_UNITS_REGEX = /[\\uD800-\\uDFFF]/;\n/**\n * @param {number} codeUnit A Unicode code-unit, in range [0, 0x10FFFF]\n * @return {boolean} Whether code-unit is in a surrogate (hi/low) range\n */\n\nfunction isCodeUnitInSurrogateRange(codeUnit) {\n return SURROGATE_HIGH_START <= codeUnit && codeUnit <= SURROGATE_LOW_END;\n}\n/**\n * Returns whether the two characters starting at `index` form a surrogate pair.\n * For example, given the string s = \"\\uD83D\\uDE0A\", (s, 0) returns true and\n * (s, 1) returns false.\n *\n * @param {string} str\n * @param {number} index\n * @return {boolean}\n */\n\n\nfunction isSurrogatePair(str, index) {\n !(0 <= index && index < str.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'isSurrogatePair: Invalid index %s for string length %s.', index, str.length) : invariant(false) : void 0;\n\n if (index + 1 === str.length) {\n return false;\n }\n\n var first = str.charCodeAt(index);\n var second = str.charCodeAt(index + 1);\n return SURROGATE_HIGH_START <= first && first <= SURROGATE_HIGH_END && SURROGATE_LOW_START <= second && second <= SURROGATE_LOW_END;\n}\n/**\n * @param {string} str Non-empty string\n * @return {boolean} True if the input includes any surrogate code units\n */\n\n\nfunction hasSurrogateUnit(str) {\n return SURROGATE_UNITS_REGEX.test(str);\n}\n/**\n * Return the length of the original Unicode character at given position in the\n * String by looking into the UTF-16 code unit; that is equal to 1 for any\n * non-surrogate characters in BMP ([U+0000..U+D7FF] and [U+E000, U+FFFF]); and\n * returns 2 for the hi/low surrogates ([U+D800..U+DFFF]), which are in fact\n * representing non-BMP characters ([U+10000..U+10FFFF]).\n *\n * Examples:\n * - '\\u0020' => 1\n * - '\\u3020' => 1\n * - '\\uD835' => 2\n * - '\\uD835\\uDDEF' => 2\n * - '\\uDDEF' => 2\n *\n * @param {string} str Non-empty string\n * @param {number} pos Position in the string to look for one code unit\n * @return {number} Number 1 or 2\n */\n\n\nfunction getUTF16Length(str, pos) {\n return 1 + isCodeUnitInSurrogateRange(str.charCodeAt(pos));\n}\n/**\n * Fully Unicode-enabled replacement for String#length\n *\n * @param {string} str Valid Unicode string\n * @return {number} The number of Unicode characters in the string\n */\n\n\nfunction strlen(str) {\n // Call the native functions if there's no surrogate char\n if (!hasSurrogateUnit(str)) {\n return str.length;\n }\n\n var len = 0;\n\n for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) {\n len++;\n }\n\n return len;\n}\n/**\n * Fully Unicode-enabled replacement for String#substr()\n *\n * @param {string} str Valid Unicode string\n * @param {number} start Location in Unicode sequence to begin extracting\n * @param {?number} length The number of Unicode characters to extract\n * (default: to the end of the string)\n * @return {string} Extracted sub-string\n */\n\n\nfunction substr(str, start, length) {\n start = start || 0;\n length = length === undefined ? Infinity : length || 0; // Call the native functions if there's no surrogate char\n\n if (!hasSurrogateUnit(str)) {\n return str.substr(start, length);\n } // Obvious cases\n\n\n var size = str.length;\n\n if (size <= 0 || start > size || length <= 0) {\n return '';\n } // Find the actual starting position\n\n\n var posA = 0;\n\n if (start > 0) {\n for (; start > 0 && posA < size; start--) {\n posA += getUTF16Length(str, posA);\n }\n\n if (posA >= size) {\n return '';\n }\n } else if (start < 0) {\n for (posA = size; start < 0 && 0 < posA; start++) {\n posA -= getUTF16Length(str, posA - 1);\n }\n\n if (posA < 0) {\n posA = 0;\n }\n } // Find the actual ending position\n\n\n var posB = size;\n\n if (length < size) {\n for (posB = posA; length > 0 && posB < size; length--) {\n posB += getUTF16Length(str, posB);\n }\n }\n\n return str.substring(posA, posB);\n}\n/**\n * Fully Unicode-enabled replacement for String#substring()\n *\n * @param {string} str Valid Unicode string\n * @param {number} start Location in Unicode sequence to begin extracting\n * @param {?number} end Location in Unicode sequence to end extracting\n * (default: end of the string)\n * @return {string} Extracted sub-string\n */\n\n\nfunction substring(str, start, end) {\n start = start || 0;\n end = end === undefined ? Infinity : end || 0;\n\n if (start < 0) {\n start = 0;\n }\n\n if (end < 0) {\n end = 0;\n }\n\n var length = Math.abs(end - start);\n start = start < end ? start : end;\n return substr(str, start, length);\n}\n/**\n * Get a list of Unicode code-points from a String\n *\n * @param {string} str Valid Unicode string\n * @return {array} A list of code-points in [0..0x10FFFF]\n */\n\n\nfunction getCodePoints(str) {\n var codePoints = [];\n\n for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) {\n codePoints.push(str.codePointAt(pos));\n }\n\n return codePoints;\n}\n\nvar UnicodeUtils = {\n getCodePoints: getCodePoints,\n getUTF16Length: getUTF16Length,\n hasSurrogateUnit: hasSurrogateUnit,\n isCodeUnitInSurrogateRange: isCodeUnitInSurrogateRange,\n isSurrogatePair: isSurrogatePair,\n strlen: strlen,\n substring: substring,\n substr: substr\n};\nmodule.exports = UnicodeUtils;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar UserAgentData = require(\"./UserAgentData\");\n\nvar VersionRange = require(\"./VersionRange\");\n\nvar mapObject = require(\"./mapObject\");\n\nvar memoizeStringOnly = require(\"./memoizeStringOnly\");\n/**\n * Checks to see whether `name` and `version` satisfy `query`.\n *\n * @param {string} name Name of the browser, device, engine or platform\n * @param {?string} version Version of the browser, engine or platform\n * @param {string} query Query of form \"Name [range expression]\"\n * @param {?function} normalizer Optional pre-processor for range expression\n * @return {boolean}\n */\n\n\nfunction compare(name, version, query, normalizer) {\n // check for exact match with no version\n if (name === query) {\n return true;\n } // check for non-matching names\n\n\n if (!query.startsWith(name)) {\n return false;\n } // full comparison with version\n\n\n var range = query.slice(name.length);\n\n if (version) {\n range = normalizer ? normalizer(range) : range;\n return VersionRange.contains(range, version);\n }\n\n return false;\n}\n/**\n * Normalizes `version` by stripping any \"NT\" prefix, but only on the Windows\n * platform.\n *\n * Mimics the stripping performed by the `UserAgentWindowsPlatform` PHP class.\n *\n * @param {string} version\n * @return {string}\n */\n\n\nfunction normalizePlatformVersion(version) {\n if (UserAgentData.platformName === 'Windows') {\n return version.replace(/^\\s*NT/, '');\n }\n\n return version;\n}\n/**\n * Provides client-side access to the authoritative PHP-generated User Agent\n * information supplied by the server.\n */\n\n\nvar UserAgent = {\n /**\n * Check if the User Agent browser matches `query`.\n *\n * `query` should be a string like \"Chrome\" or \"Chrome > 33\".\n *\n * Valid browser names include:\n *\n * - ACCESS NetFront\n * - AOL\n * - Amazon Silk\n * - Android\n * - BlackBerry\n * - BlackBerry PlayBook\n * - Chrome\n * - Chrome for iOS\n * - Chrome frame\n * - Facebook PHP SDK\n * - Facebook for iOS\n * - Firefox\n * - IE\n * - IE Mobile\n * - Mobile Safari\n * - Motorola Internet Browser\n * - Nokia\n * - Openwave Mobile Browser\n * - Opera\n * - Opera Mini\n * - Opera Mobile\n * - Safari\n * - UIWebView\n * - Unknown\n * - webOS\n * - etc...\n *\n * An authoritative list can be found in the PHP `BrowserDetector` class and\n * related classes in the same file (see calls to `new UserAgentBrowser` here:\n * https://fburl.com/50728104).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isBrowser: function isBrowser(query) {\n return compare(UserAgentData.browserName, UserAgentData.browserFullVersion, query);\n },\n\n /**\n * Check if the User Agent browser uses a 32 or 64 bit architecture.\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"32\" or \"64\".\n * @return {boolean}\n */\n isBrowserArchitecture: function isBrowserArchitecture(query) {\n return compare(UserAgentData.browserArchitecture, null, query);\n },\n\n /**\n * Check if the User Agent device matches `query`.\n *\n * `query` should be a string like \"iPhone\" or \"iPad\".\n *\n * Valid device names include:\n *\n * - Kindle\n * - Kindle Fire\n * - Unknown\n * - iPad\n * - iPhone\n * - iPod\n * - etc...\n *\n * An authoritative list can be found in the PHP `DeviceDetector` class and\n * related classes in the same file (see calls to `new UserAgentDevice` here:\n * https://fburl.com/50728332).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name\"\n * @return {boolean}\n */\n isDevice: function isDevice(query) {\n return compare(UserAgentData.deviceName, null, query);\n },\n\n /**\n * Check if the User Agent rendering engine matches `query`.\n *\n * `query` should be a string like \"WebKit\" or \"WebKit >= 537\".\n *\n * Valid engine names include:\n *\n * - Gecko\n * - Presto\n * - Trident\n * - WebKit\n * - etc...\n *\n * An authoritative list can be found in the PHP `RenderingEngineDetector`\n * class related classes in the same file (see calls to `new\n * UserAgentRenderingEngine` here: https://fburl.com/50728617).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isEngine: function isEngine(query) {\n return compare(UserAgentData.engineName, UserAgentData.engineVersion, query);\n },\n\n /**\n * Check if the User Agent platform matches `query`.\n *\n * `query` should be a string like \"Windows\" or \"iOS 5 - 6\".\n *\n * Valid platform names include:\n *\n * - Android\n * - BlackBerry OS\n * - Java ME\n * - Linux\n * - Mac OS X\n * - Mac OS X Calendar\n * - Mac OS X Internet Account\n * - Symbian\n * - SymbianOS\n * - Windows\n * - Windows Mobile\n * - Windows Phone\n * - iOS\n * - iOS Facebook Integration Account\n * - iOS Facebook Social Sharing UI\n * - webOS\n * - Chrome OS\n * - etc...\n *\n * An authoritative list can be found in the PHP `PlatformDetector` class and\n * related classes in the same file (see calls to `new UserAgentPlatform`\n * here: https://fburl.com/50729226).\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"Name [range expression]\"\n * @return {boolean}\n */\n isPlatform: function isPlatform(query) {\n return compare(UserAgentData.platformName, UserAgentData.platformFullVersion, query, normalizePlatformVersion);\n },\n\n /**\n * Check if the User Agent platform is a 32 or 64 bit architecture.\n *\n * @note Function results are memoized\n *\n * @param {string} query Query of the form \"32\" or \"64\".\n * @return {boolean}\n */\n isPlatformArchitecture: function isPlatformArchitecture(query) {\n return compare(UserAgentData.platformArchitecture, null, query);\n }\n};\nmodule.exports = mapObject(UserAgent, memoizeStringOnly);","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * Usage note:\n * This module makes a best effort to export the same data we would internally.\n * At Facebook we use a server-generated module that does the parsing and\n * exports the data for the client to use. We can't rely on a server-side\n * implementation in open source so instead we make use of an open source\n * library to do the heavy lifting and then make some adjustments as necessary.\n * It's likely there will be some differences. Some we can smooth over.\n * Others are going to be harder.\n */\n'use strict';\n\nvar UAParser = require(\"ua-parser-js\");\n\nvar UNKNOWN = 'Unknown';\nvar PLATFORM_MAP = {\n 'Mac OS': 'Mac OS X'\n};\n/**\n * Convert from UAParser platform name to what we expect.\n */\n\nfunction convertPlatformName(name) {\n return PLATFORM_MAP[name] || name;\n}\n/**\n * Get the version number in parts. This is very naive. We actually get major\n * version as a part of UAParser already, which is generally good enough, but\n * let's get the minor just in case.\n */\n\n\nfunction getBrowserVersion(version) {\n if (!version) {\n return {\n major: '',\n minor: ''\n };\n }\n\n var parts = version.split('.');\n return {\n major: parts[0],\n minor: parts[1]\n };\n}\n/**\n * Get the UA data fom UAParser and then convert it to the format we're\n * expecting for our APIS.\n */\n\n\nvar parser = new UAParser();\nvar results = parser.getResult(); // Do some conversion first.\n\nvar browserVersionData = getBrowserVersion(results.browser.version);\nvar uaData = {\n browserArchitecture: results.cpu.architecture || UNKNOWN,\n browserFullVersion: results.browser.version || UNKNOWN,\n browserMinorVersion: browserVersionData.minor || UNKNOWN,\n browserName: results.browser.name || UNKNOWN,\n browserVersion: results.browser.major || UNKNOWN,\n deviceName: results.device.model || UNKNOWN,\n engineName: results.engine.name || UNKNOWN,\n engineVersion: results.engine.version || UNKNOWN,\n platformArchitecture: results.cpu.architecture || UNKNOWN,\n platformName: convertPlatformName(results.os.name) || UNKNOWN,\n platformVersion: results.os.version || UNKNOWN,\n platformFullVersion: results.os.version || UNKNOWN\n};\nmodule.exports = uaData;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar invariant = require(\"./invariant\");\n\nvar componentRegex = /\\./;\nvar orRegex = /\\|\\|/;\nvar rangeRegex = /\\s+\\-\\s+/;\nvar modifierRegex = /^(<=|<|=|>=|~>|~|>|)?\\s*(.+)/;\nvar numericRegex = /^(\\d*)(.*)/;\n/**\n * Splits input `range` on \"||\" and returns true if any subrange matches\n * `version`.\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\nfunction checkOrExpression(range, version) {\n var expressions = range.split(orRegex);\n\n if (expressions.length > 1) {\n return expressions.some(function (range) {\n return VersionRange.contains(range, version);\n });\n } else {\n range = expressions[0].trim();\n return checkRangeExpression(range, version);\n }\n}\n/**\n * Splits input `range` on \" - \" (the surrounding whitespace is required) and\n * returns true if version falls between the two operands.\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\n\nfunction checkRangeExpression(range, version) {\n var expressions = range.split(rangeRegex);\n !(expressions.length > 0 && expressions.length <= 2) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'the \"-\" operator expects exactly 2 operands') : invariant(false) : void 0;\n\n if (expressions.length === 1) {\n return checkSimpleExpression(expressions[0], version);\n } else {\n var startVersion = expressions[0],\n endVersion = expressions[1];\n !(isSimpleVersion(startVersion) && isSimpleVersion(endVersion)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'operands to the \"-\" operator must be simple (no modifiers)') : invariant(false) : void 0;\n return checkSimpleExpression('>=' + startVersion, version) && checkSimpleExpression('<=' + endVersion, version);\n }\n}\n/**\n * Checks if `range` matches `version`. `range` should be a \"simple\" range (ie.\n * not a compound range using the \" - \" or \"||\" operators).\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n\n\nfunction checkSimpleExpression(range, version) {\n range = range.trim();\n\n if (range === '') {\n return true;\n }\n\n var versionComponents = version.split(componentRegex);\n\n var _getModifierAndCompon = getModifierAndComponents(range),\n modifier = _getModifierAndCompon.modifier,\n rangeComponents = _getModifierAndCompon.rangeComponents;\n\n switch (modifier) {\n case '<':\n return checkLessThan(versionComponents, rangeComponents);\n\n case '<=':\n return checkLessThanOrEqual(versionComponents, rangeComponents);\n\n case '>=':\n return checkGreaterThanOrEqual(versionComponents, rangeComponents);\n\n case '>':\n return checkGreaterThan(versionComponents, rangeComponents);\n\n case '~':\n case '~>':\n return checkApproximateVersion(versionComponents, rangeComponents);\n\n default:\n return checkEqual(versionComponents, rangeComponents);\n }\n}\n/**\n * Checks whether `a` is less than `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkLessThan(a, b) {\n return compareComponents(a, b) === -1;\n}\n/**\n * Checks whether `a` is less than or equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkLessThanOrEqual(a, b) {\n var result = compareComponents(a, b);\n return result === -1 || result === 0;\n}\n/**\n * Checks whether `a` is equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkEqual(a, b) {\n return compareComponents(a, b) === 0;\n}\n/**\n * Checks whether `a` is greater than or equal to `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkGreaterThanOrEqual(a, b) {\n var result = compareComponents(a, b);\n return result === 1 || result === 0;\n}\n/**\n * Checks whether `a` is greater than `b`.\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkGreaterThan(a, b) {\n return compareComponents(a, b) === 1;\n}\n/**\n * Checks whether `a` is \"reasonably close\" to `b` (as described in\n * https://www.npmjs.org/doc/misc/semver.html). For example, if `b` is \"1.3.1\"\n * then \"reasonably close\" is defined as \">= 1.3.1 and < 1.4\".\n *\n * @param {array} a\n * @param {array} b\n * @returns {boolean}\n */\n\n\nfunction checkApproximateVersion(a, b) {\n var lowerBound = b.slice();\n var upperBound = b.slice();\n\n if (upperBound.length > 1) {\n upperBound.pop();\n }\n\n var lastIndex = upperBound.length - 1;\n var numeric = parseInt(upperBound[lastIndex], 10);\n\n if (isNumber(numeric)) {\n upperBound[lastIndex] = numeric + 1 + '';\n }\n\n return checkGreaterThanOrEqual(a, lowerBound) && checkLessThan(a, upperBound);\n}\n/**\n * Extracts the optional modifier (<, <=, =, >=, >, ~, ~>) and version\n * components from `range`.\n *\n * For example, given `range` \">= 1.2.3\" returns an object with a `modifier` of\n * `\">=\"` and `components` of `[1, 2, 3]`.\n *\n * @param {string} range\n * @returns {object}\n */\n\n\nfunction getModifierAndComponents(range) {\n var rangeComponents = range.split(componentRegex);\n var matches = rangeComponents[0].match(modifierRegex);\n !matches ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'expected regex to match but it did not') : invariant(false) : void 0;\n return {\n modifier: matches[1],\n rangeComponents: [matches[2]].concat(rangeComponents.slice(1))\n };\n}\n/**\n * Determines if `number` is a number.\n *\n * @param {mixed} number\n * @returns {boolean}\n */\n\n\nfunction isNumber(number) {\n return !isNaN(number) && isFinite(number);\n}\n/**\n * Tests whether `range` is a \"simple\" version number without any modifiers\n * (\">\", \"~\" etc).\n *\n * @param {string} range\n * @returns {boolean}\n */\n\n\nfunction isSimpleVersion(range) {\n return !getModifierAndComponents(range).modifier;\n}\n/**\n * Zero-pads array `array` until it is at least `length` long.\n *\n * @param {array} array\n * @param {number} length\n */\n\n\nfunction zeroPad(array, length) {\n for (var i = array.length; i < length; i++) {\n array[i] = '0';\n }\n}\n/**\n * Normalizes `a` and `b` in preparation for comparison by doing the following:\n *\n * - zero-pads `a` and `b`\n * - marks any \"x\", \"X\" or \"*\" component in `b` as equivalent by zero-ing it out\n * in both `a` and `b`\n * - marks any final \"*\" component in `b` as a greedy wildcard by zero-ing it\n * and all of its successors in `a`\n *\n * @param {array} a\n * @param {array} b\n * @returns {array>}\n */\n\n\nfunction normalizeVersions(a, b) {\n a = a.slice();\n b = b.slice();\n zeroPad(a, b.length); // mark \"x\" and \"*\" components as equal\n\n for (var i = 0; i < b.length; i++) {\n var matches = b[i].match(/^[x*]$/i);\n\n if (matches) {\n b[i] = a[i] = '0'; // final \"*\" greedily zeros all remaining components\n\n if (matches[0] === '*' && i === b.length - 1) {\n for (var j = i; j < a.length; j++) {\n a[j] = '0';\n }\n }\n }\n }\n\n zeroPad(b, a.length);\n return [a, b];\n}\n/**\n * Returns the numerical -- not the lexicographical -- ordering of `a` and `b`.\n *\n * For example, `10-alpha` is greater than `2-beta`.\n *\n * @param {string} a\n * @param {string} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compareNumeric(a, b) {\n var aPrefix = a.match(numericRegex)[1];\n var bPrefix = b.match(numericRegex)[1];\n var aNumeric = parseInt(aPrefix, 10);\n var bNumeric = parseInt(bPrefix, 10);\n\n if (isNumber(aNumeric) && isNumber(bNumeric) && aNumeric !== bNumeric) {\n return compare(aNumeric, bNumeric);\n } else {\n return compare(a, b);\n }\n}\n/**\n * Returns the ordering of `a` and `b`.\n *\n * @param {string|number} a\n * @param {string|number} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compare(a, b) {\n !(typeof a === typeof b) ? process.env.NODE_ENV !== \"production\" ? invariant(false, '\"a\" and \"b\" must be of the same type') : invariant(false) : void 0;\n\n if (a > b) {\n return 1;\n } else if (a < b) {\n return -1;\n } else {\n return 0;\n }\n}\n/**\n * Compares arrays of version components.\n *\n * @param {array} a\n * @param {array} b\n * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,\n * or greater than `b`, respectively\n */\n\n\nfunction compareComponents(a, b) {\n var _normalizeVersions = normalizeVersions(a, b),\n aNormalized = _normalizeVersions[0],\n bNormalized = _normalizeVersions[1];\n\n for (var i = 0; i < bNormalized.length; i++) {\n var result = compareNumeric(aNormalized[i], bNormalized[i]);\n\n if (result) {\n return result;\n }\n }\n\n return 0;\n}\n\nvar VersionRange = {\n /**\n * Checks whether `version` satisfies the `range` specification.\n *\n * We support a subset of the expressions defined in\n * https://www.npmjs.org/doc/misc/semver.html:\n *\n * version Must match version exactly\n * =version Same as just version\n * >version Must be greater than version\n * >=version Must be greater than or equal to version\n * = 1.2.3 and < 1.3\"\n * ~>version Equivalent to ~version\n * 1.2.x Must match \"1.2.x\", where \"x\" is a wildcard that matches\n * anything\n * 1.2.* Similar to \"1.2.x\", but \"*\" in the trailing position is a\n * \"greedy\" wildcard, so will match any number of additional\n * components:\n * \"1.2.*\" will match \"1.2.1\", \"1.2.1.1\", \"1.2.1.1.1\" etc\n * * Any version\n * \"\" (Empty string) Same as *\n * v1 - v2 Equivalent to \">= v1 and <= v2\"\n * r1 || r2 Passes if either r1 or r2 are satisfied\n *\n * @param {string} range\n * @param {string} version\n * @returns {boolean}\n */\n contains: function contains(range, version) {\n return checkOrExpression(range.trim(), version.trim());\n }\n};\nmodule.exports = VersionRange;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar _hyphenPattern = /-(.)/g;\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\n\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar isTextNode = require(\"./isTextNode\");\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\n\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar invariant = require(\"./invariant\");\n/**\n * Convert array-like objects to arrays.\n *\n * This API assumes the caller knows the contents of the data type. For less\n * well defined inputs use createArrayFromMixed.\n *\n * @param {object|function|filelist} obj\n * @return {array}\n */\n\n\nfunction toArray(obj) {\n var length = obj.length; // Some browsers builtin objects can report typeof 'function' (e.g. NodeList\n // in old versions of Safari).\n\n !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;\n !(typeof length === 'number') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;\n !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;\n !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'toArray: Object can\\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; // Old IE doesn't give collections access to hasOwnProperty. Assume inputs\n // without method will throw during the slice call and skip straight to the\n // fallback.\n\n if (obj.hasOwnProperty) {\n try {\n return Array.prototype.slice.call(obj);\n } catch (e) {// IE < 9 does not support Array#slice on collections objects\n }\n } // Fall back to copying key by key. This assumes all keys have a value,\n // so will not preserve sparsely populated inputs.\n\n\n var ret = Array(length);\n\n for (var ii = 0; ii < length; ii++) {\n ret[ii] = obj[ii];\n }\n\n return ret;\n}\n/**\n * Perform a heuristic test to determine if an object is \"array-like\".\n *\n * A monk asked Joshu, a Zen master, \"Has a dog Buddha nature?\"\n * Joshu replied: \"Mu.\"\n *\n * This function determines if its argument has \"array nature\": it returns\n * true if the argument is an actual array, an `arguments' object, or an\n * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).\n *\n * It will return false for other array-like objects like Filelist.\n *\n * @param {*} obj\n * @return {boolean}\n */\n\n\nfunction hasArrayNature(obj) {\n return (// not null/false\n !!obj && ( // arrays are objects, NodeLists are functions in Safari\n typeof obj == 'object' || typeof obj == 'function') && // quacks like an array\n 'length' in obj && // not window\n !('setInterval' in obj) && // no DOM node should be considered an array-like\n // a 'select' element has 'length' and 'item' properties on IE8\n typeof obj.nodeType != 'number' && ( // a real array\n Array.isArray(obj) || // arguments\n 'callee' in obj || // HTMLCollection/NodeList\n 'item' in obj)\n );\n}\n/**\n * Ensure that the argument is an array by wrapping it in an array if it is not.\n * Creates a copy of the argument if it is already an array.\n *\n * This is mostly useful idiomatically:\n *\n * var createArrayFromMixed = require('createArrayFromMixed');\n *\n * function takesOneOrMoreThings(things) {\n * things = createArrayFromMixed(things);\n * ...\n * }\n *\n * This allows you to treat `things' as an array, but accept scalars in the API.\n *\n * If you need to convert an array-like object, like `arguments`, into an array\n * use toArray instead.\n *\n * @param {*} obj\n * @return {array}\n */\n\n\nfunction createArrayFromMixed(obj) {\n if (!hasArrayNature(obj)) {\n return [obj];\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else {\n return toArray(obj);\n }\n}\n\nmodule.exports = createArrayFromMixed;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * This function is used to mark string literals representing CSS class names\n * so that they can be transformed statically. This allows for modularization\n * and minification of CSS class names.\n *\n * In static_upstream, this function is actually implemented, but it should\n * eventually be replaced with something more descriptive, and the transform\n * that is used in the main stack should be ported for use elsewhere.\n *\n * @param string|object className to modularize, or an object of key/values.\n * In the object case, the values are conditions that\n * determine if the className keys should be included.\n * @param [string ...] Variable list of classNames in the string case.\n * @return string Renderable space-separated CSS className.\n */\nfunction cx(classNames) {\n if (typeof classNames == 'object') {\n return Object.keys(classNames).filter(function (className) {\n return classNames[className];\n }).map(replace).join(' ');\n }\n\n return Array.prototype.map.call(arguments, replace).join(' ');\n}\n\nfunction replace(str) {\n return str.replace(/\\//g, '-');\n}\n\nmodule.exports = cx;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/* eslint-disable fb-www/typeof-undefined */\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\nfunction getActiveElement(doc)\n/*?DOMElement*/\n{\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nmodule.exports = getActiveElement;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n'use strict';\n\nvar isWebkit = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('AppleWebKit') > -1;\n/**\n * Gets the element with the document scroll properties such as `scrollLeft` and\n * `scrollHeight`. This may differ across different browsers.\n *\n * NOTE: The return value can be null if the DOM is not yet ready.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\n\nfunction getDocumentScrollElement(doc) {\n doc = doc || document;\n\n if (doc.scrollingElement) {\n return doc.scrollingElement;\n }\n\n return !isWebkit && doc.compatMode === 'CSS1Compat' ? doc.documentElement : doc.body;\n}\n\nmodule.exports = getDocumentScrollElement;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar getElementRect = require(\"./getElementRect\");\n/**\n * Gets an element's position in pixels relative to the viewport. The returned\n * object represents the position of the element's top left corner.\n *\n * @param {DOMElement} element\n * @return {object}\n */\n\n\nfunction getElementPosition(element) {\n var rect = getElementRect(element);\n return {\n x: rect.left,\n y: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n}\n\nmodule.exports = getElementPosition;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar containsNode = require(\"./containsNode\");\n/**\n * Gets an element's bounding rect in pixels relative to the viewport.\n *\n * @param {DOMElement} elem\n * @return {object}\n */\n\n\nfunction getElementRect(elem) {\n var docElem = elem.ownerDocument.documentElement; // FF 2, Safari 3 and Opera 9.5- do not support getBoundingClientRect().\n // IE9- will throw if the element is not in the document.\n\n if (!('getBoundingClientRect' in elem) || !containsNode(docElem, elem)) {\n return {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n } // Subtracts clientTop/Left because IE8- added a 2px border to the\n // element (see http://fburl.com/1493213). IE 7 in\n // Quicksmode does not report clientLeft/clientTop so there\n // will be an unaccounted offset of 2px when in quirksmode\n\n\n var rect = elem.getBoundingClientRect();\n return {\n left: Math.round(rect.left) - docElem.clientLeft,\n right: Math.round(rect.right) - docElem.clientLeft,\n top: Math.round(rect.top) - docElem.clientTop,\n bottom: Math.round(rect.bottom) - docElem.clientTop\n };\n}\n\nmodule.exports = getElementRect;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n'use strict';\n\nvar getDocumentScrollElement = require(\"./getDocumentScrollElement\");\n\nvar getUnboundedScrollPosition = require(\"./getUnboundedScrollPosition\");\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are bounded. This means that if the scroll position is\n * negative or exceeds the element boundaries (which is possible using inertial\n * scrolling), you will get zero or the maximum scroll position, respectively.\n *\n * If you need the unbound scroll position, use `getUnboundedScrollPosition`.\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\n\nfunction getScrollPosition(scrollable) {\n var documentScrollElement = getDocumentScrollElement(scrollable.ownerDocument || scrollable.document);\n\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n scrollable = documentScrollElement;\n }\n\n var scrollPosition = getUnboundedScrollPosition(scrollable);\n var viewport = scrollable === documentScrollElement ? scrollable.ownerDocument.documentElement : scrollable;\n var xMax = scrollable.scrollWidth - viewport.clientWidth;\n var yMax = scrollable.scrollHeight - viewport.clientHeight;\n scrollPosition.x = Math.max(0, Math.min(scrollPosition.x, xMax));\n scrollPosition.y = Math.max(0, Math.min(scrollPosition.y, yMax));\n return scrollPosition;\n}\n\nmodule.exports = getScrollPosition;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar camelize = require(\"./camelize\");\n\nvar hyphenate = require(\"./hyphenate\");\n\nfunction asString(value)\n/*?string*/\n{\n return value == null ? value : String(value);\n}\n\nfunction getStyleProperty(\n/*DOMNode*/\nnode,\n/*string*/\nname)\n/*?string*/\n{\n var computedStyle; // W3C Standard\n\n if (window.getComputedStyle) {\n // In certain cases such as within an iframe in FF3, this returns null.\n computedStyle = window.getComputedStyle(node, null);\n\n if (computedStyle) {\n return asString(computedStyle.getPropertyValue(hyphenate(name)));\n }\n } // Safari\n\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n computedStyle = document.defaultView.getComputedStyle(node, null); // A Safari bug causes this to return null for `display: none` elements.\n\n if (computedStyle) {\n return asString(computedStyle.getPropertyValue(hyphenate(name)));\n }\n\n if (name === 'display') {\n return 'none';\n }\n } // Internet Explorer\n\n\n if (node.currentStyle) {\n if (name === 'float') {\n return asString(node.currentStyle.cssFloat || node.currentStyle.styleFloat);\n }\n\n return asString(node.currentStyle[camelize(name)]);\n }\n\n return asString(node.style && node.style[camelize(name)]);\n}\n\nmodule.exports = getStyleProperty;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n'use strict';\n/**\n * Gets the scroll position of the supplied element or window.\n *\n * The return values are unbounded, unlike `getScrollPosition`. This means they\n * may be negative or exceed the element boundaries (which is possible using\n * inertial scrolling).\n *\n * @param {DOMWindow|DOMElement} scrollable\n * @return {object} Map with `x` and `y` keys.\n */\n\nfunction getUnboundedScrollPosition(scrollable) {\n if (scrollable.Window && scrollable instanceof scrollable.Window) {\n return {\n x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,\n y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop\n };\n }\n\n return {\n x: scrollable.scrollLeft,\n y: scrollable.scrollTop\n };\n}\n\nmodule.exports = getUnboundedScrollPosition;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @typechecks\n */\nfunction getViewportWidth() {\n var width;\n\n if (document.documentElement) {\n width = document.documentElement.clientWidth;\n }\n\n if (!width && document.body) {\n width = document.body.clientWidth;\n }\n\n return width || 0;\n}\n\nfunction getViewportHeight() {\n var height;\n\n if (document.documentElement) {\n height = document.documentElement.clientHeight;\n }\n\n if (!height && document.body) {\n height = document.body.clientHeight;\n }\n\n return height || 0;\n}\n/**\n * Gets the viewport dimensions including any scrollbars.\n */\n\n\nfunction getViewportDimensions() {\n return {\n width: window.innerWidth || getViewportWidth(),\n height: window.innerHeight || getViewportHeight()\n };\n}\n/**\n * Gets the viewport dimensions excluding any scrollbars.\n */\n\n\ngetViewportDimensions.withoutScrollbars = function () {\n return {\n width: getViewportWidth(),\n height: getViewportHeight()\n };\n};\n\nmodule.exports = getViewportDimensions;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar _uppercasePattern = /([A-Z])/g;\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\n\nfunction hyphenate(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nmodule.exports = hyphenate;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n'use strict';\n\nvar validateFormat = process.env.NODE_ENV !== \"production\" ? function (format) {\n if (format === undefined) {\n throw new Error('invariant(...): Second argument must be a string.');\n }\n} : function (format) {};\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments to provide\n * information about what broke and what you were expecting.\n *\n * The invariant message will be stripped in production, but the invariant will\n * remain to ensure logic does not differ in production.\n */\n\nfunction invariant(condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return String(args[argIndex++]);\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // Skip invariant's own stack frame.\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM node.\n */\nfunction isNode(object) {\n var doc = object ? object.ownerDocument || object : document;\n var defaultView = doc.defaultView || window;\n return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));\n}\n\nmodule.exports = isNode;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\nvar isNode = require(\"./isNode\");\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM text node.\n */\n\n\nfunction isTextNode(object) {\n return isNode(object) && object.nodeType == 3;\n}\n\nmodule.exports = isTextNode;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @typechecks static-only\n */\n'use strict';\n/**\n * Combines multiple className strings into one.\n */\n\nfunction joinClasses(className) {\n var newClassName = className || '';\n var argLength = arguments.length;\n\n if (argLength > 1) {\n for (var index = 1; index < argLength; index++) {\n var nextClass = arguments[index];\n\n if (nextClass) {\n newClassName = (newClassName ? newClassName + ' ' : '') + nextClass;\n }\n }\n }\n\n return newClassName;\n}\n\nmodule.exports = joinClasses;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Executes the provided `callback` once for each enumerable own property in the\n * object and constructs a new object from the results. The `callback` is\n * invoked with three arguments:\n *\n * - the property value\n * - the property name\n * - the object being traversed\n *\n * Properties that are added after the call to `mapObject` will not be visited\n * by `callback`. If the values of existing properties are changed, the value\n * passed to `callback` will be the value at the time `mapObject` visits them.\n * Properties that are deleted before being visited are not visited.\n *\n * @grep function objectMap()\n * @grep function objMap()\n *\n * @param {?object} object\n * @param {function} callback\n * @param {*} context\n * @return {?object}\n */\n\nfunction mapObject(object, callback, context) {\n if (!object) {\n return null;\n }\n\n var result = {};\n\n for (var name in object) {\n if (hasOwnProperty.call(object, name)) {\n result[name] = callback.call(context, object[name], name, object);\n }\n }\n\n return result;\n}\n\nmodule.exports = mapObject;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @typechecks static-only\n */\n'use strict';\n/**\n * Memoizes the return value of a function that accepts one string argument.\n */\n\nfunction memoizeStringOnly(callback) {\n var cache = {};\n return function (string) {\n if (!cache.hasOwnProperty(string)) {\n cache[string] = callback.call(this, string);\n }\n\n return cache[string];\n };\n}\n\nmodule.exports = memoizeStringOnly;","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar nullthrows = function nullthrows(x) {\n if (x != null) {\n return x;\n }\n\n throw new Error(\"Got unexpected null or undefined\");\n};\n\nmodule.exports = nullthrows;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict'; // setimmediate adds setImmediate to the global. We want to make sure we export\n// the actual function.\n\nrequire(\"setimmediate\");\n\nmodule.exports = global.setImmediate;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyFunction = require(\"./emptyFunction\");\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nfunction printWarning(format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n}\n\nvar warning = process.env.NODE_ENV !== \"production\" ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : emptyFunction;\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a