;\n}}\n );\nexport default ButtonGroup;\n","import Button from './button';\nimport ButtonGroup from './button-group';\nButton.Group = ButtonGroup;\nexport default Button;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.create = exports.connect = exports.Provider = undefined;\n\nvar _Provider2 = require('./Provider');\n\nvar _Provider3 = _interopRequireDefault(_Provider2);\n\nvar _connect2 = require('./connect');\n\nvar _connect3 = _interopRequireDefault(_connect2);\n\nvar _create2 = require('./create');\n\nvar _create3 = _interopRequireDefault(_create2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.Provider = _Provider3.default;\nexports.connect = _connect3.default;\nexports.create = _create3.default;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n// MIT License from https://github.com/kaimallea/isMobile\nvar applePhone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i; // Match 'Android' AND 'Mobile'\n\nvar androidTablet = /Android/i;\nvar amazonPhone = /\\bAndroid(?:.+)SD4930UR\\b/i;\nvar amazonTablet = /\\bAndroid(?:.+)(?:KF[A-Z]{2,4})\\b/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i; // Match 'Windows' AND 'ARM'\n\nvar otherBlackberry = /BlackBerry/i;\nvar otherBlackberry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i; // Match 'Mobile' AND 'Firefox'\n\nfunction match(regex, userAgent) {\n return regex.test(userAgent);\n}\n\nfunction isMobile(userAgent) {\n var ua = userAgent || (typeof navigator !== 'undefined' ? navigator.userAgent : ''); // Facebook mobile app's integrated browser adds a bunch of strings that\n // match everything. Strip it out if it exists.\n\n var tmp = ua.split('[FBAN');\n\n if (typeof tmp[1] !== 'undefined') {\n var _tmp = tmp;\n\n var _tmp2 = _slicedToArray(_tmp, 1);\n\n ua = _tmp2[0];\n } // Twitter mobile app's integrated browser on iPad adds a \"Twitter for\n // iPhone\" string. Same probably happens on other tablet platforms.\n // This will confuse detection so strip it out if it exists.\n\n\n tmp = ua.split('Twitter');\n\n if (typeof tmp[1] !== 'undefined') {\n var _tmp3 = tmp;\n\n var _tmp4 = _slicedToArray(_tmp3, 1);\n\n ua = _tmp4[0];\n }\n\n var result = {\n apple: {\n phone: match(applePhone, ua) && !match(windowsPhone, ua),\n ipod: match(appleIpod, ua),\n tablet: !match(applePhone, ua) && match(appleTablet, ua) && !match(windowsPhone, ua),\n device: (match(applePhone, ua) || match(appleIpod, ua) || match(appleTablet, ua)) && !match(windowsPhone, ua)\n },\n amazon: {\n phone: match(amazonPhone, ua),\n tablet: !match(amazonPhone, ua) && match(amazonTablet, ua),\n device: match(amazonPhone, ua) || match(amazonTablet, ua)\n },\n android: {\n phone: !match(windowsPhone, ua) && match(amazonPhone, ua) || !match(windowsPhone, ua) && match(androidPhone, ua),\n tablet: !match(windowsPhone, ua) && !match(amazonPhone, ua) && !match(androidPhone, ua) && (match(amazonTablet, ua) || match(androidTablet, ua)),\n device: !match(windowsPhone, ua) && (match(amazonPhone, ua) || match(amazonTablet, ua) || match(androidPhone, ua) || match(androidTablet, ua)) || match(/\\bokhttp\\b/i, ua)\n },\n windows: {\n phone: match(windowsPhone, ua),\n tablet: match(windowsTablet, ua),\n device: match(windowsPhone, ua) || match(windowsTablet, ua)\n },\n other: {\n blackberry: match(otherBlackberry, ua),\n blackberry10: match(otherBlackberry10, ua),\n opera: match(otherOpera, ua),\n firefox: match(otherFirefox, ua),\n chrome: match(otherChrome, ua),\n device: match(otherBlackberry, ua) || match(otherBlackberry10, ua) || match(otherOpera, ua) || match(otherFirefox, ua) || match(otherChrome, ua)\n },\n // Additional\n any: null,\n phone: null,\n tablet: null\n };\n result.any = result.apple.device || result.android.device || result.windows.device || result.other.device; // excludes 'other' devices and ipods, targeting touchscreen phones\n\n result.phone = result.apple.phone || result.android.phone || result.windows.phone;\n result.tablet = result.apple.tablet || result.android.tablet || result.windows.tablet;\n return result;\n}\n\nvar defaultResult = _objectSpread({}, isMobile(), {\n isMobile: isMobile\n});\n\nexport default defaultResult;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport * as React from 'react';\nimport isMobile from './utils/isMobile';\nexport function noop() {}\nexport function getKeyFromChildrenIndex(child, menuEventKey, index) {\n var prefix = menuEventKey || '';\n return child.key || \"\".concat(prefix, \"item_\").concat(index);\n}\nexport function getMenuIdFromSubMenuEventKey(eventKey) {\n return \"\".concat(eventKey, \"-menu-\");\n}\nexport function loopMenuItem(children, cb) {\n var index = -1;\n React.Children.forEach(children, function (c) {\n index += 1;\n\n if (c && c.type && c.type.isMenuItemGroup) {\n React.Children.forEach(c.props.children, function (c2) {\n index += 1;\n cb(c2, index);\n });\n } else {\n cb(c, index);\n }\n });\n}\nexport function loopMenuItemRecursively(children, keys, ret) {\n /* istanbul ignore if */\n if (!children || ret.find) {\n return;\n }\n\n React.Children.forEach(children, function (c) {\n if (c) {\n var construct = c.type;\n\n if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) {\n return;\n }\n\n if (keys.indexOf(c.key) !== -1) {\n ret.find = true;\n } else if (c.props.children) {\n loopMenuItemRecursively(c.props.children, keys, ret);\n }\n }\n });\n}\nexport var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator', 'motion', // the following keys found need to be removed from test regression\n'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon']; // ref: https://github.com/ant-design/ant-design/issues/14007\n// ref: https://bugs.chromium.org/p/chromium/issues/detail?id=360889\n// getBoundingClientRect return the full precision value, which is\n// not the same behavior as on chrome. Set the precision to 6 to\n// unify their behavior\n\nexport var getWidth = function getWidth(elem) {\n var width = elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width;\n\n if (width) {\n width = +width.toFixed(6);\n }\n\n return width || 0;\n};\nexport var setStyle = function setStyle(elem, styleProperty, value) {\n if (elem && _typeof(elem.style) === 'object') {\n elem.style[styleProperty] = value;\n }\n};\nexport var isMobileDevice = function isMobileDevice() {\n return isMobile.any;\n};","var autoAdjustOverflow = {\n adjustX: 1,\n adjustY: 1\n};\nexport var placements = {\n topLeft: {\n points: ['bl', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [0, -7]\n },\n bottomLeft: {\n points: ['tl', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [0, 7]\n },\n leftTop: {\n points: ['tr', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0]\n },\n rightTop: {\n points: ['tl', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [4, 0]\n }\n};\nexport default placements;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport Trigger from 'rc-trigger';\nimport KeyCode from \"rc-util/es/KeyCode\"; // import Animate from 'rc-animate';\n\nimport CSSMotion from \"rc-animate/es/CSSMotion\";\nimport classNames from 'classnames';\nimport { connect } from 'mini-store';\nimport SubPopupMenu from './SubPopupMenu';\nimport placements from './placements';\nimport { noop, loopMenuItemRecursively, getMenuIdFromSubMenuEventKey, menuAllProps } from './util';\nvar guid = 0;\nvar popupPlacementMap = {\n horizontal: 'bottomLeft',\n vertical: 'rightTop',\n 'vertical-left': 'rightTop',\n 'vertical-right': 'leftTop'\n};\n\nvar updateDefaultActiveFirst = function updateDefaultActiveFirst(store, eventKey, defaultActiveFirst) {\n var menuId = getMenuIdFromSubMenuEventKey(eventKey);\n var state = store.getState();\n store.setState({\n defaultActiveFirst: _objectSpread({}, state.defaultActiveFirst, _defineProperty({}, menuId, defaultActiveFirst))\n });\n};\n\nexport var SubMenu =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(SubMenu, _React$Component);\n\n function SubMenu(props) {\n var _this;\n\n _classCallCheck(this, SubMenu);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(SubMenu).call(this, props));\n\n _this.onDestroy = function (key) {\n _this.props.onDestroy(key);\n };\n /**\n * note:\n * This legacy code that `onKeyDown` is called by parent instead of dom self.\n * which need return code to check if this event is handled\n */\n\n\n _this.onKeyDown = function (e) {\n var keyCode = e.keyCode;\n var menu = _this.menuInstance;\n var _this$props = _this.props,\n isOpen = _this$props.isOpen,\n store = _this$props.store;\n\n if (keyCode === KeyCode.ENTER) {\n _this.onTitleClick(e);\n\n updateDefaultActiveFirst(store, _this.props.eventKey, true);\n return true;\n }\n\n if (keyCode === KeyCode.RIGHT) {\n if (isOpen) {\n menu.onKeyDown(e);\n } else {\n _this.triggerOpenChange(true); // need to update current menu's defaultActiveFirst value\n\n\n updateDefaultActiveFirst(store, _this.props.eventKey, true);\n }\n\n return true;\n }\n\n if (keyCode === KeyCode.LEFT) {\n var handled;\n\n if (isOpen) {\n handled = menu.onKeyDown(e);\n } else {\n return undefined;\n }\n\n if (!handled) {\n _this.triggerOpenChange(false);\n\n handled = true;\n }\n\n return handled;\n }\n\n if (isOpen && (keyCode === KeyCode.UP || keyCode === KeyCode.DOWN)) {\n return menu.onKeyDown(e);\n }\n\n return undefined;\n };\n\n _this.onOpenChange = function (e) {\n _this.props.onOpenChange(e);\n };\n\n _this.onPopupVisibleChange = function (visible) {\n _this.triggerOpenChange(visible, visible ? 'mouseenter' : 'mouseleave');\n };\n\n _this.onMouseEnter = function (e) {\n var _this$props2 = _this.props,\n key = _this$props2.eventKey,\n onMouseEnter = _this$props2.onMouseEnter,\n store = _this$props2.store;\n updateDefaultActiveFirst(store, _this.props.eventKey, false);\n onMouseEnter({\n key: key,\n domEvent: e\n });\n };\n\n _this.onMouseLeave = function (e) {\n var _this$props3 = _this.props,\n parentMenu = _this$props3.parentMenu,\n eventKey = _this$props3.eventKey,\n onMouseLeave = _this$props3.onMouseLeave;\n parentMenu.subMenuInstance = _assertThisInitialized(_this);\n onMouseLeave({\n key: eventKey,\n domEvent: e\n });\n };\n\n _this.onTitleMouseEnter = function (domEvent) {\n var _this$props4 = _this.props,\n key = _this$props4.eventKey,\n onItemHover = _this$props4.onItemHover,\n onTitleMouseEnter = _this$props4.onTitleMouseEnter;\n onItemHover({\n key: key,\n hover: true\n });\n onTitleMouseEnter({\n key: key,\n domEvent: domEvent\n });\n };\n\n _this.onTitleMouseLeave = function (e) {\n var _this$props5 = _this.props,\n parentMenu = _this$props5.parentMenu,\n eventKey = _this$props5.eventKey,\n onItemHover = _this$props5.onItemHover,\n onTitleMouseLeave = _this$props5.onTitleMouseLeave;\n parentMenu.subMenuInstance = _assertThisInitialized(_this);\n onItemHover({\n key: eventKey,\n hover: false\n });\n onTitleMouseLeave({\n key: eventKey,\n domEvent: e\n });\n };\n\n _this.onTitleClick = function (e) {\n var _assertThisInitialize = _assertThisInitialized(_this),\n props = _assertThisInitialize.props;\n\n props.onTitleClick({\n key: props.eventKey,\n domEvent: e\n });\n\n if (props.triggerSubMenuAction === 'hover') {\n return;\n }\n\n _this.triggerOpenChange(!props.isOpen, 'click');\n\n updateDefaultActiveFirst(props.store, _this.props.eventKey, false);\n };\n\n _this.onSubMenuClick = function (info) {\n // in the case of overflowed submenu\n // onClick is not copied over\n if (typeof _this.props.onClick === 'function') {\n _this.props.onClick(_this.addKeyPath(info));\n }\n };\n\n _this.onSelect = function (info) {\n _this.props.onSelect(info);\n };\n\n _this.onDeselect = function (info) {\n _this.props.onDeselect(info);\n };\n\n _this.getPrefixCls = function () {\n return \"\".concat(_this.props.rootPrefixCls, \"-submenu\");\n };\n\n _this.getActiveClassName = function () {\n return \"\".concat(_this.getPrefixCls(), \"-active\");\n };\n\n _this.getDisabledClassName = function () {\n return \"\".concat(_this.getPrefixCls(), \"-disabled\");\n };\n\n _this.getSelectedClassName = function () {\n return \"\".concat(_this.getPrefixCls(), \"-selected\");\n };\n\n _this.getOpenClassName = function () {\n return \"\".concat(_this.props.rootPrefixCls, \"-submenu-open\");\n };\n\n _this.saveMenuInstance = function (c) {\n // children menu instance\n _this.menuInstance = c;\n };\n\n _this.addKeyPath = function (info) {\n return _objectSpread({}, info, {\n keyPath: (info.keyPath || []).concat(_this.props.eventKey)\n });\n };\n\n _this.triggerOpenChange = function (open, type) {\n var key = _this.props.eventKey;\n\n var openChange = function openChange() {\n _this.onOpenChange({\n key: key,\n item: _assertThisInitialized(_this),\n trigger: type,\n open: open\n });\n };\n\n if (type === 'mouseenter') {\n // make sure mouseenter happen after other menu item's mouseleave\n _this.mouseenterTimeout = setTimeout(function () {\n openChange();\n }, 0);\n } else {\n openChange();\n }\n };\n\n _this.isChildrenSelected = function () {\n var ret = {\n find: false\n };\n loopMenuItemRecursively(_this.props.children, _this.props.selectedKeys, ret);\n return ret.find;\n };\n\n _this.isOpen = function () {\n return _this.props.openKeys.indexOf(_this.props.eventKey) !== -1;\n };\n\n _this.adjustWidth = function () {\n /* istanbul ignore if */\n if (!_this.subMenuTitle || !_this.menuInstance) {\n return;\n }\n\n var popupMenu = ReactDOM.findDOMNode(_this.menuInstance);\n\n if (popupMenu.offsetWidth >= _this.subMenuTitle.offsetWidth) {\n return;\n }\n /* istanbul ignore next */\n\n\n popupMenu.style.minWidth = \"\".concat(_this.subMenuTitle.offsetWidth, \"px\");\n };\n\n _this.saveSubMenuTitle = function (subMenuTitle) {\n _this.subMenuTitle = subMenuTitle;\n };\n\n var store = props.store,\n eventKey = props.eventKey;\n\n var _store$getState = store.getState(),\n defaultActiveFirst = _store$getState.defaultActiveFirst;\n\n _this.isRootMenu = false;\n var value = false;\n\n if (defaultActiveFirst) {\n value = defaultActiveFirst[eventKey];\n }\n\n updateDefaultActiveFirst(store, eventKey, value);\n return _this;\n }\n\n _createClass(SubMenu, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n mode = _this$props6.mode,\n parentMenu = _this$props6.parentMenu,\n manualRef = _this$props6.manualRef; // invoke customized ref to expose component to mixin\n\n if (manualRef) {\n manualRef(this);\n }\n\n if (mode !== 'horizontal' || !parentMenu.isRootMenu || !this.props.isOpen) {\n return;\n }\n\n this.minWidthTimeout = setTimeout(function () {\n return _this2.adjustWidth();\n }, 0);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var _this$props7 = this.props,\n onDestroy = _this$props7.onDestroy,\n eventKey = _this$props7.eventKey;\n\n if (onDestroy) {\n onDestroy(eventKey);\n }\n /* istanbul ignore if */\n\n\n if (this.minWidthTimeout) {\n clearTimeout(this.minWidthTimeout);\n }\n /* istanbul ignore if */\n\n\n if (this.mouseenterTimeout) {\n clearTimeout(this.mouseenterTimeout);\n }\n }\n }, {\n key: \"renderChildren\",\n value: function renderChildren(children) {\n var _this3 = this;\n\n var props = this.props;\n var baseProps = {\n mode: props.mode === 'horizontal' ? 'vertical' : props.mode,\n visible: this.props.isOpen,\n level: props.level + 1,\n inlineIndent: props.inlineIndent,\n focusable: false,\n onClick: this.onSubMenuClick,\n onSelect: this.onSelect,\n onDeselect: this.onDeselect,\n onDestroy: this.onDestroy,\n selectedKeys: props.selectedKeys,\n eventKey: \"\".concat(props.eventKey, \"-menu-\"),\n openKeys: props.openKeys,\n motion: props.motion,\n onOpenChange: this.onOpenChange,\n subMenuOpenDelay: props.subMenuOpenDelay,\n parentMenu: this,\n subMenuCloseDelay: props.subMenuCloseDelay,\n forceSubMenuRender: props.forceSubMenuRender,\n triggerSubMenuAction: props.triggerSubMenuAction,\n builtinPlacements: props.builtinPlacements,\n defaultActiveFirst: props.store.getState().defaultActiveFirst[getMenuIdFromSubMenuEventKey(props.eventKey)],\n multiple: props.multiple,\n prefixCls: props.rootPrefixCls,\n id: this.internalMenuId,\n manualRef: this.saveMenuInstance,\n itemIcon: props.itemIcon,\n expandIcon: props.expandIcon\n };\n var haveRendered = this.haveRendered;\n this.haveRendered = true;\n this.haveOpened = this.haveOpened || baseProps.visible || baseProps.forceSubMenuRender; // never rendered not planning to, don't render\n\n if (!this.haveOpened) {\n return React.createElement(\"div\", null);\n } // ================== Motion ==================\n // don't show transition on first rendering (no animation for opened menu)\n // show appear transition if it's not visible (not sure why)\n // show appear transition if it's not inline mode\n\n\n var mergedMotion = _objectSpread({}, props.motion, {\n leavedClassName: \"\".concat(props.rootPrefixCls, \"-hidden\"),\n removeOnLeave: false,\n motionAppear: haveRendered || !baseProps.visible || baseProps.mode !== 'inline'\n });\n\n return React.createElement(CSSMotion, Object.assign({\n visible: baseProps.visible\n }, mergedMotion), function (_ref) {\n var className = _ref.className,\n style = _ref.style;\n var mergedClassName = classNames(\"\".concat(baseProps.prefixCls, \"-sub\"), className);\n return React.createElement(SubPopupMenu, Object.assign({}, baseProps, {\n id: _this3.internalMenuId,\n className: mergedClassName,\n style: style\n }), children);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames;\n\n var props = _objectSpread({}, this.props);\n\n var isOpen = props.isOpen;\n var prefixCls = this.getPrefixCls();\n var isInlineMode = props.mode === 'inline';\n var className = classNames(prefixCls, \"\".concat(prefixCls, \"-\").concat(props.mode), (_classNames = {}, _defineProperty(_classNames, props.className, !!props.className), _defineProperty(_classNames, this.getOpenClassName(), isOpen), _defineProperty(_classNames, this.getActiveClassName(), props.active || isOpen && !isInlineMode), _defineProperty(_classNames, this.getDisabledClassName(), props.disabled), _defineProperty(_classNames, this.getSelectedClassName(), this.isChildrenSelected()), _classNames));\n\n if (!this.internalMenuId) {\n if (props.eventKey) {\n this.internalMenuId = \"\".concat(props.eventKey, \"$Menu\");\n } else {\n guid += 1;\n this.internalMenuId = \"$__$\".concat(guid, \"$Menu\");\n }\n }\n\n var mouseEvents = {};\n var titleClickEvents = {};\n var titleMouseEvents = {};\n\n if (!props.disabled) {\n mouseEvents = {\n onMouseLeave: this.onMouseLeave,\n onMouseEnter: this.onMouseEnter\n }; // only works in title, not outer li\n\n titleClickEvents = {\n onClick: this.onTitleClick\n };\n titleMouseEvents = {\n onMouseEnter: this.onTitleMouseEnter,\n onMouseLeave: this.onTitleMouseLeave\n };\n }\n\n var style = {};\n\n if (isInlineMode) {\n style.paddingLeft = props.inlineIndent * props.level;\n }\n\n var ariaOwns = {}; // only set aria-owns when menu is open\n // otherwise it would be an invalid aria-owns value\n // since corresponding node cannot be found\n\n if (this.props.isOpen) {\n ariaOwns = {\n 'aria-owns': this.internalMenuId\n };\n } // expand custom icon should NOT be displayed in menu with horizontal mode.\n\n\n var icon = null;\n\n if (props.mode !== 'horizontal') {\n icon = this.props.expandIcon; // ReactNode\n\n if (typeof this.props.expandIcon === 'function') {\n icon = React.createElement(this.props.expandIcon, _objectSpread({}, this.props));\n }\n }\n\n var title = React.createElement(\"div\", Object.assign({\n ref: this.saveSubMenuTitle,\n style: style,\n className: \"\".concat(prefixCls, \"-title\")\n }, titleMouseEvents, titleClickEvents, {\n \"aria-expanded\": isOpen\n }, ariaOwns, {\n \"aria-haspopup\": \"true\",\n title: typeof props.title === 'string' ? props.title : undefined\n }), props.title, icon || React.createElement(\"i\", {\n className: \"\".concat(prefixCls, \"-arrow\")\n }));\n var children = this.renderChildren(props.children);\n var getPopupContainer = props.parentMenu.isRootMenu ? props.parentMenu.props.getPopupContainer : function (triggerNode) {\n return triggerNode.parentNode;\n };\n var popupPlacement = popupPlacementMap[props.mode];\n var popupAlign = props.popupOffset ? {\n offset: props.popupOffset\n } : {};\n var popupClassName = props.mode === 'inline' ? '' : props.popupClassName;\n var disabled = props.disabled,\n triggerSubMenuAction = props.triggerSubMenuAction,\n subMenuOpenDelay = props.subMenuOpenDelay,\n forceSubMenuRender = props.forceSubMenuRender,\n subMenuCloseDelay = props.subMenuCloseDelay,\n builtinPlacements = props.builtinPlacements;\n menuAllProps.forEach(function (key) {\n return delete props[key];\n }); // Set onClick to null, to ignore propagated onClick event\n\n delete props.onClick;\n return React.createElement(\"li\", Object.assign({}, props, mouseEvents, {\n className: className,\n role: \"menuitem\"\n }), isInlineMode && title, isInlineMode && children, !isInlineMode && React.createElement(Trigger, {\n prefixCls: prefixCls,\n popupClassName: \"\".concat(prefixCls, \"-popup \").concat(popupClassName),\n getPopupContainer: getPopupContainer,\n builtinPlacements: Object.assign({}, placements, builtinPlacements),\n popupPlacement: popupPlacement,\n popupVisible: isOpen,\n popupAlign: popupAlign,\n popup: children,\n action: disabled ? [] : [triggerSubMenuAction],\n mouseEnterDelay: subMenuOpenDelay,\n mouseLeaveDelay: subMenuCloseDelay,\n onPopupVisibleChange: this.onPopupVisibleChange,\n forceRender: forceSubMenuRender\n }, title));\n }\n }]);\n\n return SubMenu;\n}(React.Component);\nSubMenu.defaultProps = {\n onMouseEnter: noop,\n onMouseLeave: noop,\n onTitleMouseEnter: noop,\n onTitleMouseLeave: noop,\n onTitleClick: noop,\n manualRef: noop,\n mode: 'vertical',\n title: ''\n};\nvar connected = connect(function (_ref2, _ref3) {\n var openKeys = _ref2.openKeys,\n activeKey = _ref2.activeKey,\n selectedKeys = _ref2.selectedKeys;\n var eventKey = _ref3.eventKey,\n subMenuKey = _ref3.subMenuKey;\n return {\n isOpen: openKeys.indexOf(eventKey) > -1,\n active: activeKey[subMenuKey] === eventKey,\n selectedKeys: selectedKeys\n };\n})(SubMenu);\nconnected.isSubMenu = true;\nexport default connected;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _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\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport SubMenu from './SubMenu';\nimport { getWidth, setStyle, menuAllProps } from './util';\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nvar MENUITEM_OVERFLOWED_CLASSNAME = 'menuitem-overflowed';\nvar FLOAT_PRECISION_ADJUST = 0.5; // Fix ssr\n\nif (canUseDOM) {\n // eslint-disable-next-line global-require\n require('mutationobserver-shim');\n}\n\nvar DOMWrap =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(DOMWrap, _React$Component);\n\n function DOMWrap() {\n var _this;\n\n _classCallCheck(this, DOMWrap);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(DOMWrap).apply(this, arguments));\n _this.resizeObserver = null;\n _this.mutationObserver = null; // original scroll size of the list\n\n _this.originalTotalWidth = 0; // copy of overflowed items\n\n _this.overflowedItems = []; // cache item of the original items (so we can track the size and order)\n\n _this.menuItemSizes = [];\n _this.state = {\n lastVisibleIndex: undefined\n }; // get all valid menuItem nodes\n\n _this.getMenuItemNodes = function () {\n var prefixCls = _this.props.prefixCls;\n var ul = ReactDOM.findDOMNode(_assertThisInitialized(_this));\n\n if (!ul) {\n return [];\n } // filter out all overflowed indicator placeholder\n\n\n return [].slice.call(ul.children).filter(function (node) {\n return node.className.split(' ').indexOf(\"\".concat(prefixCls, \"-overflowed-submenu\")) < 0;\n });\n };\n\n _this.getOverflowedSubMenuItem = function (keyPrefix, overflowedItems, renderPlaceholder) {\n var _this$props = _this.props,\n overflowedIndicator = _this$props.overflowedIndicator,\n level = _this$props.level,\n mode = _this$props.mode,\n prefixCls = _this$props.prefixCls,\n theme = _this$props.theme;\n\n if (level !== 1 || mode !== 'horizontal') {\n return null;\n } // put all the overflowed item inside a submenu\n // with a title of overflow indicator ('...')\n\n\n var copy = _this.props.children[0];\n\n var _copy$props = copy.props,\n throwAway = _copy$props.children,\n title = _copy$props.title,\n propStyle = _copy$props.style,\n rest = _objectWithoutProperties(_copy$props, [\"children\", \"title\", \"style\"]);\n\n var style = _objectSpread({}, propStyle);\n\n var key = \"\".concat(keyPrefix, \"-overflowed-indicator\");\n var eventKey = \"\".concat(keyPrefix, \"-overflowed-indicator\");\n\n if (overflowedItems.length === 0 && renderPlaceholder !== true) {\n style = _objectSpread({}, style, {\n display: 'none'\n });\n } else if (renderPlaceholder) {\n style = _objectSpread({}, style, {\n visibility: 'hidden',\n // prevent from taking normal dom space\n position: 'absolute'\n });\n key = \"\".concat(key, \"-placeholder\");\n eventKey = \"\".concat(eventKey, \"-placeholder\");\n }\n\n var popupClassName = theme ? \"\".concat(prefixCls, \"-\").concat(theme) : '';\n var props = {};\n menuAllProps.forEach(function (k) {\n if (rest[k] !== undefined) {\n props[k] = rest[k];\n }\n });\n return React.createElement(SubMenu, Object.assign({\n title: overflowedIndicator,\n className: \"\".concat(prefixCls, \"-overflowed-submenu\"),\n popupClassName: popupClassName\n }, props, {\n key: key,\n eventKey: eventKey,\n disabled: false,\n style: style\n }), overflowedItems);\n }; // memorize rendered menuSize\n\n\n _this.setChildrenWidthAndResize = function () {\n if (_this.props.mode !== 'horizontal') {\n return;\n }\n\n var ul = ReactDOM.findDOMNode(_assertThisInitialized(_this));\n\n if (!ul) {\n return;\n }\n\n var ulChildrenNodes = ul.children;\n\n if (!ulChildrenNodes || ulChildrenNodes.length === 0) {\n return;\n }\n\n var lastOverflowedIndicatorPlaceholder = ul.children[ulChildrenNodes.length - 1]; // need last overflowed indicator for calculating length;\n\n setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'inline-block');\n\n var menuItemNodes = _this.getMenuItemNodes(); // reset display attribute for all hidden elements caused by overflow to calculate updated width\n // and then reset to original state after width calculation\n\n\n var overflowedItems = menuItemNodes.filter(function (c) {\n return c.className.split(' ').indexOf(MENUITEM_OVERFLOWED_CLASSNAME) >= 0;\n });\n overflowedItems.forEach(function (c) {\n setStyle(c, 'display', 'inline-block');\n });\n _this.menuItemSizes = menuItemNodes.map(function (c) {\n return getWidth(c);\n });\n overflowedItems.forEach(function (c) {\n setStyle(c, 'display', 'none');\n });\n _this.overflowedIndicatorWidth = getWidth(ul.children[ul.children.length - 1]);\n _this.originalTotalWidth = _this.menuItemSizes.reduce(function (acc, cur) {\n return acc + cur;\n }, 0);\n\n _this.handleResize(); // prevent the overflowed indicator from taking space;\n\n\n setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'none');\n };\n\n _this.handleResize = function () {\n if (_this.props.mode !== 'horizontal') {\n return;\n }\n\n var ul = ReactDOM.findDOMNode(_assertThisInitialized(_this));\n\n if (!ul) {\n return;\n }\n\n var width = getWidth(ul);\n _this.overflowedItems = [];\n var currentSumWidth = 0; // index for last visible child in horizontal mode\n\n var lastVisibleIndex; // float number comparison could be problematic\n // e.g. 0.1 + 0.2 > 0.3 =====> true\n // thus using FLOAT_PRECISION_ADJUST as buffer to help the situation\n\n if (_this.originalTotalWidth > width + FLOAT_PRECISION_ADJUST) {\n lastVisibleIndex = -1;\n\n _this.menuItemSizes.forEach(function (liWidth) {\n currentSumWidth += liWidth;\n\n if (currentSumWidth + _this.overflowedIndicatorWidth <= width) {\n lastVisibleIndex += 1;\n }\n });\n }\n\n _this.setState({\n lastVisibleIndex: lastVisibleIndex\n });\n };\n\n return _this;\n }\n\n _createClass(DOMWrap, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n this.setChildrenWidthAndResize();\n\n if (this.props.level === 1 && this.props.mode === 'horizontal') {\n var menuUl = ReactDOM.findDOMNode(this);\n\n if (!menuUl) {\n return;\n }\n\n this.resizeObserver = new ResizeObserver(function (entries) {\n entries.forEach(_this2.setChildrenWidthAndResize);\n });\n [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) {\n _this2.resizeObserver.observe(el);\n });\n\n if (typeof MutationObserver !== 'undefined') {\n this.mutationObserver = new MutationObserver(function () {\n _this2.resizeObserver.disconnect();\n\n [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) {\n _this2.resizeObserver.observe(el);\n });\n\n _this2.setChildrenWidthAndResize();\n });\n this.mutationObserver.observe(menuUl, {\n attributes: false,\n childList: true,\n subTree: false\n });\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n if (this.mutationObserver) {\n this.resizeObserver.disconnect();\n }\n }\n }, {\n key: \"renderChildren\",\n value: function renderChildren(children) {\n var _this3 = this;\n\n // need to take care of overflowed items in horizontal mode\n var lastVisibleIndex = this.state.lastVisibleIndex;\n return (children || []).reduce(function (acc, childNode, index) {\n var item = childNode;\n\n if (_this3.props.mode === 'horizontal') {\n var overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, []);\n\n if (lastVisibleIndex !== undefined && _this3.props.className.indexOf(\"\".concat(_this3.props.prefixCls, \"-root\")) !== -1) {\n if (index > lastVisibleIndex) {\n item = React.cloneElement(childNode, // 这里修改 eventKey 是为了防止隐藏状态下还会触发 openkeys 事件\n {\n style: {\n display: 'none'\n },\n eventKey: \"\".concat(childNode.props.eventKey, \"-hidden\"),\n\n /**\n * Legacy code. Here `className` never used:\n * https://github.com/react-component/menu/commit/4cd6b49fce9d116726f4ea00dda85325d6f26500#diff-e2fa48f75c2dd2318295cde428556a76R240\n */\n className: \"\".concat(MENUITEM_OVERFLOWED_CLASSNAME)\n });\n }\n\n if (index === lastVisibleIndex + 1) {\n _this3.overflowedItems = children.slice(lastVisibleIndex + 1).map(function (c) {\n return React.cloneElement(c, // children[index].key will become '.$key' in clone by default,\n // we have to overwrite with the correct key explicitly\n {\n key: c.props.eventKey,\n mode: 'vertical-left'\n });\n });\n overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, _this3.overflowedItems);\n }\n }\n\n var ret = [].concat(_toConsumableArray(acc), [overflowed, item]);\n\n if (index === children.length - 1) {\n // need a placeholder for calculating overflowed indicator width\n ret.push(_this3.getOverflowedSubMenuItem(childNode.props.eventKey, [], true));\n }\n\n return ret;\n }\n\n return [].concat(_toConsumableArray(acc), [item]);\n }, []);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n visible = _this$props2.visible,\n prefixCls = _this$props2.prefixCls,\n overflowedIndicator = _this$props2.overflowedIndicator,\n mode = _this$props2.mode,\n level = _this$props2.level,\n tag = _this$props2.tag,\n children = _this$props2.children,\n theme = _this$props2.theme,\n rest = _objectWithoutProperties(_this$props2, [\"visible\", \"prefixCls\", \"overflowedIndicator\", \"mode\", \"level\", \"tag\", \"children\", \"theme\"]);\n\n var Tag = tag;\n return React.createElement(Tag, Object.assign({}, rest), this.renderChildren(children));\n }\n }]);\n\n return DOMWrap;\n}(React.Component);\n\nDOMWrap.defaultProps = {\n tag: 'div',\n className: ''\n};\nexport default DOMWrap;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport * as React from 'react';\nimport { connect } from 'mini-store';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport createChainedFunction from \"rc-util/es/createChainedFunction\";\nimport shallowEqual from 'shallowequal';\nimport classNames from 'classnames';\nimport { getKeyFromChildrenIndex, loopMenuItem, noop, menuAllProps, isMobileDevice } from './util';\nimport DOMWrap from './DOMWrap';\n\nfunction allDisabled(arr) {\n if (!arr.length) {\n return true;\n }\n\n return arr.every(function (c) {\n return !!c.props.disabled;\n });\n}\n\nfunction updateActiveKey(store, menuId, activeKey) {\n var state = store.getState();\n store.setState({\n activeKey: _objectSpread({}, state.activeKey, _defineProperty({}, menuId, activeKey))\n });\n}\n\nfunction getEventKey(props) {\n // when eventKey not available ,it's menu and return menu id '0-menu-'\n return props.eventKey || '0-menu-';\n}\n\nexport function getActiveKey(props, originalActiveKey) {\n var activeKey = originalActiveKey;\n var children = props.children,\n eventKey = props.eventKey;\n\n if (activeKey) {\n var found;\n loopMenuItem(children, function (c, i) {\n if (c && c.props && !c.props.disabled && activeKey === getKeyFromChildrenIndex(c, eventKey, i)) {\n found = true;\n }\n });\n\n if (found) {\n return activeKey;\n }\n }\n\n activeKey = null;\n\n if (props.defaultActiveFirst) {\n loopMenuItem(children, function (c, i) {\n if (!activeKey && c && !c.props.disabled) {\n activeKey = getKeyFromChildrenIndex(c, eventKey, i);\n }\n });\n return activeKey;\n }\n\n return activeKey;\n}\nexport function saveRef(c) {\n if (c) {\n var index = this.instanceArray.indexOf(c);\n\n if (index !== -1) {\n // update component if it's already inside instanceArray\n this.instanceArray[index] = c;\n } else {\n // add component if it's not in instanceArray yet;\n this.instanceArray.push(c);\n }\n }\n}\nexport var SubPopupMenu =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(SubPopupMenu, _React$Component);\n\n function SubPopupMenu(props) {\n var _this;\n\n _classCallCheck(this, SubPopupMenu);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(SubPopupMenu).call(this, props));\n /**\n * all keyboard events callbacks run from here at first\n *\n * note:\n * This legacy code that `onKeyDown` is called by parent instead of dom self.\n * which need return code to check if this event is handled\n */\n\n _this.onKeyDown = function (e, callback) {\n var keyCode = e.keyCode;\n var handled;\n\n _this.getFlatInstanceArray().forEach(function (obj) {\n if (obj && obj.props.active && obj.onKeyDown) {\n handled = obj.onKeyDown(e);\n }\n });\n\n if (handled) {\n return 1;\n }\n\n var activeItem = null;\n\n if (keyCode === KeyCode.UP || keyCode === KeyCode.DOWN) {\n activeItem = _this.step(keyCode === KeyCode.UP ? -1 : 1);\n }\n\n if (activeItem) {\n e.preventDefault();\n updateActiveKey(_this.props.store, getEventKey(_this.props), activeItem.props.eventKey);\n\n if (typeof callback === 'function') {\n callback(activeItem);\n }\n\n return 1;\n }\n\n return undefined;\n };\n\n _this.onItemHover = function (e) {\n var key = e.key,\n hover = e.hover;\n updateActiveKey(_this.props.store, getEventKey(_this.props), hover ? key : null);\n };\n\n _this.onDeselect = function (selectInfo) {\n _this.props.onDeselect(selectInfo);\n };\n\n _this.onSelect = function (selectInfo) {\n _this.props.onSelect(selectInfo);\n };\n\n _this.onClick = function (e) {\n _this.props.onClick(e);\n };\n\n _this.onOpenChange = function (e) {\n _this.props.onOpenChange(e);\n };\n\n _this.onDestroy = function (key) {\n /* istanbul ignore next */\n _this.props.onDestroy(key);\n };\n\n _this.getFlatInstanceArray = function () {\n return _this.instanceArray;\n };\n\n _this.step = function (direction) {\n var children = _this.getFlatInstanceArray();\n\n var activeKey = _this.props.store.getState().activeKey[getEventKey(_this.props)];\n\n var len = children.length;\n\n if (!len) {\n return null;\n }\n\n if (direction < 0) {\n children = children.concat().reverse();\n } // find current activeIndex\n\n\n var activeIndex = -1;\n children.every(function (c, ci) {\n if (c && c.props.eventKey === activeKey) {\n activeIndex = ci;\n return false;\n }\n\n return true;\n });\n\n if (!_this.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) {\n return undefined;\n }\n\n var start = (activeIndex + 1) % len;\n var i = start;\n\n do {\n var child = children[i];\n\n if (!child || child.props.disabled) {\n i = (i + 1) % len;\n } else {\n return child;\n }\n } while (i !== start);\n\n return null;\n };\n\n _this.renderCommonMenuItem = function (child, i, extraProps) {\n var state = _this.props.store.getState();\n\n var _assertThisInitialize = _assertThisInitialized(_this),\n props = _assertThisInitialize.props;\n\n var key = getKeyFromChildrenIndex(child, props.eventKey, i);\n var childProps = child.props; // https://github.com/ant-design/ant-design/issues/11517#issuecomment-477403055\n\n if (!childProps || typeof child.type === 'string') {\n return child;\n }\n\n var isActive = key === state.activeKey;\n\n var newChildProps = _objectSpread({\n mode: childProps.mode || props.mode,\n level: props.level,\n inlineIndent: props.inlineIndent,\n renderMenuItem: _this.renderMenuItem,\n rootPrefixCls: props.prefixCls,\n index: i,\n parentMenu: props.parentMenu,\n // customized ref function, need to be invoked manually in child's componentDidMount\n manualRef: childProps.disabled ? undefined : createChainedFunction(child.ref, saveRef.bind(_assertThisInitialized(_this))),\n eventKey: key,\n active: !childProps.disabled && isActive,\n multiple: props.multiple,\n onClick: function onClick(e) {\n (childProps.onClick || noop)(e);\n\n _this.onClick(e);\n },\n onItemHover: _this.onItemHover,\n motion: props.motion,\n subMenuOpenDelay: props.subMenuOpenDelay,\n subMenuCloseDelay: props.subMenuCloseDelay,\n forceSubMenuRender: props.forceSubMenuRender,\n onOpenChange: _this.onOpenChange,\n onDeselect: _this.onDeselect,\n onSelect: _this.onSelect,\n builtinPlacements: props.builtinPlacements,\n itemIcon: childProps.itemIcon || _this.props.itemIcon,\n expandIcon: childProps.expandIcon || _this.props.expandIcon\n }, extraProps); // ref: https://github.com/ant-design/ant-design/issues/13943\n\n\n if (props.mode === 'inline' || isMobileDevice()) {\n newChildProps.triggerSubMenuAction = 'click';\n }\n\n return React.cloneElement(child, newChildProps);\n };\n\n _this.renderMenuItem = function (c, i, subMenuKey) {\n /* istanbul ignore if */\n if (!c) {\n return null;\n }\n\n var state = _this.props.store.getState();\n\n var extraProps = {\n openKeys: state.openKeys,\n selectedKeys: state.selectedKeys,\n triggerSubMenuAction: _this.props.triggerSubMenuAction,\n subMenuKey: subMenuKey\n };\n return _this.renderCommonMenuItem(c, i, extraProps);\n };\n\n props.store.setState({\n activeKey: _objectSpread({}, props.store.getState().activeKey, _defineProperty({}, props.eventKey, getActiveKey(props, props.activeKey)))\n });\n _this.instanceArray = [];\n return _this;\n }\n\n _createClass(SubPopupMenu, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // invoke customized ref to expose component to mixin\n if (this.props.manualRef) {\n this.props.manualRef(this);\n }\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n return this.props.visible || nextProps.visible || this.props.className !== nextProps.className || !shallowEqual(this.props.style, nextProps.style);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var props = this.props;\n var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)];\n var activeKey = getActiveKey(props, originalActiveKey);\n\n if (activeKey !== originalActiveKey) {\n updateActiveKey(props.store, getEventKey(props), activeKey);\n } else if ('activeKey' in prevProps) {\n // If prev activeKey is not same as current activeKey,\n // we should set it.\n var prevActiveKey = getActiveKey(prevProps, prevProps.activeKey);\n\n if (activeKey !== prevActiveKey) {\n updateActiveKey(props.store, getEventKey(props), activeKey);\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var props = _extends({}, this.props);\n\n this.instanceArray = [];\n var className = classNames(props.prefixCls, props.className, \"\".concat(props.prefixCls, \"-\").concat(props.mode));\n var domProps = {\n className: className,\n // role could be 'select' and by default set to menu\n role: props.role || 'menu'\n };\n\n if (props.id) {\n domProps.id = props.id;\n }\n\n if (props.focusable) {\n domProps.tabIndex = 0;\n domProps.onKeyDown = this.onKeyDown;\n }\n\n var prefixCls = props.prefixCls,\n eventKey = props.eventKey,\n visible = props.visible,\n level = props.level,\n mode = props.mode,\n overflowedIndicator = props.overflowedIndicator,\n theme = props.theme;\n menuAllProps.forEach(function (key) {\n return delete props[key];\n }); // Otherwise, the propagated click event will trigger another onClick\n\n delete props.onClick;\n return React.createElement(DOMWrap, Object.assign({}, props, {\n prefixCls: prefixCls,\n mode: mode,\n tag: \"ul\",\n level: level,\n theme: theme,\n visible: visible,\n overflowedIndicator: overflowedIndicator\n }, domProps), React.Children.map(props.children, function (c, i) {\n return _this2.renderMenuItem(c, i, eventKey || '0-menu-');\n }));\n }\n }]);\n\n return SubPopupMenu;\n}(React.Component);\nSubPopupMenu.defaultProps = {\n prefixCls: 'rc-menu',\n className: '',\n mode: 'vertical',\n level: 1,\n inlineIndent: 24,\n visible: true,\n focusable: true,\n style: {},\n manualRef: noop\n};\nvar connected = connect()(SubPopupMenu);\nexport default connected;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport warning from \"rc-util/es/warning\";\nexport function getMotion(_ref) {\n var prefixCls = _ref.prefixCls,\n motion = _ref.motion,\n openAnimation = _ref.openAnimation,\n openTransitionName = _ref.openTransitionName;\n\n if (motion) {\n return motion;\n }\n\n if (_typeof(openAnimation) === 'object' && openAnimation) {\n warning(false, 'Object type of `openAnimation` is removed. Please use `motion` instead.');\n } else if (typeof openAnimation === 'string') {\n return {\n motionName: \"\".concat(prefixCls, \"-open-\").concat(openAnimation)\n };\n }\n\n if (openTransitionName) {\n return {\n motionName: openTransitionName\n };\n }\n\n return null;\n}","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport { Provider, create } from 'mini-store';\nimport SubPopupMenu, { getActiveKey } from './SubPopupMenu';\nimport { noop } from './util';\nimport { getMotion } from './utils/legacyUtil';\n\nvar Menu =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Menu, _React$Component);\n\n function Menu(props) {\n var _this;\n\n _classCallCheck(this, Menu);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Menu).call(this, props));\n\n _this.onSelect = function (selectInfo) {\n var _assertThisInitialize = _assertThisInitialized(_this),\n props = _assertThisInitialize.props;\n\n if (props.selectable) {\n // root menu\n var _this$store$getState = _this.store.getState(),\n _selectedKeys = _this$store$getState.selectedKeys;\n\n var selectedKey = selectInfo.key;\n\n if (props.multiple) {\n _selectedKeys = _selectedKeys.concat([selectedKey]);\n } else {\n _selectedKeys = [selectedKey];\n }\n\n if (!('selectedKeys' in props)) {\n _this.store.setState({\n selectedKeys: _selectedKeys\n });\n }\n\n props.onSelect(_objectSpread({}, selectInfo, {\n selectedKeys: _selectedKeys\n }));\n }\n };\n\n _this.onClick = function (e) {\n _this.props.onClick(e);\n }; // onKeyDown needs to be exposed as a instance method\n // e.g., in rc-select, we need to navigate menu item while\n // current active item is rc-select input box rather than the menu itself\n\n\n _this.onKeyDown = function (e, callback) {\n _this.innerMenu.getWrappedInstance().onKeyDown(e, callback);\n };\n\n _this.onOpenChange = function (event) {\n var _assertThisInitialize2 = _assertThisInitialized(_this),\n props = _assertThisInitialize2.props;\n\n var openKeys = _this.store.getState().openKeys.concat();\n\n var changed = false;\n\n var processSingle = function processSingle(e) {\n var oneChanged = false;\n\n if (e.open) {\n oneChanged = openKeys.indexOf(e.key) === -1;\n\n if (oneChanged) {\n openKeys.push(e.key);\n }\n } else {\n var index = openKeys.indexOf(e.key);\n oneChanged = index !== -1;\n\n if (oneChanged) {\n openKeys.splice(index, 1);\n }\n }\n\n changed = changed || oneChanged;\n };\n\n if (Array.isArray(event)) {\n // batch change call\n event.forEach(processSingle);\n } else {\n processSingle(event);\n }\n\n if (changed) {\n if (!('openKeys' in _this.props)) {\n _this.store.setState({\n openKeys: openKeys\n });\n }\n\n props.onOpenChange(openKeys);\n }\n };\n\n _this.onDeselect = function (selectInfo) {\n var _assertThisInitialize3 = _assertThisInitialized(_this),\n props = _assertThisInitialize3.props;\n\n if (props.selectable) {\n var _selectedKeys2 = _this.store.getState().selectedKeys.concat();\n\n var selectedKey = selectInfo.key;\n\n var index = _selectedKeys2.indexOf(selectedKey);\n\n if (index !== -1) {\n _selectedKeys2.splice(index, 1);\n }\n\n if (!('selectedKeys' in props)) {\n _this.store.setState({\n selectedKeys: _selectedKeys2\n });\n }\n\n props.onDeselect(_objectSpread({}, selectInfo, {\n selectedKeys: _selectedKeys2\n }));\n }\n };\n\n _this.getOpenTransitionName = function () {\n var _assertThisInitialize4 = _assertThisInitialized(_this),\n props = _assertThisInitialize4.props;\n\n var transitionName = props.openTransitionName;\n var animationName = props.openAnimation;\n\n if (!transitionName && typeof animationName === 'string') {\n transitionName = \"\".concat(props.prefixCls, \"-open-\").concat(animationName);\n }\n\n return transitionName;\n };\n\n _this.setInnerMenu = function (node) {\n _this.innerMenu = node;\n };\n\n _this.isRootMenu = true;\n var selectedKeys = props.defaultSelectedKeys;\n var openKeys = props.defaultOpenKeys;\n\n if ('selectedKeys' in props) {\n selectedKeys = props.selectedKeys || [];\n }\n\n if ('openKeys' in props) {\n openKeys = props.openKeys || [];\n }\n\n _this.store = create({\n selectedKeys: selectedKeys,\n openKeys: openKeys,\n activeKey: {\n '0-menu-': getActiveKey(props, props.activeKey)\n }\n });\n return _this;\n }\n\n _createClass(Menu, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateMiniStore();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.updateMiniStore();\n }\n }, {\n key: \"updateMiniStore\",\n value: function updateMiniStore() {\n if ('selectedKeys' in this.props) {\n this.store.setState({\n selectedKeys: this.props.selectedKeys || []\n });\n }\n\n if ('openKeys' in this.props) {\n this.store.setState({\n openKeys: this.props.openKeys || []\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var props = _objectSpread({}, this.props);\n\n props.className += \" \".concat(props.prefixCls, \"-root\");\n props = _objectSpread({}, props, {\n onClick: this.onClick,\n onOpenChange: this.onOpenChange,\n onDeselect: this.onDeselect,\n onSelect: this.onSelect,\n parentMenu: this,\n motion: getMotion(this.props)\n });\n delete props.openAnimation;\n delete props.openTransitionName;\n return React.createElement(Provider, {\n store: this.store\n }, React.createElement(SubPopupMenu, Object.assign({}, props, {\n ref: this.setInnerMenu\n }), this.props.children));\n }\n }]);\n\n return Menu;\n}(React.Component);\n\nMenu.defaultProps = {\n selectable: true,\n onClick: noop,\n onSelect: noop,\n onOpenChange: noop,\n onDeselect: noop,\n defaultSelectedKeys: [],\n defaultOpenKeys: [],\n subMenuOpenDelay: 0.1,\n subMenuCloseDelay: 0.1,\n triggerSubMenuAction: 'hover',\n prefixCls: 'rc-menu',\n className: '',\n mode: 'vertical',\n style: {},\n builtinPlacements: {},\n overflowedIndicator: React.createElement(\"span\", null, \"\\xB7\\xB7\\xB7\")\n};\nexport default Menu;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport classNames from 'classnames';\nimport scrollIntoView from 'dom-scroll-into-view';\nimport { connect } from 'mini-store';\nimport { noop, menuAllProps } from './util';\nexport var MenuItem =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(MenuItem, _React$Component);\n\n function MenuItem() {\n var _this;\n\n _classCallCheck(this, MenuItem);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(MenuItem).apply(this, arguments));\n\n _this.onKeyDown = function (e) {\n var keyCode = e.keyCode;\n\n if (keyCode === KeyCode.ENTER) {\n _this.onClick(e);\n\n return true;\n }\n\n return undefined;\n };\n\n _this.onMouseLeave = function (e) {\n var _this$props = _this.props,\n eventKey = _this$props.eventKey,\n onItemHover = _this$props.onItemHover,\n onMouseLeave = _this$props.onMouseLeave;\n onItemHover({\n key: eventKey,\n hover: false\n });\n onMouseLeave({\n key: eventKey,\n domEvent: e\n });\n };\n\n _this.onMouseEnter = function (e) {\n var _this$props2 = _this.props,\n eventKey = _this$props2.eventKey,\n onItemHover = _this$props2.onItemHover,\n onMouseEnter = _this$props2.onMouseEnter;\n onItemHover({\n key: eventKey,\n hover: true\n });\n onMouseEnter({\n key: eventKey,\n domEvent: e\n });\n };\n\n _this.onClick = function (e) {\n var _this$props3 = _this.props,\n eventKey = _this$props3.eventKey,\n multiple = _this$props3.multiple,\n onClick = _this$props3.onClick,\n onSelect = _this$props3.onSelect,\n onDeselect = _this$props3.onDeselect,\n isSelected = _this$props3.isSelected;\n var info = {\n key: eventKey,\n keyPath: [eventKey],\n item: _assertThisInitialized(_this),\n domEvent: e\n };\n onClick(info);\n\n if (multiple) {\n if (isSelected) {\n onDeselect(info);\n } else {\n onSelect(info);\n }\n } else if (!isSelected) {\n onSelect(info);\n }\n };\n\n _this.saveNode = function (node) {\n _this.node = node;\n };\n\n return _this;\n }\n\n _createClass(MenuItem, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // invoke customized ref to expose component to mixin\n this.callRef();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props4 = this.props,\n active = _this$props4.active,\n parentMenu = _this$props4.parentMenu,\n eventKey = _this$props4.eventKey; // 在 parentMenu 上层保存滚动状态,避免重复的 MenuItem key 导致滚动跳动\n // https://github.com/ant-design/ant-design/issues/16181\n\n if (!prevProps.active && active && (!parentMenu || !parentMenu[\"scrolled-\".concat(eventKey)])) {\n if (this.node) {\n scrollIntoView(this.node, ReactDOM.findDOMNode(parentMenu), {\n onlyScrollIfNeeded: true\n });\n parentMenu[\"scrolled-\".concat(eventKey)] = true;\n }\n } else if (parentMenu && parentMenu[\"scrolled-\".concat(eventKey)]) {\n delete parentMenu[\"scrolled-\".concat(eventKey)];\n }\n\n this.callRef();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var props = this.props;\n\n if (props.onDestroy) {\n props.onDestroy(props.eventKey);\n }\n }\n }, {\n key: \"getPrefixCls\",\n value: function getPrefixCls() {\n return \"\".concat(this.props.rootPrefixCls, \"-item\");\n }\n }, {\n key: \"getActiveClassName\",\n value: function getActiveClassName() {\n return \"\".concat(this.getPrefixCls(), \"-active\");\n }\n }, {\n key: \"getSelectedClassName\",\n value: function getSelectedClassName() {\n return \"\".concat(this.getPrefixCls(), \"-selected\");\n }\n }, {\n key: \"getDisabledClassName\",\n value: function getDisabledClassName() {\n return \"\".concat(this.getPrefixCls(), \"-disabled\");\n }\n }, {\n key: \"callRef\",\n value: function callRef() {\n if (this.props.manualRef) {\n this.props.manualRef(this);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames;\n\n var props = _objectSpread({}, this.props);\n\n var className = classNames(this.getPrefixCls(), props.className, (_classNames = {}, _defineProperty(_classNames, this.getActiveClassName(), !props.disabled && props.active), _defineProperty(_classNames, this.getSelectedClassName(), props.isSelected), _defineProperty(_classNames, this.getDisabledClassName(), props.disabled), _classNames));\n\n var attrs = _objectSpread({}, props.attribute, {\n title: props.title,\n className: className,\n // set to menuitem by default\n role: props.role || 'menuitem',\n 'aria-disabled': props.disabled\n });\n\n if (props.role === 'option') {\n // overwrite to option\n attrs = _objectSpread({}, attrs, {\n role: 'option',\n 'aria-selected': props.isSelected\n });\n } else if (props.role === null || props.role === 'none') {\n // sometimes we want to specify role inside
element\n //
Link would be a good example\n // in this case the role on
should be \"none\" to\n // remove the implied listitem role.\n // https://www.w3.org/TR/wai-aria-practices-1.1/examples/menubar/menubar-1/menubar-1.html\n attrs.role = 'none';\n } // In case that onClick/onMouseLeave/onMouseEnter is passed down from owner\n\n\n var mouseEvent = {\n onClick: props.disabled ? null : this.onClick,\n onMouseLeave: props.disabled ? null : this.onMouseLeave,\n onMouseEnter: props.disabled ? null : this.onMouseEnter\n };\n\n var style = _objectSpread({}, props.style);\n\n if (props.mode === 'inline') {\n style.paddingLeft = props.inlineIndent * props.level;\n }\n\n menuAllProps.forEach(function (key) {\n return delete props[key];\n });\n var icon = this.props.itemIcon;\n\n if (typeof this.props.itemIcon === 'function') {\n // TODO: This is a bug which should fixed after TS refactor\n icon = React.createElement(this.props.itemIcon, this.props);\n }\n\n return React.createElement(\"li\", Object.assign({}, props, attrs, mouseEvent, {\n style: style,\n ref: this.saveNode\n }), props.children, icon);\n }\n }]);\n\n return MenuItem;\n}(React.Component);\nMenuItem.isMenuItem = true;\nMenuItem.defaultProps = {\n onSelect: noop,\n onMouseEnter: noop,\n onMouseLeave: noop,\n manualRef: noop\n};\nvar connected = connect(function (_ref, _ref2) {\n var activeKey = _ref.activeKey,\n selectedKeys = _ref.selectedKeys;\n var eventKey = _ref2.eventKey,\n subMenuKey = _ref2.subMenuKey;\n return {\n active: activeKey[subMenuKey] === eventKey,\n isSelected: selectedKeys.indexOf(eventKey) !== -1\n };\n})(MenuItem);\nexport default connected;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport { menuAllProps } from './util';\n\nvar MenuItemGroup =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(MenuItemGroup, _React$Component);\n\n function MenuItemGroup() {\n var _this;\n\n _classCallCheck(this, MenuItemGroup);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(MenuItemGroup).apply(this, arguments));\n\n _this.renderInnerMenuItem = function (item) {\n var _this$props = _this.props,\n renderMenuItem = _this$props.renderMenuItem,\n index = _this$props.index;\n return renderMenuItem(item, index, _this.props.subMenuKey);\n };\n\n return _this;\n }\n\n _createClass(MenuItemGroup, [{\n key: \"render\",\n value: function render() {\n var props = _extends({}, this.props);\n\n var _props$className = props.className,\n className = _props$className === void 0 ? '' : _props$className,\n rootPrefixCls = props.rootPrefixCls;\n var titleClassName = \"\".concat(rootPrefixCls, \"-item-group-title\");\n var listClassName = \"\".concat(rootPrefixCls, \"-item-group-list\");\n var title = props.title,\n children = props.children;\n menuAllProps.forEach(function (key) {\n return delete props[key];\n }); // Set onClick to null, to ignore propagated onClick event\n\n delete props.onClick;\n return React.createElement(\"li\", Object.assign({}, props, {\n className: \"\".concat(className, \" \").concat(rootPrefixCls, \"-item-group\")\n }), React.createElement(\"div\", {\n className: titleClassName,\n title: typeof title === 'string' ? title : undefined\n }, title), React.createElement(\"ul\", {\n className: listClassName\n }, React.Children.map(children, this.renderInnerMenuItem)));\n }\n }]);\n\n return MenuItemGroup;\n}(React.Component);\n\nMenuItemGroup.isMenuItemGroup = true;\nMenuItemGroup.defaultProps = {\n disabled: true\n};\nexport default MenuItemGroup;","import * as React from 'react';\n\nvar Divider = function Divider(_ref) {\n var className = _ref.className,\n rootPrefixCls = _ref.rootPrefixCls,\n style = _ref.style;\n return React.createElement(\"li\", {\n className: \"\".concat(className, \" \").concat(rootPrefixCls, \"-item-divider\"),\n style: style\n });\n};\n\nDivider.defaultProps = {\n // To fix keyboard UX.\n disabled: true,\n className: '',\n style: {}\n};\nexport default Divider;","import Menu from './Menu';\nimport SubMenu from './SubMenu';\nimport MenuItem from './MenuItem';\nimport MenuItemGroup from './MenuItemGroup';\nimport Divider from './Divider';\nexport { SubMenu, MenuItem as Item, MenuItem, MenuItemGroup, MenuItemGroup as ItemGroup, Divider };\nexport default Menu;","import locale from '../locale/default';\nexport default locale;\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport defaultLocaleData from './default';\nexport default class LocaleReceiver extends React.Component {\n getLocale() {\n const { componentName, defaultLocale } = this.props;\n const locale = defaultLocale || defaultLocaleData[componentName || 'global'];\n const { antLocale } = this.context;\n const localeFromContext = componentName && antLocale ? antLocale[componentName] : {};\n return Object.assign(Object.assign({}, (typeof locale === 'function' ? locale() : locale)), (localeFromContext || {}));\n }\n getLocaleCode() {\n const { antLocale } = this.context;\n const localeCode = antLocale && antLocale.locale;\n // Had use LocaleProvide but didn't set locale\n if (antLocale && antLocale.exist && !localeCode) {\n return defaultLocaleData.locale;\n }\n return localeCode;\n }\n render() {\n return this.props.children(this.getLocale(), this.getLocaleCode(), this.context.antLocale);\n }\n}\nLocaleReceiver.defaultProps = {\n componentName: 'global',\n};\nLocaleReceiver.contextTypes = {\n antLocale: PropTypes.object,\n};\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\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}","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","// https://github.com/moment/moment/issues/3650\n// since we are using ts 3.5.1, it should be safe to remove.\nexport default function interopDefault(m) {\n return m.default || m;\n}\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { polyfill } from 'react-lifecycles-compat';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport { tuple } from '../_util/type';\nimport ClearableLabeledInput, { hasPrefixSuffix } from './ClearableLabeledInput';\nimport { ConfigConsumer } from '../config-provider';\nimport warning from '../_util/warning';\nexport const InputSizes = tuple('small', 'default', 'large');\nexport function fixControlledValue(value) {\n if (typeof value === 'undefined' || value === null) {\n return '';\n }\n return value;\n}\nexport function resolveOnChange(target, e, onChange) {\n if (onChange) {\n let event = e;\n if (e.type === 'click') {\n // click clear icon\n event = Object.create(e);\n event.target = target;\n event.currentTarget = target;\n const originalInputValue = target.value;\n // change target ref value cause e.target.value should be '' when clear input\n target.value = '';\n onChange(event);\n // reset target ref value\n target.value = originalInputValue;\n return;\n }\n onChange(event);\n }\n}\nexport function getInputClassName(prefixCls, size, disabled) {\n return classNames(prefixCls, {\n [`${prefixCls}-sm`]: size === 'small',\n [`${prefixCls}-lg`]: size === 'large',\n [`${prefixCls}-disabled`]: disabled,\n });\n}\nclass Input extends React.Component {\n constructor(props) {\n super(props);\n this.saveClearableInput = (input) => {\n this.clearableInput = input;\n };\n this.saveInput = (input) => {\n this.input = input;\n };\n this.handleReset = (e) => {\n this.setValue('', () => {\n this.focus();\n });\n resolveOnChange(this.input, e, this.props.onChange);\n };\n this.renderInput = (prefixCls) => {\n const { className, addonBefore, addonAfter, size, disabled } = this.props;\n // Fix https://fb.me/react-unknown-prop\n const otherProps = omit(this.props, [\n 'prefixCls',\n 'onPressEnter',\n 'addonBefore',\n 'addonAfter',\n 'prefix',\n 'suffix',\n 'allowClear',\n // Input elements must be either controlled or uncontrolled,\n // specify either the value prop, or the defaultValue prop, but not both.\n 'defaultValue',\n 'size',\n 'inputType',\n ]);\n return (
);\n };\n this.handleChange = (e) => {\n this.setValue(e.target.value);\n resolveOnChange(this.input, e, this.props.onChange);\n };\n this.handleKeyDown = (e) => {\n const { onPressEnter, onKeyDown } = this.props;\n if (e.keyCode === 13 && onPressEnter) {\n onPressEnter(e);\n }\n if (onKeyDown) {\n onKeyDown(e);\n }\n };\n this.renderComponent = ({ getPrefixCls }) => {\n const { value } = this.state;\n const { prefixCls: customizePrefixCls } = this.props;\n const prefixCls = getPrefixCls('input', customizePrefixCls);\n return (
);\n };\n const value = typeof props.value === 'undefined' ? props.defaultValue : props.value;\n this.state = {\n value,\n };\n }\n static getDerivedStateFromProps(nextProps) {\n if ('value' in nextProps) {\n return {\n value: nextProps.value,\n };\n }\n return null;\n }\n // Since polyfill `getSnapshotBeforeUpdate` need work with `componentDidUpdate`.\n // We keep an empty function here.\n componentDidUpdate() { }\n getSnapshotBeforeUpdate(prevProps) {\n if (hasPrefixSuffix(prevProps) !== hasPrefixSuffix(this.props)) {\n warning(this.input !== document.activeElement, 'Input', `When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ`);\n }\n return null;\n }\n focus() {\n this.input.focus();\n }\n blur() {\n this.input.blur();\n }\n select() {\n this.input.select();\n }\n setValue(value, callback) {\n if (!('value' in this.props)) {\n this.setState({ value }, callback);\n }\n }\n render() {\n return {this.renderComponent};\n }\n}\nInput.defaultProps = {\n type: 'text',\n};\nInput.propTypes = {\n type: PropTypes.string,\n id: PropTypes.string,\n size: PropTypes.oneOf(InputSizes),\n maxLength: PropTypes.number,\n disabled: PropTypes.bool,\n value: PropTypes.any,\n defaultValue: PropTypes.any,\n className: PropTypes.string,\n addonBefore: PropTypes.node,\n addonAfter: PropTypes.node,\n prefixCls: PropTypes.string,\n onPressEnter: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyUp: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n prefix: PropTypes.node,\n suffix: PropTypes.node,\n allowClear: PropTypes.bool,\n};\npolyfill(Input);\nexport default Input;\n","import raf from 'raf';\nlet id = 0;\nconst ids = {};\n// Support call raf with delay specified frame\nexport default function wrapperRaf(callback, delayFrames = 1) {\n const myId = id++;\n let restFrames = delayFrames;\n function internalCallback() {\n restFrames -= 1;\n if (restFrames <= 0) {\n callback();\n delete ids[myId];\n }\n else {\n ids[myId] = raf(internalCallback);\n }\n }\n ids[myId] = raf(internalCallback);\n return myId;\n}\nwrapperRaf.cancel = function cancel(pid) {\n if (pid === undefined)\n return;\n raf.cancel(ids[pid]);\n delete ids[pid];\n};\nwrapperRaf.ids = ids; // export this for test usage\n","import { Row } from '../grid';\nexport default Row;\n","import React from 'react';\n\nexport function toArrayChildren(children) {\n var ret = [];\n React.Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n}\n\nexport function findChildInChildrenByKey(children, key) {\n var ret = null;\n if (children) {\n children.forEach(function (child) {\n if (ret) {\n return;\n }\n if (child && child.key === key) {\n ret = child;\n }\n });\n }\n return ret;\n}\n\nexport function findShownChildInChildrenByKey(children, key, showProp) {\n var ret = null;\n if (children) {\n children.forEach(function (child) {\n if (child && child.key === key && child.props[showProp]) {\n if (ret) {\n throw new Error('two child with same key for children');\n }\n ret = child;\n }\n });\n }\n return ret;\n}\n\nexport function findHiddenChildInChildrenByKey(children, key, showProp) {\n var found = 0;\n if (children) {\n children.forEach(function (child) {\n if (found) {\n return;\n }\n found = child && child.key === key && !child.props[showProp];\n });\n }\n return found;\n}\n\nexport function isSameChildren(c1, c2, showProp) {\n var same = c1.length === c2.length;\n if (same) {\n c1.forEach(function (child, index) {\n var child2 = c2[index];\n if (child && child2) {\n if (child && !child2 || !child && child2) {\n same = false;\n } else if (child.key !== child2.key) {\n same = false;\n } else if (showProp && child.props[showProp] !== child2.props[showProp]) {\n same = false;\n }\n }\n });\n }\n return same;\n}\n\nexport function mergeChildren(prev, next) {\n var ret = [];\n\n // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n var nextChildrenPending = {};\n var pendingChildren = [];\n prev.forEach(function (child) {\n if (child && findChildInChildrenByKey(next, child.key)) {\n if (pendingChildren.length) {\n nextChildrenPending[child.key] = pendingChildren;\n pendingChildren = [];\n }\n } else {\n pendingChildren.push(child);\n }\n });\n\n next.forEach(function (child) {\n if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) {\n ret = ret.concat(nextChildrenPending[child.key]);\n }\n ret.push(child);\n });\n\n ret = ret.concat(pendingChildren);\n\n return ret;\n}","var util = {\n isAppearSupported: function isAppearSupported(props) {\n return props.transitionName && props.transitionAppear || props.animation.appear;\n },\n isEnterSupported: function isEnterSupported(props) {\n return props.transitionName && props.transitionEnter || props.animation.enter;\n },\n isLeaveSupported: function isLeaveSupported(props) {\n return props.transitionName && props.transitionLeave || props.animation.leave;\n },\n allowAppearCallback: function allowAppearCallback(props) {\n return props.transitionAppear || props.animation.appear;\n },\n allowEnterCallback: function allowEnterCallback(props) {\n return props.transitionEnter || props.animation.enter;\n },\n allowLeaveCallback: function allowLeaveCallback(props) {\n return props.transitionLeave || props.animation.leave;\n }\n};\nexport default util;","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport cssAnimate, { isCssAnimationSupported } from 'css-animation';\nimport animUtil from './util/animate';\n\nvar transitionMap = {\n enter: 'transitionEnter',\n appear: 'transitionAppear',\n leave: 'transitionLeave'\n};\n\nvar AnimateChild = function (_React$Component) {\n _inherits(AnimateChild, _React$Component);\n\n function AnimateChild() {\n _classCallCheck(this, AnimateChild);\n\n return _possibleConstructorReturn(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments));\n }\n\n _createClass(AnimateChild, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.stop();\n }\n }, {\n key: 'componentWillEnter',\n value: function componentWillEnter(done) {\n if (animUtil.isEnterSupported(this.props)) {\n this.transition('enter', done);\n } else {\n done();\n }\n }\n }, {\n key: 'componentWillAppear',\n value: function componentWillAppear(done) {\n if (animUtil.isAppearSupported(this.props)) {\n this.transition('appear', done);\n } else {\n done();\n }\n }\n }, {\n key: 'componentWillLeave',\n value: function componentWillLeave(done) {\n if (animUtil.isLeaveSupported(this.props)) {\n this.transition('leave', done);\n } else {\n // always sync, do not interupt with react component life cycle\n // update hidden -> animate hidden ->\n // didUpdate -> animate leave -> unmount (if animate is none)\n done();\n }\n }\n }, {\n key: 'transition',\n value: function transition(animationType, finishCallback) {\n var _this2 = this;\n\n var node = ReactDOM.findDOMNode(this);\n var props = this.props;\n var transitionName = props.transitionName;\n var nameIsObj = typeof transitionName === 'object';\n this.stop();\n var end = function end() {\n _this2.stopper = null;\n finishCallback();\n };\n if ((isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) {\n var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType;\n var activeName = name + '-active';\n if (nameIsObj && transitionName[animationType + 'Active']) {\n activeName = transitionName[animationType + 'Active'];\n }\n this.stopper = cssAnimate(node, {\n name: name,\n active: activeName\n }, end);\n } else {\n this.stopper = props.animation[animationType](node, end);\n }\n }\n }, {\n key: 'stop',\n value: function stop() {\n var stopper = this.stopper;\n if (stopper) {\n this.stopper = null;\n stopper.stop();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return AnimateChild;\n}(React.Component);\n\nAnimateChild.propTypes = {\n children: PropTypes.any,\n animation: PropTypes.any,\n transitionName: PropTypes.any\n};\nexport default AnimateChild;","import _extends from 'babel-runtime/helpers/extends';\nimport _defineProperty from 'babel-runtime/helpers/defineProperty';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport unsafeLifecyclesPolyfill from 'rc-util/es/unsafeLifecyclesPolyfill';\nimport { toArrayChildren, mergeChildren, findShownChildInChildrenByKey, findChildInChildrenByKey, isSameChildren } from './ChildrenUtils';\nimport AnimateChild from './AnimateChild';\nimport animUtil from './util/animate';\n\nvar defaultKey = 'rc_animate_' + Date.now();\n\nfunction getChildrenFromProps(props) {\n var children = props.children;\n if (React.isValidElement(children)) {\n if (!children.key) {\n return React.cloneElement(children, {\n key: defaultKey\n });\n }\n }\n return children;\n}\n\nfunction noop() {}\n\nvar Animate = function (_React$Component) {\n _inherits(Animate, _React$Component);\n\n // eslint-disable-line\n\n function Animate(props) {\n _classCallCheck(this, Animate);\n\n var _this = _possibleConstructorReturn(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.currentlyAnimatingKeys = {};\n _this.keysToEnter = [];\n _this.keysToLeave = [];\n\n _this.state = {\n children: toArrayChildren(getChildrenFromProps(props))\n };\n\n _this.childrenRefs = {};\n return _this;\n }\n\n _createClass(Animate, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n var showProp = this.props.showProp;\n var children = this.state.children;\n if (showProp) {\n children = children.filter(function (child) {\n return !!child.props[showProp];\n });\n }\n children.forEach(function (child) {\n if (child) {\n _this2.performAppear(child.key);\n }\n });\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n this.nextProps = nextProps;\n var nextChildren = toArrayChildren(getChildrenFromProps(nextProps));\n var props = this.props;\n // exclusive needs immediate response\n if (props.exclusive) {\n Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {\n _this3.stop(key);\n });\n }\n var showProp = props.showProp;\n var currentlyAnimatingKeys = this.currentlyAnimatingKeys;\n // last props children if exclusive\n var currentChildren = props.exclusive ? toArrayChildren(getChildrenFromProps(props)) : this.state.children;\n // in case destroy in showProp mode\n var newChildren = [];\n if (showProp) {\n currentChildren.forEach(function (currentChild) {\n var nextChild = currentChild && findChildInChildrenByKey(nextChildren, currentChild.key);\n var newChild = void 0;\n if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {\n newChild = React.cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true));\n } else {\n newChild = nextChild;\n }\n if (newChild) {\n newChildren.push(newChild);\n }\n });\n nextChildren.forEach(function (nextChild) {\n if (!nextChild || !findChildInChildrenByKey(currentChildren, nextChild.key)) {\n newChildren.push(nextChild);\n }\n });\n } else {\n newChildren = mergeChildren(currentChildren, nextChildren);\n }\n\n // need render to avoid update\n this.setState({\n children: newChildren\n });\n\n nextChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasPrev = child && findChildInChildrenByKey(currentChildren, key);\n if (showProp) {\n var showInNext = child.props[showProp];\n if (hasPrev) {\n var showInNow = findShownChildInChildrenByKey(currentChildren, key, showProp);\n if (!showInNow && showInNext) {\n _this3.keysToEnter.push(key);\n }\n } else if (showInNext) {\n _this3.keysToEnter.push(key);\n }\n } else if (!hasPrev) {\n _this3.keysToEnter.push(key);\n }\n });\n\n currentChildren.forEach(function (child) {\n var key = child && child.key;\n if (child && currentlyAnimatingKeys[key]) {\n return;\n }\n var hasNext = child && findChildInChildrenByKey(nextChildren, key);\n if (showProp) {\n var showInNow = child.props[showProp];\n if (hasNext) {\n var showInNext = findShownChildInChildrenByKey(nextChildren, key, showProp);\n if (!showInNext && showInNow) {\n _this3.keysToLeave.push(key);\n }\n } else if (showInNow) {\n _this3.keysToLeave.push(key);\n }\n } else if (!hasNext) {\n _this3.keysToLeave.push(key);\n }\n });\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n var keysToEnter = this.keysToEnter;\n this.keysToEnter = [];\n keysToEnter.forEach(this.performEnter);\n var keysToLeave = this.keysToLeave;\n this.keysToLeave = [];\n keysToLeave.forEach(this.performLeave);\n }\n }, {\n key: 'isValidChildByKey',\n value: function isValidChildByKey(currentChildren, key) {\n var showProp = this.props.showProp;\n if (showProp) {\n return findShownChildInChildrenByKey(currentChildren, key, showProp);\n }\n return findChildInChildrenByKey(currentChildren, key);\n }\n }, {\n key: 'stop',\n value: function stop(key) {\n delete this.currentlyAnimatingKeys[key];\n var component = this.childrenRefs[key];\n if (component) {\n component.stop();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var _this4 = this;\n\n var props = this.props;\n this.nextProps = props;\n var stateChildren = this.state.children;\n var children = null;\n if (stateChildren) {\n children = stateChildren.map(function (child) {\n if (child === null || child === undefined) {\n return child;\n }\n if (!child.key) {\n throw new Error('must set key for children');\n }\n return React.createElement(\n AnimateChild,\n {\n key: child.key,\n ref: function ref(node) {\n _this4.childrenRefs[child.key] = node;\n },\n animation: props.animation,\n transitionName: props.transitionName,\n transitionEnter: props.transitionEnter,\n transitionAppear: props.transitionAppear,\n transitionLeave: props.transitionLeave\n },\n child\n );\n });\n }\n var Component = props.component;\n if (Component) {\n var passedProps = props;\n if (typeof Component === 'string') {\n passedProps = _extends({\n className: props.className,\n style: props.style\n }, props.componentProps);\n }\n return React.createElement(\n Component,\n passedProps,\n children\n );\n }\n return children[0] || null;\n }\n }]);\n\n return Animate;\n}(React.Component);\n\nAnimate.isAnimate = true;\nAnimate.propTypes = {\n className: PropTypes.string,\n style: PropTypes.object,\n component: PropTypes.any,\n componentProps: PropTypes.object,\n animation: PropTypes.object,\n transitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n transitionEnter: PropTypes.bool,\n transitionAppear: PropTypes.bool,\n exclusive: PropTypes.bool,\n transitionLeave: PropTypes.bool,\n onEnd: PropTypes.func,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onAppear: PropTypes.func,\n showProp: PropTypes.string,\n children: PropTypes.node\n};\nAnimate.defaultProps = {\n animation: {},\n component: 'span',\n componentProps: {},\n transitionEnter: true,\n transitionLeave: true,\n transitionAppear: false,\n onEnd: noop,\n onEnter: noop,\n onLeave: noop,\n onAppear: noop\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this5 = this;\n\n this.performEnter = function (key) {\n // may already remove by exclusive\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter'));\n }\n };\n\n this.performAppear = function (key) {\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear'));\n }\n };\n\n this.handleDoneAdding = function (key, type) {\n var props = _this5.props;\n delete _this5.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== _this5.nextProps) {\n return;\n }\n var currentChildren = toArrayChildren(getChildrenFromProps(props));\n if (!_this5.isValidChildByKey(currentChildren, key)) {\n // exclusive will not need this\n _this5.performLeave(key);\n } else if (type === 'appear') {\n if (animUtil.allowAppearCallback(props)) {\n props.onAppear(key);\n props.onEnd(key, true);\n }\n } else if (animUtil.allowEnterCallback(props)) {\n props.onEnter(key);\n props.onEnd(key, true);\n }\n };\n\n this.performLeave = function (key) {\n // may already remove by exclusive\n if (_this5.childrenRefs[key]) {\n _this5.currentlyAnimatingKeys[key] = true;\n _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key));\n }\n };\n\n this.handleDoneLeaving = function (key) {\n var props = _this5.props;\n delete _this5.currentlyAnimatingKeys[key];\n // if update on exclusive mode, skip check\n if (props.exclusive && props !== _this5.nextProps) {\n return;\n }\n var currentChildren = toArrayChildren(getChildrenFromProps(props));\n // in case state change is too fast\n if (_this5.isValidChildByKey(currentChildren, key)) {\n _this5.performEnter(key);\n } else {\n var end = function end() {\n if (animUtil.allowLeaveCallback(props)) {\n props.onLeave(key);\n props.onEnd(key, false);\n }\n };\n if (!isSameChildren(_this5.state.children, currentChildren, props.showProp)) {\n _this5.setState({\n children: currentChildren\n }, end);\n } else {\n end();\n }\n }\n };\n};\n\nexport default unsafeLifecyclesPolyfill(Animate);","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport debounce from 'lodash/debounce';\nimport { ConfigConsumer } from '../config-provider';\nimport { tuple } from '../_util/type';\nconst SpinSizes = tuple('small', 'default', 'large');\n// Render indicator\nlet defaultIndicator = null;\nfunction renderIndicator(prefixCls, props) {\n const { indicator } = props;\n const dotClassName = `${prefixCls}-dot`;\n // should not be render default indicator when indicator value is null\n if (indicator === null) {\n return null;\n }\n if (React.isValidElement(indicator)) {\n return React.cloneElement(indicator, {\n className: classNames(indicator.props.className, dotClassName),\n });\n }\n if (React.isValidElement(defaultIndicator)) {\n return React.cloneElement(defaultIndicator, {\n className: classNames(defaultIndicator.props.className, dotClassName),\n });\n }\n return (\n \n \n \n \n );\n}\nfunction shouldDelay(spinning, delay) {\n return !!spinning && !!delay && !isNaN(Number(delay));\n}\nclass Spin extends React.Component {\n constructor(props) {\n super(props);\n this.debouncifyUpdateSpinning = (props) => {\n const { delay } = props || this.props;\n if (delay) {\n this.cancelExistingSpin();\n this.updateSpinning = debounce(this.originalUpdateSpinning, delay);\n }\n };\n this.updateSpinning = () => {\n const { spinning } = this.props;\n const { spinning: currentSpinning } = this.state;\n if (currentSpinning !== spinning) {\n this.setState({ spinning });\n }\n };\n this.renderSpin = ({ getPrefixCls }) => {\n const _a = this.props, { prefixCls: customizePrefixCls, className, size, tip, wrapperClassName, style } = _a, restProps = __rest(_a, [\"prefixCls\", \"className\", \"size\", \"tip\", \"wrapperClassName\", \"style\"]);\n const { spinning } = this.state;\n const prefixCls = getPrefixCls('spin', customizePrefixCls);\n const spinClassName = classNames(prefixCls, {\n [`${prefixCls}-sm`]: size === 'small',\n [`${prefixCls}-lg`]: size === 'large',\n [`${prefixCls}-spinning`]: spinning,\n [`${prefixCls}-show-text`]: !!tip,\n }, className);\n // fix https://fb.me/react-unknown-prop\n const divProps = omit(restProps, ['spinning', 'delay', 'indicator']);\n const spinElement = (\n {renderIndicator(prefixCls, this.props)}\n {tip ?
{tip}
: null}\n
);\n if (this.isNestedPattern()) {\n const containerClassName = classNames(`${prefixCls}-container`, {\n [`${prefixCls}-blur`]: spinning,\n });\n return (\n {spinning &&
{spinElement}
}\n
\n {this.props.children}\n
\n
);\n }\n return spinElement;\n };\n const { spinning, delay } = props;\n const shouldBeDelayed = shouldDelay(spinning, delay);\n this.state = {\n spinning: spinning && !shouldBeDelayed,\n };\n this.originalUpdateSpinning = this.updateSpinning;\n this.debouncifyUpdateSpinning(props);\n }\n static setDefaultIndicator(indicator) {\n defaultIndicator = indicator;\n }\n componentDidMount() {\n this.updateSpinning();\n }\n componentDidUpdate() {\n this.debouncifyUpdateSpinning();\n this.updateSpinning();\n }\n componentWillUnmount() {\n this.cancelExistingSpin();\n }\n cancelExistingSpin() {\n const { updateSpinning } = this;\n if (updateSpinning && updateSpinning.cancel) {\n updateSpinning.cancel();\n }\n }\n isNestedPattern() {\n return !!(this.props && this.props.children);\n }\n render() {\n return {this.renderSpin};\n }\n}\nSpin.defaultProps = {\n spinning: true,\n size: 'default',\n wrapperClassName: '',\n};\nSpin.propTypes = {\n prefixCls: PropTypes.string,\n className: PropTypes.string,\n spinning: PropTypes.bool,\n size: PropTypes.oneOf(SpinSizes),\n wrapperClassName: PropTypes.string,\n indicator: PropTypes.element,\n};\nexport default Spin;\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = deepMerge(result[key], val);\n } else if (typeof val === 'object') {\n result[key] = deepMerge({}, val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n deepMerge: deepMerge,\n extend: extend,\n trim: trim\n};\n","// @flow\n/* eslint-disable flowtype/object-type-delimiter */\n/* eslint-disable react/prop-types */\n\nimport React, { type Element } from 'react';\nimport { IS_BROWSER, DISABLE_SPEEDY, SC_ATTR, SC_VERSION_ATTR } from '../constants';\nimport StyledError from '../utils/error';\nimport { type ExtractedComp } from '../utils/extractCompsFromCSS';\nimport { splitByRules } from '../utils/stringifyRules';\nimport getNonce from '../utils/nonce';\n\nimport {\n type Names,\n addNameForId,\n resetIdNames,\n hasNameForId,\n stringifyNames,\n cloneNames,\n} from '../utils/styleNames';\n\nimport { sheetForTag, safeInsertRule, deleteRules } from '../utils/insertRuleHelpers';\n\ndeclare var __VERSION__: string;\n\nexport interface Tag {\n // $FlowFixMe: Doesn't seem to accept any combination w/ HTMLStyleElement for some reason\n styleTag: HTMLStyleElement | null;\n /* lists all ids of the tag */\n getIds(): string[];\n /* checks whether `name` is already injected for `id` */\n hasNameForId(id: string, name: string): boolean;\n /* inserts a marker to ensure the id's correct position in the sheet */\n insertMarker(id: string): T;\n /* inserts rules according to the ids markers */\n insertRules(id: string, cssRules: string[], name: ?string): void;\n /* removes all rules belonging to the id, keeping the marker around */\n removeRules(id: string): void;\n css(): string;\n toHTML(additionalAttrs: ?string): string;\n toElement(): Element<*>;\n clone(): Tag;\n /* used in server side rendering to indicate that the rules in the tag have been flushed to HTML */\n sealed: boolean;\n}\n\n/* this marker separates component styles and is important for rehydration */\nconst makeTextMarker = id => `\\n/* sc-component-id: ${id} */\\n`;\n\n/* add up all numbers in array up until and including the index */\nconst addUpUntilIndex = (sizes: number[], index: number): number => {\n let totalUpToIndex = 0;\n for (let i = 0; i <= index; i += 1) {\n totalUpToIndex += sizes[i];\n }\n\n return totalUpToIndex;\n};\n\n/* create a new style tag after lastEl */\nconst makeStyleTag = (target: ?HTMLElement, tagEl: ?Node, insertBefore: ?boolean) => {\n let targetDocument = document;\n if(target) targetDocument = target.ownerDocument;\n else if(tagEl) targetDocument = tagEl.ownerDocument;\n\n const el = targetDocument.createElement('style');\n el.setAttribute(SC_ATTR, '');\n el.setAttribute(SC_VERSION_ATTR, __VERSION__);\n\n const nonce = getNonce();\n if (nonce) {\n el.setAttribute('nonce', nonce);\n }\n\n /* Work around insertRule quirk in EdgeHTML */\n el.appendChild(targetDocument.createTextNode(''));\n\n if (target && !tagEl) {\n /* Append to target when no previous element was passed */\n target.appendChild(el);\n } else {\n if (!tagEl || !target || !tagEl.parentNode) {\n throw new StyledError(6);\n }\n\n /* Insert new style tag after the previous one */\n tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);\n }\n\n return el;\n};\n\n/* takes a css factory function and outputs an html styled tag factory */\nconst wrapAsHtmlTag = (css: () => string, names: Names) => (additionalAttrs: ?string): string => {\n const nonce = getNonce();\n const attrs = [\n nonce && `nonce=\"${nonce}\"`,\n `${SC_ATTR}=\"${stringifyNames(names)}\"`,\n `${SC_VERSION_ATTR}=\"${__VERSION__}\"`,\n additionalAttrs,\n ];\n\n const htmlAttr = attrs.filter(Boolean).join(' ');\n return ``;\n};\n\n/* takes a css factory function and outputs an element factory */\nconst wrapAsElement = (css: () => string, names: Names) => () => {\n const props = {\n [SC_ATTR]: stringifyNames(names),\n [SC_VERSION_ATTR]: __VERSION__,\n };\n\n const nonce = getNonce();\n if (nonce) {\n // $FlowFixMe\n props.nonce = nonce;\n }\n\n // eslint-disable-next-line react/no-danger\n return ;\n};\n\nconst getIdsFromMarkersFactory = (markers: Object) => (): string[] => Object.keys(markers);\n\n/* speedy tags utilise insertRule */\nconst makeSpeedyTag = (el: HTMLStyleElement, getImportRuleTag: ?() => Tag): Tag => {\n const names: Names = (Object.create(null): Object);\n const markers = Object.create(null);\n const sizes: number[] = [];\n\n const extractImport = getImportRuleTag !== undefined;\n /* indicates whether getImportRuleTag was called */\n let usedImportRuleTag = false;\n\n const insertMarker = id => {\n const prev = markers[id];\n if (prev !== undefined) {\n return prev;\n }\n\n markers[id] = sizes.length;\n sizes.push(0);\n resetIdNames(names, id);\n\n return markers[id];\n };\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id);\n const sheet = sheetForTag(el);\n const insertIndex = addUpUntilIndex(sizes, marker);\n\n let injectedRules = 0;\n const importRules = [];\n const cssRulesSize = cssRules.length;\n\n for (let i = 0; i < cssRulesSize; i += 1) {\n const cssRule = cssRules[i];\n let mayHaveImport = extractImport; /* @import rules are reordered to appear first */\n if (mayHaveImport && cssRule.indexOf('@import') !== -1) {\n importRules.push(cssRule);\n } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {\n mayHaveImport = false;\n injectedRules += 1;\n }\n }\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true;\n // $FlowFixMe\n getImportRuleTag().insertRules(`${id}-import`, importRules);\n }\n\n sizes[marker] += injectedRules; /* add up no of injected rules */\n addNameForId(names, id, name);\n };\n\n const removeRules = id => {\n const marker = markers[id];\n if (marker === undefined) return;\n // $FlowFixMe\n if (el.isConnected === false) return;\n\n const size = sizes[marker];\n const sheet = sheetForTag(el);\n const removalIndex = addUpUntilIndex(sizes, marker) - 1;\n deleteRules(sheet, removalIndex, size);\n sizes[marker] = 0;\n resetIdNames(names, id);\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(`${id}-import`);\n }\n };\n\n const css = () => {\n const { cssRules } = sheetForTag(el);\n let str = '';\n\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n str += makeTextMarker(id);\n const marker = markers[id];\n const end = addUpUntilIndex(sizes, marker);\n const size = sizes[marker];\n for (let i = end - size; i < end; i += 1) {\n const rule = cssRules[i];\n if (rule !== undefined) {\n str += rule.cssText;\n }\n }\n }\n\n return str;\n };\n\n return {\n clone() {\n throw new StyledError(5);\n },\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n };\n};\n\nconst makeTextNode = (targetDocument, id) => targetDocument.createTextNode(makeTextMarker(id));\n\nconst makeBrowserTag = (el: HTMLStyleElement, getImportRuleTag: ?() => Tag): Tag => {\n const names = (Object.create(null): Object);\n const markers = Object.create(null);\n\n const extractImport = getImportRuleTag !== undefined;\n\n /* indicates whether getImportRuleTag was called */\n let usedImportRuleTag = false;\n\n const insertMarker = id => {\n const prev = markers[id];\n if (prev !== undefined) {\n return prev;\n }\n\n markers[id] = makeTextNode(el.ownerDocument, id);\n el.appendChild(markers[id]);\n names[id] = Object.create(null);\n\n return markers[id];\n };\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id);\n const importRules = [];\n const cssRulesSize = cssRules.length;\n\n for (let i = 0; i < cssRulesSize; i += 1) {\n const rule = cssRules[i];\n let mayHaveImport = extractImport;\n if (mayHaveImport && rule.indexOf('@import') !== -1) {\n importRules.push(rule);\n } else {\n mayHaveImport = false;\n const separator = i === cssRulesSize - 1 ? '' : ' ';\n marker.appendData(`${rule}${separator}`);\n }\n }\n\n addNameForId(names, id, name);\n\n if (extractImport && importRules.length > 0) {\n usedImportRuleTag = true;\n // $FlowFixMe\n getImportRuleTag().insertRules(`${id}-import`, importRules);\n }\n };\n\n const removeRules = id => {\n const marker = markers[id];\n if (marker === undefined) return;\n\n /* create new empty text node and replace the current one */\n const newMarker = makeTextNode(el.ownerDocument, id);\n el.replaceChild(newMarker, marker);\n markers[id] = newMarker;\n resetIdNames(names, id);\n\n if (extractImport && usedImportRuleTag) {\n // $FlowFixMe\n getImportRuleTag().removeRules(`${id}-import`);\n }\n };\n\n const css = () => {\n let str = '';\n\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n str += markers[id].data;\n }\n\n return str;\n };\n\n return {\n clone() {\n throw new StyledError(5);\n },\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: el,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n };\n};\n\nconst makeServerTag = (namesArg, markersArg): Tag<[string]> => {\n const names = namesArg === undefined ? (Object.create(null): Object) : namesArg;\n const markers = markersArg === undefined ? Object.create(null) : markersArg;\n\n const insertMarker = id => {\n const prev = markers[id];\n if (prev !== undefined) {\n return prev;\n }\n\n return (markers[id] = ['']);\n };\n\n const insertRules = (id, cssRules, name) => {\n const marker = insertMarker(id);\n marker[0] += cssRules.join(' ');\n addNameForId(names, id, name);\n };\n\n const removeRules = id => {\n const marker = markers[id];\n if (marker === undefined) return;\n marker[0] = '';\n resetIdNames(names, id);\n };\n\n const css = () => {\n let str = '';\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n const cssForId = markers[id][0];\n if (cssForId) {\n str += makeTextMarker(id) + cssForId;\n }\n }\n return str;\n };\n\n const clone = () => {\n const namesClone = cloneNames(names);\n const markersClone = Object.create(null);\n\n // eslint-disable-next-line guard-for-in\n for (const id in markers) {\n markersClone[id] = [markers[id][0]];\n }\n\n return makeServerTag(namesClone, markersClone);\n };\n\n const tag = {\n clone,\n css,\n getIds: getIdsFromMarkersFactory(markers),\n hasNameForId: hasNameForId(names),\n insertMarker,\n insertRules,\n removeRules,\n sealed: false,\n styleTag: null,\n toElement: wrapAsElement(css, names),\n toHTML: wrapAsHtmlTag(css, names),\n };\n\n return tag;\n};\n\nexport const makeTag = (\n target: ?HTMLElement,\n tagEl: ?HTMLStyleElement,\n forceServer?: boolean,\n insertBefore?: boolean,\n getImportRuleTag?: () => Tag\n): Tag => {\n if (IS_BROWSER && !forceServer) {\n const el = makeStyleTag(target, tagEl, insertBefore);\n\n if (DISABLE_SPEEDY) {\n return makeBrowserTag(el, getImportRuleTag);\n } else {\n return makeSpeedyTag(el, getImportRuleTag);\n }\n }\n\n return makeServerTag();\n};\n\nexport const rehydrate = (\n tag: Tag,\n els: HTMLStyleElement[],\n extracted: ExtractedComp[]\n): void => {\n /* add all extracted components to the new tag */\n for (let i = 0, len = extracted.length; i < len; i += 1) {\n const { componentId, cssFromDOM } = extracted[i];\n const cssRules = splitByRules(cssFromDOM);\n tag.insertRules(componentId, cssRules);\n }\n\n /* remove old HTMLStyleElements, since they have been rehydrated */\n for (let i = 0, len = els.length; i < len; i += 1) {\n const el = els[i];\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n }\n};\n","// @flow\nimport React, { createContext, Component, type Element } from 'react';\nimport memoize from 'memoize-one';\nimport StyledError from '../utils/error';\nimport isFunction from '../utils/isFunction';\n\nexport type Theme = { [key: string]: mixed };\n\ntype Props = {\n children?: Element,\n theme: Theme | ((outerTheme: Theme) => void),\n};\n\nexport const ThemeContext = createContext();\n\nexport const ThemeConsumer = ThemeContext.Consumer;\n\n/**\n * Provide a theme to an entire react component tree via context\n */\nexport default class ThemeProvider extends Component {\n getContext: (theme: Theme | ((outerTheme: Theme) => void), outerTheme?: Theme) => Theme;\n\n renderInner: Function;\n\n constructor(props: Props) {\n super(props);\n this.getContext = memoize(this.getContext.bind(this));\n this.renderInner = this.renderInner.bind(this);\n }\n\n render() {\n if (!this.props.children) return null;\n\n return {this.renderInner};\n }\n\n renderInner(outerTheme?: Theme) {\n const context = this.getContext(this.props.theme, outerTheme);\n\n return (\n \n {this.props.children}\n \n );\n }\n\n /**\n * Get the theme from the props, supporting both (outerTheme) => {}\n * as well as object notation\n */\n getTheme(theme: (outerTheme: ?Theme) => void, outerTheme: ?Theme) {\n if (isFunction(theme)) {\n const mergedTheme = theme(outerTheme);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (mergedTheme === null || Array.isArray(mergedTheme) || typeof mergedTheme !== 'object')\n ) {\n throw new StyledError(7);\n }\n\n return mergedTheme;\n }\n\n if (theme === null || Array.isArray(theme) || typeof theme !== 'object') {\n throw new StyledError(8);\n }\n\n return { ...outerTheme, ...theme };\n }\n\n getContext(theme: (outerTheme: ?Theme) => void, outerTheme?: Theme) {\n return this.getTheme(theme, outerTheme);\n }\n}\n","// @flow\nimport React, { createContext, Component, type Element } from 'react';\nimport PropTypes from 'prop-types';\nimport memoize from 'memoize-one';\nimport StyleSheet from './StyleSheet';\nimport ServerStyleSheet from './ServerStyleSheet';\nimport StyledError from '../utils/error';\n\ntype Props = {\n children?: Element,\n sheet?: StyleSheet,\n target?: HTMLElement,\n};\n\nexport const StyleSheetContext = createContext();\nexport const StyleSheetConsumer = StyleSheetContext.Consumer;\n\nexport default class StyleSheetManager extends Component {\n static propTypes = {\n sheet: PropTypes.oneOfType([\n PropTypes.instanceOf(StyleSheet),\n PropTypes.instanceOf(ServerStyleSheet),\n ]),\n\n target: PropTypes.shape({\n appendChild: PropTypes.func.isRequired,\n }),\n };\n\n getContext: (sheet: ?StyleSheet, target: ?HTMLElement) => StyleSheet;\n\n constructor(props: Props) {\n super(props);\n this.getContext = memoize(this.getContext);\n }\n\n getContext(sheet: ?StyleSheet, target: ?HTMLElement) {\n if (sheet) {\n return sheet;\n } else if (target) {\n return new StyleSheet(target);\n } else {\n throw new StyledError(4);\n }\n }\n\n render() {\n const { children, sheet, target } = this.props;\n\n return (\n \n {process.env.NODE_ENV !== 'production' ? React.Children.only(children) : children}\n \n );\n }\n}\n","// @flow\nimport { EMPTY_ARRAY } from '../utils/empties';\nimport flatten from '../utils/flatten';\nimport isStaticRules from '../utils/isStaticRules';\nimport stringifyRules from '../utils/stringifyRules';\nimport StyleSheet from './StyleSheet';\n\nimport type { RuleSet } from '../types';\n\nexport default class GlobalStyle {\n componentId: string;\n\n isStatic: boolean;\n\n rules: RuleSet;\n\n constructor(rules: RuleSet, componentId: string) {\n this.rules = rules;\n this.componentId = componentId;\n this.isStatic = isStaticRules(rules, EMPTY_ARRAY);\n\n if (!StyleSheet.master.hasId(componentId)) {\n StyleSheet.master.deferredInject(componentId, []);\n }\n }\n\n createStyles(executionContext: Object, styleSheet: StyleSheet) {\n const flatCSS = flatten(this.rules, executionContext, styleSheet);\n const css = stringifyRules(flatCSS, '');\n\n styleSheet.inject(this.componentId, css);\n }\n\n removeStyles(styleSheet: StyleSheet) {\n const { componentId } = this;\n if (styleSheet.hasId(componentId)) {\n styleSheet.remove(componentId);\n }\n }\n\n // TODO: overwrite in-place instead of remove+create?\n renderStyles(executionContext: Object, styleSheet: StyleSheet) {\n this.removeStyles(styleSheet);\n this.createStyles(executionContext, styleSheet);\n }\n}\n","import { useLayoutEffect, useEffect } from 'react'; // suppress the useLayoutEffect warning on server side.\n\nexport var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;","import _extends from 'babel-runtime/helpers/extends';\nfunction isPointsEq(a1, a2, isAlignPoint) {\n if (isAlignPoint) {\n return a1[0] === a2[0];\n }\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\n\nexport function getAlignFromPlacement(builtinPlacements, placementStr, align) {\n var baseAlign = builtinPlacements[placementStr] || {};\n return _extends({}, baseAlign, align);\n}\n\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n var points = align.points;\n for (var placement in builtinPlacements) {\n if (builtinPlacements.hasOwnProperty(placement)) {\n if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {\n return prefixCls + '-placement-' + placement;\n }\n }\n }\n return '';\n}\n\nexport function saveRef(name, component) {\n this[name] = component;\n}","import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nvar LazyRenderBox = function (_Component) {\n _inherits(LazyRenderBox, _Component);\n\n function LazyRenderBox() {\n _classCallCheck(this, LazyRenderBox);\n\n return _possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return nextProps.hiddenClassName || nextProps.visible;\n };\n\n LazyRenderBox.prototype.render = function render() {\n var _props = this.props,\n hiddenClassName = _props.hiddenClassName,\n visible = _props.visible,\n props = _objectWithoutProperties(_props, ['hiddenClassName', 'visible']);\n\n if (hiddenClassName || React.Children.count(props.children) > 1) {\n if (!visible && hiddenClassName) {\n props.className += ' ' + hiddenClassName;\n }\n return React.createElement('div', props);\n }\n\n return React.Children.only(props.children);\n };\n\n return LazyRenderBox;\n}(Component);\n\nLazyRenderBox.propTypes = {\n children: PropTypes.any,\n className: PropTypes.string,\n visible: PropTypes.bool,\n hiddenClassName: PropTypes.string\n};\n\n\nexport default LazyRenderBox;","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport LazyRenderBox from './LazyRenderBox';\n\nvar PopupInner = function (_Component) {\n _inherits(PopupInner, _Component);\n\n function PopupInner() {\n _classCallCheck(this, PopupInner);\n\n return _possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n PopupInner.prototype.render = function render() {\n var props = this.props;\n var className = props.className;\n if (!props.visible) {\n className += ' ' + props.hiddenClassName;\n }\n return React.createElement(\n 'div',\n {\n className: className,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n onMouseDown: props.onMouseDown,\n onTouchStart: props.onTouchStart,\n style: props.style\n },\n React.createElement(\n LazyRenderBox,\n { className: props.prefixCls + '-content', visible: props.visible },\n props.children\n )\n );\n };\n\n return PopupInner;\n}(Component);\n\nPopupInner.propTypes = {\n hiddenClassName: PropTypes.string,\n className: PropTypes.string,\n prefixCls: PropTypes.string,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseDown: PropTypes.func,\n onTouchStart: PropTypes.func,\n children: PropTypes.any\n};\n\n\nexport default PopupInner;","import _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport Align from 'rc-align';\nimport Animate from 'rc-animate';\nimport PopupInner from './PopupInner';\nimport LazyRenderBox from './LazyRenderBox';\nimport { saveRef } from './utils';\n\nvar Popup = function (_Component) {\n _inherits(Popup, _Component);\n\n function Popup(props) {\n _classCallCheck(this, Popup);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.state = {\n // Used for stretch\n stretchChecked: false,\n targetWidth: undefined,\n targetHeight: undefined\n };\n\n _this.savePopupRef = saveRef.bind(_this, 'popupInstance');\n _this.saveAlignRef = saveRef.bind(_this, 'alignInstance');\n return _this;\n }\n\n Popup.prototype.componentDidMount = function componentDidMount() {\n this.rootNode = this.getPopupDomNode();\n this.setStretchSize();\n };\n\n Popup.prototype.componentDidUpdate = function componentDidUpdate() {\n this.setStretchSize();\n };\n\n // Record size if stretch needed\n\n\n Popup.prototype.getPopupDomNode = function getPopupDomNode() {\n return ReactDOM.findDOMNode(this.popupInstance);\n };\n\n // `target` on `rc-align` can accept as a function to get the bind element or a point.\n // ref: https://www.npmjs.com/package/rc-align\n\n\n Popup.prototype.getMaskTransitionName = function getMaskTransitionName() {\n var props = this.props;\n var transitionName = props.maskTransitionName;\n var animation = props.maskAnimation;\n if (!transitionName && animation) {\n transitionName = props.prefixCls + '-' + animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getTransitionName = function getTransitionName() {\n var props = this.props;\n var transitionName = props.transitionName;\n if (!transitionName && props.animation) {\n transitionName = props.prefixCls + '-' + props.animation;\n }\n return transitionName;\n };\n\n Popup.prototype.getClassName = function getClassName(currentAlignClassName) {\n return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName;\n };\n\n Popup.prototype.getPopupElement = function getPopupElement() {\n var _this2 = this;\n\n var savePopupRef = this.savePopupRef;\n var _state = this.state,\n stretchChecked = _state.stretchChecked,\n targetHeight = _state.targetHeight,\n targetWidth = _state.targetWidth;\n var _props = this.props,\n align = _props.align,\n visible = _props.visible,\n prefixCls = _props.prefixCls,\n style = _props.style,\n getClassNameFromAlign = _props.getClassNameFromAlign,\n destroyPopupOnHide = _props.destroyPopupOnHide,\n stretch = _props.stretch,\n children = _props.children,\n onMouseEnter = _props.onMouseEnter,\n onMouseLeave = _props.onMouseLeave,\n onMouseDown = _props.onMouseDown,\n onTouchStart = _props.onTouchStart;\n\n var className = this.getClassName(this.currentAlignClassName || getClassNameFromAlign(align));\n var hiddenClassName = prefixCls + '-hidden';\n\n if (!visible) {\n this.currentAlignClassName = null;\n }\n\n var sizeStyle = {};\n if (stretch) {\n // Stretch with target\n if (stretch.indexOf('height') !== -1) {\n sizeStyle.height = targetHeight;\n } else if (stretch.indexOf('minHeight') !== -1) {\n sizeStyle.minHeight = targetHeight;\n }\n if (stretch.indexOf('width') !== -1) {\n sizeStyle.width = targetWidth;\n } else if (stretch.indexOf('minWidth') !== -1) {\n sizeStyle.minWidth = targetWidth;\n }\n\n // Delay force align to makes ui smooth\n if (!stretchChecked) {\n sizeStyle.visibility = 'hidden';\n setTimeout(function () {\n if (_this2.alignInstance) {\n _this2.alignInstance.forceAlign();\n }\n }, 0);\n }\n }\n\n var newStyle = _extends({}, sizeStyle, style, this.getZIndexStyle());\n\n var popupInnerProps = {\n className: className,\n prefixCls: prefixCls,\n ref: savePopupRef,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseDown: onMouseDown,\n onTouchStart: onTouchStart,\n style: newStyle\n };\n if (destroyPopupOnHide) {\n return React.createElement(\n Animate,\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName()\n },\n visible ? React.createElement(\n Align,\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n align: align,\n onAlign: this.onAlign\n },\n React.createElement(\n PopupInner,\n _extends({\n visible: true\n }, popupInnerProps),\n children\n )\n ) : null\n );\n }\n\n return React.createElement(\n Animate,\n {\n component: '',\n exclusive: true,\n transitionAppear: true,\n transitionName: this.getTransitionName(),\n showProp: 'xVisible'\n },\n React.createElement(\n Align,\n {\n target: this.getAlignTarget(),\n key: 'popup',\n ref: this.saveAlignRef,\n monitorWindowResize: true,\n xVisible: visible,\n childrenProps: { visible: 'xVisible' },\n disabled: !visible,\n align: align,\n onAlign: this.onAlign\n },\n React.createElement(\n PopupInner,\n _extends({\n hiddenClassName: hiddenClassName\n }, popupInnerProps),\n children\n )\n )\n );\n };\n\n Popup.prototype.getZIndexStyle = function getZIndexStyle() {\n var style = {};\n var props = this.props;\n if (props.zIndex !== undefined) {\n style.zIndex = props.zIndex;\n }\n return style;\n };\n\n Popup.prototype.getMaskElement = function getMaskElement() {\n var props = this.props;\n var maskElement = void 0;\n if (props.mask) {\n var maskTransition = this.getMaskTransitionName();\n maskElement = React.createElement(LazyRenderBox, {\n style: this.getZIndexStyle(),\n key: 'mask',\n className: props.prefixCls + '-mask',\n hiddenClassName: props.prefixCls + '-mask-hidden',\n visible: props.visible\n });\n if (maskTransition) {\n maskElement = React.createElement(\n Animate,\n {\n key: 'mask',\n showProp: 'visible',\n transitionAppear: true,\n component: '',\n transitionName: maskTransition\n },\n maskElement\n );\n }\n }\n return maskElement;\n };\n\n Popup.prototype.render = function render() {\n return React.createElement(\n 'div',\n null,\n this.getMaskElement(),\n this.getPopupElement()\n );\n };\n\n return Popup;\n}(Component);\n\nPopup.propTypes = {\n visible: PropTypes.bool,\n style: PropTypes.object,\n getClassNameFromAlign: PropTypes.func,\n onAlign: PropTypes.func,\n getRootDomNode: PropTypes.func,\n align: PropTypes.any,\n destroyPopupOnHide: PropTypes.bool,\n className: PropTypes.string,\n prefixCls: PropTypes.string,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseDown: PropTypes.func,\n onTouchStart: PropTypes.func,\n stretch: PropTypes.string,\n children: PropTypes.node,\n point: PropTypes.shape({\n pageX: PropTypes.number,\n pageY: PropTypes.number\n })\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this3 = this;\n\n this.onAlign = function (popupDomNode, align) {\n var props = _this3.props;\n var currentAlignClassName = props.getClassNameFromAlign(align);\n // FIX: https://github.com/react-component/trigger/issues/56\n // FIX: https://github.com/react-component/tooltip/issues/79\n if (_this3.currentAlignClassName !== currentAlignClassName) {\n _this3.currentAlignClassName = currentAlignClassName;\n popupDomNode.className = _this3.getClassName(currentAlignClassName);\n }\n props.onAlign(popupDomNode, align);\n };\n\n this.setStretchSize = function () {\n var _props2 = _this3.props,\n stretch = _props2.stretch,\n getRootDomNode = _props2.getRootDomNode,\n visible = _props2.visible;\n var _state2 = _this3.state,\n stretchChecked = _state2.stretchChecked,\n targetHeight = _state2.targetHeight,\n targetWidth = _state2.targetWidth;\n\n\n if (!stretch || !visible) {\n if (stretchChecked) {\n _this3.setState({ stretchChecked: false });\n }\n return;\n }\n\n var $ele = getRootDomNode();\n if (!$ele) return;\n\n var height = $ele.offsetHeight;\n var width = $ele.offsetWidth;\n\n if (targetHeight !== height || targetWidth !== width || !stretchChecked) {\n _this3.setState({\n stretchChecked: true,\n targetHeight: height,\n targetWidth: width\n });\n }\n };\n\n this.getTargetElement = function () {\n return _this3.props.getRootDomNode();\n };\n\n this.getAlignTarget = function () {\n var point = _this3.props.point;\n\n if (point) {\n return point;\n }\n return _this3.getTargetElement;\n };\n};\n\nexport default Popup;","import _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { findDOMNode, createPortal } from 'react-dom';\nimport { polyfill } from 'react-lifecycles-compat';\nimport contains from 'rc-util/es/Dom/contains';\nimport addEventListener from 'rc-util/es/Dom/addEventListener';\nimport ContainerRender from 'rc-util/es/ContainerRender';\nimport Portal from 'rc-util/es/Portal';\nimport classNames from 'classnames';\n\nimport { getAlignFromPlacement, getAlignPopupClassName } from './utils';\nimport Popup from './Popup';\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument() {\n return window.document;\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n\nvar IS_REACT_16 = !!createPortal;\n\nvar contextTypes = {\n rcTrigger: PropTypes.shape({\n onPopupMouseDown: PropTypes.func\n })\n};\n\nvar Trigger = function (_React$Component) {\n _inherits(Trigger, _React$Component);\n\n function Trigger(props) {\n _classCallCheck(this, Trigger);\n\n var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));\n\n _initialiseProps.call(_this);\n\n var popupVisible = void 0;\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n\n ALL_HANDLERS.forEach(function (h) {\n _this['fire' + h] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n Trigger.prototype.getChildContext = function getChildContext() {\n return {\n rcTrigger: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n };\n };\n\n Trigger.prototype.componentDidMount = function componentDidMount() {\n this.componentDidUpdate({}, {\n popupVisible: this.state.popupVisible\n });\n };\n\n Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) {\n var props = this.props;\n var state = this.state;\n var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() {\n if (prevState.popupVisible !== state.popupVisible) {\n props.afterPopupVisibleChange(state.popupVisible);\n }\n };\n if (!IS_REACT_16) {\n this.renderComponent(null, triggerAfterPopupVisibleChange);\n }\n\n // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n if (state.popupVisible) {\n var currentDocument = void 0;\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument();\n this.clickOutsideHandler = addEventListener(currentDocument, 'mousedown', this.onDocumentClick);\n }\n // always hide on mobile\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument();\n this.touchOutsideHandler = addEventListener(currentDocument, 'touchstart', this.onDocumentClick);\n }\n // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument();\n this.contextMenuOutsideHandler1 = addEventListener(currentDocument, 'scroll', this.onContextMenuClose);\n }\n // close popup when trigger type contains 'onContextMenu' and window is blur.\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListener(window, 'blur', this.onContextMenuClose);\n }\n return;\n }\n\n this.clearOutsideHandler();\n };\n\n Trigger.prototype.componentWillUnmount = function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n };\n\n Trigger.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n };\n\n Trigger.prototype.getPopupDomNode = function getPopupDomNode() {\n // for test\n if (this._component && this._component.getPopupDomNode) {\n return this._component.getPopupDomNode();\n }\n return null;\n };\n\n Trigger.prototype.getPopupAlign = function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n };\n\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n\n\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible });\n }\n this.props.onPopupVisibleChange(popupVisible);\n }\n\n // Always record the point position since mouseEnterDelay will delay the show\n if (alignPoint && event) {\n this.setPoint(event);\n }\n };\n\n Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n if (delay) {\n var point = event ? { pageX: event.pageX, pageY: event.pageY } : null;\n this.delayTimer = setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n };\n\n Trigger.prototype.clearDelayTimer = function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n };\n\n Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n };\n\n Trigger.prototype.createTwoChains = function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n if (childPros[event] && props[event]) {\n return this['fire' + event];\n }\n return childPros[event] || props[event];\n };\n\n Trigger.prototype.isClickToShow = function isClickToShow() {\n var _props = this.props,\n action = _props.action,\n showAction = _props.showAction;\n\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() {\n var _props2 = this.props,\n action = _props2.action,\n showAction = _props2.showAction;\n\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n };\n\n Trigger.prototype.isClickToHide = function isClickToHide() {\n var _props3 = this.props,\n action = _props3.action,\n hideAction = _props3.hideAction;\n\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n };\n\n Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() {\n var _props4 = this.props,\n action = _props4.action,\n showAction = _props4.showAction;\n\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n };\n\n Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() {\n var _props5 = this.props,\n action = _props5.action,\n hideAction = _props5.hideAction;\n\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n };\n\n Trigger.prototype.isFocusToShow = function isFocusToShow() {\n var _props6 = this.props,\n action = _props6.action,\n showAction = _props6.showAction;\n\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n };\n\n Trigger.prototype.isBlurToHide = function isBlurToHide() {\n var _props7 = this.props,\n action = _props7.action,\n hideAction = _props7.hideAction;\n\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n };\n\n Trigger.prototype.forcePopupAlign = function forcePopupAlign() {\n if (this.state.popupVisible && this._component && this._component.alignInstance) {\n this._component.alignInstance.forceAlign();\n }\n };\n\n Trigger.prototype.fireEvents = function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n if (childCallback) {\n childCallback(e);\n }\n var callback = this.props[type];\n if (callback) {\n callback(e);\n }\n };\n\n Trigger.prototype.close = function close() {\n this.setPopupVisible(false);\n };\n\n Trigger.prototype.render = function render() {\n var _this3 = this;\n\n var popupVisible = this.state.popupVisible;\n var _props8 = this.props,\n children = _props8.children,\n forceRender = _props8.forceRender,\n alignPoint = _props8.alignPoint,\n className = _props8.className;\n\n var child = React.Children.only(children);\n var newChildProps = { key: 'trigger' };\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n }\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n }\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter;\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n }\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n }\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n }\n\n var childrenClassName = classNames(child && child.props && child.props.className, className);\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n var trigger = React.cloneElement(child, newChildProps);\n\n if (!IS_REACT_16) {\n return React.createElement(\n ContainerRender,\n {\n parent: this,\n visible: popupVisible,\n autoMount: false,\n forceRender: forceRender,\n getComponent: this.getComponent,\n getContainer: this.getContainer\n },\n function (_ref2) {\n var renderComponent = _ref2.renderComponent;\n\n _this3.renderComponent = renderComponent;\n return trigger;\n }\n );\n }\n\n var portal = void 0;\n // prevent unmounting after it's rendered\n if (popupVisible || this._component || forceRender) {\n portal = React.createElement(\n Portal,\n { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate },\n this.getComponent()\n );\n }\n\n return [trigger, portal];\n };\n\n return Trigger;\n}(React.Component);\n\nTrigger.propTypes = {\n children: PropTypes.any,\n action: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n showAction: PropTypes.any,\n hideAction: PropTypes.any,\n getPopupClassNameFromAlign: PropTypes.any,\n onPopupVisibleChange: PropTypes.func,\n afterPopupVisibleChange: PropTypes.func,\n popup: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n popupStyle: PropTypes.object,\n prefixCls: PropTypes.string,\n popupClassName: PropTypes.string,\n className: PropTypes.string,\n popupPlacement: PropTypes.string,\n builtinPlacements: PropTypes.object,\n popupTransitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n popupAnimation: PropTypes.any,\n mouseEnterDelay: PropTypes.number,\n mouseLeaveDelay: PropTypes.number,\n zIndex: PropTypes.number,\n focusDelay: PropTypes.number,\n blurDelay: PropTypes.number,\n getPopupContainer: PropTypes.func,\n getDocument: PropTypes.func,\n forceRender: PropTypes.bool,\n destroyPopupOnHide: PropTypes.bool,\n mask: PropTypes.bool,\n maskClosable: PropTypes.bool,\n onPopupAlign: PropTypes.func,\n popupAlign: PropTypes.object,\n popupVisible: PropTypes.bool,\n defaultPopupVisible: PropTypes.bool,\n maskTransitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n maskAnimation: PropTypes.string,\n stretch: PropTypes.string,\n alignPoint: PropTypes.bool // Maybe we can support user pass position in the future\n};\nTrigger.contextTypes = contextTypes;\nTrigger.childContextTypes = contextTypes;\nTrigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: []\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this4 = this;\n\n this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this4.props.mouseEnterDelay;\n\n _this4.fireEvents('onMouseEnter', e);\n _this4.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n this.onMouseMove = function (e) {\n _this4.fireEvents('onMouseMove', e);\n _this4.setPoint(e);\n };\n\n this.onMouseLeave = function (e) {\n _this4.fireEvents('onMouseLeave', e);\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onPopupMouseEnter = function () {\n _this4.clearDelayTimer();\n };\n\n this.onPopupMouseLeave = function (e) {\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && _this4._component && _this4._component.getPopupDomNode && contains(_this4._component.getPopupDomNode(), e.relatedTarget)) {\n return;\n }\n _this4.delaySetPopupVisible(false, _this4.props.mouseLeaveDelay);\n };\n\n this.onFocus = function (e) {\n _this4.fireEvents('onFocus', e);\n // incase focusin and focusout\n _this4.clearDelayTimer();\n if (_this4.isFocusToShow()) {\n _this4.focusTime = Date.now();\n _this4.delaySetPopupVisible(true, _this4.props.focusDelay);\n }\n };\n\n this.onMouseDown = function (e) {\n _this4.fireEvents('onMouseDown', e);\n _this4.preClickTime = Date.now();\n };\n\n this.onTouchStart = function (e) {\n _this4.fireEvents('onTouchStart', e);\n _this4.preTouchTime = Date.now();\n };\n\n this.onBlur = function (e) {\n _this4.fireEvents('onBlur', e);\n _this4.clearDelayTimer();\n if (_this4.isBlurToHide()) {\n _this4.delaySetPopupVisible(false, _this4.props.blurDelay);\n }\n };\n\n this.onContextMenu = function (e) {\n e.preventDefault();\n _this4.fireEvents('onContextMenu', e);\n _this4.setPopupVisible(true, e);\n };\n\n this.onContextMenuClose = function () {\n if (_this4.isContextMenuToShow()) {\n _this4.close();\n }\n };\n\n this.onClick = function (event) {\n _this4.fireEvents('onClick', event);\n // focus will trigger click\n if (_this4.focusTime) {\n var preTime = void 0;\n if (_this4.preClickTime && _this4.preTouchTime) {\n preTime = Math.min(_this4.preClickTime, _this4.preTouchTime);\n } else if (_this4.preClickTime) {\n preTime = _this4.preClickTime;\n } else if (_this4.preTouchTime) {\n preTime = _this4.preTouchTime;\n }\n if (Math.abs(preTime - _this4.focusTime) < 20) {\n return;\n }\n _this4.focusTime = 0;\n }\n _this4.preClickTime = 0;\n _this4.preTouchTime = 0;\n\n // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n if (_this4.isClickToShow() && (_this4.isClickToHide() || _this4.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n var nextVisible = !_this4.state.popupVisible;\n if (_this4.isClickToHide() && !nextVisible || nextVisible && _this4.isClickToShow()) {\n _this4.setPopupVisible(!_this4.state.popupVisible, event);\n }\n };\n\n this.onPopupMouseDown = function () {\n var _context$rcTrigger = _this4.context.rcTrigger,\n rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger;\n\n _this4.hasPopupMouseDown = true;\n\n clearTimeout(_this4.mouseDownTimeout);\n _this4.mouseDownTimeout = setTimeout(function () {\n _this4.hasPopupMouseDown = false;\n }, 0);\n\n if (rcTrigger.onPopupMouseDown) {\n rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments);\n }\n };\n\n this.onDocumentClick = function (event) {\n if (_this4.props.mask && !_this4.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n var root = findDOMNode(_this4);\n if (!contains(root, target) && !_this4.hasPopupMouseDown) {\n _this4.close();\n }\n };\n\n this.getRootDomNode = function () {\n return findDOMNode(_this4);\n };\n\n this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _props9 = _this4.props,\n popupPlacement = _props9.popupPlacement,\n builtinPlacements = _props9.builtinPlacements,\n prefixCls = _props9.prefixCls,\n alignPoint = _props9.alignPoint,\n getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n }\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n };\n\n this.getComponent = function () {\n var _props10 = _this4.props,\n prefixCls = _props10.prefixCls,\n destroyPopupOnHide = _props10.destroyPopupOnHide,\n popupClassName = _props10.popupClassName,\n action = _props10.action,\n onPopupAlign = _props10.onPopupAlign,\n popupAnimation = _props10.popupAnimation,\n popupTransitionName = _props10.popupTransitionName,\n popupStyle = _props10.popupStyle,\n mask = _props10.mask,\n maskAnimation = _props10.maskAnimation,\n maskTransitionName = _props10.maskTransitionName,\n zIndex = _props10.zIndex,\n popup = _props10.popup,\n stretch = _props10.stretch,\n alignPoint = _props10.alignPoint;\n var _state = _this4.state,\n popupVisible = _state.popupVisible,\n point = _state.point;\n\n\n var align = _this4.getPopupAlign();\n\n var mouseProps = {};\n if (_this4.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this4.onPopupMouseEnter;\n }\n if (_this4.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this4.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this4.onPopupMouseDown;\n mouseProps.onTouchStart = _this4.onPopupMouseDown;\n\n return React.createElement(\n Popup,\n _extends({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n action: action,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this4.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this4.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n ref: _this4.savePopup\n }),\n typeof popup === 'function' ? popup() : popup\n );\n };\n\n this.getContainer = function () {\n var props = _this4.props;\n\n var popupContainer = document.createElement('div');\n // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer(findDOMNode(_this4)) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n this.setPoint = function (point) {\n var alignPoint = _this4.props.alignPoint;\n\n if (!alignPoint || !point) return;\n\n _this4.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n this.handlePortalUpdate = function () {\n if (_this4.state.prevPopupVisible !== _this4.state.popupVisible) {\n _this4.props.afterPopupVisibleChange(_this4.state.popupVisible);\n }\n };\n\n this.savePopup = function (node) {\n _this4._component = node;\n };\n};\n\npolyfill(Trigger);\n\nexport default Trigger;","var isProduction = process.env.NODE_ENV === 'production';\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\nexport default warning;\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n\n if (isProduction) {\n throw new Error(prefix);\n } else {\n throw new Error(prefix + \": \" + (message || ''));\n }\n}\n\nexport default invariant;\n","export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _implementation = require('./implementation');\n\nvar _implementation2 = _interopRequireDefault(_implementation);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _react2.default.createContext || _implementation2.default;\nmodule.exports = exports['default'];","export default function _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}","import addDOMEventListener from 'add-dom-event-listener';\nimport ReactDOM from 'react-dom';\nexport default function addEventListenerWrap(target, eventType, cb, option) {\n /* eslint camelcase: 2 */\n var callback = ReactDOM.unstable_batchedUpdates ? function run(e) {\n ReactDOM.unstable_batchedUpdates(cb, e);\n } : cb;\n return addDOMEventListener(target, eventType, callback, option);\n}","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport PropTypes from 'prop-types';\nimport enUs from '../locale/en_US';\n\nfunction noop() {}\n\nexport var propType = {\n className: PropTypes.string,\n locale: PropTypes.object,\n style: PropTypes.object,\n visible: PropTypes.bool,\n onSelect: PropTypes.func,\n prefixCls: PropTypes.string,\n onChange: PropTypes.func,\n onOk: PropTypes.func\n};\n\nexport var defaultProp = {\n locale: enUs,\n style: {},\n visible: true,\n prefixCls: 'rc-calendar',\n className: '',\n onSelect: noop,\n onChange: noop,\n onClear: noop,\n renderFooter: function renderFooter() {\n return null;\n },\n renderSidebar: function renderSidebar() {\n return null;\n }\n};\n\nexport var commonMixinWrapper = function commonMixinWrapper(ComposeComponent) {\n var _class, _temp2;\n\n return _temp2 = _class = function (_ComposeComponent) {\n _inherits(_class, _ComposeComponent);\n\n function _class() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, _class);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.getFormat = function () {\n var format = _this.props.format;\n var _this$props = _this.props,\n locale = _this$props.locale,\n timePicker = _this$props.timePicker;\n\n if (!format) {\n if (timePicker) {\n format = locale.dateTimeFormat;\n } else {\n format = locale.dateFormat;\n }\n }\n return format;\n }, _this.focus = function () {\n if (_this.focusElement) {\n _this.focusElement.focus();\n } else if (_this.rootInstance) {\n _this.rootInstance.focus();\n }\n }, _this.saveFocusElement = function (focusElement) {\n _this.focusElement = focusElement;\n }, _this.saveRoot = function (root) {\n _this.rootInstance = root;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return this.props.visible || nextProps.visible;\n };\n\n return _class;\n }(ComposeComponent), _class.displayName = 'CommonMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _class.getDerivedStateFromProps = ComposeComponent.getDerivedStateFromProps, _temp2;\n};","import * as React from 'react';\nconst Empty = () => ();\nexport default Empty;\n","import * as React from 'react';\nconst Simple = () => ();\nexport default Simple;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ConfigConsumer } from '../config-provider';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport DefaultEmptyImg from './empty';\nimport SimpleEmptyImg from './simple';\nconst defaultEmptyImg = ;\nconst simpleEmptyImg = ;\nconst Empty = (props) => (\n {({ getPrefixCls }) => {\n const { className, prefixCls: customizePrefixCls, image = defaultEmptyImg, description, children, imageStyle } = props, restProps = __rest(props, [\"className\", \"prefixCls\", \"image\", \"description\", \"children\", \"imageStyle\"]);\n return (\n {(locale) => {\n const prefixCls = getPrefixCls('empty', customizePrefixCls);\n const des = typeof description !== 'undefined' ? description : locale.description;\n const alt = typeof des === 'string' ? des : 'empty';\n let imageNode = null;\n if (typeof image === 'string') {\n imageNode =
;\n }\n else {\n imageNode = image;\n }\n return (\n
\n {imageNode}\n
\n {des &&
{des}
}\n {children &&
{children}
}\n
);\n }}\n );\n}}\n );\nEmpty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg;\nEmpty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;\nexport default Empty;\n","import * as React from 'react';\nimport Empty from '../empty';\nimport { ConfigConsumer } from '.';\nconst renderEmpty = (componentName) => (\n {({ getPrefixCls }) => {\n const prefix = getPrefixCls('empty');\n switch (componentName) {\n case 'Table':\n case 'List':\n return ;\n case 'Select':\n case 'TreeSelect':\n case 'Cascader':\n case 'Transfer':\n case 'Mentions':\n return ;\n default:\n return ;\n }\n}}\n );\nexport default renderEmpty;\n","import * as React from 'react';\nimport createReactContext from '@ant-design/create-react-context';\nimport defaultRenderEmpty from './renderEmpty';\nexport const ConfigContext = createReactContext({\n // We provide a default function for Context without provider\n getPrefixCls: (suffixCls, customizePrefixCls) => {\n if (customizePrefixCls)\n return customizePrefixCls;\n return `ant-${suffixCls}`;\n },\n renderEmpty: defaultRenderEmpty,\n});\nexport const ConfigConsumer = ConfigContext.Consumer;\nexport function withConfigConsumer(config) {\n return function withConfigConsumerFunc(Component) {\n // Wrap with ConfigConsumer. Since we need compatible with react 15, be care when using ref methods\n const SFC = ((props) => (\n {(configProps) => {\n const { prefixCls: basicPrefixCls } = config;\n const { getPrefixCls } = configProps;\n const { prefixCls: customizePrefixCls } = props;\n const prefixCls = getPrefixCls(basicPrefixCls, customizePrefixCls);\n return ;\n }}\n ));\n const cons = Component.constructor;\n const name = (cons && cons.displayName) || Component.name || 'Component';\n SFC.displayName = `withConfigConsumer(${name})`;\n return SFC;\n };\n}\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return (\n Array.isArray(b) &&\n a.length === b.length &&\n a.every(function(item, index) {\n return valueEqual(item, b[index]);\n })\n );\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n return Object.keys(Object.assign({}, a, b)).every(function(key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/* eslint-disable no-console */\nvar warned = {};\nexport function warning(valid, message) {\n // Support uglify\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n console.error(\"Warning: \".concat(message));\n }\n}\nexport function note(valid, message) {\n // Support uglify\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n console.warn(\"Note: \".concat(message));\n }\n}\nexport function resetWarned() {\n warned = {};\n}\nexport function call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\nexport function warningOnce(valid, message) {\n call(warning, valid, message);\n}\nexport function noteOnce(valid, message) {\n call(note, valid, message);\n}\nexport default warningOnce;\n/* eslint-enable */","var START_EVENT_NAME_MAP = {\n transitionstart: {\n transition: 'transitionstart',\n WebkitTransition: 'webkitTransitionStart',\n MozTransition: 'mozTransitionStart',\n OTransition: 'oTransitionStart',\n msTransition: 'MSTransitionStart'\n },\n\n animationstart: {\n animation: 'animationstart',\n WebkitAnimation: 'webkitAnimationStart',\n MozAnimation: 'mozAnimationStart',\n OAnimation: 'oAnimationStart',\n msAnimation: 'MSAnimationStart'\n }\n};\n\nvar END_EVENT_NAME_MAP = {\n transitionend: {\n transition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'mozTransitionEnd',\n OTransition: 'oTransitionEnd',\n msTransition: 'MSTransitionEnd'\n },\n\n animationend: {\n animation: 'animationend',\n WebkitAnimation: 'webkitAnimationEnd',\n MozAnimation: 'mozAnimationEnd',\n OAnimation: 'oAnimationEnd',\n msAnimation: 'MSAnimationEnd'\n }\n};\n\nvar startEvents = [];\nvar endEvents = [];\n\nfunction detectEvents() {\n var testEl = document.createElement('div');\n var style = testEl.style;\n\n if (!('AnimationEvent' in window)) {\n delete START_EVENT_NAME_MAP.animationstart.animation;\n delete END_EVENT_NAME_MAP.animationend.animation;\n }\n\n if (!('TransitionEvent' in window)) {\n delete START_EVENT_NAME_MAP.transitionstart.transition;\n delete END_EVENT_NAME_MAP.transitionend.transition;\n }\n\n function process(EVENT_NAME_MAP, events) {\n for (var baseEventName in EVENT_NAME_MAP) {\n if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) {\n var baseEvents = EVENT_NAME_MAP[baseEventName];\n for (var styleName in baseEvents) {\n if (styleName in style) {\n events.push(baseEvents[styleName]);\n break;\n }\n }\n }\n }\n }\n\n process(START_EVENT_NAME_MAP, startEvents);\n process(END_EVENT_NAME_MAP, endEvents);\n}\n\nif (typeof window !== 'undefined' && typeof document !== 'undefined') {\n detectEvents();\n}\n\nfunction addEventListener(node, eventName, eventListener) {\n node.addEventListener(eventName, eventListener, false);\n}\n\nfunction removeEventListener(node, eventName, eventListener) {\n node.removeEventListener(eventName, eventListener, false);\n}\n\nvar TransitionEvents = {\n // Start events\n startEvents: startEvents,\n\n addStartEventListener: function addStartEventListener(node, eventListener) {\n if (startEvents.length === 0) {\n window.setTimeout(eventListener, 0);\n return;\n }\n startEvents.forEach(function (startEvent) {\n addEventListener(node, startEvent, eventListener);\n });\n },\n removeStartEventListener: function removeStartEventListener(node, eventListener) {\n if (startEvents.length === 0) {\n return;\n }\n startEvents.forEach(function (startEvent) {\n removeEventListener(node, startEvent, eventListener);\n });\n },\n\n\n // End events\n endEvents: endEvents,\n\n addEndEventListener: function addEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n window.setTimeout(eventListener, 0);\n return;\n }\n endEvents.forEach(function (endEvent) {\n addEventListener(node, endEvent, eventListener);\n });\n },\n removeEndEventListener: function removeEndEventListener(node, eventListener) {\n if (endEvents.length === 0) {\n return;\n }\n endEvents.forEach(function (endEvent) {\n removeEventListener(node, endEvent, eventListener);\n });\n }\n};\n\nexport default TransitionEvents;","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","import en_US from '../../date-picker/locale/en_US';\nexport default en_US;\n","import Pagination from 'rc-pagination/lib/locale/en_US';\nimport DatePicker from '../date-picker/locale/en_US';\nimport TimePicker from '../time-picker/locale/en_US';\nimport Calendar from '../calendar/locale/en_US';\nexport default {\n locale: 'en',\n Pagination,\n DatePicker,\n TimePicker,\n Calendar,\n global: {\n placeholder: 'Please select',\n },\n Table: {\n filterTitle: 'Filter menu',\n filterConfirm: 'OK',\n filterReset: 'Reset',\n selectAll: 'Select current page',\n selectInvert: 'Invert current page',\n sortTitle: 'Sort',\n expand: 'Expand row',\n collapse: 'Collapse row',\n },\n Modal: {\n okText: 'OK',\n cancelText: 'Cancel',\n justOkText: 'OK',\n },\n Popconfirm: {\n okText: 'OK',\n cancelText: 'Cancel',\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: 'Search here',\n itemUnit: 'item',\n itemsUnit: 'items',\n },\n Upload: {\n uploading: 'Uploading...',\n removeFile: 'Remove file',\n uploadError: 'Upload error',\n previewFile: 'Preview file',\n downloadFile: 'Download file',\n },\n Empty: {\n description: 'No Data',\n },\n Icon: {\n icon: 'icon',\n },\n Text: {\n edit: 'Edit',\n copy: 'Copy',\n copied: 'Copied',\n expand: 'Expand',\n },\n PageHeader: {\n back: 'Back',\n },\n};\n","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (typeof call === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport { Component } from 'react';\n\nvar OptGroup =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(OptGroup, _Component);\n\n function OptGroup() {\n _classCallCheck(this, OptGroup);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(OptGroup).apply(this, arguments));\n }\n\n return OptGroup;\n}(Component);\n\nexport { OptGroup as default };\nOptGroup.isSelectOptGroup = true;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (typeof call === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as PropTypes from 'prop-types';\nimport { Component } from 'react';\n\nvar Option =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Option, _Component);\n\n function Option() {\n _classCallCheck(this, Option);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Option).apply(this, arguments));\n }\n\n return Option;\n}(Component);\n\nexport { Option as default };\nOption.propTypes = {\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\nOption.isSelectOption = true;","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _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\nimport * as PropTypes from 'prop-types';\n\nfunction propsValueType() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var props = args[0],\n propName = args[1],\n componentName = args[2],\n rest = args.slice(3);\n var basicType = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);\n var labelInValueShape = PropTypes.shape({\n key: basicType.isRequired,\n label: PropTypes.node\n });\n\n if (props.labelInValue) {\n var validate = PropTypes.oneOfType([PropTypes.arrayOf(labelInValueShape), labelInValueShape]);\n var error = validate.apply(void 0, [props, propName, componentName].concat(_toConsumableArray(rest)));\n\n if (error) {\n return new Error(\"Invalid prop `\".concat(propName, \"` supplied to `\").concat(componentName, \"`, \") + \"when you set `labelInValue` to `true`, `\".concat(propName, \"` should in \") + \"shape of `{ key: string | number, label?: ReactNode }`.\");\n }\n } else if ((props.mode === 'multiple' || props.mode === 'tags' || props.multiple || props.tags) && props[propName] === '') {\n return new Error(\"Invalid prop `\".concat(propName, \"` of type `string` supplied to `\").concat(componentName, \"`, \") + \"expected `array` when `multiple` or `tags` is `true`.\");\n } else {\n var _validate = PropTypes.oneOfType([PropTypes.arrayOf(basicType), basicType]);\n\n return _validate.apply(void 0, [props, propName, componentName].concat(_toConsumableArray(rest)));\n }\n\n return null;\n}\n\nvar SelectPropTypes = {\n id: PropTypes.string,\n defaultActiveFirstOption: PropTypes.bool,\n multiple: PropTypes.bool,\n filterOption: PropTypes.any,\n children: PropTypes.any,\n showSearch: PropTypes.bool,\n disabled: PropTypes.bool,\n allowClear: PropTypes.bool,\n showArrow: PropTypes.bool,\n tags: PropTypes.bool,\n prefixCls: PropTypes.string,\n className: PropTypes.string,\n transitionName: PropTypes.string,\n optionLabelProp: PropTypes.string,\n optionFilterProp: PropTypes.string,\n animation: PropTypes.string,\n choiceTransitionName: PropTypes.string,\n open: PropTypes.bool,\n defaultOpen: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n onSelect: PropTypes.func,\n onSearch: PropTypes.func,\n onPopupScroll: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onInputKeyDown: PropTypes.func,\n placeholder: PropTypes.any,\n onDeselect: PropTypes.func,\n labelInValue: PropTypes.bool,\n loading: PropTypes.bool,\n value: propsValueType,\n defaultValue: propsValueType,\n dropdownStyle: PropTypes.object,\n maxTagTextLength: PropTypes.number,\n maxTagCount: PropTypes.number,\n maxTagPlaceholder: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n tokenSeparators: PropTypes.arrayOf(PropTypes.string),\n getInputElement: PropTypes.func,\n showAction: PropTypes.arrayOf(PropTypes.string),\n clearIcon: PropTypes.node,\n inputIcon: PropTypes.node,\n removeIcon: PropTypes.node,\n menuItemSelectedIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n dropdownRender: PropTypes.func\n};\nexport default SelectPropTypes;","import React from 'react';\nexport function toTitle(title) {\n if (typeof title === 'string') {\n return title;\n }\n\n return '';\n}\nexport function getValuePropValue(child) {\n if (!child) {\n return null;\n }\n\n var props = child.props;\n\n if ('value' in props) {\n return props.value;\n }\n\n if (child.key) {\n return child.key;\n }\n\n if (child.type && child.type.isSelectOptGroup && props.label) {\n return props.label;\n }\n\n throw new Error(\"Need at least a key or a value or a label (only for OptGroup) for \".concat(child));\n}\nexport function getPropValue(child, prop) {\n if (prop === 'value') {\n return getValuePropValue(child);\n }\n\n return child.props[prop];\n}\nexport function isMultiple(props) {\n return props.multiple;\n}\nexport function isCombobox(props) {\n return props.combobox;\n}\nexport function isMultipleOrTags(props) {\n return props.multiple || props.tags;\n}\nexport function isMultipleOrTagsOrCombobox(props) {\n return isMultipleOrTags(props) || isCombobox(props);\n}\nexport function isSingleMode(props) {\n return !isMultipleOrTagsOrCombobox(props);\n}\nexport function toArray(value) {\n var ret = value;\n\n if (value === undefined) {\n ret = [];\n } else if (!Array.isArray(value)) {\n ret = [value];\n }\n\n return ret;\n}\nexport function getMapKey(value) {\n return \"\".concat(typeof value, \"-\").concat(value);\n}\nexport function preventDefaultEvent(e) {\n e.preventDefault();\n}\nexport function findIndexInValueBySingleValue(value, singleValue) {\n var index = -1;\n\n if (value) {\n for (var i = 0; i < value.length; i++) {\n if (value[i] === singleValue) {\n index = i;\n break;\n }\n }\n }\n\n return index;\n}\nexport function getLabelFromPropsValue(value, key) {\n var label;\n value = toArray(value);\n\n if (value) {\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < value.length; i++) {\n if (value[i].key === key) {\n label = value[i].label;\n break;\n }\n }\n }\n\n return label;\n}\nexport function getSelectKeys(menuItems, value) {\n if (value === null || value === undefined) {\n return [];\n }\n\n var selectedKeys = [];\n React.Children.forEach(menuItems, function (item) {\n var type = item.type;\n\n if (type.isMenuItemGroup) {\n selectedKeys = selectedKeys.concat(getSelectKeys(item.props.children, value));\n } else {\n var itemValue = getValuePropValue(item);\n var itemKey = item.key;\n\n if (findIndexInValueBySingleValue(value, itemValue) !== -1 && itemKey) {\n selectedKeys.push(itemKey);\n }\n }\n });\n return selectedKeys;\n}\nexport var UNSELECTABLE_STYLE = {\n userSelect: 'none',\n WebkitUserSelect: 'none'\n};\nexport var UNSELECTABLE_ATTRIBUTE = {\n unselectable: 'on'\n};\nexport function findFirstMenuItem(children) {\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n if (child.type.isMenuItemGroup) {\n var found = findFirstMenuItem(child.props.children);\n\n if (found) {\n return found;\n }\n } else if (!child.props.disabled) {\n return child;\n }\n }\n\n return null;\n}\nexport function includesSeparators(str, separators) {\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < separators.length; ++i) {\n if (str.lastIndexOf(separators[i]) > 0) {\n return true;\n }\n }\n\n return false;\n}\nexport function splitBySeparators(str, separators) {\n var reg = new RegExp(\"[\".concat(separators.join(), \"]\"));\n return str.split(reg).filter(function (token) {\n return token;\n });\n}\nexport function defaultFilterFn(input, child) {\n if (child.props.disabled) {\n return false;\n }\n\n var value = toArray(getPropValue(child, this.props.optionFilterProp)).join('');\n return value.toLowerCase().indexOf(input.toLowerCase()) > -1;\n}\nexport function validateOptionValue(value, props) {\n if (isSingleMode(props) || isMultiple(props)) {\n return;\n }\n\n if (typeof value !== 'string') {\n throw new Error(\"Invalid `value` of type `\".concat(typeof value, \"` supplied to Option, \") + \"expected `string` when `tags/combobox` is `true`.\");\n }\n}\nexport function saveRef(instance, name) {\n return function (node) {\n instance[name] = node;\n };\n}\nexport function generateUUID() {\n if (process.env.NODE_ENV === 'test') {\n return 'test-uuid';\n }\n\n var d = new Date().getTime();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // tslint:disable-next-line:no-bitwise\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16); // tslint:disable-next-line:no-bitwise\n\n return (c === 'x' ? r : r & 0x7 | 0x8).toString(16);\n });\n return uuid;\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (typeof call === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport scrollIntoView from 'dom-scroll-into-view';\nimport * as PropTypes from 'prop-types';\nimport raf from 'raf';\nimport Menu from 'rc-menu';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport { getSelectKeys, preventDefaultEvent, saveRef } from './util';\n\nvar DropdownMenu =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(DropdownMenu, _React$Component);\n\n function DropdownMenu(props) {\n var _this;\n\n _classCallCheck(this, DropdownMenu);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(DropdownMenu).call(this, props));\n _this.rafInstance = null;\n _this.lastVisible = false;\n\n _this.scrollActiveItemToView = function () {\n // scroll into view\n var itemComponent = findDOMNode(_this.firstActiveItem);\n var _this$props = _this.props,\n visible = _this$props.visible,\n firstActiveValue = _this$props.firstActiveValue;\n var value = _this.props.value;\n\n if (!itemComponent || !visible) {\n return;\n }\n\n var scrollIntoViewOpts = {\n onlyScrollIfNeeded: true\n };\n\n if ((!value || value.length === 0) && firstActiveValue) {\n scrollIntoViewOpts.alignWithTop = true;\n } // Delay to scroll since current frame item position is not ready when pre view is by filter\n // https://github.com/ant-design/ant-design/issues/11268#issuecomment-406634462\n\n\n _this.rafInstance = raf(function () {\n scrollIntoView(itemComponent, findDOMNode(_this.menuRef), scrollIntoViewOpts);\n });\n };\n\n _this.renderMenu = function () {\n var _this$props2 = _this.props,\n menuItems = _this$props2.menuItems,\n menuItemSelectedIcon = _this$props2.menuItemSelectedIcon,\n defaultActiveFirstOption = _this$props2.defaultActiveFirstOption,\n prefixCls = _this$props2.prefixCls,\n multiple = _this$props2.multiple,\n onMenuSelect = _this$props2.onMenuSelect,\n inputValue = _this$props2.inputValue,\n backfillValue = _this$props2.backfillValue,\n onMenuDeselect = _this$props2.onMenuDeselect,\n visible = _this$props2.visible;\n var firstActiveValue = _this.props.firstActiveValue;\n\n if (menuItems && menuItems.length) {\n var menuProps = {};\n\n if (multiple) {\n menuProps.onDeselect = onMenuDeselect;\n menuProps.onSelect = onMenuSelect;\n } else {\n menuProps.onClick = onMenuSelect;\n }\n\n var value = _this.props.value;\n var selectedKeys = getSelectKeys(menuItems, value);\n var activeKeyProps = {};\n var defaultActiveFirst = defaultActiveFirstOption;\n var clonedMenuItems = menuItems;\n\n if (selectedKeys.length || firstActiveValue) {\n if (visible && !_this.lastVisible) {\n activeKeyProps.activeKey = selectedKeys[0] || firstActiveValue;\n } else if (!visible) {\n // Do not trigger auto active since we already have selectedKeys\n if (selectedKeys[0]) {\n defaultActiveFirst = false;\n }\n\n activeKeyProps.activeKey = undefined;\n }\n\n var foundFirst = false; // set firstActiveItem via cloning menus\n // for scroll into view\n\n var clone = function clone(item) {\n var key = item.key;\n\n if (!foundFirst && selectedKeys.indexOf(key) !== -1 || !foundFirst && !selectedKeys.length && firstActiveValue.indexOf(item.key) !== -1) {\n foundFirst = true;\n return React.cloneElement(item, {\n ref: function ref(_ref) {\n _this.firstActiveItem = _ref;\n }\n });\n }\n\n return item;\n };\n\n clonedMenuItems = menuItems.map(function (item) {\n if (item.type.isMenuItemGroup) {\n var children = toArray(item.props.children).map(clone);\n return React.cloneElement(item, {}, children);\n }\n\n return clone(item);\n });\n } else {\n // Clear firstActiveItem when dropdown menu items was empty\n // Avoid `Unable to find node on an unmounted component`\n // https://github.com/ant-design/ant-design/issues/10774\n _this.firstActiveItem = null;\n } // clear activeKey when inputValue change\n\n\n var lastValue = value && value[value.length - 1];\n\n if (inputValue !== _this.lastInputValue && (!lastValue || lastValue !== backfillValue)) {\n activeKeyProps.activeKey = '';\n }\n\n return React.createElement(Menu, _extends({\n ref: _this.saveMenuRef,\n style: _this.props.dropdownMenuStyle,\n defaultActiveFirst: defaultActiveFirst,\n role: \"listbox\",\n itemIcon: multiple ? menuItemSelectedIcon : null\n }, activeKeyProps, {\n multiple: multiple\n }, menuProps, {\n selectedKeys: selectedKeys,\n prefixCls: \"\".concat(prefixCls, \"-menu\")\n }), clonedMenuItems);\n }\n\n return null;\n };\n\n _this.lastInputValue = props.inputValue;\n _this.saveMenuRef = saveRef(_assertThisInitialized(_this), 'menuRef');\n return _this;\n }\n\n _createClass(DropdownMenu, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.scrollActiveItemToView();\n this.lastVisible = this.props.visible;\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n if (!nextProps.visible) {\n this.lastVisible = false;\n } // freeze when hide\n\n\n return this.props.visible && !nextProps.visible || nextProps.visible || nextProps.inputValue !== this.props.inputValue;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var props = this.props;\n\n if (!prevProps.visible && props.visible) {\n this.scrollActiveItemToView();\n }\n\n this.lastVisible = props.visible;\n this.lastInputValue = props.inputValue;\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.rafInstance) {\n raf.cancel(this.rafInstance);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var renderMenu = this.renderMenu();\n return renderMenu ? React.createElement(\"div\", {\n style: {\n overflow: 'auto',\n transform: 'translateZ(0)'\n },\n id: this.props.ariaId,\n onFocus: this.props.onPopupFocus,\n onMouseDown: preventDefaultEvent,\n onScroll: this.props.onPopupScroll\n }, renderMenu) : null;\n }\n }]);\n\n return DropdownMenu;\n}(React.Component);\n\nexport { DropdownMenu as default };\nDropdownMenu.displayName = 'DropdownMenu';\nDropdownMenu.propTypes = {\n ariaId: PropTypes.string,\n defaultActiveFirstOption: PropTypes.bool,\n value: PropTypes.any,\n dropdownMenuStyle: PropTypes.object,\n multiple: PropTypes.bool,\n onPopupFocus: PropTypes.func,\n onPopupScroll: PropTypes.func,\n onMenuDeSelect: PropTypes.func,\n onMenuSelect: PropTypes.func,\n prefixCls: PropTypes.string,\n menuItems: PropTypes.any,\n inputValue: PropTypes.string,\n visible: PropTypes.bool,\n firstActiveValue: PropTypes.string,\n menuItemSelectedIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.node])\n};","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (typeof call === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nimport classnames from 'classnames';\nimport * as PropTypes from 'prop-types';\nimport raf from 'raf';\nimport Trigger from 'rc-trigger';\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport DropdownMenu from './DropdownMenu';\nimport { isSingleMode, saveRef } from './util';\nTrigger.displayName = 'Trigger';\nvar BUILT_IN_PLACEMENTS = {\n bottomLeft: {\n points: ['tl', 'bl'],\n offset: [0, 4],\n overflow: {\n adjustX: 0,\n adjustY: 1\n }\n },\n topLeft: {\n points: ['bl', 'tl'],\n offset: [0, -4],\n overflow: {\n adjustX: 0,\n adjustY: 1\n }\n }\n};\n\nvar SelectTrigger =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(SelectTrigger, _React$Component);\n\n function SelectTrigger(props) {\n var _this;\n\n _classCallCheck(this, SelectTrigger);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(SelectTrigger).call(this, props));\n _this.dropdownMenuRef = null;\n _this.rafInstance = null;\n\n _this.setDropdownWidth = function () {\n _this.cancelRafInstance();\n\n _this.rafInstance = raf(function () {\n var dom = ReactDOM.findDOMNode(_assertThisInitialized(_this));\n var width = dom.offsetWidth;\n\n if (width !== _this.state.dropdownWidth) {\n _this.setState({\n dropdownWidth: width\n });\n }\n });\n };\n\n _this.cancelRafInstance = function () {\n if (_this.rafInstance) {\n raf.cancel(_this.rafInstance);\n }\n };\n\n _this.getInnerMenu = function () {\n return _this.dropdownMenuRef && _this.dropdownMenuRef.menuRef;\n };\n\n _this.getPopupDOMNode = function () {\n return _this.triggerRef.getPopupDomNode();\n };\n\n _this.getDropdownElement = function (newProps) {\n var props = _this.props;\n var dropdownRender = props.dropdownRender,\n ariaId = props.ariaId;\n var menuNode = React.createElement(DropdownMenu, _extends({\n ref: _this.saveDropdownMenuRef\n }, newProps, {\n ariaId: ariaId,\n prefixCls: _this.getDropdownPrefixCls(),\n onMenuSelect: props.onMenuSelect,\n onMenuDeselect: props.onMenuDeselect,\n onPopupScroll: props.onPopupScroll,\n value: props.value,\n backfillValue: props.backfillValue,\n firstActiveValue: props.firstActiveValue,\n defaultActiveFirstOption: props.defaultActiveFirstOption,\n dropdownMenuStyle: props.dropdownMenuStyle,\n menuItemSelectedIcon: props.menuItemSelectedIcon\n }));\n\n if (dropdownRender) {\n return dropdownRender(menuNode, props);\n }\n\n return null;\n };\n\n _this.getDropdownTransitionName = function () {\n var props = _this.props;\n var transitionName = props.transitionName;\n\n if (!transitionName && props.animation) {\n transitionName = \"\".concat(_this.getDropdownPrefixCls(), \"-\").concat(props.animation);\n }\n\n return transitionName;\n };\n\n _this.getDropdownPrefixCls = function () {\n return \"\".concat(_this.props.prefixCls, \"-dropdown\");\n };\n\n _this.saveDropdownMenuRef = saveRef(_assertThisInitialized(_this), 'dropdownMenuRef');\n _this.saveTriggerRef = saveRef(_assertThisInitialized(_this), 'triggerRef');\n _this.state = {\n dropdownWidth: 0\n };\n return _this;\n }\n\n _createClass(SelectTrigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setDropdownWidth();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.setDropdownWidth();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRafInstance();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _popupClassName;\n\n var _a = this.props,\n onPopupFocus = _a.onPopupFocus,\n empty = _a.empty,\n props = __rest(_a, [\"onPopupFocus\", \"empty\"]);\n\n var multiple = props.multiple,\n visible = props.visible,\n inputValue = props.inputValue,\n dropdownAlign = props.dropdownAlign,\n disabled = props.disabled,\n showSearch = props.showSearch,\n dropdownClassName = props.dropdownClassName,\n dropdownStyle = props.dropdownStyle,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth;\n var dropdownPrefixCls = this.getDropdownPrefixCls();\n var popupClassName = (_popupClassName = {}, _defineProperty(_popupClassName, dropdownClassName, !!dropdownClassName), _defineProperty(_popupClassName, \"\".concat(dropdownPrefixCls, \"--\").concat(multiple ? 'multiple' : 'single'), 1), _defineProperty(_popupClassName, \"\".concat(dropdownPrefixCls, \"--empty\"), empty), _popupClassName);\n var popupElement = this.getDropdownElement({\n menuItems: props.options,\n onPopupFocus: onPopupFocus,\n multiple: multiple,\n inputValue: inputValue,\n visible: visible\n });\n var hideAction;\n\n if (disabled) {\n hideAction = [];\n } else if (isSingleMode(props) && !showSearch) {\n hideAction = ['click'];\n } else {\n hideAction = ['blur'];\n }\n\n var popupStyle = _extends({}, dropdownStyle);\n\n var widthProp = dropdownMatchSelectWidth ? 'width' : 'minWidth';\n\n if (this.state.dropdownWidth) {\n popupStyle[widthProp] = \"\".concat(this.state.dropdownWidth, \"px\");\n }\n\n return React.createElement(Trigger, _extends({}, props, {\n showAction: disabled ? [] : this.props.showAction,\n hideAction: hideAction,\n ref: this.saveTriggerRef,\n popupPlacement: \"bottomLeft\",\n builtinPlacements: BUILT_IN_PLACEMENTS,\n prefixCls: dropdownPrefixCls,\n popupTransitionName: this.getDropdownTransitionName(),\n onPopupVisibleChange: props.onDropdownVisibleChange,\n popup: popupElement,\n popupAlign: dropdownAlign,\n popupVisible: visible,\n getPopupContainer: props.getPopupContainer,\n popupClassName: classnames(popupClassName),\n popupStyle: popupStyle\n }), props.children);\n }\n }]);\n\n return SelectTrigger;\n}(React.Component);\n\nexport { SelectTrigger as default };\nSelectTrigger.defaultProps = {\n dropdownRender: function dropdownRender(menu) {\n return menu;\n }\n};\nSelectTrigger.propTypes = {\n onPopupFocus: PropTypes.func,\n onPopupScroll: PropTypes.func,\n dropdownMatchSelectWidth: PropTypes.bool,\n dropdownAlign: PropTypes.object,\n visible: PropTypes.bool,\n disabled: PropTypes.bool,\n showSearch: PropTypes.bool,\n dropdownClassName: PropTypes.string,\n multiple: PropTypes.bool,\n inputValue: PropTypes.string,\n filterOption: PropTypes.any,\n options: PropTypes.any,\n prefixCls: PropTypes.string,\n popupClassName: PropTypes.string,\n children: PropTypes.any,\n showAction: PropTypes.arrayOf(PropTypes.string),\n menuItemSelectedIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n dropdownRender: PropTypes.func,\n ariaId: PropTypes.string\n};\nSelectTrigger.displayName = 'SelectTrigger';","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (typeof call === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport classnames from 'classnames';\nimport classes from 'component-classes';\nimport Animate from 'rc-animate';\nimport { Item as MenuItem, ItemGroup as MenuItemGroup } from 'rc-menu';\nimport childrenToArray from \"rc-util/es/Children/toArray\";\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { polyfill } from 'react-lifecycles-compat';\nimport warning from 'warning';\nimport Option from './Option';\nimport SelectPropTypes from './PropTypes';\nimport SelectTrigger from './SelectTrigger';\nimport { defaultFilterFn, findFirstMenuItem, findIndexInValueBySingleValue, generateUUID, getLabelFromPropsValue, getMapKey, getPropValue, getValuePropValue, includesSeparators, isCombobox, isMultipleOrTags, isMultipleOrTagsOrCombobox, isSingleMode, preventDefaultEvent, saveRef, splitBySeparators, toArray, toTitle, UNSELECTABLE_ATTRIBUTE, UNSELECTABLE_STYLE, validateOptionValue } from './util';\nvar SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY';\n\nvar noop = function noop() {\n return null;\n};\n\nfunction chaining() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < fns.length; i++) {\n if (fns[i] && typeof fns[i] === 'function') {\n fns[i].apply(chaining, args);\n }\n }\n };\n}\n\nvar Select =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Select, _React$Component);\n\n function Select(props) {\n var _this;\n\n _classCallCheck(this, Select);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, props));\n _this.inputRef = null;\n _this.inputMirrorRef = null;\n _this.topCtrlRef = null;\n _this.selectTriggerRef = null;\n _this.rootRef = null;\n _this.selectionRef = null;\n _this.dropdownContainer = null;\n _this.blurTimer = null;\n _this.focusTimer = null;\n _this.comboboxTimer = null; // tslint:disable-next-line:variable-name\n\n _this._focused = false; // tslint:disable-next-line:variable-name\n\n _this._mouseDown = false; // tslint:disable-next-line:variable-name\n\n _this._options = []; // tslint:disable-next-line:variable-name\n\n _this._empty = false;\n\n _this.onInputChange = function (event) {\n var tokenSeparators = _this.props.tokenSeparators;\n var val = event.target.value;\n\n if (isMultipleOrTags(_this.props) && tokenSeparators.length && includesSeparators(val, tokenSeparators)) {\n var nextValue = _this.getValueByInput(val);\n\n if (nextValue !== undefined) {\n _this.fireChange(nextValue);\n }\n\n _this.setOpenState(false, {\n needFocus: true\n });\n\n _this.setInputValue('', false);\n\n return;\n }\n\n _this.setInputValue(val);\n\n _this.setState({\n open: true\n });\n\n if (isCombobox(_this.props)) {\n _this.fireChange([val]);\n }\n };\n\n _this.onDropdownVisibleChange = function (open) {\n if (open && !_this._focused) {\n _this.clearBlurTime();\n\n _this.timeoutFocus();\n\n _this._focused = true;\n\n _this.updateFocusClassName();\n }\n\n _this.setOpenState(open);\n }; // combobox ignore\n\n\n _this.onKeyDown = function (event) {\n var open = _this.state.open;\n var disabled = _this.props.disabled;\n\n if (disabled) {\n return;\n }\n\n var keyCode = event.keyCode;\n\n if (open && !_this.getInputDOMNode()) {\n _this.onInputKeyDown(event);\n } else if (keyCode === KeyCode.ENTER || keyCode === KeyCode.DOWN) {\n if (!open) {\n _this.setOpenState(true);\n }\n\n event.preventDefault();\n } else if (keyCode === KeyCode.SPACE) {\n // Not block space if popup is shown\n if (!open) {\n _this.setOpenState(true);\n\n event.preventDefault();\n }\n }\n };\n\n _this.onInputKeyDown = function (event) {\n var _this$props = _this.props,\n disabled = _this$props.disabled,\n combobox = _this$props.combobox,\n defaultActiveFirstOption = _this$props.defaultActiveFirstOption;\n\n if (disabled) {\n return;\n }\n\n var state = _this.state;\n\n var isRealOpen = _this.getRealOpenState(state); // magic code\n\n\n var keyCode = event.keyCode;\n\n if (isMultipleOrTags(_this.props) && !event.target.value && keyCode === KeyCode.BACKSPACE) {\n event.preventDefault();\n var value = state.value;\n\n if (value.length) {\n _this.removeSelected(value[value.length - 1]);\n }\n\n return;\n }\n\n if (keyCode === KeyCode.DOWN) {\n if (!state.open) {\n _this.openIfHasChildren();\n\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n } else if (keyCode === KeyCode.ENTER && state.open) {\n // Aviod trigger form submit when select item\n // https://github.com/ant-design/ant-design/issues/10861\n // https://github.com/ant-design/ant-design/issues/14544\n if (isRealOpen || !combobox) {\n event.preventDefault();\n } // Hard close popup to avoid lock of non option in combobox mode\n\n\n if (isRealOpen && combobox && defaultActiveFirstOption === false) {\n _this.comboboxTimer = setTimeout(function () {\n _this.setOpenState(false);\n });\n }\n } else if (keyCode === KeyCode.ESC) {\n if (state.open) {\n _this.setOpenState(false);\n\n event.preventDefault();\n event.stopPropagation();\n }\n\n return;\n }\n\n if (isRealOpen && _this.selectTriggerRef) {\n var menu = _this.selectTriggerRef.getInnerMenu();\n\n if (menu && menu.onKeyDown(event, _this.handleBackfill)) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n };\n\n _this.onMenuSelect = function (_ref) {\n var item = _ref.item;\n\n if (!item) {\n return;\n }\n\n var value = _this.state.value;\n var props = _this.props;\n var selectedValue = getValuePropValue(item);\n var lastValue = value[value.length - 1];\n var skipTrigger = false;\n\n if (isMultipleOrTags(props)) {\n if (findIndexInValueBySingleValue(value, selectedValue) !== -1) {\n skipTrigger = true;\n } else {\n value = value.concat([selectedValue]);\n }\n } else {\n if (!isCombobox(props) && lastValue !== undefined && lastValue === selectedValue && selectedValue !== _this.state.backfillValue) {\n _this.setOpenState(false, {\n needFocus: true,\n fireSearch: false\n });\n\n skipTrigger = true;\n } else {\n value = [selectedValue];\n\n _this.setOpenState(false, {\n needFocus: true,\n fireSearch: false\n });\n }\n }\n\n if (!skipTrigger) {\n _this.fireChange(value);\n }\n\n _this.fireSelect(selectedValue);\n\n if (!skipTrigger) {\n var inputValue = isCombobox(props) ? getPropValue(item, props.optionLabelProp) : '';\n\n if (props.autoClearSearchValue) {\n _this.setInputValue(inputValue, false);\n }\n }\n };\n\n _this.onMenuDeselect = function (_ref2) {\n var item = _ref2.item,\n domEvent = _ref2.domEvent;\n\n if (domEvent.type === 'keydown' && domEvent.keyCode === KeyCode.ENTER) {\n _this.removeSelected(getValuePropValue(item));\n\n return;\n }\n\n if (domEvent.type === 'click') {\n _this.removeSelected(getValuePropValue(item));\n }\n\n var props = _this.props;\n\n if (props.autoClearSearchValue) {\n _this.setInputValue('');\n }\n };\n\n _this.onArrowClick = function (e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (!_this.props.disabled) {\n _this.setOpenState(!_this.state.open, {\n needFocus: !_this.state.open\n });\n }\n };\n\n _this.onPlaceholderClick = function () {\n if (_this.getInputDOMNode && _this.getInputDOMNode()) {\n _this.getInputDOMNode().focus();\n }\n };\n\n _this.onOuterFocus = function (e) {\n if (_this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n _this.clearBlurTime(); // In IE11, onOuterFocus will be trigger twice when focus input\n // First one: e.target is div\n // Second one: e.target is input\n // other browser only trigger second one\n // https://github.com/ant-design/ant-design/issues/15942\n // Here we ignore the first one when e.target is div\n\n\n var inputNode = _this.getInputDOMNode();\n\n if (inputNode && e.target === _this.rootRef) {\n return;\n }\n\n if (!isMultipleOrTagsOrCombobox(_this.props) && e.target === inputNode) {\n return;\n }\n\n if (_this._focused) {\n return;\n }\n\n _this._focused = true;\n\n _this.updateFocusClassName(); // only effect multiple or tag mode\n\n\n if (!isMultipleOrTags(_this.props) || !_this._mouseDown) {\n _this.timeoutFocus();\n }\n };\n\n _this.onPopupFocus = function () {\n // fix ie scrollbar, focus element again\n _this.maybeFocus(true, true);\n };\n\n _this.onOuterBlur = function (e) {\n if (_this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n _this.blurTimer = window.setTimeout(function () {\n _this._focused = false;\n\n _this.updateFocusClassName();\n\n var props = _this.props;\n var value = _this.state.value;\n var inputValue = _this.state.inputValue;\n\n if (isSingleMode(props) && props.showSearch && inputValue && props.defaultActiveFirstOption) {\n var options = _this._options || [];\n\n if (options.length) {\n var firstOption = findFirstMenuItem(options);\n\n if (firstOption) {\n value = [getValuePropValue(firstOption)];\n\n _this.fireChange(value);\n }\n }\n } else if (isMultipleOrTags(props) && inputValue) {\n if (_this._mouseDown) {\n // need update dropmenu when not blur\n _this.setInputValue('');\n } else {\n // why not use setState?\n // https://github.com/ant-design/ant-design/issues/14262\n _this.state.inputValue = '';\n\n if (_this.getInputDOMNode && _this.getInputDOMNode()) {\n _this.getInputDOMNode().value = '';\n }\n }\n\n var tmpValue = _this.getValueByInput(inputValue);\n\n if (tmpValue !== undefined) {\n value = tmpValue;\n\n _this.fireChange(value);\n }\n } // if click the rest space of Select in multiple mode\n\n\n if (isMultipleOrTags(props) && _this._mouseDown) {\n _this.maybeFocus(true, true);\n\n _this._mouseDown = false;\n return;\n }\n\n _this.setOpenState(false);\n\n if (props.onBlur) {\n props.onBlur(_this.getVLForOnChange(value));\n }\n }, 10);\n };\n\n _this.onClearSelection = function (event) {\n var props = _this.props;\n var state = _this.state;\n\n if (props.disabled) {\n return;\n }\n\n var inputValue = state.inputValue;\n var value = state.value;\n event.stopPropagation();\n\n if (inputValue || value.length) {\n if (value.length) {\n _this.fireChange([]);\n }\n\n _this.setOpenState(false, {\n needFocus: true\n });\n\n if (inputValue) {\n _this.setInputValue('');\n }\n }\n };\n\n _this.onChoiceAnimationLeave = function () {\n _this.forcePopupAlign();\n };\n\n _this.getOptionInfoBySingleValue = function (value, optionsInfo) {\n var info;\n optionsInfo = optionsInfo || _this.state.optionsInfo;\n\n if (optionsInfo[getMapKey(value)]) {\n info = optionsInfo[getMapKey(value)];\n }\n\n if (info) {\n return info;\n }\n\n var defaultLabel = value;\n\n if (_this.props.labelInValue) {\n var valueLabel = getLabelFromPropsValue(_this.props.value, value);\n var defaultValueLabel = getLabelFromPropsValue(_this.props.defaultValue, value);\n\n if (valueLabel !== undefined) {\n defaultLabel = valueLabel;\n } else if (defaultValueLabel !== undefined) {\n defaultLabel = defaultValueLabel;\n }\n }\n\n var defaultInfo = {\n option: React.createElement(Option, {\n value: value,\n key: value\n }, value),\n value: value,\n label: defaultLabel\n };\n return defaultInfo;\n };\n\n _this.getOptionBySingleValue = function (value) {\n var _this$getOptionInfoBy = _this.getOptionInfoBySingleValue(value),\n option = _this$getOptionInfoBy.option;\n\n return option;\n };\n\n _this.getOptionsBySingleValue = function (values) {\n return values.map(function (value) {\n return _this.getOptionBySingleValue(value);\n });\n };\n\n _this.getValueByLabel = function (label) {\n if (label === undefined) {\n return null;\n }\n\n var value = null;\n Object.keys(_this.state.optionsInfo).forEach(function (key) {\n var info = _this.state.optionsInfo[key];\n var disabled = info.disabled;\n\n if (disabled) {\n return;\n }\n\n var oldLable = toArray(info.label);\n\n if (oldLable && oldLable.join('') === label) {\n value = info.value;\n }\n });\n return value;\n };\n\n _this.getVLBySingleValue = function (value) {\n if (_this.props.labelInValue) {\n return {\n key: value,\n label: _this.getLabelBySingleValue(value)\n };\n }\n\n return value;\n };\n\n _this.getVLForOnChange = function (vlsS) {\n var vls = vlsS;\n\n if (vls !== undefined) {\n if (!_this.props.labelInValue) {\n vls = vls.map(function (v) {\n return v;\n });\n } else {\n vls = vls.map(function (vl) {\n return {\n key: vl,\n label: _this.getLabelBySingleValue(vl)\n };\n });\n }\n\n return isMultipleOrTags(_this.props) ? vls : vls[0];\n }\n\n return vls;\n };\n\n _this.getLabelBySingleValue = function (value, optionsInfo) {\n var _this$getOptionInfoBy2 = _this.getOptionInfoBySingleValue(value, optionsInfo),\n label = _this$getOptionInfoBy2.label;\n\n return label;\n };\n\n _this.getDropdownContainer = function () {\n if (!_this.dropdownContainer) {\n _this.dropdownContainer = document.createElement('div');\n document.body.appendChild(_this.dropdownContainer);\n }\n\n return _this.dropdownContainer;\n };\n\n _this.getPlaceholderElement = function () {\n var props = _this.props;\n var state = _this.state;\n var hidden = false;\n\n if (state.inputValue) {\n hidden = true;\n }\n\n var value = state.value;\n\n if (value.length) {\n hidden = true;\n }\n\n if (isCombobox(props) && value.length === 1 && state.value && !state.value[0]) {\n hidden = false;\n }\n\n var placeholder = props.placeholder;\n\n if (placeholder) {\n return React.createElement(\"div\", _extends({\n onMouseDown: preventDefaultEvent,\n style: _extends({\n display: hidden ? 'none' : 'block'\n }, UNSELECTABLE_STYLE)\n }, UNSELECTABLE_ATTRIBUTE, {\n onClick: _this.onPlaceholderClick,\n className: \"\".concat(props.prefixCls, \"-selection__placeholder\")\n }), placeholder);\n }\n\n return null;\n };\n\n _this.getInputElement = function () {\n var props = _this.props;\n var defaultInput = React.createElement(\"input\", {\n id: props.id,\n autoComplete: \"off\"\n }); // tslint:disable-next-line:typedef-whitespace\n\n var inputElement = props.getInputElement ? props.getInputElement() : defaultInput;\n var inputCls = classnames(inputElement.props.className, _defineProperty({}, \"\".concat(props.prefixCls, \"-search__field\"), true)); // https://github.com/ant-design/ant-design/issues/4992#issuecomment-281542159\n // Add space to the end of the inputValue as the width measurement tolerance\n\n return React.createElement(\"div\", {\n className: \"\".concat(props.prefixCls, \"-search__field__wrap\")\n }, React.cloneElement(inputElement, {\n ref: _this.saveInputRef,\n onChange: _this.onInputChange,\n onKeyDown: chaining(_this.onInputKeyDown, inputElement.props.onKeyDown, _this.props.onInputKeyDown),\n value: _this.state.inputValue,\n disabled: props.disabled,\n className: inputCls\n }), React.createElement(\"span\", {\n ref: _this.saveInputMirrorRef,\n className: \"\".concat(props.prefixCls, \"-search__field__mirror\")\n }, _this.state.inputValue, \"\\xA0\"));\n };\n\n _this.getInputDOMNode = function () {\n return _this.topCtrlRef ? _this.topCtrlRef.querySelector('input,textarea,div[contentEditable]') : _this.inputRef;\n };\n\n _this.getInputMirrorDOMNode = function () {\n return _this.inputMirrorRef;\n };\n\n _this.getPopupDOMNode = function () {\n if (_this.selectTriggerRef) {\n return _this.selectTriggerRef.getPopupDOMNode();\n }\n };\n\n _this.getPopupMenuComponent = function () {\n if (_this.selectTriggerRef) {\n return _this.selectTriggerRef.getInnerMenu();\n }\n };\n\n _this.setOpenState = function (open) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var needFocus = config.needFocus,\n fireSearch = config.fireSearch;\n var props = _this.props;\n var state = _this.state;\n\n if (state.open === open) {\n _this.maybeFocus(open, !!needFocus);\n\n return;\n }\n\n if (_this.props.onDropdownVisibleChange) {\n _this.props.onDropdownVisibleChange(open);\n }\n\n var nextState = {\n open: open,\n backfillValue: ''\n }; // clear search input value when open is false in singleMode.\n // https://github.com/ant-design/ant-design/issues/16572\n\n if (!open && isSingleMode(props) && props.showSearch) {\n _this.setInputValue('', fireSearch);\n }\n\n if (!open) {\n _this.maybeFocus(open, !!needFocus);\n }\n\n _this.setState(_extends({\n open: open\n }, nextState), function () {\n if (open) {\n _this.maybeFocus(open, !!needFocus);\n }\n });\n };\n\n _this.setInputValue = function (inputValue) {\n var fireSearch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var onSearch = _this.props.onSearch;\n\n if (inputValue !== _this.state.inputValue) {\n _this.setState(function (prevState) {\n // Additional check if `inputValue` changed in latest state.\n if (fireSearch && inputValue !== prevState.inputValue && onSearch) {\n onSearch(inputValue);\n }\n\n return {\n inputValue: inputValue\n };\n }, _this.forcePopupAlign);\n }\n };\n\n _this.getValueByInput = function (str) {\n var _this$props2 = _this.props,\n multiple = _this$props2.multiple,\n tokenSeparators = _this$props2.tokenSeparators;\n var nextValue = _this.state.value;\n var hasNewValue = false;\n splitBySeparators(str, tokenSeparators).forEach(function (label) {\n var selectedValue = [label];\n\n if (multiple) {\n var value = _this.getValueByLabel(label);\n\n if (value && findIndexInValueBySingleValue(nextValue, value) === -1) {\n nextValue = nextValue.concat(value);\n hasNewValue = true;\n\n _this.fireSelect(value);\n }\n } else if (findIndexInValueBySingleValue(nextValue, label) === -1) {\n nextValue = nextValue.concat(selectedValue);\n hasNewValue = true;\n\n _this.fireSelect(label);\n }\n });\n return hasNewValue ? nextValue : undefined;\n };\n\n _this.getRealOpenState = function (state) {\n // tslint:disable-next-line:variable-name\n var _open = _this.props.open;\n\n if (typeof _open === 'boolean') {\n return _open;\n }\n\n var open = (state || _this.state).open;\n var options = _this._options || [];\n\n if (isMultipleOrTagsOrCombobox(_this.props) || !_this.props.showSearch) {\n if (open && !options.length) {\n open = false;\n }\n }\n\n return open;\n };\n\n _this.markMouseDown = function () {\n _this._mouseDown = true;\n };\n\n _this.markMouseLeave = function () {\n _this._mouseDown = false;\n };\n\n _this.handleBackfill = function (item) {\n if (!_this.props.backfill || !(isSingleMode(_this.props) || isCombobox(_this.props))) {\n return;\n }\n\n var key = getValuePropValue(item);\n\n if (isCombobox(_this.props)) {\n _this.setInputValue(key, false);\n }\n\n _this.setState({\n value: [key],\n backfillValue: key\n });\n };\n\n _this.filterOption = function (input, child) {\n var defaultFilter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterFn;\n var value = _this.state.value;\n var lastValue = value[value.length - 1];\n\n if (!input || lastValue && lastValue === _this.state.backfillValue) {\n return true;\n }\n\n var filterFn = _this.props.filterOption;\n\n if ('filterOption' in _this.props) {\n if (filterFn === true) {\n filterFn = defaultFilter.bind(_assertThisInitialized(_this));\n }\n } else {\n filterFn = defaultFilter.bind(_assertThisInitialized(_this));\n }\n\n if (!filterFn) {\n return true;\n } else if (typeof filterFn === 'function') {\n return filterFn.call(_assertThisInitialized(_this), input, child);\n } else if (child.props.disabled) {\n return false;\n }\n\n return true;\n };\n\n _this.timeoutFocus = function () {\n var onFocus = _this.props.onFocus;\n\n if (_this.focusTimer) {\n _this.clearFocusTime();\n }\n\n _this.focusTimer = window.setTimeout(function () {\n if (onFocus) {\n onFocus();\n }\n }, 10);\n };\n\n _this.clearFocusTime = function () {\n if (_this.focusTimer) {\n clearTimeout(_this.focusTimer);\n _this.focusTimer = null;\n }\n };\n\n _this.clearBlurTime = function () {\n if (_this.blurTimer) {\n clearTimeout(_this.blurTimer);\n _this.blurTimer = null;\n }\n };\n\n _this.clearComboboxTime = function () {\n if (_this.comboboxTimer) {\n clearTimeout(_this.comboboxTimer);\n _this.comboboxTimer = null;\n }\n };\n\n _this.updateFocusClassName = function () {\n var rootRef = _this.rootRef;\n var props = _this.props; // avoid setState and its side effect\n\n if (_this._focused) {\n classes(rootRef).add(\"\".concat(props.prefixCls, \"-focused\"));\n } else {\n classes(rootRef).remove(\"\".concat(props.prefixCls, \"-focused\"));\n }\n };\n\n _this.maybeFocus = function (open, needFocus) {\n if (needFocus || open) {\n var input = _this.getInputDOMNode();\n\n var _document = document,\n activeElement = _document.activeElement;\n\n if (input && (open || isMultipleOrTagsOrCombobox(_this.props))) {\n if (activeElement !== input) {\n input.focus();\n _this._focused = true;\n }\n } else if (activeElement !== _this.selectionRef && _this.selectionRef) {\n _this.selectionRef.focus();\n\n _this._focused = true;\n }\n }\n };\n\n _this.removeSelected = function (selectedKey, e) {\n var props = _this.props;\n\n if (props.disabled || _this.isChildDisabled(selectedKey)) {\n return;\n } // Do not trigger Trigger popup\n\n\n if (e && e.stopPropagation) {\n e.stopPropagation();\n }\n\n var oldValue = _this.state.value;\n var value = oldValue.filter(function (singleValue) {\n return singleValue !== selectedKey;\n });\n var canMultiple = isMultipleOrTags(props);\n\n if (canMultiple) {\n var event = selectedKey;\n\n if (props.labelInValue) {\n event = {\n key: selectedKey,\n label: _this.getLabelBySingleValue(selectedKey)\n };\n }\n\n if (props.onDeselect) {\n props.onDeselect(event, _this.getOptionBySingleValue(selectedKey));\n }\n }\n\n _this.fireChange(value);\n };\n\n _this.openIfHasChildren = function () {\n var props = _this.props;\n\n if (React.Children.count(props.children) || isSingleMode(props)) {\n _this.setOpenState(true);\n }\n };\n\n _this.fireSelect = function (value) {\n if (_this.props.onSelect) {\n _this.props.onSelect(_this.getVLBySingleValue(value), _this.getOptionBySingleValue(value));\n }\n };\n\n _this.fireChange = function (value) {\n var props = _this.props;\n\n if (!('value' in props)) {\n _this.setState({\n value: value\n }, _this.forcePopupAlign);\n }\n\n var vls = _this.getVLForOnChange(value);\n\n var options = _this.getOptionsBySingleValue(value);\n\n if (props.onChange) {\n props.onChange(vls, isMultipleOrTags(_this.props) ? options : options[0]);\n }\n };\n\n _this.isChildDisabled = function (key) {\n return childrenToArray(_this.props.children).some(function (child) {\n var childValue = getValuePropValue(child);\n return childValue === key && child.props && child.props.disabled;\n });\n };\n\n _this.forcePopupAlign = function () {\n if (!_this.state.open) {\n return;\n }\n\n if (_this.selectTriggerRef && _this.selectTriggerRef.triggerRef) {\n _this.selectTriggerRef.triggerRef.forcePopupAlign();\n }\n };\n\n _this.renderFilterOptions = function () {\n var inputValue = _this.state.inputValue;\n var _this$props3 = _this.props,\n children = _this$props3.children,\n tags = _this$props3.tags,\n notFoundContent = _this$props3.notFoundContent;\n var menuItems = [];\n var childrenKeys = [];\n var empty = false;\n\n var options = _this.renderFilterOptionsFromChildren(children, childrenKeys, menuItems);\n\n if (tags) {\n // tags value must be string\n var value = _this.state.value;\n value = value.filter(function (singleValue) {\n return childrenKeys.indexOf(singleValue) === -1 && (!inputValue || String(singleValue).indexOf(String(inputValue)) > -1);\n }); // sort by length\n\n value.sort(function (val1, val2) {\n return val1.length - val2.length;\n });\n value.forEach(function (singleValue) {\n var key = singleValue;\n var menuItem = React.createElement(MenuItem, {\n style: UNSELECTABLE_STYLE,\n role: \"option\",\n attribute: UNSELECTABLE_ATTRIBUTE,\n value: key,\n key: key\n }, key);\n options.push(menuItem);\n menuItems.push(menuItem);\n }); // ref: https://github.com/ant-design/ant-design/issues/14090\n\n if (inputValue && menuItems.every(function (option) {\n return getValuePropValue(option) !== inputValue;\n })) {\n options.unshift(React.createElement(MenuItem, {\n style: UNSELECTABLE_STYLE,\n role: \"option\",\n attribute: UNSELECTABLE_ATTRIBUTE,\n value: inputValue,\n key: inputValue\n }, inputValue));\n }\n }\n\n if (!options.length && notFoundContent) {\n empty = true;\n options = [React.createElement(MenuItem, {\n style: UNSELECTABLE_STYLE,\n attribute: UNSELECTABLE_ATTRIBUTE,\n disabled: true,\n role: \"option\",\n value: \"NOT_FOUND\",\n key: \"NOT_FOUND\"\n }, notFoundContent)];\n }\n\n return {\n empty: empty,\n options: options\n };\n };\n\n _this.renderFilterOptionsFromChildren = function (children, childrenKeys, menuItems) {\n var sel = [];\n var props = _this.props;\n var inputValue = _this.state.inputValue;\n var tags = props.tags;\n React.Children.forEach(children, function (child) {\n if (!child) {\n return;\n }\n\n var type = child.type;\n\n if (type.isSelectOptGroup) {\n var label = child.props.label;\n var key = child.key;\n\n if (!key && typeof label === 'string') {\n key = label;\n } else if (!label && key) {\n label = key;\n } // Match option group label\n\n\n if (inputValue && _this.filterOption(inputValue, child)) {\n var innerItems = childrenToArray(child.props.children).map(function (subChild) {\n var childValueSub = getValuePropValue(subChild) || subChild.key;\n return React.createElement(MenuItem, _extends({\n key: childValueSub,\n value: childValueSub\n }, subChild.props));\n });\n sel.push(React.createElement(MenuItemGroup, {\n key: key,\n title: label\n }, innerItems)); // Not match\n } else {\n var _innerItems = _this.renderFilterOptionsFromChildren(child.props.children, childrenKeys, menuItems);\n\n if (_innerItems.length) {\n sel.push(React.createElement(MenuItemGroup, {\n key: key,\n title: label\n }, _innerItems));\n }\n }\n\n return;\n }\n\n warning(type.isSelectOption, 'the children of `Select` should be `Select.Option` or `Select.OptGroup`, ' + \"instead of `\".concat(type.name || type.displayName || child.type, \"`.\"));\n var childValue = getValuePropValue(child);\n validateOptionValue(childValue, _this.props);\n\n if (_this.filterOption(inputValue, child)) {\n var menuItem = React.createElement(MenuItem, _extends({\n style: UNSELECTABLE_STYLE,\n attribute: UNSELECTABLE_ATTRIBUTE,\n value: childValue,\n key: childValue,\n role: \"option\"\n }, child.props));\n sel.push(menuItem);\n menuItems.push(menuItem);\n }\n\n if (tags) {\n childrenKeys.push(childValue);\n }\n });\n return sel;\n };\n\n _this.renderTopControlNode = function () {\n var _this$state = _this.state,\n open = _this$state.open,\n inputValue = _this$state.inputValue;\n var value = _this.state.value;\n var props = _this.props;\n var choiceTransitionName = props.choiceTransitionName,\n prefixCls = props.prefixCls,\n maxTagTextLength = props.maxTagTextLength,\n maxTagCount = props.maxTagCount,\n showSearch = props.showSearch,\n removeIcon = props.removeIcon;\n var maxTagPlaceholder = props.maxTagPlaceholder;\n var className = \"\".concat(prefixCls, \"-selection__rendered\"); // search input is inside topControlNode in single, multiple & combobox. 2016/04/13\n\n var innerNode = null;\n\n if (isSingleMode(props)) {\n var selectedValue = null;\n\n if (value.length) {\n var showSelectedValue = false;\n var opacity = 1;\n\n if (!showSearch) {\n showSelectedValue = true;\n } else if (open) {\n showSelectedValue = !inputValue;\n\n if (showSelectedValue) {\n opacity = 0.4;\n }\n } else {\n showSelectedValue = true;\n }\n\n var singleValue = value[0];\n\n var _this$getOptionInfoBy3 = _this.getOptionInfoBySingleValue(singleValue),\n label = _this$getOptionInfoBy3.label,\n title = _this$getOptionInfoBy3.title;\n\n selectedValue = React.createElement(\"div\", {\n key: \"value\",\n className: \"\".concat(prefixCls, \"-selection-selected-value\"),\n title: toTitle(title || label),\n style: {\n display: showSelectedValue ? 'block' : 'none',\n opacity: opacity\n }\n }, label);\n }\n\n if (!showSearch) {\n innerNode = [selectedValue];\n } else {\n innerNode = [selectedValue, React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-search \").concat(prefixCls, \"-search--inline\"),\n key: \"input\",\n style: {\n display: open ? 'block' : 'none'\n }\n }, _this.getInputElement())];\n }\n } else {\n var selectedValueNodes = [];\n var limitedCountValue = value;\n var maxTagPlaceholderEl;\n\n if (maxTagCount !== undefined && value.length > maxTagCount) {\n limitedCountValue = limitedCountValue.slice(0, maxTagCount);\n\n var omittedValues = _this.getVLForOnChange(value.slice(maxTagCount, value.length));\n\n var content = \"+ \".concat(value.length - maxTagCount, \" ...\");\n\n if (maxTagPlaceholder) {\n content = typeof maxTagPlaceholder === 'function' ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder;\n }\n\n maxTagPlaceholderEl = React.createElement(\"li\", _extends({\n style: UNSELECTABLE_STYLE\n }, UNSELECTABLE_ATTRIBUTE, {\n role: \"presentation\",\n onMouseDown: preventDefaultEvent,\n className: \"\".concat(prefixCls, \"-selection__choice \").concat(prefixCls, \"-selection__choice__disabled\"),\n key: \"maxTagPlaceholder\",\n title: toTitle(content)\n }), React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-selection__choice__content\")\n }, content));\n }\n\n if (isMultipleOrTags(props)) {\n selectedValueNodes = limitedCountValue.map(function (singleValue) {\n var info = _this.getOptionInfoBySingleValue(singleValue);\n\n var content = info.label;\n var title = info.title || content;\n\n if (maxTagTextLength && typeof content === 'string' && content.length > maxTagTextLength) {\n content = \"\".concat(content.slice(0, maxTagTextLength), \"...\");\n }\n\n var disabled = _this.isChildDisabled(singleValue);\n\n var choiceClassName = disabled ? \"\".concat(prefixCls, \"-selection__choice \").concat(prefixCls, \"-selection__choice__disabled\") : \"\".concat(prefixCls, \"-selection__choice\");\n return React.createElement(\"li\", _extends({\n style: UNSELECTABLE_STYLE\n }, UNSELECTABLE_ATTRIBUTE, {\n onMouseDown: preventDefaultEvent,\n className: choiceClassName,\n role: \"presentation\",\n key: singleValue || SELECT_EMPTY_VALUE_KEY,\n title: toTitle(title)\n }), React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-selection__choice__content\")\n }, content), disabled ? null : React.createElement(\"span\", {\n onClick: function onClick(event) {\n _this.removeSelected(singleValue, event);\n },\n className: \"\".concat(prefixCls, \"-selection__choice__remove\")\n }, removeIcon || React.createElement(\"i\", {\n className: \"\".concat(prefixCls, \"-selection__choice__remove-icon\")\n }, \"\\xD7\")));\n });\n }\n\n if (maxTagPlaceholderEl) {\n selectedValueNodes.push(maxTagPlaceholderEl);\n }\n\n selectedValueNodes.push(React.createElement(\"li\", {\n className: \"\".concat(prefixCls, \"-search \").concat(prefixCls, \"-search--inline\"),\n key: \"__input\"\n }, _this.getInputElement()));\n\n if (isMultipleOrTags(props) && choiceTransitionName) {\n innerNode = React.createElement(Animate, {\n onLeave: _this.onChoiceAnimationLeave,\n component: \"ul\",\n transitionName: choiceTransitionName\n }, selectedValueNodes);\n } else {\n innerNode = React.createElement(\"ul\", null, selectedValueNodes);\n }\n }\n\n return React.createElement(\"div\", {\n className: className,\n ref: _this.saveTopCtrlRef\n }, _this.getPlaceholderElement(), innerNode);\n };\n\n var optionsInfo = Select.getOptionsInfoFromProps(props);\n\n if (props.tags && typeof props.filterOption !== 'function') {\n var isDisabledExist = Object.keys(optionsInfo).some(function (key) {\n return optionsInfo[key].disabled;\n });\n warning(!isDisabledExist, 'Please avoid setting option to disabled in tags mode since user can always type text as tag.');\n }\n\n _this.state = {\n value: Select.getValueFromProps(props, true),\n inputValue: props.combobox ? Select.getInputValueForCombobox(props, optionsInfo, true) : '',\n open: props.defaultOpen,\n optionsInfo: optionsInfo,\n backfillValue: '',\n // a flag for aviod redundant getOptionsInfoFromProps call\n skipBuildOptionsInfo: true,\n ariaId: ''\n };\n _this.saveInputRef = saveRef(_assertThisInitialized(_this), 'inputRef');\n _this.saveInputMirrorRef = saveRef(_assertThisInitialized(_this), 'inputMirrorRef');\n _this.saveTopCtrlRef = saveRef(_assertThisInitialized(_this), 'topCtrlRef');\n _this.saveSelectTriggerRef = saveRef(_assertThisInitialized(_this), 'selectTriggerRef');\n _this.saveRootRef = saveRef(_assertThisInitialized(_this), 'rootRef');\n _this.saveSelectionRef = saveRef(_assertThisInitialized(_this), 'selectionRef');\n return _this;\n }\n\n _createClass(Select, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // when defaultOpen is true, we should auto focus search input\n // https://github.com/ant-design/ant-design/issues/14254\n if (this.props.autoFocus || this.state.open) {\n this.focus();\n }\n\n this.setState({\n ariaId: generateUUID()\n });\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (isMultipleOrTags(this.props)) {\n var inputNode = this.getInputDOMNode();\n var mirrorNode = this.getInputMirrorDOMNode();\n\n if (inputNode && inputNode.value && mirrorNode) {\n inputNode.style.width = '';\n inputNode.style.width = \"\".concat(mirrorNode.clientWidth, \"px\");\n } else if (inputNode) {\n inputNode.style.width = '';\n }\n }\n\n this.forcePopupAlign();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearFocusTime();\n this.clearBlurTime();\n this.clearComboboxTime();\n\n if (this.dropdownContainer) {\n ReactDOM.unmountComponentAtNode(this.dropdownContainer);\n document.body.removeChild(this.dropdownContainer);\n this.dropdownContainer = null;\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (isSingleMode(this.props) && this.selectionRef) {\n this.selectionRef.focus();\n } else if (this.getInputDOMNode()) {\n this.getInputDOMNode().focus();\n }\n }\n }, {\n key: \"blur\",\n value: function blur() {\n if (isSingleMode(this.props) && this.selectionRef) {\n this.selectionRef.blur();\n } else if (this.getInputDOMNode()) {\n this.getInputDOMNode().blur();\n }\n }\n }, {\n key: \"renderArrow\",\n value: function renderArrow(multiple) {\n // showArrow : Set to true if not multiple by default but keep set value.\n var _this$props4 = this.props,\n _this$props4$showArro = _this$props4.showArrow,\n showArrow = _this$props4$showArro === void 0 ? !multiple : _this$props4$showArro,\n loading = _this$props4.loading,\n inputIcon = _this$props4.inputIcon,\n prefixCls = _this$props4.prefixCls;\n\n if (!showArrow && !loading) {\n return null;\n } // if loading have loading icon\n\n\n var defaultIcon = loading ? React.createElement(\"i\", {\n className: \"\".concat(prefixCls, \"-arrow-loading\")\n }) : React.createElement(\"i\", {\n className: \"\".concat(prefixCls, \"-arrow-icon\")\n });\n return React.createElement(\"span\", _extends({\n key: \"arrow\",\n className: \"\".concat(prefixCls, \"-arrow\"),\n style: UNSELECTABLE_STYLE\n }, UNSELECTABLE_ATTRIBUTE, {\n onClick: this.onArrowClick\n }), inputIcon || defaultIcon);\n }\n }, {\n key: \"renderClear\",\n value: function renderClear() {\n var _this$props5 = this.props,\n prefixCls = _this$props5.prefixCls,\n allowClear = _this$props5.allowClear,\n clearIcon = _this$props5.clearIcon;\n var inputValue = this.state.inputValue;\n var value = this.state.value;\n var clear = React.createElement(\"span\", _extends({\n key: \"clear\",\n className: \"\".concat(prefixCls, \"-selection__clear\"),\n onMouseDown: preventDefaultEvent,\n style: UNSELECTABLE_STYLE\n }, UNSELECTABLE_ATTRIBUTE, {\n onClick: this.onClearSelection\n }), clearIcon || React.createElement(\"i\", {\n className: \"\".concat(prefixCls, \"-selection__clear-icon\")\n }, \"\\xD7\"));\n\n if (!allowClear) {\n return null;\n }\n\n if (isCombobox(this.props)) {\n if (inputValue) {\n return clear;\n }\n\n return null;\n }\n\n if (inputValue || value.length) {\n return clear;\n }\n\n return null;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _rootCls;\n\n var props = this.props;\n var multiple = isMultipleOrTags(props); // Default set showArrow to true if not set (not set directly in defaultProps to handle multiple case)\n\n var _props$showArrow = props.showArrow,\n showArrow = _props$showArrow === void 0 ? true : _props$showArrow;\n var state = this.state;\n var className = props.className,\n disabled = props.disabled,\n prefixCls = props.prefixCls,\n loading = props.loading;\n var ctrlNode = this.renderTopControlNode();\n var _this$state2 = this.state,\n open = _this$state2.open,\n ariaId = _this$state2.ariaId;\n\n if (open) {\n var filterOptions = this.renderFilterOptions();\n this._empty = filterOptions.empty;\n this._options = filterOptions.options;\n }\n\n var realOpen = this.getRealOpenState();\n var empty = this._empty;\n var options = this._options || [];\n var dataOrAriaAttributeProps = {};\n Object.keys(props).forEach(function (key) {\n if (Object.prototype.hasOwnProperty.call(props, key) && (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role')) {\n dataOrAriaAttributeProps[key] = props[key];\n }\n }); // for (const key in props) {\n // if (\n // Object.prototype.hasOwnProperty.call(props, key) &&\n // (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role')\n // ) {\n // dataOrAriaAttributeProps[key] = props[key];\n // }\n // }\n\n var extraSelectionProps = _extends({}, dataOrAriaAttributeProps);\n\n if (!isMultipleOrTagsOrCombobox(props)) {\n extraSelectionProps = _extends({}, extraSelectionProps, {\n onKeyDown: this.onKeyDown,\n tabIndex: props.disabled ? -1 : props.tabIndex\n });\n }\n\n var rootCls = (_rootCls = {}, _defineProperty(_rootCls, className, !!className), _defineProperty(_rootCls, prefixCls, 1), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-open\"), open), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-focused\"), open || !!this._focused), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-combobox\"), isCombobox(props)), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-enabled\"), !disabled), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-allow-clear\"), !!props.allowClear), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-no-arrow\"), !showArrow), _defineProperty(_rootCls, \"\".concat(prefixCls, \"-loading\"), !!loading), _rootCls);\n return React.createElement(SelectTrigger, {\n onPopupFocus: this.onPopupFocus,\n onMouseEnter: this.props.onMouseEnter,\n onMouseLeave: this.props.onMouseLeave,\n dropdownAlign: props.dropdownAlign,\n dropdownClassName: props.dropdownClassName,\n dropdownMatchSelectWidth: props.dropdownMatchSelectWidth,\n defaultActiveFirstOption: props.defaultActiveFirstOption,\n dropdownMenuStyle: props.dropdownMenuStyle,\n transitionName: props.transitionName,\n animation: props.animation,\n prefixCls: props.prefixCls,\n dropdownStyle: props.dropdownStyle,\n combobox: props.combobox,\n showSearch: props.showSearch,\n options: options,\n empty: empty,\n multiple: multiple,\n disabled: disabled,\n visible: realOpen,\n inputValue: state.inputValue,\n value: state.value,\n backfillValue: state.backfillValue,\n firstActiveValue: props.firstActiveValue,\n onDropdownVisibleChange: this.onDropdownVisibleChange,\n getPopupContainer: props.getPopupContainer,\n onMenuSelect: this.onMenuSelect,\n onMenuDeselect: this.onMenuDeselect,\n onPopupScroll: props.onPopupScroll,\n showAction: props.showAction,\n ref: this.saveSelectTriggerRef,\n menuItemSelectedIcon: props.menuItemSelectedIcon,\n dropdownRender: props.dropdownRender,\n ariaId: ariaId\n }, React.createElement(\"div\", {\n id: props.id,\n style: props.style,\n ref: this.saveRootRef,\n onBlur: this.onOuterBlur,\n onFocus: this.onOuterFocus,\n className: classnames(rootCls),\n onMouseDown: this.markMouseDown,\n onMouseUp: this.markMouseLeave,\n onMouseOut: this.markMouseLeave\n }, React.createElement(\"div\", _extends({\n ref: this.saveSelectionRef,\n key: \"selection\",\n className: \"\".concat(prefixCls, \"-selection\\n \").concat(prefixCls, \"-selection--\").concat(multiple ? 'multiple' : 'single'),\n role: \"combobox\",\n \"aria-autocomplete\": \"list\",\n \"aria-haspopup\": \"true\",\n \"aria-controls\": ariaId,\n \"aria-expanded\": realOpen\n }, extraSelectionProps), ctrlNode, this.renderClear(), this.renderArrow(!!multiple))));\n }\n }]);\n\n return Select;\n}(React.Component);\n\nSelect.propTypes = SelectPropTypes;\nSelect.defaultProps = {\n prefixCls: 'rc-select',\n defaultOpen: false,\n labelInValue: false,\n defaultActiveFirstOption: true,\n showSearch: true,\n allowClear: false,\n placeholder: '',\n onChange: noop,\n onFocus: noop,\n onBlur: noop,\n onSelect: noop,\n onSearch: noop,\n onDeselect: noop,\n onInputKeyDown: noop,\n dropdownMatchSelectWidth: true,\n dropdownStyle: {},\n dropdownMenuStyle: {},\n optionFilterProp: 'value',\n optionLabelProp: 'value',\n notFoundContent: 'Not Found',\n backfill: false,\n showAction: ['click'],\n tokenSeparators: [],\n autoClearSearchValue: true,\n tabIndex: 0,\n dropdownRender: function dropdownRender(menu) {\n return menu;\n }\n};\n\nSelect.getDerivedStateFromProps = function (nextProps, prevState) {\n var optionsInfo = prevState.skipBuildOptionsInfo ? prevState.optionsInfo : Select.getOptionsInfoFromProps(nextProps, prevState);\n var newState = {\n optionsInfo: optionsInfo,\n skipBuildOptionsInfo: false\n };\n\n if ('open' in nextProps) {\n newState.open = nextProps.open;\n }\n\n if ('value' in nextProps) {\n var value = Select.getValueFromProps(nextProps);\n newState.value = value;\n\n if (nextProps.combobox) {\n newState.inputValue = Select.getInputValueForCombobox(nextProps, optionsInfo);\n }\n }\n\n return newState;\n};\n\nSelect.getOptionsFromChildren = function (children) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n React.Children.forEach(children, function (child) {\n if (!child) {\n return;\n }\n\n var type = child.type;\n\n if (type.isSelectOptGroup) {\n Select.getOptionsFromChildren(child.props.children, options);\n } else {\n options.push(child);\n }\n });\n return options;\n};\n\nSelect.getInputValueForCombobox = function (props, optionsInfo, useDefaultValue) {\n var value = [];\n\n if ('value' in props && !useDefaultValue) {\n value = toArray(props.value);\n }\n\n if ('defaultValue' in props && useDefaultValue) {\n value = toArray(props.defaultValue);\n }\n\n if (value.length) {\n value = value[0];\n } else {\n return '';\n }\n\n var label = value;\n\n if (props.labelInValue) {\n label = value.label;\n } else if (optionsInfo[getMapKey(value)]) {\n label = optionsInfo[getMapKey(value)].label;\n }\n\n if (label === undefined) {\n label = '';\n }\n\n return label;\n};\n\nSelect.getLabelFromOption = function (props, option) {\n return getPropValue(option, props.optionLabelProp);\n};\n\nSelect.getOptionsInfoFromProps = function (props, preState) {\n var options = Select.getOptionsFromChildren(props.children);\n var optionsInfo = {};\n options.forEach(function (option) {\n var singleValue = getValuePropValue(option);\n optionsInfo[getMapKey(singleValue)] = {\n option: option,\n value: singleValue,\n label: Select.getLabelFromOption(props, option),\n title: option.props.title,\n disabled: option.props.disabled\n };\n });\n\n if (preState) {\n // keep option info in pre state value.\n var oldOptionsInfo = preState.optionsInfo;\n var value = preState.value;\n\n if (value) {\n value.forEach(function (v) {\n var key = getMapKey(v);\n\n if (!optionsInfo[key] && oldOptionsInfo[key] !== undefined) {\n optionsInfo[key] = oldOptionsInfo[key];\n }\n });\n }\n }\n\n return optionsInfo;\n};\n\nSelect.getValueFromProps = function (props, useDefaultValue) {\n var value = [];\n\n if ('value' in props && !useDefaultValue) {\n value = toArray(props.value);\n }\n\n if ('defaultValue' in props && useDefaultValue) {\n value = toArray(props.defaultValue);\n }\n\n if (props.labelInValue) {\n value = value.map(function (v) {\n return v.key;\n });\n }\n\n return value;\n};\n\nSelect.displayName = 'Select';\npolyfill(Select);\nexport default Select;","import OptGroup from './OptGroup';\nimport Option from './Option';\nimport SelectPropTypes from './PropTypes';\nimport Select from './Select';\nSelect.Option = Option;\nSelect.OptGroup = OptGroup;\nexport { Option, OptGroup, SelectPropTypes };\nexport default Select;","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport RcSelect, { Option, OptGroup } from 'rc-select';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport { ConfigConsumer } from '../config-provider';\nimport warning from '../_util/warning';\nimport Icon from '../icon';\nimport { tuple } from '../_util/type';\nconst SelectSizes = tuple('default', 'large', 'small');\nconst ModeOptions = tuple('default', 'multiple', 'tags', 'combobox', 'SECRET_COMBOBOX_MODE_DO_NOT_USE');\nconst SelectPropTypes = {\n prefixCls: PropTypes.string,\n className: PropTypes.string,\n size: PropTypes.oneOf(SelectSizes),\n notFoundContent: PropTypes.any,\n showSearch: PropTypes.bool,\n optionLabelProp: PropTypes.string,\n transitionName: PropTypes.string,\n choiceTransitionName: PropTypes.string,\n id: PropTypes.string,\n};\nexport default class Select extends React.Component {\n constructor(props) {\n super(props);\n this.saveSelect = (node) => {\n this.rcSelect = node;\n };\n this.renderSelect = ({ getPopupContainer: getContextPopupContainer, getPrefixCls, renderEmpty, }) => {\n const _a = this.props, { prefixCls: customizePrefixCls, className = '', size, mode, getPopupContainer, removeIcon, clearIcon, menuItemSelectedIcon, showArrow } = _a, restProps = __rest(_a, [\"prefixCls\", \"className\", \"size\", \"mode\", \"getPopupContainer\", \"removeIcon\", \"clearIcon\", \"menuItemSelectedIcon\", \"showArrow\"]);\n const rest = omit(restProps, ['inputIcon']);\n const prefixCls = getPrefixCls('select', customizePrefixCls);\n const cls = classNames({\n [`${prefixCls}-lg`]: size === 'large',\n [`${prefixCls}-sm`]: size === 'small',\n [`${prefixCls}-show-arrow`]: showArrow,\n }, className);\n let { optionLabelProp } = this.props;\n if (this.isCombobox()) {\n // children 带 dom 结构时,无法填入输入框\n optionLabelProp = optionLabelProp || 'value';\n }\n const modeConfig = {\n multiple: mode === 'multiple',\n tags: mode === 'tags',\n combobox: this.isCombobox(),\n };\n const finalRemoveIcon = (removeIcon &&\n (React.isValidElement(removeIcon)\n ? React.cloneElement(removeIcon, {\n className: classNames(removeIcon.props.className, `${prefixCls}-remove-icon`),\n })\n : removeIcon)) || ;\n const finalClearIcon = (clearIcon &&\n (React.isValidElement(clearIcon)\n ? React.cloneElement(clearIcon, {\n className: classNames(clearIcon.props.className, `${prefixCls}-clear-icon`),\n })\n : clearIcon)) || ();\n const finalMenuItemSelectedIcon = (menuItemSelectedIcon &&\n (React.isValidElement(menuItemSelectedIcon)\n ? React.cloneElement(menuItemSelectedIcon, {\n className: classNames(menuItemSelectedIcon.props.className, `${prefixCls}-selected-icon`),\n })\n : menuItemSelectedIcon)) || ;\n return ();\n };\n warning(props.mode !== 'combobox', 'Select', 'The combobox mode is deprecated, ' +\n 'it will be removed in next major version, ' +\n 'please use AutoComplete instead');\n }\n getNotFoundContent(renderEmpty) {\n const { notFoundContent } = this.props;\n if (notFoundContent !== undefined) {\n return notFoundContent;\n }\n if (this.isCombobox()) {\n return null;\n }\n return renderEmpty('Select');\n }\n focus() {\n this.rcSelect.focus();\n }\n blur() {\n this.rcSelect.blur();\n }\n isCombobox() {\n const { mode } = this.props;\n return mode === 'combobox' || mode === Select.SECRET_COMBOBOX_MODE_DO_NOT_USE;\n }\n renderSuffixIcon(prefixCls) {\n const { loading, suffixIcon } = this.props;\n if (suffixIcon) {\n return React.isValidElement(suffixIcon)\n ? React.cloneElement(suffixIcon, {\n className: classNames(suffixIcon.props.className, `${prefixCls}-arrow-icon`),\n })\n : suffixIcon;\n }\n if (loading) {\n return ;\n }\n return ;\n }\n render() {\n return {this.renderSelect};\n }\n}\nSelect.Option = Option;\nSelect.OptGroup = OptGroup;\nSelect.SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\nSelect.defaultProps = {\n showSearch: false,\n transitionName: 'slide-up',\n choiceTransitionName: 'zoom',\n};\nSelect.propTypes = SelectPropTypes;\n","var scrollbarVerticalSize;\nvar scrollbarHorizontalSize; // Measure scrollbar width for padding body during modal show/hide\n\nvar scrollbarMeasure = {\n position: 'absolute',\n top: '-9999px',\n width: '50px',\n height: '50px'\n}; // This const is used for colgroup.col internal props. And should not provides to user.\n\nexport var INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';\nexport function measureScrollbar(_ref) {\n var _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,\n prefixCls = _ref.prefixCls;\n\n if (typeof document === 'undefined' || typeof window === 'undefined') {\n return 0;\n }\n\n var isVertical = direction === 'vertical';\n\n if (isVertical && scrollbarVerticalSize) {\n return scrollbarVerticalSize;\n }\n\n if (!isVertical && scrollbarHorizontalSize) {\n return scrollbarHorizontalSize;\n }\n\n var scrollDiv = document.createElement('div');\n Object.keys(scrollbarMeasure).forEach(function (scrollProp) {\n scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp];\n }); // apply hide scrollbar className ahead\n\n scrollDiv.className = \"\".concat(prefixCls, \"-hide-scrollbar scroll-div-append-to-body\"); // Append related overflow style\n\n if (isVertical) {\n scrollDiv.style.overflowY = 'scroll';\n } else {\n scrollDiv.style.overflowX = 'scroll';\n }\n\n document.body.appendChild(scrollDiv);\n var size = 0;\n\n if (isVertical) {\n size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n scrollbarVerticalSize = size;\n } else {\n size = scrollDiv.offsetHeight - scrollDiv.clientHeight;\n scrollbarHorizontalSize = size;\n }\n\n document.body.removeChild(scrollDiv);\n return size;\n}\nexport function debounce(func, wait, immediate) {\n var timeout;\n\n function debounceFunc() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var context = this; // https://fb.me/react-event-pooling\n\n if (args[0] && args[0].persist) {\n args[0].persist();\n }\n\n var later = function later() {\n timeout = null;\n\n if (!immediate) {\n func.apply(context, args);\n }\n };\n\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n\n if (callNow) {\n func.apply(context, args);\n }\n }\n\n debounceFunc.cancel = function cancel() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounceFunc;\n}\nexport function remove(array, item) {\n var index = array.indexOf(item);\n var front = array.slice(0, index);\n var last = array.slice(index + 1, array.length);\n return front.concat(last);\n}\n/**\n * Returns only data- and aria- key/value pairs\n * @param {object} props\n */\n\nexport function getDataAndAriaProps(props) {\n return Object.keys(props).reduce(function (memo, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n memo[key] = props[key];\n }\n\n return memo;\n }, {});\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _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\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/* eslint-disable no-underscore-dangle */\nimport * as React from 'react';\n\nvar ColumnManager =\n/*#__PURE__*/\nfunction () {\n function ColumnManager(columns, elements) {\n _classCallCheck(this, ColumnManager);\n\n this._cached = {};\n this.columns = columns || this.normalize(elements);\n }\n\n _createClass(ColumnManager, [{\n key: \"isAnyColumnsFixed\",\n value: function isAnyColumnsFixed() {\n var _this = this;\n\n return this._cache('isAnyColumnsFixed', function () {\n return _this.columns.some(function (column) {\n return !!column.fixed;\n });\n });\n }\n }, {\n key: \"isAnyColumnsLeftFixed\",\n value: function isAnyColumnsLeftFixed() {\n var _this2 = this;\n\n return this._cache('isAnyColumnsLeftFixed', function () {\n return _this2.columns.some(function (column) {\n return column.fixed === 'left' || column.fixed === true;\n });\n });\n }\n }, {\n key: \"isAnyColumnsRightFixed\",\n value: function isAnyColumnsRightFixed() {\n var _this3 = this;\n\n return this._cache('isAnyColumnsRightFixed', function () {\n return _this3.columns.some(function (column) {\n return column.fixed === 'right';\n });\n });\n }\n }, {\n key: \"leftColumns\",\n value: function leftColumns() {\n var _this4 = this;\n\n return this._cache('leftColumns', function () {\n return _this4.groupedColumns().filter(function (column) {\n return column.fixed === 'left' || column.fixed === true;\n });\n });\n }\n }, {\n key: \"rightColumns\",\n value: function rightColumns() {\n var _this5 = this;\n\n return this._cache('rightColumns', function () {\n return _this5.groupedColumns().filter(function (column) {\n return column.fixed === 'right';\n });\n });\n }\n }, {\n key: \"leafColumns\",\n value: function leafColumns() {\n var _this6 = this;\n\n return this._cache('leafColumns', function () {\n return _this6._leafColumns(_this6.columns);\n });\n }\n }, {\n key: \"leftLeafColumns\",\n value: function leftLeafColumns() {\n var _this7 = this;\n\n return this._cache('leftLeafColumns', function () {\n return _this7._leafColumns(_this7.leftColumns());\n });\n }\n }, {\n key: \"rightLeafColumns\",\n value: function rightLeafColumns() {\n var _this8 = this;\n\n return this._cache('rightLeafColumns', function () {\n return _this8._leafColumns(_this8.rightColumns());\n });\n } // add appropriate rowspan and colspan to column\n\n }, {\n key: \"groupedColumns\",\n value: function groupedColumns() {\n var _this9 = this;\n\n return this._cache('groupedColumns', function () {\n var _groupColumns = function _groupColumns(columns) {\n var currentRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var parentColumn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var rows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n\n /* eslint-disable no-param-reassign */\n // track how many rows we got\n rows[currentRow] = rows[currentRow] || [];\n var grouped = [];\n\n var setRowSpan = function setRowSpan(column) {\n var rowSpan = rows.length - currentRow;\n\n if (column && !column.children && // parent columns are supposed to be one row\n rowSpan > 1 && (!column.rowSpan || column.rowSpan < rowSpan)) {\n column.rowSpan = rowSpan;\n }\n };\n\n columns.forEach(function (column, index) {\n var newColumn = _objectSpread({}, column);\n\n rows[currentRow].push(newColumn);\n parentColumn.colSpan = parentColumn.colSpan || 0;\n\n if (newColumn.children && newColumn.children.length > 0) {\n newColumn.children = _groupColumns(newColumn.children, currentRow + 1, newColumn, rows);\n parentColumn.colSpan += newColumn.colSpan;\n } else {\n parentColumn.colSpan += 1;\n } // update rowspan to all same row columns\n\n\n for (var i = 0; i < rows[currentRow].length - 1; i += 1) {\n setRowSpan(rows[currentRow][i]);\n } // last column, update rowspan immediately\n\n\n if (index + 1 === columns.length) {\n setRowSpan(newColumn);\n }\n\n grouped.push(newColumn);\n });\n return grouped;\n /* eslint-enable no-param-reassign */\n };\n\n return _groupColumns(_this9.columns);\n });\n }\n }, {\n key: \"normalize\",\n value: function normalize(elements) {\n var _this10 = this;\n\n var columns = [];\n React.Children.forEach(elements, function (element) {\n if (!React.isValidElement(element)) {\n return;\n }\n\n var column = _objectSpread({}, element.props);\n\n if (element.key) {\n column.key = element.key;\n }\n\n if (element.type.isTableColumnGroup) {\n column.children = _this10.normalize(column.children);\n }\n\n columns.push(column);\n });\n return columns;\n }\n }, {\n key: \"reset\",\n value: function reset(columns, elements) {\n this.columns = columns || this.normalize(elements);\n this._cached = {};\n }\n }, {\n key: \"_cache\",\n value: function _cache(name, fn) {\n if (name in this._cached) {\n return this._cached[name];\n }\n\n this._cached[name] = fn();\n return this._cached[name];\n }\n }, {\n key: \"_leafColumns\",\n value: function _leafColumns(columns) {\n var _this11 = this;\n\n var leafColumns = [];\n columns.forEach(function (column) {\n if (!column.children) {\n leafColumns.push(column);\n } else {\n leafColumns.push.apply(leafColumns, _toConsumableArray(_this11._leafColumns(column.children)));\n }\n });\n return leafColumns;\n }\n }]);\n\n return ColumnManager;\n}();\n/* eslint-enable */\n\n\nexport { ColumnManager as default };","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { INTERNAL_COL_DEFINE } from './utils';\n\nvar ColGroup = function ColGroup(props, _ref) {\n var table = _ref.table;\n var _table$props = table.props,\n prefixCls = _table$props.prefixCls,\n expandIconAsCell = _table$props.expandIconAsCell;\n var fixed = props.fixed;\n var cols = [];\n\n if (expandIconAsCell && fixed !== 'right') {\n cols.push(React.createElement(\"col\", {\n className: \"\".concat(prefixCls, \"-expand-icon-col\"),\n key: \"rc-table-expand-icon-col\"\n }));\n }\n\n var leafColumns;\n\n if (fixed === 'left') {\n leafColumns = table.columnManager.leftLeafColumns();\n } else if (fixed === 'right') {\n leafColumns = table.columnManager.rightLeafColumns();\n } else {\n leafColumns = table.columnManager.leafColumns();\n }\n\n cols = cols.concat(leafColumns.map(function (_ref2) {\n var key = _ref2.key,\n dataIndex = _ref2.dataIndex,\n width = _ref2.width,\n additionalProps = _ref2[INTERNAL_COL_DEFINE];\n var mergedKey = key !== undefined ? key : dataIndex;\n return React.createElement(\"col\", Object.assign({\n key: mergedKey,\n style: {\n width: width,\n minWidth: width\n }\n }, additionalProps));\n }));\n return React.createElement(\"colgroup\", null, cols);\n};\n\nColGroup.contextTypes = {\n table: PropTypes.any\n};\nexport default ColGroup;","function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport * as React from 'react';\nimport { connect } from 'mini-store';\nimport classNames from 'classnames';\n\nfunction TableHeaderRow(_ref) {\n var row = _ref.row,\n index = _ref.index,\n height = _ref.height,\n components = _ref.components,\n onHeaderRow = _ref.onHeaderRow,\n prefixCls = _ref.prefixCls;\n var HeaderRow = components.header.row;\n var HeaderCell = components.header.cell;\n var rowProps = onHeaderRow(row.map(function (cell) {\n return cell.column;\n }), index);\n var customStyle = rowProps ? rowProps.style : {};\n\n var style = _objectSpread({\n height: height\n }, customStyle);\n\n return React.createElement(HeaderRow, Object.assign({}, rowProps, {\n style: style\n }), row.map(function (cell, i) {\n var _classNames;\n\n var column = cell.column,\n isLast = cell.isLast,\n cellProps = _objectWithoutProperties(cell, [\"column\", \"isLast\"]);\n\n var customProps = column.onHeaderCell ? column.onHeaderCell(column) : {};\n\n if (column.align) {\n customProps.style = _objectSpread({}, customProps.style, {\n textAlign: column.align\n });\n }\n\n customProps.className = classNames(customProps.className, column.className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-align-\").concat(column.align), !!column.align), _defineProperty(_classNames, \"\".concat(prefixCls, \"-row-cell-ellipsis\"), !!column.ellipsis), _defineProperty(_classNames, \"\".concat(prefixCls, \"-row-cell-break-word\"), !!column.width), _defineProperty(_classNames, \"\".concat(prefixCls, \"-row-cell-last\"), isLast), _classNames));\n return React.createElement(HeaderCell, Object.assign({}, cellProps, customProps, {\n key: column.key || column.dataIndex || i\n }));\n }));\n}\n\nfunction getRowHeight(state, props) {\n var fixedColumnsHeadRowsHeight = state.fixedColumnsHeadRowsHeight;\n var columns = props.columns,\n rows = props.rows,\n fixed = props.fixed;\n var headerHeight = fixedColumnsHeadRowsHeight[0];\n\n if (!fixed) {\n return null;\n }\n\n if (headerHeight && columns) {\n if (headerHeight === 'auto') {\n return 'auto';\n }\n\n return headerHeight / rows.length;\n }\n\n return null;\n}\n\nexport default connect(function (state, props) {\n return {\n height: getRowHeight(state, props)\n };\n})(TableHeaderRow);","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport TableHeaderRow from './TableHeaderRow';\n\nfunction getHeaderRows(_ref) {\n var _ref$columns = _ref.columns,\n columns = _ref$columns === void 0 ? [] : _ref$columns,\n _ref$currentRow = _ref.currentRow,\n currentRow = _ref$currentRow === void 0 ? 0 : _ref$currentRow,\n _ref$rows = _ref.rows,\n rows = _ref$rows === void 0 ? [] : _ref$rows,\n _ref$isLast = _ref.isLast,\n isLast = _ref$isLast === void 0 ? true : _ref$isLast;\n // eslint-disable-next-line no-param-reassign\n rows[currentRow] = rows[currentRow] || [];\n columns.forEach(function (column, i) {\n if (column.rowSpan && rows.length < column.rowSpan) {\n while (rows.length < column.rowSpan) {\n rows.push([]);\n }\n }\n\n var cellIsLast = isLast && i === columns.length - 1;\n var cell = {\n key: column.key,\n className: column.className || '',\n children: column.title,\n isLast: cellIsLast,\n column: column\n };\n\n if (column.children) {\n getHeaderRows({\n columns: column.children,\n currentRow: currentRow + 1,\n rows: rows,\n isLast: cellIsLast\n });\n }\n\n if ('colSpan' in column) {\n cell.colSpan = column.colSpan;\n }\n\n if ('rowSpan' in column) {\n cell.rowSpan = column.rowSpan;\n }\n\n if (cell.colSpan !== 0) {\n rows[currentRow].push(cell);\n }\n });\n return rows.filter(function (row) {\n return row.length > 0;\n });\n}\n\nvar TableHeader = function TableHeader(props, _ref2) {\n var table = _ref2.table;\n var components = table.components;\n var _table$props = table.props,\n prefixCls = _table$props.prefixCls,\n showHeader = _table$props.showHeader,\n onHeaderRow = _table$props.onHeaderRow;\n var expander = props.expander,\n columns = props.columns,\n fixed = props.fixed;\n\n if (!showHeader) {\n return null;\n }\n\n var rows = getHeaderRows({\n columns: columns\n });\n expander.renderExpandIndentCell(rows, fixed);\n var HeaderWrapper = components.header.wrapper;\n return React.createElement(HeaderWrapper, {\n className: \"\".concat(prefixCls, \"-thead\")\n }, rows.map(function (row, index) {\n return React.createElement(TableHeaderRow, {\n prefixCls: prefixCls,\n key: index,\n index: index,\n fixed: fixed,\n columns: columns,\n rows: rows,\n row: row,\n components: components,\n onHeaderRow: onHeaderRow\n });\n }));\n};\n\nTableHeader.contextTypes = {\n table: PropTypes.any\n};\nexport default TableHeader;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport get from 'lodash/get';\n\nfunction isInvalidRenderCellText(text) {\n return text && !React.isValidElement(text) && Object.prototype.toString.call(text) === '[object Object]';\n}\n\nvar TableCell =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(TableCell, _React$Component);\n\n function TableCell() {\n var _this;\n\n _classCallCheck(this, TableCell);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(TableCell).apply(this, arguments));\n\n _this.handleClick = function (e) {\n var _this$props = _this.props,\n record = _this$props.record,\n onCellClick = _this$props.column.onCellClick;\n\n if (onCellClick) {\n onCellClick(record, e);\n }\n };\n\n return _this;\n }\n\n _createClass(TableCell, [{\n key: \"render\",\n value: function render() {\n var _classNames;\n\n var _this$props2 = this.props,\n record = _this$props2.record,\n indentSize = _this$props2.indentSize,\n prefixCls = _this$props2.prefixCls,\n indent = _this$props2.indent,\n index = _this$props2.index,\n expandIcon = _this$props2.expandIcon,\n column = _this$props2.column,\n BodyCell = _this$props2.component;\n var dataIndex = column.dataIndex,\n render = column.render,\n _column$className = column.className,\n className = _column$className === void 0 ? '' : _column$className; // We should return undefined if no dataIndex is specified, but in order to\n // be compatible with object-path's behavior, we return the record object instead.\n\n var text;\n\n if (typeof dataIndex === 'number') {\n text = get(record, dataIndex);\n } else if (!dataIndex || dataIndex.length === 0) {\n text = record;\n } else {\n text = get(record, dataIndex);\n }\n\n var tdProps = {};\n var colSpan;\n var rowSpan;\n\n if (render) {\n text = render(text, record, index); // `render` support cell with additional config like `props`\n\n if (isInvalidRenderCellText(text)) {\n tdProps = text.props || tdProps;\n var _tdProps = tdProps;\n colSpan = _tdProps.colSpan;\n rowSpan = _tdProps.rowSpan;\n text = text.children;\n }\n }\n\n if (column.onCell) {\n tdProps = _objectSpread({}, tdProps, {}, column.onCell(record, index));\n } // Fix https://github.com/ant-design/ant-design/issues/1202\n\n\n if (isInvalidRenderCellText(text)) {\n text = null;\n }\n\n var indentText = expandIcon ? React.createElement(\"span\", {\n style: {\n paddingLeft: \"\".concat(indentSize * indent, \"px\")\n },\n className: \"\".concat(prefixCls, \"-indent indent-level-\").concat(indent)\n }) : null;\n\n if (rowSpan === 0 || colSpan === 0) {\n return null;\n }\n\n if (column.align) {\n tdProps.style = _objectSpread({\n textAlign: column.align\n }, tdProps.style);\n }\n\n var cellClassName = classNames(className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-cell-ellipsis\"), !!column.ellipsis), _defineProperty(_classNames, \"\".concat(prefixCls, \"-cell-break-word\"), !!column.width), _classNames));\n\n if (column.ellipsis) {\n if (typeof text === 'string') {\n tdProps.title = text;\n } else if (text) {\n var _text = text,\n textProps = _text.props;\n\n if (textProps && textProps.children && typeof textProps.children === 'string') {\n tdProps.title = textProps.children;\n }\n }\n }\n\n return React.createElement(BodyCell, Object.assign({\n className: cellClassName,\n onClick: this.handleClick\n }, tdProps), indentText, expandIcon, text);\n }\n }]);\n\n return TableCell;\n}(React.Component);\n\nexport { TableCell as default };","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport warning from \"rc-util/es/warning\";\nimport { connect } from 'mini-store';\nimport { polyfill } from 'react-lifecycles-compat';\nimport classNames from 'classnames';\nimport TableCell from './TableCell';\n\nvar TableRow =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(TableRow, _React$Component);\n\n function TableRow() {\n var _this;\n\n _classCallCheck(this, TableRow);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(TableRow).apply(this, arguments));\n _this.state = {};\n\n _this.onTriggerEvent = function (rowPropFunc, legacyFunc, additionalFunc) {\n var _this$props = _this.props,\n record = _this$props.record,\n index = _this$props.index;\n return function () {\n // Additional function like trigger `this.onHover` to handle self logic\n if (additionalFunc) {\n additionalFunc();\n } // [Legacy] Some legacy function like `onRowClick`.\n\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var event = args[0];\n\n if (legacyFunc) {\n legacyFunc(record, index, event);\n } // Pass to the function from `onRow`\n\n\n if (rowPropFunc) {\n rowPropFunc.apply(void 0, args);\n }\n };\n };\n\n _this.onMouseEnter = function () {\n var _this$props2 = _this.props,\n onHover = _this$props2.onHover,\n rowKey = _this$props2.rowKey;\n onHover(true, rowKey);\n };\n\n _this.onMouseLeave = function () {\n var _this$props3 = _this.props,\n onHover = _this$props3.onHover,\n rowKey = _this$props3.rowKey;\n onHover(false, rowKey);\n };\n\n return _this;\n }\n\n _createClass(TableRow, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.state.shouldRender) {\n this.saveRowRef();\n }\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n return !!(this.props.visible || nextProps.visible);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.state.shouldRender && !this.rowRef) {\n this.saveRowRef();\n }\n }\n }, {\n key: \"setExpandedRowHeight\",\n value: function setExpandedRowHeight() {\n var _this$props4 = this.props,\n store = _this$props4.store,\n rowKey = _this$props4.rowKey;\n\n var _store$getState = store.getState(),\n expandedRowsHeight = _store$getState.expandedRowsHeight;\n\n var _this$rowRef$getBound = this.rowRef.getBoundingClientRect(),\n height = _this$rowRef$getBound.height;\n\n expandedRowsHeight = _objectSpread({}, expandedRowsHeight, _defineProperty({}, rowKey, height));\n store.setState({\n expandedRowsHeight: expandedRowsHeight\n });\n }\n }, {\n key: \"setRowHeight\",\n value: function setRowHeight() {\n var _this$props5 = this.props,\n store = _this$props5.store,\n rowKey = _this$props5.rowKey;\n\n var _store$getState2 = store.getState(),\n fixedColumnsBodyRowsHeight = _store$getState2.fixedColumnsBodyRowsHeight;\n\n var _this$rowRef$getBound2 = this.rowRef.getBoundingClientRect(),\n height = _this$rowRef$getBound2.height;\n\n store.setState({\n fixedColumnsBodyRowsHeight: _objectSpread({}, fixedColumnsBodyRowsHeight, _defineProperty({}, rowKey, height))\n });\n }\n }, {\n key: \"getStyle\",\n value: function getStyle() {\n var _this$props6 = this.props,\n height = _this$props6.height,\n visible = _this$props6.visible;\n\n if (height && height !== this.style.height) {\n this.style = _objectSpread({}, this.style, {\n height: height\n });\n }\n\n if (!visible && !this.style.display) {\n this.style = _objectSpread({}, this.style, {\n display: 'none'\n });\n }\n\n return this.style;\n }\n }, {\n key: \"saveRowRef\",\n value: function saveRowRef() {\n this.rowRef = ReactDOM.findDOMNode(this);\n var _this$props7 = this.props,\n isAnyColumnsFixed = _this$props7.isAnyColumnsFixed,\n fixed = _this$props7.fixed,\n expandedRow = _this$props7.expandedRow,\n ancestorKeys = _this$props7.ancestorKeys;\n\n if (!isAnyColumnsFixed) {\n return;\n }\n\n if (!fixed && expandedRow) {\n this.setExpandedRowHeight();\n }\n\n if (!fixed && ancestorKeys.length >= 0) {\n this.setRowHeight();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.state.shouldRender) {\n return null;\n }\n\n var _this$props8 = this.props,\n prefixCls = _this$props8.prefixCls,\n columns = _this$props8.columns,\n record = _this$props8.record,\n rowKey = _this$props8.rowKey,\n index = _this$props8.index,\n onRow = _this$props8.onRow,\n indent = _this$props8.indent,\n indentSize = _this$props8.indentSize,\n hovered = _this$props8.hovered,\n height = _this$props8.height,\n visible = _this$props8.visible,\n components = _this$props8.components,\n hasExpandIcon = _this$props8.hasExpandIcon,\n renderExpandIcon = _this$props8.renderExpandIcon,\n renderExpandIconCell = _this$props8.renderExpandIconCell,\n onRowClick = _this$props8.onRowClick,\n onRowDoubleClick = _this$props8.onRowDoubleClick,\n onRowMouseEnter = _this$props8.onRowMouseEnter,\n onRowMouseLeave = _this$props8.onRowMouseLeave,\n onRowContextMenu = _this$props8.onRowContextMenu;\n var BodyRow = components.body.row;\n var BodyCell = components.body.cell;\n var className = this.props.className;\n\n if (hovered) {\n className += \" \".concat(prefixCls, \"-hover\");\n }\n\n var cells = [];\n renderExpandIconCell(cells);\n\n for (var i = 0; i < columns.length; i += 1) {\n var column = columns[i];\n warning(column.onCellClick === undefined, 'column[onCellClick] is deprecated, please use column[onCell] instead.');\n cells.push(React.createElement(TableCell, {\n prefixCls: prefixCls,\n record: record,\n indentSize: indentSize,\n indent: indent,\n index: index,\n column: column,\n key: column.key || column.dataIndex,\n expandIcon: hasExpandIcon(i) && renderExpandIcon(),\n component: BodyCell\n }));\n }\n\n var _ref = onRow(record, index) || {},\n customClassName = _ref.className,\n customStyle = _ref.style,\n rowProps = _objectWithoutProperties(_ref, [\"className\", \"style\"]);\n\n var style = {\n height: height\n };\n\n if (!visible) {\n style.display = 'none';\n }\n\n style = _objectSpread({}, style, {}, customStyle);\n var rowClassName = classNames(prefixCls, className, \"\".concat(prefixCls, \"-level-\").concat(indent), customClassName);\n return React.createElement(BodyRow, Object.assign({}, rowProps, {\n onClick: this.onTriggerEvent(rowProps.onClick, onRowClick),\n onDoubleClick: this.onTriggerEvent(rowProps.onDoubleClick, onRowDoubleClick),\n onMouseEnter: this.onTriggerEvent(rowProps.onMouseEnter, onRowMouseEnter, this.onMouseEnter),\n onMouseLeave: this.onTriggerEvent(rowProps.onMouseLeave, onRowMouseLeave, this.onMouseLeave),\n onContextMenu: this.onTriggerEvent(rowProps.onContextMenu, onRowContextMenu),\n className: rowClassName,\n style: style,\n \"data-row-key\": rowKey\n }), cells);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (prevState.visible || !prevState.visible && nextProps.visible) {\n return {\n shouldRender: true,\n visible: nextProps.visible\n };\n }\n\n return {\n visible: nextProps.visible\n };\n }\n }]);\n\n return TableRow;\n}(React.Component);\n\nTableRow.defaultProps = {\n onRow: function onRow() {},\n onHover: function onHover() {},\n hasExpandIcon: function hasExpandIcon() {},\n renderExpandIcon: function renderExpandIcon() {},\n renderExpandIconCell: function renderExpandIconCell() {}\n};\n\nfunction getRowHeight(state, props) {\n var expandedRowsHeight = state.expandedRowsHeight,\n fixedColumnsBodyRowsHeight = state.fixedColumnsBodyRowsHeight;\n var fixed = props.fixed,\n rowKey = props.rowKey;\n\n if (!fixed) {\n return null;\n }\n\n if (expandedRowsHeight[rowKey]) {\n return expandedRowsHeight[rowKey];\n }\n\n if (fixedColumnsBodyRowsHeight[rowKey]) {\n return fixedColumnsBodyRowsHeight[rowKey];\n }\n\n return null;\n}\n\npolyfill(TableRow);\nexport default connect(function (state, props) {\n var currentHoverKey = state.currentHoverKey,\n expandedRowKeys = state.expandedRowKeys;\n var rowKey = props.rowKey,\n ancestorKeys = props.ancestorKeys;\n var visible = ancestorKeys.length === 0 || ancestorKeys.every(function (k) {\n return expandedRowKeys.includes(k);\n });\n return {\n visible: visible,\n hovered: currentHoverKey === rowKey,\n height: getRowHeight(state, props)\n };\n})(TableRow);","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport shallowequal from 'shallowequal';\n\nvar ExpandIcon =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ExpandIcon, _React$Component);\n\n function ExpandIcon() {\n _classCallCheck(this, ExpandIcon);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(ExpandIcon).apply(this, arguments));\n }\n\n _createClass(ExpandIcon, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n return !shallowequal(nextProps, this.props);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n expandable = _this$props.expandable,\n prefixCls = _this$props.prefixCls,\n onExpand = _this$props.onExpand,\n needIndentSpaced = _this$props.needIndentSpaced,\n expanded = _this$props.expanded,\n record = _this$props.record;\n\n if (expandable) {\n var expandClassName = expanded ? 'expanded' : 'collapsed';\n return React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-expand-icon \").concat(prefixCls, \"-\").concat(expandClassName),\n onClick: function onClick(e) {\n return onExpand(record, e);\n }\n });\n }\n\n if (needIndentSpaced) {\n return React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-expand-icon \").concat(prefixCls, \"-spaced\")\n });\n }\n\n return null;\n }\n }]);\n\n return ExpandIcon;\n}(React.Component);\n\nexport { ExpandIcon as default };","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport { connect } from 'mini-store';\nimport ExpandIcon from './ExpandIcon';\n\nvar ExpandableRow =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ExpandableRow, _React$Component);\n\n function ExpandableRow() {\n var _this;\n\n _classCallCheck(this, ExpandableRow);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ExpandableRow).apply(this, arguments)); // Show icon within first column\n\n _this.hasExpandIcon = function (columnIndex) {\n var _this$props = _this.props,\n expandRowByClick = _this$props.expandRowByClick,\n expandIcon = _this$props.expandIcon;\n\n if (_this.expandIconAsCell || columnIndex !== _this.expandIconColumnIndex) {\n return false;\n }\n\n return !!expandIcon || !expandRowByClick;\n };\n\n _this.handleExpandChange = function (record, event) {\n var _this$props2 = _this.props,\n onExpandedChange = _this$props2.onExpandedChange,\n expanded = _this$props2.expanded,\n rowKey = _this$props2.rowKey;\n\n if (_this.expandable) {\n onExpandedChange(!expanded, record, event, rowKey);\n }\n };\n\n _this.handleRowClick = function (record, index, event) {\n var _this$props3 = _this.props,\n expandRowByClick = _this$props3.expandRowByClick,\n onRowClick = _this$props3.onRowClick;\n\n if (expandRowByClick) {\n _this.handleExpandChange(record, event);\n }\n\n if (onRowClick) {\n onRowClick(record, index, event);\n }\n };\n\n _this.renderExpandIcon = function () {\n var _this$props4 = _this.props,\n prefixCls = _this$props4.prefixCls,\n expanded = _this$props4.expanded,\n record = _this$props4.record,\n needIndentSpaced = _this$props4.needIndentSpaced,\n expandIcon = _this$props4.expandIcon;\n\n if (expandIcon) {\n return expandIcon({\n prefixCls: prefixCls,\n expanded: expanded,\n record: record,\n needIndentSpaced: needIndentSpaced,\n expandable: _this.expandable,\n onExpand: _this.handleExpandChange\n });\n }\n\n return React.createElement(ExpandIcon, {\n expandable: _this.expandable,\n prefixCls: prefixCls,\n onExpand: _this.handleExpandChange,\n needIndentSpaced: needIndentSpaced,\n expanded: expanded,\n record: record\n });\n };\n\n _this.renderExpandIconCell = function (cells) {\n if (!_this.expandIconAsCell) {\n return;\n }\n\n var prefixCls = _this.props.prefixCls;\n cells.push(React.createElement(\"td\", {\n className: \"\".concat(prefixCls, \"-expand-icon-cell\"),\n key: \"rc-table-expand-icon-cell\"\n }, _this.renderExpandIcon()));\n };\n\n return _this;\n }\n\n _createClass(ExpandableRow, [{\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.handleDestroy();\n }\n }, {\n key: \"handleDestroy\",\n value: function handleDestroy() {\n var _this$props5 = this.props,\n onExpandedChange = _this$props5.onExpandedChange,\n rowKey = _this$props5.rowKey,\n record = _this$props5.record;\n\n if (this.expandable) {\n onExpandedChange(false, record, null, rowKey, true);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props6 = this.props,\n childrenColumnName = _this$props6.childrenColumnName,\n expandedRowRender = _this$props6.expandedRowRender,\n indentSize = _this$props6.indentSize,\n record = _this$props6.record,\n fixed = _this$props6.fixed,\n expanded = _this$props6.expanded;\n this.expandIconAsCell = fixed !== 'right' ? this.props.expandIconAsCell : false;\n this.expandIconColumnIndex = fixed !== 'right' ? this.props.expandIconColumnIndex : -1;\n var childrenData = record[childrenColumnName];\n this.expandable = !!(childrenData || expandedRowRender);\n var expandableRowProps = {\n indentSize: indentSize,\n // not used in TableRow, but it's required to re-render TableRow when `expanded` changes\n expanded: expanded,\n onRowClick: this.handleRowClick,\n hasExpandIcon: this.hasExpandIcon,\n renderExpandIcon: this.renderExpandIcon,\n renderExpandIconCell: this.renderExpandIconCell\n };\n return this.props.children(expandableRowProps);\n }\n }]);\n\n return ExpandableRow;\n}(React.Component);\n\nexport default connect(function (_ref, _ref2) {\n var expandedRowKeys = _ref.expandedRowKeys;\n var rowKey = _ref2.rowKey;\n return {\n expanded: expandedRowKeys.includes(rowKey)\n };\n})(ExpandableRow);","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { connect } from 'mini-store';\nimport classNames from 'classnames';\nimport ColGroup from './ColGroup';\nimport TableHeader from './TableHeader';\nimport TableRow from './TableRow';\nimport ExpandableRow from './ExpandableRow';\n\nvar BaseTable =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(BaseTable, _React$Component);\n\n function BaseTable() {\n var _this;\n\n _classCallCheck(this, BaseTable);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(BaseTable).apply(this, arguments));\n\n _this.handleRowHover = function (isHover, key) {\n _this.props.store.setState({\n currentHoverKey: isHover ? key : null\n });\n };\n\n _this.renderRows = function (renderData, indent) {\n var ancestorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var table = _this.context.table;\n var columnManager = table.columnManager,\n components = table.components;\n var _table$props = table.props,\n prefixCls = _table$props.prefixCls,\n childrenColumnName = _table$props.childrenColumnName,\n rowClassName = _table$props.rowClassName,\n rowRef = _table$props.rowRef,\n onRowClick = _table$props.onRowClick,\n onRowDoubleClick = _table$props.onRowDoubleClick,\n onRowContextMenu = _table$props.onRowContextMenu,\n onRowMouseEnter = _table$props.onRowMouseEnter,\n onRowMouseLeave = _table$props.onRowMouseLeave,\n onRow = _table$props.onRow;\n var _this$props = _this.props,\n getRowKey = _this$props.getRowKey,\n fixed = _this$props.fixed,\n expander = _this$props.expander,\n isAnyColumnsFixed = _this$props.isAnyColumnsFixed;\n var rows = [];\n\n var _loop = function _loop(i) {\n var record = renderData[i];\n var key = getRowKey(record, i);\n var className = typeof rowClassName === 'string' ? rowClassName : rowClassName(record, i, indent);\n var onHoverProps = {};\n\n if (columnManager.isAnyColumnsFixed()) {\n onHoverProps.onHover = _this.handleRowHover;\n }\n\n var leafColumns = void 0;\n\n if (fixed === 'left') {\n leafColumns = columnManager.leftLeafColumns();\n } else if (fixed === 'right') {\n leafColumns = columnManager.rightLeafColumns();\n } else {\n leafColumns = _this.getColumns(columnManager.leafColumns());\n }\n\n var rowPrefixCls = \"\".concat(prefixCls, \"-row\");\n var row = React.createElement(ExpandableRow, Object.assign({}, expander.props, {\n fixed: fixed,\n index: i,\n prefixCls: rowPrefixCls,\n record: record,\n key: key,\n rowKey: key,\n onRowClick: onRowClick,\n needIndentSpaced: expander.needIndentSpaced,\n onExpandedChange: expander.handleExpandChange\n }), function (expandableRow) {\n return React.createElement(TableRow, Object.assign({\n fixed: fixed,\n indent: indent,\n className: className,\n record: record,\n index: i,\n prefixCls: rowPrefixCls,\n childrenColumnName: childrenColumnName,\n columns: leafColumns,\n onRow: onRow,\n onRowDoubleClick: onRowDoubleClick,\n onRowContextMenu: onRowContextMenu,\n onRowMouseEnter: onRowMouseEnter,\n onRowMouseLeave: onRowMouseLeave\n }, onHoverProps, {\n rowKey: key,\n ancestorKeys: ancestorKeys,\n ref: rowRef(record, i, indent),\n components: components,\n isAnyColumnsFixed: isAnyColumnsFixed\n }, expandableRow));\n });\n rows.push(row);\n expander.renderRows(_this.renderRows, rows, record, i, indent, fixed, key, ancestorKeys);\n };\n\n for (var i = 0; i < renderData.length; i += 1) {\n _loop(i);\n }\n\n return rows;\n };\n\n return _this;\n }\n\n _createClass(BaseTable, [{\n key: \"getColumns\",\n value: function getColumns(cols) {\n var _this$props2 = this.props,\n _this$props2$columns = _this$props2.columns,\n columns = _this$props2$columns === void 0 ? [] : _this$props2$columns,\n fixed = _this$props2.fixed;\n var table = this.context.table;\n var prefixCls = table.props.prefixCls;\n return (cols || columns).map(function (column) {\n return _objectSpread({}, column, {\n className: !!column.fixed && !fixed ? classNames(\"\".concat(prefixCls, \"-fixed-columns-in-body\"), column.className) : column.className\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var table = this.context.table;\n var components = table.components;\n var _table$props2 = table.props,\n prefixCls = _table$props2.prefixCls,\n scroll = _table$props2.scroll,\n data = _table$props2.data,\n getBodyWrapper = _table$props2.getBodyWrapper;\n var _this$props3 = this.props,\n expander = _this$props3.expander,\n tableClassName = _this$props3.tableClassName,\n hasHead = _this$props3.hasHead,\n hasBody = _this$props3.hasBody,\n fixed = _this$props3.fixed;\n var tableStyle = {};\n\n if (!fixed && scroll.x) {\n // not set width, then use content fixed width\n tableStyle.width = scroll.x === true ? 'max-content' : scroll.x;\n }\n\n var Table = hasBody ? components.table : 'table';\n var BodyWrapper = components.body.wrapper;\n var body;\n\n if (hasBody) {\n body = React.createElement(BodyWrapper, {\n className: \"\".concat(prefixCls, \"-tbody\")\n }, this.renderRows(data, 0));\n\n if (getBodyWrapper) {\n body = getBodyWrapper(body);\n }\n }\n\n var columns = this.getColumns();\n return React.createElement(Table, {\n className: tableClassName,\n style: tableStyle,\n key: \"table\"\n }, React.createElement(ColGroup, {\n columns: columns,\n fixed: fixed\n }), hasHead && React.createElement(TableHeader, {\n expander: expander,\n columns: columns,\n fixed: fixed\n }), body);\n }\n }]);\n\n return BaseTable;\n}(React.Component);\n\nBaseTable.contextTypes = {\n table: PropTypes.any\n};\nexport default connect()(BaseTable);","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { measureScrollbar } from './utils';\nimport BaseTable from './BaseTable';\nexport default function HeadTable(props, _ref) {\n var table = _ref.table;\n var _table$props = table.props,\n prefixCls = _table$props.prefixCls,\n scroll = _table$props.scroll,\n showHeader = _table$props.showHeader;\n var columns = props.columns,\n fixed = props.fixed,\n tableClassName = props.tableClassName,\n handleBodyScrollLeft = props.handleBodyScrollLeft,\n expander = props.expander;\n var saveRef = table.saveRef;\n var useFixedHeader = table.props.useFixedHeader;\n var headStyle = {};\n var scrollbarWidth = measureScrollbar({\n direction: 'vertical'\n });\n\n if (scroll.y) {\n useFixedHeader = true; // https://github.com/ant-design/ant-design/issues/17051\n\n var scrollbarWidthOfHeader = measureScrollbar({\n direction: 'horizontal',\n prefixCls: prefixCls\n }); // Add negative margin bottom for scroll bar overflow bug\n\n if (scrollbarWidthOfHeader > 0 && !fixed) {\n headStyle.marginBottom = \"-\".concat(scrollbarWidthOfHeader, \"px\");\n headStyle.paddingBottom = '0px'; // https://github.com/ant-design/ant-design/pull/19986\n\n headStyle.minWidth = \"\".concat(scrollbarWidth, \"px\"); // https://github.com/ant-design/ant-design/issues/17051\n\n headStyle.overflowX = 'scroll';\n headStyle.overflowY = scrollbarWidth === 0 ? 'hidden' : 'scroll';\n }\n }\n\n if (!useFixedHeader || !showHeader) {\n return null;\n }\n\n return React.createElement(\"div\", {\n key: \"headTable\",\n ref: fixed ? null : saveRef('headTable'),\n className: classNames(\"\".concat(prefixCls, \"-header\"), _defineProperty({}, \"\".concat(prefixCls, \"-hide-scrollbar\"), scrollbarWidth > 0)),\n style: headStyle,\n onScroll: handleBodyScrollLeft\n }, React.createElement(BaseTable, {\n tableClassName: tableClassName,\n hasHead: true,\n hasBody: false,\n fixed: fixed,\n columns: columns,\n expander: expander\n }));\n}\nHeadTable.contextTypes = {\n table: PropTypes.any\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { measureScrollbar } from './utils';\nimport BaseTable from './BaseTable';\nexport default function BodyTable(props, _ref) {\n var table = _ref.table;\n var _table$props = table.props,\n prefixCls = _table$props.prefixCls,\n scroll = _table$props.scroll;\n var columns = props.columns,\n fixed = props.fixed,\n tableClassName = props.tableClassName,\n getRowKey = props.getRowKey,\n handleBodyScroll = props.handleBodyScroll,\n handleWheel = props.handleWheel,\n expander = props.expander,\n isAnyColumnsFixed = props.isAnyColumnsFixed;\n var saveRef = table.saveRef;\n var useFixedHeader = table.props.useFixedHeader;\n\n var bodyStyle = _objectSpread({}, table.props.bodyStyle);\n\n var innerBodyStyle = {};\n\n if (scroll.x || fixed) {\n bodyStyle.overflowX = bodyStyle.overflowX || 'scroll'; // Fix weird webkit render bug\n // https://github.com/ant-design/ant-design/issues/7783\n\n bodyStyle.WebkitTransform = 'translate3d (0, 0, 0)';\n }\n\n if (scroll.y) {\n // maxHeight will make fixed-Table scrolling not working\n // so we only set maxHeight to body-Table here\n if (fixed) {\n innerBodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;\n innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll';\n } else {\n bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;\n }\n\n bodyStyle.overflowY = bodyStyle.overflowY || 'scroll';\n useFixedHeader = true; // Add negative margin bottom for scroll bar overflow bug\n\n var scrollbarWidth = measureScrollbar({\n direction: 'vertical'\n });\n\n if (scrollbarWidth > 0 && fixed) {\n bodyStyle.marginBottom = \"-\".concat(scrollbarWidth, \"px\");\n bodyStyle.paddingBottom = '0px';\n }\n }\n\n var baseTable = React.createElement(BaseTable, {\n tableClassName: tableClassName,\n hasHead: !useFixedHeader,\n hasBody: true,\n fixed: fixed,\n columns: columns,\n expander: expander,\n getRowKey: getRowKey,\n isAnyColumnsFixed: isAnyColumnsFixed\n });\n\n if (fixed && columns.length) {\n var refName;\n\n if (columns[0].fixed === 'left' || columns[0].fixed === true) {\n refName = 'fixedColumnsBodyLeft';\n } else if (columns[0].fixed === 'right') {\n refName = 'fixedColumnsBodyRight';\n }\n\n delete bodyStyle.overflowX;\n delete bodyStyle.overflowY;\n return React.createElement(\"div\", {\n key: \"bodyTable\",\n className: \"\".concat(prefixCls, \"-body-outer\"),\n style: _objectSpread({}, bodyStyle)\n }, React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-body-inner\"),\n style: innerBodyStyle,\n ref: saveRef(refName),\n onWheel: handleWheel,\n onScroll: handleBodyScroll\n }, baseTable));\n } // Should provides `tabIndex` if use scroll to enable keyboard scroll\n\n\n var useTabIndex = scroll && (scroll.x || scroll.y);\n return React.createElement(\"div\", {\n tabIndex: useTabIndex ? -1 : undefined,\n key: \"bodyTable\",\n className: \"\".concat(prefixCls, \"-body\"),\n style: bodyStyle,\n ref: saveRef('bodyTable'),\n onWheel: handleWheel,\n onScroll: handleBodyScroll\n }, baseTable);\n}\nBodyTable.contextTypes = {\n table: PropTypes.any\n};","var Column = function Column() {\n return null;\n};\n\nexport default Column;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\n\nvar ColumnGroup =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ColumnGroup, _React$Component);\n\n function ColumnGroup() {\n _classCallCheck(this, ColumnGroup);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(ColumnGroup).apply(this, arguments));\n }\n\n return ColumnGroup;\n}(React.Component);\n\nexport { ColumnGroup as default };\nColumnGroup.isTableColumnGroup = true;","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport { connect } from 'mini-store';\nimport { polyfill } from 'react-lifecycles-compat';\nimport shallowEqual from 'shallowequal';\nimport TableRow from './TableRow';\nimport { remove } from './utils';\n\nvar ExpandableTable =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ExpandableTable, _React$Component);\n\n function ExpandableTable(props) {\n var _this;\n\n _classCallCheck(this, ExpandableTable);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ExpandableTable).call(this, props));\n\n _this.handleExpandChange = function (expanded, record, event, rowKey) {\n var destroy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n if (event) {\n event.stopPropagation();\n }\n\n var _this$props = _this.props,\n onExpandedRowsChange = _this$props.onExpandedRowsChange,\n onExpand = _this$props.onExpand;\n\n var _this$store$getState = _this.store.getState(),\n expandedRowKeys = _this$store$getState.expandedRowKeys;\n\n if (expanded) {\n // row was expanded\n expandedRowKeys = [].concat(_toConsumableArray(expandedRowKeys), [rowKey]);\n } else {\n // row was collapse\n var expandedRowIndex = expandedRowKeys.indexOf(rowKey);\n\n if (expandedRowIndex !== -1) {\n expandedRowKeys = remove(expandedRowKeys, rowKey);\n }\n }\n\n if (!_this.props.expandedRowKeys) {\n _this.store.setState({\n expandedRowKeys: expandedRowKeys\n });\n } // De-dup of repeat call\n\n\n if (!_this.latestExpandedRows || !shallowEqual(_this.latestExpandedRows, expandedRowKeys)) {\n _this.latestExpandedRows = expandedRowKeys;\n onExpandedRowsChange(expandedRowKeys);\n }\n\n if (!destroy) {\n onExpand(expanded, record);\n }\n };\n\n _this.renderExpandIndentCell = function (rows, fixed) {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n expandIconAsCell = _this$props2.expandIconAsCell;\n\n if (!expandIconAsCell || fixed === 'right' || !rows.length) {\n return;\n }\n\n var iconColumn = {\n key: 'rc-table-expand-icon-cell',\n className: \"\".concat(prefixCls, \"-expand-icon-th\"),\n title: '',\n rowSpan: rows.length\n };\n rows[0].unshift(_objectSpread({}, iconColumn, {\n column: iconColumn\n }));\n };\n\n _this.renderRows = function (renderRows, rows, record, index, indent, fixed, parentKey, ancestorKeys) {\n var _this$props3 = _this.props,\n expandedRowClassName = _this$props3.expandedRowClassName,\n expandedRowRender = _this$props3.expandedRowRender,\n childrenColumnName = _this$props3.childrenColumnName;\n var childrenData = record[childrenColumnName];\n var nextAncestorKeys = [].concat(_toConsumableArray(ancestorKeys), [parentKey]);\n var nextIndent = indent + 1;\n\n if (expandedRowRender) {\n rows.push(_this.renderExpandedRow(record, index, expandedRowRender, expandedRowClassName(record, index, indent), nextAncestorKeys, nextIndent, fixed));\n }\n\n if (childrenData) {\n rows.push.apply(rows, _toConsumableArray(renderRows(childrenData, nextIndent, nextAncestorKeys)));\n }\n };\n\n var data = props.data,\n childrenColumnName = props.childrenColumnName,\n defaultExpandAllRows = props.defaultExpandAllRows,\n expandedRowKeys = props.expandedRowKeys,\n defaultExpandedRowKeys = props.defaultExpandedRowKeys,\n getRowKey = props.getRowKey;\n var finalExpandedRowKeys = [];\n\n var rows = _toConsumableArray(data);\n\n if (defaultExpandAllRows) {\n for (var i = 0; i < rows.length; i += 1) {\n var row = rows[i];\n finalExpandedRowKeys.push(getRowKey(row, i));\n rows = rows.concat(row[childrenColumnName] || []);\n }\n } else {\n finalExpandedRowKeys = expandedRowKeys || defaultExpandedRowKeys;\n }\n\n _this.columnManager = props.columnManager;\n _this.store = props.store;\n\n _this.store.setState({\n expandedRowsHeight: {},\n expandedRowKeys: finalExpandedRowKeys\n });\n\n return _this;\n }\n\n _createClass(ExpandableTable, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.handleUpdated();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if ('expandedRowKeys' in this.props) {\n this.store.setState({\n expandedRowKeys: this.props.expandedRowKeys\n });\n }\n\n this.handleUpdated();\n }\n }, {\n key: \"handleUpdated\",\n value: function handleUpdated() {\n /**\n * We should record latest expanded rows to avoid\n * multiple rows remove cause `onExpandedRowsChange` trigger many times\n */\n this.latestExpandedRows = null;\n }\n }, {\n key: \"renderExpandedRow\",\n value: function renderExpandedRow(record, index, _render, className, ancestorKeys, indent, fixed) {\n var _this2 = this;\n\n var _this$props4 = this.props,\n prefixCls = _this$props4.prefixCls,\n expandIconAsCell = _this$props4.expandIconAsCell,\n indentSize = _this$props4.indentSize;\n var parentKey = ancestorKeys[ancestorKeys.length - 1];\n var rowKey = \"\".concat(parentKey, \"-extra-row\");\n var components = {\n body: {\n row: 'tr',\n cell: 'td'\n }\n };\n var colCount;\n\n if (fixed === 'left') {\n colCount = this.columnManager.leftLeafColumns().length;\n } else if (fixed === 'right') {\n colCount = this.columnManager.rightLeafColumns().length;\n } else {\n colCount = this.columnManager.leafColumns().length;\n }\n\n var columns = [{\n key: 'extra-row',\n render: function render() {\n var _this2$store$getState = _this2.store.getState(),\n expandedRowKeys = _this2$store$getState.expandedRowKeys;\n\n var expanded = expandedRowKeys.includes(parentKey);\n return {\n props: {\n colSpan: colCount\n },\n children: fixed !== 'right' ? _render(record, index, indent, expanded) : ' '\n };\n }\n }];\n\n if (expandIconAsCell && fixed !== 'right') {\n columns.unshift({\n key: 'expand-icon-placeholder',\n render: function render() {\n return null;\n }\n });\n }\n\n return React.createElement(TableRow, {\n key: rowKey,\n columns: columns,\n className: className,\n rowKey: rowKey,\n ancestorKeys: ancestorKeys,\n prefixCls: \"\".concat(prefixCls, \"-expanded-row\"),\n indentSize: indentSize,\n indent: indent,\n fixed: fixed,\n components: components,\n expandedRow: true\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n data = _this$props5.data,\n childrenColumnName = _this$props5.childrenColumnName,\n children = _this$props5.children;\n var needIndentSpaced = data.some(function (record) {\n return record[childrenColumnName];\n });\n return children({\n props: this.props,\n needIndentSpaced: needIndentSpaced,\n renderRows: this.renderRows,\n handleExpandChange: this.handleExpandChange,\n renderExpandIndentCell: this.renderExpandIndentCell\n });\n }\n }]);\n\n return ExpandableTable;\n}(React.Component);\n\nExpandableTable.defaultProps = {\n expandIconAsCell: false,\n expandedRowClassName: function expandedRowClassName() {\n return '';\n },\n expandIconColumnIndex: 0,\n defaultExpandAllRows: false,\n defaultExpandedRowKeys: [],\n childrenColumnName: 'children',\n indentSize: 15,\n onExpand: function onExpand() {},\n onExpandedRowsChange: function onExpandedRowsChange() {}\n};\npolyfill(ExpandableTable);\nexport default connect()(ExpandableTable);","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport shallowequal from 'shallowequal';\nimport addEventListener from \"rc-util/es/Dom/addEventListener\";\nimport warning from \"rc-util/es/warning\";\nimport { Provider, create } from 'mini-store';\nimport merge from 'lodash/merge';\nimport classes from 'component-classes';\nimport classNames from 'classnames';\nimport { polyfill } from 'react-lifecycles-compat';\nimport { debounce, getDataAndAriaProps } from './utils';\nimport ColumnManager from './ColumnManager';\nimport HeadTable from './HeadTable';\nimport BodyTable from './BodyTable';\nimport Column from './Column';\nimport ColumnGroup from './ColumnGroup';\nimport ExpandableTable from './ExpandableTable';\n\nvar Table =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Table, _React$Component);\n\n function Table(props) {\n var _this;\n\n _classCallCheck(this, Table);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Table).call(this, props));\n _this.state = {};\n\n _this.getRowKey = function (record, index) {\n var rowKey = _this.props.rowKey;\n var key = typeof rowKey === 'function' ? rowKey(record, index) : record[rowKey];\n warning(key !== undefined, 'Each record in table should have a unique `key` prop,' + 'or set `rowKey` to an unique primary key.');\n return key === undefined ? index : key;\n };\n\n _this.handleWindowResize = function () {\n _this.syncFixedTableRowHeight();\n\n _this.setScrollPositionClassName();\n };\n\n _this.syncFixedTableRowHeight = function () {\n var tableRect = _this.tableNode.getBoundingClientRect(); // If tableNode's height less than 0, suppose it is hidden and don't recalculate rowHeight.\n // see: https://github.com/ant-design/ant-design/issues/4836\n\n\n if (tableRect.height !== undefined && tableRect.height <= 0) {\n return;\n }\n\n var prefixCls = _this.props.prefixCls;\n var headRows = _this.headTable ? _this.headTable.querySelectorAll('thead') : _this.bodyTable.querySelectorAll('thead');\n var bodyRows = _this.bodyTable.querySelectorAll(\".\".concat(prefixCls, \"-row\")) || [];\n var fixedColumnsHeadRowsHeight = [].map.call(headRows, function (row) {\n return row.getBoundingClientRect().height ? row.getBoundingClientRect().height - 1 : 'auto';\n });\n\n var state = _this.store.getState();\n\n var fixedColumnsBodyRowsHeight = [].reduce.call(bodyRows, function (acc, row) {\n var rowKey = row.getAttribute('data-row-key');\n var height = row.getBoundingClientRect().height || state.fixedColumnsBodyRowsHeight[rowKey] || 'auto';\n acc[rowKey] = height;\n return acc;\n }, {});\n\n if (shallowequal(state.fixedColumnsHeadRowsHeight, fixedColumnsHeadRowsHeight) && shallowequal(state.fixedColumnsBodyRowsHeight, fixedColumnsBodyRowsHeight)) {\n return;\n }\n\n _this.store.setState({\n fixedColumnsHeadRowsHeight: fixedColumnsHeadRowsHeight,\n fixedColumnsBodyRowsHeight: fixedColumnsBodyRowsHeight\n });\n };\n\n _this.handleBodyScrollLeft = function (e) {\n // Fix https://github.com/ant-design/ant-design/issues/7635\n if (e.currentTarget !== e.target) {\n return;\n }\n\n var target = e.target;\n var _this$props$scroll = _this.props.scroll,\n scroll = _this$props$scroll === void 0 ? {} : _this$props$scroll;\n\n var _assertThisInitialize = _assertThisInitialized(_this),\n headTable = _assertThisInitialize.headTable,\n bodyTable = _assertThisInitialize.bodyTable;\n\n if (target.scrollLeft !== _this.lastScrollLeft && scroll.x) {\n if (target === bodyTable && headTable) {\n headTable.scrollLeft = target.scrollLeft;\n } else if (target === headTable && bodyTable) {\n bodyTable.scrollLeft = target.scrollLeft;\n }\n\n _this.setScrollPositionClassName();\n } // Remember last scrollLeft for scroll direction detecting.\n\n\n _this.lastScrollLeft = target.scrollLeft;\n };\n\n _this.handleBodyScrollTop = function (e) {\n var target = e.target; // Fix https://github.com/ant-design/ant-design/issues/9033\n\n if (e.currentTarget !== target) {\n return;\n }\n\n var _this$props$scroll2 = _this.props.scroll,\n scroll = _this$props$scroll2 === void 0 ? {} : _this$props$scroll2;\n\n var _assertThisInitialize2 = _assertThisInitialized(_this),\n headTable = _assertThisInitialize2.headTable,\n bodyTable = _assertThisInitialize2.bodyTable,\n fixedColumnsBodyLeft = _assertThisInitialize2.fixedColumnsBodyLeft,\n fixedColumnsBodyRight = _assertThisInitialize2.fixedColumnsBodyRight;\n\n if (target.scrollTop !== _this.lastScrollTop && scroll.y && target !== headTable) {\n var scrollTop = target.scrollTop;\n\n if (fixedColumnsBodyLeft && target !== fixedColumnsBodyLeft) {\n fixedColumnsBodyLeft.scrollTop = scrollTop;\n }\n\n if (fixedColumnsBodyRight && target !== fixedColumnsBodyRight) {\n fixedColumnsBodyRight.scrollTop = scrollTop;\n }\n\n if (bodyTable && target !== bodyTable) {\n bodyTable.scrollTop = scrollTop;\n }\n } // Remember last scrollTop for scroll direction detecting.\n\n\n _this.lastScrollTop = target.scrollTop;\n };\n\n _this.handleBodyScroll = function (e) {\n _this.handleBodyScrollLeft(e);\n\n _this.handleBodyScrollTop(e);\n };\n\n _this.handleWheel = function (event) {\n var _this$props$scroll3 = _this.props.scroll,\n scroll = _this$props$scroll3 === void 0 ? {} : _this$props$scroll3;\n\n if (window.navigator.userAgent.match(/Trident\\/7\\./) && scroll.y) {\n event.preventDefault();\n var wd = event.deltaY;\n var target = event.target;\n\n var _assertThisInitialize3 = _assertThisInitialized(_this),\n bodyTable = _assertThisInitialize3.bodyTable,\n fixedColumnsBodyLeft = _assertThisInitialize3.fixedColumnsBodyLeft,\n fixedColumnsBodyRight = _assertThisInitialize3.fixedColumnsBodyRight;\n\n var scrollTop = 0;\n\n if (_this.lastScrollTop) {\n scrollTop = _this.lastScrollTop + wd;\n } else {\n scrollTop = wd;\n }\n\n if (fixedColumnsBodyLeft && target !== fixedColumnsBodyLeft) {\n fixedColumnsBodyLeft.scrollTop = scrollTop;\n }\n\n if (fixedColumnsBodyRight && target !== fixedColumnsBodyRight) {\n fixedColumnsBodyRight.scrollTop = scrollTop;\n }\n\n if (bodyTable && target !== bodyTable) {\n bodyTable.scrollTop = scrollTop;\n }\n }\n };\n\n _this.saveRef = function (name) {\n return function (node) {\n _this[name] = node;\n };\n };\n\n _this.saveTableNodeRef = function (node) {\n _this.tableNode = node;\n };\n\n ['onRowClick', 'onRowDoubleClick', 'onRowContextMenu', 'onRowMouseEnter', 'onRowMouseLeave'].forEach(function (name) {\n warning(props[name] === undefined, \"\".concat(name, \" is deprecated, please use onRow instead.\"));\n });\n warning(props.getBodyWrapper === undefined, 'getBodyWrapper is deprecated, please use custom components instead.');\n _this.columnManager = new ColumnManager(props.columns, props.children);\n _this.store = create({\n currentHoverKey: null,\n fixedColumnsHeadRowsHeight: [],\n fixedColumnsBodyRowsHeight: {}\n });\n\n _this.setScrollPosition('left');\n\n _this.debouncedWindowResize = debounce(_this.handleWindowResize, 150);\n return _this;\n }\n\n _createClass(Table, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n return {\n table: {\n props: this.props,\n columnManager: this.columnManager,\n saveRef: this.saveRef,\n components: merge({\n table: 'table',\n header: {\n wrapper: 'thead',\n row: 'tr',\n cell: 'th'\n },\n body: {\n wrapper: 'tbody',\n row: 'tr',\n cell: 'td'\n }\n }, this.props.components)\n }\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.columnManager.isAnyColumnsFixed()) {\n this.handleWindowResize();\n this.resizeEvent = addEventListener(window, 'resize', this.debouncedWindowResize);\n } // https://github.com/ant-design/ant-design/issues/11635\n\n\n if (this.headTable) {\n this.headTable.scrollLeft = 0;\n }\n\n if (this.bodyTable) {\n this.bodyTable.scrollLeft = 0;\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.columnManager.isAnyColumnsFixed()) {\n this.handleWindowResize();\n\n if (!this.resizeEvent) {\n this.resizeEvent = addEventListener(window, 'resize', this.debouncedWindowResize);\n }\n } // when table changes to empty, reset scrollLeft\n\n\n if (prevProps.data.length > 0 && this.props.data.length === 0 && this.hasScrollX()) {\n this.resetScrollX();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.resizeEvent) {\n this.resizeEvent.remove();\n }\n\n if (this.debouncedWindowResize) {\n this.debouncedWindowResize.cancel();\n }\n }\n }, {\n key: \"setScrollPosition\",\n value: function setScrollPosition(position) {\n this.scrollPosition = position;\n\n if (this.tableNode) {\n var prefixCls = this.props.prefixCls;\n\n if (position === 'both') {\n classes(this.tableNode).remove(new RegExp(\"^\".concat(prefixCls, \"-scroll-position-.+$\"))).add(\"\".concat(prefixCls, \"-scroll-position-left\")).add(\"\".concat(prefixCls, \"-scroll-position-right\"));\n } else {\n classes(this.tableNode).remove(new RegExp(\"^\".concat(prefixCls, \"-scroll-position-.+$\"))).add(\"\".concat(prefixCls, \"-scroll-position-\").concat(position));\n }\n }\n }\n }, {\n key: \"setScrollPositionClassName\",\n value: function setScrollPositionClassName() {\n var node = this.bodyTable;\n var scrollToLeft = node.scrollLeft === 0;\n var scrollToRight = node.scrollLeft + 1 >= node.children[0].getBoundingClientRect().width - node.getBoundingClientRect().width;\n\n if (scrollToLeft && scrollToRight) {\n this.setScrollPosition('both');\n } else if (scrollToLeft) {\n this.setScrollPosition('left');\n } else if (scrollToRight) {\n this.setScrollPosition('right');\n } else if (this.scrollPosition !== 'middle') {\n this.setScrollPosition('middle');\n }\n }\n }, {\n key: \"isTableLayoutFixed\",\n value: function isTableLayoutFixed() {\n var _this$props = this.props,\n tableLayout = _this$props.tableLayout,\n _this$props$columns = _this$props.columns,\n columns = _this$props$columns === void 0 ? [] : _this$props$columns,\n useFixedHeader = _this$props.useFixedHeader,\n _this$props$scroll4 = _this$props.scroll,\n scroll = _this$props$scroll4 === void 0 ? {} : _this$props$scroll4;\n\n if (typeof tableLayout !== 'undefined') {\n return tableLayout === 'fixed';\n } // if one column is ellipsis, use fixed table layout to fix align issue\n\n\n if (columns.some(function (_ref) {\n var ellipsis = _ref.ellipsis;\n return !!ellipsis;\n })) {\n return true;\n } // if header fixed, use fixed table layout to fix align issue\n\n\n if (useFixedHeader || scroll.y) {\n return true;\n } // if scroll.x is number/px/% width value, we should fixed table layout\n // to avoid long word layout broken issue\n\n\n if (scroll.x && scroll.x !== true && scroll.x !== 'max-content') {\n return true;\n }\n\n return false;\n }\n }, {\n key: \"resetScrollX\",\n value: function resetScrollX() {\n if (this.headTable) {\n this.headTable.scrollLeft = 0;\n }\n\n if (this.bodyTable) {\n this.bodyTable.scrollLeft = 0;\n }\n }\n }, {\n key: \"hasScrollX\",\n value: function hasScrollX() {\n var _this$props$scroll5 = this.props.scroll,\n scroll = _this$props$scroll5 === void 0 ? {} : _this$props$scroll5;\n return 'x' in scroll;\n }\n }, {\n key: \"renderMainTable\",\n value: function renderMainTable() {\n var _this$props2 = this.props,\n scroll = _this$props2.scroll,\n prefixCls = _this$props2.prefixCls;\n var isAnyColumnsFixed = this.columnManager.isAnyColumnsFixed();\n var scrollable = isAnyColumnsFixed || scroll.x || scroll.y;\n var table = [this.renderTable({\n columns: this.columnManager.groupedColumns(),\n isAnyColumnsFixed: isAnyColumnsFixed\n }), this.renderEmptyText(), this.renderFooter()];\n return scrollable ? React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-scroll\")\n }, table) : table;\n }\n }, {\n key: \"renderLeftFixedTable\",\n value: function renderLeftFixedTable() {\n var prefixCls = this.props.prefixCls;\n return React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-fixed-left\")\n }, this.renderTable({\n columns: this.columnManager.leftColumns(),\n fixed: 'left'\n }));\n }\n }, {\n key: \"renderRightFixedTable\",\n value: function renderRightFixedTable() {\n var prefixCls = this.props.prefixCls;\n return React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-fixed-right\")\n }, this.renderTable({\n columns: this.columnManager.rightColumns(),\n fixed: 'right'\n }));\n }\n }, {\n key: \"renderTable\",\n value: function renderTable(options) {\n var columns = options.columns,\n fixed = options.fixed,\n isAnyColumnsFixed = options.isAnyColumnsFixed;\n var _this$props3 = this.props,\n prefixCls = _this$props3.prefixCls,\n _this$props3$scroll = _this$props3.scroll,\n scroll = _this$props3$scroll === void 0 ? {} : _this$props3$scroll;\n var tableClassName = scroll.x || fixed ? \"\".concat(prefixCls, \"-fixed\") : '';\n var headTable = React.createElement(HeadTable, {\n key: \"head\",\n columns: columns,\n fixed: fixed,\n tableClassName: tableClassName,\n handleBodyScrollLeft: this.handleBodyScrollLeft,\n expander: this.expander\n });\n var bodyTable = React.createElement(BodyTable, {\n key: \"body\",\n columns: columns,\n fixed: fixed,\n tableClassName: tableClassName,\n getRowKey: this.getRowKey,\n handleWheel: this.handleWheel,\n handleBodyScroll: this.handleBodyScroll,\n expander: this.expander,\n isAnyColumnsFixed: isAnyColumnsFixed\n });\n return [headTable, bodyTable];\n }\n }, {\n key: \"renderTitle\",\n value: function renderTitle() {\n var _this$props4 = this.props,\n title = _this$props4.title,\n prefixCls = _this$props4.prefixCls;\n return title ? React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-title\"),\n key: \"title\"\n }, title(this.props.data)) : null;\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n var _this$props5 = this.props,\n footer = _this$props5.footer,\n prefixCls = _this$props5.prefixCls;\n return footer ? React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-footer\"),\n key: \"footer\"\n }, footer(this.props.data)) : null;\n }\n }, {\n key: \"renderEmptyText\",\n value: function renderEmptyText() {\n var _this$props6 = this.props,\n emptyText = _this$props6.emptyText,\n prefixCls = _this$props6.prefixCls,\n data = _this$props6.data;\n\n if (data.length) {\n return null;\n }\n\n var emptyClassName = \"\".concat(prefixCls, \"-placeholder\");\n return React.createElement(\"div\", {\n className: emptyClassName,\n key: \"emptyText\"\n }, typeof emptyText === 'function' ? emptyText() : emptyText);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _classNames,\n _this2 = this;\n\n var props = this.props;\n var prefixCls = props.prefixCls;\n\n if (this.state.columns) {\n this.columnManager.reset(props.columns);\n } else if (this.state.children) {\n this.columnManager.reset(null, props.children);\n }\n\n var tableClassName = classNames(props.prefixCls, props.className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-fixed-header\"), props.useFixedHeader || props.scroll && props.scroll.y), _defineProperty(_classNames, \"\".concat(prefixCls, \"-scroll-position-left \").concat(prefixCls, \"-scroll-position-right\"), this.scrollPosition === 'both'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-scroll-position-\").concat(this.scrollPosition), this.scrollPosition !== 'both'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-layout-fixed\"), this.isTableLayoutFixed()), _classNames));\n var hasLeftFixed = this.columnManager.isAnyColumnsLeftFixed();\n var hasRightFixed = this.columnManager.isAnyColumnsRightFixed();\n var dataAndAriaProps = getDataAndAriaProps(props);\n return React.createElement(Provider, {\n store: this.store\n }, React.createElement(ExpandableTable, Object.assign({}, props, {\n columnManager: this.columnManager,\n getRowKey: this.getRowKey\n }), function (expander) {\n _this2.expander = expander;\n return React.createElement(\"div\", Object.assign({\n ref: _this2.saveTableNodeRef,\n className: tableClassName,\n style: props.style,\n id: props.id\n }, dataAndAriaProps), _this2.renderTitle(), React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-content\")\n }, _this2.renderMainTable(), hasLeftFixed && _this2.renderLeftFixedTable(), hasRightFixed && _this2.renderRightFixedTable()));\n }));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.columns && nextProps.columns !== prevState.columns) {\n return {\n columns: nextProps.columns,\n children: null\n };\n }\n\n if (nextProps.children !== prevState.children) {\n return {\n columns: null,\n children: nextProps.children\n };\n }\n\n return null;\n }\n }]);\n\n return Table;\n}(React.Component);\n\nTable.childContextTypes = {\n table: PropTypes.any,\n components: PropTypes.any\n};\nTable.Column = Column;\nTable.ColumnGroup = ColumnGroup;\nTable.defaultProps = {\n data: [],\n useFixedHeader: false,\n rowKey: 'key',\n rowClassName: function rowClassName() {\n return '';\n },\n onRow: function onRow() {},\n onHeaderRow: function onHeaderRow() {},\n prefixCls: 'rc-table',\n bodyStyle: {},\n style: {},\n showHeader: true,\n scroll: {},\n rowRef: function rowRef() {\n return null;\n },\n emptyText: function emptyText() {\n return 'No Data';\n }\n};\npolyfill(Table);\nexport default Table;","import Table from './Table';\nimport Column from './Column';\nimport ColumnGroup from './ColumnGroup';\nimport { INTERNAL_COL_DEFINE } from './utils';\nexport default Table;\nexport { Column, ColumnGroup, INTERNAL_COL_DEFINE };","import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { polyfill } from 'react-lifecycles-compat';\n\nvar Checkbox = function (_Component) {\n _inherits(Checkbox, _Component);\n\n function Checkbox(props) {\n _classCallCheck(this, Checkbox);\n\n var _this = _possibleConstructorReturn(this, _Component.call(this, props));\n\n _this.handleChange = function (e) {\n var _this$props = _this.props,\n disabled = _this$props.disabled,\n onChange = _this$props.onChange;\n\n if (disabled) {\n return;\n }\n if (!('checked' in _this.props)) {\n _this.setState({\n checked: e.target.checked\n });\n }\n if (onChange) {\n onChange({\n target: _extends({}, _this.props, {\n checked: e.target.checked\n }),\n stopPropagation: function stopPropagation() {\n e.stopPropagation();\n },\n preventDefault: function preventDefault() {\n e.preventDefault();\n },\n\n nativeEvent: e.nativeEvent\n });\n }\n };\n\n _this.saveInput = function (node) {\n _this.input = node;\n };\n\n var checked = 'checked' in props ? props.checked : props.defaultChecked;\n\n _this.state = {\n checked: checked\n };\n return _this;\n }\n\n Checkbox.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if ('checked' in props) {\n return _extends({}, state, {\n checked: props.checked\n });\n }\n return null;\n };\n\n Checkbox.prototype.focus = function focus() {\n this.input.focus();\n };\n\n Checkbox.prototype.blur = function blur() {\n this.input.blur();\n };\n\n Checkbox.prototype.render = function render() {\n var _classNames;\n\n var _props = this.props,\n prefixCls = _props.prefixCls,\n className = _props.className,\n style = _props.style,\n name = _props.name,\n id = _props.id,\n type = _props.type,\n disabled = _props.disabled,\n readOnly = _props.readOnly,\n tabIndex = _props.tabIndex,\n onClick = _props.onClick,\n onFocus = _props.onFocus,\n onBlur = _props.onBlur,\n autoFocus = _props.autoFocus,\n value = _props.value,\n others = _objectWithoutProperties(_props, ['prefixCls', 'className', 'style', 'name', 'id', 'type', 'disabled', 'readOnly', 'tabIndex', 'onClick', 'onFocus', 'onBlur', 'autoFocus', 'value']);\n\n var globalProps = Object.keys(others).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {\n prev[key] = others[key];\n }\n return prev;\n }, {});\n\n var checked = this.state.checked;\n\n var classString = classNames(prefixCls, className, (_classNames = {}, _classNames[prefixCls + '-checked'] = checked, _classNames[prefixCls + '-disabled'] = disabled, _classNames));\n\n return React.createElement(\n 'span',\n { className: classString, style: style },\n React.createElement('input', _extends({\n name: name,\n id: id,\n type: type,\n readOnly: readOnly,\n disabled: disabled,\n tabIndex: tabIndex,\n className: prefixCls + '-input',\n checked: !!checked,\n onClick: onClick,\n onFocus: onFocus,\n onBlur: onBlur,\n onChange: this.handleChange,\n autoFocus: autoFocus,\n ref: this.saveInput,\n value: value\n }, globalProps)),\n React.createElement('span', { className: prefixCls + '-inner' })\n );\n };\n\n return Checkbox;\n}(Component);\n\nCheckbox.propTypes = {\n prefixCls: PropTypes.string,\n className: PropTypes.string,\n style: PropTypes.object,\n name: PropTypes.string,\n id: PropTypes.string,\n type: PropTypes.string,\n defaultChecked: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),\n checked: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),\n disabled: PropTypes.bool,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onClick: PropTypes.func,\n tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n readOnly: PropTypes.bool,\n autoFocus: PropTypes.bool,\n value: PropTypes.any\n};\nCheckbox.defaultProps = {\n prefixCls: 'rc-checkbox',\n className: '',\n style: {},\n type: 'checkbox',\n defaultChecked: false,\n onFocus: function onFocus() {},\n onBlur: function onBlur() {},\n onChange: function onChange() {}\n};\n\n\npolyfill(Checkbox);\n\nexport default Checkbox;","import Checkbox from './Checkbox';\n\nexport default Checkbox;","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { polyfill } from 'react-lifecycles-compat';\nimport classNames from 'classnames';\nimport RcCheckbox from 'rc-checkbox';\nimport shallowEqual from 'shallowequal';\nimport { ConfigConsumer } from '../config-provider';\nimport warning from '../_util/warning';\nclass Checkbox extends React.Component {\n constructor() {\n super(...arguments);\n this.saveCheckbox = (node) => {\n this.rcCheckbox = node;\n };\n this.renderCheckbox = ({ getPrefixCls }) => {\n const { props, context } = this;\n const { prefixCls: customizePrefixCls, className, children, indeterminate, style, onMouseEnter, onMouseLeave } = props, restProps = __rest(props, [\"prefixCls\", \"className\", \"children\", \"indeterminate\", \"style\", \"onMouseEnter\", \"onMouseLeave\"]);\n const { checkboxGroup } = context;\n const prefixCls = getPrefixCls('checkbox', customizePrefixCls);\n const checkboxProps = Object.assign({}, restProps);\n if (checkboxGroup) {\n checkboxProps.onChange = (...args) => {\n if (restProps.onChange) {\n restProps.onChange(...args);\n }\n checkboxGroup.toggleOption({ label: children, value: props.value });\n };\n checkboxProps.name = checkboxGroup.name;\n checkboxProps.checked = checkboxGroup.value.indexOf(props.value) !== -1;\n checkboxProps.disabled = props.disabled || checkboxGroup.disabled;\n }\n const classString = classNames(className, {\n [`${prefixCls}-wrapper`]: true,\n [`${prefixCls}-wrapper-checked`]: checkboxProps.checked,\n [`${prefixCls}-wrapper-disabled`]: checkboxProps.disabled,\n });\n const checkboxClass = classNames({\n [`${prefixCls}-indeterminate`]: indeterminate,\n });\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n );\n };\n }\n componentDidMount() {\n const { value } = this.props;\n const { checkboxGroup = {} } = this.context || {};\n if (checkboxGroup.registerValue) {\n checkboxGroup.registerValue(value);\n }\n warning('checked' in this.props || (this.context || {}).checkboxGroup || !('value' in this.props), 'Checkbox', '`value` is not validate prop, do you mean `checked`?');\n }\n shouldComponentUpdate(nextProps, nextState, nextContext) {\n return (!shallowEqual(this.props, nextProps) ||\n !shallowEqual(this.state, nextState) ||\n !shallowEqual(this.context.checkboxGroup, nextContext.checkboxGroup));\n }\n componentDidUpdate({ value: prevValue }) {\n const { value } = this.props;\n const { checkboxGroup = {} } = this.context || {};\n if (value !== prevValue && checkboxGroup.registerValue && checkboxGroup.cancelValue) {\n checkboxGroup.cancelValue(prevValue);\n checkboxGroup.registerValue(value);\n }\n }\n componentWillUnmount() {\n const { value } = this.props;\n const { checkboxGroup = {} } = this.context || {};\n if (checkboxGroup.cancelValue) {\n checkboxGroup.cancelValue(value);\n }\n }\n focus() {\n this.rcCheckbox.focus();\n }\n blur() {\n this.rcCheckbox.blur();\n }\n render() {\n return {this.renderCheckbox};\n }\n}\nCheckbox.__ANT_CHECKBOX = true;\nCheckbox.defaultProps = {\n indeterminate: false,\n};\nCheckbox.contextTypes = {\n checkboxGroup: PropTypes.any,\n};\npolyfill(Checkbox);\nexport default Checkbox;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { polyfill } from 'react-lifecycles-compat';\nimport classNames from 'classnames';\nimport shallowEqual from 'shallowequal';\nimport omit from 'omit.js';\nimport Checkbox from './Checkbox';\nimport { ConfigConsumer } from '../config-provider';\nclass CheckboxGroup extends React.Component {\n constructor(props) {\n super(props);\n this.cancelValue = (value) => {\n this.setState(({ registeredValues }) => ({\n registeredValues: registeredValues.filter(val => val !== value),\n }));\n };\n this.registerValue = (value) => {\n this.setState(({ registeredValues }) => ({\n registeredValues: [...registeredValues, value],\n }));\n };\n this.toggleOption = (option) => {\n const { registeredValues } = this.state;\n const optionIndex = this.state.value.indexOf(option.value);\n const value = [...this.state.value];\n if (optionIndex === -1) {\n value.push(option.value);\n }\n else {\n value.splice(optionIndex, 1);\n }\n if (!('value' in this.props)) {\n this.setState({ value });\n }\n const { onChange } = this.props;\n if (onChange) {\n const options = this.getOptions();\n onChange(value\n .filter(val => registeredValues.indexOf(val) !== -1)\n .sort((a, b) => {\n const indexA = options.findIndex(opt => opt.value === a);\n const indexB = options.findIndex(opt => opt.value === b);\n return indexA - indexB;\n }));\n }\n };\n this.renderGroup = ({ getPrefixCls }) => {\n const { props, state } = this;\n const { prefixCls: customizePrefixCls, className, style, options } = props, restProps = __rest(props, [\"prefixCls\", \"className\", \"style\", \"options\"]);\n const prefixCls = getPrefixCls('checkbox', customizePrefixCls);\n const groupPrefixCls = `${prefixCls}-group`;\n const domProps = omit(restProps, ['children', 'defaultValue', 'value', 'onChange', 'disabled']);\n let { children } = props;\n if (options && options.length > 0) {\n children = this.getOptions().map(option => (\n {option.label}\n ));\n }\n const classString = classNames(groupPrefixCls, className);\n return (\n {children}\n
);\n };\n this.state = {\n value: props.value || props.defaultValue || [],\n registeredValues: [],\n };\n }\n static getDerivedStateFromProps(nextProps) {\n if ('value' in nextProps) {\n return {\n value: nextProps.value || [],\n };\n }\n return null;\n }\n getChildContext() {\n return {\n checkboxGroup: {\n toggleOption: this.toggleOption,\n value: this.state.value,\n disabled: this.props.disabled,\n name: this.props.name,\n // https://github.com/ant-design/ant-design/issues/16376\n registerValue: this.registerValue,\n cancelValue: this.cancelValue,\n },\n };\n }\n shouldComponentUpdate(nextProps, nextState) {\n return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n }\n getOptions() {\n const { options } = this.props;\n // https://github.com/Microsoft/TypeScript/issues/7960\n return options.map(option => {\n if (typeof option === 'string') {\n return {\n label: option,\n value: option,\n };\n }\n return option;\n });\n }\n render() {\n return {this.renderGroup};\n }\n}\nCheckboxGroup.defaultProps = {\n options: [],\n};\nCheckboxGroup.propTypes = {\n defaultValue: PropTypes.array,\n value: PropTypes.array,\n options: PropTypes.array.isRequired,\n onChange: PropTypes.func,\n};\nCheckboxGroup.childContextTypes = {\n checkboxGroup: PropTypes.any,\n};\npolyfill(CheckboxGroup);\nexport default CheckboxGroup;\n","import Checkbox from './Checkbox';\nimport Group from './Group';\nCheckbox.Group = Group;\nexport default Checkbox;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport RcCheckbox from 'rc-checkbox';\nimport classNames from 'classnames';\nimport shallowEqual from 'shallowequal';\nimport { ConfigConsumer } from '../config-provider';\nexport default class Radio extends React.Component {\n constructor() {\n super(...arguments);\n this.saveCheckbox = (node) => {\n this.rcCheckbox = node;\n };\n this.onChange = (e) => {\n if (this.props.onChange) {\n this.props.onChange(e);\n }\n if (this.context.radioGroup && this.context.radioGroup.onChange) {\n this.context.radioGroup.onChange(e);\n }\n };\n this.renderRadio = ({ getPrefixCls }) => {\n const { props, context } = this;\n const { prefixCls: customizePrefixCls, className, children, style } = props, restProps = __rest(props, [\"prefixCls\", \"className\", \"children\", \"style\"]);\n const { radioGroup } = context;\n const prefixCls = getPrefixCls('radio', customizePrefixCls);\n const radioProps = Object.assign({}, restProps);\n if (radioGroup) {\n radioProps.name = radioGroup.name;\n radioProps.onChange = this.onChange;\n radioProps.checked = props.value === radioGroup.value;\n radioProps.disabled = props.disabled || radioGroup.disabled;\n }\n const wrapperClassString = classNames(className, {\n [`${prefixCls}-wrapper`]: true,\n [`${prefixCls}-wrapper-checked`]: radioProps.checked,\n [`${prefixCls}-wrapper-disabled`]: radioProps.disabled,\n });\n return (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n );\n };\n }\n shouldComponentUpdate(nextProps, nextState, nextContext) {\n return (!shallowEqual(this.props, nextProps) ||\n !shallowEqual(this.state, nextState) ||\n !shallowEqual(this.context.radioGroup, nextContext.radioGroup));\n }\n focus() {\n this.rcCheckbox.focus();\n }\n blur() {\n this.rcCheckbox.blur();\n }\n render() {\n return {this.renderRadio};\n }\n}\nRadio.defaultProps = {\n type: 'radio',\n};\nRadio.contextTypes = {\n radioGroup: PropTypes.any,\n};\n","import * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport shallowEqual from 'shallowequal';\nimport { polyfill } from 'react-lifecycles-compat';\nimport Radio from './radio';\nimport { ConfigConsumer } from '../config-provider';\nfunction getCheckedValue(children) {\n let value = null;\n let matched = false;\n React.Children.forEach(children, (radio) => {\n if (radio && radio.props && radio.props.checked) {\n value = radio.props.value;\n matched = true;\n }\n });\n return matched ? { value } : undefined;\n}\nclass RadioGroup extends React.Component {\n constructor(props) {\n super(props);\n this.onRadioChange = (ev) => {\n const lastValue = this.state.value;\n const { value } = ev.target;\n if (!('value' in this.props)) {\n this.setState({\n value,\n });\n }\n const { onChange } = this.props;\n if (onChange && value !== lastValue) {\n onChange(ev);\n }\n };\n this.renderGroup = ({ getPrefixCls }) => {\n const { props } = this;\n const { prefixCls: customizePrefixCls, className = '', options, buttonStyle } = props;\n const prefixCls = getPrefixCls('radio', customizePrefixCls);\n const groupPrefixCls = `${prefixCls}-group`;\n const classString = classNames(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {\n [`${groupPrefixCls}-${props.size}`]: props.size,\n }, className);\n let { children } = props;\n // 如果存在 options, 优先使用\n if (options && options.length > 0) {\n children = options.map(option => {\n if (typeof option === 'string') {\n // 此处类型自动推导为 string\n return (\n {option}\n );\n }\n // 此处类型自动推导为 { label: string value: string }\n return (\n {option.label}\n );\n });\n }\n return (\n {children}\n
);\n };\n let value;\n if ('value' in props) {\n value = props.value;\n }\n else if ('defaultValue' in props) {\n value = props.defaultValue;\n }\n else {\n const checkedValue = getCheckedValue(props.children);\n value = checkedValue && checkedValue.value;\n }\n this.state = {\n value,\n };\n }\n static getDerivedStateFromProps(nextProps) {\n if ('value' in nextProps) {\n return {\n value: nextProps.value,\n };\n }\n const checkedValue = getCheckedValue(nextProps.children);\n if (checkedValue) {\n return {\n value: checkedValue.value,\n };\n }\n return null;\n }\n getChildContext() {\n return {\n radioGroup: {\n onChange: this.onRadioChange,\n value: this.state.value,\n disabled: this.props.disabled,\n name: this.props.name,\n },\n };\n }\n shouldComponentUpdate(nextProps, nextState) {\n return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState);\n }\n render() {\n return {this.renderGroup};\n }\n}\nRadioGroup.defaultProps = {\n buttonStyle: 'outline',\n};\nRadioGroup.childContextTypes = {\n radioGroup: PropTypes.any,\n};\npolyfill(RadioGroup);\nexport default RadioGroup;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport Radio from './radio';\nimport { ConfigConsumer } from '../config-provider';\nexport default class RadioButton extends React.Component {\n constructor() {\n super(...arguments);\n this.renderRadioButton = ({ getPrefixCls }) => {\n const _a = this.props, { prefixCls: customizePrefixCls } = _a, radioProps = __rest(_a, [\"prefixCls\"]);\n const prefixCls = getPrefixCls('radio-button', customizePrefixCls);\n if (this.context.radioGroup) {\n radioProps.checked = this.props.value === this.context.radioGroup.value;\n radioProps.disabled = this.props.disabled || this.context.radioGroup.disabled;\n }\n return ;\n };\n }\n render() {\n return {this.renderRadioButton};\n }\n}\nRadioButton.contextTypes = {\n radioGroup: PropTypes.any,\n};\n","import Radio from './radio';\nimport Group from './group';\nimport Button from './radioButton';\nRadio.Button = Button;\nRadio.Group = Group;\nexport { Button, Group };\nexport default Radio;\n","import * as React from 'react';\nconst FilterDropdownMenuWrapper = (props) => ( e.stopPropagation()}>\n {props.children}\n
);\nexport default FilterDropdownMenuWrapper;\n","import * as React from 'react';\nexport function flatArray(data = [], childrenName = 'children') {\n const result = [];\n const loop = (array) => {\n array.forEach(item => {\n if (item[childrenName]) {\n const newItem = Object.assign({}, item);\n delete newItem[childrenName];\n result.push(newItem);\n if (item[childrenName].length > 0) {\n loop(item[childrenName]);\n }\n }\n else {\n result.push(item);\n }\n });\n };\n loop(data);\n return result;\n}\nexport function treeMap(tree, mapper, childrenName = 'children') {\n return tree.map((node, index) => {\n const extra = {};\n if (node[childrenName]) {\n extra[childrenName] = treeMap(node[childrenName], mapper, childrenName);\n }\n return Object.assign(Object.assign({}, mapper(node, index)), extra);\n });\n}\nexport function flatFilter(tree, callback) {\n return tree.reduce((acc, node) => {\n if (callback(node)) {\n acc.push(node);\n }\n if (node.children) {\n const children = flatFilter(node.children, callback);\n acc.push(...children);\n }\n return acc;\n }, []);\n}\nexport function normalizeColumns(elements) {\n const columns = [];\n React.Children.forEach(elements, element => {\n if (!React.isValidElement(element)) {\n return;\n }\n const column = Object.assign({}, element.props);\n if (element.key) {\n column.key = element.key;\n }\n if (element.type && element.type.__ANT_TABLE_COLUMN_GROUP) {\n column.children = normalizeColumns(column.children);\n }\n columns.push(column);\n });\n return columns;\n}\nexport function generateValueMaps(items, maps = {}) {\n (items || []).forEach(({ value, children }) => {\n maps[value.toString()] = value;\n generateValueMaps(children, maps);\n });\n return maps;\n}\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { polyfill } from 'react-lifecycles-compat';\nimport Menu, { SubMenu, Item as MenuItem } from 'rc-menu';\nimport closest from 'dom-closest';\nimport classNames from 'classnames';\nimport shallowequal from 'shallowequal';\nimport Dropdown from '../dropdown';\nimport Icon from '../icon';\nimport Checkbox from '../checkbox';\nimport Radio from '../radio';\nimport FilterDropdownMenuWrapper from './FilterDropdownMenuWrapper';\nimport { generateValueMaps } from './util';\nfunction stopPropagation(e) {\n e.stopPropagation();\n if (e.nativeEvent.stopImmediatePropagation) {\n e.nativeEvent.stopImmediatePropagation();\n }\n}\nclass FilterMenu extends React.Component {\n constructor(props) {\n super(props);\n this.setNeverShown = (column) => {\n const rootNode = ReactDOM.findDOMNode(this);\n const filterBelongToScrollBody = !!closest(rootNode, `.ant-table-scroll`);\n if (filterBelongToScrollBody) {\n // When fixed column have filters, there will be two dropdown menus\n // Filter dropdown menu inside scroll body should never be shown\n // To fix https://github.com/ant-design/ant-design/issues/5010 and\n // https://github.com/ant-design/ant-design/issues/7909\n this.neverShown = !!column.fixed;\n }\n };\n this.setSelectedKeys = ({ selectedKeys }) => {\n this.setState({ selectedKeys: selectedKeys });\n };\n this.handleClearFilters = () => {\n this.setState({\n selectedKeys: [],\n }, this.handleConfirm);\n };\n this.handleConfirm = () => {\n this.setVisible(false);\n // Call `setSelectedKeys` & `confirm` in the same time will make filter data not up to date\n // https://github.com/ant-design/ant-design/issues/12284\n this.setState({}, this.confirmFilter);\n };\n this.onVisibleChange = (visible) => {\n this.setVisible(visible);\n const { column } = this.props;\n // https://github.com/ant-design/ant-design/issues/17833\n if (!visible && !(column.filterDropdown instanceof Function)) {\n this.confirmFilter();\n }\n };\n this.handleMenuItemClick = (info) => {\n const { selectedKeys } = this.state;\n if (!info.keyPath || info.keyPath.length <= 1) {\n return;\n }\n const { keyPathOfSelectedItem } = this.state;\n if (selectedKeys && selectedKeys.indexOf(info.key) >= 0) {\n // deselect SubMenu child\n delete keyPathOfSelectedItem[info.key];\n }\n else {\n // select SubMenu child\n keyPathOfSelectedItem[info.key] = info.keyPath;\n }\n this.setState({ keyPathOfSelectedItem });\n };\n this.renderFilterIcon = () => {\n const { column, locale, prefixCls, selectedKeys } = this.props;\n const filtered = selectedKeys && selectedKeys.length > 0;\n let filterIcon = column.filterIcon;\n if (typeof filterIcon === 'function') {\n filterIcon = filterIcon(filtered);\n }\n const dropdownIconClass = classNames({\n [`${prefixCls}-selected`]: filtered,\n [`${prefixCls}-open`]: this.getDropdownVisible(),\n });\n if (!filterIcon) {\n return ();\n }\n if (React.isValidElement(filterIcon)) {\n return React.cloneElement(filterIcon, {\n title: filterIcon.props.title || locale.filterTitle,\n className: classNames(`${prefixCls}-icon`, dropdownIconClass, filterIcon.props.className),\n onClick: stopPropagation,\n });\n }\n return {filterIcon};\n };\n const visible = 'filterDropdownVisible' in props.column ? props.column.filterDropdownVisible : false;\n this.state = {\n selectedKeys: props.selectedKeys,\n valueKeys: generateValueMaps(props.column.filters),\n keyPathOfSelectedItem: {},\n visible,\n prevProps: props,\n };\n }\n static getDerivedStateFromProps(nextProps, prevState) {\n const { column } = nextProps;\n const { prevProps } = prevState;\n const newState = {\n prevProps: nextProps,\n };\n /**\n * if the state is visible the component should ignore updates on selectedKeys prop to avoid\n * that the user selection is lost\n * this happens frequently when a table is connected on some sort of realtime data\n * Fixes https://github.com/ant-design/ant-design/issues/10289 and\n * https://github.com/ant-design/ant-design/issues/10209\n */\n if ('selectedKeys' in nextProps &&\n !shallowequal(prevProps.selectedKeys, nextProps.selectedKeys)) {\n newState.selectedKeys = nextProps.selectedKeys;\n }\n if (!shallowequal((prevProps.column || {}).filters, (nextProps.column || {}).filters)) {\n newState.valueKeys = generateValueMaps(nextProps.column.filters);\n }\n if ('filterDropdownVisible' in column) {\n newState.visible = column.filterDropdownVisible;\n }\n return newState;\n }\n componentDidMount() {\n const { column } = this.props;\n this.setNeverShown(column);\n }\n componentDidUpdate() {\n const { column } = this.props;\n this.setNeverShown(column);\n }\n getDropdownVisible() {\n return this.neverShown ? false : this.state.visible;\n }\n setVisible(visible) {\n const { column } = this.props;\n if (!('filterDropdownVisible' in column)) {\n this.setState({ visible });\n }\n if (column.onFilterDropdownVisibleChange) {\n column.onFilterDropdownVisibleChange(visible);\n }\n }\n hasSubMenu() {\n const { column: { filters = [] }, } = this.props;\n return filters.some(item => !!(item.children && item.children.length > 0));\n }\n confirmFilter() {\n const { column, selectedKeys: propSelectedKeys, confirmFilter } = this.props;\n const { selectedKeys, valueKeys } = this.state;\n const { filterDropdown } = column;\n if (!shallowequal(selectedKeys, propSelectedKeys)) {\n confirmFilter(column, filterDropdown\n ? selectedKeys\n : selectedKeys.map(key => valueKeys[key]).filter(key => key !== undefined));\n }\n }\n renderMenus(items) {\n const { dropdownPrefixCls, prefixCls } = this.props;\n return items.map(item => {\n if (item.children && item.children.length > 0) {\n const { keyPathOfSelectedItem } = this.state;\n const containSelected = Object.keys(keyPathOfSelectedItem).some(key => keyPathOfSelectedItem[key].indexOf(item.value) >= 0);\n const subMenuCls = classNames(`${prefixCls}-dropdown-submenu`, {\n [`${dropdownPrefixCls}-submenu-contain-selected`]: containSelected,\n });\n return (\n {this.renderMenus(item.children)}\n );\n }\n return this.renderMenuItem(item);\n });\n }\n renderMenuItem(item) {\n const { column } = this.props;\n const { selectedKeys } = this.state;\n const multiple = 'filterMultiple' in column ? column.filterMultiple : true;\n // We still need trade key as string since Menu render need string\n const internalSelectedKeys = (selectedKeys || []).map(key => key.toString());\n const input = multiple ? (= 0}/>) : (= 0}/>);\n return ();\n }\n render() {\n const { selectedKeys: originSelectedKeys } = this.state;\n const { column, locale, prefixCls, dropdownPrefixCls, getPopupContainer } = this.props;\n // default multiple selection in filter dropdown\n const multiple = 'filterMultiple' in column ? column.filterMultiple : true;\n const dropdownMenuClass = classNames({\n [`${dropdownPrefixCls}-menu-without-submenu`]: !this.hasSubMenu(),\n });\n let { filterDropdown } = column;\n if (filterDropdown instanceof Function) {\n filterDropdown = filterDropdown({\n prefixCls: `${dropdownPrefixCls}-custom`,\n setSelectedKeys: (selectedKeys) => this.setSelectedKeys({ selectedKeys }),\n selectedKeys: originSelectedKeys,\n confirm: this.handleConfirm,\n clearFilters: this.handleClearFilters,\n filters: column.filters,\n visible: this.getDropdownVisible(),\n });\n }\n const menus = filterDropdown ? (\n {filterDropdown}\n ) : (\n \n \n );\n return (\n {this.renderFilterIcon()}\n );\n }\n}\nFilterMenu.defaultProps = {\n column: {},\n};\npolyfill(FilterMenu);\nexport default FilterMenu;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport Checkbox from '../checkbox';\nimport Radio from '../radio';\nexport default class SelectionBox extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n checked: this.getCheckState(props),\n };\n }\n componentDidMount() {\n this.subscribe();\n }\n componentWillUnmount() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n // eslint-disable-next-line class-methods-use-this\n getCheckState(props) {\n const { store, defaultSelection, rowIndex } = props;\n let checked = false;\n if (store.getState().selectionDirty) {\n checked = store.getState().selectedRowKeys.indexOf(rowIndex) >= 0;\n }\n else {\n checked =\n store.getState().selectedRowKeys.indexOf(rowIndex) >= 0 ||\n defaultSelection.indexOf(rowIndex) >= 0;\n }\n return checked;\n }\n subscribe() {\n const { store } = this.props;\n this.unsubscribe = store.subscribe(() => {\n const checked = this.getCheckState(this.props);\n this.setState({ checked });\n });\n }\n render() {\n const _a = this.props, { type, rowIndex } = _a, rest = __rest(_a, [\"type\", \"rowIndex\"]);\n const { checked } = this.state;\n if (type === 'radio') {\n return ;\n }\n return ;\n }\n}\n","import * as React from 'react';\nimport classNames from 'classnames';\nimport { polyfill } from 'react-lifecycles-compat';\nimport Checkbox from '../checkbox';\nimport Dropdown from '../dropdown';\nimport Menu from '../menu';\nimport Icon from '../icon';\nfunction checkSelection({ store, getCheckboxPropsByItem, getRecordKey, data, type, byDefaultChecked, }) {\n return byDefaultChecked\n ? data[type]((item, i) => getCheckboxPropsByItem(item, i).defaultChecked)\n : data[type]((item, i) => store.getState().selectedRowKeys.indexOf(getRecordKey(item, i)) >= 0);\n}\nfunction getIndeterminateState(props) {\n const { store, data } = props;\n if (!data.length) {\n return false;\n }\n const someCheckedNotByDefaultChecked = checkSelection(Object.assign(Object.assign({}, props), { data, type: 'some', byDefaultChecked: false })) &&\n !checkSelection(Object.assign(Object.assign({}, props), { data, type: 'every', byDefaultChecked: false }));\n const someCheckedByDefaultChecked = checkSelection(Object.assign(Object.assign({}, props), { data, type: 'some', byDefaultChecked: true })) &&\n !checkSelection(Object.assign(Object.assign({}, props), { data, type: 'every', byDefaultChecked: true }));\n if (store.getState().selectionDirty) {\n return someCheckedNotByDefaultChecked;\n }\n return someCheckedNotByDefaultChecked || someCheckedByDefaultChecked;\n}\nfunction getCheckState(props) {\n const { store, data } = props;\n if (!data.length) {\n return false;\n }\n if (store.getState().selectionDirty) {\n return checkSelection(Object.assign(Object.assign({}, props), { data, type: 'every', byDefaultChecked: false }));\n }\n return (checkSelection(Object.assign(Object.assign({}, props), { data, type: 'every', byDefaultChecked: false })) ||\n checkSelection(Object.assign(Object.assign({}, props), { data, type: 'every', byDefaultChecked: true })));\n}\nclass SelectionCheckboxAll extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n checked: false,\n indeterminate: false,\n };\n this.handleSelectAllChange = (e) => {\n const { checked } = e.target;\n this.props.onSelect(checked ? 'all' : 'removeAll', 0, null);\n };\n this.defaultSelections = props.hideDefaultSelections\n ? []\n : [\n {\n key: 'all',\n text: props.locale.selectAll,\n },\n {\n key: 'invert',\n text: props.locale.selectInvert,\n },\n ];\n }\n static getDerivedStateFromProps(props, state) {\n const checked = getCheckState(props);\n const indeterminate = getIndeterminateState(props);\n const newState = {};\n if (indeterminate !== state.indeterminate) {\n newState.indeterminate = indeterminate;\n }\n if (checked !== state.checked) {\n newState.checked = checked;\n }\n return newState;\n }\n componentDidMount() {\n this.subscribe();\n }\n componentWillUnmount() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n setCheckState(props) {\n const checked = getCheckState(props);\n const indeterminate = getIndeterminateState(props);\n this.setState(prevState => {\n const newState = {};\n if (indeterminate !== prevState.indeterminate) {\n newState.indeterminate = indeterminate;\n }\n if (checked !== prevState.checked) {\n newState.checked = checked;\n }\n return newState;\n });\n }\n subscribe() {\n const { store } = this.props;\n this.unsubscribe = store.subscribe(() => {\n this.setCheckState(this.props);\n });\n }\n renderMenus(selections) {\n return selections.map((selection, index) => {\n return (\n {\n this.props.onSelect(selection.key, index, selection.onSelect);\n }}>\n {selection.text}\n
\n );\n });\n }\n render() {\n const { disabled, prefixCls, selections, getPopupContainer } = this.props;\n const { checked, indeterminate } = this.state;\n const selectionPrefixCls = `${prefixCls}-selection`;\n let customSelections = null;\n if (selections) {\n const newSelections = Array.isArray(selections)\n ? this.defaultSelections.concat(selections)\n : this.defaultSelections;\n const menu = ();\n customSelections =\n newSelections.length > 0 ? (\n \n \n
\n ) : null;\n }\n return (\n \n {customSelections}\n
);\n }\n}\npolyfill(SelectionCheckboxAll);\nexport default SelectionCheckboxAll;\n","import * as React from 'react';\n/* eslint-disable react/prefer-stateless-function */\nexport default class Column extends React.Component {\n}\n","import * as React from 'react';\nexport default class ColumnGroup extends React.Component {\n}\nColumnGroup.__ANT_TABLE_COLUMN_GROUP = true;\n","import * as React from 'react';\nimport classnames from 'classnames';\nimport omit from 'omit.js';\nexport default function createBodyRow(Component = 'tr') {\n class BodyRow extends React.Component {\n constructor(props) {\n super(props);\n this.store = props.store;\n const { selectedRowKeys } = this.store.getState();\n this.state = {\n selected: selectedRowKeys.indexOf(props.rowKey) >= 0,\n };\n }\n componentDidMount() {\n this.subscribe();\n }\n componentWillUnmount() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n subscribe() {\n const { store, rowKey } = this.props;\n this.unsubscribe = store.subscribe(() => {\n const { selectedRowKeys } = this.store.getState();\n const selected = selectedRowKeys.indexOf(rowKey) >= 0;\n if (selected !== this.state.selected) {\n this.setState({ selected });\n }\n });\n }\n render() {\n const rowProps = omit(this.props, ['prefixCls', 'rowKey', 'store']);\n const className = classnames(this.props.className, {\n [`${this.props.prefixCls}-row-selected`]: this.state.selected,\n });\n return React.createElement(Component, Object.assign(Object.assign({}, rowProps), { className }), this.props.children);\n }\n }\n return BodyRow;\n}\n","import raf from 'raf';\nimport getScroll from './getScroll';\nimport { easeInOutCubic } from './easings';\nexport default function scrollTo(y, options = {}) {\n const { getContainer = () => window, callback, duration = 450 } = options;\n const container = getContainer();\n const scrollTop = getScroll(container, true);\n const startTime = Date.now();\n const frameFunc = () => {\n const timestamp = Date.now();\n const time = timestamp - startTime;\n const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);\n if (container === window) {\n window.scrollTo(window.pageXOffset, nextScrollTop);\n }\n else {\n container.scrollTop = nextScrollTop;\n }\n if (time < duration) {\n raf(frameFunc);\n }\n else if (typeof callback === 'function') {\n callback();\n }\n };\n raf(frameFunc);\n}\n","export default function getScroll(target, top) {\n if (typeof window === 'undefined') {\n return 0;\n }\n const prop = top ? 'pageYOffset' : 'pageXOffset';\n const method = top ? 'scrollTop' : 'scrollLeft';\n const isWindow = target === window;\n let ret = isWindow ? target[prop] : target[method];\n // ie6,7,8 standard mode\n if (isWindow && typeof ret !== 'number') {\n ret = document.documentElement[method];\n }\n return ret;\n}\n","// eslint-disable-next-line import/prefer-default-export\nexport function easeInOutCubic(t, b, c, d) {\n const cc = c - b;\n t /= d / 2;\n if (t < 1) {\n return (cc / 2) * t * t * t + b;\n }\n return (cc / 2) * ((t -= 2) * t * t + 2) + b;\n}\n","import _defineProperty from 'babel-runtime/helpers/defineProperty';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nvar Pager = function Pager(props) {\n var _classNames;\n\n var prefixCls = props.rootPrefixCls + '-item';\n var cls = classNames(prefixCls, prefixCls + '-' + props.page, (_classNames = {}, _defineProperty(_classNames, prefixCls + '-active', props.active), _defineProperty(_classNames, props.className, !!props.className), _defineProperty(_classNames, prefixCls + '-disabled', !props.page), _classNames));\n\n var handleClick = function handleClick() {\n props.onClick(props.page);\n };\n\n var handleKeyPress = function handleKeyPress(e) {\n props.onKeyPress(e, props.onClick, props.page);\n };\n\n return React.createElement(\n 'li',\n {\n title: props.showTitle ? props.page : null,\n className: cls,\n onClick: handleClick,\n onKeyPress: handleKeyPress,\n tabIndex: '0'\n },\n props.itemRender(props.page, 'page', React.createElement(\n 'a',\n null,\n props.page\n ))\n );\n};\n\nPager.propTypes = {\n page: PropTypes.number,\n active: PropTypes.bool,\n last: PropTypes.bool,\n locale: PropTypes.object,\n className: PropTypes.string,\n showTitle: PropTypes.bool,\n rootPrefixCls: PropTypes.string,\n onClick: PropTypes.func,\n onKeyPress: PropTypes.func,\n itemRender: PropTypes.func\n};\n\nexport default Pager;","export default {\n ZERO: 48,\n NINE: 57,\n\n NUMPAD_ZERO: 96,\n NUMPAD_NINE: 105,\n\n BACKSPACE: 8,\n DELETE: 46,\n ENTER: 13,\n\n ARROW_UP: 38,\n ARROW_DOWN: 40\n};","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport KEYCODE from './KeyCode';\n\nvar Options = function (_React$Component) {\n _inherits(Options, _React$Component);\n\n function Options() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Options);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Options.__proto__ || Object.getPrototypeOf(Options)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n goInputText: ''\n }, _this.buildOptionText = function (value) {\n return value + ' ' + _this.props.locale.items_per_page;\n }, _this.changeSize = function (value) {\n _this.props.changeSize(Number(value));\n }, _this.handleChange = function (e) {\n _this.setState({\n goInputText: e.target.value\n });\n }, _this.handleBlur = function () {\n var _this$props = _this.props,\n goButton = _this$props.goButton,\n quickGo = _this$props.quickGo;\n\n if (goButton) {\n return;\n }\n quickGo(_this.getValidValue());\n }, _this.go = function (e) {\n var goInputText = _this.state.goInputText;\n\n if (goInputText === '') {\n return;\n }\n if (e.keyCode === KEYCODE.ENTER || e.type === 'click') {\n _this.setState({\n goInputText: ''\n });\n _this.props.quickGo(_this.getValidValue());\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Options, [{\n key: 'getValidValue',\n value: function getValidValue() {\n var _state = this.state,\n goInputText = _state.goInputText,\n current = _state.current;\n\n return !goInputText || isNaN(goInputText) ? current : Number(goInputText);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n pageSize = _props.pageSize,\n pageSizeOptions = _props.pageSizeOptions,\n locale = _props.locale,\n rootPrefixCls = _props.rootPrefixCls,\n changeSize = _props.changeSize,\n quickGo = _props.quickGo,\n goButton = _props.goButton,\n selectComponentClass = _props.selectComponentClass,\n buildOptionText = _props.buildOptionText,\n selectPrefixCls = _props.selectPrefixCls,\n disabled = _props.disabled;\n var goInputText = this.state.goInputText;\n\n var prefixCls = rootPrefixCls + '-options';\n var Select = selectComponentClass;\n var changeSelect = null;\n var goInput = null;\n var gotoButton = null;\n\n if (!changeSize && !quickGo) {\n return null;\n }\n\n if (changeSize && Select) {\n var options = pageSizeOptions.map(function (opt, i) {\n return React.createElement(\n Select.Option,\n { key: i, value: opt },\n (buildOptionText || _this2.buildOptionText)(opt)\n );\n });\n\n changeSelect = React.createElement(\n Select,\n {\n disabled: disabled,\n prefixCls: selectPrefixCls,\n showSearch: false,\n className: prefixCls + '-size-changer',\n optionLabelProp: 'children',\n dropdownMatchSelectWidth: false,\n value: (pageSize || pageSizeOptions[0]).toString(),\n onChange: this.changeSize,\n getPopupContainer: function getPopupContainer(triggerNode) {\n return triggerNode.parentNode;\n }\n },\n options\n );\n }\n\n if (quickGo) {\n if (goButton) {\n gotoButton = typeof goButton === 'boolean' ? React.createElement(\n 'button',\n {\n type: 'button',\n onClick: this.go,\n onKeyUp: this.go,\n disabled: disabled\n },\n locale.jump_to_confirm\n ) : React.createElement(\n 'span',\n {\n onClick: this.go,\n onKeyUp: this.go\n },\n goButton\n );\n }\n goInput = React.createElement(\n 'div',\n { className: prefixCls + '-quick-jumper' },\n locale.jump_to,\n React.createElement('input', {\n disabled: disabled,\n type: 'text',\n value: goInputText,\n onChange: this.handleChange,\n onKeyUp: this.go,\n onBlur: this.handleBlur\n }),\n locale.page,\n gotoButton\n );\n }\n\n return React.createElement(\n 'li',\n { className: '' + prefixCls },\n changeSelect,\n goInput\n );\n }\n }]);\n\n return Options;\n}(React.Component);\n\nOptions.propTypes = {\n disabled: PropTypes.bool,\n changeSize: PropTypes.func,\n quickGo: PropTypes.func,\n selectComponentClass: PropTypes.func,\n current: PropTypes.number,\n pageSizeOptions: PropTypes.arrayOf(PropTypes.string),\n pageSize: PropTypes.number,\n buildOptionText: PropTypes.func,\n locale: PropTypes.object,\n rootPrefixCls: PropTypes.string,\n selectPrefixCls: PropTypes.string,\n goButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node])\n};\nOptions.defaultProps = {\n pageSizeOptions: ['10', '20', '30', '40']\n};\n\n\nexport default Options;","import _defineProperty from 'babel-runtime/helpers/defineProperty';\nimport _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport Pager from './Pager';\nimport Options from './Options';\nimport KEYCODE from './KeyCode';\nimport LOCALE from './locale/zh_CN';\nimport { polyfill } from 'react-lifecycles-compat';\n\nfunction noop() {}\n\nfunction isInteger(value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}\n\nfunction defaultItemRender(page, type, element) {\n return element;\n}\n\nfunction calculatePage(p, state, props) {\n var pageSize = p;\n if (typeof pageSize === 'undefined') {\n pageSize = state.pageSize;\n }\n return Math.floor((props.total - 1) / pageSize) + 1;\n}\n\nvar Pagination = function (_React$Component) {\n _inherits(Pagination, _React$Component);\n\n function Pagination(props) {\n _classCallCheck(this, Pagination);\n\n var _this = _possibleConstructorReturn(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).call(this, props));\n\n _initialiseProps.call(_this);\n\n var hasOnChange = props.onChange !== noop;\n var hasCurrent = 'current' in props;\n if (hasCurrent && !hasOnChange) {\n console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.'); // eslint-disable-line\n }\n\n var current = props.defaultCurrent;\n if ('current' in props) {\n current = props.current;\n }\n\n var pageSize = props.defaultPageSize;\n if ('pageSize' in props) {\n pageSize = props.pageSize;\n }\n\n _this.state = {\n current: current,\n currentInputValue: current,\n pageSize: pageSize\n };\n return _this;\n }\n\n _createClass(Pagination, [{\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n // When current page change, fix focused style of prev item\n // A hacky solution of https://github.com/ant-design/ant-design/issues/8948\n var prefixCls = this.props.prefixCls;\n\n if (prevState.current !== this.state.current && this.paginationNode) {\n var lastCurrentNode = this.paginationNode.querySelector('.' + prefixCls + '-item-' + prevState.current);\n if (lastCurrentNode && document.activeElement === lastCurrentNode) {\n lastCurrentNode.blur();\n }\n }\n }\n }, {\n key: 'getValidValue',\n value: function getValidValue(e) {\n var inputValue = e.target.value;\n var currentInputValue = this.state.currentInputValue;\n\n var value = void 0;\n if (inputValue === '') {\n value = inputValue;\n } else if (isNaN(Number(inputValue))) {\n value = currentInputValue;\n } else {\n value = Number(inputValue);\n }\n return value;\n }\n }, {\n key: 'render',\n value: function render() {\n var _props = this.props,\n prefixCls = _props.prefixCls,\n className = _props.className,\n disabled = _props.disabled;\n\n // When hideOnSinglePage is true and there is only 1 page, hide the pager\n\n if (this.props.hideOnSinglePage === true && this.props.total <= this.state.pageSize) {\n return null;\n }\n\n var props = this.props;\n var locale = props.locale;\n\n var allPages = calculatePage(undefined, this.state, this.props);\n var pagerList = [];\n var jumpPrev = null;\n var jumpNext = null;\n var firstPager = null;\n var lastPager = null;\n var gotoButton = null;\n\n var goButton = props.showQuickJumper && props.showQuickJumper.goButton;\n var pageBufferSize = props.showLessItems ? 1 : 2;\n var _state = this.state,\n current = _state.current,\n pageSize = _state.pageSize;\n\n\n var prevPage = current - 1 > 0 ? current - 1 : 0;\n var nextPage = current + 1 < allPages ? current + 1 : allPages;\n\n var dataOrAriaAttributeProps = Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {\n prev[key] = props[key];\n }\n return prev;\n }, {});\n\n if (props.simple) {\n if (goButton) {\n if (typeof goButton === 'boolean') {\n gotoButton = React.createElement(\n 'button',\n {\n type: 'button',\n onClick: this.handleGoTO,\n onKeyUp: this.handleGoTO\n },\n locale.jump_to_confirm\n );\n } else {\n gotoButton = React.createElement(\n 'span',\n {\n onClick: this.handleGoTO,\n onKeyUp: this.handleGoTO\n },\n goButton\n );\n }\n gotoButton = React.createElement(\n 'li',\n {\n title: props.showTitle ? '' + locale.jump_to + this.state.current + '/' + allPages : null,\n className: prefixCls + '-simple-pager'\n },\n gotoButton\n );\n }\n\n return React.createElement(\n 'ul',\n _extends({\n className: prefixCls + ' ' + prefixCls + '-simple ' + props.className,\n style: props.style,\n ref: this.savePaginationNode\n }, dataOrAriaAttributeProps),\n React.createElement(\n 'li',\n {\n title: props.showTitle ? locale.prev_page : null,\n onClick: this.prev,\n tabIndex: this.hasPrev() ? 0 : null,\n onKeyPress: this.runIfEnterPrev,\n className: (this.hasPrev() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev',\n 'aria-disabled': !this.hasPrev()\n },\n props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon))\n ),\n React.createElement(\n 'li',\n {\n title: props.showTitle ? this.state.current + '/' + allPages : null,\n className: prefixCls + '-simple-pager'\n },\n React.createElement('input', {\n type: 'text',\n value: this.state.currentInputValue,\n onKeyDown: this.handleKeyDown,\n onKeyUp: this.handleKeyUp,\n onChange: this.handleKeyUp,\n size: '3'\n }),\n React.createElement(\n 'span',\n { className: prefixCls + '-slash' },\n '/'\n ),\n allPages\n ),\n React.createElement(\n 'li',\n {\n title: props.showTitle ? locale.next_page : null,\n onClick: this.next,\n tabIndex: this.hasPrev() ? 0 : null,\n onKeyPress: this.runIfEnterNext,\n className: (this.hasNext() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next',\n 'aria-disabled': !this.hasNext()\n },\n props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon))\n ),\n gotoButton\n );\n }\n\n if (allPages <= 5 + pageBufferSize * 2) {\n var pagerProps = {\n locale: locale,\n rootPrefixCls: prefixCls,\n onClick: this.handleChange,\n onKeyPress: this.runIfEnter,\n showTitle: props.showTitle,\n itemRender: props.itemRender\n };\n if (!allPages) {\n pagerList.push(React.createElement(Pager, _extends({}, pagerProps, {\n key: 'noPager',\n page: allPages,\n className: prefixCls + '-disabled'\n })));\n }\n for (var i = 1; i <= allPages; i++) {\n var active = this.state.current === i;\n pagerList.push(React.createElement(Pager, _extends({}, pagerProps, {\n key: i,\n page: i,\n active: active\n })));\n }\n } else {\n var prevItemTitle = props.showLessItems ? locale.prev_3 : locale.prev_5;\n var nextItemTitle = props.showLessItems ? locale.next_3 : locale.next_5;\n if (props.showPrevNextJumpers) {\n var jumpPrevClassString = prefixCls + '-jump-prev';\n if (props.jumpPrevIcon) {\n jumpPrevClassString += ' ' + prefixCls + '-jump-prev-custom-icon';\n }\n jumpPrev = React.createElement(\n 'li',\n {\n title: props.showTitle ? prevItemTitle : null,\n key: 'prev',\n onClick: this.jumpPrev,\n tabIndex: '0',\n onKeyPress: this.runIfEnterJumpPrev,\n className: jumpPrevClassString\n },\n props.itemRender(this.getJumpPrevPage(), 'jump-prev', this.getItemIcon(props.jumpPrevIcon))\n );\n var jumpNextClassString = prefixCls + '-jump-next';\n if (props.jumpNextIcon) {\n jumpNextClassString += ' ' + prefixCls + '-jump-next-custom-icon';\n }\n jumpNext = React.createElement(\n 'li',\n {\n title: props.showTitle ? nextItemTitle : null,\n key: 'next',\n tabIndex: '0',\n onClick: this.jumpNext,\n onKeyPress: this.runIfEnterJumpNext,\n className: jumpNextClassString\n },\n props.itemRender(this.getJumpNextPage(), 'jump-next', this.getItemIcon(props.jumpNextIcon))\n );\n }\n lastPager = React.createElement(Pager, {\n locale: props.locale,\n last: true,\n rootPrefixCls: prefixCls,\n onClick: this.handleChange,\n onKeyPress: this.runIfEnter,\n key: allPages,\n page: allPages,\n active: false,\n showTitle: props.showTitle,\n itemRender: props.itemRender\n });\n firstPager = React.createElement(Pager, {\n locale: props.locale,\n rootPrefixCls: prefixCls,\n onClick: this.handleChange,\n onKeyPress: this.runIfEnter,\n key: 1,\n page: 1,\n active: false,\n showTitle: props.showTitle,\n itemRender: props.itemRender\n });\n\n var left = Math.max(1, current - pageBufferSize);\n var right = Math.min(current + pageBufferSize, allPages);\n\n if (current - 1 <= pageBufferSize) {\n right = 1 + pageBufferSize * 2;\n }\n\n if (allPages - current <= pageBufferSize) {\n left = allPages - pageBufferSize * 2;\n }\n\n for (var _i = left; _i <= right; _i++) {\n var _active = current === _i;\n pagerList.push(React.createElement(Pager, {\n locale: props.locale,\n rootPrefixCls: prefixCls,\n onClick: this.handleChange,\n onKeyPress: this.runIfEnter,\n key: _i,\n page: _i,\n active: _active,\n showTitle: props.showTitle,\n itemRender: props.itemRender\n }));\n }\n\n if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) {\n pagerList[0] = React.cloneElement(pagerList[0], {\n className: prefixCls + '-item-after-jump-prev'\n });\n pagerList.unshift(jumpPrev);\n }\n if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {\n pagerList[pagerList.length - 1] = React.cloneElement(pagerList[pagerList.length - 1], {\n className: prefixCls + '-item-before-jump-next'\n });\n pagerList.push(jumpNext);\n }\n\n if (left !== 1) {\n pagerList.unshift(firstPager);\n }\n if (right !== allPages) {\n pagerList.push(lastPager);\n }\n }\n\n var totalText = null;\n\n if (props.showTotal) {\n totalText = React.createElement(\n 'li',\n { className: prefixCls + '-total-text' },\n props.showTotal(props.total, [props.total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > props.total ? props.total : current * pageSize])\n );\n }\n var prevDisabled = !this.hasPrev() || !allPages;\n var nextDisabled = !this.hasNext() || !allPages;\n return React.createElement(\n 'ul',\n _extends({\n className: classNames(prefixCls, className, _defineProperty({}, prefixCls + '-disabled', disabled)),\n style: props.style,\n unselectable: 'unselectable',\n ref: this.savePaginationNode\n }, dataOrAriaAttributeProps),\n totalText,\n React.createElement(\n 'li',\n {\n title: props.showTitle ? locale.prev_page : null,\n onClick: this.prev,\n tabIndex: prevDisabled ? null : 0,\n onKeyPress: this.runIfEnterPrev,\n className: (!prevDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev',\n 'aria-disabled': prevDisabled\n },\n props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon))\n ),\n pagerList,\n React.createElement(\n 'li',\n {\n title: props.showTitle ? locale.next_page : null,\n onClick: this.next,\n tabIndex: nextDisabled ? null : 0,\n onKeyPress: this.runIfEnterNext,\n className: (!nextDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next',\n 'aria-disabled': nextDisabled\n },\n props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon))\n ),\n React.createElement(Options, {\n disabled: disabled,\n locale: props.locale,\n rootPrefixCls: prefixCls,\n selectComponentClass: props.selectComponentClass,\n selectPrefixCls: props.selectPrefixCls,\n changeSize: this.props.showSizeChanger ? this.changePageSize : null,\n current: this.state.current,\n pageSize: this.state.pageSize,\n pageSizeOptions: this.props.pageSizeOptions,\n quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,\n goButton: goButton\n })\n );\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(props, prevState) {\n var newState = {};\n\n if ('current' in props) {\n newState.current = props.current;\n\n if (props.current !== prevState.current) {\n newState.currentInputValue = newState.current;\n }\n }\n\n if ('pageSize' in props && props.pageSize !== prevState.pageSize) {\n var current = prevState.current;\n var newCurrent = calculatePage(props.pageSize, prevState, props);\n current = current > newCurrent ? newCurrent : current;\n\n if (!('current' in props)) {\n newState.current = current;\n newState.currentInputValue = current;\n }\n newState.pageSize = props.pageSize;\n }\n\n return newState;\n }\n\n /**\n * computed icon node that need to be rendered.\n * @param {React.ReactNode | React.ComponentType} icon received icon.\n * @returns {React.ReactNode}\n */\n\n }]);\n\n return Pagination;\n}(React.Component);\n\nPagination.propTypes = {\n disabled: PropTypes.bool,\n prefixCls: PropTypes.string,\n className: PropTypes.string,\n current: PropTypes.number,\n defaultCurrent: PropTypes.number,\n total: PropTypes.number,\n pageSize: PropTypes.number,\n defaultPageSize: PropTypes.number,\n onChange: PropTypes.func,\n hideOnSinglePage: PropTypes.bool,\n showSizeChanger: PropTypes.bool,\n showLessItems: PropTypes.bool,\n onShowSizeChange: PropTypes.func,\n selectComponentClass: PropTypes.func,\n showPrevNextJumpers: PropTypes.bool,\n showQuickJumper: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n showTitle: PropTypes.bool,\n pageSizeOptions: PropTypes.arrayOf(PropTypes.string),\n showTotal: PropTypes.func,\n locale: PropTypes.object,\n style: PropTypes.object,\n itemRender: PropTypes.func,\n prevIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n nextIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n jumpPrevIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n jumpNextIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.node])\n};\nPagination.defaultProps = {\n defaultCurrent: 1,\n total: 0,\n defaultPageSize: 10,\n onChange: noop,\n className: '',\n selectPrefixCls: 'rc-select',\n prefixCls: 'rc-pagination',\n selectComponentClass: null,\n hideOnSinglePage: false,\n showPrevNextJumpers: true,\n showQuickJumper: false,\n showSizeChanger: false,\n showLessItems: false,\n showTitle: true,\n onShowSizeChange: noop,\n locale: LOCALE,\n style: {},\n itemRender: defaultItemRender\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.getJumpPrevPage = function () {\n return Math.max(1, _this2.state.current - (_this2.props.showLessItems ? 3 : 5));\n };\n\n this.getJumpNextPage = function () {\n return Math.min(calculatePage(undefined, _this2.state, _this2.props), _this2.state.current + (_this2.props.showLessItems ? 3 : 5));\n };\n\n this.getItemIcon = function (icon) {\n var prefixCls = _this2.props.prefixCls;\n\n var iconNode = icon || React.createElement('a', { className: prefixCls + '-item-link' });\n if (typeof icon === 'function') {\n iconNode = React.createElement(icon, _extends({}, _this2.props));\n }\n return iconNode;\n };\n\n this.savePaginationNode = function (node) {\n _this2.paginationNode = node;\n };\n\n this.isValid = function (page) {\n return isInteger(page) && page !== _this2.state.current;\n };\n\n this.shouldDisplayQuickJumper = function () {\n var _props2 = _this2.props,\n showQuickJumper = _props2.showQuickJumper,\n pageSize = _props2.pageSize,\n total = _props2.total;\n\n if (total <= pageSize) {\n return false;\n }\n return showQuickJumper;\n };\n\n this.handleKeyDown = function (e) {\n if (e.keyCode === KEYCODE.ARROW_UP || e.keyCode === KEYCODE.ARROW_DOWN) {\n e.preventDefault();\n }\n };\n\n this.handleKeyUp = function (e) {\n var value = _this2.getValidValue(e);\n var currentInputValue = _this2.state.currentInputValue;\n\n if (value !== currentInputValue) {\n _this2.setState({\n currentInputValue: value\n });\n }\n if (e.keyCode === KEYCODE.ENTER) {\n _this2.handleChange(value);\n } else if (e.keyCode === KEYCODE.ARROW_UP) {\n _this2.handleChange(value - 1);\n } else if (e.keyCode === KEYCODE.ARROW_DOWN) {\n _this2.handleChange(value + 1);\n }\n };\n\n this.changePageSize = function (size) {\n var current = _this2.state.current;\n var newCurrent = calculatePage(size, _this2.state, _this2.props);\n current = current > newCurrent ? newCurrent : current;\n // fix the issue:\n // Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct.\n if (newCurrent === 0) {\n current = _this2.state.current;\n }\n\n if (typeof size === 'number') {\n if (!('pageSize' in _this2.props)) {\n _this2.setState({\n pageSize: size\n });\n }\n if (!('current' in _this2.props)) {\n _this2.setState({\n current: current,\n currentInputValue: current\n });\n }\n }\n _this2.props.onShowSizeChange(current, size);\n };\n\n this.handleChange = function (p) {\n var disabled = _this2.props.disabled;\n\n\n var page = p;\n if (_this2.isValid(page) && !disabled) {\n var currentPage = calculatePage(undefined, _this2.state, _this2.props);\n if (page > currentPage) {\n page = currentPage;\n } else if (page < 1) {\n page = 1;\n }\n\n if (!('current' in _this2.props)) {\n _this2.setState({\n current: page,\n currentInputValue: page\n });\n }\n\n var pageSize = _this2.state.pageSize;\n _this2.props.onChange(page, pageSize);\n\n return page;\n }\n\n return _this2.state.current;\n };\n\n this.prev = function () {\n if (_this2.hasPrev()) {\n _this2.handleChange(_this2.state.current - 1);\n }\n };\n\n this.next = function () {\n if (_this2.hasNext()) {\n _this2.handleChange(_this2.state.current + 1);\n }\n };\n\n this.jumpPrev = function () {\n _this2.handleChange(_this2.getJumpPrevPage());\n };\n\n this.jumpNext = function () {\n _this2.handleChange(_this2.getJumpNextPage());\n };\n\n this.hasPrev = function () {\n return _this2.state.current > 1;\n };\n\n this.hasNext = function () {\n return _this2.state.current < calculatePage(undefined, _this2.state, _this2.props);\n };\n\n this.runIfEnter = function (event, callback) {\n for (var _len = arguments.length, restParams = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n restParams[_key - 2] = arguments[_key];\n }\n\n if (event.key === 'Enter' || event.charCode === 13) {\n callback.apply(undefined, restParams);\n }\n };\n\n this.runIfEnterPrev = function (e) {\n _this2.runIfEnter(e, _this2.prev);\n };\n\n this.runIfEnterNext = function (e) {\n _this2.runIfEnter(e, _this2.next);\n };\n\n this.runIfEnterJumpPrev = function (e) {\n _this2.runIfEnter(e, _this2.jumpPrev);\n };\n\n this.runIfEnterJumpNext = function (e) {\n _this2.runIfEnter(e, _this2.jumpNext);\n };\n\n this.handleGoTO = function (e) {\n if (e.keyCode === KEYCODE.ENTER || e.type === 'click') {\n _this2.handleChange(_this2.state.currentInputValue);\n }\n };\n};\n\npolyfill(Pagination);\n\nexport default Pagination;","export default {\n // Options.jsx\n items_per_page: '条/页',\n jump_to: '跳至',\n jump_to_confirm: '确定',\n page: '页',\n\n // Pagination.jsx\n prev_page: '上一页',\n next_page: '下一页',\n prev_5: '向前 5 页',\n next_5: '向后 5 页',\n prev_3: '向前 3 页',\n next_3: '向后 3 页'\n};","import * as React from 'react';\nimport Select from '../select';\nexport default class MiniSelect extends React.Component {\n render() {\n return ;\n }\n}\nMiniSelect.Option = Select.Option;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport RcPagination from 'rc-pagination';\nimport enUS from 'rc-pagination/lib/locale/en_US';\nimport classNames from 'classnames';\nimport MiniSelect from './MiniSelect';\nimport Icon from '../icon';\nimport Select from '../select';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport { ConfigConsumer } from '../config-provider';\nexport default class Pagination extends React.Component {\n constructor() {\n super(...arguments);\n this.getIconsProps = (prefixCls) => {\n const prevIcon = (\n \n );\n const nextIcon = (\n \n );\n const jumpPrevIcon = (\n \n \n \n •••\n
\n );\n const jumpNextIcon = (\n \n \n \n •••\n
\n );\n return {\n prevIcon,\n nextIcon,\n jumpPrevIcon,\n jumpNextIcon,\n };\n };\n this.renderPagination = (contextLocale) => {\n const _a = this.props, { prefixCls: customizePrefixCls, selectPrefixCls: customizeSelectPrefixCls, className, size, locale: customLocale } = _a, restProps = __rest(_a, [\"prefixCls\", \"selectPrefixCls\", \"className\", \"size\", \"locale\"]);\n const locale = Object.assign(Object.assign({}, contextLocale), customLocale);\n const isSmall = size === 'small';\n return (\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('pagination', customizePrefixCls);\n const selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);\n return ();\n }}\n );\n };\n }\n render() {\n return (\n {this.renderPagination}\n );\n }\n}\n","import Pagination from './Pagination';\nexport default Pagination;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable prefer-spread */\nimport * as React from 'react';\nimport omit from 'omit.js';\nimport RcTable, { INTERNAL_COL_DEFINE } from 'rc-table';\nimport * as PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport shallowEqual from 'shallowequal';\nimport { polyfill } from 'react-lifecycles-compat';\nimport FilterDropdown from './filterDropdown';\nimport createStore from './createStore';\nimport SelectionBox from './SelectionBox';\nimport SelectionCheckboxAll from './SelectionCheckboxAll';\nimport Column from './Column';\nimport ColumnGroup from './ColumnGroup';\nimport createBodyRow from './createBodyRow';\nimport { flatArray, treeMap, flatFilter, normalizeColumns } from './util';\nimport scrollTo from '../_util/scrollTo';\nimport Pagination from '../pagination';\nimport Icon from '../icon';\nimport Spin from '../spin';\nimport TransButton from '../_util/transButton';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport defaultLocale from '../locale/default';\nimport { ConfigConsumer } from '../config-provider';\nimport warning from '../_util/warning';\nfunction noop() { }\nfunction stopPropagation(e) {\n e.stopPropagation();\n}\nfunction getRowSelection(props) {\n return props.rowSelection || {};\n}\nfunction getColumnKey(column, index) {\n return column.key || column.dataIndex || index;\n}\nfunction isSameColumn(a, b) {\n if (a && b && a.key && a.key === b.key) {\n return true;\n }\n return (a === b ||\n shallowEqual(a, b, (value, other) => {\n // https://github.com/ant-design/ant-design/issues/12737\n if (typeof value === 'function' && typeof other === 'function') {\n return value === other || value.toString() === other.toString();\n }\n // https://github.com/ant-design/ant-design/issues/19398\n if (Array.isArray(value) && Array.isArray(other)) {\n return value === other || shallowEqual(value, other);\n }\n }));\n}\nconst defaultPagination = {\n onChange: noop,\n onShowSizeChange: noop,\n};\n/**\n * Avoid creating new object, so that parent component's shouldComponentUpdate\n * can works appropriately。\n */\nconst emptyObject = {};\nconst createComponents = (components = {}) => {\n const bodyRow = components && components.body && components.body.row;\n return Object.assign(Object.assign({}, components), { body: Object.assign(Object.assign({}, components.body), { row: createBodyRow(bodyRow) }) });\n};\nfunction isTheSameComponents(components1 = {}, components2 = {}) {\n return (components1 === components2 ||\n ['table', 'header', 'body'].every((key) => shallowEqual(components1[key], components2[key])));\n}\nfunction getFilteredValueColumns(state, columns) {\n return flatFilter(columns || (state || {}).columns || [], (column) => typeof column.filteredValue !== 'undefined');\n}\nfunction getFiltersFromColumns(state = {}, columns) {\n const filters = {};\n getFilteredValueColumns(state, columns).forEach((col) => {\n const colKey = getColumnKey(col);\n filters[colKey] = col.filteredValue;\n });\n return filters;\n}\nfunction isFiltersChanged(state, filters) {\n if (Object.keys(filters).length !== Object.keys(state.filters).length) {\n return true;\n }\n return Object.keys(filters).some(columnKey => filters[columnKey] !== state.filters[columnKey]);\n}\nclass Table extends React.Component {\n constructor(props) {\n super(props);\n this.setTableRef = (table) => {\n this.rcTable = table;\n };\n this.getCheckboxPropsByItem = (item, index) => {\n const rowSelection = getRowSelection(this.props);\n if (!rowSelection.getCheckboxProps) {\n return {};\n }\n const key = this.getRecordKey(item, index);\n // Cache checkboxProps\n if (!this.props.checkboxPropsCache[key]) {\n this.props.checkboxPropsCache[key] = rowSelection.getCheckboxProps(item) || {};\n const checkboxProps = this.props.checkboxPropsCache[key];\n warning(!('checked' in checkboxProps) && !('defaultChecked' in checkboxProps), 'Table', 'Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.');\n }\n return this.props.checkboxPropsCache[key];\n };\n this.getRecordKey = (record, index) => {\n const { rowKey } = this.props;\n const recordKey = typeof rowKey === 'function' ? rowKey(record, index) : record[rowKey];\n warning(recordKey !== undefined, 'Table', 'Each record in dataSource of table should have a unique `key` prop, ' +\n 'or set `rowKey` of Table to an unique primary key, ' +\n 'see https://u.ant.design/table-row-key');\n return recordKey === undefined ? index : recordKey;\n };\n this.onRow = (prefixCls, record, index) => {\n const { onRow } = this.props;\n const custom = onRow ? onRow(record, index) : {};\n return Object.assign(Object.assign({}, custom), { prefixCls, store: this.props.store, rowKey: this.getRecordKey(record, index) });\n };\n this.generatePopupContainerFunc = (getPopupContainer) => {\n const { scroll } = this.props;\n const table = this.rcTable;\n if (getPopupContainer) {\n return getPopupContainer;\n }\n // Use undefined to let rc component use default logic.\n return scroll && table ? () => table.tableNode : undefined;\n };\n this.scrollToFirstRow = () => {\n const { scroll } = this.props;\n if (scroll && scroll.scrollToFirstRowOnChange !== false) {\n scrollTo(0, {\n getContainer: () => this.rcTable.bodyTable,\n });\n }\n };\n this.handleFilter = (column, nextFilters) => {\n const props = this.props;\n const pagination = Object.assign({}, this.state.pagination);\n const filters = Object.assign(Object.assign({}, this.state.filters), { [getColumnKey(column)]: nextFilters });\n // Remove filters not in current columns\n const currentColumnKeys = [];\n treeMap(this.state.columns, c => {\n if (!c.children) {\n currentColumnKeys.push(getColumnKey(c));\n }\n });\n Object.keys(filters).forEach(columnKey => {\n if (currentColumnKeys.indexOf(columnKey) < 0) {\n delete filters[columnKey];\n }\n });\n if (props.pagination) {\n // Reset current prop\n pagination.current = 1;\n pagination.onChange(pagination.current);\n }\n const newState = {\n pagination,\n filters: {},\n };\n const filtersToSetState = Object.assign({}, filters);\n // Remove filters which is controlled\n getFilteredValueColumns(this.state).forEach((col) => {\n const columnKey = getColumnKey(col);\n if (columnKey) {\n delete filtersToSetState[columnKey];\n }\n });\n if (Object.keys(filtersToSetState).length > 0) {\n newState.filters = filtersToSetState;\n }\n // Controlled current prop will not respond user interaction\n if (typeof props.pagination === 'object' && 'current' in props.pagination) {\n newState.pagination = Object.assign(Object.assign({}, pagination), { current: this.state.pagination.current });\n }\n this.setState(newState, () => {\n this.scrollToFirstRow();\n this.props.store.setState({\n selectionDirty: false,\n });\n const { onChange } = this.props;\n if (onChange) {\n onChange.apply(null, this.prepareParamsArguments(Object.assign(Object.assign({}, this.state), { selectionDirty: false, filters,\n pagination })));\n }\n });\n };\n this.handleSelect = (record, rowIndex, e) => {\n const checked = e.target.checked;\n const nativeEvent = e.nativeEvent;\n const defaultSelection = this.props.store.getState().selectionDirty\n ? []\n : this.getDefaultSelection();\n let selectedRowKeys = this.props.store.getState().selectedRowKeys.concat(defaultSelection);\n const key = this.getRecordKey(record, rowIndex);\n const { pivot } = this.state;\n const rows = this.getFlatCurrentPageData();\n let realIndex = rowIndex;\n if (this.props.expandedRowRender) {\n realIndex = rows.findIndex(row => this.getRecordKey(row, rowIndex) === key);\n }\n if (nativeEvent.shiftKey && pivot !== undefined && realIndex !== pivot) {\n const changeRowKeys = [];\n const direction = Math.sign(pivot - realIndex);\n const dist = Math.abs(pivot - realIndex);\n let step = 0;\n while (step <= dist) {\n const i = realIndex + step * direction;\n step += 1;\n const row = rows[i];\n const rowKey = this.getRecordKey(row, i);\n const checkboxProps = this.getCheckboxPropsByItem(row, i);\n if (!checkboxProps.disabled) {\n if (selectedRowKeys.includes(rowKey)) {\n if (!checked) {\n selectedRowKeys = selectedRowKeys.filter((j) => rowKey !== j);\n changeRowKeys.push(rowKey);\n }\n }\n else if (checked) {\n selectedRowKeys.push(rowKey);\n changeRowKeys.push(rowKey);\n }\n }\n }\n this.setState({ pivot: realIndex });\n this.props.store.setState({\n selectionDirty: true,\n });\n this.setSelectedRowKeys(selectedRowKeys, {\n selectWay: 'onSelectMultiple',\n record,\n checked,\n changeRowKeys,\n nativeEvent,\n });\n }\n else {\n if (checked) {\n selectedRowKeys.push(this.getRecordKey(record, realIndex));\n }\n else {\n selectedRowKeys = selectedRowKeys.filter((i) => key !== i);\n }\n this.setState({ pivot: realIndex });\n this.props.store.setState({\n selectionDirty: true,\n });\n this.setSelectedRowKeys(selectedRowKeys, {\n selectWay: 'onSelect',\n record,\n checked,\n changeRowKeys: undefined,\n nativeEvent,\n });\n }\n };\n this.handleRadioSelect = (record, rowIndex, e) => {\n const checked = e.target.checked;\n const nativeEvent = e.nativeEvent;\n const key = this.getRecordKey(record, rowIndex);\n const selectedRowKeys = [key];\n this.props.store.setState({\n selectionDirty: true,\n });\n this.setSelectedRowKeys(selectedRowKeys, {\n selectWay: 'onSelect',\n record,\n checked,\n changeRowKeys: undefined,\n nativeEvent,\n });\n };\n this.handleSelectRow = (selectionKey, index, onSelectFunc) => {\n const data = this.getFlatCurrentPageData();\n const defaultSelection = this.props.store.getState().selectionDirty\n ? []\n : this.getDefaultSelection();\n const selectedRowKeys = this.props.store.getState().selectedRowKeys.concat(defaultSelection);\n const changeableRowKeys = data\n .filter((item, i) => !this.getCheckboxPropsByItem(item, i).disabled)\n .map((item, i) => this.getRecordKey(item, i));\n const changeRowKeys = [];\n let selectWay = 'onSelectAll';\n let checked;\n // handle default selection\n switch (selectionKey) {\n case 'all':\n changeableRowKeys.forEach(key => {\n if (selectedRowKeys.indexOf(key) < 0) {\n selectedRowKeys.push(key);\n changeRowKeys.push(key);\n }\n });\n selectWay = 'onSelectAll';\n checked = true;\n break;\n case 'removeAll':\n changeableRowKeys.forEach(key => {\n if (selectedRowKeys.indexOf(key) >= 0) {\n selectedRowKeys.splice(selectedRowKeys.indexOf(key), 1);\n changeRowKeys.push(key);\n }\n });\n selectWay = 'onSelectAll';\n checked = false;\n break;\n case 'invert':\n changeableRowKeys.forEach(key => {\n if (selectedRowKeys.indexOf(key) < 0) {\n selectedRowKeys.push(key);\n }\n else {\n selectedRowKeys.splice(selectedRowKeys.indexOf(key), 1);\n }\n changeRowKeys.push(key);\n selectWay = 'onSelectInvert';\n });\n break;\n default:\n break;\n }\n this.props.store.setState({\n selectionDirty: true,\n });\n // when select custom selection, callback selections[n].onSelect\n const { rowSelection } = this.props;\n let customSelectionStartIndex = 2;\n if (rowSelection && rowSelection.hideDefaultSelections) {\n customSelectionStartIndex = 0;\n }\n if (index >= customSelectionStartIndex && typeof onSelectFunc === 'function') {\n return onSelectFunc(changeableRowKeys);\n }\n this.setSelectedRowKeys(selectedRowKeys, {\n selectWay,\n checked,\n changeRowKeys,\n });\n };\n this.handlePageChange = (current, ...otherArguments) => {\n const props = this.props;\n const pagination = Object.assign({}, this.state.pagination);\n if (current) {\n pagination.current = current;\n }\n else {\n pagination.current = pagination.current || 1;\n }\n pagination.onChange(pagination.current, ...otherArguments);\n const newState = {\n pagination,\n };\n // Controlled current prop will not respond user interaction\n if (props.pagination && typeof props.pagination === 'object' && 'current' in props.pagination) {\n newState.pagination = Object.assign(Object.assign({}, pagination), { current: this.state.pagination.current });\n }\n this.setState(newState, this.scrollToFirstRow);\n this.props.store.setState({\n selectionDirty: false,\n });\n const { onChange } = this.props;\n if (onChange) {\n onChange.apply(null, this.prepareParamsArguments(Object.assign(Object.assign({}, this.state), { selectionDirty: false, pagination })));\n }\n };\n this.handleShowSizeChange = (current, pageSize) => {\n const { pagination } = this.state;\n pagination.onShowSizeChange(current, pageSize);\n const nextPagination = Object.assign(Object.assign({}, pagination), { pageSize,\n current });\n this.setState({ pagination: nextPagination }, this.scrollToFirstRow);\n const { onChange } = this.props;\n if (onChange) {\n onChange.apply(null, this.prepareParamsArguments(Object.assign(Object.assign({}, this.state), { pagination: nextPagination })));\n }\n };\n this.renderExpandIcon = (prefixCls) => ({ expandable, expanded, needIndentSpaced, record, onExpand, }) => {\n if (expandable) {\n return (\n {(locale) => ( {\n onExpand(record, event);\n }} aria-label={expanded ? locale.collapse : locale.expand} noStyle/>)}\n );\n }\n if (needIndentSpaced) {\n return ;\n }\n return null;\n };\n this.renderSelectionBox = (type) => {\n return (_, record, index) => {\n const rowKey = this.getRecordKey(record, index);\n const props = this.getCheckboxPropsByItem(record, index);\n const handleChange = (e) => type === 'radio'\n ? this.handleRadioSelect(record, index, e)\n : this.handleSelect(record, index, e);\n return (\n \n );\n };\n };\n this.renderTable = ({ prefixCls, renderEmpty, dropdownPrefixCls, contextLocale, getPopupContainer: contextGetPopupContainer, }) => {\n const _a = this.props, { showHeader, locale, getPopupContainer } = _a, restTableProps = __rest(_a, [\"showHeader\", \"locale\", \"getPopupContainer\"]);\n // do not pass prop.style to rc-table, since already apply it to container div\n const restProps = omit(restTableProps, ['style']);\n const data = this.getCurrentPageData();\n const expandIconAsCell = this.props.expandedRowRender && this.props.expandIconAsCell !== false;\n // use props.getPopupContainer first\n const realGetPopupContainer = getPopupContainer || contextGetPopupContainer;\n // Merge too locales\n const mergedLocale = Object.assign(Object.assign({}, contextLocale), locale);\n if (!locale || !locale.emptyText) {\n mergedLocale.emptyText = renderEmpty('Table');\n }\n const classString = classNames(`${prefixCls}-${this.props.size}`, {\n [`${prefixCls}-bordered`]: this.props.bordered,\n [`${prefixCls}-empty`]: !data.length,\n [`${prefixCls}-without-column-header`]: !showHeader,\n });\n const columnsWithRowSelection = this.renderRowSelection({\n prefixCls,\n locale: mergedLocale,\n getPopupContainer: realGetPopupContainer,\n });\n const columns = this.renderColumnsDropdown({\n columns: columnsWithRowSelection,\n prefixCls,\n dropdownPrefixCls,\n locale: mergedLocale,\n getPopupContainer: realGetPopupContainer,\n }).map((column, i) => {\n const newColumn = Object.assign({}, column);\n newColumn.key = getColumnKey(newColumn, i);\n return newColumn;\n });\n let expandIconColumnIndex = columns[0] && columns[0].key === 'selection-column' ? 1 : 0;\n if ('expandIconColumnIndex' in restProps) {\n expandIconColumnIndex = restProps.expandIconColumnIndex;\n }\n return ( this.onRow(prefixCls, record, index)} components={this.state.components} prefixCls={prefixCls} data={data} columns={columns} showHeader={showHeader} className={classString} expandIconColumnIndex={expandIconColumnIndex} expandIconAsCell={expandIconAsCell} emptyText={mergedLocale.emptyText}/>);\n };\n this.renderComponent = ({ getPrefixCls, renderEmpty, getPopupContainer }) => {\n const { prefixCls: customizePrefixCls, dropdownPrefixCls: customizeDropdownPrefixCls, style, className, } = this.props;\n const data = this.getCurrentPageData();\n let loading = this.props.loading;\n if (typeof loading === 'boolean') {\n loading = {\n spinning: loading,\n };\n }\n const prefixCls = getPrefixCls('table', customizePrefixCls);\n const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);\n const table = (\n {locale => this.renderTable({\n prefixCls,\n renderEmpty,\n dropdownPrefixCls,\n contextLocale: locale,\n getPopupContainer,\n })}\n );\n // if there is no pagination or no data,\n // the height of spin should decrease by half of pagination\n const paginationPatchClass = this.hasPagination() && data && data.length !== 0\n ? `${prefixCls}-with-pagination`\n : `${prefixCls}-without-pagination`;\n return (\n \n {this.renderPagination(prefixCls, 'top')}\n {table}\n {this.renderPagination(prefixCls, 'bottom')}\n \n
);\n };\n const { expandedRowRender, columns: columnsProp } = props;\n warning(!('columnsPageRange' in props || 'columnsPageSize' in props), 'Table', '`columnsPageRange` and `columnsPageSize` are removed, please use ' +\n 'fixed columns instead, see: https://u.ant.design/fixed-columns.');\n if (expandedRowRender && (columnsProp || []).some(({ fixed }) => !!fixed)) {\n warning(false, 'Table', '`expandedRowRender` and `Column.fixed` are not compatible. Please use one of them at one time.');\n }\n const columns = columnsProp || normalizeColumns(props.children);\n this.state = Object.assign(Object.assign({}, this.getDefaultSortOrder(columns || [])), { \n // 减少状态\n filters: this.getDefaultFilters(columns), pagination: this.getDefaultPagination(props), pivot: undefined, prevProps: props, components: createComponents(props.components), columns });\n }\n static getDerivedStateFromProps(nextProps, prevState) {\n const { prevProps } = prevState;\n const columns = nextProps.columns || normalizeColumns(nextProps.children);\n let nextState = Object.assign(Object.assign({}, prevState), { prevProps: nextProps, columns });\n if ('pagination' in nextProps || 'pagination' in prevProps) {\n const newPagination = Object.assign(Object.assign(Object.assign({}, defaultPagination), prevState.pagination), nextProps.pagination);\n newPagination.current = newPagination.current || 1;\n newPagination.pageSize = newPagination.pageSize || 10;\n nextState = Object.assign(Object.assign({}, nextState), { pagination: nextProps.pagination !== false ? newPagination : emptyObject });\n }\n if (nextProps.rowSelection && 'selectedRowKeys' in nextProps.rowSelection) {\n nextProps.store.setState({\n selectedRowKeys: nextProps.rowSelection.selectedRowKeys || [],\n });\n }\n else if (prevProps.rowSelection && !nextProps.rowSelection) {\n nextProps.store.setState({\n selectedRowKeys: [],\n });\n }\n if ('dataSource' in nextProps && nextProps.dataSource !== prevProps.dataSource) {\n nextProps.store.setState({\n selectionDirty: false,\n });\n }\n // https://github.com/ant-design/ant-design/issues/10133\n nextProps.setCheckboxPropsCache({});\n // Update filters\n const filteredValueColumns = getFilteredValueColumns(nextState, nextState.columns);\n if (filteredValueColumns.length > 0) {\n const filtersFromColumns = getFiltersFromColumns(nextState, nextState.columns);\n const newFilters = Object.assign({}, nextState.filters);\n Object.keys(filtersFromColumns).forEach(key => {\n newFilters[key] = filtersFromColumns[key];\n });\n if (isFiltersChanged(nextState, newFilters)) {\n nextState = Object.assign(Object.assign({}, nextState), { filters: newFilters });\n }\n }\n if (!isTheSameComponents(nextProps.components, prevProps.components)) {\n const components = createComponents(nextProps.components);\n nextState = Object.assign(Object.assign({}, nextState), { components });\n }\n return nextState;\n }\n componentDidUpdate() {\n const { columns, sortColumn, sortOrder } = this.state;\n if (this.getSortOrderColumns(columns).length > 0) {\n const sortState = this.getSortStateFromColumns(columns);\n if (!isSameColumn(sortState.sortColumn, sortColumn) || sortState.sortOrder !== sortOrder) {\n this.setState(sortState);\n }\n }\n }\n getDefaultSelection() {\n const rowSelection = getRowSelection(this.props);\n if (!rowSelection.getCheckboxProps) {\n return [];\n }\n return this.getFlatData()\n .filter((item, rowIndex) => this.getCheckboxPropsByItem(item, rowIndex).defaultChecked)\n .map((record, rowIndex) => this.getRecordKey(record, rowIndex));\n }\n getDefaultPagination(props) {\n const pagination = typeof props.pagination === 'object' ? props.pagination : {};\n let current;\n if ('current' in pagination) {\n current = pagination.current;\n }\n else if ('defaultCurrent' in pagination) {\n current = pagination.defaultCurrent;\n }\n let pageSize;\n if ('pageSize' in pagination) {\n pageSize = pagination.pageSize;\n }\n else if ('defaultPageSize' in pagination) {\n pageSize = pagination.defaultPageSize;\n }\n return this.hasPagination(props)\n ? Object.assign(Object.assign(Object.assign({}, defaultPagination), pagination), { current: current || 1, pageSize: pageSize || 10 }) : {};\n }\n getSortOrderColumns(columns) {\n return flatFilter(columns || (this.state || {}).columns || [], (column) => 'sortOrder' in column);\n }\n getDefaultFilters(columns) {\n const definedFilters = getFiltersFromColumns(this.state, columns);\n const defaultFilteredValueColumns = flatFilter(columns || [], (column) => typeof column.defaultFilteredValue !== 'undefined');\n const defaultFilters = defaultFilteredValueColumns.reduce((soFar, col) => {\n const colKey = getColumnKey(col);\n soFar[colKey] = col.defaultFilteredValue;\n return soFar;\n }, {});\n return Object.assign(Object.assign({}, defaultFilters), definedFilters);\n }\n getDefaultSortOrder(columns) {\n const definedSortState = this.getSortStateFromColumns(columns);\n const defaultSortedColumn = flatFilter(columns || [], (column) => {\n return column.defaultSortOrder != null;\n })[0];\n if (defaultSortedColumn && !definedSortState.sortColumn) {\n return {\n sortColumn: defaultSortedColumn,\n sortOrder: defaultSortedColumn.defaultSortOrder,\n };\n }\n return definedSortState;\n }\n getSortStateFromColumns(columns) {\n // return first column which sortOrder is not falsy\n const sortedColumn = this.getSortOrderColumns(columns).filter((col) => col.sortOrder)[0];\n if (sortedColumn) {\n return {\n sortColumn: sortedColumn,\n sortOrder: sortedColumn.sortOrder,\n };\n }\n return {\n sortColumn: null,\n sortOrder: null,\n };\n }\n getMaxCurrent(total) {\n const { pagination: { current, pageSize }, } = this.state;\n if ((current - 1) * pageSize >= total) {\n return Math.floor((total - 1) / pageSize) + 1;\n }\n return current;\n }\n getSorterFn(state) {\n const { sortOrder, sortColumn } = state || this.state;\n if (!sortOrder || !sortColumn || typeof sortColumn.sorter !== 'function') {\n return;\n }\n return (a, b) => {\n const result = sortColumn.sorter(a, b, sortOrder);\n if (result !== 0) {\n return sortOrder === 'descend' ? -result : result;\n }\n return 0;\n };\n }\n getCurrentPageData() {\n let data = this.getLocalData();\n let current;\n let pageSize;\n const state = this.state;\n // 如果没有分页的话,默认全部展示\n if (!this.hasPagination()) {\n pageSize = Number.MAX_VALUE;\n current = 1;\n }\n else {\n pageSize = state.pagination.pageSize;\n current = this.getMaxCurrent(state.pagination.total || data.length);\n }\n // 分页\n // ---\n // 当数据量少于等于每页数量时,直接设置数据\n // 否则进行读取分页数据\n if (data.length > pageSize || pageSize === Number.MAX_VALUE) {\n data = data.slice((current - 1) * pageSize, current * pageSize);\n }\n return data;\n }\n getFlatData() {\n const { childrenColumnName } = this.props;\n return flatArray(this.getLocalData(null, false), childrenColumnName);\n }\n getFlatCurrentPageData() {\n const { childrenColumnName } = this.props;\n return flatArray(this.getCurrentPageData(), childrenColumnName);\n }\n getLocalData(state, filter = true) {\n const currentState = state || this.state;\n const { dataSource } = this.props;\n let data = dataSource || [];\n // 优化本地排序\n data = data.slice(0);\n const sorterFn = this.getSorterFn(currentState);\n if (sorterFn) {\n data = this.recursiveSort(data, sorterFn);\n }\n // 筛选\n if (filter && currentState.filters) {\n Object.keys(currentState.filters).forEach(columnKey => {\n const col = this.findColumn(columnKey);\n if (!col) {\n return;\n }\n const values = currentState.filters[columnKey] || [];\n if (values.length === 0) {\n return;\n }\n const onFilter = col.onFilter;\n data = onFilter\n ? data.filter(record => {\n return values.some(v => onFilter(v, record));\n })\n : data;\n });\n }\n return data;\n }\n setSelectedRowKeys(selectedRowKeys, selectionInfo) {\n const { selectWay, record, checked, changeRowKeys, nativeEvent } = selectionInfo;\n const rowSelection = getRowSelection(this.props);\n if (rowSelection && !('selectedRowKeys' in rowSelection)) {\n this.props.store.setState({ selectedRowKeys });\n }\n const data = this.getFlatData();\n if (!rowSelection.onChange && !rowSelection[selectWay]) {\n return;\n }\n const selectedRows = data.filter((row, i) => selectedRowKeys.indexOf(this.getRecordKey(row, i)) >= 0);\n if (rowSelection.onChange) {\n rowSelection.onChange(selectedRowKeys, selectedRows);\n }\n if (selectWay === 'onSelect' && rowSelection.onSelect) {\n rowSelection.onSelect(record, checked, selectedRows, nativeEvent);\n }\n else if (selectWay === 'onSelectMultiple' && rowSelection.onSelectMultiple) {\n const changeRows = data.filter((row, i) => changeRowKeys.indexOf(this.getRecordKey(row, i)) >= 0);\n rowSelection.onSelectMultiple(checked, selectedRows, changeRows);\n }\n else if (selectWay === 'onSelectAll' && rowSelection.onSelectAll) {\n const changeRows = data.filter((row, i) => changeRowKeys.indexOf(this.getRecordKey(row, i)) >= 0);\n rowSelection.onSelectAll(checked, selectedRows, changeRows);\n }\n else if (selectWay === 'onSelectInvert' && rowSelection.onSelectInvert) {\n rowSelection.onSelectInvert(selectedRowKeys);\n }\n }\n toggleSortOrder(column) {\n const pagination = Object.assign({}, this.state.pagination);\n const sortDirections = column.sortDirections || this.props.sortDirections;\n const { sortOrder, sortColumn } = this.state;\n // 只同时允许一列进行排序,否则会导致排序顺序的逻辑问题\n let newSortOrder;\n // 切换另一列时,丢弃 sortOrder 的状态\n if (isSameColumn(sortColumn, column) && sortOrder !== undefined) {\n // 按照sortDirections的内容依次切换排序状态\n const methodIndex = sortDirections.indexOf(sortOrder) + 1;\n newSortOrder =\n methodIndex === sortDirections.length ? undefined : sortDirections[methodIndex];\n }\n else {\n newSortOrder = sortDirections[0];\n }\n if (this.props.pagination) {\n // Reset current prop\n pagination.current = 1;\n pagination.onChange(pagination.current);\n }\n const newState = {\n pagination,\n sortOrder: newSortOrder,\n sortColumn: newSortOrder ? column : null,\n };\n // Controlled\n if (this.getSortOrderColumns().length === 0) {\n this.setState(newState, this.scrollToFirstRow);\n }\n const { onChange } = this.props;\n if (onChange) {\n onChange.apply(null, this.prepareParamsArguments(Object.assign(Object.assign({}, this.state), newState), column));\n }\n }\n hasPagination(props) {\n return (props || this.props).pagination !== false;\n }\n isSortColumn(column) {\n const { sortColumn } = this.state;\n if (!column || !sortColumn) {\n return false;\n }\n return getColumnKey(sortColumn) === getColumnKey(column);\n }\n // Get pagination, filters, sorter\n prepareParamsArguments(state, column) {\n const pagination = Object.assign({}, state.pagination);\n // remove useless handle function in Table.onChange\n delete pagination.onChange;\n delete pagination.onShowSizeChange;\n const filters = state.filters;\n const sorter = {};\n let currentColumn = column;\n if (state.sortColumn && state.sortOrder) {\n currentColumn = state.sortColumn;\n sorter.column = state.sortColumn;\n sorter.order = state.sortOrder;\n }\n if (currentColumn) {\n sorter.field = currentColumn.dataIndex;\n sorter.columnKey = getColumnKey(currentColumn);\n }\n const extra = {\n currentDataSource: this.getLocalData(state),\n };\n return [pagination, filters, sorter, extra];\n }\n findColumn(myKey) {\n let column;\n treeMap(this.state.columns, c => {\n if (getColumnKey(c) === myKey) {\n column = c;\n }\n });\n return column;\n }\n recursiveSort(data, sorterFn) {\n const { childrenColumnName = 'children' } = this.props;\n return data.sort(sorterFn).map((item) => item[childrenColumnName]\n ? Object.assign(Object.assign({}, item), { [childrenColumnName]: this.recursiveSort(item[childrenColumnName], sorterFn) }) : item);\n }\n renderPagination(prefixCls, paginationPosition) {\n // 强制不需要分页\n if (!this.hasPagination()) {\n return null;\n }\n let size = 'default';\n const { pagination } = this.state;\n if (pagination.size) {\n size = pagination.size;\n }\n else if (this.props.size === 'middle' || this.props.size === 'small') {\n size = 'small';\n }\n const position = pagination.position || 'bottom';\n const total = pagination.total || this.getLocalData().length;\n return total > 0 && (position === paginationPosition || position === 'both') ? () : null;\n }\n renderRowSelection({ prefixCls, locale, getPopupContainer, }) {\n const { rowSelection } = this.props;\n const columns = this.state.columns.concat();\n if (rowSelection) {\n const data = this.getFlatCurrentPageData().filter((item, index) => {\n if (rowSelection.getCheckboxProps) {\n return !this.getCheckboxPropsByItem(item, index).disabled;\n }\n return true;\n });\n const selectionColumnClass = classNames(`${prefixCls}-selection-column`, {\n [`${prefixCls}-selection-column-custom`]: rowSelection.selections,\n });\n const selectionColumn = {\n key: 'selection-column',\n render: this.renderSelectionBox(rowSelection.type),\n className: selectionColumnClass,\n fixed: rowSelection.fixed,\n width: rowSelection.columnWidth,\n title: rowSelection.columnTitle,\n [INTERNAL_COL_DEFINE]: {\n className: `${prefixCls}-selection-col`,\n },\n };\n if (rowSelection.type !== 'radio') {\n const checkboxAllDisabled = data.every((item, index) => this.getCheckboxPropsByItem(item, index).disabled);\n selectionColumn.title = selectionColumn.title || ();\n }\n if ('fixed' in rowSelection) {\n selectionColumn.fixed = rowSelection.fixed;\n }\n else if (columns.some(column => column.fixed === 'left' || column.fixed === true)) {\n selectionColumn.fixed = 'left';\n }\n if (columns[0] && columns[0].key === 'selection-column') {\n columns[0] = selectionColumn;\n }\n else {\n columns.unshift(selectionColumn);\n }\n }\n return columns;\n }\n renderColumnsDropdown({ prefixCls, dropdownPrefixCls, columns, locale, getPopupContainer, }) {\n const { sortOrder, filters } = this.state;\n return treeMap(columns, (column, i) => {\n const key = getColumnKey(column, i);\n let filterDropdown;\n let sortButton;\n let onHeaderCell = column.onHeaderCell;\n const isSortColumn = this.isSortColumn(column);\n if ((column.filters && column.filters.length > 0) || column.filterDropdown) {\n const colFilters = key in filters ? filters[key] : [];\n filterDropdown = ();\n }\n if (column.sorter) {\n const sortDirections = column.sortDirections || this.props.sortDirections;\n const isAscend = isSortColumn && sortOrder === 'ascend';\n const isDescend = isSortColumn && sortOrder === 'descend';\n const ascend = sortDirections.indexOf('ascend') !== -1 && ();\n const descend = sortDirections.indexOf('descend') !== -1 && ();\n sortButton = (\n {ascend}\n {descend}\n
);\n onHeaderCell = (col) => {\n let colProps = {};\n // Get original first\n if (column.onHeaderCell) {\n colProps = Object.assign({}, column.onHeaderCell(col));\n }\n // Add sorter logic\n const onHeaderCellClick = colProps.onClick;\n colProps.onClick = (...args) => {\n this.toggleSortOrder(column);\n if (onHeaderCellClick) {\n onHeaderCellClick(...args);\n }\n };\n return colProps;\n };\n }\n return Object.assign(Object.assign({}, column), { className: classNames(column.className, {\n [`${prefixCls}-column-has-actions`]: sortButton || filterDropdown,\n [`${prefixCls}-column-has-filters`]: filterDropdown,\n [`${prefixCls}-column-has-sorters`]: sortButton,\n [`${prefixCls}-column-sort`]: isSortColumn && sortOrder,\n }), title: [\n \n \n \n {this.renderColumnTitle(column.title)}\n \n {sortButton}\n
\n ,\n filterDropdown,\n ], onHeaderCell });\n });\n }\n renderColumnTitle(title) {\n const { filters, sortOrder, sortColumn } = this.state;\n // https://github.com/ant-design/ant-design/issues/11246#issuecomment-405009167\n if (title instanceof Function) {\n return title({\n filters,\n sortOrder,\n sortColumn,\n });\n }\n return title;\n }\n render() {\n return {this.renderComponent};\n }\n}\nTable.propTypes = {\n dataSource: PropTypes.array,\n columns: PropTypes.array,\n prefixCls: PropTypes.string,\n useFixedHeader: PropTypes.bool,\n rowSelection: PropTypes.object,\n className: PropTypes.string,\n size: PropTypes.string,\n loading: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n bordered: PropTypes.bool,\n onChange: PropTypes.func,\n locale: PropTypes.object,\n dropdownPrefixCls: PropTypes.string,\n sortDirections: PropTypes.array,\n getPopupContainer: PropTypes.func,\n};\nTable.defaultProps = {\n dataSource: [],\n useFixedHeader: false,\n className: '',\n size: 'default',\n loading: false,\n bordered: false,\n indentSize: 20,\n locale: {},\n rowKey: 'key',\n showHeader: true,\n sortDirections: ['ascend', 'descend'],\n childrenColumnName: 'children',\n};\npolyfill(Table);\nclass StoreTable extends React.Component {\n constructor(props) {\n super(props);\n this.setCheckboxPropsCache = (cache) => (this.CheckboxPropsCache = cache);\n this.CheckboxPropsCache = {};\n this.store = createStore({\n selectedRowKeys: getRowSelection(props).selectedRowKeys || [],\n selectionDirty: false,\n });\n }\n render() {\n return ();\n }\n}\nStoreTable.displayName = 'withStore(Table)';\nStoreTable.Column = Column;\nStoreTable.ColumnGroup = ColumnGroup;\nexport default StoreTable;\n","export default function createStore(initialState) {\n let state = initialState;\n const listeners = [];\n function setState(partial) {\n state = Object.assign(Object.assign({}, state), partial);\n for (let i = 0; i < listeners.length; i++) {\n listeners[i]();\n }\n }\n function getState() {\n return state;\n }\n function subscribe(listener) {\n listeners.push(listener);\n return function unsubscribe() {\n const index = listeners.indexOf(listener);\n listeners.splice(index, 1);\n };\n }\n return {\n setState,\n getState,\n subscribe,\n };\n}\n","import Table from './Table';\nexport default Table;\n","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","import React from 'react';\nexport default function toArray(children) {\n var ret = [];\n React.Children.forEach(children, function (c) {\n ret.push(c);\n });\n return ret;\n}","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @returns {function|null}\n */\nexport default function createChainedFunction() {\n var args = [].slice.call(arguments, 0);\n\n if (args.length === 1) {\n return args[0];\n }\n\n return function chainedFunction() {\n for (var i = 0; i < args.length; i++) {\n if (args[i] && args[i].apply) {\n args[i].apply(this, arguments);\n }\n }\n };\n}","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport moment from 'moment';\nimport { isAllowedDate, getTodayTime } from '../util/index';\n\nfunction noop() {}\n\nexport function getNowByCurrentStateValue(value) {\n var ret = void 0;\n if (value) {\n ret = getTodayTime(value);\n } else {\n ret = moment();\n }\n return ret;\n}\n\nexport var calendarMixinPropTypes = {\n value: PropTypes.object,\n defaultValue: PropTypes.object,\n onKeyDown: PropTypes.func\n};\n\nexport var calendarMixinDefaultProps = {\n onKeyDown: noop\n};\n\nexport var calendarMixinWrapper = function calendarMixinWrapper(ComposeComponent) {\n var _class, _temp2;\n\n return _temp2 = _class = function (_ComposeComponent) {\n _inherits(_class, _ComposeComponent);\n\n function _class() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, _class);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.onSelect = function (value, cause) {\n if (value) {\n _this.setValue(value);\n }\n _this.setSelectedValue(value, cause);\n }, _this.renderRoot = function (newProps) {\n var _className;\n\n var props = _this.props;\n var prefixCls = props.prefixCls;\n\n var className = (_className = {}, _className[prefixCls] = 1, _className[prefixCls + '-hidden'] = !props.visible, _className[props.className] = !!props.className, _className[newProps.className] = !!newProps.className, _className);\n\n return React.createElement(\n 'div',\n {\n ref: _this.saveRoot,\n className: '' + classnames(className),\n style: _this.props.style,\n tabIndex: '0',\n onKeyDown: _this.onKeyDown,\n onBlur: _this.onBlur\n },\n newProps.children\n );\n }, _this.setSelectedValue = function (selectedValue, cause) {\n // if (this.isAllowedDate(selectedValue)) {\n if (!('selectedValue' in _this.props)) {\n _this.setState({\n selectedValue: selectedValue\n });\n }\n if (_this.props.onSelect) {\n _this.props.onSelect(selectedValue, cause);\n }\n // }\n }, _this.setValue = function (value) {\n var originalValue = _this.state.value;\n if (!('value' in _this.props)) {\n _this.setState({\n value: value\n });\n }\n if (originalValue && value && !originalValue.isSame(value) || !originalValue && value || originalValue && !value) {\n _this.props.onChange(value);\n }\n }, _this.isAllowedDate = function (value) {\n var disabledDate = _this.props.disabledDate;\n var disabledTime = _this.props.disabledTime;\n return isAllowedDate(value, disabledDate, disabledTime);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _class.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n // Use origin function if provided\n if (ComposeComponent.getDerivedStateFromProps) {\n return ComposeComponent.getDerivedStateFromProps(nextProps, prevState);\n }\n\n var value = nextProps.value,\n selectedValue = nextProps.selectedValue;\n\n var newState = {};\n\n if ('value' in nextProps) {\n newState.value = value || nextProps.defaultValue || getNowByCurrentStateValue(prevState.value);\n }\n if ('selectedValue' in nextProps) {\n newState.selectedValue = selectedValue;\n }\n\n return newState;\n };\n\n return _class;\n }(ComposeComponent), _class.displayName = 'CalendarMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _temp2;\n};","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\nvar hasElementType = typeof Element !== 'undefined';\n\nfunction equal(a, b) {\n // fast-deep-equal index.js 2.0.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a)\n , arrB = isArray(b)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date\n , dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp\n , regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!hasProp.call(b, keys[i])) return false;\n // end fast-deep-equal\n\n // start react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element && b instanceof Element)\n return a === b;\n\n // custom handling for React\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of a react element\n continue;\n } else {\n // all other properties should be traversed as usual\n if (!equal(a[key], b[key])) return false;\n }\n }\n // end react-fast-compare\n\n // fast-deep-equal index.js 2.0.1\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function exportedEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","var core = module.exports = { version: '2.6.11' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","/**\n * Module dependencies.\n */\n\ntry {\n var index = require('indexof');\n} catch (err) {\n var index = require('component-indexof');\n}\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/;\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString;\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function(el){\n return new ClassList(el);\n};\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n if (!el || !el.nodeType) {\n throw new Error('A DOM element reference is required');\n }\n this.el = el;\n this.list = el.classList;\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function(name){\n // classList\n if (this.list) {\n this.list.add(name);\n return this;\n }\n\n // fallback\n var arr = this.array();\n var i = index(arr, name);\n if (!~i) arr.push(name);\n this.el.className = arr.join(' ');\n return this;\n};\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function(name){\n if ('[object RegExp]' == toString.call(name)) {\n return this.removeMatching(name);\n }\n\n // classList\n if (this.list) {\n this.list.remove(name);\n return this;\n }\n\n // fallback\n var arr = this.array();\n var i = index(arr, name);\n if (~i) arr.splice(i, 1);\n this.el.className = arr.join(' ');\n return this;\n};\n\n/**\n * Remove all classes matching `re`.\n *\n * @param {RegExp} re\n * @return {ClassList}\n * @api private\n */\n\nClassList.prototype.removeMatching = function(re){\n var arr = this.array();\n for (var i = 0; i < arr.length; i++) {\n if (re.test(arr[i])) {\n this.remove(arr[i]);\n }\n }\n return this;\n};\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function(name, force){\n // classList\n if (this.list) {\n if (\"undefined\" !== typeof force) {\n if (force !== this.list.toggle(name, force)) {\n this.list.toggle(name); // toggle again to correct\n }\n } else {\n this.list.toggle(name);\n }\n return this;\n }\n\n // fallback\n if (\"undefined\" !== typeof force) {\n if (!force) {\n this.remove(name);\n } else {\n this.add(name);\n }\n } else {\n if (this.has(name)) {\n this.remove(name);\n } else {\n this.add(name);\n }\n }\n\n return this;\n};\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function(){\n var className = this.el.getAttribute('class') || '';\n var str = className.replace(/^\\s+|\\s+$/g, '');\n var arr = str.split(re);\n if ('' === arr[0]) arr.shift();\n return arr;\n};\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has =\nClassList.prototype.contains = function(name){\n return this.list\n ? this.list.contains(name)\n : !! ~index(this.array(), name);\n};\n","import defaultLocale from '../locale/default';\nlet runtimeLocale = Object.assign({}, defaultLocale.Modal);\nexport function changeConfirmLocale(newLocale) {\n if (newLocale) {\n runtimeLocale = Object.assign(Object.assign({}, runtimeLocale), newLocale);\n }\n else {\n runtimeLocale = Object.assign({}, defaultLocale.Modal);\n }\n}\nexport function getConfirmLocale() {\n return runtimeLocale;\n}\n","import _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport { generate as generateColor } from '@ant-design/colors';\nimport * as React from 'react';\nexport function log(message) {\n if (!(process && process.env && process.env.NODE_ENV === 'production')) {\n console.error('[@ant-design/icons-react]: ' + message + '.');\n }\n}\nexport function isIconDefinition(target) {\n return typeof target === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (typeof target.icon === 'object' || typeof target.icon === 'function');\n}\nexport function normalizeAttrs() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n return Object.keys(attrs).reduce(function (acc, key) {\n var val = attrs[key];\n switch (key) {\n case 'class':\n acc.className = val;\n delete acc['class'];\n break;\n default:\n acc[key] = val;\n }\n return acc;\n }, {});\n}\nexport var MiniMap = function () {\n function MiniMap() {\n _classCallCheck(this, MiniMap);\n\n this.collection = {};\n }\n\n _createClass(MiniMap, [{\n key: 'clear',\n value: function clear() {\n this.collection = {};\n }\n }, {\n key: 'delete',\n value: function _delete(key) {\n return delete this.collection[key];\n }\n }, {\n key: 'get',\n value: function get(key) {\n return this.collection[key];\n }\n }, {\n key: 'has',\n value: function has(key) {\n return Boolean(this.collection[key]);\n }\n }, {\n key: 'set',\n value: function set(key, value) {\n this.collection[key] = value;\n return this;\n }\n }, {\n key: 'size',\n get: function get() {\n return Object.keys(this.collection).length;\n }\n }]);\n\n return MiniMap;\n}();\nexport function generate(node, key, rootProps) {\n if (!rootProps) {\n return React.createElement(node.tag, _extends({ key: key }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {\n return generate(child, key + '-' + node.tag + '-' + index);\n }));\n }\n return React.createElement(node.tag, _extends({\n key: key\n }, normalizeAttrs(node.attrs), rootProps), (node.children || []).map(function (child, index) {\n return generate(child, key + '-' + node.tag + '-' + index);\n }));\n}\nexport function getSecondaryColor(primaryColor) {\n // choose the second color\n return generateColor(primaryColor)[0];\n}\nexport function withSuffix(name, theme) {\n switch (theme) {\n case 'fill':\n return name + '-fill';\n case 'outline':\n return name + '-o';\n case 'twotone':\n return name + '-twotone';\n default:\n throw new TypeError('Unknown theme type: ' + theme + ', name: ' + name);\n }\n}","var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// ================= Transition =================\n// Event wrapper. Copy from react source code\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n prefixes['ms' + styleProp] = 'MS' + eventName;\n prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();\n\n return prefixes;\n}\n\nexport function getVendorPrefixes(domSupport, win) {\n var prefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n\n if (domSupport) {\n if (!('AnimationEvent' in win)) {\n delete prefixes.animationend.animation;\n }\n\n if (!('TransitionEvent' in win)) {\n delete prefixes.transitionend.transition;\n }\n }\n\n return prefixes;\n}\n\nvar vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {});\n\nvar style = {};\n\nif (canUseDOM) {\n style = document.createElement('div').style;\n}\n\nvar prefixedEventNames = {};\n\nexport function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n if (prefixMap) {\n var stylePropList = Object.keys(prefixMap);\n var len = stylePropList.length;\n for (var i = 0; i < len; i += 1) {\n var styleProp = stylePropList[i];\n if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {\n prefixedEventNames[eventName] = prefixMap[styleProp];\n return prefixedEventNames[eventName];\n }\n }\n }\n\n return '';\n}\n\nexport var animationEndName = getVendorPrefixedEventName('animationend');\nexport var transitionEndName = getVendorPrefixedEventName('transitionend');\nexport var supportTransition = !!(animationEndName && transitionEndName);\n\nexport function getTransitionName(transitionName, transitionType) {\n if (!transitionName) return null;\n\n if (typeof transitionName === 'object') {\n var type = transitionType.replace(/-\\w/g, function (match) {\n return match[1].toUpperCase();\n });\n return transitionName[type];\n }\n\n return transitionName + '-' + transitionType;\n}","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = SchemaType;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _has = _interopRequireDefault(require(\"lodash/has\"));\n\nvar _cloneDeepWith = _interopRequireDefault(require(\"lodash/cloneDeepWith\"));\n\nvar _toArray2 = _interopRequireDefault(require(\"lodash/toArray\"));\n\nvar _locale = require(\"./locale\");\n\nvar _Condition = _interopRequireDefault(require(\"./Condition\"));\n\nvar _runValidations = _interopRequireDefault(require(\"./util/runValidations\"));\n\nvar _prependDeep = _interopRequireDefault(require(\"./util/prependDeep\"));\n\nvar _isSchema = _interopRequireDefault(require(\"./util/isSchema\"));\n\nvar _createValidation = _interopRequireDefault(require(\"./util/createValidation\"));\n\nvar _printValue = _interopRequireDefault(require(\"./util/printValue\"));\n\nvar _Reference = _interopRequireDefault(require(\"./Reference\"));\n\nvar _reach = require(\"./util/reach\");\n\nvar RefSet =\n/*#__PURE__*/\nfunction () {\n function RefSet() {\n this.list = new Set();\n this.refs = new Map();\n }\n\n var _proto = RefSet.prototype;\n\n _proto.toArray = function toArray() {\n return (0, _toArray2.default)(this.list).concat((0, _toArray2.default)(this.refs.values()));\n };\n\n _proto.add = function add(value) {\n _Reference.default.isRef(value) ? this.refs.set(value.key, value) : this.list.add(value);\n };\n\n _proto.delete = function _delete(value) {\n _Reference.default.isRef(value) ? this.refs.delete(value.key, value) : this.list.delete(value);\n };\n\n _proto.has = function has(value, resolve) {\n if (this.list.has(value)) return true;\n var item,\n values = this.refs.values();\n\n while (item = values.next(), !item.done) {\n if (resolve(item.value) === value) return true;\n }\n\n return false;\n };\n\n return RefSet;\n}();\n\nfunction SchemaType(options) {\n var _this = this;\n\n if (options === void 0) {\n options = {};\n }\n\n if (!(this instanceof SchemaType)) return new SchemaType();\n this._deps = [];\n this._conditions = [];\n this._options = {\n abortEarly: true,\n recursive: true\n };\n this._exclusive = Object.create(null);\n this._whitelist = new RefSet();\n this._blacklist = new RefSet();\n this.tests = [];\n this.transforms = [];\n this.withMutation(function () {\n _this.typeError(_locale.mixed.notType);\n });\n if ((0, _has.default)(options, 'default')) this._defaultDefault = options.default;\n this._type = options.type || 'mixed';\n}\n\nvar proto = SchemaType.prototype = {\n __isYupSchema__: true,\n constructor: SchemaType,\n clone: function clone() {\n var _this2 = this;\n\n if (this._mutate) return this; // if the nested value is a schema we can skip cloning, since\n // they are already immutable\n\n return (0, _cloneDeepWith.default)(this, function (value) {\n if ((0, _isSchema.default)(value) && value !== _this2) return value;\n });\n },\n label: function label(_label) {\n var next = this.clone();\n next._label = _label;\n return next;\n },\n meta: function meta(obj) {\n if (arguments.length === 0) return this._meta;\n var next = this.clone();\n next._meta = (0, _extends2.default)(next._meta || {}, obj);\n return next;\n },\n withMutation: function withMutation(fn) {\n var before = this._mutate;\n this._mutate = true;\n var result = fn(this);\n this._mutate = before;\n return result;\n },\n concat: function concat(schema) {\n if (!schema || schema === this) return this;\n if (schema._type !== this._type && this._type !== 'mixed') throw new TypeError(\"You cannot `concat()` schema's of different types: \" + this._type + \" and \" + schema._type);\n var next = (0, _prependDeep.default)(schema.clone(), this); // new undefined default is overriden by old non-undefined one, revert\n\n if ((0, _has.default)(schema, '_default')) next._default = schema._default;\n next.tests = this.tests;\n next._exclusive = this._exclusive; // manually add the new tests to ensure\n // the deduping logic is consistent\n\n next.withMutation(function (next) {\n schema.tests.forEach(function (fn) {\n next.test(fn.OPTIONS);\n });\n });\n return next;\n },\n isType: function isType(v) {\n if (this._nullable && v === null) return true;\n return !this._typeCheck || this._typeCheck(v);\n },\n resolve: function resolve(options) {\n var schema = this;\n\n if (schema._conditions.length) {\n var conditions = schema._conditions;\n schema = schema.clone();\n schema._conditions = [];\n schema = conditions.reduce(function (schema, condition) {\n return condition.resolve(schema, options);\n }, schema);\n schema = schema.resolve(options);\n }\n\n return schema;\n },\n cast: function cast(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var resolvedSchema = this.resolve((0, _extends2.default)({}, options, {\n value: value\n }));\n\n var result = resolvedSchema._cast(value, options);\n\n if (value !== undefined && options.assert !== false && resolvedSchema.isType(result) !== true) {\n var formattedValue = (0, _printValue.default)(value);\n var formattedResult = (0, _printValue.default)(result);\n throw new TypeError(\"The value of \" + (options.path || 'field') + \" could not be cast to a value \" + (\"that satisfies the schema type: \\\"\" + resolvedSchema._type + \"\\\". \\n\\n\") + (\"attempted value: \" + formattedValue + \" \\n\") + (formattedResult !== formattedValue ? \"result of cast: \" + formattedResult : ''));\n }\n\n return result;\n },\n _cast: function _cast(rawValue) {\n var _this3 = this;\n\n var value = rawValue === undefined ? rawValue : this.transforms.reduce(function (value, fn) {\n return fn.call(_this3, value, rawValue);\n }, rawValue);\n\n if (value === undefined && (0, _has.default)(this, '_default')) {\n value = this.default();\n }\n\n return value;\n },\n _validate: function _validate(_value, options) {\n var _this4 = this;\n\n if (options === void 0) {\n options = {};\n }\n\n var value = _value;\n var originalValue = options.originalValue != null ? options.originalValue : _value;\n\n var isStrict = this._option('strict', options);\n\n var endEarly = this._option('abortEarly', options);\n\n var sync = options.sync;\n var path = options.path;\n var label = this._label;\n\n if (!isStrict) {\n value = this._cast(value, (0, _extends2.default)({\n assert: false\n }, options));\n } // value is cast, we can check if it meets type requirements\n\n\n var validationParams = {\n value: value,\n path: path,\n schema: this,\n options: options,\n label: label,\n originalValue: originalValue,\n sync: sync\n };\n var initialTests = [];\n if (this._typeError) initialTests.push(this._typeError(validationParams));\n if (this._whitelistError) initialTests.push(this._whitelistError(validationParams));\n if (this._blacklistError) initialTests.push(this._blacklistError(validationParams));\n return (0, _runValidations.default)({\n validations: initialTests,\n endEarly: endEarly,\n value: value,\n path: path,\n sync: sync\n }).then(function (value) {\n return (0, _runValidations.default)({\n path: path,\n sync: sync,\n value: value,\n endEarly: endEarly,\n validations: _this4.tests.map(function (fn) {\n return fn(validationParams);\n })\n });\n });\n },\n validate: function validate(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var schema = this.resolve((0, _extends2.default)({}, options, {\n value: value\n }));\n return schema._validate(value, options);\n },\n validateSync: function validateSync(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var schema = this.resolve((0, _extends2.default)({}, options, {\n value: value\n }));\n var result, err;\n\n schema._validate(value, (0, _extends2.default)({}, options, {\n sync: true\n })).then(function (r) {\n return result = r;\n }).catch(function (e) {\n return err = e;\n });\n\n if (err) throw err;\n return result;\n },\n isValid: function isValid(value, options) {\n return this.validate(value, options).then(function () {\n return true;\n }).catch(function (err) {\n if (err.name === 'ValidationError') return false;\n throw err;\n });\n },\n isValidSync: function isValidSync(value, options) {\n try {\n this.validateSync(value, options);\n return true;\n } catch (err) {\n if (err.name === 'ValidationError') return false;\n throw err;\n }\n },\n getDefault: function getDefault(options) {\n if (options === void 0) {\n options = {};\n }\n\n var schema = this.resolve(options);\n return schema.default();\n },\n default: function _default(def) {\n if (arguments.length === 0) {\n var defaultValue = (0, _has.default)(this, '_default') ? this._default : this._defaultDefault;\n return typeof defaultValue === 'function' ? defaultValue.call(this) : (0, _cloneDeepWith.default)(defaultValue);\n }\n\n var next = this.clone();\n next._default = def;\n return next;\n },\n strict: function strict(isStrict) {\n if (isStrict === void 0) {\n isStrict = true;\n }\n\n var next = this.clone();\n next._options.strict = isStrict;\n return next;\n },\n _isPresent: function _isPresent(value) {\n return value != null;\n },\n required: function required(message) {\n if (message === void 0) {\n message = _locale.mixed.required;\n }\n\n return this.test({\n message: message,\n name: 'required',\n exclusive: true,\n test: function test(value) {\n return this.schema._isPresent(value);\n }\n });\n },\n notRequired: function notRequired() {\n var next = this.clone();\n next.tests = next.tests.filter(function (test) {\n return test.OPTIONS.name !== 'required';\n });\n return next;\n },\n nullable: function nullable(isNullable) {\n if (isNullable === void 0) {\n isNullable = true;\n }\n\n var next = this.clone();\n next._nullable = isNullable;\n return next;\n },\n transform: function transform(fn) {\n var next = this.clone();\n next.transforms.push(fn);\n return next;\n },\n\n /**\n * Adds a test function to the schema's queue of tests.\n * tests can be exclusive or non-exclusive.\n *\n * - exclusive tests, will replace any existing tests of the same name.\n * - non-exclusive: can be stacked\n *\n * If a non-exclusive test is added to a schema with an exclusive test of the same name\n * the exclusive test is removed and further tests of the same name will be stacked.\n *\n * If an exclusive test is added to a schema with non-exclusive tests of the same name\n * the previous tests are removed and further tests of the same name will replace each other.\n */\n test: function test() {\n var opts;\n\n if (arguments.length === 1) {\n if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'function') {\n opts = {\n test: arguments.length <= 0 ? undefined : arguments[0]\n };\n } else {\n opts = arguments.length <= 0 ? undefined : arguments[0];\n }\n } else if (arguments.length === 2) {\n opts = {\n name: arguments.length <= 0 ? undefined : arguments[0],\n test: arguments.length <= 1 ? undefined : arguments[1]\n };\n } else {\n opts = {\n name: arguments.length <= 0 ? undefined : arguments[0],\n message: arguments.length <= 1 ? undefined : arguments[1],\n test: arguments.length <= 2 ? undefined : arguments[2]\n };\n }\n\n if (opts.message === undefined) opts.message = _locale.mixed.default;\n if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n var next = this.clone();\n var validate = (0, _createValidation.default)(opts);\n var isExclusive = opts.exclusive || opts.name && next._exclusive[opts.name] === true;\n\n if (opts.exclusive && !opts.name) {\n throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n }\n\n next._exclusive[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter(function (fn) {\n if (fn.OPTIONS.name === opts.name) {\n if (isExclusive) return false;\n if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n }\n\n return true;\n });\n next.tests.push(validate);\n return next;\n },\n when: function when(keys, options) {\n if (arguments.length === 1) {\n options = keys;\n keys = '.';\n }\n\n var next = this.clone(),\n deps = [].concat(keys).map(function (key) {\n return new _Reference.default(key);\n });\n deps.forEach(function (dep) {\n if (dep.isSibling) next._deps.push(dep.key);\n });\n\n next._conditions.push(new _Condition.default(deps, options));\n\n return next;\n },\n typeError: function typeError(message) {\n var next = this.clone();\n next._typeError = (0, _createValidation.default)({\n message: message,\n name: 'typeError',\n test: function test(value) {\n if (value !== undefined && !this.schema.isType(value)) return this.createError({\n params: {\n type: this.schema._type\n }\n });\n return true;\n }\n });\n return next;\n },\n oneOf: function oneOf(enums, message) {\n if (message === void 0) {\n message = _locale.mixed.oneOf;\n }\n\n var next = this.clone();\n enums.forEach(function (val) {\n next._whitelist.add(val);\n\n next._blacklist.delete(val);\n });\n next._whitelistError = (0, _createValidation.default)({\n message: message,\n name: 'oneOf',\n test: function test(value) {\n if (value === undefined) return true;\n var valids = this.schema._whitelist;\n return valids.has(value, this.resolve) ? true : this.createError({\n params: {\n values: valids.toArray().join(', ')\n }\n });\n }\n });\n return next;\n },\n notOneOf: function notOneOf(enums, message) {\n if (message === void 0) {\n message = _locale.mixed.notOneOf;\n }\n\n var next = this.clone();\n enums.forEach(function (val) {\n next._blacklist.add(val);\n\n next._whitelist.delete(val);\n });\n next._blacklistError = (0, _createValidation.default)({\n message: message,\n name: 'notOneOf',\n test: function test(value) {\n var invalids = this.schema._blacklist;\n if (invalids.has(value, this.resolve)) return this.createError({\n params: {\n values: invalids.toArray().join(', ')\n }\n });\n return true;\n }\n });\n return next;\n },\n strip: function strip(_strip) {\n if (_strip === void 0) {\n _strip = true;\n }\n\n var next = this.clone();\n next._strip = _strip;\n return next;\n },\n _option: function _option(key, overrides) {\n return (0, _has.default)(overrides, key) ? overrides[key] : this._options[key];\n },\n describe: function describe() {\n var next = this.clone();\n return {\n type: next._type,\n meta: next._meta,\n label: next._label,\n tests: next.tests.map(function (fn) {\n return {\n name: fn.OPTIONS.name,\n params: fn.OPTIONS.params\n };\n }).filter(function (n, idx, list) {\n return list.findIndex(function (c) {\n return c.name === n.name;\n }) === idx;\n })\n };\n }\n};\nvar _arr = ['validate', 'validateSync'];\n\nvar _loop = function _loop() {\n var method = _arr[_i];\n\n proto[method + \"At\"] = function (path, value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _getIn = (0, _reach.getIn)(this, path, value, options.context),\n parent = _getIn.parent,\n parentPath = _getIn.parentPath,\n schema = _getIn.schema;\n\n return schema[method](parent && parent[parentPath], (0, _extends2.default)({}, options, {\n parent: parent,\n path: path\n }));\n };\n};\n\nfor (var _i = 0; _i < _arr.length; _i++) {\n _loop();\n}\n\nvar _arr2 = ['equals', 'is'];\n\nfor (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n var alias = _arr2[_i2];\n proto[alias] = proto.oneOf;\n}\n\nvar _arr3 = ['not', 'nope'];\n\nfor (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var _alias = _arr3[_i3];\n proto[_alias] = proto.notOneOf;\n}\n\nproto.optional = proto.notRequired;\nmodule.exports = exports[\"default\"];","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = exports.array = exports.object = exports.boolean = exports.date = exports.number = exports.string = exports.mixed = void 0;\n\nvar _printValue = _interopRequireDefault(require(\"./util/printValue\"));\n\nvar mixed = {\n default: '${path} is invalid',\n required: '${path} is a required field',\n oneOf: '${path} must be one of the following values: ${values}',\n notOneOf: '${path} must not be one of the following values: ${values}',\n notType: function notType(_ref) {\n var path = _ref.path,\n type = _ref.type,\n value = _ref.value,\n originalValue = _ref.originalValue;\n var isCast = originalValue != null && originalValue !== value;\n var msg = path + \" must be a `\" + type + \"` type, \" + (\"but the final value was: `\" + (0, _printValue.default)(value, true) + \"`\") + (isCast ? \" (cast from the value `\" + (0, _printValue.default)(originalValue, true) + \"`).\" : '.');\n\n if (value === null) {\n msg += \"\\n If \\\"null\\\" is intended as an empty value be sure to mark the schema as `.nullable()`\";\n }\n\n return msg;\n }\n};\nexports.mixed = mixed;\nvar string = {\n length: '${path} must be exactly ${length} characters',\n min: '${path} must be at least ${min} characters',\n max: '${path} must be at most ${max} characters',\n matches: '${path} must match the following: \"${regex}\"',\n email: '${path} must be a valid email',\n url: '${path} must be a valid URL',\n trim: '${path} must be a trimmed string',\n lowercase: '${path} must be a lowercase string',\n uppercase: '${path} must be a upper case string'\n};\nexports.string = string;\nvar number = {\n min: '${path} must be greater than or equal to ${min}',\n max: '${path} must be less than or equal to ${max}',\n lessThan: '${path} must be less than ${less}',\n moreThan: '${path} must be greater than ${more}',\n notEqual: '${path} must be not equal to ${notEqual}',\n positive: '${path} must be a positive number',\n negative: '${path} must be a negative number',\n integer: '${path} must be an integer'\n};\nexports.number = number;\nvar date = {\n min: '${path} field must be later than ${min}',\n max: '${path} field must be at earlier than ${max}'\n};\nexports.date = date;\nvar boolean = {};\nexports.boolean = boolean;\nvar object = {\n noUnknown: '${path} field cannot have keys not specified in the object shape'\n};\nexports.object = object;\nvar array = {\n min: '${path} field must have at least ${min} items',\n max: '${path} field must have less than or equal to ${max} items'\n};\nexports.array = array;\nvar _default = {\n mixed: mixed,\n string: string,\n number: number,\n date: date,\n object: object,\n array: array,\n boolean: boolean\n};\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _default = function _default(obj) {\n return obj && obj.__isYupSchema__;\n};\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\n\nfunction getStatics(component) {\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n }\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","export default function contains(root, n) {\n var node = n;\n\n while (node) {\n if (node === root) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}","var autoAdjustOverflow = {\n adjustX: 1,\n adjustY: 1\n};\n\nvar targetOffset = [0, 0];\n\nexport var placements = {\n left: {\n points: ['cr', 'cl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n },\n right: {\n points: ['cl', 'cr'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n top: {\n points: ['bc', 'tc'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n bottom: {\n points: ['tc', 'bc'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n topLeft: {\n points: ['bl', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n leftTop: {\n points: ['tr', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n },\n topRight: {\n points: ['br', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n rightTop: {\n points: ['tl', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n bottomRight: {\n points: ['tr', 'br'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n rightBottom: {\n points: ['bl', 'br'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n bottomLeft: {\n points: ['tl', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n leftBottom: {\n points: ['br', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n }\n};\n\nexport default placements;","import _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nvar Content = function (_React$Component) {\n _inherits(Content, _React$Component);\n\n function Content() {\n _classCallCheck(this, Content);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Content.prototype.componentDidUpdate = function componentDidUpdate() {\n var trigger = this.props.trigger;\n\n if (trigger) {\n trigger.forcePopupAlign();\n }\n };\n\n Content.prototype.render = function render() {\n var _props = this.props,\n overlay = _props.overlay,\n prefixCls = _props.prefixCls,\n id = _props.id;\n\n return React.createElement(\n 'div',\n { className: prefixCls + '-inner', id: id, role: 'tooltip' },\n typeof overlay === 'function' ? overlay() : overlay\n );\n };\n\n return Content;\n}(React.Component);\n\nContent.propTypes = {\n prefixCls: PropTypes.string,\n overlay: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n id: PropTypes.string,\n trigger: PropTypes.any\n};\nexport default Content;","import _extends from 'babel-runtime/helpers/extends';\nimport _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Trigger from 'rc-trigger';\nimport { placements } from './placements';\nimport Content from './Content';\n\nvar Tooltip = function (_Component) {\n _inherits(Tooltip, _Component);\n\n function Tooltip() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Tooltip);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getPopupElement = function () {\n var _this$props = _this.props,\n arrowContent = _this$props.arrowContent,\n overlay = _this$props.overlay,\n prefixCls = _this$props.prefixCls,\n id = _this$props.id;\n\n return [React.createElement(\n 'div',\n { className: prefixCls + '-arrow', key: 'arrow' },\n arrowContent\n ), React.createElement(Content, {\n key: 'content',\n trigger: _this.trigger,\n prefixCls: prefixCls,\n id: id,\n overlay: overlay\n })];\n }, _this.saveTrigger = function (node) {\n _this.trigger = node;\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Tooltip.prototype.getPopupDomNode = function getPopupDomNode() {\n return this.trigger.getPopupDomNode();\n };\n\n Tooltip.prototype.render = function render() {\n var _props = this.props,\n overlayClassName = _props.overlayClassName,\n trigger = _props.trigger,\n mouseEnterDelay = _props.mouseEnterDelay,\n mouseLeaveDelay = _props.mouseLeaveDelay,\n overlayStyle = _props.overlayStyle,\n prefixCls = _props.prefixCls,\n children = _props.children,\n onVisibleChange = _props.onVisibleChange,\n afterVisibleChange = _props.afterVisibleChange,\n transitionName = _props.transitionName,\n animation = _props.animation,\n placement = _props.placement,\n align = _props.align,\n destroyTooltipOnHide = _props.destroyTooltipOnHide,\n defaultVisible = _props.defaultVisible,\n getTooltipContainer = _props.getTooltipContainer,\n restProps = _objectWithoutProperties(_props, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'afterVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']);\n\n var extraProps = _extends({}, restProps);\n if ('visible' in this.props) {\n extraProps.popupVisible = this.props.visible;\n }\n return React.createElement(\n Trigger,\n _extends({\n popupClassName: overlayClassName,\n ref: this.saveTrigger,\n prefixCls: prefixCls,\n popup: this.getPopupElement,\n action: trigger,\n builtinPlacements: placements,\n popupPlacement: placement,\n popupAlign: align,\n getPopupContainer: getTooltipContainer,\n onPopupVisibleChange: onVisibleChange,\n afterPopupVisibleChange: afterVisibleChange,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n defaultPopupVisible: defaultVisible,\n destroyPopupOnHide: destroyTooltipOnHide,\n mouseLeaveDelay: mouseLeaveDelay,\n popupStyle: overlayStyle,\n mouseEnterDelay: mouseEnterDelay\n }, extraProps),\n children\n );\n };\n\n return Tooltip;\n}(Component);\n\nTooltip.propTypes = {\n trigger: PropTypes.any,\n children: PropTypes.any,\n defaultVisible: PropTypes.bool,\n visible: PropTypes.bool,\n placement: PropTypes.string,\n transitionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n animation: PropTypes.any,\n onVisibleChange: PropTypes.func,\n afterVisibleChange: PropTypes.func,\n overlay: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n overlayStyle: PropTypes.object,\n overlayClassName: PropTypes.string,\n prefixCls: PropTypes.string,\n mouseEnterDelay: PropTypes.number,\n mouseLeaveDelay: PropTypes.number,\n getTooltipContainer: PropTypes.func,\n destroyTooltipOnHide: PropTypes.bool,\n align: PropTypes.object,\n arrowContent: PropTypes.any,\n id: PropTypes.string\n};\nTooltip.defaultProps = {\n prefixCls: 'rc-tooltip',\n mouseEnterDelay: 0,\n destroyTooltipOnHide: false,\n mouseLeaveDelay: 0.1,\n align: {},\n placement: 'right',\n trigger: ['hover'],\n arrowContent: null\n};\n\n\nexport default Tooltip;","import Tooltip from './Tooltip';\n\nexport default Tooltip;","import { placements as rcPlacements } from 'rc-tooltip/lib/placements';\nconst autoAdjustOverflowEnabled = {\n adjustX: 1,\n adjustY: 1,\n};\nconst autoAdjustOverflowDisabled = {\n adjustX: 0,\n adjustY: 0,\n};\nconst targetOffset = [0, 0];\nexport function getOverflowOptions(autoAdjustOverflow) {\n if (typeof autoAdjustOverflow === 'boolean') {\n return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled;\n }\n return Object.assign(Object.assign({}, autoAdjustOverflowDisabled), autoAdjustOverflow);\n}\nexport default function getPlacements(config = {}) {\n const { arrowWidth = 5, horizontalArrowShift = 16, verticalArrowShift = 12, autoAdjustOverflow = true, } = config;\n const placementMap = {\n left: {\n points: ['cr', 'cl'],\n offset: [-4, 0],\n },\n right: {\n points: ['cl', 'cr'],\n offset: [4, 0],\n },\n top: {\n points: ['bc', 'tc'],\n offset: [0, -4],\n },\n bottom: {\n points: ['tc', 'bc'],\n offset: [0, 4],\n },\n topLeft: {\n points: ['bl', 'tc'],\n offset: [-(horizontalArrowShift + arrowWidth), -4],\n },\n leftTop: {\n points: ['tr', 'cl'],\n offset: [-4, -(verticalArrowShift + arrowWidth)],\n },\n topRight: {\n points: ['br', 'tc'],\n offset: [horizontalArrowShift + arrowWidth, -4],\n },\n rightTop: {\n points: ['tl', 'cr'],\n offset: [4, -(verticalArrowShift + arrowWidth)],\n },\n bottomRight: {\n points: ['tr', 'bc'],\n offset: [horizontalArrowShift + arrowWidth, 4],\n },\n rightBottom: {\n points: ['bl', 'cr'],\n offset: [4, verticalArrowShift + arrowWidth],\n },\n bottomLeft: {\n points: ['tl', 'bc'],\n offset: [-(horizontalArrowShift + arrowWidth), 4],\n },\n leftBottom: {\n points: ['br', 'cl'],\n offset: [-4, verticalArrowShift + arrowWidth],\n },\n };\n Object.keys(placementMap).forEach(key => {\n placementMap[key] = config.arrowPointAtCenter\n ? Object.assign(Object.assign({}, placementMap[key]), { overflow: getOverflowOptions(autoAdjustOverflow), targetOffset }) : Object.assign(Object.assign({}, rcPlacements[key]), { overflow: getOverflowOptions(autoAdjustOverflow) });\n placementMap[key].ignoreShake = true;\n });\n return placementMap;\n}\n","import * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport RcTooltip from 'rc-tooltip';\nimport classNames from 'classnames';\nimport getPlacements from './placements';\nimport { ConfigConsumer } from '../config-provider';\nconst splitObject = (obj, keys) => {\n const picked = {};\n const omitted = Object.assign({}, obj);\n keys.forEach(key => {\n if (obj && key in obj) {\n picked[key] = obj[key];\n delete omitted[key];\n }\n });\n return { picked, omitted };\n};\n// Fix Tooltip won't hide at disabled button\n// mouse events don't trigger at disabled button in Chrome\n// https://github.com/react-component/tooltip/issues/18\nfunction getDisabledCompatibleChildren(element) {\n const elementType = element.type;\n if ((elementType.__ANT_BUTTON === true ||\n elementType.__ANT_SWITCH === true ||\n elementType.__ANT_CHECKBOX === true ||\n element.type === 'button') &&\n element.props.disabled) {\n // Pick some layout related style properties up to span\n // Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254\n const { picked, omitted } = splitObject(element.props.style, [\n 'position',\n 'left',\n 'right',\n 'top',\n 'bottom',\n 'float',\n 'display',\n 'zIndex',\n ]);\n const spanStyle = Object.assign(Object.assign({ display: 'inline-block' }, picked), { cursor: 'not-allowed', width: element.props.block ? '100%' : null });\n const buttonStyle = Object.assign(Object.assign({}, omitted), { pointerEvents: 'none' });\n const child = React.cloneElement(element, {\n style: buttonStyle,\n className: null,\n });\n return (\n {child}\n );\n }\n return element;\n}\nclass Tooltip extends React.Component {\n constructor(props) {\n super(props);\n this.onVisibleChange = (visible) => {\n const { onVisibleChange } = this.props;\n if (!('visible' in this.props)) {\n this.setState({ visible: this.isNoTitle() ? false : visible });\n }\n if (onVisibleChange && !this.isNoTitle()) {\n onVisibleChange(visible);\n }\n };\n this.saveTooltip = (node) => {\n this.tooltip = node;\n };\n // 动态设置动画点\n this.onPopupAlign = (domNode, align) => {\n const placements = this.getPlacements();\n // 当前返回的位置\n const placement = Object.keys(placements).filter(key => placements[key].points[0] === align.points[0] &&\n placements[key].points[1] === align.points[1])[0];\n if (!placement) {\n return;\n }\n // 根据当前坐标设置动画点\n const rect = domNode.getBoundingClientRect();\n const transformOrigin = {\n top: '50%',\n left: '50%',\n };\n if (placement.indexOf('top') >= 0 || placement.indexOf('Bottom') >= 0) {\n transformOrigin.top = `${rect.height - align.offset[1]}px`;\n }\n else if (placement.indexOf('Top') >= 0 || placement.indexOf('bottom') >= 0) {\n transformOrigin.top = `${-align.offset[1]}px`;\n }\n if (placement.indexOf('left') >= 0 || placement.indexOf('Right') >= 0) {\n transformOrigin.left = `${rect.width - align.offset[0]}px`;\n }\n else if (placement.indexOf('right') >= 0 || placement.indexOf('Left') >= 0) {\n transformOrigin.left = `${-align.offset[0]}px`;\n }\n domNode.style.transformOrigin = `${transformOrigin.left} ${transformOrigin.top}`;\n };\n this.renderTooltip = ({ getPopupContainer: getContextPopupContainer, getPrefixCls, }) => {\n const { props, state } = this;\n const { prefixCls: customizePrefixCls, title, overlay, openClassName, getPopupContainer, getTooltipContainer, } = props;\n const children = props.children;\n const prefixCls = getPrefixCls('tooltip', customizePrefixCls);\n let { visible } = state;\n // Hide tooltip when there is no title\n if (!('visible' in props) && this.isNoTitle()) {\n visible = false;\n }\n const child = getDisabledCompatibleChildren(React.isValidElement(children) ? children : {children});\n const childProps = child.props;\n const childCls = classNames(childProps.className, {\n [openClassName || `${prefixCls}-open`]: true,\n });\n return (\n {visible ? React.cloneElement(child, { className: childCls }) : child}\n );\n };\n this.state = {\n visible: !!props.visible || !!props.defaultVisible,\n };\n }\n static getDerivedStateFromProps(nextProps) {\n if ('visible' in nextProps) {\n return { visible: nextProps.visible };\n }\n return null;\n }\n getPopupDomNode() {\n return this.tooltip.getPopupDomNode();\n }\n getPlacements() {\n const { builtinPlacements, arrowPointAtCenter, autoAdjustOverflow } = this.props;\n return (builtinPlacements ||\n getPlacements({\n arrowPointAtCenter,\n verticalArrowShift: 8,\n autoAdjustOverflow,\n }));\n }\n isNoTitle() {\n const { title, overlay } = this.props;\n return !title && !overlay; // overlay for old version compatibility\n }\n render() {\n return {this.renderTooltip};\n }\n}\nTooltip.defaultProps = {\n placement: 'top',\n transitionName: 'zoom-big-fast',\n mouseEnterDelay: 0.1,\n mouseLeaveDelay: 0.1,\n arrowPointAtCenter: false,\n autoAdjustOverflow: true,\n};\npolyfill(Tooltip);\nexport default Tooltip;\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","function _extends() {\n module.exports = _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\nmodule.exports = _extends;","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = inherits;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nfunction inherits(ctor, superCtor, spec) {\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n (0, _extends2.default)(ctor.prototype, spec);\n}\n\nmodule.exports = exports[\"default\"];","import CalendarLocale from 'rc-calendar/lib/locale/en_US';\nimport TimePickerLocale from '../../time-picker/locale/en_US';\n// Merge into a locale object\nconst locale = {\n lang: Object.assign({ placeholder: 'Select date', rangePlaceholder: ['Start date', 'End date'] }, CalendarLocale),\n timePickerLocale: Object.assign({}, TimePickerLocale),\n};\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nexport default locale;\n","const locale = {\n placeholder: 'Select time',\n};\nexport default locale;\n","import createContext from '@ant-design/create-react-context';\nconst MenuContext = createContext({\n inlineCollapsed: false,\n});\nexport default MenuContext;\n","function _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\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","import * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport TransitionEvents from 'css-animation/lib/Event';\nimport raf from './raf';\nimport { ConfigConsumer } from '../config-provider';\nlet styleForPesudo;\n// Where el is the DOM element you'd like to test for visibility\nfunction isHidden(element) {\n if (process.env.NODE_ENV === 'test') {\n return false;\n }\n return !element || element.offsetParent === null;\n}\nfunction isNotGrey(color) {\n // eslint-disable-next-line no-useless-escape\n const match = (color || '').match(/rgba?\\((\\d*), (\\d*), (\\d*)(, [\\.\\d]*)?\\)/);\n if (match && match[1] && match[2] && match[3]) {\n return !(match[1] === match[2] && match[2] === match[3]);\n }\n return true;\n}\nexport default class Wave extends React.Component {\n constructor() {\n super(...arguments);\n this.animationStart = false;\n this.destroy = false;\n this.onClick = (node, waveColor) => {\n if (!node || isHidden(node) || node.className.indexOf('-leave') >= 0) {\n return;\n }\n const { insertExtraNode } = this.props;\n this.extraNode = document.createElement('div');\n const { extraNode } = this;\n extraNode.className = 'ant-click-animating-node';\n const attributeName = this.getAttributeName();\n node.setAttribute(attributeName, 'true');\n // Not white or transparnt or grey\n styleForPesudo = styleForPesudo || document.createElement('style');\n if (waveColor &&\n waveColor !== '#ffffff' &&\n waveColor !== 'rgb(255, 255, 255)' &&\n isNotGrey(waveColor) &&\n !/rgba\\(\\d*, \\d*, \\d*, 0\\)/.test(waveColor) && // any transparent rgba color\n waveColor !== 'transparent') {\n // Add nonce if CSP exist\n if (this.csp && this.csp.nonce) {\n styleForPesudo.nonce = this.csp.nonce;\n }\n extraNode.style.borderColor = waveColor;\n styleForPesudo.innerHTML = `\n [ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {\n --antd-wave-shadow-color: ${waveColor};\n }`;\n if (!document.body.contains(styleForPesudo)) {\n document.body.appendChild(styleForPesudo);\n }\n }\n if (insertExtraNode) {\n node.appendChild(extraNode);\n }\n TransitionEvents.addStartEventListener(node, this.onTransitionStart);\n TransitionEvents.addEndEventListener(node, this.onTransitionEnd);\n };\n this.onTransitionStart = (e) => {\n if (this.destroy)\n return;\n const node = findDOMNode(this);\n if (!e || e.target !== node) {\n return;\n }\n if (!this.animationStart) {\n this.resetEffect(node);\n }\n };\n this.onTransitionEnd = (e) => {\n if (!e || e.animationName !== 'fadeEffect') {\n return;\n }\n this.resetEffect(e.target);\n };\n this.bindAnimationEvent = (node) => {\n if (!node ||\n !node.getAttribute ||\n node.getAttribute('disabled') ||\n node.className.indexOf('disabled') >= 0) {\n return;\n }\n const onClick = (e) => {\n // Fix radio button click twice\n if (e.target.tagName === 'INPUT' || isHidden(e.target)) {\n return;\n }\n this.resetEffect(node);\n // Get wave color from target\n const waveColor = getComputedStyle(node).getPropertyValue('border-top-color') || // Firefox Compatible\n getComputedStyle(node).getPropertyValue('border-color') ||\n getComputedStyle(node).getPropertyValue('background-color');\n this.clickWaveTimeoutId = window.setTimeout(() => this.onClick(node, waveColor), 0);\n raf.cancel(this.animationStartId);\n this.animationStart = true;\n // Render to trigger transition event cost 3 frames. Let's delay 10 frames to reset this.\n this.animationStartId = raf(() => {\n this.animationStart = false;\n }, 10);\n };\n node.addEventListener('click', onClick, true);\n return {\n cancel: () => {\n node.removeEventListener('click', onClick, true);\n },\n };\n };\n this.renderWave = ({ csp }) => {\n const { children } = this.props;\n this.csp = csp;\n return children;\n };\n }\n componentDidMount() {\n const node = findDOMNode(this);\n if (!node || node.nodeType !== 1) {\n return;\n }\n this.instance = this.bindAnimationEvent(node);\n }\n componentWillUnmount() {\n if (this.instance) {\n this.instance.cancel();\n }\n if (this.clickWaveTimeoutId) {\n clearTimeout(this.clickWaveTimeoutId);\n }\n this.destroy = true;\n }\n getAttributeName() {\n const { insertExtraNode } = this.props;\n return insertExtraNode ? 'ant-click-animating' : 'ant-click-animating-without-extra-node';\n }\n resetEffect(node) {\n if (!node || node === this.extraNode || !(node instanceof Element)) {\n return;\n }\n const { insertExtraNode } = this.props;\n const attributeName = this.getAttributeName();\n node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466\n if (styleForPesudo) {\n styleForPesudo.innerHTML = '';\n }\n if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {\n node.removeChild(this.extraNode);\n }\n TransitionEvents.removeStartEventListener(node, this.onTransitionStart);\n TransitionEvents.removeEndEventListener(node, this.onTransitionEnd);\n }\n render() {\n return {this.renderWave};\n }\n}\n","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","const isNumeric = (value) => {\n return !isNaN(parseFloat(value)) && isFinite(value);\n};\nexport default isNumeric;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport createContext from '@ant-design/create-react-context';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport { LayoutContext } from './layout';\nimport { ConfigConsumer } from '../config-provider';\nimport Icon from '../icon';\nimport isNumeric from '../_util/isNumeric';\n// matchMedia polyfill for\n// https://github.com/WickyNilliams/enquire.js/issues/82\n// TODO: Will be removed in antd 4.0 because we will no longer support ie9\nif (typeof window !== 'undefined') {\n const matchMediaPolyfill = (mediaQuery) => {\n return {\n media: mediaQuery,\n matches: false,\n addListener() { },\n removeListener() { },\n };\n };\n // ref: https://github.com/ant-design/ant-design/issues/18774\n if (!window.matchMedia)\n window.matchMedia = matchMediaPolyfill;\n}\nconst dimensionMaxMap = {\n xs: '479.98px',\n sm: '575.98px',\n md: '767.98px',\n lg: '991.98px',\n xl: '1199.98px',\n xxl: '1599.98px',\n};\nexport const SiderContext = createContext({});\nconst generateId = (() => {\n let i = 0;\n return (prefix = '') => {\n i += 1;\n return `${prefix}${i}`;\n };\n})();\nclass InternalSider extends React.Component {\n constructor(props) {\n super(props);\n this.responsiveHandler = (mql) => {\n this.setState({ below: mql.matches });\n const { onBreakpoint } = this.props;\n if (onBreakpoint) {\n onBreakpoint(mql.matches);\n }\n if (this.state.collapsed !== mql.matches) {\n this.setCollapsed(mql.matches, 'responsive');\n }\n };\n this.setCollapsed = (collapsed, type) => {\n if (!('collapsed' in this.props)) {\n this.setState({\n collapsed,\n });\n }\n const { onCollapse } = this.props;\n if (onCollapse) {\n onCollapse(collapsed, type);\n }\n };\n this.toggle = () => {\n const collapsed = !this.state.collapsed;\n this.setCollapsed(collapsed, 'clickTrigger');\n };\n this.belowShowChange = () => {\n this.setState(({ belowShow }) => ({ belowShow: !belowShow }));\n };\n this.renderSider = ({ getPrefixCls }) => {\n const _a = this.props, { prefixCls: customizePrefixCls, className, theme, collapsible, reverseArrow, trigger, style, width, collapsedWidth, zeroWidthTriggerStyle } = _a, others = __rest(_a, [\"prefixCls\", \"className\", \"theme\", \"collapsible\", \"reverseArrow\", \"trigger\", \"style\", \"width\", \"collapsedWidth\", \"zeroWidthTriggerStyle\"]);\n const prefixCls = getPrefixCls('layout-sider', customizePrefixCls);\n const divProps = omit(others, [\n 'collapsed',\n 'defaultCollapsed',\n 'onCollapse',\n 'breakpoint',\n 'onBreakpoint',\n 'siderHook',\n 'zeroWidthTriggerStyle',\n ]);\n const rawWidth = this.state.collapsed ? collapsedWidth : width;\n // use \"px\" as fallback unit for width\n const siderWidth = isNumeric(rawWidth) ? `${rawWidth}px` : String(rawWidth);\n // special trigger when collapsedWidth == 0\n const zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? (\n \n ) : null;\n const iconObj = {\n expanded: reverseArrow ? : ,\n collapsed: reverseArrow ? :