{"version":3,"sources":["../node_modules/classnames/index.js","../node_modules/prop-types/index.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/react-show-more-text/lib/ShowMoreText.js","../node_modules/react-show-more-text/lib/Truncate.js"],"names":["__WEBPACK_AMD_DEFINE_RESULT__","hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","key","call","join","module","exports","default","undefined","__webpack_require__","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","Object","defineProperty","value","obj","_react","__esModule","_typeof","cache","_getRequireWildcardCache","has","get","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","prototype","desc","set","_interopRequireWildcard","_propTypes","_Truncate","WeakMap","Symbol","iterator","constructor","_defineProperties","target","descriptor","enumerable","configurable","writable","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Date","toString","e","_isNativeReflectConstruct","result","Super","_getPrototypeOf","NewTarget","this","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","getPrototypeOf","_defineProperty","ShowMoreText","_Component","subClass","superClass","TypeError","create","_inherits","Constructor","protoProps","staticProps","_super","_this","instance","_classCallCheck","truncated","_isMounted","state","setState","truncateRef","onResize","event","preventDefault","_self","expanded","onClick","_this2","_this$props","children","more","less","lines","anchorClass","className","width","keepNewLines","_this$state","createElement","ellipsis","href","toggleLines","onTruncate","handleTruncate","ref","_ref","split","map","line","arr","Component","_default","_interopRequireDefault","_extends","assign","source","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","Truncate","_React$Component","_len","args","_key","concat","content","replacedLinks","replace","item","slice","repeat","forEach","createMarkup","div","document","contentKey","window","HTMLElement","innerHTML","extractReplaceLinksKeys","text","test","calcTargetWidth","didTruncate","timeout","requestAnimationFrame","callback","_assertThisInitialize","elements","canvasContext","targetWidth","Math","floor","parentNode","getBoundingClientRect","style","getComputedStyle","font","measureText","offsetWidth","str","dangerouslySetInnerHTML","__html","_assertThisInitialize2","_assertThisInitialize3","numLines","trimWhitespace","innerText","measureWidth","trimRight","renderLine","restoreReplacedLinks","textLines","ellipsisWidth","textWords","resultLine","textRest","lower","upper","middle","lastLineText","pop","substr","substring","_lower","_upper","_middle","splice","shift","br","position","visibility","top","left","canvas","getContext","removeChild","addEventListener","prevProps","forceUpdate","removeEventListener","cancelAnimationFrame","spanProps","getLines","targetEl","textEl","ellipsisEl","styles"],"mappings":"2EAAA,IAAAA,GAOA,WACA,aAEA,IAAAC,EAAA,GAAiBC,eAEjB,SAAAC,IAGA,IAFA,IAAAC,EAAA,GAEAC,EAAA,EAAmBA,EAAAC,UAAAC,OAAsBF,IAAA,CACzC,IAAAG,EAAAF,UAAAD,GACA,GAAAG,EAAA,CACA,IAAAC,SAAAD,EAEA,cAAAC,GAAA,WAAAA,EACAL,EAAAM,KAAAF,QACO,GAAAG,MAAAC,QAAAJ,MAAAD,OAAA,CACP,IAAAM,EAAAV,EAAAW,MAAA,KAAAN,GAEAK,GACAT,EAAAM,KAAAG,QAEO,cAAAJ,EACP,QAAAM,KAAAP,EACAP,EAAAe,KAAAR,EAAAO,IAAAP,EAAAO,IACAX,EAAAM,KAAAK,IAMA,OAAAX,EAAAa,KAAA,KAGmCC,EAAAC,SACnChB,EAAAiB,QAAAjB,EACAe,EAAAC,QAAAhB,QAKKkB,KAFsBrB,EAAA,WAC3B,OAAAG,GACKW,MAAAK,EAFoB,OAEpBD,EAAAC,QAAAnB,GAxCL,yBCSAkB,EAAAC,QAAmBG,EAAQ,KAARA,sCCRnB,IAAAC,EAA2BD,E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AAiJ,WAEDlJ,EAAAC,QAAAgK,EAEAhE,EAAAgE,EAAA,aACApC,SAAAlE,EAAA1D,QAAAgC,KACAsG,SAAA5E,EAAA1D,QAAAgC,KACA+F,MAAArE,EAAA1D,QAAAmC,UAAA,CAAAuB,EAAA1D,QAAAkC,MAAA,MAAAwB,EAAA1D,QAAAuB,SACAwL,eAAArJ,EAAA1D,QAAAqB,KACA6G,MAAAxE,EAAA1D,QAAAuB,OACAkH,WAAA/E,EAAA1D,QAAAsB,OAGA0E,EAAAgE,EAAA,gBACApC,SAAA,GACAU,SAAA,SACAP,MAAA,EACAgF,gBAAA,EACA7E,MAAA","file":"static/js/13.d51ff858.chunk.js","sourcesContent":["/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n/* global define */\n(function () {\n 'use strict';\n\n var hasOwn = {}.hasOwnProperty;\n\n function classNames() {\n var classes = [];\n\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (!arg) continue;\n var argType = typeof arg;\n\n if (argType === 'string' || argType === 'number') {\n classes.push(arg);\n } else if (Array.isArray(arg) && arg.length) {\n var inner = classNames.apply(null, arg);\n\n if (inner) {\n classes.push(inner);\n }\n } else if (argType === 'object') {\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n }\n\n if (typeof module !== 'undefined' && module.exports) {\n classNames.default = classNames;\n module.exports = classNames;\n } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n // register as 'classnames', consistent with npm package name\n define('classnames', [], function () {\n return classNames;\n });\n } else {\n window.classNames = classNames;\n }\n})();","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is'); // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n\n\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nfunction emptyFunctionWithReset() {}\n\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n ;\n shim.isRequired = shim;\n\n function getShim() {\n return shim;\n }\n\n ; // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = require(\"prop-types\");\n\nvar _Truncate = _interopRequireDefault(require(\"./Truncate\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj.default = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(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 _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\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\nvar ShowMoreText = /*#__PURE__*/function (_Component) {\n _inherits(ShowMoreText, _Component);\n\n var _super = _createSuper(ShowMoreText);\n\n function ShowMoreText(props) {\n var _this;\n\n _classCallCheck(this, ShowMoreText);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"_isMounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"handleTruncate\", function (truncated) {\n if (_this._isMounted && truncated !== _this.state.truncated) {\n _this.setState({\n truncated: truncated\n });\n\n if (truncated) {\n _this.truncateRef.onResize();\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"toggleLines\", function (event) {\n event.preventDefault();\n\n var _self = _assertThisInitialized(_this);\n\n if (_this._isMounted) {\n _this.setState({\n expanded: !_this.state.expanded\n }, function () {\n if (_self.props.onClick) {\n _self.props.onClick(_self.state.expanded);\n }\n });\n }\n });\n\n _this.state = {\n expanded: false,\n truncated: false\n };\n return _this;\n }\n\n _createClass(ShowMoreText, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this._isMounted = true;\n\n var _self = this;\n\n if (this._isMounted) {\n this.setState({\n expanded: _self.props.expanded\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this._isMounted = false;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n children = _this$props.children,\n more = _this$props.more,\n less = _this$props.less,\n lines = _this$props.lines,\n anchorClass = _this$props.anchorClass,\n className = _this$props.className,\n width = _this$props.width,\n keepNewLines = _this$props.keepNewLines;\n var _this$state = this.state,\n expanded = _this$state.expanded,\n truncated = _this$state.truncated;\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: className\n }, /*#__PURE__*/_react.default.createElement(_Truncate.default, {\n width: width,\n lines: !expanded && lines,\n ellipsis: /*#__PURE__*/_react.default.createElement(\"span\", null, \"...\", ' ', /*#__PURE__*/_react.default.createElement(\"a\", {\n href: \"\",\n className: anchorClass,\n onClick: this.toggleLines\n }, more)),\n onTruncate: this.handleTruncate,\n ref: function ref(_ref) {\n return _this2.truncateRef = _ref;\n }\n }, keepNewLines ? children.split('\\n').map(function (line, i, arr) {\n line = /*#__PURE__*/_react.default.createElement(\"span\", {\n key: i\n }, line);\n\n if (i === arr.length - 1) {\n return line;\n } else {\n return [line, /*#__PURE__*/_react.default.createElement(\"br\", {\n key: i + 'br'\n })];\n }\n }) : children), !truncated && expanded && /*#__PURE__*/_react.default.createElement(\"span\", null, ' ', /*#__PURE__*/_react.default.createElement(\"a\", {\n href: \"\",\n className: anchorClass,\n onClick: this.toggleLines\n }, less)));\n }\n }]);\n\n return ShowMoreText;\n}(_react.Component);\n\n_defineProperty(ShowMoreText, \"defaultProps\", {\n lines: 3,\n more: 'Show more',\n less: 'Show less',\n anchorClass: '',\n onClick: undefined,\n expanded: false,\n width: 0,\n keepNewLines: false\n});\n\n_defineProperty(ShowMoreText, \"propTypes\", {\n children: _propTypes.PropTypes.node,\n lines: _propTypes.PropTypes.number,\n more: _propTypes.PropTypes.node,\n less: _propTypes.PropTypes.node,\n anchorClass: _propTypes.PropTypes.string,\n className: _propTypes.PropTypes.string,\n onClick: _propTypes.PropTypes.func,\n expanded: _propTypes.PropTypes.bool,\n width: _propTypes.PropTypes.number,\n keepNewLines: _propTypes.PropTypes.bool\n});\n\nvar _default = ShowMoreText;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(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 _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _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 _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\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\nvar Truncate = /*#__PURE__*/function (_React$Component) {\n _inherits(Truncate, _React$Component);\n\n var _super = _createSuper(Truncate);\n\n function Truncate() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _classCallCheck(this, Truncate);\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {});\n\n _defineProperty(_assertThisInitialized(_this), \"extractReplaceLinksKeys\", function (content) {\n var _self = _assertThisInitialized(_this),\n i = 0;\n\n _this.replacedLinks = [];\n content.replace(/(]+)>((?:.(?!\\<\\/a\\>))*.)<\\/a>)/g, function () {\n var item = Array.prototype.slice.call(arguments, 1, 4);\n item.key = '[' + '@'.repeat(item[2].length - 1) + '=' + i++ + ']';\n\n _self.replacedLinks.push(item);\n\n content = content.replace(item[0], item.key);\n });\n return content;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"restoreReplacedLinks\", function (content) {\n _this.replacedLinks.forEach(function (item) {\n content = content.replace(item.key, item[0]);\n });\n\n return _this.createMarkup(content);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"innerText\", function (node) {\n var div = document.createElement('div');\n var contentKey = 'innerText' in window.HTMLElement.prototype ? 'innerText' : 'textContent';\n var content = node.innerHTML.replace(/\\r\\n|\\r|\\n/g, ' ');\n div.innerHTML = _this.extractReplaceLinksKeys(content);\n var text = div[contentKey];\n var test = document.createElement('div');\n test.innerHTML = 'foo
bar';\n\n if (test[contentKey].replace(/\\r\\n|\\r/g, '\\n') !== 'foo\\nbar') {\n div.innerHTML = div.innerHTML.replace(//gi, '\\n');\n text = div[contentKey];\n }\n\n return text;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResize\", function () {\n _this.calcTargetWidth();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTruncate\", function (didTruncate) {\n var onTruncate = _this.props.onTruncate;\n\n if (typeof onTruncate === 'function') {\n _this.timeout = window.requestAnimationFrame(function () {\n onTruncate(didTruncate);\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"calcTargetWidth\", function (callback) {\n var _assertThisInitialize = _assertThisInitialized(_this),\n target = _assertThisInitialize.elements.target,\n calcTargetWidth = _assertThisInitialize.calcTargetWidth,\n canvasContext = _assertThisInitialize.canvasContext,\n width = _assertThisInitialize.props.width; // Calculation is no longer relevant, since node has been removed\n\n\n if (!target) {\n return;\n }\n\n var targetWidth = width || // Floor the result to deal with browser subpixel precision\n Math.floor(target.parentNode.getBoundingClientRect().width); // Delay calculation until parent node is inserted to the document\n // Mounting order in React is ChildComponent, ParentComponent\n\n if (!targetWidth) {\n return window.requestAnimationFrame(function () {\n return calcTargetWidth(callback);\n });\n }\n\n var style = window.getComputedStyle(target);\n var font = [style['font-weight'], style['font-style'], style['font-size'], style['font-family']].join(' ');\n canvasContext.font = font;\n\n _this.setState({\n targetWidth: targetWidth\n }, callback);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"measureWidth\", function (text) {\n return _this.canvasContext.measureText(text).width;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ellipsisWidth\", function (node) {\n return node.offsetWidth;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"trimRight\", function (text) {\n return text.replace(/\\s+$/, '');\n });\n\n _defineProperty(_assertThisInitialized(_this), \"createMarkup\", function (str) {\n return /*#__PURE__*/_react.default.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: str\n }\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getLines\", function () {\n var _assertThisInitialize2 = _assertThisInitialized(_this),\n elements = _assertThisInitialize2.elements,\n _assertThisInitialize3 = _assertThisInitialize2.props,\n numLines = _assertThisInitialize3.lines,\n ellipsis = _assertThisInitialize3.ellipsis,\n trimWhitespace = _assertThisInitialize3.trimWhitespace,\n targetWidth = _assertThisInitialize2.state.targetWidth,\n innerText = _assertThisInitialize2.innerText,\n measureWidth = _assertThisInitialize2.measureWidth,\n onTruncate = _assertThisInitialize2.onTruncate,\n trimRight = _assertThisInitialize2.trimRight,\n renderLine = _assertThisInitialize2.renderLine,\n restoreReplacedLinks = _assertThisInitialize2.restoreReplacedLinks;\n\n var lines = [];\n var text = innerText(elements.text);\n var textLines = text.split('\\n').map(function (line) {\n return line.split(' ');\n });\n var didTruncate = true;\n\n var ellipsisWidth = _this.ellipsisWidth(_this.elements.ellipsis);\n\n for (var line = 1; line <= numLines; line++) {\n var textWords = textLines[0]; // Handle newline\n\n if (textWords.length === 0) {\n lines.push();\n textLines.shift();\n line--;\n continue;\n }\n\n var resultLine = textWords.join(' ');\n\n if (measureWidth(resultLine) <= targetWidth) {\n if (textLines.length === 1) {\n // Line is end of text and fits without truncating\n didTruncate = false;\n resultLine = restoreReplacedLinks(resultLine);\n lines.push(resultLine);\n break;\n }\n }\n\n if (line === numLines) {\n // Binary search determining the longest possible line inluding truncate string\n var textRest = textWords.join(' ');\n var lower = 0;\n var upper = textRest.length - 1;\n\n while (lower <= upper) {\n var middle = Math.floor((lower + upper) / 2);\n var testLine = textRest.slice(0, middle + 1);\n\n if (measureWidth(testLine) + ellipsisWidth <= targetWidth) {\n lower = middle + 1;\n } else {\n upper = middle - 1;\n }\n }\n\n var lastLineText = textRest.slice(0, lower);\n\n if (trimWhitespace) {\n lastLineText = trimRight(lastLineText); // Remove blank lines from the end of text\n\n while (!lastLineText.length && lines.length) {\n var prevLine = lines.pop();\n lastLineText = trimRight(prevLine);\n }\n }\n\n if (lastLineText.substr(lastLineText.length - 2) === '][') {\n lastLineText = lastLineText.substring(0, lastLineText.length - 1);\n }\n\n ;\n lastLineText = lastLineText.replace(/\\[(@)\\1{2,}$/, '');\n lastLineText = restoreReplacedLinks(lastLineText);\n resultLine = /*#__PURE__*/_react.default.createElement(\"span\", null, lastLineText, ellipsis);\n } else {\n // Binary search determining when the line breaks\n var _lower = 0;\n\n var _upper = textWords.length - 1;\n\n while (_lower <= _upper) {\n var _middle = Math.floor((_lower + _upper) / 2);\n\n var _testLine = textWords.slice(0, _middle + 1).join(' ');\n\n if (measureWidth(_testLine) <= targetWidth) {\n _lower = _middle + 1;\n } else {\n _upper = _middle - 1;\n }\n } // The first word of this line is too long to fit it\n\n\n if (_lower === 0) {\n // Jump to processing of last line\n line = numLines - 1;\n continue;\n }\n\n resultLine = textWords.slice(0, _lower).join(' ');\n resultLine = restoreReplacedLinks(resultLine);\n textLines[0].splice(0, _lower);\n }\n\n lines.push(resultLine);\n }\n\n onTruncate(didTruncate);\n return lines.map(renderLine);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"renderLine\", function (line, i, arr) {\n if (i === arr.length - 1) {\n return /*#__PURE__*/_react.default.createElement(\"span\", {\n key: i\n }, line);\n } else {\n var br = /*#__PURE__*/_react.default.createElement(\"br\", {\n key: i + 'br'\n });\n\n if (line) {\n return [/*#__PURE__*/_react.default.createElement(\"span\", {\n key: i\n }, line), br];\n } else {\n return br;\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"styles\", {\n ellipsis: {\n position: 'fixed',\n visibility: 'hidden',\n top: 0,\n left: 0\n }\n });\n\n _this.elements = {};\n _this.replacedLinks = [];\n return _this;\n }\n\n _createClass(Truncate, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var text = this.elements.text,\n calcTargetWidth = this.calcTargetWidth,\n onResize = this.onResize;\n var canvas = document.createElement('canvas');\n this.canvasContext = canvas.getContext('2d');\n calcTargetWidth(function () {\n // Node not needed in document tree to read its content\n if (text) {\n text.parentNode.removeChild(text);\n }\n });\n window.addEventListener('resize', onResize);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n // Render was based on outdated refs and needs to be rerun\n if (this.props.children !== prevProps.children) {\n this.forceUpdate();\n } // If the width prop has changed, recalculate size of contents\n\n\n if (this.props.width !== prevProps.width) {\n this.calcTargetWidth();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var ellipsis = this.elements.ellipsis,\n onResize = this.onResize,\n timeout = this.timeout;\n ellipsis.parentNode.removeChild(ellipsis);\n window.removeEventListener('resize', onResize);\n window.cancelAnimationFrame(timeout);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var target = this.elements.target,\n _this$props = this.props,\n children = _this$props.children,\n ellipsis = _this$props.ellipsis,\n lines = _this$props.lines,\n spanProps = _objectWithoutProperties(_this$props, [\"children\", \"ellipsis\", \"lines\"]),\n targetWidth = this.state.targetWidth,\n getLines = this.getLines,\n onTruncate = this.onTruncate;\n\n var text;\n var mounted = !!(target && targetWidth);\n\n if (typeof window !== 'undefined' && mounted) {\n if (lines > 0) {\n text = getLines();\n } else {\n text = children;\n onTruncate(false);\n }\n }\n\n delete spanProps.onTruncate;\n delete spanProps.trimWhitespace;\n return /*#__PURE__*/_react.default.createElement(\"span\", _extends({}, spanProps, {\n ref: function ref(targetEl) {\n _this2.elements.target = targetEl;\n }\n }), /*#__PURE__*/_react.default.createElement(\"span\", null, text), /*#__PURE__*/_react.default.createElement(\"span\", {\n ref: function ref(textEl) {\n _this2.elements.text = textEl;\n }\n }, children), /*#__PURE__*/_react.default.createElement(\"span\", {\n ref: function ref(ellipsisEl) {\n _this2.elements.ellipsis = ellipsisEl;\n },\n style: this.styles.ellipsis\n }, ellipsis));\n }\n }]);\n\n return Truncate;\n}(_react.default.Component);\n\nexports.default = Truncate;\n\n_defineProperty(Truncate, \"propTypes\", {\n children: _propTypes.default.node,\n ellipsis: _propTypes.default.node,\n lines: _propTypes.default.oneOfType([_propTypes.default.oneOf([false]), _propTypes.default.number]),\n trimWhitespace: _propTypes.default.bool,\n width: _propTypes.default.number,\n onTruncate: _propTypes.default.func\n});\n\n_defineProperty(Truncate, \"defaultProps\", {\n children: '',\n ellipsis: '…',\n lines: 1,\n trimWhitespace: false,\n width: 0\n});\n\n;"],"sourceRoot":""}