webpackJsonp([61,114],{
/***/ 1000:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(4);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactLifecyclesCompat = __webpack_require__(7);
var _createChainedFunction = __webpack_require__(1325);
var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
var _KeyCode = __webpack_require__(944);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
var _placements = __webpack_require__(1326);
var _placements2 = _interopRequireDefault(_placements);
var _rcTrigger = __webpack_require__(89);
var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function noop() {}
function refFn(field, component) {
this[field] = component;
}
var Picker = function (_React$Component) {
(0, _inherits3['default'])(Picker, _React$Component);
function Picker(props) {
(0, _classCallCheck3['default'])(this, Picker);
var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props));
_initialiseProps.call(_this);
var open = void 0;
if ('open' in props) {
open = props.open;
} else {
open = props.defaultOpen;
}
var value = props.value || props.defaultValue;
_this.saveCalendarRef = refFn.bind(_this, 'calendarInstance');
_this.state = {
open: open,
value: value
};
return _this;
}
Picker.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) {
if (!prevState.open && this.state.open) {
// setTimeout is for making sure saveCalendarRef happen before focusCalendar
this.focusTimeout = setTimeout(this.focusCalendar, 0, this);
}
};
Picker.prototype.componentWillUnmount = function componentWillUnmount() {
clearTimeout(this.focusTimeout);
};
Picker.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {
var newState = {};
var value = nextProps.value,
open = nextProps.open;
if ('value' in nextProps) {
newState.value = value;
}
if (open !== undefined) {
newState.open = open;
}
return newState;
};
Picker.prototype.render = function render() {
var props = this.props;
var prefixCls = props.prefixCls,
placement = props.placement,
style = props.style,
getCalendarContainer = props.getCalendarContainer,
align = props.align,
animation = props.animation,
disabled = props.disabled,
dropdownClassName = props.dropdownClassName,
transitionName = props.transitionName,
children = props.children;
var state = this.state;
return _react2['default'].createElement(
_rcTrigger2['default'],
{
popup: this.getCalendarElement(),
popupAlign: align,
builtinPlacements: _placements2['default'],
popupPlacement: placement,
action: disabled && !state.open ? [] : ['click'],
destroyPopupOnHide: true,
getPopupContainer: getCalendarContainer,
popupStyle: style,
popupAnimation: animation,
popupTransitionName: transitionName,
popupVisible: state.open,
onPopupVisibleChange: this.onVisibleChange,
prefixCls: prefixCls,
popupClassName: dropdownClassName
},
_react2['default'].cloneElement(children(state, props), { onKeyDown: this.onKeyDown })
);
};
return Picker;
}(_react2['default'].Component);
Picker.propTypes = {
animation: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].string]),
disabled: _propTypes2['default'].bool,
transitionName: _propTypes2['default'].string,
onChange: _propTypes2['default'].func,
onOpenChange: _propTypes2['default'].func,
children: _propTypes2['default'].func,
getCalendarContainer: _propTypes2['default'].func,
calendar: _propTypes2['default'].element,
style: _propTypes2['default'].object,
open: _propTypes2['default'].bool,
defaultOpen: _propTypes2['default'].bool,
prefixCls: _propTypes2['default'].string,
placement: _propTypes2['default'].any,
value: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].array]),
defaultValue: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].array]),
align: _propTypes2['default'].object,
dateRender: _propTypes2['default'].func,
onBlur: _propTypes2['default'].func
};
Picker.defaultProps = {
prefixCls: 'rc-calendar-picker',
style: {},
align: {},
placement: 'bottomLeft',
defaultOpen: false,
onChange: noop,
onOpenChange: noop,
onBlur: noop
};
var _initialiseProps = function _initialiseProps() {
var _this2 = this;
this.onCalendarKeyDown = function (event) {
if (event.keyCode === _KeyCode2['default'].ESC) {
event.stopPropagation();
_this2.close(_this2.focus);
}
};
this.onCalendarSelect = function (value) {
var cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var props = _this2.props;
if (!('value' in props)) {
_this2.setState({
value: value
});
}
if (cause.source === 'keyboard' || cause.source === 'dateInputSelect' || !props.calendar.props.timePicker && cause.source !== 'dateInput' || cause.source === 'todayButton') {
_this2.close(_this2.focus);
}
props.onChange(value);
};
this.onKeyDown = function (event) {
if (!_this2.state.open && (event.keyCode === _KeyCode2['default'].DOWN || event.keyCode === _KeyCode2['default'].ENTER)) {
_this2.open();
event.preventDefault();
}
};
this.onCalendarOk = function () {
_this2.close(_this2.focus);
};
this.onCalendarClear = function () {
_this2.close(_this2.focus);
};
this.onCalendarBlur = function () {
_this2.setOpen(false);
};
this.onVisibleChange = function (open) {
_this2.setOpen(open);
};
this.getCalendarElement = function () {
var props = _this2.props;
var state = _this2.state;
var calendarProps = props.calendar.props;
var value = state.value;
var defaultValue = value;
var extraProps = {
ref: _this2.saveCalendarRef,
defaultValue: defaultValue || calendarProps.defaultValue,
selectedValue: value,
onKeyDown: _this2.onCalendarKeyDown,
onOk: (0, _createChainedFunction2['default'])(calendarProps.onOk, _this2.onCalendarOk),
onSelect: (0, _createChainedFunction2['default'])(calendarProps.onSelect, _this2.onCalendarSelect),
onClear: (0, _createChainedFunction2['default'])(calendarProps.onClear, _this2.onCalendarClear),
onBlur: (0, _createChainedFunction2['default'])(calendarProps.onBlur, _this2.onCalendarBlur)
};
return _react2['default'].cloneElement(props.calendar, extraProps);
};
this.setOpen = function (open, callback) {
var onOpenChange = _this2.props.onOpenChange;
if (_this2.state.open !== open) {
if (!('open' in _this2.props)) {
_this2.setState({
open: open
}, callback);
}
onOpenChange(open);
}
};
this.open = function (callback) {
_this2.setOpen(true, callback);
};
this.close = function (callback) {
_this2.setOpen(false, callback);
};
this.focus = function () {
if (!_this2.state.open) {
_reactDom2['default'].findDOMNode(_this2).focus();
}
};
this.focusCalendar = function () {
if (_this2.state.open && !!_this2.calendarInstance) {
_this2.calendarInstance.focus();
}
};
};
(0, _reactLifecyclesCompat.polyfill)(Picker);
exports['default'] = Picker;
module.exports = exports['default'];
/***/ }),
/***/ 1001:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _rcMenu = __webpack_require__(172);
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _MenuContext = _interopRequireDefault(__webpack_require__(889));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var SubMenu =
/*#__PURE__*/
function (_React$Component) {
_inherits(SubMenu, _React$Component);
function SubMenu() {
var _this;
_classCallCheck(this, SubMenu);
_this = _possibleConstructorReturn(this, _getPrototypeOf(SubMenu).apply(this, arguments));
_this.onKeyDown = function (e) {
_this.subMenu.onKeyDown(e);
};
_this.saveSubMenu = function (subMenu) {
_this.subMenu = subMenu;
};
return _this;
}
_createClass(SubMenu, [{
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
rootPrefixCls = _this$props.rootPrefixCls,
popupClassName = _this$props.popupClassName;
return React.createElement(_MenuContext["default"].Consumer, null, function (_ref) {
var antdMenuTheme = _ref.antdMenuTheme;
return React.createElement(_rcMenu.SubMenu, _extends({}, _this2.props, {
ref: _this2.saveSubMenu,
popupClassName: (0, _classnames["default"])("".concat(rootPrefixCls, "-").concat(antdMenuTheme), popupClassName)
}));
});
}
}]);
return SubMenu;
}(React.Component);
SubMenu.contextTypes = {
antdMenuTheme: PropTypes.string
}; // fix issue:https://github.com/ant-design/ant-design/issues/8666
SubMenu.isSubMenu = 1;
var _default = SubMenu;
exports["default"] = _default;
//# sourceMappingURL=SubMenu.js.map
/***/ }),
/***/ 1002:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcMenu = __webpack_require__(172);
var _MenuContext = _interopRequireDefault(__webpack_require__(889));
var _tooltip = _interopRequireDefault(__webpack_require__(168));
var _Sider = __webpack_require__(905);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var MenuItem =
/*#__PURE__*/
function (_React$Component) {
_inherits(MenuItem, _React$Component);
function MenuItem() {
var _this;
_classCallCheck(this, MenuItem);
_this = _possibleConstructorReturn(this, _getPrototypeOf(MenuItem).apply(this, arguments));
_this.onKeyDown = function (e) {
_this.menuItem.onKeyDown(e);
};
_this.saveMenuItem = function (menuItem) {
_this.menuItem = menuItem;
};
_this.renderItem = function (_ref) {
var siderCollapsed = _ref.siderCollapsed;
var _this$props = _this.props,
level = _this$props.level,
children = _this$props.children,
rootPrefixCls = _this$props.rootPrefixCls;
var _a = _this.props,
title = _a.title,
rest = __rest(_a, ["title"]);
return React.createElement(_MenuContext["default"].Consumer, null, function (_ref2) {
var inlineCollapsed = _ref2.inlineCollapsed;
var tooltipProps = {
title: title || (level === 1 ? children : '')
};
if (!siderCollapsed && !inlineCollapsed) {
tooltipProps.title = null; // Reset `visible` to fix control mode tooltip display not correct
// ref: https://github.com/ant-design/ant-design/issues/16742
tooltipProps.visible = false;
}
return React.createElement(_tooltip["default"], _extends({}, tooltipProps, {
placement: "right",
overlayClassName: "".concat(rootPrefixCls, "-inline-collapsed-tooltip")
}), React.createElement(_rcMenu.Item, _extends({}, rest, {
title: title,
ref: _this.saveMenuItem
})));
});
};
return _this;
}
_createClass(MenuItem, [{
key: "render",
value: function render() {
return React.createElement(_Sider.SiderContext.Consumer, null, this.renderItem);
}
}]);
return MenuItem;
}(React.Component);
exports["default"] = MenuItem;
MenuItem.isMenuItem = true;
//# sourceMappingURL=MenuItem.js.map
/***/ }),
/***/ 1003:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(1027);
} else {
module.exports = require('./cjs/react-is.development.js');
}
/***/ }),
/***/ 1020:
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(334), __esModule: true };
/***/ }),
/***/ 1021:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _from = __webpack_require__(1020);
var _from2 = _interopRequireDefault(_from);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return (0, _from2.default)(arr);
}
};
/***/ }),
/***/ 1022:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var React = __webpack_require__(0);
var factory = __webpack_require__(1023);
if (typeof React === 'undefined') {
throw Error(
'create-react-class could not find the React object. If you are using script tags, ' +
'make sure that React is being loaded before create-react-class.'
);
}
// Hack to grab NoopUpdateQueue from isomorphic React
var ReactNoopUpdateQueue = new React.Component().updater;
module.exports = factory(
React.Component,
React.isValidElement,
ReactNoopUpdateQueue
);
/***/ }),
/***/ 1023:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var _assign = __webpack_require__(76);
var emptyObject = __webpack_require__(1024);
var _invariant = __webpack_require__(1025);
if (false) {
var warning = require('fbjs/lib/warning');
}
var MIXINS_KEY = 'mixins';
// Helper function to allow the creation of anonymous functions which do not
// have .name set to the name of the variable being assigned to.
function identity(fn) {
return fn;
}
var ReactPropTypeLocationNames;
if (false) {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
childContext: 'child context'
};
} else {
ReactPropTypeLocationNames = {};
}
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
/**
* Policies that describe methods in `ReactClassInterface`.
*/
var injectedMixins = [];
/**
* Composite components are higher-level components that compose other composite
* or host components.
*
* To create a new type of `ReactClass`, pass a specification of
* your new class to `React.createClass`. The only requirement of your class
* specification is that you implement a `render` method.
*
* var MyComponent = React.createClass({
* render: function() {
* return
Hello World
;
* }
* });
*
* The class specification supports a specific protocol of methods that have
* special meaning (e.g. `render`). See `ReactClassInterface` for
* more the comprehensive protocol. Any other properties and methods in the
* class specification will be available on the prototype.
*
* @interface ReactClassInterface
* @internal
*/
var ReactClassInterface = {
/**
* An array of Mixin objects to include when defining your component.
*
* @type {array}
* @optional
*/
mixins: 'DEFINE_MANY',
/**
* An object containing properties and methods that should be defined on
* the component's constructor instead of its prototype (static methods).
*
* @type {object}
* @optional
*/
statics: 'DEFINE_MANY',
/**
* Definition of prop types for this component.
*
* @type {object}
* @optional
*/
propTypes: 'DEFINE_MANY',
/**
* Definition of context types for this component.
*
* @type {object}
* @optional
*/
contextTypes: 'DEFINE_MANY',
/**
* Definition of context types this component sets for its children.
*
* @type {object}
* @optional
*/
childContextTypes: 'DEFINE_MANY',
// ==== Definition methods ====
/**
* Invoked when the component is mounted. Values in the mapping will be set on
* `this.props` if that prop is not specified (i.e. using an `in` check).
*
* This method is invoked before `getInitialState` and therefore cannot rely
* on `this.state` or use `this.setState`.
*
* @return {object}
* @optional
*/
getDefaultProps: 'DEFINE_MANY_MERGED',
/**
* Invoked once before the component is mounted. The return value will be used
* as the initial value of `this.state`.
*
* getInitialState: function() {
* return {
* isOn: false,
* fooBaz: new BazFoo()
* }
* }
*
* @return {object}
* @optional
*/
getInitialState: 'DEFINE_MANY_MERGED',
/**
* @return {object}
* @optional
*/
getChildContext: 'DEFINE_MANY_MERGED',
/**
* Uses props from `this.props` and state from `this.state` to render the
* structure of the component.
*
* No guarantees are made about when or how often this method is invoked, so
* it must not have side effects.
*
* render: function() {
* var name = this.props.name;
* return Hello, {name}!
;
* }
*
* @return {ReactComponent}
* @required
*/
render: 'DEFINE_ONCE',
// ==== Delegate methods ====
/**
* Invoked when the component is initially created and about to be mounted.
* This may have side effects, but any external subscriptions or data created
* by this method must be cleaned up in `componentWillUnmount`.
*
* @optional
*/
componentWillMount: 'DEFINE_MANY',
/**
* Invoked when the component has been mounted and has a DOM representation.
* However, there is no guarantee that the DOM node is in the document.
*
* Use this as an opportunity to operate on the DOM when the component has
* been mounted (initialized and rendered) for the first time.
*
* @param {DOMElement} rootNode DOM element representing the component.
* @optional
*/
componentDidMount: 'DEFINE_MANY',
/**
* Invoked before the component receives new props.
*
* Use this as an opportunity to react to a prop transition by updating the
* state using `this.setState`. Current props are accessed via `this.props`.
*
* componentWillReceiveProps: function(nextProps, nextContext) {
* this.setState({
* likesIncreasing: nextProps.likeCount > this.props.likeCount
* });
* }
*
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
* transition may cause a state change, but the opposite is not true. If you
* need it, you are probably looking for `componentWillUpdate`.
*
* @param {object} nextProps
* @optional
*/
componentWillReceiveProps: 'DEFINE_MANY',
/**
* Invoked while deciding if the component should be updated as a result of
* receiving new props, state and/or context.
*
* Use this as an opportunity to `return false` when you're certain that the
* transition to the new props/state/context will not require a component
* update.
*
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
* return !equal(nextProps, this.props) ||
* !equal(nextState, this.state) ||
* !equal(nextContext, this.context);
* }
*
* @param {object} nextProps
* @param {?object} nextState
* @param {?object} nextContext
* @return {boolean} True if the component should update.
* @optional
*/
shouldComponentUpdate: 'DEFINE_ONCE',
/**
* Invoked when the component is about to update due to a transition from
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
* and `nextContext`.
*
* Use this as an opportunity to perform preparation before an update occurs.
*
* NOTE: You **cannot** use `this.setState()` in this method.
*
* @param {object} nextProps
* @param {?object} nextState
* @param {?object} nextContext
* @param {ReactReconcileTransaction} transaction
* @optional
*/
componentWillUpdate: 'DEFINE_MANY',
/**
* Invoked when the component's DOM representation has been updated.
*
* Use this as an opportunity to operate on the DOM when the component has
* been updated.
*
* @param {object} prevProps
* @param {?object} prevState
* @param {?object} prevContext
* @param {DOMElement} rootNode DOM element representing the component.
* @optional
*/
componentDidUpdate: 'DEFINE_MANY',
/**
* Invoked when the component is about to be removed from its parent and have
* its DOM representation destroyed.
*
* Use this as an opportunity to deallocate any external resources.
*
* NOTE: There is no `componentDidUnmount` since your component will have been
* destroyed by that point.
*
* @optional
*/
componentWillUnmount: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillMount`.
*
* @optional
*/
UNSAFE_componentWillMount: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillReceiveProps`.
*
* @optional
*/
UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillUpdate`.
*
* @optional
*/
UNSAFE_componentWillUpdate: 'DEFINE_MANY',
// ==== Advanced methods ====
/**
* Updates the component's currently mounted DOM representation.
*
* By default, this implements React's rendering and reconciliation algorithm.
* Sophisticated clients may wish to override this.
*
* @param {ReactReconcileTransaction} transaction
* @internal
* @overridable
*/
updateComponent: 'OVERRIDE_BASE'
};
/**
* Similar to ReactClassInterface but for static methods.
*/
var ReactClassStaticInterface = {
/**
* This method is invoked after a component is instantiated and when it
* receives new props. Return an object to update state in response to
* prop changes. Return null to indicate no change to state.
*
* If an object is returned, its keys will be merged into the existing state.
*
* @return {object || null}
* @optional
*/
getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
};
/**
* Mapping from class specification keys to special processing functions.
*
* Although these are declared like instance properties in the specification
* when defining classes using `React.createClass`, they are actually static
* and are accessible on the constructor instead of the prototype. Despite
* being static, they must be defined outside of the "statics" key under
* which all other static methods are defined.
*/
var RESERVED_SPEC_KEYS = {
displayName: function(Constructor, displayName) {
Constructor.displayName = displayName;
},
mixins: function(Constructor, mixins) {
if (mixins) {
for (var i = 0; i < mixins.length; i++) {
mixSpecIntoComponent(Constructor, mixins[i]);
}
}
},
childContextTypes: function(Constructor, childContextTypes) {
if (false) {
validateTypeDef(Constructor, childContextTypes, 'childContext');
}
Constructor.childContextTypes = _assign(
{},
Constructor.childContextTypes,
childContextTypes
);
},
contextTypes: function(Constructor, contextTypes) {
if (false) {
validateTypeDef(Constructor, contextTypes, 'context');
}
Constructor.contextTypes = _assign(
{},
Constructor.contextTypes,
contextTypes
);
},
/**
* Special case getDefaultProps which should move into statics but requires
* automatic merging.
*/
getDefaultProps: function(Constructor, getDefaultProps) {
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps = createMergedResultFunction(
Constructor.getDefaultProps,
getDefaultProps
);
} else {
Constructor.getDefaultProps = getDefaultProps;
}
},
propTypes: function(Constructor, propTypes) {
if (false) {
validateTypeDef(Constructor, propTypes, 'prop');
}
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
},
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
},
autobind: function() {}
};
function validateTypeDef(Constructor, typeDef, location) {
for (var propName in typeDef) {
if (typeDef.hasOwnProperty(propName)) {
// use a warning instead of an _invariant so components
// don't show up in prod but only in __DEV__
if (false) {
warning(
typeof typeDef[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
Constructor.displayName || 'ReactClass',
ReactPropTypeLocationNames[location],
propName
);
}
}
}
}
function validateMethodOverride(isAlreadyDefined, name) {
var specPolicy = ReactClassInterface.hasOwnProperty(name)
? ReactClassInterface[name]
: null;
// Disallow overriding of base class methods unless explicitly allowed.
if (ReactClassMixin.hasOwnProperty(name)) {
_invariant(
specPolicy === 'OVERRIDE_BASE',
'ReactClassInterface: You are attempting to override ' +
'`%s` from your class specification. Ensure that your method names ' +
'do not overlap with React methods.',
name
);
}
// Disallow defining methods more than once unless explicitly allowed.
if (isAlreadyDefined) {
_invariant(
specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
'ReactClassInterface: You are attempting to define ' +
'`%s` on your component more than once. This conflict may be due ' +
'to a mixin.',
name
);
}
}
/**
* Mixin helper which handles policy validation and reserved
* specification keys when building React classes.
*/
function mixSpecIntoComponent(Constructor, spec) {
if (!spec) {
if (false) {
var typeofSpec = typeof spec;
var isMixinValid = typeofSpec === 'object' && spec !== null;
if (process.env.NODE_ENV !== 'production') {
warning(
isMixinValid,
"%s: You're attempting to include a mixin that is either null " +
'or not an object. Check the mixins included by the component, ' +
'as well as any mixins they include themselves. ' +
'Expected object but got %s.',
Constructor.displayName || 'ReactClass',
spec === null ? null : typeofSpec
);
}
}
return;
}
_invariant(
typeof spec !== 'function',
"ReactClass: You're attempting to " +
'use a component class or function as a mixin. Instead, just use a ' +
'regular object.'
);
_invariant(
!isValidElement(spec),
"ReactClass: You're attempting to " +
'use a component as a mixin. Instead, just use a regular object.'
);
var proto = Constructor.prototype;
var autoBindPairs = proto.__reactAutoBindPairs;
// By handling mixins before any other properties, we ensure the same
// chaining order is applied to methods with DEFINE_MANY policy, whether
// mixins are listed before or after these methods in the spec.
if (spec.hasOwnProperty(MIXINS_KEY)) {
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
}
for (var name in spec) {
if (!spec.hasOwnProperty(name)) {
continue;
}
if (name === MIXINS_KEY) {
// We have already handled mixins in a special case above.
continue;
}
var property = spec[name];
var isAlreadyDefined = proto.hasOwnProperty(name);
validateMethodOverride(isAlreadyDefined, name);
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
RESERVED_SPEC_KEYS[name](Constructor, property);
} else {
// Setup methods on prototype:
// The following member methods should not be automatically bound:
// 1. Expected ReactClass methods (in the "interface").
// 2. Overridden methods (that were mixed in).
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
var isFunction = typeof property === 'function';
var shouldAutoBind =
isFunction &&
!isReactClassMethod &&
!isAlreadyDefined &&
spec.autobind !== false;
if (shouldAutoBind) {
autoBindPairs.push(name, property);
proto[name] = property;
} else {
if (isAlreadyDefined) {
var specPolicy = ReactClassInterface[name];
// These cases should already be caught by validateMethodOverride.
_invariant(
isReactClassMethod &&
(specPolicy === 'DEFINE_MANY_MERGED' ||
specPolicy === 'DEFINE_MANY'),
'ReactClass: Unexpected spec policy %s for key %s ' +
'when mixing in component specs.',
specPolicy,
name
);
// For methods which are defined more than once, call the existing
// methods before calling the new property, merging if appropriate.
if (specPolicy === 'DEFINE_MANY_MERGED') {
proto[name] = createMergedResultFunction(proto[name], property);
} else if (specPolicy === 'DEFINE_MANY') {
proto[name] = createChainedFunction(proto[name], property);
}
} else {
proto[name] = property;
if (false) {
// Add verbose displayName to the function, which helps when looking
// at profiling tools.
if (typeof property === 'function' && spec.displayName) {
proto[name].displayName = spec.displayName + '_' + name;
}
}
}
}
}
}
}
function mixStaticSpecIntoComponent(Constructor, statics) {
if (!statics) {
return;
}
for (var name in statics) {
var property = statics[name];
if (!statics.hasOwnProperty(name)) {
continue;
}
var isReserved = name in RESERVED_SPEC_KEYS;
_invariant(
!isReserved,
'ReactClass: You are attempting to define a reserved ' +
'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
'as an instance property instead; it will still be accessible on the ' +
'constructor.',
name
);
var isAlreadyDefined = name in Constructor;
if (isAlreadyDefined) {
var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
? ReactClassStaticInterface[name]
: null;
_invariant(
specPolicy === 'DEFINE_MANY_MERGED',
'ReactClass: You are attempting to define ' +
'`%s` on your component more than once. This conflict may be ' +
'due to a mixin.',
name
);
Constructor[name] = createMergedResultFunction(Constructor[name], property);
return;
}
Constructor[name] = property;
}
}
/**
* Merge two objects, but throw if both contain the same key.
*
* @param {object} one The first object, which is mutated.
* @param {object} two The second object
* @return {object} one after it has been mutated to contain everything in two.
*/
function mergeIntoWithNoDuplicateKeys(one, two) {
_invariant(
one && two && typeof one === 'object' && typeof two === 'object',
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
);
for (var key in two) {
if (two.hasOwnProperty(key)) {
_invariant(
one[key] === undefined,
'mergeIntoWithNoDuplicateKeys(): ' +
'Tried to merge two objects with the same key: `%s`. This conflict ' +
'may be due to a mixin; in particular, this may be caused by two ' +
'getInitialState() or getDefaultProps() methods returning objects ' +
'with clashing keys.',
key
);
one[key] = two[key];
}
}
return one;
}
/**
* Creates a function that invokes two functions and merges their return values.
*
* @param {function} one Function to invoke first.
* @param {function} two Function to invoke second.
* @return {function} Function that invokes the two argument functions.
* @private
*/
function createMergedResultFunction(one, two) {
return function mergedResult() {
var a = one.apply(this, arguments);
var b = two.apply(this, arguments);
if (a == null) {
return b;
} else if (b == null) {
return a;
}
var c = {};
mergeIntoWithNoDuplicateKeys(c, a);
mergeIntoWithNoDuplicateKeys(c, b);
return c;
};
}
/**
* Creates a function that invokes two functions and ignores their return vales.
*
* @param {function} one Function to invoke first.
* @param {function} two Function to invoke second.
* @return {function} Function that invokes the two argument functions.
* @private
*/
function createChainedFunction(one, two) {
return function chainedFunction() {
one.apply(this, arguments);
two.apply(this, arguments);
};
}
/**
* Binds a method to the component.
*
* @param {object} component Component whose method is going to be bound.
* @param {function} method Method to be bound.
* @return {function} The bound method.
*/
function bindAutoBindMethod(component, method) {
var boundMethod = method.bind(component);
if (false) {
boundMethod.__reactBoundContext = component;
boundMethod.__reactBoundMethod = method;
boundMethod.__reactBoundArguments = null;
var componentName = component.constructor.displayName;
var _bind = boundMethod.bind;
boundMethod.bind = function(newThis) {
for (
var _len = arguments.length,
args = Array(_len > 1 ? _len - 1 : 0),
_key = 1;
_key < _len;
_key++
) {
args[_key - 1] = arguments[_key];
}
// User is trying to bind() an autobound method; we effectively will
// ignore the value of "this" that the user is trying to use, so
// let's warn.
if (newThis !== component && newThis !== null) {
if (process.env.NODE_ENV !== 'production') {
warning(
false,
'bind(): React component methods may only be bound to the ' +
'component instance. See %s',
componentName
);
}
} else if (!args.length) {
if (process.env.NODE_ENV !== 'production') {
warning(
false,
'bind(): You are binding a component method to the component. ' +
'React does this for you automatically in a high-performance ' +
'way, so you can safely remove this call. See %s',
componentName
);
}
return boundMethod;
}
var reboundMethod = _bind.apply(boundMethod, arguments);
reboundMethod.__reactBoundContext = component;
reboundMethod.__reactBoundMethod = method;
reboundMethod.__reactBoundArguments = args;
return reboundMethod;
};
}
return boundMethod;
}
/**
* Binds all auto-bound methods in a component.
*
* @param {object} component Component whose method is going to be bound.
*/
function bindAutoBindMethods(component) {
var pairs = component.__reactAutoBindPairs;
for (var i = 0; i < pairs.length; i += 2) {
var autoBindKey = pairs[i];
var method = pairs[i + 1];
component[autoBindKey] = bindAutoBindMethod(component, method);
}
}
var IsMountedPreMixin = {
componentDidMount: function() {
this.__isMounted = true;
}
};
var IsMountedPostMixin = {
componentWillUnmount: function() {
this.__isMounted = false;
}
};
/**
* Add more to the ReactClass base class. These are all legacy features and
* therefore not already part of the modern ReactComponent.
*/
var ReactClassMixin = {
/**
* TODO: This will be deprecated because state should always keep a consistent
* type signature and the only use case for this, is to avoid that.
*/
replaceState: function(newState, callback) {
this.updater.enqueueReplaceState(this, newState, callback);
},
/**
* Checks whether or not this composite component is mounted.
* @return {boolean} True if mounted, false otherwise.
* @protected
* @final
*/
isMounted: function() {
if (false) {
warning(
this.__didWarnIsMounted,
'%s: isMounted is deprecated. Instead, make sure to clean up ' +
'subscriptions and pending requests in componentWillUnmount to ' +
'prevent memory leaks.',
(this.constructor && this.constructor.displayName) ||
this.name ||
'Component'
);
this.__didWarnIsMounted = true;
}
return !!this.__isMounted;
}
};
var ReactClassComponent = function() {};
_assign(
ReactClassComponent.prototype,
ReactComponent.prototype,
ReactClassMixin
);
/**
* Creates a composite component class given a class specification.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
*
* @param {object} spec Class specification (which must define `render`).
* @return {function} Component constructor function.
* @public
*/
function createClass(spec) {
// To keep our warnings more understandable, we'll use a little hack here to
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
// unnecessarily identify a class without displayName as 'Constructor'.
var Constructor = identity(function(props, context, updater) {
// This constructor gets overridden by mocks. The argument is used
// by mocks to assert on what gets mounted.
if (false) {
warning(
this instanceof Constructor,
'Something is calling a React component directly. Use a factory or ' +
'JSX instead. See: https://fb.me/react-legacyfactory'
);
}
// Wire up auto-binding
if (this.__reactAutoBindPairs.length) {
bindAutoBindMethods(this);
}
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
this.state = null;
// ReactClasses doesn't have constructors. Instead, they use the
// getInitialState and componentWillMount methods for initialization.
var initialState = this.getInitialState ? this.getInitialState() : null;
if (false) {
// We allow auto-mocks to proceed as if they're returning null.
if (
initialState === undefined &&
this.getInitialState._isMockFunction
) {
// This is probably bad practice. Consider warning here and
// deprecating this convenience.
initialState = null;
}
}
_invariant(
typeof initialState === 'object' && !Array.isArray(initialState),
'%s.getInitialState(): must return an object or null',
Constructor.displayName || 'ReactCompositeComponent'
);
this.state = initialState;
});
Constructor.prototype = new ReactClassComponent();
Constructor.prototype.constructor = Constructor;
Constructor.prototype.__reactAutoBindPairs = [];
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
mixSpecIntoComponent(Constructor, IsMountedPreMixin);
mixSpecIntoComponent(Constructor, spec);
mixSpecIntoComponent(Constructor, IsMountedPostMixin);
// Initialize the defaultProps property after all mixins have been merged.
if (Constructor.getDefaultProps) {
Constructor.defaultProps = Constructor.getDefaultProps();
}
if (false) {
// This is a tag to indicate that the use of these method names is ok,
// since it's used with createClass. If it's not, then it's likely a
// mistake so we'll warn you to use the static property, property
// initializer or constructor respectively.
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps.isReactClassApproved = {};
}
if (Constructor.prototype.getInitialState) {
Constructor.prototype.getInitialState.isReactClassApproved = {};
}
}
_invariant(
Constructor.prototype.render,
'createClass(...): Class specification must implement a `render` method.'
);
if (false) {
warning(
!Constructor.prototype.componentShouldUpdate,
'%s has a method called ' +
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
'The name is phrased as a question because the function is ' +
'expected to return a value.',
spec.displayName || 'A component'
);
warning(
!Constructor.prototype.componentWillRecieveProps,
'%s has a method called ' +
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
spec.displayName || 'A component'
);
warning(
!Constructor.prototype.UNSAFE_componentWillRecieveProps,
'%s has a method called UNSAFE_componentWillRecieveProps(). ' +
'Did you mean UNSAFE_componentWillReceiveProps()?',
spec.displayName || 'A component'
);
}
// Reduce time spent doing lookups by setting these on the prototype.
for (var methodName in ReactClassInterface) {
if (!Constructor.prototype[methodName]) {
Constructor.prototype[methodName] = null;
}
}
return Constructor;
}
return createClass;
}
module.exports = factory;
/***/ }),
/***/ 1024:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var emptyObject = {};
if (false) {
Object.freeze(emptyObject);
}
module.exports = emptyObject;
/***/ }),
/***/ 1025:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function validateFormat(format) {};
if (false) {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/***/ }),
/***/ 1026:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var ReactIs = __webpack_require__(1003);
var REACT_STATICS = {
childContextTypes: true,
contextType: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
getDerivedStateFromError: true,
getDerivedStateFromProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
callee: true,
arguments: true,
arity: true
};
var FORWARD_REF_STATICS = {
'$$typeof': true,
render: true,
defaultProps: true,
displayName: true,
propTypes: true
};
var MEMO_STATICS = {
'$$typeof': true,
compare: true,
defaultProps: true,
displayName: true,
propTypes: true,
type: true
};
var TYPE_STATICS = {};
TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;
function getStatics(component) {
if (ReactIs.isMemo(component)) {
return MEMO_STATICS;
}
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
}
var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = Object.prototype;
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
if (typeof sourceComponent !== 'string') {
// don't hoist over string (html) components
if (objectPrototype) {
var inheritedComponent = getPrototypeOf(sourceComponent);
if (inheritedComponent && inheritedComponent !== objectPrototype) {
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
}
}
var keys = getOwnPropertyNames(sourceComponent);
if (getOwnPropertySymbols) {
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
}
var targetStatics = getStatics(targetComponent);
var sourceStatics = getStatics(sourceComponent);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
try {
// Avoid failures from read-only properties
defineProperty(targetComponent, key, descriptor);
} catch (e) {}
}
}
return targetComponent;
}
return targetComponent;
}
module.exports = hoistNonReactStatics;
/***/ }),
/***/ 1027:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v16.8.6
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Object.defineProperty(exports,"__esModule",{value:!0});
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):
60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
exports.isSuspense=function(a){return t(a)===p};
/***/ }),
/***/ 1028:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a
//
//
//
//
// 分数不能为空
// */}{/**/}
/***/ }),
/***/ 3277:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_select_style_css__ = __webpack_require__(318);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_select_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_select__ = __webpack_require__(315);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_select__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_modal_style_css__ = __webpack_require__(32);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_modal_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_modal__ = __webpack_require__(33);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_modal__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__new_SingleDisplay__ = __webpack_require__(2418);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__new_JudgeDisplay__ = __webpack_require__(2419);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__new_NullDisplay__ = __webpack_require__(2420);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__new_MainDisplay__ = __webpack_require__(2421);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__new_ShixunDisplay__ = __webpack_require__(2422);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__new_common_css__ = __webpack_require__(1982);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__new_common_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14__new_common_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i.bor-bottom-greyE:last-child {\n border-bottom: none !important;\n }\n '),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:"font-18 center"},exercise&&exercise.exercise_name),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:"font-14 color-grey-9"},exercise&&exercise.exercise_description)),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:" padding20-30 newContainer"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('p',{className:' clearfix'},exercise_types&&exercise_types.q_singles>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-9 mr15'},'\u5355\u9009\u9898 ',exercise_types.q_singles,' \u9898,\u5171 ',exercise_types&&exercise_types.q_singles_scores,' \u5206'),exercise_types&&exercise_types.q_doubles>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-9 mr15'},'\u591A\u9009\u9898 ',exercise_types.q_doubles,' \u9898,\u5171 ',exercise_types&&exercise_types.q_doubles_scores,' \u5206'),exercise_types&&exercise_types.q_judges>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-9 mr15'},'\u5224\u65AD\u9898 ',exercise_types.q_judges,' \u9898,\u5171 ',exercise_types&&exercise_types.q_judges_scores,' \u5206'),exercise_types&&exercise_types.q_nulls>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-9 mr15'},'\u586B\u7A7A\u9898 ',exercise_types.q_nulls,' \u9898,\u5171 ',exercise_types&&exercise_types.q_nulls_scores,' \u5206'),exercise_types&&exercise_types.q_mains>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-9 mr15'},'\u7B80\u7B54\u9898 ',exercise_types.q_mains,' \u9898,\u5171 ',exercise_types&&exercise_types.q_mains_scores,' \u5206'),exercise_types&&exercise_types.q_shixuns>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-9 mr15'},'\u5B9E\u8BAD\u9898 ',exercise_types.q_shixuns,' \u9898,\u5171 ',exercise_types&&exercise_types.q_shixuns_scores,' \u5206'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-3 fr'},'\u5171',__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-orange-tip'},' ',exercise_types&&exercise_types.q_scores,' '),'\u5206'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-grey-3 fr'},'\u5408\u8BA1',__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'color-blue'},' ',exercise_types&&exercise_types.q_counts,' '),'\u9898\uFF1A'))),exercise_questions.map(function(item,index){if(item.question_type==0||item.question_type==1){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__new_SingleDisplay__["a" /* default */],Object.assign({},_this2.props,item,{index:index},commonHandler,{displayCount:exercise_questions.length,showActionButton:false,key:index}));}else if(item.question_type==2){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__new_JudgeDisplay__["a" /* default */],Object.assign({showActionButton:false,key:index},_this2.props,item,{index:index},commonHandler));}else if(item.question_type==3){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__new_NullDisplay__["a" /* default */],Object.assign({showActionButton:false,key:index},_this2.props,item,{index:index},commonHandler));}else if(item.question_type==4){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__new_MainDisplay__["a" /* default */],Object.assign({showActionButton:false,key:index},_this2.props,item,{index:index},commonHandler));}else if(item.question_type==5){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__new_ShixunDisplay__["a" /* default */],Object.assign({Testpapersettinghomepage:true,showActionButton:false,key:index},_this2.props,item,{index:index},commonHandler));}return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',null);}));}}]);return ExerciseDisplay;}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);// RouteHOC()
/* harmony default export */ __webpack_exports__["a"] = (ExerciseDisplay);
/***/ }),
/***/ 4628:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_spin_style_css__ = __webpack_require__(72);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_spin_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_spin_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_spin__ = __webpack_require__(73);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_spin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_spin__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_menu_style_css__ = __webpack_require__(987);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_menu_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_menu_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_menu__ = __webpack_require__(922);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_router_dom__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__coursesPublic_CoursesListType__ = __webpack_require__(1077);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__css_members_css__ = __webpack_require__(330);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__css_members_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__css_members_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__css_busyWork_css__ = __webpack_require__(1072);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__css_busyWork_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__css_busyWork_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__modals_Modals__ = __webpack_require__(173);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__modals_DownloadMessageysl__ = __webpack_require__(1426);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Studentshavecompletedthelist__ = __webpack_require__(3273);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__Exercisesetting__ = __webpack_require__(4629);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__ExerciseDisplay__ = __webpack_require__(3277);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__Exercisestatisticalresult__ = __webpack_require__(4630);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__poll_pollPublicBtn_ImmediatelyPublish__ = __webpack_require__(1887);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__poll_pollPublicBtn_ImmediatelyEnd__ = __webpack_require__(1888);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Ecerciseallbackagain__ = __webpack_require__(4633);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i0){_this.setState({Modalstype:true,ModalSave:function ModalSave(){return _this.props.history.push(url);},Modalstopval:"\u7B54\u9898\u65F6\u957F\u9650\u5236"+Commonheadofthetestpaper.time+"\u5206\u949F\uFF0C\u4ECE\u9996\u6B21\u7B54\u9898\u5F00\u59CB\u5B9E\u884C\u4E0D\u95F4\u65AD\u8BA1\u65F6\u65B9\u6CD5",modalsBottomval:'请确认是否有充足的答题时间?'});}else{_this.setState({Modalstype:true,ModalSave:function ModalSave(){return _this.props.history.push(url);},Modalstopval:"是否确认开始答题?",modalsBottomval:' '});}};_this.confpdf=function(url){window.open(url);};_this.Downloadcal=function(){_this.setState({DownloadType:false,DownloadMessageval:undefined});};_this.cancelmodel=function(){_this.setState({Modalstype:false,ModalSave:' ',Modalstopval:' ',modalsBottomval:' ',Loadtype:false});};_this.getsetdata=function(){// console.log("Testpapersettinghomepage");
// console.log("getsetdatassssss");
var tab=_this.state.tab;try{if(tab[0]==="0"){_this.child.Teacherliststudentlist();}if(tab[0]==="1"){_this.child.Teacherliststudentlist();}if(tab[0]==="2"){_this.child.Teacherliststudentlist();}if(tab[0]==="3"){_this.child.getSettingInfo();}}catch(e){}};_this.bindRef=function(ref){_this.child=ref;};_this.goback=function(){// let {datalist}=this.state;
// let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id;
//
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
// let courseId=this.props.match.params.coursesId;
// if(courseId===undefined){
// this.props.history.push("/courses");
// }else{
// this.props.history.push(this.props.current_user.first_category_url);
// }
_this.props.history.goBack();};_this.state={tab:["0"],searchtext:"",Commonheadofthetestpaper:undefined,visible:false,groupyslsval:"",current_status:undefined,DownloadType:false,DownloadMessageval:undefined,donwloading:false,exercise_status:3};return _this;}//切换tab
_createClass(Testpapersettinghomepage,[{key:"componentDidMount",value:function componentDidMount(){var query=this.props.location.search;var type=query.split('?tab=');var sum=[];sum.push(type[1]);// console.log("componentDidMountcomponentDidMount");
// console.log(sum);
this.setState({tab:sum});this.Commonheadofthetestpaper();}//试卷公用头部
// experiment=(url)=>{
//
// axios.get(url).then((response) => {
// console.log(response);
// if(response.data.status&&response.data.status===-1){
//
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量(100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
//
// }
//打开pdf
},{key:"confirmysl",/// 确认是否下载
value:function confirmysl(url,child){var _this2=this;var params={};if(child!=undefined){params=child._getRequestParams()!==undefined?child._getRequestParams():{};}console.log("170");console.log(params);var urll=url+("?"+__WEBPACK_IMPORTED_MODULE_6_educoder__["_0" /* queryString */].stringify(params));__WEBPACK_IMPORTED_MODULE_10_axios___default.a.get(urll+'&export=true').then(function(response){if(response===undefined){return;}if(response.data.status&&response.data.status===-1){}else if(response.data.status&&response.data.status===-2){if(response.data.message==="100"){// 已超出文件导出的上限数量(100 ),建议:
_this2.setState({DownloadType:true,DownloadMessageval:100});}else{//因附件资料超过500M
_this2.setState({DownloadType:true,DownloadMessageval:500});}}else{_this2.props.slowDownload(urll);// this.setState({ donwloading: true })
// downloadFile({
// url: urll,
// successCallback: (url) => {
// this.setState({ donwloading: false })
// console.log('successCallback')
// },
// failCallback: (responseHtml, url) => {
// this.setState({ donwloading: false })
// console.log('failCallback')
// }
// })
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url+`?${queryString.stringify(params)}`+ '&export=true', '_blank');
}}).catch(function(error){console.log(error);});}// DownloadType=()=>{
// this.setState({
// DownloadType:false,
// DownloadMessageval:undefined
// })
// }
// Downloadcal=()=>{
// this.setState({
// DownloadType:false,
// DownloadMessageval:undefined
// })
// }
},{key:"render",value:function render(){var _this3=this;var _state=this.state,tab=_state.tab,visible=_state.visible,Commonheadofthetestpaper=_state.Commonheadofthetestpaper,exercise_status=_state.exercise_status;var isAdmin=this.props.isAdmin();var isStudent=this.props.isStudent();// TODO
//console.log(Commonheadofthetestpaper.exercise_status);
document.title=this.props.coursedata&&this.props.coursedata.name;return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"newMain clearfix "},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"educontent mb20",style:{width:"1200px"}},this.state.Modalstype===true?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__modals_Modals__["a" /* default */],{modalsType:this.state.Modalstype,modalsTopval:this.state.Modalstopval,modalsBottomval:this.state.modalsBottomval,loadtype:this.state.Loadtype,modalCancel:this.cancelmodel,modalSave:this.state.ModalSave,antIcon:this.state.Modalstypeloding}):"",visible===true?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_19__Ecerciseallbackagain__["a" /* default */],Object.assign({},this.props,{modalname:"打回重做",visible:visible,callback:this.callback})):"",__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"educontent mb20",style:{width:"1200px"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("p",{className:"clearfix mb20 mt10"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_react_router_dom__["b" /* Link */],{className:" btn colorgrey fl hovercolorblue ",to:"/courses/"+this.props.match.params.coursesId},this.props.coursedata.name),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",{className:"color-grey-9 fl ml3 mr3"},">"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_react_router_dom__["b" /* Link */],{className:" btn colorgrey fl hovercolorblue ",to:"/courses/"+this.props.match.params.coursesId+"/exercises/"+(Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id)},"\u8BD5\u5377"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",{className:"color-grey-9 fl ml3 mr3"},">"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_educoder__["A" /* WordsBtn */],{className:"fl"},"\u8BD5\u5377\u8BE6\u60C5"))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("style",null,"\n .summaryname{\n line-height: 23px;\n cursor: pointer;\n }\n "),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"educontent",style:{width:"1200px"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("p",{className:" fl color-black summaryname "},Commonheadofthetestpaper===undefined?"":Commonheadofthetestpaper.exercise_name),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__coursesPublic_CoursesListType__["a" /* default */],{typelist:[""+polls_status[Commonheadofthetestpaper&&Commonheadofthetestpaper.exercise_status]]}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_react_router_dom__["b" /* Link */],{className:"color-grey-6 fr font-16 summaryname mr30",to:"/courses/"+this.props.match.params.coursesId+"/exercises/"+(Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.left_banner_id)},"\u8FD4\u56DE"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("p",{className:"color-grey-6 fr font-16"}," ")),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"edu-back-white mt10"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"stud-class-set bor-bottom-greyE "},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:" clearfix edu-back-white pl30 pr30"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"fl task_menu_ul"},this.props.isAdmin()===true?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a,{mode:"horizontal",selectedKeys:tab,onClick:this.changeTab},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a.Item,{key:"0",className:"exercisesafonts"},"\u7B54\u9898\u5217\u8868"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a.Item,{key:"1",className:"exercisesafonts"},"\u7EDF\u8BA1\u7ED3\u679C"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a.Item,{key:"2",className:"exercisesafonts"},"\u8BD5\u5377\u9884\u89C8"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a.Item,{key:"3",className:"exercisesafonts"},"\u8BBE\u7F6E")):__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a,{mode:"horizontal",selectedKeys:tab,onClick:this.changeTab},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a.Item,{key:"0",className:"exercisesafonts"},"\u7B54\u9898\u5217\u8868"),Commonheadofthetestpaper&&Commonheadofthetestpaper.show_statistic===true?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a.Item,{key:"1",className:"exercisesafonts"},"\u7EDF\u8BA1\u7ED3\u679C"):"",__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_menu___default.a.Item,{key:"3",className:"exercisesafonts"},"\u8BBE\u7F6E"))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("style",null,"\n .drop_down_menu{\n height: 118px;\n left:0px;\n width: 121px;\n }\n .drop_down_menu li {\n overflow: visible;\n width: 121px;\n }\n .drop_down_menu li a{\n padding: 0px; \n font-size: 14px; \n }\n .mt19{\n margin-top:19px;\n }\n .drop_down_menu, .drop_down_normal{\n padding-top: 10px;\n padding-bottom: 8px;\n }\n .exercisesafonts:hover {\n color:#1A0B00 !important;\n }\n "),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"studentList_operation_ul mt23"},isAdmin===true?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_spin___default.a,{spinning:this.state.donwloading,style:{}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li",{className:"li_line drop_down fr color-blue font-15",style:{"paddingLeft":"0px"}},"\u5BFC\u51FA",__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("i",{className:"iconfont icon-xiajiantou font-12 ml2"}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("ul",{className:"drop_down_menu",style:{"right":"-34px","left":"unset","height":"auto"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("a",{onClick:function onClick(){return _this3.confirmysl("/exercises/"+_this3.props.match.params.Id+"/exercise_lists.xlsx",_this3.child);}},"\u5B66\u751F\u6210\u7EE9")),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("a",{href:"/api/exercises/"+this.props.match.params.Id+"/export_exercise",target:"_blank"},"\u7A7A\u767D\u8BD5\u5377"))))):""),isAdmin===true&&Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.user_commit_counts>0&&Commonheadofthetestpaper.exercise_status===2?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("a",{className:"fr color-blue font-16 mt20 mr20",onClick:this.Ecerciseacallagain},"\u6253\u56DE\u91CD\u505A"):"",isAdmin===true?Commonheadofthetestpaper!==undefined&&Commonheadofthetestpaper.user_permission.exercise_publish_count>0?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_18__poll_pollPublicBtn_ImmediatelyEnd__["a" /* default */],Object.assign({},this.props,this.state,{className:"btn fr color-blue font-16 mt20 mr20",checkBoxValues:[parseInt(this.props.match.params.Id)],Exercisetype:"exercise"// single={true}
,action:this.Commonheadofthetestpaper})):"":"",isAdmin===true?Commonheadofthetestpaper!==undefined&&Commonheadofthetestpaper.user_permission.exercise_unpublish_count>0?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_17__poll_pollPublicBtn_ImmediatelyPublish__["a" /* default */],Object.assign({},this.props,this.state,{className:"btn fr color-blue font-16 mt20 mr20",checkBoxValues:[parseInt(this.props.match.params.Id)],Exercisetype:"exercise",pushtype:true,action:this.Commonheadofthetestpaper,single:true,getsetdata:this.getsetdata})):"":"",isAdmin===true?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_react_router_dom__["b" /* Link */],{className:"fr color-blue font-16 mt20 mr20",to:"/courses/"+this.props.match.params.coursesId+"/exercises/"+this.props.match.params.Id+"/edit"},"\u7F16\u8F91\u8BD5\u5377"):"",isAdmin===false&&this.props.current_user!==undefined?Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status===2?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("a",{className:"fr color-blue font-16 mt20",onClick:function onClick(){return _this3.setgameexercise("/courses/"+_this3.props.match.params.coursesId+"/exercises/"+_this3.props.match.params.Id+"/users/"+_this3.props.current_user.login);}},"\u5F00\u59CB\u7B54\u9898"):__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_react_router_dom__["b" /* Link */],{className:"fr color-blue font-16 mt20",to:"/courses/"+this.props.match.params.coursesId+"/exercises/"+this.props.match.params.Id+"/users/"+this.props.current_user.login},exercise_status===2?start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]:exercise_status===3?"":exercise_status===4?"":start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]):""))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__modals_DownloadMessageysl__["a" /* default */],Object.assign({},this.props,{value:this.state.DownloadMessageval,modalCancel:this.Downloadcal,modalsType:this.state.DownloadType})),// 教师列表
parseInt(tab[0])==0?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__Studentshavecompletedthelist__["default"],Object.assign({},this.props,this.state,{triggerRef:this.bindRef,setcourse_groupysls:function setcourse_groupysls(value){return _this3.setcourse_groupysls(value);},current_status:this.state.current_status,Commonheadofthetestpaper:this.state.Commonheadofthetestpaper,yslstustate:[""+polls_status[Commonheadofthetestpaper&&Commonheadofthetestpaper.exercise_status]]})):"",parseInt(tab[0])==1?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__Exercisestatisticalresult__["a" /* default */],Object.assign({},this.props,this.state,{triggerRef:this.bindRef})):"",parseInt(tab[0])==2?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__ExerciseDisplay__["a" /* default */],Object.assign({},this.props,this.state,{triggerRef:this.bindRef})):"",parseInt(tab[0])==3?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__Exercisesetting__["a" /* default */],Object.assign({Commonheadofthetestpaper:this.state.Commonheadofthetestpaper},this.props,this.state,{triggerRef:this.bindRef})):""));}}]);return Testpapersettinghomepage;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);/* harmony default export */ __webpack_exports__["default"] = (Testpapersettinghomepage);
/***/ }),
/***/ 4629:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_tooltip_style_css__ = __webpack_require__(169);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_tooltip_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_tooltip_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip__ = __webpack_require__(168);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_date_picker_style_css__ = __webpack_require__(1078);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_date_picker_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_date_picker_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_date_picker__ = __webpack_require__(1079);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_date_picker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_date_picker__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_form_style_css__ = __webpack_require__(950);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_form__ = __webpack_require__(951);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_checkbox_style_css__ = __webpack_require__(317);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_checkbox_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_checkbox_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox__ = __webpack_require__(314);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_select_style_css__ = __webpack_require__(318);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_antd_lib_select_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_select__ = __webpack_require__(315);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_antd_lib_select__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__poll_PollDetailTabForthRules__ = __webpack_require__(1961);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__css_members_css__ = __webpack_require__(330);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__css_members_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17__css_members_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__css_busyWork_css__ = __webpack_require__(1072);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__css_busyWork_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18__css_busyWork_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__poll_pollStyle_css__ = __webpack_require__(1434);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__poll_pollStyle_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19__poll_pollStyle_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_moment__ = __webpack_require__(86);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_20_moment__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_antd_lib_date_picker_locale_zh_CN__ = __webpack_require__(181);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_antd_lib_date_picker_locale_zh_CN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_21_antd_lib_date_picker_locale_zh_CN__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_22_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__modals_Modals__ = __webpack_require__(173);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i range(0, 24).splice(4, 20),
disabledMinutes:function disabledMinutes(){return range(1,30).concat(range(31,60));}// disabledSeconds: () => [0, 60],
};}function disabledDate(current){return current&¤t<__WEBPACK_IMPORTED_MODULE_20_moment___default()().endOf('day').subtract(1,'days');}var dataformat="YYYY-MM-DD HH:mm";var Exercisesetting=function(_Component){_inherits(Exercisesetting,_Component);function Exercisesetting(props){_classCallCheck(this,Exercisesetting);var _this=_possibleConstructorReturn(this,(Exercisesetting.__proto__||Object.getPrototypeOf(Exercisesetting)).call(this,props));_this.componentDidMount=function(){_this.getSettingInfo();// window.addEventListener('click', this.handleClick);
try{_this.props.triggerRef(_this);}catch(e){}if(_this.props.Commonheadofthetestpaper!=undefined){_this.editSetting();}if(_this.props.isAdmin()===false){_this.cancelEdit();}};_this.componentDidUpdate=function(prevProps){if(prevProps.Commonheadofthetestpaper!=_this.props.Commonheadofthetestpaper){_this.editSetting();}};_this.getSettingInfo=function(){var Id=_this.props.match.params.Id;var url="/exercises/"+Id+"/exercise_setting.json";__WEBPACK_IMPORTED_MODULE_22_axios___default.a.get(url).then(function(result){if(result.status==200){_this.props.form.setFieldsValue({time:result.data.exercise.time===-1?"":result.data.exercise.time});_this.setState(Object.assign({polls:result.data.exercise,flagPublic:result.data.exercise.is_public,flagRealName:result.data.exercise.un_anonymous,unified_list:result.data.published_course_groups,course_group:result.data.course_groups,publish_time:result.data.exercise.publish_time,end_time:result.data.exercise.end_time,firstSetting:result.data.published_course_groups.length==0&&result.data.exercise.publish_time==null&&result.data.exercise.end_time==null,score_open:result.data.exercise.score_open,answer_open:result.data.exercise.answer_open,unified_setting:result.data.exercise.unified_setting,show_statistic:result.data.exercise.show_statistic,question_random:result.data.exercise.question_random,choice_random:result.data.exercise.choice_random,time:result.data.exercise.time},result.data.exercise));if(result.data.exercise.unified_setting==true&&__WEBPACK_IMPORTED_MODULE_20_moment___default()(result.data.exercise.publish_time)<=__WEBPACK_IMPORTED_MODULE_20_moment___default()()){// if(this.props.isSuperAdmin()===true){
// this.setState({
// publish_timetype:false
// })
// }else{
//发布后谁都不能改
_this.setState({publish_timetype:true});// }
}if(result.data.exercise.unified_setting==true&&__WEBPACK_IMPORTED_MODULE_20_moment___default()(result.data.exercise.end_time)<=__WEBPACK_IMPORTED_MODULE_20_moment___default()()){// if(this.props.isSuperAdmin()===true){
// this.setState({
// end_timetype:false
// })
// }else{
_this.setState({end_timetype:true});// }
}var group=result.data.published_course_groups;if(group.length==0){var list=[{course_group_id:[],course_group_name:[],publish_time:undefined,end_time:undefined,publish_flag:"",end_flag:"",class_flag:"",course_search:"",poll_status:0,open:false}];_this.setState({rules:list});}else{var array=[];for(var i=0;i0){
// for(var i=0;i 0 ? 1 : 2,
// visible:true,
// Topval:"本操作只对“未发布”的对象生效",
// Botvalleft:"暂不发布",
// Botval:"则通过后续手动设置,定时发布",
// starttime:"发布时间:"+this.props.getNowFormatDates(1),
// endtime:"截止时间:" + moment(end_time == "" || end_time ==undefined ? this.props.getNowFormatDates(2):end_time).format(dataformat),
// Cancelname:"暂不发布",
// Savesname:"立即发布",
// Cancel:this.homeworkhide,
// Saves:this.homeworkstartend,
// publishCourse:list,
// publish_time:this.props.getNowFormatDates(1)
// })
// }
}else{if(_this.state.publish_timetype===false){if(__WEBPACK_IMPORTED_MODULE_20_moment___default()(publish_time,dataformat)<__WEBPACK_IMPORTED_MODULE_20_moment___default()()){_this.setState({unit_p_tip:"发布时间不能小于当前时间"});return;}else{_this.setState({unit_p_tip:""});}}if(_this.state.end_timetype===false){if(__WEBPACK_IMPORTED_MODULE_20_moment___default()(end_time,dataformat)<=__WEBPACK_IMPORTED_MODULE_20_moment___default()(publish_time,dataformat)){_this.setState({unit_e_tip:"截止时间不能小于发布时间"});return;}else if(__WEBPACK_IMPORTED_MODULE_20_moment___default()(end_time,dataformat)<=__WEBPACK_IMPORTED_MODULE_20_moment___default()()){_this.setState({unit_e_tip:"截止时间不能小于当前时间"});return;}else{_this.setState({unit_e_tip:""});}}_this.commitSetting(function(result){console.log(result);if(result.status==200){_this.props.showNotification(""+result.data.message);_this.getSettingInfo();_this.cancelEdit();}});}};_this.NotUnifiedSetting=function(){var result=_this.refs.pollDetailTabForthRules.exerciseSettingCheck(_this.state.rules);_this.setState({rules:result.rules});if(result.validate==false){return;}_this.commitSetting(function(result){console.log(result);if(result.status==200){_this.props.showNotification(""+result.data.message);_this.cancelEdit();_this.getSettingInfo();}});};_this.commitSetting=function(callback){var exercise_id=_this.props.match.params.Id;var url="/exercises/"+exercise_id+"/commit_setting.json";var params=[];if(_this.state.unified_setting){params={unified_setting:_this.state.unified_setting,publish_time:_this.state.publish_time,end_time:_this.state.end_time,show_statistic:_this.state.show_statistic,choice_random:_this.state.choice_random,score_open:_this.state.score_open,answer_open:_this.state.answer_open,question_random:_this.state.question_random,time:_this.state.time};}else{var list=_this.state.rules;var lists=[];list.map(function(item,key){var newlist={course_group_id:item.course_group_id,publish_time:item.publish_time,end_time:item.end_time};lists.push(newlist);});params={unified_setting:_this.state.unified_setting,show_statistic:_this.state.show_statistic,question_random:_this.state.question_random,choice_random:_this.state.choice_random,score_open:_this.state.score_open,answer_open:_this.state.answer_open,publish_time_groups:lists,time:_this.state.time};}__WEBPACK_IMPORTED_MODULE_22_axios___default.a.post(url,params).then(function(result){callback(result);}).catch(function(error){console.log(error);});};_this.rulesCheckInfo=function(rules){_this.setState({rules:rules});};_this.cancelBox=function(){_this.setState({modalsType:false,modalsTopval:"",loadtype:false});};_this.changeUnit=function(e){_this.setState({unified_setting:e.target.checked});};_this.ChangeFlagPublic=function(e){_this.setState({score_open:e.target.checked});};_this.ChangeFlagName=function(e){_this.setState({answer_open:e.target.checked});};_this.questionrandom=function(e){_this.setState({question_random:e.target.checked});};_this.choicerandom=function(e){_this.setState({choice_random:e.target.checked});};_this.funlatepenalty=function(e){var value=parseInt(e.target.value);if(isNaN(value)){value=0;}_this.setState({time:value});};_this.showstatistic=function(e){_this.setState({show_statistic:e.target.checked});};_this.onChangeTimepublish=function(date,dateString){if(date===null){_this.setState({publish_time:null,end_time:null});}else{if(__WEBPACK_IMPORTED_MODULE_20_moment___default()(Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["T" /* handleDateString */])(dateString),"YYYY-MM-DD HH:mm")<=__WEBPACK_IMPORTED_MODULE_20_moment___default()()){_this.setState({unit_p_tip:"发布时间不能早于当前时间",p_flag:true});}else{_this.setState({unit_p_tip:"",p_flag:false});}_this.setState({publish_time:Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["T" /* handleDateString */])(dateString),end_time:__WEBPACK_IMPORTED_MODULE_20_moment___default()(__WEBPACK_IMPORTED_MODULE_20_moment___default()(Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["T" /* handleDateString */])(dateString)).add(1,'months')).format("YYYY-MM-DD HH:mm")});}};_this.onChangeTimeEnd=function(date,dateString){if(date===null){_this.setState({end_time:null});}else{if(__WEBPACK_IMPORTED_MODULE_20_moment___default()(date,"YYYY-MM-DD HH:mm")<=__WEBPACK_IMPORTED_MODULE_20_moment___default()()){_this.setState({unit_e_tip:"截止时间不能早于当前时间",e_flag:true});}else if(__WEBPACK_IMPORTED_MODULE_20_moment___default()(date,"YYYY-MM-DD HH:mm")<=__WEBPACK_IMPORTED_MODULE_20_moment___default()(_this.state.publish_time,"YYYY-MM-DD HH:mm")){_this.setState({unit_e_tip:"截止时间不能早于发布时间",e_flag:true});}else{_this.setState({unit_e_tip:"",e_flag:false});}_this.setState({end_time:Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["T" /* handleDateString */])(dateString)});}};_this.editSetting=function(){if(_this.props.Commonheadofthetestpaper.course_is_end==true){_this.setState({modalsType:true,modalsTopval:"课堂已结束不能再修改!",loadtype:true,modalSave:_this.cancelBox});}else{_this.setState({flagPageEdit:true});}};_this.cancelEdit=function(){_this.getSettingInfo();_this.setState({flagPageEdit:false});};_this.state={flagPageEdit:undefined,flagPublic:undefined,flagRealName:undefined,unified_list:undefined,course_group:undefined,end_time:undefined,publish_time:undefined,unit_p_tip:"",unit_e_tip:"",rules:undefined,p_flag:true,e_flag:true,polls:undefined,//公用提示弹框相关
modalsType:false,modalsTopval:"",loadtype:false,modalSave:undefined,firstSetting:true,score_open:false,answer_open:false,unified_setting:true,show_statistic:false,question_random:true,choice_random:true,time:0,publish_timetype:false,end_timetype:false,exercise_group_id:[],page:1,limit:10,searchtext:"",order:"end_at"};console.log("Exercisesetting");console.log("69");console.log(props);return _this;}_createClass(Exercisesetting,[{key:"_getRequestParams",value:function _getRequestParams(){var _state=this.state,order=_state.order,exercise_group_id=_state.exercise_group_id,searchtext=_state.searchtext,page=_state.page,limit=_state.limit;return{page:page,search:searchtext,order:order,limit:limit,group_id:exercise_group_id};}//加载
},{key:"_getRequestParams",value:function _getRequestParams(){var _state2=this.state,order=_state2.order,exercise_group_id=_state2.exercise_group_id,searchtext=_state2.searchtext,page=_state2.page,limit=_state2.limit;return{page:page,search:searchtext,order:order,limit:limit,group_id:exercise_group_id};}// handleClick=(e)=>{
// console.log(e);
// }
// 已有设置数据的查询
//提交form表单
//跳转道描点的地方
// 非统一设置提交
// 是否统一设置
//是否公开统计
//是否实名问卷
//题目顺序随机打乱
//选项顺序随机打乱
//答题时间
//编辑
//取消编辑
},{key:"render",value:function render(){var _this2=this;var _state3=this.state,flagPageEdit=_state3.flagPageEdit,end_time=_state3.end_time,publish_time=_state3.publish_time,course_group=_state3.course_group,rules=_state3.rules,unit_p_tip=_state3.unit_p_tip,unit_e_tip=_state3.unit_e_tip,modalsType=_state3.modalsType,modalsTopval=_state3.modalsTopval,loadtype=_state3.loadtype,modalSave=_state3.modalSave,score_open=_state3.score_open,answer_open=_state3.answer_open,unified_setting=_state3.unified_setting,show_statistic=_state3.show_statistic,question_random=_state3.question_random,choice_random=_state3.choice_random,time=_state3.time,polls=_state3.polls,publish_timetype=_state3.publish_timetype,end_timetype=_state3.end_timetype;var getFieldDecorator=this.props.form.getFieldDecorator;var formItemLayout={labelCol:{xs:{span:24},// sm: { span: 8 },
sm:{span:24}},wrapperCol:{xs:{span:24},// sm: { span: 16 },
sm:{span:24}}};// console.log(flagPageEdit===true?polls&&polls.exercise_status===1?3:2:1)
console.log("asdasdasda");console.log(this.props);console.log(this.props.Commonheadofthetestpaper);return __WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_23__modals_Modals__["a" /* default */],{modalsType:modalsType,modalsTopval:modalsTopval,loadtype:loadtype,modalSave:modalSave}),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a,Object.assign({},formItemLayout,{onSubmit:this.handleSubmit}),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"edu-back-white"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"bor-bottom-greyE",style:{padding:"20px 30px 0px 30px"}},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"mb30 clearfix"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"font-16 fl"},"\u53D1\u5E03\u8BBE\u7F6E",__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c font-14"})),!flagPageEdit&&this.props.isAdmin()===true?__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("a",{className:"fr mr6 white-btn edu-blueline-btn lineh-24",onClick:this.editSetting},"\u7F16\u8F91\u8BBE\u7F6E"):""),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"pl25"},course_group&&course_group.length>1?__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"clearfix mb20"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.Item,{className:"fl pollForm"},getFieldDecorator('unified_setting')(__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox___default.a,{disabled:flagPageEdit===true?polls&&polls.exercise_status===1?false:true:true,className:"mr15 font-16 color-grey-6",checked:unified_setting?true:false,onChange:this.changeUnit},"\u7EDF\u4E00\u8BBE\u7F6E"))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c"},"(\u9009\u4E2D\u5219\u6240\u6709\u5206\u73ED\u4F7F\u7528\u76F8\u540C\u7684\u53D1\u5E03\u8BBE\u7F6E\uFF0C\u4EC5\u8BFE\u5802\u7BA1\u7406\u5458\u53EF\u4FEE\u6539\uFF1B\u5426\u5219\u5404\u4E2A\u5206\u73ED\u5141\u8BB8\u5355\u72EC\u8BBE\u7F6E)")):"",unified_setting===true?__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"clearfix",id:"publishtimeid"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"font-16 mr15 fl mt6"},"\u53D1\u5E03\u65F6\u95F4\uFF1A"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"fl"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip___default.a,{placement:"bottom",title:publish_timetype===true?this.props.isAdmin()?"发布时间已过,不能再修改":"":""},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_date_picker___default.a,{dropdownClassName:"hideDisable",placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",className:unit_p_tip&&unit_p_tip!=""?"noticeTip winput-240-40":"winput-240-40",showTime:{format:'HH:mm'},locale:__WEBPACK_IMPORTED_MODULE_21_antd_lib_date_picker_locale_zh_CN___default.a,format:"YYYY-MM-DD HH:mm",showToday:false,disabledTime:disabledDateTime,disabledDate:disabledDate,onChange:this.onChangeTimepublish,value:publish_time&&__WEBPACK_IMPORTED_MODULE_20_moment___default()(publish_time,"YYYY-MM-DD HH:mm"),disabled:publish_timetype===true?true:!flagPageEdit})),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"color-red lineh-25 clearfix",style:{height:"25px"}},unit_p_tip!=""?__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"fl"},unit_p_tip):"")),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c ml20 fl mt10"},"(\u5B66\u751F\u6536\u5230\u8BD5\u5377\u7684\u65F6\u95F4)")),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"clearfix"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"mr15 fl mt10 font-16"},"\u622A\u6B62\u65F6\u95F4\uFF1A"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"fl"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_date_picker___default.a,{dropdownClassName:"hideDisable",placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",className:unit_e_tip&&unit_e_tip!=""?"noticeTip winput-240-40 mr20":"winput-240-40 mr20",showTime:{format:'HH:mm'},locale:__WEBPACK_IMPORTED_MODULE_21_antd_lib_date_picker_locale_zh_CN___default.a,showToday:false,width:"240px",format:"YYYY-MM-DD HH:mm",disabledTime:disabledDateTime,disabledDate:disabledDate,onChange:this.onChangeTimeEnd,value:end_time&&__WEBPACK_IMPORTED_MODULE_20_moment___default()(end_time,"YYYY-MM-DD HH:mm"),disabled:end_timetype===true?true:!flagPageEdit}),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"color-red lineh-25 clearfix",style:{height:"25px"}},unit_e_tip&&unit_e_tip!=""?__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"fl"},unit_e_tip):"")),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c ml20 fl mt10"},"(\u5B66\u751F\u53EF\u4EE5\u7B54\u9898\u7684\u65F6\u95F4\u622A\u70B9)"))):__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__poll_PollDetailTabForthRules__["a" /* default */],Object.assign({},this.props,this.state,{ref:"pollDetailTabForthRules",rules:rules,type:"Exercise",course_group:course_group,flagPageEdit:flagPageEdit,rulesCheckInfo:function rulesCheckInfo(info){return _this2.rulesCheckInfo(info);},Commonheadofthetestpaper:this.props.Commonheadofthetestpaper})))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"bor-bottom-greyE padding20-30"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"mb30 clearfix font-16"},"\u7B54\u9898\u8BBE\u7F6E"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"pl25"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"mb20",style:{height:"20px"}},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"h21 mb30"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"fl mb10 mt5 mr10 font-16 color-grey-6"},"\u7B54\u9898\u65F6\u957F\uFF1A"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.Item,{className:"fl pollForm"},getFieldDecorator('time')(__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_antd_lib_input___default.a,{disabled:!flagPageEdit,className:"mr10",style:{width:"100px",height:"35px"},value:time===-1?"":time,onInput:this.funlatepenalty}))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"fl mb10 mt5 mr10 font-16 color-grey-6"},"\u5206\u949F"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"fl mb10 mt5 mr10 color-grey-c"},"(\u7A7A\u503C\uFF0C\u4EE3\u8868\u4E0D\u9650\u65F6\u957F\uFF1B\u975E\u7A7A\u503C\uFF0C\u4EE3\u8868\u9650\u5236\u65F6\u957F\uFF0C\u4ECE\u5B66\u751F\u9996\u6B21\u7B54\u9898\u5F00\u59CB\u6301\u7EED\u8BA1\u65F6)"))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:""},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"h21"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:" mb10 mt5 mr10 font-16 color-grey-6"},"\u7B54\u9898\u663E\u793A\uFF1A"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"clearfix mb20 mt20 pl33"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.Item,{className:"fl pollForm"},getFieldDecorator('question_random')(__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox___default.a,{disabled:!flagPageEdit,className:"mr15 font-16 color-grey-6",checked:question_random,onChange:this.questionrandom},"\u9898\u76EE\u987A\u5E8F\u968F\u673A\u6253\u4E71"))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c"},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9898\u76EE\u987A\u5E8F\u6309\u7167\u9898\u578B\u968F\u673A\u663E\u793A\uFF09")),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"clearfix pl33"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.Item,{className:"fl pollForm"},getFieldDecorator('choice_random')(__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox___default.a,{disabled:!flagPageEdit,className:"mr15 font-16 color-grey-6",checked:choice_random,onChange:this.choicerandom},"\u9009\u9879\u987A\u5E8F\u968F\u673A\u6253\u4E71"))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c"},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9009\u9879\u987A\u5E8F\u968F\u673A\u663E\u793A\uFF09")))))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"padding20-30"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"mb30 clearfix font-16"},"\u516C\u5F00\u8BBE\u7F6E"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"pl33"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"mb20"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.Item,{className:"fl pollForm"},getFieldDecorator('score_open')(__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox___default.a,{disabled:!flagPageEdit,className:"mr15 font-16 color-grey-6",checked:score_open,onChange:this.ChangeFlagPublic},"\u516C\u5F00\u6210\u7EE9"))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c"},"(\u9009\u4E2D\uFF0C\u5219\u5728\u8BD5\u5377\u622A\u6B62\u65F6\u95F4\u4E4B\u540E\uFF0C\u5DF2\u63D0\u4EA4\u7B54\u9898\u7684\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u5176\u5B83\u5B66\u751F\u7684\u6210\u7EE9\uFF0C\u5426\u5219\u53EA\u80FD\u67E5\u770B\u81EA\u5DF1\u7684\u6210\u7EE9)")),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"clearfix mb20"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.Item,{className:"fl pollForm"},getFieldDecorator('answer_open')(__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox___default.a,{disabled:!flagPageEdit,className:"mr15 font-16 color-grey-6",checked:answer_open,onChange:this.ChangeFlagName},"\u516C\u5F00\u7B54\u6848"))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c"},"(\u9009\u4E2D\uFF0C\u5219\u5728\u8BD5\u5377\u622A\u6B62\u65F6\u95F4\u4E4B\u540E\uFF0C\u5DF2\u63D0\u4EA4\u7B54\u9898\u7684\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u8BD5\u5377\u9898\u76EE\u7684\u7B54\u6848\uFF0C\u5426\u5219\u4E0D\u80FD\u67E5\u770B)")),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("p",{className:"clearfix mb5"},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.Item,{className:"fl pollForm"},getFieldDecorator('show_statistic')(__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_checkbox___default.a,{disabled:!flagPageEdit,className:"mr15 font-16 color-grey-6",checked:show_statistic,onChange:this.showstatistic},"\u516C\u5F00\u7EDF\u8BA1"))),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("span",{className:"color-grey-c"},"(\u9009\u4E2D\uFF0C\u5219\u5728\u8BD5\u5377\u622A\u6B62\u65F6\u95F4\u4E4B\u540E\uFF0C\u5DF2\u63D0\u4EA4\u7B54\u9898\u7684\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u7B54\u9898\u7EDF\u8BA1\uFF0C\u5426\u5219\u4E0D\u80FD\u67E5\u770B)"))))),flagPageEdit&&this.props.isAdmin()===true?__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("div",{className:"clearfix mt30 ml40",style:{paddingBottom:'40px'}},__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:"primary",htmlType:"submit",className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),__WEBPACK_IMPORTED_MODULE_14_react___default.a.createElement("a",{className:"defalutCancelbtn fl",onClick:this.cancelEdit},"\u53D6\u6D88")):""));}}]);return Exercisesetting;}(__WEBPACK_IMPORTED_MODULE_14_react__["Component"]);var WrappedExercisesetting=__WEBPACK_IMPORTED_MODULE_7_antd_lib_form___default.a.create({name:'exercisesetting'})(Exercisesetting);/* harmony default export */ __webpack_exports__["a"] = (WrappedExercisesetting);// //提交form表单
// handleSubmit = (e) => {
//
// let{unified_setting,answer_open}=this.state;
// e.preventDefault();
// let exercise_id=this.props.match.params.Id;
//
// this.props.form.validateFieldsAndScroll((err, values) => {
// debugger
// if(!err){
// // 第一次进行问卷设置或者勾选了统一设置
// if(unified_setting==true){
// if(this.state.p_flag == false && this.state.e_flag == true){
// // 选择了发布时间但截至时间没有选择
// this.setState({
// modalsType:true,
// modalsTopval:"请选择截止时间",
// loadtype:true,
// modalSave:this.cancelBox
// })
// return;
// }else if(this.state.p_flag == true && this.state.e_flag == true){
// // 如果两个时间都没有填写则弹出立即发布弹框
// let{publish_time,end_time}=this.state
// if(publish_time==undefined && end_time ==undefined){
//
// }else{
// // 否则就是选择的时间错误
// this.setState({
// modalsType:true,
// modalsTopval:"请选择正确的发布时间和截止时间",
// loadtype:true,
// modalSave:this.cancelBox
// })
// }
// return;
// }
// }
//
// let url=`/exercises/${exercise_id}/commit_setting.json`;
// let params=[];
// if(values.unitSet){
// params={
// unified_setting:values.unitSet,
// publish_time:this.state.publish_time,
// end_time:this.state.end_time,
// show_result:values.public,
// un_anonymous:values.real
// }
// }else{
// params={
// unified_setting:values.unitSet,
// show_result:values.public,
// un_anonymous:values.real,
// publish_time_groups:this.state.rules
// }
// }
// axios.post((url),{params}).then((result)=>{
// if(result.status==200){
// this.props.showNotification(`${result.data.message}`);
// }
// }).catch((error)=>{
// console.log(error);
// })
// }
// })
// }
/***/ }),
/***/ 4630:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_pagination_style_css__ = __webpack_require__(903);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_pagination_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_pagination_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_pagination__ = __webpack_require__(904);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_pagination___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_pagination__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_checkbox_style_css__ = __webpack_require__(317);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_checkbox_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_checkbox_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_checkbox__ = __webpack_require__(314);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_checkbox__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_router_dom__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Exercisetablesmubu__ = __webpack_require__(4631);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Exercisestatisticalresulttabel__ = __webpack_require__(4632);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__css_members_css__ = __webpack_require__(330);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__css_members_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__css_members_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__css_busyWork_css__ = __webpack_require__(1072);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__css_busyWork_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__css_busyWork_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__poll_pollStyle_css__ = __webpack_require__(1434);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__poll_pollStyle_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__poll_pollStyle_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i tr > th,.exerciseTable .ant-table-tbody > tr > td{\n\t\t\t\t\t\t\tpadding:16px 20px!important;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.exerciseTable .editormd-html-preview{\n\t\t\t\t\t\t\twidth:100%!important;\n\t\t\t\t\t\t}\n\t\t\t\t\t "),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("style",null,"\n\t\t\t\t// .ant-table-thead > tr > th{\n\t\t\t\t// text-align: center;\n\t\t\t\t// \t}\n\t\t\t\t.tasknamebox{\n\t\t\t width: 50px;\n\t\t\t height: 24px;\n\t\t\t border: 1px solid rgba(221,23,23,1);\n\t\t\t border-radius: 12px;\n\t\t\t color: rgba(221,23,23,1);\n\t\t\t display: inline-block;\n\t\t\t\t\tline-height: 24px;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\n\t\t\t\t\t.tasknameboxs{\n\t\t\t\t\t color: #666666 !important;\n\t\t\t\t\t background:rgba(237,237,237,1) !important;\n\t\t\t\t\t}\n\n\t\t\t\t .ant-table-tbody > tr > td{\n font-size:14px;\n\t\t\t\t\t}\n\t\t\t\t\t.task-hide{\n\t\t\t\t\t max-width: 345px;\n\t\t\t\t\t overflow: hidden;\n\t\t\t\t\t white-space: nowrap;\n\t\t\t\t\t text-overflow: ellipsis;\n\t\t\t\t\t}\n\t\t\t\t\t// .ant-table-tbody > tr{\n\t\t\t\t\t// height:64px;\n\t\t\t\t\t// text-align: center;\n\t\t\t\t\t// }\n .ant-progress-success-bg, .ant-progress-bg{\n background-color: #29BD8B !important;\n }\n .ant-table-thead > tr > th:nth-child(1){\n \t\t\t\ttext-align: left;\n }\n .ant-table-tbody > tr > td:nth-child(1){\n \t\ttext-align: left;\n }\n .Exermubu .ant-table-tbody > tr:nth-last-child(1) > td{\n\t\t\t\t\t border:1px solid transparent;\n }\n\t\t .Exermubu .editormd-html-preview, .Exermubu .editormd-preview-container {\n\t\t\t background: transparent;\n\t\t }\n\t\t\t"),data&&data.commit_results.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"stud-class-set mb20 exerciseTable",key:key},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"clearfix edu-back-white poll_list",style:{padding:'20px'}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"font-16 shixunreporttitle fl",style:{width:"1050px"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",{className:"C3333"},item.ques_position+".",item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":"","\u9898"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_educoder__["s" /* MarkdownToHtml */],{content:item.ques_title,selector:'ques_title_'+key,className:""}))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"fr shixunreporttitles mt3"},"\u6B63\u786E\u7387",__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",{style:{color:'#FF6800'}}," ",item.right_percent,"%"))),item.ques_type===5?item.ques_details.map(function(ite,k){return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"clearfix edu-back-white poll_list mb10",style:{padding:'0px 20px'}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"font-16 shixunreporttitle fl pt20 pb20"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",null,ite.challenge_position,"\uFF1A",ite.challenge_name)),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"fr shixunreporttitles"},"\u6B63\u786E\u7387",__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",{style:{color:'#FF6800'}}," ",ite.challenge_percent,"%"))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__Exercisetablesmubu__["a" /* default */],{tableNum:""+key+k,data:ite.challenge_details,type:item.ques_type,effictive_counts:item.effictive_counts,choicetype:choicetype}));}):__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__Exercisetablesmubu__["a" /* default */],{tableNum:key,data:item.ques_details,type:item.ques_type,effictive_counts:item.effictive_counts,choicetype:choicetype}));})),data&&data.questions_count>10&&__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"mb40 edu-txt-center padding20-30"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_pagination___default.a,{showQuickJumper:true,defaultCurrent:1,pageSize:limit,total:data&&data.questions_count,current:page,onChange:this.PaginationCourse})));}}]);return Exercisestatisticalresult;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (Exercisestatisticalresult);
/***/ }),
/***/ 4631:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__ = __webpack_require__(1219);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table__ = __webpack_require__(1220);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_table__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_progress_style_css__ = __webpack_require__(1113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_progress_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_progress_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_progress__ = __webpack_require__(1114);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_progress___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_progress__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_router_dom__ = __webpack_require__(44);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i tr > th {\n\t\t\t\t\t\t\t background: #fff !important;\n border-bottom: 1px solid #F4F4F4 !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t.Exermubu .ant-table-thead .ant-table-column-title{\n\t\t\t\t\t\t\t\tcolor:#999999;\n\t\t\t\t\t}\n\n\t\t\t\t\t.Exermubu .ant-table-tbody> tr > td{\n \t\t\tborder-bottom: transparent;\n\t\t\t\t\t}\n\n\t\t\t"),datas===undefined?"":__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_table___default.a,{className:"Exermubu",dataSource:datas,columns:columns,pagination:false// loading={loadingstate}
// onChange={this.TablePagination}
}));}}]);return Exercisetablesmubus;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (Exercisetablesmubus);
/***/ }),
/***/ 4632:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__ = __webpack_require__(1219);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table__ = __webpack_require__(1220);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_table__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_router_dom__ = __webpack_require__(44);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i{ })
datas.push({commit_percent:data&&data.exercise_counts.commit_percent,min_score:data&&data.exercise_counts.min_score,max_score:data&&data.exercise_counts.max_score,average_score:data&&data.exercise_counts.average_score,fail_counts:data&&data.exercise_counts.fail_counts,pass_counts:data&&data.exercise_counts.pass_counts,good_counts:data&&data.exercise_counts.good_counts,best_counts:data&&data.exercise_counts.best_counts});var columns=[{title:'提交率',dataIndex:'commit_percent',key:'commit_percent',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#333333'}},record.commit_percent===0?0:(record.commit_percent*100).toFixed(2),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"%"));}},{title:'最低分',dataIndex:'min_score',key:'min_score',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#333333'}},record.min_score,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"\u5206")));}},{title:'最高分',dataIndex:'max_score',key:'max_score',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#FF6800'}},record.max_score,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"\u5206"));}},{title:'平均分',key:'average_score',dataIndex:'average_score',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#333333'}},record.average_score,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"\u5206"));}},{title:'不及格(得分 低于60%)',key:'fail_counts',dataIndex:'fail_counts',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#333333'}},record.fail_counts,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"\u4EBA"));}},{title:'及格(得分 60%~70%)',key:'pass_counts',dataIndex:'pass_counts',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#333333'}},record.pass_counts,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"\u4EBA"));}},{title:'良好(得分 70%~90%)',key:'good_counts',dataIndex:'good_counts',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#333333'}},record.good_counts,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"\u4EBA")));}},{title:'优秀(得分 90%~100%)',key:'best_counts',dataIndex:'best_counts',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{style:{color:'#FF6800'}},record.best_counts,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span",{className:"font-size12"},"\u4EBA")));}}];// {
// title: '调分',
// key: 'adjustmentminute',
// dataIndex: 'adjustmentminute',
//
// render: (text, record) => (
//
// 6小时 50分钟 6秒
//
// ),
// },
return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("style",null,"\n\t\t\t\t.ant-table-thead > tr > th{\n\t\t\t\t text-align: center;\n\t\t\t\t\t}\n\t\t\t\t.tasknamebox{\n\t\t\t width: 50px;\n\t\t\t height: 24px;\n\t\t\t border: 1px solid rgba(221,23,23,1);\n\t\t\t border-radius: 12px;\n\t\t\t color: rgba(221,23,23,1);\n\t\t\t display: inline-block;\n\t\t\t\t\tline-height: 24px;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\n\t\t\t\t\t.tasknameboxs{\n\t\t\t\t\t color: #666666 !important;\n\t\t\t\t\t background:rgba(237,237,237,1) !important;\n\t\t\t\t\t}\n\n\t\t\t\t .ant-table-tbody > tr > td{\n font-size:14px;\n\t\t\t\t\t}\n\t\t\t\t\t.task-hide{\n\t\t\t\t\t max-width: 345px;\n\t\t\t\t\t overflow: hidden;\n\t\t\t\t\t white-space: nowrap;\n\t\t\t\t\t text-overflow: ellipsis;\n\t\t\t\t\t}\n\t\t\t\t\t.ant-table-tbody > tr{\n\t\t\t\t\t height:64px;\n\t\t\t\t\t text-align: center;\n\t\t\t\t\t}\n\n\t\t\t\t\t.exerctabel .ant-table-tbody > tr >td{\n\t\t\t\t\t border:1px solid transparent;\n\t\t\t\t\t}\n\t\t\t\t\t.exerctabel .ant-table-thead > tr > th {\n\t\t\t\t\t\t\t background: #fff !important;\n\t\t\t\t\t\t\t border-top: 1px solid #F4F4F4;\n border-bottom: 1px solid #F4F4F4 !important;\n\n\t\t\t\t\t}\n\n\t\t\t"),datas===undefined?"":__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_table___default.a,{className:"exerctabel",dataSource:datas,columns:columns,pagination:false// loading={loadingstate}
// onChange={this.TablePagination}
}));}}]);return OfficialAcademicTranscript;}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (OfficialAcademicTranscript);
/***/ }),
/***/ 4633:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(32);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(33);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_checkbox_style_css__ = __webpack_require__(317);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_checkbox_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_checkbox_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_checkbox__ = __webpack_require__(314);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_checkbox__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_notification_style_css__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_notification_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_notification_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_notification__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_notification___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_notification__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_axios__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i= len) {
return x;
}
switch (x) {
case '%s':
return String(args[i++]);
case '%d':
return Number(args[i++]);
case '%j':
try {
return JSON.stringify(args[i++]);
} catch (_) {
return '[Circular]';
}
break;
default:
return x;
}
});
for (var arg = args[i]; i < len; arg = args[++i]) {
str += ' ' + arg;
}
return str;
}
return f;
}
function isNativeStringType(type) {
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
}
function isEmptyValue(value, type) {
if (value === undefined || value === null) {
return true;
}
if (type === 'array' && Array.isArray(value) && !value.length) {
return true;
}
if (isNativeStringType(type) && typeof value === 'string' && !value) {
return true;
}
return false;
}
function isEmptyObject(obj) {
return Object.keys(obj).length === 0;
}
function asyncParallelArray(arr, func, callback) {
var results = [];
var total = 0;
var arrLength = arr.length;
function count(errors) {
results.push.apply(results, errors);
total++;
if (total === arrLength) {
callback(results);
}
}
arr.forEach(function (a) {
func(a, count);
});
}
function asyncSerialArray(arr, func, callback) {
var index = 0;
var arrLength = arr.length;
function next(errors) {
if (errors && errors.length) {
callback(errors);
return;
}
var original = index;
index = index + 1;
if (original < arrLength) {
func(arr[original], next);
} else {
callback([]);
}
}
next([]);
}
function flattenObjArr(objArr) {
var ret = [];
Object.keys(objArr).forEach(function (k) {
ret.push.apply(ret, objArr[k]);
});
return ret;
}
function asyncMap(objArr, option, func, callback) {
if (option.first) {
var flattenArr = flattenObjArr(objArr);
return asyncSerialArray(flattenArr, func, callback);
}
var firstFields = option.firstFields || [];
if (firstFields === true) {
firstFields = Object.keys(objArr);
}
var objArrKeys = Object.keys(objArr);
var objArrLength = objArrKeys.length;
var total = 0;
var results = [];
var pending = new Promise(function (resolve, reject) {
var next = function next(errors) {
results.push.apply(results, errors);
total++;
if (total === objArrLength) {
callback(results);
return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve();
}
};
objArrKeys.forEach(function (key) {
var arr = objArr[key];
if (firstFields.indexOf(key) !== -1) {
asyncSerialArray(arr, func, next);
} else {
asyncParallelArray(arr, func, next);
}
});
});
pending['catch'](function (e) {
return e;
});
return pending;
}
function complementError(rule) {
return function (oe) {
if (oe && oe.message) {
oe.field = oe.field || rule.fullField;
return oe;
}
return {
message: typeof oe === 'function' ? oe() : oe,
field: oe.field || rule.fullField
};
};
}
function deepMerge(target, source) {
if (source) {
for (var s in source) {
if (source.hasOwnProperty(s)) {
var value = source[s];
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(target[s]) === 'object') {
target[s] = _extends({}, target[s], value);
} else {
target[s] = value;
}
}
}
}
return target;
}
/***/ }),
/***/ 875:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _required = __webpack_require__(915);
var _required2 = _interopRequireDefault(_required);
var _whitespace = __webpack_require__(1038);
var _whitespace2 = _interopRequireDefault(_whitespace);
var _type = __webpack_require__(1039);
var _type2 = _interopRequireDefault(_type);
var _range = __webpack_require__(1040);
var _range2 = _interopRequireDefault(_range);
var _enum = __webpack_require__(1041);
var _enum2 = _interopRequireDefault(_enum);
var _pattern = __webpack_require__(1042);
var _pattern2 = _interopRequireDefault(_pattern);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
exports['default'] = {
required: _required2['default'],
whitespace: _whitespace2['default'],
type: _type2['default'],
range: _range2['default'],
'enum': _enum2['default'],
pattern: _pattern2['default']
};
/***/ }),
/***/ 877:
/***/ (function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/***/ 878:
/***/ (function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(958),
getValue = __webpack_require__(961);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ }),
/***/ 879:
/***/ (function(module, exports, __webpack_require__) {
var eq = __webpack_require__(883);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ }),
/***/ 880:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ }),
/***/ 881:
/***/ (function(module, exports, __webpack_require__) {
var isKeyable = __webpack_require__(970);
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
module.exports = getMapData;
/***/ }),
/***/ 882:
/***/ (function(module, exports, __webpack_require__) {
var isSymbol = __webpack_require__(321);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = toKey;
/***/ }),
/***/ 883:
/***/ (function(module, exports) {
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
module.exports = eq;
/***/ }),
/***/ 884:
/***/ (function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(877),
isKey = __webpack_require__(896),
stringToPath = __webpack_require__(975),
toString = __webpack_require__(946);
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
module.exports = castPath;
/***/ }),
/***/ 886:
/***/ (function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(953),
listCacheDelete = __webpack_require__(954),
listCacheGet = __webpack_require__(955),
listCacheHas = __webpack_require__(956),
listCacheSet = __webpack_require__(957);
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ }),
/***/ 888:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
exports.getTodayTime = getTodayTime;
exports.getTitleString = getTitleString;
exports.getTodayTimeStr = getTodayTimeStr;
exports.getMonthName = getMonthName;
exports.syncTime = syncTime;
exports.getTimeConfig = getTimeConfig;
exports.isTimeValidByConfig = isTimeValidByConfig;
exports.isTimeValid = isTimeValid;
exports.isAllowedDate = isAllowedDate;
exports.formatDate = formatDate;
var _moment = __webpack_require__(86);
var _moment2 = _interopRequireDefault(_moment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var defaultDisabledTime = {
disabledHours: function disabledHours() {
return [];
},
disabledMinutes: function disabledMinutes() {
return [];
},
disabledSeconds: function disabledSeconds() {
return [];
}
};
function getTodayTime(value) {
var today = (0, _moment2['default'])();
today.locale(value.locale()).utcOffset(value.utcOffset());
return today;
}
function getTitleString(value) {
return value.format('LL');
}
function getTodayTimeStr(value) {
var today = getTodayTime(value);
return getTitleString(today);
}
function getMonthName(month) {
var locale = month.locale();
var localeData = month.localeData();
return localeData[locale === 'zh-cn' ? 'months' : 'monthsShort'](month);
}
function syncTime(from, to) {
if (!_moment2['default'].isMoment(from) || !_moment2['default'].isMoment(to)) return;
to.hour(from.hour());
to.minute(from.minute());
to.second(from.second());
to.millisecond(from.millisecond());
}
function getTimeConfig(value, disabledTime) {
var disabledTimeConfig = disabledTime ? disabledTime(value) : {};
disabledTimeConfig = (0, _extends3['default'])({}, defaultDisabledTime, disabledTimeConfig);
return disabledTimeConfig;
}
function isTimeValidByConfig(value, disabledTimeConfig) {
var invalidTime = false;
if (value) {
var hour = value.hour();
var minutes = value.minute();
var seconds = value.second();
var disabledHours = disabledTimeConfig.disabledHours();
if (disabledHours.indexOf(hour) === -1) {
var disabledMinutes = disabledTimeConfig.disabledMinutes(hour);
if (disabledMinutes.indexOf(minutes) === -1) {
var disabledSeconds = disabledTimeConfig.disabledSeconds(hour, minutes);
invalidTime = disabledSeconds.indexOf(seconds) !== -1;
} else {
invalidTime = true;
}
} else {
invalidTime = true;
}
}
return !invalidTime;
}
function isTimeValid(value, disabledTime) {
var disabledTimeConfig = getTimeConfig(value, disabledTime);
return isTimeValidByConfig(value, disabledTimeConfig);
}
function isAllowedDate(value, disabledDate, disabledTime) {
if (disabledDate) {
if (disabledDate(value)) {
return false;
}
}
if (disabledTime) {
if (!isTimeValid(value, disabledTime)) {
return false;
}
}
return true;
}
function formatDate(value, format) {
if (!value) {
return '';
}
if (Array.isArray(format)) {
format = format[0];
}
return value.format(format);
}
/***/ }),
/***/ 889:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var MenuContext = (0, _createReactContext["default"])({
inlineCollapsed: false
});
var _default = MenuContext;
exports["default"] = _default;
//# sourceMappingURL=MenuContext.js.map
/***/ }),
/***/ 890:
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
/***/ }),
/***/ 891:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
exports.argumentContainer = argumentContainer;
exports.identity = identity;
exports.flattenArray = flattenArray;
exports.treeTraverse = treeTraverse;
exports.flattenFields = flattenFields;
exports.normalizeValidateRules = normalizeValidateRules;
exports.getValidateTriggers = getValidateTriggers;
exports.getValueFromEvent = getValueFromEvent;
exports.getErrorStrs = getErrorStrs;
exports.getParams = getParams;
exports.isEmptyObject = isEmptyObject;
exports.hasRules = hasRules;
exports.startsWith = startsWith;
var _hoistNonReactStatics = __webpack_require__(1026);
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
var _warning = __webpack_require__(323);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent';
}
function argumentContainer(Container, WrappedComponent) {
/* eslint no-param-reassign:0 */
Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')';
Container.WrappedComponent = WrappedComponent;
return (0, _hoistNonReactStatics2['default'])(Container, WrappedComponent);
}
function identity(obj) {
return obj;
}
function flattenArray(arr) {
return Array.prototype.concat.apply([], arr);
}
function treeTraverse() {
var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var tree = arguments[1];
var isLeafNode = arguments[2];
var errorMessage = arguments[3];
var callback = arguments[4];
if (isLeafNode(path, tree)) {
callback(path, tree);
} else if (tree === undefined || tree === null) {
// Do nothing
} else if (Array.isArray(tree)) {
tree.forEach(function (subTree, index) {
return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback);
});
} else {
// It's object and not a leaf node
if (typeof tree !== 'object') {
(0, _warning2['default'])(false, errorMessage);
return;
}
Object.keys(tree).forEach(function (subTreeKey) {
var subTree = tree[subTreeKey];
treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback);
});
}
}
function flattenFields(maybeNestedFields, isLeafNode, errorMessage) {
var fields = {};
treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) {
fields[path] = node;
});
return fields;
}
function normalizeValidateRules(validate, rules, validateTrigger) {
var validateRules = validate.map(function (item) {
var newItem = (0, _extends3['default'])({}, item, {
trigger: item.trigger || []
});
if (typeof newItem.trigger === 'string') {
newItem.trigger = [newItem.trigger];
}
return newItem;
});
if (rules) {
validateRules.push({
trigger: validateTrigger ? [].concat(validateTrigger) : [],
rules: rules
});
}
return validateRules;
}
function getValidateTriggers(validateRules) {
return validateRules.filter(function (item) {
return !!item.rules && item.rules.length;
}).map(function (item) {
return item.trigger;
}).reduce(function (pre, curr) {
return pre.concat(curr);
}, []);
}
function getValueFromEvent(e) {
// To support custom element
if (!e || !e.target) {
return e;
}
var target = e.target;
return target.type === 'checkbox' ? target.checked : target.value;
}
function getErrorStrs(errors) {
if (errors) {
return errors.map(function (e) {
if (e && e.message) {
return e.message;
}
return e;
});
}
return errors;
}
function getParams(ns, opt, cb) {
var names = ns;
var options = opt;
var callback = cb;
if (cb === undefined) {
if (typeof names === 'function') {
callback = names;
options = {};
names = undefined;
} else if (Array.isArray(names)) {
if (typeof options === 'function') {
callback = options;
options = {};
} else {
options = options || {};
}
} else {
callback = options;
options = names || {};
names = undefined;
}
}
return {
names: names,
options: options,
callback: callback
};
}
function isEmptyObject(obj) {
return Object.keys(obj).length === 0;
}
function hasRules(validate) {
if (validate) {
return validate.some(function (item) {
return item.rules && item.rules.length;
});
}
return false;
}
function startsWith(str, prefix) {
return str.lastIndexOf(prefix, 0) === 0;
}
/***/ }),
/***/ 892:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
ZERO: 48,
NINE: 57,
NUMPAD_ZERO: 96,
NUMPAD_NINE: 105,
BACKSPACE: 8,
DELETE: 46,
ENTER: 13,
ARROW_UP: 38,
ARROW_DOWN: 40
});
/***/ }),
/***/ 893:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878),
root = __webpack_require__(167);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ }),
/***/ 894:
/***/ (function(module, exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(962),
mapCacheDelete = __webpack_require__(969),
mapCacheGet = __webpack_require__(971),
mapCacheHas = __webpack_require__(972),
mapCacheSet = __webpack_require__(973);
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ }),
/***/ 895:
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ }),
/***/ 896:
/***/ (function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(877),
isSymbol = __webpack_require__(321);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
module.exports = isKey;
/***/ }),
/***/ 899:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["e"] = getTodayTime;
/* harmony export (immutable) */ __webpack_exports__["d"] = getTitleString;
/* harmony export (immutable) */ __webpack_exports__["f"] = getTodayTimeStr;
/* harmony export (immutable) */ __webpack_exports__["b"] = getMonthName;
/* harmony export (immutable) */ __webpack_exports__["h"] = syncTime;
/* harmony export (immutable) */ __webpack_exports__["c"] = getTimeConfig;
/* unused harmony export isTimeValidByConfig */
/* unused harmony export isTimeValid */
/* harmony export (immutable) */ __webpack_exports__["g"] = isAllowedDate;
/* harmony export (immutable) */ __webpack_exports__["a"] = formatDate;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment__ = __webpack_require__(86);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_moment__);
var defaultDisabledTime = {
disabledHours: function disabledHours() {
return [];
},
disabledMinutes: function disabledMinutes() {
return [];
},
disabledSeconds: function disabledSeconds() {
return [];
}
};
function getTodayTime(value) {
var today = __WEBPACK_IMPORTED_MODULE_1_moment___default()();
today.locale(value.locale()).utcOffset(value.utcOffset());
return today;
}
function getTitleString(value) {
return value.format('LL');
}
function getTodayTimeStr(value) {
var today = getTodayTime(value);
return getTitleString(today);
}
function getMonthName(month) {
var locale = month.locale();
var localeData = month.localeData();
return localeData[locale === 'zh-cn' ? 'months' : 'monthsShort'](month);
}
function syncTime(from, to) {
if (!__WEBPACK_IMPORTED_MODULE_1_moment___default.a.isMoment(from) || !__WEBPACK_IMPORTED_MODULE_1_moment___default.a.isMoment(to)) return;
to.hour(from.hour());
to.minute(from.minute());
to.second(from.second());
to.millisecond(from.millisecond());
}
function getTimeConfig(value, disabledTime) {
var disabledTimeConfig = disabledTime ? disabledTime(value) : {};
disabledTimeConfig = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, defaultDisabledTime, disabledTimeConfig);
return disabledTimeConfig;
}
function isTimeValidByConfig(value, disabledTimeConfig) {
var invalidTime = false;
if (value) {
var hour = value.hour();
var minutes = value.minute();
var seconds = value.second();
var disabledHours = disabledTimeConfig.disabledHours();
if (disabledHours.indexOf(hour) === -1) {
var disabledMinutes = disabledTimeConfig.disabledMinutes(hour);
if (disabledMinutes.indexOf(minutes) === -1) {
var disabledSeconds = disabledTimeConfig.disabledSeconds(hour, minutes);
invalidTime = disabledSeconds.indexOf(seconds) !== -1;
} else {
invalidTime = true;
}
} else {
invalidTime = true;
}
}
return !invalidTime;
}
function isTimeValid(value, disabledTime) {
var disabledTimeConfig = getTimeConfig(value, disabledTime);
return isTimeValidByConfig(value, disabledTimeConfig);
}
function isAllowedDate(value, disabledDate, disabledTime) {
if (disabledDate) {
if (disabledDate(value)) {
return false;
}
}
if (disabledTime) {
if (!isTimeValid(value, disabledTime)) {
return false;
}
}
return true;
}
function formatDate(value, format) {
if (!value) {
return '';
}
if (Array.isArray(format)) {
format = format[0];
}
return value.format(format);
}
/***/ }),
/***/ 900:
/***/ (function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/***/ 901:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var scrollbarVerticalSize;
var scrollbarHorizontalSize; // Measure scrollbar width for padding body during modal show/hide
var scrollbarMeasure = {
position: 'absolute',
top: '-9999px',
width: '50px',
height: '50px'
}; // This const is used for colgroup.col internal props. And should not provides to user.
exports.INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';
function measureScrollbar(_ref) {
var _ref$direction = _ref.direction,
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
prefixCls = _ref.prefixCls;
if (typeof document === 'undefined' || typeof window === 'undefined') {
return 0;
}
var isVertical = direction === 'vertical';
if (isVertical && scrollbarVerticalSize) {
return scrollbarVerticalSize;
}
if (!isVertical && scrollbarHorizontalSize) {
return scrollbarHorizontalSize;
}
var scrollDiv = document.createElement('div');
Object.keys(scrollbarMeasure).forEach(function (scrollProp) {
scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp];
}); // apply hide scrollbar className ahead
scrollDiv.className = "".concat(prefixCls, "-hide-scrollbar scroll-div-append-to-body"); // Append related overflow style
if (isVertical) {
scrollDiv.style.overflowY = 'scroll';
} else {
scrollDiv.style.overflowX = 'scroll';
}
document.body.appendChild(scrollDiv);
var size = 0;
if (isVertical) {
size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
scrollbarVerticalSize = size;
} else {
size = scrollDiv.offsetHeight - scrollDiv.clientHeight;
scrollbarHorizontalSize = size;
}
document.body.removeChild(scrollDiv);
return size;
}
exports.measureScrollbar = measureScrollbar;
function debounce(func, wait, immediate) {
var timeout;
function debounceFunc() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var context = this; // https://fb.me/react-event-pooling
if (args[0] && args[0].persist) {
args[0].persist();
}
var later = function later() {
timeout = null;
if (!immediate) {
func.apply(context, args);
}
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
func.apply(context, args);
}
}
debounceFunc.cancel = function cancel() {
if (timeout) {
clearTimeout(timeout);
timeout = null;
}
};
return debounceFunc;
}
exports.debounce = debounce;
function remove(array, item) {
var index = array.indexOf(item);
var front = array.slice(0, index);
var last = array.slice(index + 1, array.length);
return front.concat(last);
}
exports.remove = remove;
/**
* Returns only data- and aria- key/value pairs
* @param {object} props
*/
function getDataAndAriaProps(props) {
return Object.keys(props).reduce(function (memo, key) {
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {
memo[key] = props[key];
}
return memo;
}, {});
}
exports.getDataAndAriaProps = getDataAndAriaProps;
/***/ }),
/***/ 902:
/***/ (function(module, exports) {
/**
* Helper function for iterating over a collection
*
* @param collection
* @param fn
*/
function each(collection, fn) {
var i = 0,
length = collection.length,
cont;
for(i; i < length; i++) {
cont = fn(collection[i], i);
if(cont === false) {
break; //allow early exit
}
}
}
/**
* Helper function for determining whether target object is an array
*
* @param target the object under test
* @return {Boolean} true if array, false otherwise
*/
function isArray(target) {
return Object.prototype.toString.apply(target) === '[object Array]';
}
/**
* Helper function for determining whether target object is a function
*
* @param target the object under test
* @return {Boolean} true if function, false otherwise
*/
function isFunction(target) {
return typeof target === 'function';
}
module.exports = {
isFunction : isFunction,
isArray : isArray,
each : each
};
/***/ }),
/***/ 903:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(926);
__webpack_require__(318);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 904:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Pagination = _interopRequireDefault(__webpack_require__(936));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _Pagination["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 905:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.SiderContext = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
var React = _interopRequireWildcard(__webpack_require__(0));
var _reactLifecyclesCompat = __webpack_require__(7);
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _layout = __webpack_require__(992);
var _configProvider = __webpack_require__(12);
var _icon = _interopRequireDefault(__webpack_require__(26));
var _isNumeric = _interopRequireDefault(__webpack_require__(996));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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; }
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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82
// TODO: Will be removed in antd 4.0 because we will no longer support ie9
if (typeof window !== 'undefined') {
var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
return {
media: mediaQuery,
matches: false,
addListener: function addListener() {},
removeListener: function removeListener() {}
};
}; // ref: https://github.com/ant-design/ant-design/issues/18774
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill;
}
var dimensionMaxMap = {
xs: '479.98px',
sm: '575.98px',
md: '767.98px',
lg: '991.98px',
xl: '1199.98px',
xxl: '1599.98px'
};
var SiderContext = (0, _createReactContext["default"])({});
exports.SiderContext = SiderContext;
var generateId = function () {
var i = 0;
return function () {
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
i += 1;
return "".concat(prefix).concat(i);
};
}();
var InternalSider =
/*#__PURE__*/
function (_React$Component) {
_inherits(InternalSider, _React$Component);
function InternalSider(props) {
var _this;
_classCallCheck(this, InternalSider);
_this = _possibleConstructorReturn(this, _getPrototypeOf(InternalSider).call(this, props));
_this.responsiveHandler = function (mql) {
_this.setState({
below: mql.matches
});
var onBreakpoint = _this.props.onBreakpoint;
if (onBreakpoint) {
onBreakpoint(mql.matches);
}
if (_this.state.collapsed !== mql.matches) {
_this.setCollapsed(mql.matches, 'responsive');
}
};
_this.setCollapsed = function (collapsed, type) {
if (!('collapsed' in _this.props)) {
_this.setState({
collapsed: collapsed
});
}
var onCollapse = _this.props.onCollapse;
if (onCollapse) {
onCollapse(collapsed, type);
}
};
_this.toggle = function () {
var collapsed = !_this.state.collapsed;
_this.setCollapsed(collapsed, 'clickTrigger');
};
_this.belowShowChange = function () {
_this.setState(function (_ref) {
var belowShow = _ref.belowShow;
return {
belowShow: !belowShow
};
});
};
_this.renderSider = function (_ref2) {
var _classNames;
var getPrefixCls = _ref2.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
className = _a.className,
theme = _a.theme,
collapsible = _a.collapsible,
reverseArrow = _a.reverseArrow,
trigger = _a.trigger,
style = _a.style,
width = _a.width,
collapsedWidth = _a.collapsedWidth,
zeroWidthTriggerStyle = _a.zeroWidthTriggerStyle,
others = __rest(_a, ["prefixCls", "className", "theme", "collapsible", "reverseArrow", "trigger", "style", "width", "collapsedWidth", "zeroWidthTriggerStyle"]);
var prefixCls = getPrefixCls('layout-sider', customizePrefixCls);
var divProps = (0, _omit["default"])(others, ['collapsed', 'defaultCollapsed', 'onCollapse', 'breakpoint', 'onBreakpoint', 'siderHook', 'zeroWidthTriggerStyle']);
var rawWidth = _this.state.collapsed ? collapsedWidth : width; // use "px" as fallback unit for width
var siderWidth = (0, _isNumeric["default"])(rawWidth) ? "".concat(rawWidth, "px") : String(rawWidth); // special trigger when collapsedWidth == 0
var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? React.createElement("span", {
onClick: _this.toggle,
className: "".concat(prefixCls, "-zero-width-trigger ").concat(prefixCls, "-zero-width-trigger-").concat(reverseArrow ? 'right' : 'left'),
style: zeroWidthTriggerStyle
}, React.createElement(_icon["default"], {
type: "bars"
})) : null;
var iconObj = {
expanded: reverseArrow ? React.createElement(_icon["default"], {
type: "right"
}) : React.createElement(_icon["default"], {
type: "left"
}),
collapsed: reverseArrow ? React.createElement(_icon["default"], {
type: "left"
}) : React.createElement(_icon["default"], {
type: "right"
})
};
var status = _this.state.collapsed ? 'collapsed' : 'expanded';
var defaultTrigger = iconObj[status];
var triggerDom = trigger !== null ? zeroWidthTrigger || React.createElement("div", {
className: "".concat(prefixCls, "-trigger"),
onClick: _this.toggle,
style: {
width: siderWidth
}
}, trigger || defaultTrigger) : null;
var divStyle = _extends(_extends({}, style), {
flex: "0 0 ".concat(siderWidth),
maxWidth: siderWidth,
minWidth: siderWidth,
width: siderWidth
});
var siderCls = (0, _classnames["default"])(className, prefixCls, "".concat(prefixCls, "-").concat(theme), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-collapsed"), !!_this.state.collapsed), _defineProperty(_classNames, "".concat(prefixCls, "-has-trigger"), collapsible && trigger !== null && !zeroWidthTrigger), _defineProperty(_classNames, "".concat(prefixCls, "-below"), !!_this.state.below), _defineProperty(_classNames, "".concat(prefixCls, "-zero-width"), parseFloat(siderWidth) === 0), _classNames));
return React.createElement("aside", _extends({
className: siderCls
}, divProps, {
style: divStyle
}), React.createElement("div", {
className: "".concat(prefixCls, "-children")
}, _this.props.children), collapsible || _this.state.below && zeroWidthTrigger ? triggerDom : null);
};
_this.uniqueId = generateId('ant-sider-');
var matchMedia;
if (typeof window !== 'undefined') {
matchMedia = window.matchMedia;
}
if (matchMedia && props.breakpoint && props.breakpoint in dimensionMaxMap) {
_this.mql = matchMedia("(max-width: ".concat(dimensionMaxMap[props.breakpoint], ")"));
}
var collapsed;
if ('collapsed' in props) {
collapsed = props.collapsed;
} else {
collapsed = props.defaultCollapsed;
}
_this.state = {
collapsed: collapsed,
below: false
};
return _this;
}
_createClass(InternalSider, [{
key: "componentDidMount",
value: function componentDidMount() {
if (this.mql) {
this.mql.addListener(this.responsiveHandler);
this.responsiveHandler(this.mql);
}
if (this.props.siderHook) {
this.props.siderHook.addSider(this.uniqueId);
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.mql) {
this.mql.removeListener(this.responsiveHandler);
}
if (this.props.siderHook) {
this.props.siderHook.removeSider(this.uniqueId);
}
}
}, {
key: "render",
value: function render() {
var collapsed = this.state.collapsed;
var collapsedWidth = this.props.collapsedWidth;
return React.createElement(SiderContext.Provider, {
value: {
siderCollapsed: collapsed,
collapsedWidth: collapsedWidth
}
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderSider));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('collapsed' in nextProps) {
return {
collapsed: nextProps.collapsed
};
}
return null;
}
}]);
return InternalSider;
}(React.Component);
InternalSider.defaultProps = {
collapsible: false,
defaultCollapsed: false,
reverseArrow: false,
width: 200,
collapsedWidth: 80,
style: {},
theme: 'dark'
};
(0, _reactLifecyclesCompat.polyfill)(InternalSider); // eslint-disable-next-line react/prefer-stateless-function
var Sider =
/*#__PURE__*/
function (_React$Component2) {
_inherits(Sider, _React$Component2);
function Sider() {
_classCallCheck(this, Sider);
return _possibleConstructorReturn(this, _getPrototypeOf(Sider).apply(this, arguments));
}
_createClass(Sider, [{
key: "render",
value: function render() {
var _this2 = this;
return React.createElement(_layout.LayoutContext.Consumer, null, function (context) {
return React.createElement(InternalSider, _extends({}, context, _this2.props));
});
}
}]);
return Sider;
}(React.Component);
exports["default"] = Sider;
//# sourceMappingURL=Sider.js.map
/***/ }),
/***/ 906:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var RowContext = (0, _createReactContext["default"])({});
var _default = RowContext;
exports["default"] = _default;
//# sourceMappingURL=RowContext.js.map
/***/ }),
/***/ 908:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(319),
isObject = __webpack_require__(170);
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
/***/ }),
/***/ 909:
/***/ (function(module, exports) {
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ }),
/***/ 910:
/***/ (function(module, exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(974),
isObjectLike = __webpack_require__(320);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;
/***/ }),
/***/ 911:
/***/ (function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(884),
toKey = __webpack_require__(882);
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
module.exports = baseGet;
/***/ }),
/***/ 914:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _objectWithoutProperties2 = __webpack_require__(75);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends5 = __webpack_require__(18);
var _extends6 = _interopRequireDefault(_extends5);
var _toConsumableArray2 = __webpack_require__(1021);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _createReactClass = __webpack_require__(1022);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _unsafeLifecyclesPolyfill = __webpack_require__(1034);
var _unsafeLifecyclesPolyfill2 = _interopRequireDefault(_unsafeLifecyclesPolyfill);
var _asyncValidator = __webpack_require__(1035);
var _asyncValidator2 = _interopRequireDefault(_asyncValidator);
var _warning = __webpack_require__(323);
var _warning2 = _interopRequireDefault(_warning);
var _get = __webpack_require__(923);
var _get2 = _interopRequireDefault(_get);
var _set = __webpack_require__(916);
var _set2 = _interopRequireDefault(_set);
var _eq = __webpack_require__(883);
var _eq2 = _interopRequireDefault(_eq);
var _createFieldsStore = __webpack_require__(1061);
var _createFieldsStore2 = _interopRequireDefault(_createFieldsStore);
var _utils = __webpack_require__(891);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/* eslint-disable react/prefer-es6-class */
/* eslint-disable prefer-promise-reject-errors */
var DEFAULT_TRIGGER = 'onChange';
function createBaseForm() {
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var validateMessages = option.validateMessages,
onFieldsChange = option.onFieldsChange,
onValuesChange = option.onValuesChange,
_option$mapProps = option.mapProps,
mapProps = _option$mapProps === undefined ? _utils.identity : _option$mapProps,
mapPropsToFields = option.mapPropsToFields,
fieldNameProp = option.fieldNameProp,
fieldMetaProp = option.fieldMetaProp,
fieldDataProp = option.fieldDataProp,
_option$formPropName = option.formPropName,
formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName,
formName = option.name,
withRef = option.withRef;
return function decorate(WrappedComponent) {
var Form = (0, _createReactClass2['default'])({
displayName: 'Form',
mixins: mixins,
getInitialState: function getInitialState() {
var _this = this;
var fields = mapPropsToFields && mapPropsToFields(this.props);
this.fieldsStore = (0, _createFieldsStore2['default'])(fields || {});
this.instances = {};
this.cachedBind = {};
this.clearedFieldMetaCache = {};
this.renderFields = {};
this.domFields = {};
// HACK: https://github.com/ant-design/ant-design/issues/6406
['getFieldsValue', 'getFieldValue', 'setFieldsInitialValue', 'getFieldsError', 'getFieldError', 'isFieldValidating', 'isFieldsValidating', 'isFieldsTouched', 'isFieldTouched'].forEach(function (key) {
_this[key] = function () {
var _fieldsStore;
if (false) {
(0, _warning2['default'])(false, 'you should not use `ref` on enhanced form, please use `wrappedComponentRef`. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');
}
return (_fieldsStore = _this.fieldsStore)[key].apply(_fieldsStore, arguments);
};
});
return {
submitting: false
};
},
componentDidMount: function componentDidMount() {
this.cleanUpUselessFields();
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
if (mapPropsToFields) {
this.fieldsStore.updateFields(mapPropsToFields(nextProps));
}
},
componentDidUpdate: function componentDidUpdate() {
this.cleanUpUselessFields();
},
onCollectCommon: function onCollectCommon(name, action, args) {
var fieldMeta = this.fieldsStore.getFieldMeta(name);
if (fieldMeta[action]) {
fieldMeta[action].apply(fieldMeta, (0, _toConsumableArray3['default'])(args));
} else if (fieldMeta.originalProps && fieldMeta.originalProps[action]) {
var _fieldMeta$originalPr;
(_fieldMeta$originalPr = fieldMeta.originalProps)[action].apply(_fieldMeta$originalPr, (0, _toConsumableArray3['default'])(args));
}
var value = fieldMeta.getValueFromEvent ? fieldMeta.getValueFromEvent.apply(fieldMeta, (0, _toConsumableArray3['default'])(args)) : _utils.getValueFromEvent.apply(undefined, (0, _toConsumableArray3['default'])(args));
if (onValuesChange && value !== this.fieldsStore.getFieldValue(name)) {
var valuesAll = this.fieldsStore.getAllValues();
var valuesAllSet = {};
valuesAll[name] = value;
Object.keys(valuesAll).forEach(function (key) {
return (0, _set2['default'])(valuesAllSet, key, valuesAll[key]);
});
onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), (0, _set2['default'])({}, name, value), valuesAllSet);
}
var field = this.fieldsStore.getField(name);
return { name: name, field: (0, _extends6['default'])({}, field, { value: value, touched: true }), fieldMeta: fieldMeta };
},
onCollect: function onCollect(name_, action) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
var _onCollectCommon = this.onCollectCommon(name_, action, args),
name = _onCollectCommon.name,
field = _onCollectCommon.field,
fieldMeta = _onCollectCommon.fieldMeta;
var validate = fieldMeta.validate;
this.fieldsStore.setFieldsAsDirty();
var newField = (0, _extends6['default'])({}, field, {
dirty: (0, _utils.hasRules)(validate)
});
this.setFields((0, _defineProperty3['default'])({}, name, newField));
},
onCollectValidate: function onCollectValidate(name_, action) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
var _onCollectCommon2 = this.onCollectCommon(name_, action, args),
field = _onCollectCommon2.field,
fieldMeta = _onCollectCommon2.fieldMeta;
var newField = (0, _extends6['default'])({}, field, {
dirty: true
});
this.fieldsStore.setFieldsAsDirty();
this.validateFieldsInternal([newField], {
action: action,
options: {
firstFields: !!fieldMeta.validateFirst
}
});
},
getCacheBind: function getCacheBind(name, action, fn) {
if (!this.cachedBind[name]) {
this.cachedBind[name] = {};
}
var cache = this.cachedBind[name];
if (!cache[action] || cache[action].oriFn !== fn) {
cache[action] = {
fn: fn.bind(this, name, action),
oriFn: fn
};
}
return cache[action].fn;
},
getFieldDecorator: function getFieldDecorator(name, fieldOption) {
var _this2 = this;
var props = this.getFieldProps(name, fieldOption);
return function (fieldElem) {
// We should put field in record if it is rendered
_this2.renderFields[name] = true;
var fieldMeta = _this2.fieldsStore.getFieldMeta(name);
var originalProps = fieldElem.props;
if (false) {
var valuePropName = fieldMeta.valuePropName;
(0, _warning2['default'])(!(valuePropName in originalProps), '`getFieldDecorator` will override `' + valuePropName + '`, ' + ('so please don\'t set `' + valuePropName + '` directly ') + 'and use `setFieldsValue` to set it.');
var defaultValuePropName = 'default' + valuePropName[0].toUpperCase() + valuePropName.slice(1);
(0, _warning2['default'])(!(defaultValuePropName in originalProps), '`' + defaultValuePropName + '` is invalid ' + ('for `getFieldDecorator` will set `' + valuePropName + '`,') + ' please use `option.initialValue` instead.');
}
fieldMeta.originalProps = originalProps;
fieldMeta.ref = fieldElem.ref;
return _react2['default'].cloneElement(fieldElem, (0, _extends6['default'])({}, props, _this2.fieldsStore.getFieldValuePropValue(fieldMeta)));
};
},
getFieldProps: function getFieldProps(name) {
var _this3 = this;
var usersFieldOption = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!name) {
throw new Error('Must call `getFieldProps` with valid name string!');
}
if (false) {
(0, _warning2['default'])(this.fieldsStore.isValidNestedFieldName(name), 'One field name cannot be part of another, e.g. `a` and `a.b`. Check field: ' + name);
(0, _warning2['default'])(!('exclusive' in usersFieldOption), '`option.exclusive` of `getFieldProps`|`getFieldDecorator` had been remove.');
}
delete this.clearedFieldMetaCache[name];
var fieldOption = (0, _extends6['default'])({
name: name,
trigger: DEFAULT_TRIGGER,
valuePropName: 'value',
validate: []
}, usersFieldOption);
var rules = fieldOption.rules,
trigger = fieldOption.trigger,
_fieldOption$validate = fieldOption.validateTrigger,
validateTrigger = _fieldOption$validate === undefined ? trigger : _fieldOption$validate,
validate = fieldOption.validate;
var fieldMeta = this.fieldsStore.getFieldMeta(name);
if ('initialValue' in fieldOption) {
fieldMeta.initialValue = fieldOption.initialValue;
}
var inputProps = (0, _extends6['default'])({}, this.fieldsStore.getFieldValuePropValue(fieldOption), {
ref: this.getCacheBind(name, name + '__ref', this.saveRef)
});
if (fieldNameProp) {
inputProps[fieldNameProp] = formName ? formName + '_' + name : name;
}
var validateRules = (0, _utils.normalizeValidateRules)(validate, rules, validateTrigger);
var validateTriggers = (0, _utils.getValidateTriggers)(validateRules);
validateTriggers.forEach(function (action) {
if (inputProps[action]) return;
inputProps[action] = _this3.getCacheBind(name, action, _this3.onCollectValidate);
});
// make sure that the value will be collect
if (trigger && validateTriggers.indexOf(trigger) === -1) {
inputProps[trigger] = this.getCacheBind(name, trigger, this.onCollect);
}
var meta = (0, _extends6['default'])({}, fieldMeta, fieldOption, {
validate: validateRules
});
this.fieldsStore.setFieldMeta(name, meta);
if (fieldMetaProp) {
inputProps[fieldMetaProp] = meta;
}
if (fieldDataProp) {
inputProps[fieldDataProp] = this.fieldsStore.getField(name);
}
// This field is rendered, record it
this.renderFields[name] = true;
return inputProps;
},
getFieldInstance: function getFieldInstance(name) {
return this.instances[name];
},
getRules: function getRules(fieldMeta, action) {
var actionRules = fieldMeta.validate.filter(function (item) {
return !action || item.trigger.indexOf(action) >= 0;
}).map(function (item) {
return item.rules;
});
return (0, _utils.flattenArray)(actionRules);
},
setFields: function setFields(maybeNestedFields, callback) {
var _this4 = this;
var fields = this.fieldsStore.flattenRegisteredFields(maybeNestedFields);
this.fieldsStore.setFields(fields);
if (onFieldsChange) {
var changedFields = Object.keys(fields).reduce(function (acc, name) {
return (0, _set2['default'])(acc, name, _this4.fieldsStore.getField(name));
}, {});
onFieldsChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedFields, this.fieldsStore.getNestedAllFields());
}
this.forceUpdate(callback);
},
setFieldsValue: function setFieldsValue(changedValues, callback) {
var fieldsMeta = this.fieldsStore.fieldsMeta;
var values = this.fieldsStore.flattenRegisteredFields(changedValues);
var newFields = Object.keys(values).reduce(function (acc, name) {
var isRegistered = fieldsMeta[name];
if (false) {
(0, _warning2['default'])(isRegistered, 'Cannot use `setFieldsValue` until ' + 'you use `getFieldDecorator` or `getFieldProps` to register it.');
}
if (isRegistered) {
var value = values[name];
acc[name] = {
value: value
};
}
return acc;
}, {});
this.setFields(newFields, callback);
if (onValuesChange) {
var allValues = this.fieldsStore.getAllValues();
onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedValues, allValues);
}
},
saveRef: function saveRef(name, _, component) {
if (!component) {
var _fieldMeta = this.fieldsStore.getFieldMeta(name);
if (!_fieldMeta.preserve) {
// after destroy, delete data
this.clearedFieldMetaCache[name] = {
field: this.fieldsStore.getField(name),
meta: _fieldMeta
};
this.clearField(name);
}
delete this.domFields[name];
return;
}
this.domFields[name] = true;
this.recoverClearedField(name);
var fieldMeta = this.fieldsStore.getFieldMeta(name);
if (fieldMeta) {
var ref = fieldMeta.ref;
if (ref) {
if (typeof ref === 'string') {
throw new Error('can not set ref string for ' + name);
} else if (typeof ref === 'function') {
ref(component);
} else if (Object.prototype.hasOwnProperty.call(ref, 'current')) {
ref.current = component;
}
}
}
this.instances[name] = component;
},
cleanUpUselessFields: function cleanUpUselessFields() {
var _this5 = this;
var fieldList = this.fieldsStore.getAllFieldsName();
var removedList = fieldList.filter(function (field) {
var fieldMeta = _this5.fieldsStore.getFieldMeta(field);
return !_this5.renderFields[field] && !_this5.domFields[field] && !fieldMeta.preserve;
});
if (removedList.length) {
removedList.forEach(this.clearField);
}
this.renderFields = {};
},
clearField: function clearField(name) {
this.fieldsStore.clearField(name);
delete this.instances[name];
delete this.cachedBind[name];
},
resetFields: function resetFields(ns) {
var _this6 = this;
var newFields = this.fieldsStore.resetFields(ns);
if (Object.keys(newFields).length > 0) {
this.setFields(newFields);
}
if (ns) {
var names = Array.isArray(ns) ? ns : [ns];
names.forEach(function (name) {
return delete _this6.clearedFieldMetaCache[name];
});
} else {
this.clearedFieldMetaCache = {};
}
},
recoverClearedField: function recoverClearedField(name) {
if (this.clearedFieldMetaCache[name]) {
this.fieldsStore.setFields((0, _defineProperty3['default'])({}, name, this.clearedFieldMetaCache[name].field));
this.fieldsStore.setFieldMeta(name, this.clearedFieldMetaCache[name].meta);
delete this.clearedFieldMetaCache[name];
}
},
validateFieldsInternal: function validateFieldsInternal(fields, _ref, callback) {
var _this7 = this;
var fieldNames = _ref.fieldNames,
action = _ref.action,
_ref$options = _ref.options,
options = _ref$options === undefined ? {} : _ref$options;
var allRules = {};
var allValues = {};
var allFields = {};
var alreadyErrors = {};
fields.forEach(function (field) {
var name = field.name;
if (options.force !== true && field.dirty === false) {
if (field.errors) {
(0, _set2['default'])(alreadyErrors, name, { errors: field.errors });
}
return;
}
var fieldMeta = _this7.fieldsStore.getFieldMeta(name);
var newField = (0, _extends6['default'])({}, field);
newField.errors = undefined;
newField.validating = true;
newField.dirty = true;
allRules[name] = _this7.getRules(fieldMeta, action);
allValues[name] = newField.value;
allFields[name] = newField;
});
this.setFields(allFields);
// in case normalize
Object.keys(allValues).forEach(function (f) {
allValues[f] = _this7.fieldsStore.getFieldValue(f);
});
if (callback && (0, _utils.isEmptyObject)(allFields)) {
callback((0, _utils.isEmptyObject)(alreadyErrors) ? null : alreadyErrors, this.fieldsStore.getFieldsValue(fieldNames));
return;
}
var validator = new _asyncValidator2['default'](allRules);
if (validateMessages) {
validator.messages(validateMessages);
}
validator.validate(allValues, options, function (errors) {
var errorsGroup = (0, _extends6['default'])({}, alreadyErrors);
if (errors && errors.length) {
errors.forEach(function (e) {
var errorFieldName = e.field;
var fieldName = errorFieldName;
// Handle using array validation rule.
// ref: https://github.com/ant-design/ant-design/issues/14275
Object.keys(allRules).some(function (ruleFieldName) {
var rules = allRules[ruleFieldName] || [];
// Exist if match rule
if (ruleFieldName === errorFieldName) {
fieldName = ruleFieldName;
return true;
}
// Skip if not match array type
if (rules.every(function (_ref2) {
var type = _ref2.type;
return type !== 'array';
}) || errorFieldName.indexOf(ruleFieldName + '.') !== 0) {
return false;
}
// Exist if match the field name
var restPath = errorFieldName.slice(ruleFieldName.length + 1);
if (/^\d+$/.test(restPath)) {
fieldName = ruleFieldName;
return true;
}
return false;
});
var field = (0, _get2['default'])(errorsGroup, fieldName);
if (typeof field !== 'object' || Array.isArray(field)) {
(0, _set2['default'])(errorsGroup, fieldName, { errors: [] });
}
var fieldErrors = (0, _get2['default'])(errorsGroup, fieldName.concat('.errors'));
fieldErrors.push(e);
});
}
var expired = [];
var nowAllFields = {};
Object.keys(allRules).forEach(function (name) {
var fieldErrors = (0, _get2['default'])(errorsGroup, name);
var nowField = _this7.fieldsStore.getField(name);
// avoid concurrency problems
if (!(0, _eq2['default'])(nowField.value, allValues[name])) {
expired.push({
name: name
});
} else {
nowField.errors = fieldErrors && fieldErrors.errors;
nowField.value = allValues[name];
nowField.validating = false;
nowField.dirty = false;
nowAllFields[name] = nowField;
}
});
_this7.setFields(nowAllFields);
if (callback) {
if (expired.length) {
expired.forEach(function (_ref3) {
var name = _ref3.name;
var fieldErrors = [{
message: name + ' need to revalidate',
field: name
}];
(0, _set2['default'])(errorsGroup, name, {
expired: true,
errors: fieldErrors
});
});
}
callback((0, _utils.isEmptyObject)(errorsGroup) ? null : errorsGroup, _this7.fieldsStore.getFieldsValue(fieldNames));
}
});
},
validateFields: function validateFields(ns, opt, cb) {
var _this8 = this;
var pending = new Promise(function (resolve, reject) {
var _getParams = (0, _utils.getParams)(ns, opt, cb),
names = _getParams.names,
options = _getParams.options;
var _getParams2 = (0, _utils.getParams)(ns, opt, cb),
callback = _getParams2.callback;
if (!callback || typeof callback === 'function') {
var oldCb = callback;
callback = function callback(errors, values) {
if (oldCb) {
oldCb(errors, values);
}
if (errors) {
reject({ errors: errors, values: values });
} else {
resolve(values);
}
};
}
var fieldNames = names ? _this8.fieldsStore.getValidFieldsFullName(names) : _this8.fieldsStore.getValidFieldsName();
var fields = fieldNames.filter(function (name) {
var fieldMeta = _this8.fieldsStore.getFieldMeta(name);
return (0, _utils.hasRules)(fieldMeta.validate);
}).map(function (name) {
var field = _this8.fieldsStore.getField(name);
field.value = _this8.fieldsStore.getFieldValue(name);
return field;
});
if (!fields.length) {
callback(null, _this8.fieldsStore.getFieldsValue(fieldNames));
return;
}
if (!('firstFields' in options)) {
options.firstFields = fieldNames.filter(function (name) {
var fieldMeta = _this8.fieldsStore.getFieldMeta(name);
return !!fieldMeta.validateFirst;
});
}
_this8.validateFieldsInternal(fields, {
fieldNames: fieldNames,
options: options
}, callback);
});
pending['catch'](function (e) {
// eslint-disable-next-line no-console
if (console.error && "production" !== 'production') {
// eslint-disable-next-line no-console
console.error(e);
}
return e;
});
return pending;
},
isSubmitting: function isSubmitting() {
if (false) {
(0, _warning2['default'])(false, '`isSubmitting` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself.");
}
return this.state.submitting;
},
submit: function submit(callback) {
var _this9 = this;
if (false) {
(0, _warning2['default'])(false, '`submit` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself.");
}
var fn = function fn() {
_this9.setState({
submitting: false
});
};
this.setState({
submitting: true
});
callback(fn);
},
render: function render() {
var _props = this.props,
wrappedComponentRef = _props.wrappedComponentRef,
restProps = (0, _objectWithoutProperties3['default'])(_props, ['wrappedComponentRef']); // eslint-disable-line
var formProps = (0, _defineProperty3['default'])({}, formPropName, this.getForm());
if (withRef) {
if (false) {
(0, _warning2['default'])(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');
}
formProps.ref = 'wrappedComponent';
} else if (wrappedComponentRef) {
formProps.ref = wrappedComponentRef;
}
var props = mapProps.call(this, (0, _extends6['default'])({}, formProps, restProps));
return _react2['default'].createElement(WrappedComponent, props);
}
});
return (0, _utils.argumentContainer)((0, _unsafeLifecyclesPolyfill2['default'])(Form), WrappedComponent);
};
}
exports['default'] = createBaseForm;
module.exports = exports['default'];
/***/ }),
/***/ 915:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = __webpack_require__(874);
var util = _interopRequireWildcard(_util);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
/**
* Rule for validating required fields.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function required(rule, value, source, errors, options, type) {
if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {
errors.push(util.format(options.messages.required, rule.fullField));
}
}
exports['default'] = required;
/***/ }),
/***/ 916:
/***/ (function(module, exports, __webpack_require__) {
var baseSet = __webpack_require__(1057);
/**
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
* it's created. Arrays are created for missing index properties while objects
* are created for all other missing properties. Use `_.setWith` to customize
* `path` creation.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @returns {Object} Returns `object`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.set(object, 'a[0].b.c', 4);
* console.log(object.a[0].b.c);
* // => 4
*
* _.set(object, ['x', '0', 'y', 'z'], 5);
* console.log(object.x[0].y.z);
* // => 5
*/
function set(object, path, value) {
return object == null ? object : baseSet(object, path, value);
}
module.exports = set;
/***/ }),
/***/ 917:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
exports.isFormField = isFormField;
exports["default"] = createFormField;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Field = function Field(fields) {
(0, _classCallCheck3["default"])(this, Field);
(0, _extends3["default"])(this, fields);
};
function isFormField(obj) {
return obj instanceof Field;
}
function createFormField(field) {
if (isFormField(field)) {
return field;
}
return new Field(field);
}
/***/ }),
/***/ 918:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FIELD_DATA_PROP = exports.FIELD_META_PROP = void 0;
var FIELD_META_PROP = 'data-__meta';
exports.FIELD_META_PROP = FIELD_META_PROP;
var FIELD_DATA_PROP = 'data-__field';
exports.FIELD_DATA_PROP = FIELD_DATA_PROP;
//# sourceMappingURL=constants.js.map
/***/ }),
/***/ 919:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var FormContext = (0, _createReactContext["default"])({
labelAlign: 'right',
vertical: false
});
var _default = FormContext;
exports["default"] = _default;
//# sourceMappingURL=context.js.map
/***/ }),
/***/ 920:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.validProgress = validProgress;
// eslint-disable-next-line import/prefer-default-export
function validProgress(progress) {
if (!progress || progress < 0) {
return 0;
}
if (progress > 100) {
return 100;
}
return progress;
}
//# sourceMappingURL=utils.js.map
/***/ }),
/***/ 921:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcDropdown = _interopRequireDefault(__webpack_require__(1067));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _type = __webpack_require__(70);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Placements = (0, _type.tuple)('topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight');
var Dropdown =
/*#__PURE__*/
function (_React$Component) {
_inherits(Dropdown, _React$Component);
function Dropdown() {
var _this;
_classCallCheck(this, Dropdown);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).apply(this, arguments));
_this.renderOverlay = function (prefixCls) {
// rc-dropdown already can process the function of overlay, but we have check logic here.
// So we need render the element to check and pass back to rc-dropdown.
var overlay = _this.props.overlay;
var overlayNode;
if (typeof overlay === 'function') {
overlayNode = overlay();
} else {
overlayNode = overlay;
}
overlayNode = React.Children.only(overlayNode);
var overlayProps = overlayNode.props; // Warning if use other mode
(0, _warning["default"])(!overlayProps.mode || overlayProps.mode === 'vertical', 'Dropdown', "mode=\"".concat(overlayProps.mode, "\" is not supported for Dropdown's Menu.")); // menu cannot be selectable in dropdown defaultly
// menu should be focusable in dropdown defaultly
var _overlayProps$selecta = overlayProps.selectable,
selectable = _overlayProps$selecta === void 0 ? false : _overlayProps$selecta,
_overlayProps$focusab = overlayProps.focusable,
focusable = _overlayProps$focusab === void 0 ? true : _overlayProps$focusab;
var expandIcon = React.createElement("span", {
className: "".concat(prefixCls, "-menu-submenu-arrow")
}, React.createElement(_icon["default"], {
type: "right",
className: "".concat(prefixCls, "-menu-submenu-arrow-icon")
}));
var fixedModeOverlay = typeof overlayNode.type === 'string' ? overlay : React.cloneElement(overlayNode, {
mode: 'vertical',
selectable: selectable,
focusable: focusable,
expandIcon: expandIcon
});
return fixedModeOverlay;
};
_this.renderDropDown = function (_ref) {
var getContextPopupContainer = _ref.getPopupContainer,
getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
children = _this$props.children,
trigger = _this$props.trigger,
disabled = _this$props.disabled,
getPopupContainer = _this$props.getPopupContainer;
var prefixCls = getPrefixCls('dropdown', customizePrefixCls);
var child = React.Children.only(children);
var dropdownTrigger = React.cloneElement(child, {
className: (0, _classnames["default"])(child.props.className, "".concat(prefixCls, "-trigger")),
disabled: disabled
});
var triggerActions = disabled ? [] : trigger;
var alignPoint;
if (triggerActions && triggerActions.indexOf('contextMenu') !== -1) {
alignPoint = true;
}
return React.createElement(_rcDropdown["default"], _extends({
alignPoint: alignPoint
}, _this.props, {
prefixCls: prefixCls,
getPopupContainer: getPopupContainer || getContextPopupContainer,
transitionName: _this.getTransitionName(),
trigger: triggerActions,
overlay: function overlay() {
return _this.renderOverlay(prefixCls);
}
}), dropdownTrigger);
};
return _this;
}
_createClass(Dropdown, [{
key: "getTransitionName",
value: function getTransitionName() {
var _this$props2 = this.props,
_this$props2$placemen = _this$props2.placement,
placement = _this$props2$placemen === void 0 ? '' : _this$props2$placemen,
transitionName = _this$props2.transitionName;
if (transitionName !== undefined) {
return transitionName;
}
if (placement.indexOf('top') >= 0) {
return 'slide-down';
}
return 'slide-up';
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderDropDown);
}
}]);
return Dropdown;
}(React.Component);
exports["default"] = Dropdown;
Dropdown.defaultProps = {
mouseEnterDelay: 0.15,
mouseLeaveDelay: 0.1,
placement: 'bottomLeft'
};
//# sourceMappingURL=dropdown.js.map
/***/ }),
/***/ 922:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcMenu = _interopRequireWildcard(__webpack_require__(172));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _reactLifecyclesCompat = __webpack_require__(7);
var _SubMenu = _interopRequireDefault(__webpack_require__(1001));
var _MenuItem = _interopRequireDefault(__webpack_require__(1002));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
var _Sider = __webpack_require__(905);
var _raf = _interopRequireDefault(__webpack_require__(182));
var _motion = _interopRequireDefault(__webpack_require__(983));
var _MenuContext = _interopRequireDefault(__webpack_require__(889));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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); }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var InternalMenu =
/*#__PURE__*/
function (_React$Component) {
_inherits(InternalMenu, _React$Component);
function InternalMenu(props) {
var _this;
_classCallCheck(this, InternalMenu);
_this = _possibleConstructorReturn(this, _getPrototypeOf(InternalMenu).call(this, props)); // Restore vertical mode when menu is collapsed responsively when mounted
// https://github.com/ant-design/ant-design/issues/13104
// TODO: not a perfect solution, looking a new way to avoid setting switchingModeFromInline in this situation
_this.handleMouseEnter = function (e) {
_this.restoreModeVerticalFromInline();
var onMouseEnter = _this.props.onMouseEnter;
if (onMouseEnter) {
onMouseEnter(e);
}
};
_this.handleTransitionEnd = function (e) {
// when inlineCollapsed menu width animation finished
// https://github.com/ant-design/ant-design/issues/12864
var widthCollapsed = e.propertyName === 'width' && e.target === e.currentTarget; // Fix SVGElement e.target.className.indexOf is not a function
// https://github.com/ant-design/ant-design/issues/15699
var className = e.target.className; // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during an animation.
var classNameValue = Object.prototype.toString.call(className) === '[object SVGAnimatedString]' ? className.animVal : className; // Fix for , the width transition won't trigger when menu is collapsed
// https://github.com/ant-design/ant-design-pro/issues/2783
var iconScaled = e.propertyName === 'font-size' && classNameValue.indexOf('anticon') >= 0;
if (widthCollapsed || iconScaled) {
_this.restoreModeVerticalFromInline();
}
};
_this.handleClick = function (e) {
_this.handleOpenChange([]);
var onClick = _this.props.onClick;
if (onClick) {
onClick(e);
}
};
_this.handleOpenChange = function (openKeys) {
_this.setOpenKeys(openKeys);
var onOpenChange = _this.props.onOpenChange;
if (onOpenChange) {
onOpenChange(openKeys);
}
};
_this.renderMenu = function (_ref) {
var getPopupContainer = _ref.getPopupContainer,
getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
className = _this$props.className,
theme = _this$props.theme,
collapsedWidth = _this$props.collapsedWidth;
var passProps = (0, _omit["default"])(_this.props, ['collapsedWidth', 'siderCollapsed']);
var menuMode = _this.getRealMenuMode();
var menuOpenMotion = _this.getOpenMotionProps(menuMode);
var prefixCls = getPrefixCls('menu', customizePrefixCls);
var menuClassName = (0, _classnames["default"])(className, "".concat(prefixCls, "-").concat(theme), _defineProperty({}, "".concat(prefixCls, "-inline-collapsed"), _this.getInlineCollapsed()));
var menuProps = _extends({
openKeys: _this.state.openKeys,
onOpenChange: _this.handleOpenChange,
className: menuClassName,
mode: menuMode
}, menuOpenMotion);
if (menuMode !== 'inline') {
// closing vertical popup submenu after click it
menuProps.onClick = _this.handleClick;
} // https://github.com/ant-design/ant-design/issues/8587
var hideMenu = _this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px');
if (hideMenu) {
menuProps.openKeys = [];
}
return React.createElement(_rcMenu["default"], _extends({
getPopupContainer: getPopupContainer
}, passProps, menuProps, {
prefixCls: prefixCls,
onTransitionEnd: _this.handleTransitionEnd,
onMouseEnter: _this.handleMouseEnter
}));
};
(0, _warning["default"])(!('onOpen' in props || 'onClose' in props), 'Menu', '`onOpen` and `onClose` are removed, please use `onOpenChange` instead, ' + 'see: https://u.ant.design/menu-on-open-change.');
(0, _warning["default"])(!('inlineCollapsed' in props && props.mode !== 'inline'), 'Menu', '`inlineCollapsed` should only be used when `mode` is inline.');
(0, _warning["default"])(!(props.siderCollapsed !== undefined && 'inlineCollapsed' in props), 'Menu', '`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.');
var openKeys;
if ('openKeys' in props) {
openKeys = props.openKeys;
} else if ('defaultOpenKeys' in props) {
openKeys = props.defaultOpenKeys;
}
_this.state = {
openKeys: openKeys || [],
switchingModeFromInline: false,
inlineOpenKeys: [],
prevProps: props
};
return _this;
}
_createClass(InternalMenu, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
_raf["default"].cancel(this.mountRafId);
}
}, {
key: "setOpenKeys",
value: function setOpenKeys(openKeys) {
if (!('openKeys' in this.props)) {
this.setState({
openKeys: openKeys
});
}
}
}, {
key: "getRealMenuMode",
value: function getRealMenuMode() {
var inlineCollapsed = this.getInlineCollapsed();
if (this.state.switchingModeFromInline && inlineCollapsed) {
return 'inline';
}
var mode = this.props.mode;
return inlineCollapsed ? 'vertical' : mode;
}
}, {
key: "getInlineCollapsed",
value: function getInlineCollapsed() {
var inlineCollapsed = this.props.inlineCollapsed;
if (this.props.siderCollapsed !== undefined) {
return this.props.siderCollapsed;
}
return inlineCollapsed;
}
}, {
key: "getOpenMotionProps",
value: function getOpenMotionProps(menuMode) {
var _this$props2 = this.props,
openTransitionName = _this$props2.openTransitionName,
openAnimation = _this$props2.openAnimation,
motion = _this$props2.motion; // Provides by user
if (motion) {
return {
motion: motion
};
}
if (openAnimation) {
(0, _warning["default"])(typeof openAnimation === 'string', 'Menu', '`openAnimation` do not support object. Please use `motion` instead.');
return {
openAnimation: openAnimation
};
}
if (openTransitionName) {
return {
openTransitionName: openTransitionName
};
} // Default logic
if (menuMode === 'horizontal') {
return {
motion: {
motionName: 'slide-up'
}
};
}
if (menuMode === 'inline') {
return {
motion: _motion["default"]
};
} // When mode switch from inline
// submenu should hide without animation
return {
motion: {
motionName: this.state.switchingModeFromInline ? '' : 'zoom-big'
}
};
}
}, {
key: "restoreModeVerticalFromInline",
value: function restoreModeVerticalFromInline() {
var switchingModeFromInline = this.state.switchingModeFromInline;
if (switchingModeFromInline) {
this.setState({
switchingModeFromInline: false
});
}
}
}, {
key: "render",
value: function render() {
return React.createElement(_MenuContext["default"].Provider, {
value: {
inlineCollapsed: this.getInlineCollapsed() || false,
antdMenuTheme: this.props.theme
}
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderMenu));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, prevState) {
var prevProps = prevState.prevProps;
var newState = {
prevProps: nextProps
};
if (prevProps.mode === 'inline' && nextProps.mode !== 'inline') {
newState.switchingModeFromInline = true;
}
if ('openKeys' in nextProps) {
newState.openKeys = nextProps.openKeys;
} else {
// [Legacy] Old code will return after `openKeys` changed.
// Not sure the reason, we should keep this logic still.
if (nextProps.inlineCollapsed && !prevProps.inlineCollapsed || nextProps.siderCollapsed && !prevProps.siderCollapsed) {
newState.switchingModeFromInline = true;
newState.inlineOpenKeys = prevState.openKeys;
newState.openKeys = [];
}
if (!nextProps.inlineCollapsed && prevProps.inlineCollapsed || !nextProps.siderCollapsed && prevProps.siderCollapsed) {
newState.openKeys = prevState.inlineOpenKeys;
newState.inlineOpenKeys = [];
}
}
return newState;
}
}]);
return InternalMenu;
}(React.Component);
InternalMenu.defaultProps = {
className: '',
theme: 'light',
focusable: false
};
(0, _reactLifecyclesCompat.polyfill)(InternalMenu); // We should keep this as ref-able
var Menu =
/*#__PURE__*/
function (_React$Component2) {
_inherits(Menu, _React$Component2);
function Menu() {
_classCallCheck(this, Menu);
return _possibleConstructorReturn(this, _getPrototypeOf(Menu).apply(this, arguments));
}
_createClass(Menu, [{
key: "render",
value: function render() {
var _this2 = this;
return React.createElement(_Sider.SiderContext.Consumer, null, function (context) {
return React.createElement(InternalMenu, _extends({}, _this2.props, context));
});
}
}]);
return Menu;
}(React.Component);
exports["default"] = Menu;
Menu.Divider = _rcMenu.Divider;
Menu.Item = _MenuItem["default"];
Menu.SubMenu = _SubMenu["default"];
Menu.ItemGroup = _rcMenu.ItemGroup;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 923:
/***/ (function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(911);
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is returned in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
module.exports = get;
/***/ }),
/***/ 924:
/***/ (function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(884),
isArguments = __webpack_require__(910),
isArray = __webpack_require__(877),
isIndex = __webpack_require__(890),
isLength = __webpack_require__(895),
toKey = __webpack_require__(882);
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isArguments(object));
}
module.exports = hasPath;
/***/ }),
/***/ 926:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a