webpackJsonp([71],{ /***/ 1000: /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(38); var createDesc = __webpack_require__(93); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /***/ 1001: /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(36)('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /***/ 1002: /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(993); 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); } }; /***/ }), /***/ 1003: /***/ (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__(1004); 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 ); /***/ }), /***/ 1004: /***/ (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__(60); var emptyObject = __webpack_require__(1005); var _invariant = __webpack_require__(1006); 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; /***/ }), /***/ 1005: /***/ (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; /***/ }), /***/ 1006: /***/ (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; /***/ }), /***/ 1007: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _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; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _util = __webpack_require__(862); var _validator = __webpack_require__(1008); var _validator2 = _interopRequireDefault(_validator); var _messages2 = __webpack_require__(1028); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Encapsulates a validation schema. * * @param descriptor An object declaring validation rules * for this schema. */ function Schema(descriptor) { this.rules = null; this._messages = _messages2.messages; this.define(descriptor); } Schema.prototype = { messages: function messages(_messages) { if (_messages) { this._messages = (0, _util.deepMerge)((0, _messages2.newMessages)(), _messages); } return this._messages; }, define: function define(rules) { if (!rules) { throw new Error('Cannot configure a schema with no rules'); } if ((typeof rules === 'undefined' ? 'undefined' : _typeof(rules)) !== 'object' || Array.isArray(rules)) { throw new Error('Rules must be an object'); } this.rules = {}; var z = void 0; var item = void 0; for (z in rules) { if (rules.hasOwnProperty(z)) { item = rules[z]; this.rules[z] = Array.isArray(item) ? item : [item]; } } }, validate: function validate(source_) { var _this = this; var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var oc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {}; var source = source_; var options = o; var callback = oc; if (typeof options === 'function') { callback = options; options = {}; } if (!this.rules || Object.keys(this.rules).length === 0) { if (callback) { callback(); } return Promise.resolve(); } function complete(results) { var i = void 0; var errors = []; var fields = {}; function add(e) { if (Array.isArray(e)) { var _errors; errors = (_errors = errors).concat.apply(_errors, e); } else { errors.push(e); } } for (i = 0; i < results.length; i++) { add(results[i]); } if (!errors.length) { errors = null; fields = null; } else { fields = (0, _util.convertFieldsError)(errors); } callback(errors, fields); } if (options.messages) { var messages = this.messages(); if (messages === _messages2.messages) { messages = (0, _messages2.newMessages)(); } (0, _util.deepMerge)(messages, options.messages); options.messages = messages; } else { options.messages = this.messages(); } var arr = void 0; var value = void 0; var series = {}; var keys = options.keys || Object.keys(this.rules); keys.forEach(function (z) { arr = _this.rules[z]; value = source[z]; arr.forEach(function (r) { var rule = r; if (typeof rule.transform === 'function') { if (source === source_) { source = _extends({}, source); } value = source[z] = rule.transform(value); } if (typeof rule === 'function') { rule = { validator: rule }; } else { rule = _extends({}, rule); } rule.validator = _this.getValidationMethod(rule); rule.field = z; rule.fullField = rule.fullField || z; rule.type = _this.getType(rule); if (!rule.validator) { return; } series[z] = series[z] || []; series[z].push({ rule: rule, value: value, source: source, field: z }); }); }); var errorFields = {}; return (0, _util.asyncMap)(series, options, function (data, doIt) { var rule = data.rule; var deep = (rule.type === 'object' || rule.type === 'array') && (_typeof(rule.fields) === 'object' || _typeof(rule.defaultField) === 'object'); deep = deep && (rule.required || !rule.required && data.value); rule.field = data.field; function addFullfield(key, schema) { return _extends({}, schema, { fullField: rule.fullField + '.' + key }); } function cb() { var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var errors = e; if (!Array.isArray(errors)) { errors = [errors]; } if (!options.suppressWarning && errors.length) { Schema.warning('async-validator:', errors); } if (errors.length && rule.message) { errors = [].concat(rule.message); } errors = errors.map((0, _util.complementError)(rule)); if (options.first && errors.length) { errorFields[rule.field] = 1; return doIt(errors); } if (!deep) { doIt(errors); } else { // if rule is required but the target object // does not exist fail at the rule level and don't // go deeper if (rule.required && !data.value) { if (rule.message) { errors = [].concat(rule.message).map((0, _util.complementError)(rule)); } else if (options.error) { errors = [options.error(rule, (0, _util.format)(options.messages.required, rule.field))]; } else { errors = []; } return doIt(errors); } var fieldsSchema = {}; if (rule.defaultField) { for (var k in data.value) { if (data.value.hasOwnProperty(k)) { fieldsSchema[k] = rule.defaultField; } } } fieldsSchema = _extends({}, fieldsSchema, data.rule.fields); for (var f in fieldsSchema) { if (fieldsSchema.hasOwnProperty(f)) { var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]]; fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f)); } } var schema = new Schema(fieldsSchema); schema.messages(options.messages); if (data.rule.options) { data.rule.options.messages = options.messages; data.rule.options.error = options.error; } schema.validate(data.value, data.rule.options || options, function (errs) { var finalErrors = []; if (errors && errors.length) { finalErrors.push.apply(finalErrors, errors); } if (errs && errs.length) { finalErrors.push.apply(finalErrors, errs); } doIt(finalErrors.length ? finalErrors : null); }); } } var res = void 0; if (rule.asyncValidator) { res = rule.asyncValidator(rule, data.value, cb, data.source, options); } else if (rule.validator) { res = rule.validator(rule, data.value, cb, data.source, options); if (res === true) { cb(); } else if (res === false) { cb(rule.message || rule.field + ' fails'); } else if (res instanceof Array) { cb(res); } else if (res instanceof Error) { cb(res.message); } } if (res && res.then) { res.then(function () { return cb(); }, function (e) { return cb(e); }); } }, function (results) { complete(results); }); }, getType: function getType(rule) { if (rule.type === undefined && rule.pattern instanceof RegExp) { rule.type = 'pattern'; } if (typeof rule.validator !== 'function' && rule.type && !_validator2['default'].hasOwnProperty(rule.type)) { throw new Error((0, _util.format)('Unknown rule type %s', rule.type)); } return rule.type || 'string'; }, getValidationMethod: function getValidationMethod(rule) { if (typeof rule.validator === 'function') { return rule.validator; } var keys = Object.keys(rule); var messageIndex = keys.indexOf('message'); if (messageIndex !== -1) { keys.splice(messageIndex, 1); } if (keys.length === 1 && keys[0] === 'required') { return _validator2['default'].required; } return _validator2['default'][this.getType(rule)] || false; } }; Schema.register = function register(type, validator) { if (typeof validator !== 'function') { throw new Error('Cannot register a validator by type, validator is not a function'); } _validator2['default'][type] = validator; }; Schema.warning = _util.warning; Schema.messages = _messages2.messages; exports['default'] = Schema; /***/ }), /***/ 1008: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _string = __webpack_require__(1009); var _string2 = _interopRequireDefault(_string); var _method = __webpack_require__(1015); var _method2 = _interopRequireDefault(_method); var _number = __webpack_require__(1016); var _number2 = _interopRequireDefault(_number); var _boolean = __webpack_require__(1017); var _boolean2 = _interopRequireDefault(_boolean); var _regexp = __webpack_require__(1018); var _regexp2 = _interopRequireDefault(_regexp); var _integer = __webpack_require__(1019); var _integer2 = _interopRequireDefault(_integer); var _float = __webpack_require__(1020); var _float2 = _interopRequireDefault(_float); var _array = __webpack_require__(1021); var _array2 = _interopRequireDefault(_array); var _object = __webpack_require__(1022); var _object2 = _interopRequireDefault(_object); var _enum = __webpack_require__(1023); var _enum2 = _interopRequireDefault(_enum); var _pattern = __webpack_require__(1024); var _pattern2 = _interopRequireDefault(_pattern); var _date = __webpack_require__(1025); var _date2 = _interopRequireDefault(_date); var _required = __webpack_require__(1026); var _required2 = _interopRequireDefault(_required); var _type = __webpack_require__(1027); var _type2 = _interopRequireDefault(_type); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = { string: _string2['default'], method: _method2['default'], number: _number2['default'], boolean: _boolean2['default'], regexp: _regexp2['default'], integer: _integer2['default'], float: _float2['default'], array: _array2['default'], object: _object2['default'], 'enum': _enum2['default'], pattern: _pattern2['default'], date: _date2['default'], url: _type2['default'], hex: _type2['default'], email: _type2['default'], required: _required2['default'] }; /***/ }), /***/ 1009: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Performs validation for string types. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function string(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options, 'string'); if (!(0, _util.isEmptyValue)(value, 'string')) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); _rule2['default'].pattern(rule, value, source, errors, options); if (rule.whitespace === true) { _rule2['default'].whitespace(rule, value, source, errors, options); } } } callback(errors); } exports['default'] = string; /***/ }), /***/ 1010: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__(862); 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 whitespace. * * @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 whitespace(rule, value, source, errors, options) { if (/^\s+$/.test(value) || value === '') { errors.push(util.format(options.messages.whitespace, rule.fullField)); } } exports['default'] = whitespace; /***/ }), /***/ 1011: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _util = __webpack_require__(862); var util = _interopRequireWildcard(_util); var _required = __webpack_require__(904); var _required2 = _interopRequireDefault(_required); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 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; } } /* eslint max-len:0 */ var pattern = { // http://emailregex.com/ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'), hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i }; var types = { integer: function integer(value) { return types.number(value) && parseInt(value, 10) === value; }, float: function float(value) { return types.number(value) && !types.integer(value); }, array: function array(value) { return Array.isArray(value); }, regexp: function regexp(value) { if (value instanceof RegExp) { return true; } try { return !!new RegExp(value); } catch (e) { return false; } }, date: function date(value) { return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function'; }, number: function number(value) { if (isNaN(value)) { return false; } return typeof value === 'number'; }, object: function object(value) { return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !types.array(value); }, method: function method(value) { return typeof value === 'function'; }, email: function email(value) { return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255; }, url: function url(value) { return typeof value === 'string' && !!value.match(pattern.url); }, hex: function hex(value) { return typeof value === 'string' && !!value.match(pattern.hex); } }; /** * Rule for validating the type of a value. * * @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 type(rule, value, source, errors, options) { if (rule.required && value === undefined) { (0, _required2['default'])(rule, value, source, errors, options); return; } var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex']; var ruleType = rule.type; if (custom.indexOf(ruleType) > -1) { if (!types[ruleType](value)) { errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type)); } // straight typeof check } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== rule.type) { errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type)); } } exports['default'] = type; /***/ }), /***/ 1012: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__(862); 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 minimum and maximum allowed values. * * @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 range(rule, value, source, errors, options) { var len = typeof rule.len === 'number'; var min = typeof rule.min === 'number'; var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane) var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; var val = value; var key = null; var num = typeof value === 'number'; var str = typeof value === 'string'; var arr = Array.isArray(value); if (num) { key = 'number'; } else if (str) { key = 'string'; } else if (arr) { key = 'array'; } // if the value is not of a supported type for range validation // the validation rule rule should use the // type property to also test for a particular type if (!key) { return false; } if (arr) { val = value.length; } if (str) { // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3 val = value.replace(spRegexp, '_').length; } if (len) { if (val !== rule.len) { errors.push(util.format(options.messages[key].len, rule.fullField, rule.len)); } } else if (min && !max && val < rule.min) { errors.push(util.format(options.messages[key].min, rule.fullField, rule.min)); } else if (max && !min && val > rule.max) { errors.push(util.format(options.messages[key].max, rule.fullField, rule.max)); } else if (min && max && (val < rule.min || val > rule.max)) { errors.push(util.format(options.messages[key].range, rule.fullField, rule.min, rule.max)); } } exports['default'] = range; /***/ }), /***/ 1013: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__(862); 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; } } var ENUM = 'enum'; /** * Rule for validating a value exists in an enumerable list. * * @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 enumerable(rule, value, source, errors, options) { rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : []; if (rule[ENUM].indexOf(value) === -1) { errors.push(util.format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', '))); } } exports['default'] = enumerable; /***/ }), /***/ 1014: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__(862); 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 a regular expression pattern. * * @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 pattern(rule, value, source, errors, options) { if (rule.pattern) { if (rule.pattern instanceof RegExp) { // if a RegExp instance is passed, reset `lastIndex` in case its `global` // flag is accidentally set to `true`, which in a validation scenario // is not necessary and the result might be misleading rule.pattern.lastIndex = 0; if (!rule.pattern.test(value)) { errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } else if (typeof rule.pattern === 'string') { var _pattern = new RegExp(rule.pattern); if (!_pattern.test(value)) { errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } } } exports['default'] = pattern; /***/ }), /***/ 1015: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a function. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function method(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = method; /***/ }), /***/ 1016: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a number. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function number(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (value === '') { value = undefined; } if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = number; /***/ }), /***/ 1017: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__(862); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a boolean. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function boolean(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = boolean; /***/ }), /***/ 1018: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates the regular expression type. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function regexp(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (!(0, _util.isEmptyValue)(value)) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = regexp; /***/ }), /***/ 1019: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a number is an integer. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function integer(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = integer; /***/ }), /***/ 1020: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a number is a floating point number. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function floatFn(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = floatFn; /***/ }), /***/ 1021: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates an array. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function array(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, 'array') && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options, 'array'); if (!(0, _util.isEmptyValue)(value, 'array')) { _rule2['default'].type(rule, value, source, errors, options); _rule2['default'].range(rule, value, source, errors, options); } } callback(errors); } exports['default'] = array; /***/ }), /***/ 1022: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates an object. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function object(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value !== undefined) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = object; /***/ }), /***/ 1023: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ENUM = 'enum'; /** * Validates an enumerable list. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function enumerable(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (value) { _rule2['default'][ENUM](rule, value, source, errors, options); } } callback(errors); } exports['default'] = enumerable; /***/ }), /***/ 1024: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Validates a regular expression pattern. * * Performs validation when a rule only contains * a pattern property but is not declared as a string type. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param callback The callback function. * @param source The source object being validated. * @param options The validation options. * @param options.messages The validation messages. */ function pattern(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (!(0, _util.isEmptyValue)(value, 'string')) { _rule2['default'].pattern(rule, value, source, errors, options); } } callback(errors); } exports['default'] = pattern; /***/ }), /***/ 1025: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function date(rule, value, callback, source, options) { // console.log('integer rule called %j', rule); var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value); if (validate) { if ((0, _util.isEmptyValue)(value) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options); if (!(0, _util.isEmptyValue)(value)) { var dateObject = void 0; if (typeof value === 'number') { dateObject = new Date(value); } else { dateObject = value; } _rule2['default'].type(rule, dateObject, source, errors, options); if (dateObject) { _rule2['default'].range(rule, dateObject.getTime(), source, errors, options); } } } callback(errors); } exports['default'] = date; /***/ }), /***/ 1026: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function required(rule, value, callback, source, options) { var errors = []; var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : _typeof(value); _rule2['default'].required(rule, value, source, errors, options, type); callback(errors); } exports['default'] = required; /***/ }), /***/ 1027: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rule = __webpack_require__(863); var _rule2 = _interopRequireDefault(_rule); var _util = __webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function type(rule, value, callback, source, options) { var ruleType = rule.type; var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((0, _util.isEmptyValue)(value, ruleType) && !rule.required) { return callback(); } _rule2['default'].required(rule, value, source, errors, options, ruleType); if (!(0, _util.isEmptyValue)(value, ruleType)) { _rule2['default'].type(rule, value, source, errors, options); } } callback(errors); } exports['default'] = type; /***/ }), /***/ 1028: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.newMessages = newMessages; function newMessages() { return { 'default': 'Validation error on field %s', required: '%s is required', 'enum': '%s must be one of %s', whitespace: '%s cannot be empty', date: { format: '%s date %s is invalid for format %s', parse: '%s date could not be parsed, %s is invalid ', invalid: '%s date %s is invalid' }, types: { string: '%s is not a %s', method: '%s is not a %s (function)', array: '%s is not an %s', object: '%s is not an %s', number: '%s is not a %s', date: '%s is not a %s', boolean: '%s is not a %s', integer: '%s is not an %s', float: '%s is not a %s', regexp: '%s is not a valid %s', email: '%s is not a valid %s', url: '%s is not a valid %s', hex: '%s is not a valid %s' }, string: { len: '%s must be exactly %s characters', min: '%s must be at least %s characters', max: '%s cannot be longer than %s characters', range: '%s must be between %s and %s characters' }, number: { len: '%s must equal %s', min: '%s cannot be less than %s', max: '%s cannot be greater than %s', range: '%s must be between %s and %s' }, array: { len: '%s must be exactly %s in length', min: '%s cannot be less than %s in length', max: '%s cannot be greater than %s in length', range: '%s must be between %s and %s in length' }, pattern: { mismatch: '%s value %s does not match pattern %s' }, clone: function clone() { var cloned = JSON.parse(JSON.stringify(this)); cloned.clone = this.clone; return cloned; } }; } var messages = exports.messages = newMessages(); /***/ }), /***/ 1029: /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(917), castPath = __webpack_require__(874), isIndex = __webpack_require__(873), isObject = __webpack_require__(171), toKey = __webpack_require__(871); /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject(object)) { return object; } path = castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = toKey(path[index]), newValue = value; if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } module.exports = baseSet; /***/ }), /***/ 1030: /***/ (function(module, exports, __webpack_require__) { "use strict"; var reactIs = __webpack_require__(181); /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ 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; TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; function getStatics(component) { // React v16.11 and below if (reactIs.isMemo(component)) { return MEMO_STATICS; } // React v16.12 and above 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; } module.exports = hoistNonReactStatics; /***/ }), /***/ 1031: /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(1123), baseMatchesProperty = __webpack_require__(1139), identity = __webpack_require__(948), isArray = __webpack_require__(865), property = __webpack_require__(1142); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /***/ 1032: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(872); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /***/ 1033: /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /***/ 1034: /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /***/ 1035: /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /***/ 1036: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(872), Map = __webpack_require__(876), MapCache = __webpack_require__(877); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /***/ 1037: /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /***/ 1038: /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(304), isLength = __webpack_require__(875), isObjectLike = __webpack_require__(302); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /***/ 1039: /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /***/ 1040: /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(877), setCacheAdd = __webpack_require__(1126), setCacheHas = __webpack_require__(1127); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /***/ 1041: /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /***/ 1042: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(866), root = __webpack_require__(170); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /***/ 1043: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a \n ' + domainScript + '\n \n \n
\n \n ' + domainInput + '\n \n
\n \n \n '; } }, { key: 'initIframeSrc', value: function initIframeSrc() { if (this.domain) { this.getIframeNode().src = 'javascript:void((function(){\n var d = document;\n d.open();\n d.domain=\'' + this.domain + '\';\n d.write(\'\');\n d.close();\n })())'; } } }, { key: 'initIframe', value: function initIframe() { var iframeNode = this.getIframeNode(); var win = iframeNode.contentWindow; var doc = void 0; this.domain = this.domain || ''; this.initIframeSrc(); try { doc = win.document; } catch (e) { this.domain = document.domain; this.initIframeSrc(); win = iframeNode.contentWindow; doc = win.document; } doc.open('text/html', 'replace'); doc.write(this.getIframeHTML(this.domain)); doc.close(); this.getFormInputNode().onchange = this.onChange; } }, { key: 'endUpload', value: function endUpload() { if (this.state.uploading) { this.file = {}; // hack avoid batch this.state.uploading = false; this.setState({ uploading: false }); this.initIframe(); } } }, { key: 'startUpload', value: function startUpload() { if (!this.state.uploading) { this.state.uploading = true; this.setState({ uploading: true }); } } }, { key: 'updateIframeWH', value: function updateIframeWH() { var rootNode = __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.findDOMNode(this); var iframeNode = this.getIframeNode(); iframeNode.style.height = rootNode.offsetHeight + 'px'; iframeNode.style.width = rootNode.offsetWidth + 'px'; } }, { key: 'abort', value: function abort(file) { if (file) { var uid = file; if (file && file.uid) { uid = file.uid; } if (uid === this.file.uid) { this.endUpload(); } } else { this.endUpload(); } } }, { key: 'post', value: function post(file) { var _this4 = this; var formNode = this.getFormNode(); var dataSpan = this.getFormDataNode(); var data = this.props.data; var onStart = this.props.onStart; if (typeof data === 'function') { data = data(file); } var inputs = document.createDocumentFragment(); for (var key in data) { if (data.hasOwnProperty(key)) { var input = document.createElement('input'); input.setAttribute('name', key); input.value = data[key]; inputs.appendChild(input); } } dataSpan.appendChild(inputs); new Promise(function (resolve) { var action = _this4.props.action; if (typeof action === 'function') { return resolve(action(file)); } resolve(action); }).then(function (action) { formNode.setAttribute('action', action); formNode.submit(); dataSpan.innerHTML = ''; onStart(file); }); } }, { key: 'render', value: function render() { var _classNames; var _props = this.props, Tag = _props.component, disabled = _props.disabled, className = _props.className, prefixCls = _props.prefixCls, children = _props.children, style = _props.style; var iframeStyle = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, IFRAME_STYLE, { display: this.state.uploading || disabled ? 'none' : '' }); var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()((_classNames = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls, true), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', disabled), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, className, className), _classNames)); return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( Tag, { className: cls, style: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({ position: 'relative', zIndex: 0 }, style) }, __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('iframe', { ref: this.saveIframe, onLoad: this.onLoad, style: iframeStyle }), children ); } }]); return IframeUploader; }(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]); IframeUploader.propTypes = { component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, style: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, prefixCls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, accept: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, onStart: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, multiple: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any, data: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]), action: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]), name: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string }; /* harmony default export */ __webpack_exports__["a"] = (IframeUploader); /***/ }), /***/ 1159: /***/ (function(module, exports, __webpack_require__) { var baseIteratee = __webpack_require__(1031), baseUniq = __webpack_require__(1160); /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * uniqueness is computed. The order of result values is determined by the * order they occur in the array. The iteratee is invoked with one argument: * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * * _.uniqBy([2.1, 1.2, 2.3], Math.floor); * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : []; } module.exports = uniqBy; /***/ }), /***/ 1160: /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(1040), arrayIncludes = __webpack_require__(1161), arrayIncludesWith = __webpack_require__(1165), cacheHas = __webpack_require__(1041), createSet = __webpack_require__(1166), setToArray = __webpack_require__(950); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new duplicate free array. */ function baseUniq(array, iteratee, comparator) { var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; if (comparator) { isCommon = false; includes = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { var set = iteratee ? null : createSet(array); if (set) { return setToArray(set); } isCommon = false; includes = cacheHas; seen = new SetCache; } else { seen = iteratee ? [] : result; } outer: while (++index < length) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed) { continue outer; } } if (iteratee) { seen.push(computed); } result.push(value); } else if (!includes(seen, computed, comparator)) { if (seen !== result) { seen.push(computed); } result.push(value); } } return result; } module.exports = baseUniq; /***/ }), /***/ 1161: /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(1162); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /***/ 1162: /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(1057), baseIsNaN = __webpack_require__(1163), strictIndexOf = __webpack_require__(1164); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; /***/ }), /***/ 1163: /***/ (function(module, exports) { /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; /***/ }), /***/ 1164: /***/ (function(module, exports) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /***/ 1165: /***/ (function(module, exports) { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /***/ 1166: /***/ (function(module, exports, __webpack_require__) { var Set = __webpack_require__(1042), noop = __webpack_require__(1167), setToArray = __webpack_require__(950); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { return new Set(values); }; module.exports = createSet; /***/ }), /***/ 1167: /***/ (function(module, exports) { /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } module.exports = noop; /***/ }), /***/ 1168: /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(1057), baseIteratee = __webpack_require__(1031), toInteger = __webpack_require__(1120); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; /***/ }), /***/ 1169: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _rcAnimate = _interopRequireDefault(__webpack_require__(92)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _utils = __webpack_require__(1058); var _icon = _interopRequireDefault(__webpack_require__(26)); var _tooltip = _interopRequireDefault(__webpack_require__(172)); var _progress = _interopRequireDefault(__webpack_require__(1101)); var _configProvider = __webpack_require__(11); 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 _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 UploadList = /*#__PURE__*/ function (_React$Component) { _inherits(UploadList, _React$Component); function UploadList() { var _this; _classCallCheck(this, UploadList); _this = _possibleConstructorReturn(this, _getPrototypeOf(UploadList).apply(this, arguments)); _this.handlePreview = function (file, e) { var onPreview = _this.props.onPreview; if (!onPreview) { return; } e.preventDefault(); return onPreview(file); }; _this.handleDownload = function (file) { var onDownload = _this.props.onDownload; if (typeof onDownload === 'function') { onDownload(file); } else if (file.url) { window.open(file.url); } }; _this.handleClose = function (file) { var onRemove = _this.props.onRemove; if (onRemove) { onRemove(file); } }; _this.renderUploadList = function (_ref) { var _classNames4; var getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, _this$props$items = _this$props.items, items = _this$props$items === void 0 ? [] : _this$props$items, listType = _this$props.listType, showPreviewIcon = _this$props.showPreviewIcon, showRemoveIcon = _this$props.showRemoveIcon, showDownloadIcon = _this$props.showDownloadIcon, locale = _this$props.locale, progressAttr = _this$props.progressAttr; var prefixCls = getPrefixCls('upload', customizePrefixCls); var list = items.map(function (file) { var _classNames, _classNames2; var progress; var icon = React.createElement(_icon["default"], { type: file.status === 'uploading' ? 'loading' : 'paper-clip' }); if (listType === 'picture' || listType === 'picture-card') { if (listType === 'picture-card' && file.status === 'uploading') { icon = React.createElement("div", { className: "".concat(prefixCls, "-list-item-uploading-text") }, locale.uploading); } else if (!file.thumbUrl && !file.url) { icon = React.createElement(_icon["default"], { className: "".concat(prefixCls, "-list-item-thumbnail"), type: "picture", theme: "twoTone" }); } else { var thumbnail = (0, _utils.isImageUrl)(file) ? React.createElement("img", { src: file.thumbUrl || file.url, alt: file.name, className: "".concat(prefixCls, "-list-item-image") }) : React.createElement(_icon["default"], { type: "file", className: "".concat(prefixCls, "-list-item-icon"), theme: "twoTone" }); icon = React.createElement("a", { className: "".concat(prefixCls, "-list-item-thumbnail"), onClick: function onClick(e) { return _this.handlePreview(file, e); }, href: file.url || file.thumbUrl, target: "_blank", rel: "noopener noreferrer" }, thumbnail); } } if (file.status === 'uploading') { // show loading icon if upload progress listener is disabled var loadingProgress = 'percent' in file ? React.createElement(_progress["default"], _extends({ type: "line" }, progressAttr, { percent: file.percent })) : null; progress = React.createElement("div", { className: "".concat(prefixCls, "-list-item-progress"), key: "progress" }, loadingProgress); } var infoUploadingClass = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-list-item"), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-").concat(file.status), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-list-type-").concat(listType), true), _classNames)); var linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps; var removeIcon = showRemoveIcon ? React.createElement(_icon["default"], { type: "delete", title: locale.removeFile, onClick: function onClick() { return _this.handleClose(file); } }) : null; var downloadIcon = showDownloadIcon && file.status === 'done' ? React.createElement(_icon["default"], { type: "download", title: locale.downloadFile, onClick: function onClick() { return _this.handleDownload(file); } }) : null; var downloadOrDelete = listType !== 'picture-card' && React.createElement("span", { key: "download-delete", className: "".concat(prefixCls, "-list-item-card-actions ").concat(listType === 'picture' ? 'picture' : '') }, downloadIcon && React.createElement("a", { title: locale.downloadFile }, downloadIcon), removeIcon && React.createElement("a", { title: locale.removeFile }, removeIcon)); var listItemNameClass = (0, _classnames["default"])((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name-icon-count-").concat([downloadIcon, removeIcon].filter(function (x) { return x; }).length), true), _classNames2)); var preview = file.url ? [React.createElement("a", _extends({ key: "view", target: "_blank", rel: "noopener noreferrer", className: listItemNameClass, title: file.name }, linkProps, { href: file.url, onClick: function onClick(e) { return _this.handlePreview(file, e); } }), file.name), downloadOrDelete] : [React.createElement("span", { key: "view", className: listItemNameClass, onClick: function onClick(e) { return _this.handlePreview(file, e); }, title: file.name }, file.name), downloadOrDelete]; var style = { pointerEvents: 'none', opacity: 0.5 }; var previewIcon = showPreviewIcon ? React.createElement("a", { href: file.url || file.thumbUrl, target: "_blank", rel: "noopener noreferrer", style: file.url || file.thumbUrl ? undefined : style, onClick: function onClick(e) { return _this.handlePreview(file, e); }, title: locale.previewFile }, React.createElement(_icon["default"], { type: "eye-o" })) : null; var actions = listType === 'picture-card' && file.status !== 'uploading' && React.createElement("span", { className: "".concat(prefixCls, "-list-item-actions") }, previewIcon, file.status === 'done' && downloadIcon, removeIcon); var message; if (file.response && typeof file.response === 'string') { message = file.response; } else { message = file.error && file.error.statusText || locale.uploadError; } var iconAndPreview = React.createElement("span", null, icon, preview); var dom = React.createElement("div", { className: infoUploadingClass }, React.createElement("div", { className: "".concat(prefixCls, "-list-item-info") }, iconAndPreview), actions, React.createElement(_rcAnimate["default"], { transitionName: "fade", component: "" }, progress)); var listContainerNameClass = (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "-list-picture-card-container"), listType === 'picture-card')); return React.createElement("div", { key: file.uid, className: listContainerNameClass }, file.status === 'error' ? React.createElement(_tooltip["default"], { title: message }, dom) : React.createElement("span", null, dom)); }); var listClassNames = (0, _classnames["default"])((_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-list"), true), _defineProperty(_classNames4, "".concat(prefixCls, "-list-").concat(listType), true), _classNames4)); var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate'; return React.createElement(_rcAnimate["default"], { transitionName: "".concat(prefixCls, "-").concat(animationDirection), component: "div", className: listClassNames }, list); }; return _this; } _createClass(UploadList, [{ key: "componentDidUpdate", value: function componentDidUpdate() { var _this2 = this; var _this$props2 = this.props, listType = _this$props2.listType, items = _this$props2.items, previewFile = _this$props2.previewFile; if (listType !== 'picture' && listType !== 'picture-card') { return; } (items || []).forEach(function (file) { if (typeof document === 'undefined' || typeof window === 'undefined' || !window.FileReader || !window.File || !(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) { return; } file.thumbUrl = ''; if (previewFile) { previewFile(file.originFileObj).then(function (previewDataUrl) { // Need append '' to avoid dead loop file.thumbUrl = previewDataUrl || ''; _this2.forceUpdate(); }); } }); } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderUploadList); } }]); return UploadList; }(React.Component); exports["default"] = UploadList; UploadList.defaultProps = { listType: 'text', progressAttr: { strokeWidth: 2, showInfo: false }, showRemoveIcon: true, showDownloadIcon: false, showPreviewIcon: true, previewFile: _utils.previewImage }; //# sourceMappingURL=UploadList.js.map /***/ }), /***/ 1170: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _Upload = _interopRequireDefault(__webpack_require__(1055)); 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); } // stick class comoponent to avoid React ref warning inside Form // https://github.com/ant-design/ant-design/issues/18707 // eslint-disable-next-line react/prefer-stateless-function var Dragger = /*#__PURE__*/ function (_React$Component) { _inherits(Dragger, _React$Component); function Dragger() { _classCallCheck(this, Dragger); return _possibleConstructorReturn(this, _getPrototypeOf(Dragger).apply(this, arguments)); } _createClass(Dragger, [{ key: "render", value: function render() { var props = this.props; return React.createElement(_Upload["default"], _extends({}, props, { type: "drag", style: _extends(_extends({}, props.style), { height: props.height }) })); } }]); return Dragger; }(React.Component); exports["default"] = Dragger; //# sourceMappingURL=Dragger.js.map /***/ }), /***/ 1174: /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(917), baseAssignValue = __webpack_require__(887); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /***/ 1178: /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(1218), createAssigner = __webpack_require__(1222); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /***/ 1179: /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(974); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /***/ 1183: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(29); __webpack_require__(1281); __webpack_require__(188); __webpack_require__(178); __webpack_require__(308); __webpack_require__(971); __webpack_require__(76); __webpack_require__(901); //# sourceMappingURL=css.js.map /***/ }), /***/ 1184: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Table = _interopRequireDefault(__webpack_require__(1284)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Table["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /***/ 1190: /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(1200); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /***/ 1191: /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(170); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(309)(module))) /***/ }), /***/ 1192: /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(1179); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /***/ 1193: /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /***/ 1194: /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(1201), getPrototype = __webpack_require__(1071), isPrototype = __webpack_require__(947); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /***/ 1195: /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(304), getPrototype = __webpack_require__(1071), isObjectLike = __webpack_require__(302); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /***/ 1200: /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /***/ 1201: /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(171); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /***/ 1202: /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(171), isPrototype = __webpack_require__(947), nativeKeysIn = __webpack_require__(1203); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /***/ 1203: /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /***/ 1218: /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(916), assignMergeValue = __webpack_require__(1085), baseFor = __webpack_require__(1190), baseMergeDeep = __webpack_require__(1219), isObject = __webpack_require__(171), keysIn = __webpack_require__(1072), safeGet = __webpack_require__(1086); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { stack || (stack = new Stack); if (isObject(srcValue)) { baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /***/ 1219: /***/ (function(module, exports, __webpack_require__) { var assignMergeValue = __webpack_require__(1085), cloneBuffer = __webpack_require__(1191), cloneTypedArray = __webpack_require__(1192), copyArray = __webpack_require__(1193), initCloneObject = __webpack_require__(1194), isArguments = __webpack_require__(882), isArray = __webpack_require__(865), isArrayLikeObject = __webpack_require__(1220), isBuffer = __webpack_require__(897), isFunction = __webpack_require__(878), isObject = __webpack_require__(171), isPlainObject = __webpack_require__(1195), isTypedArray = __webpack_require__(899), safeGet = __webpack_require__(1086), toPlainObject = __webpack_require__(1221); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /***/ 1220: /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(896), isObjectLike = __webpack_require__(302); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /***/ 1221: /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(1174), keysIn = __webpack_require__(1072); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /***/ 1222: /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(1223), isIterateeCall = __webpack_require__(1230); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /***/ 1223: /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(948), overRest = __webpack_require__(1224), setToString = __webpack_require__(1226); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /***/ 1224: /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(1225); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /***/ 1225: /***/ (function(module, exports) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /***/ 1226: /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__(1227), shortOut = __webpack_require__(1229); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /***/ 1227: /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(1228), defineProperty = __webpack_require__(902), identity = __webpack_require__(948); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /***/ 1228: /***/ (function(module, exports) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /***/ 1229: /***/ (function(module, exports) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /***/ 1230: /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(870), isArrayLike = __webpack_require__(896), isIndex = __webpack_require__(873), isObject = __webpack_require__(171); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /***/ 1231: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _KeyCode = _interopRequireDefault(__webpack_require__(311)); 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; }; /** * Wrap of sub component which need use as Button capacity (like Icon component). * This helps accessibility reader to tread as a interactive button to operation. */ var inlineStyle = { border: 0, background: 'transparent', padding: 0, lineHeight: 'inherit', display: 'inline-block' }; var TransButton = /*#__PURE__*/ function (_React$Component) { _inherits(TransButton, _React$Component); function TransButton() { var _this; _classCallCheck(this, TransButton); _this = _possibleConstructorReturn(this, _getPrototypeOf(TransButton).apply(this, arguments)); _this.onKeyDown = function (event) { var keyCode = event.keyCode; if (keyCode === _KeyCode["default"].ENTER) { event.preventDefault(); } }; _this.onKeyUp = function (event) { var keyCode = event.keyCode; var onClick = _this.props.onClick; if (keyCode === _KeyCode["default"].ENTER && onClick) { onClick(); } }; _this.setRef = function (btn) { _this.div = btn; }; return _this; } _createClass(TransButton, [{ key: "focus", value: function focus() { if (this.div) { this.div.focus(); } } }, { key: "blur", value: function blur() { if (this.div) { this.div.blur(); } } }, { key: "render", value: function render() { var _a = this.props, style = _a.style, noStyle = _a.noStyle, restProps = __rest(_a, ["style", "noStyle"]); return React.createElement("div", _extends({ role: "button", tabIndex: 0, ref: this.setRef }, restProps, { onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp, style: _extends(_extends({}, !noStyle ? inlineStyle : null), style) })); } }]); return TransButton; }(React.Component); var _default = TransButton; exports["default"] = _default; //# sourceMappingURL=transButton.js.map /***/ }), /***/ 1281: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a