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e2B,GAEnEx2D,EAAK/yB,KAAKorF,GACVF,EAAa,EACf,CAEA,IAAIJ,EAAYF,EAAep2C,EAAO2F,EAAWytC,EAAeiD,EAAatB,GAC7Ex2D,EAAK/yB,KAAK8qF,EACZ,CACF,IAEII,EAAWzrF,OAAS,EAAG,CACzB,IAAI2rF,EAAWH,EAAcC,EAAY/wC,EAAWytC,EAAeiD,EAAatB,GAEhFx2D,EAAK/yB,KAAKorF,GACVF,EAAa,EACf,CACF,CACF,CAEA,OAAOn4D,EAAKxT,KAAK,GACnB,CAEA,OAAOgsE,CAER,CAhtBiFprD","sources":["webpack://matchboards/./node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","webpack://matchboards/./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack://matchboards/./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://matchboards/./node_modules/@emotion/react/dist/emotion-element-43c6fea0.browser.esm.js","webpack://matchboards/./node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack://matchboards/./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://matchboards/./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","webpack://matchboards/./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://matchboards/./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","webpack://matchboards/./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","webpack://matchboards/./node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","webpack://matchboards/./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","webpack://matchboards/./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/defaultLocale/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/defaultOptions/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/format/longFormatters/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/getUTCWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/protectedTokens/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://matchboards/./node_modules/date-fns/esm/addDays/index.js","webpack://matchboards/./node_modules/date-fns/esm/addMonths/index.js","webpack://matchboards/./node_modules/date-fns/esm/addYears/index.js","webpack://matchboards/./node_modules/date-fns/esm/differenceInCalendarDays/index.js","webpack://matchboards/./node_modules/date-fns/esm/differenceInCalendarMonths/index.js","webpack://matchboards/./node_modules/date-fns/esm/differenceInDays/index.js","webpack://matchboards/./node_modules/date-fns/esm/eachDayOfInterval/index.js","webpack://matchboards/./node_modules/date-fns/esm/endOfDay/index.js","webpack://matchboards/./node_modules/date-fns/esm/endOfMonth/index.js","webpack://matchboards/./node_modules/date-fns/esm/endOfWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/format/formatters/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","webpack://matchboards/./node_modules/date-fns/esm/format/index.js","webpack://matchboards/./node_modules/date-fns/esm/isAfter/index.js","webpack://matchboards/./node_modules/date-fns/esm/isBefore/index.js","webpack://matchboards/./node_modules/date-fns/esm/isEqual/index.js","webpack://matchboards/./node_modules/date-fns/esm/isSameDay/index.js","webpack://matchboards/./node_modules/date-fns/esm/isSameMonth/index.js","webpack://matchboards/./node_modules/date-fns/esm/isValid/index.js","webpack://matchboards/./node_modules/date-fns/esm/isDate/index.js","webpack://matchboards/./node_modules/date-fns/esm/isWeekend/index.js","webpack://matchboards/./node_modules/date-fns/esm/isWithinInterval/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/en-US/index.js","webpack://matchboards/./node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","webpack://matchboards/./node_modules/date-fns/esm/max/index.js","webpack://matchboards/./node_modules/date-fns/esm/min/index.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/assign/index.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/Setter.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/Parser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/constants.js","webpack://matchboards/./node_modules/date-fns/esm/constants/index.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/utils.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/setUTCWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/setUTCDay/index.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js","webpack://matchboards/./node_modules/date-fns/esm/_lib/setUTCISODay/index.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js","webpack://matchboards/./node_modules/date-fns/esm/parse/_lib/parsers/index.js","webpack://matchboards/./node_modules/date-fns/esm/parse/index.js","webpack://matchboards/./node_modules/date-fns/esm/setMonth/index.js","webpack://matchboards/./node_modules/date-fns/esm/getDaysInMonth/index.js","webpack://matchboards/./node_modules/date-fns/esm/setYear/index.js","webpack://matchboards/./node_modules/date-fns/esm/startOfDay/index.js","webpack://matchboards/./node_modules/date-fns/esm/startOfMonth/index.js","webpack://matchboards/./node_modules/date-fns/esm/startOfWeek/index.js","webpack://matchboards/./node_modules/date-fns/esm/subMilliseconds/index.js","webpack://matchboards/./node_modules/date-fns/esm/addMilliseconds/index.js","webpack://matchboards/./node_modules/date-fns/esm/subMonths/index.js","webpack://matchboards/./node_modules/date-fns/esm/toDate/index.js","webpack://matchboards/./node_modules/dom-helpers/esm/addClass.js","webpack://matchboards/./node_modules/dom-helpers/esm/hasClass.js","webpack://matchboards/./node_modules/dom-helpers/esm/removeClass.js","webpack://matchboards/./node_modules/dompurify/dist/purify.js","webpack://matchboards/./node_modules/downshift/dist/downshift.esm.js","webpack://matchboards/./node_modules/draft-js/lib/AtomicBlockUtils.js","webpack://matchboards/./node_modules/draft-js/lib/BlockMapBuilder.js","webpack://matchboards/./node_modules/draft-js/lib/BlockTree.js","webpack://matchboards/./node_modules/draft-js/lib/CharacterMetadata.js","webpack://matchboards/./node_modules/draft-js/lib/CompositeDraftDecorator.js","webpack://matchboards/./node_modules/draft-js/lib/ContentBlock.js","webpack://matchboards/./node_modules/draft-js/lib/ContentBlockNode.js","webpack://matchboards/./node_modules/draft-js/lib/ContentState.js","webpack://matchboards/./node_modules/draft-js/lib/ContentStateInlineStyle.js","webpack://matchboards/./node_modules/draft-js/lib/DOMObserver.js","webpack://matchboards/./node_modules/draft-js/lib/DefaultDraftBlockRenderMap.js","webpack://matchboards/./node_modules/draft-js/lib/DefaultDraftInlineStyle.js","webpack://matchboards/./node_modules/draft-js/lib/Draft.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditor.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorBlock.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorBlockNode.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorCompositionHandler.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorContents-core.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorContents.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorContentsExperimental.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorDecoratedLeaves.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorDragHandler.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorEditHandler.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorFlushControlled.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorLeaf.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorNode.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorPlaceholder.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEditorTextNode.react.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEffects.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEntity.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEntityInstance.js","webpack://matchboards/./node_modules/draft-js/lib/DraftEntitySegments.js","webpack://matchboards/./node_modules/draft-js/lib/DraftJsDebugLogging.js","webpack://matchboards/./node_modules/draft-js/lib/DraftModifier.js","webpack://matchboards/./node_modules/draft-js/lib/DraftOffsetKey.js","webpack://matchboards/./node_modules/draft-js/lib/DraftPasteProcessor.js","webpack://matchboards/./node_modules/draft-js/lib/DraftRemovableWord.js","webpack://matchboards/./node_modules/draft-js/lib/DraftStringKey.js","webpack://matchboards/./node_modules/draft-js/lib/DraftTreeAdapter.js","webpack://matchboards/./node_modules/draft-js/lib/DraftTreeInvariants.js","webpack://matchboards/./node_modules/draft-js/lib/EditorBidiService.js","webpack://matchboards/./node_modules/draft-js/lib/EditorState.js","webpack://matchboards/./node_modules/draft-js/lib/KeyBindingUtil.js","webpack://matchboards/./node_modules/draft-js/lib/RichTextEditorUtil.js","webpack://matchboards/./node_modules/draft-js/lib/SecondaryClipboard.js","webpack://matchboards/./node_modules/draft-js/lib/SelectionState.js","webpack://matchboards/./node_modules/draft-js/lib/adjustBlockDepthForContentState.js","webpack://matchboards/./node_modules/draft-js/lib/applyEntityToContentBlock.js","webpack://matchboards/./node_modules/draft-js/lib/applyEntityToContentState.js","webpack://matchboards/./node_modules/draft-js/lib/convertFromDraftStateToRaw.js","webpack://matchboards/./node_modules/draft-js/lib/convertFromHTMLToContentBlocks.js","webpack://matchboards/./node_modules/draft-js/lib/convertFromRawToDraftState.js","webpack://matchboards/./node_modules/draft-js/lib/createCharacterList.js","webpack://matchboards/./node_modules/draft-js/lib/decodeEntityRanges.js","webpack://matchboards/./node_modules/draft-js/lib/decodeInlineStyleRanges.js","webpack://matchboards/./node_modules/draft-js/lib/draftKeyUtils.js","webpack://matchboards/./node_modules/draft-js/lib/editOnBeforeInput.js","webpack://matchboards/./node_modules/draft-js/lib/editOnBlur.js","webpack://matchboards/./node_modules/draft-js/lib/editOnCompositionStart.js","webpack://matchboards/./node_modules/draft-js/lib/editOnCopy.js","webpack://matchboards/./node_modules/draft-js/lib/editOnCut.js","webpack://matchboards/./node_modules/draft-js/lib/editOnDragOver.js","webpack://matchboards/./node_modules/draft-js/lib/editOnDragStart.js","webpack://matchboards/./node_modules/draft-js/lib/editOnFocus.js","webpack://matchboards/./node_modules/draft-js/lib/editOnInput.js","webpack://matchboards/./node_modules/draft-js/lib/editOnKeyDown.js","webpack://matchboards/./node_modules/draft-js/lib/editOnPaste.js","webpack://matchboards/./node_modules/draft-js/lib/editOnSelect.js","webpack://matchboards/./node_modules/draft-js/lib/encodeEntityRanges.js","webpack://matchboards/./node_modules/draft-js/lib/encodeInlineStyleRanges.js","webpack://matchboards/./node_modules/draft-js/lib/expandRangeToStartOfLine.js","webpack://matchboards/./node_modules/draft-js/lib/findAncestorOffsetKey.js","webpack://matchboards/./node_modules/draft-js/lib/findRangesImmutable.js","webpack://matchboards/./node_modules/draft-js/lib/generateRandomKey.js","webpack://matchboards/./node_modules/draft-js/lib/getCharacterRemovalRange.js","webpack://matchboards/./node_modules/draft-js/lib/getContentEditableContainer.js","webpack://matchboards/./node_modules/draft-js/lib/getContentStateFragment.js","webpack://matchboards/./node_modules/draft-js/lib/getCorrectDocumentFromNode.js","webpack://matchboards/./node_modules/draft-js/lib/getDefaultKeyBinding.js","webpack://matchboards/./node_modules/draft-js/lib/getDraftEditorSelection.js","webpack://matchboards/./node_modules/draft-js/lib/getDraftEditorSelectionWithNodes.js","webpack://matchboards/./node_modules/draft-js/lib/getEntityKeyForSelection.js","webpack://matchboards/./node_modules/draft-js/lib/getFragmentFromSelection.js","webpack://matchboards/./node_modules/draft-js/lib/getNextDelimiterBlockKey.js","webpack://matchboards/./node_modules/draft-js/lib/getOwnObjectValues.js","webpack://matchboards/./node_modules/draft-js/lib/getRangeBoundingClientRect.js","webpack://matchboards/./node_modules/draft-js/lib/getRangeClientRects.js","webpack://matchboards/./node_modules/draft-js/lib/getRangesForDraftEntity.js","webpack://matchboards/./node_modules/draft-js/lib/getSafeBodyFromHTML.js","webpack://matchboards/./node_modules/draft-js/lib/getSelectionOffsetKeyForNode.js","webpack://matchboards/./node_modules/draft-js/lib/getTextContentFromFiles.js","webpack://matchboards/./node_modules/draft-js/lib/getUpdatedSelectionState.js","webpack://matchboards/./node_modules/draft-js/lib/getVisibleSelectionRect.js","webpack://matchboards/./node_modules/draft-js/lib/getWindowForNode.js","webpack://matchboards/./node_modules/draft-js/lib/gkx.js","webpack://matchboards/./node_modules/draft-js/lib/insertFragmentIntoContentState.js","webpack://matchboards/./node_modules/draft-js/lib/insertIntoList.js","webpack://matchboards/./node_modules/draft-js/lib/insertTextIntoContentState.js","webpack://matchboards/./node_modules/draft-js/lib/isElement.js","webpack://matchboards/./node_modules/draft-js/lib/isEventHandled.js","webpack://matchboards/./node_modules/draft-js/lib/isHTMLAnchorElement.js","webpack://matchboards/./node_modules/draft-js/lib/isHTMLBRElement.js","webpack://matchboards/./node_modules/draft-js/lib/isHTMLElement.js","webpack://matchboards/./node_modules/draft-js/lib/isHTMLImageElement.js","webpack://matchboards/./node_modules/draft-js/lib/isInstanceOfNode.js","webpack://matchboards/./node_modules/draft-js/lib/isSelectionAtLeafStart.js","webpack://matchboards/./node_modules/draft-js/lib/isSoftNewlineEvent.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandBackspaceToStartOfLine.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandBackspaceWord.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandDeleteWord.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandInsertNewline.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandMoveSelectionToEndOfBlock.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandMoveSelectionToStartOfBlock.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandPlainBackspace.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandPlainDelete.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandTransposeCharacters.js","webpack://matchboards/./node_modules/draft-js/lib/keyCommandUndo.js","webpack://matchboards/./node_modules/draft-js/lib/modifyBlockForContentState.js","webpack://matchboards/./node_modules/draft-js/lib/moveBlockInContentState.js","webpack://matchboards/./node_modules/draft-js/lib/moveSelectionBackward.js","webpack://matchboards/./node_modules/draft-js/lib/moveSelectionForward.js","webpack://matchboards/./node_modules/draft-js/lib/randomizeBlockMapKeys.js","webpack://matchboards/./node_modules/draft-js/lib/removeEntitiesAtEdges.js","webpack://matchboards/./node_modules/draft-js/lib/removeRangeFromContentState.js","webpack://matchboards/./node_modules/draft-js/lib/removeTextWithStrategy.js","webpack://matchboards/./node_modules/draft-js/lib/sanitizeDraftText.js","webpack://matchboards/./node_modules/draft-js/lib/setDraftEditorSelection.js","webpack://matchboards/./node_modules/draft-js/lib/splitBlockInContentState.js","webpack://matchboards/./node_modules/draft-js/lib/splitTextIntoTextBlocks.js","webpack://matchboards/./node_modules/draft-js/lib/uuid.js","webpack://matchboards/./node_modules/draftjs-to-html/lib/draftjs-to-html.js"],"sourcesContent":["/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (process.env.NODE_ENV !== 'production') {\n var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n // this would only cause problem in speedy mode\n // but we don't want enabling speedy to affect the observable behavior\n // so we report this error at all times\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {\n console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (process.env.NODE_ENV !== 'production') {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, COMMENT, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule' || cache.compat) return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses) {\n var isNested = !!element.parent; // in nested rules comments become children of the \"auto-inserted\" rule and that's always the `element.parent`\n //\n // considering this input:\n // .a {\n // .b /* comm */ {}\n // color: hotpink;\n // }\n // we get output corresponding to this:\n // .a {\n // & {\n // /* comm */\n // color: hotpink;\n // }\n // .b {}\n // }\n\n var commentContainer = isNested ? element.parent.children : // global rule at the root level\n children;\n\n for (var i = commentContainer.length - 1; i >= 0; i--) {\n var node = commentContainer[i];\n\n if (node.line < element.line) {\n break;\n } // it is quite weird but comments are *usually* put at `column: element.column - 1`\n // so we seek *from the end* for the node that is earlier than the rule's `element` and check that\n // this will also match inputs like this:\n // .a {\n // /* comm */\n // .b {}\n // }\n //\n // but that is fine\n //\n // it would be the easiest to change the placement of the comment to be the first child of the rule:\n // .a {\n // .b { /* comm */ }\n // }\n // with such inputs we wouldn't have to search for the comment at all\n // TODO: consider changing this comment placement in the next major version\n\n\n if (node.column < element.column) {\n if (isIgnoringComment(node)) {\n return;\n }\n\n break;\n }\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (process.env.NODE_ENV !== 'production' && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (process.env.NODE_ENV !== 'production') {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n\n }), incorrectImportAlarm);\n }\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n // insert empty rule in non-production environments\n // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n currentSheet = {\n insert: function insert(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isBrowser = \"object\" !== 'undefined';\nvar hasOwn = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = useContext(EmotionCacheContext);\n\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = createCache({\n key: 'css'\n });\n return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getLastPart = function getLastPart(functionName) {\n // The match may be something like 'Object.createEmotionProps' or\n // 'Loader.prototype.render'\n var parts = functionName.split('.');\n return parts[parts.length - 1];\n};\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n // V8\n var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n if (match) return getLastPart(match[1]); // Safari / Firefox\n\n match = /^([A-Za-z0-9$.]+)@/.exec(line);\n if (match) return getLastPart(match[1]);\n return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n if (!stackTrace) return undefined;\n var lines = stackTrace.split('\\n');\n\n for (var i = 0; i < lines.length; i++) {\n var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n // uppercase letter\n\n if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n }\n\n return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n // the label hasn't already been computed\n\n if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {\n var label = getLabelFromStackTrace(new Error().stack);\n if (label) newProps[labelPropName] = label;\n }\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isBrowser as i, useTheme as u, withEmotionCache as w };\n","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser$1 } from './emotion-element-43c6fea0.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-43c6fea0.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.11.4\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\texports: {\n\t\t\".\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./dist/emotion-react.worker.esm.js\",\n\t\t\t\tbrowser: \"./dist/emotion-react.browser.esm.js\",\n\t\t\t\t\"default\": \"./dist/emotion-react.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./dist/emotion-react.cjs.mjs\",\n\t\t\t\"default\": \"./dist/emotion-react.cjs.js\"\n\t\t},\n\t\t\"./jsx-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js\"\n\t\t},\n\t\t\"./_isolated-hnrs\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js\",\n\t\t\t\tbrowser: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js\",\n\t\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs\",\n\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js\"\n\t\t},\n\t\t\"./jsx-dev-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\"./macro\": {\n\t\t\ttypes: {\n\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t},\n\t\t\t\"default\": \"./macro.js\"\n\t\t}\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.*\"\n\t],\n\tsideEffects: false,\n\tauthor: \"Emotion Contributors\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.18.3\",\n\t\t\"@emotion/babel-plugin\": \"^11.11.0\",\n\t\t\"@emotion/cache\": \"^11.11.0\",\n\t\t\"@emotion/serialize\": \"^1.1.3\",\n\t\t\"@emotion/use-insertion-effect-with-fallbacks\": \"^1.0.1\",\n\t\t\"@emotion/utils\": \"^1.2.1\",\n\t\t\"@emotion/weak-memoize\": \"^0.3.1\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@definitelytyped/dtslint\": \"0.0.112\",\n\t\t\"@emotion/css\": \"11.11.2\",\n\t\t\"@emotion/css-prettifier\": \"1.1.3\",\n\t\t\"@emotion/server\": \"11.11.0\",\n\t\t\"@emotion/styled\": \"11.11.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\",\n\t\ttypescript: \"^4.5.5\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\",\n\t\texports: {\n\t\t\tenvConditions: [\n\t\t\t\t\"browser\",\n\t\t\t\t\"worker\"\n\t\t\t],\n\t\t\textra: {\n\t\t\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\t\t\"./macro\": {\n\t\t\t\t\ttypes: {\n\t\t\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t\t\t},\n\t\t\t\t\t\"default\": \"./macro.js\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n // $FlowFixMe\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n\n if (!isBrowser$1) {\n var _ref;\n\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n\n if (shouldCache) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked\n\n var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';\n\n if (isBrowser && !isTestEnv) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error(noComponentSelectorMessage);\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n if (process.env.NODE_ENV !== 'production') {\n if (tag === undefined) {\n throw new Error('You are trying to create a styled element with an undefined component.\\nYou may have forgotten to import it.');\n }\n }\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n styles.push.apply(styles, args);\n } else {\n if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[0][0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[i], args[0][i]);\n }\n } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class\n\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if ( // $FlowFixMe\n finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n newProps.ref = ref;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {\n return 'NO_COMPONENT_SELECTOR';\n } // $FlowFixMe: coerce undefined to string\n\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n return createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n })).apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport 'react';\nimport '@emotion/is-prop-valid';\nimport '@emotion/react';\nimport '@emotion/utils';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nvar newStyled = createStyled.bind();\ntags.forEach(function (tagName) {\n // $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type\n newStyled[tagName] = newStyled(tagName);\n});\n\nexport { newStyled as default };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","import defaultLocale from \"../../locale/en-US/index.js\";\nexport default defaultLocale;","var defaultOptions = {};\nexport function getDefaultOptions() {\n return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n};\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n};\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n var dateTimeFormat;\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getUTCWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, options);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n }\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n var number = Number(dirtyNumber);\n if (isNaN(number)) {\n return number;\n }\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n var dayOfMonth = date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport default function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var startOfDayLeft = startOfDay(dirtyDateLeft);\n var startOfDayRight = startOfDay(dirtyDateRight);\n var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight);\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarDays from \"../differenceInCalendarDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(dateLeft, dateRight) {\n var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full days according to the local timezone\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n//=> 92\n */\nexport default function differenceInDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareLocalAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));\n dateLeft.setDate(dateLeft.getDate() - sign * difference);\n\n // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);\n var result = sign * (difference - isLastDayNotFull);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.\n * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.step` must be a number greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 9, 10)\n * })\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nexport default function eachDayOfInterval(dirtyInterval, options) {\n var _options$step;\n requiredArgs(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = toDate(interval.start);\n var endDate = toDate(interval.end);\n var endTime = endDate.getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var dates = [];\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1);\n if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');\n while (currentDate.getTime() <= endTime) {\n dates.push(toDate(currentDate));\n currentDate.setDate(currentDate.getDate() + step);\n currentDate.setHours(0, 0, 0, 0);\n }\n return dates;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport default function endOfWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n date.setDate(date.getDate() + diff);\n date.setHours(23, 59, 59, 999);\n return date;\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n while (output.length < targetLength) {\n output = '0' + output;\n }\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\nvar formatters = {\n // Year\n y: function y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n var signedYear = date.getUTCFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function M(date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function d(date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function a(date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n case 'aaa':\n return dayPeriodEnumValue;\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function h(date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function H(date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function m(date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function s(date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function S(date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n // Era\n G: function G(date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function y(date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function Y(date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function R(date, token) {\n var isoWeekYear = getUTCISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function u(date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function Q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function M(date, token, localize) {\n var month = date.getUTCMonth();\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function L(date, token, localize) {\n var month = date.getUTCMonth();\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function w(date, token, localize, options) {\n var week = getUTCWeek(date, options);\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function I(date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function d(date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function D(date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function E(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function e(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function c(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function i(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function a(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function b(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function B(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function h(date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function H(date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function K(date, token, localize) {\n var hours = date.getUTCHours() % 12;\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function k(date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function m(date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n return lightFormatters.m(date, token);\n },\n // Second\n s: function s(date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function S(date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function X(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n if (timezoneOffset === 0) {\n return 'Z';\n }\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function x(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function O(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function z(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function t(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function T(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, dirtyDelimiter);\n}\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\nexport default formatters;","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n var originalDate = toDate(dirtyDate);\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n }\n\n // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n var firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n var formatter = formatters[firstCharacter];\n if (formatter) {\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n return substring;\n }).join('');\n return result;\n}\nfunction cleanEscapedString(input) {\n var matched = input.match(escapedStringRegExp);\n if (!matched) {\n return input;\n }\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyLeftDate);\n var dateRight = toDate(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day (and year and month)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isWeekend\n * @category Weekday Helpers\n * @summary Does the given date fall on a weekend?\n *\n * @description\n * Does the given date fall on a weekend?\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date falls on a weekend\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Does 5 October 2014 fall on a weekend?\n * const result = isWeekend(new Date(2014, 9, 5))\n * //=> true\n */\nexport default function isWeekend(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day === 0 || day === 6;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isWithinInterval\n * @category Interval Helpers\n * @summary Is the given date within the interval?\n *\n * @description\n * Is the given date within the interval? (Including start and end.)\n *\n * @param {Date|Number} date - the date to check\n * @param {Interval} interval - the interval to check\n * @returns {Boolean} the date is within the interval\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // For the date within the interval:\n * isWithinInterval(new Date(2014, 0, 3), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> true\n *\n * @example\n * // For the date outside of the interval:\n * isWithinInterval(new Date(2014, 0, 10), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> false\n *\n * @example\n * // For date equal to interval start:\n * isWithinInterval(date, { start, end: date }) // => true\n *\n * @example\n * // For date equal to interval end:\n * isWithinInterval(date, { start: date, end }) // => true\n */\nexport default function isWithinInterval(dirtyDate, interval) {\n requiredArgs(2, arguments);\n var time = toDate(dirtyDate).getTime();\n var startTime = toDate(interval.start).getTime();\n var endTime = toDate(interval.end).getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startTime <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n return time >= startTime && time <= endTime;\n}","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n return result;\n};\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, options) {\n var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n var valuesArray;\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;\n // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n if (!matchResult) {\n return null;\n }\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n return undefined;\n}\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n case 2:\n return number + 'nd';\n case 3:\n return number + 'rd';\n }\n }\n return number + 'th';\n};\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} the latest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\nexport default function max(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray;\n // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray;\n\n // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (_typeof(dirtyDatesArray) === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n if (result === undefined || result < currentDate || isNaN(Number(currentDate))) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} - the earliest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\nexport default function min(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray;\n // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray;\n // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (_typeof(dirtyDatesArray) === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n if (result === undefined || result > currentDate || isNaN(currentDate.getDate())) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","export default function assign(target, object) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n for (var property in object) {\n if (Object.prototype.hasOwnProperty.call(object, property)) {\n ;\n target[property] = object[property];\n }\n }\n return target;\n}","import _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar TIMEZONE_UNIT_PRIORITY = 10;\nexport var Setter = /*#__PURE__*/function () {\n function Setter() {\n _classCallCheck(this, Setter);\n _defineProperty(this, \"priority\", void 0);\n _defineProperty(this, \"subPriority\", 0);\n }\n _createClass(Setter, [{\n key: \"validate\",\n value: function validate(_utcDate, _options) {\n return true;\n }\n }]);\n return Setter;\n}();\nexport var ValueSetter = /*#__PURE__*/function (_Setter) {\n _inherits(ValueSetter, _Setter);\n var _super = _createSuper(ValueSetter);\n function ValueSetter(value, validateValue, setValue, priority, subPriority) {\n var _this;\n _classCallCheck(this, ValueSetter);\n _this = _super.call(this);\n _this.value = value;\n _this.validateValue = validateValue;\n _this.setValue = setValue;\n _this.priority = priority;\n if (subPriority) {\n _this.subPriority = subPriority;\n }\n return _this;\n }\n _createClass(ValueSetter, [{\n key: \"validate\",\n value: function validate(utcDate, options) {\n return this.validateValue(utcDate, this.value, options);\n }\n }, {\n key: \"set\",\n value: function set(utcDate, flags, options) {\n return this.setValue(utcDate, flags, this.value, options);\n }\n }]);\n return ValueSetter;\n}(Setter);\nexport var DateToSystemTimezoneSetter = /*#__PURE__*/function (_Setter2) {\n _inherits(DateToSystemTimezoneSetter, _Setter2);\n var _super2 = _createSuper(DateToSystemTimezoneSetter);\n function DateToSystemTimezoneSetter() {\n var _this2;\n _classCallCheck(this, DateToSystemTimezoneSetter);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this2 = _super2.call.apply(_super2, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this2), \"priority\", TIMEZONE_UNIT_PRIORITY);\n _defineProperty(_assertThisInitialized(_this2), \"subPriority\", -1);\n return _this2;\n }\n _createClass(DateToSystemTimezoneSetter, [{\n key: \"set\",\n value: function set(date, flags) {\n if (flags.timestampIsSet) {\n return date;\n }\n var convertedDate = new Date(0);\n convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n return convertedDate;\n }\n }]);\n return DateToSystemTimezoneSetter;\n}(Setter);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { ValueSetter } from \"./Setter.js\";\nexport var Parser = /*#__PURE__*/function () {\n function Parser() {\n _classCallCheck(this, Parser);\n _defineProperty(this, \"incompatibleTokens\", void 0);\n _defineProperty(this, \"priority\", void 0);\n _defineProperty(this, \"subPriority\", void 0);\n }\n _createClass(Parser, [{\n key: \"run\",\n value: function run(dateString, token, match, options) {\n var result = this.parse(dateString, token, match, options);\n if (!result) {\n return null;\n }\n return {\n setter: new ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority),\n rest: result.rest\n };\n }\n }, {\n key: \"validate\",\n value: function validate(_utcDate, _value, _options) {\n return true;\n }\n }]);\n return Parser;\n}();","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nexport var EraParser = /*#__PURE__*/function (_Parser) {\n _inherits(EraParser, _Parser);\n var _super = _createSuper(EraParser);\n function EraParser() {\n var _this;\n _classCallCheck(this, EraParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 140);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['R', 'u', 't', 'T']);\n return _this;\n }\n _createClass(EraParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n // A, B\n case 'GGGGG':\n return match.era(dateString, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n case 'GGGG':\n default:\n return match.era(dateString, {\n width: 'wide'\n }) || match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n flags.era = value;\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return EraParser;\n}(Parser);","export var numericPatterns = {\n month: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/,\n // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/,\n // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/,\n // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/,\n // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/,\n // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/,\n // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n minute: /^[0-5]?\\d/,\n // 0 to 59\n second: /^[0-5]?\\d/,\n // 0 to 59\n\n singleDigit: /^\\d/,\n // 0 to 9\n twoDigits: /^\\d{1,2}/,\n // 0 to 99\n threeDigits: /^\\d{1,3}/,\n // 0 to 999\n fourDigits: /^\\d{1,4}/,\n // 0 to 9999\n\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/,\n // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/,\n // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/,\n // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n};\n\nexport var timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInYear = 365.2425;\n\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInMinute = 60000;\n\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInHour = 3600000;\n\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInSecond = 1000;\n\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\nexport var minTime = -maxTime;\n\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var minutesInHour = 60;\n\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInQuarter = 3;\n\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInYear = 12;\n\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var quartersInYear = 4;\n\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInHour = 3600;\n\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMinute = 60;\n\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInDay = secondsInHour * 24;\n\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInWeek = secondsInDay * 7;\n\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInYear = secondsInDay * daysInYear;\n\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMonth = secondsInYear / 12;\n\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInQuarter = secondsInMonth * 3;","import { millisecondsInHour, millisecondsInMinute, millisecondsInSecond } from \"../../constants/index.js\";\nimport { numericPatterns } from \"./constants.js\";\nexport function mapValue(parseFnResult, mapFn) {\n if (!parseFnResult) {\n return parseFnResult;\n }\n return {\n value: mapFn(parseFnResult.value),\n rest: parseFnResult.rest\n };\n}\nexport function parseNumericPattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n if (!matchResult) {\n return null;\n }\n return {\n value: parseInt(matchResult[0], 10),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseTimezonePattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n if (!matchResult) {\n return null;\n }\n\n // Input is 'Z'\n if (matchResult[0] === 'Z') {\n return {\n value: 0,\n rest: dateString.slice(1)\n };\n }\n var sign = matchResult[1] === '+' ? 1 : -1;\n var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n return {\n value: sign * (hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseAnyDigitsSigned(dateString) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\nexport function parseNDigits(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, dateString);\n default:\n return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function parseNDigitsSigned(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n default:\n return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function dayPeriodEnumToHours(dayPeriod) {\n switch (dayPeriod) {\n case 'morning':\n return 4;\n case 'evening':\n return 17;\n case 'pm':\n case 'noon':\n case 'afternoon':\n return 12;\n case 'am':\n case 'midnight':\n case 'night':\n default:\n return 0;\n }\n}\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n var isCommonEra = currentYear > 0;\n // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n var result;\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n var rangeEnd = absCurrentYear + 50;\n var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n return isCommonEra ? result : 1 - result;\n}\nexport function isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year | y | yy | yyy | yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\nexport var YearParser = /*#__PURE__*/function (_Parser) {\n _inherits(YearParser, _Parser);\n var _super = _createSuper(YearParser);\n function YearParser() {\n var _this;\n _classCallCheck(this, YearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(YearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'yy'\n };\n };\n switch (token) {\n case 'y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case 'yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n var currentYear = date.getUTCFullYear();\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return YearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits, normalizeTwoDigitYear, mapValue } from \"../utils.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\";\n// Local week-numbering year\nexport var LocalWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekYearParser, _Parser);\n var _super = _createSuper(LocalWeekYearParser);\n function LocalWeekYearParser() {\n var _this;\n _classCallCheck(this, LocalWeekYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n return _this;\n }\n _createClass(LocalWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'YY'\n };\n };\n switch (token) {\n case 'Y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case 'Yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value, options) {\n var currentYear = getUTCWeekYear(date, options);\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n }]);\n return LocalWeekYearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week-numbering year\nexport var ISOWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekYearParser, _Parser);\n var _super = _createSuper(ISOWeekYearParser);\n function ISOWeekYearParser() {\n var _this;\n _classCallCheck(this, ISOWeekYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ISOWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'R') {\n return parseNDigitsSigned(4, dateString);\n }\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n var firstWeekOfYear = new Date(0);\n firstWeekOfYear.setUTCFullYear(value, 0, 4);\n firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n return startOfUTCISOWeek(firstWeekOfYear);\n }\n }]);\n return ISOWeekYearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nexport var ExtendedYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ExtendedYearParser, _Parser);\n var _super = _createSuper(ExtendedYearParser);\n function ExtendedYearParser() {\n var _this;\n _classCallCheck(this, ExtendedYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ExtendedYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'u') {\n return parseNDigitsSigned(4, dateString);\n }\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return ExtendedYearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var QuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(QuarterParser, _Parser);\n var _super = _createSuper(QuarterParser);\n function QuarterParser() {\n var _this;\n _classCallCheck(this, QuarterParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(QuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n case 'QQ':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case 'Qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'QQQ':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'QQQQQ':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n case 'QQQQ':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return QuarterParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var StandAloneQuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneQuarterParser, _Parser);\n var _super = _createSuper(StandAloneQuarterParser);\n function StandAloneQuarterParser() {\n var _this;\n _classCallCheck(this, StandAloneQuarterParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(StandAloneQuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n case 'qq':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case 'qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'qqq':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'qqqqq':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n case 'qqqq':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return StandAloneQuarterParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nexport var MonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(MonthParser, _Parser);\n var _super = _createSuper(MonthParser);\n function MonthParser() {\n var _this;\n _classCallCheck(this, MonthParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n return _this;\n }\n _createClass(MonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n case 'MM':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case 'Mo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n case 'MMM':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // J, F, ..., D\n case 'MMMMM':\n return match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n case 'MMMM':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return MonthParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, mapValue } from \"../utils.js\";\nexport var StandAloneMonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneMonthParser, _Parser);\n var _super = _createSuper(StandAloneMonthParser);\n function StandAloneMonthParser() {\n var _this;\n _classCallCheck(this, StandAloneMonthParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(StandAloneMonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n case 'LL':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case 'Lo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n case 'LLL':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // J, F, ..., D\n case 'LLLLL':\n return match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n case 'LLLL':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return StandAloneMonthParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCWeek from \"../../../_lib/setUTCWeek/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\"; // Local week of year\nexport var LocalWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekParser, _Parser);\n var _super = _createSuper(LocalWeekParser);\n function LocalWeekParser() {\n var _this;\n _classCallCheck(this, LocalWeekParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n return _this;\n }\n _createClass(LocalWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'w':\n return parseNumericPattern(numericPatterns.week, dateString);\n case 'wo':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n return startOfUTCWeek(setUTCWeek(date, value, options), options);\n }\n }]);\n return LocalWeekParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCWeek from \"../getUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCWeek(dirtyDate, dirtyWeek, options) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var week = toInteger(dirtyWeek);\n var diff = getUTCWeek(date, options) - week;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCISOWeek from \"../../../_lib/setUTCISOWeek/index.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week of year\nexport var ISOWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekParser, _Parser);\n var _super = _createSuper(ISOWeekParser);\n function ISOWeekParser() {\n var _this;\n _classCallCheck(this, ISOWeekParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ISOWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'I':\n return parseNumericPattern(numericPatterns.week, dateString);\n case 'Io':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n return startOfUTCISOWeek(setUTCISOWeek(date, value));\n }\n }]);\n return ISOWeekParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCISOWeek from \"../getUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var isoWeek = toInteger(dirtyISOWeek);\n var diff = getUTCISOWeek(date) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { isLeapYearIndex, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n// Day of the month\nexport var DateParser = /*#__PURE__*/function (_Parser) {\n _inherits(DateParser, _Parser);\n var _super = _createSuper(DateParser);\n function DateParser() {\n var _this;\n _classCallCheck(this, DateParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"subPriority\", 1);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(DateParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'd':\n return parseNumericPattern(numericPatterns.date, dateString);\n case 'do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n var month = date.getUTCMonth();\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCDate(value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return DateParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, isLeapYearIndex } from \"../utils.js\";\nexport var DayOfYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayOfYearParser, _Parser);\n var _super = _createSuper(DayOfYearParser);\n function DayOfYearParser() {\n var _this;\n _classCallCheck(this, DayOfYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"subpriority\", 1);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(DayOfYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'D':\n case 'DD':\n return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n case 'Do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(0, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return DayOfYearParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function setUTCDay(dirtyDate, dirtyDay, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(2, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n var date = toDate(dirtyDate);\n var day = toInteger(dirtyDay);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Day of week\nexport var DayParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayParser, _Parser);\n var _super = _createSuper(DayParser);\n function DayParser() {\n var _this;\n _classCallCheck(this, DayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(DayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n case 'EEEEE':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'EEEEEE':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n case 'EEEE':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return DayParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Local day of week\nexport var LocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalDayParser, _Parser);\n var _super = _createSuper(LocalDayParser);\n function LocalDayParser() {\n var _this;\n _classCallCheck(this, LocalDayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']);\n return _this;\n }\n _createClass(LocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n switch (token) {\n // 3\n case 'e':\n case 'ee':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case 'eo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n case 'eee':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n case 'eeeee':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'eeeeee':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n case 'eeee':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return LocalDayParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Stand-alone local day of week\nexport var StandAloneLocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneLocalDayParser, _Parser);\n var _super = _createSuper(StandAloneLocalDayParser);\n function StandAloneLocalDayParser() {\n var _this;\n _classCallCheck(this, StandAloneLocalDayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']);\n return _this;\n }\n _createClass(StandAloneLocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n switch (token) {\n // 3\n case 'c':\n case 'cc':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case 'co':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n case 'ccc':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // T\n case 'ccccc':\n return match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n case 'cccccc':\n return match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tuesday\n case 'cccc':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return StandAloneLocalDayParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCISODay from \"../../../_lib/setUTCISODay/index.js\"; // ISO day of week\nexport var ISODayParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISODayParser, _Parser);\n var _super = _createSuper(ISODayParser);\n function ISODayParser() {\n var _this;\n _classCallCheck(this, ISODayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ISODayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n if (value === 0) {\n return 7;\n }\n return value;\n };\n switch (token) {\n // 2\n case 'i':\n case 'ii':\n // 02\n return parseNDigits(token.length, dateString);\n // 2nd\n case 'io':\n return match.ordinalNumber(dateString, {\n unit: 'day'\n });\n // Tue\n case 'iii':\n return mapValue(match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // T\n case 'iiiii':\n return mapValue(match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tu\n case 'iiiiii':\n return mapValue(match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tuesday\n case 'iiii':\n default:\n return mapValue(match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 7;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date = setUTCISODay(date, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return ISODayParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nexport default function setUTCISODay(dirtyDate, dirtyDay) {\n requiredArgs(2, arguments);\n var day = toInteger(dirtyDay);\n if (day % 7 === 0) {\n day = day - 7;\n }\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMParser, _Parser);\n var _super = _createSuper(AMPMParser);\n function AMPMParser() {\n var _this;\n _classCallCheck(this, AMPMParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['b', 'B', 'H', 'k', 't', 'T']);\n return _this;\n }\n _createClass(AMPMParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'aaaaa':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'aaaa':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n return AMPMParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMMidnightParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMMidnightParser, _Parser);\n var _super = _createSuper(AMPMMidnightParser);\n function AMPMMidnightParser() {\n var _this;\n _classCallCheck(this, AMPMMidnightParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'B', 'H', 'k', 't', 'T']);\n return _this;\n }\n _createClass(AMPMMidnightParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'bbbbb':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'bbbb':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n return AMPMMidnightParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\"; // in the morning, in the afternoon, in the evening, at night\nexport var DayPeriodParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayPeriodParser, _Parser);\n var _super = _createSuper(DayPeriodParser);\n function DayPeriodParser() {\n var _this;\n _classCallCheck(this, DayPeriodParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 't', 'T']);\n return _this;\n }\n _createClass(DayPeriodParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'BBBBB':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'BBBB':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n return DayPeriodParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1to12Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1to12Parser, _Parser);\n var _super = _createSuper(Hour1to12Parser);\n function Hour1to12Parser() {\n var _this;\n _classCallCheck(this, Hour1to12Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['H', 'K', 'k', 't', 'T']);\n return _this;\n }\n _createClass(Hour1to12Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'h':\n return parseNumericPattern(numericPatterns.hour12h, dateString);\n case 'ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 12;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setUTCHours(0, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n return date;\n }\n }]);\n return Hour1to12Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0to23Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0to23Parser, _Parser);\n var _super = _createSuper(Hour0to23Parser);\n function Hour0to23Parser() {\n var _this;\n _classCallCheck(this, Hour0to23Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'K', 'k', 't', 'T']);\n return _this;\n }\n _createClass(Hour0to23Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'H':\n return parseNumericPattern(numericPatterns.hour23h, dateString);\n case 'Ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 23;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(value, 0, 0, 0);\n return date;\n }\n }]);\n return Hour0to23Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0To11Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0To11Parser, _Parser);\n var _super = _createSuper(Hour0To11Parser);\n function Hour0To11Parser() {\n var _this;\n _classCallCheck(this, Hour0To11Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['h', 'H', 'k', 't', 'T']);\n return _this;\n }\n _createClass(Hour0To11Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'K':\n return parseNumericPattern(numericPatterns.hour11h, dateString);\n case 'Ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n return date;\n }\n }]);\n return Hour0To11Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1To24Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1To24Parser, _Parser);\n var _super = _createSuper(Hour1To24Parser);\n function Hour1To24Parser() {\n var _this;\n _classCallCheck(this, Hour1To24Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'H', 'K', 't', 'T']);\n return _this;\n }\n _createClass(Hour1To24Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'k':\n return parseNumericPattern(numericPatterns.hour24h, dateString);\n case 'ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 24;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var hours = value <= 24 ? value % 24 : value;\n date.setUTCHours(hours, 0, 0, 0);\n return date;\n }\n }]);\n return Hour1To24Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var MinuteParser = /*#__PURE__*/function (_Parser) {\n _inherits(MinuteParser, _Parser);\n var _super = _createSuper(MinuteParser);\n function MinuteParser() {\n var _this;\n _classCallCheck(this, MinuteParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 60);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n return _this;\n }\n _createClass(MinuteParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'm':\n return parseNumericPattern(numericPatterns.minute, dateString);\n case 'mo':\n return match.ordinalNumber(dateString, {\n unit: 'minute'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMinutes(value, 0, 0);\n return date;\n }\n }]);\n return MinuteParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var SecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(SecondParser, _Parser);\n var _super = _createSuper(SecondParser);\n function SecondParser() {\n var _this;\n _classCallCheck(this, SecondParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 50);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n return _this;\n }\n _createClass(SecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 's':\n return parseNumericPattern(numericPatterns.second, dateString);\n case 'so':\n return match.ordinalNumber(dateString, {\n unit: 'second'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCSeconds(value, 0);\n return date;\n }\n }]);\n return SecondParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nexport var FractionOfSecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(FractionOfSecondParser, _Parser);\n var _super = _createSuper(FractionOfSecondParser);\n function FractionOfSecondParser() {\n var _this;\n _classCallCheck(this, FractionOfSecondParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 30);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n return _this;\n }\n _createClass(FractionOfSecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n var valueCallback = function valueCallback(value) {\n return Math.floor(value * Math.pow(10, -token.length + 3));\n };\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMilliseconds(value);\n return date;\n }\n }]);\n return FractionOfSecondParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601. +00:00 is `'Z'`)\nexport var ISOTimezoneWithZParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneWithZParser, _Parser);\n var _super = _createSuper(ISOTimezoneWithZParser);\n function ISOTimezoneWithZParser() {\n var _this;\n _classCallCheck(this, ISOTimezoneWithZParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'x']);\n return _this;\n }\n _createClass(ISOTimezoneWithZParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'X':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n case 'XX':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case 'XXXX':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n case 'XXXXX':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n case 'XXX':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n return new Date(date.getTime() - value);\n }\n }]);\n return ISOTimezoneWithZParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601)\nexport var ISOTimezoneParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneParser, _Parser);\n var _super = _createSuper(ISOTimezoneParser);\n function ISOTimezoneParser() {\n var _this;\n _classCallCheck(this, ISOTimezoneParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'X']);\n return _this;\n }\n _createClass(ISOTimezoneParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'x':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n case 'xx':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case 'xxxx':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n case 'xxxxx':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n case 'xxx':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n return new Date(date.getTime() - value);\n }\n }]);\n return ISOTimezoneParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampSecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampSecondsParser, _Parser);\n var _super = _createSuper(TimestampSecondsParser);\n function TimestampSecondsParser() {\n var _this;\n _classCallCheck(this, TimestampSecondsParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 40);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n return _this;\n }\n _createClass(TimestampSecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value * 1000), {\n timestampIsSet: true\n }];\n }\n }]);\n return TimestampSecondsParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampMillisecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampMillisecondsParser, _Parser);\n var _super = _createSuper(TimestampMillisecondsParser);\n function TimestampMillisecondsParser() {\n var _this;\n _classCallCheck(this, TimestampMillisecondsParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 20);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n return _this;\n }\n _createClass(TimestampMillisecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value), {\n timestampIsSet: true\n }];\n }\n }]);\n return TimestampMillisecondsParser;\n}(Parser);","import { EraParser } from \"./EraParser.js\";\nimport { YearParser } from \"./YearParser.js\";\nimport { LocalWeekYearParser } from \"./LocalWeekYearParser.js\";\nimport { ISOWeekYearParser } from \"./ISOWeekYearParser.js\";\nimport { ExtendedYearParser } from \"./ExtendedYearParser.js\";\nimport { QuarterParser } from \"./QuarterParser.js\";\nimport { StandAloneQuarterParser } from \"./StandAloneQuarterParser.js\";\nimport { MonthParser } from \"./MonthParser.js\";\nimport { StandAloneMonthParser } from \"./StandAloneMonthParser.js\";\nimport { LocalWeekParser } from \"./LocalWeekParser.js\";\nimport { ISOWeekParser } from \"./ISOWeekParser.js\";\nimport { DateParser } from \"./DateParser.js\";\nimport { DayOfYearParser } from \"./DayOfYearParser.js\";\nimport { DayParser } from \"./DayParser.js\";\nimport { LocalDayParser } from \"./LocalDayParser.js\";\nimport { StandAloneLocalDayParser } from \"./StandAloneLocalDayParser.js\";\nimport { ISODayParser } from \"./ISODayParser.js\";\nimport { AMPMParser } from \"./AMPMParser.js\";\nimport { AMPMMidnightParser } from \"./AMPMMidnightParser.js\";\nimport { DayPeriodParser } from \"./DayPeriodParser.js\";\nimport { Hour1to12Parser } from \"./Hour1to12Parser.js\";\nimport { Hour0to23Parser } from \"./Hour0to23Parser.js\";\nimport { Hour0To11Parser } from \"./Hour0To11Parser.js\";\nimport { Hour1To24Parser } from \"./Hour1To24Parser.js\";\nimport { MinuteParser } from \"./MinuteParser.js\";\nimport { SecondParser } from \"./SecondParser.js\";\nimport { FractionOfSecondParser } from \"./FractionOfSecondParser.js\";\nimport { ISOTimezoneWithZParser } from \"./ISOTimezoneWithZParser.js\";\nimport { ISOTimezoneParser } from \"./ISOTimezoneParser.js\";\nimport { TimestampSecondsParser } from \"./TimestampSecondsParser.js\";\nimport { TimestampMillisecondsParser } from \"./TimestampMillisecondsParser.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\nexport var parsers = {\n G: new EraParser(),\n y: new YearParser(),\n Y: new LocalWeekYearParser(),\n R: new ISOWeekYearParser(),\n u: new ExtendedYearParser(),\n Q: new QuarterParser(),\n q: new StandAloneQuarterParser(),\n M: new MonthParser(),\n L: new StandAloneMonthParser(),\n w: new LocalWeekParser(),\n I: new ISOWeekParser(),\n d: new DateParser(),\n D: new DayOfYearParser(),\n E: new DayParser(),\n e: new LocalDayParser(),\n c: new StandAloneLocalDayParser(),\n i: new ISODayParser(),\n a: new AMPMParser(),\n b: new AMPMMidnightParser(),\n B: new DayPeriodParser(),\n h: new Hour1to12Parser(),\n H: new Hour0to23Parser(),\n K: new Hour0To11Parser(),\n k: new Hour1To24Parser(),\n m: new MinuteParser(),\n s: new SecondParser(),\n S: new FractionOfSecondParser(),\n X: new ISOTimezoneWithZParser(),\n x: new ISOTimezoneParser(),\n t: new TimestampSecondsParser(),\n T: new TimestampMillisecondsParser()\n};","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _createForOfIteratorHelper from \"@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { DateToSystemTimezoneSetter } from \"./_lib/Setter.js\";\nimport { parsers } from \"./_lib/parsers/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar notWhitespaceRegExp = /\\S/;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|Number} referenceDate - defines values missing from the parsed dateString\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\nexport default function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n requiredArgs(3, arguments);\n var dateString = String(dirtyDateString);\n var formatString = String(dirtyFormatString);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n if (!locale.match) {\n throw new RangeError('locale must contain match property');\n }\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyReferenceDate);\n } else {\n return new Date(NaN);\n }\n }\n var subFnOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale\n };\n\n // If timezone isn't specified, it will be set to the system timezone\n var setters = [new DateToSystemTimezoneSetter()];\n var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n if (firstCharacter in longFormatters) {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n }).join('').match(formattingTokensRegExp);\n var usedTokens = [];\n var _iterator = _createForOfIteratorHelper(tokens),\n _step;\n try {\n var _loop = function _loop() {\n var token = _step.value;\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n var firstCharacter = token[0];\n var parser = parsers[firstCharacter];\n if (parser) {\n var incompatibleTokens = parser.incompatibleTokens;\n if (Array.isArray(incompatibleTokens)) {\n var incompatibleToken = usedTokens.find(function (usedToken) {\n return incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter;\n });\n if (incompatibleToken) {\n throw new RangeError(\"The format string mustn't contain `\".concat(incompatibleToken.fullToken, \"` and `\").concat(token, \"` at the same time\"));\n }\n } else if (parser.incompatibleTokens === '*' && usedTokens.length > 0) {\n throw new RangeError(\"The format string mustn't contain `\".concat(token, \"` and any other token at the same time\"));\n }\n usedTokens.push({\n token: firstCharacter,\n fullToken: token\n });\n var parseResult = parser.run(dateString, token, locale.match, subFnOptions);\n if (!parseResult) {\n return {\n v: new Date(NaN)\n };\n }\n setters.push(parseResult.setter);\n dateString = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n // Replace two single quote characters with one single quote character\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n }\n\n // Cut token from string, or, if string doesn't match the token, return Invalid Date\n if (dateString.indexOf(token) === 0) {\n dateString = dateString.slice(token.length);\n } else {\n return {\n v: new Date(NaN)\n };\n }\n }\n };\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ret = _loop();\n if (_typeof(_ret) === \"object\") return _ret.v;\n }\n\n // Check if the remaining input contains something other than whitespace\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n return new Date(NaN);\n }\n var uniquePrioritySetters = setters.map(function (setter) {\n return setter.priority;\n }).sort(function (a, b) {\n return b - a;\n }).filter(function (priority, index, array) {\n return array.indexOf(priority) === index;\n }).map(function (priority) {\n return setters.filter(function (setter) {\n return setter.priority === priority;\n }).sort(function (a, b) {\n return b.subPriority - a.subPriority;\n });\n }).map(function (setterArray) {\n return setterArray[0];\n });\n var date = toDate(dirtyReferenceDate);\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n var flags = {};\n var _iterator2 = _createForOfIteratorHelper(uniquePrioritySetters),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var setter = _step2.value;\n if (!setter.validate(utcDate, subFnOptions)) {\n return new Date(NaN);\n }\n var result = setter.set(utcDate, flags, subFnOptions);\n // Result is tuple (date, flags)\n if (Array.isArray(result)) {\n utcDate = result[0];\n assign(flags, result[1]);\n // Result is date\n } else {\n utcDate = result;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n return utcDate;\n}\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth);\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n date.setFullYear(year);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport default function startOfWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\");\n // eslint-disable-next-line no-console\n console.warn(new Error().stack);\n }\n return new Date(NaN);\n }\n}","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","/*! @license DOMPurify 3.0.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.11/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());\n})(this, (function () { 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n function unapply(func) {\n return function (thisArg) {\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 return apply(func, thisArg, args);\n };\n }\n\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n function unconstruct(func) {\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 return construct(func, args);\n };\n }\n\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n\n /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n }\n\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\n\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n const DOCTYPE_NAME = seal(/^html$/i);\n const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME,\n CUSTOM_ELEMENT: CUSTOM_ELEMENT\n });\n\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.0.11';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any ocurrence of processing instructions */\n if (currentNode.nodeType === 7) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\n// istanbul ignore next\nvar statusDiv = typeof document === 'undefined' ? null : document.getElementById('a11y-status-message');\n\nvar statuses = [];\n\nfunction setStatus(status) {\n var isSameAsLast = statuses[statuses.length - 1] === status;\n if (isSameAsLast) {\n statuses = [].concat(statuses, [status]);\n } else {\n statuses = [status];\n }\n var div = getStatusDiv();\n\n // Remove previous children\n while (div.lastChild) {\n div.removeChild(div.firstChild);\n }\n\n statuses.filter(Boolean).forEach(function (statusItem, index) {\n div.appendChild(getStatusChildDiv(statusItem, index));\n });\n}\n\nfunction getStatusChildDiv(status, index) {\n var display = index === statuses.length - 1 ? 'block' : 'none';\n\n var childDiv = document.createElement('div');\n childDiv.style.display = display;\n childDiv.textContent = status;\n\n return childDiv;\n}\n\nfunction getStatusDiv() {\n if (statusDiv) {\n return statusDiv;\n }\n statusDiv = document.createElement('div');\n statusDiv.setAttribute('id', 'a11y-status-message');\n statusDiv.setAttribute('role', 'status');\n statusDiv.setAttribute('aria-live', 'assertive');\n statusDiv.setAttribute('aria-relevant', 'additions text');\n Object.assign(statusDiv.style, {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n width: '1px'\n });\n document.body.appendChild(statusDiv);\n return statusDiv;\n}\n\nvar idCounter = 0;\n\n/**\n * Accepts a parameter and returns it if it's a function\n * or a noop function if it's not. This allows us to\n * accept a callback, but not worry about it if it's not\n * passed.\n * @param {Function} cb the callback\n * @return {Function} a function\n */\nfunction cbToCb(cb) {\n return typeof cb === 'function' ? cb : noop;\n}\nfunction noop() {}\n\nfunction findParent(finder, node, rootNode) {\n if (node !== null && node !== rootNode.parentNode) {\n if (finder(node)) {\n if (node === document.body && node.scrollTop === 0) {\n // in chrome body.scrollTop always return 0\n return document.documentElement;\n }\n return node;\n } else {\n return findParent(finder, node.parentNode, rootNode);\n }\n } else {\n return null;\n }\n}\n\n/**\n * Get the closest element that scrolls\n * @param {HTMLElement} node - the child element to start searching for scroll parent at\n * @param {HTMLElement} rootNode - the root element of the component\n * @return {HTMLElement} the closest parentNode that scrolls\n */\nvar getClosestScrollParent = findParent.bind(null, function (node) {\n return node.scrollHeight > node.clientHeight;\n});\n\n/**\n * Scroll node into view if necessary\n * @param {HTMLElement} node - the element that should scroll into view\n * @param {HTMLElement} rootNode - the root element of the component\n * @param {Boolean} alignToTop - align element to the top of the visible area of the scrollable ancestor\n */\n// eslint-disable-next-line complexity\nfunction scrollIntoView(node, rootNode) {\n var scrollParent = getClosestScrollParent(node, rootNode);\n if (scrollParent === null) {\n return;\n }\n var scrollParentStyles = getComputedStyle(scrollParent);\n var scrollParentRect = scrollParent.getBoundingClientRect();\n var scrollParentBorderTopWidth = parseInt(scrollParentStyles.borderTopWidth, 10);\n var scrollParentBorderBottomWidth = parseInt(scrollParentStyles.borderBottomWidth, 10);\n var bordersWidth = scrollParentBorderTopWidth + scrollParentBorderBottomWidth;\n var scrollParentTop = scrollParentRect.top + scrollParentBorderTopWidth;\n var nodeRect = node.getBoundingClientRect();\n\n if (nodeRect.top < 0 && scrollParentRect.top < 0) {\n scrollParent.scrollTop += nodeRect.top;\n return;\n }\n\n if (nodeRect.top < 0) {\n // the item is above the viewport and the parent is not above the viewport\n scrollParent.scrollTop += nodeRect.top - scrollParentTop;\n return;\n }\n\n if (nodeRect.top > 0 && scrollParentRect.top < 0) {\n if (scrollParentRect.bottom > 0 && nodeRect.bottom + bordersWidth > scrollParentRect.bottom) {\n // the item is below scrollable area\n scrollParent.scrollTop += nodeRect.bottom - scrollParentRect.bottom + bordersWidth;\n }\n // item and parent top are on different sides of view top border (do nothing)\n return;\n }\n\n var nodeOffsetTop = nodeRect.top + scrollParent.scrollTop;\n var nodeTop = nodeOffsetTop - scrollParentTop;\n if (nodeTop < scrollParent.scrollTop) {\n // the item is above the scrollable area\n scrollParent.scrollTop = nodeTop;\n } else if (nodeTop + nodeRect.height + bordersWidth > scrollParent.scrollTop + scrollParentRect.height) {\n // the item is below the scrollable area\n scrollParent.scrollTop = nodeTop + nodeRect.height - scrollParentRect.height + bordersWidth;\n }\n // the item is within the scrollable area (do nothing)\n}\n\n/**\n * @param {HTMLElement} parent the parent node\n * @param {HTMLElement} child the child node\n * @return {Boolean} whether the parent is the child or the child is in the parent\n */\nfunction isOrContainsNode(parent, child) {\n return parent === child || parent.contains(child);\n}\n\n/**\n * Simple debounce implementation. Will call the given\n * function once after the time given has passed since\n * it was last called.\n * @param {Function} fn the function to call after the time\n * @param {Number} time the time to wait\n * @return {Function} the debounced function\n */\nfunction debounce(fn, time) {\n var timeoutId = void 0;\n return wrapper;\n function wrapper() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(function () {\n timeoutId = null;\n fn.apply(undefined, args);\n }, time);\n }\n}\n\n/**\n * This is intended to be used to compose event handlers.\n * They are executed in order until one of them sets\n * `event.preventDownshiftDefault = true`.\n * @param {Function} fns the event handler functions\n * @return {Function} the event handler to add to an element\n */\nfunction composeEventHandlers() {\n for (var _len2 = arguments.length, fns = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n fns[_key2] = arguments[_key2];\n }\n\n return function (event) {\n for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return fns.some(function (fn) {\n fn && fn.apply(undefined, [event].concat(args));\n // TODO: remove everything after the || in the next breaking change\n return event.preventDownshiftDefault || event.defaultPrevented;\n });\n };\n}\n\n/**\n * This generates a unique ID for an instance of Downshift\n * @return {String} the unique ID\n */\nfunction generateId() {\n return String(idCounter++);\n}\n\n/**\n * Resets idCounter to 0. Used for SSR.\n */\nfunction resetIdCounter() {\n idCounter = 0;\n}\n\n/**\n * Returns the first argument that is not undefined\n * @param {...*} args the arguments\n * @return {*} the defined value\n */\nfunction firstDefined() {\n for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return args.find(function (a) {\n return typeof a !== 'undefined';\n });\n}\n\n// eslint-disable-next-line complexity\nfunction getA11yStatusMessage(_ref) {\n var isOpen = _ref.isOpen,\n highlightedItem = _ref.highlightedItem,\n selectedItem = _ref.selectedItem,\n resultCount = _ref.resultCount,\n previousResultCount = _ref.previousResultCount,\n itemToString = _ref.itemToString;\n\n if (!isOpen) {\n if (selectedItem) {\n return itemToString(selectedItem);\n } else {\n return '';\n }\n }\n\n if (!resultCount) {\n return 'No results.';\n } else if (!highlightedItem || resultCount !== previousResultCount) {\n return resultCount + ' ' + (resultCount === 1 ? 'result is' : 'results are') + ' available, use up and down arrow keys to navigate.';\n }\n return itemToString(highlightedItem);\n}\n\n/**\n * Takes an argument and if it's an array, returns the first item in the array\n * otherwise returns the argument\n * @param {*} arg the maybe-array\n * @param {*} defaultValue the value if arg is falsey not defined\n * @return {*} the arg or it's first item\n */\nfunction unwrapArray(arg, defaultValue) {\n arg = Array.isArray(arg) ? /* istanbul ignore next (preact) */arg[0] : arg;\n if (!arg && defaultValue) {\n return defaultValue;\n } else {\n return arg;\n }\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Boolean} whether it's a DOM element\n */\nfunction isDOMElement(element) {\n /* istanbul ignore if */\n if (element.nodeName) {\n // then this is preact\n return typeof element.nodeName === 'string';\n } else {\n // then we assume this is react\n return typeof element.type === 'string';\n }\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Object} the props\n */\nfunction getElementProps(element) {\n // props for react, attributes for preact\n return element.props || /* istanbul ignore next (preact) */element.attributes;\n}\n\n/**\n * Throws a helpful error message for required properties. Useful\n * to be used as a default in destructuring or object params.\n * @param {String} fnName the function name\n * @param {String} propName the prop name\n */\nfunction requiredProp(fnName, propName) {\n throw new Error('The property \"' + propName + '\" is required in \"' + fnName + '\"');\n}\n\nvar stateKeys = ['highlightedIndex', 'inputValue', 'isOpen', 'selectedItem', 'type'];\n/**\n * @param {Object} state The state object\n * @return {Object} State that is relevant to downshift\n */\nfunction pickState() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var result = {};\n stateKeys.forEach(function (k) {\n if (state.hasOwnProperty(k)) {\n result[k] = state[k];\n }\n });\n return result;\n}\n\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n * @param {Object} event a KeyboardEvent object\n * @return {String} keyboard key\n */\nfunction normalizeArrowKey(event) {\n var key = event.key,\n keyCode = event.keyCode;\n /* istanbul ignore next (ie) */\n\n if (keyCode >= 37 && keyCode <= 40 && key.indexOf('Arrow') !== 0) {\n return 'Arrow' + key;\n }\n return key;\n}\n\n/**\n * Simple check if the value passed is object literal\n * @param {*} obj any things\n * @return {Boolean} whether it's object literal\n */\nfunction isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar _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\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n/* eslint camelcase:0 */\n\nvar Downshift = function (_Component) {\n inherits(Downshift, _Component);\n\n function Downshift() {\n classCallCheck(this, Downshift);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args)));\n\n _initialiseProps.call(_this);\n\n var state = _this.getState({\n highlightedIndex: _this.props.defaultHighlightedIndex,\n isOpen: _this.props.defaultIsOpen,\n inputValue: _this.props.defaultInputValue,\n selectedItem: _this.props.defaultSelectedItem\n });\n if (state.selectedItem != null) {\n state.inputValue = _this.props.itemToString(state.selectedItem);\n }\n _this.state = state;\n _this.id = _this.props.id || 'downshift-' + generateId();\n return _this;\n }\n // itemCount can be changed asynchronously\n // from within downshift (so it can't come from a prop)\n // this is why we store it as an instance and use\n // getItemCount rather than just use items.length\n // (to support windowing + async)\n\n\n /**\n * Gets the state based on internal state or props\n * If a state value is passed via props, then that\n * is the value given, otherwise it's retrieved from\n * stateToMerge\n *\n * This will perform a shallow merge of the given state object\n * with the state coming from props\n * (for the controlled component scenario)\n * This is used in state updater functions so they're referencing\n * the right state regardless of where it comes from.\n *\n * @param {Object} stateToMerge defaults to this.state\n * @return {Object} the state\n */\n Downshift.prototype.getState = function getState() {\n var _this2 = this;\n\n var stateToMerge = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.state;\n\n return Object.keys(stateToMerge).reduce(function (state, key) {\n state[key] = _this2.isControlledProp(key) ? _this2.props[key] : stateToMerge[key];\n return state;\n }, {});\n };\n\n /**\n * This determines whether a prop is a \"controlled prop\" meaning it is\n * state which is controlled by the outside of this component rather\n * than within this component.\n * @param {String} key the key to check\n * @return {Boolean} whether it is a controlled controlled prop\n */\n\n\n Downshift.prototype.isControlledProp = function isControlledProp(key) {\n return this.props[key] !== undefined;\n };\n\n Downshift.prototype.getItemCount = function getItemCount() {\n // things read better this way. They're in priority order:\n // 1. `this.itemCount`\n // 2. `this.props.itemCount`\n // 3. `this.items.length`\n /* eslint-disable no-negated-condition */\n if (this.itemCount != null) {\n return this.itemCount;\n } else if (this.props.itemCount !== undefined) {\n return this.props.itemCount;\n } else {\n return this.items.length;\n }\n /* eslint-enable no-negated-condition */\n };\n\n Downshift.prototype.getItemNodeFromIndex = function getItemNodeFromIndex(index) {\n return this.props.environment.document.getElementById(this.getItemId(index));\n };\n\n Downshift.prototype.scrollHighlightedItemIntoView = function scrollHighlightedItemIntoView() {\n /* istanbul ignore else (react-native) */\n {\n var node = this.getItemNodeFromIndex(this.getState().highlightedIndex);\n scrollIntoView(node, this._rootNode);\n }\n };\n\n Downshift.prototype.moveHighlightedIndex = function moveHighlightedIndex(amount, otherStateToSet) {\n if (this.getState().isOpen) {\n this.changeHighlightedIndex(amount, otherStateToSet);\n } else {\n this.setHighlightedIndex(undefined, _extends({ isOpen: true }, otherStateToSet));\n }\n };\n\n // eslint-disable-next-line complexity\n\n\n Downshift.prototype.changeHighlightedIndex = function changeHighlightedIndex(moveAmount, otherStateToSet) {\n var itemsLastIndex = this.getItemCount() - 1;\n if (itemsLastIndex < 0) {\n return;\n }\n\n var _getState = this.getState(),\n highlightedIndex = _getState.highlightedIndex;\n\n var baseIndex = highlightedIndex;\n if (baseIndex === null) {\n baseIndex = moveAmount > 0 ? -1 : itemsLastIndex + 1;\n }\n var newIndex = baseIndex + moveAmount;\n if (newIndex < 0) {\n newIndex = itemsLastIndex;\n } else if (newIndex > itemsLastIndex) {\n newIndex = 0;\n }\n this.setHighlightedIndex(newIndex, otherStateToSet);\n };\n\n // any piece of our state can live in two places:\n // 1. Uncontrolled: it's internal (this.state)\n // We will call this.setState to update that state\n // 2. Controlled: it's external (this.props)\n // We will call this.props.onStateChange to update that state\n //\n // In addition, we'll call this.props.onChange if the\n // selectedItem is changed.\n\n\n Downshift.prototype.getStateAndHelpers = function getStateAndHelpers() {\n var _getState2 = this.getState(),\n highlightedIndex = _getState2.highlightedIndex,\n inputValue = _getState2.inputValue,\n selectedItem = _getState2.selectedItem,\n isOpen = _getState2.isOpen;\n\n var itemToString = this.props.itemToString;\n var id = this.id;\n var getRootProps = this.getRootProps,\n getButtonProps = this.getButtonProps,\n getToggleButtonProps = this.getToggleButtonProps,\n getLabelProps = this.getLabelProps,\n getInputProps = this.getInputProps,\n getItemProps = this.getItemProps,\n openMenu = this.openMenu,\n closeMenu = this.closeMenu,\n toggleMenu = this.toggleMenu,\n selectItem = this.selectItem,\n selectItemAtIndex = this.selectItemAtIndex,\n selectHighlightedItem = this.selectHighlightedItem,\n setHighlightedIndex = this.setHighlightedIndex,\n clearSelection = this.clearSelection,\n clearItems = this.clearItems,\n reset = this.reset,\n setItemCount = this.setItemCount,\n unsetItemCount = this.unsetItemCount,\n setState = this.internalSetState;\n\n return {\n // prop getters\n getRootProps: getRootProps,\n getButtonProps: getButtonProps,\n getToggleButtonProps: getToggleButtonProps,\n getLabelProps: getLabelProps,\n getInputProps: getInputProps,\n getItemProps: getItemProps,\n\n // actions\n reset: reset,\n openMenu: openMenu,\n closeMenu: closeMenu,\n toggleMenu: toggleMenu,\n selectItem: selectItem,\n selectItemAtIndex: selectItemAtIndex,\n selectHighlightedItem: selectHighlightedItem,\n setHighlightedIndex: setHighlightedIndex,\n clearSelection: clearSelection,\n clearItems: clearItems,\n setItemCount: setItemCount,\n unsetItemCount: unsetItemCount,\n setState: setState,\n\n //props\n itemToString: itemToString,\n\n //derived\n id: id,\n\n // state\n highlightedIndex: highlightedIndex,\n inputValue: inputValue,\n isOpen: isOpen,\n selectedItem: selectedItem\n };\n };\n\n //////////////////////////// ROOT\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ROOT\n\n //////////////////////////// BUTTON\n\n // TODO: remove this in 2.0.0 and just call it `getToggleButtonProps`\n\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ BUTTON\n\n /////////////////////////////// LABEL\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ LABEL\n\n /////////////////////////////// INPUT\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ INPUT\n\n /////////////////////////////// ITEM\n Downshift.prototype.getItemId = function getItemId(index) {\n return this.id + '-item-' + index;\n };\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ITEM\n\n Downshift.prototype.componentDidMount = function componentDidMount() {\n var _this3 = this;\n\n // the _isMounted property is because we have `updateStatus` in a `debounce`\n // and we don't want to update the status if the component has been umounted\n this._isMounted = true;\n /* istanbul ignore if (react-native) */\n {\n // this.isMouseDown helps us track whether the mouse is currently held down.\n // This is useful when the user clicks on an item in the list, but holds the mouse\n // down long enough for the list to disappear (because the blur event fires on the input)\n // this.isMouseDown is used in the blur handler on the input to determine whether the blur event should\n // trigger hiding the menu.\n var onMouseDown = function () {\n _this3.isMouseDown = true;\n };\n var onMouseUp = function (event) {\n var document = _this3.props.environment.document;\n\n _this3.isMouseDown = false;\n var targetInDownshift = _this3._rootNode && isOrContainsNode(_this3._rootNode, event.target);\n var activeElementInDownshift = _this3._rootNode && isOrContainsNode(_this3._rootNode, document.activeElement);\n if (!targetInDownshift && !activeElementInDownshift && _this3.getState().isOpen) {\n _this3.reset({ type: Downshift.stateChangeTypes.mouseUp }, function () {\n return _this3.props.onOuterClick(_this3.getStateAndHelpers());\n });\n }\n };\n // Touching an element in iOS gives focus and hover states, but touching out of\n // the element will remove hover, and persist the focus state, resulting in the\n // blur event not being triggered.\n var onTouchStart = function (event) {\n var targetInDownshift = _this3._rootNode && isOrContainsNode(_this3._rootNode, event.target);\n if (!targetInDownshift && _this3.getState().isOpen) {\n _this3.reset({ type: Downshift.stateChangeTypes.touchStart }, function () {\n return _this3.props.onOuterClick(_this3.getStateAndHelpers());\n });\n }\n };\n\n this.props.environment.addEventListener('mousedown', onMouseDown);\n this.props.environment.addEventListener('mouseup', onMouseUp);\n this.props.environment.addEventListener('touchstart', onTouchStart);\n\n this.cleanup = function () {\n _this3._isMounted = false;\n _this3.props.environment.removeEventListener('mousedown', onMouseDown);\n _this3.props.environment.removeEventListener('mouseup', onMouseUp);\n _this3.props.environment.removeEventListener('touchstart', onTouchStart);\n };\n }\n };\n\n Downshift.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (this.isControlledProp('selectedItem') && this.props.selectedItemChanged(prevProps.selectedItem, this.props.selectedItem)) {\n this.internalSetState({\n type: Downshift.stateChangeTypes.controlledPropUpdatedSelectedItem,\n inputValue: this.props.itemToString(this.props.selectedItem)\n });\n }\n\n var current = this.props.highlightedIndex === undefined ? this.state : this.props;\n var prev = prevProps.highlightedIndex === undefined ? prevState : prevProps;\n\n if (current.highlightedIndex !== prev.highlightedIndex && !this.avoidScrolling) {\n this.scrollHighlightedItemIntoView();\n }\n\n this.updateStatus();\n };\n\n Downshift.prototype.componentWillUnmount = function componentWillUnmount() {\n this.cleanup(); // avoids memory leak\n };\n\n // eslint-disable-next-line complexity\n\n\n Downshift.prototype.render = function render() {\n var children = unwrapArray(this.props.render || this.props.children, noop);\n // because the items are rerendered every time we call the children\n // we clear this out each render and\n this.clearItems();\n // we reset this so we know whether the user calls getRootProps during\n // this render. If they do then we don't need to do anything,\n // if they don't then we need to clone the element they return and\n // apply the props for them.\n this.getRootProps.called = false;\n this.getRootProps.refKey = undefined;\n this.getRootProps.suppressRefError = undefined;\n // we do something similar for getLabelProps\n this.getLabelProps.called = false;\n // and something similar for getInputProps\n this.getInputProps.called = false;\n var element = unwrapArray(children(this.getStateAndHelpers()));\n if (!element) {\n return null;\n }\n if (this.getRootProps.called) {\n if (!this.getRootProps.suppressRefError) {\n validateGetRootPropsCalledCorrectly(element, this.getRootProps);\n }\n return element;\n } else if (isDOMElement(element)) {\n // they didn't apply the root props, but we can clone\n // this and apply the props ourselves\n return React.cloneElement(element, this.getRootProps(getElementProps(element)));\n } else {\n // they didn't apply the root props, but they need to\n // otherwise we can't query around the autocomplete\n throw new Error('downshift: If you return a non-DOM element, you must use apply the getRootProps function');\n }\n };\n\n return Downshift;\n}(Component);\n\nDownshift.defaultProps = {\n defaultHighlightedIndex: null,\n defaultSelectedItem: null,\n defaultInputValue: '',\n defaultIsOpen: false,\n getA11yStatusMessage: getA11yStatusMessage,\n itemToString: function itemToString(i) {\n if (i == null) {\n return '';\n }\n if (process.env.NODE_ENV !== 'production' && isPlainObject(i)) {\n //eslint-disable-next-line no-console\n console.warn('downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.', 'The object that was passed:', i);\n }\n return String(i);\n },\n onStateChange: function onStateChange() {},\n onInputValueChange: function onInputValueChange() {},\n onUserAction: function onUserAction() {},\n onChange: function onChange() {},\n onSelect: function onSelect() {},\n onOuterClick: function onOuterClick() {},\n selectedItemChanged: function selectedItemChanged(prevItem, item) {\n return prevItem !== item;\n },\n environment: typeof window === 'undefined' /* istanbul ignore next (ssr) */\n ? {} : window,\n stateReducer: function stateReducer(state, stateToSet) {\n return stateToSet;\n },\n breakingChanges: {}\n};\nDownshift.stateChangeTypes = {\n unknown: '__autocomplete_unknown__',\n mouseUp: '__autocomplete_mouseup__',\n itemMouseEnter: '__autocomplete_item_mouseenter__',\n keyDownArrowUp: '__autocomplete_keydown_arrow_up__',\n keyDownArrowDown: '__autocomplete_keydown_arrow_down__',\n keyDownEscape: '__autocomplete_keydown_escape__',\n keyDownEnter: '__autocomplete_keydown_enter__',\n clickItem: '__autocomplete_click_item__',\n blurInput: '__autocomplete_blur_input__',\n changeInput: '__autocomplete_change_input__',\n keyDownSpaceButton: '__autocomplete_keydown_space_button__',\n clickButton: '__autocomplete_click_button__',\n blurButton: '__autocomplete_blur_button__',\n controlledPropUpdatedSelectedItem: '__autocomplete_controlled_prop_updated_selected_item__',\n touchStart: '__autocomplete_touchstart__'\n};\n\nvar _initialiseProps = function () {\n var _this4 = this;\n\n this.input = null;\n this.items = [];\n this.itemCount = null;\n this.previousResultCount = 0;\n\n this.setItemCount = function (count) {\n return _this4.itemCount = count;\n };\n\n this.unsetItemCount = function () {\n return _this4.itemCount = null;\n };\n\n this.setHighlightedIndex = function () {\n var highlightedIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this4.props.defaultHighlightedIndex;\n var otherStateToSet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n otherStateToSet = pickState(otherStateToSet);\n _this4.internalSetState(_extends({ highlightedIndex: highlightedIndex }, otherStateToSet));\n };\n\n this.clearSelection = function (cb) {\n _this4.internalSetState({\n selectedItem: null,\n inputValue: '',\n isOpen: false\n }, cb);\n };\n\n this.selectItem = function (item, otherStateToSet, cb) {\n otherStateToSet = pickState(otherStateToSet);\n _this4.internalSetState(_extends({\n isOpen: false,\n highlightedIndex: _this4.props.defaultHighlightedIndex,\n selectedItem: item,\n inputValue: _this4.isControlledProp('selectedItem') && _this4.props.breakingChanges.resetInputOnSelection ? _this4.props.defaultInputValue : _this4.props.itemToString(item)\n }, otherStateToSet), cb);\n };\n\n this.selectItemAtIndex = function (itemIndex, otherStateToSet, cb) {\n var item = _this4.items[itemIndex];\n if (item == null) {\n return;\n }\n _this4.selectItem(item, otherStateToSet, cb);\n };\n\n this.selectHighlightedItem = function (otherStateToSet, cb) {\n return _this4.selectItemAtIndex(_this4.getState().highlightedIndex, otherStateToSet, cb);\n };\n\n this.internalSetState = function (stateToSet, cb) {\n var isItemSelected = void 0,\n onChangeArg = void 0;\n\n var onStateChangeArg = {};\n var isStateToSetFunction = typeof stateToSet === 'function';\n\n // we want to call `onInputValueChange` before the `setState` call\n // so someone controlling the `inputValue` state gets notified of\n // the input change as soon as possible. This avoids issues with\n // preserving the cursor position.\n // See https://github.com/paypal/downshift/issues/217 for more info.\n if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {\n _this4.props.onInputValueChange(stateToSet.inputValue, _extends({}, _this4.getStateAndHelpers(), stateToSet));\n }\n return _this4.setState(function (state) {\n state = _this4.getState(state);\n var newStateToSet = isStateToSetFunction ? stateToSet(state) : stateToSet;\n\n // Your own function that could modify the state that will be set.\n newStateToSet = _this4.props.stateReducer(state, newStateToSet);\n\n // checks if an item is selected, regardless of if it's different from\n // what was selected before\n // used to determine if onSelect and onChange callbacks should be called\n isItemSelected = newStateToSet.hasOwnProperty('selectedItem');\n // this keeps track of the object we want to call with setState\n var nextState = {};\n // this is just used to tell whether the state changed\n var nextFullState = {};\n // we need to call on change if the outside world is controlling any of our state\n // and we're trying to update that state. OR if the selection has changed and we're\n // trying to update the selection\n if (isItemSelected && newStateToSet.selectedItem !== state.selectedItem) {\n onChangeArg = newStateToSet.selectedItem;\n }\n newStateToSet.type = newStateToSet.type || Downshift.stateChangeTypes.unknown;\n\n Object.keys(newStateToSet).forEach(function (key) {\n // onStateChangeArg should only have the state that is\n // actually changing\n if (state[key] !== newStateToSet[key]) {\n onStateChangeArg[key] = newStateToSet[key];\n }\n // the type is useful for the onStateChangeArg\n // but we don't actually want to set it in internal state.\n // this is an undocumented feature for now... Not all internalSetState\n // calls support it and I'm not certain we want them to yet.\n // But it enables users controlling the isOpen state to know when\n // the isOpen state changes due to mouseup events which is quite handy.\n if (key === 'type') {\n return;\n }\n nextFullState[key] = newStateToSet[key];\n // if it's coming from props, then we don't care to set it internally\n if (!_this4.isControlledProp(key)) {\n nextState[key] = newStateToSet[key];\n }\n });\n\n // if stateToSet is a function, then we weren't able to call onInputValueChange\n // earlier, so we'll call it now that we know what the inputValue state will be.\n if (isStateToSetFunction && newStateToSet.hasOwnProperty('inputValue')) {\n _this4.props.onInputValueChange(newStateToSet.inputValue, _extends({}, _this4.getStateAndHelpers(), newStateToSet));\n }\n\n return nextState;\n }, function () {\n // call the provided callback if it's a callback\n cbToCb(cb)();\n\n // only call the onStateChange and onChange callbacks if\n // we have relevant information to pass them.\n var hasMoreStateThanType = Object.keys(onStateChangeArg).length > 1;\n if (hasMoreStateThanType) {\n _this4.props.onStateChange(onStateChangeArg, _this4.getStateAndHelpers());\n }\n\n if (isItemSelected) {\n _this4.props.onSelect(stateToSet.selectedItem, _this4.getStateAndHelpers());\n }\n\n if (onChangeArg !== undefined) {\n _this4.props.onChange(onChangeArg, _this4.getStateAndHelpers());\n }\n // this is currently undocumented and therefore subject to change\n // We'll try to not break it, but just be warned.\n _this4.props.onUserAction(onStateChangeArg, _this4.getStateAndHelpers());\n });\n };\n\n this.rootRef = function (node) {\n return _this4._rootNode = node;\n };\n\n this.getRootProps = function () {\n var _babelHelpers$extends;\n\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref3$suppressRefErro = _ref3.suppressRefError,\n suppressRefError = _ref3$suppressRefErro === undefined ? false : _ref3$suppressRefErro;\n\n var _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === undefined ? 'ref' : _ref2$refKey,\n rest = objectWithoutProperties(_ref2, ['refKey']);\n\n // this is used in the render to know whether the user has called getRootProps.\n // It uses that to know whether to apply the props automatically\n _this4.getRootProps.called = true;\n _this4.getRootProps.refKey = refKey;\n _this4.getRootProps.suppressRefError = suppressRefError;\n return _extends((_babelHelpers$extends = {}, _babelHelpers$extends[refKey] = _this4.rootRef, _babelHelpers$extends), rest);\n };\n\n this.keyDownHandlers = {\n ArrowDown: function ArrowDown(event) {\n event.preventDefault();\n var amount = event.shiftKey ? 5 : 1;\n this.moveHighlightedIndex(amount, {\n type: Downshift.stateChangeTypes.keyDownArrowDown\n });\n },\n ArrowUp: function ArrowUp(event) {\n event.preventDefault();\n var amount = event.shiftKey ? -5 : -1;\n this.moveHighlightedIndex(amount, {\n type: Downshift.stateChangeTypes.keyDownArrowUp\n });\n },\n Enter: function Enter(event) {\n if (this.getState().isOpen) {\n event.preventDefault();\n var itemIndex = this.getState().highlightedIndex;\n var item = this.items[itemIndex];\n var itemNode = this.getItemNodeFromIndex(itemIndex);\n if (item == null || itemNode && itemNode.hasAttribute('disabled')) {\n return;\n }\n this.selectHighlightedItem({\n type: Downshift.stateChangeTypes.keyDownEnter\n });\n }\n },\n Escape: function Escape(event) {\n event.preventDefault();\n this.reset({ type: Downshift.stateChangeTypes.keyDownEscape });\n }\n };\n this.buttonKeyDownHandlers = _extends({}, this.keyDownHandlers, {\n ' ': function _(event) {\n event.preventDefault();\n this.toggleMenu({ type: Downshift.stateChangeTypes.keyDownSpaceButton });\n }\n });\n\n this.getToggleButtonProps = function () {\n var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var onClick = _ref4.onClick,\n onKeyDown = _ref4.onKeyDown,\n onBlur = _ref4.onBlur,\n rest = objectWithoutProperties(_ref4, ['onClick', 'onKeyDown', 'onBlur']);\n\n var _getState3 = _this4.getState(),\n isOpen = _getState3.isOpen;\n\n var enabledEventHandlers = {\n onClick: composeEventHandlers(onClick, _this4.button_handleClick),\n onKeyDown: composeEventHandlers(onKeyDown, _this4.button_handleKeyDown),\n onBlur: composeEventHandlers(onBlur, _this4.button_handleBlur)\n };\n var eventHandlers = rest.disabled ? {} : enabledEventHandlers;\n return _extends({\n type: 'button',\n role: 'button',\n 'aria-label': isOpen ? 'close menu' : 'open menu',\n 'aria-expanded': isOpen,\n 'aria-haspopup': true,\n 'data-toggle': true\n }, eventHandlers, rest);\n };\n\n this.getButtonProps = this.getToggleButtonProps;\n\n this.button_handleKeyDown = function (event) {\n var key = normalizeArrowKey(event);\n if (_this4.buttonKeyDownHandlers[key]) {\n _this4.buttonKeyDownHandlers[key].call(_this4, event);\n }\n };\n\n this.button_handleClick = function (event) {\n event.preventDefault();\n // handle odd case for Safari and Firefox which\n // don't give the button the focus properly.\n /* istanbul ignore if (can't reasonably test this) */\n if (_this4.props.environment.document.activeElement === _this4.props.environment.document.body) {\n event.target.focus();\n }\n // to simplify testing components that use downshift, we'll not wrap this in a setTimeout\n // if the NODE_ENV is test. With the proper build system, this should be dead code eliminated\n // when building for production and should therefore have no impact on production code.\n if (process.env.NODE_ENV === 'test') {\n _this4.toggleMenu({ type: Downshift.stateChangeTypes.clickButton });\n } else {\n // Ensure that toggle of menu occurs after the potential blur event in iOS\n setTimeout(function () {\n return _this4.toggleMenu({ type: Downshift.stateChangeTypes.clickButton });\n });\n }\n };\n\n this.button_handleBlur = function (event) {\n var blurTarget = event.target; // Save blur target for comparison with activeElement later\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not body element\n setTimeout(function () {\n if (!_this4.isMouseDown && (_this4.props.environment.document.activeElement == null || _this4.props.environment.document.activeElement.id !== _this4.inputId) && _this4.props.environment.document.activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)\n ) {\n _this4.reset({ type: Downshift.stateChangeTypes.blurButton });\n }\n });\n };\n\n this.getLabelProps = function () {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _this4.getLabelProps.called = true;\n if (_this4.getInputProps.called && props.htmlFor && props.htmlFor !== _this4.inputId) {\n throw new Error('downshift: You provided the htmlFor of \"' + props.htmlFor + '\" for your label, but the id of your input is \"' + _this4.inputId + '\". You must either remove the id from your input or set the htmlFor of the label equal to the input id.');\n }\n _this4.inputId = firstDefined(_this4.inputId, props.htmlFor, _this4.id + '-input');\n return _extends({}, props, {\n htmlFor: _this4.inputId\n });\n };\n\n this.getInputProps = function () {\n var _ref6;\n\n var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var onKeyDown = _ref5.onKeyDown,\n onBlur = _ref5.onBlur,\n onChange = _ref5.onChange,\n onInput = _ref5.onInput,\n rest = objectWithoutProperties(_ref5, ['onKeyDown', 'onBlur', 'onChange', 'onInput']);\n\n _this4.getInputProps.called = true;\n if (_this4.getLabelProps.called && rest.id && rest.id !== _this4.inputId) {\n throw new Error('downshift: You provided the id of \"' + rest.id + '\" for your input, but the htmlFor of your label is \"' + _this4.inputId + '\". You must either remove the id from your input or set the htmlFor of the label equal to the input id.');\n }\n _this4.inputId = firstDefined(_this4.inputId, rest.id, _this4.id + '-input');\n var onChangeKey = void 0;\n /* istanbul ignore next (preact) */\n onChangeKey = 'onChange';\n\n var _getState4 = _this4.getState(),\n inputValue = _getState4.inputValue,\n isOpen = _getState4.isOpen,\n highlightedIndex = _getState4.highlightedIndex;\n\n var eventHandlers = rest.disabled ? {} : (_ref6 = {}, _ref6[onChangeKey] = composeEventHandlers(onChange, onInput, _this4.input_handleChange), _ref6.onKeyDown = composeEventHandlers(onKeyDown, _this4.input_handleKeyDown), _ref6.onBlur = composeEventHandlers(onBlur, _this4.input_handleBlur), _ref6);\n return _extends({\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': isOpen,\n 'aria-activedescendant': isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0 ? _this4.getItemId(highlightedIndex) : null,\n autoComplete: 'off',\n value: inputValue\n }, eventHandlers, rest, {\n id: _this4.inputId\n });\n };\n\n this.input_handleKeyDown = function (event) {\n var key = normalizeArrowKey(event);\n if (key && _this4.keyDownHandlers[key]) {\n _this4.keyDownHandlers[key].call(_this4, event);\n }\n };\n\n this.input_handleChange = function (event) {\n _this4.internalSetState({\n type: Downshift.stateChangeTypes.changeInput,\n isOpen: true,\n inputValue: event.target.value\n });\n };\n\n this.input_handleBlur = function () {\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not the body element\n setTimeout(function () {\n var downshiftButtonIsActive = _this4.props.environment.document.activeElement.dataset.toggle && _this4._rootNode && _this4._rootNode.contains(_this4.props.environment.document.activeElement);\n if (!_this4.isMouseDown && !downshiftButtonIsActive) {\n _this4.reset({ type: Downshift.stateChangeTypes.blurInput });\n }\n });\n };\n\n this.getItemProps = function () {\n var _enabledEventHandlers;\n\n var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var onMouseMove = _ref7.onMouseMove,\n onMouseDown = _ref7.onMouseDown,\n onClick = _ref7.onClick,\n index = _ref7.index,\n _ref7$item = _ref7.item,\n item = _ref7$item === undefined ? requiredProp('getItemProps', 'item') : _ref7$item,\n rest = objectWithoutProperties(_ref7, ['onMouseMove', 'onMouseDown', 'onClick', 'index', 'item']);\n\n if (index === undefined) {\n _this4.items.push(item);\n index = _this4.items.indexOf(item);\n } else {\n _this4.items[index] = item;\n }\n\n var onSelectKey = 'onClick';\n\n var enabledEventHandlers = (_enabledEventHandlers = {\n // onMouseMove is used over onMouseEnter here. onMouseMove\n // is only triggered on actual mouse movement while onMouseEnter\n // can fire on DOM changes, interrupting keyboard navigation\n onMouseMove: composeEventHandlers(onMouseMove, function () {\n if (index === _this4.getState().highlightedIndex) {\n return;\n }\n _this4.setHighlightedIndex(index, {\n type: Downshift.stateChangeTypes.itemMouseEnter\n });\n\n // We never want to manually scroll when changing state based\n // on `onMouseMove` because we will be moving the element out\n // from under the user which is currently scrolling/moving the\n // cursor\n _this4.avoidScrolling = true;\n setTimeout(function () {\n return _this4.avoidScrolling = false;\n }, 250);\n }),\n onMouseDown: composeEventHandlers(onMouseDown, function (event) {\n // This prevents the activeElement from being changed\n // to the item so it can remain with the current activeElement\n // which is a more common use case.\n event.preventDefault();\n })\n }, _enabledEventHandlers[onSelectKey] = composeEventHandlers(onClick, function () {\n _this4.selectItemAtIndex(index, {\n type: Downshift.stateChangeTypes.clickItem\n });\n }), _enabledEventHandlers);\n\n var eventHandlers = rest.disabled ? {} : enabledEventHandlers;\n\n return _extends({\n id: _this4.getItemId(index)\n }, eventHandlers, rest);\n };\n\n this.clearItems = function () {\n _this4.items = [];\n };\n\n this.reset = function () {\n var otherStateToSet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var cb = arguments[1];\n\n otherStateToSet = pickState(otherStateToSet);\n _this4.internalSetState(function (_ref8) {\n var selectedItem = _ref8.selectedItem;\n return _extends({\n isOpen: false,\n highlightedIndex: _this4.props.defaultHighlightedIndex,\n inputValue: _this4.props.itemToString(selectedItem)\n }, otherStateToSet);\n }, cbToCb(cb));\n };\n\n this.toggleMenu = function () {\n var otherStateToSet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var cb = arguments[1];\n\n otherStateToSet = pickState(otherStateToSet);\n _this4.internalSetState(function (_ref9) {\n var isOpen = _ref9.isOpen;\n\n return _extends({ isOpen: !isOpen }, otherStateToSet);\n }, function () {\n var _getState5 = _this4.getState(),\n isOpen = _getState5.isOpen;\n\n if (isOpen) {\n // highlight default index\n _this4.setHighlightedIndex(undefined, otherStateToSet);\n }\n cbToCb(cb)();\n });\n };\n\n this.openMenu = function (cb) {\n _this4.internalSetState({ isOpen: true }, cbToCb(cb));\n };\n\n this.closeMenu = function (cb) {\n _this4.internalSetState({ isOpen: false }, cbToCb(cb));\n };\n\n this.updateStatus = debounce(function () {\n if (!_this4._isMounted) {\n return;\n }\n var state = _this4.getState();\n var item = _this4.items[state.highlightedIndex];\n var resultCount = _this4.getItemCount();\n var status = _this4.props.getA11yStatusMessage(_extends({\n itemToString: _this4.props.itemToString,\n previousResultCount: _this4.previousResultCount,\n resultCount: resultCount,\n highlightedItem: item\n }, state));\n _this4.previousResultCount = resultCount;\n /* istanbul ignore else (react-native) */\n setStatus(status);\n }, 200);\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Downshift.propTypes = {\n children: PropTypes.func,\n render: PropTypes.func,\n defaultHighlightedIndex: PropTypes.number,\n defaultSelectedItem: PropTypes.any,\n defaultInputValue: PropTypes.string,\n defaultIsOpen: PropTypes.bool,\n getA11yStatusMessage: PropTypes.func,\n itemToString: PropTypes.func,\n onChange: PropTypes.func,\n onSelect: PropTypes.func,\n onStateChange: PropTypes.func,\n onInputValueChange: PropTypes.func,\n onUserAction: PropTypes.func,\n onOuterClick: PropTypes.func,\n selectedItemChanged: PropTypes.func,\n stateReducer: PropTypes.func,\n itemCount: PropTypes.number,\n id: PropTypes.string,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n }),\n // things we keep in state for uncontrolled components\n // but can accept as props for controlled components\n /* eslint-disable react/no-unused-prop-types */\n selectedItem: PropTypes.any,\n isOpen: PropTypes.bool,\n inputValue: PropTypes.string,\n highlightedIndex: PropTypes.number,\n breakingChanges: PropTypes.shape({\n resetInputOnSelection: PropTypes.bool\n })\n /* eslint-enable */\n} : void 0;\n\nfunction validateGetRootPropsCalledCorrectly(element, _ref) {\n var refKey = _ref.refKey;\n\n var refKeySpecified = refKey !== 'ref';\n var isComposite = !isDOMElement(element);\n if (isComposite && !refKeySpecified) {\n throw new Error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');\n } else if (!isComposite && refKeySpecified) {\n throw new Error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \"' + refKey + '\"');\n }\n if (!getElementProps(element)[refKey]) {\n throw new Error('downshift: You must apply the ref prop \"' + refKey + '\" from getRootProps onto your root element.');\n }\n}\n\n/*\n * Fix importing in typescript after rollup compilation\n * https://github.com/rollup/rollup/issues/1156\n * https://github.com/Microsoft/TypeScript/issues/13017#issuecomment-268657860\n */\nDownshift.default = Downshift;\nDownshift.resetIdCounter = resetIdCounter;\n\nexport default Downshift;\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\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;","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.draftjsToHtml = factory());\n}(this, (function () { 'use strict';\n\n /**\n * Utility function to execute callback for eack key->value pair.\n */\n function forEach(obj, callback) {\n if (obj) {\n for (var key in obj) {\n // eslint-disable-line no-restricted-syntax\n if ({}.hasOwnProperty.call(obj, key)) {\n callback(key, obj[key]);\n }\n }\n }\n }\n /**\n * The function returns true if the string passed to it has no content.\n */\n\n function isEmptyString(str) {\n if (str === undefined || str === null || str.length === 0 || str.trim().length === 0) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Mapping block-type to corresponding html tag.\n */\n\n var blockTypesMapping = {\n unstyled: 'p',\n 'header-one': 'h1',\n 'header-two': 'h2',\n 'header-three': 'h3',\n 'header-four': 'h4',\n 'header-five': 'h5',\n 'header-six': 'h6',\n 'unordered-list-item': 'ul',\n 'ordered-list-item': 'ol',\n blockquote: 'blockquote',\n code: 'pre'\n };\n /**\n * Function will return HTML tag for a block.\n */\n\n function getBlockTag(type) {\n return type && blockTypesMapping[type];\n }\n /**\n * Function will return style string for a block.\n */\n\n function getBlockStyle(data) {\n var styles = '';\n forEach(data, function (key, value) {\n if (value) {\n styles += \"\".concat(key, \":\").concat(value, \";\");\n }\n });\n return styles;\n }\n /**\n * The function returns an array of hashtag-sections in blocks.\n * These will be areas in block which have hashtags applicable to them.\n */\n\n function getHashtagRanges(blockText, hashtagConfig) {\n var sections = [];\n\n if (hashtagConfig) {\n var counter = 0;\n var startIndex = 0;\n var text = blockText;\n var trigger = hashtagConfig.trigger || '#';\n var separator = hashtagConfig.separator || ' ';\n\n for (; text.length > 0 && startIndex >= 0;) {\n if (text[0] === trigger) {\n startIndex = 0;\n counter = 0;\n text = text.substr(trigger.length);\n } else {\n startIndex = text.indexOf(separator + trigger);\n\n if (startIndex >= 0) {\n text = text.substr(startIndex + (separator + trigger).length);\n counter += startIndex + separator.length;\n }\n }\n\n if (startIndex >= 0) {\n var endIndex = text.indexOf(separator) >= 0 ? text.indexOf(separator) : text.length;\n var hashtag = text.substr(0, endIndex);\n\n if (hashtag && hashtag.length > 0) {\n sections.push({\n offset: counter,\n length: hashtag.length + trigger.length,\n type: 'HASHTAG'\n });\n }\n\n counter += trigger.length;\n }\n }\n }\n\n return sections;\n }\n /**\n * The function returns an array of entity-sections in blocks.\n * These will be areas in block which have same entity or no entity applicable to them.\n */\n\n\n function getSections(block, hashtagConfig) {\n var sections = [];\n var lastOffset = 0;\n var sectionRanges = block.entityRanges.map(function (range) {\n var offset = range.offset,\n length = range.length,\n key = range.key;\n return {\n offset: offset,\n length: length,\n key: key,\n type: 'ENTITY'\n };\n });\n sectionRanges = sectionRanges.concat(getHashtagRanges(block.text, hashtagConfig));\n sectionRanges = sectionRanges.sort(function (s1, s2) {\n return s1.offset - s2.offset;\n });\n sectionRanges.forEach(function (r) {\n if (r.offset > lastOffset) {\n sections.push({\n start: lastOffset,\n end: r.offset\n });\n }\n\n sections.push({\n start: r.offset,\n end: r.offset + r.length,\n entityKey: r.key,\n type: r.type\n });\n lastOffset = r.offset + r.length;\n });\n\n if (lastOffset < block.text.length) {\n sections.push({\n start: lastOffset,\n end: block.text.length\n });\n }\n\n return sections;\n }\n /**\n * Function to check if the block is an atomic entity block.\n */\n\n\n function isAtomicEntityBlock(block) {\n if (block.entityRanges.length > 0 && (isEmptyString(block.text) || block.type === 'atomic')) {\n return true;\n }\n\n return false;\n }\n /**\n * The function will return array of inline styles applicable to the block.\n */\n\n\n function getStyleArrayForBlock(block) {\n var text = block.text,\n inlineStyleRanges = block.inlineStyleRanges;\n var inlineStyles = {\n BOLD: new Array(text.length),\n ITALIC: new Array(text.length),\n UNDERLINE: new Array(text.length),\n STRIKETHROUGH: new Array(text.length),\n CODE: new Array(text.length),\n SUPERSCRIPT: new Array(text.length),\n SUBSCRIPT: new Array(text.length),\n COLOR: new Array(text.length),\n BGCOLOR: new Array(text.length),\n FONTSIZE: new Array(text.length),\n FONTFAMILY: new Array(text.length),\n length: text.length\n };\n\n if (inlineStyleRanges && inlineStyleRanges.length > 0) {\n inlineStyleRanges.forEach(function (range) {\n var offset = range.offset;\n var length = offset + range.length;\n\n for (var i = offset; i < length; i += 1) {\n if (range.style.indexOf('color-') === 0) {\n inlineStyles.COLOR[i] = range.style.substring(6);\n } else if (range.style.indexOf('bgcolor-') === 0) {\n inlineStyles.BGCOLOR[i] = range.style.substring(8);\n } else if (range.style.indexOf('fontsize-') === 0) {\n inlineStyles.FONTSIZE[i] = range.style.substring(9);\n } else if (range.style.indexOf('fontfamily-') === 0) {\n inlineStyles.FONTFAMILY[i] = range.style.substring(11);\n } else if (inlineStyles[range.style]) {\n inlineStyles[range.style][i] = true;\n }\n }\n });\n }\n\n return inlineStyles;\n }\n /**\n * The function will return inline style applicable at some offset within a block.\n */\n\n\n function getStylesAtOffset(inlineStyles, offset) {\n var styles = {};\n\n if (inlineStyles.COLOR[offset]) {\n styles.COLOR = inlineStyles.COLOR[offset];\n }\n\n if (inlineStyles.BGCOLOR[offset]) {\n styles.BGCOLOR = inlineStyles.BGCOLOR[offset];\n }\n\n if (inlineStyles.FONTSIZE[offset]) {\n styles.FONTSIZE = inlineStyles.FONTSIZE[offset];\n }\n\n if (inlineStyles.FONTFAMILY[offset]) {\n styles.FONTFAMILY = inlineStyles.FONTFAMILY[offset];\n }\n\n if (inlineStyles.UNDERLINE[offset]) {\n styles.UNDERLINE = true;\n }\n\n if (inlineStyles.ITALIC[offset]) {\n styles.ITALIC = true;\n }\n\n if (inlineStyles.BOLD[offset]) {\n styles.BOLD = true;\n }\n\n if (inlineStyles.STRIKETHROUGH[offset]) {\n styles.STRIKETHROUGH = true;\n }\n\n if (inlineStyles.CODE[offset]) {\n styles.CODE = true;\n }\n\n if (inlineStyles.SUBSCRIPT[offset]) {\n styles.SUBSCRIPT = true;\n }\n\n if (inlineStyles.SUPERSCRIPT[offset]) {\n styles.SUPERSCRIPT = true;\n }\n\n return styles;\n }\n /**\n * Function returns true for a set of styles if the value of these styles at an offset\n * are same as that on the previous offset.\n */\n\n function sameStyleAsPrevious(inlineStyles, styles, index) {\n var sameStyled = true;\n\n if (index > 0 && index < inlineStyles.length) {\n styles.forEach(function (style) {\n sameStyled = sameStyled && inlineStyles[style][index] === inlineStyles[style][index - 1];\n });\n } else {\n sameStyled = false;\n }\n\n return sameStyled;\n }\n /**\n * Function returns html for text depending on inline style tags applicable to it.\n */\n\n function addInlineStyleMarkup(style, content) {\n if (style === 'BOLD') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'ITALIC') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'UNDERLINE') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'STRIKETHROUGH') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'CODE') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'SUPERSCRIPT') {\n return \"\".concat(content, \"\");\n }\n\n if (style === 'SUBSCRIPT') {\n return \"\".concat(content, \"\");\n }\n\n return content;\n }\n /**\n * The function returns text for given section of block after doing required character replacements.\n */\n\n function getSectionText(text) {\n if (text && text.length > 0) {\n var chars = text.map(function (ch) {\n switch (ch) {\n case '\\n':\n return '
';\n\n case '&':\n return '&';\n\n case '<':\n return '<';\n\n case '>':\n return '>';\n\n default:\n return ch;\n }\n });\n return chars.join('');\n }\n\n return '';\n }\n /**\n * Function returns html for text depending on inline style tags applicable to it.\n */\n\n\n function addStylePropertyMarkup(styles, text) {\n if (styles && (styles.COLOR || styles.BGCOLOR || styles.FONTSIZE || styles.FONTFAMILY)) {\n var styleString = 'style=\"';\n\n if (styles.COLOR) {\n styleString += \"color: \".concat(styles.COLOR, \";\");\n }\n\n if (styles.BGCOLOR) {\n styleString += \"background-color: \".concat(styles.BGCOLOR, \";\");\n }\n\n if (styles.FONTSIZE) {\n styleString += \"font-size: \".concat(styles.FONTSIZE).concat(/^\\d+$/.test(styles.FONTSIZE) ? 'px' : '', \";\");\n }\n\n if (styles.FONTFAMILY) {\n styleString += \"font-family: \".concat(styles.FONTFAMILY, \";\");\n }\n\n styleString += '\"';\n return \"\").concat(text, \"\");\n }\n\n return text;\n }\n /**\n * Function will return markup for Entity.\n */\n\n function getEntityMarkup(entityMap, entityKey, text, customEntityTransform) {\n var entity = entityMap[entityKey];\n\n if (typeof customEntityTransform === 'function') {\n var html = customEntityTransform(entity, text);\n\n if (html) {\n return html;\n }\n }\n\n if (entity.type === 'MENTION') {\n return \"\").concat(text, \"\");\n }\n\n if (entity.type === 'LINK') {\n var targetOption = entity.data.targetOption || '_self';\n return \"\").concat(text, \"\");\n }\n\n if (entity.type === 'IMAGE') {\n var alignment = entity.data.alignment;\n\n if (alignment && alignment.length) {\n return \"
\\\"\").concat(entity.data.alt,
\");\n }\n\n return \"\\\"\").concat(entity.data.alt,\");\n }\n\n if (entity.type === 'EMBEDDED_LINK') {\n return \"\");\n }\n\n return text;\n }\n /**\n * For a given section in a block the function will return a further list of sections,\n * with similar inline styles applicable to them.\n */\n\n\n function getInlineStyleSections(block, styles, start, end) {\n var styleSections = [];\n var text = Array.from(block.text);\n\n if (text.length > 0) {\n var inlineStyles = getStyleArrayForBlock(block);\n var section;\n\n for (var i = start; i < end; i += 1) {\n if (i !== start && sameStyleAsPrevious(inlineStyles, styles, i)) {\n section.text.push(text[i]);\n section.end = i + 1;\n } else {\n section = {\n styles: getStylesAtOffset(inlineStyles, i),\n text: [text[i]],\n start: i,\n end: i + 1\n };\n styleSections.push(section);\n }\n }\n }\n\n return styleSections;\n }\n /**\n * Replace leading blank spaces by  \n */\n\n\n function trimLeadingZeros(sectionText) {\n if (sectionText) {\n var replacedText = sectionText;\n\n for (var i = 0; i < replacedText.length; i += 1) {\n if (sectionText[i] === ' ') {\n replacedText = replacedText.replace(' ', ' ');\n } else {\n break;\n }\n }\n\n return replacedText;\n }\n\n return sectionText;\n }\n /**\n * Replace trailing blank spaces by  \n */\n\n function trimTrailingZeros(sectionText) {\n if (sectionText) {\n var replacedText = sectionText;\n\n for (var i = replacedText.length - 1; i >= 0; i -= 1) {\n if (replacedText[i] === ' ') {\n replacedText = \"\".concat(replacedText.substring(0, i), \" \").concat(replacedText.substring(i + 1));\n } else {\n break;\n }\n }\n\n return replacedText;\n }\n\n return sectionText;\n }\n /**\n * The method returns markup for section to which inline styles\n * like BOLD, ITALIC, UNDERLINE, STRIKETHROUGH, CODE, SUPERSCRIPT, SUBSCRIPT are applicable.\n */\n\n function getStyleTagSectionMarkup(styleSection) {\n var styles = styleSection.styles,\n text = styleSection.text;\n var content = getSectionText(text);\n forEach(styles, function (style, value) {\n content = addInlineStyleMarkup(style, content);\n });\n return content;\n }\n /**\n * The method returns markup for section to which inline styles\n like color, background-color, font-size are applicable.\n */\n\n\n function getInlineStyleSectionMarkup(block, styleSection) {\n var styleTagSections = getInlineStyleSections(block, ['BOLD', 'ITALIC', 'UNDERLINE', 'STRIKETHROUGH', 'CODE', 'SUPERSCRIPT', 'SUBSCRIPT'], styleSection.start, styleSection.end);\n var styleSectionText = '';\n styleTagSections.forEach(function (stylePropertySection) {\n styleSectionText += getStyleTagSectionMarkup(stylePropertySection);\n });\n styleSectionText = addStylePropertyMarkup(styleSection.styles, styleSectionText);\n return styleSectionText;\n }\n /*\n * The method returns markup for an entity section.\n * An entity section is a continuous section in a block\n * to which same entity or no entity is applicable.\n */\n\n\n function getSectionMarkup(block, entityMap, section, customEntityTransform) {\n var entityInlineMarkup = [];\n var inlineStyleSections = getInlineStyleSections(block, ['COLOR', 'BGCOLOR', 'FONTSIZE', 'FONTFAMILY'], section.start, section.end);\n inlineStyleSections.forEach(function (styleSection) {\n entityInlineMarkup.push(getInlineStyleSectionMarkup(block, styleSection));\n });\n var sectionText = entityInlineMarkup.join('');\n\n if (section.type === 'ENTITY') {\n if (section.entityKey !== undefined && section.entityKey !== null) {\n sectionText = getEntityMarkup(entityMap, section.entityKey, sectionText, customEntityTransform); // eslint-disable-line max-len\n }\n } else if (section.type === 'HASHTAG') {\n sectionText = \"\").concat(sectionText, \"\");\n }\n\n return sectionText;\n }\n /**\n * Function will return the markup for block preserving the inline styles and\n * special characters like newlines or blank spaces.\n */\n\n\n function getBlockInnerMarkup(block, entityMap, hashtagConfig, customEntityTransform) {\n var blockMarkup = [];\n var sections = getSections(block, hashtagConfig);\n sections.forEach(function (section, index) {\n var sectionText = getSectionMarkup(block, entityMap, section, customEntityTransform);\n\n if (index === 0) {\n sectionText = trimLeadingZeros(sectionText);\n }\n\n if (index === sections.length - 1) {\n sectionText = trimTrailingZeros(sectionText);\n }\n\n blockMarkup.push(sectionText);\n });\n return blockMarkup.join('');\n }\n /**\n * Function will return html for the block.\n */\n\n function getBlockMarkup(block, entityMap, hashtagConfig, directional, customEntityTransform) {\n var blockHtml = [];\n\n if (isAtomicEntityBlock(block)) {\n blockHtml.push(getEntityMarkup(entityMap, block.entityRanges[0].key, undefined, customEntityTransform));\n } else {\n var blockTag = getBlockTag(block.type);\n\n if (blockTag) {\n blockHtml.push(\"<\".concat(blockTag));\n var blockStyle = getBlockStyle(block.data);\n\n if (blockStyle) {\n blockHtml.push(\" style=\\\"\".concat(blockStyle, \"\\\"\"));\n }\n\n if (directional) {\n blockHtml.push(' dir = \"auto\"');\n }\n\n blockHtml.push('>');\n blockHtml.push(getBlockInnerMarkup(block, entityMap, hashtagConfig, customEntityTransform));\n blockHtml.push(\"\"));\n }\n }\n\n blockHtml.push('\\n');\n return blockHtml.join('');\n }\n\n /**\n * Function to check if a block is of type list.\n */\n\n function isList(blockType) {\n return blockType === 'unordered-list-item' || blockType === 'ordered-list-item';\n }\n /**\n * Function will return html markup for a list block.\n */\n\n function getListMarkup(listBlocks, entityMap, hashtagConfig, directional, customEntityTransform) {\n var listHtml = [];\n var nestedListBlock = [];\n var previousBlock;\n listBlocks.forEach(function (block) {\n var nestedBlock = false;\n\n if (!previousBlock) {\n listHtml.push(\"<\".concat(getBlockTag(block.type), \">\\n\"));\n } else if (previousBlock.type !== block.type) {\n listHtml.push(\"\\n\"));\n listHtml.push(\"<\".concat(getBlockTag(block.type), \">\\n\"));\n } else if (previousBlock.depth === block.depth) {\n if (nestedListBlock && nestedListBlock.length > 0) {\n listHtml.push(getListMarkup(nestedListBlock, entityMap, hashtagConfig, directional, customEntityTransform));\n nestedListBlock = [];\n }\n } else {\n nestedBlock = true;\n nestedListBlock.push(block);\n }\n\n if (!nestedBlock) {\n listHtml.push('');\n listHtml.push(getBlockInnerMarkup(block, entityMap, hashtagConfig, customEntityTransform));\n listHtml.push('\\n');\n previousBlock = block;\n }\n });\n\n if (nestedListBlock && nestedListBlock.length > 0) {\n listHtml.push(getListMarkup(nestedListBlock, entityMap, hashtagConfig, directional, customEntityTransform));\n }\n\n listHtml.push(\"\\n\"));\n return listHtml.join('');\n }\n\n /**\n * The function will generate html markup for given draftjs editorContent.\n */\n\n function draftToHtml(editorContent, hashtagConfig, directional, customEntityTransform) {\n var html = [];\n\n if (editorContent) {\n var blocks = editorContent.blocks,\n entityMap = editorContent.entityMap;\n\n if (blocks && blocks.length > 0) {\n var listBlocks = [];\n blocks.forEach(function (block) {\n if (isList(block.type)) {\n listBlocks.push(block);\n } else {\n if (listBlocks.length > 0) {\n var listHtml = getListMarkup(listBlocks, entityMap, hashtagConfig, customEntityTransform); // eslint-disable-line max-len\n\n html.push(listHtml);\n listBlocks = [];\n }\n\n var blockHtml = getBlockMarkup(block, entityMap, hashtagConfig, directional, customEntityTransform);\n html.push(blockHtml);\n }\n });\n\n if (listBlocks.length > 0) {\n var listHtml = getListMarkup(listBlocks, entityMap, hashtagConfig, directional, customEntityTransform); // eslint-disable-line max-len\n\n html.push(listHtml);\n listBlocks = [];\n }\n }\n }\n\n return html.join('');\n }\n\n return draftToHtml;\n\n})));\n"],"names":["StyleSheet","options","_this","this","_insertTag","tag","before","tags","length","insertionPoint","nextSibling","prepend","container","firstChild","insertBefore","push","isSpeedy","undefined","speedy","ctr","nonce","key","_proto","prototype","hydrate","nodes","forEach","insert","rule","document","createElement","setAttribute","appendChild","createTextNode","createStyleElement","sheet","i","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","e","flush","parentNode","removeChild","identifierWithPointTracking","begin","points","index","previous","character","getRules","value","parsed","toRules","fixedElements","WeakMap","compat","element","type","parent","isImplicitRule","column","line","props","charCodeAt","get","set","rules","parentRules","k","j","replace","removeLabel","prefix","MS","defaultStylisPlugins","children","callback","createCache","ssrStyles","querySelectorAll","Array","call","node","getAttribute","indexOf","head","stylisPlugins","_insert","inserted","nodesToHydrate","attrib","split","omnipresentPlugins","currentSheet","finalizingPlugins","serializer","concat","selector","serialized","shouldCache","styles","cache","name","registered","memoize","fn","Object","create","arg","isBrowser","EmotionCacheContext","HTMLElement","CacheProvider","Provider","withEmotionCache","func","forwardRef","ref","useContext","ThemeContext","Global","w","T","_ref","serializedNames","serializedStyles","next","dangerouslySetInnerHTML","__html","sheetRef","constructor","rehydrating","querySelector","current","sheetRefCurrent","nextElementSibling","css","_len","arguments","args","_key","keyframes","insertable","apply","anim","toString","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","hyphenateRegex","animationRegex","isCustomProperty","property","isProcessableValue","processStyleName","styleName","toLowerCase","processStyleValue","match","p1","p2","cursor","handleInterpolation","mergedProps","interpolation","__emotion_styles","obj","string","isArray","interpolated","_i","createStringFromObject","previousCursor","result","cached","labelPattern","serializeStyles","stringMode","strings","raw","lastIndex","identifierName","exec","str","h","len","reactPropsRegex","isPropValid","prop","test","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","shouldForwardProp","optionsShouldForwardProp","__emotion_forwardProp","propName","Insertion","isStringTag","newStyled","createStyled","targetClassName","__emotion_real","baseTag","__emotion_base","label","target","defaultShouldForwardProp","shouldUseAs","slice","Styled","FinalTag","as","className","classInterpolations","theme","finalShouldForwardProp","newProps","displayName","defaultProps","defineProperty","withComponent","nextTag","nextOptions","bind","tagName","useInsertionEffect","useInsertionEffectAlwaysWithSyncFallback","useInsertionEffectWithLayoutFallback","getRegisteredStyles","registeredStyles","classNames","rawClassName","registerStyles","insertStyles","defaultOptions","getDefaultOptions","dateLongFormatter","pattern","formatLong","date","width","timeLongFormatter","time","p","P","dateTimeFormat","matchResult","datePattern","timePattern","dateTime","getTimezoneOffsetInMilliseconds","utcDate","Date","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","setUTCFullYear","getTime","MILLISECONDS_IN_WEEK","getUTCISOWeek","dirtyDate","requiredArgs","toDate","diff","startOfUTCISOWeek","year","getUTCISOWeekYear","fourthOfJanuary","setUTCHours","startOfUTCISOWeekYear","Math","round","getUTCFullYear","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","getUTCWeek","startOfUTCWeek","_ref2","_ref3","_options$firstWeekCon","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","firstWeekContainsDate","toInteger","locale","getUTCWeekYear","firstWeek","startOfUTCWeekYear","RangeError","firstWeekOfNextYear","firstWeekOfThisYear","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","token","isProtectedWeekYearToken","throwProtectedError","format","input","required","TypeError","day","getUTCDay","setUTCDate","getUTCDate","_options$weekStartsOn","weekStartsOn","dirtyNumber","NaN","number","Number","isNaN","ceil","floor","addDays","dirtyAmount","amount","setDate","addMonths","dayOfMonth","endOfDesiredMonth","setMonth","setFullYear","addYears","MILLISECONDS_IN_DAY","differenceInCalendarDays","dirtyDateLeft","dirtyDateRight","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","differenceInCalendarMonths","dateLeft","dateRight","compareLocalAsc","differenceInDays","sign","difference","abs","eachDayOfInterval","dirtyInterval","_options$step","interval","startDate","start","endTime","end","dates","currentDate","setHours","step","endOfDay","endOfMonth","month","endOfWeek","getDay","addLeadingZeros","targetLength","output","y","signedYear","M","getUTCMonth","String","d","a","dayPeriodEnumValue","getUTCHours","toUpperCase","H","m","getUTCMinutes","s","getUTCSeconds","S","numberOfDigits","milliseconds","getUTCMilliseconds","pow","dayPeriodEnum","formatTimezoneShort","offset","dirtyDelimiter","absOffset","hours","minutes","delimiter","formatTimezoneWithOptionalMinutes","formatTimezone","G","localize","era","ordinalNumber","unit","lightFormatters","Y","signedWeekYear","weekYear","R","u","Q","quarter","context","q","L","week","I","isoWeek","D","dayOfYear","timestamp","setUTCMonth","getUTCDayOfYear","E","dayOfWeek","localDayOfWeek","c","isoDayOfWeek","dayPeriod","b","B","K","X","_localize","timezoneOffset","_originalDate","getTimezoneOffset","x","O","z","t","originalDate","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","_ref4","_options$locale2","_options$locale2$opti","_ref5","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","defaultLocale","isValid","subMilliseconds","formatterOptions","map","substring","firstCharacter","longFormatter","longFormatters","join","matched","cleanEscapedString","formatter","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","isAfter","dirtyDateToCompare","dateToCompare","isBefore","isEqual","dirtyLeftDate","dirtyRightDate","isSameDay","dateLeftStartOfDay","dateRightStartOfDay","isSameMonth","isDate","isWeekend","isWithinInterval","startTime","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","count","tokenValue","addSuffix","comparison","buildFormatLongFn","defaultWidth","formats","full","long","medium","short","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","buildLocalizeFn","dirtyIndex","valuesArray","formattingValues","defaultFormattingWidth","_defaultWidth","_width","values","argumentCallback","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchedString","parsePatterns","defaultParseWidth","array","predicate","findIndex","object","hasOwnProperty","findKey","valueCallback","rest","code","formatDistance","formatRelative","_date","_baseDate","_options","rem100","narrow","abbreviated","wide","am","pm","midnight","noon","morning","afternoon","evening","night","parsePattern","parseInt","parseResult","any","max","dirtyDatesArray","datesArray","min","Setter","_utcDate","ValueSetter","_Setter","_super","validateValue","setValue","priority","subPriority","flags","DateToSystemTimezoneSetter","_Setter2","_super2","_this2","timestampIsSet","convertedDate","Parser","dateString","parse","setter","validate","_value","EraParser","_Parser","numericPatterns","timezonePatterns","mapValue","parseFnResult","mapFn","parseNumericPattern","parseTimezonePattern","parseAnyDigitsSigned","parseNDigits","n","RegExp","parseNDigitsSigned","dayPeriodEnumToHours","normalizeTwoDigitYear","twoDigitYear","currentYear","isCommonEra","absCurrentYear","rangeEnd","isLeapYearIndex","YearParser","isTwoDigitYear","normalizedTwoDigitYear","LocalWeekYearParser","ISOWeekYearParser","_flags","firstWeekOfYear","ExtendedYearParser","QuarterParser","StandAloneQuarterParser","MonthParser","StandAloneMonthParser","LocalWeekParser","dirtyWeek","setUTCWeek","ISOWeekParser","dirtyISOWeek","setUTCISOWeek","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","DateParser","isLeapYear","DayOfYearParser","setUTCDay","dirtyDay","DayParser","LocalDayParser","wholeWeekDays","StandAloneLocalDayParser","ISODayParser","setUTCISODay","AMPMParser","AMPMMidnightParser","DayPeriodParser","Hour1to12Parser","isPM","Hour0to23Parser","Hour0To11Parser","Hour1To24Parser","MinuteParser","setUTCMinutes","SecondParser","setUTCSeconds","FractionOfSecondParser","setUTCMilliseconds","ISOTimezoneWithZParser","ISOTimezoneParser","TimestampSecondsParser","TimestampMillisecondsParser","parsers","notWhitespaceRegExp","dirtyDateString","dirtyFormatString","dirtyReferenceDate","formatString","_step","subFnOptions","setters","tokens","usedTokens","_iterator","_loop","parser","incompatibleTokens","incompatibleToken","find","usedToken","includes","fullToken","run","v","done","_ret","err","f","uniquePrioritySetters","sort","filter","setterArray","_step2","_iterator2","dirtyMonth","dateWithDesiredMonth","daysInMonth","monthIndex","lastDayOfMonth","getDaysInMonth","setYear","dirtyYear","startOfDay","startOfMonth","startOfWeek","addMilliseconds","subMonths","argument","argStr","console","warn","Error","stack","addClass","classList","add","contains","baseVal","hasClass","replaceClassName","origClass","classToRemove","removeClass","remove","module","exports","entries","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","construct","Reflect","fun","thisValue","Func","arrayForEach","unapply","arrayPop","pop","arrayPush","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","trim","objectHasOwnProperty","regExpTest","typeErrorCreate","unconstruct","thisArg","_len2","_key2","addToSet","transformCaseFunc","l","lcElement","cleanArray","clone","newObject","lookupGetter","desc","fallbackValue","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","text","html","svg","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","EXPRESSIONS","__proto__","getGlobal","window","_createTrustedTypesPolicy","trustedTypes","purifyHostElement","createPolicy","suffix","ATTR_NAME","hasAttribute","policyName","createHTML","createScriptURL","scriptUrl","_","createDOMPurify","DOMPurify","root","version","removed","nodeType","isSupported","originalDocument","currentScript","DocumentFragment","HTMLTemplateElement","Node","Element","NodeFilter","NamedNodeMap","MozNamedAttrMap","HTMLFormElement","DOMParser","ElementPrototype","cloneNode","getNextSibling","getChildNodes","getParentNode","template","content","ownerDocument","trustedTypesPolicy","emptyHTML","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","hooks","createHTMLDocument","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","tagNameCheck","writable","configurable","enumerable","attributeNameCheck","allowCustomizedBuiltInElements","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","DEFAULT_PARSER_MEDIA_TYPE","CONFIG","formElement","isRegexOrFunction","testValue","Function","_parseConfig","cfg","ADD_URI_SAFE_ATTR","ADD_DATA_URI_TAGS","ALLOWED_URI_REGEXP","ADD_TAGS","ADD_ATTR","table","tbody","TRUSTED_TYPES_POLICY","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","ALL_SVG_TAGS","ALL_MATHML_TAGS","_checkValidNamespace","namespaceURI","parentTagName","Boolean","_forceRemove","_removeAttribute","attribute","getAttributeNode","from","removeAttribute","_initDocument","dirty","doc","leadingWhitespace","matches","dirtyPayload","parseFromString","documentElement","createDocument","innerHTML","body","childNodes","_createNodeIterator","SHOW_ELEMENT","SHOW_COMMENT","SHOW_TEXT","SHOW_PROCESSING_INSTRUCTION","SHOW_CDATA_SECTION","_isClobbered","elm","nodeName","textContent","attributes","hasChildNodes","_isNode","_executeHook","entryPoint","currentNode","data","hook","_sanitizeElements","allowedTags","firstElementChild","_isBasicCustomElement","expr","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","hookEvent","attrName","attrValue","keepAttr","allowedAttributes","attr","forceKeepAttr","getAttributeType","setAttributeNS","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","nextNode","sanitize","importedNode","returnNode","nodeIterator","shadowroot","shadowrootmode","serializedHTML","outerHTML","doctype","setConfig","clearConfig","isValidAttribute","addHook","hookFunction","removeHook","removeHooks","removeAllHooks","factory","statusDiv","getElementById","statuses","setStatus","status","isSameAsLast","div","assign","style","border","clip","height","margin","overflow","padding","position","getStatusDiv","lastChild","statusItem","display","childDiv","getStatusChildDiv","idCounter","cbToCb","cb","noop","getClosestScrollParent","findParent","finder","rootNode","scrollTop","scrollHeight","clientHeight","isOrContainsNode","child","composeEventHandlers","fns","event","_len3","_key3","some","preventDownshiftDefault","defaultPrevented","firstDefined","_len4","_key4","unwrapArray","defaultValue","isDOMElement","getElementProps","stateKeys","pickState","state","normalizeArrowKey","keyCode","_extends","source","objectWithoutProperties","keys","Downshift","_Component","instance","Constructor","classCallCheck","self","ReferenceError","possibleConstructorReturn","_initialiseProps","getState","highlightedIndex","defaultHighlightedIndex","isOpen","defaultIsOpen","inputValue","defaultInputValue","selectedItem","defaultSelectedItem","itemToString","id","subClass","superClass","inherits","stateToMerge","reduce","isControlledProp","getItemCount","itemCount","items","getItemNodeFromIndex","environment","getItemId","scrollHighlightedItemIntoView","scrollParent","scrollParentStyles","getComputedStyle","scrollParentRect","getBoundingClientRect","scrollParentBorderTopWidth","borderTopWidth","bordersWidth","borderBottomWidth","scrollParentTop","top","nodeRect","bottom","nodeTop","scrollIntoView","_rootNode","moveHighlightedIndex","otherStateToSet","changeHighlightedIndex","setHighlightedIndex","moveAmount","itemsLastIndex","baseIndex","newIndex","getStateAndHelpers","_getState2","getRootProps","getButtonProps","getToggleButtonProps","getLabelProps","getInputProps","getItemProps","openMenu","closeMenu","toggleMenu","selectItem","selectItemAtIndex","selectHighlightedItem","clearSelection","clearItems","reset","setItemCount","unsetItemCount","setState","internalSetState","componentDidMount","_this3","_isMounted","onMouseDown","isMouseDown","onMouseUp","targetInDownshift","activeElementInDownshift","activeElement","stateChangeTypes","mouseUp","onOuterClick","onTouchStart","touchStart","addEventListener","cleanup","removeEventListener","componentDidUpdate","prevProps","prevState","selectedItemChanged","controlledPropUpdatedSelectedItem","prev","avoidScrolling","updateStatus","componentWillUnmount","render","called","refKey","suppressRefError","refKeySpecified","isComposite","validateGetRootPropsCalledCorrectly","Component","getA11yStatusMessage","highlightedItem","resultCount","previousResultCount","onStateChange","onInputValueChange","onUserAction","onChange","onSelect","prevItem","item","stateReducer","stateToSet","breakingChanges","unknown","itemMouseEnter","keyDownArrowUp","keyDownArrowDown","keyDownEscape","keyDownEnter","clickItem","blurInput","changeInput","keyDownSpaceButton","clickButton","blurButton","timeoutId","_this4","resetInputOnSelection","itemIndex","isItemSelected","onChangeArg","onStateChangeArg","isStateToSetFunction","newStateToSet","nextState","nextFullState","rootRef","_babelHelpers$extends","_ref3$suppressRefErro","_ref2$refKey","keyDownHandlers","ArrowDown","preventDefault","shiftKey","ArrowUp","Enter","itemNode","Escape","buttonKeyDownHandlers","onClick","onKeyDown","onBlur","enabledEventHandlers","button_handleClick","button_handleKeyDown","button_handleBlur","eventHandlers","disabled","role","focus","setTimeout","blurTarget","inputId","htmlFor","onInput","_getState4","input_handleChange","input_handleKeyDown","input_handleBlur","autoComplete","downshiftButtonIsActive","dataset","toggle","_enabledEventHandlers","onMouseMove","_ref7$item","fnName","requiredProp","_ref8","_ref9","clearTimeout","default","resetIdCounter","_objectSpread","ownKeys","getOwnPropertySymbols","sym","_defineProperty","BlockMapBuilder","CharacterMetadata","ContentBlock","ContentBlockNode","DraftModifier","EditorState","generateRandomKey","gkx","Immutable","moveBlockInContentState","experimentalTreeDataSupport","ContentBlockRecord","List","Repeat","AtomicBlockUtils","insertAtomicBlock","editorState","entityKey","contentState","getCurrentContent","selectionState","getSelection","afterRemoval","removeRange","targetSelection","getSelectionAfter","afterSplit","splitBlock","insertionTarget","asAtomicBlock","setBlockType","charData","entity","atomicBlockConfig","characterList","atomicDividerBlockConfig","prevSibling","fragmentArray","createFromArray","withAtomicBlock","replaceWithFragment","newContent","merge","selectionBefore","selectionAfter","moveAtomicBlock","atomicBlock","targetRange","insertionMode","withMovedAtomicBlock","targetBlock","getBlockForKey","getStartKey","getEndKey","selectionAfterRemoval","_targetBlock","getFocusKey","getStartOffset","getEndOffset","getLength","selectionAfterSplit","_targetBlock2","OrderedMap","blocks","block","getKey","findRangesImmutable","getOwnObjectValues","Record","returnTrue","LeafRange","DecoratorRange","decoratorKey","leaves","BlockTree","generate","decorator","textLength","of","leafSets","decorations","getDecorations","chars","getCharacterList","areEqual","generateLeaves","toList","fromJS","excluded","sourceKeys","_objectWithoutPropertiesLoose","leaf","characters","inlineStyles","getStyle","_require","Map","OrderedSet","EMPTY_SET","defaultRecord","_CharacterMetadataRec","getEntity","hasStyle","applyStyle","record","withStyle","removeStyle","withoutStyle","applyEntity","withEntity","config","EMPTY","configMap","existing","pool","newCharacter","CompositeDraftDecorator","decorators","_decorators","getText","fill","ii","counter","strategy","canOccupySlice","targetArr","componentKey","occupySlice","getComponentForKey","component","getPropsForKey","depth","_ContentBlockRecord","decorateCharacterList","getType","getDepth","getData","getInlineStyleAt","getEntityAt","findStyleRanges","filterFn","haveEqualStyle","findEntityRanges","haveEqualEntity","charA","charB","getChildKeys","getParentKey","getPrevSiblingKey","getNextSiblingKey","DraftEntity","SelectionState","sanitizeDraftText","ImmutableMap","ContentStateRecord","entityMap","blockMap","ContentBlockNodeRecord","ContentState","_ContentStateRecord","getEntityMap","getBlockMap","getSelectionBefore","getKeyBefore","reverse","keySeq","skipUntil","skip","first","getKeyAfter","getBlockAfter","getBlockBefore","getBlocksAsArray","toArray","getFirstBlock","getLastBlock","last","getPlainText","getLastCreatedEntityKey","__getLastCreatedEntityKey","hasText","size","escape","createEntity","mutability","__create","mergeEntityData","toMerge","__mergeData","replaceEntityData","newData","__replaceData","addEntity","__add","__get","getAllEntities","__getAll","loadWithEntities","entities","__loadWithEntities","createFromBlockArray","theBlocks","contentBlocks","isEmpty","createEmpty","createFromText","createContentBlockFromJS","ContentStateInlineStyle","inlineStyle","modifyInlineStyle","addOrRemove","startKey","startOffset","endKey","endOffset","newBlocks","takeUntil","blockKey","sliceStart","sliceEnd","UserAgent","findAncestorOffsetKey","getWindowForNode","invariant","nullthrows","DOM_OBSERVER_OPTIONS","subtree","characterData","childList","characterDataOldValue","USE_CHAR_DATA","DOMObserver","mutations","containerWindow","MutationObserver","observer","registerMutations","onCharData","registerMutation","observe","stopAndFlushMutations","takeRecords","disconnect","getMutationTextContent","mutation","removedNodes","offsetKey","React","cx","DefaultDraftBlockRenderMap","section","article","wrapper","blockquote","atomic","unstyled","aliasedElements","BOLD","CODE","fontFamily","wordWrap","ITALIC","fontStyle","STRIKETHROUGH","textDecoration","UNDERLINE","DefaultDraftInlineStyle","DraftEditor","DraftEditorBlock","DraftEntityInstance","KeyBindingUtil","RawDraftContentState","RichTextEditorUtil","convertFromDraftStateToRaw","convertFromRawToDraftState","getDefaultKeyBinding","getVisibleSelectionRect","DraftPublic","Editor","EditorBlock","CompositeDecorator","Entity","EntityInstance","Modifier","RichUtils","convertFromHTML","convertFromRaw","convertToRaw","genKey","_assign","_assertThisInitialized","_inheritsLoose","DraftEditorCompositionHandler","DraftEditorContents","DraftEditorDragHandler","DraftEditorEditHandler","flushControlled","DraftEditorPlaceholder","DraftEffects","Scroll","Style","getScrollPosition","isHTMLElement","isIE","allowSpellCheck","handlerMap","edit","composite","drag","cut","didInitODS","UpdateDraftEditorFlags","_React$Component","_update","editor","_latestEditorState","_blockSelectEvents","_React$Component2","editorContainer","scrollPosition","alreadyHasFocus","getHasFocus","editorNode","getScrollParent","scrollTo","setTop","update","forceSelection","blur","mode","_this$props","onPaste","onCut","onCopy","editHandler","handler","_handler","setMode","contentsKey","clipboard","_clipboard","_dragCount","exitCurrentMode","_editorKey","editorKey","_placeholderAccessibilityID","_latestCommittedEditorState","_onBeforeInput","_buildHandler","_onBlur","_onCharacterData","_onCompositionEnd","_onCompositionStart","_onCopy","_onCut","_onDragEnd","_onDragOver","_onDragStart","_onDrop","_onInput","_onFocus","_onKeyDown","_onKeyPress","_onKeyUp","_onMouseDown","_onMouseUp","_onPaste","_onSelect","getEditorKey","_proto2","eventName","readOnly","method","_showPlaceholder","placeholder","isInCompositionMode","_renderPlaceholder","placeHolderProps","textAlignment","accessibilityID","_renderARIADescribedBy","describedBy","ariaDescribedBy","placeholderID","_this$props2","blockRenderMap","blockRendererFn","blockStyleFn","customStyleFn","customStyleMap","preventScroll","textDirectionality","rootClass","ariaRole","ariaExpanded","editorContentsProps","_handleEditorContainerRef","ariaActiveDescendantID","ariaAutoComplete","ariaControls","ariaLabel","ariaLabelledBy","ariaMultiline","ariaOwneeID","autoCapitalize","autoCorrect","notranslate","contentEditable","webDriverTestID","onBeforeInput","onCompositionEnd","onCompositionStart","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onFocus","onKeyPress","onKeyUp","editorRef","spellCheck","outline","userSelect","WebkitUserSelect","whiteSpace","suppressContentEditableWarning","tabIndex","initODS","execCommand","g","keyBindingFn","stripPastedStyles","DraftEditorLeaf","DraftOffsetKey","UnicodeBidi","UnicodeBidiDirection","getElementPosition","getViewportDimensions","isBlockOnSelectionEdge","selection","getAnchorKey","shouldComponentUpdate","nextProps","tree","direction","blockNode","_node","scrollDelta","nodePosition","offsetHeight","offsetTop","getTop","_renderChildren","lastLeafSet","hasSelection","leafSet","leavesForLeafSet","lastLeaf","jj","encode","styleSet","isLast","DecoratorComponent","decoratorProps","decoratorOffsetKey","decoratedText","dir","getHTMLDirIfDifferent","getDirection","commonProps","DraftEditorNode","getDraftRenderConfig","configForType","wrapperTemplate","getCustomRenderConfig","customRenderer","CustomComponent","customProps","customEditable","editable","getElementPropsConfig","customConfig","elementProps","customClass","DraftEditorBlockNode","createRef","isContainerNode","blockHasChanged","wrapperRef","htmlBlockNode","acc","_getDraftRenderConfig","childProps","getBlockTree","blockProps","nextSiblingKey","shouldNotAddWrapperElement","wrappedSiblings","_iteratorNormalCompletion","_didIteratorError","_iteratorError","Symbol","iterator","sibling","splice","childrenIs","cloneElement","applyWrapperElementToSiblings","Keys","editOnSelect","getContentEditableContainer","getDraftEditorSelection","getEntityKeyForSelection","resolved","stillComposing","domObserver","startDOMObserver","resolveComposition","which","RIGHT","LEFT","_editor","RETURN","inCompositionMode","composedChars","_DraftOffsetKey$decod","decode","leafKey","_editorState$getBlock","getIn","replacementRange","anchorKey","focusKey","anchorOffset","focusOffset","isBackward","currentStyle","replaceText","currentContent","compositionEndSelectionState","restoreEditorDOM","editorStateWithUpdatedSelection","acceptSelection","joinClasses","getListItemClasses","shouldResetCount","prevEditorState","nextEditorState","getDirectionMap","nextNativeContent","getNativelyRenderedContent","wasComposing","nowComposing","prevContent","nextContent","prevDecorator","getDecorator","nextDecorator","mustForceSelection","directionMap","blocksAsArray","processedBlocks","currentDepth","lastWrapperTemplate","_block","blockType","componentProps","_className","outputBlocks","_ii","info","wrapperElement","DraftEditorContentsExperimental","nodeBlock","nextBlockKey","DraftEditorDecoratedLeaves","DataTransfer","getCorrectDocumentFromNode","getTextContentFromFiles","getUpdatedSelectionState","isEventHandled","endDrag","nativeEvent","dataTransfer","dropSelection","eventTargetDocument","currentTarget","caretRangeFromPoint","dropRange","startContainer","rangeParent","rangeOffset","getSelectionForEvent","files","getFiles","handleDroppedFiles","fileText","insertTextAtSelection","dragType","_internalDrag","handleDrop","newContentState","moveText","mouseUpEvent","MouseEvent","view","bubbles","cancelable","dispatchEvent","insertText","getCurrentInlineStyle","isChrome","isFirefox","selectionHandler","unstable_flushControlled","DraftEditorTextNode","isHTMLBRElement","setDraftEditorSelection","_setSelection","hasEdgeWithin","targetNode","TEXT_NODE","leafNode","endsWith","styleObj","mergedStyles","newStyles","Leaves","hasFocus","isElement","useNewlineChar","_forceFlag","shouldBeNewline","elementNode","isNewline","NEWLINE_B","handleExtensionCausedError","uuid","instances","instanceKey","logWarning","oldMethodCall","newMethodCall","mergeData","replaceData","newInstance","_DraftEntityInstanceR","getMutability","getRemovalRange","selectionStart","selectionEnd","entityStart","segments","segment","segmentEnd","segmentStart","removalStart","removalEnd","entityEnd","atStart","atEnd","logBlockedSelectionEvent","logSelectionStateFailure","applyEntityToContentState","getCharacterRemovalRange","getContentStateFragment","insertFragmentIntoContentState","insertTextIntoContentState","modifyBlockForContentState","removeEntitiesAtEdges","removeRangeFromContentState","splitBlockInContentState","rangeToReplace","withoutEntities","withoutText","isCollapsed","removalRange","movedFragment","mergeBlockData","rangeToRemove","removalDirection","startBlock","endBlock","getIsBackward","getFocusOffset","getAnchorOffset","startEntityKey","endEntityKey","adjustedRemovalRange","applyInlineStyle","removeInlineStyle","setBlockData","blockData","KEY_DELIMITER","_offsetKey$split$reve","convertFromHTMLToContentBlocks","getSafeBodyFromHTML","DraftPasteProcessor","processHTML","processText","textBlocks","textLine","blockNodeConfig","prevSiblingIndex","CHAMELEON_CHARS","WHITESPACE_AND_PUNCTUATION","getPunctuation","DELETE_REGEX","BACKSPACE_REGEX","getRemovableWord","DraftRemovableWord","getBackward","getForward","DraftStringKey","stringify","unstringify","isListBlock","DraftTreeAdapter","fromRawTreeStateToRawState","draftTreeState","transformedBlocks","traverseInDepthOrder","newBlock","addDepthToChildren","fromRawStateToRawTreeState","draftState","parentStack","isList","treeBlock","lastParent","newParent","entityRanges","inlineStyleRanges","unshift","shift","isValidBlock","parentKey","every","prevSiblingKey","isConnectedTree","eligibleFirstNodes","nodesSeen","currentKey","visitedStack","childKeys","_firstNode","isValidTree","bidiService","UnicodeBidiService","EditorBidiService","prevBidiMap","nextBidi","valueSeq","bidiMap","zip","is","Stack","EditorStateRecord","allowUndo","inlineStyleOverride","lastChangeType","nativelyRenderedContent","redoStack","treeMap","undoStack","createWithText","createWithContent","firstKey","recordConfig","generateNewTreeMap","put","getImmutable","withMutations","existingDecorator","newTreeMap","previousTreeMap","toSeq","regenerateTreeForNewDecorator","newBlockMap","newEntityMap","prevBlockMap","prevTreeMap","regenerateTreeForNewBlocks","immutable","_immutable","toJS","getAllowUndo","getUndoStack","getRedoStack","getLastChangeType","getInlineStyleOverride","setInlineStyleOverride","override","lookUpwardForInlineStyle","getInlineStyleForCollapsedSelection","getInlineStyleForNonCollapsedSelection","isSelectionAtStartOfContent","isSelectionAtEndOfContent","updateSelection","moveSelectionToEnd","lastBlock","lastKey","moveFocusToEnd","afterSelectionMove","changeType","mustBecomeBoundary","editorStateChanges","undo","newCurrentContent","peek","redo","toOrderedMap","fromKey","lastNonEmpty","isSoftNewlineEvent","isOSX","isPlatform","isCtrlKeyCommand","ctrlKey","altKey","isOptionKeyCommand","usesMacOSHeuristics","hasCommandModifier","metaKey","adjustBlockDepthForContentState","currentBlockContainsLink","getCurrentBlockType","getDataObjectForLinkURL","uri","url","handleKeyCommand","command","eventTimeStamp","toggleInlineStyle","toggleCode","onBackspace","onDelete","insertSoftNewline","newEditorState","blockBefore","withoutAtomicBlock","withoutBlockStyle","tryToRemoveBlockStyle","blockAfter","atomicBlockTarget","onTab","maxDepth","withAdjustment","toggleBlockType","skipWhile","typeToSet","has","toggleLink","withoutLink","SecondaryClipboard","blockEnd","keyAfter","paste","_SelectionStateRecord","serialize","offsetToCheck","adjustment","contentBlock","startArg","applyEntityToContentBlock","encodeEntityRanges","encodeInlineStyleRanges","createRawBlock","entityStorageMap","toObject","insertRawBlock","rawBlocks","blockCacheRef","rawBlock","rawDraftContentState","rawState","entityCacheRef","entityStorageKey","stringifiedEntityKey","encodeRawBlocks","rawEntityMap","encodeRawEntityMap","_knownListItemDepthCl","URI","isHTMLAnchorElement","isHTMLImageElement","REGEX_CR","REGEX_LF","REGEX_LEADING_LF","REGEX_NBSP","REGEX_CARRIAGE","REGEX_ZWS","boldValues","notBoldValues","anchorAttr","imgAttr","knownListItemDepthClasses","HTMLTagToRawInlineStyleMap","del","em","strike","strong","mark","detectInlineStyle","getListItemDepth","depthClass","isValidAnchor","anchorNode","href","protocol","isValidImage","imageNode","getNamedItem","styleFromNodeAttributes","htmlElement","isListNode","ContentBlocksBuilder","blockTypeMap","disambiguate","clear","blockConfigs","currentBlockType","currentEntity","currentText","addDOMNode","_this$blockConfigs","_toBlockConfigs","_trimCurrentText","_makeBlockConfig","getContentBlocks","_toContentBlocks","_toFlatContentBlocks","childConfigs","wasCurrentDepth","wasWrapper","_addImgNode","_addAnchorNode","newStyle","_addBreakNode","_addTextNode","_wasCurrentDepth","_wasWrapper","_appendText","_this$characterList","characterMetadata","trimLeft","trimRight","findEntry","image","entityConfig","imageAttribute","anchor","anchorAttribute","_hoistContainersInBlockConfigs","flatMap","blockConfig","_this2$_extractTextFr","_extractTextFromBlockConfigs","safeBody","mapKeys","elements","buildBlockTypeMap","createCharacterList","decodeEntityRanges","decodeInlineStyleRanges","decodeBlockNodeConfig","decodeCharacterList","rawEntityRanges","rawInlineStyleRanges","range","addKeyIfMissing","updateNodeStack","parentRef","nodesWithParentRef","decodeRawBlocks","isTreeRawBlock","decodeContentBlocks","contentBlockNode","siblings","_index","_children","_contentBlockNode","decodeContentBlockNodes","rawEntityKey","_rawEntityMap$rawEnti","decodeRawEntityMap","characterArray","substr","ranges","UnicodeUtils","notEmptyKey","isSelectionAtLeafStart","setImmediate","FF_QUICKFIND_CHAR","FF_QUICKFIND_LINK_CHAR","_pendingStateFromBeforeInput","handleBeforeInput","timeStamp","mustPreventNative","oldBlockTree","newBlockTree","oldLeafSet","newLeafSet","oldStart","adjustedStart","oldEnd","adjustedEnd","newStart","newEnd","newDecoratorKey","containsNode","getActiveElement","preserveSelectionOnBlur","_selection","defaultView","rangeCount","focusNode","removeAllRanges","currentSelection","getFragmentFromSelection","setClipboard","isNode","removeFragment","keyCommandPlainBackspace","isGecko","isEngine","domSelection","isNotTextOrElementNode","ELEMENT_NODE","previousSibling","span","nodeValue","domText","modelText","preserveEntity","charDelta","contentWithAdjustedDOMSelection","inputType","onInputType","keyCommandBackspaceToStartOfLine","keyCommandBackspaceWord","keyCommandDeleteWord","keyCommandInsertNewline","keyCommandMoveSelectionToEndOfBlock","keyCommandMoveSelectionToStartOfBlock","keyCommandPlainDelete","keyCommandTransposeCharacters","keyCommandUndo","callDeprecatedHandler","handlerName","deprecatedHandler","handleReturn","ESC","TAB","UP","DOWN","SPACE","newState","onKeyCommand","splitTextIntoTextBlocks","insertFragment","clipboardData","isRichText","defaultFileText","handlePastedFiles","withInsertedText","getHTML","formatPastedText","_editor$props$formatP","handlePastedText","_html","internalClipboard","getClipboard","types","areTextBlocksAndClipboardEqual","htmlFragment","htmlMap","textFragment","textMap","DraftJsDebugLogging","anonymizedDom","extraParams","JSON","stacktrace","documentSelection","updatedSelectionState","needsRecovery","strlen","storageMap","encoded","isTruthy","EMPTY_ARRAY","styleList","flatten","toSet","styleToEncode","filteredInlines","getEncodedInlinesForType","getRangeClientRects","areRectsOnOneLine","rects","minTop","Infinity","minBottom","maxTop","maxBottom","rect","getNodeLength","DOCUMENT_TYPE_NODE","PROCESSING_INSTRUCTION_NODE","COMMENT_NODE","collapsed","containingElement","cloneRange","computed","correctDocument","fontSize","documentBody","getLineHeightPx","bestContainer","endContainer","bestOffset","setStart","setStartBefore","currentContainer","maxIndexToConsider","isSurrogatePair","getSelectionOffsetKeyForNode","searchNode","haystack","areEqualFn","foundFn","nextValue","nextIndex","seenKeys","MULTIPLIER","random","DraftEntitySegments","getRangesForDraftEntity","getEntityRemovalRange","isEntireSelectionWithinEntity","isEntityAtStart","sideToConsider","entityRange","newSelectionState","startSelectionState","endSelectionState","_startSelectionState","_endSelectionState","randomizeBlockMapKeys","blockKeys","startIndex","endIndex","shouldFixFirefoxMovement","shouldRemoveWord","getZCommand","DELETE","getDeleteCommand","BACKSPACE","getBackspaceCommand","getDraftEditorSelectionWithNodes","getPointForNonTextNode","editorRoot","startNode","childOffset","firstLeaf","getFirstLeaf","nodeBeforeCursor","getLastLeaf","getTextContentLength","anchorIsTextNode","focusIsTextNode","anchorPoint","focusPoint","filterKey","nextNonDescendantBlock","right","left","_rects$","_rects$2","tempRange","clientRects","ancestor","atCommonAncestor","commonAncestorContainer","getClientRects","setEndBefore","isOldIE","castedNode","childOffsetKey","TEXT_CLIPPING_REGEX","TEXT_TYPES","readCount","results","file","FileReader","_contents","reader","onload","onerror","readAsText","readFile","anchorPath","anchorBlockKey","anchorLeafBlockTree","anchorLeaf","focusPath","focusBlockKey","focusLeafBlockTree","focusLeaf","anchorLeafStart","focusLeafStart","anchorBlockOffset","focusBlockOffset","anchorLeafEnd","focusLeafEnd","getRangeBoundingClientRect","global","getRangeAt","boundingRect","__DRAFT_GKX","insertIntoList","targetKey","targetOffset","isTreeBasedBlockMap","newBlockArr","fragmentSize","tail","finalOffset","finalKey","shouldNotUpdateFromFragmentBlock","headText","headCharacters","appendToHead","updateHead","fragmentBlock","blockSize","tailText","tailCharacters","prependToTail","updateTail","updatedBlockMap","originalBlockMap","fragmentHeadBlock","blockMapState","headKey","targetNextKey","targetParentKey","fragmentRootBlocks","rootBlock","rootBlocks","lastSiblingKey","getRootBlocks","lastRootFragmentBlockKey","setIn","originalTargetParentChildKeys","insertionIndex","newChildrenKeysArray","updateBlockMapLinks","fragmentBlockMap","updateExistingBlock","targetListArg","toInsert","targetList","blockText","newOffset","blockTree","isAtStart","leafStart","getModifierState","expandRangeToStartOfLine","moveSelectionBackward","removeTextWithStrategy","strategyState","toRemove","moveSelectionForward","charBehind","getUTF16Length","charAhead","finalSelection","afterInsert","updateFn","undoneState","operation","getNextDelimiterBlockKey","transformBlock","originalBlockToBeMoved","originalTargetBlock","isExperimentalTreeBlock","isInsertedAfterTarget","originalBlockKey","originalTargetKey","originalParentKey","originalNextSiblingKey","originalPrevSiblingKey","newParentKey","newNextSiblingKey","newPrevSiblingKey","parentChildrenList","newParentChildrenList","targetBlockIndex","newChildrenArray","blockToBeMoved","blocksToBeMoved","blockMapWithoutBlocksToBeMoved","nextDelimiterBlockKey","takeWhile","isBlockToBeMoved","hasNextSiblingAndIsNotNextSibling","doesNotHaveNextSiblingAndIsNotDelimiter","blocksBefore","blocksAfter","slicedBlocks","maxDistance","keyBefore","lastRootBlock","newKeysRef","oldKey","nextKey","prevKey","childrenKeys","childKey","randomizeContentBlockNodeKeys","randomizeContentBlockKeys","removeForBlock","charBefore","charAfter","entityBeforeCursor","entityAfterCursor","_getRemovalRange","updatedBlocks","updatedStart","updatedEnd","getAncestorsKeys","parents","getNextValidSibling","nextValidSiblingKey","getPrevValidSibling","prevValidSiblingKey","nextDelimiters","nextDelimiter","getNextDelimitersBlockKeys","delimiterKey","removeFromList","parentAncestors","endBlockchildrenKeys","endBlockAncestors","modifiedStart","anchorBlock","anchorBlockSibling","REGEX_BLOCK_DELIMITER","getAnonymizedDOM","getNodeLabels","anonymized","anonymizeTextWithin","labels","getAnonymizedEditorDOM","addFocusToSelection","extend","nodeWasFocus","activeElementName","nodeIsFocus","selectionRangeCount","selectionAnchorNodeName","selectionAnchorOffset","selectionFocusNodeName","selectionFocusOffset","message","setEnd","addRange","addPointToSelection","createRange","nodeStart","nodeEnd","documentObject","tempKey","tempOffset","hasAnchor","storedFocusNode","storedFocusOffset","blockToSplit","keyBelow","blockAbove","blockBelow","originalBlock","belowBlock","belowBlockKey","NEWLINE_REGEX","r","isEmptyString","blockTypesMapping","getBlockTag","getBlockStyle","getHashtagRanges","hashtagConfig","sections","trigger","separator","hashtag","getSections","lastOffset","sectionRanges","s1","s2","isAtomicEntityBlock","getStyleArrayForBlock","SUPERSCRIPT","SUBSCRIPT","COLOR","BGCOLOR","FONTSIZE","FONTFAMILY","getStylesAtOffset","sameStyleAsPrevious","sameStyled","addInlineStyleMarkup","getSectionText","ch","addStylePropertyMarkup","styleString","getEntityMarkup","customEntityTransform","targetOption","alignment","src","alt","getInlineStyleSections","styleSections","trimLeadingZeros","sectionText","replacedText","trimTrailingZeros","getStyleTagSectionMarkup","styleSection","getInlineStyleSectionMarkup","styleTagSections","styleSectionText","stylePropertySection","getSectionMarkup","entityInlineMarkup","getBlockInnerMarkup","blockMarkup","getBlockMarkup","directional","blockHtml","blockTag","blockStyle","getListMarkup","listBlocks","previousBlock","listHtml","nestedListBlock","nestedBlock","draftToHtml","editorContent"],"sourceRoot":""}