striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit a490210f38607628d94c7bdbb8d59a9a6ed0d8fa
parent 9e7eb5a385f421db02cf8ff1e193c3ad9cc44453
Author: hunite <hunite@striven.com>
Date:   Tue, 17 Sep 2019 11:22:41 -0400

insertImage

Diffstat:
Mdist/index.js | 2+-
Mdist/striveneditor.js | 4++--
Msrc/striveneditor.js | 100++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
3 files changed, 97 insertions(+), 9 deletions(-)

diff --git a/dist/index.js b/dist/index.js @@ -374,7 +374,7 @@ eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPAC /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @fortawesome/fontawesome-svg-core */ \"./node_modules/@fortawesome/fontawesome-svg-core/index.es.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faFont */ \"./node_modules/@fortawesome/free-solid-svg-icons/faFont.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faBold */ \"./node_modules/@fortawesome/free-solid-svg-icons/faBold.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faItalic */ \"./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faUnderline */ \"./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faStrikethrough */ \"./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faList */ \"./node_modules/@fortawesome/free-solid-svg-icons/faList.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListOl */ \"./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListUl */ \"./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignJustify */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faIndent */ \"./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignLeft */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignCenter */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignRight */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperclip */ \"./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faLink */ \"./node_modules/@fortawesome/free-solid-svg-icons/faLink.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faImage */ \"./node_modules/@fortawesome/free-solid-svg-icons/faImage.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperPlane */ \"./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else { var mod; }\n})(this, function (_exports, _fontawesomeSvgCore, _faFont, _faBold, _faItalic, _faUnderline, _faStrikethrough, _faList, _faListOl, _faListUl, _faAlignJustify, _faIndent, _faAlignLeft, _faAlignCenter, _faAlignRight, _faPaperclip, _faLink, _faImage, _faPaperPlane) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports[\"default\"] = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\n function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n _fontawesomeSvgCore.library.add(_faFont.faFont);\n\n _fontawesomeSvgCore.library.add(_faBold.faBold);\n\n _fontawesomeSvgCore.library.add(_faItalic.faItalic);\n\n _fontawesomeSvgCore.library.add(_faUnderline.faUnderline);\n\n _fontawesomeSvgCore.library.add(_faStrikethrough.faStrikethrough);\n\n _fontawesomeSvgCore.library.add(_faList.faList);\n\n _fontawesomeSvgCore.library.add(_faListOl.faListOl);\n\n _fontawesomeSvgCore.library.add(_faListUl.faListUl);\n\n _fontawesomeSvgCore.library.add(_faAlignJustify.faAlignJustify);\n\n _fontawesomeSvgCore.library.add(_faIndent.faIndent);\n\n _fontawesomeSvgCore.library.add(_faAlignLeft.faAlignLeft);\n\n _fontawesomeSvgCore.library.add(_faAlignCenter.faAlignCenter);\n\n _fontawesomeSvgCore.library.add(_faAlignRight.faAlignRight);\n\n _fontawesomeSvgCore.library.add(_faPaperclip.faPaperclip);\n\n _fontawesomeSvgCore.library.add(_faLink.faLink);\n\n _fontawesomeSvgCore.library.add(_faImage.faImage);\n\n _fontawesomeSvgCore.library.add(_faPaperPlane.faPaperPlane);\n\n _fontawesomeSvgCore.dom.watch();\n\n var EXTENSIONS = [\".doc\", \".docx\", \".xls\", \".xlsx\", \".ppt\", \".pptx\", \".pdf\", \".tif\", \".jpeg\", \".jpg\", \".gif\", \".bmp\", \".txt\", \".csv\", \".png\", \".msg\", \".wav\", \".mp3\", \".mp4\", \".zip\", \".rtf\", \".eps\", \".ai\", \".psd\", \".avi\", \".mov\", \".wmv\", \".cfg\", \".wss\", \".vsd\", \".vsdx\", \".tsd\", \".lic\"];\n var FONTPACK = \"fas\";\n var OPTIONGROUPS = {\n textDecoration: {\n menu: \"fa-font\",\n group: [{\n bold: \"fa-bold\"\n }, {\n italic: \"fa-italic\"\n }, {\n underline: \"fa-underline\"\n }, {\n strikethrough: \"fa-strikethrough\"\n }]\n },\n listOptions: {\n menu: \"fa-list\",\n group: [{\n insertOrderedList: \"fa-list-ol\"\n }, {\n insertUnorderedList: \"fa-list-ul\"\n }]\n },\n textAlign: {\n menu: \"fa-align-justify\",\n group: [{\n indent: \"fa-indent\"\n }, {\n justifyLeft: \"fa-align-left\"\n }, {\n justifyCenter: \"fa-align-center\"\n }, {\n justifyRight: \"fa-align-right\"\n }]\n },\n attachments: {\n menu: \"fa-paperclip\",\n group: [{\n attachment: \"fa-paperclip\"\n }, {\n link: \"fa-link\"\n }, {\n image: \"fa-image\"\n }]\n }\n };\n\n var StrivenEditor =\n /*#__PURE__*/\n function () {\n function StrivenEditor(el, options) {\n _classCallCheck(this, StrivenEditor);\n\n this.range = new Range();\n this.files = [];\n this.optionGroups = OPTIONGROUPS;\n\n if (options) {\n this.options = options;\n options.fontPack || (this.options.fontPack = FONTPACK);\n options.extensions || (this.options.extensions = EXTENSIONS);\n } else {\n this.options = {\n fontPack: FONTPACK,\n extensions: EXTENSIONS\n };\n }\n\n this.initEditor(el);\n this.initResponsive();\n this.initOverflow();\n }\n\n _createClass(StrivenEditor, [{\n key: \"initEditor\",\n value: function initEditor(el) {\n var _this = this;\n\n this.editor = el;\n this.toolbar = this.initToolbar();\n this.body = this.initBody();\n this.linkMenu = this.initLinkMenu();\n this.imageMenu = this.initImageMenu();\n this.metaDataSection = this.initMetaDataSection();\n this.filesSection = this.initFilesSection();\n this.editor.style.border = \"2px solid #ddd\";\n this.editor.style.display = \"flex\";\n this.editor.style.flexDirection = \"column\";\n this.editor.style.position = \"relative\";\n this.editor.style.fontFamily = \"Arial\";\n this.toolbar.style.display = \"flex\";\n this.toolbar.style.justifyContent = \"space-between\";\n this.toolbar.style.alignItems = \"center\";\n this.toolbar.style.flexWrap = \"wrap\";\n this.toolbar.style.minHeight = this.options.toolbarHide ? \"0\" : \"40px\";\n this.toolbarOptionsGroup.style.margin = \"0 10px\";\n this.toolbarOptionsGroup.style.display = this.options.toolbarHide ? \"none\" : \"flex\";\n this.body.contentEditable = \"true\";\n this.body.style.outline = \"none\";\n this.body.style.padding = \"10px 20px\";\n this.body.style.height = this.editor.style.height;\n this.body.style.minHeight = this.editor.style.minHeight;\n this.body.style.maxHeight = this.editor.style.maxHeight;\n this.editor.style.minHeight = \"auto\";\n this.editor.style.maxHeight = \"auto\";\n this.editor.style.maxWidth = \"100%\";\n\n if (this.options.toolbarHide) {\n this.toolbarSend.style.display = \"none\";\n this.toolbarOptionsGroup.style.display = \"none\";\n\n this.body.onfocus = function () {\n _this.overflow();\n\n _this.toolbarSlideUp();\n };\n\n this.body.onblur = function () {\n _this.overflow();\n\n setTimeout(function () {\n if (document.activeElement !== _this.body && document.activeElement !== _this.linkMenu.querySelector('input')) {\n _this.toolbarSlideDown();\n }\n }, 2000);\n };\n }\n\n this.toolbarSend.style.display = \"none\";\n this.toolbarSend.style.color = \"#fff\";\n this.toolbarSend.style.backgroundColor = \"#5cb85c\";\n this.toolbarSend.style.minHeight = this.options.toolbarHide ? \"40px\" : this.toolbar.style.minHeight;\n this.toolbarSend.style.width = \"50px\";\n this.toolbarSend.style.textAlign = \"center\";\n this.toolbarSend.style.justifyContent = \"center\";\n this.toolbarSend.style.alignContent = \"center\";\n this.toolbarSend.style.alignItems = \"center\";\n this.toolbarSend.style.cursor = \"pointer\";\n this.toolbarSend.style.border = \"1px solid #4cae4c\";\n this.toolbarSend.style.alignSelf = \"flex-end\";\n this.options.onToolbarSend && (this.toolbarSend.onclick = function () {\n return _this.options.onToolbarSend();\n });\n this.options.onToolbarSend && !this.options.toolbarHide && (this.toolbarSend.style.display = \"flex\");\n\n this.toolbarSend.onmouseenter = function () {\n return _this.toolbarSend.style.backgroundColor = \"#4cae4c\";\n };\n\n this.toolbarSend.onmouseleave = function () {\n return _this.toolbarSend.style.backgroundColor = \"#5cb85c\";\n }; // Toolbar Options\n\n\n this.toolbarOptions.forEach(function (optionEl) {\n // Assign Styles\n optionEl.style.padding = \"0 10px\";\n optionEl.style.cursor = \"pointer\";\n optionEl.style.userSelect = \"none\"; // Execute Toolbar Commands\n\n optionEl.onclick = function (e) {\n _this.body.focus();\n\n var command = optionEl.id.split(\"-\")[1];\n\n switch (command) {\n case \"insertOrderedList\":\n document.execCommand(\"indent\", true);\n document.execCommand(command, true);\n break;\n\n case \"insertUnorderedList\":\n document.execCommand(\"indent\", true);\n document.execCommand(command, true);\n break;\n\n case \"attachment\":\n var attachmentInput = document.createElement(\"input\");\n attachmentInput.style.display = \"none\";\n attachmentInput.type = \"file\";\n attachmentInput.click();\n\n attachmentInput.onchange = function (e) {\n return _this.attachFile(attachmentInput.files[0]);\n };\n\n break;\n\n case \"link\":\n if (_this.linkMenu.dataset.active === \"true\") {\n _this.linkMenu.dataset.active = \"false\";\n _this.linkMenu.style.display = \"none\";\n } else {\n _this.linkMenu.dataset.active = \"true\";\n _this.linkMenu.style.display = \"block\";\n _this.range = _this.getRange();\n\n _this.linkMenu.querySelector('input').focus();\n }\n\n break;\n\n case \"image\":\n console.log(\"image\");\n break;\n\n default:\n document.execCommand(command, true);\n break;\n }\n };\n }); // Paste Handler\n\n this.body.onpaste = function (e) {\n function dataURLtoFile(dataurl, filename) {\n var arr = dataurl.split(','),\n mime = arr[0].match(/:(.*?);/)[1],\n bstr = atob(arr[1]),\n n = bstr.length,\n u8arr = new Uint8Array(n);\n\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n\n var file = new File([u8arr], filename, {\n type: mime\n });\n return new File([u8arr], \"\".concat(file.name, \".\").concat(file.type.split('/').pop()), {\n type: file.type\n });\n }\n\n var convertImage = function convertImage(file) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = function () {\n return resolve(reader.result);\n };\n\n reader.onerror = function (error) {\n return reject(error);\n };\n });\n };\n\n if (e.clipboardData.files.length > 0 && e.clipboardData.files[0].type.includes(\"image\")) {\n convertImage(e.clipboardData.files[0]).then(function (res) {\n document.execCommand(\"insertImage\", true, res);\n _this.options.uploadOnPaste && _this.attachFile(dataURLtoFile(res, \"pastedimage\"));\n\n _this.overflow();\n });\n }\n\n if (e.clipboardData.items.length > 0 && e.clipboardData.items[0].type === \"text/plain\") {\n e.clipboardData.items[0].getAsString(function (string) {\n if (_this.options.metaUrl && _this.validURL(string)) {\n _this.getMeta(string).then(function (res) {\n var url = res.url,\n title = res.title,\n image = res.image,\n description = res.description;\n url && title && image && _this.createMetaDataElement(url, image, title, description);\n });\n }\n });\n }\n\n _this.overflow();\n }; // Get Content from Editor\n\n\n this.editor.getcontent = function () {\n return _this.getContent();\n }; // Get Editor Range\n\n\n this.editor.getrange = function () {\n return _this.getRange();\n };\n\n this.editor.appendChild(this.toolbar);\n this.editor.appendChild(this.body);\n this.editor.appendChild(this.linkMenu); // this.editor.appendChild(this.imageMenu);\n\n this.editor.appendChild(this.metaDataSection);\n this.editor.appendChild(this.filesSection); // Reposition Toolbar\n\n if (this.options.toolbarBottom) {\n this.editor.removeChild(this.toolbar);\n this.editor.append(this.toolbar);\n }\n }\n }, {\n key: \"toolbarSlideUp\",\n value: function toolbarSlideUp() {\n var that = this;\n var height = this.toolbar.offsetHeight;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 40) {\n that.options.onToolbarSend && (that.toolbarSend.style.display = \"flex\");\n that.toolbarOptionsGroup.style.display = \"flex\";\n clearInterval(id);\n } else {\n height++;\n that.toolbar.style.minHeight = \"\".concat(height, \"px\");\n }\n }\n }\n }, {\n key: \"toolbarSlideDown\",\n value: function toolbarSlideDown() {\n var that = this;\n this.options.onToolbarSend && (this.toolbarSend.style.display = \"none\");\n this.toolbarOptionsGroup.style.display = \"none\";\n var height = 40;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 0) {\n clearInterval(id);\n } else {\n height--;\n that.toolbar.style.minHeight = \"\".concat(height, \"px\");\n }\n }\n }\n }, {\n key: \"initToolbar\",\n value: function initToolbar() {\n var _this2 = this;\n\n var toolbar = document.createElement(\"div\");\n this.toolbarOptionsGroup = document.createElement(\"div\");\n var groups = Object.keys(this.optionGroups);\n toolbar.classList.add(\"toolbar\");\n this.toolbarOptionsGroup.classList.add(\"toolbar-options\"); //iterate groups\n\n groups.forEach(function (group) {\n // add menu to toolbarOptions\n var toolbarMenu = document.createElement(\"div\");\n var toolbarMenuIcon = document.createElement(\"i\");\n toolbarMenu.classList.add(\"toolbar-menu\");\n toolbarMenu.id = \"menu-\".concat(group);\n toolbarMenuIcon.classList.add(_this2.options.fontPack);\n toolbarMenuIcon.classList.add(_this2.optionGroups[group].menu);\n toolbarMenu.appendChild(toolbarMenuIcon);\n\n _this2.toolbarOptionsGroup.appendChild(toolbarMenu); // add group to toolbarOptions\n\n\n var toolbarGroup = document.createElement(\"div\");\n toolbarGroup.classList.add(\"toolbar-group\");\n toolbarGroup.id = \"group-\".concat(group);\n\n _this2.optionGroups[group].group.forEach(function (option) {\n var optionSpan = document.createElement(\"span\");\n var optionIcon = document.createElement(\"i\");\n var toolbarCommand = Object.keys(option)[0];\n optionSpan.id = \"toolbar-\".concat(toolbarCommand);\n optionIcon.classList.add(_this2.options.fontPack);\n optionIcon.classList.add(option[toolbarCommand]);\n optionSpan.appendChild(optionIcon);\n toolbarGroup.appendChild(optionSpan);\n });\n\n _this2.toolbarOptionsGroup.appendChild(toolbarGroup);\n });\n toolbar.appendChild(this.toolbarOptionsGroup); //add toolbar-send\n\n var toolbarSend = document.createElement(\"div\");\n var toolbarSendIcon = document.createElement(\"i\");\n toolbarSend.id = \"toolbar-send\";\n toolbarSendIcon.classList.add(this.options.fontPack);\n toolbarSendIcon.classList.add(\"fa-paper-plane\");\n toolbarSend.appendChild(toolbarSendIcon);\n toolbar.appendChild(toolbarSend);\n this.toolbarOptions = toolbar.querySelectorAll(\"span\");\n this.toolbarGroups = _toConsumableArray(toolbar.getElementsByClassName(\"toolbar-group\"));\n this.toolbarMenus = _toConsumableArray(toolbar.getElementsByClassName(\"toolbar-menu\"));\n this.toolbarSend = toolbar.querySelector(\"#toolbar-send\");\n return toolbar;\n }\n }, {\n key: \"initBody\",\n value: function initBody() {\n var body = document.createElement(\"div\");\n body.classList.add(\"body\");\n return body;\n }\n }, {\n key: \"initLinkMenu\",\n value: function initLinkMenu() {\n var _this3 = this;\n\n var linkMenu = document.createElement(\"div\");\n var linkMenuForm = document.createElement(\"div\");\n var linkMenuButton = document.createElement(\"button\");\n var linkMenuFormLabel = document.createElement(\"p\");\n var linkMenuFormInput = document.createElement(\"input\");\n linkMenu.id = \"link-menu\";\n linkMenuButton.textContent = \"Insert Link\";\n linkMenuFormLabel.textContent = \"Web Address\";\n linkMenuFormInput.type = \"text\";\n linkMenuFormLabel.style.margin = \"8px 10px 8px 0\";\n linkMenuFormLabel.style.fontSize = \"14px\";\n linkMenuButton.style.cursor = \"pointer\";\n linkMenu.dataset.active = \"false\";\n linkMenu.style.display = \"none\";\n linkMenu.style.position = \"absolute\";\n linkMenu.style.right = \"10px\";\n linkMenu.style.bottom = \"10px\";\n linkMenu.style.backgroundColor = \"#fff\";\n linkMenu.style.border = \"2px solid #ddd\";\n linkMenu.style.padding = \"10px 20px\";\n linkMenu.style.zIndex = \"1000\";\n linkMenuFormLabel.style.width = \"100%\";\n linkMenuFormLabel.style.textAlign = \"right\";\n linkMenuFormLabel.style.marginRight = \"10px\";\n linkMenuFormInput.style.outline = \"none\";\n linkMenuFormInput.style.padding = \"0 5px\";\n linkMenuFormInput.placeholder = \"Insert a Link\";\n linkMenuForm.style.display = \"flex\";\n linkMenuForm.style.justifyContent = \"space-between\";\n linkMenuForm.style.margin = \"5px 0\";\n linkMenuButton.style[\"float\"] = \"right\";\n linkMenuButton.style.padding = \"6px 12px\";\n linkMenuButton.style.border = \"1px solid #4cae4c\";\n linkMenuButton.style.backgroundColor = \"#5cb85c\";\n linkMenuButton.style.fontSize = \"14px\";\n linkMenuButton.style.color = \"#fff\";\n linkMenuButton.style.outline = \"none\";\n\n linkMenuButton.onmouseenter = function () {\n return linkMenuButton.style.backgroundColor = \"#4cae4c\";\n };\n\n linkMenuButton.onmouseleave = function () {\n return linkMenuButton.style.backgroundColor = \"#5cb85c\";\n };\n\n linkMenuButton.onclick = function (e) {\n var linkValue = linkMenuFormInput.value;\n\n if (linkValue) {\n window.getSelection().removeAllRanges();\n window.getSelection().addRange(_this3.range);\n document.execCommand(\"createLink\", true, linkValue);\n\n if (_this3.options.metaUrl && _this3.validURL(linkValue)) {\n _this3.getMeta(linkValue).then(function (res) {\n var url = res.url,\n image = res.image,\n title = res.title,\n description = res.description;\n url && image && title && _this3.createMetaDataElement(url, image, title, description);\n });\n }\n\n var bodyLinks = _this3.body.querySelectorAll(\"a\");\n\n bodyLinks[bodyLinks.length - 1].contentEditable = \"false\";\n linkMenuFormInput.value = \"\";\n\n _this3.toolbar.querySelector(\"#toolbar-link\").onclick();\n } else {\n _this3.body.focus();\n\n _this3.linkMenu.dataset.active = \"false\";\n e.target.parentElement.style.display = \"none\";\n }\n };\n\n linkMenuForm.appendChild(linkMenuFormLabel);\n linkMenuForm.appendChild(linkMenuFormInput);\n linkMenu.appendChild(linkMenuForm);\n linkMenu.appendChild(linkMenuButton);\n return linkMenu;\n }\n }, {\n key: \"initImageMenu\",\n value: function initImageMenu() {\n var imageMenu = document.createElement(\"div\");\n var imageMenuForm = document.createElement(\"div\");\n var imageMenuButton = document.createElement(\"button\");\n var imageMenuFormLabel = document.createElement(\"p\");\n var imageMenuFormInput = document.createElement(\"input\");\n imageMenu.id = \"image-menu\";\n imageMenuButton.textContent = \"Insert Image\";\n imageMenuFormLabel.textContent = \"Image URL\";\n imageMenuFormInput.type = \"text\";\n imageMenuFormLabel.style.margin = \"8px 10px 8px 0\";\n imageMenuFormLabel.style.fontSize = \"14px\";\n imageMenuButton.style.cursor = \"pointer\";\n imageMenuForm.appendChild(imageMenuFormLabel);\n imageMenuForm.appendChild(imageMenuFormInput);\n imageMenu.appendChild(imageMenuForm);\n imageMenu.appendChild(imageMenuButton);\n return imageMenu;\n }\n }, {\n key: \"initMetaDataSection\",\n value: function initMetaDataSection() {\n var metaDataSection = document.createElement(\"div\");\n metaDataSection.classList.add(\"metadata-section\");\n metaDataSection.style.display = \"flex\";\n metaDataSection.style.flexWrap = \"wrap\";\n metaDataSection.style.zIndex = \"500\";\n return metaDataSection;\n }\n }, {\n key: \"initFilesSection\",\n value: function initFilesSection() {\n var _this4 = this;\n\n var filesSection = document.createElement(\"div\");\n filesSection.classList.add(\"files-section\");\n filesSection.style.display = \"flex\";\n filesSection.style.flexWrap = \"wrap\";\n filesSection.style.zIndex = \"500\";\n\n this.body.ondragenter = function (e) {\n _this4.body.style.backgroundColor = \"#ddd\";\n };\n\n this.body.ondragleave = function (e) {\n _this4.body.style.backgroundColor = \"inherit\";\n };\n\n this.body.ondrop = function (e) {\n _this4.body.style.backgroundColor = \"inherit\";\n e.preventDefault();\n var file = e.dataTransfer.files && e.dataTransfer.files[0];\n\n _this4.attachFile(file);\n };\n\n this.editor.getfiles = function () {\n return _this4.getFiles();\n };\n\n return filesSection;\n }\n }, {\n key: \"createFileElement\",\n value: function createFileElement(name, size) {\n var _this5 = this;\n\n var fileEl = document.createElement(\"div\");\n var fileNameEl = document.createElement(\"h4\");\n var fileSizeEl = document.createElement(\"p\");\n var removeFileEl = document.createElement(\"p\");\n fileNameEl.textContent = name;\n fileSizeEl.textContent = size;\n removeFileEl.textContent = \"X\";\n fileEl.dataset.fileindex = this.files.length - 1;\n fileEl.style.width = \"100%\";\n fileEl.style.display = \"flex\";\n fileEl.style.flexDirection = \"column\";\n fileEl.style.margin = \"10px\";\n fileEl.style.position = \"relative\";\n fileNameEl.style.fontWeight = \"bold\";\n fileNameEl.style.margin = \"0\";\n fileSizeEl.style.fontSize = \"12px\";\n fileSizeEl.style.margin = \"2px 0\";\n removeFileEl.style.margin = \"0\";\n removeFileEl.style.userSelect = \"none\";\n removeFileEl.style.color = \"black\";\n removeFileEl.style.position = \"absolute\";\n removeFileEl.style.right = \"5px\";\n removeFileEl.style.top = \"-5px\";\n removeFileEl.style.cursor = \"pointer\";\n removeFileEl.style.backgroundColor = \"#fff\";\n\n removeFileEl.onmouseenter = function () {\n return removeFileEl.style.color = \"#ddd\";\n };\n\n removeFileEl.onmouseleave = function () {\n return removeFileEl.style.color = \"black\";\n };\n\n removeFileEl.onclick = function (e) {\n _this5.files.splice(e.target.parentElement.dataset.fileindex, 1);\n\n e.target.parentElement.remove();\n };\n\n fileEl.appendChild(fileNameEl);\n fileEl.appendChild(fileSizeEl);\n fileEl.appendChild(removeFileEl);\n this.filesSection.appendChild(fileEl);\n\n this.editor.getfiles = function () {\n return _this5.getFiles();\n };\n }\n }, {\n key: \"createMetaDataElement\",\n value: function createMetaDataElement(url, img, title, description) {\n var metaItemEl = document.createElement(\"div\");\n var metaLinkEl = document.createElement(\"a\");\n var metaImageEl = document.createElement(\"img\");\n var metaDataEl = document.createElement(\"div\");\n var metaDataTitleEl = document.createElement(\"h4\");\n var metaDataDescriptionEl = document.createElement(\"p\");\n var removeMetaDataEl = document.createElement(\"span\");\n metaLinkEl.href = url;\n metaImageEl.src = img;\n metaDataTitleEl.textContent = title;\n metaDataDescriptionEl.textContent = description;\n removeMetaDataEl.textContent = \"X\";\n metaLinkEl.target = \"blank\";\n metaItemEl.style.width = \"100%\";\n metaItemEl.style.display = \"flex\";\n metaItemEl.style.margin = \"10px\";\n metaItemEl.style.position = \"relative\";\n metaImageEl.style.marginRight = \"10px\";\n metaImageEl.style.height = \"50px\";\n metaImageEl.style.width = \"75px\";\n metaDataTitleEl.style.fontWeight = \"bold\";\n metaDataTitleEl.style.margin = \"0\";\n metaDataDescriptionEl.style.margin = \"0\";\n removeMetaDataEl.style.userSelect = \"none\";\n removeMetaDataEl.style.color = \"black\";\n removeMetaDataEl.style.position = \"absolute\";\n removeMetaDataEl.style.right = \"5px\";\n removeMetaDataEl.style.top = \"-5px\";\n removeMetaDataEl.style.cursor = \"pointer\";\n removeMetaDataEl.style.backgroundColor = \"#fff\";\n\n removeMetaDataEl.onmouseenter = function () {\n return removeMetaDataEl.style.color = \"#ddd\";\n };\n\n removeMetaDataEl.onmouseleave = function () {\n return removeMetaDataEl.style.color = \"black\";\n };\n\n removeMetaDataEl.onclick = function (e) {\n return e.target.parentElement.remove();\n };\n\n metaLinkEl.appendChild(metaImageEl);\n metaDataEl.appendChild(metaDataTitleEl);\n metaDataEl.appendChild(metaDataDescriptionEl);\n metaItemEl.appendChild(metaLinkEl);\n metaItemEl.appendChild(metaDataEl);\n metaItemEl.appendChild(removeMetaDataEl);\n this.metaDataSection.appendChild(metaItemEl);\n }\n }, {\n key: \"initResponsive\",\n value: function initResponsive() {\n var that = this;\n\n if (!this.options.minimal) {\n var responsiveGroups = function responsiveGroups(isResponsive) {\n that.toolbarGroups.forEach(function (group) {\n group.dataset.open = \"false\";\n group.style.display = isResponsive ? \"none\" : \"block\";\n group.style.position = isResponsive ? \"absolute\" : \"relative\";\n group.style.bottom = isResponsive ? \"5px\" : \"inherit\";\n group.style.right = isResponsive ? \"5px\" : \"inherit\";\n group.style.backgroundColor = isResponsive ? \"#fff\" : \"inherit\";\n group.style.border = isResponsive ? \"2px solid #ddd\" : \"none\";\n });\n that.toolbarMenus.forEach(function (menu) {\n function toggleMenu() {\n var selectedGroup = that.toolbar.querySelector(\"#group-\".concat(menu.id.split(\"-\")[1]));\n\n if (selectedGroup.dataset.open === \"false\") {\n // close opened groups\n that.toolbarGroups.forEach(function (group) {\n if (group.dataset.open === \"true\") {\n group.style.display = \"none\";\n group.dataset.open = \"false\";\n }\n }); // open group\n\n selectedGroup.style.display = \"block\";\n selectedGroup.style.padding = \"5px\";\n selectedGroup.dataset.open = \"true\";\n } else {\n selectedGroup.style.display = \"none\";\n selectedGroup.dataset.open = \"false\";\n }\n }\n\n menu.style.padding = \"0 10px\";\n menu.style.cursor = \"pointer\";\n menu.style.userSelect = \"none\";\n menu.style.display = isResponsive ? \"block\" : \"none\";\n\n menu.onclick = function (e) {\n return toggleMenu();\n };\n });\n };\n\n var setResponsive = function setResponsive() {\n responsive = window.matchMedia(\"(max-width: 700px)\").matches;\n responsiveGroups(responsive);\n };\n\n var responsive = window.matchMedia(\"(max-width: 700px)\").matches;\n setResponsive();\n\n window.onresize = function () {\n return setResponsive();\n };\n } else {\n this.toolbarMenus.forEach(function (menu) {\n return menu.style.display = \"none\";\n });\n this.toolbar.querySelector(\"#toolbar-strikethrough\").style.display = \"none\";\n this.toolbar.querySelector(\"#toolbar-image\").style.display = \"none\";\n this.toolbar.querySelector(\"#toolbar-insertOrderedList\").style.display = \"none\";\n this.toolbar.querySelector(\"#group-textAlign\").style.display = \"none\";\n }\n }\n }, {\n key: \"initOverflow\",\n value: function initOverflow() {\n var _this6 = this;\n\n var onFocus = this.body.onfocus;\n\n this.body.onfocus = function () {\n onFocus && onFocus();\n\n _this6.overflow();\n };\n\n var onBlur = this.body.onblur;\n\n this.body.onblur = function () {\n onBlur && onBlur();\n\n _this6.overflow();\n };\n\n this.body.onkeypress = function () {\n return _this6.overflow();\n };\n }\n }, {\n key: \"getFiles\",\n value: function getFiles() {\n return this.files;\n }\n }, {\n key: \"getContent\",\n value: function getContent() {\n return this.body.innerHTML;\n }\n }, {\n key: \"getRange\",\n value: function getRange() {\n return window.getSelection().getRangeAt(0);\n }\n }, {\n key: \"getMeta\",\n value: function getMeta(url) {\n return fetch(this.options.metaUrl, {\n method: \"POST\",\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n targetUrl: url\n })\n }).then(function (res) {\n return res.json();\n });\n }\n }, {\n key: \"validURL\",\n value: function validURL(str) {\n var pattern = new RegExp(\"^(https?:\\\\/\\\\/)?\" + \"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|\" + \"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + \"(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*\" + \"(\\\\?[;&a-z\\\\d%_.~+=-]*)?\" + \"(\\\\#[-a-z\\\\d_]*)?$\", \"i\");\n return !!pattern.test(str);\n }\n }, {\n key: \"overflow\",\n value: function overflow() {\n var body = this.body;\n body.scrollHeight > body.clientHeight ? body.style.overflowY = \"scroll\" : body.style.overflowY = \"hidden\";\n body.scrollWidth > body.clientWidth ? body.style.overflowX = \"scroll\" : body.style.overflowX = \"hidden\";\n }\n }, {\n key: \"formatBytes\",\n value: function formatBytes(bytes) {\n var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n if (bytes === 0) return '0 Bytes';\n var k = 1024;\n var dm = decimals < 0 ? 0 : decimals;\n var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n var i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n }\n }, {\n key: \"validateFile\",\n value: function validateFile(file) {\n var extension = file.type.split('/').pop();\n return this.options.extensions.includes(\".\".concat(extension));\n }\n }, {\n key: \"attachFile\",\n value: function attachFile(file) {\n if (this.validateFile(file)) {\n this.files.push(file);\n this.createFileElement(file.name, this.formatBytes(file.size));\n } else {\n this.fileInvalid();\n }\n }\n }, {\n key: \"fileInvalid\",\n value: function fileInvalid() {\n var _this7 = this;\n\n this.body.style.transition = \"background-color .5s\";\n this.body.style.backgroundColor = \"#d9534f\";\n setTimeout(function () {\n _this7.body.style.backgroundColor = \"inherit\";\n setTimeout(function () {\n return _this7.body.style.transition = \"none\";\n }, 500);\n }, 500);\n }\n }]);\n\n return StrivenEditor;\n }();\n\n _exports[\"default\"] = StrivenEditor;\n});\n\n//# sourceURL=webpack://striveneditor/./src/striveneditor.js?"); +eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @fortawesome/fontawesome-svg-core */ \"./node_modules/@fortawesome/fontawesome-svg-core/index.es.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faFont */ \"./node_modules/@fortawesome/free-solid-svg-icons/faFont.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faBold */ \"./node_modules/@fortawesome/free-solid-svg-icons/faBold.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faItalic */ \"./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faUnderline */ \"./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faStrikethrough */ \"./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faList */ \"./node_modules/@fortawesome/free-solid-svg-icons/faList.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListOl */ \"./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListUl */ \"./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignJustify */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faIndent */ \"./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignLeft */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignCenter */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignRight */ \"./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperclip */ \"./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faLink */ \"./node_modules/@fortawesome/free-solid-svg-icons/faLink.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faImage */ \"./node_modules/@fortawesome/free-solid-svg-icons/faImage.js\"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperPlane */ \"./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else { var mod; }\n})(this, function (_exports, _fontawesomeSvgCore, _faFont, _faBold, _faItalic, _faUnderline, _faStrikethrough, _faList, _faListOl, _faListUl, _faAlignJustify, _faIndent, _faAlignLeft, _faAlignCenter, _faAlignRight, _faPaperclip, _faLink, _faImage, _faPaperPlane) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports[\"default\"] = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\n function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n _fontawesomeSvgCore.library.add(_faFont.faFont);\n\n _fontawesomeSvgCore.library.add(_faBold.faBold);\n\n _fontawesomeSvgCore.library.add(_faItalic.faItalic);\n\n _fontawesomeSvgCore.library.add(_faUnderline.faUnderline);\n\n _fontawesomeSvgCore.library.add(_faStrikethrough.faStrikethrough);\n\n _fontawesomeSvgCore.library.add(_faList.faList);\n\n _fontawesomeSvgCore.library.add(_faListOl.faListOl);\n\n _fontawesomeSvgCore.library.add(_faListUl.faListUl);\n\n _fontawesomeSvgCore.library.add(_faAlignJustify.faAlignJustify);\n\n _fontawesomeSvgCore.library.add(_faIndent.faIndent);\n\n _fontawesomeSvgCore.library.add(_faAlignLeft.faAlignLeft);\n\n _fontawesomeSvgCore.library.add(_faAlignCenter.faAlignCenter);\n\n _fontawesomeSvgCore.library.add(_faAlignRight.faAlignRight);\n\n _fontawesomeSvgCore.library.add(_faPaperclip.faPaperclip);\n\n _fontawesomeSvgCore.library.add(_faLink.faLink);\n\n _fontawesomeSvgCore.library.add(_faImage.faImage);\n\n _fontawesomeSvgCore.library.add(_faPaperPlane.faPaperPlane);\n\n _fontawesomeSvgCore.dom.watch();\n\n var EXTENSIONS = [\".doc\", \".docx\", \".xls\", \".xlsx\", \".ppt\", \".pptx\", \".pdf\", \".tif\", \".jpeg\", \".jpg\", \".gif\", \".bmp\", \".txt\", \".csv\", \".png\", \".msg\", \".wav\", \".mp3\", \".mp4\", \".zip\", \".rtf\", \".eps\", \".ai\", \".psd\", \".avi\", \".mov\", \".wmv\", \".cfg\", \".wss\", \".vsd\", \".vsdx\", \".tsd\", \".lic\"];\n var FONTPACK = \"fas\";\n var OPTIONGROUPS = {\n textDecoration: {\n menu: \"fa-font\",\n group: [{\n bold: \"fa-bold\"\n }, {\n italic: \"fa-italic\"\n }, {\n underline: \"fa-underline\"\n }, {\n strikethrough: \"fa-strikethrough\"\n }]\n },\n listOptions: {\n menu: \"fa-list\",\n group: [{\n insertOrderedList: \"fa-list-ol\"\n }, {\n insertUnorderedList: \"fa-list-ul\"\n }]\n },\n textAlign: {\n menu: \"fa-align-justify\",\n group: [{\n indent: \"fa-indent\"\n }, {\n justifyLeft: \"fa-align-left\"\n }, {\n justifyCenter: \"fa-align-center\"\n }, {\n justifyRight: \"fa-align-right\"\n }]\n },\n attachments: {\n menu: \"fa-paperclip\",\n group: [{\n attachment: \"fa-paperclip\"\n }, {\n link: \"fa-link\"\n }, {\n image: \"fa-image\"\n }]\n }\n };\n\n var StrivenEditor =\n /*#__PURE__*/\n function () {\n function StrivenEditor(el, options) {\n _classCallCheck(this, StrivenEditor);\n\n this.range = new Range();\n this.files = [];\n this.optionGroups = OPTIONGROUPS;\n\n if (options) {\n this.options = options;\n options.fontPack || (this.options.fontPack = FONTPACK);\n options.extensions || (this.options.extensions = EXTENSIONS);\n } else {\n this.options = {\n fontPack: FONTPACK,\n extensions: EXTENSIONS\n };\n }\n\n this.initEditor(el);\n this.initResponsive();\n this.initOverflow();\n }\n\n _createClass(StrivenEditor, [{\n key: \"initEditor\",\n value: function initEditor(el) {\n var _this = this;\n\n this.editor = el;\n this.toolbar = this.initToolbar();\n this.body = this.initBody();\n this.linkMenu = this.initLinkMenu();\n this.imageMenu = this.initImageMenu();\n this.metaDataSection = this.initMetaDataSection();\n this.filesSection = this.initFilesSection();\n this.editor.style.border = \"2px solid #ddd\";\n this.editor.style.display = \"flex\";\n this.editor.style.flexDirection = \"column\";\n this.editor.style.position = \"relative\";\n this.editor.style.fontFamily = \"Arial\";\n this.toolbar.style.display = \"flex\";\n this.toolbar.style.justifyContent = \"space-between\";\n this.toolbar.style.alignItems = \"center\";\n this.toolbar.style.flexWrap = \"wrap\";\n this.toolbar.style.minHeight = this.options.toolbarHide ? \"0\" : \"40px\";\n this.toolbarOptionsGroup.style.margin = \"0 10px\";\n this.toolbarOptionsGroup.style.display = this.options.toolbarHide ? \"none\" : \"flex\";\n this.body.contentEditable = \"true\";\n this.body.style.outline = \"none\";\n this.body.style.padding = \"10px 20px\";\n this.body.style.height = this.editor.style.height;\n this.body.style.minHeight = this.editor.style.minHeight;\n this.body.style.maxHeight = this.editor.style.maxHeight;\n this.editor.style.minHeight = \"auto\";\n this.editor.style.maxHeight = \"auto\";\n this.editor.style.maxWidth = \"100%\";\n\n if (this.options.toolbarHide) {\n this.toolbarSend.style.display = \"none\";\n this.toolbarOptionsGroup.style.display = \"none\";\n\n this.body.onfocus = function () {\n _this.overflow();\n\n _this.toolbarSlideUp();\n };\n\n this.body.onblur = function () {\n _this.overflow();\n\n setTimeout(function () {\n if (document.activeElement !== _this.body && document.activeElement !== _this.linkMenu.querySelector('input') && document.activeElement !== _this.imageMenu.querySelector('input')) {\n _this.toolbarSlideDown();\n }\n }, 2000);\n };\n }\n\n this.toolbarSend.style.display = \"none\";\n this.toolbarSend.style.color = \"#fff\";\n this.toolbarSend.style.backgroundColor = \"#5cb85c\";\n this.toolbarSend.style.minHeight = this.options.toolbarHide ? \"40px\" : this.toolbar.style.minHeight;\n this.toolbarSend.style.width = \"50px\";\n this.toolbarSend.style.textAlign = \"center\";\n this.toolbarSend.style.justifyContent = \"center\";\n this.toolbarSend.style.alignContent = \"center\";\n this.toolbarSend.style.alignItems = \"center\";\n this.toolbarSend.style.cursor = \"pointer\";\n this.toolbarSend.style.border = \"1px solid #4cae4c\";\n this.toolbarSend.style.alignSelf = \"flex-end\";\n this.options.onToolbarSend && (this.toolbarSend.onclick = function () {\n return _this.options.onToolbarSend();\n });\n this.options.onToolbarSend && !this.options.toolbarHide && (this.toolbarSend.style.display = \"flex\");\n\n this.toolbarSend.onmouseenter = function () {\n return _this.toolbarSend.style.backgroundColor = \"#4cae4c\";\n };\n\n this.toolbarSend.onmouseleave = function () {\n return _this.toolbarSend.style.backgroundColor = \"#5cb85c\";\n }; // Toolbar Options\n\n\n this.toolbarOptions.forEach(function (optionEl) {\n // Assign Styles\n optionEl.style.padding = \"0 10px\";\n optionEl.style.cursor = \"pointer\";\n optionEl.style.userSelect = \"none\"; // Execute Toolbar Commands\n\n optionEl.onclick = function (e) {\n _this.body.focus();\n\n var command = optionEl.id.split(\"-\")[1];\n\n switch (command) {\n case \"insertOrderedList\":\n document.execCommand(\"indent\", true);\n document.execCommand(command, true);\n break;\n\n case \"insertUnorderedList\":\n document.execCommand(\"indent\", true);\n document.execCommand(command, true);\n break;\n\n case \"attachment\":\n var attachmentInput = document.createElement(\"input\");\n attachmentInput.style.display = \"none\";\n attachmentInput.type = \"file\";\n attachmentInput.click();\n\n attachmentInput.onchange = function (e) {\n return _this.attachFile(attachmentInput.files[0]);\n };\n\n break;\n\n case \"link\":\n if (_this.linkMenu.dataset.active === \"true\") {\n _this.linkMenu.dataset.active = \"false\";\n _this.linkMenu.style.display = \"none\";\n } else {\n _this.linkMenu.dataset.active = \"true\";\n _this.linkMenu.style.display = \"block\";\n _this.range = _this.getRange();\n\n _this.linkMenu.querySelector('input').focus();\n }\n\n break;\n\n case \"image\":\n if (_this.imageMenu.dataset.active === \"true\") {\n _this.imageMenu.dataset.active = \"false\";\n _this.imageMenu.style.display = \"none\";\n } else {\n _this.imageMenu.dataset.active = \"true\";\n _this.imageMenu.style.display = \"block\";\n _this.range = _this.getRange();\n\n _this.imageMenu.querySelector('input').focus();\n }\n\n break;\n\n default:\n document.execCommand(command, true);\n break;\n }\n };\n }); // Paste Handler\n\n this.body.onpaste = function (e) {\n function dataURLtoFile(dataurl, filename) {\n var arr = dataurl.split(','),\n mime = arr[0].match(/:(.*?);/)[1],\n bstr = atob(arr[1]),\n n = bstr.length,\n u8arr = new Uint8Array(n);\n\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n\n var file = new File([u8arr], filename, {\n type: mime\n });\n return new File([u8arr], \"\".concat(file.name, \".\").concat(file.type.split('/').pop()), {\n type: file.type\n });\n }\n\n var convertImage = function convertImage(file) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = function () {\n return resolve(reader.result);\n };\n\n reader.onerror = function (error) {\n return reject(error);\n };\n });\n };\n\n if (e.clipboardData.files.length > 0 && e.clipboardData.files[0].type.includes(\"image\")) {\n convertImage(e.clipboardData.files[0]).then(function (res) {\n document.execCommand(\"insertImage\", true, res);\n _this.options.uploadOnPaste && _this.attachFile(dataURLtoFile(res, \"pastedimage\"));\n\n _this.overflow();\n });\n }\n\n if (e.clipboardData.items.length > 0 && e.clipboardData.items[0].type === \"text/plain\") {\n e.clipboardData.items[0].getAsString(function (string) {\n if (_this.options.metaUrl && _this.validURL(string)) {\n _this.getMeta(string).then(function (res) {\n var url = res.url,\n title = res.title,\n image = res.image,\n description = res.description;\n url && title && image && _this.createMetaDataElement(url, image, title, description);\n });\n }\n });\n }\n\n _this.overflow();\n }; // Get Content from Editor\n\n\n this.editor.getcontent = function () {\n return _this.getContent();\n }; // Get Editor Range\n\n\n this.editor.getrange = function () {\n return _this.getRange();\n };\n\n this.editor.appendChild(this.toolbar);\n this.editor.appendChild(this.body);\n this.editor.appendChild(this.linkMenu);\n this.editor.appendChild(this.imageMenu);\n this.editor.appendChild(this.metaDataSection);\n this.editor.appendChild(this.filesSection); // Reposition Toolbar\n\n if (this.options.toolbarBottom) {\n this.editor.removeChild(this.toolbar);\n this.editor.append(this.toolbar);\n }\n }\n }, {\n key: \"toolbarSlideUp\",\n value: function toolbarSlideUp() {\n var that = this;\n var height = this.toolbar.offsetHeight;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 40) {\n that.options.onToolbarSend && (that.toolbarSend.style.display = \"flex\");\n that.toolbarOptionsGroup.style.display = \"flex\";\n clearInterval(id);\n } else {\n height++;\n that.toolbar.style.minHeight = \"\".concat(height, \"px\");\n }\n }\n }\n }, {\n key: \"toolbarSlideDown\",\n value: function toolbarSlideDown() {\n var that = this;\n this.options.onToolbarSend && (this.toolbarSend.style.display = \"none\");\n this.toolbarOptionsGroup.style.display = \"none\";\n var height = 40;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 0) {\n clearInterval(id);\n } else {\n height--;\n that.toolbar.style.minHeight = \"\".concat(height, \"px\");\n }\n }\n }\n }, {\n key: \"initToolbar\",\n value: function initToolbar() {\n var _this2 = this;\n\n var toolbar = document.createElement(\"div\");\n this.toolbarOptionsGroup = document.createElement(\"div\");\n var groups = Object.keys(this.optionGroups);\n toolbar.classList.add(\"toolbar\");\n this.toolbarOptionsGroup.classList.add(\"toolbar-options\"); //iterate groups\n\n groups.forEach(function (group) {\n // add menu to toolbarOptions\n var toolbarMenu = document.createElement(\"div\");\n var toolbarMenuIcon = document.createElement(\"i\");\n toolbarMenu.classList.add(\"toolbar-menu\");\n toolbarMenu.id = \"menu-\".concat(group);\n toolbarMenuIcon.classList.add(_this2.options.fontPack);\n toolbarMenuIcon.classList.add(_this2.optionGroups[group].menu);\n toolbarMenu.appendChild(toolbarMenuIcon);\n\n _this2.toolbarOptionsGroup.appendChild(toolbarMenu); // add group to toolbarOptions\n\n\n var toolbarGroup = document.createElement(\"div\");\n toolbarGroup.classList.add(\"toolbar-group\");\n toolbarGroup.id = \"group-\".concat(group);\n\n _this2.optionGroups[group].group.forEach(function (option) {\n var optionSpan = document.createElement(\"span\");\n var optionIcon = document.createElement(\"i\");\n var toolbarCommand = Object.keys(option)[0];\n optionSpan.id = \"toolbar-\".concat(toolbarCommand);\n optionIcon.classList.add(_this2.options.fontPack);\n optionIcon.classList.add(option[toolbarCommand]);\n optionSpan.appendChild(optionIcon);\n toolbarGroup.appendChild(optionSpan);\n });\n\n _this2.toolbarOptionsGroup.appendChild(toolbarGroup);\n });\n toolbar.appendChild(this.toolbarOptionsGroup); //add toolbar-send\n\n var toolbarSend = document.createElement(\"div\");\n var toolbarSendIcon = document.createElement(\"i\");\n toolbarSend.id = \"toolbar-send\";\n toolbarSendIcon.classList.add(this.options.fontPack);\n toolbarSendIcon.classList.add(\"fa-paper-plane\");\n toolbarSend.appendChild(toolbarSendIcon);\n toolbar.appendChild(toolbarSend);\n this.toolbarOptions = toolbar.querySelectorAll(\"span\");\n this.toolbarGroups = _toConsumableArray(toolbar.getElementsByClassName(\"toolbar-group\"));\n this.toolbarMenus = _toConsumableArray(toolbar.getElementsByClassName(\"toolbar-menu\"));\n this.toolbarSend = toolbar.querySelector(\"#toolbar-send\");\n return toolbar;\n }\n }, {\n key: \"initBody\",\n value: function initBody() {\n var body = document.createElement(\"div\");\n body.classList.add(\"body\");\n return body;\n }\n }, {\n key: \"initLinkMenu\",\n value: function initLinkMenu() {\n var _this3 = this;\n\n var linkMenu = document.createElement(\"div\");\n var linkMenuForm = document.createElement(\"div\");\n var linkMenuButton = document.createElement(\"button\");\n var linkMenuFormLabel = document.createElement(\"p\");\n var linkMenuFormInput = document.createElement(\"input\");\n linkMenu.id = \"link-menu\";\n linkMenuButton.textContent = \"Insert Link\";\n linkMenuFormLabel.textContent = \"Web Address\";\n linkMenuFormInput.type = \"text\";\n linkMenuFormLabel.style.margin = \"8px 10px 8px 0\";\n linkMenuFormLabel.style.fontSize = \"14px\";\n linkMenuButton.style.cursor = \"pointer\";\n linkMenu.dataset.active = \"false\";\n linkMenu.style.display = \"none\";\n linkMenu.style.position = \"absolute\";\n linkMenu.style.right = \"10px\";\n linkMenu.style.bottom = \"10px\";\n linkMenu.style.backgroundColor = \"#fff\";\n linkMenu.style.border = \"2px solid #ddd\";\n linkMenu.style.padding = \"10px 20px\";\n linkMenu.style.zIndex = \"1000\";\n linkMenuFormLabel.style.width = \"100%\";\n linkMenuFormLabel.style.textAlign = \"right\";\n linkMenuFormLabel.style.marginRight = \"10px\";\n linkMenuFormInput.style.outline = \"none\";\n linkMenuFormInput.style.padding = \"0 5px\";\n linkMenuFormInput.placeholder = \"Insert a Link\";\n linkMenuForm.style.display = \"flex\";\n linkMenuForm.style.justifyContent = \"space-between\";\n linkMenuForm.style.margin = \"5px 0\";\n linkMenuButton.style[\"float\"] = \"right\";\n linkMenuButton.style.padding = \"6px 12px\";\n linkMenuButton.style.border = \"1px solid #4cae4c\";\n linkMenuButton.style.backgroundColor = \"#5cb85c\";\n linkMenuButton.style.fontSize = \"14px\";\n linkMenuButton.style.color = \"#fff\";\n linkMenuButton.style.outline = \"none\";\n\n linkMenuButton.onmouseenter = function () {\n return linkMenuButton.style.backgroundColor = \"#4cae4c\";\n };\n\n linkMenuButton.onmouseleave = function () {\n return linkMenuButton.style.backgroundColor = \"#5cb85c\";\n };\n\n linkMenuButton.onclick = function (e) {\n var linkValue = linkMenuFormInput.value;\n\n if (linkValue) {\n window.getSelection().removeAllRanges();\n window.getSelection().addRange(_this3.range);\n document.execCommand(\"createLink\", true, linkValue);\n\n if (_this3.options.metaUrl && _this3.validURL(linkValue)) {\n _this3.getMeta(linkValue).then(function (res) {\n var url = res.url,\n image = res.image,\n title = res.title,\n description = res.description;\n url && image && title && _this3.createMetaDataElement(url, image, title, description);\n });\n }\n\n var bodyLinks = _this3.body.querySelectorAll(\"a\");\n\n bodyLinks[bodyLinks.length - 1].contentEditable = \"false\";\n linkMenuFormInput.value = \"\";\n\n _this3.toolbar.querySelector(\"#toolbar-link\").onclick();\n } else {\n _this3.body.focus();\n\n _this3.linkMenu.dataset.active = \"false\";\n e.target.parentElement.style.display = \"none\";\n }\n };\n\n linkMenuForm.appendChild(linkMenuFormLabel);\n linkMenuForm.appendChild(linkMenuFormInput);\n linkMenu.appendChild(linkMenuForm);\n linkMenu.appendChild(linkMenuButton);\n return linkMenu;\n }\n }, {\n key: \"initImageMenu\",\n value: function initImageMenu() {\n var _this4 = this;\n\n var imageMenu = document.createElement(\"div\");\n var imageMenuForm = document.createElement(\"div\");\n var imageMenuButton = document.createElement(\"button\");\n var imageMenuFormLabel = document.createElement(\"p\");\n var imageMenuFormSourceInput = document.createElement(\"input\");\n imageMenu.id = \"image-menu\";\n imageMenuButton.textContent = \"Insert Image\";\n imageMenuFormLabel.textContent = \"Image URL\";\n imageMenuFormSourceInput.type = \"text\";\n imageMenuFormLabel.style.margin = \"8px 10px 8px 0\";\n imageMenuFormLabel.style.fontSize = \"14px\";\n imageMenuButton.style.cursor = \"pointer\";\n imageMenu.dataset.active = \"false\";\n imageMenu.style.display = \"none\";\n imageMenu.style.position = \"absolute\";\n imageMenu.style.right = \"10px\";\n imageMenu.style.bottom = \"10px\";\n imageMenu.style.backgroundColor = \"#fff\";\n imageMenu.style.border = \"2px solid #ddd\";\n imageMenu.style.padding = \"10px 20px\";\n imageMenu.style.zIndex = \"1000\";\n imageMenuFormLabel.style.width = \"100%\";\n imageMenuFormLabel.style.textAlign = \"right\";\n imageMenuFormLabel.style.marginRight = \"10px\";\n imageMenuFormSourceInput.style.outline = \"none\";\n imageMenuFormSourceInput.style.padding = \"0 5px\";\n imageMenuFormSourceInput.placeholder = \"Insert a Link\";\n imageMenuForm.style.display = \"flex\";\n imageMenuForm.style.justifyContent = \"space-between\";\n imageMenuForm.style.margin = \"5px 0\";\n imageMenuButton.style[\"float\"] = \"right\";\n imageMenuButton.style.padding = \"6px 12px\";\n imageMenuButton.style.border = \"1px solid #4cae4c\";\n imageMenuButton.style.backgroundColor = \"#5cb85c\";\n imageMenuButton.style.fontSize = \"14px\";\n imageMenuButton.style.color = \"#fff\";\n imageMenuButton.style.outline = \"none\";\n\n imageMenuButton.onmouseenter = function () {\n return imageMenuButton.style.backgroundColor = \"#4cae4c\";\n };\n\n imageMenuButton.onmouseleave = function () {\n return imageMenuButton.style.backgroundColor = \"#5cb85c\";\n };\n\n imageMenuForm.appendChild(imageMenuFormLabel);\n imageMenuForm.appendChild(imageMenuFormSourceInput); // Height Input Form\n\n var imageMenuHeightForm = imageMenuForm.cloneNode(true);\n var imageMenuHeightFormInput = imageMenuHeightForm.querySelector('input');\n var imageMenuHeightFormLabel = imageMenuHeightForm.querySelector('p');\n imageMenuHeightFormInput.placeholder = \"Image Height\";\n imageMenuHeightFormLabel.textContent = \"Height\"; // Width Input Form\n\n var imageMenuWidthForm = imageMenuForm.cloneNode(true);\n var imageMenuWidthFormInput = imageMenuWidthForm.querySelector('input');\n var imageMenuWidthFormLabel = imageMenuWidthForm.querySelector('p');\n imageMenuWidthFormInput.placeholder = \"Image Height\";\n imageMenuWidthFormLabel.textContent = \"Width\";\n\n imageMenuButton.onclick = function (e) {\n var linkValue = imageMenuFormSourceInput.value;\n var heightValue = imageMenuHeightFormInput.value;\n var widthValue = imageMenuWidthFormInput.value;\n\n if (linkValue) {\n window.getSelection().removeAllRanges();\n window.getSelection().addRange(_this4.range);\n document.execCommand(\"insertImage\", true, linkValue);\n\n var imageTags = _this4.body.querySelectorAll(\"img\");\n\n imageTags[imageTags.length - 1].style.height = \"\".concat(heightValue, \"px\");\n imageTags[imageTags.length - 1].style.width = \"\".concat(widthValue, \"px\");\n imageMenuHeightFormInput.value = \"\";\n imageMenuWidthFormInput.value = \"\";\n imageMenuFormSourceInput.value = \"\";\n\n _this4.toolbar.querySelector(\"#toolbar-image\").onclick();\n } else {\n _this4.body.focus();\n\n _this4.imageMenu.dataset.active = \"false\";\n e.target.parentElement.style.display = \"none\";\n }\n };\n\n imageMenu.appendChild(imageMenuHeightForm);\n imageMenu.appendChild(imageMenuWidthForm);\n imageMenu.appendChild(imageMenuForm);\n imageMenu.appendChild(imageMenuButton);\n return imageMenu;\n }\n }, {\n key: \"initMetaDataSection\",\n value: function initMetaDataSection() {\n var metaDataSection = document.createElement(\"div\");\n metaDataSection.classList.add(\"metadata-section\");\n metaDataSection.style.display = \"flex\";\n metaDataSection.style.flexWrap = \"wrap\";\n metaDataSection.style.zIndex = \"500\";\n return metaDataSection;\n }\n }, {\n key: \"initFilesSection\",\n value: function initFilesSection() {\n var _this5 = this;\n\n var filesSection = document.createElement(\"div\");\n filesSection.classList.add(\"files-section\");\n filesSection.style.display = \"flex\";\n filesSection.style.flexWrap = \"wrap\";\n filesSection.style.zIndex = \"500\";\n\n this.body.ondragenter = function (e) {\n _this5.body.style.backgroundColor = \"#ddd\";\n };\n\n this.body.ondragleave = function (e) {\n _this5.body.style.backgroundColor = \"inherit\";\n };\n\n this.body.ondrop = function (e) {\n _this5.body.style.backgroundColor = \"inherit\";\n e.preventDefault();\n var file = e.dataTransfer.files && e.dataTransfer.files[0];\n\n _this5.attachFile(file);\n };\n\n this.editor.getfiles = function () {\n return _this5.getFiles();\n };\n\n return filesSection;\n }\n }, {\n key: \"createFileElement\",\n value: function createFileElement(name, size) {\n var _this6 = this;\n\n var fileEl = document.createElement(\"div\");\n var fileNameEl = document.createElement(\"h4\");\n var fileSizeEl = document.createElement(\"p\");\n var removeFileEl = document.createElement(\"p\");\n fileNameEl.textContent = name;\n fileSizeEl.textContent = size;\n removeFileEl.textContent = \"X\";\n fileEl.dataset.fileindex = this.files.length - 1;\n fileEl.style.width = \"100%\";\n fileEl.style.display = \"flex\";\n fileEl.style.flexDirection = \"column\";\n fileEl.style.margin = \"10px\";\n fileEl.style.position = \"relative\";\n fileNameEl.style.fontWeight = \"bold\";\n fileNameEl.style.margin = \"0\";\n fileSizeEl.style.fontSize = \"12px\";\n fileSizeEl.style.margin = \"2px 0\";\n removeFileEl.style.margin = \"0\";\n removeFileEl.style.userSelect = \"none\";\n removeFileEl.style.color = \"black\";\n removeFileEl.style.position = \"absolute\";\n removeFileEl.style.right = \"5px\";\n removeFileEl.style.top = \"-5px\";\n removeFileEl.style.cursor = \"pointer\";\n removeFileEl.style.backgroundColor = \"#fff\";\n\n removeFileEl.onmouseenter = function () {\n return removeFileEl.style.color = \"#ddd\";\n };\n\n removeFileEl.onmouseleave = function () {\n return removeFileEl.style.color = \"black\";\n };\n\n removeFileEl.onclick = function (e) {\n _this6.files.splice(e.target.parentElement.dataset.fileindex, 1);\n\n e.target.parentElement.remove();\n };\n\n fileEl.appendChild(fileNameEl);\n fileEl.appendChild(fileSizeEl);\n fileEl.appendChild(removeFileEl);\n this.filesSection.appendChild(fileEl);\n\n this.editor.getfiles = function () {\n return _this6.getFiles();\n };\n }\n }, {\n key: \"createMetaDataElement\",\n value: function createMetaDataElement(url, img, title, description) {\n var metaItemEl = document.createElement(\"div\");\n var metaLinkEl = document.createElement(\"a\");\n var metaImageEl = document.createElement(\"img\");\n var metaDataEl = document.createElement(\"div\");\n var metaDataTitleEl = document.createElement(\"h4\");\n var metaDataDescriptionEl = document.createElement(\"p\");\n var removeMetaDataEl = document.createElement(\"span\");\n metaLinkEl.href = url;\n metaImageEl.src = img;\n metaDataTitleEl.textContent = title;\n metaDataDescriptionEl.textContent = description;\n removeMetaDataEl.textContent = \"X\";\n metaLinkEl.target = \"blank\";\n metaItemEl.style.width = \"100%\";\n metaItemEl.style.display = \"flex\";\n metaItemEl.style.margin = \"10px\";\n metaItemEl.style.position = \"relative\";\n metaImageEl.style.marginRight = \"10px\";\n metaImageEl.style.height = \"50px\";\n metaImageEl.style.width = \"75px\";\n metaDataTitleEl.style.fontWeight = \"bold\";\n metaDataTitleEl.style.margin = \"0\";\n metaDataDescriptionEl.style.margin = \"0\";\n removeMetaDataEl.style.userSelect = \"none\";\n removeMetaDataEl.style.color = \"black\";\n removeMetaDataEl.style.position = \"absolute\";\n removeMetaDataEl.style.right = \"5px\";\n removeMetaDataEl.style.top = \"-5px\";\n removeMetaDataEl.style.cursor = \"pointer\";\n removeMetaDataEl.style.backgroundColor = \"#fff\";\n\n removeMetaDataEl.onmouseenter = function () {\n return removeMetaDataEl.style.color = \"#ddd\";\n };\n\n removeMetaDataEl.onmouseleave = function () {\n return removeMetaDataEl.style.color = \"black\";\n };\n\n removeMetaDataEl.onclick = function (e) {\n return e.target.parentElement.remove();\n };\n\n metaLinkEl.appendChild(metaImageEl);\n metaDataEl.appendChild(metaDataTitleEl);\n metaDataEl.appendChild(metaDataDescriptionEl);\n metaItemEl.appendChild(metaLinkEl);\n metaItemEl.appendChild(metaDataEl);\n metaItemEl.appendChild(removeMetaDataEl);\n this.metaDataSection.appendChild(metaItemEl);\n }\n }, {\n key: \"initResponsive\",\n value: function initResponsive() {\n var that = this;\n\n if (!this.options.minimal) {\n var responsiveGroups = function responsiveGroups(isResponsive) {\n that.toolbarGroups.forEach(function (group) {\n group.dataset.open = \"false\";\n group.style.display = isResponsive ? \"none\" : \"block\";\n group.style.position = isResponsive ? \"absolute\" : \"relative\";\n group.style.bottom = isResponsive ? \"5px\" : \"inherit\";\n group.style.right = isResponsive ? \"5px\" : \"inherit\";\n group.style.backgroundColor = isResponsive ? \"#fff\" : \"inherit\";\n group.style.border = isResponsive ? \"2px solid #ddd\" : \"none\";\n });\n that.toolbarMenus.forEach(function (menu) {\n function toggleMenu() {\n var selectedGroup = that.toolbar.querySelector(\"#group-\".concat(menu.id.split(\"-\")[1]));\n\n if (selectedGroup.dataset.open === \"false\") {\n // close opened groups\n that.toolbarGroups.forEach(function (group) {\n if (group.dataset.open === \"true\") {\n group.style.display = \"none\";\n group.dataset.open = \"false\";\n }\n }); // open group\n\n selectedGroup.style.display = \"block\";\n selectedGroup.style.padding = \"5px\";\n selectedGroup.dataset.open = \"true\";\n } else {\n selectedGroup.style.display = \"none\";\n selectedGroup.dataset.open = \"false\";\n }\n }\n\n menu.style.padding = \"0 10px\";\n menu.style.cursor = \"pointer\";\n menu.style.userSelect = \"none\";\n menu.style.display = isResponsive ? \"block\" : \"none\";\n\n menu.onclick = function (e) {\n return toggleMenu();\n };\n });\n };\n\n var setResponsive = function setResponsive() {\n responsive = window.matchMedia(\"(max-width: 700px)\").matches;\n responsiveGroups(responsive);\n };\n\n var responsive = window.matchMedia(\"(max-width: 700px)\").matches;\n setResponsive();\n\n window.onresize = function () {\n return setResponsive();\n };\n } else {\n this.toolbarMenus.forEach(function (menu) {\n return menu.style.display = \"none\";\n });\n this.toolbar.querySelector(\"#toolbar-strikethrough\").style.display = \"none\";\n this.toolbar.querySelector(\"#toolbar-image\").style.display = \"none\";\n this.toolbar.querySelector(\"#toolbar-insertOrderedList\").style.display = \"none\";\n this.toolbar.querySelector(\"#group-textAlign\").style.display = \"none\";\n }\n }\n }, {\n key: \"initOverflow\",\n value: function initOverflow() {\n var _this7 = this;\n\n var onFocus = this.body.onfocus;\n\n this.body.onfocus = function () {\n onFocus && onFocus();\n\n _this7.overflow();\n };\n\n var onBlur = this.body.onblur;\n\n this.body.onblur = function () {\n onBlur && onBlur();\n\n _this7.overflow();\n };\n\n this.body.onkeypress = function () {\n return _this7.overflow();\n };\n }\n }, {\n key: \"getFiles\",\n value: function getFiles() {\n return this.files;\n }\n }, {\n key: \"getContent\",\n value: function getContent() {\n return this.body.innerHTML;\n }\n }, {\n key: \"getRange\",\n value: function getRange() {\n return window.getSelection().getRangeAt(0);\n }\n }, {\n key: \"getMeta\",\n value: function getMeta(url) {\n return fetch(this.options.metaUrl, {\n method: \"POST\",\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n targetUrl: url\n })\n }).then(function (res) {\n return res.json();\n });\n }\n }, {\n key: \"validURL\",\n value: function validURL(str) {\n var pattern = new RegExp(\"^(https?:\\\\/\\\\/)?\" + \"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|\" + \"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + \"(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*\" + \"(\\\\?[;&a-z\\\\d%_.~+=-]*)?\" + \"(\\\\#[-a-z\\\\d_]*)?$\", \"i\");\n return !!pattern.test(str);\n }\n }, {\n key: \"overflow\",\n value: function overflow() {\n var body = this.body;\n body.scrollHeight > body.clientHeight ? body.style.overflowY = \"scroll\" : body.style.overflowY = \"hidden\";\n body.scrollWidth > body.clientWidth ? body.style.overflowX = \"scroll\" : body.style.overflowX = \"hidden\";\n }\n }, {\n key: \"formatBytes\",\n value: function formatBytes(bytes) {\n var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n if (bytes === 0) return '0 Bytes';\n var k = 1024;\n var dm = decimals < 0 ? 0 : decimals;\n var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n var i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n }\n }, {\n key: \"validateFile\",\n value: function validateFile(file) {\n var extension = file.type.split('/').pop();\n return this.options.extensions.includes(\".\".concat(extension));\n }\n }, {\n key: \"attachFile\",\n value: function attachFile(file) {\n if (this.validateFile(file)) {\n this.files.push(file);\n this.createFileElement(file.name, this.formatBytes(file.size));\n } else {\n this.fileInvalid();\n }\n }\n }, {\n key: \"fileInvalid\",\n value: function fileInvalid() {\n var _this8 = this;\n\n this.body.style.transition = \"background-color .5s\";\n this.body.style.backgroundColor = \"#d9534f\";\n setTimeout(function () {\n _this8.body.style.backgroundColor = \"inherit\";\n setTimeout(function () {\n return _this8.body.style.transition = \"none\";\n }, 500);\n }, 500);\n }\n }]);\n\n return StrivenEditor;\n }();\n\n _exports[\"default\"] = StrivenEditor;\n});\n\n//# sourceURL=webpack://striveneditor/./src/striveneditor.js?"); /***/ }) diff --git a/dist/striveneditor.js b/dist/striveneditor.js @@ -1,2 +1,2 @@ /*! For license information please see striveneditor.js.LICENSE */ -!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.striveneditor=e():n.striveneditor=e()}(window,(function(){return function(n){var e={};function t(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return n[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,a){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:a})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(a,r,function(e){return n[e]}.bind(null,r));return a},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s="./src/striveneditor.js")}({"./node_modules/@fortawesome/fontawesome-svg-core/index.es.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"icon\", function() { return icon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"noAuto\", function() { return noAuto; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"config\", function() { return config; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toHtml\", function() { return toHtml; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"layer\", function() { return layer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return text; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"counter\", function() { return counter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"library\", function() { return library; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dom\", function() { return dom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parse\", function() { return parse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findIconDefinition\", function() { return findIconDefinition; });\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nvar noop = function noop() {};\n\nvar _WINDOW = {};\nvar _DOCUMENT = {};\nvar _MUTATION_OBSERVER = null;\nvar _PERFORMANCE = {\n mark: noop,\n measure: noop\n};\n\ntry {\n if (typeof window !== 'undefined') _WINDOW = window;\n if (typeof document !== 'undefined') _DOCUMENT = document;\n if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;\n if (typeof performance !== 'undefined') _PERFORMANCE = performance;\n} catch (e) {}\n\nvar _ref = _WINDOW.navigator || {},\n _ref$userAgent = _ref.userAgent,\n userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;\n\nvar WINDOW = _WINDOW;\nvar DOCUMENT = _DOCUMENT;\nvar MUTATION_OBSERVER = _MUTATION_OBSERVER;\nvar PERFORMANCE = _PERFORMANCE;\nvar IS_BROWSER = !!WINDOW.document;\nvar IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';\nvar IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');\n\nvar NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';\nvar UNITS_IN_GRID = 16;\nvar DEFAULT_FAMILY_PREFIX = 'fa';\nvar DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';\nvar DATA_FA_I2SVG = 'data-fa-i2svg';\nvar DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';\nvar DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';\nvar DATA_PREFIX = 'data-prefix';\nvar DATA_ICON = 'data-icon';\nvar HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';\nvar MUTATION_APPROACH_ASYNC = 'async';\nvar TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];\nvar PRODUCTION = function () {\n try {\n return \"development\" === 'production';\n } catch (e) {\n return false;\n }\n}();\nvar PREFIX_TO_STYLE = {\n 'fas': 'solid',\n 'far': 'regular',\n 'fal': 'light',\n 'fad': 'duotone',\n 'fab': 'brands',\n 'fa': 'solid'\n};\nvar STYLE_TO_PREFIX = {\n 'solid': 'fas',\n 'regular': 'far',\n 'light': 'fal',\n 'duotone': 'fad',\n 'brands': 'fab'\n};\nvar LAYERS_TEXT_CLASSNAME = 'fa-layers-text';\nvar FONT_FAMILY_PATTERN = /Font Awesome 5 (Solid|Regular|Light|Duotone|Brands|Free|Pro)/;\nvar FONT_WEIGHT_TO_PREFIX = {\n '900': 'fas',\n '400': 'far',\n 'normal': 'far',\n '300': 'fal'\n};\nvar oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nvar oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);\nvar ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];\nvar DUOTONE_CLASSES = {\n GROUP: 'group',\n SWAP_OPACITY: 'swap-opacity',\n PRIMARY: 'primary',\n SECONDARY: 'secondary'\n};\nvar RESERVED_CLASSES = ['xs', 'sm', 'lg', 'fw', 'ul', 'li', 'border', 'pull-left', 'pull-right', 'spin', 'pulse', 'rotate-90', 'rotate-180', 'rotate-270', 'flip-horizontal', 'flip-vertical', 'flip-both', 'stack', 'stack-1x', 'stack-2x', 'inverse', 'layers', 'layers-text', 'layers-counter', DUOTONE_CLASSES.GROUP, DUOTONE_CLASSES.SWAP_OPACITY, DUOTONE_CLASSES.PRIMARY, DUOTONE_CLASSES.SECONDARY].concat(oneToTen.map(function (n) {\n return \"\".concat(n, \"x\");\n})).concat(oneToTwenty.map(function (n) {\n return \"w-\".concat(n);\n}));\n\nvar initial = WINDOW.FontAwesomeConfig || {};\n\nfunction getAttrConfig(attr) {\n var element = DOCUMENT.querySelector('script[' + attr + ']');\n\n if (element) {\n return element.getAttribute(attr);\n }\n}\n\nfunction coerce(val) {\n // Getting an empty string will occur if the attribute is set on the HTML tag but without a value\n // We'll assume that this is an indication that it should be toggled to true\n // For example <script data-search-pseudo-elements src=\"...\"><\/script>\n if (val === '') return true;\n if (val === 'false') return false;\n if (val === 'true') return true;\n return val;\n}\n\nif (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {\n var attrs = [['data-family-prefix', 'familyPrefix'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];\n attrs.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n attr = _ref2[0],\n key = _ref2[1];\n\n var val = coerce(getAttrConfig(attr));\n\n if (val !== undefined && val !== null) {\n initial[key] = val;\n }\n });\n}\n\nvar _default = {\n familyPrefix: DEFAULT_FAMILY_PREFIX,\n replacementClass: DEFAULT_REPLACEMENT_CLASS,\n autoReplaceSvg: true,\n autoAddCss: true,\n autoA11y: true,\n searchPseudoElements: false,\n observeMutations: true,\n mutateApproach: 'async',\n keepOriginalSource: true,\n measurePerformance: false,\n showMissingIcons: true\n};\n\nvar _config = _objectSpread({}, _default, initial);\n\nif (!_config.autoReplaceSvg) _config.observeMutations = false;\n\nvar config = _objectSpread({}, _config);\n\nWINDOW.FontAwesomeConfig = config;\n\nvar w = WINDOW || {};\nif (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};\nif (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};\nif (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};\nif (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];\nvar namespace = w[NAMESPACE_IDENTIFIER];\n\nvar functions = [];\n\nvar listener = function listener() {\n DOCUMENT.removeEventListener('DOMContentLoaded', listener);\n loaded = 1;\n functions.map(function (fn) {\n return fn();\n });\n};\n\nvar loaded = false;\n\nif (IS_DOM) {\n loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);\n if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);\n}\n\nfunction domready (fn) {\n if (!IS_DOM) return;\n loaded ? setTimeout(fn, 0) : functions.push(fn);\n}\n\nvar PENDING = 'pending';\nvar SETTLED = 'settled';\nvar FULFILLED = 'fulfilled';\nvar REJECTED = 'rejected';\n\nvar NOOP = function NOOP() {};\n\nvar isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';\nvar asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;\nvar asyncQueue = [];\nvar asyncTimer;\n\nfunction asyncFlush() {\n // run promise callbacks\n for (var i = 0; i < asyncQueue.length; i++) {\n asyncQueue[i][0](asyncQueue[i][1]);\n } // reset async asyncQueue\n\n\n asyncQueue = [];\n asyncTimer = false;\n}\n\nfunction asyncCall(callback, arg) {\n asyncQueue.push([callback, arg]);\n\n if (!asyncTimer) {\n asyncTimer = true;\n asyncSetTimer(asyncFlush, 0);\n }\n}\n\nfunction invokeResolver(resolver, promise) {\n function resolvePromise(value) {\n resolve(promise, value);\n }\n\n function rejectPromise(reason) {\n reject(promise, reason);\n }\n\n try {\n resolver(resolvePromise, rejectPromise);\n } catch (e) {\n rejectPromise(e);\n }\n}\n\nfunction invokeCallback(subscriber) {\n var owner = subscriber.owner;\n var settled = owner._state;\n var value = owner._data;\n var callback = subscriber[settled];\n var promise = subscriber.then;\n\n if (typeof callback === 'function') {\n settled = FULFILLED;\n\n try {\n value = callback(value);\n } catch (e) {\n reject(promise, e);\n }\n }\n\n if (!handleThenable(promise, value)) {\n if (settled === FULFILLED) {\n resolve(promise, value);\n }\n\n if (settled === REJECTED) {\n reject(promise, value);\n }\n }\n}\n\nfunction handleThenable(promise, value) {\n var resolved;\n\n try {\n if (promise === value) {\n throw new TypeError('A promises callback cannot return that same promise.');\n }\n\n if (value && (typeof value === 'function' || _typeof(value) === 'object')) {\n // then should be retrieved only once\n var then = value.then;\n\n if (typeof then === 'function') {\n then.call(value, function (val) {\n if (!resolved) {\n resolved = true;\n\n if (value === val) {\n fulfill(promise, val);\n } else {\n resolve(promise, val);\n }\n }\n }, function (reason) {\n if (!resolved) {\n resolved = true;\n reject(promise, reason);\n }\n });\n return true;\n }\n }\n } catch (e) {\n if (!resolved) {\n reject(promise, e);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction resolve(promise, value) {\n if (promise === value || !handleThenable(promise, value)) {\n fulfill(promise, value);\n }\n}\n\nfunction fulfill(promise, value) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = value;\n asyncCall(publishFulfillment, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = reason;\n asyncCall(publishRejection, promise);\n }\n}\n\nfunction publish(promise) {\n promise._then = promise._then.forEach(invokeCallback);\n}\n\nfunction publishFulfillment(promise) {\n promise._state = FULFILLED;\n publish(promise);\n}\n\nfunction publishRejection(promise) {\n promise._state = REJECTED;\n publish(promise);\n\n if (!promise._handled && isNode) {\n global.process.emit('unhandledRejection', promise._data, promise);\n }\n}\n\nfunction notifyRejectionHandled(promise) {\n global.process.emit('rejectionHandled', promise);\n}\n/**\n * @class\n */\n\n\nfunction P(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('Promise resolver ' + resolver + ' is not a function');\n }\n\n if (this instanceof P === false) {\n throw new TypeError('Failed to construct \\'Promise\\': Please use the \\'new\\' operator, this object constructor cannot be called as a function.');\n }\n\n this._then = [];\n invokeResolver(resolver, this);\n}\n\nP.prototype = {\n constructor: P,\n _state: PENDING,\n _then: null,\n _data: undefined,\n _handled: false,\n then: function then(onFulfillment, onRejection) {\n var subscriber = {\n owner: this,\n then: new this.constructor(NOOP),\n fulfilled: onFulfillment,\n rejected: onRejection\n };\n\n if ((onRejection || onFulfillment) && !this._handled) {\n this._handled = true;\n\n if (this._state === REJECTED && isNode) {\n asyncCall(notifyRejectionHandled, this);\n }\n }\n\n if (this._state === FULFILLED || this._state === REJECTED) {\n // already resolved, call callback async\n asyncCall(invokeCallback, subscriber);\n } else {\n // subscribe\n this._then.push(subscriber);\n }\n\n return subscriber.then;\n },\n catch: function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nP.all = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.all().');\n }\n\n return new P(function (resolve, reject) {\n var results = [];\n var remaining = 0;\n\n function resolver(index) {\n remaining++;\n return function (value) {\n results[index] = value;\n\n if (! --remaining) {\n resolve(results);\n }\n };\n }\n\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function') {\n promise.then(resolver(i), reject);\n } else {\n results[i] = promise;\n }\n }\n\n if (!remaining) {\n resolve(results);\n }\n });\n};\n\nP.race = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.race().');\n }\n\n return new P(function (resolve, reject) {\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function') {\n promise.then(resolve, reject);\n } else {\n resolve(promise);\n }\n }\n });\n};\n\nP.resolve = function (value) {\n if (value && _typeof(value) === 'object' && value.constructor === P) {\n return value;\n }\n\n return new P(function (resolve) {\n resolve(value);\n });\n};\n\nP.reject = function (reason) {\n return new P(function (resolve, reject) {\n reject(reason);\n });\n};\n\nvar picked = typeof Promise === 'function' ? Promise : P;\n\nvar d = UNITS_IN_GRID;\nvar meaninglessTransform = {\n size: 16,\n x: 0,\n y: 0,\n rotate: 0,\n flipX: false,\n flipY: false\n};\n\nfunction isReserved(name) {\n return ~RESERVED_CLASSES.indexOf(name);\n}\nfunction insertCss(css) {\n if (!css || !IS_DOM) {\n return;\n }\n\n var style = DOCUMENT.createElement('style');\n style.setAttribute('type', 'text/css');\n style.innerHTML = css;\n var headChildren = DOCUMENT.head.childNodes;\n var beforeChild = null;\n\n for (var i = headChildren.length - 1; i > -1; i--) {\n var child = headChildren[i];\n var tagName = (child.tagName || '').toUpperCase();\n\n if (['STYLE', 'LINK'].indexOf(tagName) > -1) {\n beforeChild = child;\n }\n }\n\n DOCUMENT.head.insertBefore(style, beforeChild);\n return css;\n}\nvar idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nfunction nextUniqueId() {\n var size = 12;\n var id = '';\n\n while (size-- > 0) {\n id += idPool[Math.random() * 62 | 0];\n }\n\n return id;\n}\nfunction toArray(obj) {\n var array = [];\n\n for (var i = (obj || []).length >>> 0; i--;) {\n array[i] = obj[i];\n }\n\n return array;\n}\nfunction classArray(node) {\n if (node.classList) {\n return toArray(node.classList);\n } else {\n return (node.getAttribute('class') || '').split(' ').filter(function (i) {\n return i;\n });\n }\n}\nfunction getIconName(familyPrefix, cls) {\n var parts = cls.split('-');\n var prefix = parts[0];\n var iconName = parts.slice(1).join('-');\n\n if (prefix === familyPrefix && iconName !== '' && !isReserved(iconName)) {\n return iconName;\n } else {\n return null;\n }\n}\nfunction htmlEscape(str) {\n return \"\".concat(str).replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\nfunction joinAttributes(attributes) {\n return Object.keys(attributes || {}).reduce(function (acc, attributeName) {\n return acc + \"\".concat(attributeName, \"=\\\"\").concat(htmlEscape(attributes[attributeName]), \"\\\" \");\n }, '').trim();\n}\nfunction joinStyles(styles) {\n return Object.keys(styles || {}).reduce(function (acc, styleName) {\n return acc + \"\".concat(styleName, \": \").concat(styles[styleName], \";\");\n }, '');\n}\nfunction transformIsMeaningful(transform) {\n return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;\n}\nfunction transformForSvg(_ref) {\n var transform = _ref.transform,\n containerWidth = _ref.containerWidth,\n iconWidth = _ref.iconWidth;\n var outer = {\n transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n };\n var innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n var innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n var innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n var inner = {\n transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n };\n var path = {\n transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n };\n return {\n outer: outer,\n inner: inner,\n path: path\n };\n}\nfunction transformForCss(_ref2) {\n var transform = _ref2.transform,\n _ref2$width = _ref2.width,\n width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width,\n _ref2$height = _ref2.height,\n height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height,\n _ref2$startCentered = _ref2.startCentered,\n startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;\n var val = '';\n\n if (startCentered && IS_IE) {\n val += \"translate(\".concat(transform.x / d - width / 2, \"em, \").concat(transform.y / d - height / 2, \"em) \");\n } else if (startCentered) {\n val += \"translate(calc(-50% + \".concat(transform.x / d, \"em), calc(-50% + \").concat(transform.y / d, \"em)) \");\n } else {\n val += \"translate(\".concat(transform.x / d, \"em, \").concat(transform.y / d, \"em) \");\n }\n\n val += \"scale(\".concat(transform.size / d * (transform.flipX ? -1 : 1), \", \").concat(transform.size / d * (transform.flipY ? -1 : 1), \") \");\n val += \"rotate(\".concat(transform.rotate, \"deg) \");\n return val;\n}\n\nvar ALL_SPACE = {\n x: 0,\n y: 0,\n width: '100%',\n height: '100%'\n};\n\nfunction fillBlack(abstract) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (abstract.attributes && (abstract.attributes.fill || force)) {\n abstract.attributes.fill = 'black';\n }\n\n return abstract;\n}\n\nfunction deGroup(abstract) {\n if (abstract.tag === 'g') {\n return abstract.children;\n } else {\n return [abstract];\n }\n}\n\nfunction makeIconMasking (_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n mask = _ref.mask,\n transform = _ref.transform;\n var mainWidth = main.width,\n mainPath = main.icon;\n var maskWidth = mask.width,\n maskPath = mask.icon;\n var trans = transformForSvg({\n transform: transform,\n containerWidth: maskWidth,\n iconWidth: mainWidth\n });\n var maskRect = {\n tag: 'rect',\n attributes: _objectSpread({}, ALL_SPACE, {\n fill: 'white'\n })\n };\n var maskInnerGroupChildrenMixin = mainPath.children ? {\n children: mainPath.children.map(fillBlack)\n } : {};\n var maskInnerGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [fillBlack(_objectSpread({\n tag: mainPath.tag,\n attributes: _objectSpread({}, mainPath.attributes, trans.path)\n }, maskInnerGroupChildrenMixin))]\n };\n var maskOuterGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [maskInnerGroup]\n };\n var maskId = \"mask-\".concat(nextUniqueId());\n var clipId = \"clip-\".concat(nextUniqueId());\n var maskTag = {\n tag: 'mask',\n attributes: _objectSpread({}, ALL_SPACE, {\n id: maskId,\n maskUnits: 'userSpaceOnUse',\n maskContentUnits: 'userSpaceOnUse'\n }),\n children: [maskRect, maskOuterGroup]\n };\n var defs = {\n tag: 'defs',\n children: [{\n tag: 'clipPath',\n attributes: {\n id: clipId\n },\n children: deGroup(maskPath)\n }, maskTag]\n };\n children.push(defs, {\n tag: 'rect',\n attributes: _objectSpread({\n fill: 'currentColor',\n 'clip-path': \"url(#\".concat(clipId, \")\"),\n mask: \"url(#\".concat(maskId, \")\")\n }, ALL_SPACE)\n });\n return {\n children: children,\n attributes: attributes\n };\n}\n\nfunction makeIconStandard (_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n transform = _ref.transform,\n styles = _ref.styles;\n var styleString = joinStyles(styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n if (transformIsMeaningful(transform)) {\n var trans = transformForSvg({\n transform: transform,\n containerWidth: main.width,\n iconWidth: main.width\n });\n children.push({\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [{\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [{\n tag: main.icon.tag,\n children: main.icon.children,\n attributes: _objectSpread({}, main.icon.attributes, trans.path)\n }]\n }]\n });\n } else {\n children.push(main.icon);\n }\n\n return {\n children: children,\n attributes: attributes\n };\n}\n\nfunction asIcon (_ref) {\n var children = _ref.children,\n main = _ref.main,\n mask = _ref.mask,\n attributes = _ref.attributes,\n styles = _ref.styles,\n transform = _ref.transform;\n\n if (transformIsMeaningful(transform) && main.found && !mask.found) {\n var width = main.width,\n height = main.height;\n var offset = {\n x: width / height / 2,\n y: 0.5\n };\n attributes['style'] = joinStyles(_objectSpread({}, styles, {\n 'transform-origin': \"\".concat(offset.x + transform.x / 16, \"em \").concat(offset.y + transform.y / 16, \"em\")\n }));\n }\n\n return [{\n tag: 'svg',\n attributes: attributes,\n children: children\n }];\n}\n\nfunction asSymbol (_ref) {\n var prefix = _ref.prefix,\n iconName = _ref.iconName,\n children = _ref.children,\n attributes = _ref.attributes,\n symbol = _ref.symbol;\n var id = symbol === true ? \"\".concat(prefix, \"-\").concat(config.familyPrefix, \"-\").concat(iconName) : symbol;\n return [{\n tag: 'svg',\n attributes: {\n style: 'display: none;'\n },\n children: [{\n tag: 'symbol',\n attributes: _objectSpread({}, attributes, {\n id: id\n }),\n children: children\n }]\n }];\n}\n\nfunction makeInlineSvgAbstract(params) {\n var _params$icons = params.icons,\n main = _params$icons.main,\n mask = _params$icons.mask,\n prefix = params.prefix,\n iconName = params.iconName,\n transform = params.transform,\n symbol = params.symbol,\n title = params.title,\n extra = params.extra,\n _params$watchable = params.watchable,\n watchable = _params$watchable === void 0 ? false : _params$watchable;\n\n var _ref = mask.found ? mask : main,\n width = _ref.width,\n height = _ref.height;\n\n var widthClass = \"fa-w-\".concat(Math.ceil(width / height * 16));\n var attrClass = [config.replacementClass, iconName ? \"\".concat(config.familyPrefix, \"-\").concat(iconName) : '', widthClass].filter(function (c) {\n return extra.classes.indexOf(c) === -1;\n }).concat(extra.classes).join(' ');\n var content = {\n children: [],\n attributes: _objectSpread({}, extra.attributes, {\n 'data-prefix': prefix,\n 'data-icon': iconName,\n 'class': attrClass,\n 'role': extra.attributes.role || 'img',\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'viewBox': \"0 0 \".concat(width, \" \").concat(height)\n })\n };\n\n if (watchable) {\n content.attributes[DATA_FA_I2SVG] = '';\n }\n\n if (title) content.children.push({\n tag: 'title',\n attributes: {\n id: content.attributes['aria-labelledby'] || \"title-\".concat(nextUniqueId())\n },\n children: [title]\n });\n\n var args = _objectSpread({}, content, {\n prefix: prefix,\n iconName: iconName,\n main: main,\n mask: mask,\n transform: transform,\n symbol: symbol,\n styles: extra.styles\n });\n\n var _ref2 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args),\n children = _ref2.children,\n attributes = _ref2.attributes;\n\n args.children = children;\n args.attributes = attributes;\n\n if (symbol) {\n return asSymbol(args);\n } else {\n return asIcon(args);\n }\n}\nfunction makeLayersTextAbstract(params) {\n var content = params.content,\n width = params.width,\n height = params.height,\n transform = params.transform,\n title = params.title,\n extra = params.extra,\n _params$watchable2 = params.watchable,\n watchable = _params$watchable2 === void 0 ? false : _params$watchable2;\n\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n\n if (watchable) {\n attributes[DATA_FA_I2SVG] = '';\n }\n\n var styles = _objectSpread({}, extra.styles);\n\n if (transformIsMeaningful(transform)) {\n styles['transform'] = transformForCss({\n transform: transform,\n startCentered: true,\n width: width,\n height: height\n });\n styles['-webkit-transform'] = styles['transform'];\n }\n\n var styleString = joinStyles(styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n\n return val;\n}\nfunction makeLayersCounterAbstract(params) {\n var content = params.content,\n title = params.title,\n extra = params.extra;\n\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n\n var styleString = joinStyles(extra.styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n\n return val;\n}\n\nvar noop$1 = function noop() {};\n\nvar p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {\n mark: noop$1,\n measure: noop$1\n};\nvar preamble = \"FA \\\"5.10.2\\\"\";\n\nvar begin = function begin(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" begins\"));\n return function () {\n return end(name);\n };\n};\n\nvar end = function end(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" ends\"));\n p.measure(\"\".concat(preamble, \" \").concat(name), \"\".concat(preamble, \" \").concat(name, \" begins\"), \"\".concat(preamble, \" \").concat(name, \" ends\"));\n};\n\nvar perf = {\n begin: begin,\n end: end\n};\n\n/**\n * Internal helper to bind a function known to have 4 arguments\n * to a given context.\n */\n\nvar bindInternal4 = function bindInternal4(func, thisContext) {\n return function (a, b, c, d) {\n return func.call(thisContext, a, b, c, d);\n };\n};\n\n/**\n * # Reduce\n *\n * A fast object `.reduce()` implementation.\n *\n * @param {Object} subject The object to reduce over.\n * @param {Function} fn The reducer function.\n * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].\n * @param {Object} thisContext The context for the reducer.\n * @return {mixed} The final result.\n */\n\n\nvar reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {\n var keys = Object.keys(subject),\n length = keys.length,\n iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,\n i,\n key,\n result;\n\n if (initialValue === undefined) {\n i = 1;\n result = subject[keys[0]];\n } else {\n i = 0;\n result = initialValue;\n }\n\n for (; i < length; i++) {\n key = keys[i];\n result = iterator(result, subject[key], key, subject);\n }\n\n return result;\n};\n\nfunction toHex(unicode) {\n var result = '';\n\n for (var i = 0; i < unicode.length; i++) {\n var hex = unicode.charCodeAt(i).toString(16);\n result += ('000' + hex).slice(-4);\n }\n\n return result;\n}\n\nfunction defineIcons(prefix, icons) {\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _params$skipHooks = params.skipHooks,\n skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;\n var normalized = Object.keys(icons).reduce(function (acc, iconName) {\n var icon = icons[iconName];\n var expanded = !!icon.icon;\n\n if (expanded) {\n acc[icon.iconName] = icon.icon;\n } else {\n acc[iconName] = icon;\n }\n\n return acc;\n }, {});\n\n if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {\n namespace.hooks.addPack(prefix, normalized);\n } else {\n namespace.styles[prefix] = _objectSpread({}, namespace.styles[prefix] || {}, normalized);\n }\n /**\n * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction\n * of new styles we needed to differentiate between them. Prefix `fa` is now an alias\n * for `fas` so we'll easy the upgrade process for our users by automatically defining\n * this as well.\n */\n\n\n if (prefix === 'fas') {\n defineIcons('fa', icons);\n }\n}\n\nvar styles = namespace.styles,\n shims = namespace.shims;\nvar _byUnicode = {};\nvar _byLigature = {};\nvar _byOldName = {};\nvar build = function build() {\n var lookup = function lookup(reducer) {\n return reduce(styles, function (o, style, prefix) {\n o[prefix] = reduce(style, reducer, {});\n return o;\n }, {});\n };\n\n _byUnicode = lookup(function (acc, icon, iconName) {\n if (icon[3]) {\n acc[icon[3]] = iconName;\n }\n\n return acc;\n });\n _byLigature = lookup(function (acc, icon, iconName) {\n var ligatures = icon[2];\n acc[iconName] = iconName;\n ligatures.forEach(function (ligature) {\n acc[ligature] = iconName;\n });\n return acc;\n });\n var hasRegular = 'far' in styles;\n _byOldName = reduce(shims, function (acc, shim) {\n var oldName = shim[0];\n var prefix = shim[1];\n var iconName = shim[2];\n\n if (prefix === 'far' && !hasRegular) {\n prefix = 'fas';\n }\n\n acc[oldName] = {\n prefix: prefix,\n iconName: iconName\n };\n return acc;\n }, {});\n};\nbuild();\nfunction byUnicode(prefix, unicode) {\n return (_byUnicode[prefix] || {})[unicode];\n}\nfunction byLigature(prefix, ligature) {\n return (_byLigature[prefix] || {})[ligature];\n}\nfunction byOldName(name) {\n return _byOldName[name] || {\n prefix: null,\n iconName: null\n };\n}\n\nvar styles$1 = namespace.styles;\nvar emptyCanonicalIcon = function emptyCanonicalIcon() {\n return {\n prefix: null,\n iconName: null,\n rest: []\n };\n};\nfunction getCanonicalIcon(values) {\n return values.reduce(function (acc, cls) {\n var iconName = getIconName(config.familyPrefix, cls);\n\n if (styles$1[cls]) {\n acc.prefix = cls;\n } else if (config.autoFetchSvg && ['fas', 'far', 'fal', 'fad', 'fab', 'fa'].indexOf(cls) > -1) {\n acc.prefix = cls;\n } else if (iconName) {\n var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};\n acc.iconName = shim.iconName || iconName;\n acc.prefix = shim.prefix || acc.prefix;\n } else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {\n acc.rest.push(cls);\n }\n\n return acc;\n }, emptyCanonicalIcon());\n}\nfunction iconFromMapping(mapping, prefix, iconName) {\n if (mapping && mapping[prefix] && mapping[prefix][iconName]) {\n return {\n prefix: prefix,\n iconName: iconName,\n icon: mapping[prefix][iconName]\n };\n }\n}\n\nfunction toHtml(abstractNodes) {\n var tag = abstractNodes.tag,\n _abstractNodes$attrib = abstractNodes.attributes,\n attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib,\n _abstractNodes$childr = abstractNodes.children,\n children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;\n\n if (typeof abstractNodes === 'string') {\n return htmlEscape(abstractNodes);\n } else {\n return \"<\".concat(tag, \" \").concat(joinAttributes(attributes), \">\").concat(children.map(toHtml).join(''), \"</\").concat(tag, \">\");\n }\n}\n\nvar noop$2 = function noop() {};\n\nfunction isWatched(node) {\n var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;\n return typeof i2svg === 'string';\n}\n\nfunction getMutator() {\n if (config.autoReplaceSvg === true) {\n return mutators.replace;\n }\n\n var mutator = mutators[config.autoReplaceSvg];\n return mutator || mutators.replace;\n}\n\nvar mutators = {\n replace: function replace(mutation) {\n var node = mutation[0];\n var abstract = mutation[1];\n var newOuterHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n\n if (node.parentNode && node.outerHTML) {\n node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? \"\x3c!-- \".concat(node.outerHTML, \" --\x3e\") : '');\n } else if (node.parentNode) {\n var newNode = document.createElement('span');\n node.parentNode.replaceChild(newNode, node);\n newNode.outerHTML = newOuterHTML;\n }\n },\n nest: function nest(mutation) {\n var node = mutation[0];\n var abstract = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it.\n // Short-circuit to the standard replacement\n\n if (~classArray(node).indexOf(config.replacementClass)) {\n return mutators.replace(mutation);\n }\n\n var forSvg = new RegExp(\"\".concat(config.familyPrefix, \"-.*\"));\n delete abstract[0].attributes.style;\n var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {\n if (cls === config.replacementClass || cls.match(forSvg)) {\n acc.toSvg.push(cls);\n } else {\n acc.toNode.push(cls);\n }\n\n return acc;\n }, {\n toNode: [],\n toSvg: []\n });\n abstract[0].attributes.class = splitClasses.toSvg.join(' ');\n var newInnerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.setAttribute('class', splitClasses.toNode.join(' '));\n node.setAttribute(DATA_FA_I2SVG, '');\n node.innerHTML = newInnerHTML;\n }\n};\n\nfunction performOperationSync(op) {\n op();\n}\n\nfunction perform(mutations, callback) {\n var callbackFunction = typeof callback === 'function' ? callback : noop$2;\n\n if (mutations.length === 0) {\n callbackFunction();\n } else {\n var frame = performOperationSync;\n\n if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {\n frame = WINDOW.requestAnimationFrame || performOperationSync;\n }\n\n frame(function () {\n var mutator = getMutator();\n var mark = perf.begin('mutate');\n mutations.map(mutator);\n mark();\n callbackFunction();\n });\n }\n}\nvar disabled = false;\nfunction disableObservation() {\n disabled = true;\n}\nfunction enableObservation() {\n disabled = false;\n}\nvar mo = null;\nfunction observe(options) {\n if (!MUTATION_OBSERVER) {\n return;\n }\n\n if (!config.observeMutations) {\n return;\n }\n\n var treeCallback = options.treeCallback,\n nodeCallback = options.nodeCallback,\n pseudoElementsCallback = options.pseudoElementsCallback,\n _options$observeMutat = options.observeMutationsRoot,\n observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;\n mo = new MUTATION_OBSERVER(function (objects) {\n if (disabled) return;\n toArray(objects).forEach(function (mutationRecord) {\n if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {\n if (config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target);\n }\n\n treeCallback(mutationRecord.target);\n }\n\n if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target.parentNode);\n }\n\n if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {\n if (mutationRecord.attributeName === 'class') {\n var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),\n prefix = _getCanonicalIcon.prefix,\n iconName = _getCanonicalIcon.iconName;\n\n if (prefix) mutationRecord.target.setAttribute('data-prefix', prefix);\n if (iconName) mutationRecord.target.setAttribute('data-icon', iconName);\n } else {\n nodeCallback(mutationRecord.target);\n }\n }\n });\n });\n if (!IS_DOM) return;\n mo.observe(observeMutationsRoot, {\n childList: true,\n attributes: true,\n characterData: true,\n subtree: true\n });\n}\nfunction disconnect() {\n if (!mo) return;\n mo.disconnect();\n}\n\nfunction styleParser (node) {\n var style = node.getAttribute('style');\n var val = [];\n\n if (style) {\n val = style.split(';').reduce(function (acc, style) {\n var styles = style.split(':');\n var prop = styles[0];\n var value = styles.slice(1);\n\n if (prop && value.length > 0) {\n acc[prop] = value.join(':').trim();\n }\n\n return acc;\n }, {});\n }\n\n return val;\n}\n\nfunction classParser (node) {\n var existingPrefix = node.getAttribute('data-prefix');\n var existingIconName = node.getAttribute('data-icon');\n var innerText = node.innerText !== undefined ? node.innerText.trim() : '';\n var val = getCanonicalIcon(classArray(node));\n\n if (existingPrefix && existingIconName) {\n val.prefix = existingPrefix;\n val.iconName = existingIconName;\n }\n\n if (val.prefix && innerText.length > 1) {\n val.iconName = byLigature(val.prefix, node.innerText);\n } else if (val.prefix && innerText.length === 1) {\n val.iconName = byUnicode(val.prefix, toHex(node.innerText));\n }\n\n return val;\n}\n\nvar parseTransformString = function parseTransformString(transformString) {\n var transform = {\n size: 16,\n x: 0,\n y: 0,\n flipX: false,\n flipY: false,\n rotate: 0\n };\n\n if (!transformString) {\n return transform;\n } else {\n return transformString.toLowerCase().split(' ').reduce(function (acc, n) {\n var parts = n.toLowerCase().split('-');\n var first = parts[0];\n var rest = parts.slice(1).join('-');\n\n if (first && rest === 'h') {\n acc.flipX = true;\n return acc;\n }\n\n if (first && rest === 'v') {\n acc.flipY = true;\n return acc;\n }\n\n rest = parseFloat(rest);\n\n if (isNaN(rest)) {\n return acc;\n }\n\n switch (first) {\n case 'grow':\n acc.size = acc.size + rest;\n break;\n\n case 'shrink':\n acc.size = acc.size - rest;\n break;\n\n case 'left':\n acc.x = acc.x - rest;\n break;\n\n case 'right':\n acc.x = acc.x + rest;\n break;\n\n case 'up':\n acc.y = acc.y - rest;\n break;\n\n case 'down':\n acc.y = acc.y + rest;\n break;\n\n case 'rotate':\n acc.rotate = acc.rotate + rest;\n break;\n }\n\n return acc;\n }, transform);\n }\n};\nfunction transformParser (node) {\n return parseTransformString(node.getAttribute('data-fa-transform'));\n}\n\nfunction symbolParser (node) {\n var symbol = node.getAttribute('data-fa-symbol');\n return symbol === null ? false : symbol === '' ? true : symbol;\n}\n\nfunction attributesParser (node) {\n var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {\n if (acc.name !== 'class' && acc.name !== 'style') {\n acc[attr.name] = attr.value;\n }\n\n return acc;\n }, {});\n var title = node.getAttribute('title');\n\n if (config.autoA11y) {\n if (title) {\n extraAttributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(nextUniqueId());\n } else {\n extraAttributes['aria-hidden'] = 'true';\n extraAttributes['focusable'] = 'false';\n }\n }\n\n return extraAttributes;\n}\n\nfunction maskParser (node) {\n var mask = node.getAttribute('data-fa-mask');\n\n if (!mask) {\n return emptyCanonicalIcon();\n } else {\n return getCanonicalIcon(mask.split(' ').map(function (i) {\n return i.trim();\n }));\n }\n}\n\nfunction blankMeta() {\n return {\n iconName: null,\n title: null,\n prefix: null,\n transform: meaninglessTransform,\n symbol: false,\n mask: null,\n extra: {\n classes: [],\n styles: {},\n attributes: {}\n }\n };\n}\nfunction parseMeta(node) {\n var _classParser = classParser(node),\n iconName = _classParser.iconName,\n prefix = _classParser.prefix,\n extraClasses = _classParser.rest;\n\n var extraStyles = styleParser(node);\n var transform = transformParser(node);\n var symbol = symbolParser(node);\n var extraAttributes = attributesParser(node);\n var mask = maskParser(node);\n return {\n iconName: iconName,\n title: node.getAttribute('title'),\n prefix: prefix,\n transform: transform,\n symbol: symbol,\n mask: mask,\n extra: {\n classes: extraClasses,\n styles: extraStyles,\n attributes: extraAttributes\n }\n };\n}\n\nfunction MissingIcon(error) {\n this.name = 'MissingIcon';\n this.message = error || 'Icon unavailable';\n this.stack = new Error().stack;\n}\nMissingIcon.prototype = Object.create(Error.prototype);\nMissingIcon.prototype.constructor = MissingIcon;\n\nvar FILL = {\n fill: 'currentColor'\n};\nvar ANIMATION_BASE = {\n attributeType: 'XML',\n repeatCount: 'indefinite',\n dur: '2s'\n};\nvar RING = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'\n })\n};\n\nvar OPACITY_ANIMATE = _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'opacity'\n});\n\nvar DOT = {\n tag: 'circle',\n attributes: _objectSpread({}, FILL, {\n cx: '256',\n cy: '364',\n r: '28'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'r',\n values: '28;14;28;28;14;28;'\n })\n }, {\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;1;1;0;1;'\n })\n }]\n};\nvar QUESTION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '1',\n d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;0;0;0;1;'\n })\n }]\n};\nvar EXCLAMATION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '0',\n d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '0;0;1;1;0;0;'\n })\n }]\n};\nvar missing = {\n tag: 'g',\n children: [RING, DOT, QUESTION, EXCLAMATION]\n};\n\nvar styles$2 = namespace.styles;\nfunction asFoundIcon(icon) {\n var width = icon[0];\n var height = icon[1];\n\n var _icon$slice = icon.slice(4),\n _icon$slice2 = _slicedToArray(_icon$slice, 1),\n vectorData = _icon$slice2[0];\n\n var element = null;\n\n if (Array.isArray(vectorData)) {\n element = {\n tag: 'g',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.GROUP)\n },\n children: [{\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.SECONDARY),\n fill: 'currentColor',\n d: vectorData[0]\n }\n }, {\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.PRIMARY),\n fill: 'currentColor',\n d: vectorData[1]\n }\n }]\n };\n } else {\n element = {\n tag: 'path',\n attributes: {\n fill: 'currentColor',\n d: vectorData\n }\n };\n }\n\n return {\n found: true,\n width: width,\n height: height,\n icon: element\n };\n}\nfunction findIcon(iconName, prefix) {\n return new picked(function (resolve, reject) {\n var val = {\n found: false,\n width: 512,\n height: 512,\n icon: missing\n };\n\n if (iconName && prefix && styles$2[prefix] && styles$2[prefix][iconName]) {\n var icon = styles$2[prefix][iconName];\n return resolve(asFoundIcon(icon));\n }\n\n if (iconName && prefix && !config.showMissingIcons) {\n reject(new MissingIcon(\"Icon is missing for prefix \".concat(prefix, \" with icon name \").concat(iconName)));\n } else {\n resolve(val);\n }\n });\n}\n\nvar styles$3 = namespace.styles;\n\nfunction generateSvgReplacementMutation(node, nodeMeta) {\n var iconName = nodeMeta.iconName,\n title = nodeMeta.title,\n prefix = nodeMeta.prefix,\n transform = nodeMeta.transform,\n symbol = nodeMeta.symbol,\n mask = nodeMeta.mask,\n extra = nodeMeta.extra;\n return new picked(function (resolve, reject) {\n picked.all([findIcon(iconName, prefix), findIcon(mask.iconName, mask.prefix)]).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n main = _ref2[0],\n mask = _ref2[1];\n\n resolve([node, makeInlineSvgAbstract({\n icons: {\n main: main,\n mask: mask\n },\n prefix: prefix,\n iconName: iconName,\n transform: transform,\n symbol: symbol,\n mask: mask,\n title: title,\n extra: extra,\n watchable: true\n })]);\n });\n });\n}\n\nfunction generateLayersText(node, nodeMeta) {\n var title = nodeMeta.title,\n transform = nodeMeta.transform,\n extra = nodeMeta.extra;\n var width = null;\n var height = null;\n\n if (IS_IE) {\n var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);\n var boundingClientRect = node.getBoundingClientRect();\n width = boundingClientRect.width / computedFontSize;\n height = boundingClientRect.height / computedFontSize;\n }\n\n if (config.autoA11y && !title) {\n extra.attributes['aria-hidden'] = 'true';\n }\n\n return picked.resolve([node, makeLayersTextAbstract({\n content: node.innerHTML,\n width: width,\n height: height,\n transform: transform,\n title: title,\n extra: extra,\n watchable: true\n })]);\n}\n\nfunction generateMutation(node) {\n var nodeMeta = parseMeta(node);\n\n if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {\n return generateLayersText(node, nodeMeta);\n } else {\n return generateSvgReplacementMutation(node, nodeMeta);\n }\n}\n\nfunction onTree(root) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n if (!IS_DOM) return;\n var htmlClassList = DOCUMENT.documentElement.classList;\n\n var hclAdd = function hclAdd(suffix) {\n return htmlClassList.add(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n\n var hclRemove = function hclRemove(suffix) {\n return htmlClassList.remove(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n\n var prefixes = config.autoFetchSvg ? Object.keys(PREFIX_TO_STYLE) : Object.keys(styles$3);\n var prefixesDomQuery = [\".\".concat(LAYERS_TEXT_CLASSNAME, \":not([\").concat(DATA_FA_I2SVG, \"])\")].concat(prefixes.map(function (p) {\n return \".\".concat(p, \":not([\").concat(DATA_FA_I2SVG, \"])\");\n })).join(', ');\n\n if (prefixesDomQuery.length === 0) {\n return;\n }\n\n var candidates = [];\n\n try {\n candidates = toArray(root.querySelectorAll(prefixesDomQuery));\n } catch (e) {// noop\n }\n\n if (candidates.length > 0) {\n hclAdd('pending');\n hclRemove('complete');\n } else {\n return;\n }\n\n var mark = perf.begin('onTree');\n var mutations = candidates.reduce(function (acc, node) {\n try {\n var mutation = generateMutation(node);\n\n if (mutation) {\n acc.push(mutation);\n }\n } catch (e) {\n if (!PRODUCTION) {\n if (e instanceof MissingIcon) {\n console.error(e);\n }\n }\n }\n\n return acc;\n }, []);\n return new picked(function (resolve, reject) {\n picked.all(mutations).then(function (resolvedMutations) {\n perform(resolvedMutations, function () {\n hclAdd('active');\n hclAdd('complete');\n hclRemove('pending');\n if (typeof callback === 'function') callback();\n mark();\n resolve();\n });\n }).catch(function () {\n mark();\n reject();\n });\n });\n}\nfunction onNode(node) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n generateMutation(node).then(function (mutation) {\n if (mutation) {\n perform([mutation], callback);\n }\n });\n}\n\nfunction replaceForPosition(node, position) {\n var pendingAttribute = \"\".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));\n return new picked(function (resolve, reject) {\n if (node.getAttribute(pendingAttribute) !== null) {\n // This node is already being processed\n return resolve();\n }\n\n var children = toArray(node.children);\n var alreadyProcessedPseudoElement = children.filter(function (c) {\n return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;\n })[0];\n var styles = WINDOW.getComputedStyle(node, position);\n var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);\n var fontWeight = styles.getPropertyValue('font-weight');\n\n if (alreadyProcessedPseudoElement && !fontFamily) {\n // If we've already processed it but the current computed style does not result in a font-family,\n // that probably means that a class name that was previously present to make the icon has been\n // removed. So we now should delete the icon.\n node.removeChild(alreadyProcessedPseudoElement);\n return resolve();\n } else if (fontFamily) {\n var content = styles.getPropertyValue('content');\n var prefix = ~['Solid', 'Regular', 'Light', 'Duotone', 'Brands'].indexOf(fontFamily[1]) ? STYLE_TO_PREFIX[fontFamily[1].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];\n var hexValue = toHex(content.length === 3 ? content.substr(1, 1) : content);\n var iconName = byUnicode(prefix, hexValue);\n var iconIdentifier = iconName; // Only convert the pseudo element in this :before/:after position into an icon if we haven't\n // already done so with the same prefix and iconName\n\n if (iconName && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {\n node.setAttribute(pendingAttribute, iconIdentifier);\n\n if (alreadyProcessedPseudoElement) {\n // Delete the old one, since we're replacing it with a new one\n node.removeChild(alreadyProcessedPseudoElement);\n }\n\n var meta = blankMeta();\n var extra = meta.extra;\n extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;\n findIcon(iconName, prefix).then(function (main) {\n var abstract = makeInlineSvgAbstract(_objectSpread({}, meta, {\n icons: {\n main: main,\n mask: emptyCanonicalIcon()\n },\n prefix: prefix,\n iconName: iconIdentifier,\n extra: extra,\n watchable: true\n }));\n var element = DOCUMENT.createElement('svg');\n\n if (position === ':before') {\n node.insertBefore(element, node.firstChild);\n } else {\n node.appendChild(element);\n }\n\n element.outerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.removeAttribute(pendingAttribute);\n resolve();\n }).catch(reject);\n } else {\n resolve();\n }\n } else {\n resolve();\n }\n });\n}\n\nfunction replace(node) {\n return picked.all([replaceForPosition(node, ':before'), replaceForPosition(node, ':after')]);\n}\n\nfunction processable(node) {\n return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');\n}\n\nfunction searchPseudoElements (root) {\n if (!IS_DOM) return;\n return new picked(function (resolve, reject) {\n var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);\n var end = perf.begin('searchPseudoElements');\n disableObservation();\n picked.all(operations).then(function () {\n end();\n enableObservation();\n resolve();\n }).catch(function () {\n end();\n enableObservation();\n reject();\n });\n });\n}\n\nvar baseStyles = \"svg:not(:root).svg-inline--fa {\\n overflow: visible;\\n}\\n\\n.svg-inline--fa {\\n display: inline-block;\\n font-size: inherit;\\n height: 1em;\\n overflow: visible;\\n vertical-align: -0.125em;\\n}\\n.svg-inline--fa.fa-lg {\\n vertical-align: -0.225em;\\n}\\n.svg-inline--fa.fa-w-1 {\\n width: 0.0625em;\\n}\\n.svg-inline--fa.fa-w-2 {\\n width: 0.125em;\\n}\\n.svg-inline--fa.fa-w-3 {\\n width: 0.1875em;\\n}\\n.svg-inline--fa.fa-w-4 {\\n width: 0.25em;\\n}\\n.svg-inline--fa.fa-w-5 {\\n width: 0.3125em;\\n}\\n.svg-inline--fa.fa-w-6 {\\n width: 0.375em;\\n}\\n.svg-inline--fa.fa-w-7 {\\n width: 0.4375em;\\n}\\n.svg-inline--fa.fa-w-8 {\\n width: 0.5em;\\n}\\n.svg-inline--fa.fa-w-9 {\\n width: 0.5625em;\\n}\\n.svg-inline--fa.fa-w-10 {\\n width: 0.625em;\\n}\\n.svg-inline--fa.fa-w-11 {\\n width: 0.6875em;\\n}\\n.svg-inline--fa.fa-w-12 {\\n width: 0.75em;\\n}\\n.svg-inline--fa.fa-w-13 {\\n width: 0.8125em;\\n}\\n.svg-inline--fa.fa-w-14 {\\n width: 0.875em;\\n}\\n.svg-inline--fa.fa-w-15 {\\n width: 0.9375em;\\n}\\n.svg-inline--fa.fa-w-16 {\\n width: 1em;\\n}\\n.svg-inline--fa.fa-w-17 {\\n width: 1.0625em;\\n}\\n.svg-inline--fa.fa-w-18 {\\n width: 1.125em;\\n}\\n.svg-inline--fa.fa-w-19 {\\n width: 1.1875em;\\n}\\n.svg-inline--fa.fa-w-20 {\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-pull-left {\\n margin-right: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-pull-right {\\n margin-left: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-border {\\n height: 1.5em;\\n}\\n.svg-inline--fa.fa-li {\\n width: 2em;\\n}\\n.svg-inline--fa.fa-fw {\\n width: 1.25em;\\n}\\n\\n.fa-layers svg.svg-inline--fa {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.fa-layers {\\n display: inline-block;\\n height: 1em;\\n position: relative;\\n text-align: center;\\n vertical-align: -0.125em;\\n width: 1em;\\n}\\n.fa-layers svg.svg-inline--fa {\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter, .fa-layers-text {\\n display: inline-block;\\n position: absolute;\\n text-align: center;\\n}\\n\\n.fa-layers-text {\\n left: 50%;\\n top: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter {\\n background-color: #ff253a;\\n border-radius: 1em;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n color: #fff;\\n height: 1.5em;\\n line-height: 1;\\n max-width: 5em;\\n min-width: 1.5em;\\n overflow: hidden;\\n padding: 0.25em;\\n right: 0;\\n text-overflow: ellipsis;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-bottom-right {\\n bottom: 0;\\n right: 0;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom right;\\n transform-origin: bottom right;\\n}\\n\\n.fa-layers-bottom-left {\\n bottom: 0;\\n left: 0;\\n right: auto;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom left;\\n transform-origin: bottom left;\\n}\\n\\n.fa-layers-top-right {\\n right: 0;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-top-left {\\n left: 0;\\n right: auto;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top left;\\n transform-origin: top left;\\n}\\n\\n.fa-lg {\\n font-size: 1.3333333333em;\\n line-height: 0.75em;\\n vertical-align: -0.0667em;\\n}\\n\\n.fa-xs {\\n font-size: 0.75em;\\n}\\n\\n.fa-sm {\\n font-size: 0.875em;\\n}\\n\\n.fa-1x {\\n font-size: 1em;\\n}\\n\\n.fa-2x {\\n font-size: 2em;\\n}\\n\\n.fa-3x {\\n font-size: 3em;\\n}\\n\\n.fa-4x {\\n font-size: 4em;\\n}\\n\\n.fa-5x {\\n font-size: 5em;\\n}\\n\\n.fa-6x {\\n font-size: 6em;\\n}\\n\\n.fa-7x {\\n font-size: 7em;\\n}\\n\\n.fa-8x {\\n font-size: 8em;\\n}\\n\\n.fa-9x {\\n font-size: 9em;\\n}\\n\\n.fa-10x {\\n font-size: 10em;\\n}\\n\\n.fa-fw {\\n text-align: center;\\n width: 1.25em;\\n}\\n\\n.fa-ul {\\n list-style-type: none;\\n margin-left: 2.5em;\\n padding-left: 0;\\n}\\n.fa-ul > li {\\n position: relative;\\n}\\n\\n.fa-li {\\n left: -2em;\\n position: absolute;\\n text-align: center;\\n width: 2em;\\n line-height: inherit;\\n}\\n\\n.fa-border {\\n border: solid 0.08em #eee;\\n border-radius: 0.1em;\\n padding: 0.2em 0.25em 0.15em;\\n}\\n\\n.fa-pull-left {\\n float: left;\\n}\\n\\n.fa-pull-right {\\n float: right;\\n}\\n\\n.fa.fa-pull-left,\\n.fas.fa-pull-left,\\n.far.fa-pull-left,\\n.fal.fa-pull-left,\\n.fab.fa-pull-left {\\n margin-right: 0.3em;\\n}\\n.fa.fa-pull-right,\\n.fas.fa-pull-right,\\n.far.fa-pull-right,\\n.fal.fa-pull-right,\\n.fab.fa-pull-right {\\n margin-left: 0.3em;\\n}\\n\\n.fa-spin {\\n -webkit-animation: fa-spin 2s infinite linear;\\n animation: fa-spin 2s infinite linear;\\n}\\n\\n.fa-pulse {\\n -webkit-animation: fa-spin 1s infinite steps(8);\\n animation: fa-spin 1s infinite steps(8);\\n}\\n\\n@-webkit-keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n.fa-rotate-90 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\\\";\\n -webkit-transform: rotate(90deg);\\n transform: rotate(90deg);\\n}\\n\\n.fa-rotate-180 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\\\";\\n -webkit-transform: rotate(180deg);\\n transform: rotate(180deg);\\n}\\n\\n.fa-rotate-270 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\\\";\\n -webkit-transform: rotate(270deg);\\n transform: rotate(270deg);\\n}\\n\\n.fa-flip-horizontal {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\\\";\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n}\\n\\n.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(1, -1);\\n transform: scale(1, -1);\\n}\\n\\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(-1, -1);\\n transform: scale(-1, -1);\\n}\\n\\n:root .fa-rotate-90,\\n:root .fa-rotate-180,\\n:root .fa-rotate-270,\\n:root .fa-flip-horizontal,\\n:root .fa-flip-vertical,\\n:root .fa-flip-both {\\n -webkit-filter: none;\\n filter: none;\\n}\\n\\n.fa-stack {\\n display: inline-block;\\n height: 2em;\\n position: relative;\\n width: 2.5em;\\n}\\n\\n.fa-stack-1x,\\n.fa-stack-2x {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.svg-inline--fa.fa-stack-1x {\\n height: 1em;\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-stack-2x {\\n height: 2em;\\n width: 2.5em;\\n}\\n\\n.fa-inverse {\\n color: #fff;\\n}\\n\\n.sr-only {\\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\\n.sr-only-focusable:active, .sr-only-focusable:focus {\\n clip: auto;\\n height: auto;\\n margin: 0;\\n overflow: visible;\\n position: static;\\n width: auto;\\n}\\n\\n.svg-inline--fa .fa-primary {\\n fill: var(--fa-primary-color, currentColor);\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa .fa-secondary {\\n fill: var(--fa-secondary-color, currentColor);\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-primary {\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa mask .fa-primary,\\n.svg-inline--fa mask .fa-secondary {\\n fill: black;\\n}\\n\\n.fad.fa-inverse {\\n color: #fff;\\n}\";\n\nfunction css () {\n var dfp = DEFAULT_FAMILY_PREFIX;\n var drc = DEFAULT_REPLACEMENT_CLASS;\n var fp = config.familyPrefix;\n var rc = config.replacementClass;\n var s = baseStyles;\n\n if (fp !== dfp || rc !== drc) {\n var dPatt = new RegExp(\"\\\\.\".concat(dfp, \"\\\\-\"), 'g');\n var customPropPatt = new RegExp(\"\\\\--\".concat(dfp, \"\\\\-\"), 'g');\n var rPatt = new RegExp(\"\\\\.\".concat(drc), 'g');\n s = s.replace(dPatt, \".\".concat(fp, \"-\")).replace(customPropPatt, \"--\".concat(fp, \"-\")).replace(rPatt, \".\".concat(rc));\n }\n\n return s;\n}\n\nvar Library =\n/*#__PURE__*/\nfunction () {\n function Library() {\n _classCallCheck(this, Library);\n\n this.definitions = {};\n }\n\n _createClass(Library, [{\n key: \"add\",\n value: function add() {\n var _this = this;\n\n for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {\n definitions[_key] = arguments[_key];\n }\n\n var additions = definitions.reduce(this._pullDefinitions, {});\n Object.keys(additions).forEach(function (key) {\n _this.definitions[key] = _objectSpread({}, _this.definitions[key] || {}, additions[key]);\n defineIcons(key, additions[key]);\n build();\n });\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.definitions = {};\n }\n }, {\n key: \"_pullDefinitions\",\n value: function _pullDefinitions(additions, definition) {\n var normalized = definition.prefix && definition.iconName && definition.icon ? {\n 0: definition\n } : definition;\n Object.keys(normalized).map(function (key) {\n var _normalized$key = normalized[key],\n prefix = _normalized$key.prefix,\n iconName = _normalized$key.iconName,\n icon = _normalized$key.icon;\n if (!additions[prefix]) additions[prefix] = {};\n additions[prefix][iconName] = icon;\n });\n return additions;\n }\n }]);\n\n return Library;\n}();\n\nfunction ensureCss() {\n if (config.autoAddCss && !_cssInserted) {\n insertCss(css());\n\n _cssInserted = true;\n }\n}\n\nfunction apiObject(val, abstractCreator) {\n Object.defineProperty(val, 'abstract', {\n get: abstractCreator\n });\n Object.defineProperty(val, 'html', {\n get: function get() {\n return val.abstract.map(function (a) {\n return toHtml(a);\n });\n }\n });\n Object.defineProperty(val, 'node', {\n get: function get() {\n if (!IS_DOM) return;\n var container = DOCUMENT.createElement('div');\n container.innerHTML = val.html;\n return container.children;\n }\n });\n return val;\n}\n\nfunction findIconDefinition(iconLookup) {\n var _iconLookup$prefix = iconLookup.prefix,\n prefix = _iconLookup$prefix === void 0 ? 'fa' : _iconLookup$prefix,\n iconName = iconLookup.iconName;\n if (!iconName) return;\n return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);\n}\n\nfunction resolveIcons(next) {\n return function (maybeIconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});\n var mask = params.mask;\n\n if (mask) {\n mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});\n }\n\n return next(iconDefinition, _objectSpread({}, params, {\n mask: mask\n }));\n };\n}\n\nvar library = new Library();\nvar noAuto = function noAuto() {\n config.autoReplaceSvg = false;\n config.observeMutations = false;\n disconnect();\n};\nvar _cssInserted = false;\nvar dom = {\n i2svg: function i2svg() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (IS_DOM) {\n ensureCss();\n var _params$node = params.node,\n node = _params$node === void 0 ? DOCUMENT : _params$node,\n _params$callback = params.callback,\n callback = _params$callback === void 0 ? function () {} : _params$callback;\n\n if (config.searchPseudoElements) {\n searchPseudoElements(node);\n }\n\n return onTree(node, callback);\n } else {\n return picked.reject('Operation requires a DOM of some kind.');\n }\n },\n css: css,\n insertCss: function insertCss$$1() {\n if (!_cssInserted) {\n insertCss(css());\n\n _cssInserted = true;\n }\n },\n watch: function watch() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var autoReplaceSvgRoot = params.autoReplaceSvgRoot,\n observeMutationsRoot = params.observeMutationsRoot;\n\n if (config.autoReplaceSvg === false) {\n config.autoReplaceSvg = true;\n }\n\n config.observeMutations = true;\n domready(function () {\n autoReplace({\n autoReplaceSvgRoot: autoReplaceSvgRoot\n });\n observe({\n treeCallback: onTree,\n nodeCallback: onNode,\n pseudoElementsCallback: searchPseudoElements,\n observeMutationsRoot: observeMutationsRoot\n });\n });\n }\n};\nvar parse = {\n transform: function transform(transformString) {\n return parseTransformString(transformString);\n }\n};\nvar icon = resolveIcons(function (iconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform = params.transform,\n transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,\n _params$symbol = params.symbol,\n symbol = _params$symbol === void 0 ? false : _params$symbol,\n _params$mask = params.mask,\n mask = _params$mask === void 0 ? null : _params$mask,\n _params$title = params.title,\n title = _params$title === void 0 ? null : _params$title,\n _params$classes = params.classes,\n classes = _params$classes === void 0 ? [] : _params$classes,\n _params$attributes = params.attributes,\n attributes = _params$attributes === void 0 ? {} : _params$attributes,\n _params$styles = params.styles,\n styles = _params$styles === void 0 ? {} : _params$styles;\n if (!iconDefinition) return;\n var prefix = iconDefinition.prefix,\n iconName = iconDefinition.iconName,\n icon = iconDefinition.icon;\n return apiObject(_objectSpread({\n type: 'icon'\n }, iconDefinition), function () {\n ensureCss();\n\n if (config.autoA11y) {\n if (title) {\n attributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(nextUniqueId());\n } else {\n attributes['aria-hidden'] = 'true';\n attributes['focusable'] = 'false';\n }\n }\n\n return makeInlineSvgAbstract({\n icons: {\n main: asFoundIcon(icon),\n mask: mask ? asFoundIcon(mask.icon) : {\n found: false,\n width: null,\n height: null,\n icon: {}\n }\n },\n prefix: prefix,\n iconName: iconName,\n transform: _objectSpread({}, meaninglessTransform, transform),\n symbol: symbol,\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: classes\n }\n });\n });\n});\nvar text = function text(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform2 = params.transform,\n transform = _params$transform2 === void 0 ? meaninglessTransform : _params$transform2,\n _params$title2 = params.title,\n title = _params$title2 === void 0 ? null : _params$title2,\n _params$classes2 = params.classes,\n classes = _params$classes2 === void 0 ? [] : _params$classes2,\n _params$attributes2 = params.attributes,\n attributes = _params$attributes2 === void 0 ? {} : _params$attributes2,\n _params$styles2 = params.styles,\n styles = _params$styles2 === void 0 ? {} : _params$styles2;\n return apiObject({\n type: 'text',\n content: content\n }, function () {\n ensureCss();\n return makeLayersTextAbstract({\n content: content,\n transform: _objectSpread({}, meaninglessTransform, transform),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-text\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar counter = function counter(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$title3 = params.title,\n title = _params$title3 === void 0 ? null : _params$title3,\n _params$classes3 = params.classes,\n classes = _params$classes3 === void 0 ? [] : _params$classes3,\n _params$attributes3 = params.attributes,\n attributes = _params$attributes3 === void 0 ? {} : _params$attributes3,\n _params$styles3 = params.styles,\n styles = _params$styles3 === void 0 ? {} : _params$styles3;\n return apiObject({\n type: 'counter',\n content: content\n }, function () {\n ensureCss();\n return makeLayersCounterAbstract({\n content: content.toString(),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-counter\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar layer = function layer(assembler) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$classes4 = params.classes,\n classes = _params$classes4 === void 0 ? [] : _params$classes4;\n return apiObject({\n type: 'layer'\n }, function () {\n ensureCss();\n var children = [];\n assembler(function (args) {\n Array.isArray(args) ? args.map(function (a) {\n children = children.concat(a.abstract);\n }) : children = children.concat(args.abstract);\n });\n return [{\n tag: 'span',\n attributes: {\n class: [\"\".concat(config.familyPrefix, \"-layers\")].concat(_toConsumableArray(classes)).join(' ')\n },\n children: children\n }];\n });\n};\nvar api = {\n noAuto: noAuto,\n config: config,\n dom: dom,\n library: library,\n parse: parse,\n findIconDefinition: findIconDefinition,\n icon: icon,\n text: text,\n counter: counter,\n layer: layer,\n toHtml: toHtml\n};\n\nvar autoReplace = function autoReplace() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _params$autoReplaceSv = params.autoReplaceSvgRoot,\n autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;\n if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({\n node: autoReplaceSvgRoot\n });\n};\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \"./node_modules/timers-browserify/main.js\").setImmediate))\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/fontawesome-svg-core/index.es.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-center';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f037';\nvar svgPathData = 'M432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM108.1 96h231.81A12.09 12.09 0 0 0 352 83.9V44.09A12.09 12.09 0 0 0 339.91 32H108.1A12.09 12.09 0 0 0 96 44.09V83.9A12.1 12.1 0 0 0 108.1 96zm231.81 256A12.09 12.09 0 0 0 352 339.9v-39.81A12.09 12.09 0 0 0 339.91 288H108.1A12.09 12.09 0 0 0 96 300.09v39.81a12.1 12.1 0 0 0 12.1 12.1z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignCenter = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-justify';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f039';\nvar svgPathData = 'M432 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignJustify = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-left';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f036';\nvar svgPathData = 'M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-right';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f038';\nvar svgPathData = 'M16 224h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm416 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-384H172.83A12.82 12.82 0 0 0 160 44.83v38.34A12.82 12.82 0 0 0 172.83 96h262.34A12.82 12.82 0 0 0 448 83.17V44.83A12.82 12.82 0 0 0 435.17 32zm0 256H172.83A12.82 12.82 0 0 0 160 300.83v38.34A12.82 12.82 0 0 0 172.83 352h262.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignRight = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faBold.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'bold';\nvar width = 384;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f032';\nvar svgPathData = 'M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faBold = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faBold.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faFont.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'font';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f031';\nvar svgPathData = 'M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faFont = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faFont.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faImage.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'image';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f03e';\nvar svgPathData = 'M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faImage = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faImage.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'indent';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f03c';\nvar svgPathData = 'M27.31 363.3l96-96a16 16 0 0 0 0-22.62l-96-96C17.27 138.66 0 145.78 0 160v192c0 14.31 17.33 21.3 27.31 11.3zM432 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-128H204.83A12.82 12.82 0 0 0 192 300.83v38.34A12.82 12.82 0 0 0 204.83 352h230.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288zm0-128H204.83A12.82 12.82 0 0 0 192 172.83v38.34A12.82 12.82 0 0 0 204.83 224h230.34A12.82 12.82 0 0 0 448 211.17v-38.34A12.82 12.82 0 0 0 435.17 160zM432 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faIndent = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'italic';\nvar width = 320;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f033';\nvar svgPathData = 'M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faItalic = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faLink.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'link';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0c1';\nvar svgPathData = 'M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faLink = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faLink.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faList.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f03a';\nvar svgPathData = 'M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faList = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faList.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list-ol';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0cb';\nvar svgPathData = 'M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faListOl = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list-ul';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0ca';\nvar svgPathData = 'M48 48a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm448 16H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faListUl = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'paper-plane';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f1d8';\nvar svgPathData = 'M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faPaperPlane = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'paperclip';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0c6';\nvar svgPathData = 'M43.246 466.142c-58.43-60.289-57.341-157.511 1.386-217.581L254.392 34c44.316-45.332 116.351-45.336 160.671 0 43.89 44.894 43.943 117.329 0 162.276L232.214 383.128c-29.855 30.537-78.633 30.111-107.982-.998-28.275-29.97-27.368-77.473 1.452-106.953l143.743-146.835c6.182-6.314 16.312-6.422 22.626-.241l22.861 22.379c6.315 6.182 6.422 16.312.241 22.626L171.427 319.927c-4.932 5.045-5.236 13.428-.648 18.292 4.372 4.634 11.245 4.711 15.688.165l182.849-186.851c19.613-20.062 19.613-52.725-.011-72.798-19.189-19.627-49.957-19.637-69.154 0L90.39 293.295c-34.763 35.56-35.299 93.12-1.191 128.313 34.01 35.093 88.985 35.137 123.058.286l172.06-175.999c6.177-6.319 16.307-6.433 22.626-.256l22.877 22.364c6.319 6.177 6.434 16.307.256 22.626l-172.06 175.998c-59.576 60.938-155.943 60.216-214.77-.485z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faPaperclip = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'strikethrough';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0cc';\nvar svgPathData = 'M496 224H293.9l-87.17-26.83A43.55 43.55 0 0 1 219.55 112h66.79A49.89 49.89 0 0 1 331 139.58a16 16 0 0 0 21.46 7.15l42.94-21.47a16 16 0 0 0 7.16-21.46l-.53-1A128 128 0 0 0 287.51 32h-68a123.68 123.68 0 0 0-123 135.64c2 20.89 10.1 39.83 21.78 56.36H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-180.24 96A43 43 0 0 1 336 356.45 43.59 43.59 0 0 1 292.45 400h-66.79A49.89 49.89 0 0 1 181 372.42a16 16 0 0 0-21.46-7.15l-42.94 21.47a16 16 0 0 0-7.16 21.46l.53 1A128 128 0 0 0 224.49 480h68a123.68 123.68 0 0 0 123-135.64 114.25 114.25 0 0 0-5.34-24.36z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faStrikethrough = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'underline';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0cd';\nvar svgPathData = 'M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faUnderline = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js?")},"./node_modules/process/browser.js":function(module,exports){eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://striveneditor/./node_modules/process/browser.js?")},"./node_modules/setimmediate/setImmediate.js":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n "use strict";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== "function") {\n callback = new Function("" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: "Wait until any invocations of this algorithm started before this one have completed."\n // So if we\'re currently running a task, we\'ll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // "too much recursion" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can\'t be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage("", "*");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = "setImmediate$" + Math.random() + "$";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === "string" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener("message", onGlobalMessage, false);\n } else {\n global.attachEvent("onmessage", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, "*");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it\'s been called.\n var script = doc.createElement("script");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don\'t get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === "[object process]") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && "onreadystatechange" in doc.createElement("script")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))\n\n//# sourceURL=webpack://striveneditor/./node_modules/setimmediate/setImmediate.js?')},"./node_modules/timers-browserify/main.js":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||\n (typeof self !== "undefined" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(/*! setimmediate */ "./node_modules/setimmediate/setImmediate.js");\n// On some exotic environments, it\'s not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||\n (typeof global !== "undefined" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||\n (typeof global !== "undefined" && global.clearImmediate) ||\n (this && this.clearImmediate);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))\n\n//# sourceURL=webpack://striveneditor/./node_modules/timers-browserify/main.js?')},"./node_modules/webpack/buildin/global.js":function(module,exports){eval('var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function("return this")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === "object") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it\'s\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://striveneditor/(webpack)/buildin/global.js?')},"./src/striveneditor.js":function(module,exports,__webpack_require__){eval('var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @fortawesome/fontawesome-svg-core */ "./node_modules/@fortawesome/fontawesome-svg-core/index.es.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faFont */ "./node_modules/@fortawesome/free-solid-svg-icons/faFont.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faBold */ "./node_modules/@fortawesome/free-solid-svg-icons/faBold.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faItalic */ "./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faUnderline */ "./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faStrikethrough */ "./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faList */ "./node_modules/@fortawesome/free-solid-svg-icons/faList.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListOl */ "./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListUl */ "./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignJustify */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faIndent */ "./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignLeft */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignCenter */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignRight */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperclip */ "./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faLink */ "./node_modules/@fortawesome/free-solid-svg-icons/faLink.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faImage */ "./node_modules/@fortawesome/free-solid-svg-icons/faImage.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperPlane */ "./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === \'function\' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else { var mod; }\n})(this, function (_exports, _fontawesomeSvgCore, _faFont, _faBold, _faItalic, _faUnderline, _faStrikethrough, _faList, _faListOl, _faListUl, _faAlignJustify, _faIndent, _faAlignLeft, _faAlignCenter, _faAlignRight, _faPaperclip, _faLink, _faImage, _faPaperPlane) {\n "use strict";\n\n Object.defineProperty(_exports, "__esModule", {\n value: true\n });\n _exports["default"] = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }\n\n function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n _fontawesomeSvgCore.library.add(_faFont.faFont);\n\n _fontawesomeSvgCore.library.add(_faBold.faBold);\n\n _fontawesomeSvgCore.library.add(_faItalic.faItalic);\n\n _fontawesomeSvgCore.library.add(_faUnderline.faUnderline);\n\n _fontawesomeSvgCore.library.add(_faStrikethrough.faStrikethrough);\n\n _fontawesomeSvgCore.library.add(_faList.faList);\n\n _fontawesomeSvgCore.library.add(_faListOl.faListOl);\n\n _fontawesomeSvgCore.library.add(_faListUl.faListUl);\n\n _fontawesomeSvgCore.library.add(_faAlignJustify.faAlignJustify);\n\n _fontawesomeSvgCore.library.add(_faIndent.faIndent);\n\n _fontawesomeSvgCore.library.add(_faAlignLeft.faAlignLeft);\n\n _fontawesomeSvgCore.library.add(_faAlignCenter.faAlignCenter);\n\n _fontawesomeSvgCore.library.add(_faAlignRight.faAlignRight);\n\n _fontawesomeSvgCore.library.add(_faPaperclip.faPaperclip);\n\n _fontawesomeSvgCore.library.add(_faLink.faLink);\n\n _fontawesomeSvgCore.library.add(_faImage.faImage);\n\n _fontawesomeSvgCore.library.add(_faPaperPlane.faPaperPlane);\n\n _fontawesomeSvgCore.dom.watch();\n\n var EXTENSIONS = [".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".tif", ".jpeg", ".jpg", ".gif", ".bmp", ".txt", ".csv", ".png", ".msg", ".wav", ".mp3", ".mp4", ".zip", ".rtf", ".eps", ".ai", ".psd", ".avi", ".mov", ".wmv", ".cfg", ".wss", ".vsd", ".vsdx", ".tsd", ".lic"];\n var FONTPACK = "fas";\n var OPTIONGROUPS = {\n textDecoration: {\n menu: "fa-font",\n group: [{\n bold: "fa-bold"\n }, {\n italic: "fa-italic"\n }, {\n underline: "fa-underline"\n }, {\n strikethrough: "fa-strikethrough"\n }]\n },\n listOptions: {\n menu: "fa-list",\n group: [{\n insertOrderedList: "fa-list-ol"\n }, {\n insertUnorderedList: "fa-list-ul"\n }]\n },\n textAlign: {\n menu: "fa-align-justify",\n group: [{\n indent: "fa-indent"\n }, {\n justifyLeft: "fa-align-left"\n }, {\n justifyCenter: "fa-align-center"\n }, {\n justifyRight: "fa-align-right"\n }]\n },\n attachments: {\n menu: "fa-paperclip",\n group: [{\n attachment: "fa-paperclip"\n }, {\n link: "fa-link"\n }, {\n image: "fa-image"\n }]\n }\n };\n\n var StrivenEditor =\n /*#__PURE__*/\n function () {\n function StrivenEditor(el, options) {\n _classCallCheck(this, StrivenEditor);\n\n this.range = new Range();\n this.files = [];\n this.optionGroups = OPTIONGROUPS;\n\n if (options) {\n this.options = options;\n options.fontPack || (this.options.fontPack = FONTPACK);\n options.extensions || (this.options.extensions = EXTENSIONS);\n } else {\n this.options = {\n fontPack: FONTPACK,\n extensions: EXTENSIONS\n };\n }\n\n this.initEditor(el);\n this.initResponsive();\n this.initOverflow();\n }\n\n _createClass(StrivenEditor, [{\n key: "initEditor",\n value: function initEditor(el) {\n var _this = this;\n\n this.editor = el;\n this.toolbar = this.initToolbar();\n this.body = this.initBody();\n this.linkMenu = this.initLinkMenu();\n this.imageMenu = this.initImageMenu();\n this.metaDataSection = this.initMetaDataSection();\n this.filesSection = this.initFilesSection();\n this.editor.style.border = "2px solid #ddd";\n this.editor.style.display = "flex";\n this.editor.style.flexDirection = "column";\n this.editor.style.position = "relative";\n this.editor.style.fontFamily = "Arial";\n this.toolbar.style.display = "flex";\n this.toolbar.style.justifyContent = "space-between";\n this.toolbar.style.alignItems = "center";\n this.toolbar.style.flexWrap = "wrap";\n this.toolbar.style.minHeight = this.options.toolbarHide ? "0" : "40px";\n this.toolbarOptionsGroup.style.margin = "0 10px";\n this.toolbarOptionsGroup.style.display = this.options.toolbarHide ? "none" : "flex";\n this.body.contentEditable = "true";\n this.body.style.outline = "none";\n this.body.style.padding = "10px 20px";\n this.body.style.height = this.editor.style.height;\n this.body.style.minHeight = this.editor.style.minHeight;\n this.body.style.maxHeight = this.editor.style.maxHeight;\n this.editor.style.minHeight = "auto";\n this.editor.style.maxHeight = "auto";\n this.editor.style.maxWidth = "100%";\n\n if (this.options.toolbarHide) {\n this.toolbarSend.style.display = "none";\n this.toolbarOptionsGroup.style.display = "none";\n\n this.body.onfocus = function () {\n _this.overflow();\n\n _this.toolbarSlideUp();\n };\n\n this.body.onblur = function () {\n _this.overflow();\n\n setTimeout(function () {\n if (document.activeElement !== _this.body && document.activeElement !== _this.linkMenu.querySelector(\'input\')) {\n _this.toolbarSlideDown();\n }\n }, 2000);\n };\n }\n\n this.toolbarSend.style.display = "none";\n this.toolbarSend.style.color = "#fff";\n this.toolbarSend.style.backgroundColor = "#5cb85c";\n this.toolbarSend.style.minHeight = this.options.toolbarHide ? "40px" : this.toolbar.style.minHeight;\n this.toolbarSend.style.width = "50px";\n this.toolbarSend.style.textAlign = "center";\n this.toolbarSend.style.justifyContent = "center";\n this.toolbarSend.style.alignContent = "center";\n this.toolbarSend.style.alignItems = "center";\n this.toolbarSend.style.cursor = "pointer";\n this.toolbarSend.style.border = "1px solid #4cae4c";\n this.toolbarSend.style.alignSelf = "flex-end";\n this.options.onToolbarSend && (this.toolbarSend.onclick = function () {\n return _this.options.onToolbarSend();\n });\n this.options.onToolbarSend && !this.options.toolbarHide && (this.toolbarSend.style.display = "flex");\n\n this.toolbarSend.onmouseenter = function () {\n return _this.toolbarSend.style.backgroundColor = "#4cae4c";\n };\n\n this.toolbarSend.onmouseleave = function () {\n return _this.toolbarSend.style.backgroundColor = "#5cb85c";\n }; // Toolbar Options\n\n\n this.toolbarOptions.forEach(function (optionEl) {\n // Assign Styles\n optionEl.style.padding = "0 10px";\n optionEl.style.cursor = "pointer";\n optionEl.style.userSelect = "none"; // Execute Toolbar Commands\n\n optionEl.onclick = function (e) {\n _this.body.focus();\n\n var command = optionEl.id.split("-")[1];\n\n switch (command) {\n case "insertOrderedList":\n document.execCommand("indent", true);\n document.execCommand(command, true);\n break;\n\n case "insertUnorderedList":\n document.execCommand("indent", true);\n document.execCommand(command, true);\n break;\n\n case "attachment":\n var attachmentInput = document.createElement("input");\n attachmentInput.style.display = "none";\n attachmentInput.type = "file";\n attachmentInput.click();\n\n attachmentInput.onchange = function (e) {\n return _this.attachFile(attachmentInput.files[0]);\n };\n\n break;\n\n case "link":\n if (_this.linkMenu.dataset.active === "true") {\n _this.linkMenu.dataset.active = "false";\n _this.linkMenu.style.display = "none";\n } else {\n _this.linkMenu.dataset.active = "true";\n _this.linkMenu.style.display = "block";\n _this.range = _this.getRange();\n\n _this.linkMenu.querySelector(\'input\').focus();\n }\n\n break;\n\n case "image":\n console.log("image");\n break;\n\n default:\n document.execCommand(command, true);\n break;\n }\n };\n }); // Paste Handler\n\n this.body.onpaste = function (e) {\n function dataURLtoFile(dataurl, filename) {\n var arr = dataurl.split(\',\'),\n mime = arr[0].match(/:(.*?);/)[1],\n bstr = atob(arr[1]),\n n = bstr.length,\n u8arr = new Uint8Array(n);\n\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n\n var file = new File([u8arr], filename, {\n type: mime\n });\n return new File([u8arr], "".concat(file.name, ".").concat(file.type.split(\'/\').pop()), {\n type: file.type\n });\n }\n\n var convertImage = function convertImage(file) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = function () {\n return resolve(reader.result);\n };\n\n reader.onerror = function (error) {\n return reject(error);\n };\n });\n };\n\n if (e.clipboardData.files.length > 0 && e.clipboardData.files[0].type.includes("image")) {\n convertImage(e.clipboardData.files[0]).then(function (res) {\n document.execCommand("insertImage", true, res);\n _this.options.uploadOnPaste && _this.attachFile(dataURLtoFile(res, "pastedimage"));\n\n _this.overflow();\n });\n }\n\n if (e.clipboardData.items.length > 0 && e.clipboardData.items[0].type === "text/plain") {\n e.clipboardData.items[0].getAsString(function (string) {\n if (_this.options.metaUrl && _this.validURL(string)) {\n _this.getMeta(string).then(function (res) {\n var url = res.url,\n title = res.title,\n image = res.image,\n description = res.description;\n url && title && image && _this.createMetaDataElement(url, image, title, description);\n });\n }\n });\n }\n\n _this.overflow();\n }; // Get Content from Editor\n\n\n this.editor.getcontent = function () {\n return _this.getContent();\n }; // Get Editor Range\n\n\n this.editor.getrange = function () {\n return _this.getRange();\n };\n\n this.editor.appendChild(this.toolbar);\n this.editor.appendChild(this.body);\n this.editor.appendChild(this.linkMenu); // this.editor.appendChild(this.imageMenu);\n\n this.editor.appendChild(this.metaDataSection);\n this.editor.appendChild(this.filesSection); // Reposition Toolbar\n\n if (this.options.toolbarBottom) {\n this.editor.removeChild(this.toolbar);\n this.editor.append(this.toolbar);\n }\n }\n }, {\n key: "toolbarSlideUp",\n value: function toolbarSlideUp() {\n var that = this;\n var height = this.toolbar.offsetHeight;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 40) {\n that.options.onToolbarSend && (that.toolbarSend.style.display = "flex");\n that.toolbarOptionsGroup.style.display = "flex";\n clearInterval(id);\n } else {\n height++;\n that.toolbar.style.minHeight = "".concat(height, "px");\n }\n }\n }\n }, {\n key: "toolbarSlideDown",\n value: function toolbarSlideDown() {\n var that = this;\n this.options.onToolbarSend && (this.toolbarSend.style.display = "none");\n this.toolbarOptionsGroup.style.display = "none";\n var height = 40;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 0) {\n clearInterval(id);\n } else {\n height--;\n that.toolbar.style.minHeight = "".concat(height, "px");\n }\n }\n }\n }, {\n key: "initToolbar",\n value: function initToolbar() {\n var _this2 = this;\n\n var toolbar = document.createElement("div");\n this.toolbarOptionsGroup = document.createElement("div");\n var groups = Object.keys(this.optionGroups);\n toolbar.classList.add("toolbar");\n this.toolbarOptionsGroup.classList.add("toolbar-options"); //iterate groups\n\n groups.forEach(function (group) {\n // add menu to toolbarOptions\n var toolbarMenu = document.createElement("div");\n var toolbarMenuIcon = document.createElement("i");\n toolbarMenu.classList.add("toolbar-menu");\n toolbarMenu.id = "menu-".concat(group);\n toolbarMenuIcon.classList.add(_this2.options.fontPack);\n toolbarMenuIcon.classList.add(_this2.optionGroups[group].menu);\n toolbarMenu.appendChild(toolbarMenuIcon);\n\n _this2.toolbarOptionsGroup.appendChild(toolbarMenu); // add group to toolbarOptions\n\n\n var toolbarGroup = document.createElement("div");\n toolbarGroup.classList.add("toolbar-group");\n toolbarGroup.id = "group-".concat(group);\n\n _this2.optionGroups[group].group.forEach(function (option) {\n var optionSpan = document.createElement("span");\n var optionIcon = document.createElement("i");\n var toolbarCommand = Object.keys(option)[0];\n optionSpan.id = "toolbar-".concat(toolbarCommand);\n optionIcon.classList.add(_this2.options.fontPack);\n optionIcon.classList.add(option[toolbarCommand]);\n optionSpan.appendChild(optionIcon);\n toolbarGroup.appendChild(optionSpan);\n });\n\n _this2.toolbarOptionsGroup.appendChild(toolbarGroup);\n });\n toolbar.appendChild(this.toolbarOptionsGroup); //add toolbar-send\n\n var toolbarSend = document.createElement("div");\n var toolbarSendIcon = document.createElement("i");\n toolbarSend.id = "toolbar-send";\n toolbarSendIcon.classList.add(this.options.fontPack);\n toolbarSendIcon.classList.add("fa-paper-plane");\n toolbarSend.appendChild(toolbarSendIcon);\n toolbar.appendChild(toolbarSend);\n this.toolbarOptions = toolbar.querySelectorAll("span");\n this.toolbarGroups = _toConsumableArray(toolbar.getElementsByClassName("toolbar-group"));\n this.toolbarMenus = _toConsumableArray(toolbar.getElementsByClassName("toolbar-menu"));\n this.toolbarSend = toolbar.querySelector("#toolbar-send");\n return toolbar;\n }\n }, {\n key: "initBody",\n value: function initBody() {\n var body = document.createElement("div");\n body.classList.add("body");\n return body;\n }\n }, {\n key: "initLinkMenu",\n value: function initLinkMenu() {\n var _this3 = this;\n\n var linkMenu = document.createElement("div");\n var linkMenuForm = document.createElement("div");\n var linkMenuButton = document.createElement("button");\n var linkMenuFormLabel = document.createElement("p");\n var linkMenuFormInput = document.createElement("input");\n linkMenu.id = "link-menu";\n linkMenuButton.textContent = "Insert Link";\n linkMenuFormLabel.textContent = "Web Address";\n linkMenuFormInput.type = "text";\n linkMenuFormLabel.style.margin = "8px 10px 8px 0";\n linkMenuFormLabel.style.fontSize = "14px";\n linkMenuButton.style.cursor = "pointer";\n linkMenu.dataset.active = "false";\n linkMenu.style.display = "none";\n linkMenu.style.position = "absolute";\n linkMenu.style.right = "10px";\n linkMenu.style.bottom = "10px";\n linkMenu.style.backgroundColor = "#fff";\n linkMenu.style.border = "2px solid #ddd";\n linkMenu.style.padding = "10px 20px";\n linkMenu.style.zIndex = "1000";\n linkMenuFormLabel.style.width = "100%";\n linkMenuFormLabel.style.textAlign = "right";\n linkMenuFormLabel.style.marginRight = "10px";\n linkMenuFormInput.style.outline = "none";\n linkMenuFormInput.style.padding = "0 5px";\n linkMenuFormInput.placeholder = "Insert a Link";\n linkMenuForm.style.display = "flex";\n linkMenuForm.style.justifyContent = "space-between";\n linkMenuForm.style.margin = "5px 0";\n linkMenuButton.style["float"] = "right";\n linkMenuButton.style.padding = "6px 12px";\n linkMenuButton.style.border = "1px solid #4cae4c";\n linkMenuButton.style.backgroundColor = "#5cb85c";\n linkMenuButton.style.fontSize = "14px";\n linkMenuButton.style.color = "#fff";\n linkMenuButton.style.outline = "none";\n\n linkMenuButton.onmouseenter = function () {\n return linkMenuButton.style.backgroundColor = "#4cae4c";\n };\n\n linkMenuButton.onmouseleave = function () {\n return linkMenuButton.style.backgroundColor = "#5cb85c";\n };\n\n linkMenuButton.onclick = function (e) {\n var linkValue = linkMenuFormInput.value;\n\n if (linkValue) {\n window.getSelection().removeAllRanges();\n window.getSelection().addRange(_this3.range);\n document.execCommand("createLink", true, linkValue);\n\n if (_this3.options.metaUrl && _this3.validURL(linkValue)) {\n _this3.getMeta(linkValue).then(function (res) {\n var url = res.url,\n image = res.image,\n title = res.title,\n description = res.description;\n url && image && title && _this3.createMetaDataElement(url, image, title, description);\n });\n }\n\n var bodyLinks = _this3.body.querySelectorAll("a");\n\n bodyLinks[bodyLinks.length - 1].contentEditable = "false";\n linkMenuFormInput.value = "";\n\n _this3.toolbar.querySelector("#toolbar-link").onclick();\n } else {\n _this3.body.focus();\n\n _this3.linkMenu.dataset.active = "false";\n e.target.parentElement.style.display = "none";\n }\n };\n\n linkMenuForm.appendChild(linkMenuFormLabel);\n linkMenuForm.appendChild(linkMenuFormInput);\n linkMenu.appendChild(linkMenuForm);\n linkMenu.appendChild(linkMenuButton);\n return linkMenu;\n }\n }, {\n key: "initImageMenu",\n value: function initImageMenu() {\n var imageMenu = document.createElement("div");\n var imageMenuForm = document.createElement("div");\n var imageMenuButton = document.createElement("button");\n var imageMenuFormLabel = document.createElement("p");\n var imageMenuFormInput = document.createElement("input");\n imageMenu.id = "image-menu";\n imageMenuButton.textContent = "Insert Image";\n imageMenuFormLabel.textContent = "Image URL";\n imageMenuFormInput.type = "text";\n imageMenuFormLabel.style.margin = "8px 10px 8px 0";\n imageMenuFormLabel.style.fontSize = "14px";\n imageMenuButton.style.cursor = "pointer";\n imageMenuForm.appendChild(imageMenuFormLabel);\n imageMenuForm.appendChild(imageMenuFormInput);\n imageMenu.appendChild(imageMenuForm);\n imageMenu.appendChild(imageMenuButton);\n return imageMenu;\n }\n }, {\n key: "initMetaDataSection",\n value: function initMetaDataSection() {\n var metaDataSection = document.createElement("div");\n metaDataSection.classList.add("metadata-section");\n metaDataSection.style.display = "flex";\n metaDataSection.style.flexWrap = "wrap";\n metaDataSection.style.zIndex = "500";\n return metaDataSection;\n }\n }, {\n key: "initFilesSection",\n value: function initFilesSection() {\n var _this4 = this;\n\n var filesSection = document.createElement("div");\n filesSection.classList.add("files-section");\n filesSection.style.display = "flex";\n filesSection.style.flexWrap = "wrap";\n filesSection.style.zIndex = "500";\n\n this.body.ondragenter = function (e) {\n _this4.body.style.backgroundColor = "#ddd";\n };\n\n this.body.ondragleave = function (e) {\n _this4.body.style.backgroundColor = "inherit";\n };\n\n this.body.ondrop = function (e) {\n _this4.body.style.backgroundColor = "inherit";\n e.preventDefault();\n var file = e.dataTransfer.files && e.dataTransfer.files[0];\n\n _this4.attachFile(file);\n };\n\n this.editor.getfiles = function () {\n return _this4.getFiles();\n };\n\n return filesSection;\n }\n }, {\n key: "createFileElement",\n value: function createFileElement(name, size) {\n var _this5 = this;\n\n var fileEl = document.createElement("div");\n var fileNameEl = document.createElement("h4");\n var fileSizeEl = document.createElement("p");\n var removeFileEl = document.createElement("p");\n fileNameEl.textContent = name;\n fileSizeEl.textContent = size;\n removeFileEl.textContent = "X";\n fileEl.dataset.fileindex = this.files.length - 1;\n fileEl.style.width = "100%";\n fileEl.style.display = "flex";\n fileEl.style.flexDirection = "column";\n fileEl.style.margin = "10px";\n fileEl.style.position = "relative";\n fileNameEl.style.fontWeight = "bold";\n fileNameEl.style.margin = "0";\n fileSizeEl.style.fontSize = "12px";\n fileSizeEl.style.margin = "2px 0";\n removeFileEl.style.margin = "0";\n removeFileEl.style.userSelect = "none";\n removeFileEl.style.color = "black";\n removeFileEl.style.position = "absolute";\n removeFileEl.style.right = "5px";\n removeFileEl.style.top = "-5px";\n removeFileEl.style.cursor = "pointer";\n removeFileEl.style.backgroundColor = "#fff";\n\n removeFileEl.onmouseenter = function () {\n return removeFileEl.style.color = "#ddd";\n };\n\n removeFileEl.onmouseleave = function () {\n return removeFileEl.style.color = "black";\n };\n\n removeFileEl.onclick = function (e) {\n _this5.files.splice(e.target.parentElement.dataset.fileindex, 1);\n\n e.target.parentElement.remove();\n };\n\n fileEl.appendChild(fileNameEl);\n fileEl.appendChild(fileSizeEl);\n fileEl.appendChild(removeFileEl);\n this.filesSection.appendChild(fileEl);\n\n this.editor.getfiles = function () {\n return _this5.getFiles();\n };\n }\n }, {\n key: "createMetaDataElement",\n value: function createMetaDataElement(url, img, title, description) {\n var metaItemEl = document.createElement("div");\n var metaLinkEl = document.createElement("a");\n var metaImageEl = document.createElement("img");\n var metaDataEl = document.createElement("div");\n var metaDataTitleEl = document.createElement("h4");\n var metaDataDescriptionEl = document.createElement("p");\n var removeMetaDataEl = document.createElement("span");\n metaLinkEl.href = url;\n metaImageEl.src = img;\n metaDataTitleEl.textContent = title;\n metaDataDescriptionEl.textContent = description;\n removeMetaDataEl.textContent = "X";\n metaLinkEl.target = "blank";\n metaItemEl.style.width = "100%";\n metaItemEl.style.display = "flex";\n metaItemEl.style.margin = "10px";\n metaItemEl.style.position = "relative";\n metaImageEl.style.marginRight = "10px";\n metaImageEl.style.height = "50px";\n metaImageEl.style.width = "75px";\n metaDataTitleEl.style.fontWeight = "bold";\n metaDataTitleEl.style.margin = "0";\n metaDataDescriptionEl.style.margin = "0";\n removeMetaDataEl.style.userSelect = "none";\n removeMetaDataEl.style.color = "black";\n removeMetaDataEl.style.position = "absolute";\n removeMetaDataEl.style.right = "5px";\n removeMetaDataEl.style.top = "-5px";\n removeMetaDataEl.style.cursor = "pointer";\n removeMetaDataEl.style.backgroundColor = "#fff";\n\n removeMetaDataEl.onmouseenter = function () {\n return removeMetaDataEl.style.color = "#ddd";\n };\n\n removeMetaDataEl.onmouseleave = function () {\n return removeMetaDataEl.style.color = "black";\n };\n\n removeMetaDataEl.onclick = function (e) {\n return e.target.parentElement.remove();\n };\n\n metaLinkEl.appendChild(metaImageEl);\n metaDataEl.appendChild(metaDataTitleEl);\n metaDataEl.appendChild(metaDataDescriptionEl);\n metaItemEl.appendChild(metaLinkEl);\n metaItemEl.appendChild(metaDataEl);\n metaItemEl.appendChild(removeMetaDataEl);\n this.metaDataSection.appendChild(metaItemEl);\n }\n }, {\n key: "initResponsive",\n value: function initResponsive() {\n var that = this;\n\n if (!this.options.minimal) {\n var responsiveGroups = function responsiveGroups(isResponsive) {\n that.toolbarGroups.forEach(function (group) {\n group.dataset.open = "false";\n group.style.display = isResponsive ? "none" : "block";\n group.style.position = isResponsive ? "absolute" : "relative";\n group.style.bottom = isResponsive ? "5px" : "inherit";\n group.style.right = isResponsive ? "5px" : "inherit";\n group.style.backgroundColor = isResponsive ? "#fff" : "inherit";\n group.style.border = isResponsive ? "2px solid #ddd" : "none";\n });\n that.toolbarMenus.forEach(function (menu) {\n function toggleMenu() {\n var selectedGroup = that.toolbar.querySelector("#group-".concat(menu.id.split("-")[1]));\n\n if (selectedGroup.dataset.open === "false") {\n // close opened groups\n that.toolbarGroups.forEach(function (group) {\n if (group.dataset.open === "true") {\n group.style.display = "none";\n group.dataset.open = "false";\n }\n }); // open group\n\n selectedGroup.style.display = "block";\n selectedGroup.style.padding = "5px";\n selectedGroup.dataset.open = "true";\n } else {\n selectedGroup.style.display = "none";\n selectedGroup.dataset.open = "false";\n }\n }\n\n menu.style.padding = "0 10px";\n menu.style.cursor = "pointer";\n menu.style.userSelect = "none";\n menu.style.display = isResponsive ? "block" : "none";\n\n menu.onclick = function (e) {\n return toggleMenu();\n };\n });\n };\n\n var setResponsive = function setResponsive() {\n responsive = window.matchMedia("(max-width: 700px)").matches;\n responsiveGroups(responsive);\n };\n\n var responsive = window.matchMedia("(max-width: 700px)").matches;\n setResponsive();\n\n window.onresize = function () {\n return setResponsive();\n };\n } else {\n this.toolbarMenus.forEach(function (menu) {\n return menu.style.display = "none";\n });\n this.toolbar.querySelector("#toolbar-strikethrough").style.display = "none";\n this.toolbar.querySelector("#toolbar-image").style.display = "none";\n this.toolbar.querySelector("#toolbar-insertOrderedList").style.display = "none";\n this.toolbar.querySelector("#group-textAlign").style.display = "none";\n }\n }\n }, {\n key: "initOverflow",\n value: function initOverflow() {\n var _this6 = this;\n\n var onFocus = this.body.onfocus;\n\n this.body.onfocus = function () {\n onFocus && onFocus();\n\n _this6.overflow();\n };\n\n var onBlur = this.body.onblur;\n\n this.body.onblur = function () {\n onBlur && onBlur();\n\n _this6.overflow();\n };\n\n this.body.onkeypress = function () {\n return _this6.overflow();\n };\n }\n }, {\n key: "getFiles",\n value: function getFiles() {\n return this.files;\n }\n }, {\n key: "getContent",\n value: function getContent() {\n return this.body.innerHTML;\n }\n }, {\n key: "getRange",\n value: function getRange() {\n return window.getSelection().getRangeAt(0);\n }\n }, {\n key: "getMeta",\n value: function getMeta(url) {\n return fetch(this.options.metaUrl, {\n method: "POST",\n headers: {\n \'Content-Type\': \'application/json\'\n },\n body: JSON.stringify({\n targetUrl: url\n })\n }).then(function (res) {\n return res.json();\n });\n }\n }, {\n key: "validURL",\n value: function validURL(str) {\n var pattern = new RegExp("^(https?:\\\\/\\\\/)?" + "((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|" + "((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))" + "(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*" + "(\\\\?[;&a-z\\\\d%_.~+=-]*)?" + "(\\\\#[-a-z\\\\d_]*)?$", "i");\n return !!pattern.test(str);\n }\n }, {\n key: "overflow",\n value: function overflow() {\n var body = this.body;\n body.scrollHeight > body.clientHeight ? body.style.overflowY = "scroll" : body.style.overflowY = "hidden";\n body.scrollWidth > body.clientWidth ? body.style.overflowX = "scroll" : body.style.overflowX = "hidden";\n }\n }, {\n key: "formatBytes",\n value: function formatBytes(bytes) {\n var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n if (bytes === 0) return \'0 Bytes\';\n var k = 1024;\n var dm = decimals < 0 ? 0 : decimals;\n var sizes = [\'Bytes\', \'KB\', \'MB\', \'GB\', \'TB\', \'PB\', \'EB\', \'ZB\', \'YB\'];\n var i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + \' \' + sizes[i];\n }\n }, {\n key: "validateFile",\n value: function validateFile(file) {\n var extension = file.type.split(\'/\').pop();\n return this.options.extensions.includes(".".concat(extension));\n }\n }, {\n key: "attachFile",\n value: function attachFile(file) {\n if (this.validateFile(file)) {\n this.files.push(file);\n this.createFileElement(file.name, this.formatBytes(file.size));\n } else {\n this.fileInvalid();\n }\n }\n }, {\n key: "fileInvalid",\n value: function fileInvalid() {\n var _this7 = this;\n\n this.body.style.transition = "background-color .5s";\n this.body.style.backgroundColor = "#d9534f";\n setTimeout(function () {\n _this7.body.style.backgroundColor = "inherit";\n setTimeout(function () {\n return _this7.body.style.transition = "none";\n }, 500);\n }, 500);\n }\n }]);\n\n return StrivenEditor;\n }();\n\n _exports["default"] = StrivenEditor;\n});\n\n//# sourceURL=webpack://striveneditor/./src/striveneditor.js?')}})})); -\ No newline at end of file +!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.striveneditor=e():n.striveneditor=e()}(window,(function(){return function(n){var e={};function t(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return n[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,a){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:a})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(a,r,function(e){return n[e]}.bind(null,r));return a},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s="./src/striveneditor.js")}({"./node_modules/@fortawesome/fontawesome-svg-core/index.es.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"icon\", function() { return icon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"noAuto\", function() { return noAuto; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"config\", function() { return config; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toHtml\", function() { return toHtml; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"layer\", function() { return layer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"text\", function() { return text; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"counter\", function() { return counter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"library\", function() { return library; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dom\", function() { return dom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parse\", function() { return parse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findIconDefinition\", function() { return findIconDefinition; });\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nvar noop = function noop() {};\n\nvar _WINDOW = {};\nvar _DOCUMENT = {};\nvar _MUTATION_OBSERVER = null;\nvar _PERFORMANCE = {\n mark: noop,\n measure: noop\n};\n\ntry {\n if (typeof window !== 'undefined') _WINDOW = window;\n if (typeof document !== 'undefined') _DOCUMENT = document;\n if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;\n if (typeof performance !== 'undefined') _PERFORMANCE = performance;\n} catch (e) {}\n\nvar _ref = _WINDOW.navigator || {},\n _ref$userAgent = _ref.userAgent,\n userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;\n\nvar WINDOW = _WINDOW;\nvar DOCUMENT = _DOCUMENT;\nvar MUTATION_OBSERVER = _MUTATION_OBSERVER;\nvar PERFORMANCE = _PERFORMANCE;\nvar IS_BROWSER = !!WINDOW.document;\nvar IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';\nvar IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');\n\nvar NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';\nvar UNITS_IN_GRID = 16;\nvar DEFAULT_FAMILY_PREFIX = 'fa';\nvar DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';\nvar DATA_FA_I2SVG = 'data-fa-i2svg';\nvar DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';\nvar DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';\nvar DATA_PREFIX = 'data-prefix';\nvar DATA_ICON = 'data-icon';\nvar HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';\nvar MUTATION_APPROACH_ASYNC = 'async';\nvar TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];\nvar PRODUCTION = function () {\n try {\n return \"development\" === 'production';\n } catch (e) {\n return false;\n }\n}();\nvar PREFIX_TO_STYLE = {\n 'fas': 'solid',\n 'far': 'regular',\n 'fal': 'light',\n 'fad': 'duotone',\n 'fab': 'brands',\n 'fa': 'solid'\n};\nvar STYLE_TO_PREFIX = {\n 'solid': 'fas',\n 'regular': 'far',\n 'light': 'fal',\n 'duotone': 'fad',\n 'brands': 'fab'\n};\nvar LAYERS_TEXT_CLASSNAME = 'fa-layers-text';\nvar FONT_FAMILY_PATTERN = /Font Awesome 5 (Solid|Regular|Light|Duotone|Brands|Free|Pro)/;\nvar FONT_WEIGHT_TO_PREFIX = {\n '900': 'fas',\n '400': 'far',\n 'normal': 'far',\n '300': 'fal'\n};\nvar oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nvar oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);\nvar ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];\nvar DUOTONE_CLASSES = {\n GROUP: 'group',\n SWAP_OPACITY: 'swap-opacity',\n PRIMARY: 'primary',\n SECONDARY: 'secondary'\n};\nvar RESERVED_CLASSES = ['xs', 'sm', 'lg', 'fw', 'ul', 'li', 'border', 'pull-left', 'pull-right', 'spin', 'pulse', 'rotate-90', 'rotate-180', 'rotate-270', 'flip-horizontal', 'flip-vertical', 'flip-both', 'stack', 'stack-1x', 'stack-2x', 'inverse', 'layers', 'layers-text', 'layers-counter', DUOTONE_CLASSES.GROUP, DUOTONE_CLASSES.SWAP_OPACITY, DUOTONE_CLASSES.PRIMARY, DUOTONE_CLASSES.SECONDARY].concat(oneToTen.map(function (n) {\n return \"\".concat(n, \"x\");\n})).concat(oneToTwenty.map(function (n) {\n return \"w-\".concat(n);\n}));\n\nvar initial = WINDOW.FontAwesomeConfig || {};\n\nfunction getAttrConfig(attr) {\n var element = DOCUMENT.querySelector('script[' + attr + ']');\n\n if (element) {\n return element.getAttribute(attr);\n }\n}\n\nfunction coerce(val) {\n // Getting an empty string will occur if the attribute is set on the HTML tag but without a value\n // We'll assume that this is an indication that it should be toggled to true\n // For example <script data-search-pseudo-elements src=\"...\"><\/script>\n if (val === '') return true;\n if (val === 'false') return false;\n if (val === 'true') return true;\n return val;\n}\n\nif (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {\n var attrs = [['data-family-prefix', 'familyPrefix'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];\n attrs.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n attr = _ref2[0],\n key = _ref2[1];\n\n var val = coerce(getAttrConfig(attr));\n\n if (val !== undefined && val !== null) {\n initial[key] = val;\n }\n });\n}\n\nvar _default = {\n familyPrefix: DEFAULT_FAMILY_PREFIX,\n replacementClass: DEFAULT_REPLACEMENT_CLASS,\n autoReplaceSvg: true,\n autoAddCss: true,\n autoA11y: true,\n searchPseudoElements: false,\n observeMutations: true,\n mutateApproach: 'async',\n keepOriginalSource: true,\n measurePerformance: false,\n showMissingIcons: true\n};\n\nvar _config = _objectSpread({}, _default, initial);\n\nif (!_config.autoReplaceSvg) _config.observeMutations = false;\n\nvar config = _objectSpread({}, _config);\n\nWINDOW.FontAwesomeConfig = config;\n\nvar w = WINDOW || {};\nif (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};\nif (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};\nif (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};\nif (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];\nvar namespace = w[NAMESPACE_IDENTIFIER];\n\nvar functions = [];\n\nvar listener = function listener() {\n DOCUMENT.removeEventListener('DOMContentLoaded', listener);\n loaded = 1;\n functions.map(function (fn) {\n return fn();\n });\n};\n\nvar loaded = false;\n\nif (IS_DOM) {\n loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);\n if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);\n}\n\nfunction domready (fn) {\n if (!IS_DOM) return;\n loaded ? setTimeout(fn, 0) : functions.push(fn);\n}\n\nvar PENDING = 'pending';\nvar SETTLED = 'settled';\nvar FULFILLED = 'fulfilled';\nvar REJECTED = 'rejected';\n\nvar NOOP = function NOOP() {};\n\nvar isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';\nvar asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;\nvar asyncQueue = [];\nvar asyncTimer;\n\nfunction asyncFlush() {\n // run promise callbacks\n for (var i = 0; i < asyncQueue.length; i++) {\n asyncQueue[i][0](asyncQueue[i][1]);\n } // reset async asyncQueue\n\n\n asyncQueue = [];\n asyncTimer = false;\n}\n\nfunction asyncCall(callback, arg) {\n asyncQueue.push([callback, arg]);\n\n if (!asyncTimer) {\n asyncTimer = true;\n asyncSetTimer(asyncFlush, 0);\n }\n}\n\nfunction invokeResolver(resolver, promise) {\n function resolvePromise(value) {\n resolve(promise, value);\n }\n\n function rejectPromise(reason) {\n reject(promise, reason);\n }\n\n try {\n resolver(resolvePromise, rejectPromise);\n } catch (e) {\n rejectPromise(e);\n }\n}\n\nfunction invokeCallback(subscriber) {\n var owner = subscriber.owner;\n var settled = owner._state;\n var value = owner._data;\n var callback = subscriber[settled];\n var promise = subscriber.then;\n\n if (typeof callback === 'function') {\n settled = FULFILLED;\n\n try {\n value = callback(value);\n } catch (e) {\n reject(promise, e);\n }\n }\n\n if (!handleThenable(promise, value)) {\n if (settled === FULFILLED) {\n resolve(promise, value);\n }\n\n if (settled === REJECTED) {\n reject(promise, value);\n }\n }\n}\n\nfunction handleThenable(promise, value) {\n var resolved;\n\n try {\n if (promise === value) {\n throw new TypeError('A promises callback cannot return that same promise.');\n }\n\n if (value && (typeof value === 'function' || _typeof(value) === 'object')) {\n // then should be retrieved only once\n var then = value.then;\n\n if (typeof then === 'function') {\n then.call(value, function (val) {\n if (!resolved) {\n resolved = true;\n\n if (value === val) {\n fulfill(promise, val);\n } else {\n resolve(promise, val);\n }\n }\n }, function (reason) {\n if (!resolved) {\n resolved = true;\n reject(promise, reason);\n }\n });\n return true;\n }\n }\n } catch (e) {\n if (!resolved) {\n reject(promise, e);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction resolve(promise, value) {\n if (promise === value || !handleThenable(promise, value)) {\n fulfill(promise, value);\n }\n}\n\nfunction fulfill(promise, value) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = value;\n asyncCall(publishFulfillment, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = reason;\n asyncCall(publishRejection, promise);\n }\n}\n\nfunction publish(promise) {\n promise._then = promise._then.forEach(invokeCallback);\n}\n\nfunction publishFulfillment(promise) {\n promise._state = FULFILLED;\n publish(promise);\n}\n\nfunction publishRejection(promise) {\n promise._state = REJECTED;\n publish(promise);\n\n if (!promise._handled && isNode) {\n global.process.emit('unhandledRejection', promise._data, promise);\n }\n}\n\nfunction notifyRejectionHandled(promise) {\n global.process.emit('rejectionHandled', promise);\n}\n/**\n * @class\n */\n\n\nfunction P(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('Promise resolver ' + resolver + ' is not a function');\n }\n\n if (this instanceof P === false) {\n throw new TypeError('Failed to construct \\'Promise\\': Please use the \\'new\\' operator, this object constructor cannot be called as a function.');\n }\n\n this._then = [];\n invokeResolver(resolver, this);\n}\n\nP.prototype = {\n constructor: P,\n _state: PENDING,\n _then: null,\n _data: undefined,\n _handled: false,\n then: function then(onFulfillment, onRejection) {\n var subscriber = {\n owner: this,\n then: new this.constructor(NOOP),\n fulfilled: onFulfillment,\n rejected: onRejection\n };\n\n if ((onRejection || onFulfillment) && !this._handled) {\n this._handled = true;\n\n if (this._state === REJECTED && isNode) {\n asyncCall(notifyRejectionHandled, this);\n }\n }\n\n if (this._state === FULFILLED || this._state === REJECTED) {\n // already resolved, call callback async\n asyncCall(invokeCallback, subscriber);\n } else {\n // subscribe\n this._then.push(subscriber);\n }\n\n return subscriber.then;\n },\n catch: function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nP.all = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.all().');\n }\n\n return new P(function (resolve, reject) {\n var results = [];\n var remaining = 0;\n\n function resolver(index) {\n remaining++;\n return function (value) {\n results[index] = value;\n\n if (! --remaining) {\n resolve(results);\n }\n };\n }\n\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function') {\n promise.then(resolver(i), reject);\n } else {\n results[i] = promise;\n }\n }\n\n if (!remaining) {\n resolve(results);\n }\n });\n};\n\nP.race = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.race().');\n }\n\n return new P(function (resolve, reject) {\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function') {\n promise.then(resolve, reject);\n } else {\n resolve(promise);\n }\n }\n });\n};\n\nP.resolve = function (value) {\n if (value && _typeof(value) === 'object' && value.constructor === P) {\n return value;\n }\n\n return new P(function (resolve) {\n resolve(value);\n });\n};\n\nP.reject = function (reason) {\n return new P(function (resolve, reject) {\n reject(reason);\n });\n};\n\nvar picked = typeof Promise === 'function' ? Promise : P;\n\nvar d = UNITS_IN_GRID;\nvar meaninglessTransform = {\n size: 16,\n x: 0,\n y: 0,\n rotate: 0,\n flipX: false,\n flipY: false\n};\n\nfunction isReserved(name) {\n return ~RESERVED_CLASSES.indexOf(name);\n}\nfunction insertCss(css) {\n if (!css || !IS_DOM) {\n return;\n }\n\n var style = DOCUMENT.createElement('style');\n style.setAttribute('type', 'text/css');\n style.innerHTML = css;\n var headChildren = DOCUMENT.head.childNodes;\n var beforeChild = null;\n\n for (var i = headChildren.length - 1; i > -1; i--) {\n var child = headChildren[i];\n var tagName = (child.tagName || '').toUpperCase();\n\n if (['STYLE', 'LINK'].indexOf(tagName) > -1) {\n beforeChild = child;\n }\n }\n\n DOCUMENT.head.insertBefore(style, beforeChild);\n return css;\n}\nvar idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nfunction nextUniqueId() {\n var size = 12;\n var id = '';\n\n while (size-- > 0) {\n id += idPool[Math.random() * 62 | 0];\n }\n\n return id;\n}\nfunction toArray(obj) {\n var array = [];\n\n for (var i = (obj || []).length >>> 0; i--;) {\n array[i] = obj[i];\n }\n\n return array;\n}\nfunction classArray(node) {\n if (node.classList) {\n return toArray(node.classList);\n } else {\n return (node.getAttribute('class') || '').split(' ').filter(function (i) {\n return i;\n });\n }\n}\nfunction getIconName(familyPrefix, cls) {\n var parts = cls.split('-');\n var prefix = parts[0];\n var iconName = parts.slice(1).join('-');\n\n if (prefix === familyPrefix && iconName !== '' && !isReserved(iconName)) {\n return iconName;\n } else {\n return null;\n }\n}\nfunction htmlEscape(str) {\n return \"\".concat(str).replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\nfunction joinAttributes(attributes) {\n return Object.keys(attributes || {}).reduce(function (acc, attributeName) {\n return acc + \"\".concat(attributeName, \"=\\\"\").concat(htmlEscape(attributes[attributeName]), \"\\\" \");\n }, '').trim();\n}\nfunction joinStyles(styles) {\n return Object.keys(styles || {}).reduce(function (acc, styleName) {\n return acc + \"\".concat(styleName, \": \").concat(styles[styleName], \";\");\n }, '');\n}\nfunction transformIsMeaningful(transform) {\n return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;\n}\nfunction transformForSvg(_ref) {\n var transform = _ref.transform,\n containerWidth = _ref.containerWidth,\n iconWidth = _ref.iconWidth;\n var outer = {\n transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n };\n var innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n var innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n var innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n var inner = {\n transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n };\n var path = {\n transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n };\n return {\n outer: outer,\n inner: inner,\n path: path\n };\n}\nfunction transformForCss(_ref2) {\n var transform = _ref2.transform,\n _ref2$width = _ref2.width,\n width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width,\n _ref2$height = _ref2.height,\n height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height,\n _ref2$startCentered = _ref2.startCentered,\n startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;\n var val = '';\n\n if (startCentered && IS_IE) {\n val += \"translate(\".concat(transform.x / d - width / 2, \"em, \").concat(transform.y / d - height / 2, \"em) \");\n } else if (startCentered) {\n val += \"translate(calc(-50% + \".concat(transform.x / d, \"em), calc(-50% + \").concat(transform.y / d, \"em)) \");\n } else {\n val += \"translate(\".concat(transform.x / d, \"em, \").concat(transform.y / d, \"em) \");\n }\n\n val += \"scale(\".concat(transform.size / d * (transform.flipX ? -1 : 1), \", \").concat(transform.size / d * (transform.flipY ? -1 : 1), \") \");\n val += \"rotate(\".concat(transform.rotate, \"deg) \");\n return val;\n}\n\nvar ALL_SPACE = {\n x: 0,\n y: 0,\n width: '100%',\n height: '100%'\n};\n\nfunction fillBlack(abstract) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (abstract.attributes && (abstract.attributes.fill || force)) {\n abstract.attributes.fill = 'black';\n }\n\n return abstract;\n}\n\nfunction deGroup(abstract) {\n if (abstract.tag === 'g') {\n return abstract.children;\n } else {\n return [abstract];\n }\n}\n\nfunction makeIconMasking (_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n mask = _ref.mask,\n transform = _ref.transform;\n var mainWidth = main.width,\n mainPath = main.icon;\n var maskWidth = mask.width,\n maskPath = mask.icon;\n var trans = transformForSvg({\n transform: transform,\n containerWidth: maskWidth,\n iconWidth: mainWidth\n });\n var maskRect = {\n tag: 'rect',\n attributes: _objectSpread({}, ALL_SPACE, {\n fill: 'white'\n })\n };\n var maskInnerGroupChildrenMixin = mainPath.children ? {\n children: mainPath.children.map(fillBlack)\n } : {};\n var maskInnerGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [fillBlack(_objectSpread({\n tag: mainPath.tag,\n attributes: _objectSpread({}, mainPath.attributes, trans.path)\n }, maskInnerGroupChildrenMixin))]\n };\n var maskOuterGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [maskInnerGroup]\n };\n var maskId = \"mask-\".concat(nextUniqueId());\n var clipId = \"clip-\".concat(nextUniqueId());\n var maskTag = {\n tag: 'mask',\n attributes: _objectSpread({}, ALL_SPACE, {\n id: maskId,\n maskUnits: 'userSpaceOnUse',\n maskContentUnits: 'userSpaceOnUse'\n }),\n children: [maskRect, maskOuterGroup]\n };\n var defs = {\n tag: 'defs',\n children: [{\n tag: 'clipPath',\n attributes: {\n id: clipId\n },\n children: deGroup(maskPath)\n }, maskTag]\n };\n children.push(defs, {\n tag: 'rect',\n attributes: _objectSpread({\n fill: 'currentColor',\n 'clip-path': \"url(#\".concat(clipId, \")\"),\n mask: \"url(#\".concat(maskId, \")\")\n }, ALL_SPACE)\n });\n return {\n children: children,\n attributes: attributes\n };\n}\n\nfunction makeIconStandard (_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n transform = _ref.transform,\n styles = _ref.styles;\n var styleString = joinStyles(styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n if (transformIsMeaningful(transform)) {\n var trans = transformForSvg({\n transform: transform,\n containerWidth: main.width,\n iconWidth: main.width\n });\n children.push({\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [{\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [{\n tag: main.icon.tag,\n children: main.icon.children,\n attributes: _objectSpread({}, main.icon.attributes, trans.path)\n }]\n }]\n });\n } else {\n children.push(main.icon);\n }\n\n return {\n children: children,\n attributes: attributes\n };\n}\n\nfunction asIcon (_ref) {\n var children = _ref.children,\n main = _ref.main,\n mask = _ref.mask,\n attributes = _ref.attributes,\n styles = _ref.styles,\n transform = _ref.transform;\n\n if (transformIsMeaningful(transform) && main.found && !mask.found) {\n var width = main.width,\n height = main.height;\n var offset = {\n x: width / height / 2,\n y: 0.5\n };\n attributes['style'] = joinStyles(_objectSpread({}, styles, {\n 'transform-origin': \"\".concat(offset.x + transform.x / 16, \"em \").concat(offset.y + transform.y / 16, \"em\")\n }));\n }\n\n return [{\n tag: 'svg',\n attributes: attributes,\n children: children\n }];\n}\n\nfunction asSymbol (_ref) {\n var prefix = _ref.prefix,\n iconName = _ref.iconName,\n children = _ref.children,\n attributes = _ref.attributes,\n symbol = _ref.symbol;\n var id = symbol === true ? \"\".concat(prefix, \"-\").concat(config.familyPrefix, \"-\").concat(iconName) : symbol;\n return [{\n tag: 'svg',\n attributes: {\n style: 'display: none;'\n },\n children: [{\n tag: 'symbol',\n attributes: _objectSpread({}, attributes, {\n id: id\n }),\n children: children\n }]\n }];\n}\n\nfunction makeInlineSvgAbstract(params) {\n var _params$icons = params.icons,\n main = _params$icons.main,\n mask = _params$icons.mask,\n prefix = params.prefix,\n iconName = params.iconName,\n transform = params.transform,\n symbol = params.symbol,\n title = params.title,\n extra = params.extra,\n _params$watchable = params.watchable,\n watchable = _params$watchable === void 0 ? false : _params$watchable;\n\n var _ref = mask.found ? mask : main,\n width = _ref.width,\n height = _ref.height;\n\n var widthClass = \"fa-w-\".concat(Math.ceil(width / height * 16));\n var attrClass = [config.replacementClass, iconName ? \"\".concat(config.familyPrefix, \"-\").concat(iconName) : '', widthClass].filter(function (c) {\n return extra.classes.indexOf(c) === -1;\n }).concat(extra.classes).join(' ');\n var content = {\n children: [],\n attributes: _objectSpread({}, extra.attributes, {\n 'data-prefix': prefix,\n 'data-icon': iconName,\n 'class': attrClass,\n 'role': extra.attributes.role || 'img',\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'viewBox': \"0 0 \".concat(width, \" \").concat(height)\n })\n };\n\n if (watchable) {\n content.attributes[DATA_FA_I2SVG] = '';\n }\n\n if (title) content.children.push({\n tag: 'title',\n attributes: {\n id: content.attributes['aria-labelledby'] || \"title-\".concat(nextUniqueId())\n },\n children: [title]\n });\n\n var args = _objectSpread({}, content, {\n prefix: prefix,\n iconName: iconName,\n main: main,\n mask: mask,\n transform: transform,\n symbol: symbol,\n styles: extra.styles\n });\n\n var _ref2 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args),\n children = _ref2.children,\n attributes = _ref2.attributes;\n\n args.children = children;\n args.attributes = attributes;\n\n if (symbol) {\n return asSymbol(args);\n } else {\n return asIcon(args);\n }\n}\nfunction makeLayersTextAbstract(params) {\n var content = params.content,\n width = params.width,\n height = params.height,\n transform = params.transform,\n title = params.title,\n extra = params.extra,\n _params$watchable2 = params.watchable,\n watchable = _params$watchable2 === void 0 ? false : _params$watchable2;\n\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n\n if (watchable) {\n attributes[DATA_FA_I2SVG] = '';\n }\n\n var styles = _objectSpread({}, extra.styles);\n\n if (transformIsMeaningful(transform)) {\n styles['transform'] = transformForCss({\n transform: transform,\n startCentered: true,\n width: width,\n height: height\n });\n styles['-webkit-transform'] = styles['transform'];\n }\n\n var styleString = joinStyles(styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n\n return val;\n}\nfunction makeLayersCounterAbstract(params) {\n var content = params.content,\n title = params.title,\n extra = params.extra;\n\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n\n var styleString = joinStyles(extra.styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n\n return val;\n}\n\nvar noop$1 = function noop() {};\n\nvar p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {\n mark: noop$1,\n measure: noop$1\n};\nvar preamble = \"FA \\\"5.10.2\\\"\";\n\nvar begin = function begin(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" begins\"));\n return function () {\n return end(name);\n };\n};\n\nvar end = function end(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" ends\"));\n p.measure(\"\".concat(preamble, \" \").concat(name), \"\".concat(preamble, \" \").concat(name, \" begins\"), \"\".concat(preamble, \" \").concat(name, \" ends\"));\n};\n\nvar perf = {\n begin: begin,\n end: end\n};\n\n/**\n * Internal helper to bind a function known to have 4 arguments\n * to a given context.\n */\n\nvar bindInternal4 = function bindInternal4(func, thisContext) {\n return function (a, b, c, d) {\n return func.call(thisContext, a, b, c, d);\n };\n};\n\n/**\n * # Reduce\n *\n * A fast object `.reduce()` implementation.\n *\n * @param {Object} subject The object to reduce over.\n * @param {Function} fn The reducer function.\n * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].\n * @param {Object} thisContext The context for the reducer.\n * @return {mixed} The final result.\n */\n\n\nvar reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {\n var keys = Object.keys(subject),\n length = keys.length,\n iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,\n i,\n key,\n result;\n\n if (initialValue === undefined) {\n i = 1;\n result = subject[keys[0]];\n } else {\n i = 0;\n result = initialValue;\n }\n\n for (; i < length; i++) {\n key = keys[i];\n result = iterator(result, subject[key], key, subject);\n }\n\n return result;\n};\n\nfunction toHex(unicode) {\n var result = '';\n\n for (var i = 0; i < unicode.length; i++) {\n var hex = unicode.charCodeAt(i).toString(16);\n result += ('000' + hex).slice(-4);\n }\n\n return result;\n}\n\nfunction defineIcons(prefix, icons) {\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _params$skipHooks = params.skipHooks,\n skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;\n var normalized = Object.keys(icons).reduce(function (acc, iconName) {\n var icon = icons[iconName];\n var expanded = !!icon.icon;\n\n if (expanded) {\n acc[icon.iconName] = icon.icon;\n } else {\n acc[iconName] = icon;\n }\n\n return acc;\n }, {});\n\n if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {\n namespace.hooks.addPack(prefix, normalized);\n } else {\n namespace.styles[prefix] = _objectSpread({}, namespace.styles[prefix] || {}, normalized);\n }\n /**\n * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction\n * of new styles we needed to differentiate between them. Prefix `fa` is now an alias\n * for `fas` so we'll easy the upgrade process for our users by automatically defining\n * this as well.\n */\n\n\n if (prefix === 'fas') {\n defineIcons('fa', icons);\n }\n}\n\nvar styles = namespace.styles,\n shims = namespace.shims;\nvar _byUnicode = {};\nvar _byLigature = {};\nvar _byOldName = {};\nvar build = function build() {\n var lookup = function lookup(reducer) {\n return reduce(styles, function (o, style, prefix) {\n o[prefix] = reduce(style, reducer, {});\n return o;\n }, {});\n };\n\n _byUnicode = lookup(function (acc, icon, iconName) {\n if (icon[3]) {\n acc[icon[3]] = iconName;\n }\n\n return acc;\n });\n _byLigature = lookup(function (acc, icon, iconName) {\n var ligatures = icon[2];\n acc[iconName] = iconName;\n ligatures.forEach(function (ligature) {\n acc[ligature] = iconName;\n });\n return acc;\n });\n var hasRegular = 'far' in styles;\n _byOldName = reduce(shims, function (acc, shim) {\n var oldName = shim[0];\n var prefix = shim[1];\n var iconName = shim[2];\n\n if (prefix === 'far' && !hasRegular) {\n prefix = 'fas';\n }\n\n acc[oldName] = {\n prefix: prefix,\n iconName: iconName\n };\n return acc;\n }, {});\n};\nbuild();\nfunction byUnicode(prefix, unicode) {\n return (_byUnicode[prefix] || {})[unicode];\n}\nfunction byLigature(prefix, ligature) {\n return (_byLigature[prefix] || {})[ligature];\n}\nfunction byOldName(name) {\n return _byOldName[name] || {\n prefix: null,\n iconName: null\n };\n}\n\nvar styles$1 = namespace.styles;\nvar emptyCanonicalIcon = function emptyCanonicalIcon() {\n return {\n prefix: null,\n iconName: null,\n rest: []\n };\n};\nfunction getCanonicalIcon(values) {\n return values.reduce(function (acc, cls) {\n var iconName = getIconName(config.familyPrefix, cls);\n\n if (styles$1[cls]) {\n acc.prefix = cls;\n } else if (config.autoFetchSvg && ['fas', 'far', 'fal', 'fad', 'fab', 'fa'].indexOf(cls) > -1) {\n acc.prefix = cls;\n } else if (iconName) {\n var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};\n acc.iconName = shim.iconName || iconName;\n acc.prefix = shim.prefix || acc.prefix;\n } else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {\n acc.rest.push(cls);\n }\n\n return acc;\n }, emptyCanonicalIcon());\n}\nfunction iconFromMapping(mapping, prefix, iconName) {\n if (mapping && mapping[prefix] && mapping[prefix][iconName]) {\n return {\n prefix: prefix,\n iconName: iconName,\n icon: mapping[prefix][iconName]\n };\n }\n}\n\nfunction toHtml(abstractNodes) {\n var tag = abstractNodes.tag,\n _abstractNodes$attrib = abstractNodes.attributes,\n attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib,\n _abstractNodes$childr = abstractNodes.children,\n children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;\n\n if (typeof abstractNodes === 'string') {\n return htmlEscape(abstractNodes);\n } else {\n return \"<\".concat(tag, \" \").concat(joinAttributes(attributes), \">\").concat(children.map(toHtml).join(''), \"</\").concat(tag, \">\");\n }\n}\n\nvar noop$2 = function noop() {};\n\nfunction isWatched(node) {\n var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;\n return typeof i2svg === 'string';\n}\n\nfunction getMutator() {\n if (config.autoReplaceSvg === true) {\n return mutators.replace;\n }\n\n var mutator = mutators[config.autoReplaceSvg];\n return mutator || mutators.replace;\n}\n\nvar mutators = {\n replace: function replace(mutation) {\n var node = mutation[0];\n var abstract = mutation[1];\n var newOuterHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n\n if (node.parentNode && node.outerHTML) {\n node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? \"\x3c!-- \".concat(node.outerHTML, \" --\x3e\") : '');\n } else if (node.parentNode) {\n var newNode = document.createElement('span');\n node.parentNode.replaceChild(newNode, node);\n newNode.outerHTML = newOuterHTML;\n }\n },\n nest: function nest(mutation) {\n var node = mutation[0];\n var abstract = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it.\n // Short-circuit to the standard replacement\n\n if (~classArray(node).indexOf(config.replacementClass)) {\n return mutators.replace(mutation);\n }\n\n var forSvg = new RegExp(\"\".concat(config.familyPrefix, \"-.*\"));\n delete abstract[0].attributes.style;\n var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {\n if (cls === config.replacementClass || cls.match(forSvg)) {\n acc.toSvg.push(cls);\n } else {\n acc.toNode.push(cls);\n }\n\n return acc;\n }, {\n toNode: [],\n toSvg: []\n });\n abstract[0].attributes.class = splitClasses.toSvg.join(' ');\n var newInnerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.setAttribute('class', splitClasses.toNode.join(' '));\n node.setAttribute(DATA_FA_I2SVG, '');\n node.innerHTML = newInnerHTML;\n }\n};\n\nfunction performOperationSync(op) {\n op();\n}\n\nfunction perform(mutations, callback) {\n var callbackFunction = typeof callback === 'function' ? callback : noop$2;\n\n if (mutations.length === 0) {\n callbackFunction();\n } else {\n var frame = performOperationSync;\n\n if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {\n frame = WINDOW.requestAnimationFrame || performOperationSync;\n }\n\n frame(function () {\n var mutator = getMutator();\n var mark = perf.begin('mutate');\n mutations.map(mutator);\n mark();\n callbackFunction();\n });\n }\n}\nvar disabled = false;\nfunction disableObservation() {\n disabled = true;\n}\nfunction enableObservation() {\n disabled = false;\n}\nvar mo = null;\nfunction observe(options) {\n if (!MUTATION_OBSERVER) {\n return;\n }\n\n if (!config.observeMutations) {\n return;\n }\n\n var treeCallback = options.treeCallback,\n nodeCallback = options.nodeCallback,\n pseudoElementsCallback = options.pseudoElementsCallback,\n _options$observeMutat = options.observeMutationsRoot,\n observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;\n mo = new MUTATION_OBSERVER(function (objects) {\n if (disabled) return;\n toArray(objects).forEach(function (mutationRecord) {\n if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {\n if (config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target);\n }\n\n treeCallback(mutationRecord.target);\n }\n\n if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target.parentNode);\n }\n\n if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {\n if (mutationRecord.attributeName === 'class') {\n var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),\n prefix = _getCanonicalIcon.prefix,\n iconName = _getCanonicalIcon.iconName;\n\n if (prefix) mutationRecord.target.setAttribute('data-prefix', prefix);\n if (iconName) mutationRecord.target.setAttribute('data-icon', iconName);\n } else {\n nodeCallback(mutationRecord.target);\n }\n }\n });\n });\n if (!IS_DOM) return;\n mo.observe(observeMutationsRoot, {\n childList: true,\n attributes: true,\n characterData: true,\n subtree: true\n });\n}\nfunction disconnect() {\n if (!mo) return;\n mo.disconnect();\n}\n\nfunction styleParser (node) {\n var style = node.getAttribute('style');\n var val = [];\n\n if (style) {\n val = style.split(';').reduce(function (acc, style) {\n var styles = style.split(':');\n var prop = styles[0];\n var value = styles.slice(1);\n\n if (prop && value.length > 0) {\n acc[prop] = value.join(':').trim();\n }\n\n return acc;\n }, {});\n }\n\n return val;\n}\n\nfunction classParser (node) {\n var existingPrefix = node.getAttribute('data-prefix');\n var existingIconName = node.getAttribute('data-icon');\n var innerText = node.innerText !== undefined ? node.innerText.trim() : '';\n var val = getCanonicalIcon(classArray(node));\n\n if (existingPrefix && existingIconName) {\n val.prefix = existingPrefix;\n val.iconName = existingIconName;\n }\n\n if (val.prefix && innerText.length > 1) {\n val.iconName = byLigature(val.prefix, node.innerText);\n } else if (val.prefix && innerText.length === 1) {\n val.iconName = byUnicode(val.prefix, toHex(node.innerText));\n }\n\n return val;\n}\n\nvar parseTransformString = function parseTransformString(transformString) {\n var transform = {\n size: 16,\n x: 0,\n y: 0,\n flipX: false,\n flipY: false,\n rotate: 0\n };\n\n if (!transformString) {\n return transform;\n } else {\n return transformString.toLowerCase().split(' ').reduce(function (acc, n) {\n var parts = n.toLowerCase().split('-');\n var first = parts[0];\n var rest = parts.slice(1).join('-');\n\n if (first && rest === 'h') {\n acc.flipX = true;\n return acc;\n }\n\n if (first && rest === 'v') {\n acc.flipY = true;\n return acc;\n }\n\n rest = parseFloat(rest);\n\n if (isNaN(rest)) {\n return acc;\n }\n\n switch (first) {\n case 'grow':\n acc.size = acc.size + rest;\n break;\n\n case 'shrink':\n acc.size = acc.size - rest;\n break;\n\n case 'left':\n acc.x = acc.x - rest;\n break;\n\n case 'right':\n acc.x = acc.x + rest;\n break;\n\n case 'up':\n acc.y = acc.y - rest;\n break;\n\n case 'down':\n acc.y = acc.y + rest;\n break;\n\n case 'rotate':\n acc.rotate = acc.rotate + rest;\n break;\n }\n\n return acc;\n }, transform);\n }\n};\nfunction transformParser (node) {\n return parseTransformString(node.getAttribute('data-fa-transform'));\n}\n\nfunction symbolParser (node) {\n var symbol = node.getAttribute('data-fa-symbol');\n return symbol === null ? false : symbol === '' ? true : symbol;\n}\n\nfunction attributesParser (node) {\n var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {\n if (acc.name !== 'class' && acc.name !== 'style') {\n acc[attr.name] = attr.value;\n }\n\n return acc;\n }, {});\n var title = node.getAttribute('title');\n\n if (config.autoA11y) {\n if (title) {\n extraAttributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(nextUniqueId());\n } else {\n extraAttributes['aria-hidden'] = 'true';\n extraAttributes['focusable'] = 'false';\n }\n }\n\n return extraAttributes;\n}\n\nfunction maskParser (node) {\n var mask = node.getAttribute('data-fa-mask');\n\n if (!mask) {\n return emptyCanonicalIcon();\n } else {\n return getCanonicalIcon(mask.split(' ').map(function (i) {\n return i.trim();\n }));\n }\n}\n\nfunction blankMeta() {\n return {\n iconName: null,\n title: null,\n prefix: null,\n transform: meaninglessTransform,\n symbol: false,\n mask: null,\n extra: {\n classes: [],\n styles: {},\n attributes: {}\n }\n };\n}\nfunction parseMeta(node) {\n var _classParser = classParser(node),\n iconName = _classParser.iconName,\n prefix = _classParser.prefix,\n extraClasses = _classParser.rest;\n\n var extraStyles = styleParser(node);\n var transform = transformParser(node);\n var symbol = symbolParser(node);\n var extraAttributes = attributesParser(node);\n var mask = maskParser(node);\n return {\n iconName: iconName,\n title: node.getAttribute('title'),\n prefix: prefix,\n transform: transform,\n symbol: symbol,\n mask: mask,\n extra: {\n classes: extraClasses,\n styles: extraStyles,\n attributes: extraAttributes\n }\n };\n}\n\nfunction MissingIcon(error) {\n this.name = 'MissingIcon';\n this.message = error || 'Icon unavailable';\n this.stack = new Error().stack;\n}\nMissingIcon.prototype = Object.create(Error.prototype);\nMissingIcon.prototype.constructor = MissingIcon;\n\nvar FILL = {\n fill: 'currentColor'\n};\nvar ANIMATION_BASE = {\n attributeType: 'XML',\n repeatCount: 'indefinite',\n dur: '2s'\n};\nvar RING = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'\n })\n};\n\nvar OPACITY_ANIMATE = _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'opacity'\n});\n\nvar DOT = {\n tag: 'circle',\n attributes: _objectSpread({}, FILL, {\n cx: '256',\n cy: '364',\n r: '28'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'r',\n values: '28;14;28;28;14;28;'\n })\n }, {\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;1;1;0;1;'\n })\n }]\n};\nvar QUESTION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '1',\n d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;0;0;0;1;'\n })\n }]\n};\nvar EXCLAMATION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '0',\n d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '0;0;1;1;0;0;'\n })\n }]\n};\nvar missing = {\n tag: 'g',\n children: [RING, DOT, QUESTION, EXCLAMATION]\n};\n\nvar styles$2 = namespace.styles;\nfunction asFoundIcon(icon) {\n var width = icon[0];\n var height = icon[1];\n\n var _icon$slice = icon.slice(4),\n _icon$slice2 = _slicedToArray(_icon$slice, 1),\n vectorData = _icon$slice2[0];\n\n var element = null;\n\n if (Array.isArray(vectorData)) {\n element = {\n tag: 'g',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.GROUP)\n },\n children: [{\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.SECONDARY),\n fill: 'currentColor',\n d: vectorData[0]\n }\n }, {\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.PRIMARY),\n fill: 'currentColor',\n d: vectorData[1]\n }\n }]\n };\n } else {\n element = {\n tag: 'path',\n attributes: {\n fill: 'currentColor',\n d: vectorData\n }\n };\n }\n\n return {\n found: true,\n width: width,\n height: height,\n icon: element\n };\n}\nfunction findIcon(iconName, prefix) {\n return new picked(function (resolve, reject) {\n var val = {\n found: false,\n width: 512,\n height: 512,\n icon: missing\n };\n\n if (iconName && prefix && styles$2[prefix] && styles$2[prefix][iconName]) {\n var icon = styles$2[prefix][iconName];\n return resolve(asFoundIcon(icon));\n }\n\n if (iconName && prefix && !config.showMissingIcons) {\n reject(new MissingIcon(\"Icon is missing for prefix \".concat(prefix, \" with icon name \").concat(iconName)));\n } else {\n resolve(val);\n }\n });\n}\n\nvar styles$3 = namespace.styles;\n\nfunction generateSvgReplacementMutation(node, nodeMeta) {\n var iconName = nodeMeta.iconName,\n title = nodeMeta.title,\n prefix = nodeMeta.prefix,\n transform = nodeMeta.transform,\n symbol = nodeMeta.symbol,\n mask = nodeMeta.mask,\n extra = nodeMeta.extra;\n return new picked(function (resolve, reject) {\n picked.all([findIcon(iconName, prefix), findIcon(mask.iconName, mask.prefix)]).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n main = _ref2[0],\n mask = _ref2[1];\n\n resolve([node, makeInlineSvgAbstract({\n icons: {\n main: main,\n mask: mask\n },\n prefix: prefix,\n iconName: iconName,\n transform: transform,\n symbol: symbol,\n mask: mask,\n title: title,\n extra: extra,\n watchable: true\n })]);\n });\n });\n}\n\nfunction generateLayersText(node, nodeMeta) {\n var title = nodeMeta.title,\n transform = nodeMeta.transform,\n extra = nodeMeta.extra;\n var width = null;\n var height = null;\n\n if (IS_IE) {\n var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);\n var boundingClientRect = node.getBoundingClientRect();\n width = boundingClientRect.width / computedFontSize;\n height = boundingClientRect.height / computedFontSize;\n }\n\n if (config.autoA11y && !title) {\n extra.attributes['aria-hidden'] = 'true';\n }\n\n return picked.resolve([node, makeLayersTextAbstract({\n content: node.innerHTML,\n width: width,\n height: height,\n transform: transform,\n title: title,\n extra: extra,\n watchable: true\n })]);\n}\n\nfunction generateMutation(node) {\n var nodeMeta = parseMeta(node);\n\n if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {\n return generateLayersText(node, nodeMeta);\n } else {\n return generateSvgReplacementMutation(node, nodeMeta);\n }\n}\n\nfunction onTree(root) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n if (!IS_DOM) return;\n var htmlClassList = DOCUMENT.documentElement.classList;\n\n var hclAdd = function hclAdd(suffix) {\n return htmlClassList.add(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n\n var hclRemove = function hclRemove(suffix) {\n return htmlClassList.remove(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n\n var prefixes = config.autoFetchSvg ? Object.keys(PREFIX_TO_STYLE) : Object.keys(styles$3);\n var prefixesDomQuery = [\".\".concat(LAYERS_TEXT_CLASSNAME, \":not([\").concat(DATA_FA_I2SVG, \"])\")].concat(prefixes.map(function (p) {\n return \".\".concat(p, \":not([\").concat(DATA_FA_I2SVG, \"])\");\n })).join(', ');\n\n if (prefixesDomQuery.length === 0) {\n return;\n }\n\n var candidates = [];\n\n try {\n candidates = toArray(root.querySelectorAll(prefixesDomQuery));\n } catch (e) {// noop\n }\n\n if (candidates.length > 0) {\n hclAdd('pending');\n hclRemove('complete');\n } else {\n return;\n }\n\n var mark = perf.begin('onTree');\n var mutations = candidates.reduce(function (acc, node) {\n try {\n var mutation = generateMutation(node);\n\n if (mutation) {\n acc.push(mutation);\n }\n } catch (e) {\n if (!PRODUCTION) {\n if (e instanceof MissingIcon) {\n console.error(e);\n }\n }\n }\n\n return acc;\n }, []);\n return new picked(function (resolve, reject) {\n picked.all(mutations).then(function (resolvedMutations) {\n perform(resolvedMutations, function () {\n hclAdd('active');\n hclAdd('complete');\n hclRemove('pending');\n if (typeof callback === 'function') callback();\n mark();\n resolve();\n });\n }).catch(function () {\n mark();\n reject();\n });\n });\n}\nfunction onNode(node) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n generateMutation(node).then(function (mutation) {\n if (mutation) {\n perform([mutation], callback);\n }\n });\n}\n\nfunction replaceForPosition(node, position) {\n var pendingAttribute = \"\".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));\n return new picked(function (resolve, reject) {\n if (node.getAttribute(pendingAttribute) !== null) {\n // This node is already being processed\n return resolve();\n }\n\n var children = toArray(node.children);\n var alreadyProcessedPseudoElement = children.filter(function (c) {\n return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;\n })[0];\n var styles = WINDOW.getComputedStyle(node, position);\n var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);\n var fontWeight = styles.getPropertyValue('font-weight');\n\n if (alreadyProcessedPseudoElement && !fontFamily) {\n // If we've already processed it but the current computed style does not result in a font-family,\n // that probably means that a class name that was previously present to make the icon has been\n // removed. So we now should delete the icon.\n node.removeChild(alreadyProcessedPseudoElement);\n return resolve();\n } else if (fontFamily) {\n var content = styles.getPropertyValue('content');\n var prefix = ~['Solid', 'Regular', 'Light', 'Duotone', 'Brands'].indexOf(fontFamily[1]) ? STYLE_TO_PREFIX[fontFamily[1].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];\n var hexValue = toHex(content.length === 3 ? content.substr(1, 1) : content);\n var iconName = byUnicode(prefix, hexValue);\n var iconIdentifier = iconName; // Only convert the pseudo element in this :before/:after position into an icon if we haven't\n // already done so with the same prefix and iconName\n\n if (iconName && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {\n node.setAttribute(pendingAttribute, iconIdentifier);\n\n if (alreadyProcessedPseudoElement) {\n // Delete the old one, since we're replacing it with a new one\n node.removeChild(alreadyProcessedPseudoElement);\n }\n\n var meta = blankMeta();\n var extra = meta.extra;\n extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;\n findIcon(iconName, prefix).then(function (main) {\n var abstract = makeInlineSvgAbstract(_objectSpread({}, meta, {\n icons: {\n main: main,\n mask: emptyCanonicalIcon()\n },\n prefix: prefix,\n iconName: iconIdentifier,\n extra: extra,\n watchable: true\n }));\n var element = DOCUMENT.createElement('svg');\n\n if (position === ':before') {\n node.insertBefore(element, node.firstChild);\n } else {\n node.appendChild(element);\n }\n\n element.outerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.removeAttribute(pendingAttribute);\n resolve();\n }).catch(reject);\n } else {\n resolve();\n }\n } else {\n resolve();\n }\n });\n}\n\nfunction replace(node) {\n return picked.all([replaceForPosition(node, ':before'), replaceForPosition(node, ':after')]);\n}\n\nfunction processable(node) {\n return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');\n}\n\nfunction searchPseudoElements (root) {\n if (!IS_DOM) return;\n return new picked(function (resolve, reject) {\n var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);\n var end = perf.begin('searchPseudoElements');\n disableObservation();\n picked.all(operations).then(function () {\n end();\n enableObservation();\n resolve();\n }).catch(function () {\n end();\n enableObservation();\n reject();\n });\n });\n}\n\nvar baseStyles = \"svg:not(:root).svg-inline--fa {\\n overflow: visible;\\n}\\n\\n.svg-inline--fa {\\n display: inline-block;\\n font-size: inherit;\\n height: 1em;\\n overflow: visible;\\n vertical-align: -0.125em;\\n}\\n.svg-inline--fa.fa-lg {\\n vertical-align: -0.225em;\\n}\\n.svg-inline--fa.fa-w-1 {\\n width: 0.0625em;\\n}\\n.svg-inline--fa.fa-w-2 {\\n width: 0.125em;\\n}\\n.svg-inline--fa.fa-w-3 {\\n width: 0.1875em;\\n}\\n.svg-inline--fa.fa-w-4 {\\n width: 0.25em;\\n}\\n.svg-inline--fa.fa-w-5 {\\n width: 0.3125em;\\n}\\n.svg-inline--fa.fa-w-6 {\\n width: 0.375em;\\n}\\n.svg-inline--fa.fa-w-7 {\\n width: 0.4375em;\\n}\\n.svg-inline--fa.fa-w-8 {\\n width: 0.5em;\\n}\\n.svg-inline--fa.fa-w-9 {\\n width: 0.5625em;\\n}\\n.svg-inline--fa.fa-w-10 {\\n width: 0.625em;\\n}\\n.svg-inline--fa.fa-w-11 {\\n width: 0.6875em;\\n}\\n.svg-inline--fa.fa-w-12 {\\n width: 0.75em;\\n}\\n.svg-inline--fa.fa-w-13 {\\n width: 0.8125em;\\n}\\n.svg-inline--fa.fa-w-14 {\\n width: 0.875em;\\n}\\n.svg-inline--fa.fa-w-15 {\\n width: 0.9375em;\\n}\\n.svg-inline--fa.fa-w-16 {\\n width: 1em;\\n}\\n.svg-inline--fa.fa-w-17 {\\n width: 1.0625em;\\n}\\n.svg-inline--fa.fa-w-18 {\\n width: 1.125em;\\n}\\n.svg-inline--fa.fa-w-19 {\\n width: 1.1875em;\\n}\\n.svg-inline--fa.fa-w-20 {\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-pull-left {\\n margin-right: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-pull-right {\\n margin-left: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-border {\\n height: 1.5em;\\n}\\n.svg-inline--fa.fa-li {\\n width: 2em;\\n}\\n.svg-inline--fa.fa-fw {\\n width: 1.25em;\\n}\\n\\n.fa-layers svg.svg-inline--fa {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.fa-layers {\\n display: inline-block;\\n height: 1em;\\n position: relative;\\n text-align: center;\\n vertical-align: -0.125em;\\n width: 1em;\\n}\\n.fa-layers svg.svg-inline--fa {\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter, .fa-layers-text {\\n display: inline-block;\\n position: absolute;\\n text-align: center;\\n}\\n\\n.fa-layers-text {\\n left: 50%;\\n top: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter {\\n background-color: #ff253a;\\n border-radius: 1em;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n color: #fff;\\n height: 1.5em;\\n line-height: 1;\\n max-width: 5em;\\n min-width: 1.5em;\\n overflow: hidden;\\n padding: 0.25em;\\n right: 0;\\n text-overflow: ellipsis;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-bottom-right {\\n bottom: 0;\\n right: 0;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom right;\\n transform-origin: bottom right;\\n}\\n\\n.fa-layers-bottom-left {\\n bottom: 0;\\n left: 0;\\n right: auto;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom left;\\n transform-origin: bottom left;\\n}\\n\\n.fa-layers-top-right {\\n right: 0;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-top-left {\\n left: 0;\\n right: auto;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top left;\\n transform-origin: top left;\\n}\\n\\n.fa-lg {\\n font-size: 1.3333333333em;\\n line-height: 0.75em;\\n vertical-align: -0.0667em;\\n}\\n\\n.fa-xs {\\n font-size: 0.75em;\\n}\\n\\n.fa-sm {\\n font-size: 0.875em;\\n}\\n\\n.fa-1x {\\n font-size: 1em;\\n}\\n\\n.fa-2x {\\n font-size: 2em;\\n}\\n\\n.fa-3x {\\n font-size: 3em;\\n}\\n\\n.fa-4x {\\n font-size: 4em;\\n}\\n\\n.fa-5x {\\n font-size: 5em;\\n}\\n\\n.fa-6x {\\n font-size: 6em;\\n}\\n\\n.fa-7x {\\n font-size: 7em;\\n}\\n\\n.fa-8x {\\n font-size: 8em;\\n}\\n\\n.fa-9x {\\n font-size: 9em;\\n}\\n\\n.fa-10x {\\n font-size: 10em;\\n}\\n\\n.fa-fw {\\n text-align: center;\\n width: 1.25em;\\n}\\n\\n.fa-ul {\\n list-style-type: none;\\n margin-left: 2.5em;\\n padding-left: 0;\\n}\\n.fa-ul > li {\\n position: relative;\\n}\\n\\n.fa-li {\\n left: -2em;\\n position: absolute;\\n text-align: center;\\n width: 2em;\\n line-height: inherit;\\n}\\n\\n.fa-border {\\n border: solid 0.08em #eee;\\n border-radius: 0.1em;\\n padding: 0.2em 0.25em 0.15em;\\n}\\n\\n.fa-pull-left {\\n float: left;\\n}\\n\\n.fa-pull-right {\\n float: right;\\n}\\n\\n.fa.fa-pull-left,\\n.fas.fa-pull-left,\\n.far.fa-pull-left,\\n.fal.fa-pull-left,\\n.fab.fa-pull-left {\\n margin-right: 0.3em;\\n}\\n.fa.fa-pull-right,\\n.fas.fa-pull-right,\\n.far.fa-pull-right,\\n.fal.fa-pull-right,\\n.fab.fa-pull-right {\\n margin-left: 0.3em;\\n}\\n\\n.fa-spin {\\n -webkit-animation: fa-spin 2s infinite linear;\\n animation: fa-spin 2s infinite linear;\\n}\\n\\n.fa-pulse {\\n -webkit-animation: fa-spin 1s infinite steps(8);\\n animation: fa-spin 1s infinite steps(8);\\n}\\n\\n@-webkit-keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n.fa-rotate-90 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\\\";\\n -webkit-transform: rotate(90deg);\\n transform: rotate(90deg);\\n}\\n\\n.fa-rotate-180 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\\\";\\n -webkit-transform: rotate(180deg);\\n transform: rotate(180deg);\\n}\\n\\n.fa-rotate-270 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\\\";\\n -webkit-transform: rotate(270deg);\\n transform: rotate(270deg);\\n}\\n\\n.fa-flip-horizontal {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\\\";\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n}\\n\\n.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(1, -1);\\n transform: scale(1, -1);\\n}\\n\\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(-1, -1);\\n transform: scale(-1, -1);\\n}\\n\\n:root .fa-rotate-90,\\n:root .fa-rotate-180,\\n:root .fa-rotate-270,\\n:root .fa-flip-horizontal,\\n:root .fa-flip-vertical,\\n:root .fa-flip-both {\\n -webkit-filter: none;\\n filter: none;\\n}\\n\\n.fa-stack {\\n display: inline-block;\\n height: 2em;\\n position: relative;\\n width: 2.5em;\\n}\\n\\n.fa-stack-1x,\\n.fa-stack-2x {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.svg-inline--fa.fa-stack-1x {\\n height: 1em;\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-stack-2x {\\n height: 2em;\\n width: 2.5em;\\n}\\n\\n.fa-inverse {\\n color: #fff;\\n}\\n\\n.sr-only {\\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\\n.sr-only-focusable:active, .sr-only-focusable:focus {\\n clip: auto;\\n height: auto;\\n margin: 0;\\n overflow: visible;\\n position: static;\\n width: auto;\\n}\\n\\n.svg-inline--fa .fa-primary {\\n fill: var(--fa-primary-color, currentColor);\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa .fa-secondary {\\n fill: var(--fa-secondary-color, currentColor);\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-primary {\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa mask .fa-primary,\\n.svg-inline--fa mask .fa-secondary {\\n fill: black;\\n}\\n\\n.fad.fa-inverse {\\n color: #fff;\\n}\";\n\nfunction css () {\n var dfp = DEFAULT_FAMILY_PREFIX;\n var drc = DEFAULT_REPLACEMENT_CLASS;\n var fp = config.familyPrefix;\n var rc = config.replacementClass;\n var s = baseStyles;\n\n if (fp !== dfp || rc !== drc) {\n var dPatt = new RegExp(\"\\\\.\".concat(dfp, \"\\\\-\"), 'g');\n var customPropPatt = new RegExp(\"\\\\--\".concat(dfp, \"\\\\-\"), 'g');\n var rPatt = new RegExp(\"\\\\.\".concat(drc), 'g');\n s = s.replace(dPatt, \".\".concat(fp, \"-\")).replace(customPropPatt, \"--\".concat(fp, \"-\")).replace(rPatt, \".\".concat(rc));\n }\n\n return s;\n}\n\nvar Library =\n/*#__PURE__*/\nfunction () {\n function Library() {\n _classCallCheck(this, Library);\n\n this.definitions = {};\n }\n\n _createClass(Library, [{\n key: \"add\",\n value: function add() {\n var _this = this;\n\n for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {\n definitions[_key] = arguments[_key];\n }\n\n var additions = definitions.reduce(this._pullDefinitions, {});\n Object.keys(additions).forEach(function (key) {\n _this.definitions[key] = _objectSpread({}, _this.definitions[key] || {}, additions[key]);\n defineIcons(key, additions[key]);\n build();\n });\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.definitions = {};\n }\n }, {\n key: \"_pullDefinitions\",\n value: function _pullDefinitions(additions, definition) {\n var normalized = definition.prefix && definition.iconName && definition.icon ? {\n 0: definition\n } : definition;\n Object.keys(normalized).map(function (key) {\n var _normalized$key = normalized[key],\n prefix = _normalized$key.prefix,\n iconName = _normalized$key.iconName,\n icon = _normalized$key.icon;\n if (!additions[prefix]) additions[prefix] = {};\n additions[prefix][iconName] = icon;\n });\n return additions;\n }\n }]);\n\n return Library;\n}();\n\nfunction ensureCss() {\n if (config.autoAddCss && !_cssInserted) {\n insertCss(css());\n\n _cssInserted = true;\n }\n}\n\nfunction apiObject(val, abstractCreator) {\n Object.defineProperty(val, 'abstract', {\n get: abstractCreator\n });\n Object.defineProperty(val, 'html', {\n get: function get() {\n return val.abstract.map(function (a) {\n return toHtml(a);\n });\n }\n });\n Object.defineProperty(val, 'node', {\n get: function get() {\n if (!IS_DOM) return;\n var container = DOCUMENT.createElement('div');\n container.innerHTML = val.html;\n return container.children;\n }\n });\n return val;\n}\n\nfunction findIconDefinition(iconLookup) {\n var _iconLookup$prefix = iconLookup.prefix,\n prefix = _iconLookup$prefix === void 0 ? 'fa' : _iconLookup$prefix,\n iconName = iconLookup.iconName;\n if (!iconName) return;\n return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);\n}\n\nfunction resolveIcons(next) {\n return function (maybeIconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});\n var mask = params.mask;\n\n if (mask) {\n mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});\n }\n\n return next(iconDefinition, _objectSpread({}, params, {\n mask: mask\n }));\n };\n}\n\nvar library = new Library();\nvar noAuto = function noAuto() {\n config.autoReplaceSvg = false;\n config.observeMutations = false;\n disconnect();\n};\nvar _cssInserted = false;\nvar dom = {\n i2svg: function i2svg() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (IS_DOM) {\n ensureCss();\n var _params$node = params.node,\n node = _params$node === void 0 ? DOCUMENT : _params$node,\n _params$callback = params.callback,\n callback = _params$callback === void 0 ? function () {} : _params$callback;\n\n if (config.searchPseudoElements) {\n searchPseudoElements(node);\n }\n\n return onTree(node, callback);\n } else {\n return picked.reject('Operation requires a DOM of some kind.');\n }\n },\n css: css,\n insertCss: function insertCss$$1() {\n if (!_cssInserted) {\n insertCss(css());\n\n _cssInserted = true;\n }\n },\n watch: function watch() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var autoReplaceSvgRoot = params.autoReplaceSvgRoot,\n observeMutationsRoot = params.observeMutationsRoot;\n\n if (config.autoReplaceSvg === false) {\n config.autoReplaceSvg = true;\n }\n\n config.observeMutations = true;\n domready(function () {\n autoReplace({\n autoReplaceSvgRoot: autoReplaceSvgRoot\n });\n observe({\n treeCallback: onTree,\n nodeCallback: onNode,\n pseudoElementsCallback: searchPseudoElements,\n observeMutationsRoot: observeMutationsRoot\n });\n });\n }\n};\nvar parse = {\n transform: function transform(transformString) {\n return parseTransformString(transformString);\n }\n};\nvar icon = resolveIcons(function (iconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform = params.transform,\n transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,\n _params$symbol = params.symbol,\n symbol = _params$symbol === void 0 ? false : _params$symbol,\n _params$mask = params.mask,\n mask = _params$mask === void 0 ? null : _params$mask,\n _params$title = params.title,\n title = _params$title === void 0 ? null : _params$title,\n _params$classes = params.classes,\n classes = _params$classes === void 0 ? [] : _params$classes,\n _params$attributes = params.attributes,\n attributes = _params$attributes === void 0 ? {} : _params$attributes,\n _params$styles = params.styles,\n styles = _params$styles === void 0 ? {} : _params$styles;\n if (!iconDefinition) return;\n var prefix = iconDefinition.prefix,\n iconName = iconDefinition.iconName,\n icon = iconDefinition.icon;\n return apiObject(_objectSpread({\n type: 'icon'\n }, iconDefinition), function () {\n ensureCss();\n\n if (config.autoA11y) {\n if (title) {\n attributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(nextUniqueId());\n } else {\n attributes['aria-hidden'] = 'true';\n attributes['focusable'] = 'false';\n }\n }\n\n return makeInlineSvgAbstract({\n icons: {\n main: asFoundIcon(icon),\n mask: mask ? asFoundIcon(mask.icon) : {\n found: false,\n width: null,\n height: null,\n icon: {}\n }\n },\n prefix: prefix,\n iconName: iconName,\n transform: _objectSpread({}, meaninglessTransform, transform),\n symbol: symbol,\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: classes\n }\n });\n });\n});\nvar text = function text(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform2 = params.transform,\n transform = _params$transform2 === void 0 ? meaninglessTransform : _params$transform2,\n _params$title2 = params.title,\n title = _params$title2 === void 0 ? null : _params$title2,\n _params$classes2 = params.classes,\n classes = _params$classes2 === void 0 ? [] : _params$classes2,\n _params$attributes2 = params.attributes,\n attributes = _params$attributes2 === void 0 ? {} : _params$attributes2,\n _params$styles2 = params.styles,\n styles = _params$styles2 === void 0 ? {} : _params$styles2;\n return apiObject({\n type: 'text',\n content: content\n }, function () {\n ensureCss();\n return makeLayersTextAbstract({\n content: content,\n transform: _objectSpread({}, meaninglessTransform, transform),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-text\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar counter = function counter(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$title3 = params.title,\n title = _params$title3 === void 0 ? null : _params$title3,\n _params$classes3 = params.classes,\n classes = _params$classes3 === void 0 ? [] : _params$classes3,\n _params$attributes3 = params.attributes,\n attributes = _params$attributes3 === void 0 ? {} : _params$attributes3,\n _params$styles3 = params.styles,\n styles = _params$styles3 === void 0 ? {} : _params$styles3;\n return apiObject({\n type: 'counter',\n content: content\n }, function () {\n ensureCss();\n return makeLayersCounterAbstract({\n content: content.toString(),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-counter\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar layer = function layer(assembler) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$classes4 = params.classes,\n classes = _params$classes4 === void 0 ? [] : _params$classes4;\n return apiObject({\n type: 'layer'\n }, function () {\n ensureCss();\n var children = [];\n assembler(function (args) {\n Array.isArray(args) ? args.map(function (a) {\n children = children.concat(a.abstract);\n }) : children = children.concat(args.abstract);\n });\n return [{\n tag: 'span',\n attributes: {\n class: [\"\".concat(config.familyPrefix, \"-layers\")].concat(_toConsumableArray(classes)).join(' ')\n },\n children: children\n }];\n });\n};\nvar api = {\n noAuto: noAuto,\n config: config,\n dom: dom,\n library: library,\n parse: parse,\n findIconDefinition: findIconDefinition,\n icon: icon,\n text: text,\n counter: counter,\n layer: layer,\n toHtml: toHtml\n};\n\nvar autoReplace = function autoReplace() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _params$autoReplaceSv = params.autoReplaceSvgRoot,\n autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;\n if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({\n node: autoReplaceSvgRoot\n });\n};\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \"./node_modules/timers-browserify/main.js\").setImmediate))\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/fontawesome-svg-core/index.es.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-center';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f037';\nvar svgPathData = 'M432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM108.1 96h231.81A12.09 12.09 0 0 0 352 83.9V44.09A12.09 12.09 0 0 0 339.91 32H108.1A12.09 12.09 0 0 0 96 44.09V83.9A12.1 12.1 0 0 0 108.1 96zm231.81 256A12.09 12.09 0 0 0 352 339.9v-39.81A12.09 12.09 0 0 0 339.91 288H108.1A12.09 12.09 0 0 0 96 300.09v39.81a12.1 12.1 0 0 0 12.1 12.1z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignCenter = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-justify';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f039';\nvar svgPathData = 'M432 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-128H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignJustify = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-left';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f036';\nvar svgPathData = 'M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'align-right';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f038';\nvar svgPathData = 'M16 224h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm416 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-384H172.83A12.82 12.82 0 0 0 160 44.83v38.34A12.82 12.82 0 0 0 172.83 96h262.34A12.82 12.82 0 0 0 448 83.17V44.83A12.82 12.82 0 0 0 435.17 32zm0 256H172.83A12.82 12.82 0 0 0 160 300.83v38.34A12.82 12.82 0 0 0 172.83 352h262.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faAlignRight = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faBold.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'bold';\nvar width = 384;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f032';\nvar svgPathData = 'M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faBold = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faBold.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faFont.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'font';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f031';\nvar svgPathData = 'M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faFont = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faFont.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faImage.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'image';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f03e';\nvar svgPathData = 'M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faImage = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faImage.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'indent';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f03c';\nvar svgPathData = 'M27.31 363.3l96-96a16 16 0 0 0 0-22.62l-96-96C17.27 138.66 0 145.78 0 160v192c0 14.31 17.33 21.3 27.31 11.3zM432 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-128H204.83A12.82 12.82 0 0 0 192 300.83v38.34A12.82 12.82 0 0 0 204.83 352h230.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288zm0-128H204.83A12.82 12.82 0 0 0 192 172.83v38.34A12.82 12.82 0 0 0 204.83 224h230.34A12.82 12.82 0 0 0 448 211.17v-38.34A12.82 12.82 0 0 0 435.17 160zM432 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faIndent = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'italic';\nvar width = 320;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f033';\nvar svgPathData = 'M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faItalic = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faLink.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'link';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0c1';\nvar svgPathData = 'M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faLink = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faLink.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faList.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f03a';\nvar svgPathData = 'M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faList = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faList.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list-ol';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0cb';\nvar svgPathData = 'M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faListOl = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list-ul';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0ca';\nvar svgPathData = 'M48 48a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm0 160a48 48 0 1 0 48 48 48 48 0 0 0-48-48zm448 16H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faListUl = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'paper-plane';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f1d8';\nvar svgPathData = 'M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faPaperPlane = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'paperclip';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0c6';\nvar svgPathData = 'M43.246 466.142c-58.43-60.289-57.341-157.511 1.386-217.581L254.392 34c44.316-45.332 116.351-45.336 160.671 0 43.89 44.894 43.943 117.329 0 162.276L232.214 383.128c-29.855 30.537-78.633 30.111-107.982-.998-28.275-29.97-27.368-77.473 1.452-106.953l143.743-146.835c6.182-6.314 16.312-6.422 22.626-.241l22.861 22.379c6.315 6.182 6.422 16.312.241 22.626L171.427 319.927c-4.932 5.045-5.236 13.428-.648 18.292 4.372 4.634 11.245 4.711 15.688.165l182.849-186.851c19.613-20.062 19.613-52.725-.011-72.798-19.189-19.627-49.957-19.637-69.154 0L90.39 293.295c-34.763 35.56-35.299 93.12-1.191 128.313 34.01 35.093 88.985 35.137 123.058.286l172.06-175.999c6.177-6.319 16.307-6.433 22.626-.256l22.877 22.364c6.319 6.177 6.434 16.307.256 22.626l-172.06 175.998c-59.576 60.938-155.943 60.216-214.77-.485z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faPaperclip = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'strikethrough';\nvar width = 512;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0cc';\nvar svgPathData = 'M496 224H293.9l-87.17-26.83A43.55 43.55 0 0 1 219.55 112h66.79A49.89 49.89 0 0 1 331 139.58a16 16 0 0 0 21.46 7.15l42.94-21.47a16 16 0 0 0 7.16-21.46l-.53-1A128 128 0 0 0 287.51 32h-68a123.68 123.68 0 0 0-123 135.64c2 20.89 10.1 39.83 21.78 56.36H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm-180.24 96A43 43 0 0 1 336 356.45 43.59 43.59 0 0 1 292.45 400h-66.79A49.89 49.89 0 0 1 181 372.42a16 16 0 0 0-21.46-7.15l-42.94 21.47a16 16 0 0 0-7.16 21.46l.53 1A128 128 0 0 0 224.49 480h68a123.68 123.68 0 0 0 123-135.64 114.25 114.25 0 0 0-5.34-24.36z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faStrikethrough = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js?")},"./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js":function(module,exports,__webpack_require__){"use strict";eval("\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'underline';\nvar width = 448;\nvar height = 512;\nvar ligatures = [];\nvar unicode = 'f0cd';\nvar svgPathData = 'M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z';\n\nexports.definition = {\n prefix: prefix,\n iconName: iconName,\n icon: [\n width,\n height,\n ligatures,\n unicode,\n svgPathData\n ]};\n\nexports.faUnderline = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = ligatures;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\n\n//# sourceURL=webpack://striveneditor/./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js?")},"./node_modules/process/browser.js":function(module,exports){eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://striveneditor/./node_modules/process/browser.js?")},"./node_modules/setimmediate/setImmediate.js":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\n "use strict";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== "function") {\n callback = new Function("" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: "Wait until any invocations of this algorithm started before this one have completed."\n // So if we\'re currently running a task, we\'ll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // "too much recursion" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can\'t be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage("", "*");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = "setImmediate$" + Math.random() + "$";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === "string" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener("message", onGlobalMessage, false);\n } else {\n global.attachEvent("onmessage", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, "*");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it\'s been called.\n var script = doc.createElement("script");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don\'t get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === "[object process]") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && "onreadystatechange" in doc.createElement("script")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))\n\n//# sourceURL=webpack://striveneditor/./node_modules/setimmediate/setImmediate.js?')},"./node_modules/timers-browserify/main.js":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||\n (typeof self !== "undefined" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(/*! setimmediate */ "./node_modules/setimmediate/setImmediate.js");\n// On some exotic environments, it\'s not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||\n (typeof global !== "undefined" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||\n (typeof global !== "undefined" && global.clearImmediate) ||\n (this && this.clearImmediate);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))\n\n//# sourceURL=webpack://striveneditor/./node_modules/timers-browserify/main.js?')},"./node_modules/webpack/buildin/global.js":function(module,exports){eval('var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function("return this")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === "object") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it\'s\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://striveneditor/(webpack)/buildin/global.js?')},"./src/striveneditor.js":function(module,exports,__webpack_require__){eval('var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {\n if (true) {\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! @fortawesome/fontawesome-svg-core */ "./node_modules/@fortawesome/fontawesome-svg-core/index.es.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faFont */ "./node_modules/@fortawesome/free-solid-svg-icons/faFont.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faBold */ "./node_modules/@fortawesome/free-solid-svg-icons/faBold.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faItalic */ "./node_modules/@fortawesome/free-solid-svg-icons/faItalic.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faUnderline */ "./node_modules/@fortawesome/free-solid-svg-icons/faUnderline.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faStrikethrough */ "./node_modules/@fortawesome/free-solid-svg-icons/faStrikethrough.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faList */ "./node_modules/@fortawesome/free-solid-svg-icons/faList.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListOl */ "./node_modules/@fortawesome/free-solid-svg-icons/faListOl.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faListUl */ "./node_modules/@fortawesome/free-solid-svg-icons/faListUl.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignJustify */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignJustify.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faIndent */ "./node_modules/@fortawesome/free-solid-svg-icons/faIndent.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignLeft */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignLeft.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignCenter */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignCenter.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faAlignRight */ "./node_modules/@fortawesome/free-solid-svg-icons/faAlignRight.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperclip */ "./node_modules/@fortawesome/free-solid-svg-icons/faPaperclip.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faLink */ "./node_modules/@fortawesome/free-solid-svg-icons/faLink.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faImage */ "./node_modules/@fortawesome/free-solid-svg-icons/faImage.js"), __webpack_require__(/*! @fortawesome/free-solid-svg-icons/faPaperPlane */ "./node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === \'function\' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else { var mod; }\n})(this, function (_exports, _fontawesomeSvgCore, _faFont, _faBold, _faItalic, _faUnderline, _faStrikethrough, _faList, _faListOl, _faListUl, _faAlignJustify, _faIndent, _faAlignLeft, _faAlignCenter, _faAlignRight, _faPaperclip, _faLink, _faImage, _faPaperPlane) {\n "use strict";\n\n Object.defineProperty(_exports, "__esModule", {\n value: true\n });\n _exports["default"] = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }\n\n function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\n function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\n function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n _fontawesomeSvgCore.library.add(_faFont.faFont);\n\n _fontawesomeSvgCore.library.add(_faBold.faBold);\n\n _fontawesomeSvgCore.library.add(_faItalic.faItalic);\n\n _fontawesomeSvgCore.library.add(_faUnderline.faUnderline);\n\n _fontawesomeSvgCore.library.add(_faStrikethrough.faStrikethrough);\n\n _fontawesomeSvgCore.library.add(_faList.faList);\n\n _fontawesomeSvgCore.library.add(_faListOl.faListOl);\n\n _fontawesomeSvgCore.library.add(_faListUl.faListUl);\n\n _fontawesomeSvgCore.library.add(_faAlignJustify.faAlignJustify);\n\n _fontawesomeSvgCore.library.add(_faIndent.faIndent);\n\n _fontawesomeSvgCore.library.add(_faAlignLeft.faAlignLeft);\n\n _fontawesomeSvgCore.library.add(_faAlignCenter.faAlignCenter);\n\n _fontawesomeSvgCore.library.add(_faAlignRight.faAlignRight);\n\n _fontawesomeSvgCore.library.add(_faPaperclip.faPaperclip);\n\n _fontawesomeSvgCore.library.add(_faLink.faLink);\n\n _fontawesomeSvgCore.library.add(_faImage.faImage);\n\n _fontawesomeSvgCore.library.add(_faPaperPlane.faPaperPlane);\n\n _fontawesomeSvgCore.dom.watch();\n\n var EXTENSIONS = [".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".tif", ".jpeg", ".jpg", ".gif", ".bmp", ".txt", ".csv", ".png", ".msg", ".wav", ".mp3", ".mp4", ".zip", ".rtf", ".eps", ".ai", ".psd", ".avi", ".mov", ".wmv", ".cfg", ".wss", ".vsd", ".vsdx", ".tsd", ".lic"];\n var FONTPACK = "fas";\n var OPTIONGROUPS = {\n textDecoration: {\n menu: "fa-font",\n group: [{\n bold: "fa-bold"\n }, {\n italic: "fa-italic"\n }, {\n underline: "fa-underline"\n }, {\n strikethrough: "fa-strikethrough"\n }]\n },\n listOptions: {\n menu: "fa-list",\n group: [{\n insertOrderedList: "fa-list-ol"\n }, {\n insertUnorderedList: "fa-list-ul"\n }]\n },\n textAlign: {\n menu: "fa-align-justify",\n group: [{\n indent: "fa-indent"\n }, {\n justifyLeft: "fa-align-left"\n }, {\n justifyCenter: "fa-align-center"\n }, {\n justifyRight: "fa-align-right"\n }]\n },\n attachments: {\n menu: "fa-paperclip",\n group: [{\n attachment: "fa-paperclip"\n }, {\n link: "fa-link"\n }, {\n image: "fa-image"\n }]\n }\n };\n\n var StrivenEditor =\n /*#__PURE__*/\n function () {\n function StrivenEditor(el, options) {\n _classCallCheck(this, StrivenEditor);\n\n this.range = new Range();\n this.files = [];\n this.optionGroups = OPTIONGROUPS;\n\n if (options) {\n this.options = options;\n options.fontPack || (this.options.fontPack = FONTPACK);\n options.extensions || (this.options.extensions = EXTENSIONS);\n } else {\n this.options = {\n fontPack: FONTPACK,\n extensions: EXTENSIONS\n };\n }\n\n this.initEditor(el);\n this.initResponsive();\n this.initOverflow();\n }\n\n _createClass(StrivenEditor, [{\n key: "initEditor",\n value: function initEditor(el) {\n var _this = this;\n\n this.editor = el;\n this.toolbar = this.initToolbar();\n this.body = this.initBody();\n this.linkMenu = this.initLinkMenu();\n this.imageMenu = this.initImageMenu();\n this.metaDataSection = this.initMetaDataSection();\n this.filesSection = this.initFilesSection();\n this.editor.style.border = "2px solid #ddd";\n this.editor.style.display = "flex";\n this.editor.style.flexDirection = "column";\n this.editor.style.position = "relative";\n this.editor.style.fontFamily = "Arial";\n this.toolbar.style.display = "flex";\n this.toolbar.style.justifyContent = "space-between";\n this.toolbar.style.alignItems = "center";\n this.toolbar.style.flexWrap = "wrap";\n this.toolbar.style.minHeight = this.options.toolbarHide ? "0" : "40px";\n this.toolbarOptionsGroup.style.margin = "0 10px";\n this.toolbarOptionsGroup.style.display = this.options.toolbarHide ? "none" : "flex";\n this.body.contentEditable = "true";\n this.body.style.outline = "none";\n this.body.style.padding = "10px 20px";\n this.body.style.height = this.editor.style.height;\n this.body.style.minHeight = this.editor.style.minHeight;\n this.body.style.maxHeight = this.editor.style.maxHeight;\n this.editor.style.minHeight = "auto";\n this.editor.style.maxHeight = "auto";\n this.editor.style.maxWidth = "100%";\n\n if (this.options.toolbarHide) {\n this.toolbarSend.style.display = "none";\n this.toolbarOptionsGroup.style.display = "none";\n\n this.body.onfocus = function () {\n _this.overflow();\n\n _this.toolbarSlideUp();\n };\n\n this.body.onblur = function () {\n _this.overflow();\n\n setTimeout(function () {\n if (document.activeElement !== _this.body && document.activeElement !== _this.linkMenu.querySelector(\'input\') && document.activeElement !== _this.imageMenu.querySelector(\'input\')) {\n _this.toolbarSlideDown();\n }\n }, 2000);\n };\n }\n\n this.toolbarSend.style.display = "none";\n this.toolbarSend.style.color = "#fff";\n this.toolbarSend.style.backgroundColor = "#5cb85c";\n this.toolbarSend.style.minHeight = this.options.toolbarHide ? "40px" : this.toolbar.style.minHeight;\n this.toolbarSend.style.width = "50px";\n this.toolbarSend.style.textAlign = "center";\n this.toolbarSend.style.justifyContent = "center";\n this.toolbarSend.style.alignContent = "center";\n this.toolbarSend.style.alignItems = "center";\n this.toolbarSend.style.cursor = "pointer";\n this.toolbarSend.style.border = "1px solid #4cae4c";\n this.toolbarSend.style.alignSelf = "flex-end";\n this.options.onToolbarSend && (this.toolbarSend.onclick = function () {\n return _this.options.onToolbarSend();\n });\n this.options.onToolbarSend && !this.options.toolbarHide && (this.toolbarSend.style.display = "flex");\n\n this.toolbarSend.onmouseenter = function () {\n return _this.toolbarSend.style.backgroundColor = "#4cae4c";\n };\n\n this.toolbarSend.onmouseleave = function () {\n return _this.toolbarSend.style.backgroundColor = "#5cb85c";\n }; // Toolbar Options\n\n\n this.toolbarOptions.forEach(function (optionEl) {\n // Assign Styles\n optionEl.style.padding = "0 10px";\n optionEl.style.cursor = "pointer";\n optionEl.style.userSelect = "none"; // Execute Toolbar Commands\n\n optionEl.onclick = function (e) {\n _this.body.focus();\n\n var command = optionEl.id.split("-")[1];\n\n switch (command) {\n case "insertOrderedList":\n document.execCommand("indent", true);\n document.execCommand(command, true);\n break;\n\n case "insertUnorderedList":\n document.execCommand("indent", true);\n document.execCommand(command, true);\n break;\n\n case "attachment":\n var attachmentInput = document.createElement("input");\n attachmentInput.style.display = "none";\n attachmentInput.type = "file";\n attachmentInput.click();\n\n attachmentInput.onchange = function (e) {\n return _this.attachFile(attachmentInput.files[0]);\n };\n\n break;\n\n case "link":\n if (_this.linkMenu.dataset.active === "true") {\n _this.linkMenu.dataset.active = "false";\n _this.linkMenu.style.display = "none";\n } else {\n _this.linkMenu.dataset.active = "true";\n _this.linkMenu.style.display = "block";\n _this.range = _this.getRange();\n\n _this.linkMenu.querySelector(\'input\').focus();\n }\n\n break;\n\n case "image":\n if (_this.imageMenu.dataset.active === "true") {\n _this.imageMenu.dataset.active = "false";\n _this.imageMenu.style.display = "none";\n } else {\n _this.imageMenu.dataset.active = "true";\n _this.imageMenu.style.display = "block";\n _this.range = _this.getRange();\n\n _this.imageMenu.querySelector(\'input\').focus();\n }\n\n break;\n\n default:\n document.execCommand(command, true);\n break;\n }\n };\n }); // Paste Handler\n\n this.body.onpaste = function (e) {\n function dataURLtoFile(dataurl, filename) {\n var arr = dataurl.split(\',\'),\n mime = arr[0].match(/:(.*?);/)[1],\n bstr = atob(arr[1]),\n n = bstr.length,\n u8arr = new Uint8Array(n);\n\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n\n var file = new File([u8arr], filename, {\n type: mime\n });\n return new File([u8arr], "".concat(file.name, ".").concat(file.type.split(\'/\').pop()), {\n type: file.type\n });\n }\n\n var convertImage = function convertImage(file) {\n return new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = function () {\n return resolve(reader.result);\n };\n\n reader.onerror = function (error) {\n return reject(error);\n };\n });\n };\n\n if (e.clipboardData.files.length > 0 && e.clipboardData.files[0].type.includes("image")) {\n convertImage(e.clipboardData.files[0]).then(function (res) {\n document.execCommand("insertImage", true, res);\n _this.options.uploadOnPaste && _this.attachFile(dataURLtoFile(res, "pastedimage"));\n\n _this.overflow();\n });\n }\n\n if (e.clipboardData.items.length > 0 && e.clipboardData.items[0].type === "text/plain") {\n e.clipboardData.items[0].getAsString(function (string) {\n if (_this.options.metaUrl && _this.validURL(string)) {\n _this.getMeta(string).then(function (res) {\n var url = res.url,\n title = res.title,\n image = res.image,\n description = res.description;\n url && title && image && _this.createMetaDataElement(url, image, title, description);\n });\n }\n });\n }\n\n _this.overflow();\n }; // Get Content from Editor\n\n\n this.editor.getcontent = function () {\n return _this.getContent();\n }; // Get Editor Range\n\n\n this.editor.getrange = function () {\n return _this.getRange();\n };\n\n this.editor.appendChild(this.toolbar);\n this.editor.appendChild(this.body);\n this.editor.appendChild(this.linkMenu);\n this.editor.appendChild(this.imageMenu);\n this.editor.appendChild(this.metaDataSection);\n this.editor.appendChild(this.filesSection); // Reposition Toolbar\n\n if (this.options.toolbarBottom) {\n this.editor.removeChild(this.toolbar);\n this.editor.append(this.toolbar);\n }\n }\n }, {\n key: "toolbarSlideUp",\n value: function toolbarSlideUp() {\n var that = this;\n var height = this.toolbar.offsetHeight;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 40) {\n that.options.onToolbarSend && (that.toolbarSend.style.display = "flex");\n that.toolbarOptionsGroup.style.display = "flex";\n clearInterval(id);\n } else {\n height++;\n that.toolbar.style.minHeight = "".concat(height, "px");\n }\n }\n }\n }, {\n key: "toolbarSlideDown",\n value: function toolbarSlideDown() {\n var that = this;\n this.options.onToolbarSend && (this.toolbarSend.style.display = "none");\n this.toolbarOptionsGroup.style.display = "none";\n var height = 40;\n var id = setInterval(frame, 5);\n\n function frame() {\n if (height === 0) {\n clearInterval(id);\n } else {\n height--;\n that.toolbar.style.minHeight = "".concat(height, "px");\n }\n }\n }\n }, {\n key: "initToolbar",\n value: function initToolbar() {\n var _this2 = this;\n\n var toolbar = document.createElement("div");\n this.toolbarOptionsGroup = document.createElement("div");\n var groups = Object.keys(this.optionGroups);\n toolbar.classList.add("toolbar");\n this.toolbarOptionsGroup.classList.add("toolbar-options"); //iterate groups\n\n groups.forEach(function (group) {\n // add menu to toolbarOptions\n var toolbarMenu = document.createElement("div");\n var toolbarMenuIcon = document.createElement("i");\n toolbarMenu.classList.add("toolbar-menu");\n toolbarMenu.id = "menu-".concat(group);\n toolbarMenuIcon.classList.add(_this2.options.fontPack);\n toolbarMenuIcon.classList.add(_this2.optionGroups[group].menu);\n toolbarMenu.appendChild(toolbarMenuIcon);\n\n _this2.toolbarOptionsGroup.appendChild(toolbarMenu); // add group to toolbarOptions\n\n\n var toolbarGroup = document.createElement("div");\n toolbarGroup.classList.add("toolbar-group");\n toolbarGroup.id = "group-".concat(group);\n\n _this2.optionGroups[group].group.forEach(function (option) {\n var optionSpan = document.createElement("span");\n var optionIcon = document.createElement("i");\n var toolbarCommand = Object.keys(option)[0];\n optionSpan.id = "toolbar-".concat(toolbarCommand);\n optionIcon.classList.add(_this2.options.fontPack);\n optionIcon.classList.add(option[toolbarCommand]);\n optionSpan.appendChild(optionIcon);\n toolbarGroup.appendChild(optionSpan);\n });\n\n _this2.toolbarOptionsGroup.appendChild(toolbarGroup);\n });\n toolbar.appendChild(this.toolbarOptionsGroup); //add toolbar-send\n\n var toolbarSend = document.createElement("div");\n var toolbarSendIcon = document.createElement("i");\n toolbarSend.id = "toolbar-send";\n toolbarSendIcon.classList.add(this.options.fontPack);\n toolbarSendIcon.classList.add("fa-paper-plane");\n toolbarSend.appendChild(toolbarSendIcon);\n toolbar.appendChild(toolbarSend);\n this.toolbarOptions = toolbar.querySelectorAll("span");\n this.toolbarGroups = _toConsumableArray(toolbar.getElementsByClassName("toolbar-group"));\n this.toolbarMenus = _toConsumableArray(toolbar.getElementsByClassName("toolbar-menu"));\n this.toolbarSend = toolbar.querySelector("#toolbar-send");\n return toolbar;\n }\n }, {\n key: "initBody",\n value: function initBody() {\n var body = document.createElement("div");\n body.classList.add("body");\n return body;\n }\n }, {\n key: "initLinkMenu",\n value: function initLinkMenu() {\n var _this3 = this;\n\n var linkMenu = document.createElement("div");\n var linkMenuForm = document.createElement("div");\n var linkMenuButton = document.createElement("button");\n var linkMenuFormLabel = document.createElement("p");\n var linkMenuFormInput = document.createElement("input");\n linkMenu.id = "link-menu";\n linkMenuButton.textContent = "Insert Link";\n linkMenuFormLabel.textContent = "Web Address";\n linkMenuFormInput.type = "text";\n linkMenuFormLabel.style.margin = "8px 10px 8px 0";\n linkMenuFormLabel.style.fontSize = "14px";\n linkMenuButton.style.cursor = "pointer";\n linkMenu.dataset.active = "false";\n linkMenu.style.display = "none";\n linkMenu.style.position = "absolute";\n linkMenu.style.right = "10px";\n linkMenu.style.bottom = "10px";\n linkMenu.style.backgroundColor = "#fff";\n linkMenu.style.border = "2px solid #ddd";\n linkMenu.style.padding = "10px 20px";\n linkMenu.style.zIndex = "1000";\n linkMenuFormLabel.style.width = "100%";\n linkMenuFormLabel.style.textAlign = "right";\n linkMenuFormLabel.style.marginRight = "10px";\n linkMenuFormInput.style.outline = "none";\n linkMenuFormInput.style.padding = "0 5px";\n linkMenuFormInput.placeholder = "Insert a Link";\n linkMenuForm.style.display = "flex";\n linkMenuForm.style.justifyContent = "space-between";\n linkMenuForm.style.margin = "5px 0";\n linkMenuButton.style["float"] = "right";\n linkMenuButton.style.padding = "6px 12px";\n linkMenuButton.style.border = "1px solid #4cae4c";\n linkMenuButton.style.backgroundColor = "#5cb85c";\n linkMenuButton.style.fontSize = "14px";\n linkMenuButton.style.color = "#fff";\n linkMenuButton.style.outline = "none";\n\n linkMenuButton.onmouseenter = function () {\n return linkMenuButton.style.backgroundColor = "#4cae4c";\n };\n\n linkMenuButton.onmouseleave = function () {\n return linkMenuButton.style.backgroundColor = "#5cb85c";\n };\n\n linkMenuButton.onclick = function (e) {\n var linkValue = linkMenuFormInput.value;\n\n if (linkValue) {\n window.getSelection().removeAllRanges();\n window.getSelection().addRange(_this3.range);\n document.execCommand("createLink", true, linkValue);\n\n if (_this3.options.metaUrl && _this3.validURL(linkValue)) {\n _this3.getMeta(linkValue).then(function (res) {\n var url = res.url,\n image = res.image,\n title = res.title,\n description = res.description;\n url && image && title && _this3.createMetaDataElement(url, image, title, description);\n });\n }\n\n var bodyLinks = _this3.body.querySelectorAll("a");\n\n bodyLinks[bodyLinks.length - 1].contentEditable = "false";\n linkMenuFormInput.value = "";\n\n _this3.toolbar.querySelector("#toolbar-link").onclick();\n } else {\n _this3.body.focus();\n\n _this3.linkMenu.dataset.active = "false";\n e.target.parentElement.style.display = "none";\n }\n };\n\n linkMenuForm.appendChild(linkMenuFormLabel);\n linkMenuForm.appendChild(linkMenuFormInput);\n linkMenu.appendChild(linkMenuForm);\n linkMenu.appendChild(linkMenuButton);\n return linkMenu;\n }\n }, {\n key: "initImageMenu",\n value: function initImageMenu() {\n var _this4 = this;\n\n var imageMenu = document.createElement("div");\n var imageMenuForm = document.createElement("div");\n var imageMenuButton = document.createElement("button");\n var imageMenuFormLabel = document.createElement("p");\n var imageMenuFormSourceInput = document.createElement("input");\n imageMenu.id = "image-menu";\n imageMenuButton.textContent = "Insert Image";\n imageMenuFormLabel.textContent = "Image URL";\n imageMenuFormSourceInput.type = "text";\n imageMenuFormLabel.style.margin = "8px 10px 8px 0";\n imageMenuFormLabel.style.fontSize = "14px";\n imageMenuButton.style.cursor = "pointer";\n imageMenu.dataset.active = "false";\n imageMenu.style.display = "none";\n imageMenu.style.position = "absolute";\n imageMenu.style.right = "10px";\n imageMenu.style.bottom = "10px";\n imageMenu.style.backgroundColor = "#fff";\n imageMenu.style.border = "2px solid #ddd";\n imageMenu.style.padding = "10px 20px";\n imageMenu.style.zIndex = "1000";\n imageMenuFormLabel.style.width = "100%";\n imageMenuFormLabel.style.textAlign = "right";\n imageMenuFormLabel.style.marginRight = "10px";\n imageMenuFormSourceInput.style.outline = "none";\n imageMenuFormSourceInput.style.padding = "0 5px";\n imageMenuFormSourceInput.placeholder = "Insert a Link";\n imageMenuForm.style.display = "flex";\n imageMenuForm.style.justifyContent = "space-between";\n imageMenuForm.style.margin = "5px 0";\n imageMenuButton.style["float"] = "right";\n imageMenuButton.style.padding = "6px 12px";\n imageMenuButton.style.border = "1px solid #4cae4c";\n imageMenuButton.style.backgroundColor = "#5cb85c";\n imageMenuButton.style.fontSize = "14px";\n imageMenuButton.style.color = "#fff";\n imageMenuButton.style.outline = "none";\n\n imageMenuButton.onmouseenter = function () {\n return imageMenuButton.style.backgroundColor = "#4cae4c";\n };\n\n imageMenuButton.onmouseleave = function () {\n return imageMenuButton.style.backgroundColor = "#5cb85c";\n };\n\n imageMenuForm.appendChild(imageMenuFormLabel);\n imageMenuForm.appendChild(imageMenuFormSourceInput); // Height Input Form\n\n var imageMenuHeightForm = imageMenuForm.cloneNode(true);\n var imageMenuHeightFormInput = imageMenuHeightForm.querySelector(\'input\');\n var imageMenuHeightFormLabel = imageMenuHeightForm.querySelector(\'p\');\n imageMenuHeightFormInput.placeholder = "Image Height";\n imageMenuHeightFormLabel.textContent = "Height"; // Width Input Form\n\n var imageMenuWidthForm = imageMenuForm.cloneNode(true);\n var imageMenuWidthFormInput = imageMenuWidthForm.querySelector(\'input\');\n var imageMenuWidthFormLabel = imageMenuWidthForm.querySelector(\'p\');\n imageMenuWidthFormInput.placeholder = "Image Height";\n imageMenuWidthFormLabel.textContent = "Width";\n\n imageMenuButton.onclick = function (e) {\n var linkValue = imageMenuFormSourceInput.value;\n var heightValue = imageMenuHeightFormInput.value;\n var widthValue = imageMenuWidthFormInput.value;\n\n if (linkValue) {\n window.getSelection().removeAllRanges();\n window.getSelection().addRange(_this4.range);\n document.execCommand("insertImage", true, linkValue);\n\n var imageTags = _this4.body.querySelectorAll("img");\n\n imageTags[imageTags.length - 1].style.height = "".concat(heightValue, "px");\n imageTags[imageTags.length - 1].style.width = "".concat(widthValue, "px");\n imageMenuHeightFormInput.value = "";\n imageMenuWidthFormInput.value = "";\n imageMenuFormSourceInput.value = "";\n\n _this4.toolbar.querySelector("#toolbar-image").onclick();\n } else {\n _this4.body.focus();\n\n _this4.imageMenu.dataset.active = "false";\n e.target.parentElement.style.display = "none";\n }\n };\n\n imageMenu.appendChild(imageMenuHeightForm);\n imageMenu.appendChild(imageMenuWidthForm);\n imageMenu.appendChild(imageMenuForm);\n imageMenu.appendChild(imageMenuButton);\n return imageMenu;\n }\n }, {\n key: "initMetaDataSection",\n value: function initMetaDataSection() {\n var metaDataSection = document.createElement("div");\n metaDataSection.classList.add("metadata-section");\n metaDataSection.style.display = "flex";\n metaDataSection.style.flexWrap = "wrap";\n metaDataSection.style.zIndex = "500";\n return metaDataSection;\n }\n }, {\n key: "initFilesSection",\n value: function initFilesSection() {\n var _this5 = this;\n\n var filesSection = document.createElement("div");\n filesSection.classList.add("files-section");\n filesSection.style.display = "flex";\n filesSection.style.flexWrap = "wrap";\n filesSection.style.zIndex = "500";\n\n this.body.ondragenter = function (e) {\n _this5.body.style.backgroundColor = "#ddd";\n };\n\n this.body.ondragleave = function (e) {\n _this5.body.style.backgroundColor = "inherit";\n };\n\n this.body.ondrop = function (e) {\n _this5.body.style.backgroundColor = "inherit";\n e.preventDefault();\n var file = e.dataTransfer.files && e.dataTransfer.files[0];\n\n _this5.attachFile(file);\n };\n\n this.editor.getfiles = function () {\n return _this5.getFiles();\n };\n\n return filesSection;\n }\n }, {\n key: "createFileElement",\n value: function createFileElement(name, size) {\n var _this6 = this;\n\n var fileEl = document.createElement("div");\n var fileNameEl = document.createElement("h4");\n var fileSizeEl = document.createElement("p");\n var removeFileEl = document.createElement("p");\n fileNameEl.textContent = name;\n fileSizeEl.textContent = size;\n removeFileEl.textContent = "X";\n fileEl.dataset.fileindex = this.files.length - 1;\n fileEl.style.width = "100%";\n fileEl.style.display = "flex";\n fileEl.style.flexDirection = "column";\n fileEl.style.margin = "10px";\n fileEl.style.position = "relative";\n fileNameEl.style.fontWeight = "bold";\n fileNameEl.style.margin = "0";\n fileSizeEl.style.fontSize = "12px";\n fileSizeEl.style.margin = "2px 0";\n removeFileEl.style.margin = "0";\n removeFileEl.style.userSelect = "none";\n removeFileEl.style.color = "black";\n removeFileEl.style.position = "absolute";\n removeFileEl.style.right = "5px";\n removeFileEl.style.top = "-5px";\n removeFileEl.style.cursor = "pointer";\n removeFileEl.style.backgroundColor = "#fff";\n\n removeFileEl.onmouseenter = function () {\n return removeFileEl.style.color = "#ddd";\n };\n\n removeFileEl.onmouseleave = function () {\n return removeFileEl.style.color = "black";\n };\n\n removeFileEl.onclick = function (e) {\n _this6.files.splice(e.target.parentElement.dataset.fileindex, 1);\n\n e.target.parentElement.remove();\n };\n\n fileEl.appendChild(fileNameEl);\n fileEl.appendChild(fileSizeEl);\n fileEl.appendChild(removeFileEl);\n this.filesSection.appendChild(fileEl);\n\n this.editor.getfiles = function () {\n return _this6.getFiles();\n };\n }\n }, {\n key: "createMetaDataElement",\n value: function createMetaDataElement(url, img, title, description) {\n var metaItemEl = document.createElement("div");\n var metaLinkEl = document.createElement("a");\n var metaImageEl = document.createElement("img");\n var metaDataEl = document.createElement("div");\n var metaDataTitleEl = document.createElement("h4");\n var metaDataDescriptionEl = document.createElement("p");\n var removeMetaDataEl = document.createElement("span");\n metaLinkEl.href = url;\n metaImageEl.src = img;\n metaDataTitleEl.textContent = title;\n metaDataDescriptionEl.textContent = description;\n removeMetaDataEl.textContent = "X";\n metaLinkEl.target = "blank";\n metaItemEl.style.width = "100%";\n metaItemEl.style.display = "flex";\n metaItemEl.style.margin = "10px";\n metaItemEl.style.position = "relative";\n metaImageEl.style.marginRight = "10px";\n metaImageEl.style.height = "50px";\n metaImageEl.style.width = "75px";\n metaDataTitleEl.style.fontWeight = "bold";\n metaDataTitleEl.style.margin = "0";\n metaDataDescriptionEl.style.margin = "0";\n removeMetaDataEl.style.userSelect = "none";\n removeMetaDataEl.style.color = "black";\n removeMetaDataEl.style.position = "absolute";\n removeMetaDataEl.style.right = "5px";\n removeMetaDataEl.style.top = "-5px";\n removeMetaDataEl.style.cursor = "pointer";\n removeMetaDataEl.style.backgroundColor = "#fff";\n\n removeMetaDataEl.onmouseenter = function () {\n return removeMetaDataEl.style.color = "#ddd";\n };\n\n removeMetaDataEl.onmouseleave = function () {\n return removeMetaDataEl.style.color = "black";\n };\n\n removeMetaDataEl.onclick = function (e) {\n return e.target.parentElement.remove();\n };\n\n metaLinkEl.appendChild(metaImageEl);\n metaDataEl.appendChild(metaDataTitleEl);\n metaDataEl.appendChild(metaDataDescriptionEl);\n metaItemEl.appendChild(metaLinkEl);\n metaItemEl.appendChild(metaDataEl);\n metaItemEl.appendChild(removeMetaDataEl);\n this.metaDataSection.appendChild(metaItemEl);\n }\n }, {\n key: "initResponsive",\n value: function initResponsive() {\n var that = this;\n\n if (!this.options.minimal) {\n var responsiveGroups = function responsiveGroups(isResponsive) {\n that.toolbarGroups.forEach(function (group) {\n group.dataset.open = "false";\n group.style.display = isResponsive ? "none" : "block";\n group.style.position = isResponsive ? "absolute" : "relative";\n group.style.bottom = isResponsive ? "5px" : "inherit";\n group.style.right = isResponsive ? "5px" : "inherit";\n group.style.backgroundColor = isResponsive ? "#fff" : "inherit";\n group.style.border = isResponsive ? "2px solid #ddd" : "none";\n });\n that.toolbarMenus.forEach(function (menu) {\n function toggleMenu() {\n var selectedGroup = that.toolbar.querySelector("#group-".concat(menu.id.split("-")[1]));\n\n if (selectedGroup.dataset.open === "false") {\n // close opened groups\n that.toolbarGroups.forEach(function (group) {\n if (group.dataset.open === "true") {\n group.style.display = "none";\n group.dataset.open = "false";\n }\n }); // open group\n\n selectedGroup.style.display = "block";\n selectedGroup.style.padding = "5px";\n selectedGroup.dataset.open = "true";\n } else {\n selectedGroup.style.display = "none";\n selectedGroup.dataset.open = "false";\n }\n }\n\n menu.style.padding = "0 10px";\n menu.style.cursor = "pointer";\n menu.style.userSelect = "none";\n menu.style.display = isResponsive ? "block" : "none";\n\n menu.onclick = function (e) {\n return toggleMenu();\n };\n });\n };\n\n var setResponsive = function setResponsive() {\n responsive = window.matchMedia("(max-width: 700px)").matches;\n responsiveGroups(responsive);\n };\n\n var responsive = window.matchMedia("(max-width: 700px)").matches;\n setResponsive();\n\n window.onresize = function () {\n return setResponsive();\n };\n } else {\n this.toolbarMenus.forEach(function (menu) {\n return menu.style.display = "none";\n });\n this.toolbar.querySelector("#toolbar-strikethrough").style.display = "none";\n this.toolbar.querySelector("#toolbar-image").style.display = "none";\n this.toolbar.querySelector("#toolbar-insertOrderedList").style.display = "none";\n this.toolbar.querySelector("#group-textAlign").style.display = "none";\n }\n }\n }, {\n key: "initOverflow",\n value: function initOverflow() {\n var _this7 = this;\n\n var onFocus = this.body.onfocus;\n\n this.body.onfocus = function () {\n onFocus && onFocus();\n\n _this7.overflow();\n };\n\n var onBlur = this.body.onblur;\n\n this.body.onblur = function () {\n onBlur && onBlur();\n\n _this7.overflow();\n };\n\n this.body.onkeypress = function () {\n return _this7.overflow();\n };\n }\n }, {\n key: "getFiles",\n value: function getFiles() {\n return this.files;\n }\n }, {\n key: "getContent",\n value: function getContent() {\n return this.body.innerHTML;\n }\n }, {\n key: "getRange",\n value: function getRange() {\n return window.getSelection().getRangeAt(0);\n }\n }, {\n key: "getMeta",\n value: function getMeta(url) {\n return fetch(this.options.metaUrl, {\n method: "POST",\n headers: {\n \'Content-Type\': \'application/json\'\n },\n body: JSON.stringify({\n targetUrl: url\n })\n }).then(function (res) {\n return res.json();\n });\n }\n }, {\n key: "validURL",\n value: function validURL(str) {\n var pattern = new RegExp("^(https?:\\\\/\\\\/)?" + "((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|" + "((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))" + "(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*" + "(\\\\?[;&a-z\\\\d%_.~+=-]*)?" + "(\\\\#[-a-z\\\\d_]*)?$", "i");\n return !!pattern.test(str);\n }\n }, {\n key: "overflow",\n value: function overflow() {\n var body = this.body;\n body.scrollHeight > body.clientHeight ? body.style.overflowY = "scroll" : body.style.overflowY = "hidden";\n body.scrollWidth > body.clientWidth ? body.style.overflowX = "scroll" : body.style.overflowX = "hidden";\n }\n }, {\n key: "formatBytes",\n value: function formatBytes(bytes) {\n var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n if (bytes === 0) return \'0 Bytes\';\n var k = 1024;\n var dm = decimals < 0 ? 0 : decimals;\n var sizes = [\'Bytes\', \'KB\', \'MB\', \'GB\', \'TB\', \'PB\', \'EB\', \'ZB\', \'YB\'];\n var i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + \' \' + sizes[i];\n }\n }, {\n key: "validateFile",\n value: function validateFile(file) {\n var extension = file.type.split(\'/\').pop();\n return this.options.extensions.includes(".".concat(extension));\n }\n }, {\n key: "attachFile",\n value: function attachFile(file) {\n if (this.validateFile(file)) {\n this.files.push(file);\n this.createFileElement(file.name, this.formatBytes(file.size));\n } else {\n this.fileInvalid();\n }\n }\n }, {\n key: "fileInvalid",\n value: function fileInvalid() {\n var _this8 = this;\n\n this.body.style.transition = "background-color .5s";\n this.body.style.backgroundColor = "#d9534f";\n setTimeout(function () {\n _this8.body.style.backgroundColor = "inherit";\n setTimeout(function () {\n return _this8.body.style.transition = "none";\n }, 500);\n }, 500);\n }\n }]);\n\n return StrivenEditor;\n }();\n\n _exports["default"] = StrivenEditor;\n});\n\n//# sourceURL=webpack://striveneditor/./src/striveneditor.js?')}})})); +\ No newline at end of file diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -153,7 +153,8 @@ export default class StrivenEditor { setTimeout(() => { if ( document.activeElement !== this.body && - document.activeElement !== this.linkMenu.querySelector('input') + document.activeElement !== this.linkMenu.querySelector('input') && + document.activeElement !== this.imageMenu.querySelector('input') ) { this.toolbarSlideDown(); } @@ -226,7 +227,16 @@ export default class StrivenEditor { } break; case "image": - console.log("image"); + if (this.imageMenu.dataset.active === "true") { + this.imageMenu.dataset.active = "false"; + this.imageMenu.style.display = "none"; + } else { + this.imageMenu.dataset.active = "true"; + this.imageMenu.style.display = "block"; + + this.range = this.getRange(); + this.imageMenu.querySelector('input').focus(); + } break; default: document.execCommand(command, true); @@ -296,7 +306,7 @@ export default class StrivenEditor { this.editor.appendChild(this.toolbar); this.editor.appendChild(this.body); this.editor.appendChild(this.linkMenu); - // this.editor.appendChild(this.imageMenu); + this.editor.appendChild(this.imageMenu); this.editor.appendChild(this.metaDataSection); this.editor.appendChild(this.filesSection); @@ -509,19 +519,97 @@ export default class StrivenEditor { const imageMenuForm = document.createElement("div"); const imageMenuButton = document.createElement("button"); const imageMenuFormLabel = document.createElement("p"); - const imageMenuFormInput = document.createElement("input"); + const imageMenuFormSourceInput = document.createElement("input"); imageMenu.id = "image-menu"; imageMenuButton.textContent = "Insert Image"; imageMenuFormLabel.textContent = "Image URL"; - imageMenuFormInput.type = "text"; + imageMenuFormSourceInput.type = "text"; imageMenuFormLabel.style.margin = "8px 10px 8px 0"; imageMenuFormLabel.style.fontSize = "14px"; imageMenuButton.style.cursor = "pointer"; + imageMenu.dataset.active = "false"; + imageMenu.style.display = "none"; + imageMenu.style.position = "absolute"; + imageMenu.style.right = "10px"; + imageMenu.style.bottom = "10px"; + imageMenu.style.backgroundColor = "#fff"; + imageMenu.style.border = "2px solid #ddd"; + imageMenu.style.padding = "10px 20px"; + imageMenu.style.zIndex = "1000"; + + imageMenuFormLabel.style.width = "100%"; + imageMenuFormLabel.style.textAlign = "right"; + imageMenuFormLabel.style.marginRight = "10px"; + + imageMenuFormSourceInput.style.outline = "none"; + imageMenuFormSourceInput.style.padding = "0 5px"; + imageMenuFormSourceInput.placeholder = "Insert a Link"; + + imageMenuForm.style.display = "flex"; + imageMenuForm.style.justifyContent = "space-between"; + imageMenuForm.style.margin = "5px 0"; + + imageMenuButton.style.float = "right"; + imageMenuButton.style.padding = "6px 12px"; + imageMenuButton.style.border = "1px solid #4cae4c"; + imageMenuButton.style.backgroundColor = "#5cb85c"; + imageMenuButton.style.fontSize = "14px"; + imageMenuButton.style.color = "#fff"; + imageMenuButton.style.outline = "none"; + + imageMenuButton.onmouseenter = () => + (imageMenuButton.style.backgroundColor = "#4cae4c"); + imageMenuButton.onmouseleave = () => + (imageMenuButton.style.backgroundColor = "#5cb85c"); + imageMenuForm.appendChild(imageMenuFormLabel); - imageMenuForm.appendChild(imageMenuFormInput); + imageMenuForm.appendChild(imageMenuFormSourceInput); + + // Height Input Form + const imageMenuHeightForm = imageMenuForm.cloneNode(true); + const imageMenuHeightFormInput = imageMenuHeightForm.querySelector('input'); + const imageMenuHeightFormLabel = imageMenuHeightForm.querySelector('p'); + + imageMenuHeightFormInput.placeholder = "Image Height"; + imageMenuHeightFormLabel.textContent = "Height"; + + // Width Input Form + const imageMenuWidthForm = imageMenuForm.cloneNode(true); + const imageMenuWidthFormInput = imageMenuWidthForm.querySelector('input'); + const imageMenuWidthFormLabel = imageMenuWidthForm.querySelector('p'); + + imageMenuWidthFormInput.placeholder = "Image Height"; + imageMenuWidthFormLabel.textContent = "Width"; + + imageMenuButton.onclick = e => { + const linkValue = imageMenuFormSourceInput.value; + const heightValue = imageMenuHeightFormInput.value; + const widthValue = imageMenuWidthFormInput.value; + + if (linkValue) { + window.getSelection().removeAllRanges(); + window.getSelection().addRange(this.range); + document.execCommand("insertImage", true, linkValue); + + const imageTags = this.body.querySelectorAll("img"); + imageTags[imageTags.length - 1].style.height = `${heightValue}px`; + imageTags[imageTags.length - 1].style.width = `${widthValue}px`; + + imageMenuHeightFormInput.value = ""; + imageMenuWidthFormInput.value = ""; + imageMenuFormSourceInput.value = ""; + this.toolbar.querySelector("#toolbar-image").onclick(); + } else { + this.body.focus(); + this.imageMenu.dataset.active = "false"; + e.target.parentElement.style.display = "none"; + } + }; + imageMenu.appendChild(imageMenuHeightForm); + imageMenu.appendChild(imageMenuWidthForm); imageMenu.appendChild(imageMenuForm); imageMenu.appendChild(imageMenuButton);