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S9P,EAAS+P,GAAK5C,EAAU,CAAChC,EAAMG,WAOvC,IAAcR,GAEgBnnD,EAAOC,UACvCA,EAAUD,EAAOC,QAAUo8C,GAE/Bp8C,EAAQo8C,SAAWA,GAGiB,QAChC,aACI,OAAOA,CACV,2CACa/kD,IAAW6vD,IAEzB7vD,EAAO+kD,SAAWA,GAS1B,IAAIgQ,SAAW/0D,IAAW6vD,IAAe7vD,EAAOg1D,QAAUh1D,EAAOi1D,OACjE,GAAIF,IAAMA,EAAEtC,GAAI,CACZ,IAAIyC,GAAS,IAAInQ,EACjBgQ,EAAEtC,GAAKyC,GAAOhQ,YACd6P,EAAEtC,GAAG55D,IAAM,WACP,OAAOq8D,GAAOT,OAClB,EACAM,EAAEtC,GAAGnvD,IAAM,SAAUmvD,GACjByC,GAAOR,MAAMjC,GACb,IAAIj8D,EAAS0+D,GAAOhQ,YACpB,IAAK,IAAIiQ,KAAQ3+D,EACbu+D,EAAEtC,GAAG0C,GAAQ3+D,EAAO2+D,EAE5B,CACJ,CAEH,CAv6BD,CAu6BqB,kBAAXn1D,OAAsBA,OAAS/Q,K","sources":["webpack://AYTM/./node_modules/@draft-js-plugins/buttons/node_modules/clsx/dist/clsx.m.js","webpack://AYTM/./node_modules/@draft-js-plugins/buttons/lib/index.esm.js","webpack://AYTM/./node_modules/@draft-js-plugins/editor/lib/index.esm.js","webpack://AYTM/./node_modules/@draft-js-plugins/inline-toolbar/lib/index.esm.js","webpack://AYTM/./node_modules/@draft-js-plugins/static-toolbar/lib/index.esm.js","webpack://AYTM/./node_modules/@draft-js-plugins/utils/lib/index.esm.js","webpack://AYTM/./node_modules/draft-js-single-line-plugin/esm/utils.js","webpack://AYTM/./node_modules/draft-js-single-line-plugin/esm/index.js","webpack://AYTM/./node_modules/draft-js/lib/AtomicBlockUtils.js","webpack://AYTM/./node_modules/draft-js/lib/BlockMapBuilder.js","webpack://AYTM/./node_modules/draft-js/lib/BlockTree.js","webpack://AYTM/./node_modules/draft-js/lib/CharacterMetadata.js","webpack://AYTM/./node_modules/draft-js/lib/CompositeDraftDecorator.js","webpack://AYTM/./node_modules/draft-js/lib/ContentBlock.js","webpack://AYTM/./node_modules/draft-js/lib/ContentBlockNode.js","webpack://AYTM/./node_modules/draft-js/lib/ContentState.js","webpack://AYTM/./node_modules/draft-js/lib/ContentStateInlineStyle.js","webpack://AYTM/./node_modules/draft-js/lib/DOMObserver.js","webpack://AYTM/./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js","webpack://AYTM/./node_modules/draft-js/lib/DefaultDraftInlineStyle.js","webpack://AYTM/./node_modules/draft-js/lib/Draft.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditor.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorBlock.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorBlockNode.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorCompositionHandler.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorContents-core.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorContents.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorDragHandler.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorEditHandler.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorFlushControlled.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorLeaf.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorNode.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorPlaceholder.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEditorTextNode.react.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEffects.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEntity.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEntityInstance.js","webpack://AYTM/./node_modules/draft-js/lib/DraftEntitySegments.js","webpack://AYTM/./node_modules/draft-js/lib/DraftJsDebugLogging.js","webpack://AYTM/./node_modules/draft-js/lib/DraftModifier.js","webpack://AYTM/./node_modules/draft-js/lib/DraftOffsetKey.js","webpack://AYTM/./node_modules/draft-js/lib/DraftPasteProcessor.js","webpack://AYTM/./node_modules/draft-js/lib/DraftRemovableWord.js","webpack://AYTM/./node_modules/draft-js/lib/DraftStringKey.js","webpack://AYTM/./node_modules/draft-js/lib/DraftTreeAdapter.js","webpack://AYTM/./node_modules/draft-js/lib/DraftTreeInvariants.js","webpack://AYTM/./node_modules/draft-js/lib/EditorBidiService.js","webpack://AYTM/./node_modules/draft-js/lib/EditorState.js","webpack://AYTM/./node_modules/draft-js/lib/KeyBindingUtil.js","webpack://AYTM/./node_modules/draft-js/lib/RichTextEditorUtil.js","webpack://AYTM/./node_modules/draft-js/lib/SecondaryClipboard.js","webpack://AYTM/./node_modules/draft-js/lib/SelectionState.js","webpack://AYTM/./node_modules/draft-js/lib/adjustBlockDepthForContentState.js","webpack://AYTM/./node_modules/draft-js/lib/applyEntityToContentBlock.js","webpack://AYTM/./node_modules/draft-js/lib/applyEntityToContentState.js","webpack://AYTM/./node_modules/draft-js/lib/convertFromDraftStateToRaw.js","webpack://AYTM/./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js","webpack://AYTM/./node_modules/draft-js/lib/convertFromRawToDraftState.js","webpack://AYTM/./node_modules/draft-js/lib/createCharacterList.js","webpack://AYTM/./node_modules/draft-js/lib/decodeEntityRanges.js","webpack://AYTM/./node_modules/draft-js/lib/decodeInlineStyleRanges.js","webpack://AYTM/./node_modules/draft-js/lib/draftKeyUtils.js","webpack://AYTM/./node_modules/draft-js/lib/editOnBeforeInput.js","webpack://AYTM/./node_modules/draft-js/lib/editOnBlur.js","webpack://AYTM/./node_modules/draft-js/lib/editOnCompositionStart.js","webpack://AYTM/./node_modules/draft-js/lib/editOnCopy.js","webpack://AYTM/./node_modules/draft-js/lib/editOnCut.js","webpack://AYTM/./node_modules/draft-js/lib/editOnDragOver.js","webpack://AYTM/./node_modules/draft-js/lib/editOnDragStart.js","webpack://AYTM/./node_modules/draft-js/lib/editOnFocus.js","webpack://AYTM/./node_modules/draft-js/lib/editOnInput.js","webpack://AYTM/./node_modules/draft-js/lib/editOnKeyDown.js","webpack://AYTM/./node_modules/draft-js/lib/editOnPaste.js","webpack://AYTM/./node_modules/draft-js/lib/editOnSelect.js","webpack://AYTM/./node_modules/draft-js/lib/encodeEntityRanges.js","webpack://AYTM/./node_modules/draft-js/lib/encodeInlineStyleRanges.js","webpack://AYTM/./node_modules/draft-js/lib/expandRangeToStartOfLine.js","webpack://AYTM/./node_modules/draft-js/lib/findAncestorOffsetKey.js","webpack://AYTM/./node_modules/draft-js/lib/findRangesImmutable.js","webpack://AYTM/./node_modules/draft-js/lib/generateRandomKey.js","webpack://AYTM/./node_modules/draft-js/lib/getCharacterRemovalRange.js","webpack://AYTM/./node_modules/draft-js/lib/getContentEditableContainer.js","webpack://AYTM/./node_modules/draft-js/lib/getContentStateFragment.js","webpack://AYTM/./node_modules/draft-js/lib/getCorrectDocumentFromNode.js","webpack://AYTM/./node_modules/draft-js/lib/getDefaultKeyBinding.js","webpack://AYTM/./node_modules/draft-js/lib/getDraftEditorSelection.js","webpack://AYTM/./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js","webpack://AYTM/./node_modules/draft-js/lib/getEntityKeyForSelection.js","webpack://AYTM/./node_modules/draft-js/lib/getFragmentFromSelection.js","webpack://AYTM/./node_modules/draft-js/lib/getNextDelimiterBlockKey.js","webpack://AYTM/./node_modules/draft-js/lib/getOwnObjectValues.js","webpack://AYTM/./node_modules/draft-js/lib/getRangeBoundingClientRect.js","webpack://AYTM/./node_modules/draft-js/lib/getRangeClientRects.js","webpack://AYTM/./node_modules/draft-js/lib/getRangesForDraftEntity.js","webpack://AYTM/./node_modules/draft-js/lib/getSafeBodyFromHTML.js","webpack://AYTM/./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js","webpack://AYTM/./node_modules/draft-js/lib/getTextContentFromFiles.js","webpack://AYTM/./node_modules/draft-js/lib/getUpdatedSelectionState.js","webpack://AYTM/./node_modules/draft-js/lib/getVisibleSelectionRect.js","webpack://AYTM/./node_modules/draft-js/lib/getWindowForNode.js","webpack://AYTM/./node_modules/draft-js/lib/gkx.js","webpack://AYTM/./node_modules/draft-js/lib/insertFragmentIntoContentState.js","webpack://AYTM/./node_modules/draft-js/lib/insertIntoList.js","webpack://AYTM/./node_modules/draft-js/lib/insertTextIntoContentState.js","webpack://AYTM/./node_modules/draft-js/lib/isElement.js","webpack://AYTM/./node_modules/draft-js/lib/isEventHandled.js","webpack://AYTM/./node_modules/draft-js/lib/isHTMLAnchorElement.js","webpack://AYTM/./node_modules/draft-js/lib/isHTMLBRElement.js","webpack://AYTM/./node_modules/draft-js/lib/isHTMLElement.js","webpack://AYTM/./node_modules/draft-js/lib/isHTMLImageElement.js","webpack://AYTM/./node_modules/draft-js/lib/isInstanceOfNode.js","webpack://AYTM/./node_modules/draft-js/lib/isSelectionAtLeafStart.js","webpack://AYTM/./node_modules/draft-js/lib/isSoftNewlineEvent.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandBackspaceWord.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandDeleteWord.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandInsertNewline.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandPlainBackspace.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandPlainDelete.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandTransposeCharacters.js","webpack://AYTM/./node_modules/draft-js/lib/keyCommandUndo.js","webpack://AYTM/./node_modules/draft-js/lib/modifyBlockForContentState.js","webpack://AYTM/./node_modules/draft-js/lib/moveBlockInContentState.js","webpack://AYTM/./node_modules/draft-js/lib/moveSelectionBackward.js","webpack://AYTM/./node_modules/draft-js/lib/moveSelectionForward.js","webpack://AYTM/./node_modules/draft-js/lib/randomizeBlockMapKeys.js","webpack://AYTM/./node_modules/draft-js/lib/removeEntitiesAtEdges.js","webpack://AYTM/./node_modules/draft-js/lib/removeRangeFromContentState.js","webpack://AYTM/./node_modules/draft-js/lib/removeTextWithStrategy.js","webpack://AYTM/./node_modules/draft-js/lib/sanitizeDraftText.js","webpack://AYTM/./node_modules/draft-js/lib/setDraftEditorSelection.js","webpack://AYTM/./node_modules/draft-js/lib/splitBlockInContentState.js","webpack://AYTM/./node_modules/draft-js/lib/splitTextIntoTextBlocks.js","webpack://AYTM/./node_modules/draft-js/lib/uuid.js","webpack://AYTM/./node_modules/fbjs/lib/DataTransfer.js","webpack://AYTM/./node_modules/fbjs/lib/Keys.js","webpack://AYTM/./node_modules/fbjs/lib/PhotosMimeType.js","webpack://AYTM/./node_modules/fbjs/lib/Scroll.js","webpack://AYTM/./node_modules/fbjs/lib/Style.js","webpack://AYTM/./node_modules/fbjs/lib/TokenizeUtil.js","webpack://AYTM/./node_modules/fbjs/lib/URI.js","webpack://AYTM/./node_modules/fbjs/lib/UnicodeBidi.js","webpack://AYTM/./node_modules/fbjs/lib/UnicodeBidiDirection.js","webpack://AYTM/./node_modules/fbjs/lib/UnicodeBidiService.js","webpack://AYTM/./node_modules/fbjs/lib/UnicodeUtils.js","webpack://AYTM/./node_modules/fbjs/lib/UserAgent.js","webpack://AYTM/./node_modules/fbjs/lib/UserAgentData.js","webpack://AYTM/./node_modules/fbjs/lib/VersionRange.js","webpack://AYTM/./node_modules/fbjs/lib/camelize.js","webpack://AYTM/./node_modules/fbjs/lib/containsNode.js","webpack://AYTM/./node_modules/fbjs/lib/createArrayFromMixed.js","webpack://AYTM/./node_modules/fbjs/lib/cx.js","webpack://AYTM/./node_modules/fbjs/lib/emptyFunction.js","webpack://AYTM/./node_modules/fbjs/lib/getActiveElement.js","webpack://AYTM/./node_modules/fbjs/lib/getDocumentScrollElement.js","webpack://AYTM/./node_modules/fbjs/lib/getElementPosition.js","webpack://AYTM/./node_modules/fbjs/lib/getElementRect.js","webpack://AYTM/./node_modules/fbjs/lib/getScrollPosition.js","webpack://AYTM/./node_modules/fbjs/lib/getStyleProperty.js","webpack://AYTM/./node_modules/fbjs/lib/getUnboundedScrollPosition.js","webpack://AYTM/./node_modules/fbjs/lib/getViewportDimensions.js","webpack://AYTM/./node_modules/fbjs/lib/hyphenate.js","webpack://AYTM/./node_modules/fbjs/lib/invariant.js","webpack://AYTM/./node_modules/fbjs/lib/isNode.js","webpack://AYTM/./node_modules/fbjs/lib/isTextNode.js","webpack://AYTM/./node_modules/fbjs/lib/joinClasses.js","webpack://AYTM/./node_modules/fbjs/lib/mapObject.js","webpack://AYTM/./node_modules/fbjs/lib/memoizeStringOnly.js","webpack://AYTM/./node_modules/fbjs/lib/nullthrows.js","webpack://AYTM/./node_modules/fbjs/lib/setImmediate.js","webpack://AYTM/./node_modules/fbjs/lib/warning.js","webpack://AYTM/./node_modules/rxjs/_esm5/internal/operators/takeUntil.js","webpack://AYTM/./node_modules/setimmediate/setImmediate.js","webpack://AYTM/./node_modules/ua-parser-js/src/ua-parser.js"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t= 0; i -= 1) {\n var f = funcs[i];\n result = f(result);\n }\n\n return result;\n };\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction keyBindingFn(event) {\n return getDefaultKeyBinding(event);\n}\n\nfunction handleKeyCommand(command, editorState, eventTimeStamp, _ref) {\n var setEditorState = _ref.setEditorState;\n var newState;\n\n switch (command) {\n case 'backspace':\n case 'backspace-word':\n case 'backspace-to-start-of-line':\n newState = RichUtils.onBackspace(editorState);\n break;\n\n case 'delete':\n case 'delete-word':\n case 'delete-to-end-of-block':\n newState = RichUtils.onDelete(editorState);\n break;\n\n default:\n return 'not-handled';\n }\n\n if (newState != null) {\n setEditorState(newState);\n return 'handled';\n }\n\n return 'not-handled';\n}\n\nvar _excluded$1 = [\"props\"],\n _excluded2 = [\"props\"];\n\nfunction isEditorHandleKey(key) {\n return key.startsWith('handle');\n}\n\nfunction isEditorEventKey(key) {\n return key.startsWith('on');\n}\n\nfunction isEditorFnKey(key) {\n return key.endsWith('Fn');\n}\n\nfunction blockRendererFnHook(plugins, pluginMethods) {\n return function (block) {\n var resultBlock = {\n props: {}\n };\n plugins.forEach(function (plugin) {\n if (typeof plugin.blockRendererFn !== 'function') {\n return;\n }\n\n var result = plugin.blockRendererFn(block, pluginMethods);\n\n if (result !== undefined && result !== null) {\n var pluginProps = result.props,\n pluginRest = _objectWithoutPropertiesLoose(result, _excluded$1); // eslint-disable-line no-use-before-define\n\n\n var _resultBlock = resultBlock,\n props = _resultBlock.props,\n rest = _objectWithoutPropertiesLoose(_resultBlock, _excluded2); // eslint-disable-line no-use-before-define\n\n\n resultBlock = _extends({}, rest, pluginRest, {\n props: _extends({}, props, pluginProps)\n });\n }\n });\n return resultBlock.component ? resultBlock : false;\n };\n}\n\nfunction blockStyleFnHook(plugins, pluginMethods) {\n return function (block) {\n var styles = [];\n plugins.forEach(function (plugin) {\n if (typeof plugin.blockStyleFn !== 'function') {\n return;\n }\n\n var result = plugin.blockStyleFn(block, pluginMethods);\n\n if (result !== undefined && result !== null) {\n styles.push(result);\n }\n });\n return styles.join(' ');\n };\n}\n\nfunction customStyleFnHook(plugins, pluginMethods) {\n return function (style, block) {\n var result;\n var wasHandled = plugins.some(function (plugin) {\n if (typeof plugin.customStyleFn !== 'function') {\n return false;\n }\n\n result = plugin.customStyleFn(style, block, pluginMethods);\n return result !== undefined;\n });\n return wasHandled && result ? result : {};\n };\n}\n\nfunction keyBindingFnHook(plugins, pluginMethods) {\n return function (event) {\n var result = null;\n var wasHandled = plugins.some(function (plugin) {\n if (typeof plugin.keyBindingFn !== 'function') {\n return false;\n }\n\n result = plugin.keyBindingFn(event, pluginMethods);\n return result !== undefined;\n });\n return wasHandled ? result : null;\n };\n}\n\nfunction createHandleHooks(methodName, plugins, pluginMethods) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return plugins.some(function (plugin) {\n var fn = plugin[methodName];\n return (// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n typeof fn === 'function' && fn.apply(void 0, args.concat([pluginMethods])) === 'handled'\n );\n }) ? 'handled' : 'not-handled';\n };\n}\n\nfunction createEventHooks(methodName, plugins, pluginMethods) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return plugins.some(function (plugin) {\n var fn = plugin[methodName]; // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n\n return typeof fn === 'function' && fn.apply(void 0, args.concat([pluginMethods])) === true;\n });\n };\n}\n\nfunction createPluginHooks(plugins, pluginFunction) {\n var pluginHooks = {}; //onchange is here ignored\n\n var handledAttributes = new Set(['onChange']);\n plugins.forEach(function (plugin) {\n Object.keys(plugin).forEach(function (attrName) {\n // if `attrName` has been added as a hook key already, ignore this one\n if (handledAttributes.has(attrName)) {\n return;\n }\n\n handledAttributes.add(attrName);\n\n if (isEditorEventKey(attrName)) {\n pluginHooks[attrName] = createEventHooks(attrName, plugins, pluginFunction);\n } else if (isEditorHandleKey(attrName)) {\n pluginHooks[attrName] = createHandleHooks(attrName, plugins, pluginFunction);\n } else if (isEditorFnKey(attrName)) {\n if (attrName === 'blockRendererFn') {\n pluginHooks.blockRendererFn = blockRendererFnHook(plugins, pluginFunction);\n } else if (attrName === 'blockStyleFn') {\n pluginHooks.blockStyleFn = blockStyleFnHook(plugins, pluginFunction);\n } else if (attrName === 'customStyleFn') {\n pluginHooks.customStyleFn = customStyleFnHook(plugins, pluginFunction);\n } else if (attrName === 'keyBindingFn') {\n pluginHooks.keyBindingFn = keyBindingFnHook(plugins, pluginFunction);\n }\n }\n });\n });\n return pluginHooks;\n}\n\nfunction createCompositeDecorator(decorators, getEditorState, setEditorState) {\n var convertedDecorators = List(decorators).map(function (decorator) {\n var Component = decorator.component;\n\n var DecoratedComponent = function DecoratedComponent(props) {\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n getEditorState: getEditorState,\n setEditorState: setEditorState\n }));\n };\n\n return _extends({}, decorator, {\n component: DecoratedComponent\n });\n }).toJS();\n return new CompositeDecorator(convertedDecorators);\n}\n\nvar KEY_SEPARATOR = '-';\n\nvar MultiDecorator = /*#__PURE__*/function () {\n function MultiDecorator(decorators) {\n this.decorators = void 0;\n this.decorators = Immutable.List(decorators);\n }\n /**\n * Return list of decoration IDs per character\n */\n\n\n var _proto = MultiDecorator.prototype;\n\n _proto.getDecorations = function getDecorations(block, contentState) {\n var decorations = new Array(block.getText().length).fill(null);\n this.decorators.forEach(function (decorator, i) {\n var subDecorations = decorator.getDecorations(block, contentState);\n subDecorations.forEach(function (key, offset) {\n if (!key) {\n return;\n }\n\n decorations[offset] = i + KEY_SEPARATOR + key;\n });\n });\n return Immutable.List(decorations);\n }\n /**\n * Return component to render a decoration\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n ;\n\n _proto.getComponentForKey = function getComponentForKey(key) {\n var decorator = this.getDecoratorForKey(key);\n return decorator.getComponentForKey(MultiDecorator.getInnerKey(key));\n }\n /**\n * Return props to render a decoration\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n ;\n\n _proto.getPropsForKey = function getPropsForKey(key) {\n var decorator = this.getDecoratorForKey(key);\n return decorator.getPropsForKey(MultiDecorator.getInnerKey(key));\n }\n /**\n * Return a decorator for a specific key\n */\n ;\n\n _proto.getDecoratorForKey = function getDecoratorForKey(key) {\n var parts = key.split(KEY_SEPARATOR);\n var index = Number(parts[0]);\n return this.decorators.get(index);\n }\n /**\n * Return inner key for a decorator\n */\n ;\n\n MultiDecorator.getInnerKey = function getInnerKey(key) {\n var parts = key.split(KEY_SEPARATOR);\n return parts.slice(1).join(KEY_SEPARATOR);\n };\n\n return MultiDecorator;\n}();\n\n// @see https://github.com/facebook/draft-js/blob/master/src/model/decorators/DraftDecoratorType.js\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nvar decoratorIsCustom = function decoratorIsCustom(decorator) {\n return typeof decorator.getDecorations === 'function' && typeof decorator.getComponentForKey === 'function' && typeof decorator.getPropsForKey === 'function';\n};\n\nvar getDecoratorsFromProps = function getDecoratorsFromProps(_ref) {\n var decorators = _ref.decorators,\n _ref$plugins = _ref.plugins,\n plugins = _ref$plugins === void 0 ? [] : _ref$plugins;\n return List([{\n decorators: decorators\n }].concat(plugins)).filter(function (plugin) {\n return (plugin == null ? void 0 : plugin.decorators) !== undefined;\n }).flatMap(function (plugin) {\n return plugin == null ? void 0 : plugin.decorators;\n });\n};\n\nfunction resolveDecorators(props, getEditorState, onChange) {\n var decorators = getDecoratorsFromProps(props);\n var compositeDecorator = createCompositeDecorator(decorators.filter(function (decorator) {\n return !decoratorIsCustom(decorator);\n }), getEditorState, onChange);\n var customDecorators = decorators.filter(function (decorator) {\n return decoratorIsCustom(decorator);\n });\n return new MultiDecorator(customDecorators.push(compositeDecorator));\n}\n\nvar _excluded = [\"keyBindingFn\"];\n\nvar getDecoratorLength = function getDecoratorLength(obj) {\n if ((obj == null ? void 0 : obj.decorators) != null) {\n var _obj$decorators;\n\n return (_obj$decorators = obj.decorators) == null ? void 0 : _obj$decorators.size;\n } else if ((obj == null ? void 0 : obj._decorators) != null) {\n var _obj$_decorators;\n\n return (_obj$_decorators = obj._decorators) == null ? void 0 : _obj$_decorators.length;\n }\n\n return undefined;\n};\n/**\n * The main editor component\n */\n\n\nvar PluginEditor = /*#__PURE__*/function (_Component) {\n _inheritsLoose(PluginEditor, _Component);\n\n function PluginEditor(_props) {\n var _this;\n\n _this = _Component.call(this, _props) || this;\n _this.editor = null;\n _this.state = {\n readOnly: false // TODO for Nik: ask ben why this is relevent\n\n };\n\n _this.onChange = function (editorState) {\n var newEditorState = editorState;\n\n _this.resolvePlugins().forEach(function (plugin) {\n if (plugin.onChange) {\n newEditorState = plugin.onChange(newEditorState, _this.getPluginMethods());\n }\n });\n\n if (_this.props.onChange) {\n _this.props.onChange(newEditorState);\n }\n };\n\n _this.getPlugins = function () {\n return [].concat(_this.props.plugins);\n };\n\n _this.getProps = function () {\n return _extends({}, _this.props);\n };\n\n _this.getReadOnly = function () {\n return _this.props.readOnly || _this.state.readOnly;\n };\n\n _this.setReadOnly = function (readOnly) {\n if (readOnly !== _this.state.readOnly) {\n _this.setState({\n readOnly: readOnly\n });\n }\n };\n\n _this.getEditorRef = function () {\n return _this.editor;\n };\n\n _this.getEditorState = function () {\n return _this.props.editorState;\n };\n\n _this.getPluginMethods = function () {\n return {\n getPlugins: _this.getPlugins,\n getProps: _this.getProps,\n setEditorState: _this.onChange,\n getEditorState: _this.getEditorState,\n getReadOnly: _this.getReadOnly,\n setReadOnly: _this.setReadOnly,\n getEditorRef: _this.getEditorRef\n };\n };\n\n _this.createPluginHooks = function () {\n var plugins = [_this.props].concat(_this.resolvePlugins());\n return createPluginHooks(plugins, _this.getPluginMethods());\n };\n\n _this.resolvePlugins = function () {\n var plugins = _this.getPlugins();\n\n if (_this.props.defaultKeyBindings === true) {\n plugins.push({\n keyBindingFn: keyBindingFn\n });\n }\n\n if (_this.props.defaultKeyCommands === true) {\n plugins.push({\n handleKeyCommand: handleKeyCommand\n });\n }\n\n return plugins;\n };\n\n _this.resolveCustomStyleMap = function () {\n var customStyleMap = _this.props.plugins.filter(function (plug) {\n return plug.customStyleMap !== undefined;\n }).map(function (plug) {\n return plug.customStyleMap;\n });\n\n return customStyleMap.concat([_this.props.customStyleMap]).reduce(function (styles, style) {\n return _extends({}, styles, style);\n }, {});\n };\n\n _this.resolveblockRenderMap = function () {\n var blockRenderMap = _this.props.plugins.filter(function (plug) {\n return plug.blockRenderMap !== undefined;\n }).reduce(function (maps, plug) {\n return maps.merge(plug.blockRenderMap);\n }, Map({}));\n\n if (_this.props.defaultBlockRenderMap) {\n blockRenderMap = DefaultDraftBlockRenderMap.merge(blockRenderMap);\n }\n\n if (_this.props.blockRenderMap) {\n blockRenderMap = blockRenderMap.merge(_this.props.blockRenderMap);\n }\n\n return blockRenderMap;\n };\n\n _this.resolveAccessibilityProps = function () {\n var accessibilityProps = {};\n\n _this.resolvePlugins().forEach(function (plugin) {\n if (typeof plugin.getAccessibilityProps !== 'function') {\n return;\n }\n\n var props = plugin.getAccessibilityProps();\n var popupProps = {};\n\n if (accessibilityProps.ariaHasPopup === undefined) {\n popupProps.ariaHasPopup = props.ariaHasPopup;\n } else if (props.ariaHasPopup === 'true') {\n popupProps.ariaHasPopup = 'true';\n }\n\n if (accessibilityProps.ariaExpanded === undefined) {\n popupProps.ariaExpanded = props.ariaExpanded;\n } else if (props.ariaExpanded === true) {\n popupProps.ariaExpanded = true;\n }\n\n accessibilityProps = _extends({}, accessibilityProps, props, popupProps);\n });\n\n return accessibilityProps;\n };\n\n var _plugins = [_this.props].concat(_this.resolvePlugins());\n\n _plugins.forEach(function (plugin) {\n if (plugin && typeof plugin.initialize === 'function') {\n plugin.initialize(_this.getPluginMethods());\n }\n });\n\n return _this;\n }\n\n var _proto = PluginEditor.prototype;\n\n _proto.focus = function focus() {\n if (this.editor) {\n this.editor.focus();\n }\n };\n\n _proto.blur = function blur() {\n if (this.editor) {\n this.editor.blur();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var decorator = resolveDecorators(this.props, this.getEditorState, this.onChange);\n var editorState = EditorState.set(this.props.editorState, {\n decorator: decorator\n });\n this.onChange(EditorState.moveSelectionToEnd(editorState));\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var next = this.props;\n var currDec = prevProps.editorState.getDecorator();\n var nextDec = next.editorState.getDecorator(); // If there is not current decorator, there's nothing to carry over to the next editor state\n\n if (!currDec) {\n return;\n } // If the current decorator is the same as the new one, don't call onChange to avoid infinite loops\n\n\n if (currDec === nextDec) {\n return;\n } // If the old and the new decorator are the same, but no the same object, also don't call onChange to avoid infinite loops\n\n\n if (currDec && nextDec && getDecoratorLength(currDec) === getDecoratorLength(nextDec)) {\n return;\n }\n\n var editorState = EditorState.set(next.editorState, {\n decorator: currDec\n });\n this.onChange(EditorState.moveSelectionToEnd(editorState));\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var _this2 = this;\n\n this.resolvePlugins().forEach(function (plugin) {\n if (plugin.willUnmount) {\n plugin.willUnmount({\n getEditorState: _this2.getEditorState,\n setEditorState: _this2.onChange\n });\n }\n });\n } // Cycle through the plugins, changing the editor state with what the plugins\n // changed (or didn't)\n ;\n\n _proto.render = function render() {\n var _this3 = this;\n\n var pluginHooks = this.createPluginHooks();\n var customStyleMap = this.resolveCustomStyleMap();\n var accessibilityProps = this.resolveAccessibilityProps();\n var blockRenderMap = this.resolveblockRenderMap();\n\n var _this$props = this.props;\n _this$props.keyBindingFn;\n var editorProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return /*#__PURE__*/React.createElement(Editor, _extends({}, editorProps, accessibilityProps, pluginHooks, {\n readOnly: this.props.readOnly || this.state.readOnly,\n customStyleMap: customStyleMap,\n blockRenderMap: blockRenderMap,\n onChange: this.onChange,\n editorState: this.props.editorState,\n ref: function ref(element) {\n _this3.editor = element;\n }\n }));\n };\n\n return PluginEditor;\n}(Component);\n\nPluginEditor.propTypes = {\n editorState: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n plugins: PropTypes.array,\n defaultKeyBindings: PropTypes.bool,\n defaultKeyCommands: PropTypes.bool,\n defaultBlockRenderMap: PropTypes.bool,\n customStyleMap: PropTypes.object,\n // eslint-disable-next-line react/no-unused-prop-types\n decorators: PropTypes.array\n};\nPluginEditor.defaultProps = {\n defaultBlockRenderMap: true,\n defaultKeyBindings: true,\n defaultKeyCommands: true,\n customStyleMap: {},\n plugins: [],\n decorators: []\n};\nvar PluginEditor$1 = PluginEditor;\n\nvar createEditorStateWithText = createEditorStateWithText$1;\nvar composeDecorators = composeDecorators$1;\n\nexport { composeDecorators, createEditorStateWithText, PluginEditor$1 as default };\n","import React, { useState, useRef, useEffect, Fragment } from 'react';\nimport { createStore } from '@draft-js-plugins/utils';\nimport { getVisibleSelectionRect } from 'draft-js';\nimport { ItalicButton, BoldButton, UnderlineButton, CodeButton } from '@draft-js-plugins/buttons';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar Toolbar = function Toolbar(_ref) {\n var defaultStore = _ref.store,\n children = _ref.children,\n defaultIsVisible = _ref.isVisible,\n defaultPosition = _ref.position,\n defaultOverrideContent = _ref.overrideContent,\n defaultTheme = _ref.theme;\n var _useState = useState({\n store: defaultStore,\n isVisible: defaultIsVisible,\n position: defaultPosition,\n theme: defaultTheme,\n overrideContent: defaultOverrideContent\n }),\n toolbarPropsState = _useState[0],\n setToolbarPropsState = _useState[1];\n var toolbar = useRef(null);\n var onOverrideContent = function onOverrideContent(newOverrideContent) {\n setToolbarPropsState(function (prev) {\n return _extends({}, prev, {\n overrideContent: newOverrideContent\n });\n });\n };\n var onSelectionChanged = function onSelectionChanged() {\n // need to wait a tick for window.getSelection() to be accurate\n // when focusing editor with already present selection\n setTimeout(function () {\n var _toolbar$current;\n if (!toolbar) return;\n\n // The editor root should be two levels above the node from\n // `getEditorRef`. In case this changes in the future, we\n // attempt to find the node dynamically by traversing upwards.\n var editorRef = toolbarPropsState.store.getItem('getEditorRef')();\n if (!editorRef) return;\n\n // This keeps backwards compatibility with React 15\n var editorRoot = editorRef.refs && editorRef.refs.editor ? editorRef.refs.editor : editorRef.editor;\n while (editorRoot.className.indexOf('DraftEditor-root') === -1) {\n editorRoot = editorRoot.parentNode;\n }\n var editorRootRect = editorRoot.getBoundingClientRect();\n var parentWindow = editorRoot.ownerDocument && editorRoot.ownerDocument.defaultView;\n var selectionRect = getVisibleSelectionRect(parentWindow || window);\n if (!selectionRect) return;\n\n // The toolbar shouldn't be positioned directly on top of the selected text,\n // but rather with a small offset so the caret doesn't overlap with the text.\n var extraTopOffset = -5;\n\n // Account for scrollTop of all ancestors\n var scrollOffset = 0;\n var ancestorNode = editorRoot.parentNode;\n while (ancestorNode !== null && ancestorNode.nodeName !== 'HTML') {\n var _ancestorNode$scrollT;\n scrollOffset += (_ancestorNode$scrollT = ancestorNode.scrollTop) != null ? _ancestorNode$scrollT : 0;\n ancestorNode = ancestorNode.parentNode;\n }\n var newPosition = {\n top: editorRoot.offsetTop - scrollOffset - (((_toolbar$current = toolbar.current) == null ? void 0 : _toolbar$current.offsetHeight) || 0) + (selectionRect.top - editorRootRect.top) + extraTopOffset,\n left: editorRoot.offsetLeft + (selectionRect.left - editorRootRect.left) + selectionRect.width / 2\n };\n setToolbarPropsState(function (prevState) {\n return _extends({}, prevState, {\n position: newPosition\n });\n });\n });\n };\n var getStyle = function getStyle() {\n var overrideContent = toolbarPropsState.overrideContent,\n position = toolbarPropsState.position,\n store = toolbarPropsState.store;\n var selection = store.getItem('getEditorState')().getSelection();\n // overrideContent could for example contain a text input, hence we always show overrideContent\n // TODO: Test readonly mode and possibly set isVisible to false if the editor is readonly\n var visible = !selection.isCollapsed() && selection.getHasFocus() || overrideContent;\n var style = _extends({}, position);\n if (visible) {\n style.visibility = 'visible';\n style.transform = 'translate(-50%) scale(1)';\n style.transition = 'transform 0.15s cubic-bezier(.3,1.2,.2,1)';\n } else {\n style.transform = 'translate(-50%) scale(0)';\n style.visibility = 'hidden';\n }\n return style;\n };\n var childrenProps = {\n theme: toolbarPropsState.theme.buttonStyles,\n getEditorState: toolbarPropsState.store.getItem('getEditorState'),\n setEditorState: toolbarPropsState.store.getItem('setEditorState'),\n onOverrideContent: onOverrideContent\n };\n useEffect(function () {\n toolbarPropsState.store.subscribeToItem('selection', onSelectionChanged);\n }, []);\n useEffect(function () {\n return function () {\n toolbarPropsState.store.unsubscribeFromItem('selection', onSelectionChanged);\n };\n }, []);\n var OverrideContent = toolbarPropsState.overrideContent;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: toolbarPropsState.theme.toolbarStyles.toolbar,\n style: getStyle(),\n ref: toolbar\n }, OverrideContent ? /*#__PURE__*/React.createElement(OverrideContent, childrenProps) : /*#__PURE__*/React.createElement(React.Fragment, null, children ? children(childrenProps) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ItalicButton, childrenProps), /*#__PURE__*/React.createElement(BoldButton, childrenProps), /*#__PURE__*/React.createElement(UnderlineButton, childrenProps), /*#__PURE__*/React.createElement(CodeButton, childrenProps))));\n};\nvar Toolbar$1 = Toolbar;\n\nvar separator = \"s1o2cezu\";\nfunction Seperator(_ref) {\n var _ref$className = _ref.className,\n className = _ref$className === void 0 ? separator : _ref$className;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n });\n}\n\nvar buttonStyles = {\n buttonWrapper: \"bpsgbes\",\n button: \"b181v2oy\",\n active: \"a9immln\"\n};\nvar toolbarStyles = {\n toolbar: \"tukdd6b\"\n};\nvar defaultTheme = {\n buttonStyles: buttonStyles,\n toolbarStyles: toolbarStyles\n};\n\nvar index = (function (config) {\n if (config === void 0) {\n config = {};\n }\n var store = createStore({\n isVisible: false\n });\n var _config = config,\n _config$theme = _config.theme,\n theme = _config$theme === void 0 ? defaultTheme : _config$theme;\n var InlineToolbar = function InlineToolbar(props) {\n return /*#__PURE__*/React.createElement(Toolbar$1, _extends({}, props, {\n store: store,\n theme: theme\n }));\n };\n return {\n initialize: function initialize(_ref) {\n var getEditorState = _ref.getEditorState,\n setEditorState = _ref.setEditorState,\n getEditorRef = _ref.getEditorRef;\n store.updateItem('getEditorState', getEditorState);\n store.updateItem('setEditorState', setEditorState);\n store.updateItem('getEditorRef', getEditorRef);\n },\n // Re-Render the text-toolbar on selection change\n onChange: function onChange(editorState) {\n store.updateItem('selection', editorState.getSelection());\n return editorState;\n },\n InlineToolbar: InlineToolbar\n };\n});\n\nexport { Seperator as Separator, index as default };\n","import React from 'react';\nimport { createStore } from '@draft-js-plugins/utils';\nimport { ItalicButton, BoldButton, UnderlineButton, CodeButton } from '@draft-js-plugins/buttons';\nimport PropTypes from 'prop-types';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nvar Toolbar = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Toolbar, _React$Component);\n\n function Toolbar() {\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 _this.state = {\n /**\n * If this is set, the toolbar will render this instead of the regular\n * structure and will also be shown when the editor loses focus.\n * @type {Component}\n */\n overrideContent: undefined\n };\n\n _this.onOverrideContent = function (overrideContent) {\n return _this.setState({\n overrideContent: overrideContent\n });\n };\n\n _this.renderDefaultButtons = function (externalProps) {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(ItalicButton, externalProps), /*#__PURE__*/React.createElement(BoldButton, externalProps), /*#__PURE__*/React.createElement(UnderlineButton, externalProps), /*#__PURE__*/React.createElement(CodeButton, externalProps));\n };\n\n return _this;\n }\n\n var _proto = Toolbar.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n theme = _this$props.theme,\n store = _this$props.store;\n var OverrideContent = this.state.overrideContent;\n var childrenProps = {\n theme: theme.buttonStyles,\n getEditorState: store.getItem('getEditorState'),\n setEditorState: store.getItem('setEditorState'),\n onOverrideContent: this.onOverrideContent\n };\n return /*#__PURE__*/React.createElement(\"div\", {\n className: theme.toolbarStyles.toolbar\n }, OverrideContent ? /*#__PURE__*/React.createElement(OverrideContent, childrenProps) : (this.props.children || this.renderDefaultButtons)(childrenProps));\n };\n\n return Toolbar;\n}(React.Component);\n\nToolbar.propTypes = {\n children: PropTypes.func\n};\n\nvar separator = \"s6m29i4\";\nfunction Seperator(_ref) {\n var _ref$className = _ref.className,\n className = _ref$className === void 0 ? separator : _ref$className;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n });\n}\n\nvar buttonStyles = {\n buttonWrapper: \"bi09khh\",\n button: \"bc4rxid\",\n active: \"akzb7t5\"\n};\nvar toolbarStyles = {\n toolbar: \"t16lpgj\"\n};\nvar defaultTheme = {\n buttonStyles: buttonStyles,\n toolbarStyles: toolbarStyles\n};\n\nvar index = (function (config) {\n if (config === void 0) {\n config = {};\n }\n\n var store = createStore();\n var _config = config,\n _config$theme = _config.theme,\n theme = _config$theme === void 0 ? defaultTheme : _config$theme;\n\n var StaticToolbar = function StaticToolbar(props) {\n return /*#__PURE__*/React.createElement(Toolbar, _extends({}, props, {\n store: store,\n theme: theme\n }));\n };\n\n return {\n initialize: function initialize(_ref) {\n var getEditorState = _ref.getEditorState,\n setEditorState = _ref.setEditorState;\n store.updateItem('getEditorState', getEditorState);\n store.updateItem('setEditorState', setEditorState);\n },\n // Re-Render the text-toolbar on selection change\n onChange: function onChange(editorState) {\n store.updateItem('selection', editorState.getSelection());\n return editorState;\n },\n Toolbar: StaticToolbar\n };\n});\n\nexport { Seperator as Separator, index as default };\n","import { RichUtils, EditorState } from 'draft-js';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction createStore(initialState) {\n if (initialState === void 0) {\n initialState = {};\n }\n var state = initialState;\n var listeners = {};\n return {\n subscribeToItem: function subscribeToItem(key, callback) {\n listeners[key] = listeners[key] || [];\n listeners[key].push(callback);\n },\n unsubscribeFromItem: function unsubscribeFromItem(key, callback) {\n var listener = listeners[key];\n if (listener) {\n listeners[key] = listener.filter(function (currentListener) {\n return currentListener !== callback;\n });\n }\n },\n updateItem: function updateItem(key, item) {\n var _extends2;\n state = _extends({}, state, (_extends2 = {}, _extends2[key] = item, _extends2));\n var listener = listeners[key];\n if (listener) {\n listener.forEach(function (currentListener) {\n return currentListener(state[key]);\n });\n }\n },\n getItem: function getItem(key) {\n return state[key];\n }\n };\n}\n\nfunction findWithRegex(regex, contentBlock, callback) {\n // Get the text from the contentBlock\n var text = contentBlock.getText();\n var matchArr;\n var start;\n // Go through all matches in the text and return the indizes to the callback\n while ((matchArr = regex.exec(text)) !== null) {\n if (matchArr.index === regex.lastIndex) {\n // eslint-disable-next-line no-param-reassign\n regex.lastIndex += 1;\n }\n start = matchArr.index;\n callback(start, start + matchArr[0].length);\n }\n}\n\nvar index = {\n decodeOffsetKey: function decodeOffsetKey(offsetKey) {\n var _offsetKey$split = offsetKey.split('-'),\n blockKey = _offsetKey$split[0],\n decoratorKey = _offsetKey$split[1],\n leafKey = _offsetKey$split[2];\n return {\n blockKey: blockKey,\n decoratorKey: parseInt(decoratorKey, 10),\n leafKey: parseInt(leafKey, 10)\n };\n },\n createLinkAtSelection: function createLinkAtSelection(editorState, url) {\n var contentState = editorState.getCurrentContent().createEntity('LINK', 'MUTABLE', {\n url: url\n });\n var entityKey = contentState.getLastCreatedEntityKey();\n var withLink = RichUtils.toggleLink(editorState, editorState.getSelection(), entityKey);\n return EditorState.forceSelection(withLink, editorState.getSelection());\n },\n removeLinkAtSelection: function removeLinkAtSelection(editorState) {\n var selection = editorState.getSelection();\n return RichUtils.toggleLink(editorState, selection, null);\n },\n collapseToEnd: function collapseToEnd(editorState) {\n var selection = editorState.getSelection();\n return EditorState.forceSelection(editorState, selection.merge({\n anchorKey: selection.getEndKey(),\n focusKey: selection.getEndKey(),\n anchorOffset: selection.getEndOffset(),\n focusOffset: selection.getEndOffset()\n }));\n },\n getCurrentEntityKey: function getCurrentEntityKey(editorState) {\n var selection = editorState.getSelection();\n var anchorKey = selection.getAnchorKey();\n var contentState = editorState.getCurrentContent();\n var anchorBlock = contentState.getBlockForKey(anchorKey);\n var offset = selection.getAnchorOffset();\n var index = selection.getIsBackward() ? offset - 1 : offset;\n return anchorBlock.getEntityAt(index);\n },\n getCurrentEntity: function getCurrentEntity(editorState) {\n var contentState = editorState.getCurrentContent();\n var entityKey = this.getCurrentEntityKey(editorState);\n return entityKey ? contentState.getEntity(entityKey) : null;\n },\n hasEntity: function hasEntity(editorState, entityType) {\n var entity = this.getCurrentEntity(editorState);\n return Boolean(entity && entity.getType() === entityType);\n }\n};\n\nexport { createStore, index as default, findWithRegex };\n","import { ContentBlock, ContentState, EditorState, genKey } from 'draft-js';\nimport { List } from 'immutable';\n\n/**\n * Greedy regex for matching newlines\n * @type {RegExp}\n */\nexport var NEWLINE_REGEX = /\\n/g;\n\n/**\n * Replace newline characters with the passed string\n * @param {String} str String to replace\n * @param {String} replacement Replacement characters\n * @return {String} Modified string\n */\nexport function replaceNewlines(str) {\n var replacement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';\n\n return str.replace(NEWLINE_REGEX, replacement);\n}\n\n/**\n * Condense an array of content blocks into a single block\n * @param {EditorState} editorState draft-js EditorState instance\n * @param {Array} blocks Array of ContentBlocks\n * @param {Object} options\n * @return {EditorState} A modified EditorState instance\n */\nexport function condenseBlocks(editorState, blocks, options) {\n blocks = blocks || editorState.getCurrentContent().getBlocksAsArray();\n var text = List();\n var characterList = List();\n\n // Gather all the text/characterList and concat them\n blocks.forEach(function (block) {\n // Atomic blocks should be ignored (stripped)\n if (block.getType() !== 'atomic') {\n text = text.push(replaceNewlines(block.getText()));\n characterList = characterList.concat(block.getCharacterList());\n }\n });\n\n // Strip entities?\n if (options.stripEntities) {\n characterList = characterList.map(stripEntityFromCharacterMetadata);\n }\n\n // Create a new content block\n var contentBlock = new ContentBlock({\n key: genKey(),\n text: text.join(''),\n type: 'unstyled',\n characterList: characterList,\n depth: 0\n });\n\n // Update the editor state with the compressed version\n var newContentState = ContentState.createFromBlockArray([contentBlock]);\n // Create the new state as an undoable action\n editorState = EditorState.push(editorState, newContentState, 'remove-range');\n // Move the selection to the end\n return EditorState.moveFocusToEnd(editorState);\n}\n\n/**\n * Strip any `entity` keys from a CharacterMetadata set\n * @param {CharacterMetadata} characterMeta An Immutable.Record representing the metadata for an individual character\n * @return {CharacterMetadata}\n */\nexport function stripEntityFromCharacterMetadata(characterMeta) {\n return characterMeta.set('entity', null);\n}\n\n/**\n * Check if a CharacterList contains entities\n * @param {CharacterList} characterList The list of characters to check\n * @return {Boolean} Contains entities?\n */\nexport function characterListhasEntities(characterList) {\n var hasEntities = false;\n characterList.forEach(function (characterMeta) {\n if (characterMeta.get('entity') !== null) {\n hasEntities = true;\n }\n });\n return hasEntities;\n}","import { Map } from 'immutable';\nimport { ContentBlock, ContentState, EditorState, genKey } from 'draft-js';\n\nimport { NEWLINE_REGEX, replaceNewlines, condenseBlocks, stripEntityFromCharacterMetadata, characterListhasEntities } from './utils';\n\n/**\n * Default options\n * @type {Object}\n */\nvar defaultOptions = {\n stripEntities: true\n\n /**\n * Single Line Plugin\n * @param {Object} options Per-instance options to override the defaults\n * @return {Object} Compatible draft-js-editor-plugin object\n */\n};function singleLinePlugin() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n options = Object.assign({}, defaultOptions, options);\n\n return {\n /**\n * Return a compatible blockRenderMap\n *\n * NOTE: Needs to be explicitly applied, the plugin system doesn’t do\n * anything with this at the moment.\n *\n * @type {ImmutableMap}\n */\n blockRenderMap: Map({\n 'unstyled': {\n element: 'div'\n }\n }),\n\n /**\n * onChange\n *\n * Condense multiple blocks into a single block and (optionally) strip all\n * entities from the content of that block.\n *\n * @param {EditorState} editorState The current state of the editor\n * @return {EditorState} A new editor state\n */\n onChange: function onChange(editorState) {\n var blocks = editorState.getCurrentContent().getBlocksAsArray();\n\n // If we have more than one block, compress them\n if (blocks.length > 1) {\n editorState = condenseBlocks(editorState, blocks, options);\n } else {\n // We only have one content block\n var contentBlock = blocks[0];\n var text = contentBlock.getText();\n var characterList = contentBlock.getCharacterList();\n var hasEntitiesToStrip = options.stripEntities && characterListhasEntities(characterList);\n\n if (NEWLINE_REGEX.test(text) || hasEntitiesToStrip) {\n // Replace the text stripped of its newlines. Note that we replace\n // one '\\n' with one ' ' so we don't need to modify the characterList\n text = replaceNewlines(text);\n\n // Strip entities?\n if (options.stripEntities) {\n characterList = characterList.map(stripEntityFromCharacterMetadata);\n }\n\n // Create a new content block based on the old one\n contentBlock = new ContentBlock({\n key: genKey(),\n text: text,\n type: 'unstyled',\n characterList: characterList,\n depth: 0\n });\n\n // Update the editor state with the compressed version\n // const selection = editorState.getSelection()\n var newContentState = ContentState.createFromBlockArray([contentBlock]);\n\n // Create the new state as an undoable action\n editorState = EditorState.push(editorState, newContentState, 'insert-characters');\n }\n }\n\n return editorState;\n },\n\n\n /**\n * Stop new lines being inserted by always handling the return\n *\n * @param {KeyboardEvent} e Synthetic keyboard event from draftjs\n * @return {String} Did we handle the return or not? (pro-trip: yes, we did)\n */\n handleReturn: function handleReturn(e) {\n return 'handled';\n }\n };\n}\n\nexport default singleLinePlugin;","/**\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\\u0AC9\\u0ACB-\\u0ACC\\u0AD0\" + \"\\u0AE0-\\u0AE1\\u0AE6-\\u0AEF\\u0AF0\\u0B02-\\u0B03\\u0B05-\\u0B0C\\u0B0F-\\u0B10\" + \"\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32-\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B3E\\u0B40\" + \"\\u0B47-\\u0B48\\u0B4B-\\u0B4C\\u0B57\\u0B5C-\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B6F\" + \"\\u0B70\\u0B71\\u0B72-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\" + \"\\u0B99-\\u0B9A\\u0B9C\\u0B9E-\\u0B9F\\u0BA3-\\u0BA4\\u0BA8-\\u0BAA\\u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-\\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\\u1A90-\\u1A99\\u1AA0-\\u1AA6\\u1AA7\\u1AA8-\\u1AAD\" + \"\\u1B04\\u1B05-\\u1B33\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B44\\u1B45-\\u1B4B\" + \"\\u1B50-\\u1B59\\u1B5A-\\u1B60\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1B82\\u1B83-\\u1BA0\" + \"\\u1BA1\\u1BA6-\\u1BA7\\u1BAA\\u1BAE-\\u1BAF\\u1BB0-\\u1BB9\\u1BBA-\\u1BE5\\u1BE7\" + \"\\u1BEA-\\u1BEC\\u1BEE\\u1BF2-\\u1BF3\\u1BFC-\\u1BFF\\u1C00-\\u1C23\\u1C24-\\u1C2B\" + \"\\u1C34-\\u1C35\\u1C3B-\\u1C3F\\u1C40-\\u1C49\\u1C4D-\\u1C4F\\u1C50-\\u1C59\" + \"\\u1C5A-\\u1C77\\u1C78-\\u1C7D\\u1C7E-\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u1CE1\" + \"\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF2-\\u1CF3\\u1CF5-\\u1CF6\\u1D00-\\u1D2B\" + \"\\u1D2C-\\u1D6A\\u1D6B-\\u1D77\\u1D78\\u1D79-\\u1D9A\\u1D9B-\\u1DBF\\u1E00-\\u1F15\" + \"\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\" + \"\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\" + \"\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200E\" + \"\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\" + \"\\u2124\\u2126\\u2128\\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;","/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { innerSubscribe, SimpleInnerSubscriber, SimpleOuterSubscriber } from '../innerSubscribe';\nexport function takeUntil(notifier) {\n return function (source) { return source.lift(new TakeUntilOperator(notifier)); };\n}\nvar TakeUntilOperator = /*@__PURE__*/ (function () {\n function TakeUntilOperator(notifier) {\n this.notifier = notifier;\n }\n TakeUntilOperator.prototype.call = function (subscriber, source) {\n var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n var notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber));\n if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n takeUntilSubscriber.add(notifierSubscription);\n return source.subscribe(takeUntilSubscriber);\n }\n return takeUntilSubscriber;\n };\n return TakeUntilOperator;\n}());\nvar TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeUntilSubscriber, _super);\n function TakeUntilSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.seenValue = false;\n return _this;\n }\n TakeUntilSubscriber.prototype.notifyNext = function () {\n this.seenValue = true;\n this.complete();\n };\n TakeUntilSubscriber.prototype.notifyComplete = function () {\n };\n return TakeUntilSubscriber;\n}(SimpleOuterSubscriber));\n//# sourceMappingURL=takeUntil.js.map\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